diff --git a/.github/workflows/execute-tests-and-promote.yml b/.github/workflows/execute-tests-and-promote.yml index dd50c5ee2b..708739f895 100644 --- a/.github/workflows/execute-tests-and-promote.yml +++ b/.github/workflows/execute-tests-and-promote.yml @@ -135,11 +135,6 @@ jobs: matrix: test: - integration - - kat-envoy2-1-of-5 - - kat-envoy2-2-of-5 - - kat-envoy2-3-of-5 - - kat-envoy2-4-of-5 - - kat-envoy2-5-of-5 - kat-envoy3-1-of-5 - kat-envoy3-2-of-5 - kat-envoy3-3-of-5 diff --git a/CHANGELOG.md b/CHANGELOG.md index f9aa48df8f..94cdde7056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,11 @@ it will be removed; but as it won't be user-visible this isn't considered a brea ### Emissary-ingress and Ambassador Edge Stack +- Change: The envoy version included in Emissary-ingress has been upgraded from 1.17 to latest patch + release of 1.22. This provides $produceName$ with the latest security patches, performances + enhancments, and features offered by the envoy proxy. One notable change that will effect users is + the removal of support for V2 tranport protocol. See below for more information. + - Change: Emissary-ingress can no longer be made to configure Envoy using the v2 xDS configuration API; it now always uses the v3 xDS API to configure Envoy. This change should be mostly invisible to users, with one notable exception: It removes support for `regex_type: unsafe`. @@ -88,9 +93,9 @@ it will be removed; but as it won't be user-visible this isn't considered a brea Users who rely on the specific ECMAScript Regex syntax will need to rewrite their regular expressions with RE2 syntax before upgrading to Emissary-ingress 3.0.0. - Note that the `AMBASSADOR_ENVOY_API_VERSION` environment - variable is now a misnomer, as it no longer configures which xDS API version is used, but it still - affects what the default protocol used for a `TracingService` that points at Zipkin. + As the xDS version is no longer configurable and the range of + supported Zipkin protocols is reduced (see below), the AMBASSADOR_ENVOY_API_VERSION environment + variable has been removed. - Change: With the ugprade to Envoy 1.22, Emissary-ingress no longer supports the V2 transport protocol. The `AuthService`, `LogService` and the `RateLimitService` will only support the v3 @@ -99,6 +104,12 @@ it will be removed; but as it won't be user-visible this isn't considered a brea from a previous version you will want to set it to "v3" and ensure it is working before upgrading to Emissary-ingress 3.Y. +- Change: With the upgrade to Envoy 1.22, the `zipkin` driver for the `TraceService` no longer + supports setting the `collector_endpoint_version: HTTP_JSON_V1`. This was removed in Envoy 1.20 - + . + The new default will be `collector_endpoint_version: HTTP_JSON`, regardless of the + `AMBASSADOR_ENVOY_API_VERSION` environment variable. + - Change: In the standard published `.yaml` files, now included is a `Module` resource that disables the `/ambassador/v0/` → `127.0.0.1:8878` synthetic mapping. We have long recommended to turn this off for production use; it is now off in the standard YAML. The associated Helm chart @@ -113,6 +124,21 @@ it will be removed; but as it won't be user-visible this isn't considered a brea migration instructions, and while the `*-agent.yaml` files remained part of the instructions they were actually unnescessary. +- Change: The previous version of Emissary-ingress was based on Envoy 1.17 and when using grpc_stats + with `all_methods` or `services` set, it would output metrics in the following format + `envoy_cluster_grpc_{ServiceName}_{statname}`. When neither of these fields are set it would be + aggregated to `envoy_cluster_grpc_{statname}`. + The new behavior since Envoy 1.18 will produce + metrics in the following format `envoy_cluster_grpc_{MethodName}_statsname` and + `envoy_cluster_grpc_statsname`. + After further investigation we found that Envoy doesn't properly + parse service names such as `cncf.telepresence.Manager/Status`. In the future, we will work + upstream Envoy to get this parsing logic fixed to ensure consistent metric naming. + +- Bugfix: Previously setting `grpc_stats` in the `ambassador` `Module` without setting either + `grpc_stats.services` or `grpc_stats.all_methods` would result in crashing. Now it behaves as if + `grpc_stats.all_methods=false`. + ## [2.3.1] June 09, 2022 [2.3.1]: https://github.com/emissary-ingress/emissary/compare/v2.3.0...v2.3.1 diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index b7fa60732d..1fe3cb78dc 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -22,7 +22,6 @@ following Free and Open Source software: github.com/armon/go-metrics v0.3.10 MIT license github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d MIT license github.com/census-instrumentation/opencensus-proto v0.3.0 Apache License 2.0 - github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe Apache License 2.0 github.com/cncf/xds/go v0.0.0-20220121163655-4a2b9fdd466b Apache License 2.0 github.com/datawire/dlib v1.2.5-0.20211116212847-0316f8d7af2b Apache License 2.0 github.com/datawire/dtest v0.0.0-20210928162311-722b199c4c2f Apache License 2.0 @@ -94,6 +93,7 @@ following Free and Open Source software: github.com/spf13/pflag v1.0.5 3-clause BSD license github.com/stretchr/testify v1.7.0 MIT license github.com/xlab/treeprint v1.1.0 MIT license + go.opentelemetry.io/proto/otlp v0.7.0 Apache License 2.0 go.starlark.net v0.0.0-20220203230714-bb14e151c28f 3-clause BSD license golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 3-clause BSD license golang.org/x/mod v0.5.1 3-clause BSD license diff --git a/_cxx/envoy.mk b/_cxx/envoy.mk index 5c9dbb0556..35c318bab9 100644 --- a/_cxx/envoy.mk +++ b/_cxx/envoy.mk @@ -13,7 +13,7 @@ RSYNC_EXTRAS ?= # IF YOU MESS WITH ANY OF THESE VALUES, YOU MUST RUN `make update-base`. ENVOY_REPO ?= $(if $(IS_PRIVATE),git@github.com:datawire/envoy-private.git,https://github.com/datawire/envoy.git) - ENVOY_COMMIT ?= 8151e9a87cde33721a1b1f864d0c54ae72e4aa78 + ENVOY_COMMIT ?= f96adbeb45342bb8b37345df11fc395aa4b1fcda ENVOY_COMPILATION_MODE ?= opt # Increment BASE_ENVOY_RELVER on changes to `docker/base-envoy/Dockerfile`, or Envoy recipes. # You may reset BASE_ENVOY_RELVER when adjusting ENVOY_COMMIT. @@ -33,7 +33,7 @@ RSYNC_EXTRAS ?= # which commits are ancestors, I added `make guess-envoy-go-control-plane-commit` to do that in an # automated way! Still look at the commit yourself to make sure it seems sane; blindly trusting # machines is bad, mmkay? -ENVOY_GO_CONTROL_PLANE_COMMIT = f1f47757da33f7507078cf7e9e60915418c7bd10 +ENVOY_GO_CONTROL_PLANE_COMMIT = v0.10.1 # Set ENVOY_DOCKER_REPO to the list of mirrors that we should # sanity-check that things get pushed to. @@ -249,16 +249,16 @@ envoy-shell: $(ENVOY_BASH.deps) # These targets are depended on by `make generate` in `build-aux/generate.mk`. # Raw protobufs -$(OSS_HOME)/api/envoy $(OSS_HOME)/api/pb: $(OSS_HOME)/api/%: $(OSS_HOME)/_cxx/envoy +$(OSS_HOME)/api/envoy: $(OSS_HOME)/api/%: $(OSS_HOME)/_cxx/envoy rsync --recursive --delete --delete-excluded --prune-empty-dirs --include='*/' --include='*.proto' --exclude='*' $` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all errors: externally and locally generated were used to calculate the threshold. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*, only externally generated errors were used to calculate the threshold. // The threshold is used to eject hosts based on their success rate. See // :ref:`Cluster outlier detection ` documentation for details. @@ -64,7 +65,7 @@ message ClusterStatus { // The success rate threshold used in the last interval when only locally originated failures were // taken into account and externally originated errors were treated as success. // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*. The threshold is used to eject hosts based on their success rate. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -80,6 +81,9 @@ message ClusterStatus { // :ref:`Circuit breaking ` settings of the cluster. config.cluster.v3.CircuitBreakers circuit_breakers = 6; + + // Observability name of the cluster. + string observability_name = 7; } // Current state of a particular host. @@ -98,10 +102,10 @@ message HostStatus { // Request success rate for this host over the last calculated interval. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all errors: externally and locally generated were used in success rate // calculation. If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*, only externally generated errors were used in success rate calculation. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -124,7 +128,7 @@ message HostStatus { // interval when only locally originated errors are taken into account and externally originated // errors were treated as success. // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -139,7 +143,7 @@ message HostStatus { } // Health status for a host. -// [#next-free-field: 7] +// [#next-free-field: 9] message HostHealthStatus { option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.HostHealthStatus"; @@ -160,6 +164,13 @@ message HostHealthStatus { // The host has not yet been health checked. bool pending_active_hc = 6; + // The host should be excluded from panic, spillover, etc. calculations because it was explicitly + // taken out of rotation via protocol signal and is not meant to be routed to. + bool excluded_via_immediate_hc_fail = 7; + + // The host failed active HC due to timeout. + bool active_hc_timeout = 8; + // Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported // here. // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.] diff --git a/api/envoy/admin/v3/config_dump.proto b/api/envoy/admin/v3/config_dump.proto index 73156697fd..336d5b13ee 100644 --- a/api/envoy/admin/v3/config_dump.proto +++ b/api/envoy/admin/v3/config_dump.proto @@ -13,10 +13,36 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "ConfigDumpProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: ConfigDump] +// Resource status from the view of a xDS client, which tells the synchronization +// status between the xDS client and the xDS server. +enum ClientResourceStatus { + // Resource status is not available/unknown. + UNKNOWN = 0; + + // Client requested this resource but hasn't received any update from management + // server. The client will not fail requests, but will queue them until update + // arrives or the client times out waiting for the resource. + REQUESTED = 1; + + // This resource has been requested by the client but has either not been + // delivered by the server or was previously delivered by the server and then + // subsequently removed from resources provided by the server. For more + // information, please refer to the :ref:`"Knowing When a Requested Resource + // Does Not Exist" ` section. + DOES_NOT_EXIST = 2; + + // Client received this resource and replied with ACK. + ACKED = 3; + + // Client received this resource and replied with NACK. + NACKED = 4; +} + // The :ref:`/config_dump ` admin endpoint uses this wrapper // message to maintain and serve arbitrary configuration information from any component in Envoy. message ConfigDump { @@ -28,11 +54,13 @@ message ConfigDump { // The following configurations are currently supported and will be dumped in the order given // below: // - // * *bootstrap*: :ref:`BootstrapConfigDump ` - // * *clusters*: :ref:`ClustersConfigDump ` - // * *endpoints*: :ref:`EndpointsConfigDump ` - // * *listeners*: :ref:`ListenersConfigDump ` - // * *routes*: :ref:`RoutesConfigDump ` + // * *bootstrap*: :ref:`BootstrapConfigDump ` + // * *clusters*: :ref:`ClustersConfigDump ` + // * *endpoints*: :ref:`EndpointsConfigDump ` + // * *listeners*: :ref:`ListenersConfigDump ` + // * *scoped_routes*: :ref:`ScopedRoutesConfigDump ` + // * *routes*: :ref:`RoutesConfigDump ` + // * *secrets*: :ref:`SecretsConfigDump ` // // EDS Configuration will only be dumped by using parameter `?include_eds` // @@ -49,6 +77,7 @@ message UpdateFailureState { "envoy.admin.v2alpha.UpdateFailureState"; // What the component configuration would have been if the update had succeeded. + // This field may not be populated by xDS clients due to storage overhead. google.protobuf.Any failed_configuration = 1; // Time of the latest failed update attempt. @@ -56,6 +85,10 @@ message UpdateFailureState { // Details about the last failed update attempt. string details = 3; + + // This is the version of the rejected resource. + // [#not-implemented-hide:] + string version_info = 4; } // This message describes the bootstrap configuration that Envoy was started with. This includes @@ -96,7 +129,7 @@ message ListenersConfigDump { "envoy.admin.v2alpha.ListenersConfigDump.DynamicListenerState"; // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time + // :ref:`version_info ` field at the time // that the listener was loaded. In the future, discrete per-listener versions may be supported // by the API. string version_info = 1; @@ -109,7 +142,7 @@ message ListenersConfigDump { } // Describes a dynamically loaded listener via the LDS API. - // [#next-free-field: 6] + // [#next-free-field: 7] message DynamicListener { option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.ListenersConfigDump.DynamicListener"; @@ -134,10 +167,17 @@ message ListenersConfigDump { DynamicListenerState draining_state = 4; // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. UpdateFailureState error_state = 5; + + // The client status of this resource. + // [#not-implemented-hide:] + ClientResourceStatus client_status = 6; } - // This is the :ref:`version_info ` in the + // This is the :ref:`version_info ` in the // last processed LDS discovery response. If there are only static bootstrap listeners, this field // will be "". string version_info = 1; @@ -169,12 +209,13 @@ message ClustersConfigDump { } // Describes a dynamically loaded cluster via the CDS API. + // [#next-free-field: 6] message DynamicCluster { option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.ClustersConfigDump.DynamicCluster"; // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time + // :ref:`version_info ` field at the time // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by // the API. string version_info = 1; @@ -184,9 +225,20 @@ message ClustersConfigDump { // The timestamp when the Cluster was last updated. google.protobuf.Timestamp last_updated = 3; + + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + UpdateFailureState error_state = 4; + + // The client status of this resource. + // [#not-implemented-hide:] + ClientResourceStatus client_status = 5; } - // This is the :ref:`version_info ` in the + // This is the :ref:`version_info ` in the // last processed CDS discovery response. If there are only static bootstrap clusters, this field // will be "". string version_info = 1; @@ -225,12 +277,13 @@ message RoutesConfigDump { google.protobuf.Timestamp last_updated = 2; } + // [#next-free-field: 6] message DynamicRouteConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.RoutesConfigDump.DynamicRouteConfig"; // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that + // :ref:`version_info ` field at the time that // the route configuration was loaded. string version_info = 1; @@ -239,6 +292,17 @@ message RoutesConfigDump { // The timestamp when the Route was last updated. google.protobuf.Timestamp last_updated = 3; + + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + UpdateFailureState error_state = 4; + + // The client status of this resource. + // [#not-implemented-hide:] + ClientResourceStatus client_status = 5; } // The statically loaded route configs. @@ -270,6 +334,7 @@ message ScopedRoutesConfigDump { google.protobuf.Timestamp last_updated = 3; } + // [#next-free-field: 7] message DynamicScopedRouteConfigs { option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs"; @@ -278,7 +343,7 @@ message ScopedRoutesConfigDump { string name = 1; // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that + // :ref:`version_info ` field at the time that // the scoped routes configuration was loaded. string version_info = 2; @@ -287,6 +352,17 @@ message ScopedRoutesConfigDump { // The timestamp when the scoped route config set was last updated. google.protobuf.Timestamp last_updated = 4; + + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + UpdateFailureState error_state = 5; + + // The client status of this resource. + // [#not-implemented-hide:] + ClientResourceStatus client_status = 6; } // The statically loaded scoped route configs. @@ -302,6 +378,7 @@ message SecretsConfigDump { "envoy.admin.v2alpha.SecretsConfigDump"; // DynamicSecret contains secret information fetched via SDS. + // [#next-free-field: 7] message DynamicSecret { option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.SecretsConfigDump.DynamicSecret"; @@ -319,6 +396,17 @@ message SecretsConfigDump { // Security sensitive information is redacted (replaced with "[redacted]") for // private keys and passwords in TLS certificates. google.protobuf.Any secret = 4; + + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + UpdateFailureState error_state = 5; + + // The client status of this resource. + // [#not-implemented-hide:] + ClientResourceStatus client_status = 6; } // StaticSecret specifies statically loaded secret in bootstrap. @@ -362,9 +450,10 @@ message EndpointsConfigDump { google.protobuf.Timestamp last_updated = 2; } + // [#next-free-field: 6] message DynamicEndpointConfig { // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that + // :ref:`version_info ` field at the time that // the endpoint configuration was loaded. string version_info = 1; @@ -373,6 +462,17 @@ message EndpointsConfigDump { // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. google.protobuf.Timestamp last_updated = 3; + + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + UpdateFailureState error_state = 4; + + // The client status of this resource. + // [#not-implemented-hide:] + ClientResourceStatus client_status = 5; } // The statically loaded endpoint configs. diff --git a/api/envoy/admin/v3/init_dump.proto b/api/envoy/admin/v3/init_dump.proto index 3df9bfb51d..13a374dcc1 100644 --- a/api/envoy/admin/v3/init_dump.proto +++ b/api/envoy/admin/v3/init_dump.proto @@ -3,11 +3,11 @@ syntax = "proto3"; package envoy.admin.v3; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "InitDumpProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: InitDump] diff --git a/api/envoy/admin/v3/listeners.proto b/api/envoy/admin/v3/listeners.proto index 6197a44e42..86e35890bd 100644 --- a/api/envoy/admin/v3/listeners.proto +++ b/api/envoy/admin/v3/listeners.proto @@ -10,6 +10,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "ListenersProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Listeners] diff --git a/api/envoy/admin/v3/memory.proto b/api/envoy/admin/v3/memory.proto index bcf9f27174..522bf5e788 100644 --- a/api/envoy/admin/v3/memory.proto +++ b/api/envoy/admin/v3/memory.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "MemoryProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Memory] diff --git a/api/envoy/admin/v3/metrics.proto b/api/envoy/admin/v3/metrics.proto index 71592ac1e9..7280d955c9 100644 --- a/api/envoy/admin/v3/metrics.proto +++ b/api/envoy/admin/v3/metrics.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "MetricsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Metrics] diff --git a/api/envoy/admin/v3/mutex_stats.proto b/api/envoy/admin/v3/mutex_stats.proto index 49965d87ae..8a3003f07c 100644 --- a/api/envoy/admin/v3/mutex_stats.proto +++ b/api/envoy/admin/v3/mutex_stats.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "MutexStatsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: MutexStats] diff --git a/api/envoy/admin/v3/server_info.proto b/api/envoy/admin/v3/server_info.proto index 5e3765a858..8516429904 100644 --- a/api/envoy/admin/v3/server_info.proto +++ b/api/envoy/admin/v3/server_info.proto @@ -6,13 +6,13 @@ import "envoy/config/core/v3/base.proto"; import "google/protobuf/duration.proto"; -import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "ServerInfoProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Server State] @@ -59,7 +59,7 @@ message ServerInfo { config.core.v3.Node node = 7; } -// [#next-free-field: 37] +// [#next-free-field: 39] message CommandLineOptions { option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.CommandLineOptions"; @@ -88,9 +88,9 @@ message CommandLineOptions { Immediate = 1; } - reserved 12, 20, 21; + reserved 12, 20, 21, 29; - reserved "max_stats", "max_obj_name_len"; + reserved "max_stats", "max_obj_name_len", "bootstrap_version"; // See :option:`--base-id` for details. uint64 base_id = 1; @@ -179,9 +179,6 @@ message CommandLineOptions { // See :option:`--disable-extensions` for details. repeated string disabled_extensions = 28; - // See :option:`--bootstrap-version` for details. - uint32 bootstrap_version = 29; - // See :option:`--enable-fine-grain-logging` for details. bool enable_fine_grain_logging = 34; @@ -190,4 +187,10 @@ message CommandLineOptions { // See :option:`--socket-mode` for details. uint32 socket_mode = 36; + + // See :option:`--enable-core-dump` for details. + bool enable_core_dump = 37; + + // See :option:`--stats-tag` for details. + repeated string stats_tag = 38; } diff --git a/api/envoy/admin/v3/tap.proto b/api/envoy/admin/v3/tap.proto index 934170b2de..49eeb86039 100644 --- a/api/envoy/admin/v3/tap.proto +++ b/api/envoy/admin/v3/tap.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.admin.v3"; option java_outer_classname = "TapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Tap] diff --git a/api/envoy/admin/v4alpha/certs.proto b/api/envoy/admin/v4alpha/certs.proto deleted file mode 100644 index 0dd868f71f..0000000000 --- a/api/envoy/admin/v4alpha/certs.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "CertsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Certificates] - -// Proto representation of certificate details. Admin endpoint uses this wrapper for `/certs` to -// display certificate information. See :ref:`/certs ` for more -// information. -message Certificates { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.Certificates"; - - // List of certificates known to an Envoy. - repeated Certificate certificates = 1; -} - -message Certificate { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.Certificate"; - - // Details of CA certificate. - repeated CertificateDetails ca_cert = 1; - - // Details of Certificate Chain - repeated CertificateDetails cert_chain = 2; -} - -// [#next-free-field: 8] -message CertificateDetails { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.CertificateDetails"; - - message OcspDetails { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.CertificateDetails.OcspDetails"; - - // Indicates the time from which the OCSP response is valid. - google.protobuf.Timestamp valid_from = 1; - - // Indicates the time at which the OCSP response expires. - google.protobuf.Timestamp expiration = 2; - } - - // Path of the certificate. - string path = 1; - - // Certificate Serial Number. - string serial_number = 2; - - // List of Subject Alternate names. - repeated SubjectAlternateName subject_alt_names = 3; - - // Minimum of days until expiration of certificate and it's chain. - uint64 days_until_expiration = 4; - - // Indicates the time from which the certificate is valid. - google.protobuf.Timestamp valid_from = 5; - - // Indicates the time at which the certificate expires. - google.protobuf.Timestamp expiration_time = 6; - - // Details related to the OCSP response associated with this certificate, if any. - OcspDetails ocsp_details = 7; -} - -message SubjectAlternateName { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.SubjectAlternateName"; - - // Subject Alternate Name. - oneof name { - string dns = 1; - - string uri = 2; - - string ip_address = 3; - } -} diff --git a/api/envoy/admin/v4alpha/clusters.proto b/api/envoy/admin/v4alpha/clusters.proto deleted file mode 100644 index 10d9209769..0000000000 --- a/api/envoy/admin/v4alpha/clusters.proto +++ /dev/null @@ -1,166 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "envoy/admin/v4alpha/metrics.proto"; -import "envoy/config/cluster/v4alpha/circuit_breaker.proto"; -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/type/v3/percent.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "ClustersProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Clusters] - -// Admin endpoint uses this wrapper for `/clusters` to display cluster status information. -// See :ref:`/clusters ` for more information. -message Clusters { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.Clusters"; - - // Mapping from cluster name to each cluster's status. - repeated ClusterStatus cluster_statuses = 1; -} - -// Details an individual cluster's current status. -// [#next-free-field: 7] -message ClusterStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.ClusterStatus"; - - // Name of the cluster. - string name = 1; - - // Denotes whether this cluster was added via API or configured statically. - bool added_via_api = 2; - - // The success rate threshold used in the last interval. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all errors: externally and locally generated were used to calculate the threshold. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*, only externally generated errors were used to calculate the threshold. - // The threshold is used to eject hosts based on their success rate. See - // :ref:`Cluster outlier detection ` documentation for details. - // - // Note: this field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based - // outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no - // threshold for that interval. - // 3. Outlier detection is not enabled for this cluster. - type.v3.Percent success_rate_ejection_threshold = 3; - - // Mapping from host address to the host's current status. - repeated HostStatus host_statuses = 4; - - // The success rate threshold used in the last interval when only locally originated failures were - // taken into account and externally originated errors were treated as success. - // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*. The threshold is used to eject hosts based on their success rate. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: this field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based - // outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no - // threshold for that interval. - // 3. Outlier detection is not enabled for this cluster. - type.v3.Percent local_origin_success_rate_ejection_threshold = 5; - - // :ref:`Circuit breaking ` settings of the cluster. - config.cluster.v4alpha.CircuitBreakers circuit_breakers = 6; -} - -// Current state of a particular host. -// [#next-free-field: 10] -message HostStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.HostStatus"; - - // Address of this host. - config.core.v4alpha.Address address = 1; - - // List of stats specific to this host. - repeated SimpleMetric stats = 2; - - // The host's current health status. - HostHealthStatus health_status = 3; - - // Request success rate for this host over the last calculated interval. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all errors: externally and locally generated were used in success rate - // calculation. If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*, only externally generated errors were used in success rate calculation. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: the message will not be present if host did not have enough request volume to calculate - // success rate or the cluster did not have enough hosts to run through success rate outlier - // ejection. - type.v3.Percent success_rate = 4; - - // The host's weight. If not configured, the value defaults to 1. - uint32 weight = 5; - - // The hostname of the host, if applicable. - string hostname = 6; - - // The host's priority. If not configured, the value defaults to 0 (highest priority). - uint32 priority = 7; - - // Request success rate for this host over the last calculated - // interval when only locally originated errors are taken into account and externally originated - // errors were treated as success. - // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: the message will not be present if host did not have enough request volume to calculate - // success rate or the cluster did not have enough hosts to run through success rate outlier - // ejection. - type.v3.Percent local_origin_success_rate = 8; - - // locality of the host. - config.core.v4alpha.Locality locality = 9; -} - -// Health status for a host. -// [#next-free-field: 7] -message HostHealthStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.HostHealthStatus"; - - // The host is currently failing active health checks. - bool failed_active_health_check = 1; - - // The host is currently considered an outlier and has been ejected. - bool failed_outlier_check = 2; - - // The host is currently being marked as degraded through active health checking. - bool failed_active_degraded_check = 4; - - // The host has been removed from service discovery, but is being stabilized due to active - // health checking. - bool pending_dynamic_removal = 5; - - // The host has not yet been health checked. - bool pending_active_hc = 6; - - // Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported - // here. - // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.] - config.core.v4alpha.HealthStatus eds_health_status = 3; -} diff --git a/api/envoy/admin/v4alpha/config_dump.proto b/api/envoy/admin/v4alpha/config_dump.proto deleted file mode 100644 index 7fed09631d..0000000000 --- a/api/envoy/admin/v4alpha/config_dump.proto +++ /dev/null @@ -1,385 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "envoy/config/bootstrap/v4alpha/bootstrap.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "ConfigDumpProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: ConfigDump] - -// The :ref:`/config_dump ` admin endpoint uses this wrapper -// message to maintain and serve arbitrary configuration information from any component in Envoy. -message ConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.ConfigDump"; - - // This list is serialized and dumped in its entirety at the - // :ref:`/config_dump ` endpoint. - // - // The following configurations are currently supported and will be dumped in the order given - // below: - // - // * *bootstrap*: :ref:`BootstrapConfigDump ` - // * *clusters*: :ref:`ClustersConfigDump ` - // * *endpoints*: :ref:`EndpointsConfigDump ` - // * *listeners*: :ref:`ListenersConfigDump ` - // * *routes*: :ref:`RoutesConfigDump ` - // - // EDS Configuration will only be dumped by using parameter `?include_eds` - // - // You can filter output with the resource and mask query parameters. - // See :ref:`/config_dump?resource={} `, - // :ref:`/config_dump?mask={} `, - // or :ref:`/config_dump?resource={},mask={} - // ` for more information. - repeated google.protobuf.Any configs = 1; -} - -message UpdateFailureState { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.UpdateFailureState"; - - // What the component configuration would have been if the update had succeeded. - google.protobuf.Any failed_configuration = 1; - - // Time of the latest failed update attempt. - google.protobuf.Timestamp last_update_attempt = 2; - - // Details about the last failed update attempt. - string details = 3; -} - -// This message describes the bootstrap configuration that Envoy was started with. This includes -// any CLI overrides that were merged. Bootstrap configuration information can be used to recreate -// the static portions of an Envoy configuration by reusing the output as the bootstrap -// configuration for another Envoy. -message BootstrapConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.BootstrapConfigDump"; - - config.bootstrap.v4alpha.Bootstrap bootstrap = 1; - - // The timestamp when the BootstrapConfig was last updated. - google.protobuf.Timestamp last_updated = 2; -} - -// Envoy's listener manager fills this message with all currently known listeners. Listener -// configuration information can be used to recreate an Envoy configuration by populating all -// listeners as static listeners or by returning them in a LDS response. -message ListenersConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.ListenersConfigDump"; - - // Describes a statically loaded listener. - message StaticListener { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ListenersConfigDump.StaticListener"; - - // The listener config. - google.protobuf.Any listener = 1; - - // The timestamp when the Listener was last successfully updated. - google.protobuf.Timestamp last_updated = 2; - } - - message DynamicListenerState { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ListenersConfigDump.DynamicListenerState"; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the listener was loaded. In the future, discrete per-listener versions may be supported - // by the API. - string version_info = 1; - - // The listener config. - google.protobuf.Any listener = 2; - - // The timestamp when the Listener was last successfully updated. - google.protobuf.Timestamp last_updated = 3; - } - - // Describes a dynamically loaded listener via the LDS API. - // [#next-free-field: 6] - message DynamicListener { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ListenersConfigDump.DynamicListener"; - - // The name or unique id of this listener, pulled from the DynamicListenerState config. - string name = 1; - - // The listener state for any active listener by this name. - // These are listeners that are available to service data plane traffic. - DynamicListenerState active_state = 2; - - // The listener state for any warming listener by this name. - // These are listeners that are currently undergoing warming in preparation to service data - // plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the warming listeners should generally be discarded. - DynamicListenerState warming_state = 3; - - // The listener state for any draining listener by this name. - // These are listeners that are currently undergoing draining in preparation to stop servicing - // data plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the draining listeners should generally be discarded. - DynamicListenerState draining_state = 4; - - // Set if the last update failed, cleared after the next successful update. - UpdateFailureState error_state = 5; - } - - // This is the :ref:`version_info ` in the - // last processed LDS discovery response. If there are only static bootstrap listeners, this field - // will be "". - string version_info = 1; - - // The statically loaded listener configs. - repeated StaticListener static_listeners = 2; - - // State for any warming, active, or draining listeners. - repeated DynamicListener dynamic_listeners = 3; -} - -// Envoy's cluster manager fills this message with all currently known clusters. Cluster -// configuration information can be used to recreate an Envoy configuration by populating all -// clusters as static clusters or by returning them in a CDS response. -message ClustersConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.ClustersConfigDump"; - - // Describes a statically loaded cluster. - message StaticCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ClustersConfigDump.StaticCluster"; - - // The cluster config. - google.protobuf.Any cluster = 1; - - // The timestamp when the Cluster was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - // Describes a dynamically loaded cluster via the CDS API. - message DynamicCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ClustersConfigDump.DynamicCluster"; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by - // the API. - string version_info = 1; - - // The cluster config. - google.protobuf.Any cluster = 2; - - // The timestamp when the Cluster was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - // This is the :ref:`version_info ` in the - // last processed CDS discovery response. If there are only static bootstrap clusters, this field - // will be "". - string version_info = 1; - - // The statically loaded cluster configs. - repeated StaticCluster static_clusters = 2; - - // The dynamically loaded active clusters. These are clusters that are available to service - // data plane traffic. - repeated DynamicCluster dynamic_active_clusters = 3; - - // The dynamically loaded warming clusters. These are clusters that are currently undergoing - // warming in preparation to service data plane traffic. Note that if attempting to recreate an - // Envoy configuration from a configuration dump, the warming clusters should generally be - // discarded. - repeated DynamicCluster dynamic_warming_clusters = 4; -} - -// Envoy's RDS implementation fills this message with all currently loaded routes, as described by -// their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration -// or defined inline while configuring listeners are separated from those configured dynamically via RDS. -// Route configuration information can be used to recreate an Envoy configuration by populating all routes -// as static routes or by returning them in RDS responses. -message RoutesConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.RoutesConfigDump"; - - message StaticRouteConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.RoutesConfigDump.StaticRouteConfig"; - - // The route config. - google.protobuf.Any route_config = 1; - - // The timestamp when the Route was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - message DynamicRouteConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig"; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the route configuration was loaded. - string version_info = 1; - - // The route config. - google.protobuf.Any route_config = 2; - - // The timestamp when the Route was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - // The statically loaded route configs. - repeated StaticRouteConfig static_route_configs = 2; - - // The dynamically loaded route configs. - repeated DynamicRouteConfig dynamic_route_configs = 3; -} - -// Envoy's scoped RDS implementation fills this message with all currently loaded route -// configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both -// the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the -// dynamically obtained scopes via the SRDS API. -message ScopedRoutesConfigDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ScopedRoutesConfigDump"; - - message InlineScopedRouteConfigs { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs"; - - // The name assigned to the scoped route configurations. - string name = 1; - - // The scoped route configurations. - repeated google.protobuf.Any scoped_route_configs = 2; - - // The timestamp when the scoped route config set was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - message DynamicScopedRouteConfigs { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs"; - - // The name assigned to the scoped route configurations. - string name = 1; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the scoped routes configuration was loaded. - string version_info = 2; - - // The scoped route configurations. - repeated google.protobuf.Any scoped_route_configs = 3; - - // The timestamp when the scoped route config set was last updated. - google.protobuf.Timestamp last_updated = 4; - } - - // The statically loaded scoped route configs. - repeated InlineScopedRouteConfigs inline_scoped_route_configs = 1; - - // The dynamically loaded scoped route configs. - repeated DynamicScopedRouteConfigs dynamic_scoped_route_configs = 2; -} - -// Envoys SDS implementation fills this message with all secrets fetched dynamically via SDS. -message SecretsConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.SecretsConfigDump"; - - // DynamicSecret contains secret information fetched via SDS. - message DynamicSecret { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.SecretsConfigDump.DynamicSecret"; - - // The name assigned to the secret. - string name = 1; - - // This is the per-resource version information. - string version_info = 2; - - // The timestamp when the secret was last updated. - google.protobuf.Timestamp last_updated = 3; - - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - google.protobuf.Any secret = 4; - } - - // StaticSecret specifies statically loaded secret in bootstrap. - message StaticSecret { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.SecretsConfigDump.StaticSecret"; - - // The name assigned to the secret. - string name = 1; - - // The timestamp when the secret was last updated. - google.protobuf.Timestamp last_updated = 2; - - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - google.protobuf.Any secret = 3; - } - - // The statically loaded secrets. - repeated StaticSecret static_secrets = 1; - - // The dynamically loaded active secrets. These are secrets that are available to service - // clusters or listeners. - repeated DynamicSecret dynamic_active_secrets = 2; - - // The dynamically loaded warming secrets. These are secrets that are currently undergoing - // warming in preparation to service clusters or listeners. - repeated DynamicSecret dynamic_warming_secrets = 3; -} - -// Envoy's admin fill this message with all currently known endpoints. Endpoint -// configuration information can be used to recreate an Envoy configuration by populating all -// endpoints as static endpoints or by returning them in an EDS response. -message EndpointsConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.EndpointsConfigDump"; - - message StaticEndpointConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig"; - - // The endpoint config. - google.protobuf.Any endpoint_config = 1; - - // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - message DynamicEndpointConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig"; - - // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the endpoint configuration was loaded. - string version_info = 1; - - // The endpoint config. - google.protobuf.Any endpoint_config = 2; - - // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - // The statically loaded endpoint configs. - repeated StaticEndpointConfig static_endpoint_configs = 2; - - // The dynamically loaded endpoint configs. - repeated DynamicEndpointConfig dynamic_endpoint_configs = 3; -} diff --git a/api/envoy/admin/v4alpha/init_dump.proto b/api/envoy/admin/v4alpha/init_dump.proto deleted file mode 100644 index 81c423e520..0000000000 --- a/api/envoy/admin/v4alpha/init_dump.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "InitDumpProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: InitDump] - -// Dumps of unready targets of envoy init managers. Envoy's admin fills this message with init managers, -// which provides the information of their unready targets. -// The :ref:`/init_dump ` will dump all unready targets information. -message UnreadyTargetsDumps { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.UnreadyTargetsDumps"; - - // Message of unready targets information of an init manager. - message UnreadyTargetsDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v3.UnreadyTargetsDumps.UnreadyTargetsDump"; - - // Name of the init manager. Example: "init_manager_xxx". - string name = 1; - - // Names of unready targets of the init manager. Example: "target_xxx". - repeated string target_names = 2; - } - - // You can choose specific component to dump unready targets with mask query parameter. - // See :ref:`/init_dump?mask={} ` for more information. - // The dumps of unready targets of all init managers. - repeated UnreadyTargetsDump unready_targets_dumps = 1; -} diff --git a/api/envoy/admin/v4alpha/listeners.proto b/api/envoy/admin/v4alpha/listeners.proto deleted file mode 100644 index 89bdc4c5bb..0000000000 --- a/api/envoy/admin/v4alpha/listeners.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "ListenersProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Listeners] - -// Admin endpoint uses this wrapper for `/listeners` to display listener status information. -// See :ref:`/listeners ` for more information. -message Listeners { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.Listeners"; - - // List of listener statuses. - repeated ListenerStatus listener_statuses = 1; -} - -// Details an individual listener's current status. -message ListenerStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.ListenerStatus"; - - // Name of the listener - string name = 1; - - // The actual local address that the listener is listening on. If a listener was configured - // to listen on port 0, then this address has the port that was allocated by the OS. - config.core.v4alpha.Address local_address = 2; -} diff --git a/api/envoy/admin/v4alpha/memory.proto b/api/envoy/admin/v4alpha/memory.proto deleted file mode 100644 index d2f0b57229..0000000000 --- a/api/envoy/admin/v4alpha/memory.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "MemoryProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Memory] - -// Proto representation of the internal memory consumption of an Envoy instance. These represent -// values extracted from an internal TCMalloc instance. For more information, see the section of the -// docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html). -// [#next-free-field: 7] -message Memory { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.Memory"; - - // The number of bytes allocated by the heap for Envoy. This is an alias for - // `generic.current_allocated_bytes`. - uint64 allocated = 1; - - // The number of bytes reserved by the heap but not necessarily allocated. This is an alias for - // `generic.heap_size`. - uint64 heap_size = 2; - - // The number of bytes in free, unmapped pages in the page heap. These bytes always count towards - // virtual memory usage, and depending on the OS, typically do not count towards physical memory - // usage. This is an alias for `tcmalloc.pageheap_unmapped_bytes`. - uint64 pageheap_unmapped = 3; - - // The number of bytes in free, mapped pages in the page heap. These bytes always count towards - // virtual memory usage, and unless the underlying memory is swapped out by the OS, they also - // count towards physical memory usage. This is an alias for `tcmalloc.pageheap_free_bytes`. - uint64 pageheap_free = 4; - - // The amount of memory used by the TCMalloc thread caches (for small objects). This is an alias - // for `tcmalloc.current_total_thread_cache_bytes`. - uint64 total_thread_cache = 5; - - // The number of bytes of the physical memory usage by the allocator. This is an alias for - // `generic.total_physical_bytes`. - uint64 total_physical_bytes = 6; -} diff --git a/api/envoy/admin/v4alpha/metrics.proto b/api/envoy/admin/v4alpha/metrics.proto deleted file mode 100644 index 7861332003..0000000000 --- a/api/envoy/admin/v4alpha/metrics.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "MetricsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Metrics] - -// Proto representation of an Envoy Counter or Gauge value. -message SimpleMetric { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.SimpleMetric"; - - enum Type { - COUNTER = 0; - GAUGE = 1; - } - - // Type of the metric represented. - Type type = 1; - - // Current metric value. - uint64 value = 2; - - // Name of the metric. - string name = 3; -} diff --git a/api/envoy/admin/v4alpha/mutex_stats.proto b/api/envoy/admin/v4alpha/mutex_stats.proto deleted file mode 100644 index 6f9fcd548c..0000000000 --- a/api/envoy/admin/v4alpha/mutex_stats.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "MutexStatsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: MutexStats] - -// Proto representation of the statistics collected upon absl::Mutex contention, if Envoy is run -// under :option:`--enable-mutex-tracing`. For more information, see the `absl::Mutex` -// [docs](https://abseil.io/about/design/mutex#extra-features). -// -// *NB*: The wait cycles below are measured by `absl::base_internal::CycleClock`, and may not -// correspond to core clock frequency. For more information, see the `CycleClock` -// [docs](https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/cycleclock.h). -message MutexStats { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.MutexStats"; - - // The number of individual mutex contentions which have occurred since startup. - uint64 num_contentions = 1; - - // The length of the current contention wait cycle. - uint64 current_wait_cycles = 2; - - // The lifetime total of all contention wait cycles. - uint64 lifetime_wait_cycles = 3; -} diff --git a/api/envoy/admin/v4alpha/server_info.proto b/api/envoy/admin/v4alpha/server_info.proto deleted file mode 100644 index 6f56978d49..0000000000 --- a/api/envoy/admin/v4alpha/server_info.proto +++ /dev/null @@ -1,192 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/duration.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "ServerInfoProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Server State] - -// Proto representation of the value returned by /server_info, containing -// server version/server status information. -// [#next-free-field: 8] -message ServerInfo { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.ServerInfo"; - - enum State { - // Server is live and serving traffic. - LIVE = 0; - - // Server is draining listeners in response to external health checks failing. - DRAINING = 1; - - // Server has not yet completed cluster manager initialization. - PRE_INITIALIZING = 2; - - // Server is running the cluster manager initialization callbacks (e.g., RDS). - INITIALIZING = 3; - } - - // Server version. - string version = 1; - - // State of the server. - State state = 2; - - // Uptime since current epoch was started. - google.protobuf.Duration uptime_current_epoch = 3; - - // Uptime since the start of the first epoch. - google.protobuf.Duration uptime_all_epochs = 4; - - // Hot restart version. - string hot_restart_version = 5; - - // Command line options the server is currently running with. - CommandLineOptions command_line_options = 6; - - // Populated node identity of this server. - config.core.v4alpha.Node node = 7; -} - -// [#next-free-field: 37] -message CommandLineOptions { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.CommandLineOptions"; - - enum IpVersion { - v4 = 0; - v6 = 1; - } - - enum Mode { - // Validate configs and then serve traffic normally. - Serve = 0; - - // Validate configs and exit. - Validate = 1; - - // Completely load and initialize the config, and then exit without running the listener loop. - InitOnly = 2; - } - - enum DrainStrategy { - // Gradually discourage connections over the course of the drain period. - Gradual = 0; - - // Discourage all connections for the duration of the drain sequence. - Immediate = 1; - } - - reserved 12, 20, 21; - - reserved "max_stats", "max_obj_name_len"; - - // See :option:`--base-id` for details. - uint64 base_id = 1; - - // See :option:`--use-dynamic-base-id` for details. - bool use_dynamic_base_id = 31; - - // See :option:`--base-id-path` for details. - string base_id_path = 32; - - // See :option:`--concurrency` for details. - uint32 concurrency = 2; - - // See :option:`--config-path` for details. - string config_path = 3; - - // See :option:`--config-yaml` for details. - string config_yaml = 4; - - // See :option:`--allow-unknown-static-fields` for details. - bool allow_unknown_static_fields = 5; - - // See :option:`--reject-unknown-dynamic-fields` for details. - bool reject_unknown_dynamic_fields = 26; - - // See :option:`--ignore-unknown-dynamic-fields` for details. - bool ignore_unknown_dynamic_fields = 30; - - // See :option:`--admin-address-path` for details. - string admin_address_path = 6; - - // See :option:`--local-address-ip-version` for details. - IpVersion local_address_ip_version = 7; - - // See :option:`--log-level` for details. - string log_level = 8; - - // See :option:`--component-log-level` for details. - string component_log_level = 9; - - // See :option:`--log-format` for details. - string log_format = 10; - - // See :option:`--log-format-escaped` for details. - bool log_format_escaped = 27; - - // See :option:`--log-path` for details. - string log_path = 11; - - // See :option:`--service-cluster` for details. - string service_cluster = 13; - - // See :option:`--service-node` for details. - string service_node = 14; - - // See :option:`--service-zone` for details. - string service_zone = 15; - - // See :option:`--file-flush-interval-msec` for details. - google.protobuf.Duration file_flush_interval = 16; - - // See :option:`--drain-time-s` for details. - google.protobuf.Duration drain_time = 17; - - // See :option:`--drain-strategy` for details. - DrainStrategy drain_strategy = 33; - - // See :option:`--parent-shutdown-time-s` for details. - google.protobuf.Duration parent_shutdown_time = 18; - - // See :option:`--mode` for details. - Mode mode = 19; - - // See :option:`--disable-hot-restart` for details. - bool disable_hot_restart = 22; - - // See :option:`--enable-mutex-tracing` for details. - bool enable_mutex_tracing = 23; - - // See :option:`--restart-epoch` for details. - uint32 restart_epoch = 24; - - // See :option:`--cpuset-threads` for details. - bool cpuset_threads = 25; - - // See :option:`--disable-extensions` for details. - repeated string disabled_extensions = 28; - - // See :option:`--bootstrap-version` for details. - uint32 bootstrap_version = 29; - - // See :option:`--enable-fine-grain-logging` for details. - bool enable_fine_grain_logging = 34; - - // See :option:`--socket-path` for details. - string socket_path = 35; - - // See :option:`--socket-mode` for details. - uint32 socket_mode = 36; -} diff --git a/api/envoy/admin/v4alpha/tap.proto b/api/envoy/admin/v4alpha/tap.proto deleted file mode 100644 index e892593804..0000000000 --- a/api/envoy/admin/v4alpha/tap.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v4alpha; - -import "envoy/config/tap/v4alpha/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v4alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Tap] - -// The /tap admin request body that is used to configure an active tap session. -message TapRequest { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v3.TapRequest"; - - // The opaque configuration ID used to match the configuration to a loaded extension. - // A tap extension configures a similar opaque ID that is used to match. - string config_id = 1 [(validate.rules).string = {min_len: 1}]; - - // The tap configuration to load. - config.tap.v4alpha.TapConfig tap_config = 2 [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/annotations/deprecation.proto b/api/envoy/annotations/deprecation.proto index 7f9b64e32b..c9a96f1ae2 100644 --- a/api/envoy/annotations/deprecation.proto +++ b/api/envoy/annotations/deprecation.proto @@ -1,22 +1,34 @@ syntax = "proto3"; package envoy.annotations; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/annotations"; import "google/protobuf/descriptor.proto"; // [#protodoc-title: Deprecation] -// Allows tagging proto fields as fatal by default. One Envoy release after -// deprecation, deprecated fields will be disallowed by default, a state which -// is reversible with :ref:`runtime overrides `. +// Adds annotations for deprecated fields and enums to allow tagging proto +// fields as fatal by default and the minor version on which the field was +// deprecated. One Envoy release after deprecation, deprecated fields will be +// disallowed by default, a state which is reversible with +// :ref:`runtime overrides `. // Magic number in this file derived from top 28bit of SHA256 digest of -// "envoy.annotation.disallowed_by_default" +// "envoy.annotation.disallowed_by_default" and "envoy.annotation.deprecated_at_minor_version" extend google.protobuf.FieldOptions { bool disallowed_by_default = 189503207; + + // The API major and minor version on which the field was deprecated + // (e.g., "3.5" for major version 3 and minor version 5). + string deprecated_at_minor_version = 157299826; } // Magic number in this file derived from top 28bit of SHA256 digest of -// "envoy.annotation.disallowed_by_default_enum" +// "envoy.annotation.disallowed_by_default_enum" and +// "envoy.annotation.deprecated_at_minor_version_eum" extend google.protobuf.EnumValueOptions { bool disallowed_by_default_enum = 70100853; + + // The API major and minor version on which the enum value was deprecated + // (e.g., "3.5" for major version 3 and minor version 5). + string deprecated_at_minor_version_enum = 181198657; } diff --git a/api/envoy/annotations/resource.proto b/api/envoy/annotations/resource.proto index bd794c68dd..3877afc7fe 100644 --- a/api/envoy/annotations/resource.proto +++ b/api/envoy/annotations/resource.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package envoy.annotations; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/annotations"; import "google/protobuf/descriptor.proto"; diff --git a/api/envoy/api/v2/auth/cert.proto b/api/envoy/api/v2/auth/cert.proto index 49e8b8c70f..81e2672d9b 100644 --- a/api/envoy/api/v2/auth/cert.proto +++ b/api/envoy/api/v2/auth/cert.proto @@ -3,7 +3,6 @@ syntax = "proto3"; package envoy.api.v2.auth; import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; import public "envoy/api/v2/auth/common.proto"; import public "envoy/api/v2/auth/secret.proto"; @@ -12,5 +11,6 @@ import public "envoy/api/v2/auth/tls.proto"; option java_package = "io.envoyproxy.envoy.api.v2.auth"; option java_outer_classname = "CertProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.transport_sockets.tls.v3"; diff --git a/api/envoy/api/v2/auth/common.proto b/api/envoy/api/v2/auth/common.proto index c8122f4010..cd55ccd4db 100644 --- a/api/envoy/api/v2/auth/common.proto +++ b/api/envoy/api/v2/auth/common.proto @@ -17,6 +17,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.auth"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.transport_sockets.tls.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -41,8 +42,7 @@ message TlsParameters { TLSv1_3 = 4; } - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for - // servers. + // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for both clients and servers. TlsProtocol tls_minimum_protocol_version = 1 [(validate.rules).enum = {defined_only: true}]; // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for diff --git a/api/envoy/api/v2/auth/secret.proto b/api/envoy/api/v2/auth/secret.proto index 3a6d8cf7dc..4a4ab3bf16 100644 --- a/api/envoy/api/v2/auth/secret.proto +++ b/api/envoy/api/v2/auth/secret.proto @@ -13,6 +13,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.api.v2.auth"; option java_outer_classname = "SecretProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.transport_sockets.tls.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/auth/tls.proto b/api/envoy/api/v2/auth/tls.proto index 201973a2b9..911ada77d3 100644 --- a/api/envoy/api/v2/auth/tls.proto +++ b/api/envoy/api/v2/auth/tls.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.auth"; option java_outer_classname = "TlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.transport_sockets.tls.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -81,10 +82,9 @@ message DownstreamTlsContext { bool disable_stateless_session_resumption = 7; } - // If specified, session_timeout will change maximum lifetime (in seconds) of TLS session - // Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) - // ` - // only seconds could be specified (fractional seconds are going to be ignored). + // If specified, ``session_timeout`` will change the maximum lifetime (in seconds) of the TLS session. + // Currently this value is used as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_. + // Only seconds can be specified (fractional seconds are ignored). google.protobuf.Duration session_timeout = 6 [(validate.rules).duration = { lt {seconds: 4294967296} gte {} diff --git a/api/envoy/api/v2/cds.proto b/api/envoy/api/v2/cds.proto index 0b657a0fa4..38f7c3c19e 100644 --- a/api/envoy/api/v2/cds.proto +++ b/api/envoy/api/v2/cds.proto @@ -15,6 +15,7 @@ import public "envoy/api/v2/cluster.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "CdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.cluster.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/cluster.proto b/api/envoy/api/v2/cluster.proto index fab95f71b7..b1b6751de4 100644 --- a/api/envoy/api/v2/cluster.proto +++ b/api/envoy/api/v2/cluster.proto @@ -27,6 +27,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "ClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/cluster/circuit_breaker.proto b/api/envoy/api/v2/cluster/circuit_breaker.proto index 510619b264..c45409bcc7 100644 --- a/api/envoy/api/v2/cluster/circuit_breaker.proto +++ b/api/envoy/api/v2/cluster/circuit_breaker.proto @@ -14,8 +14,9 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.cluster"; option java_outer_classname = "CircuitBreakerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"; option csharp_namespace = "Envoy.Api.V2.ClusterNS"; -option ruby_package = "Envoy.Api.V2.ClusterNS"; +option ruby_package = "Envoy::Api::V2::ClusterNS"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/cluster/filter.proto b/api/envoy/api/v2/cluster/filter.proto index b87ad79d8f..1609be4ca2 100644 --- a/api/envoy/api/v2/cluster/filter.proto +++ b/api/envoy/api/v2/cluster/filter.proto @@ -11,8 +11,9 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.cluster"; option java_outer_classname = "FilterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"; option csharp_namespace = "Envoy.Api.V2.ClusterNS"; -option ruby_package = "Envoy.Api.V2.ClusterNS"; +option ruby_package = "Envoy::Api::V2::ClusterNS"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/cluster/outlier_detection.proto b/api/envoy/api/v2/cluster/outlier_detection.proto index 6cf35e41ff..ec8c6ee731 100644 --- a/api/envoy/api/v2/cluster/outlier_detection.proto +++ b/api/envoy/api/v2/cluster/outlier_detection.proto @@ -12,8 +12,9 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.cluster"; option java_outer_classname = "OutlierDetectionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"; option csharp_namespace = "Envoy.Api.V2.ClusterNS"; -option ruby_package = "Envoy.Api.V2.ClusterNS"; +option ruby_package = "Envoy::Api::V2::ClusterNS"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/address.proto b/api/envoy/api/v2/core/address.proto index 804da53958..3399538be1 100644 --- a/api/envoy/api/v2/core/address.proto +++ b/api/envoy/api/v2/core/address.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "AddressProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -129,6 +130,6 @@ message CidrRange { // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. string address_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - // Length of prefix, e.g. 0, 32. + // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. google.protobuf.UInt32Value prefix_len = 2 [(validate.rules).uint32 = {lte: 128}]; } diff --git a/api/envoy/api/v2/core/backoff.proto b/api/envoy/api/v2/core/backoff.proto index e45c71e39b..845dfce39e 100644 --- a/api/envoy/api/v2/core/backoff.proto +++ b/api/envoy/api/v2/core/backoff.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "BackoffProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/base.proto b/api/envoy/api/v2/core/base.proto index 39846bc658..94b346bc3e 100644 --- a/api/envoy/api/v2/core/base.proto +++ b/api/envoy/api/v2/core/base.proto @@ -9,7 +9,6 @@ import "envoy/type/percent.proto"; import "envoy/type/semantic_version.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; @@ -22,6 +21,7 @@ import public "envoy/api/v2/core/socket_option.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "BaseProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/config_source.proto b/api/envoy/api/v2/core/config_source.proto index 6cf44dbe9b..b3b400ae64 100644 --- a/api/envoy/api/v2/core/config_source.proto +++ b/api/envoy/api/v2/core/config_source.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "ConfigSourceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/event_service_config.proto b/api/envoy/api/v2/core/event_service_config.proto index f822f8c6b6..12ec25d4d4 100644 --- a/api/envoy/api/v2/core/event_service_config.proto +++ b/api/envoy/api/v2/core/event_service_config.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "EventServiceConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/grpc_method_list.proto b/api/envoy/api/v2/core/grpc_method_list.proto index 3d646484b3..b4dbe69c7f 100644 --- a/api/envoy/api/v2/core/grpc_method_list.proto +++ b/api/envoy/api/v2/core/grpc_method_list.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "GrpcMethodListProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/grpc_service.proto b/api/envoy/api/v2/core/grpc_service.proto index dd789644e1..faafb7f0f7 100644 --- a/api/envoy/api/v2/core/grpc_service.proto +++ b/api/envoy/api/v2/core/grpc_service.proto @@ -17,6 +17,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "GrpcServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/health_check.proto b/api/envoy/api/v2/core/health_check.proto index bc4ae3e5c8..347ac9c96b 100644 --- a/api/envoy/api/v2/core/health_check.proto +++ b/api/envoy/api/v2/core/health_check.proto @@ -21,6 +21,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "HealthCheckProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/http_uri.proto b/api/envoy/api/v2/core/http_uri.proto index cd1a0660e3..cb95125b90 100644 --- a/api/envoy/api/v2/core/http_uri.proto +++ b/api/envoy/api/v2/core/http_uri.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "HttpUriProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/core/protocol.proto b/api/envoy/api/v2/core/protocol.proto index c45e6bcdc8..906a040905 100644 --- a/api/envoy/api/v2/core/protocol.proto +++ b/api/envoy/api/v2/core/protocol.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "ProtocolProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -99,6 +100,8 @@ message Http1ProtocolOptions { message ProperCaseWords { } + // custom message is datawire code + // remove if possible message Custom { // Custom header rewrite rules. // In each rule of the map, the key is a case-insensitive header name. The value @@ -117,7 +120,7 @@ message Http1ProtocolOptions { // are not covered. For example, the "TE" header will be formatted as "Te". ProperCaseWords proper_case_words = 1; - // Formats the header according to custom rules. + // Formats the header according to custom rules Custom custom = 2; } } diff --git a/api/envoy/api/v2/core/socket_option.proto b/api/envoy/api/v2/core/socket_option.proto index 39678ad1b8..da8140596d 100644 --- a/api/envoy/api/v2/core/socket_option.proto +++ b/api/envoy/api/v2/core/socket_option.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.core"; option java_outer_classname = "SocketOptionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/discovery.proto b/api/envoy/api/v2/discovery.proto index da2690f867..fc5370688a 100644 --- a/api/envoy/api/v2/discovery.proto +++ b/api/envoy/api/v2/discovery.proto @@ -13,6 +13,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "DiscoveryProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.discovery.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/eds.proto b/api/envoy/api/v2/eds.proto index b0d5c7c473..4bd9235555 100644 --- a/api/envoy/api/v2/eds.proto +++ b/api/envoy/api/v2/eds.proto @@ -5,19 +5,17 @@ package envoy.api.v2; import "envoy/api/v2/discovery.proto"; import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; import "envoy/annotations/resource.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; import public "envoy/api/v2/endpoint.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "EdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.endpoint.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/endpoint.proto b/api/envoy/api/v2/endpoint.proto index 92a2b13a89..13e90521b6 100644 --- a/api/envoy/api/v2/endpoint.proto +++ b/api/envoy/api/v2/endpoint.proto @@ -5,7 +5,6 @@ package envoy.api.v2; import "envoy/api/v2/endpoint/endpoint_components.proto"; import "envoy/type/percent.proto"; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; @@ -16,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "EndpointProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/endpoint/endpoint.proto b/api/envoy/api/v2/endpoint/endpoint.proto index 9724fd7281..2c2e9daa5c 100644 --- a/api/envoy/api/v2/endpoint/endpoint.proto +++ b/api/envoy/api/v2/endpoint/endpoint.proto @@ -2,10 +2,9 @@ syntax = "proto3"; package envoy.api.v2.endpoint; -import "udpa/annotations/status.proto"; - import public "envoy/api/v2/endpoint/endpoint_components.proto"; option java_package = "io.envoyproxy.envoy.api.v2.endpoint"; option java_outer_classname = "EndpointProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"; diff --git a/api/envoy/api/v2/endpoint/endpoint_components.proto b/api/envoy/api/v2/endpoint/endpoint_components.proto index 78d45e2e08..86a533bf0e 100644 --- a/api/envoy/api/v2/endpoint/endpoint_components.proto +++ b/api/envoy/api/v2/endpoint/endpoint_components.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.endpoint"; option java_outer_classname = "EndpointComponentsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/endpoint/load_report.proto b/api/envoy/api/v2/endpoint/load_report.proto index 928aed6102..09dda612e4 100644 --- a/api/envoy/api/v2/endpoint/load_report.proto +++ b/api/envoy/api/v2/endpoint/load_report.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.endpoint"; option java_outer_classname = "LoadReportProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/lds.proto b/api/envoy/api/v2/lds.proto index d1e528f247..9c66e5426d 100644 --- a/api/envoy/api/v2/lds.proto +++ b/api/envoy/api/v2/lds.proto @@ -5,19 +5,17 @@ package envoy.api.v2; import "envoy/api/v2/discovery.proto"; import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; import "envoy/annotations/resource.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; import public "envoy/api/v2/listener.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "LdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.listener.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/listener.proto b/api/envoy/api/v2/listener.proto index a93df10c31..139816dc28 100644 --- a/api/envoy/api/v2/listener.proto +++ b/api/envoy/api/v2/listener.proto @@ -10,7 +10,6 @@ import "envoy/api/v2/listener/udp_listener_config.proto"; import "envoy/config/filter/accesslog/v2/accesslog.proto"; import "envoy/config/listener/v2/api_listener.proto"; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; @@ -21,6 +20,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "ListenerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -196,6 +196,8 @@ message Listener { google.protobuf.UInt32Value tcp_fast_open_queue_length = 12; // Specifies the intended direction of the traffic relative to the local Envoy. + // This property is required on Windows for listeners using the original destination filter, + // see :ref:`Original Destination `. core.TrafficDirection traffic_direction = 16; // If the protocol in the listener socket address in :ref:`protocol diff --git a/api/envoy/api/v2/listener/listener.proto b/api/envoy/api/v2/listener/listener.proto index 671da24b04..d007ba51c1 100644 --- a/api/envoy/api/v2/listener/listener.proto +++ b/api/envoy/api/v2/listener/listener.proto @@ -2,12 +2,11 @@ syntax = "proto3"; package envoy.api.v2.listener; -import "udpa/annotations/status.proto"; - import public "envoy/api/v2/listener/listener_components.proto"; option java_package = "io.envoyproxy.envoy.api.v2.listener"; option java_outer_classname = "ListenerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy.Api.V2.ListenerNS"; +option ruby_package = "Envoy::Api::V2::ListenerNS"; diff --git a/api/envoy/api/v2/listener/listener_components.proto b/api/envoy/api/v2/listener/listener_components.proto index a6791c86cd..4ebae87f5d 100644 --- a/api/envoy/api/v2/listener/listener_components.proto +++ b/api/envoy/api/v2/listener/listener_components.proto @@ -18,8 +18,9 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.listener"; option java_outer_classname = "ListenerComponentsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy.Api.V2.ListenerNS"; +option ruby_package = "Envoy::Api::V2::ListenerNS"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -230,7 +231,7 @@ message FilterChain { // rules: // - destination_port_range: // start: 3306 -// end: 3306 +// end: 3307 // - destination_port_range: // start: 15000 // end: 15001 diff --git a/api/envoy/api/v2/listener/quic_config.proto b/api/envoy/api/v2/listener/quic_config.proto index 2a4616bb09..c6d5028f5a 100644 --- a/api/envoy/api/v2/listener/quic_config.proto +++ b/api/envoy/api/v2/listener/quic_config.proto @@ -11,8 +11,9 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.api.v2.listener"; option java_outer_classname = "QuicConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy.Api.V2.ListenerNS"; +option ruby_package = "Envoy::Api::V2::ListenerNS"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/listener/udp_listener_config.proto b/api/envoy/api/v2/listener/udp_listener_config.proto index d4d29531f3..d1642ab421 100644 --- a/api/envoy/api/v2/listener/udp_listener_config.proto +++ b/api/envoy/api/v2/listener/udp_listener_config.proto @@ -11,8 +11,9 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.api.v2.listener"; option java_outer_classname = "UdpListenerConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy.Api.V2.ListenerNS"; +option ruby_package = "Envoy::Api::V2::ListenerNS"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/ratelimit/ratelimit.proto b/api/envoy/api/v2/ratelimit/ratelimit.proto index 5ac72c69a6..7245692a1e 100644 --- a/api/envoy/api/v2/ratelimit/ratelimit.proto +++ b/api/envoy/api/v2/ratelimit/ratelimit.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.ratelimit"; option java_outer_classname = "RatelimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/ratelimit"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.common.ratelimit.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/rds.proto b/api/envoy/api/v2/rds.proto index fad73f1758..2ac30541ae 100644 --- a/api/envoy/api/v2/rds.proto +++ b/api/envoy/api/v2/rds.proto @@ -5,18 +5,17 @@ package envoy.api.v2; import "envoy/api/v2/discovery.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; import "envoy/annotations/resource.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; import public "envoy/api/v2/route.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "RdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.route.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/route.proto b/api/envoy/api/v2/route.proto index 549f134a7f..4f9e40a440 100644 --- a/api/envoy/api/v2/route.proto +++ b/api/envoy/api/v2/route.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "RouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/route/route.proto b/api/envoy/api/v2/route/route.proto index 92e44f1e19..0c52d051dd 100644 --- a/api/envoy/api/v2/route/route.proto +++ b/api/envoy/api/v2/route/route.proto @@ -2,10 +2,9 @@ syntax = "proto3"; package envoy.api.v2.route; -import "udpa/annotations/status.proto"; - import public "envoy/api/v2/route/route_components.proto"; option java_package = "io.envoyproxy.envoy.api.v2.route"; option java_outer_classname = "RouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"; diff --git a/api/envoy/api/v2/route/route_components.proto b/api/envoy/api/v2/route/route_components.proto index 7915e3d67d..062e73231d 100644 --- a/api/envoy/api/v2/route/route_components.proto +++ b/api/envoy/api/v2/route/route_components.proto @@ -22,6 +22,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.route"; option java_outer_classname = "RouteComponentsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -675,8 +676,8 @@ message RouteAction { message FilterState { // The name of the Object in the per-request filterState, which is an - // Envoy::Http::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Http::Hashable, no hash will be produced. + // Envoy::Hashable object. If there is no data associated with the key, + // or the stored object is not Envoy::Hashable, no hash will be produced. string key = 1 [(validate.rules).string = {min_bytes: 1}]; } @@ -1149,7 +1150,7 @@ message HedgePolicy { bool hedge_on_per_try_timeout = 3; } -// [#next-free-field: 10] +// [#next-free-field: 9] message RedirectAction { enum RedirectResponseCode { // Moved Permanently HTTP Status Code - 301. @@ -1218,31 +1219,6 @@ message RedirectAction { // :ref:`RouteAction's prefix_rewrite `. string prefix_rewrite = 5 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during redirect, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - type.matcher.RegexMatchAndSubstitute regex_rewrite = 9; } // The HTTP status code to use in the redirect response. The default response diff --git a/api/envoy/api/v2/scoped_route.proto b/api/envoy/api/v2/scoped_route.proto index 0841bd0872..f3902d9d9e 100644 --- a/api/envoy/api/v2/scoped_route.proto +++ b/api/envoy/api/v2/scoped_route.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "ScopedRouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/api/v2/srds.proto b/api/envoy/api/v2/srds.proto index 0edb99a1ec..4f0ecab765 100644 --- a/api/envoy/api/v2/srds.proto +++ b/api/envoy/api/v2/srds.proto @@ -15,6 +15,7 @@ import public "envoy/api/v2/scoped_route.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "SrdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.route.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/accesslog/v2/als.proto b/api/envoy/config/accesslog/v2/als.proto index 5b4106af10..38f5edff84 100644 --- a/api/envoy/config/accesslog/v2/als.proto +++ b/api/envoy/config/accesslog/v2/als.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.accesslog.v2"; option java_outer_classname = "AlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v2;accesslogv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.access_loggers.grpc.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/accesslog/v2/file.proto b/api/envoy/config/accesslog/v2/file.proto index 9b8671c813..0619493362 100644 --- a/api/envoy/config/accesslog/v2/file.proto +++ b/api/envoy/config/accesslog/v2/file.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.accesslog.v2"; option java_outer_classname = "FileProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v2;accesslogv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.access_loggers.file.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/accesslog/v3/accesslog.proto b/api/envoy/config/accesslog/v3/accesslog.proto index d85c6af829..cdf5877cef 100644 --- a/api/envoy/config/accesslog/v3/accesslog.proto +++ b/api/envoy/config/accesslog/v3/accesslog.proto @@ -8,7 +8,6 @@ import "envoy/type/matcher/v3/metadata.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; import "udpa/annotations/status.proto"; @@ -18,6 +17,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.accesslog.v3"; option java_outer_classname = "AccesslogProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v3;accesslogv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common access log types] @@ -30,26 +30,14 @@ message AccessLog { reserved "config"; - // The name of the access log implementation to instantiate. The name must - // match a statically registered access log. Current built-in loggers include: - // - // #. "envoy.access_loggers.file" - // #. "envoy.access_loggers.http_grpc" - // #. "envoy.access_loggers.tcp_grpc" + // The name of the access log extension configuration. string name = 1; // Filter which is used to determine if the access log needs to be written. AccessLogFilter filter = 2; - // Custom configuration that depends on the access log being instantiated. - // Built-in configurations include: - // - // #. "envoy.access_loggers.file": :ref:`FileAccessLog - // ` - // #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig - // ` - // #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig - // ` + // Custom configuration that must be set according to the access logger extension being instantiated. + // [#extension-category: envoy.access_loggers] oneof config_type { google.protobuf.Any typed_config = 4; } @@ -94,6 +82,7 @@ message AccessLogFilter { GrpcStatusFilter grpc_status_filter = 10; // Extension filter. + // [#extension-category: envoy.access_loggers.extension_filters] ExtensionFilter extension_filter = 11; // Metadata Filter @@ -180,8 +169,8 @@ message RuntimeFilter { // 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 + // ` 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). @@ -255,6 +244,9 @@ message ResponseFlagFilter { in: "RFCF" in: "NFCF" in: "DT" + in: "UPE" + in: "NC" + in: "OM" } } }]; diff --git a/api/envoy/config/accesslog/v4alpha/accesslog.proto b/api/envoy/config/accesslog/v4alpha/accesslog.proto deleted file mode 100644 index 73769ca8ae..0000000000 --- a/api/envoy/config/accesslog/v4alpha/accesslog.proto +++ /dev/null @@ -1,334 +0,0 @@ -syntax = "proto3"; - -package envoy.config.accesslog.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/type/matcher/v4alpha/metadata.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.accesslog.v4alpha"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Common access log types] - -message AccessLog { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.AccessLog"; - - reserved 3; - - reserved "config"; - - // The name of the access log implementation to instantiate. The name must - // match a statically registered access log. Current built-in loggers include: - // - // #. "envoy.access_loggers.file" - // #. "envoy.access_loggers.http_grpc" - // #. "envoy.access_loggers.tcp_grpc" - string name = 1; - - // Filter which is used to determine if the access log needs to be written. - AccessLogFilter filter = 2; - - // Custom configuration that depends on the access log being instantiated. - // Built-in configurations include: - // - // #. "envoy.access_loggers.file": :ref:`FileAccessLog - // ` - // #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig - // ` - // #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig - // ` - oneof config_type { - google.protobuf.Any typed_config = 4; - } -} - -// [#next-free-field: 13] -message AccessLogFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.AccessLogFilter"; - - oneof filter_specifier { - option (validate.required) = true; - - // Status code filter. - StatusCodeFilter status_code_filter = 1; - - // Duration filter. - DurationFilter duration_filter = 2; - - // Not health check filter. - NotHealthCheckFilter not_health_check_filter = 3; - - // Traceable filter. - TraceableFilter traceable_filter = 4; - - // Runtime filter. - RuntimeFilter runtime_filter = 5; - - // And filter. - AndFilter and_filter = 6; - - // Or filter. - OrFilter or_filter = 7; - - // Header filter. - HeaderFilter header_filter = 8; - - // Response flag filter. - ResponseFlagFilter response_flag_filter = 9; - - // gRPC status filter. - GrpcStatusFilter grpc_status_filter = 10; - - // Extension filter. - ExtensionFilter extension_filter = 11; - - // Metadata Filter - MetadataFilter metadata_filter = 12; - } -} - -// Filter on an integer comparison. -message ComparisonFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.ComparisonFilter"; - - enum Op { - // = - EQ = 0; - - // >= - GE = 1; - - // <= - LE = 2; - } - - // Comparison operator. - Op op = 1 [(validate.rules).enum = {defined_only: true}]; - - // Value to compare against. - core.v4alpha.RuntimeUInt32 value = 2; -} - -// Filters on HTTP response/status code. -message StatusCodeFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.StatusCodeFilter"; - - // Comparison. - ComparisonFilter comparison = 1 [(validate.rules).message = {required: true}]; -} - -// Filters on total request duration in milliseconds. -message DurationFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.DurationFilter"; - - // Comparison. - ComparisonFilter comparison = 1 [(validate.rules).message = {required: true}]; -} - -// Filters for requests that are not health check requests. A health check -// request is marked by the health check filter. -message NotHealthCheckFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.NotHealthCheckFilter"; -} - -// Filters for requests that are traceable. See the tracing overview for more -// information on how a request becomes traceable. -message TraceableFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.TraceableFilter"; -} - -// Filters for random sampling of requests. -message RuntimeFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.RuntimeFilter"; - - // 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. - string runtime_key = 1 [(validate.rules).string = {min_len: 1}]; - - // The default sampling percentage. If not specified, defaults to 0% with - // denominator of 100. - type.v3.FractionalPercent percent_sampled = 2; - - // 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). - bool use_independent_randomness = 3; -} - -// 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. -message AndFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.AndFilter"; - - repeated AccessLogFilter filters = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// 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. -message OrFilter { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.accesslog.v3.OrFilter"; - - repeated AccessLogFilter filters = 2 [(validate.rules).repeated = {min_items: 2}]; -} - -// Filters requests based on the presence or value of a request header. -message HeaderFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.HeaderFilter"; - - // Only requests with a header which matches the specified HeaderMatcher will - // pass the filter check. - route.v4alpha.HeaderMatcher header = 1 [(validate.rules).message = {required: true}]; -} - -// 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`. -message ResponseFlagFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.ResponseFlagFilter"; - - // 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. - repeated string flags = 1 [(validate.rules).repeated = { - items { - string { - in: "LH" - in: "UH" - in: "UT" - in: "LR" - in: "UR" - in: "UF" - in: "UC" - in: "UO" - in: "NR" - in: "DI" - in: "FI" - in: "RL" - in: "UAEX" - in: "RLSE" - in: "DC" - in: "URX" - in: "SI" - in: "IH" - in: "DPE" - in: "UMSDR" - in: "RFCF" - in: "NFCF" - in: "DT" - } - } - }]; -} - -// 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. -message GrpcStatusFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.GrpcStatusFilter"; - - enum Status { - OK = 0; - CANCELED = 1; - UNKNOWN = 2; - INVALID_ARGUMENT = 3; - DEADLINE_EXCEEDED = 4; - NOT_FOUND = 5; - ALREADY_EXISTS = 6; - PERMISSION_DENIED = 7; - RESOURCE_EXHAUSTED = 8; - FAILED_PRECONDITION = 9; - ABORTED = 10; - OUT_OF_RANGE = 11; - UNIMPLEMENTED = 12; - INTERNAL = 13; - UNAVAILABLE = 14; - DATA_LOSS = 15; - UNAUTHENTICATED = 16; - } - - // Logs only responses that have any one of the gRPC statuses in this field. - repeated Status statuses = 1 [(validate.rules).repeated = {items {enum {defined_only: true}}}]; - - // 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. - bool exclude = 2; -} - -// Filters based on matching dynamic metadata. -// If the matcher path and key correspond to an existing key in dynamic -// metadata, the request is logged only if the matcher value is equal to the -// metadata value. If the matcher path and key *do not* correspond to an -// existing key in dynamic metadata, the request is logged only if -// match_if_key_not_found is "true" or unset. -message MetadataFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.MetadataFilter"; - - // Matcher to check metadata for specified value. For example, to match on the - // access_log_hint metadata, set the filter to "envoy.common" and the path to - // "access_log_hint", and the value to "true". - type.matcher.v4alpha.MetadataMatcher matcher = 1; - - // Default result if the key does not exist in dynamic metadata: if unset or - // true, then log; if false, then don't log. - google.protobuf.BoolValue match_if_key_not_found = 2; -} - -// Extension filter is statically registered at runtime. -message ExtensionFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v3.ExtensionFilter"; - - reserved 2; - - reserved "config"; - - // The name of the filter implementation to instantiate. The name must - // match a statically registered filter. - string name = 1; - - // Custom configuration that depends on the filter being instantiated. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} diff --git a/api/envoy/config/bootstrap/v2/bootstrap.proto b/api/envoy/config/bootstrap/v2/bootstrap.proto index 30c276f242..68a08bc37a 100644 --- a/api/envoy/config/bootstrap/v2/bootstrap.proto +++ b/api/envoy/config/bootstrap/v2/bootstrap.proto @@ -25,6 +25,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.bootstrap.v2"; option java_outer_classname = "BootstrapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v2;bootstrapv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Bootstrap] diff --git a/api/envoy/config/bootstrap/v3/bootstrap.proto b/api/envoy/config/bootstrap/v3/bootstrap.proto index c3fee5e2df..bde4d5c396 100644 --- a/api/envoy/config/bootstrap/v3/bootstrap.proto +++ b/api/envoy/config/bootstrap/v3/bootstrap.proto @@ -2,12 +2,14 @@ syntax = "proto3"; package envoy.config.bootstrap.v3; +import "envoy/config/accesslog/v3/accesslog.proto"; import "envoy/config/cluster/v3/cluster.proto"; import "envoy/config/core/v3/address.proto"; import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/config_source.proto"; import "envoy/config/core/v3/event_service_config.proto"; import "envoy/config/core/v3/extension.proto"; +import "envoy/config/core/v3/resolver.proto"; import "envoy/config/core/v3/socket_option.proto"; import "envoy/config/listener/v3/listener.proto"; import "envoy/config/metrics/v3/stats.proto"; @@ -30,15 +32,16 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.bootstrap.v3"; option java_outer_classname = "BootstrapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v3;bootstrapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Bootstrap] // This proto is supplied via the :option:`-c` CLI flag and acts as the root -// of the Envoy v2 configuration. See the :ref:`v2 configuration overview +// of the Envoy v3 configuration. See the :ref:`v3 configuration overview // ` for more detail. // Bootstrap :ref:`configuration overview `. -// [#next-free-field: 30] +// [#next-free-field: 34] message Bootstrap { option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v2.Bootstrap"; @@ -47,12 +50,12 @@ message Bootstrap { option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v2.Bootstrap.StaticResources"; - // Static :ref:`Listeners `. These listeners are + // Static :ref:`Listeners `. These listeners are // available regardless of LDS configuration. repeated listener.v3.Listener listeners = 1; // If a network based configuration source is specified for :ref:`cds_config - // `, it's necessary + // `, it's necessary // to have some initial cluster definitions available to allow Envoy to know // how to speak to the management server. These cluster definitions may not // use :ref:`EDS ` (i.e. they should be static @@ -60,7 +63,7 @@ message Bootstrap { repeated cluster.v3.Cluster clusters = 2; // These static secrets can be used by :ref:`SdsSecretConfig - // ` + // ` repeated envoy.extensions.transport_sockets.tls.v3.Secret secrets = 3; } @@ -71,7 +74,7 @@ message Bootstrap { reserved 4; - // All :ref:`Listeners ` are provided by a single + // All :ref:`Listeners ` are provided by a single // :ref:`LDS ` configuration source. core.v3.ConfigSource lds_config = 1; @@ -79,7 +82,7 @@ message Bootstrap { // [#not-implemented-hide:] string lds_resources_locator = 5; - // All post-bootstrap :ref:`Cluster ` definitions are + // All post-bootstrap :ref:`Cluster ` definitions are // provided by a single :ref:`CDS ` // configuration source. core.v3.ConfigSource cds_config = 2; @@ -90,10 +93,10 @@ message Bootstrap { // A single :ref:`ADS ` source may be optionally // specified. This must have :ref:`api_type - // ` :ref:`GRPC - // `. Only - // :ref:`ConfigSources ` that have - // the :ref:`ads ` field set will be + // ` :ref:`GRPC + // `. Only + // :ref:`ConfigSources ` that have + // the :ref:`ads ` field set will be // streamed on the ADS channel. core.v3.ApiConfigSource ads_config = 3; } @@ -151,7 +154,7 @@ message Bootstrap { ClusterManager cluster_manager = 4; // Health discovery service config option. - // (:ref:`core.ApiConfigSource `) + // (:ref:`core.ApiConfigSource `) core.v3.ApiConfigSource hds_config = 14; // Optional file system path to search for startup flag files. @@ -187,18 +190,21 @@ message Bootstrap { // Optional watchdog configuration. // This is for a single watchdog configuration for the entire system. // Deprecated in favor of *watchdogs* which has finer granularity. - Watchdog watchdog = 8 [deprecated = true]; + Watchdog watchdog = 8 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Optional watchdogs configuration. // This is used for specifying different watchdogs for the different subsystems. + // [#extension-category: envoy.guarddog_actions] Watchdogs watchdogs = 27; // Configuration for an external tracing provider. // // .. attention:: // This field has been deprecated in favor of :ref:`HttpConnectionManager.Tracing.provider - // `. - trace.v3.Tracing tracing = 9 [deprecated = true]; + // `. + trace.v3.Tracing tracing = 9 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Configuration for the runtime configuration provider. If not // specified, a “null” provider will be used which will result in all defaults @@ -217,7 +223,7 @@ message Bootstrap { // Enable :ref:`stats for event dispatcher `, defaults to false. // Note that this records a value for each iteration of the event loop on every thread. This // should normally be minimal overhead, but when using - // :ref:`statsd `, it will send each observed value + // :ref:`statsd `, it will send each observed value // over the wire individually because the statsd protocol doesn't have any way to represent a // histogram summary. Be aware that this can be a very large volume of data. bool enable_dispatcher_stats = 16; @@ -235,21 +241,44 @@ message Bootstrap { // Optional proxy version which will be used to set the value of :ref:`server.version statistic // ` if specified. Envoy will not process this value, it will be sent as is to - // :ref:`stats sinks `. + // :ref:`stats sinks `. google.protobuf.UInt64Value stats_server_version_override = 19; // Always use TCP queries instead of UDP queries for DNS lookups. // This may be overridden on a per-cluster basis in cds_config, - // when :ref:`dns_resolvers ` and - // :ref:`use_tcp_for_dns_lookups ` are + // when :ref:`dns_resolvers ` and + // :ref:`use_tcp_for_dns_lookups ` are // specified. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - bool use_tcp_for_dns_lookups = 20; + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + bool use_tcp_for_dns_lookups = 20 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This may be overridden on a per-cluster basis in cds_config, when + // :ref:`dns_resolution_config ` + // is specified. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + core.v3.DnsResolutionConfig dns_resolution_config = 30 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + core.v3.TypedExtensionConfig typed_dns_resolver_config = 31; // Specifies optional bootstrap extensions to be instantiated at startup time. // Each item contains extension specific configuration. + // [#extension-category: envoy.bootstrap] repeated core.v3.TypedExtensionConfig bootstrap_extensions = 21; // Specifies optional extensions instantiated at startup time and @@ -286,21 +315,39 @@ message Bootstrap { // Global map of CertificateProvider instances. These instances are referred to by name in the // :ref:`CommonTlsContext.CertificateProviderInstance.instance_name - // ` + // ` // field. // [#not-implemented-hide:] map certificate_provider_instances = 25; + + // Specifies a set of headers that need to be registered as inline header. This configuration + // allows users to customize the inline headers on-demand at Envoy startup without modifying + // Envoy's source code. + // + // Note that the 'set-cookie' header cannot be registered as inline header. + repeated CustomInlineHeader inline_headers = 32; + + // Optional path to a file with performance tracing data created by "Perfetto" SDK in binary + // ProtoBuf format. The default value is "envoy.pftrace". + string perf_tracing_file_path = 33; } // Administration interface :ref:`operations documentation // `. +// [#next-free-field: 7] message Admin { option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v2.Admin"; + // Configuration for :ref:`access logs ` + // emitted by the administration server. + repeated accesslog.v3.AccessLog access_log = 5; + // The path to write the access log for the administration server. If no // access log is desired specify ‘/dev/null’. This is only required if - // :ref:`address ` is set. - string access_log_path = 1; + // :ref:`address ` is set. + // Deprecated in favor of *access_log* which offers more options. + string access_log_path = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // The cpu profiler output path for the administration server. If no profile // path is specified, the default is ‘/var/log/envoy/envoy.prof’. @@ -313,6 +360,10 @@ message Admin { // Additional socket options that may not be present in Envoy source code or // precompiled binaries. repeated core.v3.SocketOption socket_options = 4; + + // Indicates whether :ref:`global_downstream_max_connections ` + // should apply to the admin interface or not. + bool ignore_global_conn_limit = 6; } // Cluster manager :ref:`architecture overview `. @@ -337,9 +388,9 @@ message ClusterManager { // this configuration). In order to enable :ref:`zone aware routing // ` this option must be set. // If *local_cluster_name* is defined then :ref:`clusters - // ` must be defined in the :ref:`Bootstrap + // ` must be defined in the :ref:`Bootstrap // static cluster resources - // `. This is unrelated to + // `. This is unrelated to // the :option:`--service-cluster` option which does not `affect zone aware // routing `_. string local_cluster_name = 1; @@ -353,8 +404,8 @@ message ClusterManager { // A management server endpoint to stream load stats to via // *StreamLoadStats*. This must have :ref:`api_type - // ` :ref:`GRPC - // `. + // ` :ref:`GRPC + // `. core.v3.ApiConfigSource load_stats_config = 4; } @@ -556,3 +607,43 @@ message LayeredRuntime { // such that later layers in the list overlay earlier entries. repeated RuntimeLayer layers = 1; } + +// Used to specify the header that needs to be registered as an inline header. +// +// If request or response contain multiple headers with the same name and the header +// name is registered as an inline header. Then multiple headers will be folded +// into one, and multiple header values will be concatenated by a suitable delimiter. +// The delimiter is generally a comma. +// +// For example, if 'foo' is registered as an inline header, and the headers contains +// the following two headers: +// +// .. code-block:: text +// +// foo: bar +// foo: eep +// +// Then they will eventually be folded into: +// +// .. code-block:: text +// +// foo: bar, eep +// +// Inline headers provide O(1) search performance, but each inline header imposes +// an additional memory overhead on all instances of the corresponding type of +// HeaderMap or TrailerMap. +message CustomInlineHeader { + enum InlineHeaderType { + REQUEST_HEADER = 0; + REQUEST_TRAILER = 1; + RESPONSE_HEADER = 2; + RESPONSE_TRAILER = 3; + } + + // The name of the header that is expected to be set as the inline header. + string inline_header_name = 1 + [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; + + // The type of the header that is expected to be set as the inline header. + InlineHeaderType inline_header_type = 2 [(validate.rules).enum = {defined_only: true}]; +} diff --git a/api/envoy/config/bootstrap/v4alpha/bootstrap.proto b/api/envoy/config/bootstrap/v4alpha/bootstrap.proto deleted file mode 100644 index b4aceffc91..0000000000 --- a/api/envoy/config/bootstrap/v4alpha/bootstrap.proto +++ /dev/null @@ -1,550 +0,0 @@ -syntax = "proto3"; - -package envoy.config.bootstrap.v4alpha; - -import "envoy/config/cluster/v4alpha/cluster.proto"; -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/event_service_config.proto"; -import "envoy/config/core/v4alpha/extension.proto"; -import "envoy/config/core/v4alpha/socket_option.proto"; -import "envoy/config/listener/v4alpha/listener.proto"; -import "envoy/config/metrics/v4alpha/stats.proto"; -import "envoy/config/overload/v3/overload.proto"; -import "envoy/extensions/transport_sockets/tls/v4alpha/secret.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.bootstrap.v4alpha"; -option java_outer_classname = "BootstrapProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Bootstrap] -// This proto is supplied via the :option:`-c` CLI flag and acts as the root -// of the Envoy v2 configuration. See the :ref:`v2 configuration overview -// ` for more detail. - -// Bootstrap :ref:`configuration overview `. -// [#next-free-field: 30] -message Bootstrap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.Bootstrap"; - - message StaticResources { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.Bootstrap.StaticResources"; - - // Static :ref:`Listeners `. These listeners are - // available regardless of LDS configuration. - repeated listener.v4alpha.Listener listeners = 1; - - // If a network based configuration source is specified for :ref:`cds_config - // `, it's necessary - // to have some initial cluster definitions available to allow Envoy to know - // how to speak to the management server. These cluster definitions may not - // use :ref:`EDS ` (i.e. they should be static - // IP or DNS-based). - repeated cluster.v4alpha.Cluster clusters = 2; - - // These static secrets can be used by :ref:`SdsSecretConfig - // ` - repeated envoy.extensions.transport_sockets.tls.v4alpha.Secret secrets = 3; - } - - // [#next-free-field: 7] - message DynamicResources { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.Bootstrap.DynamicResources"; - - reserved 4; - - // All :ref:`Listeners ` are provided by a single - // :ref:`LDS ` configuration source. - core.v4alpha.ConfigSource lds_config = 1; - - // xdstp:// resource locator for listener collection. - // [#not-implemented-hide:] - string lds_resources_locator = 5; - - // All post-bootstrap :ref:`Cluster ` definitions are - // provided by a single :ref:`CDS ` - // configuration source. - core.v4alpha.ConfigSource cds_config = 2; - - // xdstp:// resource locator for cluster collection. - // [#not-implemented-hide:] - string cds_resources_locator = 6; - - // A single :ref:`ADS ` source may be optionally - // specified. This must have :ref:`api_type - // ` :ref:`GRPC - // `. Only - // :ref:`ConfigSources ` that have - // the :ref:`ads ` field set will be - // streamed on the ADS channel. - core.v4alpha.ApiConfigSource ads_config = 3; - } - - reserved 10, 11, 8, 9; - - reserved "runtime", "watchdog", "tracing"; - - // Node identity to present to the management server and for instance - // identification purposes (e.g. in generated headers). - core.v4alpha.Node node = 1; - - // A list of :ref:`Node ` field names - // that will be included in the context parameters of the effective - // xdstp:// URL that is sent in a discovery request when resource - // locators are used for LDS/CDS. Any non-string field will have its JSON - // encoding set as the context parameter value, with the exception of - // metadata, which will be flattened (see example below). The supported field - // names are: - // - "cluster" - // - "id" - // - "locality.region" - // - "locality.sub_zone" - // - "locality.zone" - // - "metadata" - // - "user_agent_build_version.metadata" - // - "user_agent_build_version.version" - // - "user_agent_name" - // - "user_agent_version" - // - // The node context parameters act as a base layer dictionary for the context - // parameters (i.e. more specific resource specific context parameters will - // override). Field names will be prefixed with “udpa.node.” when included in - // context parameters. - // - // For example, if node_context_params is ``["user_agent_name", "metadata"]``, - // the implied context parameters might be:: - // - // node.user_agent_name: "envoy" - // node.metadata.foo: "{\"bar\": \"baz\"}" - // node.metadata.some: "42" - // node.metadata.thing: "\"thing\"" - // - // [#not-implemented-hide:] - repeated string node_context_params = 26; - - // Statically specified resources. - StaticResources static_resources = 2; - - // xDS configuration sources. - DynamicResources dynamic_resources = 3; - - // Configuration for the cluster manager which owns all upstream clusters - // within the server. - ClusterManager cluster_manager = 4; - - // Health discovery service config option. - // (:ref:`core.ApiConfigSource `) - core.v4alpha.ApiConfigSource hds_config = 14; - - // Optional file system path to search for startup flag files. - string flags_path = 5; - - // Optional set of stats sinks. - repeated metrics.v4alpha.StatsSink stats_sinks = 6; - - // Configuration for internal processing of stats. - metrics.v4alpha.StatsConfig stats_config = 13; - - oneof stats_flush { - // Optional duration between flushes to configured stats sinks. For - // performance reasons Envoy latches counters and only flushes counters and - // gauges at a periodic interval. If not specified the default is 5000ms (5 - // seconds). Only one of `stats_flush_interval` or `stats_flush_on_admin` - // can be set. - // Duration must be at least 1ms and at most 5 min. - google.protobuf.Duration stats_flush_interval = 7 [(validate.rules).duration = { - lt {seconds: 300} - gte {nanos: 1000000} - }]; - - // Flush stats to sinks only when queried for on the admin interface. If set, - // a flush timer is not created. Only one of `stats_flush_on_admin` or - // `stats_flush_interval` can be set. - bool stats_flush_on_admin = 29 [(validate.rules).bool = {const: true}]; - } - - // Optional watchdogs configuration. - // This is used for specifying different watchdogs for the different subsystems. - Watchdogs watchdogs = 27; - - // Configuration for the runtime configuration provider. If not - // specified, a “null” provider will be used which will result in all defaults - // being used. - LayeredRuntime layered_runtime = 17; - - // Configuration for the local administration HTTP server. - Admin admin = 12; - - // Optional overload manager configuration. - overload.v3.OverloadManager overload_manager = 15 [ - (udpa.annotations.security).configure_for_untrusted_downstream = true, - (udpa.annotations.security).configure_for_untrusted_upstream = true - ]; - - // Enable :ref:`stats for event dispatcher `, defaults to false. - // Note that this records a value for each iteration of the event loop on every thread. This - // should normally be minimal overhead, but when using - // :ref:`statsd `, it will send each observed value - // over the wire individually because the statsd protocol doesn't have any way to represent a - // histogram summary. Be aware that this can be a very large volume of data. - bool enable_dispatcher_stats = 16; - - // Optional string which will be used in lieu of x-envoy in prefixing headers. - // - // For example, if this string is present and set to X-Foo, then x-envoy-retry-on will be - // transformed into x-foo-retry-on etc. - // - // Note this applies to the headers Envoy will generate, the headers Envoy will sanitize, and the - // headers Envoy will trust for core code and core extensions only. Be VERY careful making - // changes to this string, especially in multi-layer Envoy deployments or deployments using - // extensions which are not upstream. - string header_prefix = 18; - - // Optional proxy version which will be used to set the value of :ref:`server.version statistic - // ` if specified. Envoy will not process this value, it will be sent as is to - // :ref:`stats sinks `. - google.protobuf.UInt64Value stats_server_version_override = 19; - - // Always use TCP queries instead of UDP queries for DNS lookups. - // This may be overridden on a per-cluster basis in cds_config, - // when :ref:`dns_resolvers ` and - // :ref:`use_tcp_for_dns_lookups ` are - // specified. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - bool use_tcp_for_dns_lookups = 20; - - // Specifies optional bootstrap extensions to be instantiated at startup time. - // Each item contains extension specific configuration. - repeated core.v4alpha.TypedExtensionConfig bootstrap_extensions = 21; - - // Specifies optional extensions instantiated at startup time and - // invoked during crash time on the request that caused the crash. - repeated FatalAction fatal_actions = 28; - - // Configuration sources that will participate in - // xdstp:// URL authority resolution. The algorithm is as - // follows: - // 1. The authority field is taken from the xdstp:// URL, call - // this *resource_authority*. - // 2. *resource_authority* is compared against the authorities in any peer - // *ConfigSource*. The peer *ConfigSource* is the configuration source - // message which would have been used unconditionally for resolution - // with opaque resource names. If there is a match with an authority, the - // peer *ConfigSource* message is used. - // 3. *resource_authority* is compared sequentially with the authorities in - // each configuration source in *config_sources*. The first *ConfigSource* - // to match wins. - // 4. As a fallback, if no configuration source matches, then - // *default_config_source* is used. - // 5. If *default_config_source* is not specified, resolution fails. - // [#not-implemented-hide:] - repeated core.v4alpha.ConfigSource config_sources = 22; - - // Default configuration source for xdstp:// URLs if all - // other resolution fails. - // [#not-implemented-hide:] - core.v4alpha.ConfigSource default_config_source = 23; - - // Optional overriding of default socket interface. The value must be the name of one of the - // socket interface factories initialized through a bootstrap extension - string default_socket_interface = 24; - - // Global map of CertificateProvider instances. These instances are referred to by name in the - // :ref:`CommonTlsContext.CertificateProviderInstance.instance_name - // ` - // field. - // [#not-implemented-hide:] - map certificate_provider_instances = 25; -} - -// Administration interface :ref:`operations documentation -// `. -message Admin { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v3.Admin"; - - // The path to write the access log for the administration server. If no - // access log is desired specify ‘/dev/null’. This is only required if - // :ref:`address ` is set. - string access_log_path = 1; - - // The cpu profiler output path for the administration server. If no profile - // path is specified, the default is ‘/var/log/envoy/envoy.prof’. - string profile_path = 2; - - // The TCP address that the administration server will listen on. - // If not specified, Envoy will not start an administration server. - core.v4alpha.Address address = 3; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated core.v4alpha.SocketOption socket_options = 4; -} - -// Cluster manager :ref:`architecture overview `. -message ClusterManager { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.ClusterManager"; - - message OutlierDetection { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.ClusterManager.OutlierDetection"; - - // Specifies the path to the outlier event log. - string event_log_path = 1; - - // [#not-implemented-hide:] - // The gRPC service for the outlier detection event service. - // If empty, outlier detection events won't be sent to a remote endpoint. - core.v4alpha.EventServiceConfig event_service = 2; - } - - // Name of the local cluster (i.e., the cluster that owns the Envoy running - // this configuration). In order to enable :ref:`zone aware routing - // ` this option must be set. - // If *local_cluster_name* is defined then :ref:`clusters - // ` must be defined in the :ref:`Bootstrap - // static cluster resources - // `. This is unrelated to - // the :option:`--service-cluster` option which does not `affect zone aware - // routing `_. - string local_cluster_name = 1; - - // Optional global configuration for outlier detection. - OutlierDetection outlier_detection = 2; - - // Optional configuration used to bind newly established upstream connections. - // This may be overridden on a per-cluster basis by upstream_bind_config in the cds_config. - core.v4alpha.BindConfig upstream_bind_config = 3; - - // A management server endpoint to stream load stats to via - // *StreamLoadStats*. This must have :ref:`api_type - // ` :ref:`GRPC - // `. - core.v4alpha.ApiConfigSource load_stats_config = 4; -} - -// Allows you to specify different watchdog configs for different subsystems. -// This allows finer tuned policies for the watchdog. If a subsystem is omitted -// the default values for that system will be used. -message Watchdogs { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.Watchdogs"; - - // Watchdog for the main thread. - Watchdog main_thread_watchdog = 1; - - // Watchdog for the worker threads. - Watchdog worker_watchdog = 2; -} - -// Envoy process watchdog configuration. When configured, this monitors for -// nonresponsive threads and kills the process after the configured thresholds. -// See the :ref:`watchdog documentation ` for more information. -// [#next-free-field: 8] -message Watchdog { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v3.Watchdog"; - - message WatchdogAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.Watchdog.WatchdogAction"; - - // The events are fired in this order: KILL, MULTIKILL, MEGAMISS, MISS. - // Within an event type, actions execute in the order they are configured. - // For KILL/MULTIKILL there is a default PANIC that will run after the - // registered actions and kills the process if it wasn't already killed. - // It might be useful to specify several debug actions, and possibly an - // alternate FATAL action. - enum WatchdogEvent { - UNKNOWN = 0; - KILL = 1; - MULTIKILL = 2; - MEGAMISS = 3; - MISS = 4; - } - - // Extension specific configuration for the action. - core.v4alpha.TypedExtensionConfig config = 1; - - WatchdogEvent event = 2 [(validate.rules).enum = {defined_only: true}]; - } - - // Register actions that will fire on given WatchDog events. - // See *WatchDogAction* for priority of events. - repeated WatchdogAction actions = 7; - - // The duration after which Envoy counts a nonresponsive thread in the - // *watchdog_miss* statistic. If not specified the default is 200ms. - google.protobuf.Duration miss_timeout = 1; - - // The duration after which Envoy counts a nonresponsive thread in the - // *watchdog_mega_miss* statistic. If not specified the default is - // 1000ms. - google.protobuf.Duration megamiss_timeout = 2; - - // If a watched thread has been nonresponsive for this duration, assume a - // programming error and kill the entire Envoy process. Set to 0 to disable - // kill behavior. If not specified the default is 0 (disabled). - google.protobuf.Duration kill_timeout = 3; - - // Defines the maximum jitter used to adjust the *kill_timeout* if *kill_timeout* is - // enabled. Enabling this feature would help to reduce risk of synchronized - // watchdog kill events across proxies due to external triggers. Set to 0 to - // disable. If not specified the default is 0 (disabled). - google.protobuf.Duration max_kill_timeout_jitter = 6 [(validate.rules).duration = {gte {}}]; - - // If max(2, ceil(registered_threads * Fraction(*multikill_threshold*))) - // threads have been nonresponsive for at least this duration kill the entire - // Envoy process. Set to 0 to disable this behavior. If not specified the - // default is 0 (disabled). - google.protobuf.Duration multikill_timeout = 4; - - // Sets the threshold for *multikill_timeout* in terms of the percentage of - // nonresponsive threads required for the *multikill_timeout*. - // If not specified the default is 0. - type.v3.Percent multikill_threshold = 5; -} - -// Fatal actions to run while crashing. Actions can be safe (meaning they are -// async-signal safe) or unsafe. We run all safe actions before we run unsafe actions. -// If using an unsafe action that could get stuck or deadlock, it important to -// have an out of band system to terminate the process. -// -// The interface for the extension is ``Envoy::Server::Configuration::FatalAction``. -// *FatalAction* extensions live in the ``envoy.extensions.fatal_actions`` API -// namespace. -message FatalAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.FatalAction"; - - // Extension specific configuration for the action. It's expected to conform - // to the ``Envoy::Server::Configuration::FatalAction`` interface. - core.v4alpha.TypedExtensionConfig config = 1; -} - -// Runtime :ref:`configuration overview ` (deprecated). -message Runtime { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v3.Runtime"; - - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. Envoy - // will watch the location for changes and reload the file system tree when - // they happen. If this parameter is not set, there will be no disk based - // runtime. - string symlink_root = 1; - - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - string subdirectory = 2; - - // Specifies an optional subdirectory to load within the root directory. If - // specified and the directory exists, configuration values within this - // directory will override those found in the primary subdirectory. This is - // useful when Envoy is deployed across many different types of servers. - // Sometimes it is useful to have a per service cluster directory for runtime - // configuration. See below for exactly how the override directory is used. - string override_subdirectory = 3; - - // Static base runtime. This will be :ref:`overridden - // ` by other runtime layers, e.g. - // disk or admin. This follows the :ref:`runtime protobuf JSON representation - // encoding `. - google.protobuf.Struct base = 4; -} - -// [#next-free-field: 6] -message RuntimeLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.RuntimeLayer"; - - // :ref:`Disk runtime ` layer. - message DiskLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.RuntimeLayer.DiskLayer"; - - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. - // Envoy will watch the location for changes and reload the file system tree - // when they happen. See documentation on runtime :ref:`atomicity - // ` for further details on how reloads are - // treated. - string symlink_root = 1; - - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - string subdirectory = 3; - - // :ref:`Append ` the - // service cluster to the path under symlink root. - bool append_service_cluster = 2; - } - - // :ref:`Admin console runtime ` layer. - message AdminLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.RuntimeLayer.AdminLayer"; - } - - // :ref:`Runtime Discovery Service (RTDS) ` layer. - message RtdsLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer"; - - // Resource to subscribe to at *rtds_config* for the RTDS layer. - string name = 1; - - // RTDS configuration source. - core.v4alpha.ConfigSource rtds_config = 2; - } - - // Descriptive name for the runtime layer. This is only used for the runtime - // :http:get:`/runtime` output. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof layer_specifier { - option (validate.required) = true; - - // :ref:`Static runtime ` layer. - // This follows the :ref:`runtime protobuf JSON representation encoding - // `. Unlike static xDS resources, this static - // layer is overridable by later layers in the runtime virtual filesystem. - google.protobuf.Struct static_layer = 2; - - DiskLayer disk_layer = 3; - - AdminLayer admin_layer = 4; - - RtdsLayer rtds_layer = 5; - } -} - -// Runtime :ref:`configuration overview `. -message LayeredRuntime { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v3.LayeredRuntime"; - - // The :ref:`layers ` of the runtime. This is ordered - // such that later layers in the list overlay earlier entries. - repeated RuntimeLayer layers = 1; -} diff --git a/api/envoy/config/cluster/aggregate/v2alpha/cluster.proto b/api/envoy/config/cluster/aggregate/v2alpha/cluster.proto index a0fdadd757..3a6506eb8d 100644 --- a/api/envoy/config/cluster/aggregate/v2alpha/cluster.proto +++ b/api/envoy/config/cluster/aggregate/v2alpha/cluster.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.cluster.aggregate.v2alpha"; option java_outer_classname = "ClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/aggregate/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.clusters.aggregate.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto b/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto index 33f5ffe057..fb3fc8338e 100644 --- a/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto +++ b/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.cluster.dynamic_forward_proxy.v2alpha"; option java_outer_classname = "ClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/dynamic_forward_proxy/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.clusters.dynamic_forward_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/cluster/redis/redis_cluster.proto b/api/envoy/config/cluster/redis/redis_cluster.proto index abe88f76a6..78baa83371 100644 --- a/api/envoy/config/cluster/redis/redis_cluster.proto +++ b/api/envoy/config/cluster/redis/redis_cluster.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.cluster.redis"; option java_outer_classname = "RedisClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/redis"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Redis Cluster Configuration] diff --git a/api/envoy/config/cluster/v3/circuit_breaker.proto b/api/envoy/config/cluster/v3/circuit_breaker.proto index 96e69701cd..fe798ceb09 100644 --- a/api/envoy/config/cluster/v3/circuit_breaker.proto +++ b/api/envoy/config/cluster/v3/circuit_breaker.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.cluster.v3"; option java_outer_classname = "CircuitBreakerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Circuit breakers] @@ -25,7 +26,7 @@ message CircuitBreakers { "envoy.api.v2.cluster.CircuitBreakers"; // A Thresholds defines CircuitBreaker settings for a - // :ref:`RoutingPriority`. + // :ref:`RoutingPriority`. // [#next-free-field: 9] message Thresholds { option (udpa.annotations.versioning).previous_message_type = @@ -49,7 +50,7 @@ message CircuitBreakers { google.protobuf.UInt32Value min_retry_concurrency = 2; } - // The :ref:`RoutingPriority` + // The :ref:`RoutingPriority` // the specified CircuitBreaker settings apply to. core.v3.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}]; @@ -59,10 +60,12 @@ message CircuitBreakers { // The maximum number of pending requests that Envoy will allow to the // upstream cluster. If not specified, the default is 1024. + // This limit is applied as a connection limit for non-HTTP traffic. google.protobuf.UInt32Value max_pending_requests = 3; // The maximum number of parallel requests that Envoy will make to the // upstream cluster. If not specified, the default is 1024. + // This limit does not apply to non-HTTP traffic. google.protobuf.UInt32Value max_requests = 4; // The maximum number of parallel retries that Envoy will allow to the @@ -96,10 +99,23 @@ message CircuitBreakers { google.protobuf.UInt32Value max_connection_pools = 7; } - // If multiple :ref:`Thresholds` - // are defined with the same :ref:`RoutingPriority`, + // 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 + // :ref:`RoutingPriority`, the default values // are used. repeated Thresholds thresholds = 1; + + // Optional per-host limits which apply to each individual host in a cluster. + // + // .. note:: + // currently only the :ref:`max_connections + // ` field is supported for per-host limits. + // + // If multiple per-host :ref:`Thresholds` + // are defined with the same :ref:`RoutingPriority`, + // the first one in the list is used. If no per-host Thresholds are defined for a given + // :ref:`RoutingPriority`, + // the cluster will not have per-host limits. + repeated Thresholds per_host_thresholds = 2; } diff --git a/api/envoy/config/cluster/v3/cluster.proto b/api/envoy/config/cluster/v3/cluster.proto index f4e3386cfa..84bab4673b 100644 --- a/api/envoy/config/cluster/v3/cluster.proto +++ b/api/envoy/config/cluster/v3/cluster.proto @@ -11,6 +11,7 @@ import "envoy/config/core/v3/config_source.proto"; import "envoy/config/core/v3/extension.proto"; import "envoy/config/core/v3/health_check.proto"; import "envoy/config/core/v3/protocol.proto"; +import "envoy/config/core/v3/resolver.proto"; import "envoy/config/endpoint/v3/endpoint.proto"; import "envoy/type/v3/percent.proto"; @@ -31,6 +32,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.cluster.v3"; option java_outer_classname = "ClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Cluster configuration] @@ -42,7 +44,7 @@ message ClusterCollection { } // Configuration for a single upstream cluster. -// [#next-free-field: 53] +// [#next-free-field: 57] message Cluster { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster"; @@ -109,11 +111,11 @@ message Cluster { // this option or not. CLUSTER_PROVIDED = 6; - // [#not-implemented-hide:] Use the new :ref:`load_balancing_policy - // ` field to determine the LB policy. - // [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field - // and instead using the new load_balancing_policy field as the one and only mechanism for - // configuring this.] + // Use the new :ref:`load_balancing_policy + // ` field to determine the LB policy. + // This has been deprecated in favor of using the :ref:`load_balancing_policy + // ` field without + // setting any value in :ref:`lb_policy`. LOAD_BALANCING_POLICY_CONFIG = 7; } @@ -122,20 +124,33 @@ message Cluster { // 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. + // This is semantically equivalent to a non-existent V6_PREFERRED option. + // AUTO is a legacy name that is more opaque than + // necessary and will be deprecated in favor of V6_PREFERRED in a future major version of the API. + // If V4_PREFERRED is specified, the DNS resolver will first perform a lookup for addresses in the + // IPv4 family and fallback to a lookup for addresses in the IPv6 family. i.e., the callback + // target will only get v6 addresses if there were NO v4 addresses to return. + // If ALL is specified, the DNS resolver will perform a lookup for both IPv4 and IPv6 families, + // and return all resolved addresses. When this is used, Happy Eyeballs will be enabled for + // upstream connections. Refer to :ref:`Happy Eyeballs Support ` + // for more information. // For cluster types other than - // :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS`, + // :ref:`STRICT_DNS` and + // :ref:`LOGICAL_DNS`, // this setting is // ignored. + // [#next-major-version: deprecate AUTO in favor of a V6_PREFERRED option.] enum DnsLookupFamily { AUTO = 0; V4_ONLY = 1; V6_ONLY = 2; + V4_PREFERRED = 3; + ALL = 4; } enum ClusterProtocolSelection { // Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2). - // If :ref:`http2_protocol_options ` are + // If :ref:`http2_protocol_options ` are // present, HTTP2 will be used, otherwise HTTP1.1 will be used. USE_CONFIGURED_PROTOCOL = 0; @@ -160,6 +175,7 @@ message Cluster { google.protobuf.Struct match = 2; // The configuration of the transport socket. + // [#extension-category: envoy.transport_sockets.upstream] core.v3.TransportSocket transport_socket = 3; } @@ -173,6 +189,7 @@ message Cluster { // Cluster specific configuration which depends on the cluster being instantiated. // See the supported cluster for further documentation. + // [#extension-category: envoy.clusters] google.protobuf.Any typed_config = 2; } @@ -231,7 +248,7 @@ message Cluster { // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata // keys reduced to - // :ref:`fallback_keys_subset`. + // :ref:`fallback_keys_subset`. // It allows for a fallback to a different, less specific selector if some of the keys of // the selector are considered optional. KEYS_SUBSET = 4; @@ -260,30 +277,30 @@ message Cluster { [(validate.rules).enum = {defined_only: true}]; // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` + // :ref:`keys` used by + // :ref:`KEYS_SUBSET` // fallback policy. // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. // For any other fallback policy the parameter is not used and should not be set. // Only values also present in - // :ref:`keys` are allowed, but + // :ref:`keys` are allowed, but // `fallback_keys_subset` cannot be equal to `keys`. repeated string fallback_keys_subset = 3; } // The behavior used when no endpoint subset matches the selected route's // metadata. The value defaults to - // :ref:`NO_FALLBACK`. + // :ref:`NO_FALLBACK`. LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}]; // Specifies the default subset of endpoints used during fallback if // fallback_policy is - // :ref:`DEFAULT_SUBSET`. + // :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`. + // :ref:`NO_FALLBACK`. google.protobuf.Struct default_subset = 2; // For each entry, LbEndpoint.Metadata's @@ -334,6 +351,40 @@ message Cluster { bool list_as_any = 7; } + // Configuration for :ref:`slow start mode `. + message SlowStartConfig { + // Represents the size of slow start window. + // If set, the newly created host remains in slow start mode starting from its creation time + // for the duration of slow start window. + google.protobuf.Duration slow_start_window = 1; + + // This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0, + // so that endpoint would get linearly increasing amount of traffic. + // When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly. + // The value of aggression parameter should be greater than 0.0. + // By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. + // + // During slow start window, effective weight of an endpoint would be scaled with time factor and aggression: + // `new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))`, + // where `time_factor=(time_since_start_seconds / slow_start_time_seconds)`. + // + // As time progresses, more and more traffic would be sent to endpoint, which is in slow start window. + // Once host exits slow start, time_factor and aggression no longer affect its weight. + core.v3.RuntimeDouble aggression = 2; + + // Configures the minimum percentage of origin weight that avoids too small new weight, + // which may cause endpoints in slow start mode receive no traffic in slow start window. + // If not specified, the default is 10%. + type.v3.Percent min_weight_percent = 3; + } + + // Specific configuration for the RoundRobin load balancing policy. + message RoundRobinLbConfig { + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + SlowStartConfig slow_start_config = 1; + } + // Specific configuration for the LeastRequest load balancing policy. message LeastRequestLbConfig { option (udpa.annotations.versioning).previous_message_type = @@ -367,6 +418,10 @@ message Cluster { // .. note:: // This setting only takes effect if all host weights are not equal. core.v3.RuntimeDouble active_request_bias = 2; + + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + SlowStartConfig slow_start_config = 3; } // Specific configuration for the :ref:`RingHash` @@ -391,16 +446,16 @@ message Cluster { // 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`. + // :ref:`maximum_ring_size`. google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}]; // The hash function used to hash hosts onto the ketama ring. The value defaults to - // :ref:`XX_HASH`. + // :ref:`XX_HASH`. HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}]; // 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`. + // :ref:`minimum_ring_size`. google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}]; } @@ -410,8 +465,8 @@ message Cluster { // The table size for Maglev hashing. The Maglev aims for ‘minimal disruption’ rather than an absolute guarantee. // Minimal disruption means that when the set of upstreams changes, a connection will likely be sent to the same // upstream as it was before. Increasing the table size reduces the amount of disruption. - // The table size must be prime number. If it is not specified, the default is 65537. - google.protobuf.UInt64Value table_size = 1; + // The table size must be prime number limited to 5000011. If it is not specified, the default is 65537. + google.protobuf.UInt64Value table_size = 1 [(validate.rules).uint64 = {lte: 5000011}]; } // Specific configuration for the @@ -421,9 +476,8 @@ message Cluster { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster.OriginalDstLbConfig"; - // When true, :ref:`x-envoy-original-dst-host - // ` can be used to override destination - // address. + // When true, a HTTP header can be used to override the original dst address. The default header is + // :ref:`x-envoy-original-dst-host `. // // .. attention:: // @@ -435,10 +489,14 @@ message Cluster { // // If the header appears multiple times only the first value is used. bool use_http_header = 1; + + // The http header to override destination address if :ref:`use_http_header `. + // is set to true. If the value is empty, :ref:`x-envoy-original-dst-host ` will be used. + string http_header_name = 2; } // Common configuration for all load balancer implementations. - // [#next-free-field: 8] + // [#next-free-field: 9] message CommonLbConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster.CommonLbConfig"; @@ -536,25 +594,9 @@ message Cluster { // https://github.com/envoyproxy/envoy/pull/3941. google.protobuf.Duration update_merge_window = 4; - // If set to true, Envoy will not consider new hosts when computing load balancing weights until - // they have been health checked for the first time. This will have no effect unless - // active health checking is also configured. - // - // Ignoring a host means that for any load balancing calculations that adjust weights based - // on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and - // panic mode) Envoy will exclude these hosts in the denominator. - // - // For example, with hosts in two priorities P0 and P1, where P0 looks like - // {healthy, unhealthy (new), unhealthy (new)} - // and where P1 looks like - // {healthy, healthy} - // all traffic will still hit P0, as 1 / (3 - 2) = 1. - // - // Enabling this will allow scaling up the number of hosts for a given cluster without entering - // panic mode or triggering priority spillover, assuming the hosts pass the first health check. - // - // If panic mode is triggered, new hosts are still eligible for traffic; they simply do not - // contribute to the calculation when deciding whether panic mode is enabled or not. + // If set to true, Envoy will :ref:`exclude ` new hosts + // when computing load balancing weights until they have been health checked for the first time. + // This will have no effect unless active health checking is also configured. bool ignore_new_hosts_until_first_hc = 5; // If set to `true`, the cluster manager will drain all existing @@ -563,6 +605,14 @@ message Cluster { // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) ConsistentHashingLbConfig consistent_hashing_lb_config = 7; + + // This controls what hosts are considered valid when using + // :ref:`host overrides `, which is used by some + // filters to modify the load balancing decision. + // + // If this is unset then [UNKNOWN, HEALTHY, DEGRADED] will be applied by default. If this is + // set with an empty set of statuses then host overrides will be ignored by the load balancing. + core.v3.HealthStatusSet override_host_status = 8; } message RefreshRate { @@ -570,7 +620,7 @@ message Cluster { // Specifies the base interval between refreshes. This parameter is required and must be greater // than zero and less than - // :ref:`max_interval `. + // :ref:`max_interval `. google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { required: true gt {nanos: 1000000} @@ -578,16 +628,15 @@ message Cluster { // Specifies the maximum interval between refreshes. This parameter is optional, but must be // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. + // :ref:`base_interval ` if set. The default + // is 10 times the :ref:`base_interval `. google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}]; } - // [#not-implemented-hide:] message PreconnectPolicy { // Indicates how many streams (rounded up) can be anticipated per-upstream for each // incoming stream. This is useful for high-QPS or latency-sensitive services. Preconnecting - // will only be done if the upstream is healthy. + // will only be done if the upstream is healthy and the cluster has traffic. // // For example if this is 2, for an incoming HTTP/1.1 stream, 2 connections will be // established, one for the new incoming stream, and one for a presumed follow-up stream. For @@ -605,8 +654,7 @@ message Cluster { // // If this value is not set, or set explicitly to one, Envoy will fetch as many connections // as needed to serve streams in flight. This means in steady state if a connection is torn down, - // a subsequent streams will pay an upstream-rtt latency penalty waiting for streams to be - // preconnected. + // a subsequent streams will pay an upstream-rtt latency penalty waiting for a new connection. // // This is limited somewhat arbitrarily to 3 because preconnecting too aggressively can // harm latency more than the preconnecting helps. @@ -616,24 +664,25 @@ message Cluster { // Indicates how many many streams (rounded up) can be anticipated across a cluster for each // stream, useful for low QPS services. This is currently supported for a subset of // deterministic non-hash-based load-balancing algorithms (weighted round robin, random). - // Unlike per_upstream_preconnect_ratio this preconnects across the upstream instances in a + // Unlike *per_upstream_preconnect_ratio* this preconnects across the upstream instances in a // cluster, doing best effort predictions of what upstream would be picked next and // pre-establishing a connection. // + // Preconnecting will be limited to one preconnect per configured upstream in the cluster and will + // only be done if there are healthy upstreams and the cluster has traffic. + // // For example if preconnecting is set to 2 for a round robin HTTP/2 cluster, on the first // incoming stream, 2 connections will be preconnected - one to the first upstream for this // cluster, one to the second on the assumption there will be a follow-up stream. // - // Preconnecting will be limited to one preconnect per configured upstream in the cluster. - // // If this value is not set, or set explicitly to one, Envoy will fetch as many connections // as needed to serve streams in flight, so during warm up and in steady state if a connection // is closed (and per_upstream_preconnect_ratio is not set), there will be a latency hit for // connection establishment. // // If both this and preconnect_ratio are set, Envoy will make sure both predicted needs are met, - // basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each upstream. - // TODO(alyssawilk) per LB docs and LB overview docs when unhiding. + // basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each + // upstream. google.protobuf.DoubleValue predictive_preconnect_ratio = 2 [(validate.rules).double = {lte: 3.0 gte: 1.0}]; } @@ -644,9 +693,9 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first - // :ref:`match ` is used. + // :ref:`match ` is used. // For example, with the following match // // .. code-block:: yaml @@ -666,7 +715,7 @@ message Cluster { // Connections to the endpoints whose metadata value under *envoy.transport_socket_match* // having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. // - // If a :ref:`socket match ` with empty match + // If a :ref:`socket match ` with empty match // criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" // socket match in case above. // @@ -688,7 +737,7 @@ message Cluster { // // This field can be used to specify custom transport socket configurations for health // checks by adding matching key/value pairs in a health check's - // :ref:`transport socket match criteria ` field. + // :ref:`transport socket match criteria ` field. // // [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] repeated TransportSocketMatch transport_socket_matches = 43; @@ -696,15 +745,18 @@ message Cluster { // 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. + // ` is not provided. // Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. string name = 1 [(validate.rules).string = {min_len: 1}]; - // 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 - // `. - string alt_stat_name = 28; + // An optional alternative to the cluster name to be used for observability. This name is used + // emitting stats for the cluster and access logging the cluster name. This will appear as + // additional information in configuration dumps of a cluster's current status as + // :ref:`observability_name ` + // and as an additional tag "upstream_cluster.name" while tracing. Note: Any ``:`` in the name + // will be converted to ``_`` when emitting statistics. This should not be confused with + // :ref:`Router Filter Header `. + string alt_stat_name = 28 [(udpa.annotations.field_migrate).rename = "observability_name"]; oneof cluster_discovery_type { // The :ref:`service discovery type ` @@ -719,6 +771,7 @@ message Cluster { EdsClusterConfig eds_cluster_config = 3; // The timeout for new network connections to hosts in the cluster. + // If not set, a default value of 5s will be used. google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}]; // Soft limit on size of the cluster’s connections read and write buffers. If @@ -728,19 +781,18 @@ message Cluster { // The :ref:`load balancer type ` to use // when picking a host in the cluster. - // [#comment:TODO: Remove enum constraint :ref:`LOAD_BALANCING_POLICY_CONFIG` when implemented.] - LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true not_in: 7}]; + LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true}]; // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. + // :ref:`STATIC`, + // :ref:`STRICT_DNS` + // or :ref:`LOGICAL_DNS` clusters. // This field supersedes the *hosts* field in the v2 API. // // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // endpoint.v3.ClusterLoadAssignment load_assignment = 33; @@ -754,7 +806,11 @@ message Cluster { // 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. - google.protobuf.UInt32Value max_requests_per_connection = 9; + // + // .. attention:: + // This field has been deprecated in favor of the :ref:`max_requests_per_connection ` field. + google.protobuf.UInt32Value max_requests_per_connection = 9 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Optional :ref:`circuit breaking ` for the cluster. CircuitBreakers circuit_breakers = 10; @@ -762,36 +818,39 @@ message Cluster { // HTTP protocol options that are applied only to upstream HTTP connections. // These options apply to all HTTP versions. // This has been deprecated in favor of - // :ref:`upstream_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. + // :ref:`upstream_http_protocol_options ` + // in the :ref:`http_protocol_options ` message. // upstream_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. - core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 46 [deprecated = true]; + core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 46 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Additional options when handling HTTP requests upstream. These options will be applicable to // both HTTP1 and HTTP2 requests. // This has been deprecated in favor of - // :ref:`common_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. + // :ref:`common_http_protocol_options ` + // in the :ref:`http_protocol_options ` message. // common_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. - core.v3.HttpProtocolOptions common_http_protocol_options = 29 [deprecated = true]; + core.v3.HttpProtocolOptions common_http_protocol_options = 29 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Additional options when handling HTTP1 requests. - // This has been deprecated in favor of http_protocol_options fields in the in the - // :ref:`http_protocol_options ` message. + // This has been deprecated in favor of http_protocol_options fields in the + // :ref:`http_protocol_options ` message. // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. - core.v3.Http1ProtocolOptions http_protocol_options = 13 [deprecated = true]; + core.v3.Http1ProtocolOptions http_protocol_options = 13 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // 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 @@ -799,15 +858,18 @@ message Cluster { // 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. - // This has been deprecated in favor of http2_protocol_options fields in the in the - // :ref:`http_protocol_options ` + // This has been deprecated in favor of http2_protocol_options fields in the + // :ref:`http_protocol_options ` // message. http2_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. - core.v3.Http2ProtocolOptions http2_protocol_options = 14 - [deprecated = true, (udpa.annotations.security).configure_for_untrusted_upstream = true]; + core.v3.Http2ProtocolOptions http2_protocol_options = 14 [ + deprecated = true, + (udpa.annotations.security).configure_for_untrusted_upstream = true, + (envoy.annotations.deprecated_at_minor_version) = "3.0" + ]; // 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 @@ -817,24 +879,24 @@ message Cluster { map typed_extension_protocol_options = 36; // If the DNS refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, + // :ref:`STRICT_DNS`, + // or :ref:`LOGICAL_DNS`, // this value is used as the cluster’s DNS refresh // rate. The value configured must be at least 1ms. If this setting is not specified, the // value defaults to 5000ms. For cluster types other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` + // :ref:`STRICT_DNS` + // and :ref:`LOGICAL_DNS` // this setting is ignored. google.protobuf.Duration dns_refresh_rate = 16 [(validate.rules).duration = {gt {nanos: 1000000}}]; // If the DNS failure refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, + // :ref:`STRICT_DNS`, + // or :ref:`LOGICAL_DNS`, // this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is // not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types - // other than :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS` this setting is + // other than :ref:`STRICT_DNS` and + // :ref:`LOGICAL_DNS` this setting is // ignored. RefreshRate dns_failure_refresh_rate = 44; @@ -845,30 +907,55 @@ message Cluster { // The DNS IP address resolution policy. If this setting is not specified, the // value defaults to - // :ref:`AUTO`. + // :ref:`AUTO`. DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}]; // If DNS resolvers are specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, + // :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` + // :ref:`STRICT_DNS` + // and :ref:`LOGICAL_DNS` // this setting is ignored. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple's API only allows overriding DNS resolvers via system settings. - repeated core.v3.Address dns_resolvers = 18; + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + repeated core.v3.Address dns_resolvers = 18 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - // [#next-major-version: Reconcile DNS options in a single message.] // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - bool use_tcp_for_dns_lookups = 45; + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + bool use_tcp_for_dns_lookups = 45 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + core.v3.DnsResolutionConfig dns_resolution_config = 53 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + core.v3.TypedExtensionConfig typed_dns_resolver_config = 55; + + // Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for + // :ref:`STRICT_DNS`, + // or :ref:`LOGICAL_DNS`. + // If true, cluster readiness blocks on warm-up. If false, the cluster will complete + // initialization whether or not warm-up has completed. Defaults to true. + google.protobuf.BoolValue wait_for_warm_on_init = 54; // If specified, outlier detection will be enabled for this upstream cluster. // Each of the configuration values can be overridden via @@ -876,7 +963,7 @@ message Cluster { OutlierDetection outlier_detection = 19; // The interval for removing stale hosts from a cluster type - // :ref:`ORIGINAL_DST`. + // :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 @@ -886,7 +973,7 @@ message Cluster { // 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` + // :ref:`ORIGINAL_DST` // this setting is ignored. google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}]; @@ -900,9 +987,9 @@ message Cluster { // Optional configuration for the load balancing algorithm selected by // LbPolicy. Currently only - // :ref:`RING_HASH`, - // :ref:`MAGLEV` and - // :ref:`LEAST_REQUEST` + // :ref:`RING_HASH`, + // :ref:`MAGLEV` and + // :ref:`LEAST_REQUEST` // has additional configuration options. // Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding // LbPolicy will generate an error at runtime. @@ -918,14 +1005,17 @@ message Cluster { // Optional configuration for the LeastRequest load balancing policy. LeastRequestLbConfig least_request_lb_config = 37; + + // Optional configuration for the RoundRobin load balancing policy. + RoundRobinLbConfig round_robin_lb_config = 56; } // Common configuration for all load balancer implementations. CommonLbConfig common_lb_config = 27; // Optional custom transport socket implementation to use for upstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`UpstreamTlsContexts ` in the `typed_config`. + // To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and + // :ref:`UpstreamTlsContexts ` in the `typed_config`. // If no transport socket configuration is specified, new connections // will be set up with plaintext. core.v3.TransportSocket transport_socket = 24; @@ -940,10 +1030,11 @@ message Cluster { // Determines how Envoy selects the protocol used to speak to upstream hosts. // This has been deprecated in favor of setting explicit protocol selection // in the :ref:`http_protocol_options - // ` message. + // ` message. // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - ClusterProtocolSelection protocol_selection = 26 [deprecated = true]; + // :ref:`extension_protocol_options`. + ClusterProtocolSelection protocol_selection = 26 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Optional options for upstream connections. UpstreamConnectionOptions upstream_connection_options = 30; @@ -973,9 +1064,8 @@ message Cluster { // servers of this cluster. repeated Filter filters = 40; - // [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the - // :ref:`lb_policy` field has the value - // :ref:`LOAD_BALANCING_POLICY_CONFIG`. + // If this field is set and is supported by the client, it will supersede the value of + // :ref:`lb_policy`. LoadBalancingPolicy load_balancing_policy = 41; // [#not-implemented-hide:] @@ -1003,8 +1093,9 @@ message Cluster { // .. attention:: // // This field has been deprecated in favor of `timeout_budgets`, part of - // :ref:`track_cluster_stats `. - bool track_timeout_budgets = 47 [deprecated = true]; + // :ref:`track_cluster_stats `. + bool track_timeout_budgets = 47 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Optional customization and configuration of upstream connection pool, and upstream type. // @@ -1023,12 +1114,12 @@ message Cluster { // If users desire custom connection pool or upstream behavior, for example terminating // CONNECT only if a custom filter indicates it is appropriate, the custom factories // can be registered and configured here. + // [#extension-category: envoy.upstreams] core.v3.TypedExtensionConfig upstream_config = 48; // Configuration to track optional cluster stats. TrackClusterStats track_cluster_stats = 49; - // [#not-implemented-hide:] // Preconnect configuration for this cluster. PreconnectPolicy preconnect_policy = 50; @@ -1037,7 +1128,7 @@ message Cluster { bool connection_pool_per_downstream_connection = 51; } -// [#not-implemented-hide:] Extensible load balancing policy configuration. +// Extensible load balancing policy configuration. // // Every LB policy defined via this mechanism will be identified via a unique name using reverse // DNS notation. If the policy needs configuration parameters, it must define a message for its @@ -1063,14 +1154,11 @@ message LoadBalancingPolicy { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.LoadBalancingPolicy.Policy"; - reserved 2; - - reserved "config"; + reserved 2, 1, 3; - // Required. The name of the LB policy. - string name = 1; + reserved "config", "name", "typed_config"; - google.protobuf.Any typed_config = 3; + core.v3.TypedExtensionConfig typed_extension_config = 4; } // Each client will iterate over the list in order and stop at the first policy that it @@ -1094,6 +1182,11 @@ message UpstreamConnectionOptions { // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. core.v3.TcpKeepalive tcp_keepalive = 1; + + // If enabled, associates the interface name of the local address with the upstream connection. + // This can be used by extensions during processing of requests. The association mechanism is + // implementation specific. Defaults to false due to performance concerns. + bool set_local_interface_name_on_upstream_connections = 2; } message TrackClusterStats { diff --git a/api/envoy/config/cluster/v3/filter.proto b/api/envoy/config/cluster/v3/filter.proto index 74f4a1137d..c6b8722b92 100644 --- a/api/envoy/config/cluster/v3/filter.proto +++ b/api/envoy/config/cluster/v3/filter.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.cluster.v3"; option java_outer_classname = "FilterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Upstream filters] @@ -19,11 +20,12 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; message Filter { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.cluster.Filter"; - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. + // The name of the filter configuration. string name = 1 [(validate.rules).string = {min_len: 1}]; // Filter specific configuration which depends on the filter being // instantiated. See the supported filters for further documentation. + // Note that Envoy's :ref:`downstream network + // filters ` are not valid upstream filters. google.protobuf.Any typed_config = 2; } diff --git a/api/envoy/config/cluster/v3/outlier_detection.proto b/api/envoy/config/cluster/v3/outlier_detection.proto index e69b446918..8543886314 100644 --- a/api/envoy/config/cluster/v3/outlier_detection.proto +++ b/api/envoy/config/cluster/v3/outlier_detection.proto @@ -12,13 +12,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.cluster.v3"; option java_outer_classname = "OutlierDetectionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Outlier detection] // See the :ref:`architecture overview ` for // more information on outlier detection. -// [#next-free-field: 22] +// [#next-free-field: 23] message OutlierDetection { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.cluster.OutlierDetection"; @@ -35,7 +36,7 @@ message OutlierDetection { // The base time that a host is ejected for. The real time is equal to the // base time multiplied by the number of times the host has been ejected and is - // capped by :ref:`max_ejection_time`. + // capped by :ref:`max_ejection_time`. // Defaults to 30000ms or 30s. google.protobuf.Duration base_ejection_time = 3 [(validate.rules).duration = {gt {}}]; @@ -87,16 +88,16 @@ message OutlierDetection { // Determines whether to distinguish local origin failures from external errors. If set to true // the following configuration parameters are taken into account: - // :ref:`consecutive_local_origin_failure`, - // :ref:`enforcing_consecutive_local_origin_failure` + // :ref:`consecutive_local_origin_failure`, + // :ref:`enforcing_consecutive_local_origin_failure` // and - // :ref:`enforcing_local_origin_success_rate`. + // :ref:`enforcing_local_origin_success_rate`. // Defaults to false. bool split_external_local_origin_errors = 12; // The number of consecutive locally originated failures before ejection // occurs. Defaults to 5. Parameter takes effect only when - // :ref:`split_external_local_origin_errors` + // :ref:`split_external_local_origin_errors` // is set to true. google.protobuf.UInt32Value consecutive_local_origin_failure = 13; @@ -104,7 +105,7 @@ message OutlierDetection { // is detected through consecutive locally originated failures. This setting can be // used to disable ejection or to ramp it up slowly. Defaults to 100. // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` + // :ref:`split_external_local_origin_errors` // is set to true. google.protobuf.UInt32Value enforcing_consecutive_local_origin_failure = 14 [(validate.rules).uint32 = {lte: 100}]; @@ -113,7 +114,7 @@ message OutlierDetection { // is detected through success rate statistics for locally originated errors. // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` + // :ref:`split_external_local_origin_errors` // is set to true. google.protobuf.UInt32Value enforcing_local_origin_success_rate = 15 [(validate.rules).uint32 = {lte: 100}]; @@ -150,8 +151,14 @@ message OutlierDetection { // this host. Defaults to 50. google.protobuf.UInt32Value failure_percentage_request_volume = 20; - // The maximum time that a host is ejected for. See :ref:`base_ejection_time` + // The maximum time that a host is ejected for. See :ref:`base_ejection_time` // for more information. If not specified, the default value (300000ms or 300s) or - // :ref:`base_ejection_time` value is applied, whatever is larger. + // :ref:`base_ejection_time` value is applied, whatever is larger. google.protobuf.Duration max_ejection_time = 21 [(validate.rules).duration = {gt {}}]; + + // The maximum amount of jitter to add to the ejection time, in order to prevent + // a 'thundering herd' effect where all proxies try to reconnect to host at the same time. + // See :ref:`max_ejection_time_jitter` + // Defaults to 0s. + google.protobuf.Duration max_ejection_time_jitter = 22; } diff --git a/api/envoy/config/cluster/v4alpha/circuit_breaker.proto b/api/envoy/config/cluster/v4alpha/circuit_breaker.proto deleted file mode 100644 index 57a263a70d..0000000000 --- a/api/envoy/config/cluster/v4alpha/circuit_breaker.proto +++ /dev/null @@ -1,105 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v4alpha"; -option java_outer_classname = "CircuitBreakerProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Circuit breakers] - -// :ref:`Circuit breaking` settings can be -// specified individually for each defined priority. -message CircuitBreakers { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.CircuitBreakers"; - - // A Thresholds defines CircuitBreaker settings for a - // :ref:`RoutingPriority`. - // [#next-free-field: 9] - message Thresholds { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.CircuitBreakers.Thresholds"; - - message RetryBudget { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget"; - - // Specifies the limit on concurrent retries as a percentage of the sum of active requests and - // active pending requests. For example, if there are 100 active requests and the - // budget_percent is set to 25, there may be 25 active retries. - // - // This parameter is optional. Defaults to 20%. - type.v3.Percent budget_percent = 1; - - // Specifies the minimum retry concurrency allowed for the retry budget. The limit on the - // number of active retries may never go below this number. - // - // This parameter is optional. Defaults to 3. - google.protobuf.UInt32Value min_retry_concurrency = 2; - } - - // The :ref:`RoutingPriority` - // the specified CircuitBreaker settings apply to. - core.v4alpha.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}]; - - // The maximum number of connections that Envoy will make to the upstream - // cluster. If not specified, the default is 1024. - google.protobuf.UInt32Value max_connections = 2; - - // The maximum number of pending requests that Envoy will allow to the - // upstream cluster. If not specified, the default is 1024. - google.protobuf.UInt32Value max_pending_requests = 3; - - // The maximum number of parallel requests that Envoy will make to the - // upstream cluster. If not specified, the default is 1024. - google.protobuf.UInt32Value max_requests = 4; - - // The maximum number of parallel retries that Envoy will allow to the - // upstream cluster. If not specified, the default is 3. - google.protobuf.UInt32Value max_retries = 5; - - // Specifies a limit on concurrent retries in relation to the number of active requests. This - // parameter is optional. - // - // .. note:: - // - // If this field is set, the retry budget will override any configured retry circuit - // breaker. - RetryBudget retry_budget = 8; - - // 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. - // - // .. note:: - // - // If a retry budget is used in lieu of the max_retries circuit breaker, - // the remaining retry resources remaining will not be tracked. - bool track_remaining = 6; - - // 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. - google.protobuf.UInt32Value max_connection_pools = 7; - } - - // 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. - repeated Thresholds thresholds = 1; -} diff --git a/api/envoy/config/cluster/v4alpha/cluster.proto b/api/envoy/config/cluster/v4alpha/cluster.proto deleted file mode 100644 index 8b30ab23f2..0000000000 --- a/api/envoy/config/cluster/v4alpha/cluster.proto +++ /dev/null @@ -1,1056 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v4alpha; - -import "envoy/config/cluster/v4alpha/circuit_breaker.proto"; -import "envoy/config/cluster/v4alpha/filter.proto"; -import "envoy/config/cluster/v4alpha/outlier_detection.proto"; -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/extension.proto"; -import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/collection_entry.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v4alpha"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Cluster configuration] - -// Cluster list collections. Entries are *Cluster* resources or references. -// [#not-implemented-hide:] -message ClusterCollection { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.ClusterCollection"; - - xds.core.v3.CollectionEntry entries = 1; -} - -// Configuration for a single upstream cluster. -// [#next-free-field: 53] -message Cluster { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.cluster.v3.Cluster"; - - // Refer to :ref:`service discovery type ` - // for an explanation on each type. - enum DiscoveryType { - // Refer to the :ref:`static discovery type` - // for an explanation. - STATIC = 0; - - // Refer to the :ref:`strict DNS discovery - // type` - // for an explanation. - STRICT_DNS = 1; - - // Refer to the :ref:`logical DNS discovery - // type` - // for an explanation. - LOGICAL_DNS = 2; - - // Refer to the :ref:`service discovery type` - // for an explanation. - EDS = 3; - - // Refer to the :ref:`original destination discovery - // type` - // for an explanation. - ORIGINAL_DST = 4; - } - - // Refer to :ref:`load balancer type ` architecture - // overview section for information on each type. - enum LbPolicy { - reserved 4; - - reserved "ORIGINAL_DST_LB"; - - // Refer to the :ref:`round robin load balancing - // policy` - // for an explanation. - ROUND_ROBIN = 0; - - // Refer to the :ref:`least request load balancing - // policy` - // for an explanation. - LEAST_REQUEST = 1; - - // Refer to the :ref:`ring hash load balancing - // policy` - // for an explanation. - RING_HASH = 2; - - // Refer to the :ref:`random load balancing - // policy` - // for an explanation. - RANDOM = 3; - - // Refer to the :ref:`Maglev load balancing policy` - // for an explanation. - MAGLEV = 5; - - // This load balancer type must be specified if the configured cluster provides a cluster - // specific load balancer. Consult the configured cluster's documentation for whether to set - // this option or not. - CLUSTER_PROVIDED = 6; - - // [#not-implemented-hide:] Use the new :ref:`load_balancing_policy - // ` field to determine the LB policy. - // [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field - // and instead using the new load_balancing_policy field as the one and only mechanism for - // configuring this.] - LOAD_BALANCING_POLICY_CONFIG = 7; - } - - // 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. - enum DnsLookupFamily { - AUTO = 0; - V4_ONLY = 1; - V6_ONLY = 2; - } - - enum ClusterProtocolSelection { - // 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. - USE_CONFIGURED_PROTOCOL = 0; - - // Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection. - USE_DOWNSTREAM_PROTOCOL = 1; - } - - // TransportSocketMatch specifies what transport socket config will be used - // when the match conditions are satisfied. - message TransportSocketMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.TransportSocketMatch"; - - // The name of the match, used in stats generation. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional endpoint metadata match criteria. - // The connection to the endpoint with metadata matching what is set in this field - // will use the transport socket configuration specified here. - // The endpoint's metadata entry in *envoy.transport_socket_match* is used to match - // against the values specified in this field. - google.protobuf.Struct match = 2; - - // The configuration of the transport socket. - core.v4alpha.TransportSocket transport_socket = 3; - } - - // Extended cluster type. - message CustomClusterType { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.CustomClusterType"; - - // The type of the cluster to instantiate. The name must match a supported cluster type. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Cluster specific configuration which depends on the cluster being instantiated. - // See the supported cluster for further documentation. - google.protobuf.Any typed_config = 2; - } - - // Only valid when discovery type is EDS. - message EdsClusterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.EdsClusterConfig"; - - // Configuration for the source of EDS updates for this Cluster. - core.v4alpha.ConfigSource eds_config = 1; - - // 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. This may be a xdstp:// URL. - string service_name = 2; - } - - // Optionally divide the endpoints in this cluster into subsets defined by - // endpoint metadata and selected by route and weighted cluster metadata. - // [#next-free-field: 8] - message LbSubsetConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.LbSubsetConfig"; - - // 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. - enum LbSubsetFallbackPolicy { - NO_FALLBACK = 0; - ANY_ENDPOINT = 1; - DEFAULT_SUBSET = 2; - } - - // Specifications for subsets. - message LbSubsetSelector { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector"; - - // Allows to override top level fallback policy per selector. - enum LbSubsetSelectorFallbackPolicy { - // If NOT_DEFINED top level config fallback policy is used instead. - NOT_DEFINED = 0; - - // If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. - NO_FALLBACK = 1; - - // If ANY_ENDPOINT is selected, any cluster endpoint may be returned - // (subject to policy, health checks, etc). - ANY_ENDPOINT = 2; - - // If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - DEFAULT_SUBSET = 3; - - // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata - // keys reduced to - // :ref:`fallback_keys_subset`. - // It allows for a fallback to a different, less specific selector if some of the keys of - // the selector are considered optional. - KEYS_SUBSET = 4; - } - - // List of keys to match with the weighted cluster metadata. - repeated string keys = 1; - - // Selects a mode of operation in which each subset has only one host. This mode uses the same rules for - // choosing a host, but updating hosts is faster, especially for large numbers of hosts. - // - // If a match is found to a host, that host will be used regardless of priority levels, unless the host is unhealthy. - // - // Currently, this mode is only supported if `subset_selectors` has only one entry, and `keys` contains - // only one entry. - // - // When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in `keys` - // will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge - // :ref:`lb_subsets_single_host_per_subset_duplicate` indicates how many duplicates are - // present in the current configuration. - bool single_host_per_subset = 4; - - // The behavior used when no endpoint subset matches the selected route's - // metadata. - LbSubsetSelectorFallbackPolicy fallback_policy = 2 - [(validate.rules).enum = {defined_only: true}]; - - // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` - // fallback policy. - // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. - // For any other fallback policy the parameter is not used and should not be set. - // Only values also present in - // :ref:`keys` are allowed, but - // `fallback_keys_subset` cannot be equal to `keys`. - repeated string fallback_keys_subset = 3; - } - - // The behavior used when no endpoint subset matches the selected route's - // metadata. The value defaults to - // :ref:`NO_FALLBACK`. - LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}]; - - // 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`. - google.protobuf.Struct default_subset = 2; - - // 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. - repeated LbSubsetSelector subset_selectors = 3; - - // 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. - bool locality_weight_aware = 4; - - // 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 disproportionately affected by the - // subset predicate. - bool scale_locality_weight = 5; - - // 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. - bool panic_mode_any = 6; - - // If true, metadata specified for a metadata key will be matched against the corresponding - // endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value - // and any of the elements in the list matches the criteria. - bool list_as_any = 7; - } - - // Specific configuration for the LeastRequest load balancing policy. - message LeastRequestLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.LeastRequestLbConfig"; - - // 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. - google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}]; - - // The following formula is used to calculate the dynamic weights when hosts have different load - // balancing weights: - // - // `weight = load_balancing_weight / (active_requests + 1)^active_request_bias` - // - // The larger the active request bias is, the more aggressively active requests will lower the - // effective weight when all host weights are not equal. - // - // `active_request_bias` must be greater than or equal to 0.0. - // - // When `active_request_bias == 0.0` the Least Request Load Balancer doesn't consider the number - // of active requests at the time it picks a host and behaves like the Round Robin Load - // Balancer. - // - // When `active_request_bias > 0.0` the Least Request Load Balancer scales the load balancing - // weight by the number of active requests at the time it does a pick. - // - // The value is cached for performance reasons and refreshed whenever one of the Load Balancer's - // host sets changes, e.g., whenever there is a host membership update or a host load balancing - // weight change. - // - // .. note:: - // This setting only takes effect if all host weights are not equal. - core.v4alpha.RuntimeDouble active_request_bias = 2; - } - - // Specific configuration for the :ref:`RingHash` - // load balancing policy. - message RingHashLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.RingHashLbConfig"; - - // The hash function used to hash hosts onto the ketama ring. - enum HashFunction { - // Use `xxHash `_, this is the default hash function. - XX_HASH = 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. - MURMUR_HASH_2 = 1; - } - - reserved 2; - - // 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`. - google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}]; - - // The hash function used to hash hosts onto the ketama ring. The value defaults to - // :ref:`XX_HASH`. - HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}]; - - // 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`. - google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}]; - } - - // Specific configuration for the :ref:`Maglev` - // load balancing policy. - message MaglevLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.MaglevLbConfig"; - - // The table size for Maglev hashing. The Maglev aims for ‘minimal disruption’ rather than an absolute guarantee. - // Minimal disruption means that when the set of upstreams changes, a connection will likely be sent to the same - // upstream as it was before. Increasing the table size reduces the amount of disruption. - // The table size must be prime number. If it is not specified, the default is 65537. - google.protobuf.UInt64Value table_size = 1; - } - - // Specific configuration for the - // :ref:`Original Destination ` - // load balancing policy. - message OriginalDstLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.OriginalDstLbConfig"; - - // 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. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - bool use_http_header = 1; - } - - // Common configuration for all load balancer implementations. - // [#next-free-field: 8] - message CommonLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.CommonLbConfig"; - - // Configuration for :ref:`zone aware routing - // `. - message ZoneAwareLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig"; - - // 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 `. - type.v3.Percent routing_enabled = 1; - - // 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 `. - google.protobuf.UInt64Value min_cluster_size = 2; - - // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic - // mode`. Instead, the cluster will fail all - // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a - // failing service. - bool fail_traffic_on_panic = 3; - } - - // Configuration for :ref:`locality weighted load balancing - // ` - message LocalityWeightedLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.CommonLbConfig.LocalityWeightedLbConfig"; - } - - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - message ConsistentHashingLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig"; - - // If set to `true`, the cluster will use hostname instead of the resolved - // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. - bool use_hostname_for_hashing = 1; - - // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 - // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. - // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. - // Minimum is 100. - // - // Applies to both Ring Hash and Maglev load balancers. - // - // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified - // `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests - // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing - // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify - // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the - // cascading overflow effect when choosing the next host in the ring/table). - // - // If weights are specified on the hosts, they are respected. - // - // This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts - // being probed, so use a higher value if you require better performance. - google.protobuf.UInt32Value hash_balance_factor = 2 [(validate.rules).uint32 = {gte: 100}]; - } - - // Configures the :ref:`healthy panic threshold `. - // If not specified, the default is 50%. - // To disable panic mode, set to 0%. - // - // .. note:: - // The specified percent will be truncated to the nearest 1%. - type.v3.Percent healthy_panic_threshold = 1; - - oneof locality_config_specifier { - ZoneAwareLbConfig zone_aware_lb_config = 2; - - LocalityWeightedLbConfig locality_weighted_lb_config = 3; - } - - // 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). Please always keep in mind that the use of sandbox technologies may change this - // behavior. - // - // 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. - google.protobuf.Duration update_merge_window = 4; - - // If set to true, Envoy will not consider new hosts when computing load balancing weights until - // they have been health checked for the first time. This will have no effect unless - // active health checking is also configured. - // - // Ignoring a host means that for any load balancing calculations that adjust weights based - // on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and - // panic mode) Envoy will exclude these hosts in the denominator. - // - // For example, with hosts in two priorities P0 and P1, where P0 looks like - // {healthy, unhealthy (new), unhealthy (new)} - // and where P1 looks like - // {healthy, healthy} - // all traffic will still hit P0, as 1 / (3 - 2) = 1. - // - // Enabling this will allow scaling up the number of hosts for a given cluster without entering - // panic mode or triggering priority spillover, assuming the hosts pass the first health check. - // - // If panic mode is triggered, new hosts are still eligible for traffic; they simply do not - // contribute to the calculation when deciding whether panic mode is enabled or not. - bool ignore_new_hosts_until_first_hc = 5; - - // If set to `true`, the cluster manager will drain all existing - // connections to upstream hosts whenever hosts are added or removed from the cluster. - bool close_connections_on_host_set_change = 6; - - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - ConsistentHashingLbConfig consistent_hashing_lb_config = 7; - } - - message RefreshRate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.RefreshRate"; - - // Specifies the base interval between refreshes. This parameter is required and must be greater - // than zero and less than - // :ref:`max_interval `. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gt {nanos: 1000000} - }]; - - // Specifies the maximum interval between refreshes. This parameter is optional, but must be - // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}]; - } - - // [#not-implemented-hide:] - message PreconnectPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.Cluster.PreconnectPolicy"; - - // Indicates how many streams (rounded up) can be anticipated per-upstream for each - // incoming stream. This is useful for high-QPS or latency-sensitive services. Preconnecting - // will only be done if the upstream is healthy. - // - // For example if this is 2, for an incoming HTTP/1.1 stream, 2 connections will be - // established, one for the new incoming stream, and one for a presumed follow-up stream. For - // HTTP/2, only one connection would be established by default as one connection can - // serve both the original and presumed follow-up stream. - // - // In steady state for non-multiplexed connections a value of 1.5 would mean if there were 100 - // active streams, there would be 100 connections in use, and 50 connections preconnected. - // This might be a useful value for something like short lived single-use connections, - // for example proxying HTTP/1.1 if keep-alive were false and each stream resulted in connection - // termination. It would likely be overkill for long lived connections, such as TCP proxying SMTP - // or regular HTTP/1.1 with keep-alive. For long lived traffic, a value of 1.05 would be more - // reasonable, where for every 100 connections, 5 preconnected connections would be in the queue - // in case of unexpected disconnects where the connection could not be reused. - // - // If this value is not set, or set explicitly to one, Envoy will fetch as many connections - // as needed to serve streams in flight. This means in steady state if a connection is torn down, - // a subsequent streams will pay an upstream-rtt latency penalty waiting for streams to be - // preconnected. - // - // This is limited somewhat arbitrarily to 3 because preconnecting too aggressively can - // harm latency more than the preconnecting helps. - google.protobuf.DoubleValue per_upstream_preconnect_ratio = 1 - [(validate.rules).double = {lte: 3.0 gte: 1.0}]; - - // Indicates how many many streams (rounded up) can be anticipated across a cluster for each - // stream, useful for low QPS services. This is currently supported for a subset of - // deterministic non-hash-based load-balancing algorithms (weighted round robin, random). - // Unlike per_upstream_preconnect_ratio this preconnects across the upstream instances in a - // cluster, doing best effort predictions of what upstream would be picked next and - // pre-establishing a connection. - // - // For example if preconnecting is set to 2 for a round robin HTTP/2 cluster, on the first - // incoming stream, 2 connections will be preconnected - one to the first upstream for this - // cluster, one to the second on the assumption there will be a follow-up stream. - // - // Preconnecting will be limited to one preconnect per configured upstream in the cluster. - // - // If this value is not set, or set explicitly to one, Envoy will fetch as many connections - // as needed to serve streams in flight, so during warm up and in steady state if a connection - // is closed (and per_upstream_preconnect_ratio is not set), there will be a latency hit for - // connection establishment. - // - // If both this and preconnect_ratio are set, Envoy will make sure both predicted needs are met, - // basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each upstream. - // TODO(alyssawilk) per LB docs and LB overview docs when unhiding. - google.protobuf.DoubleValue predictive_preconnect_ratio = 2 - [(validate.rules).double = {lte: 3.0 gte: 1.0}]; - } - - reserved 12, 15, 7, 11, 35, 46, 29, 13, 14, 26, 47; - - reserved "hosts", "tls_context", "extension_protocol_options", "upstream_http_protocol_options", - "common_http_protocol_options", "http_protocol_options", "http2_protocol_options", - "protocol_selection", "track_timeout_budgets"; - - // Configuration to use different transport sockets for different endpoints. - // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` - // is used to match against the transport sockets as they appear in the list. The first - // :ref:`match ` is used. - // For example, with the following match - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "enableMTLS" - // match: - // acceptMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - name: "defaultToPlaintext" - // match: {} - // transport_socket: - // name: envoy.transport_sockets.raw_buffer - // - // Connections to the endpoints whose metadata value under *envoy.transport_socket_match* - // having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. - // - // If a :ref:`socket match ` with empty match - // criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" - // socket match in case above. - // - // If an endpoint metadata's value under *envoy.transport_socket_match* does not match any - // *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or - // *transport_socket* specified in this cluster. - // - // This field allows gradual and flexible transport socket configuration changes. - // - // The metadata of endpoints in EDS can indicate transport socket capabilities. For example, - // an endpoint's metadata can have two key value pairs as "acceptMTLS": "true", - // "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic - // has "acceptPlaintext": "true" metadata information. - // - // Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS - // traffic for endpoints with "acceptMTLS": "true", by adding a corresponding - // *TransportSocketMatch* in this field. Other client Envoys receive CDS without - // *transport_socket_match* set, and still send plain text traffic to the same cluster. - // - // This field can be used to specify custom transport socket configurations for health - // checks by adding matching key/value pairs in a health check's - // :ref:`transport socket match criteria ` field. - // - // [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] - repeated TransportSocketMatch transport_socket_matches = 43; - - // 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. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // 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 - // `. - string alt_stat_name = 28; - - oneof cluster_discovery_type { - // The :ref:`service discovery type ` - // to use for resolving the cluster. - DiscoveryType type = 2 [(validate.rules).enum = {defined_only: true}]; - - // The custom cluster type. - CustomClusterType cluster_type = 38; - } - - // Configuration to use for EDS updates for the Cluster. - EdsClusterConfig eds_cluster_config = 3; - - // The timeout for new network connections to hosts in the cluster. - google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}]; - - // Soft limit on size of the cluster’s connections read and write buffers. If - // unspecified, an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5 - [(udpa.annotations.security).configure_for_untrusted_upstream = true]; - - // The :ref:`load balancer type ` to use - // when picking a host in the cluster. - // [#comment:TODO: Remove enum constraint :ref:`LOAD_BALANCING_POLICY_CONFIG` when implemented.] - LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true not_in: 7}]; - - // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. - // This field supersedes the *hosts* field in the v2 API. - // - // .. attention:: - // - // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. - // - endpoint.v3.ClusterLoadAssignment load_assignment = 33; - - // 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. - repeated core.v4alpha.HealthCheck health_checks = 8; - - // 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. - google.protobuf.UInt32Value max_requests_per_connection = 9; - - // Optional :ref:`circuit breaking ` for the cluster. - CircuitBreakers circuit_breakers = 10; - - // 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. - // [#next-major-version: make this a list of typed extensions.] - map typed_extension_protocol_options = 36; - - // 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. The value configured must be at least 1ms. 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. - google.protobuf.Duration dns_refresh_rate = 16 - [(validate.rules).duration = {gt {nanos: 1000000}}]; - - // If the DNS failure refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types - // other than :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS` this setting is - // ignored. - RefreshRate dns_failure_refresh_rate = 44; - - // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, - // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS - // resolution. - bool respect_dns_ttl = 39; - - // The DNS IP address resolution policy. If this setting is not specified, the - // value defaults to - // :ref:`AUTO`. - DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}]; - - // 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. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple's API only allows overriding DNS resolvers via system settings. - repeated core.v4alpha.Address dns_resolvers = 18; - - // [#next-major-version: Reconcile DNS options in a single message.] - // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - bool use_tcp_for_dns_lookups = 45; - - // If specified, outlier detection will be enabled for this upstream cluster. - // Each of the configuration values can be overridden via - // :ref:`runtime values `. - OutlierDetection outlier_detection = 19; - - // 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. - google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}]; - - // 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. - core.v4alpha.BindConfig upstream_bind_config = 21; - - // Configuration for load balancing subsetting. - LbSubsetConfig lb_subset_config = 22; - - // Optional configuration for the load balancing algorithm selected by - // LbPolicy. Currently only - // :ref:`RING_HASH`, - // :ref:`MAGLEV` and - // :ref:`LEAST_REQUEST` - // has additional configuration options. - // Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding - // LbPolicy will generate an error at runtime. - oneof lb_config { - // Optional configuration for the Ring Hash load balancing policy. - RingHashLbConfig ring_hash_lb_config = 23; - - // Optional configuration for the Maglev load balancing policy. - MaglevLbConfig maglev_lb_config = 52; - - // Optional configuration for the Original Destination load balancing policy. - OriginalDstLbConfig original_dst_lb_config = 34; - - // Optional configuration for the LeastRequest load balancing policy. - LeastRequestLbConfig least_request_lb_config = 37; - } - - // Common configuration for all load balancer implementations. - CommonLbConfig common_lb_config = 27; - - // Optional custom transport socket implementation to use for upstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`UpstreamTlsContexts ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - core.v4alpha.TransportSocket transport_socket = 24; - - // 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.filters.http.router*. - core.v4alpha.Metadata metadata = 25; - - // Optional options for upstream connections. - UpstreamConnectionOptions upstream_connection_options = 30; - - // 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. - bool close_connections_on_host_health_failure = 31; - - // If set to true, Envoy will ignore the health value of a host when processing its removal - // from service discovery. This means that if active health checking is used, Envoy will *not* - // wait for the endpoint to go unhealthy before removing it. - bool ignore_health_on_host_removal = 32; - - // An (optional) network filter chain, listed in the order the filters should be applied. - // The chain will be applied to all outgoing connections that Envoy makes to the upstream - // servers of this cluster. - repeated Filter filters = 40; - - // [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the - // :ref:`lb_policy` field has the value - // :ref:`LOAD_BALANCING_POLICY_CONFIG`. - LoadBalancingPolicy load_balancing_policy = 41; - - // [#not-implemented-hide:] - // If present, tells the client where to send load reports via LRS. If not present, the - // client will fall back to a client-side default, which may be either (a) don't send any - // load reports or (b) send load reports for all clusters to a single default server - // (which may be configured in the bootstrap file). - // - // Note that if multiple clusters point to the same LRS server, the client may choose to - // create a separate stream for each cluster or it may choose to coalesce the data for - // multiple clusters onto a single stream. Either way, the client must make sure to send - // the data for any given cluster on no more than one stream. - // - // [#next-major-version: In the v3 API, we should consider restructuring this somehow, - // maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation - // from the LRS stream here.] - core.v4alpha.ConfigSource lrs_server = 42; - - // Optional customization and configuration of upstream connection pool, and upstream type. - // - // Currently this field only applies for HTTP traffic but is designed for eventual use for custom - // TCP upstreams. - // - // For HTTP traffic, Envoy will generally take downstream HTTP and send it upstream as upstream - // HTTP, using the http connection pool and the codec from `http2_protocol_options` - // - // For routes where CONNECT termination is configured, Envoy will take downstream CONNECT - // requests and forward the CONNECT payload upstream over raw TCP using the tcp connection pool. - // - // The default pool used is the generic connection pool which creates the HTTP upstream for most - // HTTP requests, and the TCP upstream if CONNECT termination is configured. - // - // If users desire custom connection pool or upstream behavior, for example terminating - // CONNECT only if a custom filter indicates it is appropriate, the custom factories - // can be registered and configured here. - core.v4alpha.TypedExtensionConfig upstream_config = 48; - - // Configuration to track optional cluster stats. - TrackClusterStats track_cluster_stats = 49; - - // [#not-implemented-hide:] - // Preconnect configuration for this cluster. - PreconnectPolicy preconnect_policy = 50; - - // If `connection_pool_per_downstream_connection` is true, the cluster will use a separate - // connection pool for every downstream connection - bool connection_pool_per_downstream_connection = 51; -} - -// [#not-implemented-hide:] Extensible load balancing policy configuration. -// -// Every LB policy defined via this mechanism will be identified via a unique name using reverse -// DNS notation. If the policy needs configuration parameters, it must define a message for its -// own configuration, which will be stored in the config field. The name of the policy will tell -// clients which type of message they should expect to see in the config field. -// -// Note that there are cases where it is useful to be able to independently select LB policies -// for choosing a locality and for choosing an endpoint within that locality. For example, a -// given deployment may always use the same policy to choose the locality, but for choosing the -// endpoint within the locality, some clusters may use weighted-round-robin, while others may -// use some sort of session-based balancing. -// -// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a -// child LB policy for each locality. For each request, the parent chooses the locality and then -// delegates to the child policy for that locality to choose the endpoint within the locality. -// -// To facilitate this, the config message for the top-level LB policy may include a field of -// type LoadBalancingPolicy that specifies the child policy. -message LoadBalancingPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.LoadBalancingPolicy"; - - message Policy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.LoadBalancingPolicy.Policy"; - - reserved 2; - - reserved "config"; - - // Required. The name of the LB policy. - string name = 1; - - google.protobuf.Any typed_config = 3; - } - - // Each client will iterate over the list in order and stop at the first policy that it - // supports. This provides a mechanism for starting to use new LB policies that are not yet - // supported by all clients. - repeated Policy policies = 1; -} - -// An extensible structure containing the address Envoy should bind to when -// establishing upstream connections. -message UpstreamBindConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.UpstreamBindConfig"; - - // The address Envoy should bind to when establishing upstream connections. - core.v4alpha.Address source_address = 1; -} - -message UpstreamConnectionOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.UpstreamConnectionOptions"; - - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - core.v4alpha.TcpKeepalive tcp_keepalive = 1; -} - -message TrackClusterStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.TrackClusterStats"; - - // If timeout_budgets is true, the :ref:`timeout budget histograms - // ` will be published for each - // request. These show what percentage of a request's per try and global timeout was used. A value - // of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value - // of 100 would indicate that the request took the entirety of the timeout given to it. - bool timeout_budgets = 1; - - // If request_response_sizes is true, then the :ref:`histograms - // ` tracking header and body sizes - // of requests and responses will be published. - bool request_response_sizes = 2; -} diff --git a/api/envoy/config/cluster/v4alpha/filter.proto b/api/envoy/config/cluster/v4alpha/filter.proto deleted file mode 100644 index 5a4a4facbd..0000000000 --- a/api/envoy/config/cluster/v4alpha/filter.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v4alpha; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v4alpha"; -option java_outer_classname = "FilterProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Upstream filters] -// Upstream filters apply to the connections to the upstream cluster hosts. - -message Filter { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.cluster.v3.Filter"; - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - google.protobuf.Any typed_config = 2; -} diff --git a/api/envoy/config/cluster/v4alpha/outlier_detection.proto b/api/envoy/config/cluster/v4alpha/outlier_detection.proto deleted file mode 100644 index d4e76b4f13..0000000000 --- a/api/envoy/config/cluster/v4alpha/outlier_detection.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v4alpha; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v4alpha"; -option java_outer_classname = "OutlierDetectionProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Outlier detection] - -// See the :ref:`architecture overview ` for -// more information on outlier detection. -// [#next-free-field: 22] -message OutlierDetection { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.OutlierDetection"; - - // The number of consecutive 5xx responses or local origin errors that are mapped - // to 5xx error codes before a consecutive 5xx ejection - // occurs. Defaults to 5. - google.protobuf.UInt32Value consecutive_5xx = 1; - - // 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. - google.protobuf.Duration interval = 2 [(validate.rules).duration = {gt {}}]; - - // The base time that a host is ejected for. The real time is equal to the - // base time multiplied by the number of times the host has been ejected and is - // capped by :ref:`max_ejection_time`. - // Defaults to 30000ms or 30s. - google.protobuf.Duration base_ejection_time = 3 [(validate.rules).duration = {gt {}}]; - - // 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. - google.protobuf.UInt32Value max_ejection_percent = 4 [(validate.rules).uint32 = {lte: 100}]; - - // 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. - google.protobuf.UInt32Value enforcing_consecutive_5xx = 5 [(validate.rules).uint32 = {lte: 100}]; - - // 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. - google.protobuf.UInt32Value enforcing_success_rate = 6 [(validate.rules).uint32 = {lte: 100}]; - - // 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. - google.protobuf.UInt32Value success_rate_minimum_hosts = 7; - - // 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. - google.protobuf.UInt32Value success_rate_request_volume = 8; - - // 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. - google.protobuf.UInt32Value success_rate_stdev_factor = 9; - - // The number of consecutive gateway failures (502, 503, 504 status codes) - // before a consecutive gateway failure ejection occurs. Defaults to 5. - google.protobuf.UInt32Value consecutive_gateway_failure = 10; - - // 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. - google.protobuf.UInt32Value enforcing_consecutive_gateway_failure = 11 - [(validate.rules).uint32 = {lte: 100}]; - - // Determines whether to distinguish local origin failures from external errors. If set to true - // the following configuration parameters are taken into account: - // :ref:`consecutive_local_origin_failure`, - // :ref:`enforcing_consecutive_local_origin_failure` - // and - // :ref:`enforcing_local_origin_success_rate`. - // Defaults to false. - bool split_external_local_origin_errors = 12; - - // The number of consecutive locally originated failures before ejection - // occurs. Defaults to 5. Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value consecutive_local_origin_failure = 13; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive locally originated failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value enforcing_consecutive_local_origin_failure = 14 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics for locally originated errors. - // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value enforcing_local_origin_success_rate = 15 - [(validate.rules).uint32 = {lte: 100}]; - - // The failure percentage to use when determining failure percentage-based outlier detection. If - // the failure percentage of a given host is greater than or equal to this value, it will be - // ejected. Defaults to 85. - google.protobuf.UInt32Value failure_percentage_threshold = 16 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status is detected through - // failure percentage statistics. This setting can be used to disable ejection or to ramp it up - // slowly. Defaults to 0. - // - // [#next-major-version: setting this without setting failure_percentage_threshold should be - // invalid in v4.] - google.protobuf.UInt32Value enforcing_failure_percentage = 17 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status is detected through - // local-origin failure percentage statistics. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. - google.protobuf.UInt32Value enforcing_failure_percentage_local_origin = 18 - [(validate.rules).uint32 = {lte: 100}]; - - // The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. - // If the total number of hosts in the cluster is less than this value, failure percentage-based - // ejection will not be performed. Defaults to 5. - google.protobuf.UInt32Value failure_percentage_minimum_hosts = 19; - - // The minimum number of total requests that must be collected in one interval (as defined by the - // interval duration above) to perform failure percentage-based ejection for this host. If the - // volume is lower than this setting, failure percentage-based ejection will not be performed for - // this host. Defaults to 50. - google.protobuf.UInt32Value failure_percentage_request_volume = 20; - - // The maximum time that a host is ejected for. See :ref:`base_ejection_time` - // for more information. If not specified, the default value (300000ms or 300s) or - // :ref:`base_ejection_time` value is applied, whatever is larger. - google.protobuf.Duration max_ejection_time = 21 [(validate.rules).duration = {gt {}}]; -} diff --git a/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto b/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto index 3941c20aeb..d04754bd45 100644 --- a/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto +++ b/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.common.dynamic_forward_proxy.v2alpha"; option java_outer_classname = "DnsCacheProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/dynamic_forward_proxy/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.common.dynamic_forward_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/common/key_value/v3/config.proto b/api/envoy/config/common/key_value/v3/config.proto new file mode 100644 index 0000000000..566461fb08 --- /dev/null +++ b/api/envoy/config/common/key_value/v3/config.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package envoy.config.common.key_value.v3; + +import "envoy/config/core/v3/extension.proto"; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.common.key_value.v3"; +option java_outer_classname = "ConfigProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/key_value/v3;key_valuev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Key Value Store storage plugin] + +// This shared configuration for Envoy key value stores. +message KeyValueStoreConfig { + option (xds.annotations.v3.message_status).work_in_progress = true; + + // [#extension-category: envoy.common.key_value] + core.v3.TypedExtensionConfig config = 1 [(validate.rules).message = {required: true}]; +} diff --git a/api/envoy/config/common/matcher/v3/matcher.proto b/api/envoy/config/common/matcher/v3/matcher.proto index 2760be1b8b..5b9da51968 100644 --- a/api/envoy/config/common/matcher/v3/matcher.proto +++ b/api/envoy/config/common/matcher/v3/matcher.proto @@ -6,14 +6,15 @@ import "envoy/config/core/v3/extension.proto"; import "envoy/config/route/v3/route_components.proto"; import "envoy/type/matcher/v3/string.proto"; -import "udpa/annotations/migrate.proto"; +import "xds/annotations/v3/status.proto"; + import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.common.matcher.v3"; option java_outer_classname = "MatcherProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Unified Matcher API] @@ -23,9 +24,9 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // is found the action specified by the most specific on_no_match will be evaluated. // As an on_no_match might result in another matching tree being evaluated, this process // might repeat several times until the final OnMatch (or no match) is decided. -// -// This API is a work in progress. message Matcher { + option (xds.annotations.v3.message_status).work_in_progress = true; + // What to do if a match is successful. message OnMatch { oneof on_match { @@ -52,6 +53,7 @@ message Matcher { // Predicate for a single input field. message SinglePredicate { // Protocol-specific specification of input field to match on. + // [#extension-category: envoy.matching.common_inputs] core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; oneof matcher { @@ -61,6 +63,7 @@ message Matcher { type.matcher.v3.StringMatcher value_match = 2; // Extension for custom matching logic. + // [#extension-category: envoy.matching.input_matchers] core.v3.TypedExtensionConfig custom_match = 3; } } @@ -81,6 +84,9 @@ message Matcher { // A list of predicates to be AND-ed together. PredicateList and_matcher = 3; + + // The invert of a predicate + Predicate not_matcher = 4; } } diff --git a/api/envoy/config/common/matcher/v4alpha/matcher.proto b/api/envoy/config/common/matcher/v4alpha/matcher.proto deleted file mode 100644 index 7c846e1e93..0000000000 --- a/api/envoy/config/common/matcher/v4alpha/matcher.proto +++ /dev/null @@ -1,264 +0,0 @@ -syntax = "proto3"; - -package envoy.config.common.matcher.v4alpha; - -import "envoy/config/core/v4alpha/extension.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.common.matcher.v4alpha"; -option java_outer_classname = "MatcherProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Unified Matcher API] - -// A matcher, which may traverse a matching tree in order to result in a match action. -// During matching, the tree will be traversed until a match is found, or if no match -// is found the action specified by the most specific on_no_match will be evaluated. -// As an on_no_match might result in another matching tree being evaluated, this process -// might repeat several times until the final OnMatch (or no match) is decided. -// -// This API is a work in progress. -message Matcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher"; - - // What to do if a match is successful. - message OnMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.OnMatch"; - - oneof on_match { - option (validate.required) = true; - - // Nested matcher to evaluate. - // If the nested matcher does not match and does not specify - // on_no_match, then this matcher is considered not to have - // matched, even if a predicate at this level or above returned - // true. - Matcher matcher = 1; - - // Protocol-specific action to take. - core.v4alpha.TypedExtensionConfig action = 2; - } - } - - // A linear list of field matchers. - // The field matchers are evaluated in order, and the first match - // wins. - message MatcherList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.MatcherList"; - - // Predicate to determine if a match is successful. - message Predicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate"; - - // Predicate for a single input field. - message SinglePredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate"; - - // Protocol-specific specification of input field to match on. - core.v4alpha.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; - - oneof matcher { - option (validate.required) = true; - - // Built-in string matcher. - type.matcher.v4alpha.StringMatcher value_match = 2; - - // Extension for custom matching logic. - core.v4alpha.TypedExtensionConfig custom_match = 3; - } - } - - // A list of two or more matchers. Used to allow using a list within a oneof. - message PredicateList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList"; - - repeated Predicate predicate = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof match_type { - option (validate.required) = true; - - // A single predicate to evaluate. - SinglePredicate single_predicate = 1; - - // A list of predicates to be OR-ed together. - PredicateList or_matcher = 2; - - // A list of predicates to be AND-ed together. - PredicateList and_matcher = 3; - } - } - - // An individual matcher. - message FieldMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher"; - - // Determines if the match succeeds. - Predicate predicate = 1 [(validate.rules).message = {required: true}]; - - // What to do if the match succeeds. - OnMatch on_match = 2 [(validate.rules).message = {required: true}]; - } - - // A list of matchers. First match wins. - repeated FieldMatcher matchers = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - message MatcherTree { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.MatcherTree"; - - // A map of configured matchers. Used to allow using a map within a oneof. - message MatchMap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap"; - - map map = 1 [(validate.rules).map = {min_pairs: 1}]; - } - - // Protocol-specific specification of input field to match on. - core.v4alpha.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; - - // Exact or prefix match maps in which to look up the input value. - // If the lookup succeeds, the match is considered successful, and - // the corresponding OnMatch is used. - oneof tree_type { - option (validate.required) = true; - - MatchMap exact_match_map = 2; - - // Longest matching prefix wins. - MatchMap prefix_match_map = 3; - - // Extension for custom matching logic. - core.v4alpha.TypedExtensionConfig custom_match = 4; - } - } - - oneof matcher_type { - option (validate.required) = true; - - // A linear list of matchers to evaluate. - MatcherList matcher_list = 1; - - // A match tree to evaluate. - MatcherTree matcher_tree = 2; - } - - // Optional OnMatch to use if the matcher failed. - // If specified, the OnMatch is used, and the matcher is considered - // to have matched. - // If not specified, the matcher is considered not to have matched. - OnMatch on_no_match = 3; -} - -// Match configuration. This is a recursive structure which allows complex nested match -// configurations to be built using various logical operators. -// [#next-free-field: 11] -message MatchPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.MatchPredicate"; - - // A set of match configurations used for logical operations. - message MatchSet { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.MatchPredicate.MatchSet"; - - // The list of rules that make up the set. - repeated MatchPredicate rules = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - MatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // HTTP request headers match configuration. - HttpHeadersMatch http_request_headers_match = 5; - - // HTTP request trailers match configuration. - HttpHeadersMatch http_request_trailers_match = 6; - - // HTTP response headers match configuration. - HttpHeadersMatch http_response_headers_match = 7; - - // HTTP response trailers match configuration. - HttpHeadersMatch http_response_trailers_match = 8; - - // HTTP request generic body match configuration. - HttpGenericBodyMatch http_request_generic_body_match = 9; - - // HTTP response generic body match configuration. - HttpGenericBodyMatch http_response_generic_body_match = 10; - } -} - -// HTTP headers match configuration. -message HttpHeadersMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.HttpHeadersMatch"; - - // HTTP headers to match. - repeated route.v4alpha.HeaderMatcher headers = 1; -} - -// HTTP generic body match configuration. -// List of text strings and hex strings to be located in HTTP body. -// All specified strings must be found in the HTTP body for positive match. -// The search may be limited to specified number of bytes from the body start. -// -// .. attention:: -// -// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. -// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified -// to scan only part of the http body. -message HttpGenericBodyMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.HttpGenericBodyMatch"; - - message GenericTextMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch"; - - oneof rule { - option (validate.required) = true; - - // Text string to be located in HTTP body. - string string_match = 1 [(validate.rules).string = {min_len: 1}]; - - // Sequence of bytes to be located in HTTP body. - bytes binary_match = 2 [(validate.rules).bytes = {min_len: 1}]; - } - } - - // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). - uint32 bytes_limit = 1; - - // List of patterns to match. - repeated GenericTextMatch patterns = 2 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/api/envoy/config/common/mutation_rules/v3/mutation_rules.proto b/api/envoy/config/common/mutation_rules/v3/mutation_rules.proto new file mode 100644 index 0000000000..856c245f4f --- /dev/null +++ b/api/envoy/config/common/mutation_rules/v3/mutation_rules.proto @@ -0,0 +1,86 @@ +syntax = "proto3"; + +package envoy.config.common.mutation_rules.v3; + +import "envoy/type/matcher/v3/regex.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.config.common.mutation_rules.v3"; +option java_outer_classname = "MutationRulesProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/mutation_rules/v3;mutation_rulesv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Header Mutation Rules] + +// The HeaderMutationRules structure specifies what headers may be +// manipulated by a processing filter. This set of rules makes it +// possible to control which modifications a filter may make. +// +// By default, an external processing server may add, modify, or remove +// any header except for an "Envoy internal" header (which is typically +// denoted by an x-envoy prefix) or specific headers that may affect +// further filter processing: +// +// * host +// * :authority +// * :scheme +// * :method +// +// Every attempt to add, change, append, or remove a header will be +// tested against the rules here. Disallowed header mutations will be +// ignored unless *disallow_is_error* is set to true. +// +// Attempts to remove headers are further constrained -- regardless of the +// settings, system-defined headers (that start with ":") and the "host" +// header may never be removed. +// +// In addition, a counter will be incremented whenever a mutation is +// rejected. In the ext_proc filter, that counter is named +// "rejected_header_mutations". +// [#next-free-field: 8] +message HeaderMutationRules { + // By default, certain headers that could affect processing of subsequent + // filters or request routing cannot be modified. These headers are + // "host", ":authority", ":scheme", and ":method". Setting this parameter + // to true allows these headers to be modified as well. + google.protobuf.BoolValue allow_all_routing = 1; + + // If true, allow modification of envoy internal headers. By default, these + // start with "x-envoy" but this may be overridden in the *Bootstrap* + // configuration using the + // :ref:`header_prefix ` + // field. Default is false. + google.protobuf.BoolValue allow_envoy = 2; + + // If true, prevent modification of any system header, defined as a header + // that starts with a ":" character, regardless of any other settings. + // A processing server may still override the ":status" of an HTTP response + // using an *ImmediateResponse* message. Default is false. + google.protobuf.BoolValue disallow_system = 3; + + // If true, prevent modifications of all header values, regardless of any + // other settings. A processing server may still override the ":status" + // of an HTTP response using an *ImmediateResponse* message. Default is false. + google.protobuf.BoolValue disallow_all = 4; + + // If set, specifically allow any header that matches this regular + // expression. This overrides all other settings except for + // *disallow_expression*. + type.matcher.v3.RegexMatcher allow_expression = 5; + + // If set, specifically disallow any header that matches this regular + // expression regardless of any other settings. + type.matcher.v3.RegexMatcher disallow_expression = 6; + + // If true, and if the rules in this list cause a header mutation to be + // disallowed, then the filter using this configuration will terminate the + // request with a 500 error. In addition, regardless of the setting of this + // parameter, any attempt to set, add, or modify a disallowed header will + // cause the "rejected_header_mutations" counter to be incremented. + // Default is false. + google.protobuf.BoolValue disallow_is_error = 7; +} diff --git a/api/envoy/config/common/tap/v2alpha/common.proto b/api/envoy/config/common/tap/v2alpha/common.proto index 6db1eccedd..23b7eeeda6 100644 --- a/api/envoy/config/common/tap/v2alpha/common.proto +++ b/api/envoy/config/common/tap/v2alpha/common.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.common.tap.v2alpha"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/tap/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.common.tap.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/core/v3/address.proto b/api/envoy/config/core/v3/address.proto index 8228450eb9..3f1b6fe3dc 100644 --- a/api/envoy/config/core/v3/address.proto +++ b/api/envoy/config/core/v3/address.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "AddressProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Network addresses] @@ -30,14 +31,14 @@ message Pipe { uint32 mode = 2 [(validate.rules).uint32 = {lte: 511}]; } -// [#not-implemented-hide:] The address represents an envoy internal listener. -// TODO(lambdai): Make this address available for listener and endpoint. -// TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30. +// The address represents an envoy internal listener. +// [#comment: TODO(lambdai): Make this address available for listener and endpoint. +// TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30.] message EnvoyInternalAddress { oneof address_name_specifier { option (validate.required) = true; - // [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. + // [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. string server_listener_name = 1; } } @@ -57,13 +58,13 @@ message SocketAddress { // 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 + // 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 + // `, 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 `. + // via :ref:`resolver_name `. string address = 2 [(validate.rules).string = {min_len: 1}]; oneof port_specifier { @@ -72,7 +73,7 @@ message SocketAddress { uint32 port_value = 3 [(validate.rules).uint32 = {lte: 65535}]; // This is only valid if :ref:`resolver_name - // ` is specified below and the + // ` is specified below and the // named resolver is capable of named port resolution. string named_port = 4; } @@ -117,7 +118,7 @@ message BindConfig { // 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 + // ` 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 @@ -155,6 +156,6 @@ message CidrRange { // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. string address_prefix = 1 [(validate.rules).string = {min_len: 1}]; - // Length of prefix, e.g. 0, 32. + // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. google.protobuf.UInt32Value prefix_len = 2 [(validate.rules).uint32 = {lte: 128}]; } diff --git a/api/envoy/config/core/v3/backoff.proto b/api/envoy/config/core/v3/backoff.proto index 55b504e716..1899d1abf1 100644 --- a/api/envoy/config/core/v3/backoff.proto +++ b/api/envoy/config/core/v3/backoff.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "BackoffProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Backoff Strategy] @@ -21,7 +22,7 @@ message BackoffStrategy { // The base interval to be used for the next back off computation. It should // be greater than zero and less than or equal to :ref:`max_interval - // `. + // `. google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { required: true gte {nanos: 1000000} @@ -29,8 +30,8 @@ message BackoffStrategy { // Specifies the maximum interval between retries. This parameter is optional, // but must be greater than or equal to the :ref:`base_interval - // ` if set. The default + // ` if set. The default // is 10 times the :ref:`base_interval - // `. + // `. google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; } diff --git a/api/envoy/config/core/v3/base.proto b/api/envoy/config/core/v3/base.proto index 74a7d55a73..f8d94a49dd 100644 --- a/api/envoy/config/core/v3/base.proto +++ b/api/envoy/config/core/v3/base.proto @@ -9,10 +9,12 @@ import "envoy/type/v3/percent.proto"; import "envoy/type/v3/semantic_version.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; +import "xds/core/v3/context_params.proto"; + +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -21,6 +23,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "BaseProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common types] @@ -67,12 +70,12 @@ enum TrafficDirection { message Locality { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Locality"; - // Region this :ref:`zone ` belongs to. + // Region this :ref:`zone ` belongs to. string region = 1; // 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 `, + // 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) // `_ @@ -132,7 +135,7 @@ message Extension { // Identifies a specific Envoy instance. The node identifier is presented to the // management server, which may use this identifier to distinguish per Envoy // configuration for serving. -// [#next-free-field: 12] +// [#next-free-field: 13] message Node { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Node"; @@ -152,10 +155,10 @@ message Node { // 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:`runtime override directory `, // :ref:`user agent addition - // `, + // `, // :ref:`HTTP global rate limiting `, // :ref:`CDS `, and :ref:`HTTP tracing // `, either in this message or via @@ -166,6 +169,13 @@ message Node { // directly to the management server. google.protobuf.Struct metadata = 3; + // Map from xDS resource type URL to dynamic context parameters. These may vary at runtime (unlike + // other fields in this message). For example, the xDS client may have a shard identifier that + // changes during the lifetime of the xDS client. In Envoy, this would be achieved by updating the + // dynamic context on the Server::Instance's LocalInfo context provider. The shard ID dynamic + // parameter then appears in this field during future discovery requests. + map dynamic_parameters = 12; + // Locality specifying where the Envoy instance is running. Locality locality = 4; @@ -196,7 +206,8 @@ message Node { // for filtering :ref:`listeners ` to be returned. For example, // if there is a listener bound to port 80, the list can optionally contain the // SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint. - repeated Address listening_addresses = 11 [deprecated = true]; + repeated Address listening_addresses = 11 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; } // Metadata provides additional inputs to filters based on matched listeners, @@ -226,7 +237,19 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. + // If both *filter_metadata* and + // :ref:`typed_filter_metadata ` + // fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map filter_metadata = 1; + + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + // The value is encoded as google.protobuf.Any. + // If both :ref:`filter_metadata ` + // and *typed_filter_metadata* fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. + map typed_filter_metadata = 2; } // Runtime derived uint32 with a default when not specified. @@ -274,6 +297,15 @@ message RuntimeFeatureFlag { string runtime_key = 2 [(validate.rules).string = {min_len: 1}]; } +// Query parameter name/value pair. +message QueryParameter { + // The key of the query parameter. Case sensitive. + string key = 1 [(validate.rules).string = {min_len: 1}]; + + // The value of the query parameter. + string value = 2; +} + // Header name/value pair. message HeaderValue { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HeaderValue"; @@ -298,12 +330,33 @@ message HeaderValueOption { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HeaderValueOption"; + // Describes the supported actions types for header append action. + enum HeaderAppendAction { + // This action will append the specified value to the existing values if the header + // already exists. If the header doesn't exist then this will add the header with + // specified key and value. + APPEND_IF_EXISTS_OR_ADD = 0; + + // This action will add the header if it doesn't already exist. If the header + // already exists then this will be a no-op. + ADD_IF_ABSENT = 1; + + // This action will overwrite the specified value by discarding any existing values if + // the header already exists. If the header doesn't exist then this will add the header + // with specified key and value. + OVERWRITE_IF_EXISTS_OR_ADD = 2; + } + // Header name/value pair that this option applies to. HeaderValue header = 1 [(validate.rules).message = {required: true}]; // Should the value be appended? If true (default), the value is appended to // existing values. Otherwise it replaces any existing values. google.protobuf.BoolValue append = 2; + + // [#not-implemented-hide:] Describes the action taken to append/overwrite the given value for an existing header + // or to only add this header if it's absent. Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD`. + HeaderAppendAction append_action = 3 [(validate.rules).enum = {defined_only: true}]; } // Wrapper for a set of headers. @@ -320,7 +373,7 @@ message WatchedDirectory { string path = 1 [(validate.rules).string = {min_len: 1}]; } -// Data source consisting of either a file or an inline value. +// Data source consisting of a file, an inline value, or an environment variable. message DataSource { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.DataSource"; @@ -335,6 +388,9 @@ message DataSource { // String inlined in the configuration. string inline_string = 3; + + // Environment variable data source. + string environment_variable = 4 [(validate.rules).string = {min_len: 1}]; } } @@ -342,7 +398,7 @@ message DataSource { message RetryPolicy { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.RetryPolicy"; - // Specifies parameters that control :ref:`retry backoff strategy `. + // Specifies parameters that control :ref:`retry backoff strategy `. // This parameter is optional, in which case the default base interval is 1000 milliseconds. The // default maximum interval is 10 times the base interval. BackoffStrategy retry_back_off = 1; @@ -383,7 +439,7 @@ message AsyncDataSource { } // Configuration for transport socket in :ref:`listeners ` and -// :ref:`clusters `. If the configuration is +// :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. message TransportSocket { @@ -410,7 +466,7 @@ message TransportSocket { // .. note:: // // Parsing of the runtime key's data is implemented such that it may be represented as a -// :ref:`FractionalPercent ` proto represented as JSON/YAML +// :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. diff --git a/api/envoy/config/core/v3/config_source.proto b/api/envoy/config/core/v3/config_source.proto index 9de03625dc..a49a05de8d 100644 --- a/api/envoy/config/core/v3/config_source.proto +++ b/api/envoy/config/core/v3/config_source.proto @@ -2,8 +2,11 @@ syntax = "proto3"; package envoy.config.core.v3; +import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/extension.proto"; import "envoy/config/core/v3/grpc_service.proto"; +import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; @@ -17,6 +20,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "ConfigSourceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Configuration sources] @@ -27,10 +31,10 @@ enum ApiVersion { // When not specified, we assume v2, to ease migration to Envoy's stable API // versioning. If a client does not support v2 (e.g. due to deprecation), this // is an invalid value. - AUTO = 0 [deprecated = true]; + AUTO = 0 [deprecated = true, (envoy.annotations.deprecated_at_minor_version_enum) = "3.0"]; // Use xDS v2 API. - V2 = 1 [deprecated = true]; + V2 = 1 [deprecated = true, (envoy.annotations.deprecated_at_minor_version_enum) = "3.0"]; // Use xDS v3 API. V3 = 2; @@ -38,7 +42,7 @@ enum ApiVersion { // API configuration source. This identifies the API type and cluster that Envoy // will use to fetch an xDS API. -// [#next-free-field: 9] +// [#next-free-field: 10] message ApiConfigSource { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ApiConfigSource"; @@ -106,10 +110,20 @@ message ApiConfigSource { // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. bool set_node_on_first_message_only = 7; + + // A list of config validators that will be executed when a new update is + // received from the ApiConfigSource. Note that each validator handles a + // specific xDS service type, and only the validators corresponding to the + // type url (in `:ref: DiscoveryResponse` or `:ref: DeltaDiscoveryResponse`) + // will be invoked. + // If the validator returns false or throws an exception, the config will be rejected by + // the client, and a NACK will be sent. + // [#extension-category: envoy.config.validators] + repeated TypedExtensionConfig config_validators = 9; } // Aggregated Discovery Service (ADS) options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to +// set in :ref:`ConfigSource ` can be used to // specify that ADS is to be used. message AggregatedConfigSource { option (udpa.annotations.versioning).previous_message_type = @@ -118,7 +132,7 @@ message AggregatedConfigSource { // [#not-implemented-hide:] // Self-referencing config source options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to +// set in :ref:`ConfigSource ` can be used to // specify that other data can be obtained from the same server. message SelfConfigSource { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SelfConfigSource"; @@ -142,13 +156,49 @@ message RateLimitSettings { google.protobuf.DoubleValue fill_rate = 2 [(validate.rules).double = {gt: 0.0}]; } +// Local filesystem path configuration source. +message PathConfigSource { + // Path on the filesystem to source and watch for configuration updates. + // When sourcing configuration for a :ref:`secret `, + // the certificate and key files are also watched for updates. + // + // .. note:: + // + // The path to the source must exist at config load time. + // + // .. note:: + // + // If `watched_directory` is *not* configured, Envoy will watch the file path for *moves.* + // This is because in general only moves are atomic. The same method of swapping files as is + // demonstrated in the :ref:`runtime documentation ` can be + // used here also. If `watched_directory` is configured, no watch will be placed directly on + // this path. Instead, the configured `watched_directory` will be used to trigger reloads of + // this path. This is required in certain deployment scenarios. See below for more information. + string path = 1 [(validate.rules).string = {min_len: 1}]; + + // If configured, this directory will be watched for *moves.* When an entry in this directory is + // moved to, the `path` will be reloaded. This is required in certain deployment scenarios. + // + // Specifically, if trying to load an xDS resource using a + // `Kubernetes ConfigMap `_, the + // following configuration might be used: + // 1. Store xds.yaml inside a ConfigMap. + // 2. Mount the ConfigMap to `/config_map/xds` + // 3. Configure path `/config_map/xds/xds.yaml` + // 4. Configure watched directory `/config_map/xds` + // + // The above configuration will ensure that Envoy watches the owning directory for moves which is + // required due to how Kubernetes manages ConfigMap symbolic links during atomic updates. + WatchedDirectory watched_directory = 2; +} + // Configuration for :ref:`listeners `, :ref:`clusters // `, :ref:`routes -// `, :ref:`endpoints +// `, :ref:`endpoints // ` etc. may either be sourced from the // filesystem or from an xDS API source. Filesystem configs are watched with // inotify for updates. -// [#next-free-field: 8] +// [#next-free-field: 9] message ConfigSource { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ConfigSource"; @@ -161,20 +211,11 @@ message ConfigSource { oneof config_source_specifier { option (validate.required) = true; - // Path on the filesystem to source and watch for configuration updates. - // When sourcing configuration for :ref:`secret `, - // the certificate and key files are also watched for updates. - // - // .. note:: - // - // The path to the source must exist at config load time. - // - // .. note:: - // - // Envoy will only watch the file path for *moves.* This is because in general only moves - // are atomic. The same method of swapping files as is demonstrated in the - // :ref:`runtime documentation ` can be used here also. - string path = 1; + // Deprecated in favor of `path_config_source`. Use that field instead. + string path = 1 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // Local filesystem path configuration source. + PathConfigSource path_config_source = 8; // API configuration source. ApiConfigSource api_config_source = 2; @@ -186,7 +227,7 @@ message ConfigSource { // [#not-implemented-hide:] // When set, the client will access the resources from the same server it got the // ConfigSource from, although not necessarily from the same stream. This is similar to the - // :ref:`ads` field, except that the client may use a + // :ref:`ads` field, except that the client may use a // different stream to the same server. As a result, this field can be used for things // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) // LDS to RDS on the same server without requiring the management server to know its name @@ -211,3 +252,32 @@ message ConfigSource { // turn expect to be delivered. ApiVersion resource_api_version = 6 [(validate.rules).enum = {defined_only: true}]; } + +// Configuration source specifier for a late-bound extension configuration. The +// parent resource is warmed until all the initial extension configurations are +// received, unless the flag to apply the default configuration is set. +// Subsequent extension updates are atomic on a per-worker basis. Once an +// extension configuration is applied to a request or a connection, it remains +// constant for the duration of processing. If the initial delivery of the +// extension configuration fails, due to a timeout for example, the optional +// default configuration is applied. Without a default configuration, the +// extension is disabled, until an extension configuration is received. The +// behavior of a disabled extension depends on the context. For example, a +// filter chain with a disabled extension filter rejects all incoming streams. +message ExtensionConfigSource { + ConfigSource config_source = 1 [(validate.rules).any = {required: true}]; + + // Optional default configuration to use as the initial configuration if + // there is a failure to receive the initial extension configuration or if + // `apply_default_config_without_warming` flag is set. + google.protobuf.Any default_config = 2; + + // Use the default config as the initial configuration without warming and + // waiting for the first discovery response. Requires the default configuration + // to be supplied. + bool apply_default_config_without_warming = 3; + + // A set of permitted extension type URLs. Extension configuration updates are rejected + // if they do not match any type URL in the set. + repeated string type_urls = 4 [(validate.rules).repeated = {min_items: 1}]; +} diff --git a/api/envoy/config/core/v3/event_service_config.proto b/api/envoy/config/core/v3/event_service_config.proto index b3552e3975..68c8df4076 100644 --- a/api/envoy/config/core/v3/event_service_config.proto +++ b/api/envoy/config/core/v3/event_service_config.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "EventServiceConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#not-implemented-hide:] diff --git a/api/envoy/config/core/v3/extension.proto b/api/envoy/config/core/v3/extension.proto index ba66da6a8e..80afce693c 100644 --- a/api/envoy/config/core/v3/extension.proto +++ b/api/envoy/config/core/v3/extension.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package envoy.config.core.v3; -import "envoy/config/core/v3/config_source.proto"; - import "google/protobuf/any.proto"; import "udpa/annotations/status.proto"; @@ -12,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "ExtensionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Extension configuration] @@ -24,38 +23,10 @@ message TypedExtensionConfig { string name = 1 [(validate.rules).string = {min_len: 1}]; // The typed config for the extension. The type URL will be used to identify - // the extension. In the case that the type URL is *udpa.type.v1.TypedStruct*, - // the inner type URL of *TypedStruct* will be utilized. See the + // the extension. In the case that the type URL is *xds.type.v3.TypedStruct* + // (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type + // URL of *TypedStruct* will be utilized. See the // :ref:`extension configuration overview // ` for further details. google.protobuf.Any typed_config = 2 [(validate.rules).any = {required: true}]; } - -// Configuration source specifier for a late-bound extension configuration. The -// parent resource is warmed until all the initial extension configurations are -// received, unless the flag to apply the default configuration is set. -// Subsequent extension updates are atomic on a per-worker basis. Once an -// extension configuration is applied to a request or a connection, it remains -// constant for the duration of processing. If the initial delivery of the -// extension configuration fails, due to a timeout for example, the optional -// default configuration is applied. Without a default configuration, the -// extension is disabled, until an extension configuration is received. The -// behavior of a disabled extension depends on the context. For example, a -// filter chain with a disabled extension filter rejects all incoming streams. -message ExtensionConfigSource { - ConfigSource config_source = 1 [(validate.rules).any = {required: true}]; - - // Optional default configuration to use as the initial configuration if - // there is a failure to receive the initial extension configuration or if - // `apply_default_config_without_warming` flag is set. - google.protobuf.Any default_config = 2; - - // Use the default config as the initial configuration without warming and - // waiting for the first discovery response. Requires the default configuration - // to be supplied. - bool apply_default_config_without_warming = 3; - - // A set of permitted extension type URLs. Extension configuration updates are rejected - // if they do not match any type URL in the set. - repeated string type_urls = 4 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/api/envoy/config/core/v3/grpc_method_list.proto b/api/envoy/config/core/v3/grpc_method_list.proto index e79ec24e02..8242b425e5 100644 --- a/api/envoy/config/core/v3/grpc_method_list.proto +++ b/api/envoy/config/core/v3/grpc_method_list.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "GrpcMethodListProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC method list] diff --git a/api/envoy/config/core/v3/grpc_service.proto b/api/envoy/config/core/v3/grpc_service.proto index e3730d0174..4fb6095580 100644 --- a/api/envoy/config/core/v3/grpc_service.proto +++ b/api/envoy/config/core/v3/grpc_service.proto @@ -18,12 +18,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "GrpcServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC services] // gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. +// ` and filter configurations. // [#next-free-field: 6] message GrpcService { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.GrpcService"; @@ -33,8 +34,8 @@ message GrpcService { "envoy.api.v2.core.GrpcService.EnvoyGrpc"; // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`transport_socket - // `. + // in the :ref:`Cluster ` :ref:`transport_socket + // `. string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; // The `:authority` header in the grpc request. If this field is not set, the authority header value will be `cluster_name`. @@ -124,6 +125,7 @@ message GrpcService { string name = 1; + // [#extension-category: envoy.grpc_credentials] oneof config_type { google.protobuf.Any typed_config = 3; } @@ -229,7 +231,7 @@ message GrpcService { // The target URI when using the `Google C++ gRPC client // `_. SSL credentials will be supplied in - // :ref:`channel_credentials `. + // :ref:`channel_credentials `. string target_uri = 1 [(validate.rules).string = {min_len: 1}]; ChannelCredentials channel_credentials = 2; diff --git a/api/envoy/config/core/v3/health_check.proto b/api/envoy/config/core/v3/health_check.proto index ccd4739698..83cce7ccdb 100644 --- a/api/envoy/config/core/v3/health_check.proto +++ b/api/envoy/config/core/v3/health_check.proto @@ -13,7 +13,6 @@ import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; -import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -21,6 +20,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "HealthCheckProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Health check] @@ -54,6 +54,12 @@ enum HealthStatus { DEGRADED = 5; } +message HealthStatusSet { + // An order-independent set of health status. + repeated HealthStatus statuses = 1 + [(validate.rules).repeated = {items {enum {defined_only: true}}}]; +} + // [#next-free-field: 25] message HealthCheck { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HealthCheck"; @@ -74,7 +80,7 @@ message HealthCheck { } } - // [#next-free-field: 12] + // [#next-free-field: 13] message HttpHealthCheck { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HealthCheck.HttpHealthCheck"; @@ -86,7 +92,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -115,16 +121,28 @@ message HealthCheck { // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open - // semantics of :ref:`Int64Range `. The start and end of each + // semantics of :ref:`Int64Range `. The start and end of each // range are required. Only statuses in the range [100, 600) are allowed. repeated type.v3.Int64Range expected_statuses = 9; + // Specifies a list of HTTP response statuses considered retriable. If provided, responses in this range + // will count towards the configured :ref:`unhealthy_threshold `, + // but will not result in the host being considered immediately unhealthy. Ranges follow half-open semantics of + // :ref:`Int64Range `. The start and end of each range are required. + // Only statuses in the range [100, 600) are allowed. The :ref:`expected_statuses ` + // field takes precedence for any range overlaps with this field i.e. if status code 200 is both retriable and expected, a 200 response will + // be considered a successful health check. By default all responses not in + // :ref:`expected_statuses ` will result in + // the host being considered immediately unhealthy i.e. if status code 200 is expected and there are no configured retriable statuses, any + // non-200 response will result in the host being marked unhealthy. + repeated type.v3.Int64Range retriable_statuses = 12; + // Use specified application protocol for health checks. type.v3.CodecClientType codec_client_type = 10 [(validate.rules).enum = {defined_only: true}]; // An optional service name parameter which is used to validate the identity of // the health checked cluster using a :ref:`StringMatcher - // `. See the :ref:`architecture overview + // `. See the :ref:`architecture overview // ` for more information. type.matcher.v3.StringMatcher service_name_matcher = 11; } @@ -171,9 +189,15 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; + + // Specifies a list of key-value pairs that should be added to the metadata of each GRPC call + // that is sent to the health checked cluster. For more information, including details on header value syntax, + // see the documentation on :ref:`custom request headers + // `. + repeated HeaderValueOption initial_metadata = 3 [(validate.rules).repeated = {max_items: 1000}]; } // Custom health check. @@ -190,6 +214,7 @@ message HealthCheck { // A custom health checker specific configuration which depends on the custom health checker // being instantiated. See :api:`envoy/config/health_checker` for reference. + // [#extension-category: envoy.health_checkers] oneof config_type { google.protobuf.Any typed_config = 3; } @@ -205,7 +230,7 @@ message HealthCheck { // Specifies the ALPN protocols for health check connections. This is useful if the // corresponding upstream is using ALPN-based :ref:`FilterChainMatch - // ` along with different protocols for health checks + // ` along with different protocols for health checks // versus data connections. If empty, no ALPN protocols will be set on health check connections. repeated string alpn_protocols = 1; } @@ -243,8 +268,10 @@ message HealthCheck { uint32 interval_jitter_percent = 18; // 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. + // unhealthy. Note that for *http* health checking if a host responds with a code not in + // :ref:`expected_statuses ` + // or :ref:`retriable_statuses `, + // this threshold is ignored and the host is considered immediately unhealthy. google.protobuf.UInt32Value unhealthy_threshold = 4 [(validate.rules).message = {required: true}]; // The number of healthy health checks required before a host is marked @@ -339,7 +366,7 @@ message HealthCheck { TlsOptions tls_options = 21; // Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's - // :ref:`tranport socket matches `. + // :ref:`tranport socket matches `. // For example, the following match criteria // // .. code-block:: yaml @@ -347,7 +374,7 @@ message HealthCheck { // transport_socket_match_criteria: // useMTLS: true // - // Will match the following :ref:`cluster socket match ` + // Will match the following :ref:`cluster socket match ` // // .. code-block:: yaml // @@ -360,13 +387,13 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // // If the key/values pairs specified do not match any - // :ref:`transport socket matches `, - // the cluster's :ref:`transport socket ` + // :ref:`transport socket matches `, + // the cluster's :ref:`transport socket ` // will be used for health check socket configuration. google.protobuf.Struct transport_socket_match_criteria = 23; } diff --git a/api/envoy/config/core/v3/http_uri.proto b/api/envoy/config/core/v3/http_uri.proto index 5d1fc239e0..ec0f71f905 100644 --- a/api/envoy/config/core/v3/http_uri.proto +++ b/api/envoy/config/core/v3/http_uri.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "HttpUriProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP Service URI ] diff --git a/api/envoy/config/core/v3/protocol.proto b/api/envoy/config/core/v3/protocol.proto index 1fb19088ef..37a7594fc5 100644 --- a/api/envoy/config/core/v3/protocol.proto +++ b/api/envoy/config/core/v3/protocol.proto @@ -2,11 +2,15 @@ syntax = "proto3"; package envoy.config.core.v3; +import "envoy/config/core/v3/extension.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; +import "xds/annotations/v3/status.proto"; + +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -14,6 +18,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "ProtocolProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Protocol options] @@ -24,23 +29,151 @@ message TcpProtocolOptions { "envoy.api.v2.core.TcpProtocolOptions"; } +// Config for keepalive probes in a QUIC connection. +// Note that QUIC keep-alive probing packets work differently from HTTP/2 keep-alive PINGs in a sense that the probing packet +// itself doesn't timeout waiting for a probing response. Quic has a shorter idle timeout than TCP, so it doesn't rely on such probing to discover dead connections. If the peer fails to respond, the connection will idle timeout eventually. Thus, they are configured differently from :ref:`connection_keepalive `. +message QuicKeepAliveSettings { + // The max interval for a connection to send keep-alive probing packets (with PING or PATH_RESPONSE). The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout while not less than 1s to avoid throttling the connection or flooding the peer with probes. + // + // If :ref:`initial_interval ` is absent or zero, a client connection will use this value to start probing. + // + // If zero, disable keepalive probing. + // If absent, use the QUICHE default interval to probe. + google.protobuf.Duration max_interval = 1 [(validate.rules).duration = { + lte {} + gte {seconds: 1} + }]; + + // The interval to send the first few keep-alive probing packets to prevent connection from hitting the idle timeout. Subsequent probes will be sent, each one with an interval exponentially longer than previous one, till it reaches :ref:`max_interval `. And the probes afterwards will always use :ref:`max_interval `. + // + // The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout and smaller than max_interval to take effect. + // + // If absent or zero, disable keepalive probing for a server connection. For a client connection, if :ref:`max_interval ` is also zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time. + google.protobuf.Duration initial_interval = 2 [(validate.rules).duration = { + lte {} + gte {seconds: 1} + }]; +} + +// QUIC protocol options which apply to both downstream and upstream connections. +// [#next-free-field: 6] +message QuicProtocolOptions { + // Maximum number of streams that the client can negotiate per connection. 100 + // if not specified. + google.protobuf.UInt32Value max_concurrent_streams = 1 [(validate.rules).uint32 = {gte: 1}]; + + // `Initial stream-level flow-control receive window + // `_ size. Valid values range from + // 1 to 16777216 (2^24, maximum supported by QUICHE) and defaults to 65536 (2^16). + // + // NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. If configured smaller than it, we will use 16384 instead. + // QUICHE IETF Quic implementation supports 1 bytes window. We only support increasing the default window size now, so it's also the minimum. + // + // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the + // QUIC stream send and receive buffers. Once the buffer reaches this pointer, watermark callbacks will fire to + // stop the flow of data to the stream buffers. + google.protobuf.UInt32Value initial_stream_window_size = 2 + [(validate.rules).uint32 = {lte: 16777216 gte: 1}]; + + // Similar to *initial_stream_window_size*, but for connection-level + // flow-control. Valid values rage from 1 to 25165824 (24MB, maximum supported by QUICHE) and defaults to 65536 (2^16). + // window. Currently, this has the same minimum/default as *initial_stream_window_size*. + // + // NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. We only support increasing the default + // window size now, so it's also the minimum. + google.protobuf.UInt32Value initial_connection_window_size = 3 + [(validate.rules).uint32 = {lte: 25165824 gte: 1}]; + + // The number of timeouts that can occur before port migration is triggered for QUIC clients. + // This defaults to 1. If set to 0, port migration will not occur on path degrading. + // Timeout here refers to QUIC internal path degrading timeout mechanism, such as PTO. + // This has no effect on server sessions. + google.protobuf.UInt32Value num_timeouts_to_trigger_port_migration = 4 + [(validate.rules).uint32 = {lte: 5 gte: 0}]; + + // Probes the peer at the configured interval to solicit traffic, i.e. ACK or PATH_RESPONSE, from the peer to push back connection idle timeout. + // If absent, use the default keepalive behavior of which a client connection sends PINGs every 15s, and a server connection doesn't do anything. + QuicKeepAliveSettings connection_keepalive = 5; +} + message UpstreamHttpProtocolOptions { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.UpstreamHttpProtocolOptions"; // Set transport socket `SNI `_ for new - // upstream connections based on the downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. + // upstream connections based on the downstream HTTP host/authority header or any other arbitrary + // header when :ref:`override_auto_sni_header ` + // is set, as seen by the :ref:`router filter `. bool auto_sni = 1; // Automatic validate upstream presented certificate for new upstream connections based on the - // downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - // This field is intended to set with `auto_sni` field. + // downstream HTTP host/authority header or any other arbitrary header when :ref:`override_auto_sni_header ` + // is set, as seen by the :ref:`router filter `. + // This field is intended to be set with `auto_sni` field. bool auto_san_validation = 2; + + // An optional alternative to the host/authority header to be used for setting the SNI value. + // It should be a valid downstream HTTP header, as seen by the + // :ref:`router filter `. + // If unset, host/authority header will be used for populating the SNI. If the specified header + // is not found or the value is empty, host/authority header will be used instead. + // This field is intended to be set with `auto_sni` and/or `auto_san_validation` fields. + // If none of these fields are set then setting this would be a no-op. + string override_auto_sni_header = 3 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; } -// [#next-free-field: 6] +// Configures the alternate protocols cache which tracks alternate protocols that can be used to +// make an HTTP connection to an origin server. See https://tools.ietf.org/html/rfc7838 for +// HTTP Alternative Services and https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https-04 +// for the "HTTPS" DNS resource record. +message AlternateProtocolsCacheOptions { + // Allows pre-populating the cache with HTTP/3 alternate protocols entries with a 7 day lifetime. + // This will cause Envoy to attempt HTTP/3 to those upstreams, even if the upstreams have not + // advertised HTTP/3 support. These entries will be overwritten by alt-svc + // response headers or cached values. + // As with regular cached entries, if the origin response would result in clearing an existing + // alternate protocol cache entry, pre-populated entries will also be cleared. + // Adding a cache entry with hostname=foo.com port=123 is the equivalent of getting + // response headers + // alt-svc: h3=:"123"; ma=86400" in a response to a request to foo.com:123 + message AlternateProtocolsCacheEntry { + // The host name for the alternate protocol entry. + string hostname = 1 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; + + // The port for the alternate protocol entry. + uint32 port = 2 [(validate.rules).uint32 = {lt: 65535 gt: 0}]; + } + + // The name of the cache. Multiple named caches allow independent alternate protocols cache + // configurations to operate within a single Envoy process using different configurations. All + // alternate protocols cache options with the same name *must* be equal in all fields when + // referenced from different configuration components. Configuration will fail to load if this is + // not the case. + string name = 1 [(validate.rules).string = {min_len: 1}]; + + // The maximum number of entries that the cache will hold. If not specified defaults to 1024. + // + // .. note: + // + // The implementation is approximate and enforced independently on each worker thread, thus + // it is possible for the maximum entries in the cache to go slightly above the configured + // value depending on timing. This is similar to how other circuit breakers work. + google.protobuf.UInt32Value max_entries = 2 [(validate.rules).uint32 = {gt: 0}]; + + // Allows configuring a persistent + // :ref:`key value store ` to flush + // alternate protocols entries to disk. + // This function is currently only supported if concurrency is 1 + // Cached entries will take precedence over pre-populated entries below. + TypedExtensionConfig key_value_store_config = 3; + + // Allows pre-populating the cache with entries, as described above. + repeated AlternateProtocolsCacheEntry prepopulated_entries = 4; +} + +// [#next-free-field: 7] message HttpProtocolOptions { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HttpProtocolOptions"; @@ -59,7 +192,7 @@ message HttpProtocolOptions { // is incremented for each rejected request. REJECT_REQUEST = 1; - // Drop the header with name containing underscores. The header is dropped before the filter chain is + // Drop the client header with name containing underscores. The header is dropped before the filter chain is // invoked and as such filters will not see dropped headers. The // "httpN.dropped_headers_with_underscores" is incremented for each dropped header. DROP_HEADER = 2; @@ -70,7 +203,7 @@ message HttpProtocolOptions { // idle timeout is reached the connection will be closed. If the connection is an HTTP/2 // downstream connection a drain sequence will occur prior to closing the connection, see // :ref:`drain_timeout - // `. + // `. // Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. // If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. // @@ -80,15 +213,15 @@ message HttpProtocolOptions { // // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" // is configured, this timeout is scaled for downstream connections according to the value for - // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. + // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. google.protobuf.Duration idle_timeout = 1; // The maximum duration of a connection. The duration is defined as a period since a connection // was established. If not set, there is no max duration. When max_connection_duration is reached - // the connection will be closed. Drain sequence will occur prior to closing the connection if - // if's applicable. See :ref:`drain_timeout - // `. - // Note: not implemented for upstream connections. + // and if there are no active streams, the connection will be closed. If the connection is a + // downstream connection and there are any active streams, the drain sequence will kick-in, + // and the connection will be force-closed after the drain period. See :ref:`drain_timeout + // `. google.protobuf.Duration max_connection_duration = 3; // The maximum number of headers. If unconfigured, the default @@ -103,7 +236,15 @@ message HttpProtocolOptions { // Action to take when a client request with a header name containing underscore characters is received. // If this setting is not specified, the value defaults to ALLOW. // Note: upstream responses are not affected by this setting. + // Note: this only affects client headers. It does not affect headers added + // by Envoy filters and does not have any impact if added to cluster config. HeadersWithUnderscoresAction headers_with_underscores_action = 5; + + // Optional maximum requests for both upstream and downstream connections. + // If not specified, there is no limit. + // Setting this parameter to 1 will effectively disable keep alive. + // For HTTP/2 and HTTP/3, due to concurrent stream processing, the limit is approximate. + google.protobuf.UInt32Value max_requests_per_connection = 6; } // [#next-free-field: 8] @@ -111,6 +252,7 @@ message Http1ProtocolOptions { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Http1ProtocolOptions"; + // [#next-free-field: 9] message HeaderKeyFormat { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat"; @@ -120,10 +262,9 @@ message Http1ProtocolOptions { "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords"; } + // custom message is datawire code + // remove if possible message Custom { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat.Custom"; - // Custom header rewrite rules. // In each rule of the map, the key is a case-insensitive header name. The value // is the new header value, case-sensitive. This allows for custom header @@ -143,6 +284,11 @@ message Http1ProtocolOptions { // Formats the header according to custom rules. Custom custom = 2; + + // Configuration for stateful formatter extensions that allow using received headers to + // affect the output of encoding headers. E.g., preserving case during proxying. + // [#extension-category: envoy.http.stateful_header_formatters] + TypedExtensionConfig stateful_formatter = 8; } } @@ -181,7 +327,7 @@ message Http1ProtocolOptions { // Allows Envoy to process requests/responses with both `Content-Length` and `Transfer-Encoding` // headers set. By default such messages are rejected, but if option is enabled - Envoy will // remove Content-Length header and process message. - // See `RFC7230, sec. 3.3.3 ` for details. + // See `RFC7230, sec. 3.3.3 `_ for details. // // .. attention:: // Enabling this option might lead to request smuggling vulnerability, especially if traffic @@ -199,10 +345,8 @@ message Http1ProtocolOptions { message KeepaliveSettings { // Send HTTP/2 PING frames at this period, in order to test that the connection is still alive. - google.protobuf.Duration interval = 1 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; + // If this is zero, interval PINGs will not be sent. + google.protobuf.Duration interval = 1 [(validate.rules).duration = {gte {nanos: 1000000}}]; // How long to wait for a response to a keepalive PING. If a response is not received within this // time period, the connection will be aborted. @@ -215,6 +359,16 @@ message KeepaliveSettings { // A value of zero means there will be no jitter. // The default value is 15%. type.v3.Percent interval_jitter = 3; + + // If the connection has been idle for this duration, send a HTTP/2 ping ahead + // of new stream creation, to quickly detect dead connections. + // If this is zero, this type of PING will not be sent. + // If an interval ping is outstanding, a second ping will not be sent as the + // interval ping will determine if the connection is dead. + // + // The same feature for HTTP/3 is given by inheritance from QUICHE which uses :ref:`connection idle_timeout ` and the current PTO of the connection to decide whether to probe before sending a new request. + google.protobuf.Duration connection_idle_interval = 4 + [(validate.rules).duration = {gte {nanos: 1000000}}]; } // [#next-free-field: 16] @@ -251,6 +405,10 @@ message Http2ProtocolOptions { // For upstream connections, this also limits how many streams Envoy will initiate concurrently // on a single connection. If the limit is reached, Envoy may queue requests or establish // additional connections (as allowed per circuit breaker limits). + // + // This acts as an upper bound: Envoy will lower the max concurrent streams allowed on a given + // connection based on upstream settings. Config dumps will reflect the configured upper bound, + // not the per-connection negotiated limits. google.protobuf.UInt32Value max_concurrent_streams = 2 [(validate.rules).uint32 = {lte: 2147483647 gte: 1}]; @@ -288,8 +446,6 @@ message Http2ProtocolOptions { // be written into the socket). Exceeding this limit triggers flood mitigation and connection is // terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due // to flood mitigation. The default limit is 10000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. google.protobuf.UInt32Value max_outbound_frames = 7 [(validate.rules).uint32 = {gte: 1}]; // Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, @@ -297,8 +453,6 @@ message Http2ProtocolOptions { // this limit triggers flood mitigation and connection is terminated. The // ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood // mitigation. The default limit is 1000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. google.protobuf.UInt32Value max_outbound_control_frames = 8 [(validate.rules).uint32 = {gte: 1}]; // Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an @@ -307,35 +461,35 @@ message Http2ProtocolOptions { // stat tracks the number of connections terminated due to flood mitigation. // Setting this to 0 will terminate connection upon receiving first frame with an empty payload // and no end stream flag. The default limit is 1. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. google.protobuf.UInt32Value max_consecutive_inbound_frames_with_empty_payload = 9; // Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number // of PRIORITY frames received over the lifetime of connection exceeds the value calculated // using this formula:: // - // max_inbound_priority_frames_per_stream * (1 + inbound_streams) + // max_inbound_priority_frames_per_stream * (1 + opened_streams) // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks + // the connection is terminated. For downstream connections the `opened_streams` is incremented when + // Envoy receives complete response headers from the upstream server. For upstream connection the + // `opened_streams` is incremented when Envoy send the HEADERS frame for a new stream. The + // ``http2.inbound_priority_frames_flood`` stat tracks // the number of connections terminated due to flood mitigation. The default limit is 100. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. google.protobuf.UInt32Value max_inbound_priority_frames_per_stream = 10; // Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number // of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated // using this formula:: // - // 1 + 2 * (inbound_streams + - // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) + // 5 + 2 * (opened_streams + + // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 10. + // the connection is terminated. For downstream connections the `opened_streams` is incremented when + // Envoy receives complete response headers from the upstream server. For upstream connections the + // `opened_streams` is incremented when Envoy sends the HEADERS frame for a new stream. The + // ``http2.inbound_priority_frames_flood`` stat tracks the number of connections terminated due to + // flood mitigation. The default max_inbound_window_update_frames_per_data_frame_sent value is 10. // Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, // but more complex implementations that try to estimate available bandwidth require at least 2. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. google.protobuf.UInt32Value max_inbound_window_update_frames_per_data_frame_sent = 11 [(validate.rules).uint32 = {gte: 1}]; @@ -351,7 +505,8 @@ message Http2ProtocolOptions { // ` // // See `RFC7540, sec. 8.1 `_ for details. - bool stream_error_on_invalid_http_messaging = 12 [deprecated = true]; + bool stream_error_on_invalid_http_messaging = 12 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Allows invalid HTTP messaging and headers. When this option is disabled (default), then // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, @@ -403,3 +558,33 @@ message GrpcProtocolOptions { Http2ProtocolOptions http2_protocol_options = 1; } + +// A message which allows using HTTP/3. +// [#next-free-field: 6] +message Http3ProtocolOptions { + QuicProtocolOptions quic_protocol_options = 1; + + // Allows invalid HTTP messaging and headers. When this option is disabled (default), then + // the whole HTTP/3 connection is terminated upon receiving invalid HEADERS frame. However, + // when this option is enabled, only the offending stream is terminated. + // + // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging + // `. + google.protobuf.BoolValue override_stream_error_on_invalid_http_message = 2; + + // Allows proxying Websocket and other upgrades over HTTP/3 CONNECT using + // the header mechanisms from the `HTTP/2 extended connect RFC + // `_ + // and settings `proposed for HTTP/3 + // `_ + // Note that HTTP/3 CONNECT is not yet an RFC. + bool allow_extended_connect = 5 [(xds.annotations.v3.field_status).work_in_progress = true]; +} + +// A message to control transformations to the :scheme header +message SchemeHeaderTransformation { + oneof transformation { + // Overwrite any Scheme header with the contents of this string. + string scheme_to_overwrite = 1 [(validate.rules).string = {in: "http" in: "https"}]; + } +} diff --git a/api/envoy/config/core/v3/proxy_protocol.proto b/api/envoy/config/core/v3/proxy_protocol.proto index 225a8971f2..9cfdbe5f66 100644 --- a/api/envoy/config/core/v3/proxy_protocol.proto +++ b/api/envoy/config/core/v3/proxy_protocol.proto @@ -3,11 +3,11 @@ syntax = "proto3"; package envoy.config.core.v3; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "ProxyProtocolProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Proxy Protocol] diff --git a/api/envoy/config/core/v3/resolver.proto b/api/envoy/config/core/v3/resolver.proto new file mode 100644 index 0000000000..f4d103ab03 --- /dev/null +++ b/api/envoy/config/core/v3/resolver.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package envoy.config.core.v3; + +import "envoy/config/core/v3/address.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.core.v3"; +option java_outer_classname = "ResolverProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Resolver] + +// Configuration of DNS resolver option flags which control the behavior of the DNS resolver. +message DnsResolverOptions { + // Use TCP for all DNS queries instead of the default protocol UDP. + bool use_tcp_for_dns_lookups = 1; + + // Do not use the default search domains; only query hostnames as-is or as aliases. + bool no_default_search_domain = 2; +} + +// DNS resolution configuration which includes the underlying dns resolver addresses and options. +message DnsResolutionConfig { + // A list of dns resolver addresses. If specified, the DNS client library will perform resolution + // via the underlying DNS resolvers. Otherwise, the default system resolvers + // (e.g., /etc/resolv.conf) will be used. + repeated Address resolvers = 1 [(validate.rules).repeated = {min_items: 1}]; + + // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. + DnsResolverOptions dns_resolver_options = 2; +} diff --git a/api/envoy/config/core/v3/socket_option.proto b/api/envoy/config/core/v3/socket_option.proto index b22169b86a..b165a1c740 100644 --- a/api/envoy/config/core/v3/socket_option.proto +++ b/api/envoy/config/core/v3/socket_option.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "SocketOptionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Socket Option ] diff --git a/api/envoy/config/core/v3/substitution_format_string.proto b/api/envoy/config/core/v3/substitution_format_string.proto index fa14db45dd..c3a213a1ca 100644 --- a/api/envoy/config/core/v3/substitution_format_string.proto +++ b/api/envoy/config/core/v3/substitution_format_string.proto @@ -3,22 +3,25 @@ syntax = "proto3"; package envoy.config.core.v3; import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/extension.proto"; import "google/protobuf/struct.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.core.v3"; option java_outer_classname = "SubstitutionFormatStringProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Substitution format string] // Configuration to use multiple :ref:`command operators ` // to generate a new string in either plain text or JSON format. -// [#next-free-field: 6] +// [#next-free-field: 7] message SubstitutionFormatString { oneof format { option (validate.required) = true; @@ -40,7 +43,8 @@ message SubstitutionFormatString { // upstream connect error:503:path=/foo // // Deprecated in favor of :ref:`text_format_source `. To migrate text format strings, use the :ref:`inline_string ` field. - string text_format = 1 [deprecated = true]; + string text_format = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Specify a format with command operators to form a JSON string. // Its details is described in :ref:`format dictionary`. @@ -103,4 +107,9 @@ message SubstitutionFormatString { // content_type: "text/html; charset=UTF-8" // string content_type = 4; + + // Specifies a collection of Formatter plugins that can be called from the access log configuration. + // See the formatters extensions documentation for details. + // [#extension-category: envoy.formatter] + repeated TypedExtensionConfig formatters = 6; } diff --git a/api/envoy/config/core/v3/udp_socket_config.proto b/api/envoy/config/core/v3/udp_socket_config.proto new file mode 100644 index 0000000000..ec9f77f068 --- /dev/null +++ b/api/envoy/config/core/v3/udp_socket_config.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +package envoy.config.core.v3; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.core.v3"; +option java_outer_classname = "UdpSocketConfigProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: UDP socket config] + +// Generic UDP socket configuration. +message UdpSocketConfig { + // The maximum size of received UDP datagrams. Using a larger size will cause Envoy to allocate + // more memory per socket. Received datagrams above this size will be dropped. If not set + // defaults to 1500 bytes. + google.protobuf.UInt64Value max_rx_datagram_size = 1 + [(validate.rules).uint64 = {lt: 65536 gt: 0}]; + + // Configures whether Generic Receive Offload (GRO) + // _ is preferred when reading from the + // UDP socket. The default is context dependent and is documented where UdpSocketConfig is used. + // This option affects performance but not functionality. If GRO is not supported by the operating + // system, non-GRO receive will be used. + google.protobuf.BoolValue prefer_gro = 2; +} diff --git a/api/envoy/config/core/v4alpha/address.proto b/api/envoy/config/core/v4alpha/address.proto deleted file mode 100644 index 6ae8235950..0000000000 --- a/api/envoy/config/core/v4alpha/address.proto +++ /dev/null @@ -1,163 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/socket_option.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "AddressProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Network addresses] - -message Pipe { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Pipe"; - - // 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. - string path = 1 [(validate.rules).string = {min_len: 1}]; - - // The mode for the Pipe. Not applicable for abstract sockets. - uint32 mode = 2 [(validate.rules).uint32 = {lte: 511}]; -} - -// [#not-implemented-hide:] The address represents an envoy internal listener. -// TODO(lambdai): Make this address available for listener and endpoint. -// TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30. -message EnvoyInternalAddress { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.EnvoyInternalAddress"; - - oneof address_name_specifier { - option (validate.required) = true; - - // [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. - string server_listener_name = 1; - } -} - -// [#next-free-field: 7] -message SocketAddress { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.SocketAddress"; - - enum Protocol { - TCP = 0; - UDP = 1; - } - - Protocol protocol = 1 [(validate.rules).enum = {defined_only: true}]; - - // 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 `. - string address = 2 [(validate.rules).string = {min_len: 1}]; - - oneof port_specifier { - option (validate.required) = true; - - uint32 port_value = 3 [(validate.rules).uint32 = {lte: 65535}]; - - // This is only valid if :ref:`resolver_name - // ` is specified below and the - // named resolver is capable of named port resolution. - string named_port = 4; - } - - // The name of the custom resolver. This must have been registered with Envoy. If - // this is empty, a context dependent default applies. If the address is a concrete - // IP address, no resolution will occur. If address is a hostname this - // should be set for resolution other than DNS. Specifying a custom resolver with - // *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime. - string resolver_name = 5; - - // 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:``. - bool ipv4_compat = 6; -} - -message TcpKeepalive { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.TcpKeepalive"; - - // 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.) - google.protobuf.UInt32Value keepalive_probes = 1; - - // The number of seconds a connection needs to be idle before keep-alive probes - // start being sent. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 7200s (i.e., 2 hours.) - google.protobuf.UInt32Value keepalive_time = 2; - - // The number of seconds between keep-alive probes. Default is to use the OS - // level configuration (unless overridden, Linux defaults to 75s.) - google.protobuf.UInt32Value keepalive_interval = 3; -} - -message BindConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.BindConfig"; - - // The address to bind to when creating a socket. - SocketAddress source_address = 1 [(validate.rules).message = {required: true}]; - - // 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. - google.protobuf.BoolValue freebind = 2; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated SocketOption socket_options = 3; -} - -// 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. -message Address { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Address"; - - oneof address { - option (validate.required) = true; - - SocketAddress socket_address = 1; - - Pipe pipe = 2; - - // [#not-implemented-hide:] - EnvoyInternalAddress envoy_internal_address = 3; - } -} - -// CidrRange specifies an IP Address and a prefix length to construct -// the subnet mask for a `CIDR `_ range. -message CidrRange { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.CidrRange"; - - // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. - string address_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Length of prefix, e.g. 0, 32. - google.protobuf.UInt32Value prefix_len = 2 [(validate.rules).uint32 = {lte: 128}]; -} diff --git a/api/envoy/config/core/v4alpha/backoff.proto b/api/envoy/config/core/v4alpha/backoff.proto deleted file mode 100644 index 07a2bdff17..0000000000 --- a/api/envoy/config/core/v4alpha/backoff.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "BackoffProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Backoff Strategy] - -// Configuration defining a jittered exponential back off strategy. -message BackoffStrategy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.BackoffStrategy"; - - // The base interval to be used for the next back off computation. It should - // be greater than zero and less than or equal to :ref:`max_interval - // `. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; - - // Specifies the maximum interval between retries. This parameter is optional, - // but must be greater than or equal to the :ref:`base_interval - // ` if set. The default - // is 10 times the :ref:`base_interval - // `. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; -} diff --git a/api/envoy/config/core/v4alpha/base.proto b/api/envoy/config/core/v4alpha/base.proto deleted file mode 100644 index 6a967b1ae5..0000000000 --- a/api/envoy/config/core/v4alpha/base.proto +++ /dev/null @@ -1,436 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/backoff.proto"; -import "envoy/config/core/v4alpha/http_uri.proto"; -import "envoy/type/v3/percent.proto"; -import "envoy/type/v3/semantic_version.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "BaseProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Common types] - -// 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. -enum RoutingPriority { - DEFAULT = 0; - HIGH = 1; -} - -// HTTP request method. -enum RequestMethod { - METHOD_UNSPECIFIED = 0; - GET = 1; - HEAD = 2; - POST = 3; - PUT = 4; - DELETE = 5; - CONNECT = 6; - OPTIONS = 7; - TRACE = 8; - PATCH = 9; -} - -// Identifies the direction of the traffic relative to the local Envoy. -enum TrafficDirection { - // Default option is unspecified. - UNSPECIFIED = 0; - - // The transport is used for incoming traffic. - INBOUND = 1; - - // The transport is used for outgoing traffic. - OUTBOUND = 2; -} - -// Identifies location of where either Envoy runs or where upstream hosts run. -message Locality { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Locality"; - - // Region this :ref:`zone ` belongs to. - string region = 1; - - // 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. - string zone = 2; - - // 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. - string sub_zone = 3; -} - -// BuildVersion combines SemVer version of extension with free-form build information -// (i.e. 'alpha', 'private-build') as a set of strings. -message BuildVersion { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.BuildVersion"; - - // SemVer version of extension. - type.v3.SemanticVersion version = 1; - - // Free-form build information. - // Envoy defines several well known keys in the source/common/version/version.h file - google.protobuf.Struct metadata = 2; -} - -// Version and identification for an Envoy extension. -// [#next-free-field: 6] -message Extension { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Extension"; - - // This is the name of the Envoy filter as specified in the Envoy - // configuration, e.g. envoy.filters.http.router, com.acme.widget. - string name = 1; - - // Category of the extension. - // Extension category names use reverse DNS notation. For instance "envoy.filters.listener" - // for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from - // acme.com vendor. - // [#comment:TODO(yanavlasov): Link to the doc with existing envoy category names.] - string category = 2; - - // [#not-implemented-hide:] Type descriptor of extension configuration proto. - // [#comment:TODO(yanavlasov): Link to the doc with existing configuration protos.] - // [#comment:TODO(yanavlasov): Add tests when PR #9391 lands.] - string type_descriptor = 3; - - // The version is a property of the extension and maintained independently - // of other extensions and the Envoy API. - // This field is not set when extension did not provide version information. - BuildVersion version = 4; - - // Indicates that the extension is present but was disabled via dynamic configuration. - bool disabled = 5; -} - -// Identifies a specific Envoy instance. The node identifier is presented to the -// management server, which may use this identifier to distinguish per Envoy -// configuration for serving. -// [#next-free-field: 12] -message Node { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Node"; - - reserved 5, 11; - - reserved "build_version", "listening_addresses"; - - // 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`. - string id = 1; - - // 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`. - string cluster = 2; - - // Opaque metadata extending the node identifier. Envoy will pass this - // directly to the management server. - google.protobuf.Struct metadata = 3; - - // Locality specifying where the Envoy instance is running. - Locality locality = 4; - - // Free-form string that identifies the entity requesting config. - // E.g. "envoy" or "grpc" - string user_agent_name = 6; - - oneof user_agent_version_type { - // Free-form string that identifies the version of the entity requesting config. - // E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" - string user_agent_version = 7; - - // Structured version of the entity requesting config. - BuildVersion user_agent_build_version = 8; - } - - // List of extensions and their versions supported by the node. - repeated Extension extensions = 9; - - // Client feature support list. These are well known features described - // in the Envoy API repository for a given major version of an API. Client features - // use reverse DNS naming scheme, for example `com.acme.feature`. - // See :ref:`the list of features ` that xDS client may - // support. - repeated string client_features = 10; -} - -// Metadata provides additional inputs to filters based on matched listeners, -// filter chains, routes and endpoints. It is structured as a map, usually from -// filter name (in reverse DNS format) to metadata specific to the filter. Metadata -// key-values for a filter are merged as connection and request handling occurs, -// with later values for the same key overriding earlier values. -// -// An example use of metadata is providing additional values to -// http_connection_manager in the envoy.http_connection_manager.access_log -// namespace. -// -// Another example use of metadata is to per service config info in cluster metadata, which may get -// consumed by multiple filters. -// -// For load balancing, Metadata provides a means to subset cluster endpoints. -// Endpoints have a Metadata object associated and routes contain a Metadata -// object to match against. There are some well defined metadata used today for -// this purpose: -// -// * ``{"envoy.lb": {"canary": }}`` This indicates the canary status of an -// endpoint and is also used during header processing -// (x-envoy-upstream-canary) and for stats purposes. -// [#next-major-version: move to type/metadata/v2] -message Metadata { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Metadata"; - - // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* - // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; -} - -// Runtime derived uint32 with a default when not specified. -message RuntimeUInt32 { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.RuntimeUInt32"; - - // Default value if runtime value is not available. - uint32 default_value = 2; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 3 [(validate.rules).string = {min_len: 1}]; -} - -// Runtime derived percentage with a default when not specified. -message RuntimePercent { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.RuntimePercent"; - - // Default value if runtime value is not available. - type.v3.Percent default_value = 1; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Runtime derived double with a default when not specified. -message RuntimeDouble { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.RuntimeDouble"; - - // Default value if runtime value is not available. - double default_value = 1; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Runtime derived bool with a default when not specified. -message RuntimeFeatureFlag { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.RuntimeFeatureFlag"; - - // Default value if runtime value is not available. - google.protobuf.BoolValue default_value = 1 [(validate.rules).message = {required: true}]; - - // Runtime key to get value for comparison. This value is used if defined. The boolean value must - // be represented via its - // `canonical JSON encoding `_. - string runtime_key = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Header name/value pair. -message HeaderValue { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.HeaderValue"; - - // Header name. - string key = 1 - [(validate.rules).string = - {min_len: 1 max_bytes: 16384 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // 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 `-`. - string value = 2 [ - (validate.rules).string = {max_bytes: 16384 well_known_regex: HTTP_HEADER_VALUE strict: false} - ]; -} - -// Header name/value pair plus option to control append behavior. -message HeaderValueOption { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HeaderValueOption"; - - // Header name/value pair that this option applies to. - HeaderValue header = 1 [(validate.rules).message = {required: true}]; - - // Should the value be appended? If true (default), the value is appended to - // existing values. Otherwise it replaces any existing values. - google.protobuf.BoolValue append = 2; -} - -// Wrapper for a set of headers. -message HeaderMap { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.HeaderMap"; - - repeated HeaderValue headers = 1; -} - -// A directory that is watched for changes, e.g. by inotify on Linux. Move/rename -// events inside this directory trigger the watch. -message WatchedDirectory { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.WatchedDirectory"; - - // Directory path to watch. - string path = 1 [(validate.rules).string = {min_len: 1}]; -} - -// Data source consisting of either a file or an inline value. -message DataSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.DataSource"; - - oneof specifier { - option (validate.required) = true; - - // Local filesystem data source. - string filename = 1 [(validate.rules).string = {min_len: 1}]; - - // Bytes inlined in the configuration. - bytes inline_bytes = 2; - - // String inlined in the configuration. - string inline_string = 3; - } -} - -// The message specifies the retry policy of remote data source when fetching fails. -message RetryPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.RetryPolicy"; - - // Specifies parameters that control :ref:`retry backoff strategy `. - // This parameter is optional, in which case the default base interval is 1000 milliseconds. The - // default maximum interval is 10 times the base interval. - BackoffStrategy retry_back_off = 1; - - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. - google.protobuf.UInt32Value max_retries = 2; -} - -// The message specifies how to fetch data from remote and how to verify it. -message RemoteDataSource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.RemoteDataSource"; - - // The HTTP URI to fetch the remote data. - HttpUri http_uri = 1 [(validate.rules).message = {required: true}]; - - // SHA256 string for verifying data. - string sha256 = 2 [(validate.rules).string = {min_len: 1}]; - - // Retry policy for fetching remote data. - RetryPolicy retry_policy = 3; -} - -// Async data source which support async data fetch. -message AsyncDataSource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.AsyncDataSource"; - - oneof specifier { - option (validate.required) = true; - - // Local async data source. - DataSource local = 1; - - // Remote async data source. - RemoteDataSource remote = 2; - } -} - -// 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. -message TransportSocket { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.TransportSocket"; - - reserved 2; - - reserved "config"; - - // The name of the transport socket to instantiate. The name must match a supported transport - // socket implementation. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Implementation specific configuration which depends on the implementation being instantiated. - // See the supported transport socket implementations for further documentation. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not -// specified via a runtime key. -// -// .. note:: -// -// Parsing of the runtime key's data is implemented such that it may be represented as a -// :ref:`FractionalPercent ` proto represented as JSON/YAML -// and may also be represented as an integer with the assumption that the value is an integral -// percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse -// as a `FractionalPercent` whose numerator is 42 and denominator is HUNDRED. -message RuntimeFractionalPercent { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.RuntimeFractionalPercent"; - - // Default value if the runtime value's for the numerator/denominator keys are not available. - type.v3.FractionalPercent default_value = 1 [(validate.rules).message = {required: true}]; - - // Runtime key for a YAML representation of a FractionalPercent. - string runtime_key = 2; -} - -// Identifies a specific ControlPlane instance that Envoy is connected to. -message ControlPlane { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.ControlPlane"; - - // 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. - string identifier = 1; -} diff --git a/api/envoy/config/core/v4alpha/config_source.proto b/api/envoy/config/core/v4alpha/config_source.proto deleted file mode 100644 index 121a20e6ed..0000000000 --- a/api/envoy/config/core/v4alpha/config_source.proto +++ /dev/null @@ -1,216 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/authority.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "ConfigSourceProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Configuration sources] - -// xDS API and non-xDS services version. This is used to describe both resource and transport -// protocol versions (in distinct configuration fields). -enum ApiVersion { - reserved 1; - - reserved "V2"; - - // When not specified, we assume v2, to ease migration to Envoy's stable API - // versioning. If a client does not support v2 (e.g. due to deprecation), this - // is an invalid value. - DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0 [deprecated = true]; - - // Use xDS v3 API. - V3 = 2; -} - -// API configuration source. This identifies the API type and cluster that Envoy -// will use to fetch an xDS API. -// [#next-free-field: 9] -message ApiConfigSource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.ApiConfigSource"; - - // APIs may be fetched via either REST or gRPC. - enum ApiType { - // Ideally this would be 'reserved 0' but one can't reserve the default - // value. Instead we throw an exception if this is ever used. - DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0 - [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; - - // REST-JSON v2 API. The `canonical JSON encoding - // `_ for - // the v2 protos is used. - REST = 1; - - // SotW gRPC service. - GRPC = 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 = 3; - - // SotW xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - AGGREGATED_GRPC = 5; - - // Delta xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - AGGREGATED_DELTA_GRPC = 6; - } - - // API type (gRPC, REST, delta gRPC) - ApiType api_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - ApiVersion transport_api_version = 8 [(validate.rules).enum = {defined_only: true}]; - - // 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``. - repeated string cluster_names = 2; - - // Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, - // services will be cycled through if any kind of failure occurs. - repeated GrpcService grpc_services = 4; - - // For REST APIs, the delay between successive polls. - google.protobuf.Duration refresh_delay = 3; - - // For REST APIs, the request timeout. If not set, a default value of 1s will be used. - google.protobuf.Duration request_timeout = 5 [(validate.rules).duration = {gt {}}]; - - // For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be - // rate limited. - RateLimitSettings rate_limit_settings = 6; - - // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. - bool set_node_on_first_message_only = 7; -} - -// 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. -message AggregatedConfigSource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.AggregatedConfigSource"; -} - -// [#not-implemented-hide:] -// Self-referencing config source options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that other data can be obtained from the same server. -message SelfConfigSource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.SelfConfigSource"; - - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - ApiVersion transport_api_version = 1 [(validate.rules).enum = {defined_only: true}]; -} - -// Rate Limit settings to be applied for discovery requests made by Envoy. -message RateLimitSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.RateLimitSettings"; - - // Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a - // default value of 100 will be used. - google.protobuf.UInt32Value max_tokens = 1; - - // Rate at which tokens will be filled per second. If not set, a default fill rate of 10 tokens - // per second will be used. - google.protobuf.DoubleValue fill_rate = 2 [(validate.rules).double = {gt: 0.0}]; -} - -// Configuration for :ref:`listeners `, :ref:`clusters -// `, :ref:`routes -// `, :ref:`endpoints -// ` etc. may either be sourced from the -// filesystem or from an xDS API source. Filesystem configs are watched with -// inotify for updates. -// [#next-free-field: 8] -message ConfigSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.ConfigSource"; - - // Authorities that this config source may be used for. An authority specified in a xdstp:// URL - // is resolved to a *ConfigSource* prior to configuration fetch. This field provides the - // association between authority name and configuration source. - // [#not-implemented-hide:] - repeated xds.core.v3.Authority authorities = 7; - - oneof config_source_specifier { - option (validate.required) = true; - - // Path on the filesystem to source and watch for configuration updates. - // When sourcing configuration for :ref:`secret `, - // the certificate and key files are also watched for updates. - // - // .. note:: - // - // The path to the source must exist at config load time. - // - // .. note:: - // - // Envoy will only watch the file path for *moves.* This is because in general only moves - // are atomic. The same method of swapping files as is demonstrated in the - // :ref:`runtime documentation ` can be used here also. - string path = 1; - - // API configuration source. - ApiConfigSource api_config_source = 2; - - // When set, ADS will be used to fetch resources. The ADS API configuration - // source in the bootstrap configuration is used. - AggregatedConfigSource ads = 3; - - // [#not-implemented-hide:] - // When set, the client will access the resources from the same server it got the - // ConfigSource from, although not necessarily from the same stream. This is similar to the - // :ref:`ads` field, except that the client may use a - // different stream to the same server. As a result, this field can be used for things - // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) - // LDS to RDS on the same server without requiring the management server to know its name - // or required credentials. - // [#next-major-version: In xDS v3, consider replacing the ads field with this one, since - // this field can implicitly mean to use the same stream in the case where the ConfigSource - // is provided via ADS and the specified data can also be obtained via ADS.] - SelfConfigSource self = 5; - } - - // When this timeout is specified, Envoy will wait no longer than the specified time for first - // config response on this xDS subscription during the :ref:`initialization process - // `. After reaching the timeout, Envoy will move to the next - // initialization phase, even if the first config is not delivered yet. The timer is activated - // when the xDS API subscription starts, and is disarmed on first config update or on error. 0 - // means no timeout - Envoy will wait indefinitely for the first xDS config (unless another - // timeout applies). The default is 15s. - google.protobuf.Duration initial_fetch_timeout = 4; - - // API version for xDS resources. This implies the type URLs that the client - // will request for resources and the resource type that the client will in - // turn expect to be delivered. - ApiVersion resource_api_version = 6 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/api/envoy/config/core/v4alpha/event_service_config.proto b/api/envoy/config/core/v4alpha/event_service_config.proto deleted file mode 100644 index a0b4e5590d..0000000000 --- a/api/envoy/config/core/v4alpha/event_service_config.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "EventServiceConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#not-implemented-hide:] -// Configuration of the event reporting service endpoint. -message EventServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.EventServiceConfig"; - - oneof config_source_specifier { - option (validate.required) = true; - - // Specifies the gRPC service that hosts the event reporting service. - GrpcService grpc_service = 1; - } -} diff --git a/api/envoy/config/core/v4alpha/extension.proto b/api/envoy/config/core/v4alpha/extension.proto deleted file mode 100644 index 4de107580d..0000000000 --- a/api/envoy/config/core/v4alpha/extension.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/config_source.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "ExtensionProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Extension configuration] - -// Message type for extension configuration. -// [#next-major-version: revisit all existing typed_config that doesn't use this wrapper.]. -message TypedExtensionConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.TypedExtensionConfig"; - - // The name of an extension. This is not used to select the extension, instead - // it serves the role of an opaque identifier. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The typed config for the extension. The type URL will be used to identify - // the extension. In the case that the type URL is *udpa.type.v1.TypedStruct*, - // the inner type URL of *TypedStruct* will be utilized. See the - // :ref:`extension configuration overview - // ` for further details. - google.protobuf.Any typed_config = 2 [(validate.rules).any = {required: true}]; -} - -// Configuration source specifier for a late-bound extension configuration. The -// parent resource is warmed until all the initial extension configurations are -// received, unless the flag to apply the default configuration is set. -// Subsequent extension updates are atomic on a per-worker basis. Once an -// extension configuration is applied to a request or a connection, it remains -// constant for the duration of processing. If the initial delivery of the -// extension configuration fails, due to a timeout for example, the optional -// default configuration is applied. Without a default configuration, the -// extension is disabled, until an extension configuration is received. The -// behavior of a disabled extension depends on the context. For example, a -// filter chain with a disabled extension filter rejects all incoming streams. -message ExtensionConfigSource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.ExtensionConfigSource"; - - ConfigSource config_source = 1 [(validate.rules).any = {required: true}]; - - // Optional default configuration to use as the initial configuration if - // there is a failure to receive the initial extension configuration or if - // `apply_default_config_without_warming` flag is set. - google.protobuf.Any default_config = 2; - - // Use the default config as the initial configuration without warming and - // waiting for the first discovery response. Requires the default configuration - // to be supplied. - bool apply_default_config_without_warming = 3; - - // A set of permitted extension type URLs. Extension configuration updates are rejected - // if they do not match any type URL in the set. - repeated string type_urls = 4 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/api/envoy/config/core/v4alpha/grpc_method_list.proto b/api/envoy/config/core/v4alpha/grpc_method_list.proto deleted file mode 100644 index 371ea32c10..0000000000 --- a/api/envoy/config/core/v4alpha/grpc_method_list.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "GrpcMethodListProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC method list] - -// A list of gRPC methods which can be used as an allowlist, for example. -message GrpcMethodList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcMethodList"; - - message Service { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcMethodList.Service"; - - // The name of the gRPC service. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The names of the gRPC methods in this service. - repeated string method_names = 2 [(validate.rules).repeated = {min_items: 1}]; - } - - repeated Service services = 1; -} diff --git a/api/envoy/config/core/v4alpha/grpc_service.proto b/api/envoy/config/core/v4alpha/grpc_service.proto deleted file mode 100644 index 9ea35b4564..0000000000 --- a/api/envoy/config/core/v4alpha/grpc_service.proto +++ /dev/null @@ -1,301 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "GrpcServiceProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC services] - -// gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. -// [#next-free-field: 6] -message GrpcService { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.GrpcService"; - - message EnvoyGrpc { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.EnvoyGrpc"; - - // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`transport_socket - // `. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The `:authority` header in the grpc request. If this field is not set, the authority header value will be `cluster_name`. - // Note that this authority does not override the SNI. The SNI is provided by the transport socket of the cluster. - string authority = 2 - [(validate.rules).string = - {min_len: 0 max_bytes: 16384 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - - // [#next-free-field: 9] - message GoogleGrpc { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc"; - - // See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. - message SslCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.SslCredentials"; - - // PEM encoded server root certificates. - DataSource root_certs = 1; - - // PEM encoded client private key. - DataSource private_key = 2 [(udpa.annotations.sensitive) = true]; - - // PEM encoded client certificate chain. - DataSource cert_chain = 3; - } - - // Local channel credentials. Only UDS is supported for now. - // See https://github.com/grpc/grpc/pull/15909. - message GoogleLocalCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.GoogleLocalCredentials"; - } - - // See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call - // credential types. - message ChannelCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelCredentials"; - - oneof credential_specifier { - option (validate.required) = true; - - SslCredentials ssl_credentials = 1; - - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - google.protobuf.Empty google_default = 2; - - GoogleLocalCredentials local_credentials = 3; - } - } - - // [#next-free-field: 8] - message CallCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials"; - - message ServiceAccountJWTAccessCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials." - "ServiceAccountJWTAccessCredentials"; - - string json_key = 1; - - uint64 token_lifetime_seconds = 2; - } - - message GoogleIAMCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials"; - - string authorization_token = 1; - - string authority_selector = 2; - } - - message MetadataCredentialsFromPlugin { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials." - "MetadataCredentialsFromPlugin"; - - reserved 2; - - reserved "config"; - - string name = 1; - - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - // Security token service configuration that allows Google gRPC to - // fetch security token from an OAuth 2.0 authorization server. - // See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and - // https://github.com/grpc/grpc/pull/19587. - // [#next-free-field: 10] - message StsService { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.StsService"; - - // URI of the token exchange service that handles token exchange requests. - // [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - // https://github.com/envoyproxy/protoc-gen-validate/issues/303] - string token_exchange_service_uri = 1; - - // Location of the target service or resource where the client - // intends to use the requested security token. - string resource = 2; - - // Logical name of the target service where the client intends to - // use the requested security token. - string audience = 3; - - // The desired scope of the requested security token in the - // context of the service or resource where the token will be used. - string scope = 4; - - // Type of the requested security token. - string requested_token_type = 5; - - // The path of subject token, a security token that represents the - // identity of the party on behalf of whom the request is being made. - string subject_token_path = 6 [(validate.rules).string = {min_len: 1}]; - - // Type of the subject token. - string subject_token_type = 7 [(validate.rules).string = {min_len: 1}]; - - // The path of actor token, a security token that represents the identity - // of the acting party. The acting party is authorized to use the - // requested security token and act on behalf of the subject. - string actor_token_path = 8; - - // Type of the actor token. - string actor_token_type = 9; - } - - oneof credential_specifier { - option (validate.required) = true; - - // Access token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#ad3a80da696ffdaea943f0f858d7a360d. - string access_token = 1; - - // Google Compute Engine credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - google.protobuf.Empty google_compute_engine = 2; - - // Google refresh token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a96901c997b91bc6513b08491e0dca37c. - string google_refresh_token = 3; - - // Service Account JWT Access credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a92a9f959d6102461f66ee973d8e9d3aa. - ServiceAccountJWTAccessCredentials service_account_jwt_access = 4; - - // Google IAM credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a9fc1fc101b41e680d47028166e76f9d0. - GoogleIAMCredentials google_iam = 5; - - // Custom authenticator credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a823c6a4b19ffc71fb33e90154ee2ad07. - // https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms. - MetadataCredentialsFromPlugin from_plugin = 6; - - // Custom security token service which implements OAuth 2.0 token exchange. - // https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 - // See https://github.com/grpc/grpc/pull/19587. - StsService sts_service = 7; - } - } - - // Channel arguments. - message ChannelArgs { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs"; - - message Value { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.Value"; - - // Pointer values are not supported, since they don't make any sense when - // delivered via the API. - oneof value_specifier { - option (validate.required) = true; - - string string_value = 1; - - int64 int_value = 2; - } - } - - // See grpc_types.h GRPC_ARG #defines for keys that work here. - map args = 1; - } - - // The target URI when using the `Google C++ gRPC client - // `_. SSL credentials will be supplied in - // :ref:`channel_credentials `. - string target_uri = 1 [(validate.rules).string = {min_len: 1}]; - - ChannelCredentials channel_credentials = 2; - - // A set of call credentials that can be composed with `channel credentials - // `_. - repeated CallCredentials call_credentials = 3; - - // 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 - string stat_prefix = 4 [(validate.rules).string = {min_len: 1}]; - - // 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. - string credentials_factory_name = 5; - - // Additional configuration for site-specific customizations of the Google - // gRPC library. - google.protobuf.Struct config = 6; - - // How many bytes each stream can buffer internally. - // If not set an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_stream_buffer_limit_bytes = 7; - - // Custom channels args. - ChannelArgs channel_args = 8; - } - - reserved 4; - - oneof target_specifier { - option (validate.required) = true; - - // Envoy's in-built gRPC client. - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - EnvoyGrpc envoy_grpc = 1; - - // `Google C++ gRPC client `_ - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - GoogleGrpc google_grpc = 2; - } - - // The timeout for the gRPC request. This is the timeout for a specific - // request. - google.protobuf.Duration timeout = 3; - - // Additional metadata to include in streams initiated to the GrpcService. This can be used for - // scenarios in which additional ad hoc authorization headers (e.g. ``x-foo-bar: baz-key``) are to - // be injected. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers - // `. - repeated HeaderValue initial_metadata = 5; -} diff --git a/api/envoy/config/core/v4alpha/health_check.proto b/api/envoy/config/core/v4alpha/health_check.proto deleted file mode 100644 index 2761b856a3..0000000000 --- a/api/envoy/config/core/v4alpha/health_check.proto +++ /dev/null @@ -1,372 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/event_service_config.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; -import "envoy/type/v3/http.proto"; -import "envoy/type/v3/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "HealthCheckProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Health check] -// * Health checking :ref:`architecture overview `. -// * If health checking is configured for a cluster, additional statistics are emitted. They are -// documented :ref:`here `. - -// Endpoint health status. -enum HealthStatus { - // The health status is not known. This is interpreted by Envoy as *HEALTHY*. - UNKNOWN = 0; - - // Healthy. - HEALTHY = 1; - - // Unhealthy. - UNHEALTHY = 2; - - // Connection draining in progress. E.g., - // ``_ - // or - // ``_. - // This is interpreted by Envoy as *UNHEALTHY*. - DRAINING = 3; - - // Health check timed out. This is part of HDS and is interpreted by Envoy as - // *UNHEALTHY*. - TIMEOUT = 4; - - // Degraded. - DEGRADED = 5; -} - -// [#next-free-field: 25] -message HealthCheck { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.HealthCheck"; - - // Describes the encoding of the payload bytes in the payload. - message Payload { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HealthCheck.Payload"; - - oneof payload { - option (validate.required) = true; - - // Hex encoded payload. E.g., "000000FF". - string text = 1 [(validate.rules).string = {min_len: 1}]; - - // [#not-implemented-hide:] Binary payload. - bytes binary = 2; - } - } - - // [#next-free-field: 12] - message HttpHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HealthCheck.HttpHealthCheck"; - - reserved 5, 7; - - reserved "service_name", "use_http2"; - - // The value of the host header in the HTTP health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. - string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Specifies the HTTP path that will be requested during health checking. For example - // */healthcheck*. - string path = 2 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // [#not-implemented-hide:] HTTP specific payload. - Payload send = 3; - - // [#not-implemented-hide:] HTTP specific response. - Payload receive = 4; - - // 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 - // `. - repeated HeaderValueOption request_headers_to_add = 6 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request that is sent to the - // health checked cluster. - repeated string request_headers_to_remove = 8 [(validate.rules).repeated = { - items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default - // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open - // semantics of :ref:`Int64Range `. The start and end of each - // range are required. Only statuses in the range [100, 600) are allowed. - repeated type.v3.Int64Range expected_statuses = 9; - - // Use specified application protocol for health checks. - type.v3.CodecClientType codec_client_type = 10 [(validate.rules).enum = {defined_only: true}]; - - // An optional service name parameter which is used to validate the identity of - // the health checked cluster using a :ref:`StringMatcher - // `. See the :ref:`architecture overview - // ` for more information. - type.matcher.v4alpha.StringMatcher service_name_matcher = 11; - } - - message TcpHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HealthCheck.TcpHealthCheck"; - - // Empty payloads imply a connect-only health check. - Payload send = 1; - - // 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. - repeated Payload receive = 2; - } - - message RedisHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HealthCheck.RedisHealthCheck"; - - // 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. - string key = 1; - } - - // `grpc.health.v1.Health - // `_-based - // healthcheck. See `gRPC doc `_ - // for details. - message GrpcHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HealthCheck.GrpcHealthCheck"; - - // 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. - string service_name = 1; - - // The value of the :authority header in the gRPC health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. - string authority = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - - // Custom health check. - message CustomHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HealthCheck.CustomHealthCheck"; - - reserved 2; - - reserved "config"; - - // The registered name of the custom health checker. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A custom health checker specific configuration which depends on the custom health checker - // being instantiated. See :api:`envoy/config/health_checker` for reference. - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - // Health checks occur over the transport socket specified for the cluster. This implies that if a - // cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. - // - // This allows overriding the cluster TLS settings, just for health check connections. - message TlsOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HealthCheck.TlsOptions"; - - // Specifies the ALPN protocols for health check connections. This is useful if the - // corresponding upstream is using ALPN-based :ref:`FilterChainMatch - // ` along with different protocols for health checks - // versus data connections. If empty, no ALPN protocols will be set on health check connections. - repeated string alpn_protocols = 1; - } - - reserved 10; - - // The time to wait for a health check response. If the timeout is reached the - // health check attempt will be considered a failure. - google.protobuf.Duration timeout = 1 [(validate.rules).duration = { - required: true - gt {} - }]; - - // The interval between health checks. - google.protobuf.Duration interval = 2 [(validate.rules).duration = { - required: true - gt {} - }]; - - // An optional jitter amount in milliseconds. If specified, Envoy will start health - // checking after for a random time in ms between 0 and initial_jitter. This only - // applies to the first health check. - google.protobuf.Duration initial_jitter = 20; - - // An optional jitter amount in milliseconds. If specified, during every - // interval Envoy will add interval_jitter to the wait time. - google.protobuf.Duration interval_jitter = 3; - - // 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. - uint32 interval_jitter_percent = 18; - - // 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. - google.protobuf.UInt32Value unhealthy_threshold = 4 [(validate.rules).message = {required: true}]; - - // 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. - google.protobuf.UInt32Value healthy_threshold = 5 [(validate.rules).message = {required: true}]; - - // [#not-implemented-hide:] Non-serving port for health checking. - google.protobuf.UInt32Value alt_port = 6; - - // Reuse health check connection between health checks. Default is true. - google.protobuf.BoolValue reuse_connection = 7; - - oneof health_checker { - option (validate.required) = true; - - // HTTP health check. - HttpHealthCheck http_health_check = 8; - - // TCP health check. - TcpHealthCheck tcp_health_check = 9; - - // gRPC health check. - GrpcHealthCheck grpc_health_check = 11; - - // Custom health check. - CustomHealthCheck custom_health_check = 13; - } - - // 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. - google.protobuf.Duration no_traffic_interval = 12 [(validate.rules).duration = {gt {}}]; - - // The "no traffic healthy interval" is a special health check interval that - // is used for hosts that are currently passing active health checking - // (including new hosts) when the cluster has received no traffic. - // - // This is useful for when we want to send frequent health checks with - // `no_traffic_interval` but then revert to lower frequency `no_traffic_healthy_interval` once - // a host in the cluster is marked as healthy. - // - // Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. - // - // If no_traffic_healthy_interval is not set, it will default to the - // no traffic interval and send that interval regardless of health state. - google.protobuf.Duration no_traffic_healthy_interval = 24 [(validate.rules).duration = {gt {}}]; - - // 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". - google.protobuf.Duration unhealthy_interval = 14 [(validate.rules).duration = {gt {}}]; - - // 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". - google.protobuf.Duration unhealthy_edge_interval = 15 [(validate.rules).duration = {gt {}}]; - - // 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. - google.protobuf.Duration healthy_edge_interval = 16 [(validate.rules).duration = {gt {}}]; - - // Specifies the path to the :ref:`health check event log `. - // If empty, no event log will be written. - string event_log_path = 17; - - // [#not-implemented-hide:] - // The gRPC service for the health check event service. - // If empty, health check events won't be sent to a remote endpoint. - EventServiceConfig event_service = 22; - - // 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. - bool always_log_health_check_failures = 19; - - // This allows overriding the cluster TLS settings, just for health check connections. - TlsOptions tls_options = 21; - - // Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's - // :ref:`tranport socket matches `. - // For example, the following match criteria - // - // .. code-block:: yaml - // - // transport_socket_match_criteria: - // useMTLS: true - // - // Will match the following :ref:`cluster socket match ` - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "useMTLS" - // match: - // useMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. - // This allows using different transport socket capabilities for health checking versus proxying to the - // endpoint. - // - // If the key/values pairs specified do not match any - // :ref:`transport socket matches `, - // the cluster's :ref:`transport socket ` - // will be used for health check socket configuration. - google.protobuf.Struct transport_socket_match_criteria = 23; -} diff --git a/api/envoy/config/core/v4alpha/http_uri.proto b/api/envoy/config/core/v4alpha/http_uri.proto deleted file mode 100644 index ae1c0c9a3d..0000000000 --- a/api/envoy/config/core/v4alpha/http_uri.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "HttpUriProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: HTTP Service URI ] - -// Envoy external URI descriptor -message HttpUri { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.HttpUri"; - - // 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 - // - string uri = 1 [(validate.rules).string = {min_len: 1}]; - - // 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 - // `_. - oneof http_upstream_type { - option (validate.required) = true; - - // A cluster is created in the Envoy "cluster_manager" config - // section. This field specifies the cluster name. - // - // Example: - // - // .. code-block:: yaml - // - // cluster: jwks_cluster - // - string cluster = 2 [(validate.rules).string = {min_len: 1}]; - } - - // Sets the maximum duration in milliseconds that a response can take to arrive upon request. - google.protobuf.Duration timeout = 3 [(validate.rules).duration = { - required: true - gte {} - }]; -} diff --git a/api/envoy/config/core/v4alpha/protocol.proto b/api/envoy/config/core/v4alpha/protocol.proto deleted file mode 100644 index 24ec9ba5d8..0000000000 --- a/api/envoy/config/core/v4alpha/protocol.proto +++ /dev/null @@ -1,398 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "ProtocolProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Protocol options] - -// [#not-implemented-hide:] -message TcpProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.TcpProtocolOptions"; -} - -message UpstreamHttpProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.UpstreamHttpProtocolOptions"; - - // Set transport socket `SNI `_ for new - // upstream connections based on the downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - bool auto_sni = 1; - - // Automatic validate upstream presented certificate for new upstream connections based on the - // downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - // This field is intended to set with `auto_sni` field. - bool auto_san_validation = 2; -} - -// [#next-free-field: 6] -message HttpProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.HttpProtocolOptions"; - - // Action to take when Envoy receives client request with header names containing underscore - // characters. - // Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented - // as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore - // characters. - enum HeadersWithUnderscoresAction { - // Allow headers with underscores. This is the default behavior. - ALLOW = 0; - - // Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests - // end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter - // is incremented for each rejected request. - REJECT_REQUEST = 1; - - // Drop the header with name containing underscores. The header is dropped before the filter chain is - // invoked and as such filters will not see dropped headers. The - // "httpN.dropped_headers_with_underscores" is incremented for each dropped header. - DROP_HEADER = 2; - } - - // The idle timeout for connections. The idle timeout is defined as the - // period in which there are no active requests. When the - // idle timeout is reached the connection will be closed. If the connection is an HTTP/2 - // downstream connection a drain sequence will occur prior to closing the connection, see - // :ref:`drain_timeout - // `. - // Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. - // If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled for downstream connections according to the value for - // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. - google.protobuf.Duration idle_timeout = 1; - - // The maximum duration of a connection. The duration is defined as a period since a connection - // was established. If not set, there is no max duration. When max_connection_duration is reached - // the connection will be closed. Drain sequence will occur prior to closing the connection if - // if's applicable. See :ref:`drain_timeout - // `. - // Note: not implemented for upstream connections. - google.protobuf.Duration max_connection_duration = 3; - - // The maximum number of headers. If unconfigured, the default - // maximum number of request headers allowed is 100. Requests that exceed this limit will receive - // a 431 response for HTTP/1.x and cause a stream reset for HTTP/2. - google.protobuf.UInt32Value max_headers_count = 2 [(validate.rules).uint32 = {gte: 1}]; - - // Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be - // reset independent of any other timeouts. If not specified, this value is not set. - google.protobuf.Duration max_stream_duration = 4; - - // Action to take when a client request with a header name containing underscore characters is received. - // If this setting is not specified, the value defaults to ALLOW. - // Note: upstream responses are not affected by this setting. - HeadersWithUnderscoresAction headers_with_underscores_action = 5; -} - -// [#next-free-field: 8] -message Http1ProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.Http1ProtocolOptions"; - - message HeaderKeyFormat { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat"; - - message ProperCaseWords { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords"; - } - - message Custom { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom"; - - // Custom header rewrite rules. - // In each rule of the map, the key is a case-insensitive header name. The value - // is the new header value, case-sensitive. This allows for custom header - // capitalization, eg: `x-my-header-key` -> `X-MY-HEADER-Key` - map rules = 1; - } - - oneof header_format { - option (validate.required) = true; - - // Formats the header by proper casing words: the first character and any character following - // a special character will be capitalized if it's an alpha character. For example, - // "content-type" becomes "Content-Type", and "foo$b#$are" becomes "Foo$B#$Are". - // Note that while this results in most headers following conventional casing, certain headers - // are not covered. For example, the "TE" header will be formatted as "Te". - ProperCaseWords proper_case_words = 1; - - // Formats the header according to custom rules. - Custom custom = 2; - } - } - - // 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. - google.protobuf.BoolValue allow_absolute_url = 1; - - // 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. - bool accept_http_10 = 2; - - // 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. - string default_host_for_http_10 = 3; - - // Describes how the keys for response headers should be formatted. By default, all header keys - // are lower cased. - HeaderKeyFormat header_key_format = 4; - - // Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers. - // - // .. attention:: - // - // Note that this only happens when Envoy is chunk encoding which occurs when: - // - The request is HTTP/1.1. - // - Is neither a HEAD only request nor a HTTP Upgrade. - // - Not a response to a HEAD request. - // - The content length header is not present. - bool enable_trailers = 5; - - // Allows Envoy to process requests/responses with both `Content-Length` and `Transfer-Encoding` - // headers set. By default such messages are rejected, but if option is enabled - Envoy will - // remove Content-Length header and process message. - // See `RFC7230, sec. 3.3.3 ` for details. - // - // .. attention:: - // Enabling this option might lead to request smuggling vulnerability, especially if traffic - // is proxied via multiple layers of proxies. - bool allow_chunked_length = 6; - - // Allows invalid HTTP messaging. When this option is false, then Envoy will terminate - // HTTP/1.1 connections upon receiving an invalid HTTP message. However, - // when this option is true, then Envoy will leave the HTTP/1.1 connection - // open where possible. - // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // `. - google.protobuf.BoolValue override_stream_error_on_invalid_http_message = 7; -} - -message KeepaliveSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.KeepaliveSettings"; - - // Send HTTP/2 PING frames at this period, in order to test that the connection is still alive. - google.protobuf.Duration interval = 1 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; - - // How long to wait for a response to a keepalive PING. If a response is not received within this - // time period, the connection will be aborted. - google.protobuf.Duration timeout = 2 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; - - // A random jitter amount as a percentage of interval that will be added to each interval. - // A value of zero means there will be no jitter. - // The default value is 15%. - type.v3.Percent interval_jitter = 3; -} - -// [#next-free-field: 16] -message Http2ProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.Http2ProtocolOptions"; - - // Defines a parameter to be sent in the SETTINGS frame. - // See `RFC7540, sec. 6.5.1 `_ for details. - message SettingsParameter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter"; - - // The 16 bit parameter identifier. - google.protobuf.UInt32Value identifier = 1 [ - (validate.rules).uint32 = {lte: 65535 gte: 0}, - (validate.rules).message = {required: true} - ]; - - // The 32 bit parameter value. - google.protobuf.UInt32Value value = 2 [(validate.rules).message = {required: true}]; - } - - reserved 12; - - reserved "stream_error_on_invalid_http_messaging"; - - // `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. - google.protobuf.UInt32Value hpack_table_size = 1; - - // `Maximum concurrent streams `_ - // allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1) - // and defaults to 2147483647. - // - // For upstream connections, this also limits how many streams Envoy will initiate concurrently - // on a single connection. If the limit is reached, Envoy may queue requests or establish - // additional connections (as allowed per circuit breaker limits). - google.protobuf.UInt32Value max_concurrent_streams = 2 - [(validate.rules).uint32 = {lte: 2147483647 gte: 1}]; - - // `Initial stream-level flow-control window - // `_ size. Valid values range from 65535 - // (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456 - // (256 * 1024 * 1024). - // - // NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default - // window size now, so it's also the minimum. - // - // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the - // HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to - // stop the flow of data to the codec buffers. - google.protobuf.UInt32Value initial_stream_window_size = 3 - [(validate.rules).uint32 = {lte: 2147483647 gte: 65535}]; - - // 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*. - google.protobuf.UInt32Value initial_connection_window_size = 4 - [(validate.rules).uint32 = {lte: 2147483647 gte: 65535}]; - - // Allows proxying Websocket and other upgrades over H2 connect. - bool allow_connect = 5; - - // [#not-implemented-hide:] Hiding until envoy has full metadata support. - // Still under implementation. DO NOT USE. - // - // Allows metadata. See [metadata - // docs](https://github.com/envoyproxy/envoy/blob/main/source/docs/h2_metadata.md) for more - // information. - bool allow_metadata = 6; - - // Limit the number of pending outbound downstream frames of all types (frames that are waiting to - // be written into the socket). Exceeding this limit triggers flood mitigation and connection is - // terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due - // to flood mitigation. The default limit is 10000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - google.protobuf.UInt32Value max_outbound_frames = 7 [(validate.rules).uint32 = {gte: 1}]; - - // Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, - // preventing high memory utilization when receiving continuous stream of these frames. Exceeding - // this limit triggers flood mitigation and connection is terminated. The - // ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood - // mitigation. The default limit is 1000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - google.protobuf.UInt32Value max_outbound_control_frames = 8 [(validate.rules).uint32 = {gte: 1}]; - - // Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an - // empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but - // might be a result of a broken HTTP/2 implementation. The `http2.inbound_empty_frames_flood`` - // stat tracks the number of connections terminated due to flood mitigation. - // Setting this to 0 will terminate connection upon receiving first frame with an empty payload - // and no end stream flag. The default limit is 1. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - google.protobuf.UInt32Value max_consecutive_inbound_frames_with_empty_payload = 9; - - // Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number - // of PRIORITY frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // max_inbound_priority_frames_per_stream * (1 + inbound_streams) - // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 100. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - google.protobuf.UInt32Value max_inbound_priority_frames_per_stream = 10; - - // Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number - // of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // 1 + 2 * (inbound_streams + - // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) - // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 10. - // Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, - // but more complex implementations that try to estimate available bandwidth require at least 2. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - google.protobuf.UInt32Value max_inbound_window_update_frames_per_data_frame_sent = 11 - [(validate.rules).uint32 = {gte: 1}]; - - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // This overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // ` - // - // See `RFC7540, sec. 8.1 `_ for details. - google.protobuf.BoolValue override_stream_error_on_invalid_http_message = 14; - - // [#not-implemented-hide:] - // Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions: - // - // 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by - // Envoy. - // - // 2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field - // 'allow_connect'. - // - // Note that custom parameters specified through this field can not also be set in the - // corresponding named parameters: - // - // .. code-block:: text - // - // ID Field Name - // ---------------- - // 0x1 hpack_table_size - // 0x3 max_concurrent_streams - // 0x4 initial_stream_window_size - // - // Collisions will trigger config validation failure on load/update. Likewise, inconsistencies - // between custom parameters with the same identifier will trigger a failure. - // - // See `IANA HTTP/2 Settings - // `_ for - // standardized identifiers. - repeated SettingsParameter custom_settings_parameters = 13; - - // Send HTTP/2 PING frames to verify that the connection is still healthy. If the remote peer - // does not respond within the configured timeout, the connection will be aborted. - KeepaliveSettings connection_keepalive = 15; -} - -// [#not-implemented-hide:] -message GrpcProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.GrpcProtocolOptions"; - - Http2ProtocolOptions http2_protocol_options = 1; -} diff --git a/api/envoy/config/core/v4alpha/proxy_protocol.proto b/api/envoy/config/core/v4alpha/proxy_protocol.proto deleted file mode 100644 index c7a8d1f454..0000000000 --- a/api/envoy/config/core/v4alpha/proxy_protocol.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "ProxyProtocolProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Proxy Protocol] - -message ProxyProtocolConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.ProxyProtocolConfig"; - - enum Version { - // PROXY protocol version 1. Human readable format. - V1 = 0; - - // PROXY protocol version 2. Binary format. - V2 = 1; - } - - // The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details - Version version = 1; -} diff --git a/api/envoy/config/core/v4alpha/socket_option.proto b/api/envoy/config/core/v4alpha/socket_option.proto deleted file mode 100644 index 7dac394a86..0000000000 --- a/api/envoy/config/core/v4alpha/socket_option.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "SocketOptionProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Socket Option ] - -// Generic socket option message. This would be used to set socket options that -// might not exist in upstream kernels or precompiled Envoy binaries. -// [#next-free-field: 7] -message SocketOption { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.SocketOption"; - - enum SocketState { - // Socket options are applied after socket creation but before binding the socket to a port - STATE_PREBIND = 0; - - // Socket options are applied after binding the socket to a port but before calling listen() - STATE_BOUND = 1; - - // Socket options are applied after calling listen() - STATE_LISTENING = 2; - } - - // An optional name to give this socket option for debugging, etc. - // Uniqueness is not required and no special meaning is assumed. - string description = 1; - - // Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP - int64 level = 2; - - // The numeric name as passed to setsockopt - int64 name = 3; - - oneof value { - option (validate.required) = true; - - // Because many sockopts take an int value. - int64 int_value = 4; - - // Otherwise it's a byte buffer. - bytes buf_value = 5; - } - - // The state in which the option will be applied. When used in BindConfig - // STATE_PREBIND is currently the only valid value. - SocketState state = 6 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/api/envoy/config/core/v4alpha/substitution_format_string.proto b/api/envoy/config/core/v4alpha/substitution_format_string.proto deleted file mode 100644 index 383d5dfd5e..0000000000 --- a/api/envoy/config/core/v4alpha/substitution_format_string.proto +++ /dev/null @@ -1,95 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v4alpha"; -option java_outer_classname = "SubstitutionFormatStringProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Substitution format string] - -// Configuration to use multiple :ref:`command operators ` -// to generate a new string in either plain text or JSON format. -// [#next-free-field: 6] -message SubstitutionFormatString { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.core.v3.SubstitutionFormatString"; - - reserved 1; - - reserved "text_format"; - - oneof format { - option (validate.required) = true; - - // Specify a format with command operators to form a JSON string. - // Its details is described in :ref:`format dictionary`. - // Values are rendered as strings, numbers, or boolean values as appropriate. - // Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA). - // See the documentation for a specific command operator for details. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // - // The following JSON object would be created: - // - // .. code-block:: json - // - // { - // "status": 500, - // "message": "My error message" - // } - // - google.protobuf.Struct json_format = 2 [(validate.rules).message = {required: true}]; - - // Specify a format with command operators to form a text string. - // Its details is described in :ref:`format string`. - // - // For example, setting ``text_format`` like below, - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format_source: - // inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // generates plain text similar to: - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - DataSource text_format_source = 5; - } - - // If set to true, when command operators are evaluated to null, - // - // * for ``text_format``, the output of the empty operator is changed from ``-`` to an - // empty string, so that empty values are omitted entirely. - // * for ``json_format`` the keys with null values are omitted in the output structure. - bool omit_empty_values = 3; - - // Specify a *content_type* field. - // If this field is not set then ``text/plain`` is used for *text_format* and - // ``application/json`` is used for *json_format*. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // content_type: "text/html; charset=UTF-8" - // - string content_type = 4; -} diff --git a/api/envoy/config/endpoint/v3/endpoint.proto b/api/envoy/config/endpoint/v3/endpoint.proto index 214ce6c208..7edfb66c9a 100644 --- a/api/envoy/config/endpoint/v3/endpoint.proto +++ b/api/envoy/config/endpoint/v3/endpoint.proto @@ -5,7 +5,6 @@ package envoy.config.endpoint.v3; import "envoy/config/endpoint/v3/endpoint_components.proto"; import "envoy/type/v3/percent.proto"; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; @@ -16,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.endpoint.v3"; option java_outer_classname = "EndpointProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Endpoint configuration] @@ -102,9 +102,9 @@ message ClusterLoadAssignment { } // Name of the cluster. This will be the :ref:`service_name - // ` value if specified + // ` value if specified // in the cluster :ref:`EdsClusterConfig - // `. + // `. string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; // List of endpoints to load balance to. diff --git a/api/envoy/config/endpoint/v3/endpoint_components.proto b/api/envoy/config/endpoint/v3/endpoint_components.proto index b880a38d1a..49f38211e8 100644 --- a/api/envoy/config/endpoint/v3/endpoint_components.proto +++ b/api/envoy/config/endpoint/v3/endpoint_components.proto @@ -4,6 +4,7 @@ package envoy.config.endpoint.v3; import "envoy/config/core/v3/address.proto"; import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/config_source.proto"; import "envoy/config/core/v3/health_check.proto"; import "google/protobuf/wrappers.proto"; @@ -15,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.endpoint.v3"; option java_outer_classname = "EndpointComponentsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Endpoints] @@ -37,8 +39,8 @@ message Endpoint { uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this + // (see: :ref:`host ` and + // :ref:`authority `). Setting this // to a non-empty value allows overriding the cluster level configuration for a specific // endpoint. string hostname = 2; @@ -50,7 +52,7 @@ message Endpoint { // // 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 ` + // specified :ref:`resolver ` // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, // and will be resolved via DNS. core.v3.Address address = 1; @@ -67,7 +69,7 @@ message Endpoint { // The hostname associated with this endpoint. This hostname is not used for routing or address // resolution. If provided, it will be associated with the endpoint, and can be used for features // that require a hostname, like - // :ref:`auto_host_rewrite `. + // :ref:`auto_host_rewrite `. string hostname = 3; } @@ -92,7 +94,7 @@ message LbEndpoint { // 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 + // :ref:`RouteAction ` metadata_match field // to subset the endpoints considered in cluster load balancing. core.v3.Metadata metadata = 3; @@ -108,21 +110,50 @@ message LbEndpoint { google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; } +// [#not-implemented-hide:] +// A configuration for a LEDS collection. +message LedsClusterLocalityConfig { + // Configuration for the source of LEDS updates for a Locality. + core.v3.ConfigSource leds_config = 1; + + // The xDS transport protocol glob collection resource name. + // The service is only supported in delta xDS (incremental) mode. + string leds_collection_name = 2; +} + // 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. -// [#next-free-field: 7] +// One can have multiple LocalityLbEndpoints for a locality, but only if +// they have different priorities. +// [#next-free-field: 9] message LocalityLbEndpoints { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.LocalityLbEndpoints"; + // [#not-implemented-hide:] + // A list of endpoints of a specific locality. + message LbEndpointList { + repeated LbEndpoint lb_endpoints = 1; + } + // Identifies location of where the upstream hosts run. core.v3.Locality locality = 1; // The group of endpoints belonging to the locality specified. + // [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be + // deprecated and replaced by *load_balancer_endpoints*.] repeated LbEndpoint lb_endpoints = 2; + // [#not-implemented-hide:] + oneof lb_config { + // The group of endpoints belonging to the locality. + // [#comment:TODO(adisuissa): Once LEDS is implemented the *lb_endpoints* field + // needs to be deprecated.] + LbEndpointList load_balancer_endpoints = 7; + + // LEDS Configuration for the current locality. + LedsClusterLocalityConfig leds_cluster_locality_config = 8; + } + // Optional: Per priority/region/zone/sub_zone weight; at least 1. 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 diff --git a/api/envoy/config/endpoint/v3/load_report.proto b/api/envoy/config/endpoint/v3/load_report.proto index 7140ca05af..85ecae7f2d 100644 --- a/api/envoy/config/endpoint/v3/load_report.proto +++ b/api/envoy/config/endpoint/v3/load_report.proto @@ -15,12 +15,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.endpoint.v3"; option java_outer_classname = "LoadReportProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Load Report] // These are stats Envoy reports to the management server at a frequency defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. +// :ref:`LoadStatsResponse.load_reporting_interval`. // Stats per upstream region/zone and optionally per subzone. // [#next-free-field: 9] message UpstreamLocalityStats { @@ -52,7 +53,7 @@ message UpstreamLocalityStats { // Endpoint granularity stats information for this locality. This information // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. + // :ref:`LoadStatsResponse.report_endpoint_granularity`. repeated UpstreamEndpointStats upstream_endpoint_stats = 7; // [#not-implemented-hide:] The priority of the endpoint group these metrics @@ -118,7 +119,7 @@ message EndpointLoadMetricStats { } // Per cluster load stats. Envoy reports these stats a management server in a -// :ref:`LoadStatsRequest` +// :ref:`LoadStatsRequest` // Next ID: 7 // [#next-free-field: 7] message ClusterStats { diff --git a/api/envoy/config/filter/accesslog/v2/accesslog.proto b/api/envoy/config/filter/accesslog/v2/accesslog.proto index 25d27bfbd1..7f38515421 100644 --- a/api/envoy/config/filter/accesslog/v2/accesslog.proto +++ b/api/envoy/config/filter/accesslog/v2/accesslog.proto @@ -16,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.accesslog.v2"; option java_outer_classname = "AccesslogProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2;accesslogv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.accesslog.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/dubbo/router/v2alpha1/router.proto b/api/envoy/config/filter/dubbo/router/v2alpha1/router.proto index 2e35bb7f7c..0c92db6074 100644 --- a/api/envoy/config/filter/dubbo/router/v2alpha1/router.proto +++ b/api/envoy/config/filter/dubbo/router/v2alpha1/router.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.dubbo.router.v2alpha1"; option java_outer_classname = "RouterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/dubbo/router/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.dubbo_proxy.router.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/fault/v2/fault.proto b/api/envoy/config/filter/fault/v2/fault.proto index 016140d10f..d23e50b191 100644 --- a/api/envoy/config/filter/fault/v2/fault.proto +++ b/api/envoy/config/filter/fault/v2/fault.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.fault.v2"; option java_outer_classname = "FaultProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/fault/v2;faultv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.common.fault.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto b/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto index bd9da5a677..26d5dbffdd 100644 --- a/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto +++ b/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto @@ -5,7 +5,6 @@ package envoy.config.filter.http.adaptive_concurrency.v2alpha; import "envoy/api/v2/core/base.proto"; import "envoy/type/percent.proto"; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; @@ -16,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.adaptive_concurrency.v2alpha"; option java_outer_classname = "AdaptiveConcurrencyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/adaptive_concurrency/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.adaptive_concurrency.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto b/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto index 4382328628..41315785ff 100644 --- a/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto +++ b/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.aws_lambda.v2alpha"; option java_outer_classname = "AwsLambdaProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/aws_lambda/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.aws_lambda.v3"; option (udpa.annotations.file_status).work_in_progress = true; diff --git a/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto b/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto index 5ebb92c01d..d76ea9d6bd 100644 --- a/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto +++ b/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.aws_request_signing.v2alpha"; option java_outer_classname = "AwsRequestSigningProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/aws_request_signing/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.aws_request_signing.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/buffer/v2/buffer.proto b/api/envoy/config/filter/http/buffer/v2/buffer.proto index 56961d22fe..3be47dac27 100644 --- a/api/envoy/config/filter/http/buffer/v2/buffer.proto +++ b/api/envoy/config/filter/http/buffer/v2/buffer.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.buffer.v2"; option java_outer_classname = "BufferProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/buffer/v2;bufferv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.buffer.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/cache/v2alpha/cache.proto b/api/envoy/config/filter/http/cache/v2alpha/cache.proto index 98035c05d4..3d743357de 100644 --- a/api/envoy/config/filter/http/cache/v2alpha/cache.proto +++ b/api/envoy/config/filter/http/cache/v2alpha/cache.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.cache.v2alpha"; option java_outer_classname = "CacheProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/cache/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.cache.v3alpha"; option (udpa.annotations.file_status).work_in_progress = true; diff --git a/api/envoy/config/filter/http/compressor/v2/compressor.proto b/api/envoy/config/filter/http/compressor/v2/compressor.proto index d62d0d7a42..441edffd81 100644 --- a/api/envoy/config/filter/http/compressor/v2/compressor.proto +++ b/api/envoy/config/filter/http/compressor/v2/compressor.proto @@ -12,6 +12,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.compressor.v2"; option java_outer_classname = "CompressorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/compressor/v2;compressorv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.compressor.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/cors/v2/cors.proto b/api/envoy/config/filter/http/cors/v2/cors.proto index 9060a9c38f..80c91de989 100644 --- a/api/envoy/config/filter/http/cors/v2/cors.proto +++ b/api/envoy/config/filter/http/cors/v2/cors.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.cors.v2"; option java_outer_classname = "CorsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/cors/v2;corsv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.cors.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/csrf/v2/csrf.proto b/api/envoy/config/filter/http/csrf/v2/csrf.proto index 3c2c9110e9..d2e02dc415 100644 --- a/api/envoy/config/filter/http/csrf/v2/csrf.proto +++ b/api/envoy/config/filter/http/csrf/v2/csrf.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.csrf.v2"; option java_outer_classname = "CsrfProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/csrf/v2;csrfv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.csrf.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto b/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto index 436bb6bf46..4e28b9bbe1 100644 --- a/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto +++ b/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.dynamic_forward_proxy.v2alpha"; option java_outer_classname = "DynamicForwardProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/dynamic_forward_proxy/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.dynamic_forward_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/dynamo/v2/dynamo.proto b/api/envoy/config/filter/http/dynamo/v2/dynamo.proto index 011d22f768..5aa885cc05 100644 --- a/api/envoy/config/filter/http/dynamo/v2/dynamo.proto +++ b/api/envoy/config/filter/http/dynamo/v2/dynamo.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.dynamo.v2"; option java_outer_classname = "DynamoProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/dynamo/v2;dynamov2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.dynamo.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/ext_authz/v2/ext_authz.proto b/api/envoy/config/filter/http/ext_authz/v2/ext_authz.proto index b9a807d82e..abf7ddd933 100644 --- a/api/envoy/config/filter/http/ext_authz/v2/ext_authz.proto +++ b/api/envoy/config/filter/http/ext_authz/v2/ext_authz.proto @@ -16,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.ext_authz.v2"; option java_outer_classname = "ExtAuthzProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/ext_authz/v2;ext_authzv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.ext_authz.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/fault/v2/fault.proto b/api/envoy/config/filter/http/fault/v2/fault.proto index cb99b0d71b..109dfb4cfb 100644 --- a/api/envoy/config/filter/http/fault/v2/fault.proto +++ b/api/envoy/config/filter/http/fault/v2/fault.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.fault.v2"; option java_outer_classname = "FaultProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/fault/v2;faultv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.fault.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.proto b/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.proto index b4331dad50..18c057e289 100644 --- a/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.proto +++ b/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_http1_bridge.v2"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_http1_bridge/v2;grpc_http1_bridgev2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.grpc_http1_bridge.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto b/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto index 8b916d327e..0200ec899f 100644 --- a/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto +++ b/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_http1_reverse_bridge.v2alpha1"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/grpc_stats/v2alpha/config.proto b/api/envoy/config/filter/http/grpc_stats/v2alpha/config.proto index 7f6dd2ce42..e15a276ad6 100644 --- a/api/envoy/config/filter/http/grpc_stats/v2alpha/config.proto +++ b/api/envoy/config/filter/http/grpc_stats/v2alpha/config.proto @@ -8,11 +8,11 @@ import "google/protobuf/wrappers.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_stats.v2alpha"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_stats/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.grpc_stats.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -46,10 +46,8 @@ message FilterConfig { // // .. attention:: // If neither `individual_method_stats_allowlist` nor `stats_for_all_methods` is set, the - // behavior will default to `stats_for_all_methods=true`. This default value is deprecated, - // and in a future release, if neither field is set, it will default to - // `stats_for_all_methods=false` in order to be safe by default. This behavior can be - // controlled with runtime override + // behavior will default to `stats_for_all_methods=false`. This default value is changed due + // to the previous value being deprecated. This behavior can be changed with runtime override // `envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default`. google.protobuf.BoolValue stats_for_all_methods = 3; } diff --git a/api/envoy/config/filter/http/grpc_web/v2/grpc_web.proto b/api/envoy/config/filter/http/grpc_web/v2/grpc_web.proto index be23b4d87b..0be39a18c0 100644 --- a/api/envoy/config/filter/http/grpc_web/v2/grpc_web.proto +++ b/api/envoy/config/filter/http/grpc_web/v2/grpc_web.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_web.v2"; option java_outer_classname = "GrpcWebProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_web/v2;grpc_webv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.grpc_web.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/gzip/v2/gzip.proto b/api/envoy/config/filter/http/gzip/v2/gzip.proto index f3601b612b..0ff02f0957 100644 --- a/api/envoy/config/filter/http/gzip/v2/gzip.proto +++ b/api/envoy/config/filter/http/gzip/v2/gzip.proto @@ -13,12 +13,11 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.gzip.v2"; option java_outer_classname = "GzipProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/gzip/v2;gzipv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.gzip.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Gzip] -// Gzip :ref:`configuration overview `. -// [#extension: envoy.filters.http.gzip] // [#next-free-field: 11] message Gzip { diff --git a/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto b/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto index 30de69d98b..c9ff092601 100644 --- a/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto +++ b/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.header_to_metadata.v2"; option java_outer_classname = "HeaderToMetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/header_to_metadata/v2;header_to_metadatav2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.header_to_metadata.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/health_check/v2/health_check.proto b/api/envoy/config/filter/http/health_check/v2/health_check.proto index 7f2a486b26..8e42ff719d 100644 --- a/api/envoy/config/filter/http/health_check/v2/health_check.proto +++ b/api/envoy/config/filter/http/health_check/v2/health_check.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.health_check.v2"; option java_outer_classname = "HealthCheckProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/health_check/v2;health_checkv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.health_check.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto b/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto index f99b18a12c..79ca502b26 100644 --- a/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto +++ b/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.ip_tagging.v2"; option java_outer_classname = "IpTaggingProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/ip_tagging/v2;ip_taggingv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.ip_tagging.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/jwt_authn/v2alpha/config.proto b/api/envoy/config/filter/http/jwt_authn/v2alpha/config.proto index 07044f9220..e87c9478db 100644 --- a/api/envoy/config/filter/http/jwt_authn/v2alpha/config.proto +++ b/api/envoy/config/filter/http/jwt_authn/v2alpha/config.proto @@ -16,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.jwt_authn.v2alpha"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/jwt_authn/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.jwt_authn.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -390,7 +391,8 @@ message FilterStateRule { // A map of string keys to requirements. The string key is the string value // in the FilterState with the name specified in the *name* field above. - map requires = 3; + map + requires = 3; } // This is the Envoy HTTP filter config for JWT authentication. diff --git a/api/envoy/config/filter/http/lua/v2/lua.proto b/api/envoy/config/filter/http/lua/v2/lua.proto index 068b5e255d..820011eef2 100644 --- a/api/envoy/config/filter/http/lua/v2/lua.proto +++ b/api/envoy/config/filter/http/lua/v2/lua.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.lua.v2"; option java_outer_classname = "LuaProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/lua/v2;luav2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.lua.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/on_demand/v2/on_demand.proto b/api/envoy/config/filter/http/on_demand/v2/on_demand.proto index 74d0ee408a..1dc02a9efc 100644 --- a/api/envoy/config/filter/http/on_demand/v2/on_demand.proto +++ b/api/envoy/config/filter/http/on_demand/v2/on_demand.proto @@ -4,11 +4,11 @@ package envoy.config.filter.http.on_demand.v2; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.on_demand.v2"; option java_outer_classname = "OnDemandProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/on_demand/v2;on_demandv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.on_demand.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/original_src/v2alpha1/original_src.proto b/api/envoy/config/filter/http/original_src/v2alpha1/original_src.proto index 0baf49cebe..d713438e41 100644 --- a/api/envoy/config/filter/http/original_src/v2alpha1/original_src.proto +++ b/api/envoy/config/filter/http/original_src/v2alpha1/original_src.proto @@ -4,11 +4,11 @@ package envoy.config.filter.http.original_src.v2alpha1; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.original_src.v2alpha1"; option java_outer_classname = "OriginalSrcProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/original_src/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.original_src.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/rate_limit/v2/rate_limit.proto b/api/envoy/config/filter/http/rate_limit/v2/rate_limit.proto index b9361476bc..029fe76ff0 100644 --- a/api/envoy/config/filter/http/rate_limit/v2/rate_limit.proto +++ b/api/envoy/config/filter/http/rate_limit/v2/rate_limit.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.rate_limit.v2"; option java_outer_classname = "RateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/rate_limit/v2;rate_limitv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.ratelimit.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/rbac/v2/rbac.proto b/api/envoy/config/filter/http/rbac/v2/rbac.proto index 691f23036b..8266c02956 100644 --- a/api/envoy/config/filter/http/rbac/v2/rbac.proto +++ b/api/envoy/config/filter/http/rbac/v2/rbac.proto @@ -6,11 +6,11 @@ import "envoy/config/rbac/v2/rbac.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.rbac.v2"; option java_outer_classname = "RbacProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/rbac/v2;rbacv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.rbac.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/router/v2/router.proto b/api/envoy/config/filter/http/router/v2/router.proto index c95500cf81..e47e73f8c7 100644 --- a/api/envoy/config/filter/http/router/v2/router.proto +++ b/api/envoy/config/filter/http/router/v2/router.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.router.v2"; option java_outer_classname = "RouterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/router/v2;routerv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.router.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/squash/v2/squash.proto b/api/envoy/config/filter/http/squash/v2/squash.proto index a7ae625d2e..1099414cb1 100644 --- a/api/envoy/config/filter/http/squash/v2/squash.proto +++ b/api/envoy/config/filter/http/squash/v2/squash.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.squash.v2"; option java_outer_classname = "SquashProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/squash/v2;squashv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.squash.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/tap/v2alpha/tap.proto b/api/envoy/config/filter/http/tap/v2alpha/tap.proto index 3f984cec0d..b8381c5406 100644 --- a/api/envoy/config/filter/http/tap/v2alpha/tap.proto +++ b/api/envoy/config/filter/http/tap/v2alpha/tap.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.tap.v2alpha"; option java_outer_classname = "TapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/tap/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.tap.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/http/transcoder/v2/transcoder.proto b/api/envoy/config/filter/http/transcoder/v2/transcoder.proto index ac6d7eefa7..9421b0ecf0 100644 --- a/api/envoy/config/filter/http/transcoder/v2/transcoder.proto +++ b/api/envoy/config/filter/http/transcoder/v2/transcoder.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.http.transcoder.v2"; option java_outer_classname = "TranscoderProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/transcoder/v2;transcoderv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.grpc_json_transcoder.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -152,8 +153,8 @@ message GrpcJsonTranscoder { // // {"code":5,"details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","requestId":"r-1"}]} // - // In order to transcode the message, the ``google.rpc.RequestInfo`` type from - // the ``google/rpc/error_details.proto`` should be included in the configured - // :ref:`proto descriptor set `. + // In order to transcode the message, the ``google.rpc.RequestInfo`` type from + // the ``google/rpc/error_details.proto`` should be included in the configured + // :ref:`proto descriptor set `. bool convert_grpc_status = 9; } diff --git a/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.proto b/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.proto index 0496207e09..1b492ca3ff 100644 --- a/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.proto +++ b/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.listener.http_inspector.v2"; option java_outer_classname = "HttpInspectorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/http_inspector/v2;http_inspectorv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.listener.http_inspector.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/listener/original_dst/v2/original_dst.proto b/api/envoy/config/filter/listener/original_dst/v2/original_dst.proto index fa4acee45f..67f0fa53b4 100644 --- a/api/envoy/config/filter/listener/original_dst/v2/original_dst.proto +++ b/api/envoy/config/filter/listener/original_dst/v2/original_dst.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.listener.original_dst.v2"; option java_outer_classname = "OriginalDstProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/original_dst/v2;original_dstv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.listener.original_dst.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.proto b/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.proto index 1959698fd1..9b5219937f 100644 --- a/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.proto +++ b/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.proto @@ -4,11 +4,11 @@ package envoy.config.filter.listener.original_src.v2alpha1; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.listener.original_src.v2alpha1"; option java_outer_classname = "OriginalSrcProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/original_src/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.listener.original_src.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto b/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto index cabffb9fc0..9fbcd641cd 100644 --- a/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto +++ b/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.listener.proxy_protocol.v2"; option java_outer_classname = "ProxyProtocolProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/proxy_protocol/v2;proxy_protocolv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.listener.proxy_protocol.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto b/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto index 7ab679c47d..764627f74a 100644 --- a/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto +++ b/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.listener.tls_inspector.v2"; option java_outer_classname = "TlsInspectorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/tls_inspector/v2;tls_inspectorv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.listener.tls_inspector.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto b/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto index 4da6d97ca2..5f4c056970 100644 --- a/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto +++ b/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.client_ssl_auth.v2"; option java_outer_classname = "ClientSslAuthProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/client_ssl_auth/v2;client_ssl_authv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.client_ssl_auth.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/direct_response/v2/config.proto b/api/envoy/config/filter/network/direct_response/v2/config.proto index 15de7e3b55..e0c018e283 100644 --- a/api/envoy/config/filter/network/direct_response/v2/config.proto +++ b/api/envoy/config/filter/network/direct_response/v2/config.proto @@ -10,6 +10,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.direct_response.v2"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/direct_response/v2;direct_responsev2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.direct_response.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto b/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto index 47248932f9..0a6c835973 100644 --- a/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto +++ b/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.dubbo_proxy.v2alpha1"; option java_outer_classname = "DubboProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/dubbo_proxy/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.dubbo_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto b/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto index 9af461e357..cd287d06e7 100644 --- a/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto +++ b/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.dubbo_proxy.v2alpha1"; option java_outer_classname = "RouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/dubbo_proxy/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.dubbo_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/echo/v2/echo.proto b/api/envoy/config/filter/network/echo/v2/echo.proto index 2b51ce4e18..5c8b31d1c1 100644 --- a/api/envoy/config/filter/network/echo/v2/echo.proto +++ b/api/envoy/config/filter/network/echo/v2/echo.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.echo.v2"; option java_outer_classname = "EchoProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/echo/v2;echov2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.echo.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/ext_authz/v2/ext_authz.proto b/api/envoy/config/filter/network/ext_authz/v2/ext_authz.proto index 40cea70618..2cda6d9ec1 100644 --- a/api/envoy/config/filter/network/ext_authz/v2/ext_authz.proto +++ b/api/envoy/config/filter/network/ext_authz/v2/ext_authz.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.ext_authz.v2"; option java_outer_classname = "ExtAuthzProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2;ext_authzv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.ext_authz.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto b/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto index eaf0023412..6286e979a1 100644 --- a/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto +++ b/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto @@ -24,6 +24,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.http_connection_manager.v2"; option java_outer_classname = "HttpConnectionManagerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2;http_connection_managerv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.http_connection_manager.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -32,7 +33,7 @@ option (udpa.annotations.file_status).package_version_status = FROZEN; // HTTP connection manager :ref:`configuration overview `. // [#extension: envoy.filters.network.http_connection_manager] -// [#next-free-field: 46] +// [#next-free-field: 37] message HttpConnectionManager { enum CodecType { // For every new connection, the connection manager will determine which @@ -92,36 +93,6 @@ message HttpConnectionManager { ALWAYS_FORWARD_ONLY = 4; } - // Determines the action for request that contain %2F, %2f, %5C or %5c sequences in the URI path. - // This operation occurs before URL normalization and the merge slashes transformations if they were enabled. - enum PathWithEscapedSlashesAction { - // Default behavior specific to implementation (i.e. Envoy) of this configuration option. - // Envoy, by default, takes the KEEP_UNCHANGED action. - // NOTE: the implementation may change the default behavior at-will. - IMPLEMENTATION_SPECIFIC_DEFAULT = 0; - - // Keep escaped slashes. - KEEP_UNCHANGED = 1; - - // Reject client request with the 400 status. gRPC requests will be rejected with the INTERNAL (13) error code. - // The "httpN.downstream_rq_failed_path_normalization" counter is incremented for each rejected request. - REJECT_REQUEST = 2; - - // Unescape %2F and %5C sequences and redirect request to the new path if these sequences were present. - // Redirect occurs after path normalization and merge slashes transformations if they were configured. - // NOTE: gRPC requests will be rejected with the INTERNAL (13) error code. - // This option minimizes possibility of path confusion exploits by forcing request with unescaped slashes to - // traverse all parties: downstream client, intermediate proxies, Envoy and upstream server. - // The "httpN.downstream_rq_redirected_with_normalized_path" counter is incremented for each - // redirected request. - UNESCAPE_AND_REDIRECT = 3; - - // Unescape %2F and %5C sequences. - // Note: this option should not be enabled if intermediaries perform path based access control as - // it may lead to path confusion vulnerabilities. - UNESCAPE_AND_FORWARD = 4; - } - // [#next-free-field: 10] message Tracing { enum OperationName { @@ -329,10 +300,8 @@ message HttpConnectionManager { // 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. google.protobuf.UInt32Value max_request_headers_kb = 29 - [(validate.rules).uint32 = {lte: 96 gt: 0}]; + [(validate.rules).uint32 = {lte: 8192 gt: 0}]; // The idle timeout for connections managed by the connection manager. The // idle timeout is defined as the period in which there are no active @@ -483,12 +452,6 @@ message HttpConnectionManager { // is the current Envoy behaviour. This defaults to false. bool preserve_external_request_id = 32; - // If set, Envoy will always set :ref:`x-request-id ` header in response. - // If this is false or not set, the request ID is returned in responses only if tracing is forced using - // :ref:`x-envoy-force-trace ` header. - // XXX: Only exposed in the v3 API - //bool always_set_request_id_in_response = 37; - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP // header. ForwardClientCertDetails forward_client_cert_details = 16 @@ -546,14 +509,6 @@ message HttpConnectionManager { // `HTTP spec `_ and is provided for convenience. bool merge_slashes = 33; - // Action to take when request URL path contains escaped slash sequences (%2F, %2f, %5C and %5c). - // The default value can be overridden by the :ref:`http_connection_manager.path_with_escaped_slashes_action` - // runtime variable. - // The :ref:`http_connection_manager.path_with_escaped_slashes_action_sampling` runtime - // variable can be used to apply the action to a portion of all requests. - // XXX: Backported from the v3 API - PathWithEscapedSlashesAction path_with_escaped_slashes_action = 45; - // The configuration of the request ID extension. This includes operations such as // generation, validation, and associated tracing operations. // @@ -565,21 +520,6 @@ message HttpConnectionManager { // // 3. Tracing decision (sampled, forced, etc) is set in 14th byte of the UUID. RequestIDExtension request_id_extension = 36; - - // The configuration to customize local reply returned by Envoy. It can customize status code, - // body text and response content type. If not specified, status code and text body are hard - // coded in Envoy, the response content type is plain text. - // XXX: Only exposed in the v3 API - //LocalReplyConfig local_reply_config = 38; - - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` - // local port and request method is not CONNECT. This affects the upstream host header as well. - // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // XXX: Backported from the v3 API - bool strip_matching_host_port = 39; } message Rds { diff --git a/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto b/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto index ea2f60e71e..3611c1d675 100644 --- a/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto +++ b/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.kafka_broker.v2alpha1"; option java_outer_classname = "KafkaBrokerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/kafka_broker/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.kafka_broker.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto b/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto index 791b767f3e..9c21ab293b 100644 --- a/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto +++ b/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.local_rate_limit.v2alpha"; option java_outer_classname = "LocalRateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/local_rate_limit/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.local_ratelimit.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto b/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto index b261897858..88e914f752 100644 --- a/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto +++ b/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.mongo_proxy.v2"; option java_outer_classname = "MongoProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/mongo_proxy/v2;mongo_proxyv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.mongo_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto b/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto index 78c6b7e971..8c6066c654 100644 --- a/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto +++ b/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.mysql_proxy.v1alpha1"; option java_outer_classname = "MysqlProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/mysql_proxy/v1alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.mysql_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/rate_limit/v2/rate_limit.proto b/api/envoy/config/filter/network/rate_limit/v2/rate_limit.proto index aed56c9af6..b9c02b2cc4 100644 --- a/api/envoy/config/filter/network/rate_limit/v2/rate_limit.proto +++ b/api/envoy/config/filter/network/rate_limit/v2/rate_limit.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.rate_limit.v2"; option java_outer_classname = "RateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/rate_limit/v2;rate_limitv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.ratelimit.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/rbac/v2/rbac.proto b/api/envoy/config/filter/network/rbac/v2/rbac.proto index ce86794c71..780cdc85e3 100644 --- a/api/envoy/config/filter/network/rbac/v2/rbac.proto +++ b/api/envoy/config/filter/network/rbac/v2/rbac.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.rbac.v2"; option java_outer_classname = "RbacProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/rbac/v2;rbacv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.rbac.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto b/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto index 948d7c349f..c8b6807c38 100644 --- a/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto +++ b/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto @@ -16,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.redis_proxy.v2"; option java_outer_classname = "RedisProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/redis_proxy/v2;redis_proxyv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.redis_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto b/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto index 71c161fc48..f5ef8de087 100644 --- a/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto +++ b/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.sni_cluster.v2"; option java_outer_classname = "SniClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/sni_cluster/v2;sni_clusterv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.sni_cluster.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto b/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto index 4ec68f320e..25a020a670 100644 --- a/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto +++ b/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto @@ -17,6 +17,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.tcp_proxy.v2"; option java_outer_classname = "TcpProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2;tcp_proxyv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.tcp_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto b/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto index 8230a52e34..3144f3bf23 100644 --- a/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto +++ b/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.thrift_proxy.v2alpha1"; option java_outer_classname = "RouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/thrift_proxy/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.thrift_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto b/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto index 96e750ef31..56639dbf3e 100644 --- a/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto +++ b/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.thrift_proxy.v2alpha1"; option java_outer_classname = "ThriftProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/thrift_proxy/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.thrift_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto b/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto index cae622cecc..68704f2b93 100644 --- a/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto +++ b/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.network.zookeeper_proxy.v1alpha1"; option java_outer_classname = "ZookeeperProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/zookeeper_proxy/v1alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.zookeeper_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto b/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto index 389ddf3599..0619db1082 100644 --- a/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto +++ b/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.thrift.rate_limit.v2alpha1"; option java_outer_classname = "RateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/thrift/rate_limit/v2alpha1"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/filter/thrift/router/v2alpha1/router.proto b/api/envoy/config/filter/thrift/router/v2alpha1/router.proto index 5463ab6513..5a7b988fe9 100644 --- a/api/envoy/config/filter/thrift/router/v2alpha1/router.proto +++ b/api/envoy/config/filter/thrift/router/v2alpha1/router.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.filter.thrift.router.v2alpha1"; option java_outer_classname = "RouterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/thrift/router/v2alpha1"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Router] diff --git a/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto b/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto index 06dc150d5c..e762caa971 100644 --- a/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto +++ b/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.udp.udp_proxy.v2alpha"; option java_outer_classname = "UdpProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/udp/udp_proxy/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.udp.udp_proxy.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/grpc_credential/v2alpha/aws_iam.proto b/api/envoy/config/grpc_credential/v2alpha/aws_iam.proto index b63d35af40..d67900bd14 100644 --- a/api/envoy/config/grpc_credential/v2alpha/aws_iam.proto +++ b/api/envoy/config/grpc_credential/v2alpha/aws_iam.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.grpc_credential.v2alpha"; option java_outer_classname = "AwsIamProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/grpc_credential/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Grpc Credentials AWS IAM] diff --git a/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.proto b/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.proto index 41e67f0bf2..07290a76db 100644 --- a/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.proto +++ b/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.proto @@ -10,6 +10,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.grpc_credential.v2alpha"; option java_outer_classname = "FileBasedMetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/grpc_credential/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Grpc Credentials File Based Metadata] diff --git a/api/envoy/config/grpc_credential/v3/aws_iam.proto b/api/envoy/config/grpc_credential/v3/aws_iam.proto index e2e9c7da48..923d880fbd 100644 --- a/api/envoy/config/grpc_credential/v3/aws_iam.proto +++ b/api/envoy/config/grpc_credential/v3/aws_iam.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.grpc_credential.v3"; option java_outer_classname = "AwsIamProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/grpc_credential/v3;grpc_credentialv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Grpc Credentials AWS IAM] diff --git a/api/envoy/config/grpc_credential/v3/file_based_metadata.proto b/api/envoy/config/grpc_credential/v3/file_based_metadata.proto index b364d29170..a9e6c94a2c 100644 --- a/api/envoy/config/grpc_credential/v3/file_based_metadata.proto +++ b/api/envoy/config/grpc_credential/v3/file_based_metadata.proto @@ -11,6 +11,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.config.grpc_credential.v3"; option java_outer_classname = "FileBasedMetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/grpc_credential/v3;grpc_credentialv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Grpc Credentials File Based Metadata] diff --git a/api/envoy/config/health_checker/redis/v2/redis.proto b/api/envoy/config/health_checker/redis/v2/redis.proto index 0c569f5c75..22d404c536 100644 --- a/api/envoy/config/health_checker/redis/v2/redis.proto +++ b/api/envoy/config/health_checker/redis/v2/redis.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.health_checker.redis.v2"; option java_outer_classname = "RedisProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/health_checker/redis/v2;redisv2"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Redis] diff --git a/api/envoy/config/listener/v2/api_listener.proto b/api/envoy/config/listener/v2/api_listener.proto index 6709d5fe0b..ae47c7d338 100644 --- a/api/envoy/config/listener/v2/api_listener.proto +++ b/api/envoy/config/listener/v2/api_listener.proto @@ -10,6 +10,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.listener.v2"; option java_outer_classname = "ApiListenerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v2;listenerv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/listener/v3/api_listener.proto b/api/envoy/config/listener/v3/api_listener.proto index 4d3879a22b..a3610e6568 100644 --- a/api/envoy/config/listener/v3/api_listener.proto +++ b/api/envoy/config/listener/v3/api_listener.proto @@ -10,6 +10,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.config.listener.v3"; option java_outer_classname = "ApiListenerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: API listener] @@ -22,7 +23,8 @@ message ApiListener { // The type in this field determines the type of API listener. At present, the following // types are supported: - // envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) + // envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager (HTTP) + // envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager (HTTP) // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the // specific config message for each type of API listener. We could not do this in v2 because // it would have caused circular dependencies for go protos: lds.proto depends on this file, diff --git a/api/envoy/config/listener/v3/listener.proto b/api/envoy/config/listener/v3/listener.proto index 83aac40143..b4ef416e00 100644 --- a/api/envoy/config/listener/v3/listener.proto +++ b/api/envoy/config/listener/v3/listener.proto @@ -5,18 +5,19 @@ package envoy.config.listener.v3; import "envoy/config/accesslog/v3/accesslog.proto"; import "envoy/config/core/v3/address.proto"; import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; import "envoy/config/core/v3/socket_option.proto"; import "envoy/config/listener/v3/api_listener.proto"; import "envoy/config/listener/v3/listener_components.proto"; import "envoy/config/listener/v3/udp_listener_config.proto"; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; +import "xds/annotations/v3/status.proto"; import "xds/core/v3/collection_entry.proto"; +import "xds/type/matcher/v3/matcher.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/security.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -25,6 +26,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.listener.v3"; option java_outer_classname = "ListenerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Listener configuration] @@ -36,7 +38,7 @@ message ListenerCollection { repeated xds.core.v3.CollectionEntry entries = 1; } -// [#next-free-field: 27] +// [#next-free-field: 33] message Listener { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Listener"; @@ -61,7 +63,7 @@ message Listener { // set use_original_dst parameter to true. Default is true. // // This is deprecated. Use :ref:`Listener.bind_to_port - // ` + // ` google.protobuf.BoolValue bind_to_port = 1; } @@ -89,7 +91,12 @@ message Listener { } } - reserved 14; + // Configuration for envoy internal listener. All the future internal listener features should be added here. + // [#not-implemented-hide:] + message InternalListenerConfig { + } + + reserved 14, 23; // 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 @@ -101,15 +108,39 @@ message Listener { // Linux as the actual port will be allocated by the OS. core.v3.Address address = 2 [(validate.rules).message = {required: true}]; + // Optional prefix to use on listener stats. If empty, the stats will be rooted at + // `listener.
.`. If non-empty, stats will be rooted at + // `listener..`. + string stat_prefix = 28; + // A list of filter chains to consider for this listener. The - // :ref:`FilterChain ` with the most specific - // :ref:`FilterChainMatch ` criteria is used on a + // :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 `. repeated FilterChain filter_chains = 3; + // :ref:`Matcher API ` resolving the filter chain name from the + // network properties. This matcher is used as a replacement for the filter chain match condition + // :ref:`filter_chain_match + // `. If specified, all + // :ref:`filter_chains ` must have a + // non-empty and unique :ref:`name ` field + // and not specify :ref:`filter_chain_match + // ` field. + // + // .. note:: + // + // Once matched, each connection is permanently bound to its filter chain. + // If the matcher changes but the filter chain remains the same, the + // connections bound to the filter chain are not drained. If, however, the + // filter chain is removed or structurally modified, then the drain for its + // connections is initiated. + xds.type.matcher.v3.Matcher filter_chain_matcher = 32 + [(xds.annotations.v3.field_status).work_in_progress = true]; + // 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 @@ -130,20 +161,20 @@ message Listener { core.v3.Metadata metadata = 6; // [#not-implemented-hide:] - DeprecatedV1 deprecated_v1 = 7 [deprecated = true]; + DeprecatedV1 deprecated_v1 = 7 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // The type of draining to perform at a listener-wide level. DrainType drain_type = 8; // 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 + // :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. // UDP Listener filters can be specified when the protocol in the listener socket address in - // :ref:`protocol ` is :ref:`UDP - // `. - // UDP listeners currently support a single filter. + // :ref:`protocol ` is :ref:`UDP + // `. repeated ListenerFilter listener_filters = 9; // The timeout to wait for all listener filters to complete operation. If the timeout is reached, @@ -166,7 +197,7 @@ message Listener { // *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 + // ` 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 @@ -206,19 +237,19 @@ message Listener { google.protobuf.UInt32Value tcp_fast_open_queue_length = 12; // Specifies the intended direction of the traffic relative to the local Envoy. + // This property is required on Windows for listeners using the original destination filter, + // see :ref:`Original Destination `. core.v3.TrafficDirection traffic_direction = 16; // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // listener to create, i.e. :ref:`udp_listener_name - // ` = "raw_udp_listener" for - // creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". + // ` is :ref:`UDP + // `, this field specifies UDP + // listener specific configuration. UdpListenerConfig udp_listener_config = 18; // Used to represent an API listener, which is used in non-proxy clients. The type of API // exposed to the non-proxy application depends on the type of API listener. - // When this field is set, no other field except for :ref:`name` + // When this field is set, no other field except for :ref:`name` // should be set. // // .. note:: @@ -237,41 +268,80 @@ message Listener { // The listener's connection balancer configuration, currently only applicable to TCP listeners. // If no configuration is specified, Envoy will not attempt to balance active connections between // worker threads. + // + // In the scenario that the listener X redirects all the connections to the listeners Y1 and Y2 + // by setting :ref:`use_original_dst ` in X + // and :ref:`bind_to_port ` to false in Y1 and Y2, + // it is recommended to disable the balance config in listener X to avoid the cost of balancing, and + // enable the balance config in Y1 and Y2 to balance the connections among the workers. ConnectionBalanceConfig connection_balance_config = 20; + // Deprecated. Use `enable_reuse_port` instead. + bool reuse_port = 21 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + // When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and // create one socket for each worker thread. This makes inbound connections // distribute among worker threads roughly evenly in cases where there are a high number - // of connections. When this flag is set to false, all worker threads share one socket. + // of connections. When this flag is set to false, all worker threads share one socket. This field + // defaults to true. + // + // .. attention:: // - // Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart - // (see `3rd paragraph in 'soreuseport' commit message - // `_). - // This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket - // `_. - bool reuse_port = 21; + // Although this field defaults to true, it has different behavior on different platforms. See + // the following text for more information. + // + // * On Linux, reuse_port is respected for both TCP and UDP listeners. It also works correctly + // with hot restart. + // * On macOS, reuse_port for TCP does not do what it does on Linux. Instead of load balancing, + // the last socket wins and receives all connections/packets. For TCP, reuse_port is force + // disabled and the user is warned. For UDP, it is enabled, but only one worker will receive + // packets. For QUIC/H3, SW routing will send packets to other workers. For "raw" UDP, only + // a single worker will currently receive packets. + // * On Windows, reuse_port for TCP has undefined behavior. It is force disabled and the user + // is warned similar to macOS. It is left enabled for UDP with undefined behavior currently. + google.protobuf.BoolValue enable_reuse_port = 29; // Configuration for :ref:`access logs ` // emitted by this listener. repeated accesslog.v3.AccessLog access_log = 22; - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // writer to create, i.e. :ref:`name ` - // = "udp_default_writer" for creating a udp writer with writing in passthrough mode, - // = "udp_gso_batch_writer" for creating a udp writer with writing in batch mode. - // If not present, treat it as "udp_default_writer". - // [#not-implemented-hide:] - core.v3.TypedExtensionConfig udp_writer_config = 23; - // The maximum length a tcp listener's pending connections queue can grow to. If no value is // provided net.core.somaxconn will be used on Linux and 128 otherwise. google.protobuf.UInt32Value tcp_backlog_size = 24; // Whether the listener should bind to the port. A listener that doesn't // bind can only receive connections redirected from other listeners that set - // :ref:`use_original_dst ` + // :ref:`use_original_dst ` // to true. Default is true. google.protobuf.BoolValue bind_to_port = 26; + + // The exclusive listener type and the corresponding config. + // TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 + // Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. + // [#not-implemented-hide:] + oneof listener_specifier { + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` + // [#not-implemented-hide:] + InternalListenerConfig internal_listener = 27; + } + + // Enable MPTCP (multi-path TCP) on this listener. Clients will be allowed to establish + // MPTCP connections. Non-MPTCP clients will fall back to regular TCP. + bool enable_mptcp = 30; + + // Whether the listener should limit connections based upon the value of + // :ref:`global_downstream_max_connections `. + bool ignore_global_conn_limit = 31; } diff --git a/api/envoy/config/listener/v3/listener_components.proto b/api/envoy/config/listener/v3/listener_components.proto index c2236a34d3..aed27c3714 100644 --- a/api/envoy/config/listener/v3/listener_components.proto +++ b/api/envoy/config/listener/v3/listener_components.proto @@ -4,13 +4,16 @@ package envoy.config.listener.v3; import "envoy/config/core/v3/address.proto"; import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/config_source.proto"; import "envoy/type/v3/range.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; +import "xds/annotations/v3/status.proto"; + +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -18,11 +21,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.listener.v3"; option java_outer_classname = "ListenerComponentsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Listener components] // Listener :ref:`configuration overview ` +// [#next-free-field: 6] message Filter { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.listener.Filter"; @@ -30,14 +35,20 @@ message Filter { reserved "config"; - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. + // The name of the filter configuration. string name = 1 [(validate.rules).string = {min_len: 1}]; - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. oneof config_type { + // Filter specific configuration which depends on the filter being + // instantiated. See the supported filters for further documentation. + // [#extension-category: envoy.filters.network] google.protobuf.Any typed_config = 4; + + // Configuration source specifier for an extension configuration discovery + // service. In case of a failure and without the default configuration, the + // listener closes the connections. + // [#not-implemented-hide:] + core.v3.ExtensionConfigSource config_discovery = 5; } } @@ -55,9 +66,12 @@ message Filter { // 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). -// 7. Source IP address. -// 8. Source port. +// 6. Directly connected source IP address (this will only be different from the source IP address +// when using a listener filter that overrides the source address, such as the :ref:`Proxy Protocol +// listener filter `). +// 7. Source type (e.g. any, local or external network). +// 8. Source IP address. +// 9. Source port. // // 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 @@ -81,7 +95,7 @@ message Filter { // 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] -// [#next-free-field: 13] +// [#next-free-field: 14] message FilterChainMatch { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.listener.FilterChainMatch"; @@ -115,6 +129,11 @@ message FilterChainMatch { // [#not-implemented-hide:] google.protobuf.UInt32Value suffix_len = 5; + // The criteria is satisfied if the directly connected 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 directly connected source IP address is ignored. + repeated core.v3.CidrRange direct_source_prefix_ranges = 13; + // Specifies the connection source IP match type. Can be any, local or external network. ConnectionSourceType source_type = 12 [(validate.rules).enum = {defined_only: true}]; @@ -222,16 +241,18 @@ message FilterChain { // This field is deprecated. Add a // :ref:`PROXY protocol listener filter ` // explicitly instead. - google.protobuf.BoolValue use_proxy_proto = 4 [deprecated = true]; + google.protobuf.BoolValue use_proxy_proto = 4 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // [#not-implemented-hide:] filter chain metadata. core.v3.Metadata metadata = 5; // Optional custom transport socket implementation to use for downstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`DownstreamTlsContext ` in the `typed_config`. + // To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and + // :ref:`DownstreamTlsContext ` in the `typed_config`. // If no transport socket configuration is specified, new connections // will be set up with plaintext. + // [#extension-category: envoy.transport_sockets.downstream] core.v3.TransportSocket transport_socket = 6; // If present and nonzero, the amount of time to allow incoming connections to complete any @@ -239,10 +260,11 @@ message FilterChain { // establishment, the connection is summarily closed. google.protobuf.Duration transport_socket_connect_timeout = 9; - // [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - // name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - // chain is to be dynamically updated or removed via FCDS a unique name must be provided. - string name = 7; + // The unique name (or empty) by which this filter chain is known. + // Note: :ref:`filter_chain_matcher + // ` + // requires that filter chains are uniquely named within a listener. + string name = 7 [(xds.annotations.v3.field_status).work_in_progress = true]; // [#not-implemented-hide:] The configuration to specify whether the filter chain will be built on-demand. // If this field is not empty, the filter chain will be built on-demand. @@ -271,7 +293,7 @@ message FilterChain { // rules: // - destination_port_range: // start: 3306 -// end: 3306 +// end: 3307 // - destination_port_range: // start: 15000 // end: 15001 @@ -314,6 +336,7 @@ message ListenerFilterChainMatchPredicate { } } +// [#next-free-field: 6] message ListenerFilter { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.listener.ListenerFilter"; @@ -322,18 +345,24 @@ message ListenerFilter { reserved "config"; - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. + // The name of the filter configuration. string name = 1 [(validate.rules).string = {min_len: 1}]; - // Filter specific configuration which depends on the filter being instantiated. - // See the supported filters for further documentation. oneof config_type { + // Filter specific configuration which depends on the filter being + // instantiated. See the supported filters for further documentation. + // [#extension-category: envoy.filters.listener,envoy.filters.udp_listener] google.protobuf.Any typed_config = 3; + + // Configuration source specifier for an extension configuration discovery + // service. In case of a failure and without the default configuration, the + // listener closes the connections. + // [#not-implemented-hide:] + core.v3.ExtensionConfigSource config_discovery = 5; } // Optional match predicate used to disable the filter. The filter is enabled when this field is empty. - // See :ref:`ListenerFilterChainMatchPredicate ` + // See :ref:`ListenerFilterChainMatchPredicate ` // for further examples. ListenerFilterChainMatchPredicate filter_disabled = 4; } diff --git a/api/envoy/config/listener/v3/quic_config.proto b/api/envoy/config/listener/v3/quic_config.proto index c024be95ba..89dc34a06b 100644 --- a/api/envoy/config/listener/v3/quic_config.proto +++ b/api/envoy/config/listener/v3/quic_config.proto @@ -3,39 +3,64 @@ syntax = "proto3"; package envoy.config.listener.v3; import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/extension.proto"; +import "envoy/config/core/v3/protocol.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.listener.v3"; option java_outer_classname = "QuicConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; -// [#protodoc-title: QUIC listener Config] +// [#protodoc-title: QUIC listener config] -// Configuration specific to the QUIC protocol. -// Next id: 5 +// Configuration specific to the UDP QUIC listener. +// [#next-free-field: 8] message QuicProtocolOptions { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.listener.QuicProtocolOptions"; - // Maximum number of streams that the client can negotiate per connection. 100 - // if not specified. - google.protobuf.UInt32Value max_concurrent_streams = 1; + core.v3.QuicProtocolOptions quic_protocol_options = 1; // Maximum number of milliseconds that connection will be alive when there is - // no network activity. 300000ms if not specified. + // no network activity. + // + // If it is less than 1ms, Envoy will use 1ms. 300000ms if not specified. google.protobuf.Duration idle_timeout = 2; // Connection timeout in milliseconds before the crypto handshake is finished. - // 20000ms if not specified. + // + // If it is less than 5000ms, Envoy will use 5000ms. 20000ms if not specified. google.protobuf.Duration crypto_handshake_timeout = 3; // Runtime flag that controls whether the listener is enabled or not. If not specified, defaults // to enabled. core.v3.RuntimeFeatureFlag enabled = 4; + + // A multiplier to number of connections which is used to determine how many packets to read per + // event loop. A reasonable number should allow the listener to process enough payload but not + // starve TCP and other UDP sockets and also prevent long event loop duration. + // The default value is 32. This means if there are N QUIC connections, the total number of + // packets to read in each read event will be 32 * N. + // The actual number of packets to read in total by the UDP listener is also + // bound by 6000, regardless of this field or how many connections there are. + google.protobuf.UInt32Value packets_to_read_to_connection_count_ratio = 5 + [(validate.rules).uint32 = {gte: 1}]; + + // Configure which implementation of `quic::QuicCryptoClientStreamBase` to be used for this listener. + // If not specified the :ref:`QUICHE default one configured by ` will be used. + // [#extension-category: envoy.quic.server.crypto_stream] + core.v3.TypedExtensionConfig crypto_stream_config = 6; + + // Configure which implementation of `quic::ProofSource` to be used for this listener. + // If not specified the :ref:`default one configured by ` will be used. + // [#extension-category: envoy.quic.proof_source] + core.v3.TypedExtensionConfig proof_source_config = 7; } diff --git a/api/envoy/config/listener/v3/udp_default_writer_config.proto b/api/envoy/config/listener/v3/udp_default_writer_config.proto deleted file mode 100644 index 707a66c7b5..0000000000 --- a/api/envoy/config/listener/v3/udp_default_writer_config.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v3; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v3"; -option java_outer_classname = "UdpDefaultWriterConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Udp Default Writer Config] - -// [#not-implemented-hide:] -// Configuration specific to the Udp Default Writer. -message UdpDefaultWriterOptions { -} diff --git a/api/envoy/config/listener/v3/udp_gso_batch_writer_config.proto b/api/envoy/config/listener/v3/udp_gso_batch_writer_config.proto deleted file mode 100644 index 134cb6a42d..0000000000 --- a/api/envoy/config/listener/v3/udp_gso_batch_writer_config.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v3; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v3"; -option java_outer_classname = "UdpGsoBatchWriterConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Udp Gso Batch Writer Config] - -// [#not-implemented-hide:] -// Configuration specific to the Udp Gso Batch Writer. -message UdpGsoBatchWriterOptions { -} diff --git a/api/envoy/config/listener/v3/udp_listener_config.proto b/api/envoy/config/listener/v3/udp_listener_config.proto index 9edbe59548..f3f03d23ed 100644 --- a/api/envoy/config/listener/v3/udp_listener_config.proto +++ b/api/envoy/config/listener/v3/udp_listener_config.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package envoy.config.listener.v3; -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; +import "envoy/config/core/v3/udp_socket_config.proto"; +import "envoy/config/listener/v3/quic_config.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -11,29 +11,30 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.config.listener.v3"; option java_outer_classname = "UdpListenerConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; -// [#protodoc-title: UDP Listener Config] +// [#protodoc-title: UDP listener config] // Listener :ref:`configuration overview ` +// [#next-free-field: 8] message UdpListenerConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.listener.UdpListenerConfig"; - reserved 2; + reserved 1, 2, 3, 4, 6; reserved "config"; - // Used to look up UDP listener factory, matches "raw_udp_listener" or - // "quic_listener" to create a specific udp listener. - // If not specified, treat as "raw_udp_listener". - string udp_listener_name = 1; + // UDP socket configuration for the listener. The default for + // :ref:`prefer_gro ` is false for + // listener sockets. If receiving a large amount of datagrams from a small number of sources, it + // may be worthwhile to enable this option after performance testing. + core.v3.UdpSocketConfig downstream_socket_config = 5; - // Used to create a specific listener factory. To some factory, e.g. - // "raw_udp_listener", config is not needed. - oneof config_type { - google.protobuf.Any typed_config = 3; - } + // Configuration for QUIC protocol. If empty, QUIC will not be enabled on this listener. Set + // to the default object to enable QUIC without modifying any additional options. + QuicProtocolOptions quic_options = 7; } message ActiveRawUdpListenerConfig { diff --git a/api/envoy/config/listener/v4alpha/api_listener.proto b/api/envoy/config/listener/v4alpha/api_listener.proto deleted file mode 100644 index b8d076c365..0000000000 --- a/api/envoy/config/listener/v4alpha/api_listener.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v4alpha; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v4alpha"; -option java_outer_classname = "ApiListenerProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: API listener] - -// Describes a type of API listener, which is used in non-proxy clients. The type of API -// exposed to the non-proxy application depends on the type of API listener. -message ApiListener { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.ApiListener"; - - // The type in this field determines the type of API listener. At present, the following - // types are supported: - // envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) - // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the - // specific config message for each type of API listener. We could not do this in v2 because - // it would have caused circular dependencies for go protos: lds.proto depends on this file, - // and http_connection_manager.proto depends on rds.proto, which is in the same directory as - // lds.proto, so lds.proto cannot depend on this file.] - google.protobuf.Any api_listener = 1; -} diff --git a/api/envoy/config/listener/v4alpha/listener.proto b/api/envoy/config/listener/v4alpha/listener.proto deleted file mode 100644 index 5b8bd9b545..0000000000 --- a/api/envoy/config/listener/v4alpha/listener.proto +++ /dev/null @@ -1,279 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v4alpha; - -import "envoy/config/accesslog/v4alpha/accesslog.proto"; -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/extension.proto"; -import "envoy/config/core/v4alpha/socket_option.proto"; -import "envoy/config/listener/v4alpha/api_listener.proto"; -import "envoy/config/listener/v4alpha/listener_components.proto"; -import "envoy/config/listener/v4alpha/udp_listener_config.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/collection_entry.proto"; - -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v4alpha"; -option java_outer_classname = "ListenerProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Listener configuration] -// Listener :ref:`configuration overview ` - -// Listener list collections. Entries are *Listener* resources or references. -// [#not-implemented-hide:] -message ListenerCollection { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.ListenerCollection"; - - repeated xds.core.v3.CollectionEntry entries = 1; -} - -// [#next-free-field: 27] -message Listener { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.listener.v3.Listener"; - - enum DrainType { - // Drain in response to calling /healthcheck/fail admin endpoint (along with the health check - // filter), listener removal/modification, and hot restart. - DEFAULT = 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. - MODIFY_ONLY = 1; - } - - // [#not-implemented-hide:] - message DeprecatedV1 { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.Listener.DeprecatedV1"; - - // 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. - // - // This is deprecated. Use :ref:`Listener.bind_to_port - // ` - google.protobuf.BoolValue bind_to_port = 1; - } - - // Configuration for listener connection balancing. - message ConnectionBalanceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.Listener.ConnectionBalanceConfig"; - - // A connection balancer implementation that does exact balancing. This means that a lock is - // held during balancing so that connection counts are nearly exactly balanced between worker - // threads. This is "nearly" exact in the sense that a connection might close in parallel thus - // making the counts incorrect, but this should be rectified on the next accept. This balancer - // sacrifices accept throughput for accuracy and should be used when there are a small number of - // connections that rarely cycle (e.g., service mesh gRPC egress). - message ExactBalance { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.Listener.ConnectionBalanceConfig.ExactBalance"; - } - - oneof balance_type { - option (validate.required) = true; - - // If specified, the listener will use the exact connection balancer. - ExactBalance exact_balance = 1; - } - } - - reserved 14, 7; - - reserved "deprecated_v1"; - - // 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. - string name = 1; - - // 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. - core.v4alpha.Address address = 2 [(validate.rules).message = {required: true}]; - - // 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 `. - repeated FilterChain filter_chains = 3; - - // 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. - google.protobuf.BoolValue use_original_dst = 4; - - // The default filter chain if none of the filter chain matches. If no default filter chain is supplied, - // the connection will be closed. The filter chain match is ignored in this field. - FilterChain default_filter_chain = 25; - - // Soft limit on size of the listener’s new connection read and write buffers. - // If unspecified, an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // Listener metadata. - core.v4alpha.Metadata metadata = 6; - - // The type of draining to perform at a listener-wide level. - DrainType drain_type = 8; - - // 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. - // UDP Listener filters can be specified when the protocol in the listener socket address in - // :ref:`protocol ` is :ref:`UDP - // `. - // UDP listeners currently support a single filter. - repeated ListenerFilter listener_filters = 9; - - // 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 unless - // `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the - // timeout. If not specified, a default timeout of 15s is used. - google.protobuf.Duration listener_filters_timeout = 15; - - // Whether a connection should be created when listener filters timeout. Default is false. - // - // .. attention:: - // - // Some listener filters, such as :ref:`Proxy Protocol filter - // `, should not be used with this option. It will cause - // unexpected behavior when a connection is created. - bool continue_on_listener_filters_timeout = 17; - - // 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. - google.protobuf.BoolValue transparent = 10; - - // 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. - google.protobuf.BoolValue freebind = 11; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated core.v4alpha.SocketOption socket_options = 13; - - // 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. - google.protobuf.UInt32Value tcp_fast_open_queue_length = 12; - - // Specifies the intended direction of the traffic relative to the local Envoy. - core.v4alpha.TrafficDirection traffic_direction = 16; - - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // listener to create, i.e. :ref:`udp_listener_name - // ` = "raw_udp_listener" for - // creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". - UdpListenerConfig udp_listener_config = 18; - - // Used to represent an API listener, which is used in non-proxy clients. The type of API - // exposed to the non-proxy application depends on the type of API listener. - // When this field is set, no other field except for :ref:`name` - // should be set. - // - // .. note:: - // - // Currently only one ApiListener can be installed; and it can only be done via bootstrap config, - // not LDS. - // - // [#next-major-version: In the v3 API, instead of this messy approach where the socket - // listener fields are directly in the top-level Listener message and the API listener types - // are in the ApiListener message, the socket listener messages should be in their own message, - // and the top-level Listener should essentially be a oneof that selects between the - // socket listener and the various types of API listener. That way, a given Listener message - // can structurally only contain the fields of the relevant type.] - ApiListener api_listener = 19; - - // The listener's connection balancer configuration, currently only applicable to TCP listeners. - // If no configuration is specified, Envoy will not attempt to balance active connections between - // worker threads. - ConnectionBalanceConfig connection_balance_config = 20; - - // When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and - // create one socket for each worker thread. This makes inbound connections - // distribute among worker threads roughly evenly in cases where there are a high number - // of connections. When this flag is set to false, all worker threads share one socket. - // - // Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart - // (see `3rd paragraph in 'soreuseport' commit message - // `_). - // This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket - // `_. - bool reuse_port = 21; - - // Configuration for :ref:`access logs ` - // emitted by this listener. - repeated accesslog.v4alpha.AccessLog access_log = 22; - - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // writer to create, i.e. :ref:`name ` - // = "udp_default_writer" for creating a udp writer with writing in passthrough mode, - // = "udp_gso_batch_writer" for creating a udp writer with writing in batch mode. - // If not present, treat it as "udp_default_writer". - // [#not-implemented-hide:] - core.v4alpha.TypedExtensionConfig udp_writer_config = 23; - - // The maximum length a tcp listener's pending connections queue can grow to. If no value is - // provided net.core.somaxconn will be used on Linux and 128 otherwise. - google.protobuf.UInt32Value tcp_backlog_size = 24; - - // Whether the listener should bind to the port. A listener that doesn't - // bind can only receive connections redirected from other listeners that set - // :ref:`use_original_dst ` - // to true. Default is true. - google.protobuf.BoolValue bind_to_port = 26; -} diff --git a/api/envoy/config/listener/v4alpha/listener_components.proto b/api/envoy/config/listener/v4alpha/listener_components.proto deleted file mode 100644 index 021aadc928..0000000000 --- a/api/envoy/config/listener/v4alpha/listener_components.proto +++ /dev/null @@ -1,331 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/type/v3/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v4alpha"; -option java_outer_classname = "ListenerComponentsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Listener components] -// Listener :ref:`configuration overview ` - -message Filter { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.listener.v3.Filter"; - - reserved 3, 2; - - reserved "config"; - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - oneof config_type { - google.protobuf.Any typed_config = 4; - } -} - -// 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). -// 7. Source IP address. -// 8. Source port. -// -// 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). -// -// A different way to reason about the filter chain matches: -// Suppose there exists N filter chains. Prune the filter chain set using the above 8 steps. -// In each step, filter chains which most specifically matches the attributes continue to the next step. -// The listener guarantees at most 1 filter chain is left after all of the steps. -// -// Example: -// -// For destination port, filter chains specifying the destination port of incoming traffic are the -// most specific match. If none of the filter chains specifies the exact destination port, the filter -// chains which do not specify ports are the most specific match. Filter chains specifying the -// wrong port can never be the most specific match. -// -// [#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] -// [#next-free-field: 13] -message FilterChainMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.FilterChainMatch"; - - enum ConnectionSourceType { - // Any connection source matches. - ANY = 0; - - // Match a connection originating from the same host. - SAME_IP_OR_LOOPBACK = 1; - - // Match a connection originating from a different host. - EXTERNAL = 2; - } - - reserved 1; - - // Optional destination port to consider when use_original_dst is set on the - // listener in determining a filter chain match. - google.protobuf.UInt32Value destination_port = 8 [(validate.rules).uint32 = {lte: 65535 gte: 1}]; - - // 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. - repeated core.v4alpha.CidrRange prefix_ranges = 3; - - // 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:] - string address_suffix = 4; - - // [#not-implemented-hide:] - google.protobuf.UInt32Value suffix_len = 5; - - // Specifies the connection source IP match type. Can be any, local or external network. - ConnectionSourceType source_type = 12 [(validate.rules).enum = {defined_only: true}]; - - // 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. - repeated core.v4alpha.CidrRange source_prefix_ranges = 6; - - // 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. - repeated uint32 source_ports = 7 - [(validate.rules).repeated = {items {uint32 {lte: 65535 gte: 1}}}]; - - // 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. - repeated string server_names = 11; - - // 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.filters.listener.tls_inspector ` - // when TLS protocol is detected. - string transport_protocol = 9; - - // 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.filters.listener.tls_inspector - // `, - // * ``h2`` - set by :ref:`envoy.filters.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. - repeated string application_protocols = 10; -} - -// A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and -// various other parameters. -// [#next-free-field: 10] -message FilterChain { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.FilterChain"; - - // The configuration for on-demand filter chain. If this field is not empty in FilterChain message, - // a filter chain will be built on-demand. - // On-demand filter chains help speedup the warming up of listeners since the building and initialization of - // an on-demand filter chain will be postponed to the arrival of new connection requests that require this filter chain. - // Filter chains that are not often used can be set as on-demand. - message OnDemandConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.FilterChain.OnDemandConfiguration"; - - // The timeout to wait for filter chain placeholders to complete rebuilding. - // 1. If this field is set to 0, timeout is disabled. - // 2. If not specified, a default timeout of 15s is used. - // Rebuilding will wait until dependencies are ready, have failed, or this timeout is reached. - // Upon failure or timeout, all connections related to this filter chain will be closed. - // Rebuilding will start again on the next new connection. - google.protobuf.Duration rebuild_timeout = 1; - } - - reserved 2, 4; - - reserved "tls_context", "use_proxy_proto"; - - // The criteria to use when matching a connection to this filter chain. - FilterChainMatch filter_chain_match = 1; - - // 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. - repeated Filter filters = 3; - - // [#not-implemented-hide:] filter chain metadata. - core.v4alpha.Metadata metadata = 5; - - // Optional custom transport socket implementation to use for downstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`DownstreamTlsContext ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - core.v4alpha.TransportSocket transport_socket = 6; - - // If present and nonzero, the amount of time to allow incoming connections to complete any - // transport socket negotiations. If this expires before the transport reports connection - // establishment, the connection is summarily closed. - google.protobuf.Duration transport_socket_connect_timeout = 9; - - // [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - // name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - // chain is to be dynamically updated or removed via FCDS a unique name must be provided. - string name = 7; - - // [#not-implemented-hide:] The configuration to specify whether the filter chain will be built on-demand. - // If this field is not empty, the filter chain will be built on-demand. - // Otherwise, the filter chain will be built normally and block listener warming. - OnDemandConfiguration on_demand_configuration = 8; -} - -// Listener filter chain match configuration. This is a recursive structure which allows complex -// nested match configurations to be built using various logical operators. -// -// Examples: -// -// * Matches if the destination port is 3306. -// -// .. code-block:: yaml -// -// destination_port_range: -// start: 3306 -// end: 3307 -// -// * Matches if the destination port is 3306 or 15000. -// -// .. code-block:: yaml -// -// or_match: -// rules: -// - destination_port_range: -// start: 3306 -// end: 3306 -// - destination_port_range: -// start: 15000 -// end: 15001 -// -// [#next-free-field: 6] -message ListenerFilterChainMatchPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.ListenerFilterChainMatchPredicate"; - - // A set of match configurations used for logical operations. - message MatchSet { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.ListenerFilterChainMatchPredicate.MatchSet"; - - // The list of rules that make up the set. - repeated ListenerFilterChainMatchPredicate rules = 1 - [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - ListenerFilterChainMatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // Match destination port. Particularly, the match evaluation must use the recovered local port if - // the owning listener filter is after :ref:`an original_dst listener filter `. - type.v3.Int32Range destination_port_range = 5; - } -} - -message ListenerFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.ListenerFilter"; - - reserved 2; - - reserved "config"; - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being instantiated. - // See the supported filters for further documentation. - oneof config_type { - google.protobuf.Any typed_config = 3; - } - - // Optional match predicate used to disable the filter. The filter is enabled when this field is empty. - // See :ref:`ListenerFilterChainMatchPredicate ` - // for further examples. - ListenerFilterChainMatchPredicate filter_disabled = 4; -} diff --git a/api/envoy/config/listener/v4alpha/quic_config.proto b/api/envoy/config/listener/v4alpha/quic_config.proto deleted file mode 100644 index b2b1df1e37..0000000000 --- a/api/envoy/config/listener/v4alpha/quic_config.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v4alpha"; -option java_outer_classname = "QuicConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: QUIC listener Config] - -// Configuration specific to the QUIC protocol. -// Next id: 5 -message QuicProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.QuicProtocolOptions"; - - // Maximum number of streams that the client can negotiate per connection. 100 - // if not specified. - google.protobuf.UInt32Value max_concurrent_streams = 1; - - // Maximum number of milliseconds that connection will be alive when there is - // no network activity. 300000ms if not specified. - google.protobuf.Duration idle_timeout = 2; - - // Connection timeout in milliseconds before the crypto handshake is finished. - // 20000ms if not specified. - google.protobuf.Duration crypto_handshake_timeout = 3; - - // Runtime flag that controls whether the listener is enabled or not. If not specified, defaults - // to enabled. - core.v4alpha.RuntimeFeatureFlag enabled = 4; -} diff --git a/api/envoy/config/listener/v4alpha/udp_default_writer_config.proto b/api/envoy/config/listener/v4alpha/udp_default_writer_config.proto deleted file mode 100644 index 02660a7b49..0000000000 --- a/api/envoy/config/listener/v4alpha/udp_default_writer_config.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v4alpha; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v4alpha"; -option java_outer_classname = "UdpDefaultWriterConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Udp Default Writer Config] - -// [#not-implemented-hide:] -// Configuration specific to the Udp Default Writer. -message UdpDefaultWriterOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.UdpDefaultWriterOptions"; -} diff --git a/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.proto b/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.proto deleted file mode 100644 index 5427fe19e7..0000000000 --- a/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v4alpha; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v4alpha"; -option java_outer_classname = "UdpGsoBatchWriterConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Udp Gso Batch Writer Config] - -// [#not-implemented-hide:] -// Configuration specific to the Udp Gso Batch Writer. -message UdpGsoBatchWriterOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.UdpGsoBatchWriterOptions"; -} diff --git a/api/envoy/config/listener/v4alpha/udp_listener_config.proto b/api/envoy/config/listener/v4alpha/udp_listener_config.proto deleted file mode 100644 index 7e40e9529f..0000000000 --- a/api/envoy/config/listener/v4alpha/udp_listener_config.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v4alpha; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v4alpha"; -option java_outer_classname = "UdpListenerConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: UDP Listener Config] -// Listener :ref:`configuration overview ` - -message UdpListenerConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.UdpListenerConfig"; - - reserved 2; - - reserved "config"; - - // Used to look up UDP listener factory, matches "raw_udp_listener" or - // "quic_listener" to create a specific udp listener. - // If not specified, treat as "raw_udp_listener". - string udp_listener_name = 1; - - // Used to create a specific listener factory. To some factory, e.g. - // "raw_udp_listener", config is not needed. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -message ActiveRawUdpListenerConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v3.ActiveRawUdpListenerConfig"; -} diff --git a/api/envoy/config/metrics/v2/metrics_service.proto b/api/envoy/config/metrics/v2/metrics_service.proto index f1f8662f07..bb063770dd 100644 --- a/api/envoy/config/metrics/v2/metrics_service.proto +++ b/api/envoy/config/metrics/v2/metrics_service.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.metrics.v2"; option java_outer_classname = "MetricsServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v2;metricsv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Metrics service] diff --git a/api/envoy/config/metrics/v2/stats.proto b/api/envoy/config/metrics/v2/stats.proto index 62afcf56e4..592558a1cb 100644 --- a/api/envoy/config/metrics/v2/stats.proto +++ b/api/envoy/config/metrics/v2/stats.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.metrics.v2"; option java_outer_classname = "StatsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v2;metricsv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Stats] diff --git a/api/envoy/config/metrics/v3/metrics_service.proto b/api/envoy/config/metrics/v3/metrics_service.proto index 4bb6c77e66..effab34f9d 100644 --- a/api/envoy/config/metrics/v3/metrics_service.proto +++ b/api/envoy/config/metrics/v3/metrics_service.proto @@ -14,13 +14,25 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.metrics.v3"; option java_outer_classname = "MetricsServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v3;metricsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Metrics service] // Metrics Service is configured as a built-in *envoy.stat_sinks.metrics_service* :ref:`StatsSink -// `. This opaque configuration will be used to create +// `. This opaque configuration will be used to create // Metrics Service. +// +// Example: +// +// .. code-block:: yaml +// +// stats_sinks: +// - name: envoy.stat_sinks.metrics_service +// typed_config: +// "@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig +// transport_api_version: V3 +// // [#extension: envoy.stat_sinks.metrics_service] message MetricsServiceConfig { option (udpa.annotations.versioning).previous_message_type = @@ -36,6 +48,11 @@ message MetricsServiceConfig { // If true, counters are reported as the delta between flushing intervals. Otherwise, the current // counter value is reported. Defaults to false. // Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the - // sink will take updates from the :ref:`MetricsResponse `. + // sink will take updates from the :ref:`MetricsResponse `. google.protobuf.BoolValue report_counters_as_deltas = 2; + + // If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService, + // and the tag extracted name will be used instead of the full name, which may contain values used by the tag + // extractor or additional tags added during stats creation. + bool emit_tags_as_labels = 4; } diff --git a/api/envoy/config/metrics/v3/stats.proto b/api/envoy/config/metrics/v3/stats.proto index be0cbb9dab..17ae761ea3 100644 --- a/api/envoy/config/metrics/v3/stats.proto +++ b/api/envoy/config/metrics/v3/stats.proto @@ -6,7 +6,6 @@ import "envoy/config/core/v3/address.proto"; import "envoy/type/matcher/v3/string.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; import "udpa/annotations/status.proto"; @@ -16,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.metrics.v3"; option java_outer_classname = "StatsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v3;metricsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Stats] @@ -30,18 +30,14 @@ message StatsSink { reserved "config"; // The name of the stats sink to instantiate. The name must match a supported - // stats sink. The built-in stats sinks are: - // - // * :ref:`envoy.stat_sinks.statsd ` - // * :ref:`envoy.stat_sinks.dog_statsd ` - // * :ref:`envoy.stat_sinks.metrics_service ` - // * :ref:`envoy.stat_sinks.hystrix ` - // + // stats sink. + // See the :ref:`extensions listed in typed_config below ` for the default list of available stats sink. // Sinks optionally support tagged/multiple dimensional metrics. string name = 1; // Stats sink specific configuration which depends on the sink being instantiated. See - // :ref:`StatsdSink ` for an example. + // :ref:`StatsdSink ` for an example. + // [#extension-category: envoy.stats_sinks] oneof config_type { google.protobuf.Any typed_config = 3; } @@ -54,13 +50,13 @@ message StatsConfig { // Each stat name is iteratively processed through these tag specifiers. // When a tag is matched, the first capture group is removed from the name so - // later :ref:`TagSpecifiers ` cannot match that + // later :ref:`TagSpecifiers ` cannot match that // same portion of the match. repeated TagSpecifier stats_tags = 1; // Use all default tag regexes specified in Envoy. These can be combined with // custom tags specified in :ref:`stats_tags - // `. They will be processed before + // `. They will be processed before // the custom tags. // // .. note:: @@ -122,7 +118,7 @@ message StatsMatcher { // However, StatsMatcher can be used to limit the creation of families of stats in order to // conserve memory. Stats can either be disabled entirely, or they can be // limited by either an exclusion or an inclusion list of :ref:`StringMatcher - // ` protos: + // ` protos: // // * If `reject_all` is set to `true`, no stats will be instantiated. If `reject_all` is set to // `false`, all stats will be instantiated. @@ -216,9 +212,9 @@ message TagSpecifier { // sink. Envoy has a set of default names and regexes to extract dynamic // portions of existing stats, which can be found in :repo:`well_known_names.h // ` in the Envoy repository. If a :ref:`tag_name - // ` is provided in the config and - // neither :ref:`regex ` or - // :ref:`fixed_value ` were specified, + // ` is provided in the config and + // neither :ref:`regex ` or + // :ref:`fixed_value ` were specified, // Envoy will attempt to find that name in its set of defaults and use the accompanying regex. // // .. note:: @@ -355,7 +351,7 @@ message StatsdSink { // Stats configuration proto schema for built-in *envoy.stat_sinks.dog_statsd* sink. // The sink emits stats with `DogStatsD `_ // compatible tags. Tags are configurable via :ref:`StatsConfig -// `. +// `. // [#extension: envoy.stat_sinks.dog_statsd] message DogStatsdSink { option (udpa.annotations.versioning).previous_message_type = @@ -372,7 +368,7 @@ message DogStatsdSink { } // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field - // ` for more details. + // ` for more details. string prefix = 3; // Optional max datagram size to use when sending UDP messages. By default Envoy diff --git a/api/envoy/config/metrics/v4alpha/metrics_service.proto b/api/envoy/config/metrics/v4alpha/metrics_service.proto deleted file mode 100644 index edc0fcfc4d..0000000000 --- a/api/envoy/config/metrics/v4alpha/metrics_service.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.config.metrics.v4alpha; - -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.metrics.v4alpha"; -option java_outer_classname = "MetricsServiceProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Metrics service] - -// Metrics Service is configured as a built-in *envoy.stat_sinks.metrics_service* :ref:`StatsSink -// `. This opaque configuration will be used to create -// Metrics Service. -// [#extension: envoy.stat_sinks.metrics_service] -message MetricsServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v3.MetricsServiceConfig"; - - // The upstream gRPC cluster that hosts the metrics service. - core.v4alpha.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; - - // API version for metric service transport protocol. This describes the metric service gRPC - // endpoint and version of messages used on the wire. - core.v4alpha.ApiVersion transport_api_version = 3 [(validate.rules).enum = {defined_only: true}]; - - // If true, counters are reported as the delta between flushing intervals. Otherwise, the current - // counter value is reported. Defaults to false. - // Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the - // sink will take updates from the :ref:`MetricsResponse `. - google.protobuf.BoolValue report_counters_as_deltas = 2; -} diff --git a/api/envoy/config/metrics/v4alpha/stats.proto b/api/envoy/config/metrics/v4alpha/stats.proto deleted file mode 100644 index bd37875c0b..0000000000 --- a/api/envoy/config/metrics/v4alpha/stats.proto +++ /dev/null @@ -1,416 +0,0 @@ -syntax = "proto3"; - -package envoy.config.metrics.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.metrics.v4alpha"; -option java_outer_classname = "StatsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Stats] -// Statistics :ref:`architecture overview `. - -// Configuration for pluggable stats sinks. -message StatsSink { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.metrics.v3.StatsSink"; - - reserved 2; - - reserved "config"; - - // The name of the stats sink to instantiate. The name must match a supported - // stats sink. The built-in stats sinks are: - // - // * :ref:`envoy.stat_sinks.statsd ` - // * :ref:`envoy.stat_sinks.dog_statsd ` - // * :ref:`envoy.stat_sinks.metrics_service ` - // * :ref:`envoy.stat_sinks.hystrix ` - // - // Sinks optionally support tagged/multiple dimensional metrics. - string name = 1; - - // Stats sink specific configuration which depends on the sink being instantiated. See - // :ref:`StatsdSink ` for an example. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -// Statistics configuration such as tagging. -message StatsConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v3.StatsConfig"; - - // Each stat name is iteratively processed through these tag specifiers. - // When a tag is matched, the first capture group is removed from the name so - // later :ref:`TagSpecifiers ` cannot match that - // same portion of the match. - repeated TagSpecifier stats_tags = 1; - - // Use all default tag regexes specified in Envoy. These can be combined with - // custom tags specified in :ref:`stats_tags - // `. They will be processed before - // the custom tags. - // - // .. note:: - // - // If any default tags are specified twice, the config will be considered - // invalid. - // - // See :repo:`well_known_names.h ` for a list of the - // default tags in Envoy. - // - // If not provided, the value is assumed to be true. - google.protobuf.BoolValue use_all_default_tags = 2; - - // Inclusion/exclusion matcher for stat name creation. If not provided, all stats are instantiated - // as normal. Preventing the instantiation of certain families of stats can improve memory - // performance for Envoys running especially large configs. - // - // .. warning:: - // Excluding stats may affect Envoy's behavior in undocumented ways. See - // `issue #8771 `_ for more information. - // If any unexpected behavior changes are observed, please open a new issue immediately. - StatsMatcher stats_matcher = 3; - - // Defines rules for setting the histogram buckets. Rules are evaluated in order, and the first - // match is applied. If no match is found (or if no rules are set), the following default buckets - // are used: - // - // .. code-block:: json - // - // [ - // 0.5, - // 1, - // 5, - // 10, - // 25, - // 50, - // 100, - // 250, - // 500, - // 1000, - // 2500, - // 5000, - // 10000, - // 30000, - // 60000, - // 300000, - // 600000, - // 1800000, - // 3600000 - // ] - repeated HistogramBucketSettings histogram_bucket_settings = 4; -} - -// Configuration for disabling stat instantiation. -message StatsMatcher { - // The instantiation of stats is unrestricted by default. If the goal is to configure Envoy to - // instantiate all stats, there is no need to construct a StatsMatcher. - // - // However, StatsMatcher can be used to limit the creation of families of stats in order to - // conserve memory. Stats can either be disabled entirely, or they can be - // limited by either an exclusion or an inclusion list of :ref:`StringMatcher - // ` protos: - // - // * If `reject_all` is set to `true`, no stats will be instantiated. If `reject_all` is set to - // `false`, all stats will be instantiated. - // - // * If an exclusion list is supplied, any stat name matching *any* of the StringMatchers in the - // list will not instantiate. - // - // * If an inclusion list is supplied, no stats will instantiate, except those matching *any* of - // the StringMatchers in the list. - // - // - // A StringMatcher can be used to match against an exact string, a suffix / prefix, or a regex. - // **NB:** For performance reasons, it is highly recommended to use a prefix- or suffix-based - // matcher rather than a regex-based matcher. - // - // Example 1. Excluding all stats. - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "rejectAll": "true" - // } - // } - // - // Example 2. Excluding all cluster-specific stats, but not cluster-manager stats: - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "exclusionList": { - // "patterns": [ - // { - // "prefix": "cluster." - // } - // ] - // } - // } - // } - // - // Example 3. Including only manager-related stats: - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "inclusionList": { - // "patterns": [ - // { - // "prefix": "cluster_manager." - // }, - // { - // "prefix": "listener_manager." - // } - // ] - // } - // } - // } - // - - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v3.StatsMatcher"; - - oneof stats_matcher { - option (validate.required) = true; - - // If `reject_all` is true, then all stats are disabled. If `reject_all` is false, then all - // stats are enabled. - bool reject_all = 1; - - // Exclusive match. All stats are enabled except for those matching one of the supplied - // StringMatcher protos. - type.matcher.v4alpha.ListStringMatcher exclusion_list = 2; - - // Inclusive match. No stats are enabled except for those matching one of the supplied - // StringMatcher protos. - type.matcher.v4alpha.ListStringMatcher inclusion_list = 3; - } -} - -// Designates a tag name and value pair. The value may be either a fixed value -// or a regex providing the value via capture groups. The specified tag will be -// unconditionally set if a fixed value, otherwise it will only be set if one -// or more capture groups in the regex match. -message TagSpecifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v3.TagSpecifier"; - - // Attaches an identifier to the tag values to identify the tag being in the - // sink. Envoy has a set of default names and regexes to extract dynamic - // portions of existing stats, which can be found in :repo:`well_known_names.h - // ` in the Envoy repository. If a :ref:`tag_name - // ` is provided in the config and - // neither :ref:`regex ` or - // :ref:`fixed_value ` were specified, - // Envoy will attempt to find that name in its set of defaults and use the accompanying regex. - // - // .. note:: - // - // It is invalid to specify the same tag name twice in a config. - string tag_name = 1; - - oneof tag_value { - // Designates a tag to strip from the tag extracted name and provide as a named - // tag value for all statistics. This will only occur if any part of the name - // matches the regex provided with one or more capture groups. - // - // The first capture group identifies the portion of the name to remove. The - // second capture group (which will normally be nested inside the first) will - // designate the value of the tag for the statistic. If no second capture - // group is provided, the first will also be used to set the value of the tag. - // All other capture groups will be ignored. - // - // Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and - // one tag specifier: - // - // .. code-block:: json - // - // { - // "tag_name": "envoy.cluster_name", - // "regex": "^cluster\\.((.+?)\\.)" - // } - // - // Note that the regex will remove ``foo_cluster.`` making the tag extracted - // name ``cluster.upstream_rq_timeout`` and the tag value for - // ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no - // ``.`` character because of the second capture group). - // - // Example 2. a stat name - // ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two - // tag specifiers: - // - // .. code-block:: json - // - // [ - // { - // "tag_name": "envoy.http_user_agent", - // "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" - // }, - // { - // "tag_name": "envoy.http_conn_manager_prefix", - // "regex": "^http\\.((.*?)\\.)" - // } - // ] - // - // The two regexes of the specifiers will be processed in the definition order. - // - // The first regex will remove ``ios.``, leaving the tag extracted name - // ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag - // ``envoy.http_user_agent`` will be added with tag value ``ios``. - // - // The second regex will remove ``connection_manager_1.`` from the tag - // extracted name produced by the first regex - // ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving - // ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag - // ``envoy.http_conn_manager_prefix`` will be added with the tag value - // ``connection_manager_1``. - string regex = 2 [(validate.rules).string = {max_bytes: 1024}]; - - // Specifies a fixed tag value for the ``tag_name``. - string fixed_value = 3; - } -} - -// Specifies a matcher for stats and the buckets that matching stats should use. -message HistogramBucketSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v3.HistogramBucketSettings"; - - // The stats that this rule applies to. The match is applied to the original stat name - // before tag-extraction, for example `cluster.exampleclustername.upstream_cx_length_ms`. - type.matcher.v4alpha.StringMatcher match = 1 [(validate.rules).message = {required: true}]; - - // Each value is the upper bound of a bucket. Each bucket must be greater than 0 and unique. - // The order of the buckets does not matter. - repeated double buckets = 2 [(validate.rules).repeated = { - min_items: 1 - unique: true - items {double {gt: 0.0}} - }]; -} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.statsd* sink. This sink does not support -// tagged metrics. -// [#extension: envoy.stat_sinks.statsd] -message StatsdSink { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.metrics.v3.StatsdSink"; - - oneof statsd_specifier { - option (validate.required) = true; - - // The UDP address of a running `statsd `_ - // compliant listener. If specified, statistics will be flushed to this - // address. - core.v4alpha.Address address = 1; - - // The name of a cluster that is running a TCP `statsd - // `_ compliant listener. If specified, - // Envoy will connect to this cluster to flush statistics. - string tcp_cluster_name = 2; - } - - // Optional custom prefix for StatsdSink. If - // specified, this will override the default prefix. - // For example: - // - // .. code-block:: json - // - // { - // "prefix" : "envoy-prod" - // } - // - // will change emitted stats to - // - // .. code-block:: cpp - // - // envoy-prod.test_counter:1|c - // envoy-prod.test_timer:5|ms - // - // Note that the default prefix, "envoy", will be used if a prefix is not - // specified. - // - // Stats with default prefix: - // - // .. code-block:: cpp - // - // envoy.test_counter:1|c - // envoy.test_timer:5|ms - string prefix = 3; -} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.dog_statsd* sink. -// The sink emits stats with `DogStatsD `_ -// compatible tags. Tags are configurable via :ref:`StatsConfig -// `. -// [#extension: envoy.stat_sinks.dog_statsd] -message DogStatsdSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v3.DogStatsdSink"; - - reserved 2; - - oneof dog_statsd_specifier { - option (validate.required) = true; - - // The UDP address of a running DogStatsD compliant listener. If specified, - // statistics will be flushed to this address. - core.v4alpha.Address address = 1; - } - - // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field - // ` for more details. - string prefix = 3; - - // Optional max datagram size to use when sending UDP messages. By default Envoy - // will emit one metric per datagram. By specifying a max-size larger than a single - // metric, Envoy will emit multiple, new-line separated metrics. The max datagram - // size should not exceed your network's MTU. - // - // Note that this value may not be respected if smaller than a single metric. - google.protobuf.UInt64Value max_bytes_per_datagram = 4 [(validate.rules).uint64 = {gt: 0}]; -} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.hystrix* sink. -// The sink emits stats in `text/event-stream -// `_ -// formatted stream for use by `Hystrix dashboard -// `_. -// -// Note that only a single HystrixSink should be configured. -// -// Streaming is started through an admin endpoint :http:get:`/hystrix_event_stream`. -// [#extension: envoy.stat_sinks.hystrix] -message HystrixSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v3.HystrixSink"; - - // The number of buckets the rolling statistical window is divided into. - // - // Each time the sink is flushed, all relevant Envoy statistics are sampled and - // added to the rolling window (removing the oldest samples in the window - // in the process). The sink then outputs the aggregate statistics across the - // current rolling window to the event stream(s). - // - // rolling_window(ms) = stats_flush_interval(ms) * num_of_buckets - // - // More detailed explanation can be found in `Hystrix wiki - // `_. - int64 num_buckets = 1; -} diff --git a/api/envoy/config/overload/v2alpha/overload.proto b/api/envoy/config/overload/v2alpha/overload.proto index 03886cdee6..5c7639b01e 100644 --- a/api/envoy/config/overload/v2alpha/overload.proto +++ b/api/envoy/config/overload/v2alpha/overload.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.overload.v2alpha"; option java_outer_classname = "OverloadProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/overload/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Overload Manager] diff --git a/api/envoy/config/overload/v3/overload.proto b/api/envoy/config/overload/v3/overload.proto index 55a66500c9..3868df2348 100644 --- a/api/envoy/config/overload/v3/overload.proto +++ b/api/envoy/config/overload/v3/overload.proto @@ -6,7 +6,6 @@ import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -15,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.overload.v3"; option java_outer_classname = "OverloadProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/overload/v3;overloadv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Overload Manager] @@ -33,15 +33,12 @@ message ResourceMonitor { reserved "config"; // The name of the resource monitor to instantiate. Must match a registered - // resource monitor type. The built-in resource monitors are: - // - // * :ref:`envoy.resource_monitors.fixed_heap - // ` - // * :ref:`envoy.resource_monitors.injected_resource - // ` + // resource monitor type. + // See the :ref:`extensions listed in typed_config below ` for the default list of available resource monitor. string name = 1 [(validate.rules).string = {min_len: 1}]; // Configuration for the resource monitor being instantiated. + // [#extension-category: envoy.resource_monitors] oneof config_type { google.protobuf.Any typed_config = 3; } @@ -100,6 +97,12 @@ message ScaleTimersOverloadActionConfig { // :ref:`HttpConnectionManager.stream_idle_timeout // ` HTTP_DOWNSTREAM_STREAM_IDLE = 2; + + // Adjusts the timer for how long downstream clients have to finish transport-level negotiations + // before the connection is closed. + // This affects the value of + // :ref:`FilterChain.transport_socket_connect_timeout `. + TRANSPORT_SOCKET_CONNECT = 3; } message ScaleTimer { @@ -139,6 +142,26 @@ message OverloadAction { google.protobuf.Any typed_config = 3; } +// Configuration for which accounts the WatermarkBuffer Factories should +// track. +message BufferFactoryConfig { + // The minimum power of two at which Envoy starts tracking an account. + // + // Envoy has 8 power of two buckets starting with the provided exponent below. + // Concretely the 1st bucket contains accounts for streams that use + // [2^minimum_account_to_track_power_of_two, + // 2^(minimum_account_to_track_power_of_two + 1)) bytes. + // With the 8th bucket tracking accounts + // >= 128 * 2^minimum_account_to_track_power_of_two. + // + // The maximum value is 56, since we're using uint64_t for bytes counting, + // and that's the last value that would use the 8 buckets. In practice, + // we don't expect the proxy to be holding 2^56 bytes. + // + // If omitted, Envoy should not do any tracking. + uint32 minimum_account_to_track_power_of_two = 1 [(validate.rules).uint32 = {lte: 56 gte: 10}]; +} + message OverloadManager { option (udpa.annotations.versioning).previous_message_type = "envoy.config.overload.v2alpha.OverloadManager"; @@ -151,4 +174,7 @@ message OverloadManager { // The set of overload actions. repeated OverloadAction actions = 3; + + // Configuration for buffer factory. + BufferFactoryConfig buffer_factory_config = 4; } diff --git a/api/envoy/config/ratelimit/v2/rls.proto b/api/envoy/config/ratelimit/v2/rls.proto index 87fc0a3da4..4fd3671de7 100644 --- a/api/envoy/config/ratelimit/v2/rls.proto +++ b/api/envoy/config/ratelimit/v2/rls.proto @@ -10,12 +10,12 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.ratelimit.v2"; option java_outer_classname = "RlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v2;ratelimitv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Rate limit service] // Rate limit :ref:`configuration overview `. -// [#next-free-field: 6] message RateLimitServiceConfig { reserved 1, 3; @@ -23,10 +23,4 @@ message RateLimitServiceConfig { // will connect to this cluster when it needs to make rate limit service // requests. api.v2.core.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; - - // API version for rate limit transport protocol. If `transport_api_version` is set to `V2`, then - // this will instead select the alpha version of the V2 API; `pb.lyft.ratelimit.RateLimitService` - // rather than the final V2 API `envoy.service.ratelimit.v2.RateLimitService`. This setting has - // no affect if `transport_api_version` is set to `V3`. - bool use_alpha = 5; } diff --git a/api/envoy/config/ratelimit/v3/rls.proto b/api/envoy/config/ratelimit/v3/rls.proto index a4526c3ebf..6fc47ef501 100644 --- a/api/envoy/config/ratelimit/v3/rls.proto +++ b/api/envoy/config/ratelimit/v3/rls.proto @@ -12,12 +12,12 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.ratelimit.v3"; option java_outer_classname = "RlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v3;ratelimitv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Rate limit service] // Rate limit :ref:`configuration overview `. -// [#next-free-field: 6] message RateLimitServiceConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.ratelimit.v2.RateLimitServiceConfig"; @@ -30,13 +30,6 @@ message RateLimitServiceConfig { core.v3.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; // API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and - // version of messages used on the wire. If set to `V2`, then the `use_alpha` option will instead - // select the old alpha protocol. + // version of messages used on the wire. core.v3.ApiVersion transport_api_version = 4 [(validate.rules).enum = {defined_only: true}]; - - // API version for rate limit transport protocol. If `transport_api_version` is set to `V2`, then - // this will instead select the alpha version of the V2 API; `pb.lyft.ratelimit.RateLimitService` - // rather than the final V2 API `envoy.service.ratelimit.v2.RateLimitService`. This setting has - // no affect if `transport_api_version` is set to `V3`. - bool use_alpha = 5; } diff --git a/api/envoy/config/ratelimit/v4alpha/rls.proto b/api/envoy/config/ratelimit/v4alpha/rls.proto deleted file mode 100644 index d56fb1b324..0000000000 --- a/api/envoy/config/ratelimit/v4alpha/rls.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.config.ratelimit.v4alpha; - -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.ratelimit.v4alpha"; -option java_outer_classname = "RlsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Rate limit service] - -// Rate limit :ref:`configuration overview `. -// [#next-free-field: 6] -message RateLimitServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.ratelimit.v3.RateLimitServiceConfig"; - - reserved 1, 3; - - // Specifies the gRPC service that hosts the rate limit service. The client - // will connect to this cluster when it needs to make rate limit service - // requests. - core.v4alpha.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; - - // API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and - // version of messages used on the wire. If set to `V2`, then the `use_alpha` option will instead - // select the old alpha protocol. - core.v4alpha.ApiVersion transport_api_version = 4 [(validate.rules).enum = {defined_only: true}]; - - // API version for rate limit transport protocol. If `transport_api_version` is set to `V2`, then - // this will instead select the alpha version of the V2 API; `pb.lyft.ratelimit.RateLimitService` - // rather than the final V2 API `envoy.service.ratelimit.v2.RateLimitService`. This setting has - // no affect if `transport_api_version` is set to `V3`. - bool use_alpha = 5; -} diff --git a/api/envoy/config/rbac/v2/rbac.proto b/api/envoy/config/rbac/v2/rbac.proto index 943ac33e08..941d621772 100644 --- a/api/envoy/config/rbac/v2/rbac.proto +++ b/api/envoy/config/rbac/v2/rbac.proto @@ -16,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.rbac.v2"; option java_outer_classname = "RbacProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/rbac/v2;rbacv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Role Based Access Control (RBAC)] diff --git a/api/envoy/config/rbac/v3/rbac.proto b/api/envoy/config/rbac/v3/rbac.proto index 65884a919f..8abde899d7 100644 --- a/api/envoy/config/rbac/v3/rbac.proto +++ b/api/envoy/config/rbac/v3/rbac.proto @@ -3,14 +3,17 @@ syntax = "proto3"; package envoy.config.rbac.v3; import "envoy/config/core/v3/address.proto"; +import "envoy/config/core/v3/extension.proto"; import "envoy/config/route/v3/route_components.proto"; import "envoy/type/matcher/v3/metadata.proto"; import "envoy/type/matcher/v3/path.proto"; import "envoy/type/matcher/v3/string.proto"; +import "envoy/type/v3/range.proto"; import "google/api/expr/v1alpha1/checked.proto"; import "google/api/expr/v1alpha1/syntax.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -19,14 +22,15 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.rbac.v3"; option java_outer_classname = "RbacProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/rbac/v3;rbacv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Role Based Access Control (RBAC)] // Role Based Access Control (RBAC) provides service-level and method-level access control for a -// service. RBAC policies are additive. The policies are examined in order. Requests are allowed -// or denied based on the `action` and whether a matching policy is found. For instance, if the -// action is ALLOW and a matching policy is found the request should be allowed. +// service. Requests are allowed or denied based on the `action` and whether a matching policy is +// found. For instance, if the action is ALLOW and a matching policy is found the request should be +// allowed. // // RBAC can also be used to make access logging decisions by communicating with access loggers // through dynamic metadata. When the action is LOG and at least one policy matches, the @@ -59,7 +63,10 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // permissions: // - and_rules: // rules: -// - header: { name: ":method", exact_match: "GET" } +// - header: +// name: ":method" +// string_match: +// exact: "GET" // - url_path: // path: { prefix: "/products" } // - or_rules: @@ -104,6 +111,7 @@ message RBAC { Action action = 1 [(validate.rules).enum = {defined_only: true}]; // Maps from policy name to policy. A match occurs when at least one policy matches the request. + // The policies are evaluated in lexicographic order of the policy name. map policies = 2; } @@ -140,7 +148,7 @@ message Policy { } // Permission defines an action (or actions) that a principal can take. -// [#next-free-field: 11] +// [#next-free-field: 13] message Permission { option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v2.Permission"; @@ -180,6 +188,9 @@ message Permission { // A port number that describes the destination port connecting to. uint32 destination_port = 6 [(validate.rules).uint32 = {lte: 65535}]; + // A port number range that describes a range of destination ports connecting to. + type.v3.Int32Range destination_port_range = 11; + // Metadata that describes additional information about the action. type.matcher.v3.MetadataMatcher metadata = 7; @@ -199,7 +210,7 @@ message Permission { // * If the :ref:`TLS Inspector ` // filter is not added, and if a `FilterChainMatch` is not defined for // the :ref:`server name - // `, + // `, // a TLS connection's requested SNI server name will be treated as if it // wasn't present. // @@ -209,6 +220,10 @@ message Permission { // Please refer to :ref:`this FAQ entry ` to learn to // setup SNI. type.matcher.v3.StringMatcher requested_server_name = 9; + + // Extension for configuring custom matchers for RBAC. + // [#extension-category: envoy.rbac.matchers] + core.v3.TypedExtensionConfig matcher = 12; } } @@ -259,11 +274,12 @@ message Principal { // A CIDR block that describes the downstream IP. // This address will honor proxy protocol, but will not honor XFF. - core.v3.CidrRange source_ip = 5 [deprecated = true]; + core.v3.CidrRange source_ip = 5 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // A CIDR block that describes the downstream remote/origin address. // Note: This is always the physical peer even if the - // :ref:`remote_ip ` is + // :ref:`remote_ip ` is // inferred from for example the x-forwarder-for header, proxy protocol, // etc. core.v3.CidrRange direct_remote_ip = 10; @@ -271,7 +287,7 @@ message Principal { // A CIDR block that describes the downstream remote/origin address. // Note: This may not be the physical peer and could be different from the // :ref:`direct_remote_ip - // `. E.g, if the + // `. E.g, if the // remote ip is inferred from for example the x-forwarder-for header, proxy // protocol, etc. core.v3.CidrRange remote_ip = 11; diff --git a/api/envoy/config/rbac/v4alpha/rbac.proto b/api/envoy/config/rbac/v4alpha/rbac.proto deleted file mode 100644 index f54fc477eb..0000000000 --- a/api/envoy/config/rbac/v4alpha/rbac.proto +++ /dev/null @@ -1,295 +0,0 @@ -syntax = "proto3"; - -package envoy.config.rbac.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/type/matcher/v4alpha/metadata.proto"; -import "envoy/type/matcher/v4alpha/path.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "google/api/expr/v1alpha1/checked.proto"; -import "google/api/expr/v1alpha1/syntax.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.rbac.v4alpha"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Role Based Access Control (RBAC)] - -// Role Based Access Control (RBAC) provides service-level and method-level access control for a -// service. RBAC policies are additive. The policies are examined in order. Requests are allowed -// or denied based on the `action` and whether a matching policy is found. For instance, if the -// action is ALLOW and a matching policy is found the request should be allowed. -// -// RBAC can also be used to make access logging decisions by communicating with access loggers -// through dynamic metadata. When the action is LOG and at least one policy matches, the -// `access_log_hint` value in the shared key namespace 'envoy.common' is set to `true` indicating -// the request should be logged. -// -// Here is an example of RBAC configuration. It has two policies: -// -// * Service account "cluster.local/ns/default/sa/admin" has full access to the service, and so -// does "cluster.local/ns/default/sa/superuser". -// -// * Any user can read ("GET") the service at paths with prefix "/products", so long as the -// destination port is either 80 or 443. -// -// .. code-block:: yaml -// -// action: ALLOW -// policies: -// "service-admin": -// permissions: -// - any: true -// principals: -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/admin" -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/superuser" -// "product-viewer": -// permissions: -// - and_rules: -// rules: -// - header: { name: ":method", exact_match: "GET" } -// - url_path: -// path: { prefix: "/products" } -// - or_rules: -// rules: -// - destination_port: 80 -// - destination_port: 443 -// principals: -// - any: true -// -message RBAC { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v3.RBAC"; - - // Should we do safe-list or block-list style access control? - enum Action { - // The policies grant access to principals. The rest are denied. This is safe-list style - // access control. This is the default type. - ALLOW = 0; - - // The policies deny access to principals. The rest are allowed. This is block-list style - // access control. - DENY = 1; - - // The policies set the `access_log_hint` dynamic metadata key based on if requests match. - // All requests are allowed. - LOG = 2; - } - - // The action to take if a policy matches. Every action either allows or denies a request, - // and can also carry out action-specific operations. - // - // Actions: - // - // * ALLOW: Allows the request if and only if there is a policy that matches - // the request. - // * DENY: Allows the request if and only if there are no policies that - // match the request. - // * LOG: Allows all requests. If at least one policy matches, the dynamic - // metadata key `access_log_hint` is set to the value `true` under the shared - // key namespace 'envoy.common'. If no policies match, it is set to `false`. - // Other actions do not modify this key. - // - Action action = 1 [(validate.rules).enum = {defined_only: true}]; - - // Maps from policy name to policy. A match occurs when at least one policy matches the request. - map policies = 2; -} - -// Policy specifies a role and the principals that are assigned/denied the role. -// A policy matches if and only if at least one of its permissions match the -// action taking place AND at least one of its principals match the downstream -// AND the condition is true if specified. -message Policy { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v3.Policy"; - - // Required. The set of permissions that define a role. Each permission is - // matched with OR semantics. To match all actions for this policy, a single - // Permission with the `any` field set to true should be used. - repeated Permission permissions = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Required. The set of principals that are assigned/denied the role based on - // “action”. Each principal is matched with OR semantics. To match all - // downstreams for this policy, a single Principal with the `any` field set to - // true should be used. - repeated Principal principals = 2 [(validate.rules).repeated = {min_items: 1}]; - - oneof expression_specifier { - // An optional symbolic expression specifying an access control - // :ref:`condition `. The condition is combined - // with the permissions and the principals as a clause with AND semantics. - // Only be used when checked_condition is not used. - google.api.expr.v1alpha1.Expr condition = 3; - - // [#not-implemented-hide:] - // An optional symbolic expression that has been successfully type checked. - // Only be used when condition is not used. - google.api.expr.v1alpha1.CheckedExpr checked_condition = 4; - } -} - -// Permission defines an action (or actions) that a principal can take. -// [#next-free-field: 11] -message Permission { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v3.Permission"; - - // Used in the `and_rules` and `or_rules` fields in the `rule` oneof. Depending on the context, - // each are applied with the associated behavior. - message Set { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.rbac.v3.Permission.Set"; - - repeated Permission rules = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - oneof rule { - option (validate.required) = true; - - // A set of rules that all must match in order to define the action. - Set and_rules = 1; - - // A set of rules where at least one must match in order to define the action. - Set or_rules = 2; - - // When any is set, it matches any action. - bool any = 3 [(validate.rules).bool = {const: true}]; - - // A header (or pseudo-header such as :path or :method) on the incoming HTTP request. Only - // available for HTTP request. - // Note: the pseudo-header :path includes the query and fragment string. Use the `url_path` - // field if you want to match the URL path without the query and fragment string. - route.v4alpha.HeaderMatcher header = 4; - - // A URL path on the incoming HTTP request. Only available for HTTP. - type.matcher.v4alpha.PathMatcher url_path = 10; - - // A CIDR block that describes the destination IP. - core.v4alpha.CidrRange destination_ip = 5; - - // A port number that describes the destination port connecting to. - uint32 destination_port = 6 [(validate.rules).uint32 = {lte: 65535}]; - - // Metadata that describes additional information about the action. - type.matcher.v4alpha.MetadataMatcher metadata = 7; - - // Negates matching the provided permission. For instance, if the value of - // `not_rule` would match, this permission would not match. Conversely, if - // the value of `not_rule` would not match, this permission would match. - Permission not_rule = 8; - - // The request server from the client's connection request. This is - // typically TLS SNI. - // - // .. attention:: - // - // The behavior of this field may be affected by how Envoy is configured - // as explained below. - // - // * If the :ref:`TLS Inspector ` - // filter is not added, and if a `FilterChainMatch` is not defined for - // the :ref:`server name - // `, - // a TLS connection's requested SNI server name will be treated as if it - // wasn't present. - // - // * A :ref:`listener filter ` may - // overwrite a connection's requested server name within Envoy. - // - // Please refer to :ref:`this FAQ entry ` to learn to - // setup SNI. - type.matcher.v4alpha.StringMatcher requested_server_name = 9; - } -} - -// Principal defines an identity or a group of identities for a downstream -// subject. -// [#next-free-field: 12] -message Principal { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v3.Principal"; - - // Used in the `and_ids` and `or_ids` fields in the `identifier` oneof. - // Depending on the context, each are applied with the associated behavior. - message Set { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.rbac.v3.Principal.Set"; - - repeated Principal ids = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Authentication attributes for a downstream. - message Authenticated { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.rbac.v3.Principal.Authenticated"; - - reserved 1; - - // The name of the principal. If set, The URI SAN or DNS SAN in that order - // is used from the certificate, otherwise the subject field is used. If - // unset, it applies to any user that is authenticated. - type.matcher.v4alpha.StringMatcher principal_name = 2; - } - - reserved 5; - - reserved "source_ip"; - - oneof identifier { - option (validate.required) = true; - - // A set of identifiers that all must match in order to define the - // downstream. - Set and_ids = 1; - - // A set of identifiers at least one must match in order to define the - // downstream. - Set or_ids = 2; - - // When any is set, it matches any downstream. - bool any = 3 [(validate.rules).bool = {const: true}]; - - // Authenticated attributes that identify the downstream. - Authenticated authenticated = 4; - - // A CIDR block that describes the downstream remote/origin address. - // Note: This is always the physical peer even if the - // :ref:`remote_ip ` is - // inferred from for example the x-forwarder-for header, proxy protocol, - // etc. - core.v4alpha.CidrRange direct_remote_ip = 10; - - // A CIDR block that describes the downstream remote/origin address. - // Note: This may not be the physical peer and could be different from the - // :ref:`direct_remote_ip - // `. E.g, if the - // remote ip is inferred from for example the x-forwarder-for header, proxy - // protocol, etc. - core.v4alpha.CidrRange remote_ip = 11; - - // A header (or pseudo-header such as :path or :method) on the incoming HTTP - // request. Only available for HTTP request. Note: the pseudo-header :path - // includes the query and fragment string. Use the `url_path` field if you - // want to match the URL path without the query and fragment string. - route.v4alpha.HeaderMatcher header = 6; - - // A URL path on the incoming HTTP request. Only available for HTTP. - type.matcher.v4alpha.PathMatcher url_path = 9; - - // Metadata that describes additional information about the principal. - type.matcher.v4alpha.MetadataMatcher metadata = 7; - - // Negates matching the provided principal. For instance, if the value of - // `not_id` would match, this principal would not match. Conversely, if the - // value of `not_id` would not match, this principal would match. - Principal not_id = 8; - } -} diff --git a/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto b/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto index 529622a071..3a5bec3901 100644 --- a/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto +++ b/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.resource_monitor.fixed_heap.v2alpha"; option java_outer_classname = "FixedHeapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/resource_monitor/fixed_heap/v2alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Fixed heap] diff --git a/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto b/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto index a9f056d2d2..3a804b439c 100644 --- a/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto +++ b/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.resource_monitor.injected_resource.v2alpha"; option java_outer_classname = "InjectedResourceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/resource_monitor/injected_resource/v2alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Injected resource] diff --git a/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto b/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto index 107bf6fc2d..a1180fbcb4 100644 --- a/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto +++ b/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto @@ -2,11 +2,15 @@ syntax = "proto3"; package envoy.config.retry.omit_canary_hosts.v2; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.retry.omit_canary_hosts.v2"; option java_outer_classname = "OmitCanaryHostsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/omit_canary_hosts/v2;omit_canary_hostsv2"; +option (udpa.annotations.file_migrate).move_to_package = + "envoy.extensions.retry.host.omit_canary_hosts.v3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Omit Canary Hosts Predicate] diff --git a/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto b/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto index d229cffef8..373a6c94e3 100644 --- a/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto +++ b/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto @@ -10,6 +10,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.retry.omit_host_metadata.v2"; option java_outer_classname = "OmitHostMetadataConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/omit_host_metadata/v2;omit_host_metadatav2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.retry.host.omit_host_metadata.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/retry/previous_hosts/v2/previous_hosts.proto b/api/envoy/config/retry/previous_hosts/v2/previous_hosts.proto index e87e8cd70e..6e5abf7496 100644 --- a/api/envoy/config/retry/previous_hosts/v2/previous_hosts.proto +++ b/api/envoy/config/retry/previous_hosts/v2/previous_hosts.proto @@ -2,11 +2,15 @@ syntax = "proto3"; package envoy.config.retry.previous_hosts.v2; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.retry.previous_hosts.v2"; option java_outer_classname = "PreviousHostsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/previous_hosts/v2;previous_hostsv2"; +option (udpa.annotations.file_migrate).move_to_package = + "envoy.extensions.retry.host.previous_hosts.v3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Previous Hosts Predicate] diff --git a/api/envoy/config/retry/previous_priorities/previous_priorities_config.proto b/api/envoy/config/retry/previous_priorities/previous_priorities_config.proto index e967411785..b10e4b6eab 100644 --- a/api/envoy/config/retry/previous_priorities/previous_priorities_config.proto +++ b/api/envoy/config/retry/previous_priorities/previous_priorities_config.proto @@ -2,12 +2,16 @@ syntax = "proto3"; package envoy.config.retry.previous_priorities; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.retry.previous_priorities"; option java_outer_classname = "PreviousPrioritiesConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/previous_priorities"; +option (udpa.annotations.file_migrate).move_to_package = + "envoy.extensions.retry.priority.previous_priorities.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Previous priorities retry selector] diff --git a/api/envoy/config/route/v3/route.proto b/api/envoy/config/route/v3/route.proto index a528d99bd4..c953e78031 100644 --- a/api/envoy/config/route/v3/route.proto +++ b/api/envoy/config/route/v3/route.proto @@ -4,6 +4,7 @@ package envoy.config.route.v3; import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/config_source.proto"; +import "envoy/config/core/v3/extension.proto"; import "envoy/config/route/v3/route_components.proto"; import "google/protobuf/wrappers.proto"; @@ -15,20 +16,21 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.route.v3"; option java_outer_classname = "RouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP route configuration] // * Routing :ref:`architecture overview ` // * HTTP :ref:`router filter ` -// [#next-free-field: 11] +// [#next-free-field: 14] message RouteConfiguration { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RouteConfiguration"; // The name of the route configuration. For example, it might match // :ref:`route_config_name - // ` in - // :ref:`envoy_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`. + // ` in + // :ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`. string name = 1; // An array of virtual hosts that make up the route table. @@ -52,8 +54,8 @@ message RouteConfiguration { // 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_config.route.v3.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v3.RouteAction`. For more information, including details on + // after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or + // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. repeated core.v3.HeaderValueOption response_headers_to_add = 4 @@ -67,8 +69,8 @@ message RouteConfiguration { // 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_config.route.v3.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v3.RouteAction`. For more information, including details on + // applied after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or + // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. repeated core.v3.HeaderValueOption request_headers_to_add = 6 @@ -99,13 +101,49 @@ message RouteConfiguration { // route table will load and the router filter will return a 404 if the route // is selected at runtime. This setting defaults to true if the route table // is statically defined via the :ref:`route_config - // ` + // ` // option. This setting default to false if the route table is loaded dynamically via the // :ref:`rds - // ` + // ` // option. Users may wish to override the default behavior in certain cases (for example when // using CDS with a static route table). google.protobuf.BoolValue validate_clusters = 7; + + // The maximum bytes of the response :ref:`direct response body + // ` size. If not specified the default + // is 4096. + // + // .. warning:: + // + // Envoy currently holds the content of :ref:`direct response body + // ` in memory. Be careful setting + // this to be larger than the default 4KB, since the allocated memory for direct response body + // is not subject to data plane buffering controls. + // + google.protobuf.UInt32Value max_direct_response_body_size_bytes = 11; + + // [#not-implemented-hide:] + // A list of plugins and their configurations which may be used by a + // :ref:`envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin` + // within the route. All *extension.name* fields in this list must be unique. + repeated ClusterSpecifierPlugin cluster_specifier_plugins = 12; + + // Specify a set of default request mirroring policies which apply to all routes under its virtual hosts. + // Note that policies are not merged, the most specific non-empty one becomes the mirror policies. + repeated RouteAction.RequestMirrorPolicy request_mirror_policies = 13; +} + +// Configuration for a cluster specifier plugin. +message ClusterSpecifierPlugin { + // The name of the plugin and its opaque configuration. + core.v3.TypedExtensionConfig extension = 1; + + // If is_optional is not set and the plugin defined by this message is not + // a supported type, the containing resource is NACKed. If is_optional is + // set, the resource would not be NACKed for this reason. In this case, + // routes referencing this plugin's name would not be treated as an illegal + // configuration, but would result in a failure if the route is selected. + bool is_optional = 2; } message Vhds { diff --git a/api/envoy/config/route/v3/route_components.proto b/api/envoy/config/route/v3/route_components.proto index 53b351b8d3..270d1212de 100644 --- a/api/envoy/config/route/v3/route_components.proto +++ b/api/envoy/config/route/v3/route_components.proto @@ -5,6 +5,7 @@ package envoy.config.route.v3; import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/extension.proto"; import "envoy/config/core/v3/proxy_protocol.proto"; +import "envoy/type/matcher/v3/metadata.proto"; import "envoy/type/matcher/v3/regex.proto"; import "envoy/type/matcher/v3/string.proto"; import "envoy/type/metadata/v3/metadata.proto"; @@ -14,9 +15,11 @@ import "envoy/type/v3/range.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; +import "xds/annotations/v3/status.proto"; +import "xds/type/matcher/v3/matcher.proto"; + import "envoy/annotations/deprecation.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; @@ -26,6 +29,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.route.v3"; option java_outer_classname = "RouteComponentsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP route components] @@ -37,7 +41,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // host header. This allows a single listener to service multiple top level domain path trees. Once // a virtual host is selected based on the domain, the routes are processed in order to see which // upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 21] +// [#next-free-field: 23] message VirtualHost { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.VirtualHost"; @@ -87,8 +91,15 @@ message VirtualHost { // The list of routes that will be matched, in order, for incoming requests. // The first route that matches will be used. + // Only one of this and `matcher` can be specified. repeated Route routes = 3; + // [#next-major-version: This should be included in a oneof with routes wrapped in a message.] + // The match tree to use when resolving route actions for incoming requests. Only one of this and `routes` + // can be specified. + xds.type.matcher.v3.Matcher matcher = 21 + [(xds.annotations.v3.field_status).work_in_progress = true]; + // 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. TlsRequirementType require_tls = 4 [(validate.rules).enum = {defined_only: true}]; @@ -103,8 +114,8 @@ message VirtualHost { // 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_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including + // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the + // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on :ref:`custom request headers // `. repeated core.v3.HeaderValueOption request_headers_to_add = 7 @@ -118,8 +129,8 @@ message VirtualHost { // 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_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including + // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the + // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on :ref:`custom request headers // `. repeated core.v3.HeaderValueOption response_headers_to_add = 10 @@ -139,6 +150,9 @@ message VirtualHost { // *envoy.filters.http.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. + // [#comment: An entry's value may be wrapped in a + // :ref:`FilterConfig` + // message to specify additional options.] map typed_per_filter_config = 15; // Decides whether the :ref:`x-envoy-attempt-count @@ -148,7 +162,7 @@ message VirtualHost { // 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. + // ` flag. // // [#next-major-version: rename to include_attempt_count_in_request.] bool include_request_attempt_count = 14; @@ -160,7 +174,7 @@ message VirtualHost { // will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. // This header is unaffected by the // :ref:`suppress_envoy_headers - // ` flag. + // ` flag. bool include_attempt_count_in_response = 19; // Indicates the retry policy for all routes in this virtual host. Note that setting a @@ -171,7 +185,7 @@ message VirtualHost { // [#not-implemented-hide:] // Specifies the configuration for retry policy extension. Note that setting a route level entry // will take precedence over this config and it'll be treated independently (e.g.: values are not - // inherited). :ref:`Retry policy ` should not be + // inherited). :ref:`Retry policy ` should not be // set if this field is used. google.protobuf.Any retry_policy_typed_config = 20; @@ -184,6 +198,11 @@ message VirtualHost { // If set and a route-specific limit is not set, the bytes actually buffered will be the minimum // value of this and the listener per_connection_buffer_limit_bytes. google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18; + + // Specify a set of default request mirroring policies for every route under this virtual host. + // It takes precedence over the route config mirror policy entirely. + // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. + repeated RouteAction.RequestMirrorPolicy request_mirror_policies = 22; } // A filter-defined action type. @@ -199,8 +218,8 @@ message FilterAction { // .. attention:: // // Envoy supports routing on HTTP method via :ref:`header matching -// `. -// [#next-free-field: 18] +// `. +// [#next-free-field: 19] message Route { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.Route"; @@ -227,11 +246,17 @@ message Route { DirectResponseAction direct_response = 7; // [#not-implemented-hide:] - // If true, a filter will define the action (e.g., it could dynamically generate the - // RouteAction). + // A filter-defined action (e.g., it could dynamically generate the RouteAction). // [#comment: TODO(samflattery): Remove cleanup in route_fuzz_test.cc when // implemented] FilterAction filter_action = 17; + + // [#not-implemented-hide:] + // An action used when the route will generate a response directly, + // without forwarding to an upstream host. This will be used in non-proxy + // xDS clients like the gRPC server. It could also be used in the future + // in Envoy for a filter that directly generates responses for requests. + NonForwardingAction non_forwarding_action = 18; } // The Metadata field can be used to provide additional information @@ -249,12 +274,15 @@ message Route { // *envoy.filters.http.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. + // [#comment: An entry's value may be wrapped in a + // :ref:`FilterConfig` + // message to specify additional options.] map typed_per_filter_config = 13; // 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_config.route.v3.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on + // enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. repeated core.v3.HeaderValueOption request_headers_to_add = 9 @@ -268,8 +296,8 @@ message Route { // 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_config.route.v3.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including + // headers from the enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on // :ref:`custom request headers `. repeated core.v3.HeaderValueOption response_headers_to_add = 10 @@ -291,16 +319,16 @@ message Route { google.protobuf.UInt32Value per_request_buffer_limit_bytes = 16; } -// Compared to the :ref:`cluster ` field that specifies a +// 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 +// ` 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. message WeightedCluster { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.WeightedCluster"; - // [#next-free-field: 11] + // [#next-free-field: 13] message ClusterWeight { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.WeightedCluster.ClusterWeight"; @@ -309,12 +337,34 @@ message WeightedCluster { reserved "per_filter_config"; + // Only one of *name* and *cluster_header* may be specified. + // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] // Name of the upstream cluster. The cluster must exist in the // :ref:`cluster manager configuration `. - string name = 1 [(validate.rules).string = {min_len: 1}]; + string name = 1 [(udpa.annotations.field_migrate).oneof_promotion = "cluster_specifier"]; + + // Only one of *name* and *cluster_header* may be specified. + // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }] + // Envoy will determine the cluster to route to by reading the value of the + // HTTP header named by cluster_header from the request headers. If the + // header is not found or the referenced cluster does not exist, Envoy will + // return a 404 response. + // + // .. attention:: + // + // Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 + // *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + // + // .. note:: + // + // If the header appears multiple times only the first value is used. + string cluster_header = 12 [ + (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}, + (udpa.annotations.field_migrate).oneof_promotion = "cluster_specifier" + ]; // An integer between 0 and :ref:`total_weight - // `. When a request matches the route, + // `. 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. google.protobuf.UInt32Value weight = 2; @@ -322,38 +372,38 @@ message WeightedCluster { // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in // the upstream cluster with metadata matching what is set in this field will be considered for // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with + // :ref:`RouteAction.metadata_match `, with // values here taking precedence. The filter name should be specified as *envoy.lb*. core.v3.Metadata metadata_match = 3; // Specifies a list of headers to be added to requests when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_config.route.v3.RouteAction`. + // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v3.Route`, :ref:`envoy_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on + // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. repeated core.v3.HeaderValueOption request_headers_to_add = 4 [(validate.rules).repeated = {max_items: 1000}]; // 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_config.route.v3.RouteAction`. + // this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. repeated string request_headers_to_remove = 9 [(validate.rules).repeated = { items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} }]; // Specifies a list of headers to be added to responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_config.route.v3.RouteAction`. + // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v3.Route`, :ref:`envoy_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on + // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. repeated core.v3.HeaderValueOption response_headers_to_add = 5 [(validate.rules).repeated = {max_items: 1000}]; // Specifies a list of headers to be removed from responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_config.route.v3.RouteAction`. + // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. repeated string response_headers_to_remove = 6 [(validate.rules).repeated = { items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} }]; @@ -363,7 +413,17 @@ message WeightedCluster { // *envoy.filters.http.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. + // [#comment: An entry's value may be wrapped in a + // :ref:`FilterConfig` + // message to specify additional options.] map typed_per_filter_config = 10; + + oneof host_rewrite_specifier { + // Indicates that during forwarding, the host header will be swapped with + // this value. + string host_rewrite_literal = 11 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; + } } // Specifies one or more upstream clusters associated with the route. @@ -382,9 +442,18 @@ message WeightedCluster { // configuration file will be used as the default weight. See the :ref:`runtime documentation // ` for how key names map to the underlying implementation. string runtime_key_prefix = 2; + + oneof random_value_specifier { + // Specifies the header name that is used to look up the random value passed in the request header. + // This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic. + // If header is not present or invalid, Envoy will fall back to use the internally generated random value. + // This header is expected to be single-valued header as we only want to have one selected value throughout + // the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX. + string header_name = 4; + } } -// [#next-free-field: 13] +// [#next-free-field: 15] message RouteMatch { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RouteMatch"; @@ -447,12 +516,23 @@ message RouteMatch { // where Extended CONNECT requests may have a path, the path matchers will work if // there is a path present. // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. + // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] ConnectMatcher connect_matcher = 12; + + // If specified, the route is a path-separated prefix rule meaning that the + // ``:path`` header (without the query string) must either exactly match the + // ``path_separated_prefix`` or have it as a prefix, followed by ``/`` + // + // For example, ``/api/dev`` would match + // ``/api/dev``, ``/api/dev/``, ``/api/dev/v1``, and ``/api/dev?param=true`` + // but would not match ``/api/developer`` + // + // Expect the value to not contain ``?`` or ``#`` and not to end in ``/`` + string path_separated_prefix = 14 [(validate.rules).string = {pattern: "^[^?#]+[^?#/]$"}]; } // Indicates that prefix/path matching should be case sensitive. The default - // is true. + // is true. Ignored for safe_regex matching. google.protobuf.BoolValue case_sensitive = 4; // Indicates that the route should additionally match on a runtime key. Every time the route @@ -485,6 +565,14 @@ message RouteMatch { // against all the specified query parameters. If the number of specified // query parameters is nonzero, they all must match the *path* header's // query string for a match to occur. + // + // .. note:: + // + // If query parameters are used to pass request message fields when + // `grpc_json_transcoder `_ + // is used, the transcoded message fields maybe different. The query parameters are + // url encoded, but the message fields are not. For example, if a query + // parameter is "foo%20bar", the message field will be "foo bar". repeated QueryParameterMatcher query_parameters = 7; // If specified, only gRPC requests will be matched. The router will check @@ -497,6 +585,12 @@ message RouteMatch { // // [#next-major-version: unify with RBAC] TlsContextMatchOptions tls_context = 11; + + // Specifies a set of dynamic metadata matchers on which the route should match. + // The router will check the dynamic metadata against all the specified dynamic metadata matchers. + // If the number of specified dynamic metadata matchers is nonzero, they all must match the + // dynamic metadata for a match to occur. + repeated type.matcher.v3.MetadataMatcher dynamic_metadata = 13; } // [#next-free-field: 12] @@ -532,7 +626,7 @@ message CorsPolicy { // If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS // filter will be enabled for 100% of the requests. // - // If :ref:`runtime_key ` is + // If :ref:`runtime_key ` is // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. core.v3.RuntimeFractionalPercent filter_enabled = 9; } @@ -543,13 +637,13 @@ message CorsPolicy { // This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those // fields have to explicitly disable the filter in order for this setting to take effect. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate // and track the request's *Origin* to determine if it's valid but will not enforce any policies. core.v3.RuntimeFractionalPercent shadow_enabled = 10; } -// [#next-free-field: 37] +// [#next-free-field: 39] message RouteAction { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RouteAction"; @@ -684,8 +778,8 @@ message RouteAction { "envoy.api.v2.route.RouteAction.HashPolicy.FilterState"; // The name of the Object in the per-request filterState, which is an - // Envoy::Http::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Http::Hashable, no hash will be produced. + // Envoy::Hashable object. If there is no data associated with the key, + // or the stored object is not Envoy::Hashable, no hash will be produced. string key = 1 [(validate.rules).string = {min_len: 1}]; } @@ -734,17 +828,20 @@ message RouteAction { // 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. message UpgradeConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RouteAction.UpgradeConfig"; // Configuration for sending data upstream as a raw data payload. This is used for - // CONNECT requests, when forwarding CONNECT payload as raw TCP. + // CONNECT or POST requests, when forwarding request payload as raw TCP. message ConnectConfig { // If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream. core.v3.ProxyProtocolConfig proxy_protocol_config = 1; + + // If set, the route will also allow forwarding POST payload as raw TCP. + bool allow_post = 2; } // The case-insensitive name of this upgrade, e.g. "websocket". @@ -759,16 +856,16 @@ message RouteAction { // Configuration for sending data upstream as a raw data payload. This is used for // CONNECT requests, when forwarding CONNECT payload as raw TCP. // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. + // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] ConnectConfig connect_config = 3; } message MaxStreamDuration { // Specifies the maximum duration allowed for streams on the route. If not specified, the value // from the :ref:`max_stream_duration - // ` field in + // ` field in // :ref:`HttpConnectionManager.common_http_protocol_options - // ` + // ` // is used. If this field is set explicitly to zero, any // HttpConnectionManager max_stream_duration timeout will be disabled for // this route. @@ -822,6 +919,14 @@ message RouteAction { // :ref:`traffic splitting ` // for additional documentation. WeightedCluster weighted_clusters = 3; + + // [#not-implemented-hide:] + // Name of the cluster specifier plugin to use to determine the cluster for + // requests on this route. The plugin name must be defined in the associated + // :ref:`envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins` + // in the + // :ref:`envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name` field. + string cluster_specifier_plugin = 37; } // The HTTP status code to use when configured cluster is not found. @@ -832,7 +937,7 @@ message RouteAction { // 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 + // `, metadata will be merged, with values // provided there taking precedence. The filter name should be specified as *envoy.lb*. core.v3.Metadata metadata_match = 4; @@ -843,16 +948,16 @@ message RouteAction { // ` header. // // Only one of *prefix_rewrite* or - // :ref:`regex_rewrite ` + // :ref:`regex_rewrite ` // may be specified. // // .. attention:: // // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. + // :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: + // :ref:`Route `, as shown by the below config entries: // // .. code-block:: yaml // @@ -879,7 +984,7 @@ message RouteAction { // before the rewrite into the :ref:`x-envoy-original-path // ` header. // - // Only one of :ref:`prefix_rewrite ` + // Only one of :ref:`prefix_rewrite ` // or *regex_rewrite* may be specified. // // Examples using Google's `RE2 `_ engine: @@ -902,20 +1007,29 @@ message RouteAction { oneof host_rewrite_specifier { // Indicates that during forwarding, the host header will be swapped with - // this value. + // this value. Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. string host_rewrite_literal = 6 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Indicates that during forwarding, the host header will be swapped with // the hostname of the upstream host chosen by the cluster manager. This // option is applicable only when the destination cluster for a route is of - // type *strict_dns* or *logical_dns*. Setting this to true with other cluster - // types has no effect. + // type *strict_dns* or *logical_dns*. Setting this to true with other cluster types + // has no effect. Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. google.protobuf.BoolValue auto_host_rewrite = 7; // Indicates that during forwarding, the host header will be swapped with the content of given // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. + // If header value is empty, host header is left intact. Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. // // .. attention:: // @@ -931,6 +1045,10 @@ message RouteAction { // Indicates that during forwarding, the host header will be swapped with // the result of the regex substitution executed on path value with query and fragment removed. // This is useful for transitioning variable content between path segment and subdomain. + // Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. // // For example with the following config: // @@ -946,6 +1064,15 @@ message RouteAction { type.matcher.v3.RegexMatchAndSubstitute host_rewrite_path_regex = 35; } + // If set, then a host rewrite action (one of + // :ref:`host_rewrite_literal `, + // :ref:`auto_host_rewrite `, + // :ref:`host_rewrite_header `, or + // :ref:`host_rewrite_path_regex `) + // causes the original value of the host header, if any, to be appended to the + // :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header. + bool append_x_forwarded_host = 38; + // Specifies the upstream timeout for the route. If not specified, the default is 15s. This // spans between the point at which the entire downstream request (i.e. end-of-stream) has been // processed and when the upstream response has been completely processed. A value of 0 will @@ -961,14 +1088,14 @@ message RouteAction { // 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 + // `, which provides an upper bound // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount + // ` instead bounds the amount // of time the request's stream may be idle. // // After header decoding, the idle timeout will apply on downstream and @@ -980,7 +1107,7 @@ message RouteAction { // // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. + // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. google.protobuf.Duration idle_timeout = 24; // Indicates that the route has a retry policy. Note that if this is set, @@ -991,11 +1118,13 @@ message RouteAction { // [#not-implemented-hide:] // Specifies the configuration for retry policy extension. Note that if this is set, it'll take // precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, - // most internal one becomes the enforced policy). :ref:`Retry policy ` + // most internal one becomes the enforced policy). :ref:`Retry policy ` // should not be set if this field is used. google.protobuf.Any retry_policy_typed_config = 33; - // Indicates that the route has request mirroring policies. + // Specify a set of route request mirroring policies. + // It takes precedence over the virtual host and route config mirror policy entirely. + // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. repeated RequestMirrorPolicy request_mirror_policies = 30; // Optionally specifies the :ref:`routing priority `. @@ -1007,11 +1136,12 @@ message RouteAction { // 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 + // :ref:`rate_limits ` are not applied to the // request. // // This field is deprecated. Please use :ref:`vh_rate_limits ` - google.protobuf.BoolValue include_vh_rate_limits = 14 [deprecated = true]; + google.protobuf.BoolValue include_vh_rate_limits = 14 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // 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 @@ -1030,15 +1160,15 @@ message RouteAction { // Indicates that the route has a CORS policy. CorsPolicy cors = 17; - // Deprecated by :ref:`grpc_timeout_header_max ` + // Deprecated by :ref:`grpc_timeout_header_max ` // If present, and the request is a gRPC request, use the // `grpc-timeout header `_, // or its default value (infinity) instead of - // :ref:`timeout `, but limit the applied timeout + // :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. + // :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. // @@ -1050,9 +1180,10 @@ message RouteAction { // :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 `. - google.protobuf.Duration max_grpc_timeout = 23 [deprecated = true]; + google.protobuf.Duration max_grpc_timeout = 23 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - // Deprecated by :ref:`grpc_timeout_header_offset `. + // Deprecated by :ref:`grpc_timeout_header_offset `. // If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting // the provided duration from the header. This is useful in allowing Envoy to set its global // timeout to be less than that of the deadline imposed by the calling client, which makes it more @@ -1060,33 +1191,36 @@ message RouteAction { // 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). - google.protobuf.Duration grpc_timeout_offset = 28 [deprecated = true]; + google.protobuf.Duration grpc_timeout_offset = 28 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; repeated UpgradeConfig upgrade_configs = 25; // If present, Envoy will try to follow an upstream redirect response instead of proxying the // response back to the downstream. An upstream redirect response is defined // by :ref:`redirect_response_codes - // `. + // `. InternalRedirectPolicy internal_redirect_policy = 34; - InternalRedirectAction internal_redirect_action = 26 [deprecated = true]; + InternalRedirectAction internal_redirect_action = 26 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // An internal redirect is handled, iff the number of previous internal redirects that a // downstream request has encountered is lower than this value, and - // :ref:`internal_redirect_action ` + // :ref:`internal_redirect_action ` // is set to :ref:`HANDLE_INTERNAL_REDIRECT - // ` + // ` // In the case where a downstream request is bounced among multiple routes by internal redirect, // the first route that hits this threshold, or has - // :ref:`internal_redirect_action ` + // :ref:`internal_redirect_action ` // set to // :ref:`PASS_THROUGH_INTERNAL_REDIRECT - // ` + // ` // will pass the redirect back to downstream. // // If not specified, at most one redirect will be followed. - google.protobuf.UInt32Value max_internal_redirects = 31 [deprecated = true]; + google.protobuf.UInt32Value max_internal_redirects = 31 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // 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 @@ -1098,7 +1232,7 @@ message RouteAction { } // HTTP retry :ref:`architecture overview `. -// [#next-free-field: 12] +// [#next-free-field: 14] message RetryPolicy { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RetryPolicy"; @@ -1117,6 +1251,7 @@ message RetryPolicy { string name = 1 [(validate.rules).string = {min_len: 1}]; + // [#extension-category: envoy.retry_priorities] oneof config_type { google.protobuf.Any typed_config = 3; } @@ -1132,6 +1267,7 @@ message RetryPolicy { string name = 1 [(validate.rules).string = {min_len: 1}]; + // [#extension-category: envoy.retry_host_predicates] oneof config_type { google.protobuf.Any typed_config = 3; } @@ -1237,19 +1373,40 @@ message RetryPolicy { google.protobuf.UInt32Value num_retries = 2 [(udpa.annotations.field_migrate).rename = "max_retries"]; - // Specifies a non-zero upstream timeout per retry attempt. This parameter is optional. The - // same conditions documented for + // Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This + // parameter is optional. The same conditions documented for // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. // // .. note:: // // If left unspecified, Envoy will use the global - // :ref:`route timeout ` for the request. + // :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. google.protobuf.Duration per_try_timeout = 3; + // Specifies an upstream idle timeout per retry attempt (including the initial attempt). This + // parameter is optional and if absent there is no per try idle timeout. The semantics of the per + // try idle timeout are similar to the + // :ref:`route idle timeout ` and + // :ref:`stream idle timeout + // ` + // both enforced by the HTTP connection manager. The difference is that this idle timeout + // is enforced by the router for each individual attempt and thus after all previous filters have + // run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout + // is useful in cases in which total request timeout is bounded by a number of retries and a + // :ref:`per_try_timeout `, but + // there is a desire to ensure each try is making incremental progress. Note also that similar + // to :ref:`per_try_timeout `, + // this idle timeout does not start until after both the entire request has been received by the + // router *and* a connection pool connection has been obtained. Unlike + // :ref:`per_try_timeout `, + // the idle timer continues once the response starts streaming back to the downstream client. + // This ensures that response data continues to make progress without using one of the HTTP + // connection manager idle timeouts. + google.protobuf.Duration per_try_idle_timeout = 13; + // 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. @@ -1261,6 +1418,11 @@ message RetryPolicy { // details. repeated RetryHostPredicate retry_host_predicate = 5; + // Retry options predicates that will be applied prior to retrying a request. These predicates + // allow customizing request behavior between retries. + // [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions] + repeated core.v3.TypedExtensionConfig retry_options_predicates = 12; + // 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. @@ -1319,7 +1481,7 @@ message HedgePolicy { // if there are no more retries left. // * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. // - // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least + // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least // one error code and specifies a maximum number of retries. // // Defaults to false. @@ -1394,7 +1556,7 @@ message RedirectAction { // .. attention:: // // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. + // :ref:`RouteAction's prefix_rewrite `. string prefix_rewrite = 5 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; @@ -1438,7 +1600,7 @@ message DirectResponseAction { "envoy.api.v2.route.DirectResponseAction"; // Specifies the HTTP response status to be returned. - uint32 status = 1 [(validate.rules).uint32 = {lt: 600 gte: 100}]; + uint32 status = 1 [(validate.rules).uint32 = {lt: 600 gte: 200}]; // Specifies the content of the response body. If this setting is omitted, // no body is included in the generated response. @@ -1446,11 +1608,15 @@ message DirectResponseAction { // .. note:: // // Headers can be specified using *response_headers_to_add* in the enclosing - // :ref:`envoy_api_msg_config.route.v3.Route`, :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` or - // :ref:`envoy_api_msg_config.route.v3.VirtualHost`. + // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` or + // :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`. core.v3.DataSource body = 2; } +// [#not-implemented-hide:] +message NonForwardingAction { +} + message Decorator { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.Decorator"; @@ -1498,7 +1664,7 @@ message Tracing { // A list of custom tags with unique tag name to create tags for the active span. // It will take effect after merging with the :ref:`corresponding configuration - // ` + // ` // configured in the HTTP connection manager. If two tags with the same name are configured // each in the HTTP connection manager and the route level, the one configured here takes // priority. @@ -1541,6 +1707,7 @@ message VirtualCluster { } // Global rate limiting :ref:`architecture overview `. +// Also applies to Local rate limiting :ref:`using descriptors `. message RateLimit { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RateLimit"; @@ -1568,14 +1735,14 @@ message RateLimit { // ("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 ` + // the following :ref:`route table configuration ` // settings: // - // * :ref:`cluster ` indicates the upstream cluster + // * :ref:`cluster ` indicates the upstream cluster // to route to. - // * :ref:`weighted_clusters ` + // * :ref:`weighted_clusters ` // chooses a cluster randomly from a set of clusters with attributed weight. - // * :ref:`cluster_header ` indicates which + // * :ref:`cluster_header ` indicates which // header in the request contains the target cluster. message DestinationCluster { option (udpa.annotations.versioning).previous_message_type = @@ -1644,6 +1811,9 @@ message RateLimit { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RateLimit.Action.HeaderValueMatch"; + // The key to use in the descriptor entry. Defaults to `header_match`. + string descriptor_key = 4; + // The value to use in the descriptor entry. string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; @@ -1669,7 +1839,7 @@ message RateLimit { // ("", "") // // .. attention:: - // This action has been deprecated in favor of the :ref:`metadata ` action + // This action has been deprecated in favor of the :ref:`metadata ` action message DynamicMetaData { // The key to use in the descriptor entry. string descriptor_key = 1 [(validate.rules).string = {min_len: 1}]; @@ -1693,7 +1863,7 @@ message RateLimit { // Query :ref:`dynamic metadata ` DYNAMIC = 0; - // Query :ref:`route entry metadata ` + // Query :ref:`route entry metadata ` ROUTE_ENTRY = 1; } @@ -1736,14 +1906,18 @@ message RateLimit { // Rate limit on dynamic metadata. // // .. attention:: - // This field has been deprecated in favor of the :ref:`metadata ` field - DynamicMetaData dynamic_metadata = 7 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; + // This field has been deprecated in favor of the :ref:`metadata ` field + DynamicMetaData dynamic_metadata = 7 [ + deprecated = true, + (envoy.annotations.deprecated_at_minor_version) = "3.0", + (envoy.annotations.disallowed_by_default) = true + ]; // Rate limit on metadata. MetaData metadata = 8; // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. + // [#extension-category: envoy.rate_limit_descriptors] core.v3.TypedExtensionConfig extension = 9; } } @@ -1754,7 +1928,7 @@ message RateLimit { // Metadata struct that defines the key and path to retrieve the struct value. // The value must be a struct containing an integer "requests_per_unit" property // and a "unit" property with a value parseable to :ref:`RateLimitUnit - // enum ` + // enum ` type.metadata.v3.MetadataKey metadata_key = 1 [(validate.rules).message = {required: true}]; } @@ -1812,12 +1986,12 @@ message RateLimit { // // .. 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 +// `. i.e, a request that has the :ref:`name +// ` header will match, regardless of the header's // value. // // [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// [#next-free-field: 13] +// [#next-free-field: 14] message HeaderMatcher { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.HeaderMatcher"; @@ -1832,12 +2006,16 @@ message HeaderMatcher { // Specifies how the header match will be performed to route the request. oneof header_match_specifier { // If specified, header match will be performed based on the value of the header. - string exact_match = 4; + // This field is deprecated. Please use :ref:`string_match `. + string exact_match = 4 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // If specified, this regex string is a regular expression rule which implies the entire request // header value must match the regex. The rule will not match if only a subsequence of the // request header value matches the regex. - type.matcher.v3.RegexMatcher safe_regex_match = 11; + // This field is deprecated. Please use :ref:`string_match `. + type.matcher.v3.RegexMatcher safe_regex_match = 11 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // If specified, header match will be performed based on range. // The rule will match if the request header value is within this range. @@ -1852,34 +2030,52 @@ message HeaderMatcher { // "-1somestring" type.v3.Int64Range range_match = 6; - // If specified, header match will be performed based on whether the header is in the - // request. + // If specified as true, header match will be performed based on whether the header is in the + // request. If specified as false, header match will be performed based on whether the header is absent. bool present_match = 7; // If specified, header match will be performed based on the prefix of the header value. // Note: empty prefix is not allowed, please use present_match instead. + // This field is deprecated. Please use :ref:`string_match `. // // Examples: // // * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. - string prefix_match = 9 [(validate.rules).string = {min_len: 1}]; + string prefix_match = 9 [ + deprecated = true, + (validate.rules).string = {min_len: 1}, + (envoy.annotations.deprecated_at_minor_version) = "3.0" + ]; // If specified, header match will be performed based on the suffix of the header value. // Note: empty suffix is not allowed, please use present_match instead. + // This field is deprecated. Please use :ref:`string_match `. // // Examples: // // * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. - string suffix_match = 10 [(validate.rules).string = {min_len: 1}]; + string suffix_match = 10 [ + deprecated = true, + (validate.rules).string = {min_len: 1}, + (envoy.annotations.deprecated_at_minor_version) = "3.0" + ]; // If specified, header match will be performed based on whether the header value contains // the given value or not. // Note: empty contains match is not allowed, please use present_match instead. + // This field is deprecated. Please use :ref:`string_match `. // // Examples: // // * The value *abcd* matches the value *xyzabcdpqr*, but not for *xyzbcdpqr*. - string contains_match = 12 [(validate.rules).string = {min_len: 1}]; + string contains_match = 12 [ + deprecated = true, + (validate.rules).string = {min_len: 1}, + (envoy.annotations.deprecated_at_minor_version) = "3.0" + ]; + + // If specified, header match will be performed based on the string match of the header value. + type.matcher.v3.StringMatcher string_match = 13; } // If specified, the match result will be inverted before checking. Defaults to false. @@ -1921,7 +2117,7 @@ message InternalRedirectPolicy { // downstream request has encountered is lower than this value. // In the case where a downstream request is bounced among multiple routes by internal redirect, // the first route that hits this threshold, or does not set :ref:`internal_redirect_policy - // ` + // ` // will pass the redirect back to downstream. // // If not specified, at most one redirect will be followed. @@ -1935,9 +2131,27 @@ message InternalRedirectPolicy { // Specifies a list of predicates that are queried when an upstream response is deemed // to trigger an internal redirect by all other criteria. Any predicate in the list can reject // the redirect, causing the response to be proxied to downstream. + // [#extension-category: envoy.internal_redirect_predicates] repeated core.v3.TypedExtensionConfig predicates = 3; // Allow internal redirect to follow a target URI with a different scheme than the value of // x-forwarded-proto. The default is false. bool allow_cross_scheme_redirect = 4; } + +// A simple wrapper for an HTTP filter config. This is intended to be used as a wrapper for the +// map value in +// :ref:`VirtualHost.typed_per_filter_config`, +// :ref:`Route.typed_per_filter_config`, +// or :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` +// to add additional flags to the filter. +// [#not-implemented-hide:] +message FilterConfig { + // The filter config. + google.protobuf.Any config = 1; + + // If true, the filter is optional, meaning that if the client does + // not support the specified filter, it may ignore the map entry rather + // than rejecting the config. + bool is_optional = 2; +} diff --git a/api/envoy/config/route/v3/scoped_route.proto b/api/envoy/config/route/v3/scoped_route.proto index b7e3aa66e0..4ac0ca7c23 100644 --- a/api/envoy/config/route/v3/scoped_route.proto +++ b/api/envoy/config/route/v3/scoped_route.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package envoy.config.route.v3; +import "envoy/config/route/v3/route.proto"; + +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -9,19 +12,23 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.route.v3"; option java_outer_classname = "ScopedRouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP scoped routing configuration] // * Routing :ref:`architecture overview ` // Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` (identified by its resource name). +// :ref:`Key` to a +// :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. +// The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically +// via RDS (:ref:`route_configuration_name`) +// or specified inline (:ref:`route_configuration`). // // The HTTP connection manager builds up a table consisting of these Key to // RouteConfiguration mappings, and looks up the RouteConfiguration to use per // request according to the algorithm specified in the -// :ref:`scope_key_builder` +// :ref:`scope_key_builder` // assigned to the HttpConnectionManager. // // For example, with the following configurations (in YAML): @@ -43,7 +50,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // key: vip // // ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` +// :ref:`scoped_route_configurations_list` // or obtained dynamically via SRDS): // // .. code:: @@ -73,12 +80,13 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // would result in the routing table defined by the `route-config1` // RouteConfiguration being assigned to the HTTP request/stream. // +// [#next-free-field: 6] message ScopedRouteConfiguration { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.ScopedRouteConfiguration"; // Specifies a key which is matched against the output of the - // :ref:`scope_key_builder` + // :ref:`scope_key_builder` // specified in the HttpConnectionManager. The matching is done per HTTP // request and is dependent on the order of the fragments contained in the // Key. @@ -100,7 +108,7 @@ message ScopedRouteConfiguration { // The ordered set of fragments to match against. The order must match the // fragments in the corresponding - // :ref:`scope_key_builder`. + // :ref:`scope_key_builder`. repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -110,10 +118,15 @@ message ScopedRouteConfiguration { // The name assigned to the routing scope. string name = 1 [(validate.rules).string = {min_len: 1}]; - // The resource name to use for a :ref:`envoy_api_msg_service.discovery.v3.DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` associated + // The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an + // RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated // with this scope. - string route_configuration_name = 2 [(validate.rules).string = {min_len: 1}]; + string route_configuration_name = 2 + [(udpa.annotations.field_migrate).oneof_promotion = "route_config"]; + + // The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope. + RouteConfiguration route_configuration = 5 + [(udpa.annotations.field_migrate).oneof_promotion = "route_config"]; // The key to match against. Key key = 3 [(validate.rules).message = {required: true}]; diff --git a/api/envoy/config/route/v4alpha/route.proto b/api/envoy/config/route/v4alpha/route.proto deleted file mode 100644 index 1b805d3534..0000000000 --- a/api/envoy/config/route/v4alpha/route.proto +++ /dev/null @@ -1,117 +0,0 @@ -syntax = "proto3"; - -package envoy.config.route.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.route.v4alpha"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: HTTP route configuration] -// * Routing :ref:`architecture overview ` -// * HTTP :ref:`router filter ` - -// [#next-free-field: 11] -message RouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteConfiguration"; - - // The name of the route configuration. For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_api_msg_extensions.filters.network.http_connection_manager.v4alpha.Rds`. - string name = 1; - - // An array of virtual hosts that make up the route table. - repeated VirtualHost virtual_hosts = 2; - - // An array of virtual hosts will be dynamically loaded via the VHDS API. - // Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used - // for a base routing table or for infrequently changing virtual hosts. *vhds* is used for - // on-demand discovery of virtual hosts. The contents of these two fields will be merged to - // generate a routing table for a given RouteConfiguration, with *vhds* derived configuration - // taking precedence. - Vhds vhds = 9; - - // 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. - repeated string internal_only_headers = 3 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // 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_config.route.v4alpha.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v4alpha.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v4alpha.HeaderValueOption response_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // that the connection manager encodes. - repeated string response_headers_to_remove = 5 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // 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_config.route.v4alpha.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v4alpha.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v4alpha.HeaderValueOption request_headers_to_add = 6 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // routed by the HTTP connection manager. - repeated string request_headers_to_remove = 8 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // By default, headers that should be added/removed are evaluated from most to least specific: - // - // * route level - // * virtual host level - // * connection manager level - // - // To allow setting overrides at the route or virtual host level, this order can be reversed - // by setting this option to true. Defaults to false. - // - // [#next-major-version: In the v3 API, this will default to true.] - bool most_specific_header_mutations_wins = 10; - - // An optional boolean that specifies whether the clusters that the route - // table refers to will be validated by the cluster manager. If set to true - // and a route refers to a non-existent cluster, the route table will not - // load. If set to false and a route refers to a non-existent cluster, the - // route table will load and the router filter will return a 404 if the route - // is selected at runtime. This setting defaults to true if the route table - // is statically defined via the :ref:`route_config - // ` - // option. This setting default to false if the route table is loaded dynamically via the - // :ref:`rds - // ` - // option. Users may wish to override the default behavior in certain cases (for example when - // using CDS with a static route table). - google.protobuf.BoolValue validate_clusters = 7; -} - -message Vhds { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.Vhds"; - - // Configuration source specifier for VHDS. - core.v4alpha.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/config/route/v4alpha/route_components.proto b/api/envoy/config/route/v4alpha/route_components.proto deleted file mode 100644 index 577282595d..0000000000 --- a/api/envoy/config/route/v4alpha/route_components.proto +++ /dev/null @@ -1,1906 +0,0 @@ -syntax = "proto3"; - -package envoy.config.route.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/extension.proto"; -import "envoy/config/core/v4alpha/proxy_protocol.proto"; -import "envoy/type/matcher/v4alpha/regex.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; -import "envoy/type/metadata/v3/metadata.proto"; -import "envoy/type/tracing/v3/custom_tag.proto"; -import "envoy/type/v3/percent.proto"; -import "envoy/type/v3/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.route.v4alpha"; -option java_outer_classname = "RouteComponentsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: HTTP route components] -// * Routing :ref:`architecture overview ` -// * HTTP :ref:`router filter ` - -// The top level element in the routing configuration is a virtual host. Each virtual host has -// a logical name as well as a set of domains that get routed to it based on the incoming request's -// host header. This allows a single listener to service multiple top level domain path trees. Once -// a virtual host is selected based on the domain, the routes are processed in order to see which -// upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 21] -message VirtualHost { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.VirtualHost"; - - enum TlsRequirementType { - // No TLS requirement for the virtual host. - NONE = 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. - EXTERNAL_ONLY = 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. - ALL = 2; - } - - reserved 9, 12; - - reserved "per_filter_config"; - - // The logical name of the virtual host. This is used when emitting certain - // statistics but is not relevant for routing. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A list of domains (host/authority header) that will be matched to this - // virtual host. Wildcard hosts are supported in the suffix or prefix form. - // - // Domain search order: - // 1. Exact domain names: ``www.foo.com``. - // 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``. - // 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``. - // 4. Special wildcard ``*`` matching any domain. - // - // .. note:: - // - // The wildcard will not match the empty string. - // e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. - // The longest wildcards match first. - // Only a single virtual host in the entire route configuration can match on ``*``. A domain - // must be unique across all virtual hosts or the config will fail to load. - // - // Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. - repeated string domains = 2 [(validate.rules).repeated = { - min_items: 1 - items {string {well_known_regex: HTTP_HEADER_VALUE strict: false}} - }]; - - // The list of routes that will be matched, in order, for incoming requests. - // The first route that matches will be used. - repeated Route routes = 3; - - // 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. - TlsRequirementType require_tls = 4 [(validate.rules).enum = {defined_only: true}]; - - // A list of virtual clusters defined for this virtual host. Virtual clusters - // are used for additional statistics gathering. - repeated VirtualCluster virtual_clusters = 5; - - // Specifies a set of rate limit configurations that will be applied to the - // virtual host. - repeated RateLimit rate_limits = 6; - - // 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_config.route.v4alpha.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v4alpha.HeaderValueOption request_headers_to_add = 7 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // handled by this virtual host. - repeated string request_headers_to_remove = 13 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // 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_config.route.v4alpha.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v4alpha.HeaderValueOption response_headers_to_add = 10 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // handled by this virtual host. - repeated string response_headers_to_remove = 11 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Indicates that the virtual host has a CORS policy. - CorsPolicy cors = 8; - - // 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.filters.http.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. - map typed_per_filter_config = 15; - - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the upstream request. Setting this option will cause it to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the upstream - // will see the attempt count as perceived by the second Envoy. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - // - // [#next-major-version: rename to include_attempt_count_in_request.] - bool include_request_attempt_count = 14; - - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the downstream response. Setting this option will cause the router to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the downstream - // will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - bool include_attempt_count_in_response = 19; - - // 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 retry_policy = 16; - - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that setting a route level entry - // will take precedence over this config and it'll be treated independently (e.g.: values are not - // inherited). :ref:`Retry policy ` should not be - // set if this field is used. - google.protobuf.Any retry_policy_typed_config = 20; - - // Indicates the hedge policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - HedgePolicy hedge_policy = 17; - - // The maximum bytes which will be buffered for retries and shadowing. - // If set and a route-specific limit is not set, the bytes actually buffered will be the minimum - // value of this and the listener per_connection_buffer_limit_bytes. - google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18; -} - -// A filter-defined action type. -message FilterAction { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.FilterAction"; - - google.protobuf.Any action = 1; -} - -// A route is both a specification of how to match a request as well as an indication of what to do -// next (e.g., redirect, forward, rewrite, etc.). -// -// .. attention:: -// -// Envoy supports routing on HTTP method via :ref:`header matching -// `. -// [#next-free-field: 18] -message Route { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.Route"; - - reserved 6, 8; - - reserved "per_filter_config"; - - // Name for the route. - string name = 14; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - oneof action { - option (validate.required) = true; - - // Route request to some upstream cluster. - RouteAction route = 2; - - // Return a redirect. - RedirectAction redirect = 3; - - // Return an arbitrary HTTP response directly, without proxying. - DirectResponseAction direct_response = 7; - - // [#not-implemented-hide:] - // If true, a filter will define the action (e.g., it could dynamically generate the - // RouteAction). - // [#comment: TODO(samflattery): Remove cleanup in route_fuzz_test.cc when - // implemented] - FilterAction filter_action = 17; - } - - // The Metadata field can be used to provide additional information - // about the route. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as *envoy.filters.http.router*. - core.v4alpha.Metadata metadata = 4; - - // Decorator for the matched route. - Decorator decorator = 5; - - // The typed_per_filter_config field can be used to provide route-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.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. - map typed_per_filter_config = 13; - - // 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_config.route.v4alpha.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v4alpha.HeaderValueOption request_headers_to_add = 9 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // matching this route. - repeated string request_headers_to_remove = 12 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // 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_config.route.v4alpha.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on - // :ref:`custom request headers `. - repeated core.v4alpha.HeaderValueOption response_headers_to_add = 10 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // to requests matching this route. - repeated string response_headers_to_remove = 11 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Presence of the object defines whether the connection manager's tracing configuration - // is overridden by this route specific instance. - Tracing tracing = 15; - - // The maximum bytes which will be buffered for retries and shadowing. - // If set, the bytes actually buffered will be the minimum value of this and the - // listener per_connection_buffer_limit_bytes. - google.protobuf.UInt32Value per_request_buffer_limit_bytes = 16; -} - -// 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. -message WeightedCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.WeightedCluster"; - - // [#next-free-field: 11] - message ClusterWeight { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.WeightedCluster.ClusterWeight"; - - reserved 7, 8; - - reserved "per_filter_config"; - - // Name of the upstream cluster. The cluster must exist in the - // :ref:`cluster manager configuration `. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // 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. - google.protobuf.UInt32Value weight = 2; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with - // values here taking precedence. The filter name should be specified as *envoy.lb*. - core.v4alpha.Metadata metadata_match = 3; - - // Specifies a list of headers to be added to requests when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_config.route.v4alpha.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v4alpha.Route`, :ref:`envoy_api_msg_config.route.v4alpha.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v4alpha.HeaderValueOption request_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; - - // 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_config.route.v4alpha.RouteAction`. - repeated string request_headers_to_remove = 9 [(validate.rules).repeated = { - items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Specifies a list of headers to be added to responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_config.route.v4alpha.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v4alpha.Route`, :ref:`envoy_api_msg_config.route.v4alpha.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v4alpha.HeaderValueOption response_headers_to_add = 5 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of headers to be removed from responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_config.route.v4alpha.RouteAction`. - repeated string response_headers_to_remove = 6 [(validate.rules).repeated = { - items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // 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.filters.http.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. - map typed_per_filter_config = 10; - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; - - // 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. - google.protobuf.UInt32Value total_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // 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. - string runtime_key_prefix = 2; -} - -// [#next-free-field: 13] -message RouteMatch { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.RouteMatch"; - - message GrpcRouteMatchOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions"; - } - - message TlsContextMatchOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteMatch.TlsContextMatchOptions"; - - // If specified, the route will match against whether or not a certificate is presented. - // If not specified, certificate presentation status (true or false) will not be considered when route matching. - google.protobuf.BoolValue presented = 1; - - // If specified, the route will match against whether or not a certificate is validated. - // If not specified, certificate validation status (true or false) will not be considered when route matching. - google.protobuf.BoolValue validated = 2; - } - - // An extensible message for matching CONNECT requests. - message ConnectMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteMatch.ConnectMatcher"; - } - - reserved 5, 3; - - reserved "regex"; - - oneof path_specifier { - option (validate.required) = true; - - // If specified, the route is a prefix rule meaning that the prefix must - // match the beginning of the *:path* header. - string prefix = 1; - - // If specified, the route is an exact path rule meaning that the path must - // exactly match the *:path* header once the query string is removed. - string path = 2; - - // If specified, the route is a regular expression rule meaning that the - // regex must match the *:path* header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the *:path* header matches the regex. - // - // [#next-major-version: In the v3 API we should redo how path specification works such - // that we utilize StringMatcher, and additionally have consistent options around whether we - // strip query strings, do a case sensitive match, etc. In the interim it will be too disruptive - // to deprecate the existing options. We should even consider whether we want to do away with - // path_specifier entirely and just rely on a set of header matchers which can already match - // on :path, etc. The issue with that is it is unclear how to generically deal with query string - // stripping. This needs more thought.] - type.matcher.v4alpha.RegexMatcher safe_regex = 10 [(validate.rules).message = {required: true}]; - - // If this is used as the matcher, the matcher will only match CONNECT requests. - // Note that this will not match HTTP/2 upgrade-style CONNECT requests - // (WebSocket and the like) as they are normalized in Envoy as HTTP/1.1 style - // upgrades. - // This is the only way to match CONNECT requests for HTTP/1.1. For HTTP/2, - // where Extended CONNECT requests may have a path, the path matchers will work if - // there is a path present. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. - ConnectMatcher connect_matcher = 12; - } - - // Indicates that prefix/path matching should be case sensitive. The default - // is true. - google.protobuf.BoolValue case_sensitive = 4; - - // 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. - core.v4alpha.RuntimeFractionalPercent runtime_fraction = 9; - - // 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). - repeated HeaderMatcher headers = 6; - - // 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. - repeated QueryParameterMatcher query_parameters = 7; - - // 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. - GrpcRouteMatchOptions grpc = 8; - - // If specified, the client tls context will be matched against the defined - // match options. - // - // [#next-major-version: unify with RBAC] - TlsContextMatchOptions tls_context = 11; -} - -// [#next-free-field: 12] -message CorsPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.CorsPolicy"; - - reserved 1, 8, 7; - - reserved "allow_origin", "allow_origin_regex", "enabled"; - - // Specifies string patterns that match allowed origins. An origin is allowed if any of the - // string matchers match. - repeated type.matcher.v4alpha.StringMatcher allow_origin_string_match = 11; - - // Specifies the content for the *access-control-allow-methods* header. - string allow_methods = 2; - - // Specifies the content for the *access-control-allow-headers* header. - string allow_headers = 3; - - // Specifies the content for the *access-control-expose-headers* header. - string expose_headers = 4; - - // Specifies the content for the *access-control-max-age* header. - string max_age = 5; - - // Specifies whether the resource allows credentials. - google.protobuf.BoolValue allow_credentials = 6; - - oneof enabled_specifier { - // Specifies the % of requests for which the CORS filter is enabled. - // - // If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS - // filter will be enabled for 100% of the requests. - // - // If :ref:`runtime_key ` is - // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - core.v4alpha.RuntimeFractionalPercent filter_enabled = 9; - } - - // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not - // enforced. - // - // This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those - // fields have to explicitly disable the filter in order for this setting to take effect. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's *Origin* to determine if it's valid but will not enforce any policies. - core.v4alpha.RuntimeFractionalPercent shadow_enabled = 10; -} - -// [#next-free-field: 37] -message RouteAction { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.RouteAction"; - - enum ClusterNotFoundResponseCode { - // HTTP status code - 503 Service Unavailable. - SERVICE_UNAVAILABLE = 0; - - // HTTP status code - 404 Not Found. - NOT_FOUND = 1; - } - - // The router is capable of shadowing traffic from one cluster to another. The current - // implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to - // respond before returning the response from the primary cluster. All normal statistics are - // collected for the shadow cluster making this feature useful for testing. - // - // During shadowing, the host/authority header is altered such that *-shadow* is appended. This is - // useful for logging. For example, *cluster1* becomes *cluster1-shadow*. - // - // .. note:: - // - // Shadowing will not be triggered if the primary cluster does not exist. - message RequestMirrorPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.RequestMirrorPolicy"; - - reserved 2; - - reserved "runtime_key"; - - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // If not specified, all requests to the target cluster will be mirrored. - // - // If specified, this field takes precedence over the `runtime_key` field and requests must also - // fall under the percentage of matches indicated by this field. - // - // For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the request will be mirrored. - core.v4alpha.RuntimeFractionalPercent runtime_fraction = 3; - - // Determines if the trace span should be sampled. Defaults to true. - google.protobuf.BoolValue trace_sampled = 4; - } - - // Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer - // `. - // [#next-free-field: 7] - message HashPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.HashPolicy"; - - message Header { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.HashPolicy.Header"; - - // 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. - string header_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // If specified, the request header value will be rewritten and used - // to produce the hash key. - type.matcher.v4alpha.RegexMatchAndSubstitute regex_rewrite = 2; - } - - // 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. - message Cookie { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.HashPolicy.Cookie"; - - // 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. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // 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. - google.protobuf.Duration ttl = 2; - - // The name of the path for the cookie. If no path is specified here, no path - // will be set for the cookie. - string path = 3; - } - - message ConnectionProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties"; - - // Hash on source IP address. - bool source_ip = 1; - } - - message QueryParameter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter"; - - // The name of the URL query parameter that will be used to obtain the hash - // key. If the parameter is not present, no hash will be produced. Query - // parameter names are case-sensitive. - string name = 1 [(validate.rules).string = {min_len: 1}]; - } - - message FilterState { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.HashPolicy.FilterState"; - - // The name of the Object in the per-request filterState, which is an - // Envoy::Http::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Http::Hashable, no hash will be produced. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - - oneof policy_specifier { - option (validate.required) = true; - - // Header hash policy. - Header header = 1; - - // Cookie hash policy. - Cookie cookie = 2; - - // Connection properties hash policy. - ConnectionProperties connection_properties = 3; - - // Query parameter hash policy. - QueryParameter query_parameter = 5; - - // Filter state hash policy. - FilterState filter_state = 6; - } - - // The flag that short-circuits the hash computing. This field provides a - // 'fallback' style of configuration: "if a terminal policy doesn't work, - // fallback to rest of the policy list", it saves time when the terminal - // policy works. - // - // If true, and there is already a hash computed, ignore rest of the - // list of hash polices. - // For example, if the following hash methods are configured: - // - // ========= ======== - // specifier terminal - // ========= ======== - // Header A true - // Header B false - // Header C false - // ========= ======== - // - // The generateHash process ends if policy "header A" generates a hash, as - // it's a terminal policy. - bool terminal = 4; - } - - // 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. - message UpgradeConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.UpgradeConfig"; - - // Configuration for sending data upstream as a raw data payload. This is used for - // CONNECT requests, when forwarding CONNECT payload as raw TCP. - message ConnectConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig"; - - // If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream. - core.v4alpha.ProxyProtocolConfig proxy_protocol_config = 1; - } - - // 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. - string upgrade_type = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Determines if upgrades are available on this route. Defaults to true. - google.protobuf.BoolValue enabled = 2; - - // Configuration for sending data upstream as a raw data payload. This is used for - // CONNECT requests, when forwarding CONNECT payload as raw TCP. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. - ConnectConfig connect_config = 3; - } - - message MaxStreamDuration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RouteAction.MaxStreamDuration"; - - // Specifies the maximum duration allowed for streams on the route. If not specified, the value - // from the :ref:`max_stream_duration - // ` field in - // :ref:`HttpConnectionManager.common_http_protocol_options - // ` - // is used. If this field is set explicitly to zero, any - // HttpConnectionManager max_stream_duration timeout will be disabled for - // this route. - google.protobuf.Duration max_stream_duration = 1; - - // If present, and the request contains a `grpc-timeout header - // `_, use that value as the - // *max_stream_duration*, but limit the applied timeout to the maximum value specified here. - // If set to 0, the `grpc-timeout` header is used without modification. - google.protobuf.Duration grpc_timeout_header_max = 2; - - // If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by - // subtracting the provided duration from the header. This is useful for allowing Envoy to set - // its global timeout to be less than that of the deadline imposed by the calling client, which - // makes it more likely that Envoy will handle the timeout instead of having the call canceled - // by the client. If, after applying the offset, the resulting timeout is zero or negative, - // the stream will timeout immediately. - google.protobuf.Duration grpc_timeout_header_offset = 3; - } - - reserved 12, 18, 19, 16, 22, 21, 10, 14, 23, 28, 26, 31; - - reserved "request_mirror_policy", "include_vh_rate_limits", "max_grpc_timeout", - "grpc_timeout_offset", "internal_redirect_action", "max_internal_redirects"; - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates the upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - // *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string cluster_header = 2 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. See - // :ref:`traffic splitting ` - // for additional documentation. - WeightedCluster weighted_clusters = 3; - } - - // The HTTP status code to use when configured cluster is not found. - // The default response code is 503 Service Unavailable. - ClusterNotFoundResponseCode cluster_not_found_response_code = 20 - [(validate.rules).enum = {defined_only: true}]; - - // 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*. - core.v4alpha.Metadata metadata_match = 4; - - // Indicates that during forwarding, the matched prefix (or path) should be - // swapped with this value. This option allows application URLs to be rooted - // at a different path from those exposed at the reverse proxy layer. The router filter will - // place the original path before rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of *prefix_rewrite* or - // :ref:`regex_rewrite ` - // may be specified. - // - // .. attention:: - // - // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. - // Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - // rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single - // :ref:`Route `, as shown by the below config entries: - // - // .. code-block:: yaml - // - // - match: - // prefix: "/prefix/" - // route: - // prefix_rewrite: "/" - // - match: - // prefix: "/prefix" - // route: - // prefix_rewrite: "/" - // - // Having above entries in the config, requests to */prefix* will be stripped to */*, while - // requests to */prefix/etc* will be stripped to */etc*. - string prefix_rewrite = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during forwarding, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. The router filter will place the original path as it was - // before the rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`prefix_rewrite ` - // or *regex_rewrite* may be specified. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - type.matcher.v4alpha.RegexMatchAndSubstitute regex_rewrite = 32; - - oneof host_rewrite_specifier { - // Indicates that during forwarding, the host header will be swapped with - // this value. - string host_rewrite_literal = 6 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during forwarding, the host header will be swapped with - // the hostname of the upstream host chosen by the cluster manager. This - // option is applicable only when the destination cluster for a route is of - // type *strict_dns* or *logical_dns*. Setting this to true with other cluster - // types has no effect. - google.protobuf.BoolValue auto_host_rewrite = 7; - - // Indicates that during forwarding, the host header will be swapped with the content of given - // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. - // - // .. attention:: - // - // Pay attention to the potential security implications of using this option. Provided header - // must come from trusted source. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string host_rewrite_header = 29 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Indicates that during forwarding, the host header will be swapped with - // the result of the regex substitution executed on path value with query and fragment removed. - // This is useful for transitioning variable content between path segment and subdomain. - // - // For example with the following config: - // - // .. code-block:: yaml - // - // host_rewrite_path_regex: - // pattern: - // google_re2: {} - // regex: "^/(.+)/.+$" - // substitution: \1 - // - // Would rewrite the host header to `envoyproxy.io` given the path `/envoyproxy.io/some/path`. - type.matcher.v4alpha.RegexMatchAndSubstitute host_rewrite_path_regex = 35; - } - - // Specifies the upstream timeout for the route. If not specified, the default is 15s. This - // spans between the point at which the entire downstream request (i.e. end-of-stream) has been - // processed and when the upstream response has been completely processed. A value of 0 will - // disable the route's timeout. - // - // .. note:: - // - // This timeout includes all retries. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - google.protobuf.Duration timeout = 8; - - // Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, - // although the connection manager wide :ref:`stream_idle_timeout - // ` - // will still apply. A value of 0 will completely disable the route's idle timeout, even if a - // connection manager stream idle timeout is configured. - // - // The idle timeout is distinct to :ref:`timeout - // `, which provides an upper bound - // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount - // of time the request's stream may be idle. - // - // After header decoding, the idle timeout will apply on downstream and - // upstream request events. Each time an encode/decode event for headers or - // data is processed for the stream, the timer will be reset. If the timeout - // fires, the stream is terminated with a 408 Request Timeout error code if no - // upstream response header has been received, otherwise a stream reset - // occurs. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. - google.protobuf.Duration idle_timeout = 24; - - // 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 retry_policy = 9; - - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that if this is set, it'll take - // precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, - // most internal one becomes the enforced policy). :ref:`Retry policy ` - // should not be set if this field is used. - google.protobuf.Any retry_policy_typed_config = 33; - - // Indicates that the route has request mirroring policies. - repeated RequestMirrorPolicy request_mirror_policies = 30; - - // Optionally specifies the :ref:`routing priority `. - core.v4alpha.RoutingPriority priority = 11 [(validate.rules).enum = {defined_only: true}]; - - // Specifies a set of rate limit configurations that could be applied to the - // route. - repeated RateLimit rate_limits = 13; - - // 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. - repeated HashPolicy hash_policy = 15; - - // Indicates that the route has a CORS policy. - CorsPolicy cors = 17; - - repeated UpgradeConfig upgrade_configs = 25; - - // If present, Envoy will try to follow an upstream redirect response instead of proxying the - // response back to the downstream. An upstream redirect response is defined - // by :ref:`redirect_response_codes - // `. - InternalRedirectPolicy internal_redirect_policy = 34; - - // Indicates that the route has a hedge policy. Note that if this is set, - // it'll take precedence over the virtual host level hedge policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - HedgePolicy hedge_policy = 27; - - // Specifies the maximum stream duration for this route. - MaxStreamDuration max_stream_duration = 36; -} - -// HTTP retry :ref:`architecture overview `. -// [#next-free-field: 12] -message RetryPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.RetryPolicy"; - - enum ResetHeaderFormat { - SECONDS = 0; - UNIX_TIMESTAMP = 1; - } - - message RetryPriority { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RetryPolicy.RetryPriority"; - - reserved 2; - - reserved "config"; - - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - message RetryHostPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RetryPolicy.RetryHostPredicate"; - - reserved 2; - - reserved "config"; - - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - message RetryBackOff { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RetryPolicy.RetryBackOff"; - - // 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. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gt {} - }]; - - // 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. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; - } - - message ResetHeader { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RetryPolicy.ResetHeader"; - - // The name of the reset header. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The format of the reset header. - ResetHeaderFormat format = 2 [(validate.rules).enum = {defined_only: true}]; - } - - // A retry back-off strategy that applies when the upstream server rate limits - // the request. - // - // Given this configuration: - // - // .. code-block:: yaml - // - // rate_limited_retry_back_off: - // reset_headers: - // - name: Retry-After - // format: SECONDS - // - name: X-RateLimit-Reset - // format: UNIX_TIMESTAMP - // max_interval: "300s" - // - // The following algorithm will apply: - // - // 1. If the response contains the header ``Retry-After`` its value must be on - // the form ``120`` (an integer that represents the number of seconds to - // wait before retrying). If so, this value is used as the back-off interval. - // 2. Otherwise, if the response contains the header ``X-RateLimit-Reset`` its - // value must be on the form ``1595320702`` (an integer that represents the - // point in time at which to retry, as a Unix timestamp in seconds). If so, - // the current time is subtracted from this value and the result is used as - // the back-off interval. - // 3. Otherwise, Envoy will use the default - // :ref:`exponential back-off ` - // strategy. - // - // No matter which format is used, if the resulting back-off interval exceeds - // ``max_interval`` it is discarded and the next header in ``reset_headers`` - // is tried. If a request timeout is configured for the route it will further - // limit how long the request will be allowed to run. - // - // To prevent many clients retrying at the same point in time jitter is added - // to the back-off interval, so the resulting interval is decided by taking: - // ``random(interval, interval * 1.5)``. - // - // .. attention:: - // - // Configuring ``rate_limited_retry_back_off`` will not by itself cause a request - // to be retried. You will still need to configure the right retry policy to match - // the responses from the upstream server. - message RateLimitedRetryBackOff { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff"; - - // Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) - // to match against the response. Headers are tried in order, and matched case - // insensitive. The first header to be parsed successfully is used. If no headers - // match the default exponential back-off is used instead. - repeated ResetHeader reset_headers = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Specifies the maximum back off interval that Envoy will allow. If a reset - // header contains an interval longer than this then it will be discarded and - // the next header will be tried. Defaults to 300 seconds. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; - } - - // 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`. - string retry_on = 1; - - // 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`. - google.protobuf.UInt32Value max_retries = 2; - - // 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. - google.protobuf.Duration per_try_timeout = 3; - - // 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 retry_priority = 4; - - // 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. - repeated RetryHostPredicate retry_host_predicate = 5; - - // 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. - int64 host_selection_retry_max_attempts = 6; - - // HTTP status codes that should trigger a retry in addition to those specified by retry_on. - repeated uint32 retriable_status_codes = 7; - - // Specifies parameters that control exponential retry back off. This parameter is optional, in which case the - // default base interval is 25 milliseconds or, if set, the current value of the - // `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times - // the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` - // describes Envoy's back-off algorithm. - RetryBackOff retry_back_off = 8; - - // Specifies parameters that control a retry back-off strategy that is used - // when the request is rate limited by the upstream server. The server may - // return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to - // provide feedback to the client on how long to wait before retrying. If - // configured, this back-off strategy will be used instead of the - // default exponential back off strategy (configured using `retry_back_off`) - // whenever a response includes the matching headers. - RateLimitedRetryBackOff rate_limited_retry_back_off = 11; - - // HTTP response headers that trigger a retry if present in the response. A retry will be - // triggered if any of the header matches match the upstream response headers. - // The field is only consulted if 'retriable-headers' retry policy is active. - repeated HeaderMatcher retriable_headers = 9; - - // HTTP headers which must be present in the request for retries to be attempted. - repeated HeaderMatcher retriable_request_headers = 10; -} - -// HTTP request hedging :ref:`architecture overview `. -message HedgePolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.HedgePolicy"; - - // Specifies the number of initial requests that should be sent upstream. - // Must be at least 1. - // Defaults to 1. - // [#not-implemented-hide:] - google.protobuf.UInt32Value initial_requests = 1 [(validate.rules).uint32 = {gte: 1}]; - - // Specifies a probability that an additional upstream request should be sent - // on top of what is specified by initial_requests. - // Defaults to 0. - // [#not-implemented-hide:] - type.v3.FractionalPercent additional_request_chance = 2; - - // Indicates that a hedged request should be sent when the per-try timeout is hit. - // This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight. - // The first request to complete successfully will be the one returned to the caller. - // - // * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client. - // * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client - // if there are no more retries left. - // * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. - // - // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least - // one error code and specifies a maximum number of retries. - // - // Defaults to false. - bool hedge_on_per_try_timeout = 3; -} - -// [#next-free-field: 10] -message RedirectAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RedirectAction"; - - enum RedirectResponseCode { - // Moved Permanently HTTP Status Code - 301. - MOVED_PERMANENTLY = 0; - - // Found HTTP Status Code - 302. - FOUND = 1; - - // See Other HTTP Status Code - 303. - SEE_OTHER = 2; - - // Temporary Redirect HTTP Status Code - 307. - TEMPORARY_REDIRECT = 3; - - // Permanent Redirect HTTP Status Code - 308. - PERMANENT_REDIRECT = 4; - } - - // 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 - oneof scheme_rewrite_specifier { - // The scheme portion of the URL will be swapped with "https". - bool https_redirect = 4; - - // The scheme portion of the URL will be swapped with this value. - string scheme_redirect = 7; - } - - // The host portion of the URL will be swapped with this value. - string host_redirect = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // The port value of the URL will be swapped with this value. - uint32 port_redirect = 8; - - oneof path_rewrite_specifier { - // The path portion of the URL will be swapped with this value. - // Please note that query string in path_redirect will override the - // request's query string and will not be stripped. - // - // For example, let's say we have the following routes: - // - // - match: { path: "/old-path-1" } - // redirect: { path_redirect: "/new-path-1" } - // - match: { path: "/old-path-2" } - // redirect: { path_redirect: "/new-path-2", strip-query: "true" } - // - match: { path: "/old-path-3" } - // redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } - // - // 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" - // 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" - // 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1" - string path_redirect = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during redirection, the matched prefix (or path) - // should be swapped with this value. This option allows redirect URLs be dynamically created - // based on the request. - // - // .. attention:: - // - // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. - string prefix_rewrite = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during redirect, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - type.matcher.v4alpha.RegexMatchAndSubstitute regex_rewrite = 9; - } - - // The HTTP status code to use in the redirect response. The default response - // code is MOVED_PERMANENTLY (301). - RedirectResponseCode response_code = 3 [(validate.rules).enum = {defined_only: true}]; - - // Indicates that during redirection, the query portion of the URL will - // be removed. Default value is false. - bool strip_query = 6; -} - -message DirectResponseAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.DirectResponseAction"; - - // Specifies the HTTP response status to be returned. - uint32 status = 1 [(validate.rules).uint32 = {lt: 600 gte: 100}]; - - // 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_config.route.v4alpha.Route`, :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` or - // :ref:`envoy_api_msg_config.route.v4alpha.VirtualHost`. - core.v4alpha.DataSource body = 2; -} - -message Decorator { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.Decorator"; - - // 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. - string operation = 1 [(validate.rules).string = {min_len: 1}]; - - // Whether the decorated details should be propagated to the other party. The default is true. - google.protobuf.BoolValue propagate = 2; -} - -message Tracing { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.Tracing"; - - // 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% - type.v3.FractionalPercent client_sampling = 1; - - // 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% - type.v3.FractionalPercent random_sampling = 2; - - // 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% - type.v3.FractionalPercent overall_sampling = 3; - - // A list of custom tags with unique tag name to create tags for the active span. - // It will take effect after merging with the :ref:`corresponding configuration - // ` - // configured in the HTTP connection manager. If two tags with the same name are configured - // each in the HTTP connection manager and the route level, the one configured here takes - // priority. - repeated type.tracing.v3.CustomTag custom_tags = 4; -} - -// 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. -message VirtualCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.VirtualCluster"; - - reserved 1, 3; - - reserved "pattern", "method"; - - // Specifies a list of header matchers to use for matching requests. Each specified header must - // match. The pseudo-headers `:path` and `:method` can be used to match the request path and - // method, respectively. - repeated HeaderMatcher headers = 4; - - // 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 `. - string name = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Global rate limiting :ref:`architecture overview `. -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.route.v3.RateLimit"; - - // [#next-free-field: 10] - message Action { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action"; - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("source_cluster", "") - // - // is derived from the :option:`--service-cluster` option. - message SourceCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.SourceCluster"; - } - - // 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. - message DestinationCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.DestinationCluster"; - } - - // The following descriptor entry is appended when a header contains a key that matches the - // *header_name*: - // - // .. code-block:: cpp - // - // ("", "") - message RequestHeaders { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.RequestHeaders"; - - // 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. - string header_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The key to use in the descriptor entry. - string descriptor_key = 2 [(validate.rules).string = {min_len: 1}]; - - // If set to true, Envoy skips the descriptor while calling rate limiting service - // when header is not present in the request. By default it skips calling the - // rate limiting service if this header is not present in the request. - bool skip_if_absent = 3; - } - - // 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", "") - message RemoteAddress { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.RemoteAddress"; - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("generic_key", "") - message GenericKey { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.GenericKey"; - - // The value to use in the descriptor entry. - string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; - - // An optional key to use in the descriptor entry. If not set it defaults - // to 'generic_key' as the descriptor key. - string descriptor_key = 2; - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("header_match", "") - message HeaderValueMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.HeaderValueMatch"; - - // The value to use in the descriptor entry. - string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; - - // 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. - google.protobuf.BoolValue expect_match = 2; - - // 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). - repeated HeaderMatcher headers = 3 [(validate.rules).repeated = {min_items: 1}]; - } - - // The following descriptor entry is appended when the - // :ref:`dynamic metadata ` contains a key value: - // - // .. code-block:: cpp - // - // ("", "") - // - // .. attention:: - // This action has been deprecated in favor of the :ref:`metadata ` action - message DynamicMetaData { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.DynamicMetaData"; - - // The key to use in the descriptor entry. - string descriptor_key = 1 [(validate.rules).string = {min_len: 1}]; - - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the dynamic metadata is of type string. - type.metadata.v3.MetadataKey metadata_key = 2 [(validate.rules).message = {required: true}]; - - // An optional value to use if *metadata_key* is empty. If not set and - // no value is present under the metadata_key then no descriptor is generated. - string default_value = 3; - } - - // The following descriptor entry is appended when the metadata contains a key value: - // - // .. code-block:: cpp - // - // ("", "") - message MetaData { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Action.MetaData"; - - enum Source { - // Query :ref:`dynamic metadata ` - DYNAMIC = 0; - - // Query :ref:`route entry metadata ` - ROUTE_ENTRY = 1; - } - - // The key to use in the descriptor entry. - string descriptor_key = 1 [(validate.rules).string = {min_len: 1}]; - - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the metadata is of type string. - type.metadata.v3.MetadataKey metadata_key = 2 [(validate.rules).message = {required: true}]; - - // An optional value to use if *metadata_key* is empty. If not set and - // no value is present under the metadata_key then no descriptor is generated. - string default_value = 3; - - // Source of metadata - Source source = 4 [(validate.rules).enum = {defined_only: true}]; - } - - reserved 7; - - reserved "dynamic_metadata"; - - oneof action_specifier { - option (validate.required) = true; - - // Rate limit on source cluster. - SourceCluster source_cluster = 1; - - // Rate limit on destination cluster. - DestinationCluster destination_cluster = 2; - - // Rate limit on request headers. - RequestHeaders request_headers = 3; - - // Rate limit on remote address. - RemoteAddress remote_address = 4; - - // Rate limit on a generic key. - GenericKey generic_key = 5; - - // Rate limit on the existence of request headers. - HeaderValueMatch header_value_match = 6; - - // Rate limit on metadata. - MetaData metadata = 8; - - // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. - core.v4alpha.TypedExtensionConfig extension = 9; - } - } - - message Override { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Override"; - - // Fetches the override from the dynamic metadata. - message DynamicMetadata { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.RateLimit.Override.DynamicMetadata"; - - // Metadata struct that defines the key and path to retrieve the struct value. - // The value must be a struct containing an integer "requests_per_unit" property - // and a "unit" property with a value parseable to :ref:`RateLimitUnit - // enum ` - type.metadata.v3.MetadataKey metadata_key = 1 [(validate.rules).message = {required: true}]; - } - - oneof override_specifier { - option (validate.required) = true; - - // Limit override from dynamic metadata. - DynamicMetadata dynamic_metadata = 1; - } - } - - // 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. - google.protobuf.UInt32Value stage = 1 [(validate.rules).uint32 = {lte: 10}]; - - // The key to be set in runtime to disable this rate limit configuration. - string disable_key = 2; - - // 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. - repeated Action actions = 3 [(validate.rules).repeated = {min_items: 1}]; - - // An optional limit override to be appended to the descriptor produced by this - // rate limit configuration. If the override value is invalid or cannot be resolved - // from metadata, no override is provided. See :ref:`rate limit override - // ` for more information. - Override limit = 4; -} - -// .. 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. -// -// [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// [#next-free-field: 13] -message HeaderMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.HeaderMatcher"; - - reserved 2, 3, 5; - - reserved "regex_match"; - - // Specifies the name of the header in the request. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Specifies how the header match will be performed to route the request. - oneof header_match_specifier { - // If specified, header match will be performed based on the value of the header. - string exact_match = 4; - - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. - type.matcher.v4alpha.RegexMatcher safe_regex_match = 11; - - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting of - // an optional plus or minus sign followed by a sequence of digits. The rule will not match if - // the header value does not represent an integer. Match will fail for empty values, floating - // point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, - // "-1somestring" - type.v3.Int64Range range_match = 6; - - // If specified, header match will be performed based on whether the header is in the - // request. - bool present_match = 7; - - // If specified, header match will be performed based on the prefix of the header value. - // Note: empty prefix is not allowed, please use present_match instead. - // - // Examples: - // - // * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. - string prefix_match = 9 [(validate.rules).string = {min_len: 1}]; - - // If specified, header match will be performed based on the suffix of the header value. - // Note: empty suffix is not allowed, please use present_match instead. - // - // Examples: - // - // * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. - string suffix_match = 10 [(validate.rules).string = {min_len: 1}]; - - // If specified, header match will be performed based on whether the header value contains - // the given value or not. - // Note: empty contains match is not allowed, please use present_match instead. - // - // Examples: - // - // * The value *abcd* matches the value *xyzabcdpqr*, but not for *xyzbcdpqr*. - string contains_match = 12 [(validate.rules).string = {min_len: 1}]; - } - - // 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. - bool invert_match = 8; -} - -// Query parameter matching treats the query string of a request's :path header -// as an ampersand-separated list of keys and/or key=value elements. -// [#next-free-field: 7] -message QueryParameterMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.QueryParameterMatcher"; - - reserved 3, 4; - - reserved "value", "regex"; - - // Specifies the name of a key that must be present in the requested - // *path*'s query string. - string name = 1 [(validate.rules).string = {min_len: 1 max_bytes: 1024}]; - - oneof query_parameter_match_specifier { - // Specifies whether a query parameter value should match against a string. - type.matcher.v4alpha.StringMatcher string_match = 5 - [(validate.rules).message = {required: true}]; - - // Specifies whether a query parameter should be present. - bool present_match = 6; - } -} - -// HTTP Internal Redirect :ref:`architecture overview `. -message InternalRedirectPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.InternalRedirectPolicy"; - - // An internal redirect is not handled, unless the number of previous internal redirects that a - // downstream request has encountered is lower than this value. - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or does not set :ref:`internal_redirect_policy - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - google.protobuf.UInt32Value max_internal_redirects = 1; - - // Defines what upstream response codes are allowed to trigger internal redirect. If unspecified, - // only 302 will be treated as internal redirect. - // Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored. - repeated uint32 redirect_response_codes = 2 [(validate.rules).repeated = {max_items: 5}]; - - // Specifies a list of predicates that are queried when an upstream response is deemed - // to trigger an internal redirect by all other criteria. Any predicate in the list can reject - // the redirect, causing the response to be proxied to downstream. - repeated core.v4alpha.TypedExtensionConfig predicates = 3; - - // Allow internal redirect to follow a target URI with a different scheme than the value of - // x-forwarded-proto. The default is false. - bool allow_cross_scheme_redirect = 4; -} diff --git a/api/envoy/config/route/v4alpha/scoped_route.proto b/api/envoy/config/route/v4alpha/scoped_route.proto deleted file mode 100644 index 0704ceacbb..0000000000 --- a/api/envoy/config/route/v4alpha/scoped_route.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; - -package envoy.config.route.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.route.v4alpha"; -option java_outer_classname = "ScopedRouteProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: HTTP scoped routing configuration] -// * Routing :ref:`architecture overview ` - -// Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` (identified by its resource name). -// -// The HTTP connection manager builds up a table consisting of these Key to -// RouteConfiguration mappings, and looks up the RouteConfiguration to use per -// request according to the algorithm specified in the -// :ref:`scope_key_builder` -// assigned to the HttpConnectionManager. -// -// For example, with the following configurations (in YAML): -// -// HttpConnectionManager config: -// -// .. code:: -// -// ... -// scoped_routes: -// name: foo-scoped-routes -// scope_key_builder: -// fragments: -// - header_value_extractor: -// name: X-Route-Selector -// element_separator: , -// element: -// separator: = -// key: vip -// -// ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` -// or obtained dynamically via SRDS): -// -// .. code:: -// -// (1) -// name: route-scope1 -// route_configuration_name: route-config1 -// key: -// fragments: -// - string_key: 172.10.10.20 -// -// (2) -// name: route-scope2 -// route_configuration_name: route-config2 -// key: -// fragments: -// - string_key: 172.20.20.30 -// -// A request from a client such as: -// -// .. code:: -// -// GET / HTTP/1.1 -// Host: foo.com -// X-Route-Selector: vip=172.10.10.20 -// -// would result in the routing table defined by the `route-config1` -// RouteConfiguration being assigned to the HTTP request/stream. -// -message ScopedRouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.ScopedRouteConfiguration"; - - // Specifies a key which is matched against the output of the - // :ref:`scope_key_builder` - // specified in the HttpConnectionManager. The matching is done per HTTP - // request and is dependent on the order of the fragments contained in the - // Key. - message Key { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.ScopedRouteConfiguration.Key"; - - message Fragment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment"; - - oneof type { - option (validate.required) = true; - - // A string to match against. - string string_key = 1; - } - } - - // The ordered set of fragments to match against. The order must match the - // fragments in the corresponding - // :ref:`scope_key_builder`. - repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Whether the RouteConfiguration should be loaded on demand. - bool on_demand = 4; - - // The name assigned to the routing scope. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The resource name to use for a :ref:`envoy_api_msg_service.discovery.v4alpha.DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` associated - // with this scope. - string route_configuration_name = 2 [(validate.rules).string = {min_len: 1}]; - - // The key to match against. - Key key = 3 [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/config/tap/v3/common.proto b/api/envoy/config/tap/v3/common.proto index a8324a6ebc..4ca9b7ca43 100644 --- a/api/envoy/config/tap/v3/common.proto +++ b/api/envoy/config/tap/v3/common.proto @@ -7,8 +7,10 @@ import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/grpc_service.proto"; import "envoy/config/route/v3/route_components.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -16,6 +18,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.tap.v3"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common tap configuration] @@ -29,16 +32,17 @@ message TapConfig { // The match configuration. If the configuration matches the data source being tapped, a tap will // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. - MatchPredicate match_config = 1 [deprecated = true]; + // Exactly one of :ref:`match ` and + // :ref:`match_config ` must be set. If both + // are set, the :ref:`match ` will be used. + MatchPredicate match_config = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // The match configuration. If the configuration matches the data source being tapped, a tap will // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. + // Exactly one of :ref:`match ` and + // :ref:`match_config ` must be set. If both + // are set, the :ref:`match ` will be used. common.matcher.v3.MatchPredicate match = 4; // The tap output configuration. If a match configuration matches a data source being tapped, @@ -52,7 +56,7 @@ message TapConfig { // .. note:: // // This field defaults to 100/:ref:`HUNDRED - // `. + // `. core.v3.RuntimeFractionalPercent tap_enabled = 3; } @@ -159,19 +163,19 @@ message OutputConfig { // For buffered tapping, the maximum amount of received body that will be buffered prior to // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the + // ` field will be set. If not specified, the // default is 1KiB. google.protobuf.UInt32Value max_buffered_rx_bytes = 2; // For buffered tapping, the maximum amount of transmitted body that will be buffered prior to // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the + // ` field will be set. If not specified, the // default is 1KiB. google.protobuf.UInt32Value max_buffered_tx_bytes = 3; // Indicates whether taps produce a single buffered message per tap, or multiple streamed // messages per tap in the emitted :ref:`TraceWrapper - // ` messages. Note that streamed tapping does not + // ` messages. Note that streamed tapping does not // mean that no buffering takes place. Buffering may be required if data is processed before a // match can be determined. See the HTTP tap filter :ref:`streaming // ` documentation for more information. @@ -179,25 +183,26 @@ message OutputConfig { } // Tap output sink configuration. +// [#next-free-field: 6] message OutputSink { option (udpa.annotations.versioning).previous_message_type = "envoy.service.tap.v2alpha.OutputSink"; // Output format. All output is in the form of one or more :ref:`TraceWrapper - // ` messages. This enumeration indicates + // ` messages. This enumeration indicates // how those messages are written. Note that not all sinks support all output formats. See // individual sink documentation for more information. enum Format { - // Each message will be written as JSON. Any :ref:`body ` + // Each message will be written as JSON. Any :ref:`body ` // data will be present in the :ref:`as_bytes - // ` field. This means that body data will be + // ` field. This means that body data will be // base64 encoded as per the `proto3 JSON mappings // `_. JSON_BODY_AS_BYTES = 0; - // Each message will be written as JSON. Any :ref:`body ` + // Each message will be written as JSON. Any :ref:`body ` // data will be present in the :ref:`as_string - // ` field. This means that body data will be + // ` field. This means that body data will be // string encoded as per the `proto3 JSON mappings // `_. This format type is // useful when it is known that that body is human readable (e.g., JSON over HTTP) and the @@ -244,6 +249,16 @@ message OutputSink { // GrpcService to stream data to. The format argument must be PROTO_BINARY. // [#comment: TODO(samflattery): remove cleanup in uber_per_filter.cc once implemented] StreamingGrpcSink streaming_grpc = 4; + + // Tap output will be buffered in a single block before flushing to the :http:post:`/tap` admin endpoint + // + // .. attention:: + // + // It is only allowed to specify the buffered admin output sink if the tap is being + // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has + // been configured to receive tap configuration from some other source (e.g., static + // file, XDS, etc.) configuring the buffered admin output type will fail. + BufferedAdminSink buffered_admin = 5; } } @@ -253,6 +268,23 @@ message StreamingAdminSink { "envoy.service.tap.v2alpha.StreamingAdminSink"; } +// BufferedAdminSink configures a tap output to collect traces without returning them until +// one of multiple criteria are satisfied. +// Similar to StreamingAdminSink, it is only allowed to specify the buffered admin output +// sink if the tap is being configured from the `/tap` admin endpoint. +message BufferedAdminSink { + // Stop collecting traces when the specified number are collected. + // If other criteria for ending collection are reached first, this value will not be used. + uint64 max_traces = 1 [(validate.rules).uint64 = {gt: 0}]; + + // Acts as a fallback to prevent the client from waiting for long periods of time. + // After timeout has occurred, a buffer flush will be triggered, returning the traces buffered so far. + // This may result in returning fewer traces than were requested, and in the case that no traces are + // buffered during this time, no traces will be returned. + // Specifying 0 for the timeout value (or not specifying a value at all) indicates an infinite timeout. + google.protobuf.Duration timeout = 2; +} + // The file per tap sink outputs a discrete file for every tapped stream. message FilePerTapSink { option (udpa.annotations.versioning).previous_message_type = diff --git a/api/envoy/config/tap/v4alpha/common.proto b/api/envoy/config/tap/v4alpha/common.proto deleted file mode 100644 index fbee12d7f9..0000000000 --- a/api/envoy/config/tap/v4alpha/common.proto +++ /dev/null @@ -1,276 +0,0 @@ -syntax = "proto3"; - -package envoy.config.tap.v4alpha; - -import "envoy/config/common/matcher/v4alpha/matcher.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/grpc_service.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.tap.v4alpha"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Common tap configuration] - -// Tap configuration. -message TapConfig { - // [#comment:TODO(mattklein123): Rate limiting] - - option (udpa.annotations.versioning).previous_message_type = "envoy.config.tap.v3.TapConfig"; - - reserved 1; - - reserved "match_config"; - - // The match configuration. If the configuration matches the data source being tapped, a tap will - // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. - common.matcher.v4alpha.MatchPredicate match = 4; - - // The tap output configuration. If a match configuration matches a data source being tapped, - // a tap will occur and the data will be written to the configured output. - OutputConfig output_config = 2 [(validate.rules).message = {required: true}]; - - // [#not-implemented-hide:] Specify if Tap matching is enabled. The % of requests\connections for - // which the tap matching is enabled. When not enabled, the request\connection will not be - // recorded. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - core.v4alpha.RuntimeFractionalPercent tap_enabled = 3; -} - -// Tap match configuration. This is a recursive structure which allows complex nested match -// configurations to be built using various logical operators. -// [#next-free-field: 11] -message MatchPredicate { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.tap.v3.MatchPredicate"; - - // A set of match configurations used for logical operations. - message MatchSet { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.tap.v3.MatchPredicate.MatchSet"; - - // The list of rules that make up the set. - repeated MatchPredicate rules = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - MatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // HTTP request headers match configuration. - HttpHeadersMatch http_request_headers_match = 5; - - // HTTP request trailers match configuration. - HttpHeadersMatch http_request_trailers_match = 6; - - // HTTP response headers match configuration. - HttpHeadersMatch http_response_headers_match = 7; - - // HTTP response trailers match configuration. - HttpHeadersMatch http_response_trailers_match = 8; - - // HTTP request generic body match configuration. - HttpGenericBodyMatch http_request_generic_body_match = 9; - - // HTTP response generic body match configuration. - HttpGenericBodyMatch http_response_generic_body_match = 10; - } -} - -// HTTP headers match configuration. -message HttpHeadersMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.tap.v3.HttpHeadersMatch"; - - // HTTP headers to match. - repeated route.v4alpha.HeaderMatcher headers = 1; -} - -// HTTP generic body match configuration. -// List of text strings and hex strings to be located in HTTP body. -// All specified strings must be found in the HTTP body for positive match. -// The search may be limited to specified number of bytes from the body start. -// -// .. attention:: -// -// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. -// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified -// to scan only part of the http body. -message HttpGenericBodyMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.tap.v3.HttpGenericBodyMatch"; - - message GenericTextMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch"; - - oneof rule { - option (validate.required) = true; - - // Text string to be located in HTTP body. - string string_match = 1 [(validate.rules).string = {min_len: 1}]; - - // Sequence of bytes to be located in HTTP body. - bytes binary_match = 2 [(validate.rules).bytes = {min_len: 1}]; - } - } - - // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). - uint32 bytes_limit = 1; - - // List of patterns to match. - repeated GenericTextMatch patterns = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Tap output configuration. -message OutputConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.tap.v3.OutputConfig"; - - // Output sinks for tap data. Currently a single sink is allowed in the list. Once multiple - // sink types are supported this constraint will be relaxed. - repeated OutputSink sinks = 1 [(validate.rules).repeated = {min_items: 1 max_items: 1}]; - - // For buffered tapping, the maximum amount of received body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - google.protobuf.UInt32Value max_buffered_rx_bytes = 2; - - // For buffered tapping, the maximum amount of transmitted body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - google.protobuf.UInt32Value max_buffered_tx_bytes = 3; - - // Indicates whether taps produce a single buffered message per tap, or multiple streamed - // messages per tap in the emitted :ref:`TraceWrapper - // ` messages. Note that streamed tapping does not - // mean that no buffering takes place. Buffering may be required if data is processed before a - // match can be determined. See the HTTP tap filter :ref:`streaming - // ` documentation for more information. - bool streaming = 4; -} - -// Tap output sink configuration. -message OutputSink { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.tap.v3.OutputSink"; - - // Output format. All output is in the form of one or more :ref:`TraceWrapper - // ` messages. This enumeration indicates - // how those messages are written. Note that not all sinks support all output formats. See - // individual sink documentation for more information. - enum Format { - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_bytes - // ` field. This means that body data will be - // base64 encoded as per the `proto3 JSON mappings - // `_. - JSON_BODY_AS_BYTES = 0; - - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_string - // ` field. This means that body data will be - // string encoded as per the `proto3 JSON mappings - // `_. This format type is - // useful when it is known that that body is human readable (e.g., JSON over HTTP) and the - // user wishes to view it directly without being forced to base64 decode the body. - JSON_BODY_AS_STRING = 1; - - // Binary proto format. Note that binary proto is not self-delimiting. If a sink writes - // multiple binary messages without any length information the data stream will not be - // useful. However, for certain sinks that are self-delimiting (e.g., one message per file) - // this output format makes consumption simpler. - PROTO_BINARY = 2; - - // Messages are written as a sequence tuples, where each tuple is the message length encoded - // as a `protobuf 32-bit varint - // `_ - // followed by the binary message. The messages can be read back using the language specific - // protobuf coded stream implementation to obtain the message length and the message. - PROTO_BINARY_LENGTH_DELIMITED = 3; - - // Text proto format. - PROTO_TEXT = 4; - } - - // Sink output format. - Format format = 1 [(validate.rules).enum = {defined_only: true}]; - - oneof output_sink_type { - option (validate.required) = true; - - // Tap output will be streamed out the :http:post:`/tap` admin endpoint. - // - // .. attention:: - // - // It is only allowed to specify the streaming admin output sink if the tap is being - // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has - // been configured to receive tap configuration from some other source (e.g., static - // file, XDS, etc.) configuring the streaming admin output type will fail. - StreamingAdminSink streaming_admin = 2; - - // Tap output will be written to a file per tap sink. - FilePerTapSink file_per_tap = 3; - - // [#not-implemented-hide:] - // GrpcService to stream data to. The format argument must be PROTO_BINARY. - // [#comment: TODO(samflattery): remove cleanup in uber_per_filter.cc once implemented] - StreamingGrpcSink streaming_grpc = 4; - } -} - -// Streaming admin sink configuration. -message StreamingAdminSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.tap.v3.StreamingAdminSink"; -} - -// The file per tap sink outputs a discrete file for every tapped stream. -message FilePerTapSink { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.tap.v3.FilePerTapSink"; - - // Path prefix. The output file will be of the form _.pb, where is an - // identifier distinguishing the recorded trace for stream instances (the Envoy - // connection ID, HTTP stream ID, etc.). - string path_prefix = 1 [(validate.rules).string = {min_len: 1}]; -} - -// [#not-implemented-hide:] Streaming gRPC sink configuration sends the taps to an external gRPC -// server. -message StreamingGrpcSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.tap.v3.StreamingGrpcSink"; - - // Opaque identifier, that will be sent back to the streaming grpc server. - string tap_id = 1; - - // The gRPC server that hosts the Tap Sink Service. - core.v4alpha.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/config/trace/v2/datadog.proto b/api/envoy/config/trace/v2/datadog.proto index 0992601a8a..3034eecaf5 100644 --- a/api/envoy/config/trace/v2/datadog.proto +++ b/api/envoy/config/trace/v2/datadog.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "DatadogProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Datadog tracer] diff --git a/api/envoy/config/trace/v2/dynamic_ot.proto b/api/envoy/config/trace/v2/dynamic_ot.proto index 55c6d401b3..928b096bb0 100644 --- a/api/envoy/config/trace/v2/dynamic_ot.proto +++ b/api/envoy/config/trace/v2/dynamic_ot.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "DynamicOtProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Dynamically loadable OpenTracing tracer] diff --git a/api/envoy/config/trace/v2/http_tracer.proto b/api/envoy/config/trace/v2/http_tracer.proto index fba830b987..778b9e718a 100644 --- a/api/envoy/config/trace/v2/http_tracer.proto +++ b/api/envoy/config/trace/v2/http_tracer.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "HttpTracerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Tracing] diff --git a/api/envoy/config/trace/v2/lightstep.proto b/api/envoy/config/trace/v2/lightstep.proto index 849749baaa..db866c8255 100644 --- a/api/envoy/config/trace/v2/lightstep.proto +++ b/api/envoy/config/trace/v2/lightstep.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "LightstepProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: LightStep tracer] diff --git a/api/envoy/config/trace/v2/opencensus.proto b/api/envoy/config/trace/v2/opencensus.proto index 8c8dab94a8..595f4fe278 100644 --- a/api/envoy/config/trace/v2/opencensus.proto +++ b/api/envoy/config/trace/v2/opencensus.proto @@ -7,11 +7,11 @@ import "envoy/api/v2/core/grpc_service.proto"; import "opencensus/proto/trace/v1/trace_config.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "OpencensusProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: OpenCensus tracer] diff --git a/api/envoy/config/trace/v2/service.proto b/api/envoy/config/trace/v2/service.proto index d102499b62..85477cccbf 100644 --- a/api/envoy/config/trace/v2/service.proto +++ b/api/envoy/config/trace/v2/service.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "ServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Trace Service] diff --git a/api/envoy/config/trace/v2/trace.proto b/api/envoy/config/trace/v2/trace.proto index 9f0670b28f..02d6fa28bd 100644 --- a/api/envoy/config/trace/v2/trace.proto +++ b/api/envoy/config/trace/v2/trace.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package envoy.config.trace.v2; -import "udpa/annotations/status.proto"; - import public "envoy/config/trace/v2/datadog.proto"; import public "envoy/config/trace/v2/dynamic_ot.proto"; import public "envoy/config/trace/v2/http_tracer.proto"; @@ -15,3 +13,4 @@ import public "envoy/config/trace/v2/zipkin.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "TraceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; diff --git a/api/envoy/config/trace/v2/zipkin.proto b/api/envoy/config/trace/v2/zipkin.proto index 2289e55bfe..d052c7176b 100644 --- a/api/envoy/config/trace/v2/zipkin.proto +++ b/api/envoy/config/trace/v2/zipkin.proto @@ -11,13 +11,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "ZipkinProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Zipkin tracer] // Configuration for the Zipkin tracer. // [#extension: envoy.tracers.zipkin] -// [#next-free-field: 7] +// [#next-free-field: 6] message ZipkinConfig { // Available Zipkin collector endpoint versions. enum CollectorEndpointVersion { @@ -61,8 +62,4 @@ message ZipkinConfig { // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be // used. CollectorEndpointVersion collector_endpoint_version = 5; - - // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors - // that require a specific hostname. Defaults to `collector_cluster` above. - string collector_hostname = 6; } diff --git a/api/envoy/config/trace/v2alpha/xray.proto b/api/envoy/config/trace/v2alpha/xray.proto index 27db3ba40b..2ce5ed1544 100644 --- a/api/envoy/config/trace/v2alpha/xray.proto +++ b/api/envoy/config/trace/v2alpha/xray.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v2alpha"; option java_outer_classname = "XrayProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: AWS X-Ray Tracer Configuration] diff --git a/api/envoy/config/trace/v3/datadog.proto b/api/envoy/config/trace/v3/datadog.proto index c101ab2f03..1a01f6a33c 100644 --- a/api/envoy/config/trace/v3/datadog.proto +++ b/api/envoy/config/trace/v3/datadog.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "DatadogProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.datadog.v4alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/config/trace/v3/dynamic_ot.proto b/api/envoy/config/trace/v3/dynamic_ot.proto index c281068715..954c4a422a 100644 --- a/api/envoy/config/trace/v3/dynamic_ot.proto +++ b/api/envoy/config/trace/v3/dynamic_ot.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "DynamicOtProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.dynamic_ot.v4alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/config/trace/v3/http_tracer.proto b/api/envoy/config/trace/v3/http_tracer.proto index 33adea18a4..8bd5151f4b 100644 --- a/api/envoy/config/trace/v3/http_tracer.proto +++ b/api/envoy/config/trace/v3/http_tracer.proto @@ -3,7 +3,6 @@ syntax = "proto3"; package envoy.config.trace.v3; import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -12,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "HttpTracerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Tracing] @@ -25,15 +25,15 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // .. attention:: // // Use of this message type has been deprecated in favor of direct use of -// :ref:`Tracing.Http `. +// :ref:`Tracing.Http `. message Tracing { option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.Tracing"; // Configuration for an HTTP tracer provider used by Envoy. // // The configuration is defined by the - // :ref:`HttpConnectionManager.Tracing ` - // :ref:`provider ` + // :ref:`HttpConnectionManager.Tracing ` + // :ref:`provider ` // field. message Http { option (udpa.annotations.versioning).previous_message_type = @@ -44,25 +44,12 @@ message Tracing { reserved "config"; // The name of the HTTP trace driver to instantiate. The name must match a - // supported HTTP trace driver. Built-in trace drivers: - // - // - *envoy.tracers.lightstep* - // - *envoy.tracers.zipkin* - // - *envoy.tracers.dynamic_ot* - // - *envoy.tracers.datadog* - // - *envoy.tracers.opencensus* - // - *envoy.tracers.xray* + // supported HTTP trace driver. + // See the :ref:`extensions listed in typed_config below ` for the default list of the HTTP trace driver. string name = 1 [(validate.rules).string = {min_len: 1}]; - // Trace driver specific configuration which depends on the driver being instantiated. - // See the trace drivers for examples: - // - // - :ref:`LightstepConfig ` - // - :ref:`ZipkinConfig ` - // - :ref:`DynamicOtConfig ` - // - :ref:`DatadogConfig ` - // - :ref:`OpenCensusConfig ` - // - :ref:`AWS X-Ray ` + // Trace driver specific configuration which must be set according to the driver being instantiated. + // [#extension-category: envoy.tracers] oneof config_type { google.protobuf.Any typed_config = 3; } diff --git a/api/envoy/config/trace/v3/lightstep.proto b/api/envoy/config/trace/v3/lightstep.proto index 0b7be7c4e6..0e2680832f 100644 --- a/api/envoy/config/trace/v3/lightstep.proto +++ b/api/envoy/config/trace/v3/lightstep.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package envoy.config.trace.v3; +import "envoy/config/core/v3/base.proto"; + +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -10,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "LightstepProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.lightstep.v4alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -42,7 +46,11 @@ message LightstepConfig { // File containing the access token to the `LightStep // `_ API. - string access_token_file = 2 [(validate.rules).string = {min_len: 1}]; + string access_token_file = 2 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // Access token to the `LightStep `_ API. + core.v3.DataSource access_token = 4; // Propagation modes to use by LightStep's tracer. repeated PropagationMode propagation_modes = 3 diff --git a/api/envoy/config/trace/v3/opencensus.proto b/api/envoy/config/trace/v3/opencensus.proto index a4a8750983..9b2d2361a4 100644 --- a/api/envoy/config/trace/v3/opencensus.proto +++ b/api/envoy/config/trace/v3/opencensus.proto @@ -6,14 +6,15 @@ import "envoy/config/core/v3/grpc_service.proto"; import "opencensus/proto/trace/v1/trace_config.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "OpencensusProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.opencensus.v4alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -74,12 +75,14 @@ message OpenCensusConfig { // Enables the Zipkin exporter if set to true. The url and service name must // also be set. This is deprecated, prefer to use Envoy's :ref:`native Zipkin // tracer `. - bool zipkin_exporter_enabled = 5 [deprecated = true]; + bool zipkin_exporter_enabled = 5 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans". This is // deprecated, prefer to use Envoy's :ref:`native Zipkin tracer // `. - string zipkin_url = 6 [deprecated = true]; + string zipkin_url = 6 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or // ocagent_grpc_service must also be set. diff --git a/api/envoy/config/trace/v3/service.proto b/api/envoy/config/trace/v3/service.proto index 1e01ff6184..4cb8c44c42 100644 --- a/api/envoy/config/trace/v3/service.proto +++ b/api/envoy/config/trace/v3/service.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "ServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Trace Service] diff --git a/api/envoy/config/trace/v3/skywalking.proto b/api/envoy/config/trace/v3/skywalking.proto index 224d474ccf..327defe9ba 100644 --- a/api/envoy/config/trace/v3/skywalking.proto +++ b/api/envoy/config/trace/v3/skywalking.proto @@ -9,12 +9,12 @@ import "google/protobuf/wrappers.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/sensitive.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "SkywalkingProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.skywalking.v4alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/config/trace/v3/trace.proto b/api/envoy/config/trace/v3/trace.proto index e1db72a2fd..5e5895e26b 100644 --- a/api/envoy/config/trace/v3/trace.proto +++ b/api/envoy/config/trace/v3/trace.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package envoy.config.trace.v3; -import "udpa/annotations/status.proto"; - import public "envoy/config/trace/v3/datadog.proto"; import public "envoy/config/trace/v3/dynamic_ot.proto"; import public "envoy/config/trace/v3/http_tracer.proto"; @@ -15,3 +13,4 @@ import public "envoy/config/trace/v3/zipkin.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "TraceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; diff --git a/api/envoy/config/trace/v3/xray.proto b/api/envoy/config/trace/v3/xray.proto index a904a10892..223aaaaf44 100644 --- a/api/envoy/config/trace/v3/xray.proto +++ b/api/envoy/config/trace/v3/xray.proto @@ -15,12 +15,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "XrayProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.xray.v4alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: AWS X-Ray Tracer Configuration] // Configuration for AWS X-Ray tracer +// [#extension: envoy.tracers.xray] message XRayConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2alpha.XRayConfig"; diff --git a/api/envoy/config/trace/v3/zipkin.proto b/api/envoy/config/trace/v3/zipkin.proto index 2c1026b830..1d76b81376 100644 --- a/api/envoy/config/trace/v3/zipkin.proto +++ b/api/envoy/config/trace/v3/zipkin.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.trace.v3"; option java_outer_classname = "ZipkinProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.zipkin.v4alpha"; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -50,8 +51,7 @@ message ZipkinConfig { string collector_cluster = 1 [(validate.rules).string = {min_len: 1}]; // The API endpoint of the Zipkin service where the spans will be sent. When - // using a standard Zipkin installation, the API endpoint is typically - // /api/v1/spans, which is the default value. + // using a standard Zipkin installation. string collector_endpoint = 2 [(validate.rules).string = {min_len: 1}]; // Determines whether a 128bit trace id will be used when creating a new @@ -62,8 +62,7 @@ message ZipkinConfig { // The default value is true. google.protobuf.BoolValue shared_span_context = 4; - // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be - // used. + // Determines the selected collector endpoint version. CollectorEndpointVersion collector_endpoint_version = 5; // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors diff --git a/api/envoy/config/trace/v4alpha/http_tracer.proto b/api/envoy/config/trace/v4alpha/http_tracer.proto deleted file mode 100644 index ea918ec2bf..0000000000 --- a/api/envoy/config/trace/v4alpha/http_tracer.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v4alpha; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v4alpha"; -option java_outer_classname = "HttpTracerProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Tracing] -// Tracing :ref:`architecture overview `. - -// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy. -// -// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one -// supported. -// -// .. attention:: -// -// Use of this message type has been deprecated in favor of direct use of -// :ref:`Tracing.Http `. -message Tracing { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.Tracing"; - - // Configuration for an HTTP tracer provider used by Envoy. - // - // The configuration is defined by the - // :ref:`HttpConnectionManager.Tracing ` - // :ref:`provider ` - // field. - message Http { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.Tracing.Http"; - - reserved 2; - - reserved "config"; - - // The name of the HTTP trace driver to instantiate. The name must match a - // supported HTTP trace driver. Built-in trace drivers: - // - // - *envoy.tracers.lightstep* - // - *envoy.tracers.zipkin* - // - *envoy.tracers.dynamic_ot* - // - *envoy.tracers.datadog* - // - *envoy.tracers.opencensus* - // - *envoy.tracers.xray* - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Trace driver specific configuration which depends on the driver being instantiated. - // See the trace drivers for examples: - // - // - :ref:`LightstepConfig ` - // - :ref:`ZipkinConfig ` - // - :ref:`DynamicOtConfig ` - // - :ref:`DatadogConfig ` - // - :ref:`OpenCensusConfig ` - // - :ref:`AWS X-Ray ` - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - // Provides configuration for the HTTP tracer. - Http http = 1; -} diff --git a/api/envoy/config/trace/v4alpha/service.proto b/api/envoy/config/trace/v4alpha/service.proto deleted file mode 100644 index d132b32dd7..0000000000 --- a/api/envoy/config/trace/v4alpha/service.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v4alpha; - -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v4alpha"; -option java_outer_classname = "ServiceProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Trace Service] - -// Configuration structure. -message TraceServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.TraceServiceConfig"; - - // The upstream gRPC cluster that hosts the metrics service. - core.v4alpha.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/config/transport_socket/alts/v2alpha/alts.proto b/api/envoy/config/transport_socket/alts/v2alpha/alts.proto index 92d5fb83a4..6ad5428ba2 100644 --- a/api/envoy/config/transport_socket/alts/v2alpha/alts.proto +++ b/api/envoy/config/transport_socket/alts/v2alpha/alts.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.transport_socket.alts.v2alpha"; option java_outer_classname = "AltsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/transport_socket/alts/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.transport_sockets.alts.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto b/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto index 1b3fd395d5..40efb3ac80 100644 --- a/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto +++ b/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto @@ -8,6 +8,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.config.transport_socket.raw_buffer.v2"; option java_outer_classname = "RawBufferProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/transport_socket/raw_buffer/v2;raw_bufferv2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.transport_sockets.raw_buffer.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/config/transport_socket/tap/v2alpha/tap.proto b/api/envoy/config/transport_socket/tap/v2alpha/tap.proto index 0802c7558a..42b1107b37 100644 --- a/api/envoy/config/transport_socket/tap/v2alpha/tap.proto +++ b/api/envoy/config/transport_socket/tap/v2alpha/tap.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.transport_socket.tap.v2alpha"; option java_outer_classname = "TapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/transport_socket/tap/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.transport_sockets.tap.v3"; option (udpa.annotations.file_status).work_in_progress = true; diff --git a/api/envoy/data/accesslog/v2/accesslog.proto b/api/envoy/data/accesslog/v2/accesslog.proto index af19197f62..272445d94d 100644 --- a/api/envoy/data/accesslog/v2/accesslog.proto +++ b/api/envoy/data/accesslog/v2/accesslog.proto @@ -16,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.accesslog.v2"; option java_outer_classname = "AccesslogProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/accesslog/v2;accesslogv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: gRPC access logs] diff --git a/api/envoy/data/accesslog/v3/accesslog.proto b/api/envoy/data/accesslog/v3/accesslog.proto index af7edab583..18c9def8ea 100644 --- a/api/envoy/data/accesslog/v3/accesslog.proto +++ b/api/envoy/data/accesslog/v3/accesslog.proto @@ -17,6 +17,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.accesslog.v3"; option java_outer_classname = "AccesslogProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/accesslog/v3;accesslogv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC access logs] @@ -79,7 +80,7 @@ message ConnectionProperties { } // Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 22] +// [#next-free-field: 23] message AccessLogCommon { option (udpa.annotations.versioning).previous_message_type = "envoy.data.accesslog.v2.AccessLogCommon"; @@ -183,10 +184,15 @@ message AccessLogCommon { // state serialized to any message other than `google.protobuf.Any` it will be packed into // `google.protobuf.Any`. map filter_state_objects = 21; + + // A list of custom tags, which annotate logs with additional information. + // To configure this value, users should configure + // :ref:`custom_tags `. + map custom_tags = 22; } // Flags indicating occurrences during request/response processing. -// [#next-free-field: 24] +// [#next-free-field: 28] message ResponseFlags { option (udpa.annotations.versioning).previous_message_type = "envoy.data.accesslog.v2.ResponseFlags"; @@ -275,6 +281,18 @@ message ResponseFlags { // Indicates that request or connection exceeded the downstream connection duration. bool duration_timeout = 23; + + // Indicates there was an HTTP protocol error in the upstream response. + bool upstream_protocol_error = 24; + + // Indicates no cluster was found for the request. + bool no_cluster_found = 25; + + // Indicates overload manager terminated the request. + bool overload_manager = 26; + + // Indicates a DNS resolution failed. + bool dns_resolution_failure = 27; } // Properties of a negotiated TLS connection. diff --git a/api/envoy/data/cluster/v2alpha/outlier_detection_event.proto b/api/envoy/data/cluster/v2alpha/outlier_detection_event.proto index 3ea8bc2597..2ede4c4d9d 100644 --- a/api/envoy/data/cluster/v2alpha/outlier_detection_event.proto +++ b/api/envoy/data/cluster/v2alpha/outlier_detection_event.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.cluster.v2alpha"; option java_outer_classname = "OutlierDetectionEventProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/cluster/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.data.cluster.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/data/cluster/v3/outlier_detection_event.proto b/api/envoy/data/cluster/v3/outlier_detection_event.proto index f87cd1582b..f996f06552 100644 --- a/api/envoy/data/cluster/v3/outlier_detection_event.proto +++ b/api/envoy/data/cluster/v3/outlier_detection_event.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.cluster.v3"; option java_outer_classname = "OutlierDetectionEventProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/cluster/v3;clusterv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Outlier detection logging events] @@ -21,7 +22,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; enum OutlierEjectionType { // In case upstream host returns certain number of consecutive 5xx. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all type of errors are treated as HTTP 5xx errors. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -34,7 +35,7 @@ enum OutlierEjectionType { // and selects hosts for which ratio of successful replies deviates from other hosts // in the cluster. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all errors (externally and locally generated) are used to calculate success rate // statistics. See :ref:`Cluster outlier detection ` // documentation for details. @@ -42,7 +43,7 @@ enum OutlierEjectionType { // Consecutive local origin failures: Connection failures, resets, timeouts, etc // This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is set to *true*. // See :ref:`Cluster outlier detection ` documentation for CONSECUTIVE_LOCAL_ORIGIN_FAILURE = 3; @@ -50,7 +51,7 @@ enum OutlierEjectionType { // Runs over aggregated success rate statistics for local origin failures // for all hosts in the cluster and selects hosts for which success rate deviates from other // hosts in the cluster. This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is set to *true*. // See :ref:`Cluster outlier detection ` documentation for SUCCESS_RATE_LOCAL_ORIGIN = 4; @@ -87,7 +88,7 @@ message OutlierDetectionEvent { // The time in seconds since the last action (either an ejection or unejection) took place. google.protobuf.UInt64Value secs_since_last_action = 3; - // The :ref:`cluster ` that owns the ejected host. + // The :ref:`cluster ` that owns the ejected host. string cluster_name = 4 [(validate.rules).string = {min_len: 1}]; // The URL of the ejected host. E.g., ``tcp://1.2.3.4:80``. diff --git a/api/envoy/data/core/v2alpha/health_check_event.proto b/api/envoy/data/core/v2alpha/health_check_event.proto index 00fd69fd42..ac6155f526 100644 --- a/api/envoy/data/core/v2alpha/health_check_event.proto +++ b/api/envoy/data/core/v2alpha/health_check_event.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.core.v2alpha"; option java_outer_classname = "HealthCheckEventProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/core/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Health check logging events] diff --git a/api/envoy/data/core/v3/health_check_event.proto b/api/envoy/data/core/v3/health_check_event.proto index 2b0f9d888f..63f7beb0c4 100644 --- a/api/envoy/data/core/v3/health_check_event.proto +++ b/api/envoy/data/core/v3/health_check_event.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.core.v3"; option java_outer_classname = "HealthCheckEventProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/core/v3;corev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Health check logging events] @@ -22,6 +23,7 @@ enum HealthCheckFailureType { ACTIVE = 0; PASSIVE = 1; NETWORK = 2; + NETWORK_TIMEOUT = 3; } enum HealthCheckerType { @@ -78,7 +80,7 @@ message HealthCheckAddHealthy { "envoy.data.core.v2alpha.HealthCheckAddHealthy"; // Whether this addition is the result of the first ever health check on a host, in which case - // the configured :ref:`healthy threshold ` + // the configured :ref:`healthy threshold ` // is bypassed and the host is immediately added. bool first_check = 1; } diff --git a/api/envoy/data/dns/v2alpha/dns_table.proto b/api/envoy/data/dns/v2alpha/dns_table.proto index 7a9e535c4f..0b8c43d624 100644 --- a/api/envoy/data/dns/v2alpha/dns_table.proto +++ b/api/envoy/data/dns/v2alpha/dns_table.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.dns.v2alpha"; option java_outer_classname = "DnsTableProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/dns/v2alpha"; option (udpa.annotations.file_status).work_in_progress = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/data/dns/v3/dns_table.proto b/api/envoy/data/dns/v3/dns_table.proto index 4398403b7e..1816a30440 100644 --- a/api/envoy/data/dns/v3/dns_table.proto +++ b/api/envoy/data/dns/v3/dns_table.proto @@ -6,6 +6,7 @@ import "envoy/type/matcher/v3/string.proto"; import "google/protobuf/duration.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -13,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.dns.v3"; option java_outer_classname = "DnsTableProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/dns/v3;dnsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: DNS Filter Table Data] @@ -143,8 +145,13 @@ message DnsTable { // list empty, Envoy will forward all queries to external resolvers repeated DnsVirtualDomain virtual_domains = 2; + // This field is deprecated and no longer used in Envoy. The filter's behavior has changed + // internally to use a different data structure allowing the filter to determine whether a + // query is for known domain without the use of this field. + // // This field serves to help Envoy determine whether it can authoritatively answer a query // for a name matching a suffix in this list. If the query name does not match a suffix in // this list, Envoy will forward the query to an upstream DNS server - repeated type.matcher.v3.StringMatcher known_suffixes = 3; + repeated type.matcher.v3.StringMatcher known_suffixes = 3 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; } diff --git a/api/envoy/data/dns/v4alpha/dns_table.proto b/api/envoy/data/dns/v4alpha/dns_table.proto deleted file mode 100644 index f142cfa7bf..0000000000 --- a/api/envoy/data/dns/v4alpha/dns_table.proto +++ /dev/null @@ -1,162 +0,0 @@ -syntax = "proto3"; - -package envoy.data.dns.v4alpha; - -import "envoy/type/matcher/v4alpha/string.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.dns.v4alpha"; -option java_outer_classname = "DnsTableProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: DNS Filter Table Data] -// :ref:`DNS Filter config overview `. - -// This message contains the configuration for the DNS Filter if populated -// from the control plane -message DnsTable { - option (udpa.annotations.versioning).previous_message_type = "envoy.data.dns.v3.DnsTable"; - - // This message contains a list of IP addresses returned for a query for a known name - message AddressList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v3.DnsTable.AddressList"; - - // This field contains a well formed IP address that is returned in the answer for a - // name query. The address field can be an IPv4 or IPv6 address. Address family - // detection is done automatically when Envoy parses the string. Since this field is - // repeated, Envoy will return as many entries from this list in the DNS response while - // keeping the response under 512 bytes - repeated string address = 1 [(validate.rules).repeated = { - min_items: 1 - items {string {min_len: 3}} - }]; - } - - // Specify the service protocol using a numeric or string value - message DnsServiceProtocol { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v3.DnsTable.DnsServiceProtocol"; - - oneof protocol_config { - option (validate.required) = true; - - // Specify the protocol number for the service. Envoy will try to resolve the number to - // the protocol name. For example, 6 will resolve to "tcp". Refer to: - // https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml - // for protocol names and numbers - uint32 number = 1 [(validate.rules).uint32 = {lt: 255}]; - - // Specify the protocol name for the service. - string name = 2 [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - } - } - - // Specify the target for a given DNS service - // [#next-free-field: 6] - message DnsServiceTarget { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v3.DnsTable.DnsServiceTarget"; - - // Specify the name of the endpoint for the Service. The name is a hostname or a cluster - oneof endpoint_type { - option (validate.required) = true; - - // Use a resolvable hostname as the endpoint for a service. - string host_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - - // Use a cluster name as the endpoint for a service. - string cluster_name = 2 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - } - - // The priority of the service record target - uint32 priority = 3 [(validate.rules).uint32 = {lt: 65536}]; - - // The weight of the service record target - uint32 weight = 4 [(validate.rules).uint32 = {lt: 65536}]; - - // The port to which the service is bound. This value is optional if the target is a - // cluster. Setting port to zero in this case makes the filter use the port value - // from the cluster host - uint32 port = 5 [(validate.rules).uint32 = {lt: 65536}]; - } - - // This message defines a service selection record returned for a service query in a domain - message DnsService { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v3.DnsTable.DnsService"; - - // The name of the service without the protocol or domain name - string service_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - - // The service protocol. This can be specified as a string or the numeric value of the protocol - DnsServiceProtocol protocol = 2; - - // The service entry time to live. This is independent from the DNS Answer record TTL - google.protobuf.Duration ttl = 3 [(validate.rules).duration = {gte {seconds: 1}}]; - - // The list of targets hosting the service - repeated DnsServiceTarget targets = 4 [(validate.rules).repeated = {min_items: 1}]; - } - - // Define a list of service records for a given service - message DnsServiceList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v3.DnsTable.DnsServiceList"; - - repeated DnsService services = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - message DnsEndpoint { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v3.DnsTable.DnsEndpoint"; - - oneof endpoint_config { - option (validate.required) = true; - - // Define a list of addresses to return for the specified endpoint - AddressList address_list = 1; - - // Define a cluster whose addresses are returned for the specified endpoint - string cluster_name = 2; - - // Define a DNS Service List for the specified endpoint - DnsServiceList service_list = 3; - } - } - - message DnsVirtualDomain { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v3.DnsTable.DnsVirtualDomain"; - - // A domain name for which Envoy will respond to query requests - string name = 1 [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - - // The configuration containing the method to determine the address of this endpoint - DnsEndpoint endpoint = 2; - - // Sets the TTL in DNS answers from Envoy returned to the client. The default TTL is 300s - google.protobuf.Duration answer_ttl = 3 [(validate.rules).duration = {gte {seconds: 30}}]; - } - - // Control how many times Envoy makes an attempt to forward a query to an external DNS server - uint32 external_retry_count = 1 [(validate.rules).uint32 = {lte: 3}]; - - // Fully qualified domain names for which Envoy will respond to DNS queries. By leaving this - // list empty, Envoy will forward all queries to external resolvers - repeated DnsVirtualDomain virtual_domains = 2; - - // This field serves to help Envoy determine whether it can authoritatively answer a query - // for a name matching a suffix in this list. If the query name does not match a suffix in - // this list, Envoy will forward the query to an upstream DNS server - repeated type.matcher.v4alpha.StringMatcher known_suffixes = 3; -} diff --git a/api/envoy/data/tap/v2alpha/common.proto b/api/envoy/data/tap/v2alpha/common.proto index 7c02aa7719..fb07bce115 100644 --- a/api/envoy/data/tap/v2alpha/common.proto +++ b/api/envoy/data/tap/v2alpha/common.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Tap common data] diff --git a/api/envoy/data/tap/v2alpha/http.proto b/api/envoy/data/tap/v2alpha/http.proto index 60ea68b66d..7cb10ff350 100644 --- a/api/envoy/data/tap/v2alpha/http.proto +++ b/api/envoy/data/tap/v2alpha/http.proto @@ -10,6 +10,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; option java_outer_classname = "HttpProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: HTTP tap data] diff --git a/api/envoy/data/tap/v2alpha/transport.proto b/api/envoy/data/tap/v2alpha/transport.proto index 82c2845ee3..0be758ded9 100644 --- a/api/envoy/data/tap/v2alpha/transport.proto +++ b/api/envoy/data/tap/v2alpha/transport.proto @@ -12,6 +12,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; option java_outer_classname = "TransportProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Transport tap data] diff --git a/api/envoy/data/tap/v2alpha/wrapper.proto b/api/envoy/data/tap/v2alpha/wrapper.proto index 769b95c616..5cc3e07320 100644 --- a/api/envoy/data/tap/v2alpha/wrapper.proto +++ b/api/envoy/data/tap/v2alpha/wrapper.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; option java_outer_classname = "WrapperProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Tap data wrappers] diff --git a/api/envoy/data/tap/v3/common.proto b/api/envoy/data/tap/v3/common.proto index 861da12e20..8e0a28361e 100644 --- a/api/envoy/data/tap/v3/common.proto +++ b/api/envoy/data/tap/v3/common.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v3"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Tap common data] @@ -23,15 +24,15 @@ message Body { bytes as_bytes = 1; // Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING - // ` sink + // ` sink // format type is selected. See the documentation for that option for why this is useful. string as_string = 2; } // Specifies whether body data has been truncated to fit within the specified // :ref:`max_buffered_rx_bytes - // ` and + // ` and // :ref:`max_buffered_tx_bytes - // ` settings. + // ` settings. bool truncated = 3; } diff --git a/api/envoy/data/tap/v3/http.proto b/api/envoy/data/tap/v3/http.proto index d4f05fa095..2bfa9206f8 100644 --- a/api/envoy/data/tap/v3/http.proto +++ b/api/envoy/data/tap/v3/http.proto @@ -11,6 +11,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v3"; option java_outer_classname = "HttpProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP tap data] diff --git a/api/envoy/data/tap/v3/transport.proto b/api/envoy/data/tap/v3/transport.proto index f596759cb4..efd2d4168e 100644 --- a/api/envoy/data/tap/v3/transport.proto +++ b/api/envoy/data/tap/v3/transport.proto @@ -13,6 +13,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v3"; option java_outer_classname = "TransportProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Transport tap data] @@ -95,11 +96,11 @@ message SocketBufferedTrace { repeated SocketEvent events = 3; // Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes - // ` setting. + // ` setting. bool read_truncated = 4; // Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes - // ` setting. + // ` setting. bool write_truncated = 5; } diff --git a/api/envoy/data/tap/v3/wrapper.proto b/api/envoy/data/tap/v3/wrapper.proto index 636547614c..983b350b08 100644 --- a/api/envoy/data/tap/v3/wrapper.proto +++ b/api/envoy/data/tap/v3/wrapper.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.data.tap.v3"; option java_outer_classname = "WrapperProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Tap data wrappers] diff --git a/api/envoy/extensions/access_loggers/file/v3/file.proto b/api/envoy/extensions/access_loggers/file/v3/file.proto index f17a2e7f4c..7badb8f180 100644 --- a/api/envoy/extensions/access_loggers/file/v3/file.proto +++ b/api/envoy/extensions/access_loggers/file/v3/file.proto @@ -6,6 +6,7 @@ import "envoy/config/core/v3/substitution_format_string.proto"; import "google/protobuf/struct.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -13,12 +14,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.access_loggers.file.v3"; option java_outer_classname = "FileProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/file/v3;filev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: File access log] // [#extension: envoy.access_loggers.file] -// Custom configuration for an :ref:`AccessLog ` +// Custom configuration for an :ref:`AccessLog ` // that writes log entries directly to a file. Configures the built-in *envoy.access_loggers.file* // AccessLog. // [#next-free-field: 6] @@ -35,13 +37,14 @@ message FileAccessLog { // :ref:`default format `. // This field is deprecated. // Please use :ref:`log_format `. - string format = 2 [deprecated = true]; + string format = 2 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Access log :ref:`format dictionary`. All values // are rendered as strings. // This field is deprecated. // Please use :ref:`log_format `. - google.protobuf.Struct json_format = 3 [deprecated = true]; + google.protobuf.Struct json_format = 3 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Access log :ref:`format dictionary`. Values are // rendered as strings, numbers, or boolean values as appropriate. Nested JSON objects may @@ -49,7 +52,8 @@ message FileAccessLog { // documentation for a specific command operator for details. // This field is deprecated. // Please use :ref:`log_format `. - google.protobuf.Struct typed_json_format = 4 [deprecated = true]; + google.protobuf.Struct typed_json_format = 4 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Configuration to form access log data and format. // If not specified, use :ref:`default format `. diff --git a/api/envoy/extensions/access_loggers/file/v4alpha/file.proto b/api/envoy/extensions/access_loggers/file/v4alpha/file.proto deleted file mode 100644 index 03d138585d..0000000000 --- a/api/envoy/extensions/access_loggers/file/v4alpha/file.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.file.v4alpha; - -import "envoy/config/core/v4alpha/substitution_format_string.proto"; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.file.v4alpha"; -option java_outer_classname = "FileProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: File access log] -// [#extension: envoy.access_loggers.file] - -// Custom configuration for an :ref:`AccessLog ` -// that writes log entries directly to a file. Configures the built-in *envoy.access_loggers.file* -// AccessLog. -// [#next-free-field: 6] -message FileAccessLog { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.access_loggers.file.v3.FileAccessLog"; - - reserved 2, 3, 4; - - reserved "format", "json_format", "typed_json_format"; - - // A path to a local file to which to write the access log entries. - string path = 1 [(validate.rules).string = {min_len: 1}]; - - oneof access_log_format { - // Configuration to form access log data and format. - // If not specified, use :ref:`default format `. - config.core.v4alpha.SubstitutionFormatString log_format = 5 - [(validate.rules).message = {required: true}]; - } -} diff --git a/api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto b/api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto new file mode 100644 index 0000000000..fc0b8e2e48 --- /dev/null +++ b/api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package envoy.extensions.access_loggers.filters.cel.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.access_loggers.filters.cel.v3"; +option java_outer_classname = "CelProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/filters/cel/v3;celv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: ExpressionFilter] +// [#extension: envoy.access_loggers.extension_filters.cel] + +// ExpressionFilter is an access logging filter that evaluates configured +// symbolic Common Expression Language expressions to inform the decision +// to generate an access log. +message ExpressionFilter { + // Expression that, when evaluated, will be used to filter access logs. + // Expressions are based on the set of Envoy :ref:`attributes `. + // The provided expression must evaluate to true for logging (expression errors are considered false). + // Examples: + // - `response.code >= 400` + // - `(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')` + string expression = 1; +} diff --git a/api/envoy/extensions/access_loggers/grpc/v3/als.proto b/api/envoy/extensions/access_loggers/grpc/v3/als.proto index 968dfbeec0..2a7d37994f 100644 --- a/api/envoy/extensions/access_loggers/grpc/v3/als.proto +++ b/api/envoy/extensions/access_loggers/grpc/v3/als.proto @@ -2,8 +2,10 @@ syntax = "proto3"; package envoy.extensions.access_loggers.grpc.v3; +import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/config_source.proto"; import "envoy/config/core/v3/grpc_service.proto"; +import "envoy/type/tracing/v3/custom_tag.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; @@ -15,14 +17,15 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.access_loggers.grpc.v3"; option java_outer_classname = "AlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/grpc/v3;grpcv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC Access Log Service (ALS)] // Configuration for the built-in *envoy.access_loggers.http_grpc* -// :ref:`AccessLog `. This configuration will +// :ref:`AccessLog `. This configuration will // populate :ref:`StreamAccessLogsMessage.http_logs -// `. +// `. // [#extension: envoy.access_loggers.http_grpc] message HttpGrpcAccessLogConfig { option (udpa.annotations.versioning).previous_message_type = @@ -31,15 +34,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -54,13 +57,13 @@ message TcpGrpcAccessLogConfig { } // Common configuration for gRPC access logs. -// [#next-free-field: 7] +// [#next-free-field: 9] message CommonGrpcAccessLogConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.accesslog.v2.CommonGrpcAccessLogConfig"; // The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier - // `. This allows the + // `. This allows the // access log server to differentiate between different access logs coming from the same Envoy. string log_name = 1 [(validate.rules).string = {min_len: 1}]; @@ -83,7 +86,19 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; + + // Sets the retry policy when the establishment of a gRPC stream fails. + // If the stream succeeds once in establishing If the stream succeeds + // at least once in establishing itself, no retry will be performed + // no matter what gRPC status is received. Note that only + // :ref:`num_retries ` + // will be used in this configuration. This feature is used only when you are using + // :ref:`Envoy gRPC client `. + config.core.v3.RetryPolicy grpc_stream_retry_policy = 7; + + // A list of custom tags with unique tag name to create tags for the logs. + repeated type.tracing.v3.CustomTag custom_tags = 8; } diff --git a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto deleted file mode 100644 index c7bf15948b..0000000000 --- a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ /dev/null @@ -1,89 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.grpc.v4alpha; - -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.grpc.v4alpha"; -option java_outer_classname = "AlsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC Access Log Service (ALS)] - -// Configuration for the built-in *envoy.access_loggers.http_grpc* -// :ref:`AccessLog `. This configuration will -// populate :ref:`StreamAccessLogsMessage.http_logs -// `. -// [#extension: envoy.access_loggers.http_grpc] -message HttpGrpcAccessLogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.access_loggers.grpc.v3.HttpGrpcAccessLogConfig"; - - CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; - - // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. - repeated string additional_request_headers_to_log = 2; - - // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. - repeated string additional_response_headers_to_log = 3; - - // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. - repeated string additional_response_trailers_to_log = 4; -} - -// Configuration for the built-in *envoy.access_loggers.tcp_grpc* type. This configuration will -// populate *StreamAccessLogsMessage.tcp_logs*. -// [#extension: envoy.access_loggers.tcp_grpc] -message TcpGrpcAccessLogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.access_loggers.grpc.v3.TcpGrpcAccessLogConfig"; - - CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; -} - -// Common configuration for gRPC access logs. -// [#next-free-field: 7] -message CommonGrpcAccessLogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig"; - - // The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier - // `. This allows the - // access log server to differentiate between different access logs coming from the same Envoy. - string log_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The gRPC service for the access log service. - config.core.v4alpha.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; - - // API version for access logs service transport protocol. This describes the access logs service - // gRPC endpoint and version of messages used on the wire. - config.core.v4alpha.ApiVersion transport_api_version = 6 - [(validate.rules).enum = {defined_only: true}]; - - // Interval for flushing access logs to the gRPC stream. Logger will flush requests every time - // this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to - // 1 second. - google.protobuf.Duration buffer_flush_interval = 3 [(validate.rules).duration = {gt {}}]; - - // Soft size limit in bytes for access log entries buffer. Logger will buffer requests until - // this limit it hit, or every time flush interval is elapsed, whichever comes first. Setting it - // to zero effectively disables the batching. Defaults to 16384. - google.protobuf.UInt32Value buffer_size_bytes = 4; - - // Additional filter state objects to log in :ref:`filter_state_objects - // `. - // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. - repeated string filter_state_objects_to_log = 5; -} diff --git a/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto b/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto new file mode 100644 index 0000000000..5dd9d1e1a3 --- /dev/null +++ b/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package envoy.extensions.access_loggers.open_telemetry.v3; + +import "envoy/extensions/access_loggers/grpc/v3/als.proto"; + +import "opentelemetry/proto/common/v1/common.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.access_loggers.open_telemetry.v3"; +option java_outer_classname = "LogsServiceProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/open_telemetry/v3;open_telemetryv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: OpenTelemetry (gRPC) Access Log] + +// Configuration for the built-in *envoy.access_loggers.open_telemetry* +// :ref:`AccessLog `. This configuration will +// populate `opentelemetry.proto.collector.v1.logs.ExportLogsServiceRequest.resource_logs `_. +// OpenTelemetry `Resource `_ +// attributes are filled with Envoy node info. In addition, the request start time is set in the +// dedicated field. +// [#extension: envoy.access_loggers.open_telemetry] +// [#comment:TODO(itamarkam): allow configuration for resource attributes.] +message OpenTelemetryAccessLogConfig { + // [#comment:TODO(itamarkam): add 'filter_state_objects_to_log' to logs.] + grpc.v3.CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; + + // OpenTelemetry `LogResource `_ + // fields, following `Envoy access logging formatting `_. + // + // See 'body' in the LogResource proto for more details. + // Example: ``body { string_value: "%PROTOCOL%" }``. + opentelemetry.proto.common.v1.AnyValue body = 2; + + // See 'attributes' in the LogResource proto for more details. + // Example: ``attributes { values { key: "user_agent" value { string_value: "%REQ(USER-AGENT)%" } } }``. + opentelemetry.proto.common.v1.KeyValueList attributes = 3; +} diff --git a/api/envoy/extensions/access_loggers/stream/v3/stream.proto b/api/envoy/extensions/access_loggers/stream/v3/stream.proto new file mode 100644 index 0000000000..2dc319d06e --- /dev/null +++ b/api/envoy/extensions/access_loggers/stream/v3/stream.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package envoy.extensions.access_loggers.stream.v3; + +import "envoy/config/core/v3/substitution_format_string.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.access_loggers.stream.v3"; +option java_outer_classname = "StreamProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/stream/v3;streamv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Standard Streams Access loggers] +// [#extension: envoy.access_loggers.stream] + +// Custom configuration for an :ref:`AccessLog ` +// that writes log entries directly to the operating system's standard output. +message StdoutAccessLog { + oneof access_log_format { + // Configuration to form access log data and format. + // If not specified, use :ref:`default format `. + config.core.v3.SubstitutionFormatString log_format = 1 + [(validate.rules).message = {required: true}]; + } +} + +// Custom configuration for an :ref:`AccessLog ` +// that writes log entries directly to the operating system's standard error. +message StderrAccessLog { + oneof access_log_format { + // Configuration to form access log data and format. + // If not specified, use :ref:`default format `. + config.core.v3.SubstitutionFormatString log_format = 1 + [(validate.rules).message = {required: true}]; + } +} diff --git a/api/envoy/extensions/access_loggers/wasm/v3/wasm.proto b/api/envoy/extensions/access_loggers/wasm/v3/wasm.proto index 413743a203..a0ed0ee28f 100644 --- a/api/envoy/extensions/access_loggers/wasm/v3/wasm.proto +++ b/api/envoy/extensions/access_loggers/wasm/v3/wasm.proto @@ -5,17 +5,17 @@ package envoy.extensions.access_loggers.wasm.v3; import "envoy/extensions/wasm/v3/wasm.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.access_loggers.wasm.v3"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/wasm/v3;wasmv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Wasm access log] // [#extension: envoy.access_loggers.wasm] -// Custom configuration for an :ref:`AccessLog ` +// Custom configuration for an :ref:`AccessLog ` // that calls into a WASM VM. Configures the built-in *envoy.access_loggers.wasm* // AccessLog. message WasmAccessLog { diff --git a/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto b/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto new file mode 100644 index 0000000000..774a36e9e5 --- /dev/null +++ b/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package envoy.extensions.bootstrap.internal_listener.v3; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.bootstrap.internal_listener.v3"; +option java_outer_classname = "InternalListenerProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/bootstrap/internal_listener/v3;internal_listenerv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; + +// [#protodoc-title: Internal Listener] +// Internal Listener :ref:`overview `. +// [#extension: envoy.bootstrap.internal_listener] + +// Configuration for internal listener. +message InternalListener { +} diff --git a/api/envoy/extensions/cache/simple_http_cache/v3/config.proto b/api/envoy/extensions/cache/simple_http_cache/v3/config.proto new file mode 100644 index 0000000000..f698e522e8 --- /dev/null +++ b/api/envoy/extensions/cache/simple_http_cache/v3/config.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package envoy.extensions.cache.simple_http_cache.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.cache.simple_http_cache.v3"; +option java_outer_classname = "ConfigProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/cache/simple_http_cache/v3;simple_http_cachev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: SimpleHttpCache CacheFilter storage plugin] + +// [#extension: envoy.cache.simple_http_cache] +message SimpleHttpCacheConfig { +} diff --git a/api/envoy/extensions/clusters/aggregate/v3/cluster.proto b/api/envoy/extensions/clusters/aggregate/v3/cluster.proto index aead1c4517..4f44ac9cd5 100644 --- a/api/envoy/extensions/clusters/aggregate/v3/cluster.proto +++ b/api/envoy/extensions/clusters/aggregate/v3/cluster.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.clusters.aggregate.v3"; option java_outer_classname = "ClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/aggregate/v3;aggregatev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Aggregate cluster configuration] diff --git a/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto b/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto index 869e8c42ca..a572c0c462 100644 --- a/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto +++ b/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.clusters.dynamic_forward_proxy.v3"; option java_outer_classname = "ClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/dynamic_forward_proxy/v3;dynamic_forward_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Dynamic forward proxy cluster configuration] @@ -24,12 +25,34 @@ message ClusterConfig { // The DNS cache configuration that the cluster will attach to. Note this configuration must // match that of associated :ref:`dynamic forward proxy HTTP filter configuration - // `. + // `. common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1 [(validate.rules).message = {required: true}]; // If true allow the cluster configuration to disable the auto_sni and auto_san_validation options // in the :ref:`cluster's upstream_http_protocol_options - // ` + // ` bool allow_insecure_cluster_options = 2; + + // [#not-implemented-hide:] + // If true allow HTTP/2 and HTTP/3 connections to be reused for requests to different + // origins than the connection was initially created for. This will only happen when the + // resolved address for the new connection matches the peer address of the connection and + // the TLS certificate is also valid for the new hostname. For example, if a connection + // has previously been established to foo.example.com at IP 1.2.3.4 with a certificate + // that is valid for `*.example.com`, then this connection could be used for requests to + // bar.example.com if that also resolved to 1.2.3.4. + // + // .. note:: + // By design, this feature will maximize reuse of connections. This means that instead + // opening a new connection when an existing connection reaches the maximum number of + // concurrent streams, requests will instead be sent to the existing connection. + // TODO(alyssawilk) implement request queueing in connections. + // + // .. note:: + // The coalesced connections might be to upstreams that would not be otherwise + // selected by Envoy. See the section `Connection Reuse in RFC 7540 + // `_ + // + bool allow_coalesced_connections = 3; } diff --git a/api/envoy/extensions/clusters/redis/v3/redis_cluster.proto b/api/envoy/extensions/clusters/redis/v3/redis_cluster.proto index afc19777ed..88e4e89c4e 100644 --- a/api/envoy/extensions/clusters/redis/v3/redis_cluster.proto +++ b/api/envoy/extensions/clusters/redis/v3/redis_cluster.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.clusters.redis.v3"; option java_outer_classname = "RedisClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/redis/v3;redisv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Redis Cluster Configuration] @@ -27,7 +28,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // updated at user-configured intervals. // // Additionally, if -// :ref:`enable_redirection` +// :ref:`enable_redirection` // is true, then moved and ask redirection errors from upstream servers will trigger a topology // refresh when they exceed a user-configured error threshold. // diff --git a/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto b/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto index 5579cc16bd..3d86b5a85a 100644 --- a/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto +++ b/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto @@ -3,10 +3,15 @@ syntax = "proto3"; package envoy.extensions.common.dynamic_forward_proxy.v3; import "envoy/config/cluster/v3/cluster.proto"; +import "envoy/config/common/key_value/v3/config.proto"; +import "envoy/config/core/v3/address.proto"; +import "envoy/config/core/v3/extension.proto"; +import "envoy/config/core/v3/resolver.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -14,6 +19,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.common.dynamic_forward_proxy.v3"; option java_outer_classname = "DnsCacheProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/dynamic_forward_proxy/v3;dynamic_forward_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Dynamic forward proxy common configuration] @@ -27,7 +33,7 @@ message DnsCacheCircuitBreakers { // Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview // ` for more information. -// [#next-free-field: 9] +// [#next-free-field: 15] message DnsCacheConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig"; @@ -50,19 +56,21 @@ message DnsCacheConfig { config.cluster.v3.Cluster.DnsLookupFamily dns_lookup_family = 2 [(validate.rules).enum = {defined_only: true}]; - // The DNS refresh rate for currently cached DNS hosts. If not specified defaults to 60s. - // - // .. note: - // - // The returned DNS TTL is not currently used to alter the refresh rate. This feature will be - // added in a future change. - // - // .. note: + // The DNS refresh rate for unresolved DNS hosts. If not specified defaults to 60s. // // The refresh rate is rounded to the closest millisecond, and must be at least 1ms. + // + // Once a host has been resolved, the refresh rate will be the DNS TTL, capped + // at a minimum of `dns_min_refresh_rate`. google.protobuf.Duration dns_refresh_rate = 3 [(validate.rules).duration = {gte {nanos: 1000000}}]; + // The minimum rate that DNS resolution will occur. Per `dns_refresh_rate`, once a host is + // resolved, the DNS TTL will be used, with a minimum set by `dns_min_refresh_rate`. + // `dns_min_refresh_rate` defaults to 5s and must also be >= 5s. + google.protobuf.Duration dns_min_refresh_rate = 14 + [(validate.rules).duration = {gte {seconds: 5}}]; + // The TTL for hosts that are unused. Hosts that have not been used in the configured time // interval will be purged. If not specified defaults to 5m. // @@ -92,14 +100,46 @@ message DnsCacheConfig { config.cluster.v3.Cluster.RefreshRate dns_failure_refresh_rate = 6; // The config of circuit breakers for resolver. It provides a configurable threshold. - // If `envoy.reloadable_features.enable_dns_cache_circuit_breakers` is enabled, - // envoy will use dns cache circuit breakers with default settings even if this value is not set. + // Envoy will use dns cache circuit breakers with default settings even if this value is not set. DnsCacheCircuitBreakers dns_cache_circuit_breaker = 7; - // [#next-major-version: Reconcile DNS options in a single message.] // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - bool use_tcp_for_dns_lookups = 8; + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + bool use_tcp_for_dns_lookups = 8 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + config.core.v3.DnsResolutionConfig dns_resolution_config = 9 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + config.core.v3.TypedExtensionConfig typed_dns_resolver_config = 12; + + // Hostnames that should be preresolved into the cache upon creation. This might provide a + // performance improvement, in the form of cache hits, for hostnames that are going to be + // resolved during steady state and are known at config load time. + repeated config.core.v3.SocketAddress preresolve_hostnames = 10; + + // The timeout used for DNS queries. This timeout is independent of any timeout and retry policy + // used by the underlying DNS implementation (e.g., c-areas and Apple DNS) which are opaque. + // Setting this timeout will ensure that queries succeed or fail within the specified time frame + // and are then retried using the standard refresh rates. Defaults to 5s if not set. + google.protobuf.Duration dns_query_timeout = 11 [(validate.rules).duration = {gt {}}]; + + // [#not-implemented-hide:] + // Configuration to flush the DNS cache to long term storage. + config.common.key_value.v3.KeyValueStoreConfig key_value_config = 13; } diff --git a/api/envoy/extensions/common/matching/v3/extension_matcher.proto b/api/envoy/extensions/common/matching/v3/extension_matcher.proto index 47a065be64..010adc5284 100644 --- a/api/envoy/extensions/common/matching/v3/extension_matcher.proto +++ b/api/envoy/extensions/common/matching/v3/extension_matcher.proto @@ -5,13 +5,17 @@ package envoy.extensions.common.matching.v3; import "envoy/config/common/matcher/v3/matcher.proto"; import "envoy/config/core/v3/extension.proto"; -import "udpa/annotations/migrate.proto"; +import "xds/annotations/v3/status.proto"; +import "xds/type/matcher/v3/matcher.proto"; + +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.common.matching.v3"; option java_outer_classname = "ExtensionMatcherProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/matching/v3;matchingv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Extension Matcher] @@ -20,8 +24,14 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // decorating an existing extension with a matcher, which can be used to match against // relevant protocol data. message ExtensionWithMatcher { + option (xds.annotations.v3.message_status).work_in_progress = true; + + // The associated matcher. This is deprecated in favor of xds_matcher. + config.common.matcher.v3.Matcher matcher = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + // The associated matcher. - config.common.matcher.v3.Matcher matcher = 1 [(validate.rules).message = {required: true}]; + xds.type.matcher.v3.Matcher xds_matcher = 3; // The underlying extension config. config.core.v3.TypedExtensionConfig extension_config = 2 diff --git a/api/envoy/extensions/common/matching/v4alpha/extension_matcher.proto b/api/envoy/extensions/common/matching/v4alpha/extension_matcher.proto deleted file mode 100644 index bb71cc5a09..0000000000 --- a/api/envoy/extensions/common/matching/v4alpha/extension_matcher.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.matching.v4alpha; - -import "envoy/config/common/matcher/v4alpha/matcher.proto"; -import "envoy/config/core/v4alpha/extension.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.matching.v4alpha"; -option java_outer_classname = "ExtensionMatcherProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Extension Matcher] - -// Wrapper around an existing extension that provides an associated matcher. This allows -// decorating an existing extension with a matcher, which can be used to match against -// relevant protocol data. -message ExtensionWithMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.common.matching.v3.ExtensionWithMatcher"; - - // The associated matcher. - config.common.matcher.v4alpha.Matcher matcher = 1 [(validate.rules).message = {required: true}]; - - // The underlying extension config. - config.core.v4alpha.TypedExtensionConfig extension_config = 2 - [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/extensions/common/ratelimit/v3/ratelimit.proto b/api/envoy/extensions/common/ratelimit/v3/ratelimit.proto index 30efa60262..594aec339a 100644 --- a/api/envoy/extensions/common/ratelimit/v3/ratelimit.proto +++ b/api/envoy/extensions/common/ratelimit/v3/ratelimit.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package envoy.extensions.common.ratelimit.v3; import "envoy/type/v3/ratelimit_unit.proto"; +import "envoy/type/v3/token_bucket.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -11,10 +12,28 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.common.ratelimit.v3"; option java_outer_classname = "RatelimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/ratelimit/v3;ratelimitv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common rate limit components] +// Defines the version of the standard to use for X-RateLimit headers. +enum XRateLimitHeadersRFCVersion { + // X-RateLimit headers disabled. + OFF = 0; + + // Use `draft RFC Version 03 `_ where 3 headers will be added: + // + // * ``X-RateLimit-Limit`` - indicates the request-quota associated to the + // client in the current time-window followed by the description of the + // quota policy. The value is returned by the maximum tokens of the token bucket. + // * ``X-RateLimit-Remaining`` - indicates the remaining requests in the + // current time-window. The value is returned by the remaining tokens in the token bucket. + // * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of + // the current time-window. The value is returned by the remaining fill interval of the token bucket. + DRAFT_VERSION_03 = 1; +} + // A RateLimitDescriptor is a list of hierarchical entries that are used by the service to // determine the final rate limit key and overall allowed limit. Here are some examples of how // they might be used for the domain "envoy". @@ -92,3 +111,11 @@ message RateLimitDescriptor { // Optional rate limit override to supply to the ratelimit service. RateLimitOverride limit = 2; } + +message LocalRateLimitDescriptor { + // Descriptor entries. + repeated v3.RateLimitDescriptor.Entry entries = 1 [(validate.rules).repeated = {min_items: 1}]; + + // Token Bucket algorithm for local ratelimiting. + type.v3.TokenBucket token_bucket = 2 [(validate.rules).message = {required: true}]; +} diff --git a/api/envoy/extensions/common/tap/v3/common.proto b/api/envoy/extensions/common/tap/v3/common.proto index 9c775a021e..d9f9e98cad 100644 --- a/api/envoy/extensions/common/tap/v3/common.proto +++ b/api/envoy/extensions/common/tap/v3/common.proto @@ -4,7 +4,6 @@ package envoy.extensions.common.tap.v3; import "envoy/config/tap/v3/common.proto"; -import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -12,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.common.tap.v3"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common tap extension configuration] diff --git a/api/envoy/extensions/common/tap/v4alpha/common.proto b/api/envoy/extensions/common/tap/v4alpha/common.proto deleted file mode 100644 index d04e033f49..0000000000 --- a/api/envoy/extensions/common/tap/v4alpha/common.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.tap.v4alpha; - -import "envoy/config/tap/v4alpha/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.tap.v4alpha"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Common tap extension configuration] - -// Common configuration for all tap extensions. -message CommonExtensionConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.common.tap.v3.CommonExtensionConfig"; - - oneof config_type { - option (validate.required) = true; - - // If specified, the tap filter will be configured via an admin handler. - AdminConfig admin_config = 1; - - // If specified, the tap filter will be configured via a static configuration that cannot be - // changed. - config.tap.v4alpha.TapConfig static_config = 2; - } -} - -// Configuration for the admin handler. See :ref:`here ` for -// more information. -message AdminConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.common.tap.v3.AdminConfig"; - - // Opaque configuration ID. When requests are made to the admin handler, the passed opaque ID is - // matched to the configured filter opaque ID to determine which filter to configure. - string config_id = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/api/envoy/extensions/compression/brotli/compressor/v3/brotli.proto b/api/envoy/extensions/compression/brotli/compressor/v3/brotli.proto new file mode 100644 index 0000000000..4f9644ac66 --- /dev/null +++ b/api/envoy/extensions/compression/brotli/compressor/v3/brotli.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; + +package envoy.extensions.compression.brotli.compressor.v3; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.compression.brotli.compressor.v3"; +option java_outer_classname = "BrotliProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/brotli/compressor/v3;compressorv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Brotli Compressor] +// [#extension: envoy.compression.brotli.compressor] + +// [#next-free-field: 7] +message Brotli { + enum EncoderMode { + DEFAULT = 0; + GENERIC = 1; + TEXT = 2; + FONT = 3; + } + + // Value from 0 to 11 that controls the main compression speed-density lever. + // The higher quality, the slower compression. The default value is 3. + google.protobuf.UInt32Value quality = 1 [(validate.rules).uint32 = {lte: 11}]; + + // A value used to tune encoder for specific input. For more information about modes, + // please refer to brotli manual: https://brotli.org/encode.html#aa6f + // This field will be set to "DEFAULT" if not specified. + EncoderMode encoder_mode = 2 [(validate.rules).enum = {defined_only: true}]; + + // Value from 10 to 24 that represents the base two logarithmic of the compressor's window size. + // Larger window results in better compression at the expense of memory usage. The default is 18. + // For more details about this parameter, please refer to brotli manual: + // https://brotli.org/encode.html#a9a8 + google.protobuf.UInt32Value window_bits = 3 [(validate.rules).uint32 = {lte: 24 gte: 10}]; + + // Value from 16 to 24 that represents the base two logarithmic of the compressor's input block + // size. Larger input block results in better compression at the expense of memory usage. The + // default is 24. For more details about this parameter, please refer to brotli manual: + // https://brotli.org/encode.html#a9a8 + google.protobuf.UInt32Value input_block_bits = 4 [(validate.rules).uint32 = {lte: 24 gte: 16}]; + + // Value for compressor's next output buffer. If not set, defaults to 4096. + google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; + + // If true, disables "literal context modeling" format feature. + // This flag is a "decoding-speed vs compression ratio" trade-off. + bool disable_literal_context_modeling = 6; +} diff --git a/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.proto b/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.proto new file mode 100644 index 0000000000..401c7802ab --- /dev/null +++ b/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package envoy.extensions.compression.brotli.decompressor.v3; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.compression.brotli.decompressor.v3"; +option java_outer_classname = "BrotliProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/brotli/decompressor/v3;decompressorv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Brotli Decompressor] +// [#extension: envoy.compression.brotli.decompressor] + +message Brotli { + // If true, disables "canny" ring buffer allocation strategy. + // Ring buffer is allocated according to window size, despite the real size of the content. + bool disable_ring_buffer_reallocation = 1; + + // Value for decompressor's next output buffer. If not set, defaults to 4096. + google.protobuf.UInt32Value chunk_size = 2 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; +} diff --git a/api/envoy/extensions/compression/gzip/compressor/v3/gzip.proto b/api/envoy/extensions/compression/gzip/compressor/v3/gzip.proto index d4d60eaa43..33816b8cd2 100644 --- a/api/envoy/extensions/compression/gzip/compressor/v3/gzip.proto +++ b/api/envoy/extensions/compression/gzip/compressor/v3/gzip.proto @@ -5,12 +5,12 @@ package envoy.extensions.compression.gzip.compressor.v3; import "google/protobuf/wrappers.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.compression.gzip.compressor.v3"; option java_outer_classname = "GzipProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/gzip/compressor/v3;compressorv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Gzip Compressor] diff --git a/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto b/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto index a0f4d8c173..82e50c2337 100644 --- a/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto +++ b/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto @@ -4,14 +4,13 @@ package envoy.extensions.compression.gzip.decompressor.v3; import "google/protobuf/wrappers.proto"; -import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.compression.gzip.decompressor.v3"; option java_outer_classname = "GzipProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/gzip/decompressor/v3;decompressorv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Gzip Decompressor] diff --git a/api/envoy/extensions/compression/zstd/compressor/v3/zstd.proto b/api/envoy/extensions/compression/zstd/compressor/v3/zstd.proto new file mode 100644 index 0000000000..407fd8d089 --- /dev/null +++ b/api/envoy/extensions/compression/zstd/compressor/v3/zstd.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; + +package envoy.extensions.compression.zstd.compressor.v3; + +import "envoy/config/core/v3/base.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.compression.zstd.compressor.v3"; +option java_outer_classname = "ZstdProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/zstd/compressor/v3;compressorv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Zstd Compressor] +// [#extension: envoy.compression.zstd.compressor] + +// [#next-free-field: 6] +message Zstd { + // Reference to http://facebook.github.io/zstd/zstd_manual.html + enum Strategy { + DEFAULT = 0; + FAST = 1; + DFAST = 2; + GREEDY = 3; + LAZY = 4; + LAZY2 = 5; + BTLAZY2 = 6; + BTOPT = 7; + BTULTRA = 8; + BTULTRA2 = 9; + } + + // Set compression parameters according to pre-defined compression level table. + // Note that exact compression parameters are dynamically determined, + // depending on both compression level and source content size (when known). + // Value 0 means default, and default level is 3. + // Setting a level does not automatically set all other compression parameters + // to default. Setting this will however eventually dynamically impact the compression + // parameters which have not been manually set. The manually set + // ones will 'stick'. + google.protobuf.UInt32Value compression_level = 1; + + // A 32-bits checksum of content is written at end of frame. If not set, defaults to false. + bool enable_checksum = 2; + + // The higher the value of selected strategy, the more complex it is, + // resulting in stronger and slower compression. + // Special: value 0 means "use default strategy". + Strategy strategy = 3 [(validate.rules).enum = {defined_only: true}]; + + // A dictionary for compression. Zstd offers dictionary compression, which greatly improves + // efficiency on small files and messages. Each dictionary will be generated with a dictionary ID + // that can be used to search the same dictionary during decompression. + // Please refer to `zstd manual `_ + // to train a specific dictionary for compression. + config.core.v3.DataSource dictionary = 4; + + // Value for compressor's next output buffer. If not set, defaults to 4096. + google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; +} diff --git a/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.proto b/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.proto new file mode 100644 index 0000000000..fc417bc390 --- /dev/null +++ b/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package envoy.extensions.compression.zstd.decompressor.v3; + +import "envoy/config/core/v3/base.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.compression.zstd.decompressor.v3"; +option java_outer_classname = "ZstdProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/zstd/decompressor/v3;decompressorv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Zstd Decompressor] +// [#extension: envoy.compression.zstd.decompressor] + +message Zstd { + // Dictionaries for decompression. Zstd offers dictionary compression, which greatly improves + // efficiency on small files and messages. It is necessary to ensure that the dictionary used for + // decompression is the same as the compression dictionary. Multiple dictionaries can be set, and the + // dictionary will be automatically selected for decompression according to the dictionary ID in the + // source content. + // Please refer to `zstd manual `_ + // to train specific dictionaries for decompression. + repeated config.core.v3.DataSource dictionaries = 1; + + // Value for decompressor's next output buffer. If not set, defaults to 4096. + google.protobuf.UInt32Value chunk_size = 2 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; +} diff --git a/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto b/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto new file mode 100644 index 0000000000..2a24d7a07e --- /dev/null +++ b/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package envoy.extensions.config.validators.minimum_clusters.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.config.validators.minimum_clusters.v3"; +option java_outer_classname = "MinimumClustersProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/config/validators/minimum_clusters/v3;minimum_clustersv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Minimum Clusters] +// [#extension: envoy.config.validators.minimum_clusters] + +// Validates a CDS config, and ensures that the number of clusters is above the +// set threshold. +message MinimumClustersValidator { + // The minimal clusters threshold. Any CDS config update leading to less than + // this number will be rejected. + // Default value is 0. + uint32 min_clusters_num = 1; +} diff --git a/api/envoy/extensions/filters/common/dependency/v3/dependency.proto b/api/envoy/extensions/filters/common/dependency/v3/dependency.proto new file mode 100644 index 0000000000..e1cda9885a --- /dev/null +++ b/api/envoy/extensions/filters/common/dependency/v3/dependency.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package envoy.extensions.filters.common.dependency.v3; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.common.dependency.v3"; +option java_outer_classname = "DependencyProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/common/dependency/v3;dependencyv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Filter dependency specification] + +// Dependency specification and string identifier. +message Dependency { + enum DependencyType { + HEADER = 0; + FILTER_STATE_KEY = 1; + DYNAMIC_METADATA = 2; + } + + // The kind of dependency. + DependencyType type = 1; + + // The string identifier for the dependency. + string name = 2 [(validate.rules).string = {min_len: 1}]; +} + +// Dependency specification for a filter. For a filter chain to be valid, any +// dependency that is required must be provided by an earlier filter. +message FilterDependencies { + // A list of dependencies required on the decode path. + repeated Dependency decode_required = 1; + + // A list of dependencies provided on the encode path. + repeated Dependency decode_provided = 2; + + // A list of dependencies required on the decode path. + repeated Dependency encode_required = 3; + + // A list of dependencies provided on the encode path. + repeated Dependency encode_provided = 4; +} + +// Matching requirements for a filter. For a match tree to be used with a filter, the match +// requirements must be satisfied. +// +// This protobuf is provided by the filter implementation as a way to communicate the matching +// requirements to the filter factories, allowing for config rejection if the requirements are +// not satisfied. +message MatchingRequirements { + message DataInputAllowList { + // An explicit list of data inputs that are allowed to be used with this filter. + repeated string type_url = 1; + } + + DataInputAllowList data_input_allow_list = 1; +} diff --git a/api/envoy/extensions/filters/common/fault/v3/fault.proto b/api/envoy/extensions/filters/common/fault/v3/fault.proto index dc4f2c34ef..ab24f5d237 100644 --- a/api/envoy/extensions/filters/common/fault/v3/fault.proto +++ b/api/envoy/extensions/filters/common/fault/v3/fault.proto @@ -6,7 +6,6 @@ import "envoy/type/v3/percent.proto"; import "google/protobuf/duration.proto"; -import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -14,12 +13,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.common.fault.v3"; option java_outer_classname = "FaultProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/common/fault/v3;faultv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common fault injection types] // Delay specification is used to inject latency into the -// HTTP/gRPC/Mongo/Redis operation or delay proxying of TCP connections. +// HTTP/Mongo operation. // [#next-free-field: 6] message FaultDelay { option (udpa.annotations.versioning).previous_message_type = @@ -47,10 +47,9 @@ message FaultDelay { // Add a fixed delay before forwarding the operation upstream. See // https://developers.google.com/protocol-buffers/docs/proto3#json for - // the JSON/YAML Duration mapping. For HTTP/Mongo/Redis, the specified - // delay will be injected before a new request/operation. For TCP - // connections, the proxying of the connection upstream will be delayed - // for the specified period. This is required if type is FIXED. + // the JSON/YAML Duration mapping. For HTTP/Mongo, the specified + // delay will be injected before a new request/operation. + // This is required if type is FIXED. google.protobuf.Duration fixed_delay = 3 [(validate.rules).duration = {gt {}}]; // Fault delays are controlled via an HTTP header (if applicable). diff --git a/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto b/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto index 7987969999..151c01791c 100644 --- a/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto +++ b/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto @@ -2,18 +2,24 @@ syntax = "proto3"; package envoy.extensions.filters.common.matcher.action.v3; -import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.common.matcher.action.v3"; option java_outer_classname = "SkipActionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/common/matcher/action/v3;actionv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common Match Actions] -// Indicates that the associated filter should be skipped. +// Configuration for the SkipFilter match action. When matching results in this action, the +// associated filter will be ignored for all filter callbacks (e.g. `encodeHeaders`, `encodeData`, +// etc. for HTTP filters) after the matcher arrives at the match, including the callback that +// caused the match result. For example, when used with a HTTP filter and the match result was +// resolved after receiving the HTTP response headers, the HTTP filter will *not* receive the +// response header callback. +// +// As a result, if this match action is resolved before the first filter callback (e.g. HTTP request +// headers), the filter will be completely skipped. message SkipFilter { } diff --git a/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto b/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto index c524e022e8..f242787899 100644 --- a/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto +++ b/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.adaptive_concurrency.v3"; option java_outer_classname = "AdaptiveConcurrencyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/adaptive_concurrency/v3;adaptive_concurrencyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Adaptive Concurrency] diff --git a/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.proto b/api/envoy/extensions/filters/http/admission_control/v3/admission_control.proto similarity index 85% rename from api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.proto rename to api/envoy/extensions/filters/http/admission_control/v3/admission_control.proto index c77d937620..83ccab791c 100644 --- a/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.proto +++ b/api/envoy/extensions/filters/http/admission_control/v3/admission_control.proto @@ -1,29 +1,25 @@ syntax = "proto3"; -package envoy.extensions.filters.http.admission_control.v3alpha; +package envoy.extensions.filters.http.admission_control.v3; import "envoy/config/core/v3/base.proto"; import "envoy/type/v3/range.proto"; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; -import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.http.admission_control.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.http.admission_control.v3"; option java_outer_classname = "AdmissionControlProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/admission_control/v3;admission_controlv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Admission Control] // [#extension: envoy.filters.http.admission_control] -// [#next-free-field: 6] +// [#next-free-field: 8] message AdmissionControl { // Default method of specifying what constitutes a successful request. All status codes that // indicate a successful request must be explicitly specified if not relying on the default @@ -95,4 +91,13 @@ message AdmissionControl { // below this threshold, rejection probability will increase. Any success rate above the threshold // results in a rejection probability of 0. Defaults to 95%. config.core.v3.RuntimePercent sr_threshold = 5; + + // If the average RPS of the sampling window is below this threshold, the request + // will not be rejected, even if the success rate is lower than sr_threshold. + // Defaults to 0. + config.core.v3.RuntimeUInt32 rps_threshold = 6; + + // The probability of rejection will never exceed this value, even if the failure rate is rising. + // Defaults to 80%. + config.core.v3.RuntimePercent max_rejection_probability = 7; } diff --git a/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto b/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto new file mode 100644 index 0000000000..241c4587bb --- /dev/null +++ b/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.alternate_protocols_cache.v3; + +import "envoy/config/core/v3/protocol.proto"; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.alternate_protocols_cache.v3"; +option java_outer_classname = "AlternateProtocolsCacheProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/alternate_protocols_cache/v3;alternate_protocols_cachev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Alternate Protocols Cache] + +// Configuration for the alternate protocols cache HTTP filter. +// [#extension: envoy.filters.http.alternate_protocols_cache] +message FilterConfig { + // If set, causes the use of the alternate protocols cache, which is responsible for + // parsing and caching HTTP Alt-Svc headers. This enables the use of HTTP/3 for upstream + // servers that advertise supporting it. + // TODO(RyanTheOptimist): Make this field required when HTTP/3 is enabled via auto_http. + config.core.v3.AlternateProtocolsCacheOptions alternate_protocols_cache_options = 1; +} diff --git a/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto b/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto index b4b9cc398f..5268550c0a 100644 --- a/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto +++ b/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.aws_lambda.v3"; option java_outer_classname = "AwsLambdaProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/aws_lambda/v3;aws_lambdav3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: AWS Lambda] diff --git a/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto b/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto index 6a516b4300..ba26a38824 100644 --- a/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto +++ b/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package envoy.extensions.filters.http.aws_request_signing.v3; +import "envoy/type/matcher/v3/string.proto"; + import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -9,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.aws_request_signing.v3"; option java_outer_classname = "AwsRequestSigningProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/aws_request_signing/v3;aws_request_signingv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: AwsRequestSigning] @@ -16,6 +19,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#extension: envoy.filters.http.aws_request_signing] // Top level configuration for the AWS request signing filter. +// [#next-free-field: 6] message AwsRequestSigning { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.aws_request_signing.v2alpha.AwsRequestSigning"; @@ -39,8 +43,24 @@ message AwsRequestSigning { // // Note: this rewrite affects both signing and host header forwarding. However, this // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the + // :ref:`HCM host rewrite ` given that the // value set here would be used for signing whereas the value set in the HCM would be used // for host header forwarding which is not the desired outcome. string host_rewrite = 3; + + // Instead of buffering the request to calculate the payload hash, use the literal string ``UNSIGNED-PAYLOAD`` + // to calculate the payload hash. Not all services support this option. See the `S3 + // `_ policy for details. + bool use_unsigned_payload = 4; + + // A list of request header string matchers that will be excluded from signing. The excluded header can be matched by + // any patterns defined in the StringMatcher proto (e.g. exact string, prefix, regex, etc). + // + // Example: + // match_excluded_headers: + // - prefix: x-envoy + // - exact: foo + // - exact: bar + // When applied, all headers that start with "x-envoy" and headers "foo" and "bar" will not be signed. + repeated type.matcher.v3.StringMatcher match_excluded_headers = 5; } diff --git a/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto b/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto new file mode 100644 index 0000000000..2264da41bd --- /dev/null +++ b/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto @@ -0,0 +1,85 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.bandwidth_limit.v3; + +import "envoy/config/core/v3/base.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.bandwidth_limit.v3"; +option java_outer_classname = "BandwidthLimitProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/bandwidth_limit/v3;bandwidth_limitv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Bandwidth limit] +// Bandwidth limit :ref:`configuration overview `. +// [#extension: envoy.filters.http.bandwidth_limit] + +// [#next-free-field: 8] +message BandwidthLimit { + // Defines the mode for the bandwidth limit filter. + // Values represent bitmask. + enum EnableMode { + // Filter is disabled. + DISABLED = 0; + + // Filter enabled only for incoming traffic. + REQUEST = 1; + + // Filter enabled only for outgoing traffic. + RESPONSE = 2; + + // Filter enabled for both incoming and outgoing traffic. + REQUEST_AND_RESPONSE = 3; + } + + // The human readable prefix to use when emitting stats. + string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; + + // The enable mode for the bandwidth limit filter. + // Default is Disabled. + EnableMode enable_mode = 2 [(validate.rules).enum = {defined_only: true}]; + + // The limit supplied in KiB/s. + // + // .. note:: + // It's fine for the limit to be unset for the global configuration since the bandwidth limit + // can be applied at a the virtual host or route level. Thus, the limit must be set for the + // per route configuration otherwise the config will be rejected. + // + // .. note:: + // When using per route configuration, the limit becomes unique to that route. + // + google.protobuf.UInt64Value limit_kbps = 3 [(validate.rules).uint64 = {gte: 1}]; + + // Optional Fill interval in milliseconds for the token refills. Defaults to 50ms. + // It must be at least 20ms to avoid too aggressive refills. + google.protobuf.Duration fill_interval = 4 [(validate.rules).duration = { + lte {seconds: 1} + gte {nanos: 20000000} + }]; + + // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults + // to enabled. + config.core.v3.RuntimeFeatureFlag runtime_enabled = 5; + + // Enable response trailers. + // + // .. note:: + // + // * If set true, the response trailers *bandwidth-request-delay-ms* and *bandwidth-response-delay-ms* will be added, prefixed by *response_trailer_prefix*. + // * bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer. + // * bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer. + // * If :ref:`enable_mode ` is DISABLED or REQUEST, the trailers will not be set. + // * If both the request and response delay time is 0, the trailers will not be set. + // + bool enable_response_trailers = 6; + + // Optional The prefix for the response trailers. + string response_trailer_prefix = 7; +} diff --git a/api/envoy/extensions/filters/http/buffer/v3/buffer.proto b/api/envoy/extensions/filters/http/buffer/v3/buffer.proto index 6f73244032..1733abb409 100644 --- a/api/envoy/extensions/filters/http/buffer/v3/buffer.proto +++ b/api/envoy/extensions/filters/http/buffer/v3/buffer.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.buffer.v3"; option java_outer_classname = "BufferProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/buffer/v3;bufferv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Buffer] diff --git a/api/envoy/extensions/filters/http/cache/v3alpha/cache.proto b/api/envoy/extensions/filters/http/cache/v3/cache.proto similarity index 93% rename from api/envoy/extensions/filters/http/cache/v3alpha/cache.proto rename to api/envoy/extensions/filters/http/cache/v3/cache.proto index 9260abe94a..dd3278f794 100644 --- a/api/envoy/extensions/filters/http/cache/v3alpha/cache.proto +++ b/api/envoy/extensions/filters/http/cache/v3/cache.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package envoy.extensions.filters.http.cache.v3alpha; +package envoy.extensions.filters.http.cache.v3; import "envoy/config/route/v3/route_components.proto"; import "envoy/type/matcher/v3/string.proto"; @@ -11,15 +11,15 @@ import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.http.cache.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.http.cache.v3"; option java_outer_classname = "CacheProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cache/v3;cachev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP Cache Filter] -// [#extension: envoy.filters.http.cache] +// [#extension: envoy.filters.http.cache] message CacheConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.cache.v2alpha.CacheConfig"; @@ -50,6 +50,7 @@ message CacheConfig { } // Config specific to the cache storage implementation. + // [#extension-category: envoy.filters.http.cache] google.protobuf.Any typed_config = 1 [(validate.rules).any = {required: true}]; // List of matching rules that defines allowed *Vary* headers. diff --git a/api/envoy/extensions/filters/http/cache/v4alpha/cache.proto b/api/envoy/extensions/filters/http/cache/v4alpha/cache.proto deleted file mode 100644 index ad9bb4c639..0000000000 --- a/api/envoy/extensions/filters/http/cache/v4alpha/cache.proto +++ /dev/null @@ -1,81 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.cache.v4alpha; - -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.cache.v4alpha"; -option java_outer_classname = "CacheProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: HTTP Cache Filter] -// [#extension: envoy.filters.http.cache] - -message CacheConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.cache.v3alpha.CacheConfig"; - - // [#not-implemented-hide:] - // Modifies cache key creation by restricting which parts of the URL are included. - message KeyCreatorParams { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.cache.v3alpha.CacheConfig.KeyCreatorParams"; - - // If true, exclude the URL scheme from the cache key. Set to true if your origins always - // produce the same response for http and https requests. - bool exclude_scheme = 1; - - // If true, exclude the host from the cache key. Set to true if your origins' responses don't - // ever depend on host. - bool exclude_host = 2; - - // If *query_parameters_included* is nonempty, only query parameters matched - // by one or more of its matchers are included in the cache key. Any other - // query params will not affect cache lookup. - repeated config.route.v4alpha.QueryParameterMatcher query_parameters_included = 3; - - // If *query_parameters_excluded* is nonempty, query parameters matched by one - // or more of its matchers are excluded from the cache key (even if also - // matched by *query_parameters_included*), and will not affect cache lookup. - repeated config.route.v4alpha.QueryParameterMatcher query_parameters_excluded = 4; - } - - // Config specific to the cache storage implementation. - google.protobuf.Any typed_config = 1 [(validate.rules).any = {required: true}]; - - // List of matching rules that defines allowed *Vary* headers. - // - // The *vary* response header holds a list of header names that affect the - // contents of a response, as described by - // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. - // - // During insertion, *allowed_vary_headers* acts as a allowlist: if a - // response's *vary* header mentions any header names that aren't matched by any rules in - // *allowed_vary_headers*, that response will not be cached. - // - // During lookup, *allowed_vary_headers* controls what request headers will be - // sent to the cache storage implementation. - repeated type.matcher.v4alpha.StringMatcher allowed_vary_headers = 2; - - // [#not-implemented-hide:] - // - // - // Modifies cache key creation by restricting which parts of the URL are included. - KeyCreatorParams key_creator_params = 3; - - // [#not-implemented-hide:] - // - // - // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache - // storage implementation may have its own limit beyond which it will reject insertions). - uint32 max_body_bytes = 4; -} diff --git a/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.proto b/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto similarity index 86% rename from api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.proto rename to api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto index 7952f9b3d4..06e1b111f4 100644 --- a/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.proto +++ b/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto @@ -1,15 +1,14 @@ syntax = "proto3"; -package envoy.extensions.filters.http.cdn_loop.v3alpha; +package envoy.extensions.filters.http.cdn_loop.v3; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.http.cdn_loop.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.http.cdn_loop.v3"; option java_outer_classname = "CdnLoopProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cdn_loop/v3;cdn_loopv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP CDN-Loop Filter] diff --git a/api/envoy/extensions/filters/http/composite/v3/composite.proto b/api/envoy/extensions/filters/http/composite/v3/composite.proto new file mode 100644 index 0000000000..064f58b7e9 --- /dev/null +++ b/api/envoy/extensions/filters/http/composite/v3/composite.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.composite.v3; + +import "envoy/config/core/v3/extension.proto"; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.composite.v3"; +option java_outer_classname = "CompositeProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/composite/v3;compositev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Composite] +// Composite Filter :ref:`configuration overview `. +// [#extension: envoy.filters.http.composite] + +// :ref:`Composite filter ` config. The composite filter config +// allows delegating filter handling to another filter as determined by matching on the request +// headers. This makes it possible to use different filters or filter configurations based on the +// incoming request. +// +// This is intended to be used with +// :ref:`ExtensionWithMatcher ` +// where a match tree is specified that indicates (via +// :ref:`ExecuteFilterAction `) +// which filter configuration to create and delegate to. +message Composite { + option (xds.annotations.v3.message_status).work_in_progress = true; +} + +// Composite match action (see :ref:`matching docs ` for more info on match actions). +// This specifies the filter configuration of the filter that the composite filter should delegate filter interactions to. +message ExecuteFilterAction { + config.core.v3.TypedExtensionConfig typed_config = 1; +} diff --git a/api/envoy/extensions/filters/http/compressor/v3/compressor.proto b/api/envoy/extensions/filters/http/compressor/v3/compressor.proto index 6519697a89..197ab8ab42 100644 --- a/api/envoy/extensions/filters/http/compressor/v3/compressor.proto +++ b/api/envoy/extensions/filters/http/compressor/v3/compressor.proto @@ -5,9 +5,9 @@ package envoy.extensions.filters.http.compressor.v3; import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/extension.proto"; -import "google/protobuf/any.proto"; import "google/protobuf/wrappers.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.compressor.v3"; option java_outer_classname = "CompressorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/compressor/v3;compressorv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Compressor] @@ -68,18 +69,21 @@ message Compressor { } // Minimum response length, in bytes, which will trigger compression. The default value is 30. - google.protobuf.UInt32Value content_length = 1 [deprecated = true]; + google.protobuf.UInt32Value content_length = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Set of strings that allows specifying which mime-types yield compression; e.g., // application/json, text/html, etc. When this field is not defined, compression will be applied // to the following mime-types: "application/javascript", "application/json", // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" // and their synonyms. - repeated string content_type = 2 [deprecated = true]; + repeated string content_type = 2 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // If true, disables compression when the response contains an etag header. When it is false, the // filter will preserve weak etags and remove the ones that require strong validation. - bool disable_on_etag_header = 3 [deprecated = true]; + bool disable_on_etag_header = 3 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // If true, removes accept-encoding from the request headers before dispatching it to the upstream // so that responses do not get compressed before reaching the filter. @@ -88,17 +92,20 @@ message Compressor { // // To avoid interfering with other compression filters in the same chain use this option in // the filter closest to the upstream. - bool remove_accept_encoding_header = 4 [deprecated = true]; + bool remove_accept_encoding_header = 4 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Runtime flag that controls whether the filter is enabled or not. If set to false, the // filter will operate as a pass-through filter. If not specified, defaults to enabled. - config.core.v3.RuntimeFeatureFlag runtime_enabled = 5 [deprecated = true]; + config.core.v3.RuntimeFeatureFlag runtime_enabled = 5 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // A compressor library to use for compression. Currently only - // :ref:`envoy.compression.gzip.compressor` + // :ref:`envoy.compression.gzip.compressor` // is included in Envoy. - // This field is ignored if used in the context of the gzip http-filter, but is mandatory otherwise. - config.core.v3.TypedExtensionConfig compressor_library = 6; + // [#extension-category: envoy.compression.compressor] + config.core.v3.TypedExtensionConfig compressor_library = 6 + [(validate.rules).message = {required: true}]; // Configuration for request compression. Compression is disabled by default if left empty. RequestDirectionConfig request_direction_config = 7; diff --git a/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.proto b/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.proto deleted file mode 100644 index 6f2f789886..0000000000 --- a/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.compressor.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/extension.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.compressor.v4alpha"; -option java_outer_classname = "CompressorProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Compressor] -// Compressor :ref:`configuration overview `. -// [#extension: envoy.filters.http.compressor] - -// [#next-free-field: 9] -message Compressor { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.compressor.v3.Compressor"; - - message CommonDirectionConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig"; - - // Runtime flag that controls whether compression is enabled or not for the direction this - // common config is put in. If set to false, the filter will operate as a pass-through filter - // in the chosen direction. If the field is omitted, the filter will be enabled. - config.core.v4alpha.RuntimeFeatureFlag enabled = 1; - - // Minimum value of Content-Length header of request or response messages (depending on the direction - // this common config is put in), in bytes, which will trigger compression. The default value is 30. - google.protobuf.UInt32Value min_content_length = 2; - - // Set of strings that allows specifying which mime-types yield compression; e.g., - // application/json, text/html, etc. When this field is not defined, compression will be applied - // to the following mime-types: "application/javascript", "application/json", - // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" - // and their synonyms. - repeated string content_type = 3; - } - - // Configuration for filter behavior on the request direction. - message RequestDirectionConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig"; - - CommonDirectionConfig common_config = 1; - } - - // Configuration for filter behavior on the response direction. - message ResponseDirectionConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig"; - - CommonDirectionConfig common_config = 1; - - // If true, disables compression when the response contains an etag header. When it is false, the - // filter will preserve weak etags and remove the ones that require strong validation. - bool disable_on_etag_header = 2; - - // If true, removes accept-encoding from the request headers before dispatching it to the upstream - // so that responses do not get compressed before reaching the filter. - // - // .. attention:: - // - // To avoid interfering with other compression filters in the same chain use this option in - // the filter closest to the upstream. - bool remove_accept_encoding_header = 3; - } - - reserved 1, 2, 3, 4, 5; - - reserved "content_length", "content_type", "disable_on_etag_header", - "remove_accept_encoding_header", "runtime_enabled"; - - // A compressor library to use for compression. Currently only - // :ref:`envoy.compression.gzip.compressor` - // is included in Envoy. - // This field is ignored if used in the context of the gzip http-filter, but is mandatory otherwise. - config.core.v4alpha.TypedExtensionConfig compressor_library = 6; - - // Configuration for request compression. Compression is disabled by default if left empty. - RequestDirectionConfig request_direction_config = 7; - - // Configuration for response compression. Compression is enabled by default if left empty. - // - // .. attention:: - // - // If the field is not empty then the duplicate deprecated fields of the `Compressor` message, - // such as `content_length`, `content_type`, `disable_on_etag_header`, - // `remove_accept_encoding_header` and `runtime_enabled`, are ignored. - // - // Also all the statistics related to response compression will be rooted in - // `.compressor...response.*` - // instead of - // `.compressor...*`. - ResponseDirectionConfig response_direction_config = 8; -} diff --git a/api/envoy/extensions/filters/http/cors/v3/cors.proto b/api/envoy/extensions/filters/http/cors/v3/cors.proto index 0269e1bdfd..29e8196edf 100644 --- a/api/envoy/extensions/filters/http/cors/v3/cors.proto +++ b/api/envoy/extensions/filters/http/cors/v3/cors.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.cors.v3"; option java_outer_classname = "CorsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cors/v3;corsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Cors] diff --git a/api/envoy/extensions/filters/http/csrf/v3/csrf.proto b/api/envoy/extensions/filters/http/csrf/v3/csrf.proto index 263d705e3f..384e009559 100644 --- a/api/envoy/extensions/filters/http/csrf/v3/csrf.proto +++ b/api/envoy/extensions/filters/http/csrf/v3/csrf.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.csrf.v3"; option java_outer_classname = "CsrfProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/csrf/v3;csrfv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: CSRF] @@ -25,13 +26,13 @@ message CsrfPolicy { // Specifies the % of requests for which the CSRF filter is enabled. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests to filter. // // .. note:: // // This field defaults to 100/:ref:`HUNDRED - // `. + // `. config.core.v3.RuntimeFractionalPercent filter_enabled = 1 [(validate.rules).message = {required: true}]; @@ -39,7 +40,7 @@ message CsrfPolicy { // // This is intended to be used when ``filter_enabled`` is off and will be ignored otherwise. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate // and track the request's *Origin* and *Destination* to determine if it's valid, but will not // enforce any policies. diff --git a/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.proto b/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.proto deleted file mode 100644 index dda915a059..0000000000 --- a/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.csrf.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.csrf.v4alpha"; -option java_outer_classname = "CsrfProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: CSRF] -// Cross-Site Request Forgery :ref:`configuration overview `. -// [#extension: envoy.filters.http.csrf] - -// CSRF filter config. -message CsrfPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.csrf.v3.CsrfPolicy"; - - // Specifies the % of requests for which the CSRF filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - config.core.v4alpha.RuntimeFractionalPercent filter_enabled = 1 - [(validate.rules).message = {required: true}]; - - // Specifies that CSRF policies will be evaluated and tracked, but not enforced. - // - // This is intended to be used when ``filter_enabled`` is off and will be ignored otherwise. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's *Origin* and *Destination* to determine if it's valid, but will not - // enforce any policies. - config.core.v4alpha.RuntimeFractionalPercent shadow_enabled = 2; - - // Specifies additional source origins that will be allowed in addition to - // the destination origin. - // - // More information on how this can be configured via runtime can be found - // :ref:`here `. - repeated type.matcher.v4alpha.StringMatcher additional_origins = 3; -} diff --git a/api/envoy/extensions/filters/http/decompressor/v3/decompressor.proto b/api/envoy/extensions/filters/http/decompressor/v3/decompressor.proto index 1e3d72766d..bfcd1c67ba 100644 --- a/api/envoy/extensions/filters/http/decompressor/v3/decompressor.proto +++ b/api/envoy/extensions/filters/http/decompressor/v3/decompressor.proto @@ -5,17 +5,15 @@ package envoy.extensions.filters.http.decompressor.v3; import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/extension.proto"; -import "google/protobuf/any.proto"; import "google/protobuf/wrappers.proto"; -import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.decompressor.v3"; option java_outer_classname = "DecompressorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/decompressor/v3;decompressorv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Decompressor] @@ -27,6 +25,9 @@ message Decompressor { // Runtime flag that controls whether the filter is enabled for decompression or not. If set to false, the // filter will operate as a pass-through filter. If the message is unspecified, the filter will be enabled. config.core.v3.RuntimeFeatureFlag enabled = 1; + + // If set to true, will decompress response even if a *no-transform* cache control header is set. + bool ignore_no_transform_header = 2; } // Configuration for filter behavior on the request direction. @@ -44,8 +45,9 @@ message Decompressor { } // A decompressor library to use for both request and response decompression. Currently only - // :ref:`envoy.compression.gzip.compressor` + // :ref:`envoy.compression.gzip.compressor` // is included in Envoy. + // [#extension-category: envoy.compression.decompressor] config.core.v3.TypedExtensionConfig decompressor_library = 1 [(validate.rules).message = {required: true}]; diff --git a/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto b/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto index 70dd21a324..838125f77a 100644 --- a/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto +++ b/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.dynamic_forward_proxy.v3"; option java_outer_classname = "DynamicForwardProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/dynamic_forward_proxy/v3;dynamic_forward_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Dynamic forward proxy] @@ -24,9 +25,15 @@ message FilterConfig { // The DNS cache configuration that the filter will attach to. Note this configuration must // match that of associated :ref:`dynamic forward proxy cluster configuration - // `. + // `. common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1 [(validate.rules).message = {required: true}]; + + // When this flag is set, the filter will add the resolved upstream address in the filter + // state. The state should be saved with key + // `envoy.stream.upstream_address` (See + // :repo:`upstream_address.h`). + bool save_upstream_address = 2; } // Per route Configuration for the dynamic forward proxy HTTP filter. @@ -41,7 +48,7 @@ message PerRouteConfig { // // Note: this rewrite affects both DNS lookup and host header forwarding. However, this // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the + // :ref:`HCM host rewrite ` given that the // value set here would be used for DNS lookups whereas the value set in the HCM would be used // for host header forwarding which is not the desired outcome. string host_rewrite_literal = 1; @@ -52,7 +59,7 @@ message PerRouteConfig { // // Note: this rewrite affects both DNS lookup and host header forwarding. However, this // option shouldn't be used with - // :ref:`HCM host rewrite header ` + // :ref:`HCM host rewrite header ` // given that the value set here would be used for DNS lookups whereas the value set in the HCM // would be used for host header forwarding which is not the desired outcome. // diff --git a/api/envoy/extensions/filters/http/dynamo/v3/dynamo.proto b/api/envoy/extensions/filters/http/dynamo/v3/dynamo.proto index 13a4f1c6ce..9d6feb4ec9 100644 --- a/api/envoy/extensions/filters/http/dynamo/v3/dynamo.proto +++ b/api/envoy/extensions/filters/http/dynamo/v3/dynamo.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.dynamo.v3"; option java_outer_classname = "DynamoProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/dynamo/v3;dynamov3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Dynamo] diff --git a/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto b/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto index 395258802f..ae6466b751 100644 --- a/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto +++ b/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto @@ -10,7 +10,7 @@ import "envoy/type/matcher/v3/metadata.proto"; import "envoy/type/matcher/v3/string.proto"; import "envoy/type/v3/http_status.proto"; -import "envoy/annotations/deprecation.proto"; +import "udpa/annotations/sensitive.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -18,13 +18,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_authz.v3"; option java_outer_classname = "ExtAuthzProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_authz/v3;ext_authzv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: External Authorization] // External Authorization :ref:`configuration overview `. // [#extension: envoy.filters.http.ext_authz] -// [#next-free-field: 15] +// [#next-free-field: 17] message ExtAuthz { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.ext_authz.v2.ExtAuthz"; @@ -83,10 +84,10 @@ message ExtAuthz { type.v3.HttpStatus status_on_error = 7; // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service as an opaque *protobuf::Struct*. + // ext_authz service. :ref:`filter_metadata ` is passed as an opaque *protobuf::Struct*. // // For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata - // ` is set, + // ` is set, // then the following will pass the jwt payload to the authorization server. // // .. code-block:: yaml @@ -96,9 +97,17 @@ message ExtAuthz { // repeated string metadata_context_namespaces = 8; + // Specifies a list of metadata namespaces whose values, if present, will be passed to the + // ext_authz service. :ref:`typed_filter_metadata ` is passed as an *protobuf::Any*. + // + // It works in a way similar to `metadata_context_namespaces` but allows envoy and external authz server to share the protobuf message definition + // in order to do a safe parsing. + // + repeated string typed_metadata_context_namespaces = 16; + // Specifies if the filter is enabled. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests to filter. // // If this field is not specified, the filter will be enabled for all requests. @@ -109,7 +118,7 @@ message ExtAuthz { type.matcher.v3.MetadataMatcher filter_enabled_metadata = 14; // Specifies whether to deny the requests, when the filter is disabled. - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to determine whether to deny request for // filter protected path at filter disabling. If filter is disabled in // typed_per_filter_config for the path, requests will not be denied. @@ -120,7 +129,7 @@ message ExtAuthz { // Specifies if the peer certificate is sent to the external service. // // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. + // :ref:`certificate`. bool include_peer_certificate = 10; // Optional additional prefix to use when emitting statistics. This allows to distinguish @@ -139,6 +148,11 @@ message ExtAuthz { // stat_prefix: blocker # This emits ext_authz.blocker.ok, ext_authz.blocker.denied, etc. // string stat_prefix = 13; + + // Optional labels that will be passed to :ref:`labels` in + // :ref:`destination`. + // The labels will be read from :ref:`metadata` with the specified key. + string bootstrap_metadata_labels_key = 15; } // Configuration for buffering the request data. @@ -149,7 +163,7 @@ message BufferSettings { // Sets the maximum size of a message body that the filter will hold in memory. Envoy will return // *HTTP 413* and will *not* initiate the authorization process when buffer reaches the number // set in this field. Note that this setting will have precedence over :ref:`failure_mode_allow - // `. + // `. uint32 max_request_bytes = 1 [(validate.rules).uint32 = {gt: 0}]; // When this field is true, Envoy will buffer the message until *max_request_bytes* is reached. @@ -173,21 +187,24 @@ message BufferSettings { // // *On authorization request*, a list of allowed request headers may be supplied. See // :ref:`allowed_headers -// ` +// ` // for details. Additional headers metadata may be added to the authorization request. See // :ref:`headers_to_add -// ` for +// ` for // details. // // On authorization response status HTTP 200 OK, the filter will allow traffic to the upstream and // additional headers metadata may be added to the original client request. See // :ref:`allowed_upstream_headers -// ` +// ` +// for details. Additionally, the filter may add additional headers to the client's response. See +// :ref:`allowed_client_headers_on_success +// ` // for details. // // On other authorization response statuses, the filter will not allow traffic. Additional headers // metadata as well as body may be added to the client's response. See :ref:`allowed_client_headers -// ` +// ` // for details. // [#next-free-field: 9] message HttpService { @@ -213,18 +230,21 @@ message AuthorizationRequest { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.ext_authz.v2.AuthorizationRequest"; - // Authorization request will include the client request headers that have a correspondent match - // in the :ref:`list `. Note that in addition to the - // user's supplied matchers: + // Authorization request includes the client request headers that have a correspondent match + // in the :ref:`list `. + // + // .. note:: + // + // In addition to the the user's supplied matchers, ``Host``, ``Method``, ``Path``, + // ``Content-Length``, and ``Authorization`` are **automatically included** to the list. // - // 1. *Host*, *Method*, *Path* and *Content-Length* are automatically included to the list. + // .. note:: // - // 2. *Content-Length* will be set to 0 and the request to the authorization service will not have - // a message body. However, the authorization request can include the buffered client request body - // (controlled by :ref:`with_request_body - // ` setting), - // consequently the value of *Content-Length* of the authorization request reflects the size of - // its payload size. + // By default, ``Content-Length`` header is set to ``0`` and the request to the authorization + // service has no message body. However, the authorization request *may* include the buffered + // client request body (controlled by :ref:`with_request_body + // ` + // setting) hence the value of its ``Content-Length`` reflects the size of its payload size. // type.matcher.v3.ListStringMatcher allowed_headers = 1; @@ -233,26 +253,42 @@ message AuthorizationRequest { repeated config.core.v3.HeaderValue headers_to_add = 2; } +// [#next-free-field: 6] message AuthorizationResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.ext_authz.v2.AuthorizationResponse"; - // When this :ref:`list ` is set, authorization + // When this :ref:`list ` is set, authorization // response headers that have a correspondent match will be added to the original client request. // Note that coexistent headers will be overridden. type.matcher.v3.ListStringMatcher allowed_upstream_headers = 1; - // When this :ref:`list ` is set, authorization + // When this :ref:`list ` is set, authorization // response headers that have a correspondent match will be added to the client's response. Note // that coexistent headers will be appended. type.matcher.v3.ListStringMatcher allowed_upstream_headers_to_append = 3; - // When this :ref:`list `. is set, authorization + // When this :ref:`list `. is set, authorization // response headers that have a correspondent match will be added to the client's response. Note // that when this list is *not* set, all the authorization response headers, except *Authority // (Host)* will be in the response to the client. When a header is included in this list, *Path*, // *Status*, *Content-Length*, *WWWAuthenticate* and *Location* are automatically added. type.matcher.v3.ListStringMatcher allowed_client_headers = 2; + + // When this :ref:`list `. is set, authorization + // response headers that have a correspondent match will be added to the client's response when + // the authorization response itself is successful, i.e. not failed or denied. When this list is + // *not* set, no additional headers will be added to the client's response on success. + type.matcher.v3.ListStringMatcher allowed_client_headers_on_success = 4; + + // When this :ref:`list ` is set, authorization + // response headers that have a correspondent match will be emitted as dynamic metadata to be consumed + // by the next filter. This metadata lives in a namespace specified by the canonical name of extension filter + // that requires it: + // + // - :ref:`envoy.filters.http.ext_authz ` for HTTP filter. + // - :ref:`envoy.filters.network.ext_authz ` for network filter. + type.matcher.v3.ListStringMatcher dynamic_metadata_from_headers = 5; } // Extra settings on a per virtualhost/route/weighted-cluster level. @@ -278,7 +314,7 @@ message CheckSettings { "envoy.config.filter.http.ext_authz.v2.CheckSettings"; // Context extensions to set on the CheckRequest's - // :ref:`AttributeContext.context_extensions` + // :ref:`AttributeContext.context_extensions` // // You can use this to provide extra context for the external authorization server on specific // virtual hosts/routes. For example, adding a context extension on the virtual host level can @@ -291,10 +327,10 @@ message CheckSettings { // .. note:: // // These settings are only applied to a filter configured with a - // :ref:`grpc_service`. - map context_extensions = 1; + // :ref:`grpc_service`. + map context_extensions = 1 [(udpa.annotations.sensitive) = true]; // When set to true, disable the configured :ref:`with_request_body - // ` for a route. + // ` for a route. bool disable_request_body_buffering = 2; } diff --git a/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.proto b/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.proto deleted file mode 100644 index ec8854f5d1..0000000000 --- a/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.proto +++ /dev/null @@ -1,300 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.ext_authz.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/grpc_service.proto"; -import "envoy/config/core/v4alpha/http_uri.proto"; -import "envoy/type/matcher/v4alpha/metadata.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; -import "envoy/type/v3/http_status.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_authz.v4alpha"; -option java_outer_classname = "ExtAuthzProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: External Authorization] -// External Authorization :ref:`configuration overview `. -// [#extension: envoy.filters.http.ext_authz] - -// [#next-free-field: 15] -message ExtAuthz { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ext_authz.v3.ExtAuthz"; - - reserved 4; - - reserved "use_alpha"; - - // External authorization service configuration. - oneof services { - // gRPC service configuration (default timeout: 200ms). - config.core.v4alpha.GrpcService grpc_service = 1; - - // HTTP service configuration (default timeout: 200ms). - HttpService http_service = 3; - } - - // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and - // version of messages used on the wire. - config.core.v4alpha.ApiVersion transport_api_version = 12 - [(validate.rules).enum = {defined_only: true}]; - - // Changes filter's behaviour on errors: - // - // 1. When set to true, the filter will *accept* client request even if the communication with - // the authorization service has failed, or if the authorization service has returned a HTTP 5xx - // error. - // - // 2. When set to false, ext-authz will *reject* client requests and return a *Forbidden* - // response if the communication with the authorization service has failed, or if the - // authorization service has returned a HTTP 5xx error. - // - // Note that errors can be *always* tracked in the :ref:`stats - // `. - bool failure_mode_allow = 2; - - // Enables filter to buffer the client request body and send it within the authorization request. - // A ``x-envoy-auth-partial-body: false|true`` metadata header will be added to the authorization - // request message indicating if the body data is partial. - BufferSettings with_request_body = 5; - - // Clears route cache in order to allow the external authorization service to correctly affect - // routing decisions. Filter clears all cached routes when: - // - // 1. The field is set to *true*. - // - // 2. The status returned from the authorization service is a HTTP 200 or gRPC 0. - // - // 3. At least one *authorization response header* is added to the client request, or is used for - // altering another client request header. - // - bool clear_route_cache = 6; - - // Sets the HTTP status that is returned to the client when there is a network error between the - // filter and the authorization server. The default status is HTTP 403 Forbidden. - type.v3.HttpStatus status_on_error = 7; - - // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service as an opaque *protobuf::Struct*. - // - // For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata - // ` is set, - // then the following will pass the jwt payload to the authorization server. - // - // .. code-block:: yaml - // - // metadata_context_namespaces: - // - envoy.filters.http.jwt_authn - // - repeated string metadata_context_namespaces = 8; - - // Specifies if the filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // If this field is not specified, the filter will be enabled for all requests. - config.core.v4alpha.RuntimeFractionalPercent filter_enabled = 9; - - // Specifies if the filter is enabled with metadata matcher. - // If this field is not specified, the filter will be enabled for all requests. - type.matcher.v4alpha.MetadataMatcher filter_enabled_metadata = 14; - - // Specifies whether to deny the requests, when the filter is disabled. - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to determine whether to deny request for - // filter protected path at filter disabling. If filter is disabled in - // typed_per_filter_config for the path, requests will not be denied. - // - // If this field is not specified, all requests will be allowed when disabled. - config.core.v4alpha.RuntimeFeatureFlag deny_at_disable = 11; - - // Specifies if the peer certificate is sent to the external service. - // - // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - bool include_peer_certificate = 10; - - // Optional additional prefix to use when emitting statistics. This allows to distinguish - // emitted statistics between configured *ext_authz* filters in an HTTP filter chain. For example: - // - // .. code-block:: yaml - // - // http_filters: - // - name: envoy.filters.http.ext_authz - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz - // stat_prefix: waf # This emits ext_authz.waf.ok, ext_authz.waf.denied, etc. - // - name: envoy.filters.http.ext_authz - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz - // stat_prefix: blocker # This emits ext_authz.blocker.ok, ext_authz.blocker.denied, etc. - // - string stat_prefix = 13; -} - -// Configuration for buffering the request data. -message BufferSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ext_authz.v3.BufferSettings"; - - // Sets the maximum size of a message body that the filter will hold in memory. Envoy will return - // *HTTP 413* and will *not* initiate the authorization process when buffer reaches the number - // set in this field. Note that this setting will have precedence over :ref:`failure_mode_allow - // `. - uint32 max_request_bytes = 1 [(validate.rules).uint32 = {gt: 0}]; - - // When this field is true, Envoy will buffer the message until *max_request_bytes* is reached. - // The authorization request will be dispatched and no 413 HTTP error will be returned by the - // filter. - bool allow_partial_message = 2; - - // If true, the body sent to the external authorization service is set with raw bytes, it sets - // the :ref:`raw_body` - // field of HTTP request attribute context. Otherwise, :ref:` - // body` will be filled - // with UTF-8 string request body. - bool pack_as_bytes = 3; -} - -// HttpService is used for raw HTTP communication between the filter and the authorization service. -// When configured, the filter will parse the client request and use these attributes to call the -// authorization server. Depending on the response, the filter may reject or accept the client -// request. Note that in any of these events, metadata can be added, removed or overridden by the -// filter: -// -// *On authorization request*, a list of allowed request headers may be supplied. See -// :ref:`allowed_headers -// ` -// for details. Additional headers metadata may be added to the authorization request. See -// :ref:`headers_to_add -// ` for -// details. -// -// On authorization response status HTTP 200 OK, the filter will allow traffic to the upstream and -// additional headers metadata may be added to the original client request. See -// :ref:`allowed_upstream_headers -// ` -// for details. -// -// On other authorization response statuses, the filter will not allow traffic. Additional headers -// metadata as well as body may be added to the client's response. See :ref:`allowed_client_headers -// ` -// for details. -// [#next-free-field: 9] -message HttpService { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ext_authz.v3.HttpService"; - - reserved 3, 4, 5, 6; - - // Sets the HTTP server URI which the authorization requests must be sent to. - config.core.v4alpha.HttpUri server_uri = 1; - - // Sets a prefix to the value of authorization request header *Path*. - string path_prefix = 2; - - // Settings used for controlling authorization request metadata. - AuthorizationRequest authorization_request = 7; - - // Settings used for controlling authorization response metadata. - AuthorizationResponse authorization_response = 8; -} - -message AuthorizationRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ext_authz.v3.AuthorizationRequest"; - - // Authorization request will include the client request headers that have a correspondent match - // in the :ref:`list `. Note that in addition to the - // user's supplied matchers: - // - // 1. *Host*, *Method*, *Path* and *Content-Length* are automatically included to the list. - // - // 2. *Content-Length* will be set to 0 and the request to the authorization service will not have - // a message body. However, the authorization request can include the buffered client request body - // (controlled by :ref:`with_request_body - // ` setting), - // consequently the value of *Content-Length* of the authorization request reflects the size of - // its payload size. - // - type.matcher.v4alpha.ListStringMatcher allowed_headers = 1; - - // Sets a list of headers that will be included to the request to authorization service. Note that - // client request of the same key will be overridden. - repeated config.core.v4alpha.HeaderValue headers_to_add = 2; -} - -message AuthorizationResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ext_authz.v3.AuthorizationResponse"; - - // When this :ref:`list ` is set, authorization - // response headers that have a correspondent match will be added to the original client request. - // Note that coexistent headers will be overridden. - type.matcher.v4alpha.ListStringMatcher allowed_upstream_headers = 1; - - // When this :ref:`list ` is set, authorization - // response headers that have a correspondent match will be added to the client's response. Note - // that coexistent headers will be appended. - type.matcher.v4alpha.ListStringMatcher allowed_upstream_headers_to_append = 3; - - // When this :ref:`list `. is set, authorization - // response headers that have a correspondent match will be added to the client's response. Note - // that when this list is *not* set, all the authorization response headers, except *Authority - // (Host)* will be in the response to the client. When a header is included in this list, *Path*, - // *Status*, *Content-Length*, *WWWAuthenticate* and *Location* are automatically added. - type.matcher.v4alpha.ListStringMatcher allowed_client_headers = 2; -} - -// Extra settings on a per virtualhost/route/weighted-cluster level. -message ExtAuthzPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute"; - - oneof override { - option (validate.required) = true; - - // Disable the ext auth filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Check request settings for this route. - CheckSettings check_settings = 2 [(validate.rules).message = {required: true}]; - } -} - -// Extra settings for the check request. -message CheckSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ext_authz.v3.CheckSettings"; - - // Context extensions to set on the CheckRequest's - // :ref:`AttributeContext.context_extensions` - // - // You can use this to provide extra context for the external authorization server on specific - // virtual hosts/routes. For example, adding a context extension on the virtual host level can - // give the ext-authz server information on what virtual host is used without needing to parse the - // host header. If CheckSettings is specified in multiple per-filter-configs, they will be merged - // in order, and the result will be used. - // - // Merge semantics for this field are such that keys from more specific configs override. - // - // .. note:: - // - // These settings are only applied to a filter configured with a - // :ref:`grpc_service`. - map context_extensions = 1; - - // When set to true, disable the configured :ref:`with_request_body - // ` for a route. - bool disable_request_body_buffering = 2; -} diff --git a/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.proto b/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto similarity index 61% rename from api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.proto rename to api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto index 1e64376add..916560f6b8 100644 --- a/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.proto +++ b/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto @@ -1,28 +1,40 @@ syntax = "proto3"; -package envoy.extensions.filters.http.ext_proc.v3alpha; +package envoy.extensions.filters.http.ext_proc.v3; +import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.proto"; +import "envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto"; import "google/protobuf/duration.proto"; +import "xds/annotations/v3/status.proto"; + import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_proc.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_proc.v3"; option java_outer_classname = "ExtProcProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_proc/v3;ext_procv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; // [#protodoc-title: External Processing Filter] // External Processing Filter // [#extension: envoy.filters.http.ext_proc] // The External Processing filter allows an external service to act on HTTP traffic in a flexible way. -// It communicates with an external gRPC service that can use it to do a variety of things -// with the request and response: + +// **Current Implementation Status:** +// All options and processing modes are implemented except for the following: +// +// * Request and response attributes are not sent and not processed. +// * Dynamic metadata in responses from the external processor is ignored. +// * "async mode" is not implemented. + +// The filter communicates with an external gRPC service called an "external processor" +// that can do a variety of things with the request and response: // // * Access and modify the HTTP headers on the request, response, or both // * Access and modify the HTTP request and response bodies @@ -39,6 +51,32 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // * Whether it receives the message body at all, in separate chunks, or as a single buffer // * Whether subsequent HTTP requests are transmitted synchronously or whether they are // sent asynchronously. +// * To modify request or response trailers if they already exist +// * To add request or response trailers where they are not present +// +// The filter supports up to six different processing steps. Each is represented by +// a gRPC stream message that is sent to the external processor. For each message, the +// processor must send a matching response. +// +// * Request headers: Contains the headers from the original HTTP request. +// * Request body: Sent in a single message if the BUFFERED or BUFFERED_PARTIAL +// mode is chosen, in multiple messages if the STREAMED mode is chosen, and not +// at all otherwise. +// * Request trailers: Delivered if they are present and if the trailer mode is set +// to SEND. +// * Response headers: Contains the headers from the HTTP response. Keep in mind +// that if the upstream system sends them before processing the request body that +// this message may arrive before the complete body. +// * Response body: Sent according to the processing mode like the request body. +// * Response trailers: Delivered according to the processing mode like the +// request trailers. +// +// By default, the processor sends only the request and response headers messages. +// This may be changed to include any of the six steps by changing the processing_mode +// setting of the filter configuration, or by setting the mode_override of any response +// from the external processor. This way, a processor may, for example, use information +// in the request header to determine whether the message body must be examined, or whether +// the proxy should simply stream it straight through. // // All of this together allows a server to process the filter traffic in fairly // sophisticated ways. For example: @@ -53,17 +91,16 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // // The protocol itself is based on a bidirectional gRPC stream. Envoy will send the // server -// :ref:`ProcessingRequest ` +// :ref:`ProcessingRequest ` // messages, and the server must reply with -// :ref:`ProcessingResponse `. +// :ref:`ProcessingResponse `. -// [#next-free-field: 9] +// [#next-free-field: 10] message ExternalProcessor { // Configuration for the gRPC service that the filter will communicate with. // The filter supports both the "Envoy" and "Google" gRPC clients. config.core.v3.GrpcService grpc_service = 1; - // [#not-implemented-hide:] // By default, if the gRPC stream cannot be established, or if it is closed // prematurely with an error, the filter will fail. Specifically, if the // response headers have not yet been delivered, then it will return a 500 @@ -73,7 +110,6 @@ message ExternalProcessor { // or could not be opened, processing continues without error. bool failure_mode_allow = 2; - // [#not-implemented-hide:] // Specifies default options for how HTTP headers, trailers, and bodies are // sent. See ProcessingMode for details. ProcessingMode processing_mode = 3; @@ -102,22 +138,28 @@ message ExternalProcessor { // for the list of supported attributes and their types. repeated string response_attributes = 6; - // [#not-implemented-hide:] // Specifies the timeout for each individual message sent on the stream and // when the filter is running in synchronous mode. Whenever // the proxy sends a message on the stream that requires a response, it will // reset this timer, and will stop processing and return an error (subject - // to the processing mode) if the timer expires. There is no timeout when - // the filter is running in asynchronous mode. Default is 200 ms. + // to the processing mode) if the timer expires before a matching response. + // is received. There is no timeout when the filter is running in asynchronous + // mode. Default is 200 milliseconds. google.protobuf.Duration message_timeout = 7; - // [#not-implemented-hide:] // Optional additional prefix to use when emitting statistics. This allows to distinguish // emitted statistics between configured *ext_proc* filters in an HTTP filter chain. string stat_prefix = 8; + + // Rules that determine what modifications an external processing server may + // make to message headers. If not set, all headers may be modified except + // for "host", ":authority", ":scheme", ":method", and headers that start + // with the header prefix set via + // :ref:`header_prefix ` + // (which is usually "x-envoy"). + config.common.mutation_rules.v3.HeaderMutationRules mutation_rules = 9; } -// [#not-implemented-hide:] // Extra settings that may be added to per-route configuration for a // virtual host or cluster. message ExtProcPerRoute { @@ -128,23 +170,29 @@ message ExtProcPerRoute { // If disabled is specified in multiple per-filter-configs, the most specific one will be used. bool disabled = 1 [(validate.rules).bool = {const: true}]; - // Override aspects of the configuration for this route + // Override aspects of the configuration for this route. A set of + // overrides in a more specific configuration will override a "disabled" + // flag set in a less-specific one. ExtProcOverrides overrides = 2; } } -// [#not-implemented-hide:] // Overrides that may be set on a per-route basis message ExtProcOverrides { // Set a different processing mode for this route than the default. ProcessingMode processing_mode = 1; + // [#not-implemented-hide:] // Set a different asynchronous processing option than the default. bool async_mode = 2; - // Set different optional properties than the default. - repeated string request_properties = 3; + // [#not-implemented-hide:] + // Set different optional attributes than the default setting of the + // ``request_attributes`` field. + repeated string request_attributes = 3; - // Set different optional properties than the default. - repeated string response_properties = 4; + // [#not-implemented-hide:] + // Set different optional properties than the default setting of the + // ``response_attributes`` field. + repeated string response_attributes = 4; } diff --git a/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.proto b/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto similarity index 90% rename from api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.proto rename to api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto index d085790d34..9c692a17d5 100644 --- a/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.proto +++ b/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto @@ -1,15 +1,18 @@ syntax = "proto3"; -package envoy.extensions.filters.http.ext_proc.v3alpha; +package envoy.extensions.filters.http.ext_proc.v3; + +import "xds/annotations/v3/status.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_proc.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_proc.v3"; option java_outer_classname = "ProcessingModeProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_proc/v3;ext_procv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; // [#protodoc-title: External Processing Filter] // External Processing Filter Processing Mode diff --git a/api/envoy/extensions/filters/http/fault/v3/fault.proto b/api/envoy/extensions/filters/http/fault/v3/fault.proto index d28ed28b11..64dbf89e43 100644 --- a/api/envoy/extensions/filters/http/fault/v3/fault.proto +++ b/api/envoy/extensions/filters/http/fault/v3/fault.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.fault.v3"; option java_outer_classname = "FaultProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/fault/v3;faultv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Fault Injection] @@ -54,7 +55,7 @@ message FaultAbort { type.v3.FractionalPercent percentage = 3; } -// [#next-free-field: 15] +// [#next-free-field: 16] message HTTPFault { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.fault.v2.HTTPFault"; @@ -76,7 +77,7 @@ message HTTPFault { // injection filter can be applied selectively to requests that match a set of // headers specified in the fault filter config. The chances of actual fault // injection further depend on the value of the :ref:`percentage - // ` field. + // ` field. // The filter will check the request's headers against all the specified // headers in the filter config. A match will happen if all the headers in the // config are present in the request with the same values (or based on @@ -141,4 +142,10 @@ message HTTPFault { // The runtime key to override the :ref:`default ` // runtime. The default is: fault.http.abort.grpc_status string abort_grpc_status_runtime = 14; + + // To control whether stats storage is allocated dynamically for each downstream server. + // If set to true, "x-envoy-downstream-service-cluster" field of header will be ignored by this filter. + // If set to false, dynamic stats storage will be allocated for the downstream cluster name. + // Default value is false. + bool disable_downstream_cluster_stats = 15; } diff --git a/api/envoy/extensions/filters/http/fault/v4alpha/fault.proto b/api/envoy/extensions/filters/http/fault/v4alpha/fault.proto deleted file mode 100644 index 7dd4f48aa4..0000000000 --- a/api/envoy/extensions/filters/http/fault/v4alpha/fault.proto +++ /dev/null @@ -1,144 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.fault.v4alpha; - -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/extensions/filters/common/fault/v3/fault.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.fault.v4alpha"; -option java_outer_classname = "FaultProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Fault Injection] -// Fault Injection :ref:`configuration overview `. -// [#extension: envoy.filters.http.fault] - -// [#next-free-field: 6] -message FaultAbort { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.fault.v3.FaultAbort"; - - // Fault aborts are controlled via an HTTP header (if applicable). See the - // :ref:`HTTP fault filter ` documentation for - // more information. - message HeaderAbort { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.fault.v3.FaultAbort.HeaderAbort"; - } - - reserved 1; - - oneof error_type { - option (validate.required) = true; - - // HTTP status code to use to abort the HTTP request. - uint32 http_status = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // gRPC status code to use to abort the gRPC request. - uint32 grpc_status = 5; - - // Fault aborts are controlled via an HTTP header (if applicable). - HeaderAbort header_abort = 4; - } - - // The percentage of requests/operations/connections that will be aborted with the error code - // provided. - type.v3.FractionalPercent percentage = 3; -} - -// [#next-free-field: 15] -message HTTPFault { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.fault.v3.HTTPFault"; - - // If specified, the filter will inject delays based on the values in the - // object. - common.fault.v3.FaultDelay delay = 1; - - // If specified, the filter will abort requests based on the values in - // the object. At least *abort* or *delay* must be specified. - FaultAbort abort = 2; - - // Specifies the name of the (destination) upstream cluster that the - // filter should match on. Fault injection will be restricted to requests - // bound to the specific upstream cluster. - string upstream_cluster = 3; - - // Specifies a set of headers that the filter should match on. The fault - // injection filter can be applied selectively to requests that match a set of - // headers specified in the fault filter config. The chances of actual fault - // injection further depend on the value of the :ref:`percentage - // ` field. - // The filter will check the request's headers against all the specified - // headers in the filter 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). - repeated config.route.v4alpha.HeaderMatcher headers = 4; - - // Faults are injected for the specified list of downstream hosts. If this - // setting is not set, faults are injected for all downstream nodes. - // Downstream node name is taken from :ref:`the HTTP - // x-envoy-downstream-service-node - // ` header and compared - // against downstream_nodes list. - repeated string downstream_nodes = 5; - - // The maximum number of faults that can be active at a single time via the configured fault - // filter. Note that because this setting can be overridden at the route level, it's possible - // for the number of active faults to be greater than this value (if injected via a different - // route). If not specified, defaults to unlimited. This setting can be overridden via - // `runtime ` and any faults that are not injected - // due to overflow will be indicated via the `faults_overflow - // ` stat. - // - // .. attention:: - // Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy - // limit. It's possible for the number of active faults to rise slightly above the configured - // amount due to the implementation details. - google.protobuf.UInt32Value max_active_faults = 6; - - // The response rate limit to be applied to the response body of the stream. When configured, - // the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent - // ` runtime key. - // - // .. attention:: - // This is a per-stream limit versus a connection level limit. This means that concurrent streams - // will each get an independent limit. - common.fault.v3.FaultRateLimit response_rate_limit = 7; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_delay_percent - string delay_percent_runtime = 8; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.abort_percent - string abort_percent_runtime = 9; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_duration_ms - string delay_duration_runtime = 10; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.http_status - string abort_http_status_runtime = 11; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.max_active_faults - string max_active_faults_runtime = 12; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.rate_limit.response_percent - string response_rate_limit_percent_runtime = 13; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.grpc_status - string abort_grpc_status_runtime = 14; -} diff --git a/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto b/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto new file mode 100644 index 0000000000..12d8d5bf54 --- /dev/null +++ b/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.gcp_authn.v3; + +import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/http_uri.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.gcp_authn.v3"; +option java_outer_classname = "GcpAuthnProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/gcp_authn/v3;gcp_authnv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: GCP authentication] +// GCP authentication :ref:`configuration overview `. +// [#extension: envoy.filters.http.gcp_authn] + +// Filter configuration. +message GcpAuthnFilterConfig { + // The HTTP URI to fetch tokens from GCE Metadata Server(https://cloud.google.com/compute/docs/metadata/overview). + // The URL format is "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=[AUDIENCE]" + config.core.v3.HttpUri http_uri = 1 [(validate.rules).message = {required: true}]; + + // Retry policy for fetching tokens. + // This field is optional. If it is not configured, the filter will be fail-closed (i.e., reject the requests). + config.core.v3.RetryPolicy retry_policy = 2; +} + +message Audience { + // The map of audience key to audience value. + // The key is defined as the contract with control plane in the configuration. It is fixed string "audience_key". + // The value is URL of the receiving service that performs token authentication. + map audience_map = 1; +} diff --git a/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto b/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto index 7e31da49e9..8bfe85b234 100644 --- a/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto +++ b/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_http1_bridge.v3"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_http1_bridge/v3;grpc_http1_bridgev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC HTTP/1.1 Bridge] @@ -18,4 +19,11 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; message Config { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.grpc_http1_bridge.v2.Config"; + + // If true then requests with content type set to `application/x-protobuf` will be automatically converted to gRPC. + // This works by prepending the payload data with the gRPC header frame, as defined by the wiring format, and + // Content-Type will be updated accordingly before sending the request. + // For the requests that went through this upgrade the filter will also strip the frame before forwarding the + // response to the client. + bool upgrade_protobuf_to_grpc = 1; } diff --git a/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto b/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto index b2c4ad2ee6..8fb93cf817 100644 --- a/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto +++ b/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3;grpc_http1_reverse_bridgev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC HTTP/1.1 Reverse Bridge] @@ -28,8 +29,25 @@ message FilterConfig { // If true, Envoy will assume that the upstream doesn't understand gRPC frames and // strip the gRPC frame from the request, and add it back in to the response. This will // hide the gRPC semantics from the upstream, allowing it to receive and respond with a - // simple binary encoded protobuf. + // simple binary encoded protobuf. In order to calculate the `Content-Length` header value, Envoy + // will buffer the upstream response unless :ref:`response_size_header + // ` + // is set, in which case Envoy will use the value of an upstream header to calculate the content + // length. bool withhold_grpc_frames = 2; + + // When :ref:`withhold_grpc_frames + // ` + // is true, this option controls how Envoy calculates the `Content-Length`. When + // *response_size_header* is empty, Envoy will buffer the upstream response to calculate its + // size. When *response_size_header* is set to a non-empty string, Envoy will stream the response + // to the downstream and it will use the value of the response header with this name to set the + // `Content-Length` header and gRPC frame size. If the header with this name is repeated, only + // the first value will be used. + // + // Envoy will treat the upstream response as an error if this option is specified and the header + // is missing or if the value does not match the actual response body size. + string response_size_header = 3; } // gRPC reverse bridge filter configuration per virtualhost/route/weighted-cluster level. diff --git a/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto b/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto index 007ccabc3e..dacd69ea20 100644 --- a/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto +++ b/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto @@ -9,13 +9,22 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_json_transcoder.v3"; option java_outer_classname = "TranscoderProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_json_transcoder/v3;grpc_json_transcoderv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC-JSON transcoder] // gRPC-JSON transcoder :ref:`configuration overview `. // [#extension: envoy.filters.http.grpc_json_transcoder] -// [#next-free-field: 11] +// [#next-free-field: 14] +// GrpcJsonTranscoder filter configuration. +// The filter itself can be used per route / per virtual host or on the general level. The most +// specific one is being used for a given route. If the list of services is empty - filter +// is considered to be disabled. +// Note that if specifying the filter per route, first the route is matched, and then transcoding +// filter is applied. It matters when specifying the route configuration and paths to match the +// request - for per-route grpc transcoder configs, the original path should be matched, while +// in other cases, the grpc-like path is expected (the one AFTER the filter is applied). message GrpcJsonTranscoder { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder"; @@ -61,6 +70,25 @@ message GrpcJsonTranscoder { bool preserve_proto_field_names = 4; } + message RequestValidationOptions { + // By default, a request that cannot be mapped to any specified gRPC + // :ref:`services ` + // will pass-through this filter. + // When set to true, the request will be rejected with a ``HTTP 404 Not Found``. + bool reject_unknown_method = 1; + + // By default, a request with query parameters that cannot be mapped to the gRPC request message + // will pass-through this filter. + // When set to true, the request will be rejected with a ``HTTP 400 Bad Request``. + // + // The fields + // :ref:`ignore_unknown_query_parameters ` + // and + // :ref:`ignored_query_parameters ` + // have priority over this strict validation behavior. + bool reject_unknown_query_parameters = 2; + } + oneof descriptor_set { option (validate.required) = true; @@ -80,7 +108,13 @@ message GrpcJsonTranscoder { // the transcoder will translate. If the service name doesn't exist in ``proto_descriptor``, // Envoy will fail at startup. The ``proto_descriptor`` may contain more services than // the service names specified here, but they won't be translated. - repeated string services = 2 [(validate.rules).repeated = {min_items: 1}]; + // + // By default, the filter will pass through requests that do not map to any specified services. + // If the list of services is empty, filter is considered disabled. + // However, this behavior changes if + // :ref:`reject_unknown_method ` + // is enabled. + repeated string services = 2; // Control options for response JSON. These options are passed directly to // `JsonPrintOptions `. + // In order to transcode the message, the ``google.rpc.RequestInfo`` type from + // the ``google/rpc/error_details.proto`` should be included in the configured + // :ref:`proto descriptor set `. bool convert_grpc_status = 9; // URL unescaping policy. - // This spec is only applied when extracting variable with multiple segments. + // This spec is only applied when extracting variable with multiple segments in the URL path. // For example, in case of `/foo/{x=*}/bar/{y=prefix/*}/{z=**}` `x` variable is single segment and `y` and `z` are multiple segments. // For a path with `/foo/first/bar/prefix/second/third/fourth`, `x=first`, `y=prefix/second`, `z=third/fourth`. - // If this setting is not specified, the value defaults to :ref:`ALL_CHARACTERS_EXCEPT_RESERVED`. + // If this setting is not specified, the value defaults to :ref:`ALL_CHARACTERS_EXCEPT_RESERVED`. UrlUnescapeSpec url_unescape_spec = 10 [(validate.rules).enum = {defined_only: true}]; + + // If true, unescape '+' to space when extracting variables in query parameters. + // This is to support `HTML 2.0 `_ + bool query_param_unescape_plus = 12; + + // If true, try to match the custom verb even if it is unregistered. By + // default, only match when it is registered. + // + // According to the http template `syntax `_, + // the custom verb is **":" LITERAL** at the end of http template. + // + // For a request with */foo/bar:baz* and *:baz* is not registered in any url_template, here is the behavior change + // - if the field is not set, *:baz* will not be treated as custom verb, so it will match **/foo/{x=*}**. + // - if the field is set, *:baz* is treated as custom verb, so it will NOT match **/foo/{x=*}** since the template doesn't use any custom verb. + bool match_unregistered_custom_verb = 13; + + // Configure the behavior when handling requests that cannot be transcoded. + // + // By default, the transcoder will silently pass through HTTP requests that are malformed. + // This includes requests with unknown query parameters, unregister paths, etc. + // + // Set these options to enable strict HTTP request validation, resulting in the transcoder rejecting + // such requests with a ``HTTP 4xx``. See each individual option for more details on the validation. + // gRPC requests will still silently pass through without transcoding. + // + // The benefit is a proper error message to the downstream. + // If the upstream is a gRPC server, it cannot handle the passed-through HTTP requests and will reset + // the TCP connection. The downstream will then + // receive a ``HTTP 503 Service Unavailable`` due to the upstream connection reset. + // This incorrect error message may conflict with other Envoy components, such as retry policies. + RequestValidationOptions request_validation_options = 11; } diff --git a/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto b/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto index ff56066410..403e480e02 100644 --- a/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto +++ b/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto @@ -8,11 +8,11 @@ import "google/protobuf/wrappers.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_stats.v3"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_stats/v3;grpc_statsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC statistics] gRPC statistics filter @@ -47,19 +47,17 @@ message FilterConfig { // // .. attention:: // If neither `individual_method_stats_allowlist` nor `stats_for_all_methods` is set, the - // behavior will default to `stats_for_all_methods=true`. This default value is deprecated, - // and in a future release, if neither field is set, it will default to - // `stats_for_all_methods=false` in order to be safe by default. This behavior can be - // controlled with runtime override + // behavior will default to `stats_for_all_methods=false`. This default value is changed due + // to the previous value being deprecated. This behavior can be changed with runtime override // `envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default`. google.protobuf.BoolValue stats_for_all_methods = 3; } // If true, the filter will gather a histogram for the request time of the upstream. // It works with :ref:`stats_for_all_methods - // ` + // ` // and :ref:`individual_method_stats_allowlist - // ` the same way + // ` the same way // request_message_count and response_message_count works. bool enable_upstream_stats = 4; } diff --git a/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto b/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto index 8161139f54..7475c69b01 100644 --- a/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto +++ b/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_web.v3"; option java_outer_classname = "GrpcWebProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_web/v3;grpc_webv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: gRPC Web] diff --git a/api/envoy/extensions/filters/http/gzip/v3/gzip.proto b/api/envoy/extensions/filters/http/gzip/v3/gzip.proto index 20cae5c400..f29e7eb415 100644 --- a/api/envoy/extensions/filters/http/gzip/v3/gzip.proto +++ b/api/envoy/extensions/filters/http/gzip/v3/gzip.proto @@ -13,11 +13,10 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.gzip.v3"; option java_outer_classname = "GzipProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/gzip/v3;gzipv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Gzip] -// Gzip :ref:`configuration overview `. -// [#extension: envoy.filters.http.gzip] // [#next-free-field: 12] message Gzip { @@ -72,9 +71,8 @@ message Gzip { // zlib manual > deflateInit2. google.protobuf.UInt32Value window_bits = 9 [(validate.rules).uint32 = {lte: 15 gte: 9}]; - // Set of configuration parameters common for all compression filters. If this field is set then - // the fields `content_length`, `content_type`, `disable_on_etag_header` and - // `remove_accept_encoding_header` are ignored. + // Set of configuration parameters common for all compression filters. You can define + // `content_length`, `content_type` and other parameters in this field. compressor.v3.Compressor compressor = 10; // Value for Zlib's next output buffer. If not set, defaults to 4096. diff --git a/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.proto b/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.proto deleted file mode 100644 index f89be9a697..0000000000 --- a/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.proto +++ /dev/null @@ -1,84 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.gzip.v4alpha; - -import "envoy/extensions/filters/http/compressor/v4alpha/compressor.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.gzip.v4alpha"; -option java_outer_classname = "GzipProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Gzip] -// Gzip :ref:`configuration overview `. -// [#extension: envoy.filters.http.gzip] - -// [#next-free-field: 12] -message Gzip { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.gzip.v3.Gzip"; - - enum CompressionStrategy { - DEFAULT = 0; - FILTERED = 1; - HUFFMAN = 2; - RLE = 3; - } - - message CompressionLevel { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.gzip.v3.Gzip.CompressionLevel"; - - enum Enum { - DEFAULT = 0; - BEST = 1; - SPEED = 2; - } - } - - reserved 2, 6, 7, 8; - - reserved "content_length", "content_type", "disable_on_etag_header", - "remove_accept_encoding_header"; - - // Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values - // use more memory, but are faster and produce better compression results. The default value is 5. - google.protobuf.UInt32Value memory_level = 1 [(validate.rules).uint32 = {lte: 9 gte: 1}]; - - // A value used for selecting the zlib compression level. This setting will affect speed and - // amount of compression applied to the content. "BEST" provides higher compression at the cost of - // higher latency, "SPEED" provides lower compression with minimum impact on response time. - // "DEFAULT" provides an optimal result between speed and compression. This field will be set to - // "DEFAULT" if not specified. - CompressionLevel.Enum compression_level = 3 [(validate.rules).enum = {defined_only: true}]; - - // A value used for selecting the zlib compression strategy which is directly related to the - // characteristics of the content. Most of the time "DEFAULT" will be the best choice, though - // there are situations which changing this parameter might produce better results. For example, - // run-length encoding (RLE) is typically used when the content is known for having sequences - // which same data occurs many consecutive times. For more information about each strategy, please - // refer to zlib manual. - CompressionStrategy compression_strategy = 4 [(validate.rules).enum = {defined_only: true}]; - - // Value from 9 to 15 that represents the base two logarithmic of the compressor's window size. - // Larger window results in better compression at the expense of memory usage. The default is 12 - // which will produce a 4096 bytes window. For more details about this parameter, please refer to - // zlib manual > deflateInit2. - google.protobuf.UInt32Value window_bits = 9 [(validate.rules).uint32 = {lte: 15 gte: 9}]; - - // Set of configuration parameters common for all compression filters. If this field is set then - // the fields `content_length`, `content_type`, `disable_on_etag_header` and - // `remove_accept_encoding_header` are ignored. - compressor.v4alpha.Compressor compressor = 10; - - // Value for Zlib's next output buffer. If not set, defaults to 4096. - // See https://www.zlib.net/manual.html for more details. Also see - // https://github.com/envoyproxy/envoy/issues/8448 for context on this filter's performance. - google.protobuf.UInt32Value chunk_size = 11 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; -} diff --git a/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto b/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto index 5e399790a7..eb97e36726 100644 --- a/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto +++ b/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.header_to_metadata.v3"; option java_outer_classname = "HeaderToMetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/header_to_metadata/v3;header_to_metadatav3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Header-To-Metadata Filter] diff --git a/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.proto b/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.proto deleted file mode 100644 index 5b06f1e785..0000000000 --- a/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.proto +++ /dev/null @@ -1,130 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.header_to_metadata.v4alpha; - -import "envoy/type/matcher/v4alpha/regex.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.header_to_metadata.v4alpha"; -option java_outer_classname = "HeaderToMetadataProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Header-To-Metadata Filter] -// -// The configuration for transforming headers into metadata. This is useful -// for matching load balancer subsets, logging, etc. -// -// Header to Metadata :ref:`configuration overview `. -// [#extension: envoy.filters.http.header_to_metadata] - -message Config { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.header_to_metadata.v3.Config"; - - enum ValueType { - STRING = 0; - - NUMBER = 1; - - // The value is a serialized `protobuf.Value - // `_. - PROTOBUF_VALUE = 2; - } - - // ValueEncode defines the encoding algorithm. - enum ValueEncode { - // The value is not encoded. - NONE = 0; - - // The value is encoded in `Base64 `_. - // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the - // non-ASCII characters in the header. - BASE64 = 1; - } - - // [#next-free-field: 7] - message KeyValuePair { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.header_to_metadata.v3.Config.KeyValuePair"; - - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_len: 1}]; - - oneof value_type { - // The value to pair with the given key. - // - // When used for a - // :ref:`on_header_present ` - // case, if value is non-empty it'll be used instead of the header value. If both are empty, no metadata is added. - // - // When used for a :ref:`on_header_missing ` - // case, a non-empty value must be provided otherwise no metadata is added. - string value = 3; - - // If present, the header's value will be matched and substituted with this. If there is no match or substitution, the header value - // is used as-is. - // - // This is only used for :ref:`on_header_present `. - // - // Note: if the `value` field is non-empty this field should be empty. - type.matcher.v4alpha.RegexMatchAndSubstitute regex_value_rewrite = 6; - } - - // The value's type — defaults to string. - ValueType type = 4 [(validate.rules).enum = {defined_only: true}]; - - // How is the value encoded, default is NONE (not encoded). - // The value will be decoded accordingly before storing to metadata. - ValueEncode encode = 5; - } - - // A Rule defines what metadata to apply when a header is present or missing. - // [#next-free-field: 6] - message Rule { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.header_to_metadata.v3.Config.Rule"; - - oneof header_cookie_specifier { - // Specifies that a match will be performed on the value of a header or a cookie. - // - // The header to be extracted. - string header = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The cookie to be extracted. - string cookie = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - } - - // If the header or cookie is present, apply this metadata KeyValuePair. - // - // If the value in the KeyValuePair is non-empty, it'll be used instead - // of the header or cookie value. - KeyValuePair on_present = 2; - - // If the header or cookie is not present, apply this metadata KeyValuePair. - // - // The value in the KeyValuePair must be set, since it'll be used in lieu - // of the missing header or cookie value. - KeyValuePair on_missing = 3; - - // Whether or not to remove the header after a rule is applied. - // - // This prevents headers from leaking. - // This field is not supported in case of a cookie. - bool remove = 4; - } - - // The list of rules to apply to requests. - repeated Rule request_rules = 1; - - // The list of rules to apply to responses. - repeated Rule response_rules = 2; -} diff --git a/api/envoy/extensions/filters/http/health_check/v3/health_check.proto b/api/envoy/extensions/filters/http/health_check/v3/health_check.proto index f3a0c42c38..146ea3cf37 100644 --- a/api/envoy/extensions/filters/http/health_check/v3/health_check.proto +++ b/api/envoy/extensions/filters/http/health_check/v3/health_check.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.health_check.v3"; option java_outer_classname = "HealthCheckProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/health_check/v3;health_checkv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Health check] diff --git a/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.proto b/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.proto deleted file mode 100644 index 3725d085dd..0000000000 --- a/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.health_check.v4alpha; - -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.health_check.v4alpha"; -option java_outer_classname = "HealthCheckProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Health check] -// Health check :ref:`configuration overview `. -// [#extension: envoy.filters.http.health_check] - -// [#next-free-field: 6] -message HealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.health_check.v3.HealthCheck"; - - reserved 2; - - // Specifies whether the filter operates in pass through mode or not. - google.protobuf.BoolValue pass_through_mode = 1 [(validate.rules).message = {required: true}]; - - // If operating in pass through mode, the amount of time in milliseconds - // that the filter should cache the upstream response. - google.protobuf.Duration cache_time = 3; - - // If operating in non-pass-through mode, specifies a set of upstream cluster - // names and the minimum percentage of servers in each of those clusters that - // must be healthy or degraded in order for the filter to return a 200. - // - // .. note:: - // - // This value is interpreted as an integer by truncating, so 12.50% will be calculated - // as if it were 12%. - map cluster_min_healthy_percentages = 4; - - // Specifies a set of health check request headers to match on. The health check filter will - // check a request’s headers against all the specified headers. To specify the health check - // endpoint, set the ``:path`` header to match on. - repeated config.route.v4alpha.HeaderMatcher headers = 5; -} diff --git a/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto b/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto index a23ad9dea0..edc9ef12ef 100644 --- a/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto +++ b/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.ip_tagging.v3"; option java_outer_classname = "IpTaggingProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ip_tagging/v3;ip_taggingv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: IP tagging] diff --git a/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto b/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto index 08ef7a09fe..7b535d268e 100644 --- a/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto +++ b/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto @@ -16,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.jwt_authn.v3"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/jwt_authn/v3;jwt_authnv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: JWT Authentication] @@ -52,7 +53,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // cache_duration: // seconds: 300 // -// [#next-free-field: 11] +// [#next-free-field: 15] message JwtProvider { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.jwt_authn.v2alpha.JwtProvider"; @@ -60,10 +61,8 @@ message JwtProvider { // Specify the `principal `_ that issued // the JWT, usually a URL or an email address. // - // It is optional. If specified, it has to match the *iss* field in JWT. - // - // If a JWT has *iss* field and this field is specified, they have to match, otherwise the - // JWT *iss* field is not checked. + // It is optional. If specified, it has to match the *iss* field in JWT, + // otherwise the JWT *iss* field is not checked. // // Note: *JwtRequirement* :ref:`allow_missing ` // and :ref:`allow_missing_or_failed ` @@ -137,6 +136,7 @@ message JwtProvider { // If false, the JWT is removed in the request after a success verification. If true, the JWT is // not removed in the request. Default value is false. + // caveat: only works for from_header & has no effect for JWTs extracted through from_params & from_cookies. bool forward = 5; // Two fields below define where to extract the JWT from an HTTP request. @@ -181,6 +181,19 @@ message JwtProvider { // repeated string from_params = 7; + // JWT is sent in a cookie. `from_cookies` represents the cookie names to extract from. + // + // For example, if config is: + // + // .. code-block:: yaml + // + // from_cookies: + // - auth-token + // + // Then JWT will be extracted from `auth-token` cookie in the request. + // + repeated string from_cookies = 13; + // This field specifies the header name to forward a successfully verified JWT payload to the // backend. The forwarded data is:: // @@ -190,6 +203,15 @@ message JwtProvider { string forward_payload_header = 8 [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; + // When :ref:`forward_payload_header ` + // is specified, the base64 encoded payload will be added to the headers. + // Normally JWT based64 encode doesn't add padding. If this field is true, + // the header will be padded. + // + // This field is only relevant if :ref:`forward_payload_header ` + // is specified. + bool pad_forward_payload_header = 11; + // If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata // in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn** // The value is the *protobuf::Struct*. The value of this field will be the key for its *fields* @@ -208,9 +230,59 @@ message JwtProvider { // string payload_in_metadata = 9; + // If not empty, similar to :ref:`payload_in_metadata `, + // a successfully verified JWT header will be written to :ref:`Dynamic State ` + // as an entry (``protobuf::Struct``) in **envoy.filters.http.jwt_authn** *namespace* with the + // value of this field as the key. + // + // For example, if ``header_in_metadata`` is *my_header*: + // + // .. code-block:: yaml + // + // envoy.filters.http.jwt_authn: + // my_header: + // alg: JWT + // kid: EF71iSaosbC5C4tC6Syq1Gm647M + // alg: PS256 + // + // When the metadata has **envoy.filters.http.jwt_authn** entry already (for example if + // :ref:`payload_in_metadata ` + // is not empty), it will be inserted as a new entry in the same *namespace* as shown below: + // + // .. code-block:: yaml + // + // envoy.filters.http.jwt_authn: + // my_payload: + // iss: https://example.com + // sub: test@example.com + // aud: https://example.com + // exp: 1501281058 + // my_header: + // alg: JWT + // kid: EF71iSaosbC5C4tC6Syq1Gm647M + // alg: PS256 + // + // .. warning:: + // Using the same key name for :ref:`header_in_metadata ` + // and :ref:`payload_in_metadata ` + // is not suggested due to potential override of existing entry, while it is not enforced during + // config validation. + // + string header_in_metadata = 14; + // Specify the clock skew in seconds when verifying JWT time constraint, // such as `exp`, and `nbf`. If not specified, default is 60 seconds. uint32 clock_skew_seconds = 10; + + // Enables JWT cache, its size is specified by *jwt_cache_size*. + // Only valid JWT tokens are cached. + JwtCacheConfig jwt_cache_config = 12; +} + +// This message specifies JWT Cache configuration. +message JwtCacheConfig { + // The unit is number of JWT tokens, default to 100. + uint32 jwt_cache_size = 1; } // This message specifies how to fetch JWKS from remote and how to cache it. @@ -232,6 +304,66 @@ message RemoteJwks { // Duration after which the cached JWKS should be expired. If not specified, default cache // duration is 5 minutes. google.protobuf.Duration cache_duration = 2; + + // Fetch Jwks asynchronously in the main thread before the listener is activated. + // Fetched Jwks can be used by all worker threads. + // + // If this feature is not enabled: + // + // * The Jwks is fetched on-demand when the requests come. During the fetching, first + // few requests are paused until the Jwks is fetched. + // * Each worker thread fetches its own Jwks since Jwks cache is per worker thread. + // + // If this feature is enabled: + // + // * Fetched Jwks is done in the main thread before the listener is activated. Its fetched + // Jwks can be used by all worker threads. Each worker thread doesn't need to fetch its own. + // * Jwks is ready when the requests come, not need to wait for the Jwks fetching. + // + JwksAsyncFetch async_fetch = 3; + + // Retry policy for fetching Jwks. optional. turned off by default. + // + // For example: + // + // .. code-block:: yaml + // + // retry_policy: + // retry_back_off: + // base_interval: 0.01s + // max_interval: 20s + // num_retries: 10 + // + // will yield a randomized truncated exponential backoff policy with an initial delay of 10ms + // 10 maximum attempts spaced at most 20s seconds. + // + // .. code-block:: yaml + // + // retry_policy: + // num_retries:1 + // + // uses the default :ref:`retry backoff strategy `. + // with the default base interval is 1000 milliseconds. and the default maximum interval of 10 times the base interval. + // + // if num_retries is omitted, the default is to allow only one retry. + // + // + // If enabled, the retry policy will apply to all Jwks fetching approaches, e.g. on demand or asynchronously in background. + // + // + config.core.v3.RetryPolicy retry_policy = 4; +} + +// Fetch Jwks asynchronously in the main thread when the filter config is parsed. +// The listener is activated only after the Jwks is fetched. +// When the Jwks is expired in the cache, it is fetched again in the main thread. +// The fetched Jwks from the main thread can be used by all worker threads. +message JwksAsyncFetch { + // If false, the listener is activated after the initial fetch is completed. + // The initial fetch result can be either successful or failed. + // If true, it is activated without waiting for the initial fetch to complete. + // Default is false. + bool fast_listener = 1; } // This message specifies a header location to extract JWT token. @@ -449,7 +581,8 @@ message FilterStateRule { // A map of string keys to requirements. The string key is the string value // in the FilterState with the name specified in the *name* field above. - map requires = 3; + map + requires = 3; } // This is the Envoy HTTP filter config for JWT authentication. diff --git a/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.proto b/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.proto deleted file mode 100644 index 7656f09912..0000000000 --- a/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.proto +++ /dev/null @@ -1,589 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.jwt_authn.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/http_uri.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.jwt_authn.v4alpha"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: JWT Authentication] -// JWT Authentication :ref:`configuration overview `. -// [#extension: envoy.filters.http.jwt_authn] - -// Please see following for JWT authentication flow: -// -// * `JSON Web Token (JWT) `_ -// * `The OAuth 2.0 Authorization Framework `_ -// * `OpenID Connect `_ -// -// A JwtProvider message specifies how a JSON Web Token (JWT) can be verified. It specifies: -// -// * issuer: the principal that issues the JWT. If specified, it has to match the *iss* field in JWT. -// * allowed audiences: the ones in the token have to be listed here. -// * how to fetch public key JWKS to verify the token signature. -// * how to extract JWT token in the request. -// * how to pass successfully verified token payload. -// -// Example: -// -// .. code-block:: yaml -// -// issuer: https://example.com -// audiences: -// - bookstore_android.apps.googleusercontent.com -// - bookstore_web.apps.googleusercontent.com -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// timeout: 1s -// cache_duration: -// seconds: 300 -// -// [#next-free-field: 11] -message JwtProvider { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.JwtProvider"; - - // Specify the `principal `_ that issued - // the JWT, usually a URL or an email address. - // - // It is optional. If specified, it has to match the *iss* field in JWT. - // - // If a JWT has *iss* field and this field is specified, they have to match, otherwise the - // JWT *iss* field is not checked. - // - // Note: *JwtRequirement* :ref:`allow_missing ` - // and :ref:`allow_missing_or_failed ` - // are implemented differently than other *JwtRequirements*. Hence the usage of this field - // is different as follows if *allow_missing* or *allow_missing_or_failed* is used: - // - // * If a JWT has *iss* field, it needs to be specified by this field in one of *JwtProviders*. - // * If a JWT doesn't have *iss* field, one of *JwtProviders* should fill this field empty. - // * Multiple *JwtProviders* should not have same value in this field. - // - // Example: https://securetoken.google.com - // Example: 1234567-compute@developer.gserviceaccount.com - // - string issuer = 1; - - // The list of JWT `audiences `_ are - // allowed to access. A JWT containing any of these audiences will be accepted. If not specified, - // will not check audiences in the token. - // - // Example: - // - // .. code-block:: yaml - // - // audiences: - // - bookstore_android.apps.googleusercontent.com - // - bookstore_web.apps.googleusercontent.com - // - repeated string audiences = 2; - - // `JSON Web Key Set (JWKS) `_ is needed to - // validate signature of a JWT. This field specifies where to fetch JWKS. - oneof jwks_source_specifier { - option (validate.required) = true; - - // JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP - // URI and how the fetched JWKS should be cached. - // - // Example: - // - // .. code-block:: yaml - // - // remote_jwks: - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // timeout: 1s - // cache_duration: - // seconds: 300 - // - RemoteJwks remote_jwks = 3; - - // JWKS is in local data source. It could be either in a local file or embedded in the - // inline_string. - // - // Example: local file - // - // .. code-block:: yaml - // - // local_jwks: - // filename: /etc/envoy/jwks/jwks1.txt - // - // Example: inline_string - // - // .. code-block:: yaml - // - // local_jwks: - // inline_string: ACADADADADA - // - config.core.v4alpha.DataSource local_jwks = 4; - } - - // If false, the JWT is removed in the request after a success verification. If true, the JWT is - // not removed in the request. Default value is false. - bool forward = 5; - - // Two fields below define where to extract the JWT from an HTTP request. - // - // If no explicit location is specified, the following default locations are tried in order: - // - // 1. The Authorization header using the `Bearer schema - // `_. Example:: - // - // Authorization: Bearer . - // - // 2. `access_token `_ query parameter. - // - // Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations - // its provider specified or from the default locations. - // - // Specify the HTTP headers to extract JWT token. For examples, following config: - // - // .. code-block:: yaml - // - // from_headers: - // - name: x-goog-iap-jwt-assertion - // - // can be used to extract token from header:: - // - // ``x-goog-iap-jwt-assertion: ``. - // - repeated JwtHeader from_headers = 6; - - // JWT is sent in a query parameter. `jwt_params` represents the query parameter names. - // - // For example, if config is: - // - // .. code-block:: yaml - // - // from_params: - // - jwt_token - // - // The JWT format in query parameter is:: - // - // /path?jwt_token= - // - repeated string from_params = 7; - - // This field specifies the header name to forward a successfully verified JWT payload to the - // backend. The forwarded data is:: - // - // base64url_encoded(jwt_payload_in_JSON) - // - // If it is not specified, the payload will not be forwarded. - string forward_payload_header = 8 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata - // in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn** - // The value is the *protobuf::Struct*. The value of this field will be the key for its *fields* - // and the value is the *protobuf::Struct* converted from JWT JSON payload. - // - // For example, if payload_in_metadata is *my_payload*: - // - // .. code-block:: yaml - // - // envoy.filters.http.jwt_authn: - // my_payload: - // iss: https://example.com - // sub: test@example.com - // aud: https://example.com - // exp: 1501281058 - // - string payload_in_metadata = 9; - - // Specify the clock skew in seconds when verifying JWT time constraint, - // such as `exp`, and `nbf`. If not specified, default is 60 seconds. - uint32 clock_skew_seconds = 10; -} - -// This message specifies how to fetch JWKS from remote and how to cache it. -message RemoteJwks { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks"; - - // The HTTP URI to fetch the JWKS. For example: - // - // .. code-block:: yaml - // - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // timeout: 1s - // - config.core.v4alpha.HttpUri http_uri = 1; - - // Duration after which the cached JWKS should be expired. If not specified, default cache - // duration is 5 minutes. - google.protobuf.Duration cache_duration = 2; -} - -// This message specifies a header location to extract JWT token. -message JwtHeader { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.JwtHeader"; - - // The HTTP header name. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The value prefix. The value format is "value_prefix" - // For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the - // end. - string value_prefix = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; -} - -// Specify a required provider with audiences. -message ProviderWithAudiences { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences"; - - // Specify a required provider name. - string provider_name = 1; - - // This field overrides the one specified in the JwtProvider. - repeated string audiences = 2; -} - -// This message specifies a Jwt requirement. An empty message means JWT verification is not -// required. Here are some config examples: -// -// .. code-block:: yaml -// -// # Example 1: not required with an empty message -// -// # Example 2: require A -// provider_name: provider-A -// -// # Example 3: require A or B -// requires_any: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 4: require A and B -// requires_all: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 5: require A and (B or C) -// requires_all: -// requirements: -// - provider_name: provider-A -// - requires_any: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 6: require A or (B and C) -// requires_any: -// requirements: -// - provider_name: provider-A -// - requires_all: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 7: A is optional (if token from A is provided, it must be valid, but also allows -// missing token.) -// requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// -// # Example 8: A is optional and B is required. -// requires_all: -// requirements: -// - requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// - provider_name: provider-B -// -// [#next-free-field: 7] -message JwtRequirement { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement"; - - oneof requires_type { - // Specify a required provider name. - string provider_name = 1; - - // Specify a required provider with audiences. - ProviderWithAudiences provider_and_audiences = 2; - - // Specify list of JwtRequirement. Their results are OR-ed. - // If any one of them passes, the result is passed. - JwtRequirementOrList requires_any = 3; - - // Specify list of JwtRequirement. Their results are AND-ed. - // All of them must pass, if one of them fails or missing, it fails. - JwtRequirementAndList requires_all = 4; - - // The requirement is always satisfied even if JWT is missing or the JWT - // verification fails. A typical usage is: this filter is used to only verify - // JWTs and pass the verified JWT payloads to another filter, the other filter - // will make decision. In this mode, all JWT tokens will be verified. - google.protobuf.Empty allow_missing_or_failed = 5; - - // The requirement is satisfied if JWT is missing, but failed if JWT is - // presented but invalid. Similar to allow_missing_or_failed, this is used - // to only verify JWTs and pass the verified payload to another filter. The - // different is this mode will reject requests with invalid tokens. - google.protobuf.Empty allow_missing = 6; - } -} - -// This message specifies a list of RequiredProvider. -// Their results are OR-ed; if any one of them passes, the result is passed -message JwtRequirementOrList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList"; - - // Specify a list of JwtRequirement. - repeated JwtRequirement requirements = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// This message specifies a list of RequiredProvider. -// Their results are AND-ed; all of them must pass, if one of them fails or missing, it fails. -message JwtRequirementAndList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList"; - - // Specify a list of JwtRequirement. - repeated JwtRequirement requirements = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// This message specifies a Jwt requirement for a specific Route condition. -// Example 1: -// -// .. code-block:: yaml -// -// - match: -// prefix: /healthz -// -// In above example, "requires" field is empty for /healthz prefix match, -// it means that requests matching the path prefix don't require JWT authentication. -// -// Example 2: -// -// .. code-block:: yaml -// -// - match: -// prefix: / -// requires: { provider_name: provider-A } -// -// In above example, all requests matched the path prefix require jwt authentication -// from "provider-A". -message RequirementRule { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.RequirementRule"; - - // The route matching parameter. Only when the match is satisfied, the "requires" field will - // apply. - // - // For example: following match will match all requests. - // - // .. code-block:: yaml - // - // match: - // prefix: / - // - config.route.v4alpha.RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Specify a Jwt requirement. - // If not specified, Jwt verification is disabled. - oneof requirement_type { - // Specify a Jwt requirement. Please see detail comment in message JwtRequirement. - JwtRequirement requires = 2; - - // Use requirement_name to specify a Jwt requirement. - // This requirement_name MUST be specified at the - // :ref:`requirement_map ` - // in `JwtAuthentication`. - string requirement_name = 3 [(validate.rules).string = {min_len: 1}]; - } -} - -// This message specifies Jwt requirements based on stream_info.filterState. -// This FilterState should use `Router::StringAccessor` object to set a string value. -// Other HTTP filters can use it to specify Jwt requirements dynamically. -// -// Example: -// -// .. code-block:: yaml -// -// name: jwt_selector -// requires: -// issuer_1: -// provider_name: issuer1 -// issuer_2: -// provider_name: issuer2 -// -// If a filter set "jwt_selector" with "issuer_1" to FilterState for a request, -// jwt_authn filter will use JwtRequirement{"provider_name": "issuer1"} to verify. -message FilterStateRule { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule"; - - // The filter state name to retrieve the `Router::StringAccessor` object. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A map of string keys to requirements. The string key is the string value - // in the FilterState with the name specified in the *name* field above. - map requires = 3; -} - -// This is the Envoy HTTP filter config for JWT authentication. -// -// For example: -// -// .. code-block:: yaml -// -// providers: -// provider1: -// issuer: issuer1 -// audiences: -// - audience1 -// - audience2 -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// timeout: 1s -// provider2: -// issuer: issuer2 -// local_jwks: -// inline_string: jwks_string -// -// rules: -// # Not jwt verification is required for /health path -// - match: -// prefix: /health -// -// # Jwt verification for provider1 is required for path prefixed with "prefix" -// - match: -// prefix: /prefix -// requires: -// provider_name: provider1 -// -// # Jwt verification for either provider1 or provider2 is required for all other requests. -// - match: -// prefix: / -// requires: -// requires_any: -// requirements: -// - provider_name: provider1 -// - provider_name: provider2 -// -// [#next-free-field: 6] -message JwtAuthentication { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication"; - - // Map of provider names to JwtProviders. - // - // .. code-block:: yaml - // - // providers: - // provider1: - // issuer: issuer1 - // audiences: - // - audience1 - // - audience2 - // remote_jwks: - // http_uri: - // uri: https://example.com/.well-known/jwks.json - // cluster: example_jwks_cluster - // timeout: 1s - // provider2: - // issuer: provider2 - // local_jwks: - // inline_string: jwks_string - // - map providers = 1; - - // Specifies requirements based on the route matches. The first matched requirement will be - // applied. If there are overlapped match conditions, please put the most specific match first. - // - // Examples - // - // .. code-block:: yaml - // - // rules: - // - match: - // prefix: /healthz - // - match: - // prefix: /baz - // requires: - // provider_name: provider1 - // - match: - // prefix: /foo - // requires: - // requires_any: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - match: - // prefix: /bar - // requires: - // requires_all: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - repeated RequirementRule rules = 2; - - // This message specifies Jwt requirements based on stream_info.filterState. - // Other HTTP filters can use it to specify Jwt requirements dynamically. - // The *rules* field above is checked first, if it could not find any matches, - // check this one. - FilterStateRule filter_state_rules = 3; - - // When set to true, bypass the `CORS preflight request - // `_ regardless of JWT - // requirements specified in the rules. - bool bypass_cors_preflight = 4; - - // A map of unique requirement_names to JwtRequirements. - // :ref:`requirement_name ` - // in `PerRouteConfig` uses this map to specify a JwtRequirement. - map requirement_map = 5; -} - -// Specify per-route config. -message PerRouteConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.jwt_authn.v3.PerRouteConfig"; - - oneof requirement_specifier { - option (validate.required) = true; - - // Disable Jwt Authentication for this route. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Use requirement_name to specify a JwtRequirement. - // This requirement_name MUST be specified at the - // :ref:`requirement_map ` - // in `JwtAuthentication`. If no, the requests using this route will be rejected with 403. - string requirement_name = 2 [(validate.rules).string = {min_len: 1}]; - } -} diff --git a/api/envoy/extensions/filters/http/kill_request/v3/kill_request.proto b/api/envoy/extensions/filters/http/kill_request/v3/kill_request.proto index fc531923ae..b4de117a3a 100644 --- a/api/envoy/extensions/filters/http/kill_request/v3/kill_request.proto +++ b/api/envoy/extensions/filters/http/kill_request/v3/kill_request.proto @@ -5,11 +5,12 @@ package envoy.extensions.filters.http.kill_request.v3; import "envoy/type/v3/percent.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.kill_request.v3"; option java_outer_classname = "KillRequestProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/kill_request/v3;kill_requestv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Kill Request] @@ -18,9 +19,19 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // Configuration for KillRequest filter. message KillRequest { + // On which direction should the filter check for the `kill_request_header`. + // Default to `REQUEST` if unspecified. + enum Direction { + REQUEST = 0; + RESPONSE = 1; + } + // The probability that a Kill request will be triggered. type.v3.FractionalPercent probability = 1; // The name of the kill request header. If this field is not empty, it will override the :ref:`default header ` name. Otherwise the default header name will be used. - string kill_request_header = 2; + string kill_request_header = 2 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; + + Direction direction = 3 [(validate.rules).enum = {defined_only: true}]; } diff --git a/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto b/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto index 94f21edd3e..ad98da0a50 100644 --- a/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto +++ b/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto @@ -3,23 +3,24 @@ syntax = "proto3"; package envoy.extensions.filters.http.local_ratelimit.v3; import "envoy/config/core/v3/base.proto"; +import "envoy/extensions/common/ratelimit/v3/ratelimit.proto"; import "envoy/type/v3/http_status.proto"; import "envoy/type/v3/token_bucket.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.local_ratelimit.v3"; option java_outer_classname = "LocalRateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/local_ratelimit/v3;local_ratelimitv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Local Rate limit] // Local Rate limit :ref:`configuration overview `. // [#extension: envoy.filters.http.local_ratelimit] -// [#next-free-field: 7] +// [#next-free-field: 13] message LocalRateLimit { // The human readable prefix to use when emitting stats. string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; @@ -47,7 +48,7 @@ message LocalRateLimit { // // .. note:: // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive + // ` must be >= 50ms to avoid too aggressive // refills. type.v3.TokenBucket token_bucket = 3; @@ -63,8 +64,53 @@ message LocalRateLimit { // Defaults to 0% of requests for safety. config.core.v3.RuntimeFractionalPercent filter_enforced = 5; + // Specifies a list of HTTP headers that should be added to each request that + // has been rate limited and is also forwarded upstream. This can only occur when the + // filter is enabled but not enforced. + repeated config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 10 + [(validate.rules).repeated = {max_items: 10}]; + // Specifies a list of HTTP headers that should be added to each response for requests that - // have been rate limited. + // have been rate limited. This occurs when the filter is either enabled or fully enforced. repeated config.core.v3.HeaderValueOption response_headers_to_add = 6 [(validate.rules).repeated = {max_items: 10}]; + + // The rate limit descriptor list to use in the local rate limit to override + // on. The rate limit descriptor is selected by the first full match from the + // request descriptors. + // + // Example on how to use ::ref:`this ` + // + // .. note:: + // + // In the current implementation the descriptor's token bucket :ref:`fill_interval + // ` must be a multiple + // global :ref:`token bucket's` fill interval. + // + // The descriptors must match verbatim for rate limiting to apply. There is no partial + // match by a subset of descriptor entries in the current implementation. + repeated common.ratelimit.v3.LocalRateLimitDescriptor descriptors = 8; + + // Specifies the rate limit configurations to be applied with the same + // stage number. If not set, the default stage number is 0. + // + // .. note:: + // + // The filter supports a range of 0 - 10 inclusively for stage numbers. + uint32 stage = 9 [(validate.rules).uint32 = {lte: 10}]; + + // Specifies the scope of the rate limiter's token bucket. + // If set to false, the token bucket is shared across all worker threads, + // thus the rate limits are applied per Envoy process. + // If set to true, a token bucket is allocated for each connection. + // Thus the rate limits are applied per connection thereby allowing + // one to rate limit requests on a per connection basis. + // If unspecified, the default value is false. + bool local_rate_limit_per_downstream_connection = 11; + + // Defines the standard version to use for X-RateLimit headers emitted by the filter. + // + // Disabled by default. + common.ratelimit.v3.XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 12 + [(validate.rules).enum = {defined_only: true}]; } diff --git a/api/envoy/extensions/filters/http/lua/v3/lua.proto b/api/envoy/extensions/filters/http/lua/v3/lua.proto index 1636c01ab1..e406cd4a7e 100644 --- a/api/envoy/extensions/filters/http/lua/v3/lua.proto +++ b/api/envoy/extensions/filters/http/lua/v3/lua.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.lua.v3"; option java_outer_classname = "LuaProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/lua/v3;luav3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Lua] diff --git a/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.proto b/api/envoy/extensions/filters/http/oauth2/v3/oauth.proto similarity index 65% rename from api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.proto rename to api/envoy/extensions/filters/http/oauth2/v3/oauth.proto index e4be64167e..9b9ca85541 100644 --- a/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.proto +++ b/api/envoy/extensions/filters/http/oauth2/v3/oauth.proto @@ -1,22 +1,19 @@ syntax = "proto3"; -package envoy.extensions.filters.http.oauth2.v3alpha; +package envoy.extensions.filters.http.oauth2.v3; import "envoy/config/core/v3/http_uri.proto"; import "envoy/config/route/v3/route_components.proto"; import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; import "envoy/type/matcher/v3/path.proto"; -import "google/protobuf/duration.proto"; - import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.http.oauth2.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.http.oauth2.v3"; option java_outer_classname = "OauthProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/oauth2/v3;oauth2v3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: OAuth] @@ -25,6 +22,24 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // message OAuth2Credentials { + message CookieNames { + // Cookie name to hold OAuth bearer token value. When the authentication server validates the + // client and returns an authorization token back to the OAuth filter, no matter what format + // that token is, if :ref:`forward_bearer_token ` + // is set to true the filter will send over the bearer token as a cookie with this name to the + // upstream. Defaults to ``BearerToken``. + string bearer_token = 1 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; + + // Cookie name to hold OAuth HMAC value. Defaults to ``OauthHMAC``. + string oauth_hmac = 2 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; + + // Cookie name to hold OAuth expiry value. Defaults to ``OauthExpires``. + string oauth_expires = 3 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; + } + // The client_id to be used in the authorize calls. This value will be URL encoded when sent to the OAuth server. string client_id = 1 [(validate.rules).string = {min_len: 1}]; @@ -40,11 +55,14 @@ message OAuth2Credentials { transport_sockets.tls.v3.SdsSecretConfig hmac_secret = 3 [(validate.rules).message = {required: true}]; } + + // The cookie names used in OAuth filters flow. + CookieNames cookie_names = 4; } // OAuth config // -// [#next-free-field: 9] +// [#next-free-field: 11] message OAuth2Config { // Endpoint on the authorization server to retrieve the access token from. config.core.v3.HttpUri token_endpoint = 1; @@ -74,6 +92,15 @@ message OAuth2Config { // Any request that matches any of the provided matchers will be passed through without OAuth validation. repeated config.route.v3.HeaderMatcher pass_through_matcher = 8; + + // Optional list of OAuth scopes to be claimed in the authorization request. If not specified, + // defaults to "user" scope. + // OAuth RFC https://tools.ietf.org/html/rfc6749#section-3.3 + repeated string auth_scopes = 9; + + // Optional resource parameter for authorization request + // RFC: https://tools.ietf.org/html/rfc8707 + repeated string resources = 10; } // Filter config. diff --git a/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.proto b/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.proto deleted file mode 100644 index ee51e1f960..0000000000 --- a/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.oauth2.v4alpha; - -import "envoy/config/core/v4alpha/http_uri.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/extensions/transport_sockets/tls/v4alpha/secret.proto"; -import "envoy/type/matcher/v4alpha/path.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.oauth2.v4alpha"; -option java_outer_classname = "OauthProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: OAuth] -// OAuth :ref:`configuration overview `. -// [#extension: envoy.filters.http.oauth2] -// - -message OAuth2Credentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Credentials"; - - // The client_id to be used in the authorize calls. This value will be URL encoded when sent to the OAuth server. - string client_id = 1 [(validate.rules).string = {min_len: 1}]; - - // The secret used to retrieve the access token. This value will be URL encoded when sent to the OAuth server. - transport_sockets.tls.v4alpha.SdsSecretConfig token_secret = 2 - [(validate.rules).message = {required: true}]; - - // Configures how the secret token should be created. - oneof token_formation { - option (validate.required) = true; - - // If present, the secret token will be a HMAC using the provided secret. - transport_sockets.tls.v4alpha.SdsSecretConfig hmac_secret = 3 - [(validate.rules).message = {required: true}]; - } -} - -// OAuth config -// -// [#next-free-field: 9] -message OAuth2Config { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config"; - - // Endpoint on the authorization server to retrieve the access token from. - config.core.v4alpha.HttpUri token_endpoint = 1; - - // The endpoint redirect to for authorization in response to unauthorized requests. - string authorization_endpoint = 2 [(validate.rules).string = {min_len: 1}]; - - // Credentials used for OAuth. - OAuth2Credentials credentials = 3 [(validate.rules).message = {required: true}]; - - // The redirect URI passed to the authorization endpoint. Supports header formatting - // tokens. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers `. - // - // This URI should not contain any query parameters. - string redirect_uri = 4 [(validate.rules).string = {min_len: 1}]; - - // Matching criteria used to determine whether a path appears to be the result of a redirect from the authorization server. - type.matcher.v4alpha.PathMatcher redirect_path_matcher = 5 - [(validate.rules).message = {required: true}]; - - // The path to sign a user out, clearing their credential cookies. - type.matcher.v4alpha.PathMatcher signout_path = 6 [(validate.rules).message = {required: true}]; - - // Forward the OAuth token as a Bearer to upstream web service. - bool forward_bearer_token = 7; - - // Any request that matches any of the provided matchers will be passed through without OAuth validation. - repeated config.route.v4alpha.HeaderMatcher pass_through_matcher = 8; -} - -// Filter config. -message OAuth2 { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.oauth2.v3alpha.OAuth2"; - - // Leave this empty to disable OAuth2 for a specific route, using per filter config. - OAuth2Config config = 1; -} diff --git a/api/envoy/extensions/filters/http/on_demand/v3/on_demand.proto b/api/envoy/extensions/filters/http/on_demand/v3/on_demand.proto index 5c6b96540c..6f04ada1e9 100644 --- a/api/envoy/extensions/filters/http/on_demand/v3/on_demand.proto +++ b/api/envoy/extensions/filters/http/on_demand/v3/on_demand.proto @@ -4,11 +4,11 @@ package envoy.extensions.filters.http.on_demand.v3; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.on_demand.v3"; option java_outer_classname = "OnDemandProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/on_demand/v3;on_demandv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: OnDemand] diff --git a/api/envoy/extensions/filters/http/original_src/v3/original_src.proto b/api/envoy/extensions/filters/http/original_src/v3/original_src.proto index 507c9728fb..3f67a2f6e3 100644 --- a/api/envoy/extensions/filters/http/original_src/v3/original_src.proto +++ b/api/envoy/extensions/filters/http/original_src/v3/original_src.proto @@ -4,11 +4,11 @@ package envoy.extensions.filters.http.original_src.v3; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.original_src.v3"; option java_outer_classname = "OriginalSrcProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/original_src/v3;original_srcv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Original Src Filter] diff --git a/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto b/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto index bc58e7f9b2..daaae6a730 100644 --- a/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto +++ b/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto @@ -2,7 +2,11 @@ syntax = "proto3"; package envoy.extensions.filters.http.ratelimit.v3; +import "envoy/config/core/v3/extension.proto"; import "envoy/config/ratelimit/v3/rls.proto"; +import "envoy/config/route/v3/route_components.proto"; +import "envoy/type/metadata/v3/metadata.proto"; +import "envoy/type/v3/http_status.proto"; import "google/protobuf/duration.proto"; @@ -13,18 +17,21 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.ratelimit.v3"; option java_outer_classname = "RateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ratelimit/v3;ratelimitv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Rate limit] // Rate limit :ref:`configuration overview `. // [#extension: envoy.filters.http.ratelimit] -// [#next-free-field: 10] +// [#next-free-field: 11] message RateLimit { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.rate_limit.v2.RateLimit"; // Defines the version of the standard to use for X-RateLimit headers. + // + // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.XRateLimitHeadersRFCVersion instead.] enum XRateLimitHeadersRFCVersion { // X-RateLimit headers disabled. OFF = 0; @@ -96,6 +103,8 @@ message RateLimit { // the `draft RFC `_. // // Disabled by default. + // + // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.XRateLimitHeadersRFCVersion instead.] XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 8 [(validate.rules).enum = {defined_only: true}]; @@ -103,6 +112,222 @@ message RateLimit { // in case of rate limiting (i.e. 429 responses). // Having this header not present potentially makes the request retriable. bool disable_x_envoy_ratelimited_header = 9; + + // This field allows for a custom HTTP response status code to the downstream client when + // the request has been rate limited. + // Defaults to 429 (TooManyRequests). + // + // .. note:: + // If this is set to < 400, 429 will be used instead. + type.v3.HttpStatus rate_limited_status = 10; +} + +// Global rate limiting :ref:`architecture overview `. +// Also applies to Local rate limiting :ref:`using descriptors `. +// [#not-implemented-hide:] +message RateLimitConfig { + // [#next-free-field: 10] + message Action { + // The following descriptor entry is appended to the descriptor: + // + // .. code-block:: cpp + // + // ("source_cluster", "") + // + // is derived from the :option:`--service-cluster` option. + message SourceCluster { + } + + // 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. + message DestinationCluster { + } + + // The following descriptor entry is appended when a header contains a key that matches the + // *header_name*: + // + // .. code-block:: cpp + // + // ("", "") + message RequestHeaders { + // 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. + string header_name = 1 + [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; + + // The key to use in the descriptor entry. + string descriptor_key = 2 [(validate.rules).string = {min_len: 1}]; + + // If set to true, Envoy skips the descriptor while calling rate limiting service + // when header is not present in the request. By default it skips calling the + // rate limiting service if this header is not present in the request. + bool skip_if_absent = 3; + } + + // 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", "") + message RemoteAddress { + } + + // The following descriptor entry is appended to the descriptor: + // + // .. code-block:: cpp + // + // ("generic_key", "") + message GenericKey { + // The value to use in the descriptor entry. + string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; + + // An optional key to use in the descriptor entry. If not set it defaults + // to 'generic_key' as the descriptor key. + string descriptor_key = 2; + } + + // The following descriptor entry is appended to the descriptor: + // + // .. code-block:: cpp + // + // ("header_match", "") + message HeaderValueMatch { + // The value to use in the descriptor entry. + string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; + + // 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. + bool expect_match = 2; + + // 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). + repeated config.route.v3.HeaderMatcher headers = 3 + [(validate.rules).repeated = {min_items: 1}]; + } + + // The following descriptor entry is appended when the metadata contains a key value: + // + // .. code-block:: cpp + // + // ("", "") + message MetaData { + enum Source { + // Query :ref:`dynamic metadata ` + DYNAMIC = 0; + + // Query :ref:`route entry metadata ` + ROUTE_ENTRY = 1; + } + + // The key to use in the descriptor entry. + string descriptor_key = 1 [(validate.rules).string = {min_len: 1}]; + + // Metadata struct that defines the key and path to retrieve the string value. A match will + // only happen if the value in the metadata is of type string. + type.metadata.v3.MetadataKey metadata_key = 2 [(validate.rules).message = {required: true}]; + + // An optional value to use if *metadata_key* is empty. If not set and + // no value is present under the metadata_key then no descriptor is generated. + string default_value = 3; + + // Source of metadata + Source source = 4 [(validate.rules).enum = {defined_only: true}]; + } + + oneof action_specifier { + option (validate.required) = true; + + // Rate limit on source cluster. + SourceCluster source_cluster = 1; + + // Rate limit on destination cluster. + DestinationCluster destination_cluster = 2; + + // Rate limit on request headers. + RequestHeaders request_headers = 3; + + // Rate limit on remote address. + RemoteAddress remote_address = 4; + + // Rate limit on a generic key. + GenericKey generic_key = 5; + + // Rate limit on the existence of request headers. + HeaderValueMatch header_value_match = 6; + + // Rate limit on metadata. + MetaData metadata = 8; + + // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. + // [#extension-category: envoy.rate_limit_descriptors] + config.core.v3.TypedExtensionConfig extension = 9; + } + } + + message Override { + // Fetches the override from the dynamic metadata. + message DynamicMetadata { + // Metadata struct that defines the key and path to retrieve the struct value. + // The value must be a struct containing an integer "requests_per_unit" property + // and a "unit" property with a value parseable to :ref:`RateLimitUnit + // enum ` + type.metadata.v3.MetadataKey metadata_key = 1 [(validate.rules).message = {required: true}]; + } + + oneof override_specifier { + option (validate.required) = true; + + // Limit override from dynamic metadata. + DynamicMetadata dynamic_metadata = 1; + } + } + + // 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. + uint32 stage = 1 [(validate.rules).uint32 = {lte: 10}]; + + // The key to be set in runtime to disable this rate limit configuration. + string disable_key = 2; + + // 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. + repeated Action actions = 3 [(validate.rules).repeated = {min_items: 1}]; + + // An optional limit override to be appended to the descriptor produced by this + // rate limit configuration. If the override value is invalid or cannot be resolved + // from metadata, no override is provided. See :ref:`rate limit override + // ` for more information. + Override limit = 4; } message RateLimitPerRoute { @@ -117,6 +342,32 @@ message RateLimitPerRoute { IGNORE = 2; } + // The override option determines how the filter handles the cases where there is an override config at a more specific level than this one (from least to most specific: virtual host, route, cluster weight). + // [#not-implemented-hide:] + enum OverrideOptions { + // Client-defined default, typically OVERRIDE_POLICY. If VhRateLimitsOptions is set, that will be used instead. + DEFAULT = 0; + + // If there is an override config at a more specific level, use that instead of this one. + OVERRIDE_POLICY = 1; + + // If there is an override config at a more specific level, use data from both. + INCLUDE_POLICY = 2; + + // If there is an override config at a more specific level, ignore it and use only this one. + IGNORE_POLICY = 3; + } + // Specifies if the rate limit filter should include the virtual host rate limits. VhRateLimitsOptions vh_rate_limits = 1 [(validate.rules).enum = {defined_only: true}]; + + // Specifies if the rate limit filter should include the lower levels (route level, virtual host level or cluster weight level) rate limits override options. + // [#not-implemented-hide:] + OverrideOptions override_option = 2 [(validate.rules).enum = {defined_only: true}]; + + // Rate limit configuration. If not set, uses the + // :ref:`VirtualHost.rate_limits` or + // :ref:`RouteAction.rate_limits` fields instead. + // [#not-implemented-hide:] + repeated RateLimitConfig rate_limits = 3; } diff --git a/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.proto b/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.proto deleted file mode 100644 index 688be29e6a..0000000000 --- a/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.proto +++ /dev/null @@ -1,125 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.ratelimit.v4alpha; - -import "envoy/config/ratelimit/v4alpha/rls.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ratelimit.v4alpha"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.http.ratelimit] - -// [#next-free-field: 10] -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ratelimit.v3.RateLimit"; - - // Defines the version of the standard to use for X-RateLimit headers. - enum XRateLimitHeadersRFCVersion { - // X-RateLimit headers disabled. - OFF = 0; - - // Use `draft RFC Version 03 `_. - DRAFT_VERSION_03 = 1; - } - - // The rate limit domain to use when calling the rate limit service. - string domain = 1 [(validate.rules).string = {min_len: 1}]; - - // Specifies the rate limit configurations to be applied with the same - // stage number. If not set, the default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - uint32 stage = 2 [(validate.rules).uint32 = {lte: 10}]; - - // The type of requests the filter should apply to. The supported - // types are *internal*, *external* or *both*. A request is considered internal if - // :ref:`x-envoy-internal` is set to true. If - // :ref:`x-envoy-internal` is not set or false, a - // request is considered external. The filter defaults to *both*, and it will apply to all request - // types. - string request_type = 3 - [(validate.rules).string = {in: "internal" in: "external" in: "both" in: ""}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 4; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - bool failure_mode_deny = 5; - - // Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead - // of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The - // HTTP code will be 200 for a gRPC response. - bool rate_limited_as_resource_exhausted = 6; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - config.ratelimit.v4alpha.RateLimitServiceConfig rate_limit_service = 7 - [(validate.rules).message = {required: true}]; - - // Defines the standard version to use for X-RateLimit headers emitted by the filter: - // - // * ``X-RateLimit-Limit`` - indicates the request-quota associated to the - // client in the current time-window followed by the description of the - // quota policy. The values are returned by the rate limiting service in - // :ref:`current_limit` - // field. Example: `10, 10;w=1;name="per-ip", 1000;w=3600`. - // * ``X-RateLimit-Remaining`` - indicates the remaining requests in the - // current time-window. The values are returned by the rate limiting service - // in :ref:`limit_remaining` - // field. - // * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of - // the current time-window. The values are returned by the rate limiting service - // in :ref:`duration_until_reset` - // field. - // - // In case rate limiting policy specifies more then one time window, the values - // above represent the window that is closest to reaching its limit. - // - // For more information about the headers specification see selected version of - // the `draft RFC `_. - // - // Disabled by default. - XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 8 - [(validate.rules).enum = {defined_only: true}]; - - // Disables emitting the :ref:`x-envoy-ratelimited` header - // in case of rate limiting (i.e. 429 responses). - // Having this header not present potentially makes the request retriable. - bool disable_x_envoy_ratelimited_header = 9; -} - -message RateLimitPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute"; - - enum VhRateLimitsOptions { - // Use the virtual host rate limits unless the route has a rate limit policy. - OVERRIDE = 0; - - // Use the virtual host rate limits even if the route has a rate limit policy. - INCLUDE = 1; - - // Ignore the virtual host rate limits even if the route does not have a rate limit policy. - IGNORE = 2; - } - - // Specifies if the rate limit filter should include the virtual host rate limits. - VhRateLimitsOptions vh_rate_limits = 1 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/api/envoy/extensions/filters/http/rbac/v3/rbac.proto b/api/envoy/extensions/filters/http/rbac/v3/rbac.proto index bae67ec5a0..008818456e 100644 --- a/api/envoy/extensions/filters/http/rbac/v3/rbac.proto +++ b/api/envoy/extensions/filters/http/rbac/v3/rbac.proto @@ -6,11 +6,11 @@ import "envoy/config/rbac/v3/rbac.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.rbac.v3"; option java_outer_classname = "RbacProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/rbac/v3;rbacv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: RBAC] @@ -24,12 +24,18 @@ message RBAC { // Specify the RBAC rules to be applied globally. // If absent, no enforcing RBAC policy will be applied. + // If present and empty, DENY. config.rbac.v3.RBAC rules = 1; // Shadow rules are not enforced by the filter (i.e., returning a 403) // but will emit stats and logs and can be used for rule testing. // If absent, no shadow RBAC policy will be applied. config.rbac.v3.RBAC shadow_rules = 2; + + // If specified, shadow rules will emit stats with the given prefix. + // This is useful to distinguish the stat when there are more than 1 RBAC filter configured with + // shadow rules. + string shadow_rules_stat_prefix = 3; } message RBACPerRoute { diff --git a/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.proto b/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.proto deleted file mode 100644 index ec65f5d7bc..0000000000 --- a/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.rbac.v4alpha; - -import "envoy/config/rbac/v4alpha/rbac.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.rbac.v4alpha"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: RBAC] -// Role-Based Access Control :ref:`configuration overview `. -// [#extension: envoy.filters.http.rbac] - -// RBAC filter config. -message RBAC { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.rbac.v3.RBAC"; - - // Specify the RBAC rules to be applied globally. - // If absent, no enforcing RBAC policy will be applied. - config.rbac.v4alpha.RBAC rules = 1; - - // Shadow rules are not enforced by the filter (i.e., returning a 403) - // but will emit stats and logs and can be used for rule testing. - // If absent, no shadow RBAC policy will be applied. - config.rbac.v4alpha.RBAC shadow_rules = 2; -} - -message RBACPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.rbac.v3.RBACPerRoute"; - - reserved 1; - - // Override the global configuration of the filter with this new config. - // If absent, the global RBAC policy will be disabled for this route. - RBAC rbac = 2; -} diff --git a/api/envoy/extensions/filters/http/response_map/v3/response_map.proto b/api/envoy/extensions/filters/http/response_map/v3/response_map.proto index 60bbf9e74b..3a9bbe8885 100644 --- a/api/envoy/extensions/filters/http/response_map/v3/response_map.proto +++ b/api/envoy/extensions/filters/http/response_map/v3/response_map.proto @@ -6,16 +6,15 @@ import "envoy/config/accesslog/v3/accesslog.proto"; import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/substitution_format_string.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.response_map.v3"; option java_outer_classname = "ResponseMapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/response_map/v3;response_mapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: ResponseMap] diff --git a/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.proto b/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.proto deleted file mode 100644 index 21262c5b6f..0000000000 --- a/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.response_map.v4alpha; - -import "envoy/config/accesslog/v4alpha/accesslog.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/substitution_format_string.proto"; - -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.response_map.v4alpha"; -option java_outer_classname = "ResponseMapProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: ResponseMap] -// Response map filter :ref:`configuration overview `. -// [#extension: envoy.filters.http.response_map] - -// The configuration to filter and change local response. -message ResponseMapper { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.response_map.v3.ResponseMapper"; - - // Filter to determine if this mapper should apply. - config.accesslog.v4alpha.AccessLogFilter filter = 1 [(validate.rules).message = {required: true}]; - - // The new response status code if specified. - google.protobuf.UInt32Value status_code = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // The new body text if specified. It will be used in the `%LOCAL_REPLY_BODY%` - // command operator in the `body_format`. - config.core.v4alpha.DataSource body = 3; - - config.core.v4alpha.SubstitutionFormatString body_format_override = 4; -} - -// The configuration to customize HTTP responses read by Envoy. -message ResponseMap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.response_map.v3.ResponseMap"; - - // Configuration of list of mappers which allows to filter and change HTTP response. - // The mappers will be checked by the specified order until one is matched. - repeated ResponseMapper mappers = 1; - - // The configuration to form response body from the :ref:`command operators ` - // and to specify response content type as one of: plain/text or application/json. - // - // Example one: plain/text body_format. - // - // .. code-block:: - // - // text_format: %LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=$REQ(:path)% - // - // The following response body in `plain/text` format will be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: - // - // upstream connection error:503:path=/foo - // - // Example two: application/json body_format. - // - // .. code-block:: - // - // json_format: - // status: %RESPONSE_CODE% - // message: %LOCAL_REPLY_BODY% - // path: $REQ(:path)% - // - // The following response body in "application/json" format would be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: json - // - // { - // "status": 503, - // "message": "upstream connection error", - // "path": "/foo" - // } - // - config.core.v4alpha.SubstitutionFormatString body_format = 2; -} - -// Extra settings on a per virtualhost/route/weighted-cluster level. -message ResponseMapPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.response_map.v3.ResponseMapPerRoute"; - - oneof override { - option (validate.required) = true; - - // Disable the response map filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Override the global configuration of the response map filter with this new config. - ResponseMap response_map = 2 [(validate.rules).message = {required: true}]; - } -} diff --git a/api/envoy/extensions/filters/http/router/v3/router.proto b/api/envoy/extensions/filters/http/router/v3/router.proto index 6ab64f92f2..7ce8b37dbb 100644 --- a/api/envoy/extensions/filters/http/router/v3/router.proto +++ b/api/envoy/extensions/filters/http/router/v3/router.proto @@ -13,13 +13,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.router.v3"; option java_outer_classname = "RouterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/router/v3;routerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Router] // Router :ref:`configuration overview `. // [#extension: envoy.filters.http.router] -// [#next-free-field: 7] +// [#next-free-field: 8] message Router { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.router.v2.Router"; @@ -78,4 +79,14 @@ message Router { // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress // Envoy, when deriving timeout for upstream cluster. bool respect_expected_rq_timeout = 6; + + // If set, Envoy will avoid incrementing HTTP failure code stats + // on gRPC requests. This includes the individual status code value + // (e.g. upstream_rq_504) and group stats (e.g. upstream_rq_5xx). + // This field is useful if interested in relying only on the gRPC + // stats filter to define success and failure metrics for gRPC requests + // as not all failed gRPC requests charge HTTP status code metrics. See + // :ref:`gRPC stats filter` documentation + // for more details. + bool suppress_grpc_request_failure_code_stats = 7; } diff --git a/api/envoy/extensions/filters/http/router/v4alpha/router.proto b/api/envoy/extensions/filters/http/router/v4alpha/router.proto deleted file mode 100644 index d0baaab84a..0000000000 --- a/api/envoy/extensions/filters/http/router/v4alpha/router.proto +++ /dev/null @@ -1,81 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.router.v4alpha; - -import "envoy/config/accesslog/v4alpha/accesslog.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.router.v4alpha"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Router] -// Router :ref:`configuration overview `. -// [#extension: envoy.filters.http.router] - -// [#next-free-field: 7] -message Router { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.router.v3.Router"; - - // Whether the router generates dynamic cluster statistics. Defaults to - // true. Can be disabled in high performance scenarios. - google.protobuf.BoolValue dynamic_stats = 1; - - // Whether to start a child span for egress routed calls. This can be - // useful in scenarios where other filters (auth, ratelimit, etc.) make - // outbound calls and have child spans rooted at the same ingress - // parent. Defaults to false. - bool start_child_span = 2; - - // Configuration for HTTP upstream logs emitted by the router. Upstream logs - // are configured in the same way as access logs, but each log entry represents - // an upstream request. Presuming retries are configured, multiple upstream - // requests may be made for each downstream (inbound) request. - repeated config.accesslog.v4alpha.AccessLog upstream_log = 3; - - // Do not add any additional *x-envoy-* headers to requests or responses. This - // only affects the :ref:`router filter generated *x-envoy-* headers - // `, other Envoy filters and the HTTP - // connection manager may continue to set *x-envoy-* headers. - bool suppress_envoy_headers = 4; - - // Specifies a list of HTTP headers to strictly validate. Envoy will reject a - // request and respond with HTTP status 400 if the request contains an invalid - // value for any of the headers listed in this field. Strict header checking - // is only supported for the following headers: - // - // Value must be a ','-delimited list (i.e. no spaces) of supported retry - // policy values: - // - // * :ref:`config_http_filters_router_x-envoy-retry-grpc-on` - // * :ref:`config_http_filters_router_x-envoy-retry-on` - // - // Value must be an integer: - // - // * :ref:`config_http_filters_router_x-envoy-max-retries` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` - repeated string strict_check_headers = 5 [(validate.rules).repeated = { - items { - string { - in: "x-envoy-upstream-rq-timeout-ms" - in: "x-envoy-upstream-rq-per-try-timeout-ms" - in: "x-envoy-max-retries" - in: "x-envoy-retry-grpc-on" - in: "x-envoy-retry-on" - } - } - }]; - - // If not set, ingress Envoy will ignore - // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress - // Envoy, when deriving timeout for upstream cluster. - bool respect_expected_rq_timeout = 6; -} diff --git a/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto b/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto new file mode 100644 index 0000000000..a50a1d4fad --- /dev/null +++ b/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.set_metadata.v3; + +import "google/protobuf/struct.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.set_metadata.v3"; +option java_outer_classname = "SetMetadataProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/set_metadata/v3;set_metadatav3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Set-Metadata Filter] +// +// This filters adds or updates dynamic metadata with static data. +// +// [#extension: envoy.filters.http.set_metadata] + +message Config { + // The metadata namespace. + string metadata_namespace = 1 [(validate.rules).string = {min_len: 1}]; + + // The value to update the namespace with. See + // :ref:`the filter documentation ` for + // more information on how this value is merged with potentially existing + // ones. + google.protobuf.Struct value = 2; +} diff --git a/api/envoy/extensions/filters/http/squash/v3/squash.proto b/api/envoy/extensions/filters/http/squash/v3/squash.proto deleted file mode 100644 index f9bc9ccece..0000000000 --- a/api/envoy/extensions/filters/http/squash/v3/squash.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.squash.v3; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.squash.v3"; -option java_outer_classname = "SquashProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Squash] -// Squash :ref:`configuration overview `. -// [#extension: envoy.filters.http.squash] - -// [#next-free-field: 6] -message Squash { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.squash.v2.Squash"; - - // The name of the cluster that hosts the Squash server. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // When the filter requests the Squash server to create a DebugAttachment, it will use this - // structure as template for the body of the request. It can contain reference to environment - // variables in the form of '{{ ENV_VAR_NAME }}'. These can be used to provide the Squash server - // with more information to find the process to attach the debugger to. For example, in a - // Istio/k8s environment, this will contain information on the pod: - // - // .. code-block:: json - // - // { - // "spec": { - // "attachment": { - // "pod": "{{ POD_NAME }}", - // "namespace": "{{ POD_NAMESPACE }}" - // }, - // "match_request": true - // } - // } - // - // (where POD_NAME, POD_NAMESPACE are configured in the pod via the Downward API) - google.protobuf.Struct attachment_template = 2; - - // The timeout for individual requests sent to the Squash cluster. Defaults to 1 second. - google.protobuf.Duration request_timeout = 3; - - // The total timeout Squash will delay a request and wait for it to be attached. Defaults to 60 - // seconds. - google.protobuf.Duration attachment_timeout = 4; - - // Amount of time to poll for the status of the attachment object in the Squash server - // (to check if has been attached). Defaults to 1 second. - google.protobuf.Duration attachment_poll_period = 5; -} diff --git a/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto b/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto new file mode 100644 index 0000000000..e3c612edaa --- /dev/null +++ b/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.stateful_session.v3; + +import "envoy/config/core/v3/extension.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.stateful_session.v3"; +option java_outer_classname = "StatefulSessionProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/stateful_session/v3;stateful_sessionv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Stateful session filter] +// Stateful session :ref:`configuration overview `. +// [#extension: envoy.filters.http.stateful_session] + +message StatefulSession { + // Specific implementation of session state. This session state will be used to store and + // get address of the upstream host to which the session is assigned. + // + // [#extension-category: envoy.http.stateful_session] + config.core.v3.TypedExtensionConfig session_state = 1; +} + +message StatefulSessionPerRoute { + oneof override { + option (validate.required) = true; + + // Disable the stateful session filter for this particular vhost or route. If disabled is + // specified in multiple per-filter-configs, the most specific one will be used. + bool disabled = 1 [(validate.rules).bool = {const: true}]; + + // Per-route stateful session configuration that can be served by RDS or static route table. + StatefulSession stateful_session = 2; + } +} diff --git a/api/envoy/extensions/filters/http/tap/v3/tap.proto b/api/envoy/extensions/filters/http/tap/v3/tap.proto index 81779443e4..edb2da6f4c 100644 --- a/api/envoy/extensions/filters/http/tap/v3/tap.proto +++ b/api/envoy/extensions/filters/http/tap/v3/tap.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.tap.v3"; option java_outer_classname = "TapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Tap] diff --git a/api/envoy/extensions/filters/http/tap/v4alpha/tap.proto b/api/envoy/extensions/filters/http/tap/v4alpha/tap.proto deleted file mode 100644 index 98798be8bf..0000000000 --- a/api/envoy/extensions/filters/http/tap/v4alpha/tap.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.tap.v4alpha; - -import "envoy/extensions/common/tap/v4alpha/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.tap.v4alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Tap] -// Tap :ref:`configuration overview `. -// [#extension: envoy.filters.http.tap] - -// Top level configuration for the tap filter. -message Tap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.http.tap.v3.Tap"; - - // Common configuration for the HTTP tap filter. - common.tap.v4alpha.CommonExtensionConfig common_config = 1 - [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/extensions/filters/http/wasm/v3/wasm.proto b/api/envoy/extensions/filters/http/wasm/v3/wasm.proto index 55eba141f4..e2751404f8 100644 --- a/api/envoy/extensions/filters/http/wasm/v3/wasm.proto +++ b/api/envoy/extensions/filters/http/wasm/v3/wasm.proto @@ -5,12 +5,11 @@ package envoy.extensions.filters.http.wasm.v3; import "envoy/extensions/wasm/v3/wasm.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.http.wasm.v3"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/wasm/v3;wasmv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Wasm] diff --git a/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto b/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto index cb439b0973..c8ee26d279 100644 --- a/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto +++ b/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.listener.http_inspector.v3"; option java_outer_classname = "HttpInspectorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/http_inspector/v3;http_inspectorv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP Inspector Filter] diff --git a/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto b/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto index 8239c5c42c..be6cf41e18 100644 --- a/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto +++ b/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.listener.original_dst.v3"; option java_outer_classname = "OriginalDstProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/original_dst/v3;original_dstv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Original Dst Filter] diff --git a/api/envoy/extensions/filters/listener/original_src/v3/original_src.proto b/api/envoy/extensions/filters/listener/original_src/v3/original_src.proto index 5fd07924d7..8cafe7d09c 100644 --- a/api/envoy/extensions/filters/listener/original_src/v3/original_src.proto +++ b/api/envoy/extensions/filters/listener/original_src/v3/original_src.proto @@ -4,11 +4,11 @@ package envoy.extensions.filters.listener.original_src.v3; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.listener.original_src.v3"; option java_outer_classname = "OriginalSrcProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/original_src/v3;original_srcv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Original Src Filter] diff --git a/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto b/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto index fb8047d391..1dd001b937 100644 --- a/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto +++ b/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.listener.proxy_protocol.v3"; option java_outer_classname = "ProxyProtocolProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/proxy_protocol/v3;proxy_protocolv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Proxy Protocol Filter] diff --git a/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto b/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto index eff9774844..40854d2ad3 100644 --- a/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto +++ b/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto @@ -2,12 +2,15 @@ syntax = "proto3"; package envoy.extensions.filters.listener.tls_inspector.v3; +import "google/protobuf/wrappers.proto"; + import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.listener.tls_inspector.v3"; option java_outer_classname = "TlsInspectorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/tls_inspector/v3;tls_inspectorv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: TLS Inspector Filter] @@ -17,4 +20,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; message TlsInspector { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.listener.tls_inspector.v2.TlsInspector"; + + // Populate `JA3` fingerprint hash using data from the TLS Client Hello packet. Default is false. + google.protobuf.BoolValue enable_ja3_fingerprinting = 1; } diff --git a/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto b/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto index 2ed14c7f0e..6b45a59e53 100644 --- a/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto +++ b/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.client_ssl_auth.v3"; option java_outer_classname = "ClientSslAuthProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/client_ssl_auth/v3;client_ssl_authv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Client TLS authentication] diff --git a/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto b/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto new file mode 100644 index 0000000000..61bf64b644 --- /dev/null +++ b/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package envoy.extensions.filters.network.connection_limit.v3; + +import "envoy/config/core/v3/base.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.network.connection_limit.v3"; +option java_outer_classname = "ConnectionLimitProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/connection_limit/v3;connection_limitv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Connection limit] +// Connection limit :ref:`configuration overview `. +// [#extension: envoy.filters.network.connection_limit] + +message ConnectionLimit { + // The prefix to use when emitting :ref:`statistics + // `. + string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; + + // The max connections configuration to use for new incoming connections that are processed + // by the filter's filter chain. When max_connection is reached, the incoming connection + // will be closed after delay duration. + google.protobuf.UInt64Value max_connections = 2 [(validate.rules).uint64 = {gte: 1}]; + + // The delay configuration to use for rejecting the connection after some specified time duration + // instead of immediately rejecting the connection. That way, a malicious user is not able to + // retry as fast as possible which provides a better DoS protection for Envoy. If this is not present, + // the connection will be closed immediately. + google.protobuf.Duration delay = 3; + + // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults + // to enabled. + config.core.v3.RuntimeFeatureFlag runtime_enabled = 4; +} diff --git a/api/envoy/extensions/filters/network/direct_response/v3/config.proto b/api/envoy/extensions/filters/network/direct_response/v3/config.proto index 2742372b2f..e5a8347d6a 100644 --- a/api/envoy/extensions/filters/network/direct_response/v3/config.proto +++ b/api/envoy/extensions/filters/network/direct_response/v3/config.proto @@ -10,6 +10,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.direct_response.v3"; option java_outer_classname = "ConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/direct_response/v3;direct_responsev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Direct response] diff --git a/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto b/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto index fa1959a425..6242596bd7 100644 --- a/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto +++ b/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.router.v3"; option java_outer_classname = "RouterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/dubbo_proxy/router/v3;routerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Router] diff --git a/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto b/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto index 646f053ca9..2a9f9feaf0 100644 --- a/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto +++ b/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.v3"; option java_outer_classname = "DubboProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/dubbo_proxy/v3;dubbo_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Dubbo Proxy] diff --git a/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto b/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto index f06518c0b6..f9446b91eb 100644 --- a/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto +++ b/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.v3"; option java_outer_classname = "RouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/dubbo_proxy/v3;dubbo_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Dubbo Proxy Route Configuration] @@ -26,7 +27,15 @@ message RouteConfiguration { // The name of the route configuration. Reserved for future use in asynchronous route discovery. string name = 1; - // The interface name of the service. + // The interface name of the service. Wildcard interface are supported in the suffix or prefix form. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add``, ``com.prod.methods.add``, etc. + // ``com.dev.methods.*`` will match ``com.dev.methods.add``, ``com.dev.methods.update``, etc. + // Special wildcard ``*`` matching any interface. + // + // .. note:: + // + // The wildcard will not match the empty string. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add`` but not ``.methods.add``. string interface = 2; // Which group does the interface belong to. diff --git a/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.proto b/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.proto deleted file mode 100644 index 30499c27f6..0000000000 --- a/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.proto +++ /dev/null @@ -1,70 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.dubbo_proxy.v4alpha; - -import "envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.v4alpha"; -option java_outer_classname = "DubboProxyProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Dubbo Proxy] -// Dubbo Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.dubbo_proxy] - -// Dubbo Protocol types supported by Envoy. -enum ProtocolType { - // the default protocol. - Dubbo = 0; -} - -// Dubbo Serialization types supported by Envoy. -enum SerializationType { - // the default serialization protocol. - Hessian2 = 0; -} - -// [#next-free-field: 6] -message DubboProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy"; - - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Configure the protocol used. - ProtocolType protocol_type = 2 [(validate.rules).enum = {defined_only: true}]; - - // Configure the serialization protocol used. - SerializationType serialization_type = 3 [(validate.rules).enum = {defined_only: true}]; - - // The route table for the connection manager is static and is specified in this property. - repeated RouteConfiguration route_config = 4; - - // A list of individual Dubbo filters that make up the filter chain for requests made to the - // Dubbo proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no dubbo_filters are specified, a default Dubbo router filter - // (`envoy.filters.dubbo.router`) is used. - repeated DubboFilter dubbo_filters = 5; -} - -// DubboFilter configures a Dubbo filter. -message DubboFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.DubboFilter"; - - // The name of the filter to instantiate. The name must match a supported - // filter. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - google.protobuf.Any config = 2; -} diff --git a/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto b/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto deleted file mode 100644 index c2ff03b33f..0000000000 --- a/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto +++ /dev/null @@ -1,121 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.dubbo_proxy.v4alpha; - -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; -import "envoy/type/v3/range.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.v4alpha"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Dubbo Proxy Route Configuration] -// Dubbo Proxy :ref:`configuration overview `. - -// [#next-free-field: 6] -message RouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.RouteConfiguration"; - - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - string name = 1; - - // The interface name of the service. - string interface = 2; - - // Which group does the interface belong to. - string group = 3; - - // The version number of the interface. - string version = 4; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 5; -} - -message Route { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.Route"; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.RouteMatch"; - - // Method level routing matching. - MethodMatch method = 1; - - // 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). - repeated config.route.v4alpha.HeaderMatcher headers = 2; -} - -message RouteAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.RouteAction"; - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - // Currently ClusterWeight only supports the name and weight fields. - config.route.v4alpha.WeightedCluster weighted_clusters = 2; - } -} - -message MethodMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch"; - - // The parameter matching type. - message ParameterMatchSpecifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParameterMatchSpecifier"; - - oneof parameter_match_specifier { - // If specified, header match will be performed based on the value of the header. - string exact_match = 3; - - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting - // of an optional plus or minus sign followed by a sequence of digits. The rule will not match - // if the header value does not represent an integer. Match will fail for empty values, - // floating point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, - // "somestring", 10.9, "-1somestring" - type.v3.Int64Range range_match = 4; - } - } - - // The name of the method. - type.matcher.v4alpha.StringMatcher name = 1; - - // Method parameter definition. - // The key is the parameter index, starting from 0. - // The value is the parameter matching type. - map params_match = 2; -} diff --git a/api/envoy/extensions/filters/network/echo/v3/echo.proto b/api/envoy/extensions/filters/network/echo/v3/echo.proto index 077d87259b..495a55c055 100644 --- a/api/envoy/extensions/filters/network/echo/v3/echo.proto +++ b/api/envoy/extensions/filters/network/echo/v3/echo.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.echo.v3"; option java_outer_classname = "EchoProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/echo/v3;echov3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Echo] diff --git a/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto b/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto index 78f4167ccc..19d4283796 100644 --- a/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto +++ b/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.ext_authz.v3"; option java_outer_classname = "ExtAuthzProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/ext_authz/v3;ext_authzv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Network External Authorization ] @@ -22,9 +23,9 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // External Authorization filter calls out to an external service over the // gRPC Authorization API defined by -// :ref:`CheckRequest `. +// :ref:`CheckRequest `. // A failed check will cause this filter to close the TCP connection. -// [#next-free-field: 7] +// [#next-free-field: 8] message ExtAuthz { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.ext_authz.v2.ExtAuthz"; @@ -45,7 +46,7 @@ message ExtAuthz { // Specifies if the peer certificate is sent to the external service. // // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. + // :ref:`certificate`. bool include_peer_certificate = 4; // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and @@ -56,4 +57,9 @@ message ExtAuthz { // Specifies if the filter is enabled with metadata matcher. // If this field is not specified, the filter will be enabled for all requests. type.matcher.v3.MetadataMatcher filter_enabled_metadata = 6; + + // Optional labels that will be passed to :ref:`labels` in + // :ref:`destination`. + // The labels will be read from :ref:`metadata` with the specified key. + string bootstrap_metadata_labels_key = 7; } diff --git a/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.proto b/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.proto deleted file mode 100644 index f877a3ed85..0000000000 --- a/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.ext_authz.v4alpha; - -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/grpc_service.proto"; -import "envoy/type/matcher/v4alpha/metadata.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.ext_authz.v4alpha"; -option java_outer_classname = "ExtAuthzProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Network External Authorization ] -// The network layer external authorization service configuration -// :ref:`configuration overview `. -// [#extension: envoy.filters.network.ext_authz] - -// 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. -// [#next-free-field: 7] -message ExtAuthz { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.ext_authz.v3.ExtAuthz"; - - // The prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The external authorization gRPC service configuration. - // The default timeout is set to 200ms by this filter. - config.core.v4alpha.GrpcService grpc_service = 2; - - // 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. - bool failure_mode_allow = 3; - - // Specifies if the peer certificate is sent to the external service. - // - // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - bool include_peer_certificate = 4; - - // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and - // version of Check{Request,Response} used on the wire. - config.core.v4alpha.ApiVersion transport_api_version = 5 - [(validate.rules).enum = {defined_only: true}]; - - // Specifies if the filter is enabled with metadata matcher. - // If this field is not specified, the filter will be enabled for all requests. - type.matcher.v4alpha.MetadataMatcher filter_enabled_metadata = 6; -} diff --git a/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto b/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto index f590f2425b..d7e8e799d3 100644 --- a/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto +++ b/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package envoy.extensions.filters.network.http_connection_manager.v3; import "envoy/config/accesslog/v3/accesslog.proto"; +import "envoy/config/core/v3/address.proto"; import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/config_source.proto"; import "envoy/config/core/v3/extension.proto"; @@ -11,15 +12,14 @@ import "envoy/config/core/v3/substitution_format_string.proto"; import "envoy/config/route/v3/route.proto"; import "envoy/config/route/v3/scoped_route.proto"; import "envoy/config/trace/v3/http_tracer.proto"; +import "envoy/type/http/v3/path_transformation.proto"; import "envoy/type/tracing/v3/custom_tag.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; -import "envoy/annotations/deprecation.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/security.proto"; import "udpa/annotations/status.proto"; @@ -29,13 +29,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3"; option java_outer_classname = "HttpConnectionManagerProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3;http_connection_managerv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP connection manager] // HTTP connection manager :ref:`configuration overview `. // [#extension: envoy.filters.network.http_connection_manager] -// [#next-free-field: 46] +// [#next-free-field: 50] message HttpConnectionManager { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager"; @@ -202,6 +203,10 @@ message HttpConnectionManager { // Whether unix socket addresses should be considered internal. bool unix_sockets = 1; + + // List of CIDR ranges that are treated as internal. If unset, then RFC1918 / RFC4193 + // IP addresses will be considered internal. + repeated config.core.v3.CidrRange cidr_ranges = 2; } // [#next-free-field: 7] @@ -265,11 +270,91 @@ message HttpConnectionManager { // 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 + // ` as documented in the // :ref:`upgrade documentation `. google.protobuf.BoolValue enabled = 3; } + // [#not-implemented-hide:] Transformations that apply to path headers. Transformations are applied + // before any processing of requests by HTTP filters, routing, and matching. Only the normalized + // path will be visible internally if a transformation is enabled. Any path rewrites that the + // router performs (e.g. :ref:`regex_rewrite + // ` or :ref:`prefix_rewrite + // `) will apply to the *:path* header + // destined for the upstream. + // + // Note: access logging and tracing will show the original *:path* header. + message PathNormalizationOptions { + // [#not-implemented-hide:] Normalization applies internally before any processing of requests by + // HTTP filters, routing, and matching *and* will affect the forwarded *:path* header. Defaults + // to :ref:`NormalizePathRFC3986 + // `. When not + // specified, this value may be overridden by the runtime variable + // :ref:`http_connection_manager.normalize_path`. + // Envoy will respond with 400 to paths that are malformed (e.g. for paths that fail RFC 3986 + // normalization due to disallowed characters.) + type.http.v3.PathTransformation forwarding_transformation = 1; + + // [#not-implemented-hide:] Normalization only applies internally before any processing of + // requests by HTTP filters, routing, and matching. These will be applied after full + // transformation is applied. The *:path* header before this transformation will be restored in + // the router filter and sent upstream unless it was mutated by a filter. Defaults to no + // transformations. + // Multiple actions can be applied in the same Transformation, forming a sequential + // pipeline. The transformations will be performed in the order that they appear. Envoy will + // respond with 400 to paths that are malformed (e.g. for paths that fail RFC 3986 + // normalization due to disallowed characters.) + type.http.v3.PathTransformation http_filter_transformation = 2; + } + + // Configures the manner in which the Proxy-Status HTTP response header is + // populated. + // + // See the [Proxy-Status + // RFC](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-proxy-status-08). + // [#comment:TODO: Update this with the non-draft URL when finalized.] + // + // The Proxy-Status header is a string of the form: + // + // "; error=; details=
" + // [#next-free-field: 7] + message ProxyStatusConfig { + // If true, the details field of the Proxy-Status header is not populated with stream_info.response_code_details. + // This value defaults to `false`, i.e. the `details` field is populated by default. + bool remove_details = 1; + + // If true, the details field of the Proxy-Status header will not contain + // connection termination details. This value defaults to `false`, i.e. the + // `details` field will contain connection termination details by default. + bool remove_connection_termination_details = 2; + + // If true, the details field of the Proxy-Status header will not contain an + // enumeration of the Envoy ResponseFlags. This value defaults to `false`, + // i.e. the `details` field will contain a list of ResponseFlags by default. + bool remove_response_flags = 3; + + // If true, overwrites the existing Status header with the response code + // recommended by the Proxy-Status spec. + // This value defaults to `false`, i.e. the HTTP response code is not + // overwritten. + bool set_recommended_response_code = 4; + + // The name of the proxy as it appears at the start of the Proxy-Status + // header. + // + // If neither of these values are set, this value defaults to `server_name`, + // which itself defaults to "envoy". + oneof proxy_name { + // If `use_node_id` is set, Proxy-Status headers will use the Envoy's node + // ID as the name of the proxy. + bool use_node_id = 5; + + // If `literal_proxy_name` is set, Proxy-Status headers will use this + // value as the name of the proxy. + string literal_proxy_name = 6; + } + } + reserved 27, 11; reserved "idle_timeout"; @@ -309,7 +394,7 @@ message HttpConnectionManager { // Presence of the object defines whether the connection manager // emits :ref:`tracing ` data to the :ref:`configured tracing provider - // `. + // `. Tracing tracing = 7; // Additional settings for HTTP requests handled by the connection manager. These will be @@ -324,6 +409,10 @@ message HttpConnectionManager { config.core.v3.Http2ProtocolOptions http2_protocol_options = 9 [(udpa.annotations.security).configure_for_untrusted_downstream = true]; + // Additional HTTP/3 settings that are passed directly to the HTTP/3 codec. + // [#not-implemented-hide:] + config.core.v3.Http3ProtocolOptions http3_protocol_options = 44; + // An optional override that the connection manager will write to the server // header in responses. If not set, the default is *envoy*. string server_name = 10 @@ -335,13 +424,16 @@ message HttpConnectionManager { ServerHeaderTransformation server_header_transformation = 34 [(validate.rules).enum = {defined_only: true}]; + // Allows for explicit transformation of the :scheme header on the request path. + // If not set, Envoy's default :ref:`scheme ` + // handling applies. + config.core.v3.SchemeHeaderTransformation scheme_header_transformation = 48; + // 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. google.protobuf.UInt32Value max_request_headers_kb = 29 - [(validate.rules).uint32 = {lte: 96 gt: 0}]; + [(validate.rules).uint32 = {lte: 8192 gt: 0}]; // The stream idle timeout for connections managed by the connection manager. // If not specified, this defaults to 5 minutes. The default value was selected @@ -351,10 +443,10 @@ message HttpConnectionManager { // // This idle timeout applies to new streams and is overridable by the // :ref:`route-level idle_timeout - // `. Even on a stream in + // `. 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 @@ -367,12 +459,12 @@ message HttpConnectionManager { // data has been proxied within available flow control windows. If the timeout is hit in this // case, the :ref:`tx_flush_timeout ` counter will be // incremented. Note that :ref:`max_stream_duration - // ` does not apply to + // ` does not apply to // this corner case. // // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. + // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. // // 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 @@ -464,6 +556,25 @@ message HttpConnectionManager { // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. uint32 xff_num_trusted_hops = 19; + // The configuration for the original IP detection extensions. + // + // When configured the extensions will be called along with the request headers + // and information about the downstream connection, such as the directly connected address. + // Each extension will then use these parameters to decide the request's effective remote address. + // If an extension fails to detect the original IP address and isn't configured to reject + // the request, the HCM will try the remaining extensions until one succeeds or rejects + // the request. If the request isn't rejected nor any extension succeeds, the HCM will + // fallback to using the remote address. + // + // .. WARNING:: + // Extensions cannot be used in conjunction with :ref:`use_remote_address + // ` + // nor :ref:`xff_num_trusted_hops + // `. + // + // [#extension-category: envoy.http.original_ip_detection] + repeated config.core.v3.TypedExtensionConfig original_ip_detection_extensions = 46; + // 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 @@ -474,7 +585,7 @@ message HttpConnectionManager { // :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. @@ -482,7 +593,7 @@ message HttpConnectionManager { // Via header value to append to request and response headers. If this is // empty, no via header will be appended. - string via = 22; + string via = 22 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Whether the connection manager will generate the :ref:`x-request-id // ` header if it does not exist. This defaults to @@ -507,7 +618,7 @@ message HttpConnectionManager { [(validate.rules).enum = {defined_only: true}]; // 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 @@ -523,7 +634,7 @@ message HttpConnectionManager { // 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 @@ -566,15 +677,21 @@ message HttpConnectionManager { PathWithEscapedSlashesAction path_with_escaped_slashes_action = 45; // The configuration of the request ID extension. This includes operations such as - // generation, validation, and associated tracing operations. + // generation, validation, and associated tracing operations. If empty, the + // :ref:`UuidRequestIdConfig ` + // default extension is used with default parameters. See the documentation for that extension + // for details on what it does. Customizing the configuration for the default extension can be + // achieved by configuring it explicitly here. For example, to disable trace reason packing, + // the following configuration can be used: // - // If not set, Envoy uses the default UUID-based behavior: - // - // 1. Request ID is propagated using *x-request-id* header. + // .. validated-code-block:: yaml + // :type-name: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension // - // 2. Request ID is a universally unique identifier (UUID). + // typed_config: + // "@type": type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig + // pack_trace_reason: false // - // 3. Tracing decision (sampled, forced, etc) is set in 14th byte of the UUID. + // [#extension-category: envoy.request_id] RequestIDExtension request_id_extension = 36; // The configuration to customize local reply returned by Envoy. It can customize status code, @@ -583,10 +700,12 @@ message HttpConnectionManager { LocalReplyConfig local_reply_config = 38; // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` - // local port and request method is not CONNECT. This affects the upstream host header as well. + // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` + // local port. This affects the upstream host header unless the method is + // CONNECT in which case if no filter adds a port the original port will be restored before headers are + // sent upstream. // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part // of `HTTP spec `_ and is provided for convenience. // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. bool strip_matching_host_port = 39 @@ -594,10 +713,11 @@ message HttpConnectionManager { oneof strip_port_mode { // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if request method is not CONNECT. - // This affects the upstream host header as well. + // of request by HTTP filters or routing. + // This affects the upstream host header unless the method is CONNECT in + // which case if no filter adds a port the original port will be restored before headers are sent upstream. // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part // of `HTTP spec `_ and is provided for convenience. // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. bool strip_any_host_port = 42; @@ -620,6 +740,31 @@ message HttpConnectionManager { // *not* the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging // ` google.protobuf.BoolValue stream_error_on_invalid_http_message = 40; + + // [#not-implemented-hide:] Path normalization configuration. This includes + // configurations for transformations (e.g. RFC 3986 normalization or merge + // adjacent slashes) and the policy to apply them. The policy determines + // whether transformations affect the forwarded *:path* header. RFC 3986 path + // normalization is enabled by default and the default policy is that the + // normalized header will be forwarded. See :ref:`PathNormalizationOptions + // ` + // for details. + PathNormalizationOptions path_normalization_options = 43; + + // Determines if trailing dot of the host should be removed from host/authority header before any + // processing of request by HTTP filters or routing. + // This affects the upstream host header. + // Without setting this option, incoming requests with host `example.com.` will not match against + // route with :ref:`domains` match set to `example.com`. Defaults to `false`. + // When the incoming request contains a host/authority header that includes a port number, + // setting this option will strip a trailing dot, if present, from the host section, + // leaving the port as is (e.g. host value `example.com.:443` will be updated to `example.com:443`). + bool strip_trailing_host_dot = 47; + + // Proxy-Status HTTP response header configuration. + // If this config is set, the Proxy-Status HTTP response header field is + // populated. By default, it is not. + ProxyStatusConfig proxy_status_config = 49; } // The configuration to customize local reply returned by Envoy. @@ -721,14 +866,14 @@ message ScopedRoutes { "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes"; // Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These - // keys are matched against a set of :ref:`Key` - // objects assembled from :ref:`ScopedRouteConfiguration` + // keys are matched against a set of :ref:`Key` + // objects assembled from :ref:`ScopedRouteConfiguration` // messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via - // :ref:`scoped_route_configurations_list`. + // :ref:`scoped_route_configurations_list`. // // Upon receiving a request's headers, the Router will build a key using the algorithm specified // by this message. This key will be used to look up the routing table (i.e., the - // :ref:`RouteConfiguration`) to use for the request. + // :ref:`RouteConfiguration`) to use for the request. message ScopeKeyBuilder { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder"; @@ -811,7 +956,7 @@ message ScopedRoutes { } // The final(built) scope key consists of the ordered union of these fragments, which are compared in order with the - // fragments of a :ref:`ScopedRouteConfiguration`. + // fragments of a :ref:`ScopedRouteConfiguration`. // A missing fragment during comparison will make the key invalid, i.e., the computed key doesn't match any key. repeated FragmentBuilder fragments = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -825,7 +970,7 @@ message ScopedRoutes { // Configuration source specifier for RDS. // This config source is used to subscribe to RouteConfiguration resources specified in // ScopedRouteConfiguration messages. - config.core.v3.ConfigSource rds_config_source = 3 [(validate.rules).message = {required: true}]; + config.core.v3.ConfigSource rds_config_source = 3; oneof config_specifier { option (validate.required) = true; @@ -833,14 +978,14 @@ message ScopedRoutes { // The set of routing scopes corresponding to the HCM. A scope is assigned to a request by // matching a key constructed from the request's attributes according to the algorithm specified // by the - // :ref:`ScopeKeyBuilder` + // :ref:`ScopeKeyBuilder` // in this message. ScopedRouteConfigurationsList scoped_route_configurations_list = 4; // The set of routing scopes associated with the HCM will be dynamically loaded via the SRDS // API. A scope is assigned to a request by matching a key constructed from the request's // attributes according to the algorithm specified by the - // :ref:`ScopeKeyBuilder` + // :ref:`ScopeKeyBuilder` // in this message. ScopedRds scoped_rds = 5; } @@ -853,9 +998,13 @@ message ScopedRds { // Configuration source specifier for scoped RDS. config.core.v3.ConfigSource scoped_rds_config_source = 1 [(validate.rules).message = {required: true}]; + + // xdstp:// resource locator for scoped RDS collection. + // [#not-implemented-hide:] + string srds_resources_locator = 2; } -// [#next-free-field: 6] +// [#next-free-field: 7] message HttpFilter { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.http_connection_manager.v2.HttpFilter"; @@ -864,21 +1013,35 @@ message HttpFilter { reserved "config"; - // The name of the filter configuration. The name is used as a fallback to - // select an extension if the type of the configuration proto is not - // sufficient. It also serves as a resource name in ExtensionConfigDS. + // The name of the filter configuration. It also serves as a resource name in ExtensionConfigDS. string name = 1 [(validate.rules).string = {min_len: 1}]; oneof config_type { // Filter specific configuration which depends on the filter being instantiated. See the supported // filters for further documentation. + // + // To support configuring a :ref:`match tree `, use an + // :ref:`ExtensionWithMatcher ` + // with the desired HTTP filter. + // [#extension-category: envoy.filters.http] google.protobuf.Any typed_config = 4; // Configuration source specifier for an extension configuration discovery service. // In case of a failure and without the default configuration, the HTTP listener responds with code 500. // Extension configs delivered through this mechanism are not expected to require warming (see https://github.com/envoyproxy/envoy/issues/12061). + // + // To support configuring a :ref:`match tree `, use an + // :ref:`ExtensionWithMatcher ` + // with the desired HTTP filter. This works for both the default filter configuration as well + // as for filters provided via the API. config.core.v3.ExtensionConfigSource config_discovery = 5; } + + // If true, clients that do not support this filter may ignore the + // filter but otherwise accept the config. + // Otherwise, clients that do not support this filter must reject the config. + // This is also same with typed per filter config. + bool is_optional = 6; } message RequestIDExtension { @@ -888,3 +1051,12 @@ message RequestIDExtension { // Request ID extension specific configuration. google.protobuf.Any typed_config = 1; } + +// [#protodoc-title: Envoy Mobile HTTP connection manager] +// HTTP connection manager for use in Envoy mobile. +// [#extension: envoy.filters.network.envoy_mobile_http_connection_manager] +message EnvoyMobileHttpConnectionManager { + // The configuration for the underlying HttpConnectionManager which will be + // instantiated for Envoy mobile. + HttpConnectionManager config = 1; +} diff --git a/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto b/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto deleted file mode 100644 index 2f42153cf0..0000000000 --- a/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto +++ /dev/null @@ -1,895 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.http_connection_manager.v4alpha; - -import "envoy/config/accesslog/v4alpha/accesslog.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/config/core/v4alpha/extension.proto"; -import "envoy/config/core/v4alpha/protocol.proto"; -import "envoy/config/core/v4alpha/substitution_format_string.proto"; -import "envoy/config/route/v4alpha/route.proto"; -import "envoy/config/route/v4alpha/scoped_route.proto"; -import "envoy/config/trace/v4alpha/http_tracer.proto"; -import "envoy/type/tracing/v3/custom_tag.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v4alpha"; -option java_outer_classname = "HttpConnectionManagerProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: HTTP connection manager] -// HTTP connection manager :ref:`configuration overview `. -// [#extension: envoy.filters.network.http_connection_manager] - -// [#next-free-field: 46] -message HttpConnectionManager { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"; - - enum CodecType { - // 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 = 0; - - // The connection manager will assume that the client is speaking HTTP/1.1. - HTTP1 = 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 = 2; - - // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with - // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient - // to distinguish HTTP1 and HTTP2 traffic. - HTTP3 = 3; - } - - enum ServerHeaderTransformation { - // Overwrite any Server header with the contents of server_name. - OVERWRITE = 0; - - // If no Server header is present, append Server server_name - // If a Server header is present, pass it through. - APPEND_IF_ABSENT = 1; - - // Pass through the value of the server header, and do not append a header - // if none is present. - PASS_THROUGH = 2; - } - - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP - // header. - enum ForwardClientCertDetails { - // Do not send the XFCC header to the next hop. This is the default value. - SANITIZE = 0; - - // When the client connection is mTLS (Mutual TLS), forward the XFCC header - // in the request. - FORWARD_ONLY = 1; - - // When the client connection is mTLS, append the client certificate - // information to the request’s XFCC header and forward it. - APPEND_FORWARD = 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 = 3; - - // Always forward the XFCC header in the request, regardless of whether the - // client connection is mTLS. - ALWAYS_FORWARD_ONLY = 4; - } - - // Determines the action for request that contain %2F, %2f, %5C or %5c sequences in the URI path. - // This operation occurs before URL normalization and the merge slashes transformations if they were enabled. - enum PathWithEscapedSlashesAction { - // Default behavior specific to implementation (i.e. Envoy) of this configuration option. - // Envoy, by default, takes the KEEP_UNCHANGED action. - // NOTE: the implementation may change the default behavior at-will. - IMPLEMENTATION_SPECIFIC_DEFAULT = 0; - - // Keep escaped slashes. - KEEP_UNCHANGED = 1; - - // Reject client request with the 400 status. gRPC requests will be rejected with the INTERNAL (13) error code. - // The "httpN.downstream_rq_failed_path_normalization" counter is incremented for each rejected request. - REJECT_REQUEST = 2; - - // Unescape %2F and %5C sequences and redirect request to the new path if these sequences were present. - // Redirect occurs after path normalization and merge slashes transformations if they were configured. - // NOTE: gRPC requests will be rejected with the INTERNAL (13) error code. - // This option minimizes possibility of path confusion exploits by forcing request with unescaped slashes to - // traverse all parties: downstream client, intermediate proxies, Envoy and upstream server. - // The "httpN.downstream_rq_redirected_with_normalized_path" counter is incremented for each - // redirected request. - UNESCAPE_AND_REDIRECT = 3; - - // Unescape %2F and %5C sequences. - // Note: this option should not be enabled if intermediaries perform path based access control as - // it may lead to path confusion vulnerabilities. - UNESCAPE_AND_FORWARD = 4; - } - - // [#next-free-field: 10] - message Tracing { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing"; - - enum OperationName { - // The HTTP listener is used for ingress/incoming requests. - INGRESS = 0; - - // The HTTP listener is used for egress/outgoing requests. - EGRESS = 1; - } - - reserved 1, 2; - - reserved "operation_name", "request_headers_for_tags"; - - // 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% - type.v3.Percent client_sampling = 3; - - // 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% - type.v3.Percent random_sampling = 4; - - // 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% - type.v3.Percent overall_sampling = 5; - - // Whether to annotate spans with additional data. If true, spans will include logs for stream - // events. - bool verbose = 6; - - // Maximum length of the request path to extract and include in the HttpUrl tag. Used to - // truncate lengthy request paths to meet the needs of a tracing backend. - // Default: 256 - google.protobuf.UInt32Value max_path_tag_length = 7; - - // A list of custom tags with unique tag name to create tags for the active span. - repeated type.tracing.v3.CustomTag custom_tags = 8; - - // Configuration for an external tracing provider. - // If not specified, no tracing will be performed. - // - // .. attention:: - // Please be aware that *envoy.tracers.opencensus* provider can only be configured once - // in Envoy lifetime. - // Any attempts to reconfigure it or to use different configurations for different HCM filters - // will be rejected. - // Such a constraint is inherent to OpenCensus itself. It cannot be overcome without changes - // on OpenCensus side. - config.trace.v4alpha.Tracing.Http provider = 9; - } - - message InternalAddressConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager." - "InternalAddressConfig"; - - // Whether unix socket addresses should be considered internal. - bool unix_sockets = 1; - } - - // [#next-free-field: 7] - message SetCurrentClientCertDetails { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager." - "SetCurrentClientCertDetails"; - - reserved 2; - - // Whether to forward the subject of the client cert. Defaults to false. - google.protobuf.BoolValue subject = 1; - - // 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. - bool cert = 3; - - // Whether to forward the entire client cert chain (including the leaf cert) in URL encoded PEM - // format. This will appear in the XFCC header comma separated from other values with the value - // Chain="PEM". - // Defaults to false. - bool chain = 6; - - // Whether to forward the DNS type Subject Alternative Names of the client cert. - // Defaults to false. - bool dns = 4; - - // Whether to forward the URI type Subject Alternative Name of the client cert. Defaults to - // false. - bool uri = 5; - } - - // 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. - message UpgradeConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager." - "UpgradeConfig"; - - // 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. - string upgrade_type = 1; - - // 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. - repeated HttpFilter filters = 2; - - // 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 `. - google.protobuf.BoolValue enabled = 3; - } - - reserved 27, 11; - - reserved "idle_timeout"; - - // Supplies the type of codec that the connection manager should use. - CodecType codec_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // The human readable prefix to use when emitting statistics for the - // connection manager. See the :ref:`statistics documentation ` for - // more information. - string stat_prefix = 2 [(validate.rules).string = {min_len: 1}]; - - oneof route_specifier { - option (validate.required) = true; - - // The connection manager’s route table will be dynamically loaded via the RDS API. - Rds rds = 3; - - // The route table for the connection manager is static and is specified in this property. - config.route.v4alpha.RouteConfiguration route_config = 4; - - // A route table will be dynamically assigned to each request based on request attributes - // (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are - // specified in this message. - ScopedRoutes scoped_routes = 31; - } - - // A list of individual HTTP filters that make up the filter chain for - // requests made to the connection manager. :ref:`Order matters ` - // as the filters are processed sequentially as request events happen. - repeated HttpFilter http_filters = 5; - - // 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. - google.protobuf.BoolValue add_user_agent = 6; - - // Presence of the object defines whether the connection manager - // emits :ref:`tracing ` data to the :ref:`configured tracing provider - // `. - Tracing tracing = 7; - - // Additional settings for HTTP requests handled by the connection manager. These will be - // applicable to both HTTP1 and HTTP2 requests. - config.core.v4alpha.HttpProtocolOptions common_http_protocol_options = 35 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // Additional HTTP/1 settings that are passed to the HTTP/1 codec. - config.core.v4alpha.Http1ProtocolOptions http_protocol_options = 8; - - // Additional HTTP/2 settings that are passed directly to the HTTP/2 codec. - config.core.v4alpha.Http2ProtocolOptions http2_protocol_options = 9 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // An optional override that the connection manager will write to the server - // header in responses. If not set, the default is *envoy*. - string server_name = 10 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Defines the action to be applied to the Server header on the response path. - // By default, Envoy will overwrite the header with the value specified in - // server_name. - ServerHeaderTransformation server_header_transformation = 34 - [(validate.rules).enum = {defined_only: true}]; - - // 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. - google.protobuf.UInt32Value max_request_headers_kb = 29 - [(validate.rules).uint32 = {lte: 96 gt: 0}]; - - // 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. - // - // This timeout also specifies the amount of time that Envoy will wait for the peer to open enough - // window to write any remaining stream data once the entirety of stream data (local end stream is - // true) has been buffered pending available window. In other words, this timeout defends against - // a peer that does not release enough window to completely write the stream, even though all - // data has been proxied within available flow control windows. If the timeout is hit in this - // case, the :ref:`tx_flush_timeout ` counter will be - // incremented. Note that :ref:`max_stream_duration - // ` does not apply to - // this corner case. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. - // - // 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. - google.protobuf.Duration stream_idle_timeout = 24 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // The amount of time that Envoy will wait for the entire request to be received. - // 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. - google.protobuf.Duration request_timeout = 28 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // The amount of time that Envoy will wait for the request headers to be received. The timer is - // activated when the first byte of the headers is received, and is disarmed when the last byte of - // the headers has been received. If not specified or set to 0, this timeout is disabled. - google.protobuf.Duration request_headers_timeout = 41 [ - (validate.rules).duration = {gte {}}, - (udpa.annotations.security).configure_for_untrusted_downstream = true - ]; - - // 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. - google.protobuf.Duration drain_timeout = 12; - - // 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 reasonable "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. - google.protobuf.Duration delayed_close_timeout = 26; - - // Configuration for :ref:`HTTP access logs ` - // emitted by the connection manager. - repeated config.accesslog.v4alpha.AccessLog access_log = 13; - - // 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. - google.protobuf.BoolValue use_remote_address = 14 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // 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. - uint32 xff_num_trusted_hops = 19; - - // 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 internal_address_config = 25; - - // 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. - bool skip_xff_append = 21; - - // Via header value to append to request and response headers. If this is - // empty, no via header will be appended. - string via = 22; - - // 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. - google.protobuf.BoolValue generate_request_id = 15; - - // Whether the connection manager will keep the :ref:`x-request-id - // ` header if passed for a request that is edge - // (Edge request is the request from external clients to front Envoy) and not reset it, which - // is the current Envoy behaviour. This defaults to false. - bool preserve_external_request_id = 32; - - // If set, Envoy will always set :ref:`x-request-id ` header in response. - // If this is false or not set, the request ID is returned in responses only if tracing is forced using - // :ref:`x-envoy-force-trace ` header. - bool always_set_request_id_in_response = 37; - - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP - // header. - ForwardClientCertDetails forward_client_cert_details = 16 - [(validate.rules).enum = {defined_only: true}]; - - // 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 set_current_client_cert_details = 17; - - // 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. - bool proxy_100_continue = 18; - - // 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:] - bool represent_ipv4_remote_address_as_ipv4_mapped_ipv6 = 20; - - repeated UpgradeConfig upgrade_configs = 23; - - // 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 `_ - google.protobuf.BoolValue normalize_path = 30; - - // Determines if adjacent slashes in the path are merged into one before any processing of - // requests by HTTP filters or routing. This affects the upstream *:path* header as well. Without - // setting this option, incoming requests with path `//dir///file` will not match against route - // with `prefix` match set to `/dir`. Defaults to `false`. Note that slash merging is not part of - // `HTTP spec `_ and is provided for convenience. - bool merge_slashes = 33; - - // Action to take when request URL path contains escaped slash sequences (%2F, %2f, %5C and %5c). - // The default value can be overridden by the :ref:`http_connection_manager.path_with_escaped_slashes_action` - // runtime variable. - // The :ref:`http_connection_manager.path_with_escaped_slashes_action_sampling` runtime - // variable can be used to apply the action to a portion of all requests. - PathWithEscapedSlashesAction path_with_escaped_slashes_action = 45; - - // The configuration of the request ID extension. This includes operations such as - // generation, validation, and associated tracing operations. - // - // If not set, Envoy uses the default UUID-based behavior: - // - // 1. Request ID is propagated using *x-request-id* header. - // - // 2. Request ID is a universally unique identifier (UUID). - // - // 3. Tracing decision (sampled, forced, etc) is set in 14th byte of the UUID. - RequestIDExtension request_id_extension = 36; - - // The configuration to customize local reply returned by Envoy. It can customize status code, - // body text and response content type. If not specified, status code and text body are hard - // coded in Envoy, the response content type is plain text. - LocalReplyConfig local_reply_config = 38; - - oneof strip_port_mode { - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` - // local port and request method is not CONNECT. This affects the upstream host header as well. - // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. - bool strip_matching_host_port = 39; - - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if request method is not CONNECT. - // This affects the upstream host header as well. - // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. - bool strip_any_host_port = 42; - } - - // Governs Envoy's behavior when receiving invalid HTTP from downstream. - // If this option is false (default), Envoy will err on the conservative side handling HTTP - // errors, terminating both HTTP/1.1 and HTTP/2 connections when receiving an invalid request. - // If this option is set to true, Envoy will be more permissive, only resetting the invalid - // stream in the case of HTTP/2 and leaving the connection open where possible (if the entire - // request is read for HTTP/1.1) - // In general this should be true for deployments receiving trusted traffic (L2 Envoys, - // company-internal mesh) and false when receiving untrusted traffic (edge deployments). - // - // If different behaviors for invalid_http_message for HTTP/1 and HTTP/2 are - // desired, one should use the new HTTP/1 option :ref:`override_stream_error_on_invalid_http_message - // ` or the new HTTP/2 option - // :ref:`override_stream_error_on_invalid_http_message - // ` - // *not* the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging - // ` - google.protobuf.BoolValue stream_error_on_invalid_http_message = 40; -} - -// The configuration to customize local reply returned by Envoy. -message LocalReplyConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig"; - - // Configuration of list of mappers which allows to filter and change local response. - // The mappers will be checked by the specified order until one is matched. - repeated ResponseMapper mappers = 1; - - // The configuration to form response body from the :ref:`command operators ` - // and to specify response content type as one of: plain/text or application/json. - // - // Example one: "plain/text" ``body_format``. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // The following response body in "plain/text" format will be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - // Example two: "application/json" ``body_format``. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // path: "%REQ(:path)%" - // - // The following response body in "application/json" format would be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: json - // - // { - // "status": 503, - // "message": "upstream connection error", - // "path": "/foo" - // } - // - config.core.v4alpha.SubstitutionFormatString body_format = 2; -} - -// The configuration to filter and change local response. -// [#next-free-field: 6] -message ResponseMapper { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper"; - - // Filter to determine if this mapper should apply. - config.accesslog.v4alpha.AccessLogFilter filter = 1 [(validate.rules).message = {required: true}]; - - // The new response status code if specified. - google.protobuf.UInt32Value status_code = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // The new local reply body text if specified. It will be used in the `%LOCAL_REPLY_BODY%` - // command operator in the `body_format`. - config.core.v4alpha.DataSource body = 3; - - // A per mapper `body_format` to override the :ref:`body_format `. - // It will be used when this mapper is matched. - config.core.v4alpha.SubstitutionFormatString body_format_override = 4; - - // HTTP headers to add to a local reply. This allows the response mapper to append, to add - // or to override headers of any local reply before it is sent to a downstream client. - repeated config.core.v4alpha.HeaderValueOption headers_to_add = 5 - [(validate.rules).repeated = {max_items: 1000}]; -} - -message Rds { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.Rds"; - - // Configuration source specifier for RDS. - config.core.v4alpha.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; - - // 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. - string route_config_name = 2; -} - -// This message is used to work around the limitations with 'oneof' and repeated fields. -message ScopedRouteConfigurationsList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList"; - - repeated config.route.v4alpha.ScopedRouteConfiguration scoped_route_configurations = 1 - [(validate.rules).repeated = {min_items: 1}]; -} - -// [#next-free-field: 6] -message ScopedRoutes { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes"; - - // Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These - // keys are matched against a set of :ref:`Key` - // objects assembled from :ref:`ScopedRouteConfiguration` - // messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via - // :ref:`scoped_route_configurations_list`. - // - // Upon receiving a request's headers, the Router will build a key using the algorithm specified - // by this message. This key will be used to look up the routing table (i.e., the - // :ref:`RouteConfiguration`) to use for the request. - message ScopeKeyBuilder { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder"; - - // Specifies the mechanism for constructing key fragments which are composed into scope keys. - message FragmentBuilder { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes." - "ScopeKeyBuilder.FragmentBuilder"; - - // Specifies how the value of a header should be extracted. - // The following example maps the structure of a header to the fields in this message. - // - // .. code:: - // - // <0> <1> <-- index - // X-Header: a=b;c=d - // | || | - // | || \----> - // | || - // | |\----> - // | | - // | \----> - // | - // \----> - // - // Each 'a=b' key-value pair constitutes an 'element' of the header field. - message HeaderValueExtractor { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes." - "ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor"; - - // Specifies a header field's key value pair to match on. - message KvElement { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes." - "ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement"; - - // The separator between key and value (e.g., '=' separates 'k=v;...'). - // If an element is an empty string, the element is ignored. - // If an element contains no separator, the whole element is parsed as key and the - // fragment value is an empty string. - // If there are multiple values for a matched key, the first value is returned. - string separator = 1 [(validate.rules).string = {min_len: 1}]; - - // The key to match on. - string key = 2 [(validate.rules).string = {min_len: 1}]; - } - - // The name of the header field to extract the value from. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The element separator (e.g., ';' separates 'a;b;c;d'). - // Default: empty string. This causes the entirety of the header field to be extracted. - // If this field is set to an empty string and 'index' is used in the oneof below, 'index' - // must be set to 0. - string element_separator = 2; - - oneof extract_type { - // Specifies the zero based index of the element to extract. - // Note Envoy concatenates multiple values of the same header key into a comma separated - // string, the splitting always happens after the concatenation. - uint32 index = 3; - - // Specifies the key value pair to extract the value from. - KvElement element = 4; - } - } - - oneof type { - option (validate.required) = true; - - // Specifies how a header field's value should be extracted. - HeaderValueExtractor header_value_extractor = 1; - } - } - - // The final(built) scope key consists of the ordered union of these fragments, which are compared in order with the - // fragments of a :ref:`ScopedRouteConfiguration`. - // A missing fragment during comparison will make the key invalid, i.e., the computed key doesn't match any key. - repeated FragmentBuilder fragments = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // The name assigned to the scoped routing configuration. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The algorithm to use for constructing a scope key for each request. - ScopeKeyBuilder scope_key_builder = 2 [(validate.rules).message = {required: true}]; - - // Configuration source specifier for RDS. - // This config source is used to subscribe to RouteConfiguration resources specified in - // ScopedRouteConfiguration messages. - config.core.v4alpha.ConfigSource rds_config_source = 3 - [(validate.rules).message = {required: true}]; - - oneof config_specifier { - option (validate.required) = true; - - // The set of routing scopes corresponding to the HCM. A scope is assigned to a request by - // matching a key constructed from the request's attributes according to the algorithm specified - // by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRouteConfigurationsList scoped_route_configurations_list = 4; - - // The set of routing scopes associated with the HCM will be dynamically loaded via the SRDS - // API. A scope is assigned to a request by matching a key constructed from the request's - // attributes according to the algorithm specified by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRds scoped_rds = 5; - } -} - -message ScopedRds { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds"; - - // Configuration source specifier for scoped RDS. - config.core.v4alpha.ConfigSource scoped_rds_config_source = 1 - [(validate.rules).message = {required: true}]; -} - -// [#next-free-field: 6] -message HttpFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter"; - - reserved 3, 2; - - reserved "config"; - - // The name of the filter configuration. The name is used as a fallback to - // select an extension if the type of the configuration proto is not - // sufficient. It also serves as a resource name in ExtensionConfigDS. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - google.protobuf.Any typed_config = 4; - - // Configuration source specifier for an extension configuration discovery service. - // In case of a failure and without the default configuration, the HTTP listener responds with code 500. - // Extension configs delivered through this mechanism are not expected to require warming (see https://github.com/envoyproxy/envoy/issues/12061). - config.core.v4alpha.ExtensionConfigSource config_discovery = 5; - } -} - -message RequestIDExtension { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension"; - - // Request ID extension specific configuration. - google.protobuf.Any typed_config = 1; -} diff --git a/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto b/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto deleted file mode 100644 index 0fac07427d..0000000000 --- a/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.kafka_broker.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.kafka_broker.v3"; -option java_outer_classname = "KafkaBrokerProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Kafka Broker] -// Kafka Broker :ref:`configuration overview `. -// [#extension: envoy.filters.network.kafka_broker] - -message KafkaBroker { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.kafka_broker.v2alpha1.KafkaBroker"; - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto b/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto index 37eb8c62d0..ac87cb611a 100644 --- a/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto +++ b/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.local_ratelimit.v3"; option java_outer_classname = "LocalRateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/local_ratelimit/v3;local_ratelimitv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Local rate limit] @@ -32,15 +33,22 @@ message LocalRateLimit { // the connection will be immediately closed. // // .. note:: - // In the current implementation each filter and filter chain has an independent rate limit. + // In the current implementation each filter and filter chain has an independent rate limit, unless + // a shared rate limit is configured via :ref:`share_key `. // // .. note:: // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive + // ` must be >= 50ms to avoid too aggressive // refills. type.v3.TokenBucket token_bucket = 2 [(validate.rules).message = {required: true}]; // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults // to enabled. config.core.v3.RuntimeFeatureFlag runtime_enabled = 3; + + // Specifies that the token bucket used for rate limiting should be shared with other local_rate_limit filters + // with a matching :ref:`token_bucket ` + // and `share_key` configuration. All fields of `token_bucket` must match exactly for the token bucket to be shared. If this + // field is empty, this filter will not share a token bucket with any other filter. + string share_key = 4; } diff --git a/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto b/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto new file mode 100644 index 0000000000..1d831c9f34 --- /dev/null +++ b/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3; + +import "envoy/config/route/v3/route_components.proto"; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3"; +option java_outer_classname = "ActionProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3;actionv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; + +// [#protodoc-title: Meta Protocol Proxy Route Action Configuration] + +// Configuration for the route match action. +// [#not-implemented-hide:] +message RouteAction { + oneof cluster_specifier { + option (validate.required) = true; + + // Indicates the upstream cluster to which the request should be routed. + string cluster = 1; + + // Multiple upstream clusters can be specified for a given route. The request is routed to one + // of the upstream clusters based on weights assigned to each cluster. + // Currently ClusterWeight only supports the name and weight fields. + config.route.v3.WeightedCluster weighted_clusters = 2; + } +} diff --git a/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto b/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto new file mode 100644 index 0000000000..6067963987 --- /dev/null +++ b/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3"; +option java_outer_classname = "MatcherProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3;matcherv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; + +// [#protodoc-title: Meta Protocol Proxy Route Matcher Configuration] + +// Used to match request service of the downstream request. Only applicable if a service provided +// by the application protocol. +// [#not-implemented-hide:] +message ServiceMatchInput { +} + +// Used to match request method of the downstream request. Only applicable if a method provided +// by the application protocol. +// [#not-implemented-hide:] +message MethodMatchInput { +} + +// Used to match an arbitrary property of the downstream request. +// These properties are populated by the codecs of application protocols. +// [#not-implemented-hide:] +message PropertyMatchInput { + // The property name to match on. + string property_name = 1 [(validate.rules).string = {min_len: 1}]; +} diff --git a/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto b/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto new file mode 100644 index 0000000000..7ab09b16b8 --- /dev/null +++ b/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; + +package envoy.extensions.filters.network.meta_protocol_proxy.v3; + +import "envoy/config/core/v3/config_source.proto"; +import "envoy/config/core/v3/extension.proto"; +import "envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto"; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.network.meta_protocol_proxy.v3"; +option java_outer_classname = "MetaProtocolProxyProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/meta_protocol_proxy/v3;meta_protocol_proxyv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; + +// [#protodoc-title: Meta Protocol Proxy] +// Meta Protocol proxy. + +// [#not-implemented-hide:] +// [#next-free-field: 6] +message MetaProtocolProxy { + // The human readable prefix to use when emitting statistics. + string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; + + // The application protocol built on top of the meta protocol proxy. + ApplicationProtocol application_protocol = 2 [(validate.rules).message = {required: true}]; + + oneof route_specifier { + option (validate.required) = true; + + // The meta protocol proxies route table will be dynamically loaded via the meta RDS API. + MetaRds rds = 3; + + // The route table for the meta protocol proxy is static and is specified in this property. + RouteConfiguration route_config = 4; + } + + // A list of individual Layer-7 filters that make up the filter chain for requests made to the + // meta protocol proxy. Order matters as the filters are processed sequentially as request events + // happen. + repeated config.core.v3.TypedExtensionConfig meta_protocol_filters = 5; +} + +// [#not-implemented-hide:] +message ApplicationProtocol { + // The name of the application protocol. + string name = 1 [(validate.rules).string = {min_len: 1}]; + + // The codec which encodes and decodes the application protocol. + config.core.v3.TypedExtensionConfig codec = 2 [(validate.rules).message = {required: true}]; +} + +// [#not-implemented-hide:] +message MetaRds { + // Configuration source specifier for RDS. + config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; + + // The name of the route configuration. This name will be passed to the RDS API. This allows an + // Envoy configuration with multiple meta protocol proxies to use different route configurations. + string route_config_name = 2 [(validate.rules).string = {min_len: 1}]; +} diff --git a/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto b/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto new file mode 100644 index 0000000000..f254886ea9 --- /dev/null +++ b/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; + +package envoy.extensions.filters.network.meta_protocol_proxy.v3; + +import "xds/annotations/v3/status.proto"; +import "xds/type/matcher/v3/matcher.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.network.meta_protocol_proxy.v3"; +option java_outer_classname = "RouteProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/meta_protocol_proxy/v3;meta_protocol_proxyv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; + +// [#protodoc-title: Meta Protocol Proxy Route Configuration] +// The meta protocol proxy makes use of the `xds matching API` for routing configurations. +// +// In the below example, we combine a top level tree matcher with a linear matcher to match +// the incoming requests, and send the matching requests to v1 of the upstream service. +// +// name: demo-v1 +// route: +// matcher_tree: +// input: +// name: request-service +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.ServiceMatchInput +// exact_match_map: +// map: +// org.apache.dubbo.samples.basic.api.DemoService: +// matcher: +// matcher_list: +// matchers: +// - predicate: +// and_matcher: +// predicate: +// - single_predicate: +// input: +// name: request-properties +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +// property_name: version +// value_match: +// exact: v1 +// - single_predicate: +// input: +// name: request-properties +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +// property_name: user +// value_match: +// exact: john +// on_match: +// action: +// name: route +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.routeAction +// cluster: outbound|20880|v1|org.apache.dubbo.samples.basic.api.demoservice +// [#not-implemented-hide:] +message RouteConfiguration { + // The name of the route configuration. For example, it might match route_config_name in + // envoy.extensions.filters.network.meta_protocol_proxy.v3.Rds. + string name = 1 [(validate.rules).string = {min_len: 1}]; + + // The match tree to use when resolving route actions for incoming requests. + xds.type.matcher.v3.Matcher route = 2 [(validate.rules).message = {required: true}]; +} diff --git a/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto b/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto index ebdfb6f2fc..721f722ef6 100644 --- a/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto +++ b/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.mongo_proxy.v3"; option java_outer_classname = "MongoProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/mongo_proxy/v3;mongo_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Mongo proxy] diff --git a/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto b/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto deleted file mode 100644 index 9dfdb14d3f..0000000000 --- a/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.mysql_proxy.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.mysql_proxy.v3"; -option java_outer_classname = "MysqlProxyProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: MySQL proxy] -// MySQL Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.mysql_proxy] - -message MySQLProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.mysql_proxy.v1alpha1.MySQLProxy"; - - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // [#not-implemented-hide:] The optional path to use for writing MySQL access logs. - // If the access log field is empty, access logs will not be written. - string access_log = 2; -} diff --git a/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto b/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto deleted file mode 100644 index aa8e0f5941..0000000000 --- a/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.postgres_proxy.v3alpha; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.postgres_proxy.v3alpha"; -option java_outer_classname = "PostgresProxyProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Postgres proxy] -// Postgres Proxy :ref:`configuration overview -// `. -// [#extension: envoy.filters.network.postgres_proxy] - -message PostgresProxy { - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Controls whether SQL statements received in Frontend Query messages - // are parsed. Parsing is required to produce Postgres proxy filter - // metadata. Defaults to true. - google.protobuf.BoolValue enable_sql_parsing = 2; -} diff --git a/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto b/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto index 2fcdda846b..9e8ab8b63d 100644 --- a/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto +++ b/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.ratelimit.v3"; option java_outer_classname = "RateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/ratelimit/v3;ratelimitv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Rate limit] diff --git a/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.proto b/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.proto deleted file mode 100644 index b53cb3bcc1..0000000000 --- a/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.ratelimit.v4alpha; - -import "envoy/config/ratelimit/v4alpha/rls.proto"; -import "envoy/extensions/common/ratelimit/v3/ratelimit.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.ratelimit.v4alpha"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.network.ratelimit] - -// [#next-free-field: 7] -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.ratelimit.v3.RateLimit"; - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The rate limit domain to use in the rate limit service request. - string domain = 2 [(validate.rules).string = {min_len: 1}]; - - // The rate limit descriptor list to use in the rate limit service request. - repeated common.ratelimit.v3.RateLimitDescriptor descriptors = 3 - [(validate.rules).repeated = {min_items: 1}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 4; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - bool failure_mode_deny = 5; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - config.ratelimit.v4alpha.RateLimitServiceConfig rate_limit_service = 6 - [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/extensions/filters/network/rbac/v3/rbac.proto b/api/envoy/extensions/filters/network/rbac/v3/rbac.proto index 6b8d3b0181..44141f1670 100644 --- a/api/envoy/extensions/filters/network/rbac/v3/rbac.proto +++ b/api/envoy/extensions/filters/network/rbac/v3/rbac.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.rbac.v3"; option java_outer_classname = "RbacProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/rbac/v3;rbacv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: RBAC] @@ -21,6 +22,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // // Header should not be used in rules/shadow_rules in RBAC network filter as // this information is only available in :ref:`RBAC http filter `. +// [#next-free-field: 6] message RBAC { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.rbac.v2.RBAC"; @@ -38,6 +40,7 @@ message RBAC { // Specify the RBAC rules to be applied globally. // If absent, no enforcing RBAC policy will be applied. + // If present and empty, DENY. config.rbac.v3.RBAC rules = 1; // Shadow rules are not enforced by the filter but will emit stats and logs @@ -45,6 +48,11 @@ message RBAC { // If absent, no shadow RBAC policy will be applied. config.rbac.v3.RBAC shadow_rules = 2; + // If specified, shadow rules will emit stats with the given prefix. + // This is useful to distinguish the stat when there are more than 1 RBAC filter configured with + // shadow rules. + string shadow_rules_stat_prefix = 5; + // The prefix to use when emitting statistics. string stat_prefix = 3 [(validate.rules).string = {min_len: 1}]; diff --git a/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.proto b/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.proto deleted file mode 100644 index a1508997df..0000000000 --- a/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rbac.v4alpha; - -import "envoy/config/rbac/v4alpha/rbac.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rbac.v4alpha"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: RBAC] -// Role-Based Access Control :ref:`configuration overview `. -// [#extension: envoy.filters.network.rbac] - -// RBAC network filter config. -// -// Header should not be used in rules/shadow_rules in RBAC network filter as -// this information is only available in :ref:`RBAC http filter `. -message RBAC { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.rbac.v3.RBAC"; - - enum EnforcementType { - // Apply RBAC policies when the first byte of data arrives on the connection. - ONE_TIME_ON_FIRST_BYTE = 0; - - // Continuously apply RBAC policies as data arrives. Use this mode when - // using RBAC with message oriented protocols such as Mongo, MySQL, Kafka, - // etc. when the protocol decoders emit dynamic metadata such as the - // resources being accessed and the operations on the resources. - CONTINUOUS = 1; - } - - // Specify the RBAC rules to be applied globally. - // If absent, no enforcing RBAC policy will be applied. - config.rbac.v4alpha.RBAC rules = 1; - - // Shadow rules are not enforced by the filter but will emit stats and logs - // and can be used for rule testing. - // If absent, no shadow RBAC policy will be applied. - config.rbac.v4alpha.RBAC shadow_rules = 2; - - // The prefix to use when emitting statistics. - string stat_prefix = 3 [(validate.rules).string = {min_len: 1}]; - - // RBAC enforcement strategy. By default RBAC will be enforced only once - // when the first byte of data arrives from the downstream. When used in - // conjunction with filters that emit dynamic metadata after decoding - // every payload (e.g., Mongo, MySQL, Kafka) set the enforcement type to - // CONTINUOUS to enforce RBAC policies on every message boundary. - EnforcementType enforcement_type = 4; -} diff --git a/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto b/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto index 4e1a8099fc..fb2eac53cd 100644 --- a/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto +++ b/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto @@ -7,7 +7,6 @@ import "envoy/config/core/v3/base.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; -import "envoy/annotations/deprecation.proto"; import "udpa/annotations/migrate.proto"; import "udpa/annotations/sensitive.proto"; import "udpa/annotations/status.proto"; @@ -17,6 +16,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.redis_proxy.v3"; option java_outer_classname = "RedisProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/redis_proxy/v3;redis_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Redis Proxy] @@ -243,7 +243,7 @@ message RedisProxy { // * ``get abc:users`` would retrieve the key 'abc:users' from cluster_b. // * ``get ab:users`` would retrieve the key 'ab:users' from cluster_a. // * ``get z:users`` would return a NoUpstreamHost error. A :ref:`catch-all - // route` + // route` // would have retrieved the key from that cluster instead. // // See the :ref:`configuration section @@ -304,7 +304,7 @@ message RedisProxy { } // RedisProtocolOptions specifies Redis upstream protocol options. This object is used in -// :ref:`typed_extension_protocol_options`, +// :ref:`typed_extension_protocol_options`, // keyed by the name `envoy.filters.network.redis_proxy`. message RedisProtocolOptions { option (udpa.annotations.versioning).previous_message_type = diff --git a/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto b/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto deleted file mode 100644 index e29a3d10af..0000000000 --- a/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rocketmq_proxy.v3; - -import "envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v3"; -option java_outer_classname = "RocketmqProxyProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: RocketMQ Proxy] -// RocketMQ Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.rocketmq_proxy] - -message RocketmqProxy { - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The route table for the connection manager is specified in this property. - RouteConfiguration route_config = 2; - - // The largest duration transient object expected to live, more than 10s is recommended. - google.protobuf.Duration transient_object_life_span = 3; - - // If develop_mode is enabled, this proxy plugin may work without dedicated traffic intercepting - // facility without considering backward compatibility of exiting RocketMQ client SDK. - bool develop_mode = 4; -} diff --git a/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto b/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto deleted file mode 100644 index 899debcbde..0000000000 --- a/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rocketmq_proxy.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v3"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rocketmq Proxy Route Configuration] -// Rocketmq Proxy :ref:`configuration overview `. - -message RouteConfiguration { - // The name of the route configuration. - string name = 1; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 2; -} - -message Route { - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - // The name of the topic. - type.matcher.v3.StringMatcher topic = 1 [(validate.rules).message = {required: true}]; - - // 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). - repeated config.route.v3.HeaderMatcher headers = 2; -} - -message RouteAction { - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. - config.core.v3.Metadata metadata_match = 2; -} diff --git a/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.proto b/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.proto deleted file mode 100644 index cbc66fcd99..0000000000 --- a/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rocketmq_proxy.v4alpha; - -import "envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v4alpha"; -option java_outer_classname = "RocketmqProxyProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: RocketMQ Proxy] -// RocketMQ Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.rocketmq_proxy] - -message RocketmqProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.rocketmq_proxy.v3.RocketmqProxy"; - - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The route table for the connection manager is specified in this property. - RouteConfiguration route_config = 2; - - // The largest duration transient object expected to live, more than 10s is recommended. - google.protobuf.Duration transient_object_life_span = 3; - - // If develop_mode is enabled, this proxy plugin may work without dedicated traffic intercepting - // facility without considering backward compatibility of exiting RocketMQ client SDK. - bool develop_mode = 4; -} diff --git a/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.proto b/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.proto deleted file mode 100644 index 0925afef83..0000000000 --- a/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rocketmq_proxy.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v4alpha"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Rocketmq Proxy Route Configuration] -// Rocketmq Proxy :ref:`configuration overview `. - -message RouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.rocketmq_proxy.v3.RouteConfiguration"; - - // The name of the route configuration. - string name = 1; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 2; -} - -message Route { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.rocketmq_proxy.v3.Route"; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.rocketmq_proxy.v3.RouteMatch"; - - // The name of the topic. - type.matcher.v4alpha.StringMatcher topic = 1 [(validate.rules).message = {required: true}]; - - // 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). - repeated config.route.v4alpha.HeaderMatcher headers = 2; -} - -message RouteAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.rocketmq_proxy.v3.RouteAction"; - - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. - config.core.v4alpha.Metadata metadata_match = 2; -} diff --git a/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto b/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto index 3d6f0ee234..15eae78f89 100644 --- a/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto +++ b/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.sni_cluster.v3"; option java_outer_classname = "SniClusterProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/sni_cluster/v3;sni_clusterv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: SNI Cluster Filter] diff --git a/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto b/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto similarity index 82% rename from api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto rename to api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto index 502a668931..1ab471e0d7 100644 --- a/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto +++ b/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto @@ -1,17 +1,16 @@ syntax = "proto3"; -package envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha; +package envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3; import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3"; option java_outer_classname = "SniDynamicForwardProxyProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3;sni_dynamic_forward_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: SNI dynamic forward proxy] @@ -26,7 +25,7 @@ message FilterConfig { // The DNS cache configuration that the filter will attach to. Note this // configuration must match that of associated :ref:`dynamic forward proxy // cluster configuration - // `. + // `. common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1 [(validate.rules).message = {required: true}]; diff --git a/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto b/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto index cbe7581588..5be0bcd853 100644 --- a/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto +++ b/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto @@ -4,6 +4,7 @@ package envoy.extensions.filters.network.tcp_proxy.v3; import "envoy/config/accesslog/v3/accesslog.proto"; import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/config_source.proto"; import "envoy/type/v3/hash_policy.proto"; import "google/protobuf/duration.proto"; @@ -16,13 +17,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.tcp_proxy.v3"; option java_outer_classname = "TcpProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/tcp_proxy/v3;tcp_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: TCP Proxy] // TCP Proxy :ref:`configuration overview `. // [#extension: envoy.filters.network.tcp_proxy] -// [#next-free-field: 14] +// [#next-free-field: 15] message TcpProxy { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.tcp_proxy.v2.TcpProxy"; @@ -50,7 +52,7 @@ message TcpProxy { // 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:`TcpProxy.metadata_match - // `, with values + // `, with values // here taking precedence. The filter name should be specified as *envoy.lb*. config.core.v3.Metadata metadata_match = 3; } @@ -60,14 +62,46 @@ message TcpProxy { } // Configuration for tunneling TCP over other transports or application layers. - // Currently, only HTTP/2 is supported. When other options exist, HTTP/2 will - // remain the default. + // Tunneling is supported over both HTTP/1.1 and HTTP/2. Upstream protocol is + // determined by the cluster configuration. message TunnelingConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.TunnelingConfig"; // The hostname to send in the synthesized CONNECT headers to the upstream proxy. string hostname = 1 [(validate.rules).string = {min_len: 1}]; + + // Use POST method instead of CONNECT method to tunnel the TCP stream. + // The 'protocol: bytestream' header is also NOT set for HTTP/2 to comply with the spec. + // + // The upstream proxy is expected to convert POST payload as raw TCP. + bool use_post = 2; + + // Additional request headers to upstream proxy. This is mainly used to + // trigger upstream to convert POST requests back to CONNECT requests. + // + // Neither *:-prefixed* pseudo-headers nor the Host: header can be overridden. + repeated config.core.v3.HeaderValueOption headers_to_add = 3 + [(validate.rules).repeated = {max_items: 1000}]; + } + + message OnDemand { + // An optional configuration for on-demand cluster discovery + // service. If not specified, the on-demand cluster discovery will + // be disabled. When it's specified, the filter will pause a request + // to an unknown cluster and will begin a cluster discovery + // process. When the discovery is finished (successfully or not), + // the request will be resumed. + config.core.v3.ConfigSource odcds_config = 1; + + // xdstp:// resource locator for on-demand cluster collection. + // [#not-implemented-hide:] + string resources_locator = 2; + + // The timeout for on demand cluster lookup. If the CDS cannot return the required cluster, + // the downstream request will be closed with the error code detail NO_CLUSTER_FOUND. + // [#not-implemented-hide:] + google.protobuf.Duration timeout = 3; } reserved 6; @@ -90,6 +124,13 @@ message TcpProxy { WeightedCluster weighted_clusters = 10; } + // The on demand policy for the upstream cluster. + // It applies to both + // :ref:`TcpProxy.cluster ` + // and + // :ref:`TcpProxy.weighted_clusters `. + OnDemand on_demand = 14; + // 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*. @@ -129,10 +170,8 @@ message TcpProxy { // limited to 1. repeated type.v3.HashPolicy hash_policy = 11 [(validate.rules).repeated = {max_items: 1}]; - // [#not-implemented-hide:] feature in progress - // If set, this configures tunneling, e.g. configuration options to tunnel multiple TCP - // payloads over a shared HTTP/2 tunnel. If this message is absent, the payload - // will be proxied upstream as per usual. + // If set, this configures tunneling, e.g. configuration options to tunnel TCP payload over + // HTTP CONNECT. If this message is absent, the payload will be proxied upstream as per usual. TunnelingConfig tunneling_config = 12; // The maximum duration of a connection. The duration is defined as the period since a connection diff --git a/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.proto b/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.proto deleted file mode 100644 index 9a2f395176..0000000000 --- a/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.proto +++ /dev/null @@ -1,143 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.tcp_proxy.v4alpha; - -import "envoy/config/accesslog/v4alpha/accesslog.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/type/v3/hash_policy.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.tcp_proxy.v4alpha"; -option java_outer_classname = "TcpProxyProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: TCP Proxy] -// TCP Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.tcp_proxy] - -// [#next-free-field: 14] -message TcpProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy"; - - // 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. - message WeightedCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster"; - - message ClusterWeight { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster.ClusterWeight"; - - // Name of the upstream cluster. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // 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. - uint32 weight = 2 [(validate.rules).uint32 = {gte: 1}]; - - // 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:`TcpProxy.metadata_match - // `, with values - // here taking precedence. The filter name should be specified as *envoy.lb*. - config.core.v4alpha.Metadata metadata_match = 3; - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Configuration for tunneling TCP over other transports or application layers. - // Currently, only HTTP/2 is supported. When other options exist, HTTP/2 will - // remain the default. - message TunnelingConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.TunnelingConfig"; - - // The hostname to send in the synthesized CONNECT headers to the upstream proxy. - string hostname = 1 [(validate.rules).string = {min_len: 1}]; - } - - reserved 6; - - reserved "deprecated_v1"; - - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - oneof cluster_specifier { - option (validate.required) = true; - - // The upstream cluster to connect to. - string cluster = 2; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - WeightedCluster weighted_clusters = 10; - } - - // 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*. - config.core.v4alpha.Metadata metadata_match = 9; - - // 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, the default idle timeout is 1 hour. If set - // to 0s, the timeout will be disabled. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - google.protobuf.Duration idle_timeout = 8; - - // [#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. - google.protobuf.Duration downstream_idle_timeout = 3; - - // [#not-implemented-hide:] - google.protobuf.Duration upstream_idle_timeout = 4; - - // Configuration for :ref:`access logs ` - // emitted by the this tcp_proxy. - repeated config.accesslog.v4alpha.AccessLog access_log = 5; - - // 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. - google.protobuf.UInt32Value max_connect_attempts = 7 [(validate.rules).uint32 = {gte: 1}]; - - // Optional configuration for TCP proxy hash policy. If hash_policy is not set, the hash-based - // load balancing algorithms will select a host randomly. Currently the number of hash policies is - // limited to 1. - repeated type.v3.HashPolicy hash_policy = 11 [(validate.rules).repeated = {max_items: 1}]; - - // [#not-implemented-hide:] feature in progress - // If set, this configures tunneling, e.g. configuration options to tunnel multiple TCP - // payloads over a shared HTTP/2 tunnel. If this message is absent, the payload - // will be proxied upstream as per usual. - TunnelingConfig tunneling_config = 12; - - // The maximum duration of a connection. The duration is defined as the period since a connection - // was established. If not set, there is no max duration. When max_downstream_connection_duration - // is reached the connection will be closed. Duration must be at least 1ms. - google.protobuf.Duration max_downstream_connection_duration = 13 - [(validate.rules).duration = {gte {nanos: 1000000}}]; -} diff --git a/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto b/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto new file mode 100644 index 0000000000..aa3bc02ef2 --- /dev/null +++ b/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto @@ -0,0 +1,110 @@ +syntax = "proto3"; + +package envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3; + +import "envoy/type/matcher/v3/regex.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3"; +option java_outer_classname = "HeaderToMetadataProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3;header_to_metadatav3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Header-To-Metadata Filter] +// +// The configuration for transforming headers into metadata. This is useful +// for matching load balancer subsets, logging, etc. +// +// Header to Metadata :ref:`configuration overview `. +// [#extension: envoy.filters.thrift.header_to_metadata] + +message HeaderToMetadata { + enum ValueType { + STRING = 0; + + NUMBER = 1; + + // The value is a serialized `protobuf.Value + // `_. + PROTOBUF_VALUE = 2; + } + + // ValueEncode defines the encoding algorithm. + enum ValueEncode { + // The value is not encoded. + NONE = 0; + + // The value is encoded in `Base64 `_. + // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the + // non-ASCII characters in the header. + BASE64 = 1; + } + + // [#next-free-field: 7] + message KeyValuePair { + // The namespace — if this is empty, the filter's namespace will be used. + string metadata_namespace = 1; + + // The key to use within the namespace. + string key = 2 [(validate.rules).string = {min_len: 1}]; + + oneof value_type { + // The value to pair with the given key. + // + // When used for on_present case, if value is non-empty it'll be used instead + // of the header value. If both are empty, no metadata is added. + // + // When used for on_missing case, a non-empty value must be provided otherwise + // no metadata is added. + string value = 3; + + // If present, the header's value will be matched and substituted with this. + // If there is no match or substitution, the header value + // is used as-is. + // + // This is only used for on_present. + // + // Note: if the `value` field is non-empty this field should be empty. + type.matcher.v3.RegexMatchAndSubstitute regex_value_rewrite = 4; + } + + // The value's type — defaults to string. + ValueType type = 5 [(validate.rules).enum = {defined_only: true}]; + + // How is the value encoded, default is NONE (not encoded). + // The value will be decoded accordingly before storing to metadata. + ValueEncode encode = 6; + } + + // A Rule defines what metadata to apply when a header is present or missing. + message Rule { + // Specifies that a match will be performed on the value of a header. + // + // The header to be extracted. + string header = 1 + [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; + + // If the header is present, apply this metadata KeyValuePair. + // + // If the value in the KeyValuePair is non-empty, it'll be used instead + // of the header value. + KeyValuePair on_present = 2; + + // If the header is not present, apply this metadata KeyValuePair. + // + // The value in the KeyValuePair must be set, since it'll be used in lieu + // of the missing header value. + KeyValuePair on_missing = 3; + + // Whether or not to remove the header after a rule is applied. + // + // This prevents headers from leaking. + bool remove = 4; + } + + // The list of rules to apply to requests. + repeated Rule request_rules = 1 [(validate.rules).repeated = {min_items: 1}]; +} diff --git a/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto b/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto index c93b4d1e8e..b3e70a4583 100644 --- a/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto +++ b/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3"; option java_outer_classname = "RateLimitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3;ratelimitv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Rate limit] @@ -29,7 +30,7 @@ message RateLimit { // Specifies the rate limit configuration stage. Each configured rate limit filter performs a // rate limit check using descriptors configured in the - // :ref:`envoy_api_msg_extensions.filters.network.thrift_proxy.v3.RouteAction` for the request. + // :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.RouteAction` for the request. // Only those entries with a matching stage number are used for a given filter. If not set, the // default stage number is 0. // diff --git a/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.proto b/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.proto deleted file mode 100644 index ed49380f83..0000000000 --- a/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v4alpha; - -import "envoy/config/ratelimit/v4alpha/rls.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v4alpha"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.thrift.ratelimit] - -// [#next-free-field: 6] -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3.RateLimit"; - - // The rate limit domain to use in the rate limit service request. - string domain = 1 [(validate.rules).string = {min_len: 1}]; - - // Specifies the rate limit configuration stage. Each configured rate limit filter performs a - // rate limit check using descriptors configured in the - // :ref:`envoy_api_msg_extensions.filters.network.thrift_proxy.v4alpha.RouteAction` for the request. - // Only those entries with a matching stage number are used for a given filter. If not set, the - // default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - uint32 stage = 2 [(validate.rules).uint32 = {lte: 10}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 3; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - bool failure_mode_deny = 4; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - config.ratelimit.v4alpha.RateLimitServiceConfig rate_limit_service = 5 - [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto b/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto new file mode 100644 index 0000000000..15ba7884da --- /dev/null +++ b/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package envoy.extensions.filters.network.thrift_proxy.router.v3; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.router.v3"; +option java_outer_classname = "RouterProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/router/v3;routerv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Router] +// Thrift router :ref:`configuration overview `. +// [#extension: envoy.filters.thrift.router] + +message Router { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.filter.thrift.router.v2alpha1.Router"; +} diff --git a/api/envoy/extensions/filters/network/thrift_proxy/v3/route.proto b/api/envoy/extensions/filters/network/thrift_proxy/v3/route.proto index f00b0e6983..a1582a30e1 100644 --- a/api/envoy/extensions/filters/network/thrift_proxy/v3/route.proto +++ b/api/envoy/extensions/filters/network/thrift_proxy/v3/route.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.v3"; option java_outer_classname = "RouteProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/v3;thrift_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Thrift Proxy Route Configuration] @@ -60,17 +61,17 @@ message RouteMatch { } // Inverts whatever matching is done in the :ref:`method_name - // ` or + // ` or // :ref:`service_name - // ` fields. + // ` fields. // Cannot be combined with wildcard matching as that would result in routes never being matched. // // .. note:: // // This does not invert matching done as part of the :ref:`headers field - // ` field. To + // ` field. To // invert header matching, see :ref:`invert_match - // `. + // `. bool invert = 3; // Specifies a set of headers that the route should match on. The router will check the request’s @@ -81,11 +82,33 @@ message RouteMatch { repeated config.route.v3.HeaderMatcher headers = 4; } -// [#next-free-field: 7] +// [#next-free-field: 8] message RouteAction { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.thrift_proxy.v2alpha1.RouteAction"; + // 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. + // + // .. note:: + // + // Shadowing will not be triggered if the primary cluster does not exist. + message RequestMirrorPolicy { + // Specifies the cluster that requests will be mirrored to. The cluster must + // exist in the cluster manager configuration when the route configuration is loaded. + // If it disappears at runtime, the shadow request will silently be ignored. + string cluster = 1 [(validate.rules).string = {min_len: 1}]; + + // If not specified, all requests to the target cluster will be mirrored. + // + // 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. + config.core.v3.RuntimeFractionalPercent runtime_fraction = 2; + } + oneof cluster_specifier { option (validate.required) = true; @@ -110,7 +133,7 @@ message RouteAction { // 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. // Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match - // `, + // `, // with values there taking precedence. Keys and values should be provided under the "envoy.lb" // metadata key. config.core.v3.Metadata metadata_match = 3; @@ -123,6 +146,9 @@ message RouteAction { // Strip the service prefix from the method name, if there's a prefix. For // example, the method call Service:method would end up being just method. bool strip_service_name = 5; + + // Indicates that the route has request mirroring policies. + repeated RequestMirrorPolicy request_mirror_policies = 7; } // Allows for specification of multiple upstream clusters along with weights that indicate the @@ -147,7 +173,7 @@ message WeightedCluster { // 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, combined with what's // provided in :ref:`RouteAction's metadata_match - // `, + // `, // will be considered. Values here will take precedence. Keys and values should be provided // under the "envoy.lb" metadata key. config.core.v3.Metadata metadata_match = 3; diff --git a/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto b/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto index 53bec04361..ae9befdf60 100644 --- a/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto +++ b/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto @@ -2,11 +2,14 @@ syntax = "proto3"; package envoy.extensions.filters.network.thrift_proxy.v3; +import "envoy/config/core/v3/config_source.proto"; import "envoy/extensions/filters/network/thrift_proxy/v3/route.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; +import "google/protobuf/wrappers.proto"; +import "envoy/annotations/deprecation.proto"; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -14,6 +17,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.v3"; option java_outer_classname = "ThriftProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/v3;thrift_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Thrift Proxy] @@ -55,39 +59,59 @@ enum ProtocolType { COMPACT = 3; // The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library. - TWITTER = 4; + TWITTER = 4 [deprecated = true, (envoy.annotations.deprecated_at_minor_version_enum) = "3.0"]; } -// [#next-free-field: 7] +message Trds { + // Configuration source specifier. + // In case of *api_config_source* only aggregated *api_type* is supported. + config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; + + // The name of the route configuration. This allows to use different route + // configurations. Tells which route configuration should be fetched from the configuration source. + // Leave unspecified is also valid and means the unnamed route configuration. + string route_config_name = 2; +} + +// [#next-free-field: 9] message ThriftProxy { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.thrift_proxy.v2alpha1.ThriftProxy"; // Supplies the type of transport that the Thrift proxy should use. Defaults to - // :ref:`AUTO_TRANSPORT`. + // :ref:`AUTO_TRANSPORT`. TransportType transport = 2 [(validate.rules).enum = {defined_only: true}]; // Supplies the type of protocol that the Thrift proxy should use. Defaults to - // :ref:`AUTO_PROTOCOL`. + // :ref:`AUTO_PROTOCOL`. ProtocolType protocol = 3 [(validate.rules).enum = {defined_only: true}]; // The human readable prefix to use when emitting statistics. string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; // The route table for the connection manager is static and is specified in this property. - RouteConfiguration route_config = 4; + // It is invalid to define both *route_config* and *trds*. + RouteConfiguration route_config = 4 + [(udpa.annotations.field_migrate).oneof_promotion = "route_specifier"]; + + // Use xDS to fetch the route configuration. It is invalid to define both *route_config* and *trds*. + Trds trds = 8 [(udpa.annotations.field_migrate).oneof_promotion = "route_specifier"]; // A list of individual Thrift filters that make up the filter chain for requests made to the // Thrift proxy. Order matters as the filters are processed sequentially. For backwards // compatibility, if no thrift_filters are specified, a default Thrift router filter // (`envoy.filters.thrift.router`) is used. + // [#extension-category: envoy.thrift_proxy.filters] repeated ThriftFilter thrift_filters = 5; // If set to true, Envoy will try to skip decode data after metadata in the Thrift message. - // This mode will only work if the upstream and downstream protocols are the same and the transport - // is the same, the transport type is framed and the protocol is not Twitter. Otherwise Envoy will + // This mode will only work if the upstream and downstream protocols are the same and the transports + // are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will // fallback to decode the data. bool payload_passthrough = 6; + + // Optional maximum requests for a single downstream connection. If not specified, there is no limit. + google.protobuf.UInt32Value max_requests_per_connection = 7; } // ThriftFilter configures a Thrift filter. @@ -116,7 +140,7 @@ message ThriftFilter { // ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in // in -// :ref:`typed_extension_protocol_options`, +// :ref:`typed_extension_protocol_options`, // keyed by the name `envoy.filters.network.thrift_proxy`. message ThriftProtocolOptions { option (udpa.annotations.versioning).previous_message_type = @@ -124,13 +148,13 @@ message ThriftProtocolOptions { // Supplies the type of transport that the Thrift proxy should use for upstream connections. // Selecting - // :ref:`AUTO_TRANSPORT`, + // :ref:`AUTO_TRANSPORT`, // which is the default, causes the proxy to use the same transport as the downstream connection. TransportType transport = 1 [(validate.rules).enum = {defined_only: true}]; // Supplies the type of protocol that the Thrift proxy should use for upstream connections. // Selecting - // :ref:`AUTO_PROTOCOL`, + // :ref:`AUTO_PROTOCOL`, // which is the default, causes the proxy to use the same protocol as the downstream connection. ProtocolType protocol = 2 [(validate.rules).enum = {defined_only: true}]; } diff --git a/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.proto b/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.proto deleted file mode 100644 index b73a78c4f2..0000000000 --- a/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/route/v4alpha/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.v4alpha"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Thrift Proxy Route Configuration] -// Thrift Proxy :ref:`configuration overview `. - -message RouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration"; - - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - string name = 1; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 2; -} - -message Route { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.Route"; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch"; - - oneof match_specifier { - option (validate.required) = true; - - // If specified, the route must exactly match the request method name. As a special case, an - // empty string matches any request method name. - string method_name = 1; - - // If specified, the route must have the service name as the request method name prefix. As a - // special case, an empty string matches any service name. Only relevant when service - // multiplexing. - string service_name = 2; - } - - // Inverts whatever matching is done in the :ref:`method_name - // ` or - // :ref:`service_name - // ` fields. - // Cannot be combined with wildcard matching as that would result in routes never being matched. - // - // .. note:: - // - // This does not invert matching done as part of the :ref:`headers field - // ` field. To - // invert header matching, see :ref:`invert_match - // `. - bool invert = 3; - - // 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). Note that this only applies for Thrift transports and/or - // protocols that support headers. - repeated config.route.v4alpha.HeaderMatcher headers = 4; -} - -// [#next-free-field: 7] -message RouteAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.RouteAction"; - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates a single upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - WeightedCluster weighted_clusters = 2; - - // Envoy will determine the cluster to route to by reading the value of the - // Thrift header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist Envoy will - // respond with an unknown method exception or an internal error exception, - // respectively. - string cluster_header = 6 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - - // 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. - // Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match - // `, - // with values there taking precedence. Keys and values should be provided under the "envoy.lb" - // metadata key. - config.core.v4alpha.Metadata metadata_match = 3; - - // Specifies a set of rate limit configurations that could be applied to the route. - // N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders - // action with the header name ":method-name". - repeated config.route.v4alpha.RateLimit rate_limits = 4; - - // Strip the service prefix from the method name, if there's a prefix. For - // example, the method call Service:method would end up being just method. - bool strip_service_name = 5; -} - -// 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. -message WeightedCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster"; - - message ClusterWeight { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight"; - - // Name of the upstream cluster. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // 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. - google.protobuf.UInt32Value weight = 2 [(validate.rules).uint32 = {gte: 1}]; - - // 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, combined with what's - // provided in :ref:`RouteAction's metadata_match - // `, - // will be considered. Values here will take precedence. Keys and values should be provided - // under the "envoy.lb" metadata key. - config.core.v4alpha.Metadata metadata_match = 3; - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.proto b/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.proto deleted file mode 100644 index 8e7bf3c91a..0000000000 --- a/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.proto +++ /dev/null @@ -1,136 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.v4alpha; - -import "envoy/extensions/filters/network/thrift_proxy/v4alpha/route.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.v4alpha"; -option java_outer_classname = "ThriftProxyProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Thrift Proxy] -// Thrift Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.thrift_proxy] - -// Thrift transport types supported by Envoy. -enum TransportType { - // For downstream connections, the Thrift proxy will attempt to determine which transport to use. - // For upstream connections, the Thrift proxy will use same transport as the downstream - // connection. - AUTO_TRANSPORT = 0; - - // The Thrift proxy will use the Thrift framed transport. - FRAMED = 1; - - // The Thrift proxy will use the Thrift unframed transport. - UNFRAMED = 2; - - // The Thrift proxy will assume the client is using the Thrift header transport. - HEADER = 3; -} - -// Thrift Protocol types supported by Envoy. -enum ProtocolType { - // For downstream connections, the Thrift proxy will attempt to determine which protocol to use. - // Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol - // detection. For upstream connections, the Thrift proxy will use the same protocol as the - // downstream connection. - AUTO_PROTOCOL = 0; - - // The Thrift proxy will use the Thrift binary protocol. - BINARY = 1; - - // The Thrift proxy will use Thrift non-strict binary protocol. - LAX_BINARY = 2; - - // The Thrift proxy will use the Thrift compact protocol. - COMPACT = 3; - - // The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library. - TWITTER = 4; -} - -// [#next-free-field: 7] -message ThriftProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy"; - - // Supplies the type of transport that the Thrift proxy should use. Defaults to - // :ref:`AUTO_TRANSPORT`. - TransportType transport = 2 [(validate.rules).enum = {defined_only: true}]; - - // Supplies the type of protocol that the Thrift proxy should use. Defaults to - // :ref:`AUTO_PROTOCOL`. - ProtocolType protocol = 3 [(validate.rules).enum = {defined_only: true}]; - - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The route table for the connection manager is static and is specified in this property. - RouteConfiguration route_config = 4; - - // A list of individual Thrift filters that make up the filter chain for requests made to the - // Thrift proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no thrift_filters are specified, a default Thrift router filter - // (`envoy.filters.thrift.router`) is used. - repeated ThriftFilter thrift_filters = 5; - - // If set to true, Envoy will try to skip decode data after metadata in the Thrift message. - // This mode will only work if the upstream and downstream protocols are the same and the transport - // is the same, the transport type is framed and the protocol is not Twitter. Otherwise Envoy will - // fallback to decode the data. - bool payload_passthrough = 6; -} - -// ThriftFilter configures a Thrift filter. -message ThriftFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter"; - - reserved 2; - - reserved "config"; - - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - // [#comment:TODO(zuercher): Auto generate the following list] - // * :ref:`envoy.filters.thrift.router ` - // * :ref:`envoy.filters.thrift.rate_limit ` - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in -// in -// :ref:`typed_extension_protocol_options`, -// keyed by the name `envoy.filters.network.thrift_proxy`. -message ThriftProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions"; - - // Supplies the type of transport that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_TRANSPORT`, - // which is the default, causes the proxy to use the same transport as the downstream connection. - TransportType transport = 1 [(validate.rules).enum = {defined_only: true}]; - - // Supplies the type of protocol that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_PROTOCOL`, - // which is the default, causes the proxy to use the same protocol as the downstream connection. - ProtocolType protocol = 2 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/api/envoy/extensions/filters/network/wasm/v3/wasm.proto b/api/envoy/extensions/filters/network/wasm/v3/wasm.proto index 0c1ac6af44..4fe67122f5 100644 --- a/api/envoy/extensions/filters/network/wasm/v3/wasm.proto +++ b/api/envoy/extensions/filters/network/wasm/v3/wasm.proto @@ -5,12 +5,11 @@ package envoy.extensions.filters.network.wasm.v3; import "envoy/extensions/wasm/v3/wasm.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.wasm.v3"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/wasm/v3;wasmv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Wasm] diff --git a/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto b/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto index eb2c202c58..4b894051ac 100644 --- a/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto +++ b/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.network.zookeeper_proxy.v3"; option java_outer_classname = "ZookeeperProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/zookeeper_proxy/v3;zookeeper_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: ZooKeeper proxy] diff --git a/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.proto b/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto similarity index 54% rename from api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.proto rename to api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto index 32103540c1..0ea19f24e0 100644 --- a/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.proto +++ b/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto @@ -1,20 +1,23 @@ syntax = "proto3"; -package envoy.extensions.filters.udp.dns_filter.v3alpha; +package envoy.extensions.filters.udp.dns_filter.v3; import "envoy/config/core/v3/address.proto"; import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/extension.proto"; +import "envoy/config/core/v3/resolver.proto"; import "envoy/data/dns/v3/dns_table.proto"; import "google/protobuf/duration.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.dns_filter.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.filters.udp.dns_filter.v3"; option java_outer_classname = "DnsFilterProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/dns_filter/v3;dns_filterv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: DNS Filter] @@ -44,6 +47,8 @@ message DnsFilterConfig { // in a client context. This message will contain the timeouts, retry, // and forwarding configuration for Envoy to make DNS requests to other // resolvers + // + // [#next-free-field: 6] message ClientContextConfig { // Sets the maximum time we will wait for the upstream query to complete // We allow 5s for the upstream resolution to complete, so the minimum @@ -51,10 +56,36 @@ message DnsFilterConfig { // number of retries multiplied by the resolver_timeout. google.protobuf.Duration resolver_timeout = 1 [(validate.rules).duration = {gte {seconds: 1}}]; - // A list of DNS servers to which we can forward queries. If not - // specified, Envoy will use the ambient DNS resolvers in the - // system. - repeated config.core.v3.Address upstream_resolvers = 2; + // This field was used for `dns_resolution_config` in Envoy 1.19.0 and + // 1.19.1. + // Control planes that need to set this field for Envoy 1.19.0 and + // 1.19.1 clients should fork the protobufs and change the field type + // to `DnsResolutionConfig`. + // Control planes that need to simultaneously support Envoy 1.18.x and + // Envoy 1.19.x should avoid Envoy 1.19.0 and 1.19.1. + // + // [#not-implemented-hide:] + repeated config.core.v3.Address upstream_resolvers = 2 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + config.core.v3.DnsResolutionConfig dns_resolution_config = 5 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + config.core.v3.TypedExtensionConfig typed_dns_resolver_config = 4; // Controls how many outstanding external lookup contexts the filter tracks. // The context structure allows the filter to respond to every query even if the external diff --git a/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.proto b/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.proto deleted file mode 100644 index 54615b8b93..0000000000 --- a/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.udp.dns_filter.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/dns/v4alpha/dns_table.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.dns_filter.v4alpha"; -option java_outer_classname = "DnsFilterProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: DNS Filter] -// DNS Filter :ref:`configuration overview `. -// [#extension: envoy.filters.udp_listener.dns_filter] - -// Configuration for the DNS filter. -message DnsFilterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig"; - - // This message contains the configuration for the DNS Filter operating - // in a server context. This message will contain the virtual hosts and - // associated addresses with which Envoy will respond to queries - message ServerContextConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ServerContextConfig"; - - oneof config_source { - option (validate.required) = true; - - // Load the configuration specified from the control plane - data.dns.v4alpha.DnsTable inline_dns_table = 1; - - // Seed the filter configuration from an external path. This source - // is a yaml formatted file that contains the DnsTable driving Envoy's - // responses to DNS queries - config.core.v4alpha.DataSource external_dns_table = 2; - } - } - - // This message contains the configuration for the DNS Filter operating - // in a client context. This message will contain the timeouts, retry, - // and forwarding configuration for Envoy to make DNS requests to other - // resolvers - message ClientContextConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ClientContextConfig"; - - // Sets the maximum time we will wait for the upstream query to complete - // We allow 5s for the upstream resolution to complete, so the minimum - // value here is 1. Note that the total latency for a failed query is the - // number of retries multiplied by the resolver_timeout. - google.protobuf.Duration resolver_timeout = 1 [(validate.rules).duration = {gte {seconds: 1}}]; - - // A list of DNS servers to which we can forward queries. If not - // specified, Envoy will use the ambient DNS resolvers in the - // system. - repeated config.core.v4alpha.Address upstream_resolvers = 2; - - // Controls how many outstanding external lookup contexts the filter tracks. - // The context structure allows the filter to respond to every query even if the external - // resolution times out or is otherwise unsuccessful - uint64 max_pending_lookups = 3 [(validate.rules).uint64 = {gte: 1}]; - } - - // The stat prefix used when emitting DNS filter statistics - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Server context configuration contains the data that the filter uses to respond - // to DNS requests. - ServerContextConfig server_config = 2; - - // Client context configuration controls Envoy's behavior when it must use external - // resolvers to answer a query. This object is optional and if omitted instructs - // the filter to resolve queries from the data in the server_config - ClientContextConfig client_config = 3; -} diff --git a/api/envoy/extensions/filters/udp/udp_proxy/v3/route.proto b/api/envoy/extensions/filters/udp/udp_proxy/v3/route.proto new file mode 100644 index 0000000000..8d8fcf59c8 --- /dev/null +++ b/api/envoy/extensions/filters/udp/udp_proxy/v3/route.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package envoy.extensions.filters.udp.udp_proxy.v3; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.v3"; +option java_outer_classname = "RouteProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/udp_proxy/v3;udp_proxyv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: UDP proxy route configuration] +// UDP proxy :ref:`configuration overview `. + +message Route { + // Indicates the upstream cluster to which the request should be routed. + string cluster = 1 [(validate.rules).string = {min_len: 1}]; +} diff --git a/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto b/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto index 1e986434f7..a907fd4a21 100644 --- a/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto +++ b/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto @@ -2,8 +2,15 @@ syntax = "proto3"; package envoy.extensions.filters.udp.udp_proxy.v3; +import "envoy/config/accesslog/v3/accesslog.proto"; +import "envoy/config/core/v3/udp_socket_config.proto"; + import "google/protobuf/duration.proto"; +import "xds/annotations/v3/status.proto"; +import "xds/type/matcher/v3/matcher.proto"; + +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -11,6 +18,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.v3"; option java_outer_classname = "UdpProxyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/udp_proxy/v3;udp_proxyv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: UDP proxy] @@ -18,7 +26,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#extension: envoy.filters.udp_listener.udp_proxy] // Configuration for the UDP proxy filter. -// [#next-free-field: 6] +// [#next-free-field: 10] message UdpProxyConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.udp.udp_proxy.v2alpha.UdpProxyConfig"; @@ -31,6 +39,13 @@ message UdpProxyConfig { // The source IP will be used to compute the hash used by hash-based load balancing algorithms. bool source_ip = 1 [(validate.rules).bool = {const: true}]; + + // A given key will be used to compute the hash used by hash-based load balancing algorithms. + // In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints. + // A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session, + // although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level + // (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session. + string key = 2 [(validate.rules).string = {min_len: 1}]; } } @@ -41,7 +56,18 @@ message UdpProxyConfig { option (validate.required) = true; // The upstream cluster to connect to. - string cluster = 2 [(validate.rules).string = {min_len: 1}]; + // This field is deprecated in favor of + // :ref:`matcher `. + string cluster = 2 [ + deprecated = true, + (validate.rules).string = {min_len: 1}, + (envoy.annotations.deprecated_at_minor_version) = "3.0" + ]; + + // The match tree to use when resolving route actions for incoming requests. + // See :ref:`Routing ` for more information. + xds.type.matcher.v3.Matcher matcher = 9 + [(xds.annotations.v3.field_status).work_in_progress = true]; } // The idle timeout for sessions. Idle is defined as no datagrams between received or sent by @@ -68,4 +94,17 @@ message UdpProxyConfig { // load balancing algorithms will select a host randomly. Currently the number of hash policies is // limited to 1. repeated HashPolicy hash_policies = 5 [(validate.rules).repeated = {max_items: 1}]; + + // UDP socket configuration for upstream sockets. The default for + // :ref:`prefer_gro ` is true for upstream + // sockets as the assumption is datagrams will be received from a single source. + config.core.v3.UdpSocketConfig upstream_socket_config = 6; + + // Perform per packet load balancing (upstream host selection) on each received data chunk. + // The default if not specified is false, that means each data chunk is forwarded + // to upstream host selected on first chunk receival for that "session" (identified by source IP/port and local IP/port). + bool use_per_packet_load_balancing = 7; + + // Configuration for access logs emitted by the UDP proxy. Note that certain UDP specific data is emitted as :ref:`Dynamic Metadata `. + repeated config.accesslog.v3.AccessLog access_log = 8; } diff --git a/api/envoy/extensions/formatter/metadata/v3/metadata.proto b/api/envoy/extensions/formatter/metadata/v3/metadata.proto new file mode 100644 index 0000000000..b91e291e3e --- /dev/null +++ b/api/envoy/extensions/formatter/metadata/v3/metadata.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package envoy.extensions.formatter.metadata.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.formatter.metadata.v3"; +option java_outer_classname = "MetadataProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/formatter/metadata/v3;metadatav3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Formatter extension for printing various types of metadata] +// [#extension: envoy.formatter.metadata] + +// Metadata formatter extension implements METADATA command operator that +// prints all types of metadata. The first parameter taken by METADATA operator defines +// type of metadata. The following types of metadata are supported (case sensitive): +// +// * DYNAMIC +// * CLUSTER +// * ROUTE +// +// See :ref:`here ` for more information on access log configuration. + +// %METADATA(TYPE:NAMESPACE:KEY):Z% +// :ref:`Metadata ` info, +// where TYPE is type of metadata (see above for supported types), +// NAMESPACE is the filter namespace used when setting the metadata, KEY is an optional +// lookup key in the namespace with the option of specifying nested keys separated by ':', +// and Z is an optional parameter denoting string truncation up to Z characters long. +// The data will be logged as a JSON string. For example, for the following ROUTE metadata: +// +// ``com.test.my_filter: {"test_key": "foo", "test_object": {"inner_key": "bar"}}`` +// +// * %METADATA(ROUTE:com.test.my_filter)% will log: ``{"test_key": "foo", "test_object": {"inner_key": "bar"}}`` +// * %METADATA(ROUTE:com.test.my_filter:test_key)% will log: ``foo`` +// * %METADATA(ROUTE:com.test.my_filter:test_object)% will log: ``{"inner_key": "bar"}`` +// * %METADATA(ROUTE:com.test.my_filter:test_object:inner_key)% will log: ``bar`` +// * %METADATA(ROUTE:com.unknown_filter)% will log: ``-`` +// * %METADATA(ROUTE:com.test.my_filter:unknown_key)% will log: ``-`` +// * %METADATA(ROUTE:com.test.my_filter):25% will log (truncation at 25 characters): ``{"test_key": "foo", "test`` +// +// .. note:: +// +// For typed JSON logs, this operator renders a single value with string, numeric, or boolean type +// when the referenced key is a simple value. If the referenced key is a struct or list value, a +// JSON struct or list is rendered. Structs and lists may be nested. In any event, the maximum +// length is ignored. +// +// .. note:: +// +// METADATA(DYNAMIC:NAMESPACE:KEY):Z is equivalent to :ref:`DYNAMIC_METADATA(NAMESPACE:KEY):Z` +// METADATA(CLUSTER:NAMESPACE:KEY):Z is equivalent to :ref:`CLUSTER_METADATA(NAMASPACE:KEY):Z` + +message Metadata { +} diff --git a/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.proto b/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.proto new file mode 100644 index 0000000000..de8bf982cc --- /dev/null +++ b/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package envoy.extensions.formatter.req_without_query.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.formatter.req_without_query.v3"; +option java_outer_classname = "ReqWithoutQueryProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/formatter/req_without_query/v3;req_without_queryv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Formatter extension for printing request without query string] +// [#extension: envoy.formatter.req_without_query] + +// ReqWithoutQuery formatter extension implements REQ_WITHOUT_QUERY command operator that +// works the same way as :ref:`REQ ` except that it will +// remove the query string. It is used to avoid logging any sensitive information into +// the access log. +// See :ref:`here ` for more information on access log configuration. + +// %REQ_WITHOUT_QUERY(X?Y):Z% +// An HTTP request header where X is the main HTTP header, Y is the alternative one, and Z is an +// optional parameter denoting string truncation up to Z characters long. The value is taken from +// the HTTP request header named X first and if it's not set, then request header Y is used. If +// none of the headers are present '-' symbol will be in the log. + +// Configuration for the request without query formatter. +message ReqWithoutQuery { +} diff --git a/api/envoy/extensions/health_checkers/redis/v3/redis.proto b/api/envoy/extensions/health_checkers/redis/v3/redis.proto new file mode 100644 index 0000000000..caa385996b --- /dev/null +++ b/api/envoy/extensions/health_checkers/redis/v3/redis.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package envoy.extensions.health_checkers.redis.v3; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.health_checkers.redis.v3"; +option java_outer_classname = "RedisProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/health_checkers/redis/v3;redisv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Redis] +// Redis health checker :ref:`configuration overview `. +// [#extension: envoy.health_checkers.redis] + +message Redis { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.health_checker.redis.v2.Redis"; + + // 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. + string key = 1; +} diff --git a/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto b/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto new file mode 100644 index 0000000000..7604972eba --- /dev/null +++ b/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package envoy.extensions.http.header_formatters.preserve_case.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.http.header_formatters.preserve_case.v3"; +option java_outer_classname = "PreserveCaseProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/header_formatters/preserve_case/v3;preserve_casev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Preserve case header formatter] +// [#extension: envoy.http.stateful_header_formatters.preserve_case] + +// Configuration for the preserve case header formatter. +// See the :ref:`header casing ` configuration guide for more +// information. +message PreserveCaseFormatterConfig { + // Allows forwarding reason phrase text. + // This is off by default, and a standard reason phrase is used for a corresponding HTTP response code. + bool forward_reason_phrase = 1; +} diff --git a/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto b/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto new file mode 100644 index 0000000000..b2d3d7d26f --- /dev/null +++ b/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package envoy.extensions.http.original_ip_detection.custom_header.v3; + +import "envoy/type/v3/http_status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.http.original_ip_detection.custom_header.v3"; +option java_outer_classname = "CustomHeaderProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/original_ip_detection/custom_header/v3;custom_headerv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Custom header original IP detection extension] + +// This extension allows for the original downstream remote IP to be detected +// by reading the value from a configured header name. If the value is successfully parsed +// as an IP, it'll be treated as the effective downstream remote address and seen as such +// by all filters. See :ref:`original_ip_detection_extensions +// ` +// for an overview of how extensions operate and what happens when an extension fails +// to detect the remote IP. +// +// [#extension: envoy.http.original_ip_detection.custom_header] +message CustomHeaderConfig { + // The header name containing the original downstream remote address, if present. + // + // Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored. + string header_name = 1 + [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: true}]; + + // If set to true, the extension could decide that the detected address should be treated as + // trusted by the HCM. If the address is considered :ref:`trusted`, + // it might be used as input to determine if the request is internal (among other things). + bool allow_extension_to_set_address_as_trusted = 2; + + // If this is set, the request will be rejected when detection fails using it as the HTTP response status. + // + // .. note:: + // If this is set to < 400 or > 511, the default status 403 will be used instead. + type.v3.HttpStatus reject_with_status = 3; +} diff --git a/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto b/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto new file mode 100644 index 0000000000..b09b6f311d --- /dev/null +++ b/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package envoy.extensions.http.original_ip_detection.xff.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.http.original_ip_detection.xff.v3"; +option java_outer_classname = "XffProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/original_ip_detection/xff/v3;xffv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: XFF original IP detection extension] + +// This extension allows for the original downstream remote IP to be detected +// by reading the :ref:`config_http_conn_man_headers_x-forwarded-for` header. +// +// [#extension: envoy.http.original_ip_detection.xff] +message XffConfig { + // 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. + uint32 xff_num_trusted_hops = 1; +} diff --git a/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.proto b/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.proto new file mode 100644 index 0000000000..403370e79d --- /dev/null +++ b/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +package envoy.extensions.http.stateful_session.cookie.v3; + +import "envoy/type/http/v3/cookie.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.http.stateful_session.cookie.v3"; +option java_outer_classname = "CookieProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/stateful_session/cookie/v3;cookiev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Cookie based stateful session extension] + +// This extension allows the session state to be tracked via cookies. +// +// This extension first encodes the address of the upstream host selected by the load balancer +// into a `set-cookie` response header with the :ref:`cookie configuration +// `. +// when new requests are incoming, this extension will try to parse the specific upstream host +// address by the cookie name. If the address parsed from the cookie corresponds to a valid +// upstream host, this upstream host will be selected first. See :ref:`stateful session filter +// `. +// +// For example, if the cookie name is set to `sticky-host`, envoy will prefer `1.2.3.4:80` +// as the upstream host when the request contains the following header: +// +// .. code-block:: none +// +// cookie: sticky-host="MS4yLjMuNDo4MA==" +// +// When processing the upstream response, if `1.2.3.4:80` is indeed the final choice the extension +// does nothing. If `1.2.3.4:80` is not the final choice, the new selected host will be used to +// update the cookie (via the `set-cookie` response header). +// +// [#extension: envoy.http.stateful_session.cookie] +message CookieBasedSessionState { + // The cookie configuration used to track session state. + type.http.v3.Cookie cookie = 1 [(validate.rules).message = {required: true}]; +} diff --git a/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto b/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto index a6da5b0f5d..e556072b6c 100644 --- a/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto +++ b/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto @@ -3,12 +3,12 @@ syntax = "proto3"; package envoy.extensions.internal_redirect.allow_listed_routes.v3; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.internal_redirect.allow_listed_routes.v3"; option java_outer_classname = "AllowListedRoutesConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/internal_redirect/allow_listed_routes/v3;allow_listed_routesv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Allow listed routes internal redirect predicate] @@ -17,7 +17,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#extension: envoy.internal_redirect_predicates.allow_listed_routes] message AllowListedRoutesConfig { // The list of routes that's allowed as redirect target by this predicate, - // identified by the route's :ref:`name `. + // identified by the route's :ref:`name `. // Empty route names are not allowed. repeated string allowed_route_names = 1 [(validate.rules).repeated = {items {string {min_len: 1}}}]; diff --git a/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto b/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto index 6cc5fba871..e5ed68cb7f 100644 --- a/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto +++ b/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto @@ -3,11 +3,11 @@ syntax = "proto3"; package envoy.extensions.internal_redirect.previous_routes.v3; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.internal_redirect.previous_routes.v3"; option java_outer_classname = "PreviousRoutesConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/internal_redirect/previous_routes/v3;previous_routesv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Previous routes internal redirect predicate] diff --git a/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto b/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto index 54cec2f09b..d4055766be 100644 --- a/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto +++ b/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto @@ -3,12 +3,11 @@ syntax = "proto3"; package envoy.extensions.internal_redirect.safe_cross_scheme.v3; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.internal_redirect.safe_cross_scheme.v3"; option java_outer_classname = "SafeCrossSchemeConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/internal_redirect/safe_cross_scheme/v3;safe_cross_schemev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: SafeCrossScheme internal redirect predicate] @@ -18,7 +17,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // redirect and b) safe cross scheme redirect, which means if the downstream // scheme is HTTPS, both HTTPS and HTTP redirect targets are allowed, but if the // downstream scheme is HTTP, only HTTP redirect targets are allowed. -// [#extension: -// envoy.internal_redirect_predicates.safe_cross_scheme] +// [#extension: envoy.internal_redirect_predicates.safe_cross_scheme] message SafeCrossSchemeConfig { } diff --git a/api/envoy/extensions/key_value/file_based/v3/config.proto b/api/envoy/extensions/key_value/file_based/v3/config.proto new file mode 100644 index 0000000000..a07de90362 --- /dev/null +++ b/api/envoy/extensions/key_value/file_based/v3/config.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package envoy.extensions.key_value.file_based.v3; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.key_value.file_based.v3"; +option java_outer_classname = "ConfigProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/key_value/file_based/v3;file_basedv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: File Based Key Value Store storage plugin] + +// [#extension: envoy.key_value.file_based] +// This is configuration to flush a key value store out to disk. +message FileBasedKeyValueStoreConfig { + option (xds.annotations.v3.message_status).work_in_progress = true; + + // The filename to read the keys and values from, and write the keys and + // values to. + string filename = 1 [(validate.rules).string = {min_len: 1}]; + + // The interval at which the key value store should be flushed to the file. + google.protobuf.Duration flush_interval = 2; + + // The maximum number of entries to cache, or 0 to allow for unlimited entries. + // Defaults to 1000 if not present. + google.protobuf.UInt32Value max_entries = 3; +} diff --git a/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto b/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto new file mode 100644 index 0000000000..9408734bec --- /dev/null +++ b/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; + +package envoy.extensions.load_balancing_policies.ring_hash.v3; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.ring_hash.v3"; +option java_outer_classname = "RingHashProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3;ring_hashv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Ring Hash Load Balancing Policy] + +// This configuration allows the built-in RING_HASH LB policy to be configured via the LB policy +// extension point. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +// [#next-free-field: 6] +message RingHash { + // The hash function used to hash hosts onto the ketama ring. + enum HashFunction { + // Currently defaults to XX_HASH. + DEFAULT_HASH = 0; + + // Use `xxHash `_. + XX_HASH = 1; + + // 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. + MURMUR_HASH_2 = 2; + } + + // The hash function used to hash hosts onto the ketama ring. The value defaults to + // :ref:`XX_HASH`. + HashFunction hash_function = 1 [(validate.rules).enum = {defined_only: true}]; + + // 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`. + google.protobuf.UInt64Value minimum_ring_size = 2 [(validate.rules).uint64 = {lte: 8388608}]; + + // 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`. + google.protobuf.UInt64Value maximum_ring_size = 3 [(validate.rules).uint64 = {lte: 8388608}]; + + // If set to `true`, the cluster will use hostname instead of the resolved + // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. + bool use_hostname_for_hashing = 4; + + // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 + // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. + // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. + // Minimum is 100. + // + // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified + // `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests + // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing + // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify + // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the + // cascading overflow effect when choosing the next host in the ring/table). + // + // If weights are specified on the hosts, they are respected. + // + // This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts + // being probed, so use a higher value if you require better performance. + google.protobuf.UInt32Value hash_balance_factor = 5 [(validate.rules).uint32 = {gte: 100}]; +} diff --git a/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto b/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto new file mode 100644 index 0000000000..4875b632f9 --- /dev/null +++ b/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package envoy.extensions.load_balancing_policies.round_robin.v3; + +import "envoy/config/cluster/v3/cluster.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.round_robin.v3"; +option java_outer_classname = "RoundRobinProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/round_robin/v3;round_robinv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Round Robin Load Balancing Policy] + +// This configuration allows the built-in ROUND_ROBIN LB policy to be configured via the LB policy +// extension point. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +message RoundRobin { + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + config.cluster.v3.Cluster.SlowStartConfig slow_start_config = 1; +} diff --git a/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto b/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto new file mode 100644 index 0000000000..cad403dd35 --- /dev/null +++ b/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package envoy.extensions.load_balancing_policies.wrr_locality.v3; + +import "envoy/config/cluster/v3/cluster.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.wrr_locality.v3"; +option java_outer_classname = "WrrLocalityProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3;wrr_localityv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Weighted Round Robin Locality-Picking Load Balancing Policy] + +// Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +message WrrLocality { + // The child LB policy to create for endpoint-picking within the chosen locality. + config.cluster.v3.LoadBalancingPolicy endpoint_picking_policy = 1 + [(validate.rules).message = {required: true}]; +} diff --git a/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto b/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto new file mode 100644 index 0000000000..9bb8e5e7bd --- /dev/null +++ b/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package envoy.extensions.matching.common_inputs.environment_variable.v3; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.matching.common_inputs.environment_variable.v3"; +option java_outer_classname = "InputProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/environment_variable/v3;environment_variablev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Environment Variable Input] +// [#extension: envoy.matching.common_inputs.environment_variable] + +// Reads an environment variable to provide an input for matching. +message Config { + // Name of the environment variable to read from. + string name = 1 [(validate.rules).string = {min_len: 1}]; +} diff --git a/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto b/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto new file mode 100644 index 0000000000..1a8da1c875 --- /dev/null +++ b/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto @@ -0,0 +1,97 @@ +syntax = "proto3"; + +package envoy.extensions.matching.common_inputs.network.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.matching.common_inputs.network.v3"; +option java_outer_classname = "NetworkInputsProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/network/v3;networkv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Common Network Matching Inputs] + +// Specifies that matching should be performed by the destination IP address. +// [#extension: envoy.matching.inputs.destination_ip] +message DestinationIPInput { +} + +// Specifies that matching should be performed by the destination port. +// [#extension: envoy.matching.inputs.destination_port] +message DestinationPortInput { +} + +// Specifies that matching should be performed by the source IP address. +// [#extension: envoy.matching.inputs.source_ip] +message SourceIPInput { +} + +// Specifies that matching should be performed by the source port. +// [#extension: envoy.matching.inputs.source_port] +message SourcePortInput { +} + +// Input that matches by the directly connected source IP address (this +// will only be different from the source IP address when using a listener +// filter that overrides the source address, such as the :ref:`Proxy Protocol +// listener filter `). +// [#extension: envoy.matching.inputs.direct_source_ip] +message DirectSourceIPInput { +} + +// Input that matches by the source IP type. +// Specifies the source IP match type. The values include: +// +// * ``local`` - matches a connection originating from the same host, +// [#extension: envoy.matching.inputs.source_type] +message SourceTypeInput { +} + +// Input that matches by the requested server name (e.g. SNI in TLS). +// +// :ref:`TLS Inspector ` provides the requested server name based on SNI, +// when TLS protocol is detected. +// [#extension: envoy.matching.inputs.server_name] +message ServerNameInput { +} + +// Input that matches by the transport protocol. +// +// Suggested values include: +// +// * ``raw_buffer`` - default, used when no transport protocol is detected, +// * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` +// when TLS protocol is detected. +// [#extension: envoy.matching.inputs.transport_protocol] +message TransportProtocolInput { +} + +// List of quoted and comma-separated requested application protocols. The list consists of a +// single negotiated application protocol once the network stream is established. +// +// Examples: +// +// * ``'h2','http/1.1'`` +// * ``'h2c'``` +// +// Suggested values in the list include: +// +// * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector +// ` and :ref:`envoy.filters.listener.http_inspector +// `, +// * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` +// * ``h2c`` - set by :ref:`envoy.filters.listener.http_inspector ` +// +// .. attention:: +// +// Currently, :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. +// [#extension: envoy.matching.inputs.application_protocol] +message ApplicationProtocolInput { +} diff --git a/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto b/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto new file mode 100644 index 0000000000..de3c0d62a1 --- /dev/null +++ b/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package envoy.extensions.matching.input_matchers.consistent_hashing.v3; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.matching.input_matchers.consistent_hashing.v3"; +option java_outer_classname = "ConsistentHashingProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/input_matchers/consistent_hashing/v3;consistent_hashingv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Consistent Hashing Matcher] +// [#extension: envoy.matching.input_matchers.consistent_hashing] + +// The consistent hashing matchers computes a consistent hash from the input and matches if the resulting hash +// is within the configured threshold. +// More specifically, this matcher evaluates to true if hash(input, seed) % modulo >= threshold. +// Note that the consistency of the match result relies on the internal hash function (xxhash) remaining +// unchanged. While this is unlikely to happen intentionally, this could cause inconsistent match results +// between deployments. +message ConsistentHashing { + // The threshold the resulting hash must be over in order for this matcher to evaluate to true. + // This value must be below the configured modulo value. + // Setting this to 0 is equivalent to this matcher always matching. + uint32 threshold = 1; + + // The value to use for the modulus in the calculation. This effectively bounds the hash output, + // specifying the range of possible values. + // This value must be above the configured threshold. + uint32 modulo = 2 [(validate.rules).uint32 = {gt: 0}]; + + // Optional seed passed through the hash function. This allows using additional information when computing + // the hash value: by changing the seed value, a different partition of matching and non-matching inputs will + // be created that remains consistent for that seed value. + uint64 seed = 3; +} diff --git a/api/envoy/extensions/matching/input_matchers/ip/v3/ip.proto b/api/envoy/extensions/matching/input_matchers/ip/v3/ip.proto new file mode 100644 index 0000000000..34bb4723bb --- /dev/null +++ b/api/envoy/extensions/matching/input_matchers/ip/v3/ip.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package envoy.extensions.matching.input_matchers.ip.v3; + +import "envoy/config/core/v3/address.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.matching.input_matchers.ip.v3"; +option java_outer_classname = "IpProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/input_matchers/ip/v3;ipv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: IP matcher] +// [#extension: envoy.matching.input_matchers.ip] + +// This input matcher matches IPv4 or IPv6 addresses against a list of CIDR +// ranges. It returns true if and only if the input IP belongs to at least one +// of these CIDR ranges. Internally, it uses a Level-Compressed trie, as +// described in the paper `IP-address lookup using LC-tries +// `_ +// by S. Nilsson and G. Karlsson. For "big" lists of IPs, this matcher is more +// efficient than multiple single IP matcher, that would have a linear cost. +message Ip { + // Match if the IP belongs to any of these CIDR ranges. + repeated config.core.v3.CidrRange cidr_ranges = 1 [(validate.rules).repeated = {min_items: 1}]; + + // The human readable prefix to use when emitting statistics for the IP input + // matcher. Names in the table below are concatenated to this prefix. + // + // .. csv-table:: + // :header: Name, Type, Description + // :widths: 1, 1, 2 + // + // ip_parsing_failed, Counter, Total number of IP addresses the matcher was unable to parse + string stat_prefix = 2 [(validate.rules).string = {min_len: 1}]; +} diff --git a/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto b/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto new file mode 100644 index 0000000000..c27d1c7827 --- /dev/null +++ b/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package envoy.extensions.network.dns_resolver.apple.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.apple.v3"; +option java_outer_classname = "AppleDnsResolverProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/dns_resolver/apple/v3;applev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: apple DNS resolver] +// [#extension: envoy.network.dns_resolver.apple] + +// Configuration for apple DNS resolver. +message AppleDnsResolverConfig { +} diff --git a/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto b/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto new file mode 100644 index 0000000000..ec031e071b --- /dev/null +++ b/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package envoy.extensions.network.dns_resolver.cares.v3; + +import "envoy/config/core/v3/address.proto"; +import "envoy/config/core/v3/resolver.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.cares.v3"; +option java_outer_classname = "CaresDnsResolverProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/dns_resolver/cares/v3;caresv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: c-ares DNS resolver] +// [#extension: envoy.network.dns_resolver.cares] + +// Configuration for c-ares DNS resolver. +message CaresDnsResolverConfig { + // A list of dns resolver addresses. + // :ref:`use_resolvers_as_fallback` + // below dictates if the DNS client should override system defaults or only use the provided + // resolvers if the system defaults are not available, i.e., as a fallback. + repeated config.core.v3.Address resolvers = 1 [(validate.rules).repeated = {min_items: 1}]; + + // If true use the resolvers listed in the + // :ref:`resolvers` + // field only if c-ares is unable to obtain a + // nameserver from the system (e.g., /etc/resolv.conf). + // Otherwise, the resolvers listed in the resolvers list will override the default system + // resolvers. Defaults to false. + bool use_resolvers_as_fallback = 3; + + // The resolver will query available network interfaces and determine if there are no available + // interfaces for a given IP family. It will then filter these addresses from the results it + // presents. e.g., if there are no available IPv4 network interfaces, the resolver will not + // provide IPv4 addresses. + bool filter_unroutable_families = 4; + + // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. + config.core.v3.DnsResolverOptions dns_resolver_options = 2; +} diff --git a/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto b/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto index d2c747ec49..f5a3294456 100644 --- a/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto +++ b/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.extensions.network.socket_interface.v3"; option java_outer_classname = "DefaultSocketInterfaceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/socket_interface/v3;socket_interfacev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Default Socket Interface configuration] diff --git a/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto b/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto new file mode 100644 index 0000000000..d1065f7c21 --- /dev/null +++ b/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package envoy.extensions.quic.crypto_stream.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.quic.crypto_stream.v3"; +option java_outer_classname = "CryptoStreamProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/crypto_stream/v3;crypto_streamv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: QUIC server crypto stream config] +// [#extension: envoy.quic.crypto_stream.server.quiche] + +// Configuration for the default QUIC server crypto stream provided by QUICHE. +message CryptoServerStreamConfig { +} diff --git a/api/envoy/extensions/quic/proof_source/v3/proof_source.proto b/api/envoy/extensions/quic/proof_source/v3/proof_source.proto new file mode 100644 index 0000000000..30a9634adc --- /dev/null +++ b/api/envoy/extensions/quic/proof_source/v3/proof_source.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package envoy.extensions.quic.proof_source.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.quic.proof_source.v3"; +option java_outer_classname = "ProofSourceProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/proof_source/v3;proof_sourcev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: QUIC proof source config] +// [#extension: envoy.quic.proof_source.filter_chain] + +// Configuration for the default QUIC proof source. +message ProofSourceConfig { +} diff --git a/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto b/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto index 76d3505cba..7c3dc8916b 100644 --- a/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto +++ b/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.rate_limit_descriptors.expr.v3"; option java_outer_classname = "ExprProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/rate_limit_descriptors/expr/v3;exprv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Rate limit descriptor expression] diff --git a/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto b/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto new file mode 100644 index 0000000000..11efb39023 --- /dev/null +++ b/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package envoy.extensions.rbac.matchers.upstream_ip_port.v3; + +import "envoy/config/core/v3/address.proto"; +import "envoy/type/v3/range.proto"; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.rbac.matchers.upstream_ip_port.v3"; +option java_outer_classname = "UpstreamIpPortMatcherProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/matchers/upstream_ip_port/v3;upstream_ip_portv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: RBAC upstream IP and port matcher plugin] +// [#extension: envoy.rbac.matchers.upstream_ip_port] + +// This is configuration for matching upstream ip and port. +// Note that although both fields are optional, at least one of IP or port must be supplied. If only +// one is supplied the other is a wildcard match. +// This matcher requires a filter in the chain to have saved the upstream address in the +// filter state before the matcher is executed by RBAC filter. The state should be saved with key +// `envoy.stream.upstream_address` (See +// :repo:`upstream_address.h`). +// Also, See :repo:`proxy_filter.cc< +// source/extensions/filters/http/dynamic_forward_proxy/proxy_filter.cc>` for an example of a +// filter which populates the FilterState. +message UpstreamIpPortMatcher { + // A CIDR block that will be used to match the upstream IP. + // Both Ipv4 and Ipv6 ranges can be matched. + config.core.v3.CidrRange upstream_ip = 1; + + // A port range that will be used to match the upstream port. + type.v3.Int64Range upstream_port_range = 2; +} diff --git a/api/envoy/extensions/request_id/uuid/v3/uuid.proto b/api/envoy/extensions/request_id/uuid/v3/uuid.proto new file mode 100644 index 0000000000..eb682e771c --- /dev/null +++ b/api/envoy/extensions/request_id/uuid/v3/uuid.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package envoy.extensions.request_id.uuid.v3; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.request_id.uuid.v3"; +option java_outer_classname = "UuidProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/request_id/uuid/v3;uuidv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: UUID] +// [#extension: envoy.request_id.uuid] + +// Configuration for the default UUID request ID extension which has the following behavior: +// +// 1. Request ID is propagated using the :ref:`x-request-id +// ` header. +// +// 2. Request ID is a universally unique identifier `(UUID4) +// `_. +// +// 3. Tracing decision (sampled, forced, etc) is set in 14th nibble of the UUID. By default this will +// overwrite existing UUIDs received in the *x-request-id* header if the trace sampling decision +// is changed. The 14th nibble of the UUID4 has been chosen because it is fixed to '4' by the +// standard. Thus, '4' indicates a default UUID and no trace status. This nibble is swapped to: +// +// a. '9': Sampled. +// b. 'a': Force traced due to server-side override. +// c. 'b': Force traced due to client-side request ID joining. +// +// See the :ref:`x-request-id ` documentation for +// more information. +message UuidRequestIdConfig { + // Whether the implementation alters the UUID to contain the trace sampling decision as per the + // `UuidRequestIdConfig` message documentation. This defaults to true. If disabled no + // modification to the UUID will be performed. It is important to note that if disabled, + // stable sampling of traces, access logs, etc. will no longer work and only random sampling will + // be possible. + google.protobuf.BoolValue pack_trace_reason = 1; + + // Set whether to use :ref:`x-request-id` for sampling or not. + // This defaults to true. See the :ref:`context propagation ` + // overview for more information. + google.protobuf.BoolValue use_request_id_for_trace_sampling = 2; +} diff --git a/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto b/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto new file mode 100644 index 0000000000..4a9f07d100 --- /dev/null +++ b/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package envoy.extensions.resource_monitors.fixed_heap.v3; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.fixed_heap.v3"; +option java_outer_classname = "FixedHeapProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/fixed_heap/v3;fixed_heapv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Fixed heap] +// [#extension: envoy.resource_monitors.fixed_heap] + +// The fixed heap resource monitor reports the Envoy process memory pressure, computed as a +// fraction of currently reserved heap memory divided by a statically configured maximum +// specified in the FixedHeapConfig. +message FixedHeapConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig"; + + uint64 max_heap_size_bytes = 1 [(validate.rules).uint64 = {gt: 0}]; +} diff --git a/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto b/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto new file mode 100644 index 0000000000..edbce845a7 --- /dev/null +++ b/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package envoy.extensions.resource_monitors.injected_resource.v3; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.injected_resource.v3"; +option java_outer_classname = "InjectedResourceProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/injected_resource/v3;injected_resourcev3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Injected resource] +// [#extension: envoy.resource_monitors.injected_resource] + +// The injected resource monitor allows injecting a synthetic resource pressure into Envoy +// via a text file, which must contain a floating-point number in the range [0..1] representing +// the resource pressure and be updated atomically by a symbolic link swap. +// This is intended primarily for integration tests to force Envoy into an overloaded state. +message InjectedResourceConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.resource_monitor.injected_resource.v2alpha.InjectedResourceConfig"; + + string filename = 1 [(validate.rules).string = {min_len: 1}]; +} diff --git a/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto b/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto new file mode 100644 index 0000000000..07de418553 --- /dev/null +++ b/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package envoy.extensions.retry.host.omit_canary_hosts.v3; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_canary_hosts.v3"; +option java_outer_classname = "OmitCanaryHostsProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/host/omit_canary_hosts/v3;omit_canary_hostsv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Omit Canary Hosts Predicate] +// [#extension: envoy.retry_host_predicates.omit_canary_hosts] + +message OmitCanaryHostsPredicate { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.retry.omit_canary_hosts.v2.OmitCanaryHostsPredicate"; +} diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto b/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto index fb7adf4402..00c6bfa8f6 100644 --- a/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto +++ b/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto @@ -10,6 +10,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v3"; option java_outer_classname = "OmitHostMetadataConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/host/omit_host_metadata/v3;omit_host_metadatav3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Omit host metadata retry predicate] diff --git a/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto b/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto new file mode 100644 index 0000000000..20961f8f3e --- /dev/null +++ b/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package envoy.extensions.retry.host.previous_hosts.v3; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.retry.host.previous_hosts.v3"; +option java_outer_classname = "PreviousHostsProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/host/previous_hosts/v3;previous_hostsv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Previous Hosts Predicate] +// [#extension: envoy.retry_host_predicates.previous_hosts] + +message PreviousHostsPredicate { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.retry.previous_hosts.v2.PreviousHostsPredicate"; +} diff --git a/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto b/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto index b6a4bbecba..eaed4a79b3 100644 --- a/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto +++ b/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.retry.priority.previous_priorities.v3"; option java_outer_classname = "PreviousPrioritiesConfigProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/priority/previous_priorities/v3;previous_prioritiesv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Previous priorities retry selector] diff --git a/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto b/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto new file mode 100644 index 0000000000..7d538cf354 --- /dev/null +++ b/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +package envoy.extensions.stat_sinks.graphite_statsd.v3; + +import "envoy/config/core/v3/address.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.stat_sinks.graphite_statsd.v3"; +option java_outer_classname = "GraphiteStatsdProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/stat_sinks/graphite_statsd/v3;graphite_statsdv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Graphite+Statsd] +// Stats configuration proto schema for ``envoy.stat_sinks.graphite_statsd`` sink. +// The sink emits stats with `Graphite `_ +// compatible tags. Tags are configurable via :ref:`StatsConfig +// `. +// [#extension: envoy.stat_sinks.graphite_statsd] + +message GraphiteStatsdSink { + oneof statsd_specifier { + option (validate.required) = true; + + // The UDP address of a running Graphite-compliant listener. If specified, + // statistics will be flushed to this address. + config.core.v3.Address address = 1; + } + + // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field + // ` for more details. + string prefix = 3; + + // Optional max datagram size to use when sending UDP messages. By default Envoy + // will emit one metric per datagram. By specifying a max-size larger than a single + // metric, Envoy will emit multiple, new-line separated metrics. The max datagram + // size should not exceed your network's MTU. + // + // Note that this value may not be respected if smaller than a single metric. + google.protobuf.UInt64Value max_bytes_per_datagram = 4 [(validate.rules).uint64 = {gt: 0}]; +} diff --git a/api/envoy/extensions/stat_sinks/wasm/v3/wasm.proto b/api/envoy/extensions/stat_sinks/wasm/v3/wasm.proto index 3fc5dae917..a0a2c6fabe 100644 --- a/api/envoy/extensions/stat_sinks/wasm/v3/wasm.proto +++ b/api/envoy/extensions/stat_sinks/wasm/v3/wasm.proto @@ -5,12 +5,11 @@ package envoy.extensions.stat_sinks.wasm.v3; import "envoy/extensions/wasm/v3/wasm.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.stat_sinks.wasm.v3"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/stat_sinks/wasm/v3;wasmv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Wasm] diff --git a/api/envoy/extensions/tracers/datadog/v4alpha/datadog.proto b/api/envoy/extensions/tracers/datadog/v4alpha/datadog.proto deleted file mode 100644 index f41c8added..0000000000 --- a/api/envoy/extensions/tracers/datadog/v4alpha/datadog.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.datadog.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.datadog.v4alpha"; -option java_outer_classname = "DatadogProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Datadog tracer] - -// Configuration for the Datadog tracer. -// [#extension: envoy.tracers.datadog] -message DatadogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.DatadogConfig"; - - // The cluster to use for submitting traces to the Datadog agent. - string collector_cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // The name used for the service when traces are generated by envoy. - string service_name = 2 [(validate.rules).string = {min_len: 1}]; -} diff --git a/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto b/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto deleted file mode 100644 index 21455a974d..0000000000 --- a/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.dynamic_ot.v4alpha; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.dynamic_ot.v4alpha"; -option java_outer_classname = "DynamicOtProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Dynamically loadable OpenTracing tracer] - -// DynamicOtConfig is used to dynamically load a tracer from a shared library -// that implements the `OpenTracing dynamic loading API -// `_. -// [#extension: envoy.tracers.dynamic_ot] -message DynamicOtConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.DynamicOtConfig"; - - // Dynamic library implementing the `OpenTracing API - // `_. - string library = 1 [(validate.rules).string = {min_len: 1}]; - - // The configuration to use when creating a tracer from the given dynamic - // library. - google.protobuf.Struct config = 2; -} diff --git a/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto b/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto deleted file mode 100644 index d7e306754d..0000000000 --- a/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.lightstep.v4alpha; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.lightstep.v4alpha"; -option java_outer_classname = "LightstepProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: LightStep tracer] - -// Configuration for the LightStep tracer. -// [#extension: envoy.tracers.lightstep] -message LightstepConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.LightstepConfig"; - - // Available propagation modes - enum PropagationMode { - // Propagate trace context in the single header x-ot-span-context. - ENVOY = 0; - - // Propagate trace context using LightStep's native format. - LIGHTSTEP = 1; - - // Propagate trace context using the b3 format. - B3 = 2; - - // Propagation trace context using the w3 trace-context standard. - TRACE_CONTEXT = 3; - } - - // The cluster manager cluster that hosts the LightStep collectors. - string collector_cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // File containing the access token to the `LightStep - // `_ API. - string access_token_file = 2 [(validate.rules).string = {min_len: 1}]; - - // Propagation modes to use by LightStep's tracer. - repeated PropagationMode propagation_modes = 3 - [(validate.rules).repeated = {items {enum {defined_only: true}}}]; -} diff --git a/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto b/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto deleted file mode 100644 index af17fe8ca2..0000000000 --- a/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opencensus.v4alpha; - -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "opencensus/proto/trace/v1/trace_config.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opencensus.v4alpha"; -option java_outer_classname = "OpencensusProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: OpenCensus tracer] - -// Configuration for the OpenCensus tracer. -// [#next-free-field: 15] -// [#extension: envoy.tracers.opencensus] -message OpenCensusConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.OpenCensusConfig"; - - enum TraceContext { - // No-op default, no trace context is utilized. - NONE = 0; - - // W3C Trace-Context format "traceparent:" header. - TRACE_CONTEXT = 1; - - // Binary "grpc-trace-bin:" header. - GRPC_TRACE_BIN = 2; - - // "X-Cloud-Trace-Context:" header. - CLOUD_TRACE_CONTEXT = 3; - - // X-B3-* headers. - B3 = 4; - } - - reserved 7, 5, 6; - - reserved "zipkin_exporter_enabled", "zipkin_url"; - - // Configures tracing, e.g. the sampler, max number of annotations, etc. - .opencensus.proto.trace.v1.TraceConfig trace_config = 1; - - // Enables the stdout exporter if set to true. This is intended for debugging - // purposes. - bool stdout_exporter_enabled = 2; - - // Enables the Stackdriver exporter if set to true. The project_id must also - // be set. - bool stackdriver_exporter_enabled = 3; - - // The Cloud project_id to use for Stackdriver tracing. - string stackdriver_project_id = 4; - - // (optional) By default, the Stackdriver exporter will connect to production - // Stackdriver. If stackdriver_address is non-empty, it will instead connect - // to this address, which is in the gRPC format: - // https://github.com/grpc/grpc/blob/master/doc/naming.md - string stackdriver_address = 10; - - // (optional) The gRPC server that hosts Stackdriver tracing service. Only - // Google gRPC is supported. If :ref:`target_uri ` - // is not provided, the default production Stackdriver address will be used. - config.core.v4alpha.GrpcService stackdriver_grpc_service = 13; - - // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or - // ocagent_grpc_service must also be set. - bool ocagent_exporter_enabled = 11; - - // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC - // format: https://github.com/grpc/grpc/blob/master/doc/naming.md - // [#comment:TODO: deprecate this field] - string ocagent_address = 12; - - // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported. - // This is only used if the ocagent_address is left empty. - config.core.v4alpha.GrpcService ocagent_grpc_service = 14; - - // List of incoming trace context headers we will accept. First one found - // wins. - repeated TraceContext incoming_trace_context = 8; - - // List of outgoing trace context headers we will produce. - repeated TraceContext outgoing_trace_context = 9; -} diff --git a/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.proto b/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.proto deleted file mode 100644 index 37936faa61..0000000000 --- a/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.skywalking.v4alpha; - -import "envoy/config/core/v4alpha/grpc_service.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.skywalking.v4alpha"; -option java_outer_classname = "SkywalkingProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: SkyWalking tracer] - -// Configuration for the SkyWalking tracer. Please note that if SkyWalking tracer is used as the -// provider of http tracer, then -// :ref:`start_child_span ` -// in the router must be set to true to get the correct topology and tracing data. Moreover, SkyWalking -// Tracer does not support SkyWalking extension header (``sw8-x``) temporarily. -// [#extension: envoy.tracers.skywalking] -message SkyWalkingConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.SkyWalkingConfig"; - - // SkyWalking collector service. - config.core.v4alpha.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; - - ClientConfig client_config = 2; -} - -// Client config for SkyWalking tracer. -message ClientConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.ClientConfig"; - - // Service name for SkyWalking tracer. If this field is empty, then local service cluster name - // that configured by :ref:`Bootstrap node ` - // message's :ref:`cluster ` field or command line - // option :option:`--service-cluster` will be used. If both this field and local service cluster - // name are empty, ``EnvoyProxy`` is used as the service name by default. - string service_name = 1; - - // Service instance name for SkyWalking tracer. If this field is empty, then local service node - // that configured by :ref:`Bootstrap node ` - // message's :ref:`id ` field or command line option - // :option:`--service-node` will be used. If both this field and local service node are empty, - // ``EnvoyProxy`` is used as the instance name by default. - string instance_name = 2; - - // Authentication token config for SkyWalking. SkyWalking can use token authentication to secure - // that monitoring application data can be trusted. In current version, Token is considered as a - // simple string. - // [#comment:TODO(wbpcode): Get backend token through the SDS API.] - oneof backend_token_specifier { - // Inline authentication token string. - string backend_token = 3 [(udpa.annotations.sensitive) = true]; - } - - // Envoy caches the segment in memory when the SkyWalking backend service is temporarily unavailable. - // This field specifies the maximum number of segments that can be cached. If not specified, the - // default is 1024. - google.protobuf.UInt32Value max_cache_size = 4; -} diff --git a/api/envoy/extensions/tracers/xray/v4alpha/xray.proto b/api/envoy/extensions/tracers/xray/v4alpha/xray.proto deleted file mode 100644 index c21ce9a7cf..0000000000 --- a/api/envoy/extensions/tracers/xray/v4alpha/xray.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.xray.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.xray.v4alpha"; -option java_outer_classname = "XrayProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: AWS X-Ray Tracer Configuration] -// Configuration for AWS X-Ray tracer - -message XRayConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.XRayConfig"; - - message SegmentFields { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v3.XRayConfig.SegmentFields"; - - // The type of AWS resource, e.g. "AWS::AppMesh::Proxy". - string origin = 1; - - // AWS resource metadata dictionary. - // See: `X-Ray Segment Document documentation `__ - google.protobuf.Struct aws = 2; - } - - // The UDP endpoint of the X-Ray Daemon where the spans will be sent. - // If this value is not set, the default value of 127.0.0.1:2000 will be used. - config.core.v4alpha.SocketAddress daemon_endpoint = 1; - - // The name of the X-Ray segment. - string segment_name = 2 [(validate.rules).string = {min_len: 1}]; - - // The location of a local custom sampling rules JSON file. - // For an example of the sampling rules see: - // `X-Ray SDK documentation - // `_ - config.core.v4alpha.DataSource sampling_rule_manifest = 3; - - // Optional custom fields to be added to each trace segment. - // see: `X-Ray Segment Document documentation - // `__ - SegmentFields segment_fields = 4; -} diff --git a/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto b/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto deleted file mode 100644 index 93ffefc483..0000000000 --- a/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto +++ /dev/null @@ -1,70 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.zipkin.v4alpha; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.zipkin.v4alpha"; -option java_outer_classname = "ZipkinProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Zipkin tracer] - -// Configuration for the Zipkin tracer. -// [#extension: envoy.tracers.zipkin] -// [#next-free-field: 7] -message ZipkinConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.ZipkinConfig"; - - // Available Zipkin collector endpoint versions. - enum CollectorEndpointVersion { - // Zipkin API v1, JSON over HTTP. - // [#comment: The default implementation of Zipkin client before this field is added was only v1 - // and the way user configure this was by not explicitly specifying the version. Consequently, - // before this is added, the corresponding Zipkin collector expected to receive v1 payload. - // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when - // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field, - // since in Zipkin realm this v1 version is considered to be not preferable anymore.] - DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0 - [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; - - // Zipkin API v2, JSON over HTTP. - HTTP_JSON = 1; - - // Zipkin API v2, protobuf over HTTP. - HTTP_PROTO = 2; - - // [#not-implemented-hide:] - GRPC = 3; - } - - // The cluster manager cluster that hosts the Zipkin collectors. - string collector_cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // The API endpoint of the Zipkin service where the spans will be sent. When - // using a standard Zipkin installation, the API endpoint is typically - // /api/v1/spans, which is the default value. - string collector_endpoint = 2 [(validate.rules).string = {min_len: 1}]; - - // Determines whether a 128bit trace id will be used when creating a new - // trace instance. The default value is false, which will result in a 64 bit trace id being used. - bool trace_id_128bit = 3; - - // Determines whether client and server spans will share the same span context. - // The default value is true. - google.protobuf.BoolValue shared_span_context = 4; - - // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be - // used. - CollectorEndpointVersion collector_endpoint_version = 5; - - // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors - // that require a specific hostname. Defaults to :ref:`collector_cluster ` above. - string collector_hostname = 6; -} diff --git a/api/envoy/extensions/transport_sockets/alts/v3/alts.proto b/api/envoy/extensions/transport_sockets/alts/v3/alts.proto index 85a8c66d0c..e5d7a8b244 100644 --- a/api/envoy/extensions/transport_sockets/alts/v3/alts.proto +++ b/api/envoy/extensions/transport_sockets/alts/v3/alts.proto @@ -9,12 +9,14 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.alts.v3"; option java_outer_classname = "AltsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/alts/v3;altsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: ALTS] // [#extension: envoy.transport_sockets.alts] // Configuration for ALTS transport socket. This provides Google's ALTS protocol to Envoy. +// Store the peer identity in dynamic metadata, namespace is "envoy.transport_socket.peer_information", key is "peer_identity". // https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security/ message Alts { option (udpa.annotations.versioning).previous_message_type = diff --git a/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto b/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto index 687226574d..87effb72c3 100644 --- a/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto +++ b/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.proxy_protocol.v3"; option java_outer_classname = "UpstreamProxyProtocolProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/proxy_protocol/v3;proxy_protocolv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Upstream Proxy Protocol] diff --git a/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto b/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto index b17e2262bc..585da76480 100644 --- a/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto +++ b/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto @@ -4,22 +4,28 @@ package envoy.extensions.transport_sockets.quic.v3; import "envoy/extensions/transport_sockets/tls/v3/tls.proto"; +import "google/protobuf/wrappers.proto"; + import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.quic.v3"; option java_outer_classname = "QuicTransportProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/quic/v3;quicv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: quic transport] -// [#extension: envoy.transport_sockets.quic] +// [#comment:#extension: envoy.transport_sockets.quic] // Configuration for Downstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. message QuicDownstreamTransport { tls.v3.DownstreamTlsContext downstream_tls_context = 1 [(validate.rules).message = {required: true}]; + + // If false, QUIC will tell TLS to reject any early data and to stop issuing 0-RTT credentials with resumption session tickets. This will prevent clients from sending 0-RTT requests. + // Default to true. + google.protobuf.BoolValue enable_early_data = 2; } // Configuration for Upstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. diff --git a/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.proto b/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.proto deleted file mode 100644 index 255bfe627b..0000000000 --- a/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.quic.v4alpha; - -import "envoy/extensions/transport_sockets/tls/v4alpha/tls.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.quic.v4alpha"; -option java_outer_classname = "QuicTransportProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: quic transport] -// [#extension: envoy.transport_sockets.quic] - -// Configuration for Downstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. -message QuicDownstreamTransport { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.quic.v3.QuicDownstreamTransport"; - - tls.v4alpha.DownstreamTlsContext downstream_tls_context = 1 - [(validate.rules).message = {required: true}]; -} - -// Configuration for Upstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. -message QuicUpstreamTransport { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.quic.v3.QuicUpstreamTransport"; - - tls.v4alpha.UpstreamTlsContext upstream_tls_context = 1 - [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto b/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto index 85406c1f77..4d6436f2a7 100644 --- a/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto +++ b/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.raw_buffer.v3"; option java_outer_classname = "RawBufferProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/raw_buffer/v3;raw_bufferv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Raw Buffer] diff --git a/api/envoy/extensions/transport_sockets/s2a/v3/s2a.proto b/api/envoy/extensions/transport_sockets/s2a/v3/s2a.proto new file mode 100644 index 0000000000..a8042c0417 --- /dev/null +++ b/api/envoy/extensions/transport_sockets/s2a/v3/s2a.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package envoy.extensions.transport_sockets.s2a.v3; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.s2a.v3"; +option java_outer_classname = "S2aProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/s2a/v3;s2av3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#not-implemented-hide:] +// Configuration for S2A transport socket. This allows Envoy clients to +// configure how to offload mTLS handshakes to the S2A service. +// https://github.com/google/s2a-core#readme +message S2AConfiguration { + // The address of the S2A. This can be an IP address or a hostname, + // followed by a port number. + string s2a_address = 1 [(validate.rules).string = {min_len: 1}]; +} diff --git a/api/envoy/extensions/transport_sockets/starttls/v3/starttls.proto b/api/envoy/extensions/transport_sockets/starttls/v3/starttls.proto index d9da31e7c4..3e6d4cfffe 100644 --- a/api/envoy/extensions/transport_sockets/starttls/v3/starttls.proto +++ b/api/envoy/extensions/transport_sockets/starttls/v3/starttls.proto @@ -5,34 +5,48 @@ package envoy.extensions.transport_sockets.starttls.v3; import "envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto"; import "envoy/extensions/transport_sockets/tls/v3/tls.proto"; -import "google/protobuf/wrappers.proto"; - import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.starttls.v3"; option java_outer_classname = "StarttlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/starttls/v3;starttlsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: StartTls] // [#extension: envoy.transport_sockets.starttls] // StartTls transport socket addresses situations when a protocol starts in clear-text and -// negotiates an in-band switch to TLS. StartTls transport socket is protocol agnostic and requires -// a network filter which understands protocol exchange and a state machine to signal to the StartTls -// transport socket when a switch to TLS is required. - -// Configuration for StartTls transport socket. +// negotiates an in-band switch to TLS. StartTls transport socket is protocol agnostic. In the +// case of downstream StartTls a network filter is required which understands protocol exchange +// and a state machine to signal to the StartTls transport socket when a switch to TLS is +// required. Similarly, upstream StartTls requires the owner of an upstream transport socket to +// manage the state machine necessary to properly coordinate negotiation with the upstream and +// signal to the transport socket when a switch to secure transport is required. + +// Configuration for a downstream StartTls transport socket. // StartTls transport socket wraps two sockets: -// - raw_buffer socket which is used at the beginning of the session -// - TLS socket used when a protocol negotiates a switch to encrypted traffic. +// * raw_buffer socket which is used at the beginning of the session +// * TLS socket used when a protocol negotiates a switch to encrypted traffic. message StartTlsConfig { // (optional) Configuration for clear-text socket used at the beginning of the session. raw_buffer.v3.RawBuffer cleartext_socket_config = 1; - // Configuration for TLS socket. + // Configuration for a downstream TLS socket. transport_sockets.tls.v3.DownstreamTlsContext tls_socket_config = 2 [(validate.rules).message = {required: true}]; } + +// Configuration for an upstream StartTls transport socket. +// StartTls transport socket wraps two sockets: +// * raw_buffer socket which is used at the beginning of the session +// * TLS socket used when a protocol negotiates a switch to encrypted traffic. +message UpstreamStartTlsConfig { + // (optional) Configuration for clear-text socket used at the beginning of the session. + raw_buffer.v3.RawBuffer cleartext_socket_config = 1; + + // Configuration for an upstream TLS socket. + transport_sockets.tls.v3.UpstreamTlsContext tls_socket_config = 2 + [(validate.rules).message = {required: true}]; +} diff --git a/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.proto b/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.proto deleted file mode 100644 index 32350cf7e1..0000000000 --- a/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.starttls.v4alpha; - -import "envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto"; -import "envoy/extensions/transport_sockets/tls/v4alpha/tls.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.starttls.v4alpha"; -option java_outer_classname = "StarttlsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: StartTls] -// [#extension: envoy.transport_sockets.starttls] - -// StartTls transport socket addresses situations when a protocol starts in clear-text and -// negotiates an in-band switch to TLS. StartTls transport socket is protocol agnostic and requires -// a network filter which understands protocol exchange and a state machine to signal to the StartTls -// transport socket when a switch to TLS is required. - -// Configuration for StartTls transport socket. -// StartTls transport socket wraps two sockets: -// - raw_buffer socket which is used at the beginning of the session -// - TLS socket used when a protocol negotiates a switch to encrypted traffic. -message StartTlsConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig"; - - // (optional) Configuration for clear-text socket used at the beginning of the session. - raw_buffer.v3.RawBuffer cleartext_socket_config = 1; - - // Configuration for TLS socket. - transport_sockets.tls.v4alpha.DownstreamTlsContext tls_socket_config = 2 - [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/extensions/transport_sockets/tap/v3/tap.proto b/api/envoy/extensions/transport_sockets/tap/v3/tap.proto index ef61575f67..281b657e88 100644 --- a/api/envoy/extensions/transport_sockets/tap/v3/tap.proto +++ b/api/envoy/extensions/transport_sockets/tap/v3/tap.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tap.v3"; option java_outer_classname = "TapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tap/v3;tapv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Tap] diff --git a/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.proto b/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.proto deleted file mode 100644 index 5e0efc403a..0000000000 --- a/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tap.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/extensions/common/tap/v4alpha/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tap.v4alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Tap] -// [#extension: envoy.transport_sockets.tap] - -// Configuration for tap transport socket. This wraps another transport socket, providing the -// ability to interpose and record in plain text any traffic that is surfaced to Envoy. -message Tap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tap.v3.Tap"; - - // Common configuration for the tap transport socket. - common.tap.v4alpha.CommonExtensionConfig common_config = 1 - [(validate.rules).message = {required: true}]; - - // The underlying transport socket being wrapped. - config.core.v4alpha.TransportSocket transport_socket = 2 - [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto b/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto new file mode 100644 index 0000000000..7428dacae8 --- /dev/null +++ b/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package envoy.extensions.transport_sockets.tcp_stats.v3; + +import "envoy/config/core/v3/base.proto"; + +import "google/protobuf/duration.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tcp_stats.v3"; +option java_outer_classname = "TcpStatsProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tcp_stats/v3;tcp_statsv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: TCP Stats Transport Socket wrapper] +// [#extension: envoy.transport_sockets.tcp_stats] + +// Configuration for the TCP Stats transport socket wrapper, which wraps another transport socket for +// all communication, but emits stats about the underlying TCP connection. +// +// The stats are documented :ref:`here ` for listeners and +// :ref:`here ` for clusters. +// +// This transport socket is currently only supported on Linux. +message Config { + // The underlying transport socket being wrapped. + config.core.v3.TransportSocket transport_socket = 1 [(validate.rules).message = {required: true}]; + + // Period to update stats while the connection is open. If unset, updates only happen when the + // connection is closed. Stats are always updated one final time when the connection is closed. + google.protobuf.Duration update_period = 2 [(validate.rules).duration = {gte {nanos: 1000000}}]; +} diff --git a/api/envoy/extensions/transport_sockets/tls/v3/cert.proto b/api/envoy/extensions/transport_sockets/tls/v3/cert.proto index cf5dc597aa..8a5f8962bd 100644 --- a/api/envoy/extensions/transport_sockets/tls/v3/cert.proto +++ b/api/envoy/extensions/transport_sockets/tls/v3/cert.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package envoy.extensions.transport_sockets.tls.v3; -import "udpa/annotations/status.proto"; - import public "envoy/extensions/transport_sockets/tls/v3/common.proto"; import public "envoy/extensions/transport_sockets/tls/v3/secret.proto"; import public "envoy/extensions/transport_sockets/tls/v3/tls.proto"; @@ -11,3 +9,4 @@ import public "envoy/extensions/transport_sockets/tls/v3/tls.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; option java_outer_classname = "CertProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; diff --git a/api/envoy/extensions/transport_sockets/tls/v3/common.proto b/api/envoy/extensions/transport_sockets/tls/v3/common.proto index 2b545b35ee..082197f69f 100644 --- a/api/envoy/extensions/transport_sockets/tls/v3/common.proto +++ b/api/envoy/extensions/transport_sockets/tls/v3/common.proto @@ -3,12 +3,14 @@ syntax = "proto3"; package envoy.extensions.transport_sockets.tls.v3; import "envoy/config/core/v3/base.proto"; +import "envoy/config/core/v3/extension.proto"; import "envoy/type/matcher/v3/string.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; +import "envoy/annotations/deprecation.proto"; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/sensitive.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -17,6 +19,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common TLS configuration] @@ -41,8 +44,7 @@ message TlsParameters { TLSv1_3 = 4; } - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for - // servers. + // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for both clients and servers. TlsProtocol tls_minimum_protocol_version = 1 [(validate.rules).enum = {defined_only: true}]; // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for @@ -51,10 +53,12 @@ message TlsParameters { // 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. + // when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). + // + // If not specified, a default list will be used. Defaults are different for server (downstream) and + // client (upstream) TLS configurations. // - // In non-FIPS builds, the default cipher list is: + // In non-FIPS builds, the default server cipher list is: // // .. code-block:: none // @@ -71,7 +75,7 @@ message TlsParameters { // AES256-GCM-SHA384 // AES256-SHA // - // In builds using :ref:`BoringSSL FIPS `, the default cipher list is: + // In builds using :ref:`BoringSSL FIPS `, the default server cipher list is: // // .. code-block:: none // @@ -87,6 +91,24 @@ message TlsParameters { // ECDHE-RSA-AES256-SHA // AES256-GCM-SHA384 // AES256-SHA + // + // In non-FIPS builds, the default client 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-AES256-GCM-SHA384 + // ECDHE-RSA-AES256-GCM-SHA384 + // + // In builds using :ref:`BoringSSL FIPS `, the default client cipher list is: + // + // .. code-block:: none + // + // ECDHE-ECDSA-AES128-GCM-SHA256 + // ECDHE-RSA-AES128-GCM-SHA256 + // ECDHE-ECDSA-AES256-GCM-SHA384 + // ECDHE-RSA-AES256-GCM-SHA384 repeated string cipher_suites = 3; // If specified, the TLS connection will only support the specified ECDH @@ -128,7 +150,7 @@ message PrivateKeyProvider { } } -// [#next-free-field: 8] +// [#next-free-field: 9] message TlsCertificate { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.TlsCertificate"; @@ -147,6 +169,21 @@ message TlsCertificate { // applies to dynamic secrets, when the *TlsCertificate* is delivered via SDS. config.core.v3.DataSource private_key = 2 [(udpa.annotations.sensitive) = true]; + // `Pkcs12` data containing TLS certificate, chain, and private key. + // + // If *pkcs12* is a filesystem path, the file will be read, but no watch will + // be added to the parent directory, since *pkcs12* isn't used by SDS. + // This field is mutually exclusive with *certificate_chain*, *private_key* and *private_key_provider*. + // This can't be marked as ``oneof`` due to API compatibility reasons. Setting + // both :ref:`private_key `, + // :ref:`certificate_chain `, + // or :ref:`private_key_provider ` + // and :ref:`pkcs12 ` + // fields will result in an error. Use :ref:`password + // ` + // to specify the password to unprotect the `PKCS12` data, if necessary. + config.core.v3.DataSource pkcs12 = 8 [(udpa.annotations.sensitive) = true]; + // If specified, updates of file-based *certificate_chain* and *private_key* // sources will be triggered by this watch. The certificate/key pair will be // read together and validated for atomic read consistency (i.e. no @@ -160,11 +197,11 @@ message TlsCertificate { config.core.v3.WatchedDirectory watched_directory = 7; // BoringSSL private key method provider. This is an alternative to :ref:`private_key - // ` field. This can't be + // ` field. This can't be // marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key - // ` and + // ` and // :ref:`private_key_provider - // ` fields will result in an + // ` fields will result in an // error. PrivateKeyProvider private_key_provider = 6; @@ -190,7 +227,7 @@ message TlsSessionTicketKeys { // 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 ` + // 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. @@ -212,7 +249,46 @@ message TlsSessionTicketKeys { [(validate.rules).repeated = {min_items: 1}, (udpa.annotations.sensitive) = true]; } -// [#next-free-field: 12] +// Indicates a certificate to be obtained from a named CertificateProvider plugin instance. +// The plugin instances are defined in the client's bootstrap file. +// The plugin allows certificates to be fetched/refreshed over the network asynchronously with +// respect to the TLS handshake. +// [#not-implemented-hide:] +message CertificateProviderPluginInstance { + // Provider instance name. If not present, defaults to "default". + // + // Instance names should generally be defined not in terms of the underlying provider + // implementation (e.g., "file_watcher") but rather in terms of the function of the + // certificates (e.g., "foo_deployment_identity"). + string instance_name = 1; + + // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify + // a root-certificate (validation context) or "example.com" to specify a certificate for a + // particular domain. Not all provider instances will actually use this field, so the value + // defaults to the empty string. + string certificate_name = 2; +} + +// Matcher for subject alternative names, to match both type and value of the SAN. +message SubjectAltNameMatcher { + // Indicates the choice of GeneralName as defined in section 4.2.1.5 of RFC 5280 to match + // against. + enum SanType { + SAN_TYPE_UNSPECIFIED = 0; + EMAIL = 1; + DNS = 2; + URI = 3; + IP_ADDRESS = 4; + } + + // Specification of type of SAN. Note that the default enum value is an invalid choice. + SanType san_type = 1 [(validate.rules).enum = {defined_only: true not_in: 0}]; + + // Matcher for SAN value. + type.matcher.v3.StringMatcher matcher = 2 [(validate.rules).message = {required: true}]; +} + +// [#next-free-field: 17] message CertificateValidationContext { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.CertificateValidationContext"; @@ -224,7 +300,7 @@ message CertificateValidationContext { // Connections where the certificate fails verification will be permitted. // For HTTP connections, the result of certificate verification can be used in route matching. ( - // see :ref:`validated ` ). + // see :ref:`validated ` ). ACCEPT_UNTRUSTED = 1; } @@ -237,13 +313,13 @@ message CertificateValidationContext { // 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:`match_subject_alt_names - // `) is also + // `, or + // :ref:`match_typed_subject_alt_names + // `) is also // specified. // // It can optionally contain certificate revocation lists, in which case Envoy will verify @@ -251,6 +327,9 @@ message CertificateValidationContext { // that if a CRL is provided for any certificate authority in a trust chain, a CRL must be // provided for all certificate authorities in that chain. Failure to do so will result in // verification failure for both revoked and unrevoked certificates from that chain. + // The behavior of requiring all certificates to contain CRLs if any do can be altered by + // setting :ref:`only_verify_leaf_cert_crl ` + // true. If set to true, only the final certificate in the chain undergoes CRL verification. // // See :ref:`the TLS overview ` for a list of common // system CA locations. @@ -259,7 +338,20 @@ message CertificateValidationContext { // directory for any file moves to support rotation. This currently only // applies to dynamic secrets, when the *CertificateValidationContext* is // delivered via SDS. - config.core.v3.DataSource trusted_ca = 1; + // + // Only one of *trusted_ca* and *ca_certificate_provider_instance* may be specified. + // + // [#next-major-version: This field and watched_directory below should ideally be moved into a + // separate sub-message, since there's no point in specifying the latter field without this one.] + config.core.v3.DataSource trusted_ca = 1 + [(udpa.annotations.field_migrate).oneof_promotion = "ca_cert_source"]; + + // Certificate provider instance for fetching TLS certificates. + // + // Only one of *trusted_ca* and *ca_certificate_provider_instance* may be specified. + // [#not-implemented-hide:] + CertificateProviderPluginInstance ca_certificate_provider_instance = 13 + [(udpa.annotations.field_migrate).oneof_promotion = "ca_cert_source"]; // If specified, updates of a file-based *trusted_ca* source will be triggered // by this watch. This allows explicit control over the path watched, by @@ -289,15 +381,15 @@ message CertificateValidationContext { // // When both: // :ref:`verify_certificate_hash - // ` and + // ` and // :ref:`verify_certificate_spki - // ` are specified, + // ` 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. repeated string verify_certificate_spki = 3 @@ -325,32 +417,45 @@ message CertificateValidationContext { // // When both: // :ref:`verify_certificate_hash - // ` and + // ` and // :ref:`verify_certificate_spki - // ` are specified, + // ` are specified, // a hash matching value from either of the lists will result in the certificate being accepted. repeated string verify_certificate_hash = 2 [(validate.rules).repeated = {items {string {min_len: 64 max_bytes: 95}}}]; // An optional list of Subject Alternative name matchers. If specified, Envoy will verify that the // Subject Alternative Name of the presented certificate matches one of the specified matchers. + // The matching uses "any" semantics, that is to say, the SAN is verified if at least one matcher is + // matched. // // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be - // configured with exact match type in the :ref:`string matcher `. + // configured with exact match type in the :ref:`string matcher `. // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", // it should be configured as shown below. // // .. code-block:: yaml // - // match_subject_alt_names: - // exact: "api.example.com" + // match_typed_subject_alt_names: + // - san_type: DNS + // matcher: + // exact: "api.example.com" // // .. attention:: // // Subject Alternative Names are easily spoofable and verifying only them is insecure, // therefore this option must be used together with :ref:`trusted_ca - // `. - repeated type.matcher.v3.StringMatcher match_subject_alt_names = 9; + // `. + repeated SubjectAltNameMatcher match_typed_subject_alt_names = 15; + + // This field is deprecated in favor of + // :ref:`match_typed_subject_alt_names + // `. + // Note that if both this field and :ref:`match_typed_subject_alt_names + // ` + // are specified, the former (deprecated field) is ignored. + repeated type.matcher.v3.StringMatcher match_subject_alt_names = 9 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // [#not-implemented-hide:] Must present signed certificate time-stamp. google.protobuf.BoolValue require_signed_certificate_timestamp = 6; @@ -363,7 +468,9 @@ message CertificateValidationContext { // for any certificate authority in a trust chain, a CRL must be provided // for all certificate authorities in that chain. Failure to do so will // result in verification failure for both revoked and unrevoked certificates - // from that chain. + // from that chain. This default behavior can be altered by setting + // :ref:`only_verify_leaf_cert_crl ` to + // true. config.core.v3.DataSource crl = 7; // If specified, Envoy will not reject expired certificates. @@ -372,4 +479,22 @@ message CertificateValidationContext { // Certificate trust chain verification mode. TrustChainVerification trust_chain_verification = 10 [(validate.rules).enum = {defined_only: true}]; + + // The configuration of an extension specific certificate validator. + // If specified, all validation is done by the specified validator, + // and the behavior of all other validation settings is defined by the specified validator (and may be entirely ignored, unused, and unvalidated). + // Refer to the documentation for the specified validator. If you do not want a custom validation algorithm, do not set this field. + // [#extension-category: envoy.tls.cert_validator] + config.core.v3.TypedExtensionConfig custom_validator_config = 12; + + // If this option is set to true, only the certificate at the end of the + // certificate chain will be subject to validation by :ref:`CRL `. + bool only_verify_leaf_cert_crl = 14; + + // Config for the max number of intermediate certificates in chain that are parsed during verification. + // This does not include the leaf certificate. If configured, and the certificate chain is longer than allowed, the certificates + // above the limit are ignored, and certificate validation will fail. The default limit is 100, + // though this can be system-dependent. + // https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_verify_depth.html + google.protobuf.UInt32Value max_verify_depth = 16 [(validate.rules).uint32 = {lte: 100}]; } diff --git a/api/envoy/extensions/transport_sockets/tls/v3/secret.proto b/api/envoy/extensions/transport_sockets/tls/v3/secret.proto index bb9e8df339..83ad364c4b 100644 --- a/api/envoy/extensions/transport_sockets/tls/v3/secret.proto +++ b/api/envoy/extensions/transport_sockets/tls/v3/secret.proto @@ -6,7 +6,6 @@ import "envoy/config/core/v3/base.proto"; import "envoy/config/core/v3/config_source.proto"; import "envoy/extensions/transport_sockets/tls/v3/common.proto"; -import "udpa/annotations/migrate.proto"; import "udpa/annotations/sensitive.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -15,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; option java_outer_classname = "SecretProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Secrets configuration] diff --git a/api/envoy/extensions/transport_sockets/tls/v3/tls.proto b/api/envoy/extensions/transport_sockets/tls/v3/tls.proto index e11b269197..03cf5be8e6 100644 --- a/api/envoy/extensions/transport_sockets/tls/v3/tls.proto +++ b/api/envoy/extensions/transport_sockets/tls/v3/tls.proto @@ -2,15 +2,15 @@ syntax = "proto3"; package envoy.extensions.transport_sockets.tls.v3; +import "envoy/config/core/v3/address.proto"; import "envoy/config/core/v3/extension.proto"; import "envoy/extensions/transport_sockets/tls/v3/common.proto"; import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; -import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; -import "udpa/annotations/migrate.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -18,6 +18,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; option java_outer_classname = "TlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: TLS transport socket] @@ -33,7 +34,7 @@ message UpstreamTlsContext { // .. attention:: // // Server certificate verification is not enabled by default. Configure - // :ref:`trusted_ca` to enable + // :ref:`trusted_ca` to enable // verification. CommonTlsContext common_tls_context = 1; @@ -102,18 +103,17 @@ message DownstreamTlsContext { // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS // server to not issue TLS session tickets for the purposes of stateless TLS session resumption. // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using - // the keys specified through either :ref:`session_ticket_keys ` - // or :ref:`session_ticket_keys_sds_secret_config `. + // the keys specified through either :ref:`session_ticket_keys ` + // or :ref:`session_ticket_keys_sds_secret_config `. // If this config is set to false and no keys are explicitly configured, the TLS server will issue // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the // implication that sessions cannot be resumed across hot restarts or on different hosts. bool disable_stateless_session_resumption = 7; } - // If specified, session_timeout will change maximum lifetime (in seconds) of TLS session - // Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) - // ` - // only seconds could be specified (fractional seconds are going to be ignored). + // If specified, ``session_timeout`` will change the maximum lifetime (in seconds) of the TLS session. + // Currently this value is used as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_. + // Only seconds can be specified (fractional seconds are ignored). google.protobuf.Duration session_timeout = 6 [(validate.rules).duration = { lt {seconds: 4294967296} gte {} @@ -125,13 +125,34 @@ message DownstreamTlsContext { OcspStaplePolicy ocsp_staple_policy = 8 [(validate.rules).enum = {defined_only: true}]; } +// TLS key log configuration. +// The key log file format is "format used by NSS for its SSLKEYLOGFILE debugging output" (text taken from openssl man page) +message TlsKeyLog { + // The path to save the TLS key log. + string path = 1 [(validate.rules).string = {min_len: 1}]; + + // The local IP address that will be used to filter the connection which should save the TLS key log + // If it is not set, any local IP address will be matched. + repeated config.core.v3.CidrRange local_address_range = 2; + + // The remote IP address that will be used to filter the connection which should save the TLS key log + // If it is not set, any remote IP address will be matched. + repeated config.core.v3.CidrRange remote_address_range = 3; +} + // TLS context shared by both client and server TLS contexts. -// [#next-free-field: 14] +// [#next-free-field: 16] message CommonTlsContext { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.CommonTlsContext"; // Config for Certificate provider to get certificates. This provider should allow certificates to be // fetched/refreshed over the network asynchronously with respect to the TLS handshake. + // + // DEPRECATED: This message is not currently used, but if we ever do need it, we will want to + // move it out of CommonTlsContext and into common.proto, similar to the existing + // CertificateProviderPluginInstance message. + // + // [#not-implemented-hide:] message CertificateProvider { // opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify // a root-certificate (validation context) or "TLS" to specify a new tls-certificate. @@ -152,6 +173,11 @@ message CommonTlsContext { // Similar to CertificateProvider above, but allows the provider instances to be configured on // the client side instead of being sent from the control plane. + // + // DEPRECATED: This message was moved outside of CommonTlsContext + // and now lives in common.proto. + // + // [#not-implemented-hide:] message CertificateProviderInstance { // Provider instance name. This name must be defined in the client's configuration (e.g., a // bootstrap file) to correspond to a provider instance (i.e., the same data in the typed_config @@ -180,26 +206,20 @@ message CommonTlsContext { // Config for fetching validation context via SDS API. Note SDS API allows certificates to be // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. - SdsSecretConfig validation_context_sds_secret_config = 2 [ - (validate.rules).message = {required: true}, - (udpa.annotations.field_migrate).oneof_promotion = "dynamic_validation_context" - ]; + SdsSecretConfig validation_context_sds_secret_config = 2 + [(validate.rules).message = {required: true}]; - // Certificate provider for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. + // Certificate provider for fetching CA certs. This will populate the + // *default_validation_context.trusted_ca* field. // [#not-implemented-hide:] CertificateProvider validation_context_certificate_provider = 3 - [(udpa.annotations.field_migrate).oneof_promotion = "dynamic_validation_context"]; + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - // Certificate provider instance for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. + // Certificate provider instance for fetching CA certs. This will populate the + // *default_validation_context.trusted_ca* field. // [#not-implemented-hide:] CertificateProviderInstance validation_context_certificate_provider_instance = 4 - [(udpa.annotations.field_migrate).oneof_promotion = "dynamic_validation_context"]; + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; } reserved 5; @@ -213,20 +233,44 @@ message CommonTlsContext { // 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. + // + // Only one of *tls_certificates*, *tls_certificate_sds_secret_configs*, + // and *tls_certificate_provider_instance* may be used. + // [#next-major-version: These mutually exclusive fields should ideally be in a oneof, but it's + // not legal to put a repeated field in a oneof. In the next major version, we should rework + // this to avoid this problem.] repeated TlsCertificate tls_certificates = 2; // Configs for fetching TLS certificates via SDS API. Note SDS API allows certificates to be // fetched/refreshed over the network asynchronously with respect to the TLS handshake. + // + // The same number and types of certificates as :ref:`tls_certificates ` + // are valid in the the certificates fetched through this setting. + // + // Only one of *tls_certificates*, *tls_certificate_sds_secret_configs*, + // and *tls_certificate_provider_instance* may be used. + // [#next-major-version: These mutually exclusive fields should ideally be in a oneof, but it's + // not legal to put a repeated field in a oneof. In the next major version, we should rework + // this to avoid this problem.] repeated SdsSecretConfig tls_certificate_sds_secret_configs = 6 - [(validate.rules).repeated = {max_items: 1}]; + [(validate.rules).repeated = {max_items: 2}]; + + // Certificate provider instance for fetching TLS certs. + // + // Only one of *tls_certificates*, *tls_certificate_sds_secret_configs*, + // and *tls_certificate_provider_instance* may be used. + // [#not-implemented-hide:] + CertificateProviderPluginInstance tls_certificate_provider_instance = 14; // Certificate provider for fetching TLS certificates. // [#not-implemented-hide:] - CertificateProvider tls_certificate_certificate_provider = 9; + CertificateProvider tls_certificate_certificate_provider = 9 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Certificate provider instance for fetching TLS certificates. // [#not-implemented-hide:] - CertificateProviderInstance tls_certificate_certificate_provider_instance = 11; + CertificateProviderInstance tls_certificate_certificate_provider_instance = 11 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; oneof validation_context_type { // How to validate peer certificates. @@ -247,17 +291,19 @@ message CommonTlsContext { // Certificate provider for fetching validation context. // [#not-implemented-hide:] - CertificateProvider validation_context_certificate_provider = 10; + CertificateProvider validation_context_certificate_provider = 10 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Certificate provider instance for fetching validation context. // [#not-implemented-hide:] - CertificateProviderInstance validation_context_certificate_provider_instance = 12; + CertificateProviderInstance validation_context_certificate_provider_instance = 12 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; } // 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. @@ -269,4 +315,7 @@ message CommonTlsContext { // Custom TLS handshaker. If empty, defaults to native TLS handshaking // behavior. config.core.v3.TypedExtensionConfig custom_handshaker = 13; + + // TLS key log configuration + TlsKeyLog key_log = 15; } diff --git a/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto b/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto new file mode 100644 index 0000000000..f51bd6591c --- /dev/null +++ b/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package envoy.extensions.transport_sockets.tls.v3; + +import "envoy/config/core/v3/base.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; +option java_outer_classname = "TlsSpiffeValidatorConfigProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: SPIFFE Certificate Validator] +// [#extension: envoy.tls.cert_validator.spiffe] + +// Configuration specific to the `SPIFFE `_ certificate validator. +// +// Example: +// +// .. validated-code-block:: yaml +// :type-name: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext +// +// custom_validator_config: +// name: envoy.tls.cert_validator.spiffe +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig +// trust_domains: +// - name: foo.com +// trust_bundle: +// filename: "foo.pem" +// - name: envoy.com +// trust_bundle: +// filename: "envoy.pem" +// +// In this example, a presented peer certificate whose SAN matches `spiffe//foo.com/**` is validated against +// the "foo.pem" x.509 certificate. All the trust bundles are isolated from each other, so no trust domain can mint +// a SVID belonging to another trust domain. That means, in this example, a SVID signed by `envoy.com`'s CA with `spiffe//foo.com/**` +// SAN would be rejected since Envoy selects the trust bundle according to the presented SAN before validate the certificate. +// +// Note that SPIFFE validator inherits and uses the following options from :ref:`CertificateValidationContext `. +// +// - :ref:`allow_expired_certificate ` to allow expired certificates. +// - :ref:`match_typed_subject_alt_names ` to match **URI** SAN of certificates. Unlike the default validator, SPIFFE validator only matches **URI** SAN (which equals to SVID in SPIFFE terminology) and ignore other SAN types. +// +message SPIFFECertValidatorConfig { + message TrustDomain { + // Name of the trust domain, `example.com`, `foo.bar.gov` for example. + // Note that this must *not* have "spiffe://" prefix. + string name = 1 [(validate.rules).string = {min_len: 1}]; + + // Specify a data source holding x.509 trust bundle used for validating incoming SVID(s) in this trust domain. + config.core.v3.DataSource trust_bundle = 2; + } + + // This field specifies trust domains used for validating incoming X.509-SVID(s). + repeated TrustDomain trust_domains = 1 [(validate.rules).repeated = {min_items: 1}]; +} diff --git a/api/envoy/extensions/transport_sockets/tls/v4alpha/common.proto b/api/envoy/extensions/transport_sockets/tls/v4alpha/common.proto deleted file mode 100644 index 30859bc2a3..0000000000 --- a/api/envoy/extensions/transport_sockets/tls/v4alpha/common.proto +++ /dev/null @@ -1,377 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v4alpha"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Common TLS configuration] - -message TlsParameters { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.TlsParameters"; - - enum TlsProtocol { - // Envoy will choose the optimal TLS version. - TLS_AUTO = 0; - - // TLS 1.0 - TLSv1_0 = 1; - - // TLS 1.1 - TLSv1_1 = 2; - - // TLS 1.2 - TLSv1_2 = 3; - - // TLS 1.3 - TLSv1_3 = 4; - } - - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for - // servers. - TlsProtocol tls_minimum_protocol_version = 1 [(validate.rules).enum = {defined_only: true}]; - - // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for - // servers. - TlsProtocol tls_maximum_protocol_version = 2 [(validate.rules).enum = {defined_only: true}]; - - // 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 - repeated string cipher_suites = 3; - - // 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 - repeated string ecdh_curves = 4; -} - -// BoringSSL private key method configuration. The private key methods are used for external -// (potentially asynchronous) signing and decryption operations. Some use cases for private key -// methods would be TPM support and TLS acceleration. -message PrivateKeyProvider { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider"; - - reserved 2; - - reserved "config"; - - // Private key method provider name. The name must match a - // supported private key method provider type. - string provider_name = 1 [(validate.rules).string = {min_len: 1}]; - - // Private key method provider specific configuration. - oneof config_type { - google.protobuf.Any typed_config = 3 [(udpa.annotations.sensitive) = true]; - } -} - -// [#next-free-field: 8] -message TlsCertificate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.TlsCertificate"; - - // The TLS certificate chain. - // - // If *certificate_chain* is a filesystem path, a watch will be added to the - // parent directory for any file moves to support rotation. This currently - // only applies to dynamic secrets, when the *TlsCertificate* is delivered via - // SDS. - config.core.v4alpha.DataSource certificate_chain = 1; - - // The TLS private key. - // - // If *private_key* is a filesystem path, a watch will be added to the parent - // directory for any file moves to support rotation. This currently only - // applies to dynamic secrets, when the *TlsCertificate* is delivered via SDS. - config.core.v4alpha.DataSource private_key = 2 [(udpa.annotations.sensitive) = true]; - - // If specified, updates of file-based *certificate_chain* and *private_key* - // sources will be triggered by this watch. The certificate/key pair will be - // read together and validated for atomic read consistency (i.e. no - // intervening modification occurred between cert/key read, verified by file - // hash comparisons). This allows explicit control over the path watched, by - // default the parent directories of the filesystem paths in - // *certificate_chain* and *private_key* are watched if this field is not - // specified. This only applies when a *TlsCertificate* is delivered by SDS - // with references to filesystem paths. See the :ref:`SDS key rotation - // ` documentation for further details. - config.core.v4alpha.WatchedDirectory watched_directory = 7; - - // BoringSSL private key method provider. This is an alternative to :ref:`private_key - // ` field. This can't be - // marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key - // ` and - // :ref:`private_key_provider - // ` fields will result in an - // error. - PrivateKeyProvider private_key_provider = 6; - - // 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. - config.core.v4alpha.DataSource password = 3 [(udpa.annotations.sensitive) = true]; - - // The OCSP response to be stapled with this certificate during the handshake. - // The response must be DER-encoded and may only be provided via ``filename`` or - // ``inline_bytes``. The response may pertain to only one certificate. - config.core.v4alpha.DataSource ocsp_staple = 4; - - // [#not-implemented-hide:] - repeated config.core.v4alpha.DataSource signed_certificate_timestamp = 5; -} - -message TlsSessionTicketKeys { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys"; - - // 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 - repeated config.core.v4alpha.DataSource keys = 1 - [(validate.rules).repeated = {min_items: 1}, (udpa.annotations.sensitive) = true]; -} - -// [#next-free-field: 12] -message CertificateValidationContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext"; - - // Peer certificate verification mode. - enum TrustChainVerification { - // Perform default certificate verification (e.g., against CA / verification lists) - VERIFY_TRUST_CHAIN = 0; - - // Connections where the certificate fails verification will be permitted. - // For HTTP connections, the result of certificate verification can be used in route matching. ( - // see :ref:`validated ` ). - ACCEPT_UNTRUSTED = 1; - } - - reserved 4, 5; - - reserved "verify_subject_alt_name"; - - // 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:`match_subject_alt_names - // `) 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. Note - // that if a CRL is provided for any certificate authority in a trust chain, a CRL must be - // provided for all certificate authorities in that chain. Failure to do so will result in - // verification failure for both revoked and unrevoked certificates from that chain. - // - // See :ref:`the TLS overview ` for a list of common - // system CA locations. - // - // If *trusted_ca* is a filesystem path, a watch will be added to the parent - // directory for any file moves to support rotation. This currently only - // applies to dynamic secrets, when the *CertificateValidationContext* is - // delivered via SDS. - config.core.v4alpha.DataSource trusted_ca = 1; - - // If specified, updates of a file-based *trusted_ca* source will be triggered - // by this watch. This allows explicit control over the path watched, by - // default the parent directory of the filesystem path in *trusted_ca* is - // watched if this field is not specified. This only applies when a - // *CertificateValidationContext* is delivered by SDS with references to - // filesystem paths. See the :ref:`SDS key rotation ` - // documentation for further details. - config.core.v4alpha.WatchedDirectory watched_directory = 11; - - // 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. - repeated string verify_certificate_spki = 3 - [(validate.rules).repeated = {items {string {min_len: 44 max_bytes: 44}}}]; - - // 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. - repeated string verify_certificate_hash = 2 - [(validate.rules).repeated = {items {string {min_len: 64 max_bytes: 95}}}]; - - // An optional list of Subject Alternative name matchers. If specified, Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified matchers. - // - // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be - // configured with exact match type in the :ref:`string matcher `. - // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", - // it should be configured as shown below. - // - // .. code-block:: yaml - // - // match_subject_alt_names: - // exact: "api.example.com" - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - repeated type.matcher.v4alpha.StringMatcher match_subject_alt_names = 9; - - // [#not-implemented-hide:] Must present signed certificate time-stamp. - google.protobuf.BoolValue require_signed_certificate_timestamp = 6; - - // 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. Note that if a CRL is provided - // for any certificate authority in a trust chain, a CRL must be provided - // for all certificate authorities in that chain. Failure to do so will - // result in verification failure for both revoked and unrevoked certificates - // from that chain. - config.core.v4alpha.DataSource crl = 7; - - // If specified, Envoy will not reject expired certificates. - bool allow_expired_certificate = 8; - - // Certificate trust chain verification mode. - TrustChainVerification trust_chain_verification = 10 - [(validate.rules).enum = {defined_only: true}]; -} diff --git a/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.proto b/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.proto deleted file mode 100644 index 5bb8c86b94..0000000000 --- a/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/config_source.proto"; -import "envoy/extensions/transport_sockets/tls/v4alpha/common.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v4alpha"; -option java_outer_classname = "SecretProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Secrets configuration] - -message GenericSecret { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.GenericSecret"; - - // Secret of generic type and is available to filters. - config.core.v4alpha.DataSource secret = 1 [(udpa.annotations.sensitive) = true]; -} - -message SdsSecretConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig"; - - // Name 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. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - config.core.v4alpha.ConfigSource sds_config = 2; -} - -// [#next-free-field: 6] -message Secret { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.Secret"; - - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. - string name = 1; - - oneof type { - TlsCertificate tls_certificate = 2; - - TlsSessionTicketKeys session_ticket_keys = 3; - - CertificateValidationContext validation_context = 4; - - GenericSecret generic_secret = 5; - } -} diff --git a/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.proto b/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.proto deleted file mode 100644 index 6a49cb352e..0000000000 --- a/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.proto +++ /dev/null @@ -1,277 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v4alpha; - -import "envoy/config/core/v4alpha/extension.proto"; -import "envoy/extensions/transport_sockets/tls/v4alpha/common.proto"; -import "envoy/extensions/transport_sockets/tls/v4alpha/secret.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v4alpha"; -option java_outer_classname = "TlsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: TLS transport socket] -// [#extension: envoy.transport_sockets.tls] -// The TLS contexts below provide the transport socket configuration for upstream/downstream TLS. - -message UpstreamTlsContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext"; - - // Common TLS context settings. - // - // .. attention:: - // - // Server certificate verification is not enabled by default. Configure - // :ref:`trusted_ca` to enable - // verification. - CommonTlsContext common_tls_context = 1; - - // SNI string to use when creating TLS backend connections. - string sni = 2 [(validate.rules).string = {max_bytes: 255}]; - - // If true, server-initiated TLS renegotiation will be allowed. - // - // .. attention:: - // - // TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary. - bool allow_renegotiation = 3; - - // 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. - google.protobuf.UInt32Value max_session_keys = 4; -} - -// [#next-free-field: 9] -message DownstreamTlsContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext"; - - enum OcspStaplePolicy { - // OCSP responses are optional. If an OCSP response is absent - // or expired, the associated certificate will be used for - // connections without an OCSP staple. - LENIENT_STAPLING = 0; - - // OCSP responses are optional. If an OCSP response is absent, - // the associated certificate will be used without an - // OCSP staple. If a response is provided but is expired, - // the associated certificate will not be used for - // subsequent connections. If no suitable certificate is found, - // the connection is rejected. - STRICT_STAPLING = 1; - - // OCSP responses are required. Configuration will fail if - // a certificate is provided without an OCSP response. If a - // response expires, the associated certificate will not be - // used connections. If no suitable certificate is found, the - // connection is rejected. - MUST_STAPLE = 2; - } - - // Common TLS context settings. - CommonTlsContext common_tls_context = 1; - - // If specified, Envoy will reject connections without a valid client - // certificate. - google.protobuf.BoolValue require_client_certificate = 2; - - // If specified, Envoy will reject connections without a valid and matching SNI. - // [#not-implemented-hide:] - google.protobuf.BoolValue require_sni = 3; - - oneof session_ticket_keys_type { - // TLS session ticket key settings. - TlsSessionTicketKeys session_ticket_keys = 4; - - // Config for fetching TLS session ticket keys via SDS API. - SdsSecretConfig session_ticket_keys_sds_secret_config = 5; - - // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS - // server to not issue TLS session tickets for the purposes of stateless TLS session resumption. - // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using - // the keys specified through either :ref:`session_ticket_keys ` - // or :ref:`session_ticket_keys_sds_secret_config `. - // If this config is set to false and no keys are explicitly configured, the TLS server will issue - // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the - // implication that sessions cannot be resumed across hot restarts or on different hosts. - bool disable_stateless_session_resumption = 7; - } - - // If specified, session_timeout will change maximum lifetime (in seconds) of TLS session - // Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) - // ` - // only seconds could be specified (fractional seconds are going to be ignored). - google.protobuf.Duration session_timeout = 6 [(validate.rules).duration = { - lt {seconds: 4294967296} - gte {} - }]; - - // Config for whether to use certificates if they do not have - // an accompanying OCSP response or if the response expires at runtime. - // Defaults to LENIENT_STAPLING - OcspStaplePolicy ocsp_staple_policy = 8 [(validate.rules).enum = {defined_only: true}]; -} - -// TLS context shared by both client and server TLS contexts. -// [#next-free-field: 14] -message CommonTlsContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext"; - - // Config for Certificate provider to get certificates. This provider should allow certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - message CertificateProvider { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider"; - - // opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "TLS" to specify a new tls-certificate. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Provider specific config. - // Note: an implementation is expected to dedup multiple instances of the same config - // to maintain a single certificate-provider instance. The sharing can happen, for - // example, among multiple clusters or between the tls_certificate and validation_context - // certificate providers of a cluster. - // This config could be supplied inline or (in future) a named xDS resource. - oneof config { - option (validate.required) = true; - - config.core.v4alpha.TypedExtensionConfig typed_config = 2; - } - } - - // Similar to CertificateProvider above, but allows the provider instances to be configured on - // the client side instead of being sent from the control plane. - message CertificateProviderInstance { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance"; - - // Provider instance name. This name must be defined in the client's configuration (e.g., a - // bootstrap file) to correspond to a provider instance (i.e., the same data in the typed_config - // field that would be sent in the CertificateProvider message if the config was sent by the - // control plane). If not present, defaults to "default". - // - // Instance names should generally be defined not in terms of the underlying provider - // implementation (e.g., "file_watcher") but rather in terms of the function of the - // certificates (e.g., "foo_deployment_identity"). - string instance_name = 1; - - // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "example.com" to specify a certificate for a - // particular domain. Not all provider instances will actually use this field, so the value - // defaults to the empty string. - string certificate_name = 2; - } - - message CombinedCertificateValidationContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext." - "CombinedCertificateValidationContext"; - - // How to validate peer certificates. - CertificateValidationContext default_validation_context = 1 - [(validate.rules).message = {required: true}]; - - oneof dynamic_validation_context { - // Config for fetching validation context via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. - SdsSecretConfig validation_context_sds_secret_config = 2 - [(validate.rules).message = {required: true}]; - - // Certificate provider for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. - // [#not-implemented-hide:] - CertificateProvider validation_context_certificate_provider = 3; - - // Certificate provider instance for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. - // [#not-implemented-hide:] - CertificateProviderInstance validation_context_certificate_provider_instance = 4; - } - } - - reserved 5; - - // TLS protocol versions, cipher suites etc. - TlsParameters tls_params = 1; - - // :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. - repeated TlsCertificate tls_certificates = 2; - - // Configs for fetching TLS certificates via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - repeated SdsSecretConfig tls_certificate_sds_secret_configs = 6 - [(validate.rules).repeated = {max_items: 1}]; - - // Certificate provider for fetching TLS certificates. - // [#not-implemented-hide:] - CertificateProvider tls_certificate_certificate_provider = 9; - - // Certificate provider instance for fetching TLS certificates. - // [#not-implemented-hide:] - CertificateProviderInstance tls_certificate_certificate_provider_instance = 11; - - oneof validation_context_type { - // How to validate peer certificates. - CertificateValidationContext validation_context = 3; - - // Config for fetching validation context via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - SdsSecretConfig validation_context_sds_secret_config = 7; - - // Combined certificate validation context holds a default CertificateValidationContext - // and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic - // and default CertificateValidationContext are merged into a new CertificateValidationContext - // for validation. This merge is done by Message::MergeFrom(), so dynamic - // CertificateValidationContext overwrites singular fields in default - // CertificateValidationContext, and concatenates repeated fields to default - // CertificateValidationContext, and logical OR is applied to boolean fields. - CombinedCertificateValidationContext combined_validation_context = 8; - - // Certificate provider for fetching validation context. - // [#not-implemented-hide:] - CertificateProvider validation_context_certificate_provider = 10; - - // Certificate provider instance for fetching validation context. - // [#not-implemented-hide:] - CertificateProviderInstance validation_context_certificate_provider_instance = 12; - } - - // 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. - repeated string alpn_protocols = 4; - - // Custom TLS handshaker. If empty, defaults to native TLS handshaking - // behavior. - config.core.v4alpha.TypedExtensionConfig custom_handshaker = 13; -} diff --git a/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto b/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto index 44e207172c..e76dde8573 100644 --- a/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto +++ b/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.generic.v3"; option java_outer_classname = "GenericConnectionPoolProtoOuterClass"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/generic/v3;genericv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Generic Connection Pool] diff --git a/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto b/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto index 8318f3c666..45f3a164aa 100644 --- a/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto +++ b/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.http.v3"; option java_outer_classname = "HttpConnectionPoolProtoOuterClass"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/http/v3;httpv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Http Connection Pool] diff --git a/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto b/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto index 7c1d633432..1f0f288925 100644 --- a/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto +++ b/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.tcp.v3"; option java_outer_classname = "TcpConnectionPoolProtoOuterClass"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/tcp/v3;tcpv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Tcp Connection Pool] diff --git a/api/envoy/extensions/upstreams/http/v3/http_protocol_options.proto b/api/envoy/extensions/upstreams/http/v3/http_protocol_options.proto index e7cf42df23..3177b13ad2 100644 --- a/api/envoy/extensions/upstreams/http/v3/http_protocol_options.proto +++ b/api/envoy/extensions/upstreams/http/v3/http_protocol_options.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.v3"; option java_outer_classname = "HttpProtocolOptionsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/v3;httpv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP Protocol Options] @@ -17,7 +18,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // HttpProtocolOptions specifies Http upstream protocol options. This object // is used in -// :ref:`typed_extension_protocol_options`, +// :ref:`typed_extension_protocol_options`, // keyed by the name `envoy.extensions.upstreams.http.v3.HttpProtocolOptions`. // // This controls what protocol(s) should be used for upstream and how said protocol(s) are configured. @@ -58,8 +59,8 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // .... [further cluster config] // [#next-free-field: 6] message HttpProtocolOptions { - // If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). - // Note that HTTP/2 should generally be used for upstream clusters doing gRPC. + // If this is used, the cluster will only operate on one of the possible upstream protocols. + // Note that HTTP/2 or above should generally be used for upstream gRPC clusters. message ExplicitHttpConfig { oneof protocol_config { option (validate.required) = true; @@ -67,15 +68,28 @@ message HttpProtocolOptions { config.core.v3.Http1ProtocolOptions http_protocol_options = 1; config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; + + // .. warning:: + // QUIC upstream support is currently not ready for internet use. + // Please see :ref:`here ` for details. + config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; } } // If this is used, the cluster can use either of the configured protocols, and // will use whichever protocol was used by the downstream connection. + // + // If HTTP/3 is configured for downstream and not configured for upstream, + // HTTP/3 requests will fail over to HTTP/2. message UseDownstreamHttpConfig { config.core.v3.Http1ProtocolOptions http_protocol_options = 1; config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; + + // .. warning:: + // QUIC upstream support is currently not ready for internet use. + // Please see :ref:`here ` for details. + config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; } // If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever @@ -91,6 +105,26 @@ message HttpProtocolOptions { config.core.v3.Http1ProtocolOptions http_protocol_options = 1; config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; + + // Unlike HTTP/1 and HTTP/2, HTTP/3 will not be configured unless it is + // present, and (soon) only if there is an indication of server side + // support. + // See :ref:`here ` for more information on + // when HTTP/3 will be used, and when Envoy will fail over to TCP. + // + // .. warning:: + // QUIC upstream support is currently not ready for internet use. + // Please see :ref:`here ` for details. + config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; + + // The presence of alternate protocols cache options causes the use of the + // alternate protocols cache, which is responsible for parsing and caching + // HTTP Alt-Svc headers. This enables the use of HTTP/3 for origins that + // advertise supporting it. + // + // .. note:: + // This is required when HTTP/3 is enabled. + config.core.v3.AlternateProtocolsCacheOptions alternate_protocols_cache_options = 4; } // This contains options common across HTTP/1 and HTTP/2 diff --git a/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto b/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto deleted file mode 100644 index 277ceb9aa9..0000000000 --- a/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto +++ /dev/null @@ -1,130 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.http.v4alpha; - -import "envoy/config/core/v4alpha/protocol.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.v4alpha"; -option java_outer_classname = "HttpProtocolOptionsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: HTTP Protocol Options] -// [#extension: envoy.upstreams.http.http_protocol_options] - -// HttpProtocolOptions specifies Http upstream protocol options. This object -// is used in -// :ref:`typed_extension_protocol_options`, -// keyed by the name `envoy.extensions.upstreams.http.v3.HttpProtocolOptions`. -// -// This controls what protocol(s) should be used for upstream and how said protocol(s) are configured. -// -// This replaces the prior pattern of explicit protocol configuration directly -// in the cluster. So a configuration like this, explicitly configuring the use of HTTP/2 upstream: -// -// .. code:: -// -// clusters: -// - name: some_service -// connect_timeout: 5s -// upstream_http_protocol_options: -// auto_sni: true -// common_http_protocol_options: -// idle_timeout: 1s -// http2_protocol_options: -// max_concurrent_streams: 100 -// .... [further cluster config] -// -// Would now look like this: -// -// .. code:: -// -// clusters: -// - name: some_service -// connect_timeout: 5s -// typed_extension_protocol_options: -// envoy.extensions.upstreams.http.v3.HttpProtocolOptions: -// "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions -// upstream_http_protocol_options: -// auto_sni: true -// common_http_protocol_options: -// idle_timeout: 1s -// explicit_http_config: -// http2_protocol_options: -// max_concurrent_streams: 100 -// .... [further cluster config] -// [#next-free-field: 6] -message HttpProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions"; - - // If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). - // Note that HTTP/2 should generally be used for upstream clusters doing gRPC. - message ExplicitHttpConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig"; - - oneof protocol_config { - option (validate.required) = true; - - config.core.v4alpha.Http1ProtocolOptions http_protocol_options = 1; - - config.core.v4alpha.Http2ProtocolOptions http2_protocol_options = 2; - } - } - - // If this is used, the cluster can use either of the configured protocols, and - // will use whichever protocol was used by the downstream connection. - message UseDownstreamHttpConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig"; - - config.core.v4alpha.Http1ProtocolOptions http_protocol_options = 1; - - config.core.v4alpha.Http2ProtocolOptions http2_protocol_options = 2; - } - - // If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever - // protocol is negotiated by ALPN with the upstream. - // Clusters configured with *AutoHttpConfig* will use the highest available - // protocol; HTTP/2 if supported, otherwise HTTP/1. - // If the upstream does not support ALPN, *AutoHttpConfig* will fail over to HTTP/1. - // This can only be used with transport sockets which support ALPN. Using a - // transport socket which does not support ALPN will result in configuration - // failure. The transport layer may be configured with custom ALPN, but the default ALPN - // for the cluster (or if custom ALPN fails) will be "h2,http/1.1". - message AutoHttpConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig"; - - config.core.v4alpha.Http1ProtocolOptions http_protocol_options = 1; - - config.core.v4alpha.Http2ProtocolOptions http2_protocol_options = 2; - } - - // This contains options common across HTTP/1 and HTTP/2 - config.core.v4alpha.HttpProtocolOptions common_http_protocol_options = 1; - - // This contains common protocol options which are only applied upstream. - config.core.v4alpha.UpstreamHttpProtocolOptions upstream_http_protocol_options = 2; - - // This controls the actual protocol to be used upstream. - oneof upstream_protocol_options { - option (validate.required) = true; - - // To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use *explicit_http_config*. - // If the *explicit_http_config* is empty, HTTP/1.1 is used. - ExplicitHttpConfig explicit_http_config = 3; - - // This allows switching on protocol based on what protocol the downstream - // connection used. - UseDownstreamHttpConfig use_downstream_protocol_config = 4; - - // This allows switching on protocol based on ALPN - AutoHttpConfig auto_config = 5; - } -} diff --git a/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto b/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto index 5754491b91..d9bf119256 100644 --- a/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto +++ b/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.extensions.upstreams.tcp.generic.v3"; option java_outer_classname = "GenericConnectionPoolProtoOuterClass"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/tcp/generic/v3;genericv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Generic Connection Pool] diff --git a/api/envoy/extensions/wasm/v3/wasm.proto b/api/envoy/extensions/wasm/v3/wasm.proto index c6affb8106..9193aa3562 100644 --- a/api/envoy/extensions/wasm/v3/wasm.proto +++ b/api/envoy/extensions/wasm/v3/wasm.proto @@ -7,25 +7,47 @@ import "envoy/config/core/v3/base.proto"; import "google/protobuf/any.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.extensions.wasm.v3"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/wasm/v3;wasmv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Wasm] // [#extension: envoy.bootstrap.wasm] +// Configuration for restricting Proxy-Wasm capabilities available to modules. +message CapabilityRestrictionConfig { + // The Proxy-Wasm capabilities which will be allowed. Capabilities are mapped by + // name. The *SanitizationConfig* which each capability maps to is currently unimplemented and ignored, + // and so should be left empty. + // + // The capability names are given in the + // `Proxy-Wasm ABI `_. + // Additionally, the following WASI capabilities from + // `this list `_ + // are implemented and can be allowed: + // *fd_write*, *fd_read*, *fd_seek*, *fd_close*, *fd_fdstat_get*, *environ_get*, *environ_sizes_get*, + // *args_get*, *args_sizes_get*, *proc_exit*, *clock_time_get*, *random_get*. + map allowed_capabilities = 1; +} + +// Configuration for sanitization of inputs to an allowed capability. +// +// NOTE: This is currently unimplemented. +message SanitizationConfig { +} + // Configuration for a Wasm VM. -// [#next-free-field: 7] +// [#next-free-field: 8] message VmConfig { // An ID which will be used along with a hash of the wasm code (or the name of the registered Null // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can // reduce memory utilization and make sharing of data easier which may have security implications. - // See ref: "TODO: add ref" for details. + // [#comment: TODO: add ref for details.] string vm_id = 1; // The Wasm runtime type. @@ -41,6 +63,11 @@ message VmConfig { // // **envoy.wasm.runtime.v8**: `V8 `_-based WebAssembly runtime. // + // .. _extension_envoy.wasm.runtime.wamr: + // + // **envoy.wasm.runtime.wamr**: `WAMR `_-based WebAssembly runtime. + // This runtime is not enabled in the official build. + // // .. _extension_envoy.wasm.runtime.wavm: // // **envoy.wasm.runtime.wavm**: `WAVM `_-based WebAssembly runtime. @@ -51,6 +78,7 @@ message VmConfig { // **envoy.wasm.runtime.wasmtime**: `Wasmtime `_-based WebAssembly runtime. // This runtime is not enabled in the official build. // + // [#extension-category: envoy.wasm.runtime] string runtime = 2 [(validate.rules).string = {min_len: 1}]; // The Wasm code that Envoy will execute. @@ -71,10 +99,26 @@ message VmConfig { // update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter // warming state. bool nack_on_code_cache_miss = 6; + + // Specifies environment variables to be injected to this VM which will be available through + // WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions are mostly implicitly + // called in your language's standard library, so you do not need to call them directly and you can access to env + // vars just like when you do on native platforms. + // Warning: Envoy rejects the configuration if there's conflict of key space. + EnvironmentVariables environment_variables = 7; +} + +message EnvironmentVariables { + // The keys of *Envoy's* environment variables exposed to this VM. In other words, if a key exists in Envoy's environment + // variables, then that key-value pair will be injected. Note that if a key does not exist, it will be ignored. + repeated string host_env_keys = 1; + + // Explicitly given key-value pairs to be injected to this VM in the form of "KEY=VALUE". + map key_values = 2; } // Base Configuration for Wasm Plugins e.g. filters and services. -// [#next-free-field: 6] +// [#next-free-field: 7] message PluginConfig { // A unique name for a filters/services in a VM for use in identifying the filter/service if // multiple filters/services are handled by the same *vm_id* and *root_id* and for @@ -105,6 +149,9 @@ message PluginConfig { // during xDS updates the xDS configuration will be rejected and when on_start or on_configuration return false on initial // startup the proxy will not start. bool fail_open = 5; + + // Configuration for restricting Proxy-Wasm capabilities available to modules. + CapabilityRestrictionConfig capability_restriction_config = 6; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`WasmService diff --git a/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.proto b/api/envoy/extensions/watchdog/profile_action/v3/profile_action.proto similarity index 83% rename from api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.proto rename to api/envoy/extensions/watchdog/profile_action/v3/profile_action.proto index fb23690891..dec616c12f 100644 --- a/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.proto +++ b/api/envoy/extensions/watchdog/profile_action/v3/profile_action.proto @@ -1,17 +1,16 @@ syntax = "proto3"; -package envoy.extensions.watchdog.profile_action.v3alpha; +package envoy.extensions.watchdog.profile_action.v3; import "google/protobuf/duration.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.watchdog.profile_action.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.watchdog.profile_action.v3"; option java_outer_classname = "ProfileActionProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/watchdog/profile_action/v3;profile_actionv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Watchdog Action that does CPU profiling.] diff --git a/api/envoy/service/accesslog/v2/als.proto b/api/envoy/service/accesslog/v2/als.proto index bbd871ff83..2e9631da90 100644 --- a/api/envoy/service/accesslog/v2/als.proto +++ b/api/envoy/service/accesslog/v2/als.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.accesslog.v2"; option java_outer_classname = "AlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/accesslog/v2;accesslogv2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/accesslog/v3/als.proto b/api/envoy/service/accesslog/v3/als.proto index 5421c23049..1497eb3538 100644 --- a/api/envoy/service/accesslog/v3/als.proto +++ b/api/envoy/service/accesslog/v3/als.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.accesslog.v3"; option java_outer_classname = "AlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/accesslog/v3;accesslogv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -49,7 +50,7 @@ message StreamAccessLogsMessage { config.core.v3.Node node = 1 [(validate.rules).message = {required: true}]; // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig - // `. + // `. string log_name = 2 [(validate.rules).string = {min_len: 1}]; } diff --git a/api/envoy/service/accesslog/v4alpha/als.proto b/api/envoy/service/accesslog/v4alpha/als.proto deleted file mode 100644 index e2c8bbbc80..0000000000 --- a/api/envoy/service/accesslog/v4alpha/als.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; - -package envoy.service.accesslog.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v3/accesslog.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.accesslog.v4alpha"; -option java_outer_classname = "AlsProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC Access Log Service (ALS)] - -// Service for streaming access logs from Envoy to an access log server. -service AccessLogService { - // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different - // API for "critical" access logs in which Envoy will buffer access logs for some period of time - // until it gets an ACK so it could then retry. This API is designed for high throughput with the - // expectation that it might be lossy. - rpc StreamAccessLogs(stream StreamAccessLogsMessage) returns (StreamAccessLogsResponse) { - } -} - -// Empty response for the StreamAccessLogs API. Will never be sent. See below. -message StreamAccessLogsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v3.StreamAccessLogsResponse"; -} - -// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream -// access logs without ever expecting a response. -message StreamAccessLogsMessage { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v3.StreamAccessLogsMessage"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v3.StreamAccessLogsMessage.Identifier"; - - // The node sending the access log messages over the stream. - config.core.v4alpha.Node node = 1 [(validate.rules).message = {required: true}]; - - // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig - // `. - string log_name = 2 [(validate.rules).string = {min_len: 1}]; - } - - // Wrapper for batches of HTTP access log entries. - message HTTPAccessLogEntries { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - - repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 - [(validate.rules).repeated = {min_items: 1}]; - } - - // Wrapper for batches of TCP access log entries. - message TCPAccessLogEntries { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - - repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 - [(validate.rules).repeated = {min_items: 1}]; - } - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier identifier = 1; - - // Batches of log entries of a single type. Generally speaking, a given stream should only - // ever include one type of log entry. - oneof log_entries { - option (validate.required) = true; - - HTTPAccessLogEntries http_logs = 2; - - TCPAccessLogEntries tcp_logs = 3; - } -} diff --git a/api/envoy/service/auth/v2/attribute_context.proto b/api/envoy/service/auth/v2/attribute_context.proto index 16ac3ee23d..cf5cda3b14 100644 --- a/api/envoy/service/auth/v2/attribute_context.proto +++ b/api/envoy/service/auth/v2/attribute_context.proto @@ -12,6 +12,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.service.auth.v2"; option java_outer_classname = "AttributeContextProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2;authv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Attribute Context ] @@ -110,7 +111,9 @@ message AttributeContext { // The HTTP request `Host` or 'Authority` header value. string host = 5; - // The HTTP URL scheme, such as `http` and `https`. + // The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2 + // requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup + // the scheme of the request. string scheme = 6; // This field is always empty, and exists for compatibility reasons. The HTTP URL query is diff --git a/api/envoy/service/auth/v2/external_auth.proto b/api/envoy/service/auth/v2/external_auth.proto index 7dbfd35569..e3be9de493 100644 --- a/api/envoy/service/auth/v2/external_auth.proto +++ b/api/envoy/service/auth/v2/external_auth.proto @@ -14,6 +14,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.auth.v2"; option java_outer_classname = "ExternalAuthProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2;authv2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/auth/v2alpha/external_auth.proto b/api/envoy/service/auth/v2alpha/external_auth.proto index 2089834863..4d6b68a8c1 100644 --- a/api/envoy/service/auth/v2alpha/external_auth.proto +++ b/api/envoy/service/auth/v2alpha/external_auth.proto @@ -2,15 +2,13 @@ syntax = "proto3"; package envoy.service.auth.v2alpha; -import "envoy/service/auth/v2/external_auth.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.auth.v2alpha"; -option java_outer_classname = "ExternalAuthProto"; option java_multiple_files = true; option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = FROZEN; +option java_outer_classname = "CertsProto"; +option java_package = "io.envoyproxy.envoy.service.auth.v2alpha"; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha"; + +import "envoy/service/auth/v2/external_auth.proto"; // [#protodoc-title: Authorization Service ] @@ -22,6 +20,5 @@ option (udpa.annotations.file_status).package_version_status = FROZEN; service Authorization { // Performs authorization check based on the attributes associated with the // incoming request, and returns status `OK` or not `OK`. - rpc Check(v2.CheckRequest) returns (v2.CheckResponse) { - } + rpc Check(v2.CheckRequest) returns (v2.CheckResponse); } diff --git a/api/envoy/service/auth/v3/attribute_context.proto b/api/envoy/service/auth/v3/attribute_context.proto index cdf3ee9f96..ec9bba49c0 100644 --- a/api/envoy/service/auth/v3/attribute_context.proto +++ b/api/envoy/service/auth/v3/attribute_context.proto @@ -13,6 +13,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.auth.v3"; option java_outer_classname = "AttributeContextProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v3;authv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Attribute Context ] @@ -148,7 +149,7 @@ message AttributeContext { // The HTTP request body in bytes. This is used instead of // :ref:`body ` when - // :ref:`pack_as_bytes ` + // :ref:`pack_as_bytes ` // is set to true. bytes raw_body = 12; } diff --git a/api/envoy/service/auth/v3/external_auth.proto b/api/envoy/service/auth/v3/external_auth.proto index 3d510c211b..66d8daf228 100644 --- a/api/envoy/service/auth/v3/external_auth.proto +++ b/api/envoy/service/auth/v3/external_auth.proto @@ -9,13 +9,14 @@ import "envoy/type/v3/http_status.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.auth.v3"; option java_outer_classname = "ExternalAuthProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v3;authv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -27,24 +28,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // A generic interface for performing authorization check on incoming // requests to a networked service. service Authorization { - // For v2alpha to work as expected, we need to convince - // proto_sync.py that the v2alpha package is the previous version of - // either this package or the v2 package. And to do that, you'd - // "normally" use the - // "(udpa.annotations.versioning).previous_message_type" option; but - // we don't have a 'message' to put it on, we only have a 'service'. - // Fortunately, proto_sync.py's parser is sloppy, and we can fool it - // with a comment: - // - // previous_message_type = "envoy.service.auth.v2alpha.Authorization"; - // - // Now, we'd also "normally" do that in the v2 package, not here. - // But, because the v2alpha package imports the v2 package, that'd - // cause a cycle. - // - // The lesson is that the "have v2alpha be an alias for v2 instead - // of duplicating the files" thing we did was a bad thing to do. - // Performs authorization check based on the attributes associated with the // incoming request, and returns status `OK` or not `OK`. rpc Check(CheckRequest) returns (CheckResponse) { @@ -63,12 +46,12 @@ message DeniedHttpResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.auth.v2.DeniedHttpResponse"; - // This field allows the authorization service to send a HTTP response status - // code to the downstream client other than 403 (Forbidden). - type.v3.HttpStatus status = 1 [(validate.rules).message = {required: true}]; + // This field allows the authorization service to send an HTTP response status code to the + // downstream client. If not set, Envoy sends ``403 Forbidden`` HTTP status code by default. + type.v3.HttpStatus status = 1; // This field allows the authorization service to send HTTP response headers - // to the downstream client. Note that the `append` field in `HeaderValueOption` defaults to + // to the downstream client. Note that the :ref:`append field in HeaderValueOption ` defaults to // false when used in this message. repeated config.core.v3.HeaderValueOption headers = 2; @@ -78,14 +61,14 @@ message DeniedHttpResponse { } // HTTP attributes for an OK response. -// [#next-free-field: 6] +// [#next-free-field: 9] message OkHttpResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.auth.v2.OkHttpResponse"; // 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. Note that the `append` field in `HeaderValueOption` defaults to + // dispatching it to the upstream. Note that the :ref:`append field in HeaderValueOption ` defaults to // false when used in this message. By setting the `append` field to `true`, // the filter will append the correspondent header value to the matched request header. // By leaving `append` as false, the filter will either add a new header, or override an existing @@ -113,7 +96,22 @@ message OkHttpResponse { // `. Until it is removed, // setting this field overrides :ref:`CheckResponse.dynamic_metadata // `. - google.protobuf.Struct dynamic_metadata = 3 [deprecated = true]; + google.protobuf.Struct dynamic_metadata = 3 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // This field allows the authorization service to send HTTP response headers + // to the downstream client on success. Note that the :ref:`append field in HeaderValueOption ` + // defaults to false when used in this message. + repeated config.core.v3.HeaderValueOption response_headers_to_add = 6; + + // This field allows the authorization service to set (and overwrite) query + // string parameters on the original request before it is sent upstream. + repeated config.core.v3.QueryParameter query_parameters_to_set = 7; + + // This field allows the authorization service to specify which query parameters + // should be removed from the original request before it is sent upstream. Each + // element in this list is a case-sensitive query parameter name to be removed. + repeated string query_parameters_to_remove = 8; } // Intended for gRPC and Network Authorization servers `only`. @@ -121,7 +119,9 @@ message CheckResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.auth.v2.CheckResponse"; - // Status `OK` allows the request. Any other status indicates the request should be denied. + // Status `OK` allows the request. Any other status indicates the request should be denied, and + // for HTTP filter, if not overridden by :ref:`denied HTTP response status ` + // Envoy sends ``403 Forbidden`` HTTP status code by default. google.rpc.Status status = 1; // An message that contains HTTP response attributes. This message is diff --git a/api/envoy/service/auth/v4alpha/attribute_context.proto b/api/envoy/service/auth/v4alpha/attribute_context.proto deleted file mode 100644 index a1bf9c9c62..0000000000 --- a/api/envoy/service/auth/v4alpha/attribute_context.proto +++ /dev/null @@ -1,177 +0,0 @@ -syntax = "proto3"; - -package envoy.service.auth.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.auth.v4alpha"; -option java_outer_classname = "AttributeContextProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Attribute Context ] - -// See :ref:`network filter configuration overview ` -// and :ref:`HTTP filter configuration overview `. - -// 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. -// [#comment: The following items are left out of this proto -// Request.Auth field for jwt tokens -// Request.Api for api management -// Origin peer that originated the request -// Caching Protocol -// request_context return values to inject back into the filter chain -// peer.claims -- from X.509 extensions -// Configuration -// - field mask to send -// - which return values from request_context are copied back -// - which return values are copied into request_headers] -// [#next-free-field: 12] -message AttributeContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v3.AttributeContext"; - - // 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. - // [#next-free-field: 6] - message Peer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v3.AttributeContext.Peer"; - - // The address of the peer, this is typically the IP address. - // It can also be UDS path, or others. - config.core.v4alpha.Address address = 1; - - // 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. - string service = 2; - - // 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. - map labels = 3; - - // 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 - // `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order. - // 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}` - string principal = 4; - - // The X.509 certificate used to authenticate the identify of this peer. - // When present, the certificate contents are encoded in URL and PEM format. - string certificate = 5; - } - - // Represents a network request, such as an HTTP request. - message Request { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v3.AttributeContext.Request"; - - // The timestamp when the proxy receives the first byte of the request. - google.protobuf.Timestamp time = 1; - - // Represents an HTTP request or an HTTP-like request. - HttpRequest http = 2; - } - - // This message defines attributes for an HTTP request. - // HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests. - // [#next-free-field: 13] - message HttpRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v3.AttributeContext.HttpRequest"; - - // 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. - string id = 1; - - // The HTTP request method, such as `GET`, `POST`. - string method = 2; - - // 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 - // lower-cased, because HTTP header keys are case-insensitive. - map headers = 3; - - // 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. - string path = 4; - - // The HTTP request `Host` or 'Authority` header value. - string host = 5; - - // The HTTP URL scheme, such as `http` and `https`. - string scheme = 6; - - // This field is always empty, and exists for compatibility reasons. The HTTP URL query is - // included in `path` field. - string query = 7; - - // This field is always empty, and exists for compatibility reasons. The URL fragment is - // not submitted as part of HTTP requests; it is unknowable. - string fragment = 8; - - // The HTTP request size in bytes. If unknown, it must be -1. - int64 size = 9; - - // 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. - string protocol = 10; - - // The HTTP request body. - string body = 11; - - // The HTTP request body in bytes. This is used instead of - // :ref:`body ` when - // :ref:`pack_as_bytes ` - // is set to true. - bytes raw_body = 12; - } - - // 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. - Peer source = 1; - - // 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. - Peer destination = 2; - - // Represents a network request, such as an HTTP request. - Request request = 4; - - // 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. - map context_extensions = 10; - - // Dynamic metadata associated with the request. - config.core.v4alpha.Metadata metadata_context = 11; -} diff --git a/api/envoy/service/auth/v4alpha/external_auth.proto b/api/envoy/service/auth/v4alpha/external_auth.proto deleted file mode 100644 index b6aa999aab..0000000000 --- a/api/envoy/service/auth/v4alpha/external_auth.proto +++ /dev/null @@ -1,143 +0,0 @@ -syntax = "proto3"; - -package envoy.service.auth.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/service/auth/v4alpha/attribute_context.proto"; -import "envoy/type/v3/http_status.proto"; - -import "google/protobuf/struct.proto"; -import "google/rpc/status.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.auth.v4alpha"; -option java_outer_classname = "ExternalAuthProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Authorization Service ] - -// The authorization service request messages used by external authorization :ref:`network filter -// ` and :ref:`HTTP filter `. - -// A generic interface for performing authorization check on incoming -// requests to a networked service. -service Authorization { - // For v2alpha to work as expected, we need to convince - // proto_sync.py that the v2alpha package is the previous version of - // either this package or the v2 package. And to do that, you'd - // "normally" use the - // "(udpa.annotations.versioning).previous_message_type" option; but - // we don't have a 'message' to put it on, we only have a 'service'. - // Fortunately, proto_sync.py's parser is sloppy, and we can fool it - // with a comment: - // - // previous_message_type = "envoy.service.auth.v2alpha.Authorization"; - // - // Now, we'd also "normally" do that in the v2 package, not here. - // But, because the v2alpha package imports the v2 package, that'd - // cause a cycle. - // - // The lesson is that the "have v2alpha be an alias for v2 instead - // of duplicating the files" thing we did was a bad thing to do. - - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. - rpc Check(CheckRequest) returns (CheckResponse) { - } -} - -message CheckRequest { - option (udpa.annotations.versioning).previous_message_type = "envoy.service.auth.v3.CheckRequest"; - - // The request attributes. - AttributeContext attributes = 1; -} - -// HTTP attributes for a denied response. -message DeniedHttpResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v3.DeniedHttpResponse"; - - // This field allows the authorization service to send a HTTP response status - // code to the downstream client other than 403 (Forbidden). - type.v3.HttpStatus status = 1 [(validate.rules).message = {required: true}]; - - // This field allows the authorization service to send HTTP response headers - // to the downstream client. Note that the `append` field in `HeaderValueOption` defaults to - // false when used in this message. - repeated config.core.v4alpha.HeaderValueOption headers = 2; - - // This field allows the authorization service to send a response body data - // to the downstream client. - string body = 3; -} - -// HTTP attributes for an OK response. -// [#next-free-field: 6] -message OkHttpResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v3.OkHttpResponse"; - - reserved 3; - - reserved "dynamic_metadata"; - - // 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. Note that the `append` field in `HeaderValueOption` defaults to - // false when used in this message. By setting the `append` field to `true`, - // the filter will append the correspondent header value to the matched request header. - // By leaving `append` as false, the filter will either add a new header, or override an existing - // one if there is a match. - repeated config.core.v4alpha.HeaderValueOption headers = 2; - - // HTTP entity headers to remove from the original request before dispatching - // it to the upstream. This allows the authorization service to act on auth - // related headers (like `Authorization`), process them, and consume them. - // Under this model, the upstream will either receive the request (if it's - // authorized) or not receive it (if it's not), but will not see headers - // containing authorization credentials. - // - // Pseudo headers (such as `:authority`, `:method`, `:path` etc), as well as - // the header `Host`, may not be removed as that would make the request - // malformed. If mentioned in `headers_to_remove` these special headers will - // be ignored. - // - // When using the HTTP service this must instead be set by the HTTP - // authorization service as a comma separated list like so: - // ``x-envoy-auth-headers-to-remove: one-auth-header, another-auth-header``. - repeated string headers_to_remove = 5; -} - -// Intended for gRPC and Network Authorization servers `only`. -message CheckResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v3.CheckResponse"; - - // Status `OK` allows the request. Any other status indicates the request should be denied. - google.rpc.Status status = 1; - - // 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. - oneof http_response { - // Supplies http attributes for a denied response. - DeniedHttpResponse denied_response = 2; - - // Supplies http attributes for an ok response. - OkHttpResponse ok_response = 3; - } - - // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next - // filter. This metadata lives in a namespace specified by the canonical name of extension filter - // that requires it: - // - // - :ref:`envoy.filters.http.ext_authz ` for HTTP filter. - // - :ref:`envoy.filters.network.ext_authz ` for network filter. - google.protobuf.Struct dynamic_metadata = 4; -} diff --git a/api/envoy/service/cluster/v3/cds.proto b/api/envoy/service/cluster/v3/cds.proto index 100ecad39a..dbace7a7e1 100644 --- a/api/envoy/service/cluster/v3/cds.proto +++ b/api/envoy/service/cluster/v3/cds.proto @@ -13,6 +13,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.cluster.v3"; option java_outer_classname = "CdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/cluster/v3;clusterv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/discovery/v2/ads.proto b/api/envoy/service/discovery/v2/ads.proto index d70e0cdc8e..1da1606bf6 100644 --- a/api/envoy/service/discovery/v2/ads.proto +++ b/api/envoy/service/discovery/v2/ads.proto @@ -9,17 +9,18 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.service.discovery.v2"; option java_outer_classname = "AdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Aggregated Discovery Service (ADS)] -// [#not-implemented-hide:] Discovery services for endpoints, clusters, routes, +// Discovery services for endpoints, clusters, routes, // and listeners are retained in the package `envoy.api.v2` for backwards // compatibility with existing management servers. New development in discovery // services should proceed in the package `envoy.service.discovery.v2`. -// See https://github.com/lyft/envoy-api#apis for a description of the role of +// See https://github.com/envoyproxy/envoy-api#apis for a description of the role of // ADS and how it is intended to be used by a management server. ADS requests // have the same structure as their singleton xDS counterparts, but can // multiplex many resource types on a single stream. The type_url in the diff --git a/api/envoy/service/discovery/v2/hds.proto b/api/envoy/service/discovery/v2/hds.proto index 76f91c5a45..dcc3708ac3 100644 --- a/api/envoy/service/discovery/v2/hds.proto +++ b/api/envoy/service/discovery/v2/hds.proto @@ -15,6 +15,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.service.discovery.v2"; option java_outer_classname = "HdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.health.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/discovery/v2/rtds.proto b/api/envoy/service/discovery/v2/rtds.proto index 713ac27707..844ea771a9 100644 --- a/api/envoy/service/discovery/v2/rtds.proto +++ b/api/envoy/service/discovery/v2/rtds.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.discovery.v2"; option java_outer_classname = "RtdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.runtime.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/discovery/v2/sds.proto b/api/envoy/service/discovery/v2/sds.proto index 4d01d475c5..d7a30dad40 100644 --- a/api/envoy/service/discovery/v2/sds.proto +++ b/api/envoy/service/discovery/v2/sds.proto @@ -13,6 +13,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.service.discovery.v2"; option java_outer_classname = "SdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.secret.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/discovery/v3/ads.proto b/api/envoy/service/discovery/v3/ads.proto index 03021559ab..2a07622714 100644 --- a/api/envoy/service/discovery/v3/ads.proto +++ b/api/envoy/service/discovery/v3/ads.proto @@ -10,17 +10,18 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.discovery.v3"; option java_outer_classname = "AdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3;discoveryv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Aggregated Discovery Service (ADS)] -// [#not-implemented-hide:] Discovery services for endpoints, clusters, routes, +// Discovery services for endpoints, clusters, routes, // and listeners are retained in the package `envoy.api.v2` for backwards // compatibility with existing management servers. New development in discovery // services should proceed in the package `envoy.service.discovery.v2`. -// See https://github.com/lyft/envoy-api#apis for a description of the role of +// See https://github.com/envoyproxy/envoy-api#apis for a description of the role of // ADS and how it is intended to be used by a management server. ADS requests // have the same structure as their singleton xDS counterparts, but can // multiplex many resource types on a single stream. The type_url in the diff --git a/api/envoy/service/discovery/v3/discovery.proto b/api/envoy/service/discovery/v3/discovery.proto index b61da97413..7d937f9320 100644 --- a/api/envoy/service/discovery/v3/discovery.proto +++ b/api/envoy/service/discovery/v3/discovery.proto @@ -8,13 +8,13 @@ import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/rpc/status.proto"; -import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.discovery.v3"; option java_outer_classname = "DiscoveryProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3;discoveryv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Common discovery API components] @@ -58,7 +58,7 @@ message DiscoveryRequest { // delta, where it is populated only for new explicit ACKs). string response_nonce = 5; - // This is populated when the previous :ref:`DiscoveryResponse ` + // 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. @@ -105,7 +105,6 @@ message DiscoveryResponse { // required for non-stream based xDS implementations. string nonce = 5; - // [#not-implemented-hide:] // The control plane instance that sent the response. config.core.v3.ControlPlane control_plane = 6; } @@ -197,13 +196,13 @@ message DeltaDiscoveryRequest { // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. string response_nonce = 6; - // This is populated when the previous :ref:`DiscoveryResponse ` + // 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. google.rpc.Status error_detail = 7; } -// [#next-free-field: 7] +// [#next-free-field: 8] message DeltaDiscoveryResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.DeltaDiscoveryResponse"; @@ -228,6 +227,10 @@ message DeltaDiscoveryResponse { // The nonce provides a way for DeltaDiscoveryRequests to uniquely // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. string nonce = 5; + + // [#not-implemented-hide:] + // The control plane instance that sent the response. + config.core.v3.ControlPlane control_plane = 7; } // [#next-free-field: 8] diff --git a/api/envoy/service/discovery/v4alpha/ads.proto b/api/envoy/service/discovery/v4alpha/ads.proto deleted file mode 100644 index 41435811bd..0000000000 --- a/api/envoy/service/discovery/v4alpha/ads.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v4alpha; - -import "envoy/service/discovery/v4alpha/discovery.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v4alpha"; -option java_outer_classname = "AdsProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Aggregated Discovery Service (ADS)] - -// [#not-implemented-hide:] Discovery services for endpoints, clusters, routes, -// and listeners are retained in the package `envoy.api.v2` for backwards -// compatibility with existing management servers. New development in discovery -// services should proceed in the package `envoy.service.discovery.v2`. - -// See https://github.com/lyft/envoy-api#apis for a description of the role of -// ADS and how it is intended to be used by a management server. ADS requests -// have the same structure as their singleton xDS counterparts, but can -// multiplex many resource types on a single stream. The type_url in the -// DiscoveryRequest/DiscoveryResponse provides sufficient information to recover -// the multiplexed singleton APIs at the Envoy instance and management server. -service AggregatedDiscoveryService { - // This is a gRPC-only API. - rpc StreamAggregatedResources(stream DiscoveryRequest) returns (stream DiscoveryResponse) { - } - - rpc DeltaAggregatedResources(stream DeltaDiscoveryRequest) - returns (stream DeltaDiscoveryResponse) { - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message AdsDummy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v3.AdsDummy"; -} diff --git a/api/envoy/service/discovery/v4alpha/discovery.proto b/api/envoy/service/discovery/v4alpha/discovery.proto deleted file mode 100644 index f292718a17..0000000000 --- a/api/envoy/service/discovery/v4alpha/discovery.proto +++ /dev/null @@ -1,283 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/rpc/status.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v4alpha"; -option java_outer_classname = "DiscoveryProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Common discovery API components] - -// A DiscoveryRequest requests a set of versioned resources of the same type for -// a given Envoy node on some API. -// [#next-free-field: 7] -message DiscoveryRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v3.DiscoveryRequest"; - - // 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. - string version_info = 1; - - // The node making the request. - config.core.v4alpha.Node node = 2; - - // List of resources to subscribe to, e.g. list of cluster names or a route - // configuration name. If this is empty, all resources for the API are - // returned. LDS/CDS may have empty resource_names, which will cause all - // resources for the Envoy instance to be returned. The LDS and CDS responses - // will then imply a number of resources that need to be fetched via EDS/RDS, - // which will be explicitly enumerated in resource_names. - repeated string resource_names = 3; - - // 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. - string type_url = 4; - - // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above - // discussion on version_info and the DiscoveryResponse nonce comment. This - // may be empty only if 1) this is a non-persistent-stream xDS such as HTTP, - // or 2) the client has not yet accepted an update in this xDS stream (unlike - // delta, where it is populated only for new explicit ACKs). - string response_nonce = 5; - - // 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. - google.rpc.Status error_detail = 6; -} - -// [#next-free-field: 7] -message DiscoveryResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v3.DiscoveryResponse"; - - // The version of the response data. - string version_info = 1; - - // The response resources. These resources are typed and depend on the API being called. - repeated google.protobuf.Any resources = 2; - - // [#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. - bool canary = 3; - - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the 'resources' repeated Any (if non-empty). - string type_url = 4; - - // 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. - string nonce = 5; - - // [#not-implemented-hide:] - // The control plane instance that sent the response. - config.core.v4alpha.ControlPlane control_plane = 6; -} - -// DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC -// endpoint for Delta xDS. -// -// With Delta xDS, the DeltaDiscoveryResponses do not need to include a full -// snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a -// diff to the state of a xDS client. -// In Delta XDS there are per-resource versions, which allow tracking state at -// the resource granularity. -// An xDS Delta session is always in the context of a gRPC bidirectional -// stream. This allows the xDS server to keep track of the state of xDS clients -// connected to it. -// -// In Delta xDS the nonce field is required and used to pair -// DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK. -// Optionally, a response message level system_version_info is present for -// debugging purposes only. -// -// DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest -// can be either or both of: [1] informing the server of what resources the -// client has gained/lost interest in (using resource_names_subscribe and -// resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from -// the server (using response_nonce, with presence of error_detail making it a NACK). -// Additionally, the first message (for a given type_url) of a reconnected gRPC stream -// has a third role: informing the server of the resources (and their versions) -// that the client already possesses, using the initial_resource_versions field. -// -// As with state-of-the-world, when multiple resource types are multiplexed (ADS), -// all requests/acknowledgments/updates are logically walled off by type_url: -// a Cluster ACK exists in a completely separate world from a prior Route NACK. -// In particular, initial_resource_versions being sent at the "start" of every -// gRPC stream actually entails a message for each type_url, each with its own -// initial_resource_versions. -// [#next-free-field: 8] -message DeltaDiscoveryRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v3.DeltaDiscoveryRequest"; - - // The node making the request. - config.core.v4alpha.Node node = 1; - - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This does not need to be set if - // resources are only referenced via *xds_resource_subscribe* and - // *xds_resources_unsubscribe*. - string type_url = 2; - - // DeltaDiscoveryRequests allow the client to add or remove individual - // resources to the set of tracked resources in the context of a stream. - // All resource names in the resource_names_subscribe list are added to the - // set of tracked resources and all resource names in the resource_names_unsubscribe - // list are removed from the set of tracked resources. - // - // *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or - // resource_names_unsubscribe list simply means that no resources are to be - // added or removed to the resource list. - // *Like* state-of-the-world xDS, the server must send updates for all tracked - // resources, but can also send updates for resources the client has not subscribed to. - // - // NOTE: the server must respond with all resources listed in resource_names_subscribe, - // even if it believes the client has the most recent version of them. The reason: - // the client may have dropped them, but then regained interest before it had a chance - // to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. - // - // These two fields can be set in any DeltaDiscoveryRequest, including ACKs - // and initial_resource_versions. - // - // A list of Resource names to add to the list of tracked resources. - repeated string resource_names_subscribe = 3; - - // A list of Resource names to remove from the list of tracked resources. - repeated string resource_names_unsubscribe = 4; - - // Informs the server of the versions of the resources the xDS client knows of, to enable the - // client to continue the same logical xDS session even in the face of gRPC stream reconnection. - // It will not be populated: [1] in the very first stream of a session, since the client will - // not yet have any resources, [2] in any message after the first in a stream (for a given - // type_url), since the server will already be correctly tracking the client's state. - // (In ADS, the first message *of each type_url* of a reconnected stream populates this map.) - // The map's keys are names of xDS resources known to the xDS client. - // The map's values are opaque resource versions. - map initial_resource_versions = 5; - - // When the DeltaDiscoveryRequest is a ACK or NACK message in response - // to a previous DeltaDiscoveryResponse, the response_nonce must be the - // nonce in the DeltaDiscoveryResponse. - // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. - string response_nonce = 6; - - // 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. - google.rpc.Status error_detail = 7; -} - -// [#next-free-field: 7] -message DeltaDiscoveryResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v3.DeltaDiscoveryResponse"; - - // The version of the response data (used for debugging). - string system_version_info = 1; - - // The response resources. These are typed resources, whose types must match - // the type_url field. - repeated Resource resources = 2; - - // field id 3 IS available! - - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty. - string type_url = 4; - - // Resources names of resources that have be deleted and to be removed from the xDS Client. - // Removed resources for missing resources can be ignored. - repeated string removed_resources = 6; - - // The nonce provides a way for DeltaDiscoveryRequests to uniquely - // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. - string nonce = 5; -} - -// [#next-free-field: 8] -message Resource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v3.Resource"; - - // Cache control properties for the resource. - // [#not-implemented-hide:] - message CacheControl { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v3.Resource.CacheControl"; - - // If true, xDS proxies may not cache this resource. - // Note that this does not apply to clients other than xDS proxies, which must cache resources - // for their own use, regardless of the value of this field. - bool do_not_cache = 1; - } - - // The resource's name, to distinguish it from others of the same type of resource. - string name = 3; - - // The aliases are a list of other names that this resource can go by. - repeated string aliases = 4; - - // The resource level version. It allows xDS to track the state of individual - // resources. - string version = 1; - - // The resource being tracked. - google.protobuf.Any resource = 2; - - // Time-to-live value for the resource. For each resource, a timer is started. The timer is - // reset each time the resource is received with a new TTL. If the resource is received with - // no TTL set, the timer is removed for the resource. Upon expiration of the timer, the - // configuration for the resource will be removed. - // - // The TTL can be refreshed or changed by sending a response that doesn't change the resource - // version. In this case the resource field does not need to be populated, which allows for - // light-weight "heartbeat" updates to keep a resource with a TTL alive. - // - // The TTL feature is meant to support configurations that should be removed in the event of - // a management server failure. For example, the feature may be used for fault injection - // testing where the fault injection should be terminated in the event that Envoy loses contact - // with the management server. - google.protobuf.Duration ttl = 6; - - // Cache control properties for the resource. - // [#not-implemented-hide:] - CacheControl cache_control = 7; -} diff --git a/api/envoy/service/endpoint/v3/eds.proto b/api/envoy/service/endpoint/v3/eds.proto index e1a8494afc..1b3868446e 100644 --- a/api/envoy/service/endpoint/v3/eds.proto +++ b/api/envoy/service/endpoint/v3/eds.proto @@ -5,17 +5,15 @@ package envoy.service.endpoint.v3; import "envoy/service/discovery/v3/discovery.proto"; import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; import "envoy/annotations/resource.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.endpoint.v3"; option java_outer_classname = "EdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3;endpointv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/endpoint/v3/leds.proto b/api/envoy/service/endpoint/v3/leds.proto new file mode 100644 index 0000000000..e712ae58c3 --- /dev/null +++ b/api/envoy/service/endpoint/v3/leds.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package envoy.service.endpoint.v3; + +import "envoy/service/discovery/v3/discovery.proto"; + +import "envoy/annotations/resource.proto"; +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.service.endpoint.v3"; +option java_outer_classname = "LedsProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3;endpointv3"; +option java_generic_services = true; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#not-implemented-hide:] +// [#protodoc-title: LEDS] +// Locality-Endpoint discovery +// [#comment:TODO(adisuissa): Link to unified matching docs: +// :ref:`architecture overview`] + +service LocalityEndpointDiscoveryService { + option (envoy.annotations.resource).type = "envoy.config.endpoint.v3.LbEndpoint"; + + // State-of-the-World (DiscoveryRequest) and REST are not supported. + + // The resource_names_subscribe resource_names_unsubscribe fields in DeltaDiscoveryRequest + // specify a list of glob collections to subscribe to updates for. + rpc DeltaLocalityEndpoints(stream discovery.v3.DeltaDiscoveryRequest) + returns (stream discovery.v3.DeltaDiscoveryResponse) { + } +} + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. +message LedsDummy { +} diff --git a/api/envoy/service/event_reporting/v2alpha/event_reporting_service.proto b/api/envoy/service/event_reporting/v2alpha/event_reporting_service.proto index 8d07f04640..6862cec0b3 100644 --- a/api/envoy/service/event_reporting/v2alpha/event_reporting_service.proto +++ b/api/envoy/service/event_reporting/v2alpha/event_reporting_service.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.event_reporting.v2alpha"; option java_outer_classname = "EventReportingServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/event_reporting/v2alpha"; option java_generic_services = true; option (udpa.annotations.file_migrate).move_to_package = "envoy.service.event_reporting.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/event_reporting/v3/event_reporting_service.proto b/api/envoy/service/event_reporting/v3/event_reporting_service.proto index 6f0b325902..372eb6399b 100644 --- a/api/envoy/service/event_reporting/v3/event_reporting_service.proto +++ b/api/envoy/service/event_reporting/v3/event_reporting_service.proto @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.event_reporting.v3"; option java_outer_classname = "EventReportingServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/event_reporting/v3;event_reportingv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -53,8 +54,8 @@ message StreamEventsRequest { // // The following events are supported: // - // * :ref:`HealthCheckEvent ` - // * :ref:`OutlierDetectionEvent ` + // * :ref:`HealthCheckEvent ` + // * :ref:`OutlierDetectionEvent ` repeated google.protobuf.Any events = 2 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/api/envoy/service/event_reporting/v4alpha/event_reporting_service.proto b/api/envoy/service/event_reporting/v4alpha/event_reporting_service.proto deleted file mode 100644 index 00755fddfa..0000000000 --- a/api/envoy/service/event_reporting/v4alpha/event_reporting_service.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package envoy.service.event_reporting.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.event_reporting.v4alpha"; -option java_outer_classname = "EventReportingServiceProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC Event Reporting Service] - -// [#not-implemented-hide:] -// Service for streaming different types of events from Envoy to a server. The examples of -// such events may be health check or outlier detection events. -service EventReportingService { - // Envoy will connect and send StreamEventsRequest messages forever. - // The management server may send StreamEventsResponse to configure event stream. See below. - // This API is designed for high throughput with the expectation that it might be lossy. - rpc StreamEvents(stream StreamEventsRequest) returns (stream StreamEventsResponse) { - } -} - -// [#not-implemented-hide:] -// An events envoy sends to the management server. -message StreamEventsRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.event_reporting.v3.StreamEventsRequest"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.event_reporting.v3.StreamEventsRequest.Identifier"; - - // The node sending the event messages over the stream. - config.core.v4alpha.Node node = 1 [(validate.rules).message = {required: true}]; - } - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier identifier = 1; - - // Batch of events. When the stream is already active, it will be the events occurred - // since the last message had been sent. If the server receives unknown event type, it should - // silently ignore it. - // - // The following events are supported: - // - // * :ref:`HealthCheckEvent ` - // * :ref:`OutlierDetectionEvent ` - repeated google.protobuf.Any events = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// [#not-implemented-hide:] -// The management server may send envoy a StreamEventsResponse to tell which events the server -// is interested in. In future, with aggregated event reporting service, this message will -// contain, for example, clusters the envoy should send events for, or event types the server -// wants to process. -message StreamEventsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.event_reporting.v3.StreamEventsResponse"; -} diff --git a/api/envoy/service/ext_proc/v3alpha/external_processor.proto b/api/envoy/service/ext_proc/v3/external_processor.proto similarity index 76% rename from api/envoy/service/ext_proc/v3alpha/external_processor.proto rename to api/envoy/service/ext_proc/v3/external_processor.proto index 5b0696bfc3..e2c658424d 100644 --- a/api/envoy/service/ext_proc/v3alpha/external_processor.proto +++ b/api/envoy/service/ext_proc/v3/external_processor.proto @@ -1,22 +1,25 @@ syntax = "proto3"; -package envoy.service.ext_proc.v3alpha; +package envoy.service.ext_proc.v3; import "envoy/config/core/v3/base.proto"; -import "envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.proto"; +import "envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto"; import "envoy/type/v3/http_status.proto"; import "google/protobuf/struct.proto"; +import "xds/annotations/v3/status.proto"; + import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.service.ext_proc.v3alpha"; +option java_package = "io.envoyproxy.envoy.service.ext_proc.v3"; option java_outer_classname = "ExternalProcessorProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/ext_proc/v3;ext_procv3"; option java_generic_services = true; -option (udpa.annotations.file_status).work_in_progress = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; // [#protodoc-title: External Processing Service] @@ -59,12 +62,16 @@ service ExternalProcessor { // [#next-free-field: 8] message ProcessingRequest { // Specify whether the filter that sent this request is running in synchronous - // or asynchronous mode. If false, then the server must either respond - // with exactly one ProcessingResponse message or close the stream. - // If true, however, then the server must not respond with - // an additional message, although it may still close the stream. - // The choice of synchronous or asynchronous mode can be chosen in the - // filter configuration. + // or asynchronous mode. The choice of synchronous or asynchronous mode + // can be set in the filter configuration, and defaults to false. + // + // * A value of "false" indicates that the server must respond + // to this message by either sending back a matching ProcessingResponse message, + // or by closing the stream. + // * A value of "true" indicates that the server must not respond to this + // message, although it may still close the stream to indicate that no more messages + // are needed. + // bool async_mode = 1; // Each request message will include one of the following sub-messages. Which @@ -74,29 +81,41 @@ message ProcessingRequest { option (validate.required) = true; // Information about the HTTP request headers, as well as peer info and additional - // properties. If "response_required" is set, the server must send back a + // properties. Unless "async_mode" is true, the server must send back a // HeaderResponse message, an ImmediateResponse message, or close the stream. HttpHeaders request_headers = 2; // Information about the HTTP response headers, as well as peer info and additional - // properties. If "response_required" is set, the server must send back a + // properties. Unless "async_mode" is true, the server must send back a // HeaderResponse message or close the stream. HttpHeaders response_headers = 3; - // A chunk of the HTTP request body. If "response_required" is set, the server must send back + // A chunk of the HTTP request body. Unless "async_mode" is true, the server must send back // a BodyResponse message, an ImmediateResponse message, or close the stream. HttpBody request_body = 4; - // A chunk of the HTTP request body. If "response_required" is set, the server must send back + // A chunk of the HTTP request body. Unless "async_mode" is true, the server must send back // a BodyResponse message or close the stream. HttpBody response_body = 5; - // The HTTP trailers for the request path. If "response_required" is set, the server + // The HTTP trailers for the request path. Unless "async_mode" is true, the server // must send back a TrailerResponse message or close the stream. + // + // This message is only sent if the trailers processing mode is set to "SEND". + // If there are no trailers on the original downstream request, then this message + // will only be sent (with empty trailers waiting to be populated) if the + // processing mode is set before the request headers are sent, such as + // in the filter configuration. HttpTrailers request_trailers = 6; - // The HTTP trailers for the response path. If "response_required" is set, the server + // The HTTP trailers for the response path. Unless "async_mode" is true, the server // must send back a TrailerResponse message or close the stream. + // + // This message is only sent if the trailers processing mode is set to "SEND". + // If there are no trailers on the original downstream request, then this message + // will only be sent (with empty trailers waiting to be populated) if the + // processing mode is set before the request headers are sent, such as + // in the filter configuration. HttpTrailers response_trailers = 7; } } @@ -142,6 +161,7 @@ message ProcessingResponse { ImmediateResponse immediate_response = 7; } + // [#not-implemented-hide:] // Optional metadata that will be emitted as dynamic metadata to be consumed by the next // filter. This metadata will be placed in the namespace "envoy.filters.http.ext_proc". google.protobuf.Struct dynamic_metadata = 8; @@ -150,7 +170,7 @@ message ProcessingResponse { // for the duration of this particular request/response only. Servers // may use this to intelligently control how requests are processed // based on the headers and other metadata that they see. - envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode mode_override = 9; + envoy.extensions.filters.http.ext_proc.v3.ProcessingMode mode_override = 9; } // The following are messages that are sent to the server. @@ -162,6 +182,7 @@ message HttpHeaders { // lower-cased, because HTTP header keys are case-insensitive. config.core.v3.HeaderMap headers = 1; + // [#not-implemented-hide:] // The values of properties selected by the "request_attributes" // or "response_attributes" list in the configuration. Each entry // in the list is populated @@ -213,14 +234,18 @@ message CommonResponse { // stream as normal. This is the default. CONTINUE = 0; - // Replace the request or response with the contents - // of this message. If header_mutation is set, apply it to the - // headers. If body_mutation is set and contains a body, then add that - // body to the request or response, even if one does not already exist -- - // otherwise, clear the body. Any additional body and trailers - // received from downstream or upstream will be ignored. - // This can be used to add a body to a request or response that does not - // have one already. + // Apply the specified header mutation, replace the body with the body + // specified in the body mutation (if present), and do not send any + // further messages for this request or response even if the processing + // mode is configured to do so. + // + // When used in response to a request_headers or response_headers message, + // this status makes it possible to either completely replace the body + // while discarding the original body, or to add a body to a message that + // formerly did not have one. + // + // In other words, this response makes it possible to turn an HTTP GET + // into a POST, PUT, or PATCH. CONTINUE_AND_REPLACE = 1; } @@ -229,19 +254,17 @@ message CommonResponse { ResponseStatus status = 1 [(validate.rules).enum = {defined_only: true}]; // Instructions on how to manipulate the headers. When responding to an - // HttpBody request, header mutations will only take effect if the - // headers were not already sent further on the filter chain, which - // happens only if the current processing mode for the body is BUFFERED - // or BUFFERED_PARTIAL. + // HttpBody request, header mutations will only take effect if + // the current processing mode for the body is BUFFERED. HeaderMutation header_mutation = 2; // Replace the body of the last message sent to the remote server on this // stream. If responding to an HttpBody request, simply replace or clear - // the body chunk that was sent with that request. If responding to an - // HttpHeaders request, then a new body may be added to the request if this - // message is returned along with the CONTINUE_AND_REPLACE status. + // the body chunk that was sent with that request. Body mutations only take + // effect in response to "body" messages and are ignored otherwise. BodyMutation body_mutation = 3; + // [#not-implemented-hide:] // Add new trailers to the message. This may be used when responding to either a // HttpHeaders or HttpBody message, but only if this message is returned // along with the CONTINUE_AND_REPLACE status. @@ -275,7 +298,8 @@ message ImmediateResponse { GrpcStatus grpc_status = 4; // A string detailing why this local reply was sent, which may be included - // in log and debug output. + // in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS% + // command operator field for use in access logging). string details = 5; } diff --git a/api/envoy/service/extension/v3/config_discovery.proto b/api/envoy/service/extension/v3/config_discovery.proto index d0b7033123..3a0337a314 100644 --- a/api/envoy/service/extension/v3/config_discovery.proto +++ b/api/envoy/service/extension/v3/config_discovery.proto @@ -8,11 +8,11 @@ import "google/api/annotations.proto"; import "envoy/annotations/resource.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.extension.v3"; option java_outer_classname = "ConfigDiscoveryProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/extension/v3;extensionv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/health/v3/hds.proto b/api/envoy/service/health/v3/hds.proto index d73757f7a4..025e822ebf 100644 --- a/api/envoy/service/health/v3/hds.proto +++ b/api/envoy/service/health/v3/hds.proto @@ -10,13 +10,14 @@ import "envoy/config/endpoint/v3/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; -import "udpa/annotations/migrate.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.health.v3"; option java_outer_classname = "HdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/health/v3;healthv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -130,7 +131,8 @@ message EndpointHealthResponse { "envoy.service.discovery.v2.EndpointHealthResponse"; // Deprecated - Flat list of endpoint health information. - repeated EndpointHealth endpoints_health = 1 [deprecated = true]; + repeated EndpointHealth endpoints_health = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Organize Endpoint health information by cluster. repeated ClusterEndpointsHealth cluster_endpoints_health = 2; @@ -170,9 +172,9 @@ message ClusterHealthCheck { repeated LocalityEndpoints locality_endpoints = 3; - // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` + // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` // on connection when health checking. For more details, see - // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. + // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. repeated config.cluster.v3.Cluster.TransportSocketMatch transport_socket_matches = 4; } @@ -185,3 +187,8 @@ message HealthCheckSpecifier { // The default is 1 second. google.protobuf.Duration interval = 2; } + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. +message HdsDummy { +} diff --git a/api/envoy/service/health/v4alpha/hds.proto b/api/envoy/service/health/v4alpha/hds.proto deleted file mode 100644 index 537d20b58c..0000000000 --- a/api/envoy/service/health/v4alpha/hds.proto +++ /dev/null @@ -1,192 +0,0 @@ -syntax = "proto3"; - -package envoy.service.health.v4alpha; - -import "envoy/config/cluster/v4alpha/cluster.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint_components.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.health.v4alpha"; -option java_outer_classname = "HdsProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Health Discovery Service (HDS)] - -// HDS is Health Discovery Service. It compliments Envoy’s health checking -// service by designating this Envoy to be a healthchecker for a subset of hosts -// in the cluster. The status of these health checks will be reported to the -// management server, where it can be aggregated etc and redistributed back to -// Envoy through EDS. -service HealthDiscoveryService { - // 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. - rpc StreamHealthCheck(stream HealthCheckRequestOrEndpointHealthResponse) - returns (stream HealthCheckSpecifier) { - } - - // 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? - rpc FetchHealthCheck(HealthCheckRequestOrEndpointHealthResponse) returns (HealthCheckSpecifier) { - option (google.api.http).post = "/v3/discovery:health_check"; - option (google.api.http).body = "*"; - } -} - -// Defines supported protocols etc, so the management server can assign proper -// endpoints to healthcheck. -message Capability { - option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.Capability"; - - // Different Envoy instances may have different capabilities (e.g. Redis) - // and/or have ports enabled for different protocols. - enum Protocol { - HTTP = 0; - TCP = 1; - REDIS = 2; - } - - repeated Protocol health_check_protocols = 1; -} - -message HealthCheckRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.HealthCheckRequest"; - - config.core.v4alpha.Node node = 1; - - Capability capability = 2; -} - -message EndpointHealth { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.EndpointHealth"; - - config.endpoint.v3.Endpoint endpoint = 1; - - config.core.v4alpha.HealthStatus health_status = 2; -} - -// Group endpoint health by locality under each cluster. -message LocalityEndpointsHealth { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.LocalityEndpointsHealth"; - - config.core.v4alpha.Locality locality = 1; - - repeated EndpointHealth endpoints_health = 2; -} - -// The health status of endpoints in a cluster. The cluster name and locality -// should match the corresponding fields in ClusterHealthCheck message. -message ClusterEndpointsHealth { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.ClusterEndpointsHealth"; - - string cluster_name = 1; - - repeated LocalityEndpointsHealth locality_endpoints_health = 2; -} - -message EndpointHealthResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.EndpointHealthResponse"; - - reserved 1; - - reserved "endpoints_health"; - - // Organize Endpoint health information by cluster. - repeated ClusterEndpointsHealth cluster_endpoints_health = 2; -} - -message HealthCheckRequestOrEndpointHealthResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse"; - - oneof request_type { - HealthCheckRequest health_check_request = 1; - - EndpointHealthResponse endpoint_health_response = 2; - } -} - -message LocalityEndpoints { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.LocalityEndpoints"; - - config.core.v4alpha.Locality locality = 1; - - repeated config.endpoint.v3.Endpoint endpoints = 2; -} - -// 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. -message ClusterHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.ClusterHealthCheck"; - - string cluster_name = 1; - - repeated config.core.v4alpha.HealthCheck health_checks = 2; - - repeated LocalityEndpoints locality_endpoints = 3; - - // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` - // on connection when health checking. For more details, see - // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. - repeated config.cluster.v4alpha.Cluster.TransportSocketMatch transport_socket_matches = 4; -} - -message HealthCheckSpecifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.health.v3.HealthCheckSpecifier"; - - repeated ClusterHealthCheck cluster_health_checks = 1; - - // The default is 1 second. - google.protobuf.Duration interval = 2; -} diff --git a/api/envoy/service/listener/v3/lds.proto b/api/envoy/service/listener/v3/lds.proto index a7a8260619..b340a09801 100644 --- a/api/envoy/service/listener/v3/lds.proto +++ b/api/envoy/service/listener/v3/lds.proto @@ -5,17 +5,15 @@ package envoy.service.listener.v3; import "envoy/service/discovery/v3/discovery.proto"; import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; import "envoy/annotations/resource.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.listener.v3"; option java_outer_classname = "LdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/listener/v3;listenerv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/load_stats/v2/lrs.proto b/api/envoy/service/load_stats/v2/lrs.proto index d8707bd62c..c39d74aacf 100644 --- a/api/envoy/service/load_stats/v2/lrs.proto +++ b/api/envoy/service/load_stats/v2/lrs.proto @@ -8,11 +8,11 @@ import "envoy/api/v2/endpoint/load_report.proto"; import "google/protobuf/duration.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.load_stats.v2"; option java_outer_classname = "LrsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2;load_statsv2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/load_stats/v3/lrs.proto b/api/envoy/service/load_stats/v3/lrs.proto index 76705ba777..6f7545376d 100644 --- a/api/envoy/service/load_stats/v3/lrs.proto +++ b/api/envoy/service/load_stats/v3/lrs.proto @@ -9,11 +9,11 @@ import "google/protobuf/duration.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.load_stats.v3"; option java_outer_classname = "LrsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3;load_statsv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -21,10 +21,10 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // Load Reporting Service is an Envoy API to emit load reports. Envoy will initiate a bi-directional // stream with a management server. Upon connecting, the management server can send a -// :ref:`LoadStatsResponse ` to a node it is +// :ref:`LoadStatsResponse ` to a node it is // interested in getting the load reports for. Envoy in this node will start sending -// :ref:`LoadStatsRequest `. This is done periodically -// based on the :ref:`load reporting interval ` +// :ref:`LoadStatsRequest `. This is done periodically +// based on the :ref:`load reporting interval ` // For details, take a look at the :ref:`Load Reporting Service sandbox example `. service LoadReportingService { @@ -84,7 +84,7 @@ message LoadStatsResponse { // If true, the client should send all clusters it knows about. // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their - // :ref:`client_features` field will honor this field. + // :ref:`client_features` field will honor this field. bool send_all_clusters = 4; // The minimum interval of time to collect stats over. This is only a minimum for two reasons: diff --git a/api/envoy/service/load_stats/v4alpha/lrs.proto b/api/envoy/service/load_stats/v4alpha/lrs.proto deleted file mode 100644 index fef245ebb3..0000000000 --- a/api/envoy/service/load_stats/v4alpha/lrs.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package envoy.service.load_stats.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v3/load_report.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.load_stats.v4alpha"; -option java_outer_classname = "LrsProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Load Reporting service (LRS)] - -// Load Reporting Service is an Envoy API to emit load reports. Envoy will initiate a bi-directional -// stream with a management server. Upon connecting, the management server can send a -// :ref:`LoadStatsResponse ` to a node it is -// interested in getting the load reports for. Envoy in this node will start sending -// :ref:`LoadStatsRequest `. This is done periodically -// based on the :ref:`load reporting interval ` -// For details, take a look at the :ref:`Load Reporting Service sandbox example `. - -service LoadReportingService { - // Advanced API to allow for multi-dimensional load balancing by remote - // server. For receiving LB assignments, the steps are: - // 1, The management server is configured with per cluster/zone/load metric - // capacity configuration. The capacity configuration definition is - // outside of the scope of this document. - // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters - // to balance. - // - // Independently, Envoy will initiate a StreamLoadStats bidi stream with a - // management server: - // 1. Once a connection establishes, the management server publishes a - // LoadStatsResponse for all clusters it is interested in learning load - // stats about. - // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts - // based on per-zone weights and/or per-instance weights (if specified) - // based on intra-zone LbPolicy. This information comes from the above - // {Stream,Fetch}Endpoints. - // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. - // 4. Envoy aggregates load reports over the period of time given to it in - // LoadStatsResponse.load_reporting_interval. This includes aggregation - // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as - // well as load metrics from upstream hosts. - // 5. When the timer of load_reporting_interval expires, Envoy sends new - // LoadStatsRequest filled with load reports for each cluster. - // 6. The management server uses the load reports from all reported Envoys - // from around the world, computes global assignment and prepares traffic - // assignment destined for each zone Envoys are located in. Goto 2. - rpc StreamLoadStats(stream LoadStatsRequest) returns (stream LoadStatsResponse) { - } -} - -// A load report Envoy sends to the management server. -message LoadStatsRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.load_stats.v3.LoadStatsRequest"; - - // Node identifier for Envoy instance. - config.core.v4alpha.Node node = 1; - - // A list of load stats to report. - repeated config.endpoint.v3.ClusterStats cluster_stats = 2; -} - -// The management server sends envoy a LoadStatsResponse with all clusters it -// is interested in learning load stats about. -message LoadStatsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.load_stats.v3.LoadStatsResponse"; - - // Clusters to report stats for. - // Not populated if *send_all_clusters* is true. - repeated string clusters = 1; - - // If true, the client should send all clusters it knows about. - // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their - // :ref:`client_features` field will honor this field. - bool send_all_clusters = 4; - - // The minimum interval of time to collect stats over. This is only a minimum for two reasons: - // - // 1. There may be some delay from when the timer fires until stats sampling occurs. - // 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic - // that is observed in between the corresponding previous *LoadStatsRequest* and this - // *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period - // of inobservability that might otherwise exists between the messages. New clusters are not - // subject to this consideration. - google.protobuf.Duration load_reporting_interval = 2; - - // Set to *true* if the management server supports endpoint granularity - // report. - bool report_endpoint_granularity = 3; -} diff --git a/api/envoy/service/metrics/v2/metrics_service.proto b/api/envoy/service/metrics/v2/metrics_service.proto index aa5e703850..ab990b07a8 100644 --- a/api/envoy/service/metrics/v2/metrics_service.proto +++ b/api/envoy/service/metrics/v2/metrics_service.proto @@ -4,7 +4,7 @@ package envoy.service.metrics.v2; import "envoy/api/v2/core/base.proto"; -import "metrics.proto"; +import "io/prometheus/client/metrics.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.metrics.v2"; option java_outer_classname = "MetricsServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/metrics/v2;metricsv2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/metrics/v3/metrics_service.proto b/api/envoy/service/metrics/v3/metrics_service.proto index 033c168c32..9971774aac 100644 --- a/api/envoy/service/metrics/v3/metrics_service.proto +++ b/api/envoy/service/metrics/v3/metrics_service.proto @@ -4,7 +4,7 @@ package envoy.service.metrics.v3; import "envoy/config/core/v3/base.proto"; -import "metrics.proto"; +import "io/prometheus/client/metrics.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -13,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.metrics.v3"; option java_outer_classname = "MetricsServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/metrics/v3;metricsv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/metrics/v4alpha/metrics_service.proto b/api/envoy/service/metrics/v4alpha/metrics_service.proto deleted file mode 100644 index d4f2378d35..0000000000 --- a/api/envoy/service/metrics/v4alpha/metrics_service.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package envoy.service.metrics.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "metrics.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.metrics.v4alpha"; -option java_outer_classname = "MetricsServiceProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Metrics service] - -// Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric -// data model as a standard to represent metrics information. -service MetricsService { - // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. - rpc StreamMetrics(stream StreamMetricsMessage) returns (StreamMetricsResponse) { - } -} - -message StreamMetricsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.metrics.v3.StreamMetricsResponse"; -} - -message StreamMetricsMessage { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.metrics.v3.StreamMetricsMessage"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.metrics.v3.StreamMetricsMessage.Identifier"; - - // The node sending metrics over the stream. - config.core.v4alpha.Node node = 1 [(validate.rules).message = {required: true}]; - } - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier identifier = 1; - - // A list of metric entries - repeated io.prometheus.client.MetricFamily envoy_metrics = 2; -} diff --git a/api/envoy/service/ratelimit/v2/rls.proto b/api/envoy/service/ratelimit/v2/rls.proto index 7c70defd14..2084573f66 100644 --- a/api/envoy/service/ratelimit/v2/rls.proto +++ b/api/envoy/service/ratelimit/v2/rls.proto @@ -5,15 +5,13 @@ package envoy.service.ratelimit.v2; import "envoy/api/v2/core/base.proto"; import "envoy/api/v2/ratelimit/ratelimit.proto"; -import "google/protobuf/struct.proto"; - import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.ratelimit.v2"; option java_outer_classname = "RlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v2;ratelimitv2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; @@ -48,7 +46,6 @@ message RateLimitRequest { } // A response from a ShouldRateLimit call. -// [#next-free-field: 7] message RateLimitResponse { enum Code { // The response code is not known. @@ -116,16 +113,4 @@ message RateLimitResponse { // A list of headers to add to the request when forwarded repeated api.v2.core.HeaderValue request_headers_to_add = 4; - - // A response body to send to the downstream client when the response code is not OK. - bytes raw_body = 5; - - // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next - // filter. This metadata lives in a namespace specified by the canonical name of extension filter - // that requires it: - // - // - :ref:`envoy.filters.http.ratelimit ` for HTTP filter. - // - :ref:`envoy.filters.network.ratelimit ` for network filter. - // - :ref:`envoy.filters.thrift.rate_limit ` for Thrift filter. - google.protobuf.Struct dynamic_metadata = 6; } diff --git a/api/envoy/service/ratelimit/v3/rls.proto b/api/envoy/service/ratelimit/v3/rls.proto index 4c883bd954..5f840f44f9 100644 --- a/api/envoy/service/ratelimit/v3/rls.proto +++ b/api/envoy/service/ratelimit/v3/rls.proto @@ -7,6 +7,7 @@ import "envoy/extensions/common/ratelimit/v3/ratelimit.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -15,30 +16,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.ratelimit.v3"; option java_outer_classname = "RlsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3;ratelimitv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Rate Limit Service (RLS)] service RateLimitService { - // For use_alpha to work as expected, we need to convince - // proto_sync.py that the legacy package is the previous version of - // either this package or the v2 package. And to do that, you'd - // "normally" use the - // "(udpa.annotations.versioning).previous_message_type" option; but - // we don't have a 'message' to put it on, we only have a 'service'. - // Fortunately, proto_sync.py's parser is sloppy, and we can fool it - // with a comment: - // - // previous_message_type = "pb.lyft.ratelimit.RateLimitService"; - // - // Now, we'd also "normally" do that in the v2 package, not here. - // But, because the legacy package imports the v2 package, that'd - // cause a cycle. - // - // The lesson is that the "have legacy be an alias for v2 instead of - // duplicating the files" thing we did was a bad thing to do. - // Determine whether rate limiting should take place. rpc ShouldRateLimit(RateLimitRequest) returns (RateLimitResponse) { } @@ -70,7 +54,7 @@ message RateLimitRequest { } // A response from a ShouldRateLimit call. -// [#next-free-field: 7] +// [#next-free-field: 8] message RateLimitResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.ratelimit.v2.RateLimitResponse"; @@ -120,6 +104,36 @@ message RateLimitResponse { Unit unit = 2; } + // Cacheable quota for responses. + // Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set. + // This is a certain number of requests over a period of time. + // The client may cache this result and apply the effective RateLimitResponse to future matching + // requests without querying rate limit service. + // + // When quota expires due to timeout, a new RLS request will also be made. + // The implementation may choose to preemptively query the rate limit server for more quota on or + // before expiration or before the available quota runs out. + // [#not-implemented-hide:] + message Quota { + // Number of matching requests granted in quota. Must be 1 or more. + uint32 requests = 1 [(validate.rules).uint32 = {gt: 0}]; + + oneof expiration_specifier { + // Point in time at which the quota expires. + google.protobuf.Timestamp valid_until = 2; + } + + // The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level. + // + // For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"), + // the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same. + // Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.) + // + // If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`. + string id = 3; + } + + // [#next-free-field: 6] message DescriptorStatus { option (udpa.annotations.versioning).previous_message_type = "envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus"; @@ -135,6 +149,32 @@ message RateLimitResponse { // Duration until reset of the current limit window. google.protobuf.Duration duration_until_reset = 4; + + // Quota is available for a request if its descriptor set has cached quota available for all + // descriptors. + // This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota. + // + // If quota is available, a RLS request will not be made and the quota will be reduced by 1 for + // all matching descriptors. + // + // If there is not sufficient quota, there are three cases: + // 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired. + // In this case, the request will be treated as OVER_LIMIT. + // 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors + // have no cached entry. This will trigger a new RLS request. + // When the result is returned, a single unit will be consumed from the quota for all + // matching descriptors. + // If the server did not provide a quota, such as the quota message is empty for some of + // the descriptors, then the request admission is determined by the + // :ref:`overall_code `. + // 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request, + // When the result is returned, a single unit will be consumed from the quota for all + // matching descriptors. + // If the server did not provide a quota, such as the quota message is empty for some of + // the descriptors, then the request admission is determined by the + // :ref:`overall_code `. + // [#not-implemented-hide:] + Quota quota = 5; } // The overall response code which takes into account all of the descriptors that were passed @@ -163,4 +203,17 @@ message RateLimitResponse { // - :ref:`envoy.filters.network.ratelimit ` for network filter. // - :ref:`envoy.filters.thrift.rate_limit ` for Thrift filter. google.protobuf.Struct dynamic_metadata = 6; + + // Quota is available for a request if its entire descriptor set has cached quota available. + // This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response. + // + // If quota is available, a RLS request will not be made and the quota will be reduced by 1. + // If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered. + // If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the + // :ref:`overall_code `. + // + // If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired, + // the request will be treated as OVER_LIMIT. + // [#not-implemented-hide:] + Quota quota = 7; } diff --git a/api/envoy/service/route/v3/rds.proto b/api/envoy/service/route/v3/rds.proto index 3a2c432fd8..d980afc750 100644 --- a/api/envoy/service/route/v3/rds.proto +++ b/api/envoy/service/route/v3/rds.proto @@ -5,16 +5,15 @@ package envoy.service.route.v3; import "envoy/service/discovery/v3/discovery.proto"; import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; import "envoy/annotations/resource.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.route.v3"; option java_outer_classname = "RdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/route/v3;routev3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -45,11 +44,11 @@ service RouteDiscoveryService { // Virtual Host Discovery Service (VHDS) is used to dynamically update the list of virtual hosts for // a given RouteConfiguration. If VHDS is configured a virtual host list update will be triggered // during the processing of an HTTP request if a route for the request cannot be resolved. The -// :ref:`resource_names_subscribe ` +// :ref:`resource_names_subscribe ` // field contains a list of virtual host names or aliases to track. The contents of an alias would // be the contents of a *host* or *authority* header used to make an http request. An xDS server // will match an alias to a virtual host based on the content of :ref:`domains' -// ` field. The *resource_names_unsubscribe* field +// ` field. The *resource_names_unsubscribe* field // contains a list of virtual host names that have been :ref:`unsubscribed // ` from the routing table associated with the RouteConfiguration. service VirtualHostDiscoveryService { diff --git a/api/envoy/service/route/v3/srds.proto b/api/envoy/service/route/v3/srds.proto index 7a7f8f7d3a..579df387e8 100644 --- a/api/envoy/service/route/v3/srds.proto +++ b/api/envoy/service/route/v3/srds.proto @@ -13,6 +13,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.route.v3"; option java_outer_classname = "SrdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/route/v3;routev3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -20,11 +21,11 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // * Routing :ref:`architecture overview ` // The Scoped Routes Discovery Service (SRDS) API distributes -// :ref:`ScopedRouteConfiguration` +// :ref:`ScopedRouteConfiguration` // resources. Each ScopedRouteConfiguration resource represents a "routing // scope" containing a mapping that allows the HTTP connection manager to // dynamically assign a routing table (specified via a -// :ref:`RouteConfiguration` message) to each +// :ref:`RouteConfiguration` message) to each // HTTP request. service ScopedRoutesDiscoveryService { option (envoy.annotations.resource).type = "envoy.config.route.v3.ScopedRouteConfiguration"; diff --git a/api/envoy/service/runtime/v3/rtds.proto b/api/envoy/service/runtime/v3/rtds.proto index 796b6fac24..8cffbe583d 100644 --- a/api/envoy/service/runtime/v3/rtds.proto +++ b/api/envoy/service/runtime/v3/rtds.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.runtime.v3"; option java_outer_classname = "RtdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/runtime/v3;runtimev3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/secret/v3/sds.proto b/api/envoy/service/secret/v3/sds.proto index 3c9441d7c7..178813851f 100644 --- a/api/envoy/service/secret/v3/sds.proto +++ b/api/envoy/service/secret/v3/sds.proto @@ -13,6 +13,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.secret.v3"; option java_outer_classname = "SdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/secret/v3;secretv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/status/v2/csds.proto b/api/envoy/service/status/v2/csds.proto index 2233f3cef7..0dc667ce82 100644 --- a/api/envoy/service/status/v2/csds.proto +++ b/api/envoy/service/status/v2/csds.proto @@ -7,13 +7,13 @@ import "envoy/api/v2/core/base.proto"; import "envoy/type/matcher/node.proto"; import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.service.status.v2"; option java_outer_classname = "CsdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/status/v2;statusv2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/status/v3/csds.proto b/api/envoy/service/status/v3/csds.proto index 8e81dcdd2b..89d92efd2d 100644 --- a/api/envoy/service/status/v3/csds.proto +++ b/api/envoy/service/status/v3/csds.proto @@ -7,15 +7,17 @@ import "envoy/config/core/v3/base.proto"; import "envoy/type/matcher/v3/node.proto"; import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; -import "udpa/annotations/migrate.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.service.status.v3"; option java_outer_classname = "CsdsProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/status/v3;statusv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -94,13 +96,18 @@ message PerXdsConfig { // Config status generated by management servers. Will not be present if the // CSDS server is an xDS client. - ConfigStatus status = 1 [(udpa.annotations.field_migrate).oneof_promotion = "status_config"]; + ConfigStatus status = 1; // Client config status is populated by xDS clients. Will not be present if // the CSDS server is an xDS server. No matter what the client config status // is, xDS clients should always dump the most recent accepted xDS config. + // + // .. attention:: + // This field is deprecated. Use :ref:`ClientResourceStatus + // ` for per-resource + // config status instead. ClientConfigStatus client_status = 7 - [(udpa.annotations.field_migrate).oneof_promotion = "status_config"]; + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; oneof per_xds_config { admin.v3.ListenersConfigDump listener_config = 2; @@ -120,10 +127,60 @@ message ClientConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.service.status.v2.ClientConfig"; + // GenericXdsConfig is used to specify the config status and the dump + // of any xDS resource identified by their type URL. It is the generalized + // version of the now deprecated ListenersConfigDump, ClustersConfigDump etc + // [#next-free-field: 10] + message GenericXdsConfig { + // Type_url represents the fully qualified name of xDS resource type + // like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc. + string type_url = 1; + + // Name of the xDS resource + string name = 2; + + // This is the :ref:`version_info ` + // in the last processed xDS discovery response. If there are only + // static bootstrap listeners, this field will be "" + string version_info = 3; + + // The xDS resource config. Actual content depends on the type + google.protobuf.Any xds_config = 4; + + // Timestamp when the xDS resource was last updated + google.protobuf.Timestamp last_updated = 5; + + // Per xDS resource config status. It is generated by management servers. + // It will not be present if the CSDS server is an xDS client. + ConfigStatus config_status = 6; + + // Per xDS resource status from the view of a xDS client + admin.v3.ClientResourceStatus client_status = 7; + + // Set if the last update failed, cleared after the next successful + // update. The *error_state* field contains the rejected version of + // this particular resource along with the reason and timestamp. For + // successfully updated or acknowledged resource, this field should + // be empty. + // [#not-implemented-hide:] + admin.v3.UpdateFailureState error_state = 8; + + // Is static resource is true if it is specified in the config supplied + // through the file at the startup. + bool is_static_resource = 9; + } + // Node for a particular client. config.core.v3.Node node = 1; - repeated PerXdsConfig xds_config = 2; + // This field is deprecated in favor of generic_xds_configs which is + // much simpler and uniform in structure. + repeated PerXdsConfig xds_config = 2 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + + // Represents generic xDS config and the exact config structure depends on + // the type URL (like Cluster if it is CDS) + repeated GenericXdsConfig generic_xds_configs = 3; } message ClientStatusResponse { diff --git a/api/envoy/service/status/v4alpha/csds.proto b/api/envoy/service/status/v4alpha/csds.proto deleted file mode 100644 index e1556de8b9..0000000000 --- a/api/envoy/service/status/v4alpha/csds.proto +++ /dev/null @@ -1,135 +0,0 @@ -syntax = "proto3"; - -package envoy.service.status.v4alpha; - -import "envoy/admin/v4alpha/config_dump.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/type/matcher/v4alpha/node.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.status.v4alpha"; -option java_outer_classname = "CsdsProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Client Status Discovery Service (CSDS)] - -// CSDS is Client Status Discovery Service. It can be used to get the status of -// an xDS-compliant client from the management server's point of view. It can -// also be used to get the current xDS states directly from the client. -service ClientStatusDiscoveryService { - rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) { - } - - rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) { - option (google.api.http).post = "/v3/discovery:client_status"; - option (google.api.http).body = "*"; - } -} - -// Status of a config from a management server view. -enum ConfigStatus { - // Status info is not available/unknown. - UNKNOWN = 0; - - // Management server has sent the config to client and received ACK. - SYNCED = 1; - - // Config is not sent. - NOT_SENT = 2; - - // Management server has sent the config to client but hasn’t received - // ACK/NACK. - STALE = 3; - - // Management server has sent the config to client but received NACK. The - // attached config dump will be the latest config (the rejected one), since - // it is the persisted version in the management server. - ERROR = 4; -} - -// Config status from a client-side view. -enum ClientConfigStatus { - // Config status is not available/unknown. - CLIENT_UNKNOWN = 0; - - // Client requested the config but hasn't received any config from management - // server yet. - CLIENT_REQUESTED = 1; - - // Client received the config and replied with ACK. - CLIENT_ACKED = 2; - - // Client received the config and replied with NACK. Notably, the attached - // config dump is not the NACKed version, but the most recent accepted one. If - // no config is accepted yet, the attached config dump will be empty. - CLIENT_NACKED = 3; -} - -// Request for client status of clients identified by a list of NodeMatchers. -message ClientStatusRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v3.ClientStatusRequest"; - - // Management server can use these match criteria to identify clients. - // The match follows OR semantics. - repeated type.matcher.v4alpha.NodeMatcher node_matchers = 1; - - // The node making the csds request. - config.core.v4alpha.Node node = 2; -} - -// Detailed config (per xDS) with status. -// [#next-free-field: 8] -message PerXdsConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v3.PerXdsConfig"; - - oneof status_config { - // Config status generated by management servers. Will not be present if the - // CSDS server is an xDS client. - ConfigStatus status = 1; - - // Client config status is populated by xDS clients. Will not be present if - // the CSDS server is an xDS server. No matter what the client config status - // is, xDS clients should always dump the most recent accepted xDS config. - ClientConfigStatus client_status = 7; - } - - oneof per_xds_config { - admin.v4alpha.ListenersConfigDump listener_config = 2; - - admin.v4alpha.ClustersConfigDump cluster_config = 3; - - admin.v4alpha.RoutesConfigDump route_config = 4; - - admin.v4alpha.ScopedRoutesConfigDump scoped_route_config = 5; - - admin.v4alpha.EndpointsConfigDump endpoint_config = 6; - } -} - -// All xds configs for a particular client. -message ClientConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v3.ClientConfig"; - - // Node for a particular client. - config.core.v4alpha.Node node = 1; - - repeated PerXdsConfig xds_config = 2; -} - -message ClientStatusResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v3.ClientStatusResponse"; - - // Client configs for the clients specified in the ClientStatusRequest. - repeated ClientConfig config = 1; -} diff --git a/api/envoy/service/tap/v2alpha/common.proto b/api/envoy/service/tap/v2alpha/common.proto index 990a382648..b06039f6c6 100644 --- a/api/envoy/service/tap/v2alpha/common.proto +++ b/api/envoy/service/tap/v2alpha/common.proto @@ -15,6 +15,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.tap.v2alpha"; option java_outer_classname = "CommonProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/tap/v2alpha"; option (udpa.annotations.file_migrate).move_to_package = "envoy.config.tap.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/tap/v2alpha/tap.proto b/api/envoy/service/tap/v2alpha/tap.proto index 9fd18eae5d..98f5f05a1f 100644 --- a/api/envoy/service/tap/v2alpha/tap.proto +++ b/api/envoy/service/tap/v2alpha/tap.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.tap.v2alpha"; option java_outer_classname = "TapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/tap/v2alpha"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/tap/v3/tap.proto b/api/envoy/service/tap/v3/tap.proto index 080aba215c..f97fe45121 100644 --- a/api/envoy/service/tap/v3/tap.proto +++ b/api/envoy/service/tap/v3/tap.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.tap.v3"; option java_outer_classname = "TapProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/tap/v3;tapv3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; @@ -41,7 +42,7 @@ message StreamTapsRequest { config.core.v3.Node node = 1 [(validate.rules).message = {required: true}]; // The opaque identifier that was set in the :ref:`output config - // `. + // `. string tap_id = 2; } diff --git a/api/envoy/service/tap/v4alpha/tap.proto b/api/envoy/service/tap/v4alpha/tap.proto deleted file mode 100644 index a1654d18be..0000000000 --- a/api/envoy/service/tap/v4alpha/tap.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; - -package envoy.service.tap.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/tap/v3/wrapper.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.tap.v4alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Tap Sink Service] - -// [#not-implemented-hide:] A tap service to receive incoming taps. Envoy will call -// StreamTaps to deliver captured taps to the server -service TapSinkService { - // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. - rpc StreamTaps(stream StreamTapsRequest) returns (StreamTapsResponse) { - } -} - -// [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server -// and stream taps without ever expecting a response. -message StreamTapsRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v3.StreamTapsRequest"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v3.StreamTapsRequest.Identifier"; - - // The node sending taps over the stream. - config.core.v4alpha.Node node = 1 [(validate.rules).message = {required: true}]; - - // The opaque identifier that was set in the :ref:`output config - // `. - string tap_id = 2; - } - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier identifier = 1; - - // The trace id. this can be used to merge together a streaming trace. Note that the trace_id - // is not guaranteed to be spatially or temporally unique. - uint64 trace_id = 2; - - // The trace data. - data.tap.v3.TraceWrapper trace = 3; -} - -// [#not-implemented-hide:] -message StreamTapsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v3.StreamTapsResponse"; -} diff --git a/api/envoy/service/trace/v2/trace_service.proto b/api/envoy/service/trace/v2/trace_service.proto index 48e65820b3..6a0314905c 100644 --- a/api/envoy/service/trace/v2/trace_service.proto +++ b/api/envoy/service/trace/v2/trace_service.proto @@ -4,8 +4,6 @@ package envoy.service.trace.v2; import "envoy/api/v2/core/base.proto"; -import "google/api/annotations.proto"; - import "opencensus/proto/trace/v1/trace.proto"; import "udpa/annotations/status.proto"; @@ -14,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.trace.v2"; option java_outer_classname = "TraceServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/trace/v2;tracev2"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/service/trace/v3/trace_service.proto b/api/envoy/service/trace/v3/trace_service.proto index facaa9211c..69772a88d9 100644 --- a/api/envoy/service/trace/v3/trace_service.proto +++ b/api/envoy/service/trace/v3/trace_service.proto @@ -4,8 +4,6 @@ package envoy.service.trace.v3; import "envoy/config/core/v3/base.proto"; -import "google/api/annotations.proto"; - import "opencensus/proto/trace/v1/trace.proto"; import "udpa/annotations/status.proto"; @@ -15,6 +13,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.service.trace.v3"; option java_outer_classname = "TraceServiceProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/trace/v3;tracev3"; option java_generic_services = true; option (udpa.annotations.file_status).package_version_status = ACTIVE; diff --git a/api/envoy/service/trace/v4alpha/trace_service.proto b/api/envoy/service/trace/v4alpha/trace_service.proto deleted file mode 100644 index afa1f46efe..0000000000 --- a/api/envoy/service/trace/v4alpha/trace_service.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package envoy.service.trace.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "google/api/annotations.proto"; - -import "opencensus/proto/trace/v1/trace.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.trace.v4alpha"; -option java_outer_classname = "TraceServiceProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Trace service] - -// Service for streaming traces to server that consumes the trace data. It -// uses OpenCensus data model as a standard to represent trace information. -service TraceService { - // Envoy will connect and send StreamTracesMessage messages forever. It does - // not expect any response to be sent as nothing would be done in the case - // of failure. - rpc StreamTraces(stream StreamTracesMessage) returns (StreamTracesResponse) { - } -} - -message StreamTracesResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.trace.v3.StreamTracesResponse"; -} - -message StreamTracesMessage { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.trace.v3.StreamTracesMessage"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.trace.v3.StreamTracesMessage.Identifier"; - - // The node sending the access log messages over the stream. - config.core.v4alpha.Node node = 1 [(validate.rules).message = {required: true}]; - } - - // Identifier data effectively is a structured metadata. - // As a performance optimization this will only be sent in the first message - // on the stream. - Identifier identifier = 1; - - // A list of Span entries - repeated opencensus.proto.trace.v1.Span spans = 2; -} diff --git a/api/envoy/type/hash_policy.proto b/api/envoy/type/hash_policy.proto index b6aeb31fcb..f022f09e7d 100644 --- a/api/envoy/type/hash_policy.proto +++ b/api/envoy/type/hash_policy.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type"; option java_outer_classname = "HashPolicyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Hash Policy] diff --git a/api/envoy/type/http.proto b/api/envoy/type/http.proto index c1c787411f..51768f1736 100644 --- a/api/envoy/type/http.proto +++ b/api/envoy/type/http.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.type"; option java_outer_classname = "HttpProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: HTTP] diff --git a/api/envoy/type/http/v3/cookie.proto b/api/envoy/type/http/v3/cookie.proto new file mode 100644 index 0000000000..fba35eb86a --- /dev/null +++ b/api/envoy/type/http/v3/cookie.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package envoy.type.http.v3; + +import "google/protobuf/duration.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.type.http.v3"; +option java_outer_classname = "CookieProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/http/v3;httpv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Http cookie API] + +// Cookie defines an API for obtaining or generating HTTP cookie. +message Cookie { + // The name that will be used to obtain cookie value from downstream HTTP request or generate + // new cookie for downstream. + string name = 1 [(validate.rules).string = {min_len: 1}]; + + // Duration of cookie. This will be used to set the expiry time of a new cookie when it is + // generated. Set this to 0 to use a session cookie. + google.protobuf.Duration ttl = 2 [(validate.rules).duration = {gte {}}]; + + // Path of cookie. This will be used to set the path of a new cookie when it is generated. + // If no path is specified here, no path will be set for the cookie. + string path = 3; +} diff --git a/api/envoy/type/http/v3/path_transformation.proto b/api/envoy/type/http/v3/path_transformation.proto new file mode 100644 index 0000000000..50350c48f9 --- /dev/null +++ b/api/envoy/type/http/v3/path_transformation.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package envoy.type.http.v3; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.type.http.v3"; +option java_outer_classname = "PathTransformationProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/http/v3;httpv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Path Transformations API] + +// PathTransformation defines an API to apply a sequence of operations that can be used to alter +// text before it is used for matching or routing. Multiple actions can be applied in the same +// Transformation, forming a sequential pipeline. The transformations will be performed in the order +// that they appear. +// +// This API is a work in progress. + +message PathTransformation { + // A type of operation to alter text. + message Operation { + // Should text be normalized according to RFC 3986? This typically is used for path headers + // before any processing of requests by HTTP filters or routing. This applies percent-encoded + // normalization and path segment normalization. Fails on characters disallowed in URLs + // (e.g. NULLs). See `Normalization and Comparison + // `_ for details of normalization. Note that + // this options does not perform `case normalization + // `_ + message NormalizePathRFC3986 { + } + + // Determines if adjacent slashes are merged into one. A common use case is for a request path + // header. Using this option in `:ref: PathNormalizationOptions + // ` + // will allow incoming requests with path `//dir///file` to match against route with `prefix` + // match set to `/dir`. When using for header transformations, note that slash merging is not + // part of `HTTP spec `_ and is provided for convenience. + message MergeSlashes { + } + + oneof operation_specifier { + option (validate.required) = true; + + // Enable path normalization per RFC 3986. + NormalizePathRFC3986 normalize_path_rfc_3986 = 2; + + // Enable merging adjacent slashes. + MergeSlashes merge_slashes = 3; + } + } + + // A list of operations to apply. Transformations will be performed in the order that they appear. + repeated Operation operations = 1; +} diff --git a/api/envoy/type/http_status.proto b/api/envoy/type/http_status.proto index 99b44a98c2..0d22234e46 100644 --- a/api/envoy/type/http_status.proto +++ b/api/envoy/type/http_status.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type"; option java_outer_classname = "HttpStatusProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: HTTP status codes] diff --git a/api/envoy/type/matcher/metadata.proto b/api/envoy/type/matcher/metadata.proto index ed58d04adb..20da230b4f 100644 --- a/api/envoy/type/matcher/metadata.proto +++ b/api/envoy/type/matcher/metadata.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "MetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Metadata matcher] diff --git a/api/envoy/type/matcher/node.proto b/api/envoy/type/matcher/node.proto index c9e84a4627..5dcf1e69bc 100644 --- a/api/envoy/type/matcher/node.proto +++ b/api/envoy/type/matcher/node.proto @@ -10,6 +10,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "NodeProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Node matcher] diff --git a/api/envoy/type/matcher/number.proto b/api/envoy/type/matcher/number.proto index e488f16a4a..4c5b4db38d 100644 --- a/api/envoy/type/matcher/number.proto +++ b/api/envoy/type/matcher/number.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "NumberProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Number matcher] diff --git a/api/envoy/type/matcher/path.proto b/api/envoy/type/matcher/path.proto index 860a1c69f1..1a97bbc154 100644 --- a/api/envoy/type/matcher/path.proto +++ b/api/envoy/type/matcher/path.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "PathProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Path matcher] diff --git a/api/envoy/type/matcher/regex.proto b/api/envoy/type/matcher/regex.proto index 6c499235bb..6daa16e478 100644 --- a/api/envoy/type/matcher/regex.proto +++ b/api/envoy/type/matcher/regex.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "RegexProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Regex matcher] diff --git a/api/envoy/type/matcher/string.proto b/api/envoy/type/matcher/string.proto index 499eaf2177..b4571ce727 100644 --- a/api/envoy/type/matcher/string.proto +++ b/api/envoy/type/matcher/string.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "StringProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: String matcher] diff --git a/api/envoy/type/matcher/struct.proto b/api/envoy/type/matcher/struct.proto index 10d4672e06..f08bf793d6 100644 --- a/api/envoy/type/matcher/struct.proto +++ b/api/envoy/type/matcher/struct.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "StructProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Struct matcher] diff --git a/api/envoy/type/matcher/v3/http_inputs.proto b/api/envoy/type/matcher/v3/http_inputs.proto new file mode 100644 index 0000000000..68ce45030e --- /dev/null +++ b/api/envoy/type/matcher/v3/http_inputs.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; + +package envoy.type.matcher.v3; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.type.matcher.v3"; +option java_outer_classname = "HttpInputsProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Common HTTP Inputs] + +// Match input indicates that matching should be done on a specific request header. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.request_headers] +message HttpRequestHeaderMatchInput { + // The request header to match on. + string header_name = 1 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; +} + +// Match input indicates that matching should be done on a specific request trailer. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.request_trailers] +message HttpRequestTrailerMatchInput { + // The request trailer to match on. + string header_name = 1 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; +} + +// Match input indicating that matching should be done on a specific response header. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the response contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.response_headers] +message HttpResponseHeaderMatchInput { + // The response header to match on. + string header_name = 1 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; +} + +// Match input indicates that matching should be done on a specific response trailer. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.response_trailers] +message HttpResponseTrailerMatchInput { + // The response trailer to match on. + string header_name = 1 + [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; +} diff --git a/api/envoy/type/matcher/v3/metadata.proto b/api/envoy/type/matcher/v3/metadata.proto index a7184ee980..d3316e88a8 100644 --- a/api/envoy/type/matcher/v3/metadata.proto +++ b/api/envoy/type/matcher/v3/metadata.proto @@ -11,12 +11,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "MetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Metadata matcher] // MetadataMatcher provides a general interface to check if a given value is matched in -// :ref:`Metadata `. It uses `filter` and `path` to retrieve the value +// :ref:`Metadata `. It uses `filter` and `path` to retrieve the value // from the Metadata and then check if it's matched to the specified value. // // For example, for the following Metadata: @@ -71,8 +72,8 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // // An example use of MetadataMatcher is specifying additional metadata in envoy.filters.http.rbac to // enforce access control based on dynamic metadata in a request. See :ref:`Permission -// ` and :ref:`Principal -// `. +// ` and :ref:`Principal +// `. // [#next-major-version: MetadataMatcher should use StructMatcher] message MetadataMatcher { @@ -101,4 +102,7 @@ message MetadataMatcher { // The MetadataMatcher is matched if the value retrieved by path is matched to this value. ValueMatcher value = 3 [(validate.rules).message = {required: true}]; + + // If true, the match result will be inverted. + bool invert = 4; } diff --git a/api/envoy/type/matcher/v3/node.proto b/api/envoy/type/matcher/v3/node.proto index fe50731213..baa92fb603 100644 --- a/api/envoy/type/matcher/v3/node.proto +++ b/api/envoy/type/matcher/v3/node.proto @@ -11,6 +11,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "NodeProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Node matcher] diff --git a/api/envoy/type/matcher/v3/number.proto b/api/envoy/type/matcher/v3/number.proto index 2379efdcbd..99681c989c 100644 --- a/api/envoy/type/matcher/v3/number.proto +++ b/api/envoy/type/matcher/v3/number.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "NumberProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Number matcher] diff --git a/api/envoy/type/matcher/v3/path.proto b/api/envoy/type/matcher/v3/path.proto index 0ce89871c9..d332a17d6b 100644 --- a/api/envoy/type/matcher/v3/path.proto +++ b/api/envoy/type/matcher/v3/path.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "PathProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Path matcher] diff --git a/api/envoy/type/matcher/v3/regex.proto b/api/envoy/type/matcher/v3/regex.proto index f5913c460c..f18bd03e2b 100644 --- a/api/envoy/type/matcher/v3/regex.proto +++ b/api/envoy/type/matcher/v3/regex.proto @@ -4,6 +4,7 @@ package envoy.type.matcher.v3; import "google/protobuf/wrappers.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -11,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "RegexProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Regex matcher] @@ -43,7 +45,14 @@ message RegexMatcher { // // This field is deprecated; regexp validation should be performed on the management server // instead of being done by each individual client. - google.protobuf.UInt32Value max_program_size = 1 [deprecated = true]; + // + // .. note:: + // + // Although this field is deprecated, the program size will still be checked against the + // global ``re2.max_program_size.error_level`` runtime value. + // + google.protobuf.UInt32Value max_program_size = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; } oneof engine_type { @@ -53,7 +62,8 @@ message RegexMatcher { GoogleRE2 google_re2 = 1 [(validate.rules).message = {required: true}]; } - // The regex match string. The string must be supported by the configured engine. + // The regex match string. The string must be supported by the configured engine. The regex is matched + // against the full string, not as a partial match. string regex = 2 [(validate.rules).string = {min_len: 1}]; } diff --git a/api/envoy/type/matcher/v3/string.proto b/api/envoy/type/matcher/v3/string.proto index 7a91b58f3b..efea6c0ab4 100644 --- a/api/envoy/type/matcher/v3/string.proto +++ b/api/envoy/type/matcher/v3/string.proto @@ -4,7 +4,6 @@ package envoy.type.matcher.v3; import "envoy/type/matcher/v3/regex.proto"; -import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -12,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "StringProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: String matcher] @@ -63,8 +63,8 @@ message StringMatcher { string contains = 7 [(validate.rules).string = {min_len: 1}]; } - // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no - // effect for the safe_regex match. + // If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This + // has no effect for the safe_regex match. // For example, the matcher *data* will match both input string *Data* and *data* if set to true. bool ignore_case = 6; } diff --git a/api/envoy/type/matcher/v3/struct.proto b/api/envoy/type/matcher/v3/struct.proto index c753d07a5c..ad72e2cc78 100644 --- a/api/envoy/type/matcher/v3/struct.proto +++ b/api/envoy/type/matcher/v3/struct.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "StructProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Struct matcher] diff --git a/api/envoy/type/matcher/v3/value.proto b/api/envoy/type/matcher/v3/value.proto index 040332273b..bd46acc071 100644 --- a/api/envoy/type/matcher/v3/value.proto +++ b/api/envoy/type/matcher/v3/value.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher.v3"; option java_outer_classname = "ValueProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Value matcher] diff --git a/api/envoy/type/matcher/v4alpha/metadata.proto b/api/envoy/type/matcher/v4alpha/metadata.proto deleted file mode 100644 index 35af650391..0000000000 --- a/api/envoy/type/matcher/v4alpha/metadata.proto +++ /dev/null @@ -1,105 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "envoy/type/matcher/v4alpha/value.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "MetadataProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Metadata matcher] - -// MetadataMatcher provides a general interface to check if a given value is matched in -// :ref:`Metadata `. It uses `filter` and `path` to retrieve the value -// from the Metadata and then check if it's matched to the specified value. -// -// For example, for the following Metadata: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.filters.http.rbac: -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" -// from the Metadata which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// filter: envoy.filters.http.rbac -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following MetadataMatcher is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// filter: envoy.filters.http.rbac -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of MetadataMatcher is specifying additional metadata in envoy.filters.http.rbac to -// enforce access control based on dynamic metadata in a request. See :ref:`Permission -// ` and :ref:`Principal -// `. - -// [#next-major-version: MetadataMatcher should use StructMatcher] -message MetadataMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.MetadataMatcher"; - - // Specifies the segment in a path to retrieve value from Metadata. - // Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that - // if the segment key refers to a list, it has to be the last segment in a path. - message PathSegment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.MetadataMatcher.PathSegment"; - - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The filter name to retrieve the Struct from the Metadata. - string filter = 1 [(validate.rules).string = {min_len: 1}]; - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The MetadataMatcher is matched if the value retrieved by path is matched to this value. - ValueMatcher value = 3 [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/type/matcher/v4alpha/node.proto b/api/envoy/type/matcher/v4alpha/node.proto deleted file mode 100644 index a74bf808f0..0000000000 --- a/api/envoy/type/matcher/v4alpha/node.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "envoy/type/matcher/v4alpha/string.proto"; -import "envoy/type/matcher/v4alpha/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "NodeProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Node matcher] - -// Specifies the way to match a Node. -// The match follows AND semantics. -message NodeMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.v3.NodeMatcher"; - - // Specifies match criteria on the node id. - StringMatcher node_id = 1; - - // Specifies match criteria on the node metadata. - repeated StructMatcher node_metadatas = 2; -} diff --git a/api/envoy/type/matcher/v4alpha/number.proto b/api/envoy/type/matcher/v4alpha/number.proto deleted file mode 100644 index b168af19ab..0000000000 --- a/api/envoy/type/matcher/v4alpha/number.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "envoy/type/v3/range.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "NumberProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Number matcher] - -// Specifies the way to match a double value. -message DoubleMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.DoubleMatcher"; - - oneof match_pattern { - option (validate.required) = true; - - // If specified, the input double value must be in the range specified here. - // Note: The range is using half-open interval semantics [start, end). - v3.DoubleRange range = 1; - - // If specified, the input double value must be equal to the value specified here. - double exact = 2; - } -} diff --git a/api/envoy/type/matcher/v4alpha/path.proto b/api/envoy/type/matcher/v4alpha/path.proto deleted file mode 100644 index 9150939bf2..0000000000 --- a/api/envoy/type/matcher/v4alpha/path.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "envoy/type/matcher/v4alpha/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "PathProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Path matcher] - -// Specifies the way to match a path on HTTP request. -message PathMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.v3.PathMatcher"; - - oneof rule { - option (validate.required) = true; - - // The `path` must match the URL path portion of the :path header. The query and fragment - // string (if present) are removed in the URL path portion. - // For example, the path */data* will match the *:path* header */data#fragment?param=value*. - StringMatcher path = 1 [(validate.rules).message = {required: true}]; - } -} diff --git a/api/envoy/type/matcher/v4alpha/regex.proto b/api/envoy/type/matcher/v4alpha/regex.proto deleted file mode 100644 index 537635ec87..0000000000 --- a/api/envoy/type/matcher/v4alpha/regex.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "RegexProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Regex matcher] - -// A regex matcher designed for safety when used with untrusted input. -message RegexMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.v3.RegexMatcher"; - - // Google's `RE2 `_ regex engine. The regex string must adhere to - // the documented `syntax `_. The engine is designed - // to complete execution in linear time as well as limit the amount of memory used. - // - // Envoy supports program size checking via runtime. The runtime keys `re2.max_program_size.error_level` - // and `re2.max_program_size.warn_level` can be set to integers as the maximum program size or - // complexity that a compiled regex can have before an exception is thrown or a warning is - // logged, respectively. `re2.max_program_size.error_level` defaults to 100, and - // `re2.max_program_size.warn_level` has no default if unset (will not check/log a warning). - // - // Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, - // which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented - // each time the program size exceeds the warn level threshold. - message GoogleRE2 { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.RegexMatcher.GoogleRE2"; - - reserved 1; - - reserved "max_program_size"; - } - - oneof engine_type { - option (validate.required) = true; - - // Google's RE2 regex engine. - GoogleRE2 google_re2 = 1 [(validate.rules).message = {required: true}]; - } - - // The regex match string. The string must be supported by the configured engine. - string regex = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Describes how to match a string and then produce a new string using a regular -// expression and a substitution string. -message RegexMatchAndSubstitute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.RegexMatchAndSubstitute"; - - // The regular expression used to find portions of a string (hereafter called - // the "subject string") that should be replaced. When a new string is - // produced during the substitution operation, the new string is initially - // the same as the subject string, but then all matches in the subject string - // are replaced by the substitution string. If replacing all matches isn't - // desired, regular expression anchors can be used to ensure a single match, - // so as to replace just one occurrence of a pattern. Capture groups can be - // used in the pattern to extract portions of the subject string, and then - // referenced in the substitution string. - RegexMatcher pattern = 1 [(validate.rules).message = {required: true}]; - - // The string that should be substituted into matching portions of the - // subject string during a substitution operation to produce a new string. - // Capture groups in the pattern can be referenced in the substitution - // string. Note, however, that the syntax for referring to capture groups is - // defined by the chosen regular expression engine. Google's `RE2 - // `_ regular expression engine uses a - // backslash followed by the capture group number to denote a numbered - // capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers - // to capture group 2. - string substitution = 2; -} diff --git a/api/envoy/type/matcher/v4alpha/string.proto b/api/envoy/type/matcher/v4alpha/string.proto deleted file mode 100644 index 1bc0118ced..0000000000 --- a/api/envoy/type/matcher/v4alpha/string.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "envoy/type/matcher/v4alpha/regex.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "StringProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: String matcher] - -// Specifies the way to match a string. -// [#next-free-field: 8] -message StringMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.StringMatcher"; - - reserved 4; - - reserved "regex"; - - oneof match_pattern { - option (validate.required) = true; - - // The input string must match exactly the string specified here. - // - // Examples: - // - // * *abc* only matches the value *abc*. - string exact = 1; - - // The input string must have the prefix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *abc.xyz* - string prefix = 2 [(validate.rules).string = {min_len: 1}]; - - // The input string must have the suffix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *xyz.abc* - string suffix = 3 [(validate.rules).string = {min_len: 1}]; - - // The input string must match the regular expression specified here. - RegexMatcher safe_regex = 5 [(validate.rules).message = {required: true}]; - - // The input string must have the substring specified here. - // Note: empty contains match is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *xyz.abc.def* - string contains = 7 [(validate.rules).string = {min_len: 1}]; - } - - // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no - // effect for the safe_regex match. - // For example, the matcher *data* will match both input string *Data* and *data* if set to true. - bool ignore_case = 6; -} - -// Specifies a list of ways to match a string. -message ListStringMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.ListStringMatcher"; - - repeated StringMatcher patterns = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/api/envoy/type/matcher/v4alpha/struct.proto b/api/envoy/type/matcher/v4alpha/struct.proto deleted file mode 100644 index 328ac555bd..0000000000 --- a/api/envoy/type/matcher/v4alpha/struct.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "envoy/type/matcher/v4alpha/value.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "StructProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Struct matcher] - -// StructMatcher provides a general interface to check if a given value is matched in -// google.protobuf.Struct. It uses `path` to retrieve the value -// from the struct and then check if it's matched to the specified value. -// -// For example, for the following Struct: -// -// .. code-block:: yaml -// -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" -// from the Metadata which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following StructMatcher is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of StructMatcher is to match metadata in envoy.v*.core.Node. -message StructMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.StructMatcher"; - - // Specifies the segment in a path to retrieve value from Struct. - message PathSegment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.StructMatcher.PathSegment"; - - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The StructMatcher is matched if the value retrieved by path is matched to this value. - ValueMatcher value = 3 [(validate.rules).message = {required: true}]; -} diff --git a/api/envoy/type/matcher/v4alpha/value.proto b/api/envoy/type/matcher/v4alpha/value.proto deleted file mode 100644 index 6e509d4601..0000000000 --- a/api/envoy/type/matcher/v4alpha/value.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v4alpha; - -import "envoy/type/matcher/v4alpha/number.proto"; -import "envoy/type/matcher/v4alpha/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v4alpha"; -option java_outer_classname = "ValueProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Value matcher] - -// Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. -// StructValue is not supported and is always not matched. -// [#next-free-field: 7] -message ValueMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.v3.ValueMatcher"; - - // NullMatch is an empty message to specify a null value. - message NullMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.v3.ValueMatcher.NullMatch"; - } - - // Specifies how to match a value. - oneof match_pattern { - option (validate.required) = true; - - // If specified, a match occurs if and only if the target value is a NullValue. - NullMatch null_match = 1; - - // If specified, a match occurs if and only if the target value is a double value and is - // matched to this field. - DoubleMatcher double_match = 2; - - // If specified, a match occurs if and only if the target value is a string value and is - // matched to this field. - StringMatcher string_match = 3; - - // If specified, a match occurs if and only if the target value is a bool value and is equal - // to this field. - bool bool_match = 4; - - // If specified, value match will be performed based on whether the path is referring to a - // valid primitive value in the metadata. If the path is referring to a non-primitive value, - // the result is always not matched. - bool present_match = 5; - - // If specified, a match occurs if and only if the target value is a list value and - // is matched to this field. - ListMatcher list_match = 6; - } -} - -// Specifies the way to match a list value. -message ListMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.v3.ListMatcher"; - - oneof match_pattern { - option (validate.required) = true; - - // If specified, at least one of the values in the list must match the value specified. - ValueMatcher one_of = 1; - } -} diff --git a/api/envoy/type/matcher/value.proto b/api/envoy/type/matcher/value.proto index aaecd14e8e..89d341bbba 100644 --- a/api/envoy/type/matcher/value.proto +++ b/api/envoy/type/matcher/value.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.matcher"; option java_outer_classname = "ValueProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Value matcher] diff --git a/api/envoy/type/metadata/v2/metadata.proto b/api/envoy/type/metadata/v2/metadata.proto index 43a1a7ca92..75f025009d 100644 --- a/api/envoy/type/metadata/v2/metadata.proto +++ b/api/envoy/type/metadata/v2/metadata.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.metadata.v2"; option java_outer_classname = "MetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2;metadatav2"; option (udpa.annotations.file_migrate).move_to_package = "envoy.type.metadata.v3"; option (udpa.annotations.file_status).package_version_status = FROZEN; diff --git a/api/envoy/type/metadata/v3/metadata.proto b/api/envoy/type/metadata/v3/metadata.proto index b971d8debb..0d535374b8 100644 --- a/api/envoy/type/metadata/v3/metadata.proto +++ b/api/envoy/type/metadata/v3/metadata.proto @@ -9,12 +9,13 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.metadata.v3"; option java_outer_classname = "MetadataProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3;metadatav3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Metadata] // MetadataKey provides a general interface using `key` and `path` to retrieve value from -// :ref:`Metadata `. +// :ref:`Metadata `. // // For example, for the following Metadata: // @@ -77,20 +78,20 @@ message MetadataKind { "envoy.type.metadata.v2.MetadataKind.Request"; } - // Represents metadata from :ref:`the route`. + // Represents metadata from :ref:`the route`. message Route { option (udpa.annotations.versioning).previous_message_type = "envoy.type.metadata.v2.MetadataKind.Route"; } - // Represents metadata from :ref:`the upstream cluster`. + // Represents metadata from :ref:`the upstream cluster`. message Cluster { option (udpa.annotations.versioning).previous_message_type = "envoy.type.metadata.v2.MetadataKind.Cluster"; } // Represents metadata from :ref:`the upstream - // host`. + // host`. message Host { option (udpa.annotations.versioning).previous_message_type = "envoy.type.metadata.v2.MetadataKind.Host"; diff --git a/api/envoy/type/percent.proto b/api/envoy/type/percent.proto index fc41a26662..6457e2a035 100644 --- a/api/envoy/type/percent.proto +++ b/api/envoy/type/percent.proto @@ -8,6 +8,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type"; option java_outer_classname = "PercentProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Percent] diff --git a/api/envoy/type/range.proto b/api/envoy/type/range.proto index 79aaa81975..9e66e6f225 100644 --- a/api/envoy/type/range.proto +++ b/api/envoy/type/range.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.type"; option java_outer_classname = "RangeProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Range] diff --git a/api/envoy/type/semantic_version.proto b/api/envoy/type/semantic_version.proto index 80fe016bfa..f6a508cc95 100644 --- a/api/envoy/type/semantic_version.proto +++ b/api/envoy/type/semantic_version.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.type"; option java_outer_classname = "SemanticVersionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Semantic Version] diff --git a/api/envoy/type/token_bucket.proto b/api/envoy/type/token_bucket.proto index 41b6d268d5..7419ebc003 100644 --- a/api/envoy/type/token_bucket.proto +++ b/api/envoy/type/token_bucket.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type"; option java_outer_classname = "TokenBucketProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Token bucket] diff --git a/api/envoy/type/tracing/v2/custom_tag.proto b/api/envoy/type/tracing/v2/custom_tag.proto index 7506ae8861..c37b662e51 100644 --- a/api/envoy/type/tracing/v2/custom_tag.proto +++ b/api/envoy/type/tracing/v2/custom_tag.proto @@ -10,6 +10,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.tracing.v2"; option java_outer_classname = "CustomTagProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2;tracingv2"; option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: Custom Tag] diff --git a/api/envoy/type/tracing/v3/custom_tag.proto b/api/envoy/type/tracing/v3/custom_tag.proto index bcebe5779b..feb57e8eb6 100644 --- a/api/envoy/type/tracing/v3/custom_tag.proto +++ b/api/envoy/type/tracing/v3/custom_tag.proto @@ -11,6 +11,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.tracing.v3"; option java_outer_classname = "CustomTagProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3;tracingv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Custom Tag] @@ -59,8 +60,8 @@ message CustomTag { } // Metadata type custom tag using - // :ref:`MetadataKey ` to retrieve the protobuf value - // from :ref:`Metadata `, and populate the tag value with + // :ref:`MetadataKey ` to retrieve the protobuf value + // from :ref:`Metadata `, and populate the tag value with // `the canonical JSON `_ // representation of it. message Metadata { diff --git a/api/envoy/type/v3/hash_policy.proto b/api/envoy/type/v3/hash_policy.proto index 96c3929969..69452ca71d 100644 --- a/api/envoy/type/v3/hash_policy.proto +++ b/api/envoy/type/v3/hash_policy.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "HashPolicyProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Hash Policy] @@ -23,9 +24,20 @@ message HashPolicy { option (udpa.annotations.versioning).previous_message_type = "envoy.type.HashPolicy.SourceIp"; } + // An Object in the :ref:`filterState ` will be used + // to compute the hash used by hash-based load balancing algorithms. + message FilterState { + // The name of the Object in the filterState, which is an Envoy::Hashable object. If there is no + // data associated with the key, or the stored object is not Envoy::Hashable, no hash will be + // produced. + string key = 1 [(validate.rules).string = {min_len: 1}]; + } + oneof policy_specifier { option (validate.required) = true; SourceIp source_ip = 1; + + FilterState filter_state = 2; } } diff --git a/api/envoy/type/v3/http.proto b/api/envoy/type/v3/http.proto index fec15d11f8..a1a5a04fc8 100644 --- a/api/envoy/type/v3/http.proto +++ b/api/envoy/type/v3/http.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "HttpProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP] diff --git a/api/envoy/type/v3/http_status.proto b/api/envoy/type/v3/http_status.proto index 8914b7a026..ab03e1b2b7 100644 --- a/api/envoy/type/v3/http_status.proto +++ b/api/envoy/type/v3/http_status.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "HttpStatusProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: HTTP status codes] diff --git a/api/envoy/type/v3/percent.proto b/api/envoy/type/v3/percent.proto index 3a89a3f44f..e041ecddc7 100644 --- a/api/envoy/type/v3/percent.proto +++ b/api/envoy/type/v3/percent.proto @@ -9,6 +9,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "PercentProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Percent] diff --git a/api/envoy/type/v3/range.proto b/api/envoy/type/v3/range.proto index de1d55b09a..3b1af81485 100644 --- a/api/envoy/type/v3/range.proto +++ b/api/envoy/type/v3/range.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "RangeProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Range] diff --git a/api/envoy/type/v3/ratelimit_unit.proto b/api/envoy/type/v3/ratelimit_unit.proto index a3fb27ff47..b976e6842a 100644 --- a/api/envoy/type/v3/ratelimit_unit.proto +++ b/api/envoy/type/v3/ratelimit_unit.proto @@ -7,6 +7,7 @@ import "udpa/annotations/status.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "RatelimitUnitProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Ratelimit Time Unit] diff --git a/api/envoy/type/v3/semantic_version.proto b/api/envoy/type/v3/semantic_version.proto index a4126336f0..e1567612ab 100644 --- a/api/envoy/type/v3/semantic_version.proto +++ b/api/envoy/type/v3/semantic_version.proto @@ -8,6 +8,7 @@ import "udpa/annotations/versioning.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "SemanticVersionProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Semantic Version] diff --git a/api/envoy/type/v3/token_bucket.proto b/api/envoy/type/v3/token_bucket.proto index a96d50fbd0..87686d57b0 100644 --- a/api/envoy/type/v3/token_bucket.proto +++ b/api/envoy/type/v3/token_bucket.proto @@ -12,6 +12,7 @@ import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.type.v3"; option java_outer_classname = "TokenBucketProto"; option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Token bucket] diff --git a/api/envoy/watchdog/v3alpha/abort_action.proto b/api/envoy/watchdog/v3/abort_action.proto similarity index 80% rename from api/envoy/watchdog/v3alpha/abort_action.proto rename to api/envoy/watchdog/v3/abort_action.proto index 3f47fddaa7..9f3e3b03a4 100644 --- a/api/envoy/watchdog/v3alpha/abort_action.proto +++ b/api/envoy/watchdog/v3/abort_action.proto @@ -1,17 +1,15 @@ syntax = "proto3"; -package envoy.watchdog.v3alpha; +package envoy.watchdog.v3; import "google/protobuf/duration.proto"; import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.watchdog.v3alpha"; +option java_package = "io.envoyproxy.envoy.watchdog.v3"; option java_outer_classname = "AbortActionProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).work_in_progress = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/watchdog/v3;watchdogv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: Watchdog Action that kills a stuck thread to kill the process.] diff --git a/api/pb/lyft/ratelimit/rls.proto b/api/pb/lyft/ratelimit/rls.proto deleted file mode 100644 index dd7009b984..0000000000 --- a/api/pb/lyft/ratelimit/rls.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package pb.lyft.ratelimit; - -import "envoy/service/ratelimit/v2/rls.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.pb.lyft.ratelimit"; -option java_outer_classname = "RlsProto"; -option java_multiple_files = true; -option java_generic_services = true; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.ratelimit.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Rate Limit Service (RLS)] - -service RateLimitService { - rpc ShouldRateLimit(envoy.service.ratelimit.v2.RateLimitRequest) - returns (envoy.service.ratelimit.v2.RateLimitResponse) { - } -} diff --git a/build-aux/generate.mk b/build-aux/generate.mk index 520dd3363d..9ae9128cd6 100644 --- a/build-aux/generate.mk +++ b/build-aux/generate.mk @@ -43,9 +43,7 @@ generate/files += $(patsubst $(OSS_HOME)/api/%.proto, $(O generate/files += $(patsubst $(OSS_HOME)/api/%.proto, $(OSS_HOME)/pkg/api/%.pb.go , $(shell find $(OSS_HOME)/api/agent/ -name '*.proto')) $(OSS_HOME)/pkg/api/agent/ # Whole directories with one rule for the whole directory generate/files += $(OSS_HOME)/api/envoy/ # recipe in _cxx/envoy.mk -generate/files += $(OSS_HOME)/api/pb/ # recipe in _cxx/envoy.mk generate/files += $(OSS_HOME)/pkg/api/envoy/ # recipe in _cxx/envoy.mk -generate/files += $(OSS_HOME)/pkg/api/pb/ # recipe in _cxx/envoy.mk generate/files += $(OSS_HOME)/pkg/envoy-control-plane/ # recipe in _cxx/envoy.mk # Individual files: Misc generate/files += $(OSS_HOME)/DEPENDENCIES.md @@ -76,7 +74,7 @@ generate: # This (generating specific targets early, then having a separate `_generate`) is a hack. Because the # full value of $(generate/files) is based on the listing of files in $(OSS_HOME)/api/, we need to # make sure that those directories are fully populated before we evaluate the full $(generate/files). - $(MAKE) $(OSS_HOME)/api/envoy $(OSS_HOME)/api/pb + $(MAKE) $(OSS_HOME)/api/envoy $(MAKE) _generate _generate: @echo '$(MAKE) $$(generate/files)'; $(MAKE) $(patsubst %/,%,$(generate/files)) diff --git a/builder/builder.mk b/builder/builder.mk index 0d970ed185..5179bd7b35 100644 --- a/builder/builder.mk +++ b/builder/builder.mk @@ -327,12 +327,6 @@ build-aux/pytest-kat.txt: build-aux/%: build-aux/.%.stamp $(tools/copy-ifchanged clean: build-aux/.pytest-kat.txt.stamp.rm build-aux/pytest-kat.txt.rm pytest-kat-envoy3-%: build-aux/pytest-kat.txt $(tools/py-split-tests) $(MAKE) pytest KAT_RUN_MODE=envoy PYTEST_ARGS="$$PYTEST_ARGS -k '$$($(tools/py-split-tests) $(subst -of-, ,$*) - + The envoy version included in $productName$ has been upgraded from 1.17 to latest patch + release of 1.22. This provides $produceName$ with the latest security patches, performances enhancments, + and features offered by the envoy proxy. One notable change that will effect users is the removal + of support for V2 tranport protocol. See below for more information. + docs: https://www.envoyproxy.io/docs/envoy/latest/version_history/v1.22/v1.22.0 - title: Envoy xDS v2 API removal, removal of ECMAScript regexes type: change body: >- @@ -51,9 +59,8 @@ items: Users who rely on the specific ECMAScript Regex syntax will need to rewrite their regular expressions with RE2 syntax before upgrading to $productName$ 3.0.0. - Note that the AMBASSADOR_ENVOY_API_VERSION environment variable is now a - misnomer, as it no longer configures which xDS API version is used, but it still affects - what the default protocol used for a TracingService that points at Zipkin. + As the xDS version is no longer configurable and the range of supported Zipkin protocols + is reduced (see below), the AMBASSADOR_ENVOY_API_VERSION environment variable has been removed. - title: Support for protocol_version v2 is removed type: change body: >- @@ -63,6 +70,14 @@ items: value of v2 will cause an error to be posted. Therefore, you will need to set it to protocol_version: "v3". If upgrading from a previous version you will want to set it to "v3" and ensure it is working before upgrading to $productName$ 3.Y. + - title: Support for Zipkin HTTP_JSON_V1 protocol is removed + type: change + body: >- + With the upgrade to Envoy 1.22, the zipkin driver for the TraceService + no longer supports setting the collector_endpoint_version: HTTP_JSON_V1. This was removed + in Envoy 1.20 - . + The new default will be collector_endpoint_version: HTTP_JSON, regardless of the + AMBASSADOR_ENVOY_API_VERSION environment variable. - title: Default YAML disables the diagnostics interface type: change body: >- @@ -84,6 +99,26 @@ items: *-migration.yaml files have not been part of the migration instructions, and while the *-agent.yaml files remained part of the instructions they were actually unnescessary. + - title: Metric naming change for grpc_stats + type: change + body: >- + The previous version of $productName$ was based on Envoy 1.17 and when using grpc_stats + with all_methods or services set, it would output metrics in + the following format envoy_cluster_grpc_{ServiceName}_{statname}. When + neither of these fields are set it would be aggregated to envoy_cluster_grpc_{statname}. + + The new behavior since Envoy 1.18 will produce metrics in the following format + envoy_cluster_grpc_{MethodName}_statsname and envoy_cluster_grpc_statsname. + + After further investigation we found that Envoy doesn't properly parse service + names such as cncf.telepresence.Manager/Status. In the future, we will work + upstream Envoy to get this parsing logic fixed to ensure consistent metric naming. + - title: Default behavior for empty grpc_stats changed + type: bugfix + body: >- + Previously setting grpc_stats in the ambassador Module + without setting either grpc_stats.services or grpc_stats.all_methods + would result in crashing. Now it behaves as if grpc_stats.all_methods=false. - version: 2.3.1 date: '2022-06-09' notes: diff --git a/go.mod b/go.mod index c090b98c51..402c3e0bcf 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( github.com/Masterminds/sprig v2.22.0+incompatible github.com/argoproj/argo-rollouts v1.1.1 github.com/census-instrumentation/opencensus-proto v0.3.0 - github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe + github.com/cncf/xds/go v0.0.0-20220121163655-4a2b9fdd466b github.com/datawire/dlib v1.2.5-0.20211116212847-0316f8d7af2b github.com/datawire/dtest v0.0.0-20210928162311-722b199c4c2f github.com/datawire/go-mkopensource v0.0.0-20220218163159-cc298d9fabc4 @@ -104,6 +104,7 @@ require ( github.com/spf13/cobra v1.3.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 + go.opentelemetry.io/proto/otlp v0.7.0 golang.org/x/mod v0.5.1 golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 google.golang.org/genproto v0.0.0-20220204002441-d6cc3cc0770e @@ -143,7 +144,6 @@ require ( github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/armon/go-metrics v0.3.10 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect - github.com/cncf/xds/go v0.0.0-20220121163655-4a2b9fdd466b // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect github.com/emicklei/go-restful v2.15.0+incompatible // indirect diff --git a/go.sum b/go.sum index 456d9d6dab..881b2cc0f4 100644 --- a/go.sum +++ b/go.sum @@ -281,8 +281,6 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -1426,6 +1424,7 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.starlark.net v0.0.0-20220203230714-bb14e151c28f h1:aW4TkS39/naJa9wPSbIXtZUQOlvuUh8gxCsLRrJoByU= diff --git a/pkg/ambex/endpoint.go b/pkg/ambex/endpoint.go index 9360d1bc41..1d15bd7cea 100644 --- a/pkg/ambex/endpoint.go +++ b/pkg/ambex/endpoint.go @@ -5,12 +5,8 @@ import ( "sort" "strings" - v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - v2core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - v2endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint" v3core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - v3endpointconfig "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" ) // The Endpoints struct is how Endpoint data gets communicated to ambex. This is a bit simpler than @@ -35,34 +31,17 @@ func (e *Endpoints) RoutesString() string { return strings.Join(routes, "\n") } -// ToMap_v2 produces a map with the envoy v2 friendly forms of all the endpoint data. -func (e *Endpoints) ToMap_v2() map[string]*v2.ClusterLoadAssignment { - result := map[string]*v2.ClusterLoadAssignment{} - for name, eps := range e.Entries { - var endpoints []*v2endpoint.LbEndpoint - for _, ep := range eps { - endpoints = append(endpoints, ep.ToLbEndpoint_v2()) - } - loadAssignment := &v2.ClusterLoadAssignment{ - ClusterName: name, - Endpoints: []*v2endpoint.LocalityLbEndpoints{{LbEndpoints: endpoints}}, - } - result[name] = loadAssignment - } - return result -} - // ToMap_v3 produces a map with the envoy v3 friendly forms of all the endpoint data. -func (e *Endpoints) ToMap_v3() map[string]*v3endpointconfig.ClusterLoadAssignment { - result := map[string]*v3endpointconfig.ClusterLoadAssignment{} +func (e *Endpoints) ToMap_v3() map[string]*v3endpoint.ClusterLoadAssignment { + result := map[string]*v3endpoint.ClusterLoadAssignment{} for name, eps := range e.Entries { var endpoints []*v3endpoint.LbEndpoint for _, ep := range eps { endpoints = append(endpoints, ep.ToLbEndpoint_v3()) } - loadAssignment := &v3endpointconfig.ClusterLoadAssignment{ + loadAssignment := &v3endpoint.ClusterLoadAssignment{ ClusterName: name, - Endpoints: []*v3endpointconfig.LocalityLbEndpoints{{LbEndpoints: endpoints}}, + Endpoints: []*v3endpoint.LocalityLbEndpoints{{LbEndpoints: endpoints}}, } result[name] = loadAssignment } @@ -77,28 +56,6 @@ type Endpoint struct { Protocol string } -// ToLBEndpoint_v2 translates to envoy v2 frinedly form of the Endpoint data. -func (e *Endpoint) ToLbEndpoint_v2() *v2endpoint.LbEndpoint { - return &v2endpoint.LbEndpoint{ - HostIdentifier: &v2endpoint.LbEndpoint_Endpoint{ - Endpoint: &v2endpoint.Endpoint{ - Address: &v2core.Address{ - Address: &v2core.Address_SocketAddress{ - SocketAddress: &v2core.SocketAddress{ - Protocol: v2core.SocketAddress_Protocol(v2core.SocketAddress_Protocol_value[e.Protocol]), - Address: e.Ip, - PortSpecifier: &v2core.SocketAddress_PortValue{ - PortValue: e.Port, - }, - Ipv4Compat: true, - }, - }, - }, - }, - }, - } -} - // ToLBEndpoint_v3 translates to envoy v3 frinedly form of the Endpoint data. func (e *Endpoint) ToLbEndpoint_v3() *v3endpoint.LbEndpoint { return &v3endpoint.LbEndpoint{ diff --git a/pkg/ambex/fastpath.go b/pkg/ambex/fastpath.go index fbc138b6b1..0a01319f93 100644 --- a/pkg/ambex/fastpath.go +++ b/pkg/ambex/fastpath.go @@ -1,11 +1,11 @@ package ambex import ( - ecp_v2_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" + ecp_v3_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" ) // FastpathSnapshot holds envoy configuration that bypasses python. type FastpathSnapshot struct { - Snapshot *ecp_v2_cache.Snapshot + Snapshot *ecp_v3_cache.Snapshot Endpoints *Endpoints } diff --git a/pkg/ambex/main.go b/pkg/ambex/main.go index 7cae16d981..aded3fd524 100644 --- a/pkg/ambex/main.go +++ b/pkg/ambex/main.go @@ -8,7 +8,7 @@ package ambex * go-control-plane, several different classes manage this stuff: * * - The root of the world is a SnapshotCache. - * - import github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2, then refer + * - import github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3, then refer * to cache.SnapshotCache. * - A collection of internally consistent configuration objects is a * Snapshot (cache.Snapshot). @@ -64,34 +64,15 @@ import ( // envoy control plane ecp_cache_types "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - ecp_v2_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" ecp_v3_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" ecp_log "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" - ecp_v2_server "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v2" + ecp_v3_resource "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" ecp_v3_server "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" - // Envoy API v2 - // Be sure to import the package of any types that're referenced with "@type" in our - // generated Envoy config, even if that package is otherwise not used by ambex. - v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/auth" - v2core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v2" - v2bootstrap "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/bootstrap/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/buffer/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/ext_authz/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/gzip/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/lua/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/rate_limit/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/rbac/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/router/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/http_connection_manager/v2" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/tcp_proxy/v2" - v2discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - // Envoy API v3 // Be sure to import the package of any types that're referenced with "@type" in our // generated Envoy config, even if that package is otherwise not used by ambex. + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" v3bootstrap "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/bootstrap/v3" v3clusterconfig "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" @@ -104,6 +85,7 @@ import ( _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/compression/gzip/compressor/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/buffer/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/compressor/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/cors/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/ext_authz/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/grpc_stats/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/gzip/v3" @@ -195,18 +177,6 @@ func parseArgs(ctx context.Context, rawArgs ...string) (*Args, error) { return &args, nil } -// Hasher returns node ID as an ID -type HasherV2 struct { -} - -// ID function -func (h HasherV2) ID(node *v2core.Node) string { - if node == nil { - return "unknown" - } - return node.Id -} - // Hasher returns node ID as an ID type HasherV3 struct { } @@ -223,7 +193,7 @@ func (h HasherV3) ID(node *v3core.Node) string { // run stuff // RunManagementServer starts an xDS server at the given port. -func runManagementServer(ctx context.Context, server ecp_v2_server.Server, serverv3 ecp_v3_server.Server, adsNetwork, adsAddress string) error { +func runManagementServer(ctx context.Context, serverv3 ecp_v3_server.Server, adsNetwork, adsAddress string) error { grpcServer := grpc.NewServer() lis, err := net.Listen(adsNetwork, adsAddress) @@ -232,12 +202,6 @@ func runManagementServer(ctx context.Context, server ecp_v2_server.Server, serve } // register services - v2discovery.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) - v2.RegisterEndpointDiscoveryServiceServer(grpcServer, server) - v2.RegisterClusterDiscoveryServiceServer(grpcServer, server) - v2.RegisterRouteDiscoveryServiceServer(grpcServer, server) - v2.RegisterListenerDiscoveryServiceServer(grpcServer, server) - v3discovery.RegisterAggregatedDiscoveryServiceServer(grpcServer, serverv3) v3endpoint.RegisterEndpointDiscoveryServiceServer(grpcServer, serverv3) v3cluster.RegisterClusterDiscoveryServiceServer(grpcServer, serverv3) @@ -307,24 +271,6 @@ func Decode(ctx context.Context, name string) (proto.Message, error) { // // These "expanded" snapshots make the snapshots we log easier to read: basically, // instead of just indexing by Golang types, make the JSON marshal with real names. -type v2ExpandedSnapshot struct { - Endpoints ecp_v2_cache.Resources `json:"endpoints"` - Clusters ecp_v2_cache.Resources `json:"clusters"` - Routes ecp_v2_cache.Resources `json:"routes"` - Listeners ecp_v2_cache.Resources `json:"listeners"` - Runtimes ecp_v2_cache.Resources `json:"runtimes"` -} - -func NewV2ExpandedSnapshot(v2snap *ecp_v2_cache.Snapshot) v2ExpandedSnapshot { - return v2ExpandedSnapshot{ - Endpoints: v2snap.Resources[ecp_cache_types.Endpoint], - Clusters: v2snap.Resources[ecp_cache_types.Cluster], - Routes: v2snap.Resources[ecp_cache_types.Route], - Listeners: v2snap.Resources[ecp_cache_types.Listener], - Runtimes: v2snap.Resources[ecp_cache_types.Runtime], - } -} - type v3ExpandedSnapshot struct { Endpoints ecp_v3_cache.Resources `json:"endpoints"` Clusters ecp_v3_cache.Resources `json:"clusters"` @@ -346,7 +292,6 @@ func NewV3ExpandedSnapshot(v3snap *ecp_v3_cache.Snapshot) v3ExpandedSnapshot { // A combinedSnapshot has both a V2 and V3 snapshot, for logging. type combinedSnapshot struct { Version string `json:"version"` - V2 v2ExpandedSnapshot `json:"v2"` V3 v3ExpandedSnapshot `json:"v3"` } @@ -355,7 +300,7 @@ type combinedSnapshot struct { // is the newest, then ambex-2.json, etc., so ambex-$numsnaps.json is the oldest. // Every time we write a new one, we rename all the older ones, ditching the oldest // after we've written numsnaps snapshots. -func csDump(ctx context.Context, snapdirPath string, numsnaps int, generation int, v2snap *ecp_v2_cache.Snapshot, v3snap *ecp_v3_cache.Snapshot) { +func csDump(ctx context.Context, snapdirPath string, numsnaps int, generation int, v3snap *ecp_v3_cache.Snapshot) { if numsnaps <= 0 { // Don't do snapshotting at all. return @@ -367,7 +312,6 @@ func csDump(ctx context.Context, snapdirPath string, numsnaps int, generation in // ...and a combinedSnapshot. cs := combinedSnapshot{ Version: version, - V2: NewV2ExpandedSnapshot(v2snap), V3: NewV3ExpandedSnapshot(v3snap), } @@ -413,19 +357,13 @@ func update( ctx context.Context, snapdirPath string, numsnaps int, - config ecp_v2_cache.SnapshotCache, configv3 ecp_v3_cache.SnapshotCache, generation *int, dirs []string, - edsEndpoints map[string]*v2.ClusterLoadAssignment, edsEndpointsV3 map[string]*v3endpointconfig.ClusterLoadAssignment, fastpathSnapshot *FastpathSnapshot, updates chan<- Update, ) error { - clusters := []ecp_cache_types.Resource{} // v2.Cluster - routes := []ecp_cache_types.Resource{} // v2.RouteConfiguration - listeners := []ecp_cache_types.Resource{} // v2.Listener - runtimes := []ecp_cache_types.Resource{} // discovery.Runtime clustersv3 := []ecp_cache_types.Resource{} // v3.Cluster routesv3 := []ecp_cache_types.Resource{} // v3.RouteConfiguration @@ -456,41 +394,6 @@ func update( } var dst *[]ecp_cache_types.Resource switch m.(type) { - case *v2.Cluster: - dst = &clusters - case *v2.RouteConfiguration: - dst = &routes - case *v2.Listener: - dst = &listeners - case *v2discovery.Runtime: - dst = &runtimes - case *v2bootstrap.Bootstrap: - bs := m.(*v2bootstrap.Bootstrap) - sr := bs.StaticResources - for _, lst := range sr.Listeners { - // When the RouteConfiguration is embedded in the listener, it will cause envoy to - // go through a complete drain cycle whenever there is a routing change and that - // will potentially disrupt in-flight requests. By converting all listeners to use - // RDS rather than inlining their routing configuration, we significantly reduce the - // set of circumstances where the listener definition itself changes, and this in - // turn reduces the set of circumstances where envoy has to go through that drain - // process and disrupt in-flight requests. - rdsListener, routeConfigs, err := ListenerToRdsListener(lst) - if err != nil { - dlog.Errorf(ctx, "Error converting listener to RDS: %+v", err) - listeners = append(listeners, proto.Clone(lst).(ecp_cache_types.Resource)) - continue - } - listeners = append(listeners, rdsListener) - for _, rc := range routeConfigs { - // These routes will get included in the configuration snapshot created below. - routes = append(routes, rc) - } - } - for _, cls := range sr.Clusters { - clusters = append(clusters, proto.Clone(cls).(ecp_cache_types.Resource)) - } - continue case *v3clusterconfig.Cluster: dst = &clustersv3 case *v3routeconfig.RouteConfiguration: @@ -535,13 +438,13 @@ func update( if fastpathSnapshot != nil && fastpathSnapshot.Snapshot != nil { for _, lst := range fastpathSnapshot.Snapshot.Resources[ecp_cache_types.Listener].Items { - listeners = append(listeners, lst.Resource) + listenersv3 = append(listenersv3, lst.Resource) } for _, route := range fastpathSnapshot.Snapshot.Resources[ecp_cache_types.Route].Items { - routes = append(routes, route.Resource) + routesv3 = append(routesv3, route.Resource) } for _, clu := range fastpathSnapshot.Snapshot.Resources[ecp_cache_types.Cluster].Items { - clusters = append(clusters, clu.Resource) + clustersv3 = append(clustersv3, clu.Resource) } // We intentionally omit endpoints since those are carried separately. } @@ -569,7 +472,6 @@ func update( // warmup sequence in scenarios where the endpoint data for a cluster is really flapping into // and out of existence. In that circumstance we want to faithfully relay to envoy that the // cluster exists but currently has no endpoints. - endpoints := JoinEdsClusters(ctx, clusters, edsEndpoints) endpointsv3 := JoinEdsClustersV3(ctx, clustersv3, edsEndpointsV3) // Create a new configuration snapshot from everything we have just loaded from disk. @@ -577,31 +479,20 @@ func update( *generation++ version := fmt.Sprintf("v%d", curgen) - snapshot := ecp_v2_cache.NewSnapshot( - version, - endpoints, - clusters, - routes, - listeners, - runtimes, - nil, // secrets - ) - - if err := snapshot.Consistent(); err != nil { - bs, _ := json.Marshal(snapshot) - dlog.Errorf(ctx, "V2 Snapshot inconsistency: %v: %s", err, bs) - return nil // TODO: should we return the error, rather than just logging it? + + snapshotResources := map[ecp_v3_resource.Type][]ecp_cache_types.Resource{ + ecp_v3_resource.EndpointType: endpointsv3, + ecp_v3_resource.ClusterType: clustersv3, + ecp_v3_resource.RouteType: routesv3, + ecp_v3_resource.ListenerType: listenersv3, + ecp_v3_resource.RuntimeType: runtimesv3, } - snapshotv3 := ecp_v3_cache.NewSnapshot( - version, - endpointsv3, - clustersv3, - routesv3, - listenersv3, - runtimesv3, - nil, // secrets - ) + snapshotv3, err := ecp_v3_cache.NewSnapshot(version, snapshotResources) + if err != nil { + dlog.Errorf(ctx, "V3 Snapshot error: %v", err) + return nil // TODO: should we return the error, rather than just logging it? + } if err := snapshotv3.Consistent(); err != nil { bs, _ := json.Marshal(snapshotv3) @@ -614,17 +505,12 @@ func update( // the ratelimiting logic decides. dlog.Debugf(ctx, "Created snapshot %s", version) - csDump(ctx, snapdirPath, numsnaps, curgen, &snapshot, &snapshotv3) + csDump(ctx, snapdirPath, numsnaps, curgen, &snapshotv3) update := Update{version, func() error { dlog.Debugf(ctx, "Accepting snapshot %s", version) - err := config.SetSnapshot("test-id", snapshot) - if err != nil { - return fmt.Errorf("V2 Snapshot error %q for %+v", err, snapshot) - } - - err = configv3.SetSnapshot("test-id", snapshotv3) + err = configv3.SetSnapshot(ctx, "test-id", snapshotv3) if err != nil { return fmt.Errorf("V3 Snapshot error %q for %+v", err, snapshotv3) } @@ -645,14 +531,6 @@ func update( type logAdapterBase struct { prefix string } - -type logAdapterV2 struct { - logAdapterBase -} - -var _ ecp_v2_server.Callbacks = logAdapterV2{} -var _ ecp_log.Logger = logAdapterV2{} - type logAdapterV3 struct { logAdapterBase } @@ -680,24 +558,17 @@ func (l logAdapterBase) Errorf(format string, args ...interface{}) { dlog.Errorf(context.TODO(), format, args...) } -// OnStreamOpen implements ecp_v2_server.Callbacks and ecp_v3_server.Callbacks. +// OnStreamOpen implements ecp_v3_server.Callbacks. func (l logAdapterBase) OnStreamOpen(ctx context.Context, sid int64, stype string) error { dlog.Debugf(ctx, "%v Stream open[%v]: %v", l.prefix, sid, stype) return nil } -// OnStreamClosed implements ecp_v2_server.Callbacks and ecp_v3_server.Callbacks. +// OnStreamClosed implements ecp_v3_server.Callbacks. func (l logAdapterBase) OnStreamClosed(sid int64) { dlog.Debugf(context.TODO(), "%v Stream closed[%v]", l.prefix, sid) } -// OnStreamRequest implements ecp_v2_server.Callbacks. -func (l logAdapterV2) OnStreamRequest(sid int64, req *v2.DiscoveryRequest) error { - dlog.Debugf(context.TODO(), "V2 Stream request[%v] for type %s: requesting %d resources", sid, req.TypeUrl, len(req.ResourceNames)) - dlog.Debugf(context.TODO(), "V2 Stream request[%v] dump: %v", sid, req) - return nil -} - // OnStreamRequest implements ecp_v3_server.Callbacks. func (l logAdapterV3) OnStreamRequest(sid int64, req *v3discovery.DiscoveryRequest) error { dlog.Debugf(context.TODO(), "V3 Stream request[%v] for type %s: requesting %d resources", sid, req.TypeUrl, len(req.ResourceNames)) @@ -705,35 +576,42 @@ func (l logAdapterV3) OnStreamRequest(sid int64, req *v3discovery.DiscoveryReque return nil } -// OnStreamResponse implements ecp_v2_server.Callbacks. -func (l logAdapterV2) OnStreamResponse(sid int64, req *v2.DiscoveryRequest, res *v2.DiscoveryResponse) { - dlog.Debugf(context.TODO(), "V2 Stream response[%v] for type %s: returning %d resources", sid, res.TypeUrl, len(res.Resources)) - dlog.Debugf(context.TODO(), "V2 Stream dump response[%v]: %v -> %v", sid, req, res) +// OnStreamResponse implements ecp_v3_server.Callbacks. +func (l logAdapterV3) OnStreamResponse(ctx context.Context, sid int64, req *v3discovery.DiscoveryRequest, res *v3discovery.DiscoveryResponse) { + dlog.Debugf(ctx, "V3 Stream response[%v] for type %s: returning %d resources", sid, res.TypeUrl, len(res.Resources)) + dlog.Debugf(ctx, "V3 Stream dump response[%v]: %v -> %v", sid, req, res) +} + +// OnDeltaStreamOpen implements ecp_v3_server.Callbacks. +func (l logAdapterV3) OnDeltaStreamOpen(ctx context.Context, sid int64, stype string) error { + dlog.Debugf(ctx, "%v DeltaStream open[%v]: %v", l.prefix, sid, stype) + return nil } -// OnStreamResponse implements ecp_v3_server.Callbacks. -func (l logAdapterV3) OnStreamResponse(sid int64, req *v3discovery.DiscoveryRequest, res *v3discovery.DiscoveryResponse) { - dlog.Debugf(context.TODO(), "V3 Stream response[%v] for type %s: returning %d resources", sid, res.TypeUrl, len(res.Resources)) - dlog.Debugf(context.TODO(), "V3 Stream dump response[%v]: %v -> %v", sid, req, res) +// OnDeltaStreamClosed implements ecp_v3_server.Callbacks. +func (l logAdapterV3) OnDeltaStreamClosed(sid int64) { + dlog.Debugf(context.TODO(), "%v DeltaStream closed[%v]", l.prefix, sid) } -// OnFetchRequest implements ecp_v2_server.Callbacks. -func (l logAdapterV2) OnFetchRequest(ctx context.Context, r *v2.DiscoveryRequest) error { - dlog.Debugf(ctx, "V2 Fetch request: %v", r) +// OnStreamDeltaRequest implements ecp_v3_server.Callbacks. +func (l logAdapterV3) OnStreamDeltaRequest(sid int64, req *v3discovery.DeltaDiscoveryRequest) error { + dlog.Debugf(context.TODO(), "V3 Stream DeltaRequest[%v] for type %s: subscribing for %d resources", sid, req.TypeUrl, len(req.ResourceNamesSubscribe)) + dlog.Debugf(context.TODO(), "V3 Stream DeltaRequest[%v] dump: %v", sid, req) return nil } +// OnStreamDelatResponse implements ecp_v3_server.Callbacks. +func (l logAdapterV3) OnStreamDeltaResponse(sid int64, req *v3discovery.DeltaDiscoveryRequest, res *v3discovery.DeltaDiscoveryResponse) { + dlog.Debugf(context.TODO(), "V3 Stream dump DeltaResponse[%v] for type %s: returning %d resources", sid, res.TypeUrl, len(res.Resources)) + dlog.Debugf(context.TODO(), "V3 Stream dump DeltaResponse[%v]: %v -> %v", sid, req, res) +} + // OnFetchRequest implements ecp_v3_server.Callbacks. func (l logAdapterV3) OnFetchRequest(ctx context.Context, r *v3discovery.DiscoveryRequest) error { dlog.Debugf(ctx, "V3 Fetch request: %v", r) return nil } -// OnFetchResponse implements ecp_v2_server.Callbacks. -func (l logAdapterV2) OnFetchResponse(req *v2.DiscoveryRequest, res *v2.DiscoveryResponse) { - dlog.Debugf(context.TODO(), "V2 Fetch response: %v -> %v", req, res) -} - // OnFetchResponse implements ecp_v3_server.Callbacks. func (l logAdapterV3) OnFetchResponse(req *v3discovery.DiscoveryRequest, res *v3discovery.DiscoveryResponse) { dlog.Debugf(context.TODO(), "V3 Fetch response: %v -> %v", req, res) @@ -779,15 +657,13 @@ func Main( ctx, cancel := context.WithCancel(ctx) defer cancel() - config := ecp_v2_cache.NewSnapshotCache(true, HasherV2{}, logAdapterV2{logAdapterBase{"V2"}}) configv3 := ecp_v3_cache.NewSnapshotCache(true, HasherV3{}, logAdapterV3{logAdapterBase{"V3"}}) - server := ecp_v2_server.NewServer(ctx, config, logAdapterV2{logAdapterBase{"V2"}}) serverv3 := ecp_v3_server.NewServer(ctx, configv3, logAdapterV3{logAdapterBase{"V3"}}) grp := dgroup.NewGroup(ctx, dgroup.GroupConfig{}) grp.Go("management-server", func(ctx context.Context) error { - return runManagementServer(ctx, server, serverv3, args.adsNetwork, args.adsAddress) + return runManagementServer(ctx, serverv3, args.adsNetwork, args.adsAddress) }) pid := os.Getpid() @@ -807,7 +683,6 @@ func Main( grp.Go("main-loop", func(ctx context.Context) error { generation := 0 var fastpathSnapshot *FastpathSnapshot - edsEndpoints := map[string]*v2.ClusterLoadAssignment{} edsEndpointsV3 := map[string]*v3endpointconfig.ClusterLoadAssignment{} // We always start by updating with a totally empty snapshot. @@ -818,11 +693,9 @@ func Main( ctx, args.snapdirPath, args.numsnaps, - config, configv3, &generation, args.dirs, - edsEndpoints, edsEndpointsV3, fastpathSnapshot, updates, @@ -835,16 +708,14 @@ func Main( for { select { - case _ = <-sigCh: + case <-sigCh: err := update( ctx, args.snapdirPath, args.numsnaps, - config, configv3, &generation, args.dirs, - edsEndpoints, edsEndpointsV3, fastpathSnapshot, updates, @@ -855,7 +726,6 @@ func Main( case fpSnap := <-fastpathCh: // Fastpath update. Grab new endpoints and update. if fpSnap.Endpoints != nil { - edsEndpoints = fpSnap.Endpoints.ToMap_v2() edsEndpointsV3 = fpSnap.Endpoints.ToMap_v3() } fastpathSnapshot = fpSnap @@ -863,11 +733,9 @@ func Main( ctx, args.snapdirPath, args.numsnaps, - config, configv3, &generation, args.dirs, - edsEndpoints, edsEndpointsV3, fastpathSnapshot, updates, @@ -881,11 +749,9 @@ func Main( ctx, args.snapdirPath, args.numsnaps, - config, configv3, &generation, args.dirs, - edsEndpoints, edsEndpointsV3, fastpathSnapshot, updates, diff --git a/pkg/ambex/transforms.go b/pkg/ambex/transforms.go index 3cb72814a6..aa150ef843 100644 --- a/pkg/ambex/transforms.go +++ b/pkg/ambex/transforms.go @@ -9,24 +9,16 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" - // envoy api v2 - apiv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - apiv2_core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - apiv2_endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint" - apiv2_listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/listener" - apiv2_httpman "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/http_connection_manager/v2" - // envoy api v3 - apiv3_cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" - apiv3_core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - apiv3_endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - apiv3_listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" - apiv3_route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" - apiv3_httpman "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3" + v3cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" + v3core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" + v3listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" + v3route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" + v3httpman "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3" // envoy control plane ecp_cache_types "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - ecp_v2_resource "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" ecp_v3_resource "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" ecp_wellknown "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/wellknown" @@ -118,70 +110,11 @@ import ( // ] // } // ] -func ListenerToRdsListener(lnr *apiv2.Listener) (*apiv2.Listener, []*apiv2.RouteConfiguration, error) { - l := proto.Clone(lnr).(*apiv2.Listener) - var routes []*apiv2.RouteConfiguration - for _, fc := range l.FilterChains { - for _, f := range fc.Filters { - if f.Name != ecp_wellknown.HTTPConnectionManager { - // We only know how to create an rds listener for HttpConnectionManager - // listeners. We must ignore all other listeners. - continue - } - - // Note that the hcm configuration is stored in a protobuf any, so √the - // GetHTTPConnectionManager is actually returning an unmarshalled copy. - hcm := ecp_v2_resource.GetHTTPConnectionManager(f) - if hcm != nil { - // RouteSpecifier is a protobuf oneof that corresponds to the rds, route_config, and - // scoped_routes fields. Only one of those may be set at a time. - rs, ok := hcm.RouteSpecifier.(*apiv2_httpman.HttpConnectionManager_RouteConfig) - if ok { - rc := rs.RouteConfig - if rc.Name == "" { - // Generate a unique name for the RouteConfiguration that we can use to - // correlate the listener to the RDS record. We use the listener name plus - // an index because there can be more than one route configuration - // associated with a given listener. - rc.Name = fmt.Sprintf("%s-routeconfig-%d", l.Name, len(routes)) - } - routes = append(routes, rc) - // Now that we have extracted and named the RouteConfiguration, we change the - // RouteSpecifier from the inline RouteConfig variation to RDS via ADS. This - // will cause it to use whatever ADS source is defined in the bootstrap - // configuration. - hcm.RouteSpecifier = &apiv2_httpman.HttpConnectionManager_Rds{ - Rds: &apiv2_httpman.Rds{ - ConfigSource: &apiv2_core.ConfigSource{ - ConfigSourceSpecifier: &apiv2_core.ConfigSource_Ads{ - Ads: &apiv2_core.AggregatedConfigSource{}, - }, - }, - RouteConfigName: rc.Name, - }, - } - } - - // Because the hcm is a protobuf any, we need to remarshal it, we can't simply - // expect the above modifications to take effect on our clone of the input. There is - // also a protobuf oneof that includes the deprecated config and typed_config - // fields. - any, err := anypb.New(hcm) - if err != nil { - return nil, nil, err - } - f.ConfigType = &apiv2_listener.Filter_TypedConfig{TypedConfig: any} - } - } - } - - return l, routes, nil -} // V3ListenerToRdsListener is the v3 variety of ListnerToRdsListener -func V3ListenerToRdsListener(lnr *apiv3_listener.Listener) (*apiv3_listener.Listener, []*apiv3_route.RouteConfiguration, error) { - l := proto.Clone(lnr).(*apiv3_listener.Listener) - var routes []*apiv3_route.RouteConfiguration +func V3ListenerToRdsListener(lnr *v3listener.Listener) (*v3listener.Listener, []*v3route.RouteConfiguration, error) { + l := proto.Clone(lnr).(*v3listener.Listener) + var routes []*v3route.RouteConfiguration for _, fc := range l.FilterChains { for _, f := range fc.Filters { if f.Name != ecp_wellknown.HTTPConnectionManager { @@ -196,7 +129,7 @@ func V3ListenerToRdsListener(lnr *apiv3_listener.Listener) (*apiv3_listener.List if hcm != nil { // RouteSpecifier is a protobuf oneof that corresponds to the rds, route_config, and // scoped_routes fields. Only one of those may be set at a time. - rs, ok := hcm.RouteSpecifier.(*apiv3_httpman.HttpConnectionManager_RouteConfig) + rs, ok := hcm.RouteSpecifier.(*v3httpman.HttpConnectionManager_RouteConfig) if ok { rc := rs.RouteConfig if rc.Name == "" { @@ -211,13 +144,13 @@ func V3ListenerToRdsListener(lnr *apiv3_listener.Listener) (*apiv3_listener.List // RouteSpecifier from the inline RouteConfig variation to RDS via ADS. This // will cause it to use whatever ADS source is defined in the bootstrap // configuration. - hcm.RouteSpecifier = &apiv3_httpman.HttpConnectionManager_Rds{ - Rds: &apiv3_httpman.Rds{ - ConfigSource: &apiv3_core.ConfigSource{ - ConfigSourceSpecifier: &apiv3_core.ConfigSource_Ads{ - Ads: &apiv3_core.AggregatedConfigSource{}, + hcm.RouteSpecifier = &v3httpman.HttpConnectionManager_Rds{ + Rds: &v3httpman.Rds{ + ConfigSource: &v3core.ConfigSource{ + ConfigSourceSpecifier: &v3core.ConfigSource_Ads{ + Ads: &v3core.AggregatedConfigSource{}, }, - ResourceApiVersion: apiv3_core.ApiVersion_V3, + ResourceApiVersion: v3core.ApiVersion_V3, }, RouteConfigName: rc.Name, }, @@ -232,7 +165,7 @@ func V3ListenerToRdsListener(lnr *apiv3_listener.Listener) (*apiv3_listener.List if err != nil { return nil, nil, err } - f.ConfigType = &apiv3_listener.Filter_TypedConfig{TypedConfig: any} + f.ConfigType = &v3listener.Filter_TypedConfig{TypedConfig: any} } } } @@ -246,9 +179,9 @@ func V3ListenerToRdsListener(lnr *apiv3_listener.Listener) (*apiv3_listener.List // the supplied list. If there is no map entry for a given cluster, an empty ClusterLoadAssignment // will be synthesized. The result is a set of endpoints that are consistent (by the // go-control-plane's definition of consistent) with the input clusters. -func JoinEdsClusters(ctx context.Context, clusters []ecp_cache_types.Resource, edsEndpoints map[string]*apiv2.ClusterLoadAssignment) (endpoints []ecp_cache_types.Resource) { +func JoinEdsClusters(ctx context.Context, clusters []ecp_cache_types.Resource, edsEndpoints map[string]*v3endpoint.ClusterLoadAssignment) (endpoints []ecp_cache_types.Resource) { for _, clu := range clusters { - c := clu.(*apiv2.Cluster) + c := clu.(*v3cluster.Cluster) // Don't mess with non EDS clusters. if c.EdsClusterConfig == nil { continue @@ -266,9 +199,9 @@ func JoinEdsClusters(ctx context.Context, clusters []ecp_cache_types.Resource, e if ok { source = "found" } else { - ep = &apiv2.ClusterLoadAssignment{ + ep = &v3endpoint.ClusterLoadAssignment{ ClusterName: ref, - Endpoints: []*apiv2_endpoint.LocalityLbEndpoints{}, + Endpoints: []*v3endpoint.LocalityLbEndpoints{}, } source = "synthesized" } @@ -286,9 +219,9 @@ func JoinEdsClusters(ctx context.Context, clusters []ecp_cache_types.Resource, e // the supplied list. If there is no map entry for a given cluster, an empty ClusterLoadAssignment // will be synthesized. The result is a set of endpoints that are consistent (by the // go-control-plane's definition of consistent) with the input clusters. -func JoinEdsClustersV3(ctx context.Context, clusters []ecp_cache_types.Resource, edsEndpoints map[string]*apiv3_endpoint.ClusterLoadAssignment) (endpoints []ecp_cache_types.Resource) { +func JoinEdsClustersV3(ctx context.Context, clusters []ecp_cache_types.Resource, edsEndpoints map[string]*v3endpoint.ClusterLoadAssignment) (endpoints []ecp_cache_types.Resource) { for _, clu := range clusters { - c := clu.(*apiv3_cluster.Cluster) + c := clu.(*v3cluster.Cluster) // Don't mess with non EDS clusters. if c.EdsClusterConfig == nil { continue @@ -306,9 +239,9 @@ func JoinEdsClustersV3(ctx context.Context, clusters []ecp_cache_types.Resource, if ok { source = "found" } else { - ep = &apiv3_endpoint.ClusterLoadAssignment{ + ep = &v3endpoint.ClusterLoadAssignment{ ClusterName: ref, - Endpoints: []*apiv3_endpoint.LocalityLbEndpoints{}, + Endpoints: []*v3endpoint.LocalityLbEndpoints{}, } source = "synthesized" } diff --git a/pkg/api/envoy/admin/v2alpha/certs.pb.go b/pkg/api/envoy/admin/v2alpha/certs.pb.go index daa85655c1..1c81958d37 100644 --- a/pkg/api/envoy/admin/v2alpha/certs.pb.go +++ b/pkg/api/envoy/admin/v2alpha/certs.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/certs.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Proto representation of certificate details. Admin endpoint uses this wrapper for `/certs` to // display certificate information. See :ref:`/certs ` for more // information. @@ -378,11 +373,15 @@ var file_envoy_admin_v2alpha_certs_proto_rawDesc = []byte{ 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x39, 0x0a, 0x21, 0x69, 0x6f, + 0x73, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x75, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x0a, 0x43, 0x65, 0x72, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x43, 0x65, 0x72, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/certs.pb.validate.go b/pkg/api/envoy/admin/v2alpha/certs.pb.validate.go index 41382bbd37..0248c3163f 100644 --- a/pkg/api/envoy/admin/v2alpha/certs.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/certs.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/certs.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Certificates with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Certificates) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Certificates with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CertificatesMultiError, or +// nil if none found. +func (m *Certificates) ValidateAll() error { + return m.validate(true) +} + +func (m *Certificates) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetCertificates() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificatesValidationError{ + field: fmt.Sprintf("Certificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificatesValidationError{ + field: fmt.Sprintf("Certificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificatesValidationError{ field: fmt.Sprintf("Certificates[%v]", idx), @@ -56,9 +91,29 @@ func (m *Certificates) Validate() error { } + if len(errors) > 0 { + return CertificatesMultiError(errors) + } + return nil } +// CertificatesMultiError is an error wrapping multiple validation errors +// returned by Certificates.ValidateAll() if the designated constraints aren't met. +type CertificatesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificatesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificatesMultiError) AllErrors() []error { return m } + // CertificatesValidationError is the validation error returned by // Certificates.Validate if the designated constraints aren't met. type CertificatesValidationError struct { @@ -114,17 +169,50 @@ var _ interface { } = CertificatesValidationError{} // Validate checks the field values on Certificate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Certificate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Certificate with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CertificateMultiError, or +// nil if none found. +func (m *Certificate) ValidateAll() error { + return m.validate(true) +} + +func (m *Certificate) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetCaCert() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CaCert[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CaCert[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationError{ field: fmt.Sprintf("CaCert[%v]", idx), @@ -139,7 +227,26 @@ func (m *Certificate) Validate() error { for idx, item := range m.GetCertChain() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CertChain[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CertChain[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationError{ field: fmt.Sprintf("CertChain[%v]", idx), @@ -151,9 +258,29 @@ func (m *Certificate) Validate() error { } + if len(errors) > 0 { + return CertificateMultiError(errors) + } + return nil } +// CertificateMultiError is an error wrapping multiple validation errors +// returned by Certificate.ValidateAll() if the designated constraints aren't met. +type CertificateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateMultiError) AllErrors() []error { return m } + // CertificateValidationError is the validation error returned by // Certificate.Validate if the designated constraints aren't met. type CertificateValidationError struct { @@ -210,12 +337,26 @@ var _ interface { // Validate checks the field values on CertificateDetails with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CertificateDetails) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateDetails with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CertificateDetailsMultiError, or nil if none found. +func (m *CertificateDetails) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateDetails) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Path // no validation rules for SerialNumber @@ -223,7 +364,26 @@ func (m *CertificateDetails) Validate() error { for idx, item := range m.GetSubjectAltNames() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: fmt.Sprintf("SubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: fmt.Sprintf("SubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetailsValidationError{ field: fmt.Sprintf("SubjectAltNames[%v]", idx), @@ -237,7 +397,26 @@ func (m *CertificateDetails) Validate() error { // no validation rules for DaysUntilExpiration - if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidFrom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetailsValidationError{ field: "ValidFrom", @@ -247,7 +426,26 @@ func (m *CertificateDetails) Validate() error { } } - if v, ok := interface{}(m.GetExpirationTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExpirationTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpirationTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetailsValidationError{ field: "ExpirationTime", @@ -257,9 +455,30 @@ func (m *CertificateDetails) Validate() error { } } + if len(errors) > 0 { + return CertificateDetailsMultiError(errors) + } + return nil } +// CertificateDetailsMultiError is an error wrapping multiple validation errors +// returned by CertificateDetails.ValidateAll() if the designated constraints +// aren't met. +type CertificateDetailsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateDetailsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateDetailsMultiError) AllErrors() []error { return m } + // CertificateDetailsValidationError is the validation error returned by // CertificateDetails.Validate if the designated constraints aren't met. type CertificateDetailsValidationError struct { @@ -318,12 +537,26 @@ var _ interface { // Validate checks the field values on SubjectAlternateName with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SubjectAlternateName) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectAlternateName with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SubjectAlternateNameMultiError, or nil if none found. +func (m *SubjectAlternateName) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectAlternateName) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Name.(type) { case *SubjectAlternateName_Dns: @@ -337,9 +570,30 @@ func (m *SubjectAlternateName) Validate() error { } + if len(errors) > 0 { + return SubjectAlternateNameMultiError(errors) + } + return nil } +// SubjectAlternateNameMultiError is an error wrapping multiple validation +// errors returned by SubjectAlternateName.ValidateAll() if the designated +// constraints aren't met. +type SubjectAlternateNameMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectAlternateNameMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectAlternateNameMultiError) AllErrors() []error { return m } + // SubjectAlternateNameValidationError is the validation error returned by // SubjectAlternateName.Validate if the designated constraints aren't met. type SubjectAlternateNameValidationError struct { diff --git a/pkg/api/envoy/admin/v2alpha/clusters.pb.go b/pkg/api/envoy/admin/v2alpha/clusters.pb.go index 4eed7983e0..daeeec8b98 100644 --- a/pkg/api/envoy/admin/v2alpha/clusters.pb.go +++ b/pkg/api/envoy/admin/v2alpha/clusters.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/clusters.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Admin endpoint uses this wrapper for `/clusters` to display cluster status information. // See :ref:`/clusters ` for more information. type Clusters struct { @@ -434,7 +429,7 @@ func (x *HostHealthStatus) GetEdsHealthStatus() core.HealthStatus { if x != nil { return x.EdsHealthStatus } - return core.HealthStatus_UNKNOWN + return core.HealthStatus(0) } var File_envoy_admin_v2alpha_clusters_proto protoreflect.FileDescriptor @@ -536,11 +531,15 @@ var file_envoy_admin_v2alpha_clusters_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x65, 0x64, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3c, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x78, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/clusters.pb.validate.go b/pkg/api/envoy/admin/v2alpha/clusters.pb.validate.go index 8beb7015f7..64284fbb24 100644 --- a/pkg/api/envoy/admin/v2alpha/clusters.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/clusters.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/clusters.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ) @@ -32,22 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = core.HealthStatus(0) ) // Validate checks the field values on Clusters with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Clusters) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Clusters with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClustersMultiError, or nil +// if none found. +func (m *Clusters) ValidateAll() error { + return m.validate(true) +} + +func (m *Clusters) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetClusterStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersValidationError{ + field: fmt.Sprintf("ClusterStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersValidationError{ + field: fmt.Sprintf("ClusterStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersValidationError{ field: fmt.Sprintf("ClusterStatuses[%v]", idx), @@ -59,9 +95,29 @@ func (m *Clusters) Validate() error { } + if len(errors) > 0 { + return ClustersMultiError(errors) + } + return nil } +// ClustersMultiError is an error wrapping multiple validation errors returned +// by Clusters.ValidateAll() if the designated constraints aren't met. +type ClustersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersMultiError) AllErrors() []error { return m } + // ClustersValidationError is the validation error returned by // Clusters.Validate if the designated constraints aren't met. type ClustersValidationError struct { @@ -117,18 +173,51 @@ var _ interface { } = ClustersValidationError{} // Validate checks the field values on ClusterStatus with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterStatus with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterStatusMultiError, or +// nil if none found. +func (m *ClusterStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for AddedViaApi - if v, ok := interface{}(m.GetSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateEjectionThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "SuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "SuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatusValidationError{ field: "SuccessRateEjectionThreshold", @@ -141,7 +230,26 @@ func (m *ClusterStatus) Validate() error { for idx, item := range m.GetHostStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: fmt.Sprintf("HostStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: fmt.Sprintf("HostStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatusValidationError{ field: fmt.Sprintf("HostStatuses[%v]", idx), @@ -153,7 +261,26 @@ func (m *ClusterStatus) Validate() error { } - if v, ok := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "LocalOriginSuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "LocalOriginSuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatusValidationError{ field: "LocalOriginSuccessRateEjectionThreshold", @@ -163,9 +290,30 @@ func (m *ClusterStatus) Validate() error { } } + if len(errors) > 0 { + return ClusterStatusMultiError(errors) + } + return nil } +// ClusterStatusMultiError is an error wrapping multiple validation errors +// returned by ClusterStatus.ValidateAll() if the designated constraints +// aren't met. +type ClusterStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterStatusMultiError) AllErrors() []error { return m } + // ClusterStatusValidationError is the validation error returned by // ClusterStatus.Validate if the designated constraints aren't met. type ClusterStatusValidationError struct { @@ -221,13 +369,47 @@ var _ interface { } = ClusterStatusValidationError{} // Validate checks the field values on HostStatus with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HostStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HostStatus with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HostStatusMultiError, or +// nil if none found. +func (m *HostStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HostStatus) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "Address", @@ -240,7 +422,26 @@ func (m *HostStatus) Validate() error { for idx, item := range m.GetStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: fmt.Sprintf("Stats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: fmt.Sprintf("Stats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: fmt.Sprintf("Stats[%v]", idx), @@ -252,7 +453,26 @@ func (m *HostStatus) Validate() error { } - if v, ok := interface{}(m.GetHealthStatus()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "HealthStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "HealthStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthStatus()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "HealthStatus", @@ -262,7 +482,26 @@ func (m *HostStatus) Validate() error { } } - if v, ok := interface{}(m.GetSuccessRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "SuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "SuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "SuccessRate", @@ -278,7 +517,26 @@ func (m *HostStatus) Validate() error { // no validation rules for Priority - if v, ok := interface{}(m.GetLocalOriginSuccessRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalOriginSuccessRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "LocalOriginSuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "LocalOriginSuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalOriginSuccessRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "LocalOriginSuccessRate", @@ -288,7 +546,26 @@ func (m *HostStatus) Validate() error { } } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "Locality", @@ -298,9 +575,29 @@ func (m *HostStatus) Validate() error { } } + if len(errors) > 0 { + return HostStatusMultiError(errors) + } + return nil } +// HostStatusMultiError is an error wrapping multiple validation errors +// returned by HostStatus.ValidateAll() if the designated constraints aren't met. +type HostStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HostStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HostStatusMultiError) AllErrors() []error { return m } + // HostStatusValidationError is the validation error returned by // HostStatus.Validate if the designated constraints aren't met. type HostStatusValidationError struct { @@ -356,13 +653,27 @@ var _ interface { } = HostStatusValidationError{} // Validate checks the field values on HostHealthStatus with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HostHealthStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HostHealthStatus with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HostHealthStatusMultiError, or nil if none found. +func (m *HostHealthStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HostHealthStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for FailedActiveHealthCheck // no validation rules for FailedOutlierCheck @@ -375,9 +686,30 @@ func (m *HostHealthStatus) Validate() error { // no validation rules for EdsHealthStatus + if len(errors) > 0 { + return HostHealthStatusMultiError(errors) + } + return nil } +// HostHealthStatusMultiError is an error wrapping multiple validation errors +// returned by HostHealthStatus.ValidateAll() if the designated constraints +// aren't met. +type HostHealthStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HostHealthStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HostHealthStatusMultiError) AllErrors() []error { return m } + // HostHealthStatusValidationError is the validation error returned by // HostHealthStatus.Validate if the designated constraints aren't met. type HostHealthStatusValidationError struct { diff --git a/pkg/api/envoy/admin/v2alpha/config_dump.pb.go b/pkg/api/envoy/admin/v2alpha/config_dump.pb.go index 6b9d7e5b87..68caa1b60d 100644 --- a/pkg/api/envoy/admin/v2alpha/config_dump.pb.go +++ b/pkg/api/envoy/admin/v2alpha/config_dump.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/config_dump.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/bootstrap/v2" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The :ref:`/config_dump ` admin endpoint uses this wrapper // message to maintain and serve arbitrary configuration information from any component in Envoy. type ConfigDump struct { @@ -1594,11 +1589,15 @@ var file_envoy_admin_v2alpha_config_dump_proto_rawDesc = []byte{ 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x3e, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x7a, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0f, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/config_dump.pb.validate.go b/pkg/api/envoy/admin/v2alpha/config_dump.pb.validate.go index f505a61cb9..686ad673cd 100644 --- a/pkg/api/envoy/admin/v2alpha/config_dump.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/config_dump.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/config_dump.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ConfigDump with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConfigDump with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConfigDumpMultiError, or +// nil if none found. +func (m *ConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigDumpValidationError{ + field: fmt.Sprintf("Configs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigDumpValidationError{ + field: fmt.Sprintf("Configs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigDumpValidationError{ field: fmt.Sprintf("Configs[%v]", idx), @@ -55,9 +91,29 @@ func (m *ConfigDump) Validate() error { } + if len(errors) > 0 { + return ConfigDumpMultiError(errors) + } + return nil } +// ConfigDumpMultiError is an error wrapping multiple validation errors +// returned by ConfigDump.ValidateAll() if the designated constraints aren't met. +type ConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigDumpMultiError) AllErrors() []error { return m } + // ConfigDumpValidationError is the validation error returned by // ConfigDump.Validate if the designated constraints aren't met. type ConfigDumpValidationError struct { @@ -114,13 +170,46 @@ var _ interface { // Validate checks the field values on UpdateFailureState with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpdateFailureState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpdateFailureState with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpdateFailureStateMultiError, or nil if none found. +func (m *UpdateFailureState) ValidateAll() error { + return m.validate(true) +} + +func (m *UpdateFailureState) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetFailedConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "FailedConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "FailedConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateFailureStateValidationError{ field: "FailedConfiguration", @@ -130,7 +219,26 @@ func (m *UpdateFailureState) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdateAttempt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "LastUpdateAttempt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "LastUpdateAttempt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateFailureStateValidationError{ field: "LastUpdateAttempt", @@ -142,9 +250,30 @@ func (m *UpdateFailureState) Validate() error { // no validation rules for Details + if len(errors) > 0 { + return UpdateFailureStateMultiError(errors) + } + return nil } +// UpdateFailureStateMultiError is an error wrapping multiple validation errors +// returned by UpdateFailureState.ValidateAll() if the designated constraints +// aren't met. +type UpdateFailureStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpdateFailureStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpdateFailureStateMultiError) AllErrors() []error { return m } + // UpdateFailureStateValidationError is the validation error returned by // UpdateFailureState.Validate if the designated constraints aren't met. type UpdateFailureStateValidationError struct { @@ -203,13 +332,46 @@ var _ interface { // Validate checks the field values on BootstrapConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *BootstrapConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BootstrapConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BootstrapConfigDumpMultiError, or nil if none found. +func (m *BootstrapConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *BootstrapConfigDump) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetBootstrap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "Bootstrap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "Bootstrap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapConfigDumpValidationError{ field: "Bootstrap", @@ -219,7 +381,26 @@ func (m *BootstrapConfigDump) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapConfigDumpValidationError{ field: "LastUpdated", @@ -229,9 +410,30 @@ func (m *BootstrapConfigDump) Validate() error { } } + if len(errors) > 0 { + return BootstrapConfigDumpMultiError(errors) + } + return nil } +// BootstrapConfigDumpMultiError is an error wrapping multiple validation +// errors returned by BootstrapConfigDump.ValidateAll() if the designated +// constraints aren't met. +type BootstrapConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BootstrapConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BootstrapConfigDumpMultiError) AllErrors() []error { return m } + // BootstrapConfigDumpValidationError is the validation error returned by // BootstrapConfigDump.Validate if the designated constraints aren't met. type BootstrapConfigDumpValidationError struct { @@ -290,18 +492,51 @@ var _ interface { // Validate checks the field values on ListenersConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ListenersConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListenersConfigDumpMultiError, or nil if none found. +func (m *ListenersConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo for idx, item := range m.GetStaticListeners() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("StaticListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("StaticListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDumpValidationError{ field: fmt.Sprintf("StaticListeners[%v]", idx), @@ -316,7 +551,26 @@ func (m *ListenersConfigDump) Validate() error { for idx, item := range m.GetDynamicListeners() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDumpValidationError{ field: fmt.Sprintf("DynamicListeners[%v]", idx), @@ -328,9 +582,30 @@ func (m *ListenersConfigDump) Validate() error { } + if len(errors) > 0 { + return ListenersConfigDumpMultiError(errors) + } + return nil } +// ListenersConfigDumpMultiError is an error wrapping multiple validation +// errors returned by ListenersConfigDump.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDumpMultiError) AllErrors() []error { return m } + // ListenersConfigDumpValidationError is the validation error returned by // ListenersConfigDump.Validate if the designated constraints aren't met. type ListenersConfigDumpValidationError struct { @@ -389,18 +664,51 @@ var _ interface { // Validate checks the field values on ClustersConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClustersConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClustersConfigDumpMultiError, or nil if none found. +func (m *ClustersConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo for idx, item := range m.GetStaticClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("StaticClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("StaticClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("StaticClusters[%v]", idx), @@ -415,7 +723,26 @@ func (m *ClustersConfigDump) Validate() error { for idx, item := range m.GetDynamicActiveClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), @@ -430,7 +757,26 @@ func (m *ClustersConfigDump) Validate() error { for idx, item := range m.GetDynamicWarmingClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), @@ -442,9 +788,30 @@ func (m *ClustersConfigDump) Validate() error { } + if len(errors) > 0 { + return ClustersConfigDumpMultiError(errors) + } + return nil } +// ClustersConfigDumpMultiError is an error wrapping multiple validation errors +// returned by ClustersConfigDump.ValidateAll() if the designated constraints +// aren't met. +type ClustersConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDumpMultiError) AllErrors() []error { return m } + // ClustersConfigDumpValidationError is the validation error returned by // ClustersConfigDump.Validate if the designated constraints aren't met. type ClustersConfigDumpValidationError struct { @@ -502,17 +869,50 @@ var _ interface { } = ClustersConfigDumpValidationError{} // Validate checks the field values on RoutesConfigDump with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RoutesConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RoutesConfigDumpMultiError, or nil if none found. +func (m *RoutesConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStaticRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidationError{ field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), @@ -527,7 +927,26 @@ func (m *RoutesConfigDump) Validate() error { for idx, item := range m.GetDynamicRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), @@ -539,9 +958,30 @@ func (m *RoutesConfigDump) Validate() error { } + if len(errors) > 0 { + return RoutesConfigDumpMultiError(errors) + } + return nil } +// RoutesConfigDumpMultiError is an error wrapping multiple validation errors +// returned by RoutesConfigDump.ValidateAll() if the designated constraints +// aren't met. +type RoutesConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDumpMultiError) AllErrors() []error { return m } + // RoutesConfigDumpValidationError is the validation error returned by // RoutesConfigDump.Validate if the designated constraints aren't met. type RoutesConfigDumpValidationError struct { @@ -598,16 +1038,49 @@ var _ interface { // Validate checks the field values on ScopedRoutesConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRoutesConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRoutesConfigDumpMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetInlineScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), @@ -622,7 +1095,26 @@ func (m *ScopedRoutesConfigDump) Validate() error { for idx, item := range m.GetDynamicScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), @@ -634,9 +1126,30 @@ func (m *ScopedRoutesConfigDump) Validate() error { } + if len(errors) > 0 { + return ScopedRoutesConfigDumpMultiError(errors) + } + return nil } +// ScopedRoutesConfigDumpMultiError is an error wrapping multiple validation +// errors returned by ScopedRoutesConfigDump.ValidateAll() if the designated +// constraints aren't met. +type ScopedRoutesConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDumpMultiError) AllErrors() []error { return m } + // ScopedRoutesConfigDumpValidationError is the validation error returned by // ScopedRoutesConfigDump.Validate if the designated constraints aren't met. type ScopedRoutesConfigDumpValidationError struct { @@ -694,17 +1207,50 @@ var _ interface { } = ScopedRoutesConfigDumpValidationError{} // Validate checks the field values on SecretsConfigDump with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SecretsConfigDumpMultiError, or nil if none found. +func (m *SecretsConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStaticSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("StaticSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("StaticSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("StaticSecrets[%v]", idx), @@ -719,7 +1265,26 @@ func (m *SecretsConfigDump) Validate() error { for idx, item := range m.GetDynamicActiveSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), @@ -734,7 +1299,26 @@ func (m *SecretsConfigDump) Validate() error { for idx, item := range m.GetDynamicWarmingSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), @@ -746,9 +1330,30 @@ func (m *SecretsConfigDump) Validate() error { } + if len(errors) > 0 { + return SecretsConfigDumpMultiError(errors) + } + return nil } +// SecretsConfigDumpMultiError is an error wrapping multiple validation errors +// returned by SecretsConfigDump.ValidateAll() if the designated constraints +// aren't met. +type SecretsConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDumpMultiError) AllErrors() []error { return m } + // SecretsConfigDumpValidationError is the validation error returned by // SecretsConfigDump.Validate if the designated constraints aren't met. type SecretsConfigDumpValidationError struct { @@ -807,13 +1412,47 @@ var _ interface { // Validate checks the field values on ListenersConfigDump_StaticListener with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ListenersConfigDump_StaticListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump_StaticListener +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ListenersConfigDump_StaticListenerMultiError, or nil if none found. +func (m *ListenersConfigDump_StaticListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_StaticListener) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "Listener", @@ -823,7 +1462,26 @@ func (m *ListenersConfigDump_StaticListener) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "LastUpdated", @@ -833,9 +1491,31 @@ func (m *ListenersConfigDump_StaticListener) Validate() error { } } + if len(errors) > 0 { + return ListenersConfigDump_StaticListenerMultiError(errors) + } + return nil } +// ListenersConfigDump_StaticListenerMultiError is an error wrapping multiple +// validation errors returned by +// ListenersConfigDump_StaticListener.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_StaticListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_StaticListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_StaticListenerMultiError) AllErrors() []error { return m } + // ListenersConfigDump_StaticListenerValidationError is the validation error // returned by ListenersConfigDump_StaticListener.Validate if the designated // constraints aren't met. @@ -895,15 +1575,50 @@ var _ interface { // Validate checks the field values on ListenersConfigDump_DynamicListenerState // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *ListenersConfigDump_DynamicListenerState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ListenersConfigDump_DynamicListenerState with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ListenersConfigDump_DynamicListenerStateMultiError, or nil if none found. +func (m *ListenersConfigDump_DynamicListenerState) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_DynamicListenerState) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerStateValidationError{ field: "Listener", @@ -913,7 +1628,26 @@ func (m *ListenersConfigDump_DynamicListenerState) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerStateValidationError{ field: "LastUpdated", @@ -923,9 +1657,31 @@ func (m *ListenersConfigDump_DynamicListenerState) Validate() error { } } + if len(errors) > 0 { + return ListenersConfigDump_DynamicListenerStateMultiError(errors) + } + return nil } +// ListenersConfigDump_DynamicListenerStateMultiError is an error wrapping +// multiple validation errors returned by +// ListenersConfigDump_DynamicListenerState.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_DynamicListenerStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_DynamicListenerStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_DynamicListenerStateMultiError) AllErrors() []error { return m } + // ListenersConfigDump_DynamicListenerStateValidationError is the validation // error returned by ListenersConfigDump_DynamicListenerState.Validate if the // designated constraints aren't met. @@ -985,15 +1741,49 @@ var _ interface { // Validate checks the field values on ListenersConfigDump_DynamicListener with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ListenersConfigDump_DynamicListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump_DynamicListener +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ListenersConfigDump_DynamicListenerMultiError, or nil if none found. +func (m *ListenersConfigDump_DynamicListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_DynamicListener) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetActiveState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ActiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ActiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "ActiveState", @@ -1003,7 +1793,26 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } - if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWarmingState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "WarmingState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "WarmingState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "WarmingState", @@ -1013,7 +1822,26 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } - if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDrainingState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "DrainingState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "DrainingState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "DrainingState", @@ -1023,7 +1851,26 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } - if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "ErrorState", @@ -1033,9 +1880,31 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } + if len(errors) > 0 { + return ListenersConfigDump_DynamicListenerMultiError(errors) + } + return nil } +// ListenersConfigDump_DynamicListenerMultiError is an error wrapping multiple +// validation errors returned by +// ListenersConfigDump_DynamicListener.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_DynamicListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_DynamicListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_DynamicListenerMultiError) AllErrors() []error { return m } + // ListenersConfigDump_DynamicListenerValidationError is the validation error // returned by ListenersConfigDump_DynamicListener.Validate if the designated // constraints aren't met. @@ -1095,13 +1964,47 @@ var _ interface { // Validate checks the field values on ClustersConfigDump_StaticCluster with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ClustersConfigDump_StaticCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump_StaticCluster with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ClustersConfigDump_StaticClusterMultiError, or nil if none found. +func (m *ClustersConfigDump_StaticCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump_StaticCluster) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "Cluster", @@ -1111,7 +2014,26 @@ func (m *ClustersConfigDump_StaticCluster) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "LastUpdated", @@ -1121,9 +2043,31 @@ func (m *ClustersConfigDump_StaticCluster) Validate() error { } } + if len(errors) > 0 { + return ClustersConfigDump_StaticClusterMultiError(errors) + } + return nil } +// ClustersConfigDump_StaticClusterMultiError is an error wrapping multiple +// validation errors returned by +// ClustersConfigDump_StaticCluster.ValidateAll() if the designated +// constraints aren't met. +type ClustersConfigDump_StaticClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDump_StaticClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDump_StaticClusterMultiError) AllErrors() []error { return m } + // ClustersConfigDump_StaticClusterValidationError is the validation error // returned by ClustersConfigDump_StaticCluster.Validate if the designated // constraints aren't met. @@ -1183,15 +2127,49 @@ var _ interface { // Validate checks the field values on ClustersConfigDump_DynamicCluster with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ClustersConfigDump_DynamicCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump_DynamicCluster +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ClustersConfigDump_DynamicClusterMultiError, or nil if none found. +func (m *ClustersConfigDump_DynamicCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump_DynamicCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterValidationError{ field: "Cluster", @@ -1201,7 +2179,26 @@ func (m *ClustersConfigDump_DynamicCluster) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterValidationError{ field: "LastUpdated", @@ -1211,9 +2208,31 @@ func (m *ClustersConfigDump_DynamicCluster) Validate() error { } } + if len(errors) > 0 { + return ClustersConfigDump_DynamicClusterMultiError(errors) + } + return nil } +// ClustersConfigDump_DynamicClusterMultiError is an error wrapping multiple +// validation errors returned by +// ClustersConfigDump_DynamicCluster.ValidateAll() if the designated +// constraints aren't met. +type ClustersConfigDump_DynamicClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDump_DynamicClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDump_DynamicClusterMultiError) AllErrors() []error { return m } + // ClustersConfigDump_DynamicClusterValidationError is the validation error // returned by ClustersConfigDump_DynamicCluster.Validate if the designated // constraints aren't met. @@ -1273,13 +2292,47 @@ var _ interface { // Validate checks the field values on RoutesConfigDump_StaticRouteConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump_StaticRouteConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RoutesConfigDump_StaticRouteConfigMultiError, or nil if none found. +func (m *RoutesConfigDump_StaticRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump_StaticRouteConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "RouteConfig", @@ -1289,7 +2342,26 @@ func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "LastUpdated", @@ -1299,9 +2371,31 @@ func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { } } + if len(errors) > 0 { + return RoutesConfigDump_StaticRouteConfigMultiError(errors) + } + return nil } +// RoutesConfigDump_StaticRouteConfigMultiError is an error wrapping multiple +// validation errors returned by +// RoutesConfigDump_StaticRouteConfig.ValidateAll() if the designated +// constraints aren't met. +type RoutesConfigDump_StaticRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDump_StaticRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDump_StaticRouteConfigMultiError) AllErrors() []error { return m } + // RoutesConfigDump_StaticRouteConfigValidationError is the validation error // returned by RoutesConfigDump_StaticRouteConfig.Validate if the designated // constraints aren't met. @@ -1361,15 +2455,49 @@ var _ interface { // Validate checks the field values on RoutesConfigDump_DynamicRouteConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump_DynamicRouteConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RoutesConfigDump_DynamicRouteConfigMultiError, or nil if none found. +func (m *RoutesConfigDump_DynamicRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump_DynamicRouteConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRouteConfigValidationError{ field: "RouteConfig", @@ -1379,7 +2507,26 @@ func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRouteConfigValidationError{ field: "LastUpdated", @@ -1389,9 +2536,31 @@ func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { } } + if len(errors) > 0 { + return RoutesConfigDump_DynamicRouteConfigMultiError(errors) + } + return nil } +// RoutesConfigDump_DynamicRouteConfigMultiError is an error wrapping multiple +// validation errors returned by +// RoutesConfigDump_DynamicRouteConfig.ValidateAll() if the designated +// constraints aren't met. +type RoutesConfigDump_DynamicRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDump_DynamicRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDump_DynamicRouteConfigMultiError) AllErrors() []error { return m } + // RoutesConfigDump_DynamicRouteConfigValidationError is the validation error // returned by RoutesConfigDump_DynamicRouteConfig.Validate if the designated // constraints aren't met. @@ -1451,19 +2620,53 @@ var _ interface { // Validate checks the field values on // ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name for idx, item := range m.GetScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), @@ -1475,7 +2678,26 @@ func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: "LastUpdated", @@ -1485,9 +2707,31 @@ func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { } } + if len(errors) > 0 { + return ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError(errors) + } + return nil } +// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError is an error +// wrapping multiple validation errors returned by +// ScopedRoutesConfigDump_InlineScopedRouteConfigs.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) AllErrors() []error { return m } + // ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError is the // validation error returned by // ScopedRoutesConfigDump_InlineScopedRouteConfigs.Validate if the designated @@ -1552,13 +2796,28 @@ var _ interface { // Validate checks the field values on // ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for VersionInfo @@ -1566,7 +2825,26 @@ func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { for idx, item := range m.GetScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), @@ -1578,7 +2856,26 @@ func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: "LastUpdated", @@ -1588,9 +2885,31 @@ func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { } } + if len(errors) > 0 { + return ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError(errors) + } + return nil } +// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError is an error +// wrapping multiple validation errors returned by +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) AllErrors() []error { return m } + // ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError is the // validation error returned by // ScopedRoutesConfigDump_DynamicScopedRouteConfigs.Validate if the designated @@ -1657,17 +2976,50 @@ var _ interface { // Validate checks the field values on SecretsConfigDump_DynamicSecret with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump_DynamicSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump_DynamicSecret with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// SecretsConfigDump_DynamicSecretMultiError, or nil if none found. +func (m *SecretsConfigDump_DynamicSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump_DynamicSecret) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for VersionInfo - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_DynamicSecretValidationError{ field: "LastUpdated", @@ -1677,7 +3029,26 @@ func (m *SecretsConfigDump_DynamicSecret) Validate() error { } } - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_DynamicSecretValidationError{ field: "Secret", @@ -1687,9 +3058,30 @@ func (m *SecretsConfigDump_DynamicSecret) Validate() error { } } + if len(errors) > 0 { + return SecretsConfigDump_DynamicSecretMultiError(errors) + } + return nil } +// SecretsConfigDump_DynamicSecretMultiError is an error wrapping multiple +// validation errors returned by SecretsConfigDump_DynamicSecret.ValidateAll() +// if the designated constraints aren't met. +type SecretsConfigDump_DynamicSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDump_DynamicSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDump_DynamicSecretMultiError) AllErrors() []error { return m } + // SecretsConfigDump_DynamicSecretValidationError is the validation error // returned by SecretsConfigDump_DynamicSecret.Validate if the designated // constraints aren't met. @@ -1749,15 +3141,48 @@ var _ interface { // Validate checks the field values on SecretsConfigDump_StaticSecret with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump_StaticSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump_StaticSecret with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// SecretsConfigDump_StaticSecretMultiError, or nil if none found. +func (m *SecretsConfigDump_StaticSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump_StaticSecret) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_StaticSecretValidationError{ field: "LastUpdated", @@ -1767,7 +3192,26 @@ func (m *SecretsConfigDump_StaticSecret) Validate() error { } } - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_StaticSecretValidationError{ field: "Secret", @@ -1777,9 +3221,30 @@ func (m *SecretsConfigDump_StaticSecret) Validate() error { } } + if len(errors) > 0 { + return SecretsConfigDump_StaticSecretMultiError(errors) + } + return nil } +// SecretsConfigDump_StaticSecretMultiError is an error wrapping multiple +// validation errors returned by SecretsConfigDump_StaticSecret.ValidateAll() +// if the designated constraints aren't met. +type SecretsConfigDump_StaticSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDump_StaticSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDump_StaticSecretMultiError) AllErrors() []error { return m } + // SecretsConfigDump_StaticSecretValidationError is the validation error // returned by SecretsConfigDump_StaticSecret.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/admin/v2alpha/listeners.pb.go b/pkg/api/envoy/admin/v2alpha/listeners.pb.go index 7475148be2..2ac951b5b9 100644 --- a/pkg/api/envoy/admin/v2alpha/listeners.pb.go +++ b/pkg/api/envoy/admin/v2alpha/listeners.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/listeners.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Admin endpoint uses this wrapper for `/listeners` to display listener status information. // See :ref:`/listeners ` for more information. type Listeners struct { @@ -159,11 +154,15 @@ var file_envoy_admin_v2alpha_listeners_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x42, 0x3d, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x42, 0x79, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/listeners.pb.validate.go b/pkg/api/envoy/admin/v2alpha/listeners.pb.validate.go index f3f9ce2cca..ba107aa9b5 100644 --- a/pkg/api/envoy/admin/v2alpha/listeners.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/listeners.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/listeners.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Listeners with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Listeners) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listeners with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenersMultiError, or nil +// if none found. +func (m *Listeners) ValidateAll() error { + return m.validate(true) +} + +func (m *Listeners) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetListenerStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersValidationError{ + field: fmt.Sprintf("ListenerStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersValidationError{ + field: fmt.Sprintf("ListenerStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersValidationError{ field: fmt.Sprintf("ListenerStatuses[%v]", idx), @@ -55,9 +91,29 @@ func (m *Listeners) Validate() error { } + if len(errors) > 0 { + return ListenersMultiError(errors) + } + return nil } +// ListenersMultiError is an error wrapping multiple validation errors returned +// by Listeners.ValidateAll() if the designated constraints aren't met. +type ListenersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersMultiError) AllErrors() []error { return m } + // ListenersValidationError is the validation error returned by // Listeners.Validate if the designated constraints aren't met. type ListenersValidationError struct { @@ -113,16 +169,49 @@ var _ interface { } = ListenersValidationError{} // Validate checks the field values on ListenerStatus with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListenerStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerStatus with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenerStatusMultiError, +// or nil if none found. +func (m *ListenerStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerStatusValidationError{ field: "LocalAddress", @@ -132,9 +221,30 @@ func (m *ListenerStatus) Validate() error { } } + if len(errors) > 0 { + return ListenerStatusMultiError(errors) + } + return nil } +// ListenerStatusMultiError is an error wrapping multiple validation errors +// returned by ListenerStatus.ValidateAll() if the designated constraints +// aren't met. +type ListenerStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerStatusMultiError) AllErrors() []error { return m } + // ListenerStatusValidationError is the validation error returned by // ListenerStatus.Validate if the designated constraints aren't met. type ListenerStatusValidationError struct { diff --git a/pkg/api/envoy/admin/v2alpha/memory.pb.go b/pkg/api/envoy/admin/v2alpha/memory.pb.go index cacde5783c..bd94133592 100644 --- a/pkg/api/envoy/admin/v2alpha/memory.pb.go +++ b/pkg/api/envoy/admin/v2alpha/memory.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/memory.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Proto representation of the internal memory consumption of an Envoy instance. These represent // values extracted from an internal TCMalloc instance. For more information, see the section of the // docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html). @@ -154,12 +149,15 @@ var file_envoy_admin_v2alpha_memory_proto_rawDesc = []byte{ 0x6c, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x3a, + 0x6c, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x76, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/memory.pb.validate.go b/pkg/api/envoy/admin/v2alpha/memory.pb.validate.go index 0675ea429a..691f82bb72 100644 --- a/pkg/api/envoy/admin/v2alpha/memory.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/memory.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/memory.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,16 +31,31 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Memory with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Memory) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Memory with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in MemoryMultiError, or nil if none found. +func (m *Memory) ValidateAll() error { + return m.validate(true) +} + +func (m *Memory) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Allocated // no validation rules for HeapSize @@ -52,9 +68,29 @@ func (m *Memory) Validate() error { // no validation rules for TotalPhysicalBytes + if len(errors) > 0 { + return MemoryMultiError(errors) + } + return nil } +// MemoryMultiError is an error wrapping multiple validation errors returned by +// Memory.ValidateAll() if the designated constraints aren't met. +type MemoryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MemoryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MemoryMultiError) AllErrors() []error { return m } + // MemoryValidationError is the validation error returned by Memory.Validate if // the designated constraints aren't met. type MemoryValidationError struct { diff --git a/pkg/api/envoy/admin/v2alpha/metrics.pb.go b/pkg/api/envoy/admin/v2alpha/metrics.pb.go index f789257b17..670b3db6d9 100644 --- a/pkg/api/envoy/admin/v2alpha/metrics.pb.go +++ b/pkg/api/envoy/admin/v2alpha/metrics.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/metrics.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SimpleMetric_Type int32 const ( @@ -156,12 +151,15 @@ var file_envoy_admin_v2alpha_metrics_proto_rawDesc = []byte{ 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, - 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, 0x45, 0x10, 0x01, 0x42, 0x3b, + 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, 0x45, 0x10, 0x01, 0x42, 0x77, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/metrics.pb.validate.go b/pkg/api/envoy/admin/v2alpha/metrics.pb.validate.go index 2f7faf5ad6..b2d58169ee 100644 --- a/pkg/api/envoy/admin/v2alpha/metrics.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/metrics.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/metrics.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,61 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SimpleMetric with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SimpleMetric) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SimpleMetric with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SimpleMetricMultiError, or +// nil if none found. +func (m *SimpleMetric) ValidateAll() error { + return m.validate(true) +} + +func (m *SimpleMetric) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Type // no validation rules for Value // no validation rules for Name + if len(errors) > 0 { + return SimpleMetricMultiError(errors) + } + return nil } +// SimpleMetricMultiError is an error wrapping multiple validation errors +// returned by SimpleMetric.ValidateAll() if the designated constraints aren't met. +type SimpleMetricMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SimpleMetricMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SimpleMetricMultiError) AllErrors() []error { return m } + // SimpleMetricValidationError is the validation error returned by // SimpleMetric.Validate if the designated constraints aren't met. type SimpleMetricValidationError struct { diff --git a/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.go b/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.go index 1051cfeb79..15100d7911 100644 --- a/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.go +++ b/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/mutex_stats.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Proto representation of the statistics collected upon absl::Mutex contention, if Envoy is run // under :option:`--enable-mutex-tracing`. For more information, see the `absl::Mutex` // [docs](https://abseil.io/about/design/mutex#extra-features). @@ -117,11 +112,15 @@ var file_envoy_admin_v2alpha_mutex_stats_proto_rawDesc = []byte{ 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x61, 0x69, 0x74, 0x43, - 0x79, 0x63, 0x6c, 0x65, 0x73, 0x42, 0x3e, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x63, 0x6c, 0x65, 0x73, 0x42, 0x7a, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0f, 0x4d, 0x75, 0x74, 0x65, - 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.validate.go b/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.validate.go index 47af906b24..fb87ba2a5c 100644 --- a/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/mutex_stats.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/mutex_stats.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,61 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MutexStats with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MutexStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MutexStats with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MutexStatsMultiError, or +// nil if none found. +func (m *MutexStats) ValidateAll() error { + return m.validate(true) +} + +func (m *MutexStats) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for NumContentions // no validation rules for CurrentWaitCycles // no validation rules for LifetimeWaitCycles + if len(errors) > 0 { + return MutexStatsMultiError(errors) + } + return nil } +// MutexStatsMultiError is an error wrapping multiple validation errors +// returned by MutexStats.ValidateAll() if the designated constraints aren't met. +type MutexStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MutexStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MutexStatsMultiError) AllErrors() []error { return m } + // MutexStatsValidationError is the validation error returned by // MutexStats.Validate if the designated constraints aren't met. type MutexStatsValidationError struct { diff --git a/pkg/api/envoy/admin/v2alpha/server_info.pb.go b/pkg/api/envoy/admin/v2alpha/server_info.pb.go index af3808e8b9..42d1b8cc5f 100644 --- a/pkg/api/envoy/admin/v2alpha/server_info.pb.go +++ b/pkg/api/envoy/admin/v2alpha/server_info.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/server_info.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ServerInfo_State int32 const ( @@ -694,11 +689,15 @@ var file_envoy_admin_v2alpha_server_info_proto_rawDesc = []byte{ 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x65, 0x72, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x6e, 0x69, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x0c, 0x10, - 0x0d, 0x42, 0x3e, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x0d, 0x42, 0x7a, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/server_info.pb.validate.go b/pkg/api/envoy/admin/v2alpha/server_info.pb.validate.go index 17aca4b360..6bc527762e 100644 --- a/pkg/api/envoy/admin/v2alpha/server_info.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/server_info.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/server_info.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ServerInfo with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ServerInfo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServerInfo with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ServerInfoMultiError, or +// nil if none found. +func (m *ServerInfo) ValidateAll() error { + return m.validate(true) +} + +func (m *ServerInfo) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Version // no validation rules for State - if v, ok := interface{}(m.GetUptimeCurrentEpoch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUptimeCurrentEpoch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeCurrentEpoch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeCurrentEpoch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUptimeCurrentEpoch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeCurrentEpoch", @@ -54,7 +90,26 @@ func (m *ServerInfo) Validate() error { } } - if v, ok := interface{}(m.GetUptimeAllEpochs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUptimeAllEpochs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeAllEpochs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeAllEpochs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUptimeAllEpochs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeAllEpochs", @@ -66,7 +121,26 @@ func (m *ServerInfo) Validate() error { // no validation rules for HotRestartVersion - if v, ok := interface{}(m.GetCommandLineOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommandLineOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "CommandLineOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "CommandLineOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommandLineOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "CommandLineOptions", @@ -76,9 +150,29 @@ func (m *ServerInfo) Validate() error { } } + if len(errors) > 0 { + return ServerInfoMultiError(errors) + } + return nil } +// ServerInfoMultiError is an error wrapping multiple validation errors +// returned by ServerInfo.ValidateAll() if the designated constraints aren't met. +type ServerInfoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServerInfoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServerInfoMultiError) AllErrors() []error { return m } + // ServerInfoValidationError is the validation error returned by // ServerInfo.Validate if the designated constraints aren't met. type ServerInfoValidationError struct { @@ -135,12 +229,26 @@ var _ interface { // Validate checks the field values on CommandLineOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommandLineOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommandLineOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommandLineOptionsMultiError, or nil if none found. +func (m *CommandLineOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *CommandLineOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for BaseId // no validation rules for Concurrency @@ -173,7 +281,26 @@ func (m *CommandLineOptions) Validate() error { // no validation rules for ServiceZone - if v, ok := interface{}(m.GetFileFlushInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFileFlushInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "FileFlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "FileFlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFileFlushInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "FileFlushInterval", @@ -183,7 +310,26 @@ func (m *CommandLineOptions) Validate() error { } } - if v, ok := interface{}(m.GetDrainTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDrainTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "DrainTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "DrainTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "DrainTime", @@ -193,7 +339,26 @@ func (m *CommandLineOptions) Validate() error { } } - if v, ok := interface{}(m.GetParentShutdownTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetParentShutdownTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "ParentShutdownTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "ParentShutdownTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParentShutdownTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "ParentShutdownTime", @@ -217,9 +382,30 @@ func (m *CommandLineOptions) Validate() error { // no validation rules for CpusetThreads + if len(errors) > 0 { + return CommandLineOptionsMultiError(errors) + } + return nil } +// CommandLineOptionsMultiError is an error wrapping multiple validation errors +// returned by CommandLineOptions.ValidateAll() if the designated constraints +// aren't met. +type CommandLineOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommandLineOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommandLineOptionsMultiError) AllErrors() []error { return m } + // CommandLineOptionsValidationError is the validation error returned by // CommandLineOptions.Validate if the designated constraints aren't met. type CommandLineOptionsValidationError struct { diff --git a/pkg/api/envoy/admin/v2alpha/tap.pb.go b/pkg/api/envoy/admin/v2alpha/tap.pb.go index 8409bd19e0..1fa8ff9597 100644 --- a/pkg/api/envoy/admin/v2alpha/tap.pb.go +++ b/pkg/api/envoy/admin/v2alpha/tap.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v2alpha/tap.proto -package envoy_admin_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/tap/v2alpha" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The /tap admin request body that is used to configure an active tap session. type TapRequest struct { state protoimpl.MessageState @@ -107,11 +102,15 @@ var file_envoy_admin_v2alpha_tap_proto_rawDesc = []byte{ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, - 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x37, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, + 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x73, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x54, - 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v2alpha/tap.pb.validate.go b/pkg/api/envoy/admin/v2alpha/tap.pb.validate.go index fbc599de09..2aaa954a3d 100644 --- a/pkg/api/envoy/admin/v2alpha/tap.pb.validate.go +++ b/pkg/api/envoy/admin/v2alpha/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v2alpha/tap.proto -package envoy_admin_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,31 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TapRequest with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TapRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TapRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TapRequestMultiError, or +// nil if none found. +func (m *TapRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *TapRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetConfigId()) < 1 { - return TapRequestValidationError{ + err := TapRequestValidationError{ field: "ConfigId", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetTapConfig() == nil { - return TapRequestValidationError{ + err := TapRequestValidationError{ field: "TapConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTapConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTapConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapRequestValidationError{ + field: "TapConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapRequestValidationError{ + field: "TapConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTapConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapRequestValidationError{ field: "TapConfig", @@ -64,9 +108,29 @@ func (m *TapRequest) Validate() error { } } + if len(errors) > 0 { + return TapRequestMultiError(errors) + } + return nil } +// TapRequestMultiError is an error wrapping multiple validation errors +// returned by TapRequest.ValidateAll() if the designated constraints aren't met. +type TapRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapRequestMultiError) AllErrors() []error { return m } + // TapRequestValidationError is the validation error returned by // TapRequest.Validate if the designated constraints aren't met. type TapRequestValidationError struct { diff --git a/pkg/api/envoy/admin/v3/certs.pb.go b/pkg/api/envoy/admin/v3/certs.pb.go index 4223f1a3df..103f5f2a07 100644 --- a/pkg/api/envoy/admin/v3/certs.pb.go +++ b/pkg/api/envoy/admin/v3/certs.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/certs.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Proto representation of certificate details. Admin endpoint uses this wrapper for `/certs` to // display certificate information. See :ref:`/certs ` for more // information. @@ -469,11 +464,15 @@ var file_envoy_admin_v3_certs_proto_rawDesc = []byte{ 0x73, 0x73, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x34, 0x0a, 0x1c, 0x69, + 0x61, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x73, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x43, 0x65, 0x72, - 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/certs.pb.validate.go b/pkg/api/envoy/admin/v3/certs.pb.validate.go index e2796232a4..e8c9575f02 100644 --- a/pkg/api/envoy/admin/v3/certs.pb.validate.go +++ b/pkg/api/envoy/admin/v3/certs.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/certs.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Certificates with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Certificates) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Certificates with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CertificatesMultiError, or +// nil if none found. +func (m *Certificates) ValidateAll() error { + return m.validate(true) +} + +func (m *Certificates) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetCertificates() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificatesValidationError{ + field: fmt.Sprintf("Certificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificatesValidationError{ + field: fmt.Sprintf("Certificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificatesValidationError{ field: fmt.Sprintf("Certificates[%v]", idx), @@ -56,9 +91,29 @@ func (m *Certificates) Validate() error { } + if len(errors) > 0 { + return CertificatesMultiError(errors) + } + return nil } +// CertificatesMultiError is an error wrapping multiple validation errors +// returned by Certificates.ValidateAll() if the designated constraints aren't met. +type CertificatesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificatesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificatesMultiError) AllErrors() []error { return m } + // CertificatesValidationError is the validation error returned by // Certificates.Validate if the designated constraints aren't met. type CertificatesValidationError struct { @@ -114,17 +169,50 @@ var _ interface { } = CertificatesValidationError{} // Validate checks the field values on Certificate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Certificate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Certificate with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CertificateMultiError, or +// nil if none found. +func (m *Certificate) ValidateAll() error { + return m.validate(true) +} + +func (m *Certificate) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetCaCert() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CaCert[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CaCert[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationError{ field: fmt.Sprintf("CaCert[%v]", idx), @@ -139,7 +227,26 @@ func (m *Certificate) Validate() error { for idx, item := range m.GetCertChain() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CertChain[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CertChain[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationError{ field: fmt.Sprintf("CertChain[%v]", idx), @@ -151,9 +258,29 @@ func (m *Certificate) Validate() error { } + if len(errors) > 0 { + return CertificateMultiError(errors) + } + return nil } +// CertificateMultiError is an error wrapping multiple validation errors +// returned by Certificate.ValidateAll() if the designated constraints aren't met. +type CertificateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateMultiError) AllErrors() []error { return m } + // CertificateValidationError is the validation error returned by // Certificate.Validate if the designated constraints aren't met. type CertificateValidationError struct { @@ -210,12 +337,26 @@ var _ interface { // Validate checks the field values on CertificateDetails with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CertificateDetails) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateDetails with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CertificateDetailsMultiError, or nil if none found. +func (m *CertificateDetails) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateDetails) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Path // no validation rules for SerialNumber @@ -223,7 +364,26 @@ func (m *CertificateDetails) Validate() error { for idx, item := range m.GetSubjectAltNames() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: fmt.Sprintf("SubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: fmt.Sprintf("SubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetailsValidationError{ field: fmt.Sprintf("SubjectAltNames[%v]", idx), @@ -237,7 +397,26 @@ func (m *CertificateDetails) Validate() error { // no validation rules for DaysUntilExpiration - if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidFrom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetailsValidationError{ field: "ValidFrom", @@ -247,7 +426,26 @@ func (m *CertificateDetails) Validate() error { } } - if v, ok := interface{}(m.GetExpirationTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExpirationTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpirationTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetailsValidationError{ field: "ExpirationTime", @@ -257,7 +455,26 @@ func (m *CertificateDetails) Validate() error { } } - if v, ok := interface{}(m.GetOcspDetails()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOcspDetails()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "OcspDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "OcspDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOcspDetails()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetailsValidationError{ field: "OcspDetails", @@ -267,9 +484,30 @@ func (m *CertificateDetails) Validate() error { } } + if len(errors) > 0 { + return CertificateDetailsMultiError(errors) + } + return nil } +// CertificateDetailsMultiError is an error wrapping multiple validation errors +// returned by CertificateDetails.ValidateAll() if the designated constraints +// aren't met. +type CertificateDetailsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateDetailsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateDetailsMultiError) AllErrors() []error { return m } + // CertificateDetailsValidationError is the validation error returned by // CertificateDetails.Validate if the designated constraints aren't met. type CertificateDetailsValidationError struct { @@ -328,12 +566,26 @@ var _ interface { // Validate checks the field values on SubjectAlternateName with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SubjectAlternateName) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectAlternateName with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SubjectAlternateNameMultiError, or nil if none found. +func (m *SubjectAlternateName) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectAlternateName) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Name.(type) { case *SubjectAlternateName_Dns: @@ -347,9 +599,30 @@ func (m *SubjectAlternateName) Validate() error { } + if len(errors) > 0 { + return SubjectAlternateNameMultiError(errors) + } + return nil } +// SubjectAlternateNameMultiError is an error wrapping multiple validation +// errors returned by SubjectAlternateName.ValidateAll() if the designated +// constraints aren't met. +type SubjectAlternateNameMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectAlternateNameMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectAlternateNameMultiError) AllErrors() []error { return m } + // SubjectAlternateNameValidationError is the validation error returned by // SubjectAlternateName.Validate if the designated constraints aren't met. type SubjectAlternateNameValidationError struct { @@ -408,13 +681,46 @@ var _ interface { // Validate checks the field values on CertificateDetails_OcspDetails with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CertificateDetails_OcspDetails) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateDetails_OcspDetails with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// CertificateDetails_OcspDetailsMultiError, or nil if none found. +func (m *CertificateDetails_OcspDetails) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateDetails_OcspDetails) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetValidFrom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetails_OcspDetailsValidationError{ field: "ValidFrom", @@ -424,7 +730,26 @@ func (m *CertificateDetails_OcspDetails) Validate() error { } } - if v, ok := interface{}(m.GetExpiration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExpiration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "Expiration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "Expiration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpiration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateDetails_OcspDetailsValidationError{ field: "Expiration", @@ -434,9 +759,30 @@ func (m *CertificateDetails_OcspDetails) Validate() error { } } + if len(errors) > 0 { + return CertificateDetails_OcspDetailsMultiError(errors) + } + return nil } +// CertificateDetails_OcspDetailsMultiError is an error wrapping multiple +// validation errors returned by CertificateDetails_OcspDetails.ValidateAll() +// if the designated constraints aren't met. +type CertificateDetails_OcspDetailsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateDetails_OcspDetailsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateDetails_OcspDetailsMultiError) AllErrors() []error { return m } + // CertificateDetails_OcspDetailsValidationError is the validation error // returned by CertificateDetails_OcspDetails.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/admin/v3/clusters.pb.go b/pkg/api/envoy/admin/v3/clusters.pb.go index 1f18bdc5dd..a9d5d44f3c 100644 --- a/pkg/api/envoy/admin/v3/clusters.pb.go +++ b/pkg/api/envoy/admin/v3/clusters.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/clusters.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Admin endpoint uses this wrapper for `/clusters` to display cluster status information. // See :ref:`/clusters ` for more information. type Clusters struct { @@ -80,7 +75,7 @@ func (x *Clusters) GetClusterStatuses() []*ClusterStatus { } // Details an individual cluster's current status. -// [#next-free-field: 7] +// [#next-free-field: 8] type ClusterStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -92,10 +87,10 @@ type ClusterStatus struct { AddedViaApi bool `protobuf:"varint,2,opt,name=added_via_api,json=addedViaApi,proto3" json:"added_via_api,omitempty"` // The success rate threshold used in the last interval. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all errors: externally and locally generated were used to calculate the threshold. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*, only externally generated errors were used to calculate the threshold. // The threshold is used to eject hosts based on their success rate. See // :ref:`Cluster outlier detection ` documentation for details. @@ -113,7 +108,7 @@ type ClusterStatus struct { // The success rate threshold used in the last interval when only locally originated failures were // taken into account and externally originated errors were treated as success. // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*. The threshold is used to eject hosts based on their success rate. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -128,6 +123,8 @@ type ClusterStatus struct { LocalOriginSuccessRateEjectionThreshold *v3.Percent `protobuf:"bytes,5,opt,name=local_origin_success_rate_ejection_threshold,json=localOriginSuccessRateEjectionThreshold,proto3" json:"local_origin_success_rate_ejection_threshold,omitempty"` // :ref:`Circuit breaking ` settings of the cluster. CircuitBreakers *v31.CircuitBreakers `protobuf:"bytes,6,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` + // Observability name of the cluster. + ObservabilityName string `protobuf:"bytes,7,opt,name=observability_name,json=observabilityName,proto3" json:"observability_name,omitempty"` } func (x *ClusterStatus) Reset() { @@ -204,6 +201,13 @@ func (x *ClusterStatus) GetCircuitBreakers() *v31.CircuitBreakers { return nil } +func (x *ClusterStatus) GetObservabilityName() string { + if x != nil { + return x.ObservabilityName + } + return "" +} + // Current state of a particular host. // [#next-free-field: 10] type HostStatus struct { @@ -219,10 +223,10 @@ type HostStatus struct { HealthStatus *HostHealthStatus `protobuf:"bytes,3,opt,name=health_status,json=healthStatus,proto3" json:"health_status,omitempty"` // Request success rate for this host over the last calculated interval. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all errors: externally and locally generated were used in success rate // calculation. If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*, only externally generated errors were used in success rate calculation. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -241,7 +245,7 @@ type HostStatus struct { // interval when only locally originated errors are taken into account and externally originated // errors were treated as success. // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *true*. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -350,7 +354,7 @@ func (x *HostStatus) GetLocality() *v32.Locality { } // Health status for a host. -// [#next-free-field: 7] +// [#next-free-field: 9] type HostHealthStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -367,6 +371,11 @@ type HostHealthStatus struct { PendingDynamicRemoval bool `protobuf:"varint,5,opt,name=pending_dynamic_removal,json=pendingDynamicRemoval,proto3" json:"pending_dynamic_removal,omitempty"` // The host has not yet been health checked. PendingActiveHc bool `protobuf:"varint,6,opt,name=pending_active_hc,json=pendingActiveHc,proto3" json:"pending_active_hc,omitempty"` + // The host should be excluded from panic, spillover, etc. calculations because it was explicitly + // taken out of rotation via protocol signal and is not meant to be routed to. + ExcludedViaImmediateHcFail bool `protobuf:"varint,7,opt,name=excluded_via_immediate_hc_fail,json=excludedViaImmediateHcFail,proto3" json:"excluded_via_immediate_hc_fail,omitempty"` + // The host failed active HC due to timeout. + ActiveHcTimeout bool `protobuf:"varint,8,opt,name=active_hc_timeout,json=activeHcTimeout,proto3" json:"active_hc_timeout,omitempty"` // Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported // here. // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.] @@ -440,11 +449,25 @@ func (x *HostHealthStatus) GetPendingActiveHc() bool { return false } +func (x *HostHealthStatus) GetExcludedViaImmediateHcFail() bool { + if x != nil { + return x.ExcludedViaImmediateHcFail + } + return false +} + +func (x *HostHealthStatus) GetActiveHcTimeout() bool { + if x != nil { + return x.ActiveHcTimeout + } + return false +} + func (x *HostHealthStatus) GetEdsHealthStatus() v32.HealthStatus { if x != nil { return x.EdsHealthStatus } - return v32.HealthStatus_UNKNOWN + return v32.HealthStatus(0) } var File_envoy_admin_v3_clusters_proto protoreflect.FileDescriptor @@ -478,7 +501,7 @@ var file_envoy_admin_v3_clusters_proto_rawDesc = []byte{ 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x22, 0xdd, 0x03, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x74, 0x65, 0x72, 0x73, 0x22, 0x8c, 0x04, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x61, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -505,72 +528,86 @@ var file_envoy_admin_v3_clusters_proto_rawDesc = []byte{ 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, - 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, - 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x81, 0x04, 0x0a, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x69, 0x6d, - 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x12, 0x45, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, - 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x51, 0x0a, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x16, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa3, 0x03, 0x0a, 0x10, 0x48, 0x6f, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, - 0x1a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x17, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, - 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x1c, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x19, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x36, 0x0a, - 0x17, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, - 0x63, 0x12, 0x4e, 0x0a, 0x11, 0x65, 0x64, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x0f, 0x65, 0x64, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x37, - 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0d, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x81, 0x04, 0x0a, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x45, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x51, 0x0a, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x16, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x93, 0x04, 0x0a, 0x10, 0x48, 0x6f, 0x73, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x1a, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x17, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x1c, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x19, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, + 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x17, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x63, + 0x12, 0x42, 0x0a, 0x1e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x61, + 0x5f, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x63, 0x5f, 0x66, 0x61, + 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x56, 0x69, 0x61, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x48, 0x63, + 0x46, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, + 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x4e, 0x0a, 0x11, 0x65, 0x64, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x0f, 0x65, 0x64, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x76, 0x0a, + 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/clusters.pb.validate.go b/pkg/api/envoy/admin/v3/clusters.pb.validate.go index ebb939768e..2eb2141d86 100644 --- a/pkg/api/envoy/admin/v3/clusters.pb.validate.go +++ b/pkg/api/envoy/admin/v3/clusters.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/clusters.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,22 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.HealthStatus(0) ) // Validate checks the field values on Clusters with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Clusters) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Clusters with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClustersMultiError, or nil +// if none found. +func (m *Clusters) ValidateAll() error { + return m.validate(true) +} + +func (m *Clusters) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetClusterStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersValidationError{ + field: fmt.Sprintf("ClusterStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersValidationError{ + field: fmt.Sprintf("ClusterStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersValidationError{ field: fmt.Sprintf("ClusterStatuses[%v]", idx), @@ -59,9 +95,29 @@ func (m *Clusters) Validate() error { } + if len(errors) > 0 { + return ClustersMultiError(errors) + } + return nil } +// ClustersMultiError is an error wrapping multiple validation errors returned +// by Clusters.ValidateAll() if the designated constraints aren't met. +type ClustersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersMultiError) AllErrors() []error { return m } + // ClustersValidationError is the validation error returned by // Clusters.Validate if the designated constraints aren't met. type ClustersValidationError struct { @@ -117,18 +173,51 @@ var _ interface { } = ClustersValidationError{} // Validate checks the field values on ClusterStatus with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterStatus with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterStatusMultiError, or +// nil if none found. +func (m *ClusterStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for AddedViaApi - if v, ok := interface{}(m.GetSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateEjectionThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "SuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "SuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatusValidationError{ field: "SuccessRateEjectionThreshold", @@ -141,7 +230,26 @@ func (m *ClusterStatus) Validate() error { for idx, item := range m.GetHostStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: fmt.Sprintf("HostStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: fmt.Sprintf("HostStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatusValidationError{ field: fmt.Sprintf("HostStatuses[%v]", idx), @@ -153,7 +261,26 @@ func (m *ClusterStatus) Validate() error { } - if v, ok := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "LocalOriginSuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "LocalOriginSuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatusValidationError{ field: "LocalOriginSuccessRateEjectionThreshold", @@ -163,7 +290,26 @@ func (m *ClusterStatus) Validate() error { } } - if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCircuitBreakers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatusValidationError{ field: "CircuitBreakers", @@ -173,9 +319,32 @@ func (m *ClusterStatus) Validate() error { } } + // no validation rules for ObservabilityName + + if len(errors) > 0 { + return ClusterStatusMultiError(errors) + } + return nil } +// ClusterStatusMultiError is an error wrapping multiple validation errors +// returned by ClusterStatus.ValidateAll() if the designated constraints +// aren't met. +type ClusterStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterStatusMultiError) AllErrors() []error { return m } + // ClusterStatusValidationError is the validation error returned by // ClusterStatus.Validate if the designated constraints aren't met. type ClusterStatusValidationError struct { @@ -231,13 +400,47 @@ var _ interface { } = ClusterStatusValidationError{} // Validate checks the field values on HostStatus with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HostStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HostStatus with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HostStatusMultiError, or +// nil if none found. +func (m *HostStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HostStatus) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "Address", @@ -250,7 +453,26 @@ func (m *HostStatus) Validate() error { for idx, item := range m.GetStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: fmt.Sprintf("Stats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: fmt.Sprintf("Stats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: fmt.Sprintf("Stats[%v]", idx), @@ -262,7 +484,26 @@ func (m *HostStatus) Validate() error { } - if v, ok := interface{}(m.GetHealthStatus()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "HealthStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "HealthStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthStatus()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "HealthStatus", @@ -272,7 +513,26 @@ func (m *HostStatus) Validate() error { } } - if v, ok := interface{}(m.GetSuccessRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "SuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "SuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "SuccessRate", @@ -288,7 +548,26 @@ func (m *HostStatus) Validate() error { // no validation rules for Priority - if v, ok := interface{}(m.GetLocalOriginSuccessRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalOriginSuccessRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "LocalOriginSuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "LocalOriginSuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalOriginSuccessRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "LocalOriginSuccessRate", @@ -298,7 +577,26 @@ func (m *HostStatus) Validate() error { } } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "Locality", @@ -308,9 +606,29 @@ func (m *HostStatus) Validate() error { } } + if len(errors) > 0 { + return HostStatusMultiError(errors) + } + return nil } +// HostStatusMultiError is an error wrapping multiple validation errors +// returned by HostStatus.ValidateAll() if the designated constraints aren't met. +type HostStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HostStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HostStatusMultiError) AllErrors() []error { return m } + // HostStatusValidationError is the validation error returned by // HostStatus.Validate if the designated constraints aren't met. type HostStatusValidationError struct { @@ -366,13 +684,27 @@ var _ interface { } = HostStatusValidationError{} // Validate checks the field values on HostHealthStatus with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HostHealthStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HostHealthStatus with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HostHealthStatusMultiError, or nil if none found. +func (m *HostHealthStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HostHealthStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for FailedActiveHealthCheck // no validation rules for FailedOutlierCheck @@ -383,11 +715,36 @@ func (m *HostHealthStatus) Validate() error { // no validation rules for PendingActiveHc + // no validation rules for ExcludedViaImmediateHcFail + + // no validation rules for ActiveHcTimeout + // no validation rules for EdsHealthStatus + if len(errors) > 0 { + return HostHealthStatusMultiError(errors) + } + return nil } +// HostHealthStatusMultiError is an error wrapping multiple validation errors +// returned by HostHealthStatus.ValidateAll() if the designated constraints +// aren't met. +type HostHealthStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HostHealthStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HostHealthStatusMultiError) AllErrors() []error { return m } + // HostHealthStatusValidationError is the validation error returned by // HostHealthStatus.Validate if the designated constraints aren't met. type HostHealthStatusValidationError struct { diff --git a/pkg/api/envoy/admin/v3/config_dump.pb.go b/pkg/api/envoy/admin/v3/config_dump.pb.go index 4db305cd28..34e44d40fd 100644 --- a/pkg/api/envoy/admin/v3/config_dump.pb.go +++ b/pkg/api/envoy/admin/v3/config_dump.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/config_dump.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/bootstrap/v3" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,9 +24,73 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// Resource status from the view of a xDS client, which tells the synchronization +// status between the xDS client and the xDS server. +type ClientResourceStatus int32 + +const ( + // Resource status is not available/unknown. + ClientResourceStatus_UNKNOWN ClientResourceStatus = 0 + // Client requested this resource but hasn't received any update from management + // server. The client will not fail requests, but will queue them until update + // arrives or the client times out waiting for the resource. + ClientResourceStatus_REQUESTED ClientResourceStatus = 1 + // This resource has been requested by the client but has either not been + // delivered by the server or was previously delivered by the server and then + // subsequently removed from resources provided by the server. For more + // information, please refer to the :ref:`"Knowing When a Requested Resource + // Does Not Exist" ` section. + ClientResourceStatus_DOES_NOT_EXIST ClientResourceStatus = 2 + // Client received this resource and replied with ACK. + ClientResourceStatus_ACKED ClientResourceStatus = 3 + // Client received this resource and replied with NACK. + ClientResourceStatus_NACKED ClientResourceStatus = 4 +) + +// Enum value maps for ClientResourceStatus. +var ( + ClientResourceStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "REQUESTED", + 2: "DOES_NOT_EXIST", + 3: "ACKED", + 4: "NACKED", + } + ClientResourceStatus_value = map[string]int32{ + "UNKNOWN": 0, + "REQUESTED": 1, + "DOES_NOT_EXIST": 2, + "ACKED": 3, + "NACKED": 4, + } +) + +func (x ClientResourceStatus) Enum() *ClientResourceStatus { + p := new(ClientResourceStatus) + *p = x + return p +} + +func (x ClientResourceStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientResourceStatus) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_admin_v3_config_dump_proto_enumTypes[0].Descriptor() +} + +func (ClientResourceStatus) Type() protoreflect.EnumType { + return &file_envoy_admin_v3_config_dump_proto_enumTypes[0] +} + +func (x ClientResourceStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientResourceStatus.Descriptor instead. +func (ClientResourceStatus) EnumDescriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_proto_rawDescGZIP(), []int{0} +} // The :ref:`/config_dump ` admin endpoint uses this wrapper // message to maintain and serve arbitrary configuration information from any component in Envoy. @@ -42,11 +105,13 @@ type ConfigDump struct { // The following configurations are currently supported and will be dumped in the order given // below: // - // * *bootstrap*: :ref:`BootstrapConfigDump ` - // * *clusters*: :ref:`ClustersConfigDump ` - // * *endpoints*: :ref:`EndpointsConfigDump ` - // * *listeners*: :ref:`ListenersConfigDump ` - // * *routes*: :ref:`RoutesConfigDump ` + // * *bootstrap*: :ref:`BootstrapConfigDump ` + // * *clusters*: :ref:`ClustersConfigDump ` + // * *endpoints*: :ref:`EndpointsConfigDump ` + // * *listeners*: :ref:`ListenersConfigDump ` + // * *scoped_routes*: :ref:`ScopedRoutesConfigDump ` + // * *routes*: :ref:`RoutesConfigDump ` + // * *secrets*: :ref:`SecretsConfigDump ` // // EDS Configuration will only be dumped by using parameter `?include_eds` // @@ -103,11 +168,15 @@ type UpdateFailureState struct { unknownFields protoimpl.UnknownFields // What the component configuration would have been if the update had succeeded. + // This field may not be populated by xDS clients due to storage overhead. FailedConfiguration *any.Any `protobuf:"bytes,1,opt,name=failed_configuration,json=failedConfiguration,proto3" json:"failed_configuration,omitempty"` // Time of the latest failed update attempt. LastUpdateAttempt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_update_attempt,json=lastUpdateAttempt,proto3" json:"last_update_attempt,omitempty"` // Details about the last failed update attempt. Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` + // This is the version of the rejected resource. + // [#not-implemented-hide:] + VersionInfo string `protobuf:"bytes,4,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` } func (x *UpdateFailureState) Reset() { @@ -163,6 +232,13 @@ func (x *UpdateFailureState) GetDetails() string { return "" } +func (x *UpdateFailureState) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + // This message describes the bootstrap configuration that Envoy was started with. This includes // any CLI overrides that were merged. Bootstrap configuration information can be used to recreate // the static portions of an Envoy configuration by reusing the output as the bootstrap @@ -231,7 +307,7 @@ type ListenersConfigDump struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This is the :ref:`version_info ` in the + // This is the :ref:`version_info ` in the // last processed LDS discovery response. If there are only static bootstrap listeners, this field // will be "". VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` @@ -302,7 +378,7 @@ type ClustersConfigDump struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This is the :ref:`version_info ` in the + // This is the :ref:`version_info ` in the // last processed CDS discovery response. If there are only static bootstrap clusters, this field // will be "". VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` @@ -694,7 +770,7 @@ type ListenersConfigDump_DynamicListenerState struct { unknownFields protoimpl.UnknownFields // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time + // :ref:`version_info ` field at the time // that the listener was loaded. In the future, discrete per-listener versions may be supported // by the API. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` @@ -758,7 +834,7 @@ func (x *ListenersConfigDump_DynamicListenerState) GetLastUpdated() *timestamp.T } // Describes a dynamically loaded listener via the LDS API. -// [#next-free-field: 6] +// [#next-free-field: 7] type ListenersConfigDump_DynamicListener struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -780,7 +856,13 @@ type ListenersConfigDump_DynamicListener struct { // configuration dump, the draining listeners should generally be discarded. DrainingState *ListenersConfigDump_DynamicListenerState `protobuf:"bytes,4,opt,name=draining_state,json=drainingState,proto3" json:"draining_state,omitempty"` // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. ErrorState *UpdateFailureState `protobuf:"bytes,5,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,6,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` } func (x *ListenersConfigDump_DynamicListener) Reset() { @@ -850,6 +932,13 @@ func (x *ListenersConfigDump_DynamicListener) GetErrorState() *UpdateFailureStat return nil } +func (x *ListenersConfigDump_DynamicListener) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + // Describes a statically loaded cluster. type ClustersConfigDump_StaticCluster struct { state protoimpl.MessageState @@ -909,13 +998,14 @@ func (x *ClustersConfigDump_StaticCluster) GetLastUpdated() *timestamp.Timestamp } // Describes a dynamically loaded cluster via the CDS API. +// [#next-free-field: 6] type ClustersConfigDump_DynamicCluster struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time + // :ref:`version_info ` field at the time // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by // the API. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` @@ -923,6 +1013,15 @@ type ClustersConfigDump_DynamicCluster struct { Cluster *any.Any `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` // The timestamp when the Cluster was last updated. LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,4,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,5,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` } func (x *ClustersConfigDump_DynamicCluster) Reset() { @@ -978,6 +1077,20 @@ func (x *ClustersConfigDump_DynamicCluster) GetLastUpdated() *timestamp.Timestam return nil } +func (x *ClustersConfigDump_DynamicCluster) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *ClustersConfigDump_DynamicCluster) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + type RoutesConfigDump_StaticRouteConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1035,19 +1148,29 @@ func (x *RoutesConfigDump_StaticRouteConfig) GetLastUpdated() *timestamp.Timesta return nil } +// [#next-free-field: 6] type RoutesConfigDump_DynamicRouteConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that + // :ref:`version_info ` field at the time that // the route configuration was loaded. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // The route config. RouteConfig *any.Any `protobuf:"bytes,2,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` // The timestamp when the Route was last updated. LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,4,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,5,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` } func (x *RoutesConfigDump_DynamicRouteConfig) Reset() { @@ -1103,6 +1226,20 @@ func (x *RoutesConfigDump_DynamicRouteConfig) GetLastUpdated() *timestamp.Timest return nil } +func (x *RoutesConfigDump_DynamicRouteConfig) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *RoutesConfigDump_DynamicRouteConfig) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + type ScopedRoutesConfigDump_InlineScopedRouteConfigs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1169,6 +1306,7 @@ func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) GetLastUpdated() *time return nil } +// [#next-free-field: 7] type ScopedRoutesConfigDump_DynamicScopedRouteConfigs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1177,13 +1315,22 @@ type ScopedRoutesConfigDump_DynamicScopedRouteConfigs struct { // The name assigned to the scoped route configurations. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that + // :ref:`version_info ` field at the time that // the scoped routes configuration was loaded. VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // The scoped route configurations. ScopedRouteConfigs []*any.Any `protobuf:"bytes,3,rep,name=scoped_route_configs,json=scopedRouteConfigs,proto3" json:"scoped_route_configs,omitempty"` // The timestamp when the scoped route config set was last updated. LastUpdated *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,5,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,6,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` } func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Reset() { @@ -1246,7 +1393,22 @@ func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetLastUpdated() *tim return nil } +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + // DynamicSecret contains secret information fetched via SDS. +// [#next-free-field: 7] type SecretsConfigDump_DynamicSecret struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1262,6 +1424,15 @@ type SecretsConfigDump_DynamicSecret struct { // Security sensitive information is redacted (replaced with "[redacted]") for // private keys and passwords in TLS certificates. Secret *any.Any `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,5,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,6,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` } func (x *SecretsConfigDump_DynamicSecret) Reset() { @@ -1324,6 +1495,20 @@ func (x *SecretsConfigDump_DynamicSecret) GetSecret() *any.Any { return nil } +func (x *SecretsConfigDump_DynamicSecret) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *SecretsConfigDump_DynamicSecret) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + // StaticSecret specifies statically loaded secret in bootstrap. type SecretsConfigDump_StaticSecret struct { state protoimpl.MessageState @@ -1450,19 +1635,29 @@ func (x *EndpointsConfigDump_StaticEndpointConfig) GetLastUpdated() *timestamp.T return nil } +// [#next-free-field: 6] type EndpointsConfigDump_DynamicEndpointConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that + // :ref:`version_info ` field at the time that // the endpoint configuration was loaded. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // The endpoint config. EndpointConfig *any.Any `protobuf:"bytes,2,opt,name=endpoint_config,json=endpointConfig,proto3" json:"endpoint_config,omitempty"` // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,4,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,5,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` } func (x *EndpointsConfigDump_DynamicEndpointConfig) Reset() { @@ -1518,6 +1713,20 @@ func (x *EndpointsConfigDump_DynamicEndpointConfig) GetLastUpdated() *timestamp. return nil } +func (x *EndpointsConfigDump_DynamicEndpointConfig) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + var File_envoy_admin_v3_config_dump_proto protoreflect.FileDescriptor var file_envoy_admin_v3_config_dump_proto_rawDesc = []byte{ @@ -1541,7 +1750,7 @@ var file_envoy_admin_v3_config_dump_proto_rawDesc = []byte{ 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, - 0x22, 0xf2, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x22, 0x95, 0x02, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x14, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, @@ -1553,342 +1762,404 @@ var file_envoy_admin_v3_config_dump_proto_rawDesc = []byte{ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x13, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x42, 0x0a, - 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6f, 0x6f, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, + 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x13, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, - 0x22, 0xa8, 0x09, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5d, 0x0a, 0x10, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x60, 0x0a, 0x11, 0x64, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x10, 0x64, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x1a, 0xc0, 0x01, 0x0a, - 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, - 0x30, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, - 0xef, 0x01, 0x0a, 0x14, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x08, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, - 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x43, 0x9a, 0xc5, - 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x1a, 0xc7, 0x03, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, - 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x0e, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, - 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, - 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, - 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, - 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xba, 0x06, 0x0a, 0x12, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x59, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, + 0x12, 0x42, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x22, 0xf3, 0x09, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5d, + 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x0f, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x60, 0x0a, + 0x11, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x10, 0x64, + 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x1a, + 0xc0, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x1a, 0xef, 0x01, 0x0a, 0x14, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, + 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, + 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, + 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x1a, 0x92, 0x04, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5b, 0x0a, 0x0c, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x77, 0x61, 0x72, + 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x77, 0x61, 0x72, 0x6d, + 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x0e, 0x64, 0x72, 0x61, 0x69, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x64, 0x72, 0x61, 0x69, + 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x69, 0x0a, 0x17, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x15, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x18, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x1a, 0xbb, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, + 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, + 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, + 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xca, 0x07, 0x0a, 0x12, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, + 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x59, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0e, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x69, + 0x0a, 0x17, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x15, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x18, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, + 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x16, + 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x1a, 0xbb, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x1a, 0xf0, 0x02, 0x0a, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, - 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, - 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xe0, 0x01, 0x0a, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x07, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, - 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, - 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, + 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xcd, 0x05, 0x0a, 0x10, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x64, 0x0a, - 0x14, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x12, 0x67, 0x0a, 0x15, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xca, 0x01, 0x0a, - 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, - 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, - 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xef, 0x01, 0x0a, 0x12, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, - 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, - 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, - 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xfc, 0x06, 0x0a, 0x16, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, - 0x75, 0x6d, 0x70, 0x12, 0x7e, 0x0a, 0x1b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xdd, 0x06, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x64, 0x0a, 0x14, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x73, 0x12, 0x67, 0x0a, 0x15, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, + 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xca, 0x01, 0x0a, 0x11, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x37, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, + 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xff, 0x02, 0x0a, 0x12, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, + 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x37, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, + 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, + 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, + 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0x8c, 0x08, 0x0a, 0x16, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, + 0x70, 0x12, 0x7e, 0x0a, 0x1b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x49, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x18, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x73, 0x12, 0x81, 0x01, 0x0a, 0x1c, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, + 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x19, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x81, 0x02, 0x0a, 0x18, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x14, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x12, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3d, + 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x4a, 0x9a, + 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x18, 0x69, 0x6e, 0x6c, 0x69, 0x6e, - 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x1c, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x19, 0x64, 0x79, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xb6, 0x03, 0x0a, 0x19, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x81, 0x02, 0x0a, 0x18, 0x49, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x14, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x12, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, - 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xa6, 0x02, 0x0a, 0x19, - 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x46, 0x0a, 0x14, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x12, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x4b, 0x9a, 0xc5, 0x88, 0x1e, 0x46, 0x0a, 0x44, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xa7, 0x06, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x55, 0x0a, - 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x73, 0x12, 0x65, 0x0a, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x14, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x17, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, - 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x15, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x73, 0x1a, 0xef, 0x01, 0x0a, 0x0d, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, - 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x46, + 0x0a, 0x14, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, - 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, + 0x6e, 0x79, 0x52, 0x12, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x4b, 0x9a, 0xc5, 0x88, 0x1e, 0x46, 0x0a, 0x44, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0xca, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xb7, 0x07, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x55, 0x0a, 0x0e, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x12, 0x65, 0x0a, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x14, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x17, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x15, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x1a, 0xff, 0x02, 0x0a, 0x0d, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, - 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, + 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, + 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, + 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x22, 0xce, 0x04, 0x0a, 0x13, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x70, 0x0a, 0x17, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x73, 0x0a, 0x18, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x1a, 0x94, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x1a, 0xb8, 0x01, 0x0a, 0x15, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x42, 0x39, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x33, 0x42, 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x1a, 0xca, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, + 0xde, 0x05, 0x0a, 0x13, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x70, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x73, 0x0a, 0x18, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, + 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x94, + 0x01, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x1a, 0xc8, 0x02, 0x0a, 0x15, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2a, 0x5d, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x45, 0x53, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x43, 0x4b, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x04, 0x42, + 0x78, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, + 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1903,87 +2174,100 @@ func file_envoy_admin_v3_config_dump_proto_rawDescGZIP() []byte { return file_envoy_admin_v3_config_dump_proto_rawDescData } +var file_envoy_admin_v3_config_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_envoy_admin_v3_config_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_envoy_admin_v3_config_dump_proto_goTypes = []interface{}{ - (*ConfigDump)(nil), // 0: envoy.admin.v3.ConfigDump - (*UpdateFailureState)(nil), // 1: envoy.admin.v3.UpdateFailureState - (*BootstrapConfigDump)(nil), // 2: envoy.admin.v3.BootstrapConfigDump - (*ListenersConfigDump)(nil), // 3: envoy.admin.v3.ListenersConfigDump - (*ClustersConfigDump)(nil), // 4: envoy.admin.v3.ClustersConfigDump - (*RoutesConfigDump)(nil), // 5: envoy.admin.v3.RoutesConfigDump - (*ScopedRoutesConfigDump)(nil), // 6: envoy.admin.v3.ScopedRoutesConfigDump - (*SecretsConfigDump)(nil), // 7: envoy.admin.v3.SecretsConfigDump - (*EndpointsConfigDump)(nil), // 8: envoy.admin.v3.EndpointsConfigDump - (*ListenersConfigDump_StaticListener)(nil), // 9: envoy.admin.v3.ListenersConfigDump.StaticListener - (*ListenersConfigDump_DynamicListenerState)(nil), // 10: envoy.admin.v3.ListenersConfigDump.DynamicListenerState - (*ListenersConfigDump_DynamicListener)(nil), // 11: envoy.admin.v3.ListenersConfigDump.DynamicListener - (*ClustersConfigDump_StaticCluster)(nil), // 12: envoy.admin.v3.ClustersConfigDump.StaticCluster - (*ClustersConfigDump_DynamicCluster)(nil), // 13: envoy.admin.v3.ClustersConfigDump.DynamicCluster - (*RoutesConfigDump_StaticRouteConfig)(nil), // 14: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig - (*RoutesConfigDump_DynamicRouteConfig)(nil), // 15: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig - (*ScopedRoutesConfigDump_InlineScopedRouteConfigs)(nil), // 16: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs - (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs)(nil), // 17: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs - (*SecretsConfigDump_DynamicSecret)(nil), // 18: envoy.admin.v3.SecretsConfigDump.DynamicSecret - (*SecretsConfigDump_StaticSecret)(nil), // 19: envoy.admin.v3.SecretsConfigDump.StaticSecret - (*EndpointsConfigDump_StaticEndpointConfig)(nil), // 20: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig - (*EndpointsConfigDump_DynamicEndpointConfig)(nil), // 21: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig - (*any.Any)(nil), // 22: google.protobuf.Any - (*timestamp.Timestamp)(nil), // 23: google.protobuf.Timestamp - (*v3.Bootstrap)(nil), // 24: envoy.config.bootstrap.v3.Bootstrap + (ClientResourceStatus)(0), // 0: envoy.admin.v3.ClientResourceStatus + (*ConfigDump)(nil), // 1: envoy.admin.v3.ConfigDump + (*UpdateFailureState)(nil), // 2: envoy.admin.v3.UpdateFailureState + (*BootstrapConfigDump)(nil), // 3: envoy.admin.v3.BootstrapConfigDump + (*ListenersConfigDump)(nil), // 4: envoy.admin.v3.ListenersConfigDump + (*ClustersConfigDump)(nil), // 5: envoy.admin.v3.ClustersConfigDump + (*RoutesConfigDump)(nil), // 6: envoy.admin.v3.RoutesConfigDump + (*ScopedRoutesConfigDump)(nil), // 7: envoy.admin.v3.ScopedRoutesConfigDump + (*SecretsConfigDump)(nil), // 8: envoy.admin.v3.SecretsConfigDump + (*EndpointsConfigDump)(nil), // 9: envoy.admin.v3.EndpointsConfigDump + (*ListenersConfigDump_StaticListener)(nil), // 10: envoy.admin.v3.ListenersConfigDump.StaticListener + (*ListenersConfigDump_DynamicListenerState)(nil), // 11: envoy.admin.v3.ListenersConfigDump.DynamicListenerState + (*ListenersConfigDump_DynamicListener)(nil), // 12: envoy.admin.v3.ListenersConfigDump.DynamicListener + (*ClustersConfigDump_StaticCluster)(nil), // 13: envoy.admin.v3.ClustersConfigDump.StaticCluster + (*ClustersConfigDump_DynamicCluster)(nil), // 14: envoy.admin.v3.ClustersConfigDump.DynamicCluster + (*RoutesConfigDump_StaticRouteConfig)(nil), // 15: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig + (*RoutesConfigDump_DynamicRouteConfig)(nil), // 16: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig + (*ScopedRoutesConfigDump_InlineScopedRouteConfigs)(nil), // 17: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs + (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs)(nil), // 18: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs + (*SecretsConfigDump_DynamicSecret)(nil), // 19: envoy.admin.v3.SecretsConfigDump.DynamicSecret + (*SecretsConfigDump_StaticSecret)(nil), // 20: envoy.admin.v3.SecretsConfigDump.StaticSecret + (*EndpointsConfigDump_StaticEndpointConfig)(nil), // 21: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig + (*EndpointsConfigDump_DynamicEndpointConfig)(nil), // 22: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig + (*any.Any)(nil), // 23: google.protobuf.Any + (*timestamp.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*v3.Bootstrap)(nil), // 25: envoy.config.bootstrap.v3.Bootstrap } var file_envoy_admin_v3_config_dump_proto_depIdxs = []int32{ - 22, // 0: envoy.admin.v3.ConfigDump.configs:type_name -> google.protobuf.Any - 22, // 1: envoy.admin.v3.UpdateFailureState.failed_configuration:type_name -> google.protobuf.Any - 23, // 2: envoy.admin.v3.UpdateFailureState.last_update_attempt:type_name -> google.protobuf.Timestamp - 24, // 3: envoy.admin.v3.BootstrapConfigDump.bootstrap:type_name -> envoy.config.bootstrap.v3.Bootstrap - 23, // 4: envoy.admin.v3.BootstrapConfigDump.last_updated:type_name -> google.protobuf.Timestamp - 9, // 5: envoy.admin.v3.ListenersConfigDump.static_listeners:type_name -> envoy.admin.v3.ListenersConfigDump.StaticListener - 11, // 6: envoy.admin.v3.ListenersConfigDump.dynamic_listeners:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListener - 12, // 7: envoy.admin.v3.ClustersConfigDump.static_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.StaticCluster - 13, // 8: envoy.admin.v3.ClustersConfigDump.dynamic_active_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.DynamicCluster - 13, // 9: envoy.admin.v3.ClustersConfigDump.dynamic_warming_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.DynamicCluster - 14, // 10: envoy.admin.v3.RoutesConfigDump.static_route_configs:type_name -> envoy.admin.v3.RoutesConfigDump.StaticRouteConfig - 15, // 11: envoy.admin.v3.RoutesConfigDump.dynamic_route_configs:type_name -> envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig - 16, // 12: envoy.admin.v3.ScopedRoutesConfigDump.inline_scoped_route_configs:type_name -> envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs - 17, // 13: envoy.admin.v3.ScopedRoutesConfigDump.dynamic_scoped_route_configs:type_name -> envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs - 19, // 14: envoy.admin.v3.SecretsConfigDump.static_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.StaticSecret - 18, // 15: envoy.admin.v3.SecretsConfigDump.dynamic_active_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.DynamicSecret - 18, // 16: envoy.admin.v3.SecretsConfigDump.dynamic_warming_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.DynamicSecret - 20, // 17: envoy.admin.v3.EndpointsConfigDump.static_endpoint_configs:type_name -> envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig - 21, // 18: envoy.admin.v3.EndpointsConfigDump.dynamic_endpoint_configs:type_name -> envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig - 22, // 19: envoy.admin.v3.ListenersConfigDump.StaticListener.listener:type_name -> google.protobuf.Any - 23, // 20: envoy.admin.v3.ListenersConfigDump.StaticListener.last_updated:type_name -> google.protobuf.Timestamp - 22, // 21: envoy.admin.v3.ListenersConfigDump.DynamicListenerState.listener:type_name -> google.protobuf.Any - 23, // 22: envoy.admin.v3.ListenersConfigDump.DynamicListenerState.last_updated:type_name -> google.protobuf.Timestamp - 10, // 23: envoy.admin.v3.ListenersConfigDump.DynamicListener.active_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState - 10, // 24: envoy.admin.v3.ListenersConfigDump.DynamicListener.warming_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState - 10, // 25: envoy.admin.v3.ListenersConfigDump.DynamicListener.draining_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState - 1, // 26: envoy.admin.v3.ListenersConfigDump.DynamicListener.error_state:type_name -> envoy.admin.v3.UpdateFailureState - 22, // 27: envoy.admin.v3.ClustersConfigDump.StaticCluster.cluster:type_name -> google.protobuf.Any - 23, // 28: envoy.admin.v3.ClustersConfigDump.StaticCluster.last_updated:type_name -> google.protobuf.Timestamp - 22, // 29: envoy.admin.v3.ClustersConfigDump.DynamicCluster.cluster:type_name -> google.protobuf.Any - 23, // 30: envoy.admin.v3.ClustersConfigDump.DynamicCluster.last_updated:type_name -> google.protobuf.Timestamp - 22, // 31: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig.route_config:type_name -> google.protobuf.Any - 23, // 32: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig.last_updated:type_name -> google.protobuf.Timestamp - 22, // 33: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.route_config:type_name -> google.protobuf.Any - 23, // 34: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.last_updated:type_name -> google.protobuf.Timestamp - 22, // 35: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any - 23, // 36: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp - 22, // 37: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any - 23, // 38: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp - 23, // 39: envoy.admin.v3.SecretsConfigDump.DynamicSecret.last_updated:type_name -> google.protobuf.Timestamp - 22, // 40: envoy.admin.v3.SecretsConfigDump.DynamicSecret.secret:type_name -> google.protobuf.Any - 23, // 41: envoy.admin.v3.SecretsConfigDump.StaticSecret.last_updated:type_name -> google.protobuf.Timestamp - 22, // 42: envoy.admin.v3.SecretsConfigDump.StaticSecret.secret:type_name -> google.protobuf.Any - 22, // 43: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig.endpoint_config:type_name -> google.protobuf.Any - 23, // 44: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp - 22, // 45: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.endpoint_config:type_name -> google.protobuf.Any - 23, // 46: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp - 47, // [47:47] is the sub-list for method output_type - 47, // [47:47] is the sub-list for method input_type - 47, // [47:47] is the sub-list for extension type_name - 47, // [47:47] is the sub-list for extension extendee - 0, // [0:47] is the sub-list for field type_name + 23, // 0: envoy.admin.v3.ConfigDump.configs:type_name -> google.protobuf.Any + 23, // 1: envoy.admin.v3.UpdateFailureState.failed_configuration:type_name -> google.protobuf.Any + 24, // 2: envoy.admin.v3.UpdateFailureState.last_update_attempt:type_name -> google.protobuf.Timestamp + 25, // 3: envoy.admin.v3.BootstrapConfigDump.bootstrap:type_name -> envoy.config.bootstrap.v3.Bootstrap + 24, // 4: envoy.admin.v3.BootstrapConfigDump.last_updated:type_name -> google.protobuf.Timestamp + 10, // 5: envoy.admin.v3.ListenersConfigDump.static_listeners:type_name -> envoy.admin.v3.ListenersConfigDump.StaticListener + 12, // 6: envoy.admin.v3.ListenersConfigDump.dynamic_listeners:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListener + 13, // 7: envoy.admin.v3.ClustersConfigDump.static_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.StaticCluster + 14, // 8: envoy.admin.v3.ClustersConfigDump.dynamic_active_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.DynamicCluster + 14, // 9: envoy.admin.v3.ClustersConfigDump.dynamic_warming_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.DynamicCluster + 15, // 10: envoy.admin.v3.RoutesConfigDump.static_route_configs:type_name -> envoy.admin.v3.RoutesConfigDump.StaticRouteConfig + 16, // 11: envoy.admin.v3.RoutesConfigDump.dynamic_route_configs:type_name -> envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig + 17, // 12: envoy.admin.v3.ScopedRoutesConfigDump.inline_scoped_route_configs:type_name -> envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs + 18, // 13: envoy.admin.v3.ScopedRoutesConfigDump.dynamic_scoped_route_configs:type_name -> envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs + 20, // 14: envoy.admin.v3.SecretsConfigDump.static_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.StaticSecret + 19, // 15: envoy.admin.v3.SecretsConfigDump.dynamic_active_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.DynamicSecret + 19, // 16: envoy.admin.v3.SecretsConfigDump.dynamic_warming_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.DynamicSecret + 21, // 17: envoy.admin.v3.EndpointsConfigDump.static_endpoint_configs:type_name -> envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig + 22, // 18: envoy.admin.v3.EndpointsConfigDump.dynamic_endpoint_configs:type_name -> envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig + 23, // 19: envoy.admin.v3.ListenersConfigDump.StaticListener.listener:type_name -> google.protobuf.Any + 24, // 20: envoy.admin.v3.ListenersConfigDump.StaticListener.last_updated:type_name -> google.protobuf.Timestamp + 23, // 21: envoy.admin.v3.ListenersConfigDump.DynamicListenerState.listener:type_name -> google.protobuf.Any + 24, // 22: envoy.admin.v3.ListenersConfigDump.DynamicListenerState.last_updated:type_name -> google.protobuf.Timestamp + 11, // 23: envoy.admin.v3.ListenersConfigDump.DynamicListener.active_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState + 11, // 24: envoy.admin.v3.ListenersConfigDump.DynamicListener.warming_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState + 11, // 25: envoy.admin.v3.ListenersConfigDump.DynamicListener.draining_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState + 2, // 26: envoy.admin.v3.ListenersConfigDump.DynamicListener.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 27: envoy.admin.v3.ListenersConfigDump.DynamicListener.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 23, // 28: envoy.admin.v3.ClustersConfigDump.StaticCluster.cluster:type_name -> google.protobuf.Any + 24, // 29: envoy.admin.v3.ClustersConfigDump.StaticCluster.last_updated:type_name -> google.protobuf.Timestamp + 23, // 30: envoy.admin.v3.ClustersConfigDump.DynamicCluster.cluster:type_name -> google.protobuf.Any + 24, // 31: envoy.admin.v3.ClustersConfigDump.DynamicCluster.last_updated:type_name -> google.protobuf.Timestamp + 2, // 32: envoy.admin.v3.ClustersConfigDump.DynamicCluster.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 33: envoy.admin.v3.ClustersConfigDump.DynamicCluster.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 23, // 34: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig.route_config:type_name -> google.protobuf.Any + 24, // 35: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig.last_updated:type_name -> google.protobuf.Timestamp + 23, // 36: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.route_config:type_name -> google.protobuf.Any + 24, // 37: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.last_updated:type_name -> google.protobuf.Timestamp + 2, // 38: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 39: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 23, // 40: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any + 24, // 41: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp + 23, // 42: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any + 24, // 43: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp + 2, // 44: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 45: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 24, // 46: envoy.admin.v3.SecretsConfigDump.DynamicSecret.last_updated:type_name -> google.protobuf.Timestamp + 23, // 47: envoy.admin.v3.SecretsConfigDump.DynamicSecret.secret:type_name -> google.protobuf.Any + 2, // 48: envoy.admin.v3.SecretsConfigDump.DynamicSecret.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 49: envoy.admin.v3.SecretsConfigDump.DynamicSecret.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 24, // 50: envoy.admin.v3.SecretsConfigDump.StaticSecret.last_updated:type_name -> google.protobuf.Timestamp + 23, // 51: envoy.admin.v3.SecretsConfigDump.StaticSecret.secret:type_name -> google.protobuf.Any + 23, // 52: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig.endpoint_config:type_name -> google.protobuf.Any + 24, // 53: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp + 23, // 54: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.endpoint_config:type_name -> google.protobuf.Any + 24, // 55: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp + 2, // 56: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 57: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 58, // [58:58] is the sub-list for method output_type + 58, // [58:58] is the sub-list for method input_type + 58, // [58:58] is the sub-list for extension type_name + 58, // [58:58] is the sub-list for extension extendee + 0, // [0:58] is the sub-list for field type_name } func init() { file_envoy_admin_v3_config_dump_proto_init() } @@ -2262,13 +2546,14 @@ func file_envoy_admin_v3_config_dump_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_admin_v3_config_dump_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 22, NumExtensions: 0, NumServices: 0, }, GoTypes: file_envoy_admin_v3_config_dump_proto_goTypes, DependencyIndexes: file_envoy_admin_v3_config_dump_proto_depIdxs, + EnumInfos: file_envoy_admin_v3_config_dump_proto_enumTypes, MessageInfos: file_envoy_admin_v3_config_dump_proto_msgTypes, }.Build() File_envoy_admin_v3_config_dump_proto = out.File diff --git a/pkg/api/envoy/admin/v3/config_dump.pb.validate.go b/pkg/api/envoy/admin/v3/config_dump.pb.validate.go index caeda2a15c..9e34b25a93 100644 --- a/pkg/api/envoy/admin/v3/config_dump.pb.validate.go +++ b/pkg/api/envoy/admin/v3/config_dump.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/config_dump.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ConfigDump with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConfigDump with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConfigDumpMultiError, or +// nil if none found. +func (m *ConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigDumpValidationError{ + field: fmt.Sprintf("Configs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigDumpValidationError{ + field: fmt.Sprintf("Configs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigDumpValidationError{ field: fmt.Sprintf("Configs[%v]", idx), @@ -55,9 +91,29 @@ func (m *ConfigDump) Validate() error { } + if len(errors) > 0 { + return ConfigDumpMultiError(errors) + } + return nil } +// ConfigDumpMultiError is an error wrapping multiple validation errors +// returned by ConfigDump.ValidateAll() if the designated constraints aren't met. +type ConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigDumpMultiError) AllErrors() []error { return m } + // ConfigDumpValidationError is the validation error returned by // ConfigDump.Validate if the designated constraints aren't met. type ConfigDumpValidationError struct { @@ -114,13 +170,46 @@ var _ interface { // Validate checks the field values on UpdateFailureState with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpdateFailureState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpdateFailureState with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpdateFailureStateMultiError, or nil if none found. +func (m *UpdateFailureState) ValidateAll() error { + return m.validate(true) +} + +func (m *UpdateFailureState) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetFailedConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "FailedConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "FailedConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateFailureStateValidationError{ field: "FailedConfiguration", @@ -130,7 +219,26 @@ func (m *UpdateFailureState) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdateAttempt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "LastUpdateAttempt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "LastUpdateAttempt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateFailureStateValidationError{ field: "LastUpdateAttempt", @@ -142,9 +250,32 @@ func (m *UpdateFailureState) Validate() error { // no validation rules for Details + // no validation rules for VersionInfo + + if len(errors) > 0 { + return UpdateFailureStateMultiError(errors) + } + return nil } +// UpdateFailureStateMultiError is an error wrapping multiple validation errors +// returned by UpdateFailureState.ValidateAll() if the designated constraints +// aren't met. +type UpdateFailureStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpdateFailureStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpdateFailureStateMultiError) AllErrors() []error { return m } + // UpdateFailureStateValidationError is the validation error returned by // UpdateFailureState.Validate if the designated constraints aren't met. type UpdateFailureStateValidationError struct { @@ -203,13 +334,46 @@ var _ interface { // Validate checks the field values on BootstrapConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *BootstrapConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BootstrapConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BootstrapConfigDumpMultiError, or nil if none found. +func (m *BootstrapConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *BootstrapConfigDump) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetBootstrap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "Bootstrap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "Bootstrap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapConfigDumpValidationError{ field: "Bootstrap", @@ -219,7 +383,26 @@ func (m *BootstrapConfigDump) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapConfigDumpValidationError{ field: "LastUpdated", @@ -229,9 +412,30 @@ func (m *BootstrapConfigDump) Validate() error { } } + if len(errors) > 0 { + return BootstrapConfigDumpMultiError(errors) + } + return nil } +// BootstrapConfigDumpMultiError is an error wrapping multiple validation +// errors returned by BootstrapConfigDump.ValidateAll() if the designated +// constraints aren't met. +type BootstrapConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BootstrapConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BootstrapConfigDumpMultiError) AllErrors() []error { return m } + // BootstrapConfigDumpValidationError is the validation error returned by // BootstrapConfigDump.Validate if the designated constraints aren't met. type BootstrapConfigDumpValidationError struct { @@ -290,18 +494,51 @@ var _ interface { // Validate checks the field values on ListenersConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ListenersConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListenersConfigDumpMultiError, or nil if none found. +func (m *ListenersConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo for idx, item := range m.GetStaticListeners() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("StaticListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("StaticListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDumpValidationError{ field: fmt.Sprintf("StaticListeners[%v]", idx), @@ -316,7 +553,26 @@ func (m *ListenersConfigDump) Validate() error { for idx, item := range m.GetDynamicListeners() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDumpValidationError{ field: fmt.Sprintf("DynamicListeners[%v]", idx), @@ -328,9 +584,30 @@ func (m *ListenersConfigDump) Validate() error { } + if len(errors) > 0 { + return ListenersConfigDumpMultiError(errors) + } + return nil } +// ListenersConfigDumpMultiError is an error wrapping multiple validation +// errors returned by ListenersConfigDump.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDumpMultiError) AllErrors() []error { return m } + // ListenersConfigDumpValidationError is the validation error returned by // ListenersConfigDump.Validate if the designated constraints aren't met. type ListenersConfigDumpValidationError struct { @@ -389,18 +666,51 @@ var _ interface { // Validate checks the field values on ClustersConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClustersConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClustersConfigDumpMultiError, or nil if none found. +func (m *ClustersConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo for idx, item := range m.GetStaticClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("StaticClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("StaticClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("StaticClusters[%v]", idx), @@ -415,7 +725,26 @@ func (m *ClustersConfigDump) Validate() error { for idx, item := range m.GetDynamicActiveClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), @@ -430,7 +759,26 @@ func (m *ClustersConfigDump) Validate() error { for idx, item := range m.GetDynamicWarmingClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), @@ -442,9 +790,30 @@ func (m *ClustersConfigDump) Validate() error { } + if len(errors) > 0 { + return ClustersConfigDumpMultiError(errors) + } + return nil } +// ClustersConfigDumpMultiError is an error wrapping multiple validation errors +// returned by ClustersConfigDump.ValidateAll() if the designated constraints +// aren't met. +type ClustersConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDumpMultiError) AllErrors() []error { return m } + // ClustersConfigDumpValidationError is the validation error returned by // ClustersConfigDump.Validate if the designated constraints aren't met. type ClustersConfigDumpValidationError struct { @@ -502,17 +871,50 @@ var _ interface { } = ClustersConfigDumpValidationError{} // Validate checks the field values on RoutesConfigDump with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RoutesConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RoutesConfigDumpMultiError, or nil if none found. +func (m *RoutesConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStaticRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidationError{ field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), @@ -527,7 +929,26 @@ func (m *RoutesConfigDump) Validate() error { for idx, item := range m.GetDynamicRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), @@ -539,9 +960,30 @@ func (m *RoutesConfigDump) Validate() error { } + if len(errors) > 0 { + return RoutesConfigDumpMultiError(errors) + } + return nil } +// RoutesConfigDumpMultiError is an error wrapping multiple validation errors +// returned by RoutesConfigDump.ValidateAll() if the designated constraints +// aren't met. +type RoutesConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDumpMultiError) AllErrors() []error { return m } + // RoutesConfigDumpValidationError is the validation error returned by // RoutesConfigDump.Validate if the designated constraints aren't met. type RoutesConfigDumpValidationError struct { @@ -598,16 +1040,49 @@ var _ interface { // Validate checks the field values on ScopedRoutesConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRoutesConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRoutesConfigDumpMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetInlineScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), @@ -622,7 +1097,26 @@ func (m *ScopedRoutesConfigDump) Validate() error { for idx, item := range m.GetDynamicScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDumpValidationError{ field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), @@ -634,9 +1128,30 @@ func (m *ScopedRoutesConfigDump) Validate() error { } + if len(errors) > 0 { + return ScopedRoutesConfigDumpMultiError(errors) + } + return nil } +// ScopedRoutesConfigDumpMultiError is an error wrapping multiple validation +// errors returned by ScopedRoutesConfigDump.ValidateAll() if the designated +// constraints aren't met. +type ScopedRoutesConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDumpMultiError) AllErrors() []error { return m } + // ScopedRoutesConfigDumpValidationError is the validation error returned by // ScopedRoutesConfigDump.Validate if the designated constraints aren't met. type ScopedRoutesConfigDumpValidationError struct { @@ -694,17 +1209,50 @@ var _ interface { } = ScopedRoutesConfigDumpValidationError{} // Validate checks the field values on SecretsConfigDump with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SecretsConfigDumpMultiError, or nil if none found. +func (m *SecretsConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStaticSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("StaticSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("StaticSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("StaticSecrets[%v]", idx), @@ -719,7 +1267,26 @@ func (m *SecretsConfigDump) Validate() error { for idx, item := range m.GetDynamicActiveSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), @@ -734,7 +1301,26 @@ func (m *SecretsConfigDump) Validate() error { for idx, item := range m.GetDynamicWarmingSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDumpValidationError{ field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), @@ -746,9 +1332,30 @@ func (m *SecretsConfigDump) Validate() error { } + if len(errors) > 0 { + return SecretsConfigDumpMultiError(errors) + } + return nil } +// SecretsConfigDumpMultiError is an error wrapping multiple validation errors +// returned by SecretsConfigDump.ValidateAll() if the designated constraints +// aren't met. +type SecretsConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDumpMultiError) AllErrors() []error { return m } + // SecretsConfigDumpValidationError is the validation error returned by // SecretsConfigDump.Validate if the designated constraints aren't met. type SecretsConfigDumpValidationError struct { @@ -807,16 +1414,49 @@ var _ interface { // Validate checks the field values on EndpointsConfigDump with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EndpointsConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointsConfigDump with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EndpointsConfigDumpMultiError, or nil if none found. +func (m *EndpointsConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointsConfigDump) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStaticEndpointConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("StaticEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("StaticEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointsConfigDumpValidationError{ field: fmt.Sprintf("StaticEndpointConfigs[%v]", idx), @@ -831,7 +1471,26 @@ func (m *EndpointsConfigDump) Validate() error { for idx, item := range m.GetDynamicEndpointConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointsConfigDumpValidationError{ field: fmt.Sprintf("DynamicEndpointConfigs[%v]", idx), @@ -843,9 +1502,30 @@ func (m *EndpointsConfigDump) Validate() error { } + if len(errors) > 0 { + return EndpointsConfigDumpMultiError(errors) + } + return nil } +// EndpointsConfigDumpMultiError is an error wrapping multiple validation +// errors returned by EndpointsConfigDump.ValidateAll() if the designated +// constraints aren't met. +type EndpointsConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointsConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointsConfigDumpMultiError) AllErrors() []error { return m } + // EndpointsConfigDumpValidationError is the validation error returned by // EndpointsConfigDump.Validate if the designated constraints aren't met. type EndpointsConfigDumpValidationError struct { @@ -904,13 +1584,47 @@ var _ interface { // Validate checks the field values on ListenersConfigDump_StaticListener with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ListenersConfigDump_StaticListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump_StaticListener +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ListenersConfigDump_StaticListenerMultiError, or nil if none found. +func (m *ListenersConfigDump_StaticListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_StaticListener) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "Listener", @@ -920,7 +1634,26 @@ func (m *ListenersConfigDump_StaticListener) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_StaticListenerValidationError{ field: "LastUpdated", @@ -930,9 +1663,31 @@ func (m *ListenersConfigDump_StaticListener) Validate() error { } } + if len(errors) > 0 { + return ListenersConfigDump_StaticListenerMultiError(errors) + } + return nil } +// ListenersConfigDump_StaticListenerMultiError is an error wrapping multiple +// validation errors returned by +// ListenersConfigDump_StaticListener.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_StaticListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_StaticListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_StaticListenerMultiError) AllErrors() []error { return m } + // ListenersConfigDump_StaticListenerValidationError is the validation error // returned by ListenersConfigDump_StaticListener.Validate if the designated // constraints aren't met. @@ -992,15 +1747,50 @@ var _ interface { // Validate checks the field values on ListenersConfigDump_DynamicListenerState // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *ListenersConfigDump_DynamicListenerState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ListenersConfigDump_DynamicListenerState with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ListenersConfigDump_DynamicListenerStateMultiError, or nil if none found. +func (m *ListenersConfigDump_DynamicListenerState) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_DynamicListenerState) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerStateValidationError{ field: "Listener", @@ -1010,7 +1800,26 @@ func (m *ListenersConfigDump_DynamicListenerState) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerStateValidationError{ field: "LastUpdated", @@ -1020,13 +1829,35 @@ func (m *ListenersConfigDump_DynamicListenerState) Validate() error { } } + if len(errors) > 0 { + return ListenersConfigDump_DynamicListenerStateMultiError(errors) + } + return nil } -// ListenersConfigDump_DynamicListenerStateValidationError is the validation -// error returned by ListenersConfigDump_DynamicListenerState.Validate if the -// designated constraints aren't met. -type ListenersConfigDump_DynamicListenerStateValidationError struct { +// ListenersConfigDump_DynamicListenerStateMultiError is an error wrapping +// multiple validation errors returned by +// ListenersConfigDump_DynamicListenerState.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_DynamicListenerStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_DynamicListenerStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_DynamicListenerStateMultiError) AllErrors() []error { return m } + +// ListenersConfigDump_DynamicListenerStateValidationError is the validation +// error returned by ListenersConfigDump_DynamicListenerState.Validate if the +// designated constraints aren't met. +type ListenersConfigDump_DynamicListenerStateValidationError struct { field string reason string cause error @@ -1082,15 +1913,49 @@ var _ interface { // Validate checks the field values on ListenersConfigDump_DynamicListener with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ListenersConfigDump_DynamicListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump_DynamicListener +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ListenersConfigDump_DynamicListenerMultiError, or nil if none found. +func (m *ListenersConfigDump_DynamicListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_DynamicListener) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetActiveState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ActiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ActiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "ActiveState", @@ -1100,7 +1965,26 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } - if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWarmingState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "WarmingState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "WarmingState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "WarmingState", @@ -1110,7 +1994,26 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } - if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDrainingState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "DrainingState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "DrainingState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "DrainingState", @@ -1120,7 +2023,26 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } - if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersConfigDump_DynamicListenerValidationError{ field: "ErrorState", @@ -1130,9 +2052,33 @@ func (m *ListenersConfigDump_DynamicListener) Validate() error { } } + // no validation rules for ClientStatus + + if len(errors) > 0 { + return ListenersConfigDump_DynamicListenerMultiError(errors) + } + return nil } +// ListenersConfigDump_DynamicListenerMultiError is an error wrapping multiple +// validation errors returned by +// ListenersConfigDump_DynamicListener.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_DynamicListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_DynamicListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_DynamicListenerMultiError) AllErrors() []error { return m } + // ListenersConfigDump_DynamicListenerValidationError is the validation error // returned by ListenersConfigDump_DynamicListener.Validate if the designated // constraints aren't met. @@ -1192,13 +2138,47 @@ var _ interface { // Validate checks the field values on ClustersConfigDump_StaticCluster with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ClustersConfigDump_StaticCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump_StaticCluster with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ClustersConfigDump_StaticClusterMultiError, or nil if none found. +func (m *ClustersConfigDump_StaticCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump_StaticCluster) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "Cluster", @@ -1208,7 +2188,26 @@ func (m *ClustersConfigDump_StaticCluster) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_StaticClusterValidationError{ field: "LastUpdated", @@ -1218,9 +2217,31 @@ func (m *ClustersConfigDump_StaticCluster) Validate() error { } } + if len(errors) > 0 { + return ClustersConfigDump_StaticClusterMultiError(errors) + } + return nil } +// ClustersConfigDump_StaticClusterMultiError is an error wrapping multiple +// validation errors returned by +// ClustersConfigDump_StaticCluster.ValidateAll() if the designated +// constraints aren't met. +type ClustersConfigDump_StaticClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDump_StaticClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDump_StaticClusterMultiError) AllErrors() []error { return m } + // ClustersConfigDump_StaticClusterValidationError is the validation error // returned by ClustersConfigDump_StaticCluster.Validate if the designated // constraints aren't met. @@ -1280,15 +2301,49 @@ var _ interface { // Validate checks the field values on ClustersConfigDump_DynamicCluster with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ClustersConfigDump_DynamicCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump_DynamicCluster +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ClustersConfigDump_DynamicClusterMultiError, or nil if none found. +func (m *ClustersConfigDump_DynamicCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump_DynamicCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterValidationError{ field: "Cluster", @@ -1298,7 +2353,26 @@ func (m *ClustersConfigDump_DynamicCluster) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClustersConfigDump_DynamicClusterValidationError{ field: "LastUpdated", @@ -1308,9 +2382,62 @@ func (m *ClustersConfigDump_DynamicCluster) Validate() error { } } + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClustersConfigDump_DynamicClusterValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return ClustersConfigDump_DynamicClusterMultiError(errors) + } + return nil } +// ClustersConfigDump_DynamicClusterMultiError is an error wrapping multiple +// validation errors returned by +// ClustersConfigDump_DynamicCluster.ValidateAll() if the designated +// constraints aren't met. +type ClustersConfigDump_DynamicClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDump_DynamicClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDump_DynamicClusterMultiError) AllErrors() []error { return m } + // ClustersConfigDump_DynamicClusterValidationError is the validation error // returned by ClustersConfigDump_DynamicCluster.Validate if the designated // constraints aren't met. @@ -1370,13 +2497,47 @@ var _ interface { // Validate checks the field values on RoutesConfigDump_StaticRouteConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump_StaticRouteConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RoutesConfigDump_StaticRouteConfigMultiError, or nil if none found. +func (m *RoutesConfigDump_StaticRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump_StaticRouteConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "RouteConfig", @@ -1386,7 +2547,26 @@ func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_StaticRouteConfigValidationError{ field: "LastUpdated", @@ -1396,9 +2576,31 @@ func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { } } + if len(errors) > 0 { + return RoutesConfigDump_StaticRouteConfigMultiError(errors) + } + return nil } +// RoutesConfigDump_StaticRouteConfigMultiError is an error wrapping multiple +// validation errors returned by +// RoutesConfigDump_StaticRouteConfig.ValidateAll() if the designated +// constraints aren't met. +type RoutesConfigDump_StaticRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDump_StaticRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDump_StaticRouteConfigMultiError) AllErrors() []error { return m } + // RoutesConfigDump_StaticRouteConfigValidationError is the validation error // returned by RoutesConfigDump_StaticRouteConfig.Validate if the designated // constraints aren't met. @@ -1458,15 +2660,49 @@ var _ interface { // Validate checks the field values on RoutesConfigDump_DynamicRouteConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump_DynamicRouteConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RoutesConfigDump_DynamicRouteConfigMultiError, or nil if none found. +func (m *RoutesConfigDump_DynamicRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump_DynamicRouteConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRouteConfigValidationError{ field: "RouteConfig", @@ -1476,7 +2712,26 @@ func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RoutesConfigDump_DynamicRouteConfigValidationError{ field: "LastUpdated", @@ -1486,9 +2741,62 @@ func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { } } + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return RoutesConfigDump_DynamicRouteConfigMultiError(errors) + } + return nil } +// RoutesConfigDump_DynamicRouteConfigMultiError is an error wrapping multiple +// validation errors returned by +// RoutesConfigDump_DynamicRouteConfig.ValidateAll() if the designated +// constraints aren't met. +type RoutesConfigDump_DynamicRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDump_DynamicRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDump_DynamicRouteConfigMultiError) AllErrors() []error { return m } + // RoutesConfigDump_DynamicRouteConfigValidationError is the validation error // returned by RoutesConfigDump_DynamicRouteConfig.Validate if the designated // constraints aren't met. @@ -1548,19 +2856,53 @@ var _ interface { // Validate checks the field values on // ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name for idx, item := range m.GetScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), @@ -1572,7 +2914,26 @@ func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ field: "LastUpdated", @@ -1582,9 +2943,31 @@ func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { } } + if len(errors) > 0 { + return ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError(errors) + } + return nil } +// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError is an error +// wrapping multiple validation errors returned by +// ScopedRoutesConfigDump_InlineScopedRouteConfigs.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) AllErrors() []error { return m } + // ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError is the // validation error returned by // ScopedRoutesConfigDump_InlineScopedRouteConfigs.Validate if the designated @@ -1649,13 +3032,28 @@ var _ interface { // Validate checks the field values on // ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for VersionInfo @@ -1663,7 +3061,26 @@ func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { for idx, item := range m.GetScopedRouteConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), @@ -1675,7 +3092,26 @@ func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ field: "LastUpdated", @@ -1685,9 +3121,62 @@ func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { } } + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError(errors) + } + return nil } +// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError is an error +// wrapping multiple validation errors returned by +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) AllErrors() []error { return m } + // ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError is the // validation error returned by // ScopedRoutesConfigDump_DynamicScopedRouteConfigs.Validate if the designated @@ -1754,17 +3243,50 @@ var _ interface { // Validate checks the field values on SecretsConfigDump_DynamicSecret with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump_DynamicSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump_DynamicSecret with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// SecretsConfigDump_DynamicSecretMultiError, or nil if none found. +func (m *SecretsConfigDump_DynamicSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump_DynamicSecret) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for VersionInfo - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_DynamicSecretValidationError{ field: "LastUpdated", @@ -1774,7 +3296,26 @@ func (m *SecretsConfigDump_DynamicSecret) Validate() error { } } - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_DynamicSecretValidationError{ field: "Secret", @@ -1784,9 +3325,61 @@ func (m *SecretsConfigDump_DynamicSecret) Validate() error { } } + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretsConfigDump_DynamicSecretValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return SecretsConfigDump_DynamicSecretMultiError(errors) + } + return nil } +// SecretsConfigDump_DynamicSecretMultiError is an error wrapping multiple +// validation errors returned by SecretsConfigDump_DynamicSecret.ValidateAll() +// if the designated constraints aren't met. +type SecretsConfigDump_DynamicSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDump_DynamicSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDump_DynamicSecretMultiError) AllErrors() []error { return m } + // SecretsConfigDump_DynamicSecretValidationError is the validation error // returned by SecretsConfigDump_DynamicSecret.Validate if the designated // constraints aren't met. @@ -1846,15 +3439,48 @@ var _ interface { // Validate checks the field values on SecretsConfigDump_StaticSecret with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SecretsConfigDump_StaticSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump_StaticSecret with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// SecretsConfigDump_StaticSecretMultiError, or nil if none found. +func (m *SecretsConfigDump_StaticSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump_StaticSecret) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_StaticSecretValidationError{ field: "LastUpdated", @@ -1864,7 +3490,26 @@ func (m *SecretsConfigDump_StaticSecret) Validate() error { } } - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretsConfigDump_StaticSecretValidationError{ field: "Secret", @@ -1874,9 +3519,30 @@ func (m *SecretsConfigDump_StaticSecret) Validate() error { } } + if len(errors) > 0 { + return SecretsConfigDump_StaticSecretMultiError(errors) + } + return nil } +// SecretsConfigDump_StaticSecretMultiError is an error wrapping multiple +// validation errors returned by SecretsConfigDump_StaticSecret.ValidateAll() +// if the designated constraints aren't met. +type SecretsConfigDump_StaticSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDump_StaticSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDump_StaticSecretMultiError) AllErrors() []error { return m } + // SecretsConfigDump_StaticSecretValidationError is the validation error // returned by SecretsConfigDump_StaticSecret.Validate if the designated // constraints aren't met. @@ -1936,13 +3602,48 @@ var _ interface { // Validate checks the field values on EndpointsConfigDump_StaticEndpointConfig // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *EndpointsConfigDump_StaticEndpointConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// EndpointsConfigDump_StaticEndpointConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// EndpointsConfigDump_StaticEndpointConfigMultiError, or nil if none found. +func (m *EndpointsConfigDump_StaticEndpointConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointsConfigDump_StaticEndpointConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEndpointConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointsConfigDump_StaticEndpointConfigValidationError{ field: "EndpointConfig", @@ -1952,7 +3653,26 @@ func (m *EndpointsConfigDump_StaticEndpointConfig) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointsConfigDump_StaticEndpointConfigValidationError{ field: "LastUpdated", @@ -1962,9 +3682,31 @@ func (m *EndpointsConfigDump_StaticEndpointConfig) Validate() error { } } + if len(errors) > 0 { + return EndpointsConfigDump_StaticEndpointConfigMultiError(errors) + } + return nil } +// EndpointsConfigDump_StaticEndpointConfigMultiError is an error wrapping +// multiple validation errors returned by +// EndpointsConfigDump_StaticEndpointConfig.ValidateAll() if the designated +// constraints aren't met. +type EndpointsConfigDump_StaticEndpointConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointsConfigDump_StaticEndpointConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointsConfigDump_StaticEndpointConfigMultiError) AllErrors() []error { return m } + // EndpointsConfigDump_StaticEndpointConfigValidationError is the validation // error returned by EndpointsConfigDump_StaticEndpointConfig.Validate if the // designated constraints aren't met. @@ -2024,15 +3766,50 @@ var _ interface { // Validate checks the field values on // EndpointsConfigDump_DynamicEndpointConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *EndpointsConfigDump_DynamicEndpointConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// EndpointsConfigDump_DynamicEndpointConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// EndpointsConfigDump_DynamicEndpointConfigMultiError, or nil if none found. +func (m *EndpointsConfigDump_DynamicEndpointConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointsConfigDump_DynamicEndpointConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpointConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointsConfigDump_DynamicEndpointConfigValidationError{ field: "EndpointConfig", @@ -2042,7 +3819,26 @@ func (m *EndpointsConfigDump_DynamicEndpointConfig) Validate() error { } } - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointsConfigDump_DynamicEndpointConfigValidationError{ field: "LastUpdated", @@ -2052,9 +3848,62 @@ func (m *EndpointsConfigDump_DynamicEndpointConfig) Validate() error { } } + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return EndpointsConfigDump_DynamicEndpointConfigMultiError(errors) + } + return nil } +// EndpointsConfigDump_DynamicEndpointConfigMultiError is an error wrapping +// multiple validation errors returned by +// EndpointsConfigDump_DynamicEndpointConfig.ValidateAll() if the designated +// constraints aren't met. +type EndpointsConfigDump_DynamicEndpointConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointsConfigDump_DynamicEndpointConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointsConfigDump_DynamicEndpointConfigMultiError) AllErrors() []error { return m } + // EndpointsConfigDump_DynamicEndpointConfigValidationError is the validation // error returned by EndpointsConfigDump_DynamicEndpointConfig.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/admin/v3/init_dump.pb.go b/pkg/api/envoy/admin/v3/init_dump.pb.go index ef7b8f613f..c401ac75ba 100644 --- a/pkg/api/envoy/admin/v3/init_dump.pb.go +++ b/pkg/api/envoy/admin/v3/init_dump.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/init_dump.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Dumps of unready targets of envoy init managers. Envoy's admin fills this message with init managers, // which provides the information of their unready targets. // The :ref:`/init_dump ` will dump all unready targets information. @@ -144,27 +139,28 @@ var file_envoy_admin_v3_init_dump_proto_rawDesc = []byte{ 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x75, 0x6e, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x5f, 0x64, 0x75, - 0x6d, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x61, - 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x2e, 0x55, - 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, - 0x70, 0x52, 0x13, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, - 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x42, 0x37, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xce, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x75, 0x6e, 0x72, 0x65, 0x61, + 0x64, 0x79, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x2e, 0x55, 0x6e, 0x72, 0x65, + 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x13, + 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, + 0x6d, 0x70, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x42, 0x76, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x42, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/init_dump.pb.validate.go b/pkg/api/envoy/admin/v3/init_dump.pb.validate.go index d30d78ef3d..26eebf9092 100644 --- a/pkg/api/envoy/admin/v3/init_dump.pb.validate.go +++ b/pkg/api/envoy/admin/v3/init_dump.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/init_dump.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on UnreadyTargetsDumps with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UnreadyTargetsDumps) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UnreadyTargetsDumps with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UnreadyTargetsDumpsMultiError, or nil if none found. +func (m *UnreadyTargetsDumps) ValidateAll() error { + return m.validate(true) +} + +func (m *UnreadyTargetsDumps) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetUnreadyTargetsDumps() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UnreadyTargetsDumpsValidationError{ + field: fmt.Sprintf("UnreadyTargetsDumps[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UnreadyTargetsDumpsValidationError{ + field: fmt.Sprintf("UnreadyTargetsDumps[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UnreadyTargetsDumpsValidationError{ field: fmt.Sprintf("UnreadyTargetsDumps[%v]", idx), @@ -56,9 +91,30 @@ func (m *UnreadyTargetsDumps) Validate() error { } + if len(errors) > 0 { + return UnreadyTargetsDumpsMultiError(errors) + } + return nil } +// UnreadyTargetsDumpsMultiError is an error wrapping multiple validation +// errors returned by UnreadyTargetsDumps.ValidateAll() if the designated +// constraints aren't met. +type UnreadyTargetsDumpsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UnreadyTargetsDumpsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UnreadyTargetsDumpsMultiError) AllErrors() []error { return m } + // UnreadyTargetsDumpsValidationError is the validation error returned by // UnreadyTargetsDumps.Validate if the designated constraints aren't met. type UnreadyTargetsDumpsValidationError struct { @@ -117,17 +173,55 @@ var _ interface { // Validate checks the field values on UnreadyTargetsDumps_UnreadyTargetsDump // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *UnreadyTargetsDumps_UnreadyTargetsDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// UnreadyTargetsDumps_UnreadyTargetsDump with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// UnreadyTargetsDumps_UnreadyTargetsDumpMultiError, or nil if none found. +func (m *UnreadyTargetsDumps_UnreadyTargetsDump) ValidateAll() error { + return m.validate(true) +} + +func (m *UnreadyTargetsDumps_UnreadyTargetsDump) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name + if len(errors) > 0 { + return UnreadyTargetsDumps_UnreadyTargetsDumpMultiError(errors) + } + return nil } +// UnreadyTargetsDumps_UnreadyTargetsDumpMultiError is an error wrapping +// multiple validation errors returned by +// UnreadyTargetsDumps_UnreadyTargetsDump.ValidateAll() if the designated +// constraints aren't met. +type UnreadyTargetsDumps_UnreadyTargetsDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UnreadyTargetsDumps_UnreadyTargetsDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UnreadyTargetsDumps_UnreadyTargetsDumpMultiError) AllErrors() []error { return m } + // UnreadyTargetsDumps_UnreadyTargetsDumpValidationError is the validation // error returned by UnreadyTargetsDumps_UnreadyTargetsDump.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/admin/v3/listeners.pb.go b/pkg/api/envoy/admin/v3/listeners.pb.go index 0c184ce7ad..79fc9b3f26 100644 --- a/pkg/api/envoy/admin/v3/listeners.pb.go +++ b/pkg/api/envoy/admin/v3/listeners.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/listeners.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Admin endpoint uses this wrapper for `/listeners` to display listener status information. // See :ref:`/listeners ` for more information. type Listeners struct { @@ -165,11 +160,15 @@ var file_envoy_admin_v3_listeners_proto_rawDesc = []byte{ 0x65, 0x73, 0x73, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x38, 0x0a, 0x1c, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x77, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/listeners.pb.validate.go b/pkg/api/envoy/admin/v3/listeners.pb.validate.go index c89de54f74..8b5d0e227f 100644 --- a/pkg/api/envoy/admin/v3/listeners.pb.validate.go +++ b/pkg/api/envoy/admin/v3/listeners.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/listeners.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Listeners with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Listeners) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listeners with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenersMultiError, or nil +// if none found. +func (m *Listeners) ValidateAll() error { + return m.validate(true) +} + +func (m *Listeners) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetListenerStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersValidationError{ + field: fmt.Sprintf("ListenerStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersValidationError{ + field: fmt.Sprintf("ListenerStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenersValidationError{ field: fmt.Sprintf("ListenerStatuses[%v]", idx), @@ -55,9 +91,29 @@ func (m *Listeners) Validate() error { } + if len(errors) > 0 { + return ListenersMultiError(errors) + } + return nil } +// ListenersMultiError is an error wrapping multiple validation errors returned +// by Listeners.ValidateAll() if the designated constraints aren't met. +type ListenersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersMultiError) AllErrors() []error { return m } + // ListenersValidationError is the validation error returned by // Listeners.Validate if the designated constraints aren't met. type ListenersValidationError struct { @@ -113,16 +169,49 @@ var _ interface { } = ListenersValidationError{} // Validate checks the field values on ListenerStatus with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListenerStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerStatus with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenerStatusMultiError, +// or nil if none found. +func (m *ListenerStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerStatusValidationError{ field: "LocalAddress", @@ -132,9 +221,30 @@ func (m *ListenerStatus) Validate() error { } } + if len(errors) > 0 { + return ListenerStatusMultiError(errors) + } + return nil } +// ListenerStatusMultiError is an error wrapping multiple validation errors +// returned by ListenerStatus.ValidateAll() if the designated constraints +// aren't met. +type ListenerStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerStatusMultiError) AllErrors() []error { return m } + // ListenerStatusValidationError is the validation error returned by // ListenerStatus.Validate if the designated constraints aren't met. type ListenerStatusValidationError struct { diff --git a/pkg/api/envoy/admin/v3/memory.pb.go b/pkg/api/envoy/admin/v3/memory.pb.go index 95d9767f07..d52dc0a0da 100644 --- a/pkg/api/envoy/admin/v3/memory.pb.go +++ b/pkg/api/envoy/admin/v3/memory.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/memory.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Proto representation of the internal memory consumption of an Envoy instance. These represent // values extracted from an internal TCMalloc instance. For more information, see the section of the // docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html). @@ -158,11 +153,15 @@ var file_envoy_admin_v3_memory_proto_rawDesc = []byte{ 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x35, 0x0a, 0x1c, 0x69, 0x6f, + 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x74, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/memory.pb.validate.go b/pkg/api/envoy/admin/v3/memory.pb.validate.go index fa75a82c14..201885308b 100644 --- a/pkg/api/envoy/admin/v3/memory.pb.validate.go +++ b/pkg/api/envoy/admin/v3/memory.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/memory.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,16 +31,31 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Memory with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Memory) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Memory with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in MemoryMultiError, or nil if none found. +func (m *Memory) ValidateAll() error { + return m.validate(true) +} + +func (m *Memory) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Allocated // no validation rules for HeapSize @@ -52,9 +68,29 @@ func (m *Memory) Validate() error { // no validation rules for TotalPhysicalBytes + if len(errors) > 0 { + return MemoryMultiError(errors) + } + return nil } +// MemoryMultiError is an error wrapping multiple validation errors returned by +// Memory.ValidateAll() if the designated constraints aren't met. +type MemoryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MemoryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MemoryMultiError) AllErrors() []error { return m } + // MemoryValidationError is the validation error returned by Memory.Validate if // the designated constraints aren't met. type MemoryValidationError struct { diff --git a/pkg/api/envoy/admin/v3/metrics.pb.go b/pkg/api/envoy/admin/v3/metrics.pb.go index bbe7bbd345..6c05b398be 100644 --- a/pkg/api/envoy/admin/v3/metrics.pb.go +++ b/pkg/api/envoy/admin/v3/metrics.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/metrics.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SimpleMetric_Type int32 const ( @@ -160,11 +155,15 @@ var file_envoy_admin_v3_metrics_proto_rawDesc = []byte{ 0x55, 0x4e, 0x54, 0x45, 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, 0x45, 0x10, 0x01, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x36, 0x0a, 0x1c, 0x69, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x75, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/metrics.pb.validate.go b/pkg/api/envoy/admin/v3/metrics.pb.validate.go index e0881753cc..96e04a5ab4 100644 --- a/pkg/api/envoy/admin/v3/metrics.pb.validate.go +++ b/pkg/api/envoy/admin/v3/metrics.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/metrics.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,61 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SimpleMetric with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SimpleMetric) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SimpleMetric with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SimpleMetricMultiError, or +// nil if none found. +func (m *SimpleMetric) ValidateAll() error { + return m.validate(true) +} + +func (m *SimpleMetric) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Type // no validation rules for Value // no validation rules for Name + if len(errors) > 0 { + return SimpleMetricMultiError(errors) + } + return nil } +// SimpleMetricMultiError is an error wrapping multiple validation errors +// returned by SimpleMetric.ValidateAll() if the designated constraints aren't met. +type SimpleMetricMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SimpleMetricMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SimpleMetricMultiError) AllErrors() []error { return m } + // SimpleMetricValidationError is the validation error returned by // SimpleMetric.Validate if the designated constraints aren't met. type SimpleMetricValidationError struct { diff --git a/pkg/api/envoy/admin/v3/mutex_stats.pb.go b/pkg/api/envoy/admin/v3/mutex_stats.pb.go index 83b000f72a..fd4af5476e 100644 --- a/pkg/api/envoy/admin/v3/mutex_stats.pb.go +++ b/pkg/api/envoy/admin/v3/mutex_stats.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/mutex_stats.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Proto representation of the statistics collected upon absl::Mutex contention, if Envoy is run // under :option:`--enable-mutex-tracing`. For more information, see the `absl::Mutex` // [docs](https://abseil.io/about/design/mutex#extra-features). @@ -121,11 +116,15 @@ var file_envoy_admin_v3_mutex_stats_proto_rawDesc = []byte{ 0x74, 0x69, 0x6d, 0x65, 0x57, 0x61, 0x69, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x78, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x39, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x78, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/mutex_stats.pb.validate.go b/pkg/api/envoy/admin/v3/mutex_stats.pb.validate.go index 394454b1ef..55d89de2d7 100644 --- a/pkg/api/envoy/admin/v3/mutex_stats.pb.validate.go +++ b/pkg/api/envoy/admin/v3/mutex_stats.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/mutex_stats.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,61 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MutexStats with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MutexStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MutexStats with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MutexStatsMultiError, or +// nil if none found. +func (m *MutexStats) ValidateAll() error { + return m.validate(true) +} + +func (m *MutexStats) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for NumContentions // no validation rules for CurrentWaitCycles // no validation rules for LifetimeWaitCycles + if len(errors) > 0 { + return MutexStatsMultiError(errors) + } + return nil } +// MutexStatsMultiError is an error wrapping multiple validation errors +// returned by MutexStats.ValidateAll() if the designated constraints aren't met. +type MutexStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MutexStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MutexStatsMultiError) AllErrors() []error { return m } + // MutexStatsValidationError is the validation error returned by // MutexStats.Validate if the designated constraints aren't met. type MutexStatsValidationError struct { diff --git a/pkg/api/envoy/admin/v3/server_info.pb.go b/pkg/api/envoy/admin/v3/server_info.pb.go index 0415158565..554e81f691 100644 --- a/pkg/api/envoy/admin/v3/server_info.pb.go +++ b/pkg/api/envoy/admin/v3/server_info.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/server_info.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ServerInfo_State int32 const ( @@ -336,7 +330,7 @@ func (x *ServerInfo) GetNode() *v3.Node { return nil } -// [#next-free-field: 37] +// [#next-free-field: 39] type CommandLineOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -400,18 +394,16 @@ type CommandLineOptions struct { CpusetThreads bool `protobuf:"varint,25,opt,name=cpuset_threads,json=cpusetThreads,proto3" json:"cpuset_threads,omitempty"` // See :option:`--disable-extensions` for details. DisabledExtensions []string `protobuf:"bytes,28,rep,name=disabled_extensions,json=disabledExtensions,proto3" json:"disabled_extensions,omitempty"` - // See :option:`--bootstrap-version` for details. - BootstrapVersion uint32 `protobuf:"varint,29,opt,name=bootstrap_version,json=bootstrapVersion,proto3" json:"bootstrap_version,omitempty"` // See :option:`--enable-fine-grain-logging` for details. EnableFineGrainLogging bool `protobuf:"varint,34,opt,name=enable_fine_grain_logging,json=enableFineGrainLogging,proto3" json:"enable_fine_grain_logging,omitempty"` // See :option:`--socket-path` for details. SocketPath string `protobuf:"bytes,35,opt,name=socket_path,json=socketPath,proto3" json:"socket_path,omitempty"` // See :option:`--socket-mode` for details. SocketMode uint32 `protobuf:"varint,36,opt,name=socket_mode,json=socketMode,proto3" json:"socket_mode,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedMaxStats uint64 `protobuf:"varint,20,opt,name=hidden_envoy_deprecated_max_stats,json=hiddenEnvoyDeprecatedMaxStats,proto3" json:"hidden_envoy_deprecated_max_stats,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedMaxObjNameLen uint64 `protobuf:"varint,21,opt,name=hidden_envoy_deprecated_max_obj_name_len,json=hiddenEnvoyDeprecatedMaxObjNameLen,proto3" json:"hidden_envoy_deprecated_max_obj_name_len,omitempty"` + // See :option:`--enable-core-dump` for details. + EnableCoreDump bool `protobuf:"varint,37,opt,name=enable_core_dump,json=enableCoreDump,proto3" json:"enable_core_dump,omitempty"` + // See :option:`--stats-tag` for details. + StatsTag []string `protobuf:"bytes,38,rep,name=stats_tag,json=statsTag,proto3" json:"stats_tag,omitempty"` } func (x *CommandLineOptions) Reset() { @@ -649,13 +641,6 @@ func (x *CommandLineOptions) GetDisabledExtensions() []string { return nil } -func (x *CommandLineOptions) GetBootstrapVersion() uint32 { - if x != nil { - return x.BootstrapVersion - } - return 0 -} - func (x *CommandLineOptions) GetEnableFineGrainLogging() bool { if x != nil { return x.EnableFineGrainLogging @@ -677,20 +662,18 @@ func (x *CommandLineOptions) GetSocketMode() uint32 { return 0 } -// Deprecated: Do not use. -func (x *CommandLineOptions) GetHiddenEnvoyDeprecatedMaxStats() uint64 { +func (x *CommandLineOptions) GetEnableCoreDump() bool { if x != nil { - return x.HiddenEnvoyDeprecatedMaxStats + return x.EnableCoreDump } - return 0 + return false } -// Deprecated: Do not use. -func (x *CommandLineOptions) GetHiddenEnvoyDeprecatedMaxObjNameLen() uint64 { +func (x *CommandLineOptions) GetStatsTag() []string { if x != nil { - return x.HiddenEnvoyDeprecatedMaxObjNameLen + return x.StatsTag } - return 0 + return nil } var File_envoy_admin_v3_server_info_proto protoreflect.FileDescriptor @@ -703,174 +686,170 @@ var file_envoy_admin_v3_server_info_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x04, 0x0a, 0x0a, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x75, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x45, 0x0a, 0x11, 0x75, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, - 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, - 0x2e, 0x0a, 0x13, 0x68, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x54, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x47, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, - 0x0a, 0x04, 0x4c, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x45, 0x5f, 0x49, 0x4e, - 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, - 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x3a, 0x25, - 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb3, 0x0f, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x62, - 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1f, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x10, 0x75, 0x73, 0x65, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x42, 0x61, - 0x73, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, - 0x49, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x3d, 0x0a, 0x1b, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1a, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x1e, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, - 0x2c, 0x0a, 0x12, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x65, 0x0a, - 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, - 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6c, - 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x65, - 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x6f, - 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, - 0x64, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x49, 0x0a, 0x13, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x11, 0x66, 0x69, 0x6c, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, - 0x0e, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, - 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, - 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x53, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x4b, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x12, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x04, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, - 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x74, 0x5f, - 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x75, 0x74, 0x65, 0x78, - 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x54, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x70, 0x75, 0x73, 0x65, - 0x74, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x63, 0x70, 0x75, 0x73, 0x65, 0x74, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x12, 0x2f, - 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x2b, 0x0a, 0x11, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x62, 0x6f, 0x6f, 0x74, - 0x73, 0x74, 0x72, 0x61, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x19, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6e, 0x65, 0x5f, 0x67, 0x72, 0x61, 0x69, - 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x69, 0x6e, - 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x52, 0x0a, 0x21, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1d, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x5e, 0x0a, - 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x62, 0x6a, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x4d, 0x61, 0x78, 0x4f, 0x62, 0x6a, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x22, 0x1b, 0x0a, - 0x09, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x34, - 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x36, 0x10, 0x01, 0x22, 0x2d, 0x0a, 0x04, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x65, 0x72, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0c, 0x0a, - 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, - 0x6e, 0x69, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x10, 0x02, 0x22, 0x2b, 0x0a, 0x0d, 0x44, 0x72, 0x61, - 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x72, - 0x61, 0x64, 0x75, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x6d, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x65, 0x10, 0x01, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x42, 0x39, 0x0a, 0x1c, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x12, 0x45, 0x0a, 0x11, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x6c, + 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x75, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x6f, + 0x74, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x22, 0x47, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x56, + 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, + 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, + 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0xdb, 0x0e, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, + 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, + 0x73, 0x65, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x42, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, + 0x20, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x79, + 0x61, 0x6d, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x3d, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x75, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x75, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x65, 0x0a, 0x18, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, + 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, + 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x6c, + 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, + 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5a, + 0x6f, 0x6e, 0x65, 0x12, 0x49, 0x0a, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6c, 0x75, 0x73, + 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x66, 0x69, 0x6c, + 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x38, + 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, + 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x64, 0x72, 0x61, 0x69, + 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x4b, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, + 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x48, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x63, + 0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x70, 0x75, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x61, 0x64, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x70, 0x75, 0x73, + 0x65, 0x74, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x1c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6e, 0x65, 0x5f, 0x67, 0x72, 0x61, 0x69, 0x6e, 0x5f, + 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x69, 0x6e, 0x4c, 0x6f, + 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x18, 0x25, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x44, 0x75, 0x6d, + 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x26, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x73, 0x54, 0x61, 0x67, 0x22, 0x1b, + 0x0a, 0x09, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x76, + 0x34, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x36, 0x10, 0x01, 0x22, 0x2d, 0x0a, 0x04, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x65, 0x72, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x49, 0x6e, 0x69, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x10, 0x02, 0x22, 0x2b, 0x0a, 0x0d, 0x44, 0x72, + 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x47, + 0x72, 0x61, 0x64, 0x75, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x6d, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x10, 0x01, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x14, + 0x10, 0x15, 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x52, 0x09, + 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x6f, + 0x62, 0x6a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x52, 0x11, 0x62, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x78, + 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/server_info.pb.validate.go b/pkg/api/envoy/admin/v3/server_info.pb.validate.go index a64e5466b4..d77b43f64f 100644 --- a/pkg/api/envoy/admin/v3/server_info.pb.validate.go +++ b/pkg/api/envoy/admin/v3/server_info.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/server_info.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ServerInfo with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ServerInfo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServerInfo with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ServerInfoMultiError, or +// nil if none found. +func (m *ServerInfo) ValidateAll() error { + return m.validate(true) +} + +func (m *ServerInfo) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Version // no validation rules for State - if v, ok := interface{}(m.GetUptimeCurrentEpoch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUptimeCurrentEpoch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeCurrentEpoch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeCurrentEpoch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUptimeCurrentEpoch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeCurrentEpoch", @@ -54,7 +90,26 @@ func (m *ServerInfo) Validate() error { } } - if v, ok := interface{}(m.GetUptimeAllEpochs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUptimeAllEpochs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeAllEpochs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeAllEpochs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUptimeAllEpochs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeAllEpochs", @@ -66,7 +121,26 @@ func (m *ServerInfo) Validate() error { // no validation rules for HotRestartVersion - if v, ok := interface{}(m.GetCommandLineOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommandLineOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "CommandLineOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "CommandLineOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommandLineOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "CommandLineOptions", @@ -76,7 +150,26 @@ func (m *ServerInfo) Validate() error { } } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "Node", @@ -86,9 +179,29 @@ func (m *ServerInfo) Validate() error { } } + if len(errors) > 0 { + return ServerInfoMultiError(errors) + } + return nil } +// ServerInfoMultiError is an error wrapping multiple validation errors +// returned by ServerInfo.ValidateAll() if the designated constraints aren't met. +type ServerInfoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServerInfoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServerInfoMultiError) AllErrors() []error { return m } + // ServerInfoValidationError is the validation error returned by // ServerInfo.Validate if the designated constraints aren't met. type ServerInfoValidationError struct { @@ -145,12 +258,26 @@ var _ interface { // Validate checks the field values on CommandLineOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommandLineOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommandLineOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommandLineOptionsMultiError, or nil if none found. +func (m *CommandLineOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *CommandLineOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for BaseId // no validation rules for UseDynamicBaseId @@ -189,7 +316,26 @@ func (m *CommandLineOptions) Validate() error { // no validation rules for ServiceZone - if v, ok := interface{}(m.GetFileFlushInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFileFlushInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "FileFlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "FileFlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFileFlushInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "FileFlushInterval", @@ -199,7 +345,26 @@ func (m *CommandLineOptions) Validate() error { } } - if v, ok := interface{}(m.GetDrainTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDrainTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "DrainTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "DrainTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "DrainTime", @@ -211,7 +376,26 @@ func (m *CommandLineOptions) Validate() error { // no validation rules for DrainStrategy - if v, ok := interface{}(m.GetParentShutdownTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetParentShutdownTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "ParentShutdownTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "ParentShutdownTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParentShutdownTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "ParentShutdownTime", @@ -231,21 +415,38 @@ func (m *CommandLineOptions) Validate() error { // no validation rules for CpusetThreads - // no validation rules for BootstrapVersion - // no validation rules for EnableFineGrainLogging // no validation rules for SocketPath // no validation rules for SocketMode - // no validation rules for HiddenEnvoyDeprecatedMaxStats + // no validation rules for EnableCoreDump - // no validation rules for HiddenEnvoyDeprecatedMaxObjNameLen + if len(errors) > 0 { + return CommandLineOptionsMultiError(errors) + } return nil } +// CommandLineOptionsMultiError is an error wrapping multiple validation errors +// returned by CommandLineOptions.ValidateAll() if the designated constraints +// aren't met. +type CommandLineOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommandLineOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommandLineOptionsMultiError) AllErrors() []error { return m } + // CommandLineOptionsValidationError is the validation error returned by // CommandLineOptions.Validate if the designated constraints aren't met. type CommandLineOptionsValidationError struct { diff --git a/pkg/api/envoy/admin/v3/tap.pb.go b/pkg/api/envoy/admin/v3/tap.pb.go index 1186d33248..6f1e8abb5f 100644 --- a/pkg/api/envoy/admin/v3/tap.pb.go +++ b/pkg/api/envoy/admin/v3/tap.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/admin/v3/tap.proto -package envoy_admin_v3 +package adminv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/tap/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The /tap admin request body that is used to configure an active tap session. type TapRequest struct { state protoimpl.MessageState @@ -110,11 +105,15 @@ var file_envoy_admin_v3_tap_proto_rawDesc = []byte{ 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x54, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x32, 0x0a, 0x1c, + 0x61, 0x2e, 0x54, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x71, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/admin/v3/tap.pb.validate.go b/pkg/api/envoy/admin/v3/tap.pb.validate.go index d9218386a4..2364c9ccef 100644 --- a/pkg/api/envoy/admin/v3/tap.pb.validate.go +++ b/pkg/api/envoy/admin/v3/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/admin/v3/tap.proto -package envoy_admin_v3 +package adminv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,31 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TapRequest with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TapRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TapRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TapRequestMultiError, or +// nil if none found. +func (m *TapRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *TapRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetConfigId()) < 1 { - return TapRequestValidationError{ + err := TapRequestValidationError{ field: "ConfigId", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetTapConfig() == nil { - return TapRequestValidationError{ + err := TapRequestValidationError{ field: "TapConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTapConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTapConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapRequestValidationError{ + field: "TapConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapRequestValidationError{ + field: "TapConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTapConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapRequestValidationError{ field: "TapConfig", @@ -64,9 +108,29 @@ func (m *TapRequest) Validate() error { } } + if len(errors) > 0 { + return TapRequestMultiError(errors) + } + return nil } +// TapRequestMultiError is an error wrapping multiple validation errors +// returned by TapRequest.ValidateAll() if the designated constraints aren't met. +type TapRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapRequestMultiError) AllErrors() []error { return m } + // TapRequestValidationError is the validation error returned by // TapRequest.Validate if the designated constraints aren't met. type TapRequestValidationError struct { diff --git a/pkg/api/envoy/admin/v4alpha/certs.pb.go b/pkg/api/envoy/admin/v4alpha/certs.pb.go deleted file mode 100644 index aa14cfab4b..0000000000 --- a/pkg/api/envoy/admin/v4alpha/certs.pb.go +++ /dev/null @@ -1,612 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/certs.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Proto representation of certificate details. Admin endpoint uses this wrapper for `/certs` to -// display certificate information. See :ref:`/certs ` for more -// information. -type Certificates struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of certificates known to an Envoy. - Certificates []*Certificate `protobuf:"bytes,1,rep,name=certificates,proto3" json:"certificates,omitempty"` -} - -func (x *Certificates) Reset() { - *x = Certificates{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Certificates) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Certificates) ProtoMessage() {} - -func (x *Certificates) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Certificates.ProtoReflect.Descriptor instead. -func (*Certificates) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_certs_proto_rawDescGZIP(), []int{0} -} - -func (x *Certificates) GetCertificates() []*Certificate { - if x != nil { - return x.Certificates - } - return nil -} - -type Certificate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Details of CA certificate. - CaCert []*CertificateDetails `protobuf:"bytes,1,rep,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"` - // Details of Certificate Chain - CertChain []*CertificateDetails `protobuf:"bytes,2,rep,name=cert_chain,json=certChain,proto3" json:"cert_chain,omitempty"` -} - -func (x *Certificate) Reset() { - *x = Certificate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Certificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Certificate) ProtoMessage() {} - -func (x *Certificate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Certificate.ProtoReflect.Descriptor instead. -func (*Certificate) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_certs_proto_rawDescGZIP(), []int{1} -} - -func (x *Certificate) GetCaCert() []*CertificateDetails { - if x != nil { - return x.CaCert - } - return nil -} - -func (x *Certificate) GetCertChain() []*CertificateDetails { - if x != nil { - return x.CertChain - } - return nil -} - -// [#next-free-field: 8] -type CertificateDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path of the certificate. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Certificate Serial Number. - SerialNumber string `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` - // List of Subject Alternate names. - SubjectAltNames []*SubjectAlternateName `protobuf:"bytes,3,rep,name=subject_alt_names,json=subjectAltNames,proto3" json:"subject_alt_names,omitempty"` - // Minimum of days until expiration of certificate and it's chain. - DaysUntilExpiration uint64 `protobuf:"varint,4,opt,name=days_until_expiration,json=daysUntilExpiration,proto3" json:"days_until_expiration,omitempty"` - // Indicates the time from which the certificate is valid. - ValidFrom *timestamp.Timestamp `protobuf:"bytes,5,opt,name=valid_from,json=validFrom,proto3" json:"valid_from,omitempty"` - // Indicates the time at which the certificate expires. - ExpirationTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` - // Details related to the OCSP response associated with this certificate, if any. - OcspDetails *CertificateDetails_OcspDetails `protobuf:"bytes,7,opt,name=ocsp_details,json=ocspDetails,proto3" json:"ocsp_details,omitempty"` -} - -func (x *CertificateDetails) Reset() { - *x = CertificateDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CertificateDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CertificateDetails) ProtoMessage() {} - -func (x *CertificateDetails) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CertificateDetails.ProtoReflect.Descriptor instead. -func (*CertificateDetails) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_certs_proto_rawDescGZIP(), []int{2} -} - -func (x *CertificateDetails) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *CertificateDetails) GetSerialNumber() string { - if x != nil { - return x.SerialNumber - } - return "" -} - -func (x *CertificateDetails) GetSubjectAltNames() []*SubjectAlternateName { - if x != nil { - return x.SubjectAltNames - } - return nil -} - -func (x *CertificateDetails) GetDaysUntilExpiration() uint64 { - if x != nil { - return x.DaysUntilExpiration - } - return 0 -} - -func (x *CertificateDetails) GetValidFrom() *timestamp.Timestamp { - if x != nil { - return x.ValidFrom - } - return nil -} - -func (x *CertificateDetails) GetExpirationTime() *timestamp.Timestamp { - if x != nil { - return x.ExpirationTime - } - return nil -} - -func (x *CertificateDetails) GetOcspDetails() *CertificateDetails_OcspDetails { - if x != nil { - return x.OcspDetails - } - return nil -} - -type SubjectAlternateName struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Subject Alternate Name. - // - // Types that are assignable to Name: - // *SubjectAlternateName_Dns - // *SubjectAlternateName_Uri - // *SubjectAlternateName_IpAddress - Name isSubjectAlternateName_Name `protobuf_oneof:"name"` -} - -func (x *SubjectAlternateName) Reset() { - *x = SubjectAlternateName{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubjectAlternateName) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubjectAlternateName) ProtoMessage() {} - -func (x *SubjectAlternateName) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubjectAlternateName.ProtoReflect.Descriptor instead. -func (*SubjectAlternateName) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_certs_proto_rawDescGZIP(), []int{3} -} - -func (m *SubjectAlternateName) GetName() isSubjectAlternateName_Name { - if m != nil { - return m.Name - } - return nil -} - -func (x *SubjectAlternateName) GetDns() string { - if x, ok := x.GetName().(*SubjectAlternateName_Dns); ok { - return x.Dns - } - return "" -} - -func (x *SubjectAlternateName) GetUri() string { - if x, ok := x.GetName().(*SubjectAlternateName_Uri); ok { - return x.Uri - } - return "" -} - -func (x *SubjectAlternateName) GetIpAddress() string { - if x, ok := x.GetName().(*SubjectAlternateName_IpAddress); ok { - return x.IpAddress - } - return "" -} - -type isSubjectAlternateName_Name interface { - isSubjectAlternateName_Name() -} - -type SubjectAlternateName_Dns struct { - Dns string `protobuf:"bytes,1,opt,name=dns,proto3,oneof"` -} - -type SubjectAlternateName_Uri struct { - Uri string `protobuf:"bytes,2,opt,name=uri,proto3,oneof"` -} - -type SubjectAlternateName_IpAddress struct { - IpAddress string `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3,oneof"` -} - -func (*SubjectAlternateName_Dns) isSubjectAlternateName_Name() {} - -func (*SubjectAlternateName_Uri) isSubjectAlternateName_Name() {} - -func (*SubjectAlternateName_IpAddress) isSubjectAlternateName_Name() {} - -type CertificateDetails_OcspDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Indicates the time from which the OCSP response is valid. - ValidFrom *timestamp.Timestamp `protobuf:"bytes,1,opt,name=valid_from,json=validFrom,proto3" json:"valid_from,omitempty"` - // Indicates the time at which the OCSP response expires. - Expiration *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (x *CertificateDetails_OcspDetails) Reset() { - *x = CertificateDetails_OcspDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CertificateDetails_OcspDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CertificateDetails_OcspDetails) ProtoMessage() {} - -func (x *CertificateDetails_OcspDetails) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_certs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CertificateDetails_OcspDetails.ProtoReflect.Descriptor instead. -func (*CertificateDetails_OcspDetails) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_certs_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *CertificateDetails_OcspDetails) GetValidFrom() *timestamp.Timestamp { - if x != nil { - return x.ValidFrom - } - return nil -} - -func (x *CertificateDetails_OcspDetails) GetExpiration() *timestamp.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -var File_envoy_admin_v4alpha_certs_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_certs_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, 0x0c, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x52, 0x0c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x3a, - 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x06, 0x63, - 0x61, 0x43, 0x65, 0x72, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x52, 0x09, 0x63, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x21, 0x9a, - 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x22, 0x97, 0x05, 0x0a, 0x12, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x73, - 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x55, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, - 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x61, 0x79, 0x73, 0x5f, - 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x64, 0x61, 0x79, 0x73, 0x55, 0x6e, 0x74, 0x69, - 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x6f, - 0x63, 0x73, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x4f, 0x63, 0x73, 0x70, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0b, 0x6f, 0x63, 0x73, 0x70, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x1a, 0xba, 0x01, 0x0a, 0x0b, 0x4f, 0x63, 0x73, 0x70, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x3a, - 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, - 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x4f, 0x63, 0x73, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0a, 0x69, - 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2a, 0x9a, 0xc5, - 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x39, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x43, 0x65, 0x72, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_certs_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_certs_proto_rawDescData = file_envoy_admin_v4alpha_certs_proto_rawDesc -) - -func file_envoy_admin_v4alpha_certs_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_certs_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_certs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_certs_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_certs_proto_rawDescData -} - -var file_envoy_admin_v4alpha_certs_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_admin_v4alpha_certs_proto_goTypes = []interface{}{ - (*Certificates)(nil), // 0: envoy.admin.v4alpha.Certificates - (*Certificate)(nil), // 1: envoy.admin.v4alpha.Certificate - (*CertificateDetails)(nil), // 2: envoy.admin.v4alpha.CertificateDetails - (*SubjectAlternateName)(nil), // 3: envoy.admin.v4alpha.SubjectAlternateName - (*CertificateDetails_OcspDetails)(nil), // 4: envoy.admin.v4alpha.CertificateDetails.OcspDetails - (*timestamp.Timestamp)(nil), // 5: google.protobuf.Timestamp -} -var file_envoy_admin_v4alpha_certs_proto_depIdxs = []int32{ - 1, // 0: envoy.admin.v4alpha.Certificates.certificates:type_name -> envoy.admin.v4alpha.Certificate - 2, // 1: envoy.admin.v4alpha.Certificate.ca_cert:type_name -> envoy.admin.v4alpha.CertificateDetails - 2, // 2: envoy.admin.v4alpha.Certificate.cert_chain:type_name -> envoy.admin.v4alpha.CertificateDetails - 3, // 3: envoy.admin.v4alpha.CertificateDetails.subject_alt_names:type_name -> envoy.admin.v4alpha.SubjectAlternateName - 5, // 4: envoy.admin.v4alpha.CertificateDetails.valid_from:type_name -> google.protobuf.Timestamp - 5, // 5: envoy.admin.v4alpha.CertificateDetails.expiration_time:type_name -> google.protobuf.Timestamp - 4, // 6: envoy.admin.v4alpha.CertificateDetails.ocsp_details:type_name -> envoy.admin.v4alpha.CertificateDetails.OcspDetails - 5, // 7: envoy.admin.v4alpha.CertificateDetails.OcspDetails.valid_from:type_name -> google.protobuf.Timestamp - 5, // 8: envoy.admin.v4alpha.CertificateDetails.OcspDetails.expiration:type_name -> google.protobuf.Timestamp - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_certs_proto_init() } -func file_envoy_admin_v4alpha_certs_proto_init() { - if File_envoy_admin_v4alpha_certs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_certs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Certificates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_certs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Certificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_certs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertificateDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_certs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectAlternateName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_certs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertificateDetails_OcspDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_admin_v4alpha_certs_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*SubjectAlternateName_Dns)(nil), - (*SubjectAlternateName_Uri)(nil), - (*SubjectAlternateName_IpAddress)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_certs_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_certs_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_certs_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_certs_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_certs_proto = out.File - file_envoy_admin_v4alpha_certs_proto_rawDesc = nil - file_envoy_admin_v4alpha_certs_proto_goTypes = nil - file_envoy_admin_v4alpha_certs_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/certs.pb.validate.go b/pkg/api/envoy/admin/v4alpha/certs.pb.validate.go deleted file mode 100644 index 441f028741..0000000000 --- a/pkg/api/envoy/admin/v4alpha/certs.pb.validate.go +++ /dev/null @@ -1,495 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/certs.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on Certificates with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *Certificates) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetCertificates() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificatesValidationError{ - field: fmt.Sprintf("Certificates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// CertificatesValidationError is the validation error returned by -// Certificates.Validate if the designated constraints aren't met. -type CertificatesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CertificatesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CertificatesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CertificatesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CertificatesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CertificatesValidationError) ErrorName() string { return "CertificatesValidationError" } - -// Error satisfies the builtin error interface -func (e CertificatesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCertificates.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CertificatesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CertificatesValidationError{} - -// Validate checks the field values on Certificate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *Certificate) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetCaCert() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationError{ - field: fmt.Sprintf("CaCert[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetCertChain() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationError{ - field: fmt.Sprintf("CertChain[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// CertificateValidationError is the validation error returned by -// Certificate.Validate if the designated constraints aren't met. -type CertificateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CertificateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CertificateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CertificateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CertificateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CertificateValidationError) ErrorName() string { return "CertificateValidationError" } - -// Error satisfies the builtin error interface -func (e CertificateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCertificate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CertificateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CertificateValidationError{} - -// Validate checks the field values on CertificateDetails with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CertificateDetails) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Path - - // no validation rules for SerialNumber - - for idx, item := range m.GetSubjectAltNames() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateDetailsValidationError{ - field: fmt.Sprintf("SubjectAltNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for DaysUntilExpiration - - if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateDetailsValidationError{ - field: "ValidFrom", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetExpirationTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateDetailsValidationError{ - field: "ExpirationTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetOcspDetails()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateDetailsValidationError{ - field: "OcspDetails", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// CertificateDetailsValidationError is the validation error returned by -// CertificateDetails.Validate if the designated constraints aren't met. -type CertificateDetailsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CertificateDetailsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CertificateDetailsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CertificateDetailsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CertificateDetailsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CertificateDetailsValidationError) ErrorName() string { - return "CertificateDetailsValidationError" -} - -// Error satisfies the builtin error interface -func (e CertificateDetailsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCertificateDetails.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CertificateDetailsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CertificateDetailsValidationError{} - -// Validate checks the field values on SubjectAlternateName with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *SubjectAlternateName) Validate() error { - if m == nil { - return nil - } - - switch m.Name.(type) { - - case *SubjectAlternateName_Dns: - // no validation rules for Dns - - case *SubjectAlternateName_Uri: - // no validation rules for Uri - - case *SubjectAlternateName_IpAddress: - // no validation rules for IpAddress - - } - - return nil -} - -// SubjectAlternateNameValidationError is the validation error returned by -// SubjectAlternateName.Validate if the designated constraints aren't met. -type SubjectAlternateNameValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SubjectAlternateNameValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SubjectAlternateNameValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SubjectAlternateNameValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SubjectAlternateNameValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SubjectAlternateNameValidationError) ErrorName() string { - return "SubjectAlternateNameValidationError" -} - -// Error satisfies the builtin error interface -func (e SubjectAlternateNameValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSubjectAlternateName.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SubjectAlternateNameValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SubjectAlternateNameValidationError{} - -// Validate checks the field values on CertificateDetails_OcspDetails with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CertificateDetails_OcspDetails) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateDetails_OcspDetailsValidationError{ - field: "ValidFrom", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetExpiration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateDetails_OcspDetailsValidationError{ - field: "Expiration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// CertificateDetails_OcspDetailsValidationError is the validation error -// returned by CertificateDetails_OcspDetails.Validate if the designated -// constraints aren't met. -type CertificateDetails_OcspDetailsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CertificateDetails_OcspDetailsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CertificateDetails_OcspDetailsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CertificateDetails_OcspDetailsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CertificateDetails_OcspDetailsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CertificateDetails_OcspDetailsValidationError) ErrorName() string { - return "CertificateDetails_OcspDetailsValidationError" -} - -// Error satisfies the builtin error interface -func (e CertificateDetails_OcspDetailsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCertificateDetails_OcspDetails.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CertificateDetails_OcspDetailsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CertificateDetails_OcspDetailsValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/clusters.pb.go b/pkg/api/envoy/admin/v4alpha/clusters.pb.go deleted file mode 100644 index 95381fefde..0000000000 --- a/pkg/api/envoy/admin/v4alpha/clusters.pb.go +++ /dev/null @@ -1,699 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/clusters.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Admin endpoint uses this wrapper for `/clusters` to display cluster status information. -// See :ref:`/clusters ` for more information. -type Clusters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Mapping from cluster name to each cluster's status. - ClusterStatuses []*ClusterStatus `protobuf:"bytes,1,rep,name=cluster_statuses,json=clusterStatuses,proto3" json:"cluster_statuses,omitempty"` -} - -func (x *Clusters) Reset() { - *x = Clusters{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Clusters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Clusters) ProtoMessage() {} - -func (x *Clusters) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Clusters.ProtoReflect.Descriptor instead. -func (*Clusters) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_clusters_proto_rawDescGZIP(), []int{0} -} - -func (x *Clusters) GetClusterStatuses() []*ClusterStatus { - if x != nil { - return x.ClusterStatuses - } - return nil -} - -// Details an individual cluster's current status. -// [#next-free-field: 7] -type ClusterStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the cluster. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Denotes whether this cluster was added via API or configured statically. - AddedViaApi bool `protobuf:"varint,2,opt,name=added_via_api,json=addedViaApi,proto3" json:"added_via_api,omitempty"` - // The success rate threshold used in the last interval. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all errors: externally and locally generated were used to calculate the threshold. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*, only externally generated errors were used to calculate the threshold. - // The threshold is used to eject hosts based on their success rate. See - // :ref:`Cluster outlier detection ` documentation for details. - // - // Note: this field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based - // outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no - // threshold for that interval. - // 3. Outlier detection is not enabled for this cluster. - SuccessRateEjectionThreshold *v3.Percent `protobuf:"bytes,3,opt,name=success_rate_ejection_threshold,json=successRateEjectionThreshold,proto3" json:"success_rate_ejection_threshold,omitempty"` - // Mapping from host address to the host's current status. - HostStatuses []*HostStatus `protobuf:"bytes,4,rep,name=host_statuses,json=hostStatuses,proto3" json:"host_statuses,omitempty"` - // The success rate threshold used in the last interval when only locally originated failures were - // taken into account and externally originated errors were treated as success. - // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*. The threshold is used to eject hosts based on their success rate. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: this field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based - // outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no - // threshold for that interval. - // 3. Outlier detection is not enabled for this cluster. - LocalOriginSuccessRateEjectionThreshold *v3.Percent `protobuf:"bytes,5,opt,name=local_origin_success_rate_ejection_threshold,json=localOriginSuccessRateEjectionThreshold,proto3" json:"local_origin_success_rate_ejection_threshold,omitempty"` - // :ref:`Circuit breaking ` settings of the cluster. - CircuitBreakers *v4alpha.CircuitBreakers `protobuf:"bytes,6,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` -} - -func (x *ClusterStatus) Reset() { - *x = ClusterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterStatus) ProtoMessage() {} - -func (x *ClusterStatus) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead. -func (*ClusterStatus) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_clusters_proto_rawDescGZIP(), []int{1} -} - -func (x *ClusterStatus) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ClusterStatus) GetAddedViaApi() bool { - if x != nil { - return x.AddedViaApi - } - return false -} - -func (x *ClusterStatus) GetSuccessRateEjectionThreshold() *v3.Percent { - if x != nil { - return x.SuccessRateEjectionThreshold - } - return nil -} - -func (x *ClusterStatus) GetHostStatuses() []*HostStatus { - if x != nil { - return x.HostStatuses - } - return nil -} - -func (x *ClusterStatus) GetLocalOriginSuccessRateEjectionThreshold() *v3.Percent { - if x != nil { - return x.LocalOriginSuccessRateEjectionThreshold - } - return nil -} - -func (x *ClusterStatus) GetCircuitBreakers() *v4alpha.CircuitBreakers { - if x != nil { - return x.CircuitBreakers - } - return nil -} - -// Current state of a particular host. -// [#next-free-field: 10] -type HostStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Address of this host. - Address *v4alpha1.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // List of stats specific to this host. - Stats []*SimpleMetric `protobuf:"bytes,2,rep,name=stats,proto3" json:"stats,omitempty"` - // The host's current health status. - HealthStatus *HostHealthStatus `protobuf:"bytes,3,opt,name=health_status,json=healthStatus,proto3" json:"health_status,omitempty"` - // Request success rate for this host over the last calculated interval. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all errors: externally and locally generated were used in success rate - // calculation. If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*, only externally generated errors were used in success rate calculation. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: the message will not be present if host did not have enough request volume to calculate - // success rate or the cluster did not have enough hosts to run through success rate outlier - // ejection. - SuccessRate *v3.Percent `protobuf:"bytes,4,opt,name=success_rate,json=successRate,proto3" json:"success_rate,omitempty"` - // The host's weight. If not configured, the value defaults to 1. - Weight uint32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"` - // The hostname of the host, if applicable. - Hostname string `protobuf:"bytes,6,opt,name=hostname,proto3" json:"hostname,omitempty"` - // The host's priority. If not configured, the value defaults to 0 (highest priority). - Priority uint32 `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty"` - // Request success rate for this host over the last calculated - // interval when only locally originated errors are taken into account and externally originated - // errors were treated as success. - // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: the message will not be present if host did not have enough request volume to calculate - // success rate or the cluster did not have enough hosts to run through success rate outlier - // ejection. - LocalOriginSuccessRate *v3.Percent `protobuf:"bytes,8,opt,name=local_origin_success_rate,json=localOriginSuccessRate,proto3" json:"local_origin_success_rate,omitempty"` - // locality of the host. - Locality *v4alpha1.Locality `protobuf:"bytes,9,opt,name=locality,proto3" json:"locality,omitempty"` -} - -func (x *HostStatus) Reset() { - *x = HostStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HostStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HostStatus) ProtoMessage() {} - -func (x *HostStatus) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HostStatus.ProtoReflect.Descriptor instead. -func (*HostStatus) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_clusters_proto_rawDescGZIP(), []int{2} -} - -func (x *HostStatus) GetAddress() *v4alpha1.Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *HostStatus) GetStats() []*SimpleMetric { - if x != nil { - return x.Stats - } - return nil -} - -func (x *HostStatus) GetHealthStatus() *HostHealthStatus { - if x != nil { - return x.HealthStatus - } - return nil -} - -func (x *HostStatus) GetSuccessRate() *v3.Percent { - if x != nil { - return x.SuccessRate - } - return nil -} - -func (x *HostStatus) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *HostStatus) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *HostStatus) GetPriority() uint32 { - if x != nil { - return x.Priority - } - return 0 -} - -func (x *HostStatus) GetLocalOriginSuccessRate() *v3.Percent { - if x != nil { - return x.LocalOriginSuccessRate - } - return nil -} - -func (x *HostStatus) GetLocality() *v4alpha1.Locality { - if x != nil { - return x.Locality - } - return nil -} - -// Health status for a host. -// [#next-free-field: 7] -type HostHealthStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The host is currently failing active health checks. - FailedActiveHealthCheck bool `protobuf:"varint,1,opt,name=failed_active_health_check,json=failedActiveHealthCheck,proto3" json:"failed_active_health_check,omitempty"` - // The host is currently considered an outlier and has been ejected. - FailedOutlierCheck bool `protobuf:"varint,2,opt,name=failed_outlier_check,json=failedOutlierCheck,proto3" json:"failed_outlier_check,omitempty"` - // The host is currently being marked as degraded through active health checking. - FailedActiveDegradedCheck bool `protobuf:"varint,4,opt,name=failed_active_degraded_check,json=failedActiveDegradedCheck,proto3" json:"failed_active_degraded_check,omitempty"` - // The host has been removed from service discovery, but is being stabilized due to active - // health checking. - PendingDynamicRemoval bool `protobuf:"varint,5,opt,name=pending_dynamic_removal,json=pendingDynamicRemoval,proto3" json:"pending_dynamic_removal,omitempty"` - // The host has not yet been health checked. - PendingActiveHc bool `protobuf:"varint,6,opt,name=pending_active_hc,json=pendingActiveHc,proto3" json:"pending_active_hc,omitempty"` - // Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported - // here. - // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.] - EdsHealthStatus v4alpha1.HealthStatus `protobuf:"varint,3,opt,name=eds_health_status,json=edsHealthStatus,proto3,enum=envoy.config.core.v4alpha.HealthStatus" json:"eds_health_status,omitempty"` -} - -func (x *HostHealthStatus) Reset() { - *x = HostHealthStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HostHealthStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HostHealthStatus) ProtoMessage() {} - -func (x *HostHealthStatus) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_clusters_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HostHealthStatus.ProtoReflect.Descriptor instead. -func (*HostHealthStatus) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_clusters_proto_rawDescGZIP(), []int{3} -} - -func (x *HostHealthStatus) GetFailedActiveHealthCheck() bool { - if x != nil { - return x.FailedActiveHealthCheck - } - return false -} - -func (x *HostHealthStatus) GetFailedOutlierCheck() bool { - if x != nil { - return x.FailedOutlierCheck - } - return false -} - -func (x *HostHealthStatus) GetFailedActiveDegradedCheck() bool { - if x != nil { - return x.FailedActiveDegradedCheck - } - return false -} - -func (x *HostHealthStatus) GetPendingDynamicRemoval() bool { - if x != nil { - return x.PendingDynamicRemoval - } - return false -} - -func (x *HostHealthStatus) GetPendingActiveHc() bool { - if x != nil { - return x.PendingActiveHc - } - return false -} - -func (x *HostHealthStatus) GetEdsHealthStatus() v4alpha1.HealthStatus { - if x != nil { - return x.EdsHealthStatus - } - return v4alpha1.HealthStatus_UNKNOWN -} - -var File_envoy_admin_v4alpha_clusters_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_clusters_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, - 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x79, 0x0a, 0x08, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x3a, 0x1e, 0x9a, 0xc5, 0x88, 0x1e, 0x19, 0x0a, 0x17, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0xe2, 0x03, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, - 0x0d, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x61, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x65, 0x64, 0x56, 0x69, 0x61, 0x41, 0x70, - 0x69, 0x12, 0x5d, 0x0a, 0x1f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x1c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x45, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x44, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x2c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x52, 0x27, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x45, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x58, 0x0a, - 0x10, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, - 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, - 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x90, 0x04, 0x0a, - 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, - 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x51, 0x0a, 0x19, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x52, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x20, 0x9a, - 0xc5, 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0xa3, 0x03, 0x0a, 0x10, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x6c, - 0x69, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x1c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x11, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, - 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x63, 0x12, 0x53, 0x0a, 0x11, 0x65, 0x64, 0x73, 0x5f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x65, 0x64, - 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x26, 0x9a, - 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3c, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_clusters_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_clusters_proto_rawDescData = file_envoy_admin_v4alpha_clusters_proto_rawDesc -) - -func file_envoy_admin_v4alpha_clusters_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_clusters_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_clusters_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_clusters_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_clusters_proto_rawDescData -} - -var file_envoy_admin_v4alpha_clusters_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_admin_v4alpha_clusters_proto_goTypes = []interface{}{ - (*Clusters)(nil), // 0: envoy.admin.v4alpha.Clusters - (*ClusterStatus)(nil), // 1: envoy.admin.v4alpha.ClusterStatus - (*HostStatus)(nil), // 2: envoy.admin.v4alpha.HostStatus - (*HostHealthStatus)(nil), // 3: envoy.admin.v4alpha.HostHealthStatus - (*v3.Percent)(nil), // 4: envoy.type.v3.Percent - (*v4alpha.CircuitBreakers)(nil), // 5: envoy.config.cluster.v4alpha.CircuitBreakers - (*v4alpha1.Address)(nil), // 6: envoy.config.core.v4alpha.Address - (*SimpleMetric)(nil), // 7: envoy.admin.v4alpha.SimpleMetric - (*v4alpha1.Locality)(nil), // 8: envoy.config.core.v4alpha.Locality - (v4alpha1.HealthStatus)(0), // 9: envoy.config.core.v4alpha.HealthStatus -} -var file_envoy_admin_v4alpha_clusters_proto_depIdxs = []int32{ - 1, // 0: envoy.admin.v4alpha.Clusters.cluster_statuses:type_name -> envoy.admin.v4alpha.ClusterStatus - 4, // 1: envoy.admin.v4alpha.ClusterStatus.success_rate_ejection_threshold:type_name -> envoy.type.v3.Percent - 2, // 2: envoy.admin.v4alpha.ClusterStatus.host_statuses:type_name -> envoy.admin.v4alpha.HostStatus - 4, // 3: envoy.admin.v4alpha.ClusterStatus.local_origin_success_rate_ejection_threshold:type_name -> envoy.type.v3.Percent - 5, // 4: envoy.admin.v4alpha.ClusterStatus.circuit_breakers:type_name -> envoy.config.cluster.v4alpha.CircuitBreakers - 6, // 5: envoy.admin.v4alpha.HostStatus.address:type_name -> envoy.config.core.v4alpha.Address - 7, // 6: envoy.admin.v4alpha.HostStatus.stats:type_name -> envoy.admin.v4alpha.SimpleMetric - 3, // 7: envoy.admin.v4alpha.HostStatus.health_status:type_name -> envoy.admin.v4alpha.HostHealthStatus - 4, // 8: envoy.admin.v4alpha.HostStatus.success_rate:type_name -> envoy.type.v3.Percent - 4, // 9: envoy.admin.v4alpha.HostStatus.local_origin_success_rate:type_name -> envoy.type.v3.Percent - 8, // 10: envoy.admin.v4alpha.HostStatus.locality:type_name -> envoy.config.core.v4alpha.Locality - 9, // 11: envoy.admin.v4alpha.HostHealthStatus.eds_health_status:type_name -> envoy.config.core.v4alpha.HealthStatus - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_clusters_proto_init() } -func file_envoy_admin_v4alpha_clusters_proto_init() { - if File_envoy_admin_v4alpha_clusters_proto != nil { - return - } - file_envoy_admin_v4alpha_metrics_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_clusters_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Clusters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_clusters_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_clusters_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_clusters_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostHealthStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_clusters_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_clusters_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_clusters_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_clusters_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_clusters_proto = out.File - file_envoy_admin_v4alpha_clusters_proto_rawDesc = nil - file_envoy_admin_v4alpha_clusters_proto_goTypes = nil - file_envoy_admin_v4alpha_clusters_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/clusters.pb.validate.go b/pkg/api/envoy/admin/v4alpha/clusters.pb.validate.go deleted file mode 100644 index 416fa9aa17..0000000000 --- a/pkg/api/envoy/admin/v4alpha/clusters.pb.validate.go +++ /dev/null @@ -1,443 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/clusters.proto - -package envoy_admin_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.HealthStatus(0) -) - -// Validate checks the field values on Clusters with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Clusters) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetClusterStatuses() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersValidationError{ - field: fmt.Sprintf("ClusterStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ClustersValidationError is the validation error returned by -// Clusters.Validate if the designated constraints aren't met. -type ClustersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClustersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClustersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClustersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClustersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClustersValidationError) ErrorName() string { return "ClustersValidationError" } - -// Error satisfies the builtin error interface -func (e ClustersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClustersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClustersValidationError{} - -// Validate checks the field values on ClusterStatus with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ClusterStatus) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - // no validation rules for AddedViaApi - - if v, ok := interface{}(m.GetSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterStatusValidationError{ - field: "SuccessRateEjectionThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHostStatuses() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterStatusValidationError{ - field: fmt.Sprintf("HostStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterStatusValidationError{ - field: "LocalOriginSuccessRateEjectionThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterStatusValidationError{ - field: "CircuitBreakers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ClusterStatusValidationError is the validation error returned by -// ClusterStatus.Validate if the designated constraints aren't met. -type ClusterStatusValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterStatusValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterStatusValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterStatusValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterStatusValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterStatusValidationError) ErrorName() string { return "ClusterStatusValidationError" } - -// Error satisfies the builtin error interface -func (e ClusterStatusValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterStatus.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterStatusValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterStatusValidationError{} - -// Validate checks the field values on HostStatus with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HostStatus) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HostStatusValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetStats() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HostStatusValidationError{ - field: fmt.Sprintf("Stats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetHealthStatus()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HostStatusValidationError{ - field: "HealthStatus", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetSuccessRate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HostStatusValidationError{ - field: "SuccessRate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Weight - - // no validation rules for Hostname - - // no validation rules for Priority - - if v, ok := interface{}(m.GetLocalOriginSuccessRate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HostStatusValidationError{ - field: "LocalOriginSuccessRate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HostStatusValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// HostStatusValidationError is the validation error returned by -// HostStatus.Validate if the designated constraints aren't met. -type HostStatusValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HostStatusValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HostStatusValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HostStatusValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HostStatusValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HostStatusValidationError) ErrorName() string { return "HostStatusValidationError" } - -// Error satisfies the builtin error interface -func (e HostStatusValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHostStatus.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HostStatusValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HostStatusValidationError{} - -// Validate checks the field values on HostHealthStatus with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *HostHealthStatus) Validate() error { - if m == nil { - return nil - } - - // no validation rules for FailedActiveHealthCheck - - // no validation rules for FailedOutlierCheck - - // no validation rules for FailedActiveDegradedCheck - - // no validation rules for PendingDynamicRemoval - - // no validation rules for PendingActiveHc - - // no validation rules for EdsHealthStatus - - return nil -} - -// HostHealthStatusValidationError is the validation error returned by -// HostHealthStatus.Validate if the designated constraints aren't met. -type HostHealthStatusValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HostHealthStatusValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HostHealthStatusValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HostHealthStatusValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HostHealthStatusValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HostHealthStatusValidationError) ErrorName() string { return "HostHealthStatusValidationError" } - -// Error satisfies the builtin error interface -func (e HostHealthStatusValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHostHealthStatus.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HostHealthStatusValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HostHealthStatusValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/config_dump.pb.go b/pkg/api/envoy/admin/v4alpha/config_dump.pb.go deleted file mode 100644 index 215e2408df..0000000000 --- a/pkg/api/envoy/admin/v4alpha/config_dump.pb.go +++ /dev/null @@ -1,2290 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/config_dump.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/bootstrap/v4alpha" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// The :ref:`/config_dump ` admin endpoint uses this wrapper -// message to maintain and serve arbitrary configuration information from any component in Envoy. -type ConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This list is serialized and dumped in its entirety at the - // :ref:`/config_dump ` endpoint. - // - // The following configurations are currently supported and will be dumped in the order given - // below: - // - // * *bootstrap*: :ref:`BootstrapConfigDump ` - // * *clusters*: :ref:`ClustersConfigDump ` - // * *endpoints*: :ref:`EndpointsConfigDump ` - // * *listeners*: :ref:`ListenersConfigDump ` - // * *routes*: :ref:`RoutesConfigDump ` - // - // EDS Configuration will only be dumped by using parameter `?include_eds` - // - // You can filter output with the resource and mask query parameters. - // See :ref:`/config_dump?resource={} `, - // :ref:`/config_dump?mask={} `, - // or :ref:`/config_dump?resource={},mask={} - // ` for more information. - Configs []*any.Any `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` -} - -func (x *ConfigDump) Reset() { - *x = ConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigDump) ProtoMessage() {} - -func (x *ConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfigDump.ProtoReflect.Descriptor instead. -func (*ConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{0} -} - -func (x *ConfigDump) GetConfigs() []*any.Any { - if x != nil { - return x.Configs - } - return nil -} - -type UpdateFailureState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // What the component configuration would have been if the update had succeeded. - FailedConfiguration *any.Any `protobuf:"bytes,1,opt,name=failed_configuration,json=failedConfiguration,proto3" json:"failed_configuration,omitempty"` - // Time of the latest failed update attempt. - LastUpdateAttempt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_update_attempt,json=lastUpdateAttempt,proto3" json:"last_update_attempt,omitempty"` - // Details about the last failed update attempt. - Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` -} - -func (x *UpdateFailureState) Reset() { - *x = UpdateFailureState{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateFailureState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateFailureState) ProtoMessage() {} - -func (x *UpdateFailureState) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateFailureState.ProtoReflect.Descriptor instead. -func (*UpdateFailureState) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{1} -} - -func (x *UpdateFailureState) GetFailedConfiguration() *any.Any { - if x != nil { - return x.FailedConfiguration - } - return nil -} - -func (x *UpdateFailureState) GetLastUpdateAttempt() *timestamp.Timestamp { - if x != nil { - return x.LastUpdateAttempt - } - return nil -} - -func (x *UpdateFailureState) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -// This message describes the bootstrap configuration that Envoy was started with. This includes -// any CLI overrides that were merged. Bootstrap configuration information can be used to recreate -// the static portions of an Envoy configuration by reusing the output as the bootstrap -// configuration for another Envoy. -type BootstrapConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bootstrap *v4alpha.Bootstrap `protobuf:"bytes,1,opt,name=bootstrap,proto3" json:"bootstrap,omitempty"` - // The timestamp when the BootstrapConfig was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *BootstrapConfigDump) Reset() { - *x = BootstrapConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BootstrapConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BootstrapConfigDump) ProtoMessage() {} - -func (x *BootstrapConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BootstrapConfigDump.ProtoReflect.Descriptor instead. -func (*BootstrapConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{2} -} - -func (x *BootstrapConfigDump) GetBootstrap() *v4alpha.Bootstrap { - if x != nil { - return x.Bootstrap - } - return nil -} - -func (x *BootstrapConfigDump) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -// Envoy's listener manager fills this message with all currently known listeners. Listener -// configuration information can be used to recreate an Envoy configuration by populating all -// listeners as static listeners or by returning them in a LDS response. -type ListenersConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This is the :ref:`version_info ` in the - // last processed LDS discovery response. If there are only static bootstrap listeners, this field - // will be "". - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The statically loaded listener configs. - StaticListeners []*ListenersConfigDump_StaticListener `protobuf:"bytes,2,rep,name=static_listeners,json=staticListeners,proto3" json:"static_listeners,omitempty"` - // State for any warming, active, or draining listeners. - DynamicListeners []*ListenersConfigDump_DynamicListener `protobuf:"bytes,3,rep,name=dynamic_listeners,json=dynamicListeners,proto3" json:"dynamic_listeners,omitempty"` -} - -func (x *ListenersConfigDump) Reset() { - *x = ListenersConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenersConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenersConfigDump) ProtoMessage() {} - -func (x *ListenersConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenersConfigDump.ProtoReflect.Descriptor instead. -func (*ListenersConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{3} -} - -func (x *ListenersConfigDump) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *ListenersConfigDump) GetStaticListeners() []*ListenersConfigDump_StaticListener { - if x != nil { - return x.StaticListeners - } - return nil -} - -func (x *ListenersConfigDump) GetDynamicListeners() []*ListenersConfigDump_DynamicListener { - if x != nil { - return x.DynamicListeners - } - return nil -} - -// Envoy's cluster manager fills this message with all currently known clusters. Cluster -// configuration information can be used to recreate an Envoy configuration by populating all -// clusters as static clusters or by returning them in a CDS response. -type ClustersConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This is the :ref:`version_info ` in the - // last processed CDS discovery response. If there are only static bootstrap clusters, this field - // will be "". - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The statically loaded cluster configs. - StaticClusters []*ClustersConfigDump_StaticCluster `protobuf:"bytes,2,rep,name=static_clusters,json=staticClusters,proto3" json:"static_clusters,omitempty"` - // The dynamically loaded active clusters. These are clusters that are available to service - // data plane traffic. - DynamicActiveClusters []*ClustersConfigDump_DynamicCluster `protobuf:"bytes,3,rep,name=dynamic_active_clusters,json=dynamicActiveClusters,proto3" json:"dynamic_active_clusters,omitempty"` - // The dynamically loaded warming clusters. These are clusters that are currently undergoing - // warming in preparation to service data plane traffic. Note that if attempting to recreate an - // Envoy configuration from a configuration dump, the warming clusters should generally be - // discarded. - DynamicWarmingClusters []*ClustersConfigDump_DynamicCluster `protobuf:"bytes,4,rep,name=dynamic_warming_clusters,json=dynamicWarmingClusters,proto3" json:"dynamic_warming_clusters,omitempty"` -} - -func (x *ClustersConfigDump) Reset() { - *x = ClustersConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClustersConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClustersConfigDump) ProtoMessage() {} - -func (x *ClustersConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClustersConfigDump.ProtoReflect.Descriptor instead. -func (*ClustersConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{4} -} - -func (x *ClustersConfigDump) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *ClustersConfigDump) GetStaticClusters() []*ClustersConfigDump_StaticCluster { - if x != nil { - return x.StaticClusters - } - return nil -} - -func (x *ClustersConfigDump) GetDynamicActiveClusters() []*ClustersConfigDump_DynamicCluster { - if x != nil { - return x.DynamicActiveClusters - } - return nil -} - -func (x *ClustersConfigDump) GetDynamicWarmingClusters() []*ClustersConfigDump_DynamicCluster { - if x != nil { - return x.DynamicWarmingClusters - } - return nil -} - -// Envoy's RDS implementation fills this message with all currently loaded routes, as described by -// their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration -// or defined inline while configuring listeners are separated from those configured dynamically via RDS. -// Route configuration information can be used to recreate an Envoy configuration by populating all routes -// as static routes or by returning them in RDS responses. -type RoutesConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The statically loaded route configs. - StaticRouteConfigs []*RoutesConfigDump_StaticRouteConfig `protobuf:"bytes,2,rep,name=static_route_configs,json=staticRouteConfigs,proto3" json:"static_route_configs,omitempty"` - // The dynamically loaded route configs. - DynamicRouteConfigs []*RoutesConfigDump_DynamicRouteConfig `protobuf:"bytes,3,rep,name=dynamic_route_configs,json=dynamicRouteConfigs,proto3" json:"dynamic_route_configs,omitempty"` -} - -func (x *RoutesConfigDump) Reset() { - *x = RoutesConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoutesConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoutesConfigDump) ProtoMessage() {} - -func (x *RoutesConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoutesConfigDump.ProtoReflect.Descriptor instead. -func (*RoutesConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{5} -} - -func (x *RoutesConfigDump) GetStaticRouteConfigs() []*RoutesConfigDump_StaticRouteConfig { - if x != nil { - return x.StaticRouteConfigs - } - return nil -} - -func (x *RoutesConfigDump) GetDynamicRouteConfigs() []*RoutesConfigDump_DynamicRouteConfig { - if x != nil { - return x.DynamicRouteConfigs - } - return nil -} - -// Envoy's scoped RDS implementation fills this message with all currently loaded route -// configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both -// the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the -// dynamically obtained scopes via the SRDS API. -type ScopedRoutesConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The statically loaded scoped route configs. - InlineScopedRouteConfigs []*ScopedRoutesConfigDump_InlineScopedRouteConfigs `protobuf:"bytes,1,rep,name=inline_scoped_route_configs,json=inlineScopedRouteConfigs,proto3" json:"inline_scoped_route_configs,omitempty"` - // The dynamically loaded scoped route configs. - DynamicScopedRouteConfigs []*ScopedRoutesConfigDump_DynamicScopedRouteConfigs `protobuf:"bytes,2,rep,name=dynamic_scoped_route_configs,json=dynamicScopedRouteConfigs,proto3" json:"dynamic_scoped_route_configs,omitempty"` -} - -func (x *ScopedRoutesConfigDump) Reset() { - *x = ScopedRoutesConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutesConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutesConfigDump) ProtoMessage() {} - -func (x *ScopedRoutesConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutesConfigDump.ProtoReflect.Descriptor instead. -func (*ScopedRoutesConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{6} -} - -func (x *ScopedRoutesConfigDump) GetInlineScopedRouteConfigs() []*ScopedRoutesConfigDump_InlineScopedRouteConfigs { - if x != nil { - return x.InlineScopedRouteConfigs - } - return nil -} - -func (x *ScopedRoutesConfigDump) GetDynamicScopedRouteConfigs() []*ScopedRoutesConfigDump_DynamicScopedRouteConfigs { - if x != nil { - return x.DynamicScopedRouteConfigs - } - return nil -} - -// Envoys SDS implementation fills this message with all secrets fetched dynamically via SDS. -type SecretsConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The statically loaded secrets. - StaticSecrets []*SecretsConfigDump_StaticSecret `protobuf:"bytes,1,rep,name=static_secrets,json=staticSecrets,proto3" json:"static_secrets,omitempty"` - // The dynamically loaded active secrets. These are secrets that are available to service - // clusters or listeners. - DynamicActiveSecrets []*SecretsConfigDump_DynamicSecret `protobuf:"bytes,2,rep,name=dynamic_active_secrets,json=dynamicActiveSecrets,proto3" json:"dynamic_active_secrets,omitempty"` - // The dynamically loaded warming secrets. These are secrets that are currently undergoing - // warming in preparation to service clusters or listeners. - DynamicWarmingSecrets []*SecretsConfigDump_DynamicSecret `protobuf:"bytes,3,rep,name=dynamic_warming_secrets,json=dynamicWarmingSecrets,proto3" json:"dynamic_warming_secrets,omitempty"` -} - -func (x *SecretsConfigDump) Reset() { - *x = SecretsConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecretsConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretsConfigDump) ProtoMessage() {} - -func (x *SecretsConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecretsConfigDump.ProtoReflect.Descriptor instead. -func (*SecretsConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{7} -} - -func (x *SecretsConfigDump) GetStaticSecrets() []*SecretsConfigDump_StaticSecret { - if x != nil { - return x.StaticSecrets - } - return nil -} - -func (x *SecretsConfigDump) GetDynamicActiveSecrets() []*SecretsConfigDump_DynamicSecret { - if x != nil { - return x.DynamicActiveSecrets - } - return nil -} - -func (x *SecretsConfigDump) GetDynamicWarmingSecrets() []*SecretsConfigDump_DynamicSecret { - if x != nil { - return x.DynamicWarmingSecrets - } - return nil -} - -// Envoy's admin fill this message with all currently known endpoints. Endpoint -// configuration information can be used to recreate an Envoy configuration by populating all -// endpoints as static endpoints or by returning them in an EDS response. -type EndpointsConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The statically loaded endpoint configs. - StaticEndpointConfigs []*EndpointsConfigDump_StaticEndpointConfig `protobuf:"bytes,2,rep,name=static_endpoint_configs,json=staticEndpointConfigs,proto3" json:"static_endpoint_configs,omitempty"` - // The dynamically loaded endpoint configs. - DynamicEndpointConfigs []*EndpointsConfigDump_DynamicEndpointConfig `protobuf:"bytes,3,rep,name=dynamic_endpoint_configs,json=dynamicEndpointConfigs,proto3" json:"dynamic_endpoint_configs,omitempty"` -} - -func (x *EndpointsConfigDump) Reset() { - *x = EndpointsConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointsConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointsConfigDump) ProtoMessage() {} - -func (x *EndpointsConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointsConfigDump.ProtoReflect.Descriptor instead. -func (*EndpointsConfigDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{8} -} - -func (x *EndpointsConfigDump) GetStaticEndpointConfigs() []*EndpointsConfigDump_StaticEndpointConfig { - if x != nil { - return x.StaticEndpointConfigs - } - return nil -} - -func (x *EndpointsConfigDump) GetDynamicEndpointConfigs() []*EndpointsConfigDump_DynamicEndpointConfig { - if x != nil { - return x.DynamicEndpointConfigs - } - return nil -} - -// Describes a statically loaded listener. -type ListenersConfigDump_StaticListener struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The listener config. - Listener *any.Any `protobuf:"bytes,1,opt,name=listener,proto3" json:"listener,omitempty"` - // The timestamp when the Listener was last successfully updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *ListenersConfigDump_StaticListener) Reset() { - *x = ListenersConfigDump_StaticListener{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenersConfigDump_StaticListener) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenersConfigDump_StaticListener) ProtoMessage() {} - -func (x *ListenersConfigDump_StaticListener) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenersConfigDump_StaticListener.ProtoReflect.Descriptor instead. -func (*ListenersConfigDump_StaticListener) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *ListenersConfigDump_StaticListener) GetListener() *any.Any { - if x != nil { - return x.Listener - } - return nil -} - -func (x *ListenersConfigDump_StaticListener) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -type ListenersConfigDump_DynamicListenerState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the listener was loaded. In the future, discrete per-listener versions may be supported - // by the API. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The listener config. - Listener *any.Any `protobuf:"bytes,2,opt,name=listener,proto3" json:"listener,omitempty"` - // The timestamp when the Listener was last successfully updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *ListenersConfigDump_DynamicListenerState) Reset() { - *x = ListenersConfigDump_DynamicListenerState{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenersConfigDump_DynamicListenerState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenersConfigDump_DynamicListenerState) ProtoMessage() {} - -func (x *ListenersConfigDump_DynamicListenerState) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenersConfigDump_DynamicListenerState.ProtoReflect.Descriptor instead. -func (*ListenersConfigDump_DynamicListenerState) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{3, 1} -} - -func (x *ListenersConfigDump_DynamicListenerState) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *ListenersConfigDump_DynamicListenerState) GetListener() *any.Any { - if x != nil { - return x.Listener - } - return nil -} - -func (x *ListenersConfigDump_DynamicListenerState) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -// Describes a dynamically loaded listener via the LDS API. -// [#next-free-field: 6] -type ListenersConfigDump_DynamicListener struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name or unique id of this listener, pulled from the DynamicListenerState config. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The listener state for any active listener by this name. - // These are listeners that are available to service data plane traffic. - ActiveState *ListenersConfigDump_DynamicListenerState `protobuf:"bytes,2,opt,name=active_state,json=activeState,proto3" json:"active_state,omitempty"` - // The listener state for any warming listener by this name. - // These are listeners that are currently undergoing warming in preparation to service data - // plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the warming listeners should generally be discarded. - WarmingState *ListenersConfigDump_DynamicListenerState `protobuf:"bytes,3,opt,name=warming_state,json=warmingState,proto3" json:"warming_state,omitempty"` - // The listener state for any draining listener by this name. - // These are listeners that are currently undergoing draining in preparation to stop servicing - // data plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the draining listeners should generally be discarded. - DrainingState *ListenersConfigDump_DynamicListenerState `protobuf:"bytes,4,opt,name=draining_state,json=drainingState,proto3" json:"draining_state,omitempty"` - // Set if the last update failed, cleared after the next successful update. - ErrorState *UpdateFailureState `protobuf:"bytes,5,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` -} - -func (x *ListenersConfigDump_DynamicListener) Reset() { - *x = ListenersConfigDump_DynamicListener{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenersConfigDump_DynamicListener) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenersConfigDump_DynamicListener) ProtoMessage() {} - -func (x *ListenersConfigDump_DynamicListener) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenersConfigDump_DynamicListener.ProtoReflect.Descriptor instead. -func (*ListenersConfigDump_DynamicListener) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{3, 2} -} - -func (x *ListenersConfigDump_DynamicListener) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ListenersConfigDump_DynamicListener) GetActiveState() *ListenersConfigDump_DynamicListenerState { - if x != nil { - return x.ActiveState - } - return nil -} - -func (x *ListenersConfigDump_DynamicListener) GetWarmingState() *ListenersConfigDump_DynamicListenerState { - if x != nil { - return x.WarmingState - } - return nil -} - -func (x *ListenersConfigDump_DynamicListener) GetDrainingState() *ListenersConfigDump_DynamicListenerState { - if x != nil { - return x.DrainingState - } - return nil -} - -func (x *ListenersConfigDump_DynamicListener) GetErrorState() *UpdateFailureState { - if x != nil { - return x.ErrorState - } - return nil -} - -// Describes a statically loaded cluster. -type ClustersConfigDump_StaticCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The cluster config. - Cluster *any.Any `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // The timestamp when the Cluster was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *ClustersConfigDump_StaticCluster) Reset() { - *x = ClustersConfigDump_StaticCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClustersConfigDump_StaticCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClustersConfigDump_StaticCluster) ProtoMessage() {} - -func (x *ClustersConfigDump_StaticCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClustersConfigDump_StaticCluster.ProtoReflect.Descriptor instead. -func (*ClustersConfigDump_StaticCluster) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *ClustersConfigDump_StaticCluster) GetCluster() *any.Any { - if x != nil { - return x.Cluster - } - return nil -} - -func (x *ClustersConfigDump_StaticCluster) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -// Describes a dynamically loaded cluster via the CDS API. -type ClustersConfigDump_DynamicCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by - // the API. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The cluster config. - Cluster *any.Any `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` - // The timestamp when the Cluster was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *ClustersConfigDump_DynamicCluster) Reset() { - *x = ClustersConfigDump_DynamicCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClustersConfigDump_DynamicCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClustersConfigDump_DynamicCluster) ProtoMessage() {} - -func (x *ClustersConfigDump_DynamicCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClustersConfigDump_DynamicCluster.ProtoReflect.Descriptor instead. -func (*ClustersConfigDump_DynamicCluster) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{4, 1} -} - -func (x *ClustersConfigDump_DynamicCluster) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *ClustersConfigDump_DynamicCluster) GetCluster() *any.Any { - if x != nil { - return x.Cluster - } - return nil -} - -func (x *ClustersConfigDump_DynamicCluster) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -type RoutesConfigDump_StaticRouteConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The route config. - RouteConfig *any.Any `protobuf:"bytes,1,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` - // The timestamp when the Route was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *RoutesConfigDump_StaticRouteConfig) Reset() { - *x = RoutesConfigDump_StaticRouteConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoutesConfigDump_StaticRouteConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoutesConfigDump_StaticRouteConfig) ProtoMessage() {} - -func (x *RoutesConfigDump_StaticRouteConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoutesConfigDump_StaticRouteConfig.ProtoReflect.Descriptor instead. -func (*RoutesConfigDump_StaticRouteConfig) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *RoutesConfigDump_StaticRouteConfig) GetRouteConfig() *any.Any { - if x != nil { - return x.RouteConfig - } - return nil -} - -func (x *RoutesConfigDump_StaticRouteConfig) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -type RoutesConfigDump_DynamicRouteConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the route configuration was loaded. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The route config. - RouteConfig *any.Any `protobuf:"bytes,2,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` - // The timestamp when the Route was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *RoutesConfigDump_DynamicRouteConfig) Reset() { - *x = RoutesConfigDump_DynamicRouteConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoutesConfigDump_DynamicRouteConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoutesConfigDump_DynamicRouteConfig) ProtoMessage() {} - -func (x *RoutesConfigDump_DynamicRouteConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoutesConfigDump_DynamicRouteConfig.ProtoReflect.Descriptor instead. -func (*RoutesConfigDump_DynamicRouteConfig) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{5, 1} -} - -func (x *RoutesConfigDump_DynamicRouteConfig) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *RoutesConfigDump_DynamicRouteConfig) GetRouteConfig() *any.Any { - if x != nil { - return x.RouteConfig - } - return nil -} - -func (x *RoutesConfigDump_DynamicRouteConfig) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -type ScopedRoutesConfigDump_InlineScopedRouteConfigs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name assigned to the scoped route configurations. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The scoped route configurations. - ScopedRouteConfigs []*any.Any `protobuf:"bytes,2,rep,name=scoped_route_configs,json=scopedRouteConfigs,proto3" json:"scoped_route_configs,omitempty"` - // The timestamp when the scoped route config set was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Reset() { - *x = ScopedRoutesConfigDump_InlineScopedRouteConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutesConfigDump_InlineScopedRouteConfigs) ProtoMessage() {} - -func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutesConfigDump_InlineScopedRouteConfigs.ProtoReflect.Descriptor instead. -func (*ScopedRoutesConfigDump_InlineScopedRouteConfigs) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) GetScopedRouteConfigs() []*any.Any { - if x != nil { - return x.ScopedRouteConfigs - } - return nil -} - -func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -type ScopedRoutesConfigDump_DynamicScopedRouteConfigs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name assigned to the scoped route configurations. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the scoped routes configuration was loaded. - VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The scoped route configurations. - ScopedRouteConfigs []*any.Any `protobuf:"bytes,3,rep,name=scoped_route_configs,json=scopedRouteConfigs,proto3" json:"scoped_route_configs,omitempty"` - // The timestamp when the scoped route config set was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Reset() { - *x = ScopedRoutesConfigDump_DynamicScopedRouteConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ProtoMessage() {} - -func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ProtoReflect.Descriptor instead. -func (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{6, 1} -} - -func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetScopedRouteConfigs() []*any.Any { - if x != nil { - return x.ScopedRouteConfigs - } - return nil -} - -func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -// DynamicSecret contains secret information fetched via SDS. -type SecretsConfigDump_DynamicSecret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name assigned to the secret. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // This is the per-resource version information. - VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The timestamp when the secret was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - Secret *any.Any `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *SecretsConfigDump_DynamicSecret) Reset() { - *x = SecretsConfigDump_DynamicSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecretsConfigDump_DynamicSecret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretsConfigDump_DynamicSecret) ProtoMessage() {} - -func (x *SecretsConfigDump_DynamicSecret) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecretsConfigDump_DynamicSecret.ProtoReflect.Descriptor instead. -func (*SecretsConfigDump_DynamicSecret) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *SecretsConfigDump_DynamicSecret) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SecretsConfigDump_DynamicSecret) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *SecretsConfigDump_DynamicSecret) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -func (x *SecretsConfigDump_DynamicSecret) GetSecret() *any.Any { - if x != nil { - return x.Secret - } - return nil -} - -// StaticSecret specifies statically loaded secret in bootstrap. -type SecretsConfigDump_StaticSecret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name assigned to the secret. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The timestamp when the secret was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - Secret *any.Any `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *SecretsConfigDump_StaticSecret) Reset() { - *x = SecretsConfigDump_StaticSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecretsConfigDump_StaticSecret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretsConfigDump_StaticSecret) ProtoMessage() {} - -func (x *SecretsConfigDump_StaticSecret) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecretsConfigDump_StaticSecret.ProtoReflect.Descriptor instead. -func (*SecretsConfigDump_StaticSecret) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{7, 1} -} - -func (x *SecretsConfigDump_StaticSecret) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SecretsConfigDump_StaticSecret) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -func (x *SecretsConfigDump_StaticSecret) GetSecret() *any.Any { - if x != nil { - return x.Secret - } - return nil -} - -type EndpointsConfigDump_StaticEndpointConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The endpoint config. - EndpointConfig *any.Any `protobuf:"bytes,1,opt,name=endpoint_config,json=endpointConfig,proto3" json:"endpoint_config,omitempty"` - // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *EndpointsConfigDump_StaticEndpointConfig) Reset() { - *x = EndpointsConfigDump_StaticEndpointConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointsConfigDump_StaticEndpointConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointsConfigDump_StaticEndpointConfig) ProtoMessage() {} - -func (x *EndpointsConfigDump_StaticEndpointConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointsConfigDump_StaticEndpointConfig.ProtoReflect.Descriptor instead. -func (*EndpointsConfigDump_StaticEndpointConfig) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *EndpointsConfigDump_StaticEndpointConfig) GetEndpointConfig() *any.Any { - if x != nil { - return x.EndpointConfig - } - return nil -} - -func (x *EndpointsConfigDump_StaticEndpointConfig) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -type EndpointsConfigDump_DynamicEndpointConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the endpoint configuration was loaded. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The endpoint config. - EndpointConfig *any.Any `protobuf:"bytes,2,opt,name=endpoint_config,json=endpointConfig,proto3" json:"endpoint_config,omitempty"` - // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. - LastUpdated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` -} - -func (x *EndpointsConfigDump_DynamicEndpointConfig) Reset() { - *x = EndpointsConfigDump_DynamicEndpointConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointsConfigDump_DynamicEndpointConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointsConfigDump_DynamicEndpointConfig) ProtoMessage() {} - -func (x *EndpointsConfigDump_DynamicEndpointConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_config_dump_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointsConfigDump_DynamicEndpointConfig.ProtoReflect.Descriptor instead. -func (*EndpointsConfigDump_DynamicEndpointConfig) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP(), []int{8, 1} -} - -func (x *EndpointsConfigDump_DynamicEndpointConfig) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *EndpointsConfigDump_DynamicEndpointConfig) GetEndpointConfig() *any.Any { - if x != nil { - return x.EndpointConfig - } - return nil -} - -func (x *EndpointsConfigDump_DynamicEndpointConfig) GetLastUpdated() *timestamp.Timestamp { - if x != nil { - return x.LastUpdated - } - return nil -} - -var File_envoy_admin_v4alpha_config_dump_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_config_dump_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x0a, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, - 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xed, 0x01, 0x0a, 0x12, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x47, 0x0a, 0x14, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x13, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x13, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, - 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x13, 0x42, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x12, 0x47, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, - 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, - 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, - 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x33, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xb2, 0x09, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x21, 0x0a, - 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x62, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x73, 0x12, 0x65, 0x0a, 0x11, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x1a, 0xbb, 0x01, 0x0a, 0x0e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x30, - 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, - 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0xea, 0x01, 0x0a, 0x14, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xd6, 0x03, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x60, - 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x62, 0x0a, 0x0d, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x64, 0x0a, 0x0e, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x64, 0x72, 0x61, - 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, - 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, - 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xba, 0x06, 0x0a, 0x12, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5e, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x6e, 0x0a, 0x17, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x15, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x70, 0x0a, 0x18, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, - 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x16, - 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x1a, 0xb6, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, - 0xdb, 0x01, 0x0a, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x28, 0x9a, - 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xc8, 0x05, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x69, 0x0a, 0x14, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x6c, 0x0a, 0x15, 0x64, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x13, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xc5, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0c, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xea, 0x01, - 0x0a, 0x12, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, - 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, - 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x22, 0xf8, 0x06, 0x0a, 0x16, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x83, 0x01, - 0x0a, 0x1b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, - 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x18, 0x69, 0x6e, 0x6c, 0x69, 0x6e, - 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x12, 0x86, 0x01, 0x0a, 0x1c, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x52, 0x19, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xfc, 0x01, 0x0a, - 0x18, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, - 0x14, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x12, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xa1, 0x02, 0x0a, 0x19, - 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x46, 0x0a, 0x14, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x12, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x3a, - 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xa7, 0x06, - 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, - 0x75, 0x6d, 0x70, 0x12, 0x5a, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, - 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, - 0x6a, 0x0a, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x14, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x6c, 0x0a, 0x17, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x15, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, 0xea, 0x01, 0x0a, 0x0d, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, - 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0xc5, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, - 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, - 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x27, - 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0x84, 0x06, 0x0a, 0x13, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, - 0x75, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x15, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x78, 0x0a, 0x18, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x1a, 0xd4, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, - 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xf9, 0x01, 0x0a, 0x15, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x42, 0x3e, - 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_config_dump_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_config_dump_proto_rawDescData = file_envoy_admin_v4alpha_config_dump_proto_rawDesc -) - -func file_envoy_admin_v4alpha_config_dump_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_config_dump_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_config_dump_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_config_dump_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_config_dump_proto_rawDescData -} - -var file_envoy_admin_v4alpha_config_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_envoy_admin_v4alpha_config_dump_proto_goTypes = []interface{}{ - (*ConfigDump)(nil), // 0: envoy.admin.v4alpha.ConfigDump - (*UpdateFailureState)(nil), // 1: envoy.admin.v4alpha.UpdateFailureState - (*BootstrapConfigDump)(nil), // 2: envoy.admin.v4alpha.BootstrapConfigDump - (*ListenersConfigDump)(nil), // 3: envoy.admin.v4alpha.ListenersConfigDump - (*ClustersConfigDump)(nil), // 4: envoy.admin.v4alpha.ClustersConfigDump - (*RoutesConfigDump)(nil), // 5: envoy.admin.v4alpha.RoutesConfigDump - (*ScopedRoutesConfigDump)(nil), // 6: envoy.admin.v4alpha.ScopedRoutesConfigDump - (*SecretsConfigDump)(nil), // 7: envoy.admin.v4alpha.SecretsConfigDump - (*EndpointsConfigDump)(nil), // 8: envoy.admin.v4alpha.EndpointsConfigDump - (*ListenersConfigDump_StaticListener)(nil), // 9: envoy.admin.v4alpha.ListenersConfigDump.StaticListener - (*ListenersConfigDump_DynamicListenerState)(nil), // 10: envoy.admin.v4alpha.ListenersConfigDump.DynamicListenerState - (*ListenersConfigDump_DynamicListener)(nil), // 11: envoy.admin.v4alpha.ListenersConfigDump.DynamicListener - (*ClustersConfigDump_StaticCluster)(nil), // 12: envoy.admin.v4alpha.ClustersConfigDump.StaticCluster - (*ClustersConfigDump_DynamicCluster)(nil), // 13: envoy.admin.v4alpha.ClustersConfigDump.DynamicCluster - (*RoutesConfigDump_StaticRouteConfig)(nil), // 14: envoy.admin.v4alpha.RoutesConfigDump.StaticRouteConfig - (*RoutesConfigDump_DynamicRouteConfig)(nil), // 15: envoy.admin.v4alpha.RoutesConfigDump.DynamicRouteConfig - (*ScopedRoutesConfigDump_InlineScopedRouteConfigs)(nil), // 16: envoy.admin.v4alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs - (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs)(nil), // 17: envoy.admin.v4alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs - (*SecretsConfigDump_DynamicSecret)(nil), // 18: envoy.admin.v4alpha.SecretsConfigDump.DynamicSecret - (*SecretsConfigDump_StaticSecret)(nil), // 19: envoy.admin.v4alpha.SecretsConfigDump.StaticSecret - (*EndpointsConfigDump_StaticEndpointConfig)(nil), // 20: envoy.admin.v4alpha.EndpointsConfigDump.StaticEndpointConfig - (*EndpointsConfigDump_DynamicEndpointConfig)(nil), // 21: envoy.admin.v4alpha.EndpointsConfigDump.DynamicEndpointConfig - (*any.Any)(nil), // 22: google.protobuf.Any - (*timestamp.Timestamp)(nil), // 23: google.protobuf.Timestamp - (*v4alpha.Bootstrap)(nil), // 24: envoy.config.bootstrap.v4alpha.Bootstrap -} -var file_envoy_admin_v4alpha_config_dump_proto_depIdxs = []int32{ - 22, // 0: envoy.admin.v4alpha.ConfigDump.configs:type_name -> google.protobuf.Any - 22, // 1: envoy.admin.v4alpha.UpdateFailureState.failed_configuration:type_name -> google.protobuf.Any - 23, // 2: envoy.admin.v4alpha.UpdateFailureState.last_update_attempt:type_name -> google.protobuf.Timestamp - 24, // 3: envoy.admin.v4alpha.BootstrapConfigDump.bootstrap:type_name -> envoy.config.bootstrap.v4alpha.Bootstrap - 23, // 4: envoy.admin.v4alpha.BootstrapConfigDump.last_updated:type_name -> google.protobuf.Timestamp - 9, // 5: envoy.admin.v4alpha.ListenersConfigDump.static_listeners:type_name -> envoy.admin.v4alpha.ListenersConfigDump.StaticListener - 11, // 6: envoy.admin.v4alpha.ListenersConfigDump.dynamic_listeners:type_name -> envoy.admin.v4alpha.ListenersConfigDump.DynamicListener - 12, // 7: envoy.admin.v4alpha.ClustersConfigDump.static_clusters:type_name -> envoy.admin.v4alpha.ClustersConfigDump.StaticCluster - 13, // 8: envoy.admin.v4alpha.ClustersConfigDump.dynamic_active_clusters:type_name -> envoy.admin.v4alpha.ClustersConfigDump.DynamicCluster - 13, // 9: envoy.admin.v4alpha.ClustersConfigDump.dynamic_warming_clusters:type_name -> envoy.admin.v4alpha.ClustersConfigDump.DynamicCluster - 14, // 10: envoy.admin.v4alpha.RoutesConfigDump.static_route_configs:type_name -> envoy.admin.v4alpha.RoutesConfigDump.StaticRouteConfig - 15, // 11: envoy.admin.v4alpha.RoutesConfigDump.dynamic_route_configs:type_name -> envoy.admin.v4alpha.RoutesConfigDump.DynamicRouteConfig - 16, // 12: envoy.admin.v4alpha.ScopedRoutesConfigDump.inline_scoped_route_configs:type_name -> envoy.admin.v4alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs - 17, // 13: envoy.admin.v4alpha.ScopedRoutesConfigDump.dynamic_scoped_route_configs:type_name -> envoy.admin.v4alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs - 19, // 14: envoy.admin.v4alpha.SecretsConfigDump.static_secrets:type_name -> envoy.admin.v4alpha.SecretsConfigDump.StaticSecret - 18, // 15: envoy.admin.v4alpha.SecretsConfigDump.dynamic_active_secrets:type_name -> envoy.admin.v4alpha.SecretsConfigDump.DynamicSecret - 18, // 16: envoy.admin.v4alpha.SecretsConfigDump.dynamic_warming_secrets:type_name -> envoy.admin.v4alpha.SecretsConfigDump.DynamicSecret - 20, // 17: envoy.admin.v4alpha.EndpointsConfigDump.static_endpoint_configs:type_name -> envoy.admin.v4alpha.EndpointsConfigDump.StaticEndpointConfig - 21, // 18: envoy.admin.v4alpha.EndpointsConfigDump.dynamic_endpoint_configs:type_name -> envoy.admin.v4alpha.EndpointsConfigDump.DynamicEndpointConfig - 22, // 19: envoy.admin.v4alpha.ListenersConfigDump.StaticListener.listener:type_name -> google.protobuf.Any - 23, // 20: envoy.admin.v4alpha.ListenersConfigDump.StaticListener.last_updated:type_name -> google.protobuf.Timestamp - 22, // 21: envoy.admin.v4alpha.ListenersConfigDump.DynamicListenerState.listener:type_name -> google.protobuf.Any - 23, // 22: envoy.admin.v4alpha.ListenersConfigDump.DynamicListenerState.last_updated:type_name -> google.protobuf.Timestamp - 10, // 23: envoy.admin.v4alpha.ListenersConfigDump.DynamicListener.active_state:type_name -> envoy.admin.v4alpha.ListenersConfigDump.DynamicListenerState - 10, // 24: envoy.admin.v4alpha.ListenersConfigDump.DynamicListener.warming_state:type_name -> envoy.admin.v4alpha.ListenersConfigDump.DynamicListenerState - 10, // 25: envoy.admin.v4alpha.ListenersConfigDump.DynamicListener.draining_state:type_name -> envoy.admin.v4alpha.ListenersConfigDump.DynamicListenerState - 1, // 26: envoy.admin.v4alpha.ListenersConfigDump.DynamicListener.error_state:type_name -> envoy.admin.v4alpha.UpdateFailureState - 22, // 27: envoy.admin.v4alpha.ClustersConfigDump.StaticCluster.cluster:type_name -> google.protobuf.Any - 23, // 28: envoy.admin.v4alpha.ClustersConfigDump.StaticCluster.last_updated:type_name -> google.protobuf.Timestamp - 22, // 29: envoy.admin.v4alpha.ClustersConfigDump.DynamicCluster.cluster:type_name -> google.protobuf.Any - 23, // 30: envoy.admin.v4alpha.ClustersConfigDump.DynamicCluster.last_updated:type_name -> google.protobuf.Timestamp - 22, // 31: envoy.admin.v4alpha.RoutesConfigDump.StaticRouteConfig.route_config:type_name -> google.protobuf.Any - 23, // 32: envoy.admin.v4alpha.RoutesConfigDump.StaticRouteConfig.last_updated:type_name -> google.protobuf.Timestamp - 22, // 33: envoy.admin.v4alpha.RoutesConfigDump.DynamicRouteConfig.route_config:type_name -> google.protobuf.Any - 23, // 34: envoy.admin.v4alpha.RoutesConfigDump.DynamicRouteConfig.last_updated:type_name -> google.protobuf.Timestamp - 22, // 35: envoy.admin.v4alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any - 23, // 36: envoy.admin.v4alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp - 22, // 37: envoy.admin.v4alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any - 23, // 38: envoy.admin.v4alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp - 23, // 39: envoy.admin.v4alpha.SecretsConfigDump.DynamicSecret.last_updated:type_name -> google.protobuf.Timestamp - 22, // 40: envoy.admin.v4alpha.SecretsConfigDump.DynamicSecret.secret:type_name -> google.protobuf.Any - 23, // 41: envoy.admin.v4alpha.SecretsConfigDump.StaticSecret.last_updated:type_name -> google.protobuf.Timestamp - 22, // 42: envoy.admin.v4alpha.SecretsConfigDump.StaticSecret.secret:type_name -> google.protobuf.Any - 22, // 43: envoy.admin.v4alpha.EndpointsConfigDump.StaticEndpointConfig.endpoint_config:type_name -> google.protobuf.Any - 23, // 44: envoy.admin.v4alpha.EndpointsConfigDump.StaticEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp - 22, // 45: envoy.admin.v4alpha.EndpointsConfigDump.DynamicEndpointConfig.endpoint_config:type_name -> google.protobuf.Any - 23, // 46: envoy.admin.v4alpha.EndpointsConfigDump.DynamicEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp - 47, // [47:47] is the sub-list for method output_type - 47, // [47:47] is the sub-list for method input_type - 47, // [47:47] is the sub-list for extension type_name - 47, // [47:47] is the sub-list for extension extendee - 0, // [0:47] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_config_dump_proto_init() } -func file_envoy_admin_v4alpha_config_dump_proto_init() { - if File_envoy_admin_v4alpha_config_dump_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateFailureState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootstrapConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenersConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClustersConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoutesConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutesConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretsConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointsConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenersConfigDump_StaticListener); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenersConfigDump_DynamicListenerState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenersConfigDump_DynamicListener); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClustersConfigDump_StaticCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClustersConfigDump_DynamicCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoutesConfigDump_StaticRouteConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoutesConfigDump_DynamicRouteConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutesConfigDump_InlineScopedRouteConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutesConfigDump_DynamicScopedRouteConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretsConfigDump_DynamicSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretsConfigDump_StaticSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointsConfigDump_StaticEndpointConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_config_dump_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointsConfigDump_DynamicEndpointConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_config_dump_proto_rawDesc, - NumEnums: 0, - NumMessages: 22, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_config_dump_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_config_dump_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_config_dump_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_config_dump_proto = out.File - file_envoy_admin_v4alpha_config_dump_proto_rawDesc = nil - file_envoy_admin_v4alpha_config_dump_proto_goTypes = nil - file_envoy_admin_v4alpha_config_dump_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/config_dump.pb.validate.go b/pkg/api/envoy/admin/v4alpha/config_dump.pb.validate.go deleted file mode 100644 index eefaa0dffc..0000000000 --- a/pkg/api/envoy/admin/v4alpha/config_dump.pb.validate.go +++ /dev/null @@ -1,2113 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/config_dump.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on ConfigDump with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *ConfigDump) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigDumpValidationError{ - field: fmt.Sprintf("Configs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ConfigDumpValidationError is the validation error returned by -// ConfigDump.Validate if the designated constraints aren't met. -type ConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ConfigDumpValidationError) ErrorName() string { return "ConfigDumpValidationError" } - -// Error satisfies the builtin error interface -func (e ConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ConfigDumpValidationError{} - -// Validate checks the field values on UpdateFailureState with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UpdateFailureState) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdateFailureStateValidationError{ - field: "FailedConfiguration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdateFailureStateValidationError{ - field: "LastUpdateAttempt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Details - - return nil -} - -// UpdateFailureStateValidationError is the validation error returned by -// UpdateFailureState.Validate if the designated constraints aren't met. -type UpdateFailureStateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdateFailureStateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdateFailureStateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdateFailureStateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdateFailureStateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdateFailureStateValidationError) ErrorName() string { - return "UpdateFailureStateValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdateFailureStateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdateFailureState.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdateFailureStateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdateFailureStateValidationError{} - -// Validate checks the field values on BootstrapConfigDump with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *BootstrapConfigDump) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapConfigDumpValidationError{ - field: "Bootstrap", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapConfigDumpValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// BootstrapConfigDumpValidationError is the validation error returned by -// BootstrapConfigDump.Validate if the designated constraints aren't met. -type BootstrapConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BootstrapConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BootstrapConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BootstrapConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BootstrapConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BootstrapConfigDumpValidationError) ErrorName() string { - return "BootstrapConfigDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e BootstrapConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBootstrapConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BootstrapConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BootstrapConfigDumpValidationError{} - -// Validate checks the field values on ListenersConfigDump with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ListenersConfigDump) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - for idx, item := range m.GetStaticListeners() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDumpValidationError{ - field: fmt.Sprintf("StaticListeners[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicListeners() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDumpValidationError{ - field: fmt.Sprintf("DynamicListeners[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ListenersConfigDumpValidationError is the validation error returned by -// ListenersConfigDump.Validate if the designated constraints aren't met. -type ListenersConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenersConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenersConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenersConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenersConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenersConfigDumpValidationError) ErrorName() string { - return "ListenersConfigDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e ListenersConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenersConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenersConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenersConfigDumpValidationError{} - -// Validate checks the field values on ClustersConfigDump with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClustersConfigDump) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - for idx, item := range m.GetStaticClusters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersConfigDumpValidationError{ - field: fmt.Sprintf("StaticClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicActiveClusters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersConfigDumpValidationError{ - field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicWarmingClusters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersConfigDumpValidationError{ - field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ClustersConfigDumpValidationError is the validation error returned by -// ClustersConfigDump.Validate if the designated constraints aren't met. -type ClustersConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClustersConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClustersConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClustersConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClustersConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClustersConfigDumpValidationError) ErrorName() string { - return "ClustersConfigDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e ClustersConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClustersConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClustersConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClustersConfigDumpValidationError{} - -// Validate checks the field values on RoutesConfigDump with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *RoutesConfigDump) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetStaticRouteConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RoutesConfigDumpValidationError{ - field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicRouteConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RoutesConfigDumpValidationError{ - field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// RoutesConfigDumpValidationError is the validation error returned by -// RoutesConfigDump.Validate if the designated constraints aren't met. -type RoutesConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RoutesConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RoutesConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RoutesConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RoutesConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RoutesConfigDumpValidationError) ErrorName() string { return "RoutesConfigDumpValidationError" } - -// Error satisfies the builtin error interface -func (e RoutesConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRoutesConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RoutesConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RoutesConfigDumpValidationError{} - -// Validate checks the field values on ScopedRoutesConfigDump with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ScopedRoutesConfigDump) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetInlineScopedRouteConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRoutesConfigDumpValidationError{ - field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicScopedRouteConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRoutesConfigDumpValidationError{ - field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ScopedRoutesConfigDumpValidationError is the validation error returned by -// ScopedRoutesConfigDump.Validate if the designated constraints aren't met. -type ScopedRoutesConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRoutesConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ScopedRoutesConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ScopedRoutesConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRoutesConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRoutesConfigDumpValidationError) ErrorName() string { - return "ScopedRoutesConfigDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRoutesConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRoutesConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRoutesConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRoutesConfigDumpValidationError{} - -// Validate checks the field values on SecretsConfigDump with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *SecretsConfigDump) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetStaticSecrets() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretsConfigDumpValidationError{ - field: fmt.Sprintf("StaticSecrets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicActiveSecrets() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretsConfigDumpValidationError{ - field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicWarmingSecrets() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretsConfigDumpValidationError{ - field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// SecretsConfigDumpValidationError is the validation error returned by -// SecretsConfigDump.Validate if the designated constraints aren't met. -type SecretsConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SecretsConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SecretsConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SecretsConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SecretsConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SecretsConfigDumpValidationError) ErrorName() string { - return "SecretsConfigDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e SecretsConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSecretsConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SecretsConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SecretsConfigDumpValidationError{} - -// Validate checks the field values on EndpointsConfigDump with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *EndpointsConfigDump) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetStaticEndpointConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointsConfigDumpValidationError{ - field: fmt.Sprintf("StaticEndpointConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDynamicEndpointConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointsConfigDumpValidationError{ - field: fmt.Sprintf("DynamicEndpointConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// EndpointsConfigDumpValidationError is the validation error returned by -// EndpointsConfigDump.Validate if the designated constraints aren't met. -type EndpointsConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointsConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointsConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointsConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointsConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointsConfigDumpValidationError) ErrorName() string { - return "EndpointsConfigDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e EndpointsConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointsConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointsConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointsConfigDumpValidationError{} - -// Validate checks the field values on ListenersConfigDump_StaticListener with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *ListenersConfigDump_StaticListener) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_StaticListenerValidationError{ - field: "Listener", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_StaticListenerValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ListenersConfigDump_StaticListenerValidationError is the validation error -// returned by ListenersConfigDump_StaticListener.Validate if the designated -// constraints aren't met. -type ListenersConfigDump_StaticListenerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenersConfigDump_StaticListenerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenersConfigDump_StaticListenerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenersConfigDump_StaticListenerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenersConfigDump_StaticListenerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenersConfigDump_StaticListenerValidationError) ErrorName() string { - return "ListenersConfigDump_StaticListenerValidationError" -} - -// Error satisfies the builtin error interface -func (e ListenersConfigDump_StaticListenerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenersConfigDump_StaticListener.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenersConfigDump_StaticListenerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenersConfigDump_StaticListenerValidationError{} - -// Validate checks the field values on ListenersConfigDump_DynamicListenerState -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *ListenersConfigDump_DynamicListenerState) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_DynamicListenerStateValidationError{ - field: "Listener", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_DynamicListenerStateValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ListenersConfigDump_DynamicListenerStateValidationError is the validation -// error returned by ListenersConfigDump_DynamicListenerState.Validate if the -// designated constraints aren't met. -type ListenersConfigDump_DynamicListenerStateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenersConfigDump_DynamicListenerStateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenersConfigDump_DynamicListenerStateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenersConfigDump_DynamicListenerStateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenersConfigDump_DynamicListenerStateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenersConfigDump_DynamicListenerStateValidationError) ErrorName() string { - return "ListenersConfigDump_DynamicListenerStateValidationError" -} - -// Error satisfies the builtin error interface -func (e ListenersConfigDump_DynamicListenerStateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenersConfigDump_DynamicListenerState.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenersConfigDump_DynamicListenerStateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenersConfigDump_DynamicListenerStateValidationError{} - -// Validate checks the field values on ListenersConfigDump_DynamicListener with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *ListenersConfigDump_DynamicListener) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_DynamicListenerValidationError{ - field: "ActiveState", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_DynamicListenerValidationError{ - field: "WarmingState", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_DynamicListenerValidationError{ - field: "DrainingState", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersConfigDump_DynamicListenerValidationError{ - field: "ErrorState", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ListenersConfigDump_DynamicListenerValidationError is the validation error -// returned by ListenersConfigDump_DynamicListener.Validate if the designated -// constraints aren't met. -type ListenersConfigDump_DynamicListenerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenersConfigDump_DynamicListenerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenersConfigDump_DynamicListenerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenersConfigDump_DynamicListenerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenersConfigDump_DynamicListenerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenersConfigDump_DynamicListenerValidationError) ErrorName() string { - return "ListenersConfigDump_DynamicListenerValidationError" -} - -// Error satisfies the builtin error interface -func (e ListenersConfigDump_DynamicListenerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenersConfigDump_DynamicListener.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenersConfigDump_DynamicListenerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenersConfigDump_DynamicListenerValidationError{} - -// Validate checks the field values on ClustersConfigDump_StaticCluster with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *ClustersConfigDump_StaticCluster) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersConfigDump_StaticClusterValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersConfigDump_StaticClusterValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ClustersConfigDump_StaticClusterValidationError is the validation error -// returned by ClustersConfigDump_StaticCluster.Validate if the designated -// constraints aren't met. -type ClustersConfigDump_StaticClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClustersConfigDump_StaticClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClustersConfigDump_StaticClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClustersConfigDump_StaticClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClustersConfigDump_StaticClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClustersConfigDump_StaticClusterValidationError) ErrorName() string { - return "ClustersConfigDump_StaticClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e ClustersConfigDump_StaticClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClustersConfigDump_StaticCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClustersConfigDump_StaticClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClustersConfigDump_StaticClusterValidationError{} - -// Validate checks the field values on ClustersConfigDump_DynamicCluster with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *ClustersConfigDump_DynamicCluster) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersConfigDump_DynamicClusterValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClustersConfigDump_DynamicClusterValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ClustersConfigDump_DynamicClusterValidationError is the validation error -// returned by ClustersConfigDump_DynamicCluster.Validate if the designated -// constraints aren't met. -type ClustersConfigDump_DynamicClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClustersConfigDump_DynamicClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClustersConfigDump_DynamicClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClustersConfigDump_DynamicClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClustersConfigDump_DynamicClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClustersConfigDump_DynamicClusterValidationError) ErrorName() string { - return "ClustersConfigDump_DynamicClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e ClustersConfigDump_DynamicClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClustersConfigDump_DynamicCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClustersConfigDump_DynamicClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClustersConfigDump_DynamicClusterValidationError{} - -// Validate checks the field values on RoutesConfigDump_StaticRouteConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RoutesConfigDump_StaticRouteConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RoutesConfigDump_StaticRouteConfigValidationError{ - field: "RouteConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RoutesConfigDump_StaticRouteConfigValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RoutesConfigDump_StaticRouteConfigValidationError is the validation error -// returned by RoutesConfigDump_StaticRouteConfig.Validate if the designated -// constraints aren't met. -type RoutesConfigDump_StaticRouteConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RoutesConfigDump_StaticRouteConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RoutesConfigDump_StaticRouteConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RoutesConfigDump_StaticRouteConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RoutesConfigDump_StaticRouteConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RoutesConfigDump_StaticRouteConfigValidationError) ErrorName() string { - return "RoutesConfigDump_StaticRouteConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e RoutesConfigDump_StaticRouteConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRoutesConfigDump_StaticRouteConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RoutesConfigDump_StaticRouteConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RoutesConfigDump_StaticRouteConfigValidationError{} - -// Validate checks the field values on RoutesConfigDump_DynamicRouteConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RoutesConfigDump_DynamicRouteConfigValidationError{ - field: "RouteConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RoutesConfigDump_DynamicRouteConfigValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RoutesConfigDump_DynamicRouteConfigValidationError is the validation error -// returned by RoutesConfigDump_DynamicRouteConfig.Validate if the designated -// constraints aren't met. -type RoutesConfigDump_DynamicRouteConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RoutesConfigDump_DynamicRouteConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RoutesConfigDump_DynamicRouteConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RoutesConfigDump_DynamicRouteConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RoutesConfigDump_DynamicRouteConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RoutesConfigDump_DynamicRouteConfigValidationError) ErrorName() string { - return "RoutesConfigDump_DynamicRouteConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e RoutesConfigDump_DynamicRouteConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRoutesConfigDump_DynamicRouteConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RoutesConfigDump_DynamicRouteConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RoutesConfigDump_DynamicRouteConfigValidationError{} - -// Validate checks the field values on -// ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - for idx, item := range m.GetScopedRouteConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ - field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError is the -// validation error returned by -// ScopedRoutesConfigDump_InlineScopedRouteConfigs.Validate if the designated -// constraints aren't met. -type ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) ErrorName() string { - return "ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRoutesConfigDump_InlineScopedRouteConfigs.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{} - -// Validate checks the field values on -// ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - // no validation rules for VersionInfo - - for idx, item := range m.GetScopedRouteConfigs() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ - field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError is the -// validation error returned by -// ScopedRoutesConfigDump_DynamicScopedRouteConfigs.Validate if the designated -// constraints aren't met. -type ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) ErrorName() string { - return "ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRoutesConfigDump_DynamicScopedRouteConfigs.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{} - -// Validate checks the field values on SecretsConfigDump_DynamicSecret with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *SecretsConfigDump_DynamicSecret) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - // no validation rules for VersionInfo - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretsConfigDump_DynamicSecretValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretsConfigDump_DynamicSecretValidationError{ - field: "Secret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// SecretsConfigDump_DynamicSecretValidationError is the validation error -// returned by SecretsConfigDump_DynamicSecret.Validate if the designated -// constraints aren't met. -type SecretsConfigDump_DynamicSecretValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SecretsConfigDump_DynamicSecretValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SecretsConfigDump_DynamicSecretValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SecretsConfigDump_DynamicSecretValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SecretsConfigDump_DynamicSecretValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SecretsConfigDump_DynamicSecretValidationError) ErrorName() string { - return "SecretsConfigDump_DynamicSecretValidationError" -} - -// Error satisfies the builtin error interface -func (e SecretsConfigDump_DynamicSecretValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSecretsConfigDump_DynamicSecret.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SecretsConfigDump_DynamicSecretValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SecretsConfigDump_DynamicSecretValidationError{} - -// Validate checks the field values on SecretsConfigDump_StaticSecret with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *SecretsConfigDump_StaticSecret) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretsConfigDump_StaticSecretValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretsConfigDump_StaticSecretValidationError{ - field: "Secret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// SecretsConfigDump_StaticSecretValidationError is the validation error -// returned by SecretsConfigDump_StaticSecret.Validate if the designated -// constraints aren't met. -type SecretsConfigDump_StaticSecretValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SecretsConfigDump_StaticSecretValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SecretsConfigDump_StaticSecretValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SecretsConfigDump_StaticSecretValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SecretsConfigDump_StaticSecretValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SecretsConfigDump_StaticSecretValidationError) ErrorName() string { - return "SecretsConfigDump_StaticSecretValidationError" -} - -// Error satisfies the builtin error interface -func (e SecretsConfigDump_StaticSecretValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSecretsConfigDump_StaticSecret.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SecretsConfigDump_StaticSecretValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SecretsConfigDump_StaticSecretValidationError{} - -// Validate checks the field values on EndpointsConfigDump_StaticEndpointConfig -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *EndpointsConfigDump_StaticEndpointConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointsConfigDump_StaticEndpointConfigValidationError{ - field: "EndpointConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointsConfigDump_StaticEndpointConfigValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// EndpointsConfigDump_StaticEndpointConfigValidationError is the validation -// error returned by EndpointsConfigDump_StaticEndpointConfig.Validate if the -// designated constraints aren't met. -type EndpointsConfigDump_StaticEndpointConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointsConfigDump_StaticEndpointConfigValidationError) ErrorName() string { - return "EndpointsConfigDump_StaticEndpointConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointsConfigDump_StaticEndpointConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointsConfigDump_StaticEndpointConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointsConfigDump_StaticEndpointConfigValidationError{} - -// Validate checks the field values on -// EndpointsConfigDump_DynamicEndpointConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *EndpointsConfigDump_DynamicEndpointConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointsConfigDump_DynamicEndpointConfigValidationError{ - field: "EndpointConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointsConfigDump_DynamicEndpointConfigValidationError{ - field: "LastUpdated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// EndpointsConfigDump_DynamicEndpointConfigValidationError is the validation -// error returned by EndpointsConfigDump_DynamicEndpointConfig.Validate if the -// designated constraints aren't met. -type EndpointsConfigDump_DynamicEndpointConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) ErrorName() string { - return "EndpointsConfigDump_DynamicEndpointConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointsConfigDump_DynamicEndpointConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointsConfigDump_DynamicEndpointConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointsConfigDump_DynamicEndpointConfigValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/init_dump.pb.go b/pkg/api/envoy/admin/v4alpha/init_dump.pb.go deleted file mode 100644 index 6b84a54225..0000000000 --- a/pkg/api/envoy/admin/v4alpha/init_dump.pb.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/init_dump.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Dumps of unready targets of envoy init managers. Envoy's admin fills this message with init managers, -// which provides the information of their unready targets. -// The :ref:`/init_dump ` will dump all unready targets information. -type UnreadyTargetsDumps struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // You can choose specific component to dump unready targets with mask query parameter. - // See :ref:`/init_dump?mask={} ` for more information. - // The dumps of unready targets of all init managers. - UnreadyTargetsDumps []*UnreadyTargetsDumps_UnreadyTargetsDump `protobuf:"bytes,1,rep,name=unready_targets_dumps,json=unreadyTargetsDumps,proto3" json:"unready_targets_dumps,omitempty"` -} - -func (x *UnreadyTargetsDumps) Reset() { - *x = UnreadyTargetsDumps{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_init_dump_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnreadyTargetsDumps) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnreadyTargetsDumps) ProtoMessage() {} - -func (x *UnreadyTargetsDumps) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_init_dump_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnreadyTargetsDumps.ProtoReflect.Descriptor instead. -func (*UnreadyTargetsDumps) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_init_dump_proto_rawDescGZIP(), []int{0} -} - -func (x *UnreadyTargetsDumps) GetUnreadyTargetsDumps() []*UnreadyTargetsDumps_UnreadyTargetsDump { - if x != nil { - return x.UnreadyTargetsDumps - } - return nil -} - -// Message of unready targets information of an init manager. -type UnreadyTargetsDumps_UnreadyTargetsDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the init manager. Example: "init_manager_xxx". - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Names of unready targets of the init manager. Example: "target_xxx". - TargetNames []string `protobuf:"bytes,2,rep,name=target_names,json=targetNames,proto3" json:"target_names,omitempty"` -} - -func (x *UnreadyTargetsDumps_UnreadyTargetsDump) Reset() { - *x = UnreadyTargetsDumps_UnreadyTargetsDump{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_init_dump_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnreadyTargetsDumps_UnreadyTargetsDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnreadyTargetsDumps_UnreadyTargetsDump) ProtoMessage() {} - -func (x *UnreadyTargetsDumps_UnreadyTargetsDump) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_init_dump_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnreadyTargetsDumps_UnreadyTargetsDump.ProtoReflect.Descriptor instead. -func (*UnreadyTargetsDumps_UnreadyTargetsDump) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_init_dump_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *UnreadyTargetsDumps_UnreadyTargetsDump) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UnreadyTargetsDumps_UnreadyTargetsDump) GetTargetNames() []string { - if x != nil { - return x.TargetNames - } - return nil -} - -var File_envoy_admin_v4alpha_init_dump_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_init_dump_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x02, 0x0a, - 0x13, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, - 0x75, 0x6d, 0x70, 0x73, 0x12, 0x6f, 0x0a, 0x15, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, - 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x2e, 0x55, 0x6e, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, - 0x52, 0x13, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, - 0x44, 0x75, 0x6d, 0x70, 0x73, 0x1a, 0x89, 0x01, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, - 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x61, - 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x2e, 0x55, - 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, - 0x70, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x42, 0x3c, 0x0a, 0x21, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_init_dump_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_init_dump_proto_rawDescData = file_envoy_admin_v4alpha_init_dump_proto_rawDesc -) - -func file_envoy_admin_v4alpha_init_dump_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_init_dump_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_init_dump_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_init_dump_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_init_dump_proto_rawDescData -} - -var file_envoy_admin_v4alpha_init_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_admin_v4alpha_init_dump_proto_goTypes = []interface{}{ - (*UnreadyTargetsDumps)(nil), // 0: envoy.admin.v4alpha.UnreadyTargetsDumps - (*UnreadyTargetsDumps_UnreadyTargetsDump)(nil), // 1: envoy.admin.v4alpha.UnreadyTargetsDumps.UnreadyTargetsDump -} -var file_envoy_admin_v4alpha_init_dump_proto_depIdxs = []int32{ - 1, // 0: envoy.admin.v4alpha.UnreadyTargetsDumps.unready_targets_dumps:type_name -> envoy.admin.v4alpha.UnreadyTargetsDumps.UnreadyTargetsDump - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_init_dump_proto_init() } -func file_envoy_admin_v4alpha_init_dump_proto_init() { - if File_envoy_admin_v4alpha_init_dump_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_init_dump_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnreadyTargetsDumps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_init_dump_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnreadyTargetsDumps_UnreadyTargetsDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_init_dump_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_init_dump_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_init_dump_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_init_dump_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_init_dump_proto = out.File - file_envoy_admin_v4alpha_init_dump_proto_rawDesc = nil - file_envoy_admin_v4alpha_init_dump_proto_goTypes = nil - file_envoy_admin_v4alpha_init_dump_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/init_dump.pb.validate.go b/pkg/api/envoy/admin/v4alpha/init_dump.pb.validate.go deleted file mode 100644 index 43e0281bce..0000000000 --- a/pkg/api/envoy/admin/v4alpha/init_dump.pb.validate.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/init_dump.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on UnreadyTargetsDumps with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UnreadyTargetsDumps) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetUnreadyTargetsDumps() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UnreadyTargetsDumpsValidationError{ - field: fmt.Sprintf("UnreadyTargetsDumps[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// UnreadyTargetsDumpsValidationError is the validation error returned by -// UnreadyTargetsDumps.Validate if the designated constraints aren't met. -type UnreadyTargetsDumpsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UnreadyTargetsDumpsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UnreadyTargetsDumpsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UnreadyTargetsDumpsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UnreadyTargetsDumpsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UnreadyTargetsDumpsValidationError) ErrorName() string { - return "UnreadyTargetsDumpsValidationError" -} - -// Error satisfies the builtin error interface -func (e UnreadyTargetsDumpsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUnreadyTargetsDumps.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UnreadyTargetsDumpsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UnreadyTargetsDumpsValidationError{} - -// Validate checks the field values on UnreadyTargetsDumps_UnreadyTargetsDump -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *UnreadyTargetsDumps_UnreadyTargetsDump) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - return nil -} - -// UnreadyTargetsDumps_UnreadyTargetsDumpValidationError is the validation -// error returned by UnreadyTargetsDumps_UnreadyTargetsDump.Validate if the -// designated constraints aren't met. -type UnreadyTargetsDumps_UnreadyTargetsDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) ErrorName() string { - return "UnreadyTargetsDumps_UnreadyTargetsDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUnreadyTargetsDumps_UnreadyTargetsDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UnreadyTargetsDumps_UnreadyTargetsDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UnreadyTargetsDumps_UnreadyTargetsDumpValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/listeners.pb.go b/pkg/api/envoy/admin/v4alpha/listeners.pb.go deleted file mode 100644 index 20d00205c0..0000000000 --- a/pkg/api/envoy/admin/v4alpha/listeners.pb.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/listeners.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Admin endpoint uses this wrapper for `/listeners` to display listener status information. -// See :ref:`/listeners ` for more information. -type Listeners struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of listener statuses. - ListenerStatuses []*ListenerStatus `protobuf:"bytes,1,rep,name=listener_statuses,json=listenerStatuses,proto3" json:"listener_statuses,omitempty"` -} - -func (x *Listeners) Reset() { - *x = Listeners{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_listeners_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listeners) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listeners) ProtoMessage() {} - -func (x *Listeners) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_listeners_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listeners.ProtoReflect.Descriptor instead. -func (*Listeners) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_listeners_proto_rawDescGZIP(), []int{0} -} - -func (x *Listeners) GetListenerStatuses() []*ListenerStatus { - if x != nil { - return x.ListenerStatuses - } - return nil -} - -// Details an individual listener's current status. -type ListenerStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the listener - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The actual local address that the listener is listening on. If a listener was configured - // to listen on port 0, then this address has the port that was allocated by the OS. - LocalAddress *v4alpha.Address `protobuf:"bytes,2,opt,name=local_address,json=localAddress,proto3" json:"local_address,omitempty"` -} - -func (x *ListenerStatus) Reset() { - *x = ListenerStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_listeners_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerStatus) ProtoMessage() {} - -func (x *ListenerStatus) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_listeners_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerStatus.ProtoReflect.Descriptor instead. -func (*ListenerStatus) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_listeners_proto_rawDescGZIP(), []int{1} -} - -func (x *ListenerStatus) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ListenerStatus) GetLocalAddress() *v4alpha.Address { - if x != nil { - return x.LocalAddress - } - return nil -} - -var File_envoy_admin_v4alpha_listeners_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_listeners_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x73, 0x12, 0x50, 0x0a, 0x11, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x65, 0x73, 0x3a, 0x1f, 0x9a, 0xc5, 0x88, 0x1e, 0x1a, 0x0a, 0x18, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0d, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3d, 0x0a, 0x21, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_listeners_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_listeners_proto_rawDescData = file_envoy_admin_v4alpha_listeners_proto_rawDesc -) - -func file_envoy_admin_v4alpha_listeners_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_listeners_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_listeners_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_listeners_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_listeners_proto_rawDescData -} - -var file_envoy_admin_v4alpha_listeners_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_admin_v4alpha_listeners_proto_goTypes = []interface{}{ - (*Listeners)(nil), // 0: envoy.admin.v4alpha.Listeners - (*ListenerStatus)(nil), // 1: envoy.admin.v4alpha.ListenerStatus - (*v4alpha.Address)(nil), // 2: envoy.config.core.v4alpha.Address -} -var file_envoy_admin_v4alpha_listeners_proto_depIdxs = []int32{ - 1, // 0: envoy.admin.v4alpha.Listeners.listener_statuses:type_name -> envoy.admin.v4alpha.ListenerStatus - 2, // 1: envoy.admin.v4alpha.ListenerStatus.local_address:type_name -> envoy.config.core.v4alpha.Address - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_listeners_proto_init() } -func file_envoy_admin_v4alpha_listeners_proto_init() { - if File_envoy_admin_v4alpha_listeners_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_listeners_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listeners); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_listeners_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_listeners_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_listeners_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_listeners_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_listeners_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_listeners_proto = out.File - file_envoy_admin_v4alpha_listeners_proto_rawDesc = nil - file_envoy_admin_v4alpha_listeners_proto_goTypes = nil - file_envoy_admin_v4alpha_listeners_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/listeners.pb.validate.go b/pkg/api/envoy/admin/v4alpha/listeners.pb.validate.go deleted file mode 100644 index 69c01d690a..0000000000 --- a/pkg/api/envoy/admin/v4alpha/listeners.pb.validate.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/listeners.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on Listeners with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Listeners) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetListenerStatuses() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenersValidationError{ - field: fmt.Sprintf("ListenerStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ListenersValidationError is the validation error returned by -// Listeners.Validate if the designated constraints aren't met. -type ListenersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenersValidationError) ErrorName() string { return "ListenersValidationError" } - -// Error satisfies the builtin error interface -func (e ListenersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListeners.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenersValidationError{} - -// Validate checks the field values on ListenerStatus with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ListenerStatus) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerStatusValidationError{ - field: "LocalAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ListenerStatusValidationError is the validation error returned by -// ListenerStatus.Validate if the designated constraints aren't met. -type ListenerStatusValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenerStatusValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenerStatusValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenerStatusValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenerStatusValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenerStatusValidationError) ErrorName() string { return "ListenerStatusValidationError" } - -// Error satisfies the builtin error interface -func (e ListenerStatusValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenerStatus.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenerStatusValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenerStatusValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/memory.pb.go b/pkg/api/envoy/admin/v4alpha/memory.pb.go deleted file mode 100644 index 247de8cff8..0000000000 --- a/pkg/api/envoy/admin/v4alpha/memory.pb.go +++ /dev/null @@ -1,230 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/memory.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Proto representation of the internal memory consumption of an Envoy instance. These represent -// values extracted from an internal TCMalloc instance. For more information, see the section of the -// docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html). -// [#next-free-field: 7] -type Memory struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of bytes allocated by the heap for Envoy. This is an alias for - // `generic.current_allocated_bytes`. - Allocated uint64 `protobuf:"varint,1,opt,name=allocated,proto3" json:"allocated,omitempty"` - // The number of bytes reserved by the heap but not necessarily allocated. This is an alias for - // `generic.heap_size`. - HeapSize uint64 `protobuf:"varint,2,opt,name=heap_size,json=heapSize,proto3" json:"heap_size,omitempty"` - // The number of bytes in free, unmapped pages in the page heap. These bytes always count towards - // virtual memory usage, and depending on the OS, typically do not count towards physical memory - // usage. This is an alias for `tcmalloc.pageheap_unmapped_bytes`. - PageheapUnmapped uint64 `protobuf:"varint,3,opt,name=pageheap_unmapped,json=pageheapUnmapped,proto3" json:"pageheap_unmapped,omitempty"` - // The number of bytes in free, mapped pages in the page heap. These bytes always count towards - // virtual memory usage, and unless the underlying memory is swapped out by the OS, they also - // count towards physical memory usage. This is an alias for `tcmalloc.pageheap_free_bytes`. - PageheapFree uint64 `protobuf:"varint,4,opt,name=pageheap_free,json=pageheapFree,proto3" json:"pageheap_free,omitempty"` - // The amount of memory used by the TCMalloc thread caches (for small objects). This is an alias - // for `tcmalloc.current_total_thread_cache_bytes`. - TotalThreadCache uint64 `protobuf:"varint,5,opt,name=total_thread_cache,json=totalThreadCache,proto3" json:"total_thread_cache,omitempty"` - // The number of bytes of the physical memory usage by the allocator. This is an alias for - // `generic.total_physical_bytes`. - TotalPhysicalBytes uint64 `protobuf:"varint,6,opt,name=total_physical_bytes,json=totalPhysicalBytes,proto3" json:"total_physical_bytes,omitempty"` -} - -func (x *Memory) Reset() { - *x = Memory{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_memory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Memory) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Memory) ProtoMessage() {} - -func (x *Memory) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_memory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Memory.ProtoReflect.Descriptor instead. -func (*Memory) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_memory_proto_rawDescGZIP(), []int{0} -} - -func (x *Memory) GetAllocated() uint64 { - if x != nil { - return x.Allocated - } - return 0 -} - -func (x *Memory) GetHeapSize() uint64 { - if x != nil { - return x.HeapSize - } - return 0 -} - -func (x *Memory) GetPageheapUnmapped() uint64 { - if x != nil { - return x.PageheapUnmapped - } - return 0 -} - -func (x *Memory) GetPageheapFree() uint64 { - if x != nil { - return x.PageheapFree - } - return 0 -} - -func (x *Memory) GetTotalThreadCache() uint64 { - if x != nil { - return x.TotalThreadCache - } - return 0 -} - -func (x *Memory) GetTotalPhysicalBytes() uint64 { - if x != nil { - return x.TotalPhysicalBytes - } - return 0 -} - -var File_envoy_admin_v4alpha_memory_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_memory_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x06, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x68, 0x65, 0x61, 0x70, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x2b, 0x0a, 0x11, 0x70, 0x61, 0x67, 0x65, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x75, 0x6e, 0x6d, 0x61, - 0x70, 0x70, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x61, 0x67, 0x65, - 0x68, 0x65, 0x61, 0x70, 0x55, 0x6e, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, - 0x70, 0x61, 0x67, 0x65, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x65, 0x68, 0x65, 0x61, 0x70, 0x46, 0x72, 0x65, - 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, - 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, - 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, - 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, - 0x3a, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_memory_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_memory_proto_rawDescData = file_envoy_admin_v4alpha_memory_proto_rawDesc -) - -func file_envoy_admin_v4alpha_memory_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_memory_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_memory_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_memory_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_memory_proto_rawDescData -} - -var file_envoy_admin_v4alpha_memory_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_admin_v4alpha_memory_proto_goTypes = []interface{}{ - (*Memory)(nil), // 0: envoy.admin.v4alpha.Memory -} -var file_envoy_admin_v4alpha_memory_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_memory_proto_init() } -func file_envoy_admin_v4alpha_memory_proto_init() { - if File_envoy_admin_v4alpha_memory_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_memory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Memory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_memory_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_memory_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_memory_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_memory_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_memory_proto = out.File - file_envoy_admin_v4alpha_memory_proto_rawDesc = nil - file_envoy_admin_v4alpha_memory_proto_goTypes = nil - file_envoy_admin_v4alpha_memory_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/memory.pb.validate.go b/pkg/api/envoy/admin/v4alpha/memory.pb.validate.go deleted file mode 100644 index 7f52b45595..0000000000 --- a/pkg/api/envoy/admin/v4alpha/memory.pb.validate.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/memory.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on Memory with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Memory) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Allocated - - // no validation rules for HeapSize - - // no validation rules for PageheapUnmapped - - // no validation rules for PageheapFree - - // no validation rules for TotalThreadCache - - // no validation rules for TotalPhysicalBytes - - return nil -} - -// MemoryValidationError is the validation error returned by Memory.Validate if -// the designated constraints aren't met. -type MemoryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MemoryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MemoryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MemoryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MemoryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MemoryValidationError) ErrorName() string { return "MemoryValidationError" } - -// Error satisfies the builtin error interface -func (e MemoryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMemory.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MemoryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MemoryValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/metrics.pb.go b/pkg/api/envoy/admin/v4alpha/metrics.pb.go deleted file mode 100644 index 5904fca7ec..0000000000 --- a/pkg/api/envoy/admin/v4alpha/metrics.pb.go +++ /dev/null @@ -1,236 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/metrics.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type SimpleMetric_Type int32 - -const ( - SimpleMetric_COUNTER SimpleMetric_Type = 0 - SimpleMetric_GAUGE SimpleMetric_Type = 1 -) - -// Enum value maps for SimpleMetric_Type. -var ( - SimpleMetric_Type_name = map[int32]string{ - 0: "COUNTER", - 1: "GAUGE", - } - SimpleMetric_Type_value = map[string]int32{ - "COUNTER": 0, - "GAUGE": 1, - } -) - -func (x SimpleMetric_Type) Enum() *SimpleMetric_Type { - p := new(SimpleMetric_Type) - *p = x - return p -} - -func (x SimpleMetric_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SimpleMetric_Type) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_admin_v4alpha_metrics_proto_enumTypes[0].Descriptor() -} - -func (SimpleMetric_Type) Type() protoreflect.EnumType { - return &file_envoy_admin_v4alpha_metrics_proto_enumTypes[0] -} - -func (x SimpleMetric_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SimpleMetric_Type.Descriptor instead. -func (SimpleMetric_Type) EnumDescriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_metrics_proto_rawDescGZIP(), []int{0, 0} -} - -// Proto representation of an Envoy Counter or Gauge value. -type SimpleMetric struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type of the metric represented. - Type SimpleMetric_Type `protobuf:"varint,1,opt,name=type,proto3,enum=envoy.admin.v4alpha.SimpleMetric_Type" json:"type,omitempty"` - // Current metric value. - Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` - // Name of the metric. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *SimpleMetric) Reset() { - *x = SimpleMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimpleMetric) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimpleMetric) ProtoMessage() {} - -func (x *SimpleMetric) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SimpleMetric.ProtoReflect.Descriptor instead. -func (*SimpleMetric) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_metrics_proto_rawDescGZIP(), []int{0} -} - -func (x *SimpleMetric) GetType() SimpleMetric_Type { - if x != nil { - return x.Type - } - return SimpleMetric_COUNTER -} - -func (x *SimpleMetric) GetValue() uint64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *SimpleMetric) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_envoy_admin_v4alpha_metrics_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_metrics_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x0c, 0x53, - 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x3a, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x1e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x45, 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, 0x45, 0x10, - 0x01, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x3b, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_metrics_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_metrics_proto_rawDescData = file_envoy_admin_v4alpha_metrics_proto_rawDesc -) - -func file_envoy_admin_v4alpha_metrics_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_metrics_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_metrics_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_metrics_proto_rawDescData -} - -var file_envoy_admin_v4alpha_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_admin_v4alpha_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_admin_v4alpha_metrics_proto_goTypes = []interface{}{ - (SimpleMetric_Type)(0), // 0: envoy.admin.v4alpha.SimpleMetric.Type - (*SimpleMetric)(nil), // 1: envoy.admin.v4alpha.SimpleMetric -} -var file_envoy_admin_v4alpha_metrics_proto_depIdxs = []int32{ - 0, // 0: envoy.admin.v4alpha.SimpleMetric.type:type_name -> envoy.admin.v4alpha.SimpleMetric.Type - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_metrics_proto_init() } -func file_envoy_admin_v4alpha_metrics_proto_init() { - if File_envoy_admin_v4alpha_metrics_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimpleMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_metrics_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_metrics_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_metrics_proto_depIdxs, - EnumInfos: file_envoy_admin_v4alpha_metrics_proto_enumTypes, - MessageInfos: file_envoy_admin_v4alpha_metrics_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_metrics_proto = out.File - file_envoy_admin_v4alpha_metrics_proto_rawDesc = nil - file_envoy_admin_v4alpha_metrics_proto_goTypes = nil - file_envoy_admin_v4alpha_metrics_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/metrics.pb.validate.go b/pkg/api/envoy/admin/v4alpha/metrics.pb.validate.go deleted file mode 100644 index 123e49bf8e..0000000000 --- a/pkg/api/envoy/admin/v4alpha/metrics.pb.validate.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/metrics.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on SimpleMetric with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *SimpleMetric) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Type - - // no validation rules for Value - - // no validation rules for Name - - return nil -} - -// SimpleMetricValidationError is the validation error returned by -// SimpleMetric.Validate if the designated constraints aren't met. -type SimpleMetricValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SimpleMetricValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SimpleMetricValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SimpleMetricValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SimpleMetricValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SimpleMetricValidationError) ErrorName() string { return "SimpleMetricValidationError" } - -// Error satisfies the builtin error interface -func (e SimpleMetricValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSimpleMetric.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SimpleMetricValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SimpleMetricValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/mutex_stats.pb.go b/pkg/api/envoy/admin/v4alpha/mutex_stats.pb.go deleted file mode 100644 index 7d61a4a18d..0000000000 --- a/pkg/api/envoy/admin/v4alpha/mutex_stats.pb.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/mutex_stats.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Proto representation of the statistics collected upon absl::Mutex contention, if Envoy is run -// under :option:`--enable-mutex-tracing`. For more information, see the `absl::Mutex` -// [docs](https://abseil.io/about/design/mutex#extra-features). -// -// *NB*: The wait cycles below are measured by `absl::base_internal::CycleClock`, and may not -// correspond to core clock frequency. For more information, see the `CycleClock` -// [docs](https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/cycleclock.h). -type MutexStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of individual mutex contentions which have occurred since startup. - NumContentions uint64 `protobuf:"varint,1,opt,name=num_contentions,json=numContentions,proto3" json:"num_contentions,omitempty"` - // The length of the current contention wait cycle. - CurrentWaitCycles uint64 `protobuf:"varint,2,opt,name=current_wait_cycles,json=currentWaitCycles,proto3" json:"current_wait_cycles,omitempty"` - // The lifetime total of all contention wait cycles. - LifetimeWaitCycles uint64 `protobuf:"varint,3,opt,name=lifetime_wait_cycles,json=lifetimeWaitCycles,proto3" json:"lifetime_wait_cycles,omitempty"` -} - -func (x *MutexStats) Reset() { - *x = MutexStats{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_mutex_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MutexStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MutexStats) ProtoMessage() {} - -func (x *MutexStats) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_mutex_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MutexStats.ProtoReflect.Descriptor instead. -func (*MutexStats) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_mutex_stats_proto_rawDescGZIP(), []int{0} -} - -func (x *MutexStats) GetNumContentions() uint64 { - if x != nil { - return x.NumContentions - } - return 0 -} - -func (x *MutexStats) GetCurrentWaitCycles() uint64 { - if x != nil { - return x.CurrentWaitCycles - } - return 0 -} - -func (x *MutexStats) GetLifetimeWaitCycles() uint64 { - if x != nil { - return x.LifetimeWaitCycles - } - return 0 -} - -var File_envoy_admin_v4alpha_mutex_stats_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_mutex_stats_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, - 0x01, 0x0a, 0x0a, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, - 0x0f, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x57, 0x61, 0x69, 0x74, - 0x43, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x61, - 0x69, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, - 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x75, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x3e, 0x0a, 0x21, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x0f, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_mutex_stats_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_mutex_stats_proto_rawDescData = file_envoy_admin_v4alpha_mutex_stats_proto_rawDesc -) - -func file_envoy_admin_v4alpha_mutex_stats_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_mutex_stats_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_mutex_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_mutex_stats_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_mutex_stats_proto_rawDescData -} - -var file_envoy_admin_v4alpha_mutex_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_admin_v4alpha_mutex_stats_proto_goTypes = []interface{}{ - (*MutexStats)(nil), // 0: envoy.admin.v4alpha.MutexStats -} -var file_envoy_admin_v4alpha_mutex_stats_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_mutex_stats_proto_init() } -func file_envoy_admin_v4alpha_mutex_stats_proto_init() { - if File_envoy_admin_v4alpha_mutex_stats_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_mutex_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MutexStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_mutex_stats_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_mutex_stats_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_mutex_stats_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_mutex_stats_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_mutex_stats_proto = out.File - file_envoy_admin_v4alpha_mutex_stats_proto_rawDesc = nil - file_envoy_admin_v4alpha_mutex_stats_proto_goTypes = nil - file_envoy_admin_v4alpha_mutex_stats_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/mutex_stats.pb.validate.go b/pkg/api/envoy/admin/v4alpha/mutex_stats.pb.validate.go deleted file mode 100644 index b10b88140f..0000000000 --- a/pkg/api/envoy/admin/v4alpha/mutex_stats.pb.validate.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/mutex_stats.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on MutexStats with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *MutexStats) Validate() error { - if m == nil { - return nil - } - - // no validation rules for NumContentions - - // no validation rules for CurrentWaitCycles - - // no validation rules for LifetimeWaitCycles - - return nil -} - -// MutexStatsValidationError is the validation error returned by -// MutexStats.Validate if the designated constraints aren't met. -type MutexStatsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MutexStatsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MutexStatsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MutexStatsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MutexStatsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MutexStatsValidationError) ErrorName() string { return "MutexStatsValidationError" } - -// Error satisfies the builtin error interface -func (e MutexStatsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMutexStats.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MutexStatsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MutexStatsValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/server_info.pb.go b/pkg/api/envoy/admin/v4alpha/server_info.pb.go deleted file mode 100644 index 58e3997f9d..0000000000 --- a/pkg/api/envoy/admin/v4alpha/server_info.pb.go +++ /dev/null @@ -1,943 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/server_info.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type ServerInfo_State int32 - -const ( - // Server is live and serving traffic. - ServerInfo_LIVE ServerInfo_State = 0 - // Server is draining listeners in response to external health checks failing. - ServerInfo_DRAINING ServerInfo_State = 1 - // Server has not yet completed cluster manager initialization. - ServerInfo_PRE_INITIALIZING ServerInfo_State = 2 - // Server is running the cluster manager initialization callbacks (e.g., RDS). - ServerInfo_INITIALIZING ServerInfo_State = 3 -) - -// Enum value maps for ServerInfo_State. -var ( - ServerInfo_State_name = map[int32]string{ - 0: "LIVE", - 1: "DRAINING", - 2: "PRE_INITIALIZING", - 3: "INITIALIZING", - } - ServerInfo_State_value = map[string]int32{ - "LIVE": 0, - "DRAINING": 1, - "PRE_INITIALIZING": 2, - "INITIALIZING": 3, - } -) - -func (x ServerInfo_State) Enum() *ServerInfo_State { - p := new(ServerInfo_State) - *p = x - return p -} - -func (x ServerInfo_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ServerInfo_State) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_admin_v4alpha_server_info_proto_enumTypes[0].Descriptor() -} - -func (ServerInfo_State) Type() protoreflect.EnumType { - return &file_envoy_admin_v4alpha_server_info_proto_enumTypes[0] -} - -func (x ServerInfo_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ServerInfo_State.Descriptor instead. -func (ServerInfo_State) EnumDescriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_server_info_proto_rawDescGZIP(), []int{0, 0} -} - -type CommandLineOptions_IpVersion int32 - -const ( - CommandLineOptions_v4 CommandLineOptions_IpVersion = 0 - CommandLineOptions_v6 CommandLineOptions_IpVersion = 1 -) - -// Enum value maps for CommandLineOptions_IpVersion. -var ( - CommandLineOptions_IpVersion_name = map[int32]string{ - 0: "v4", - 1: "v6", - } - CommandLineOptions_IpVersion_value = map[string]int32{ - "v4": 0, - "v6": 1, - } -) - -func (x CommandLineOptions_IpVersion) Enum() *CommandLineOptions_IpVersion { - p := new(CommandLineOptions_IpVersion) - *p = x - return p -} - -func (x CommandLineOptions_IpVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CommandLineOptions_IpVersion) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_admin_v4alpha_server_info_proto_enumTypes[1].Descriptor() -} - -func (CommandLineOptions_IpVersion) Type() protoreflect.EnumType { - return &file_envoy_admin_v4alpha_server_info_proto_enumTypes[1] -} - -func (x CommandLineOptions_IpVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CommandLineOptions_IpVersion.Descriptor instead. -func (CommandLineOptions_IpVersion) EnumDescriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_server_info_proto_rawDescGZIP(), []int{1, 0} -} - -type CommandLineOptions_Mode int32 - -const ( - // Validate configs and then serve traffic normally. - CommandLineOptions_Serve CommandLineOptions_Mode = 0 - // Validate configs and exit. - CommandLineOptions_Validate CommandLineOptions_Mode = 1 - // Completely load and initialize the config, and then exit without running the listener loop. - CommandLineOptions_InitOnly CommandLineOptions_Mode = 2 -) - -// Enum value maps for CommandLineOptions_Mode. -var ( - CommandLineOptions_Mode_name = map[int32]string{ - 0: "Serve", - 1: "Validate", - 2: "InitOnly", - } - CommandLineOptions_Mode_value = map[string]int32{ - "Serve": 0, - "Validate": 1, - "InitOnly": 2, - } -) - -func (x CommandLineOptions_Mode) Enum() *CommandLineOptions_Mode { - p := new(CommandLineOptions_Mode) - *p = x - return p -} - -func (x CommandLineOptions_Mode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CommandLineOptions_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_admin_v4alpha_server_info_proto_enumTypes[2].Descriptor() -} - -func (CommandLineOptions_Mode) Type() protoreflect.EnumType { - return &file_envoy_admin_v4alpha_server_info_proto_enumTypes[2] -} - -func (x CommandLineOptions_Mode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CommandLineOptions_Mode.Descriptor instead. -func (CommandLineOptions_Mode) EnumDescriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_server_info_proto_rawDescGZIP(), []int{1, 1} -} - -type CommandLineOptions_DrainStrategy int32 - -const ( - // Gradually discourage connections over the course of the drain period. - CommandLineOptions_Gradual CommandLineOptions_DrainStrategy = 0 - // Discourage all connections for the duration of the drain sequence. - CommandLineOptions_Immediate CommandLineOptions_DrainStrategy = 1 -) - -// Enum value maps for CommandLineOptions_DrainStrategy. -var ( - CommandLineOptions_DrainStrategy_name = map[int32]string{ - 0: "Gradual", - 1: "Immediate", - } - CommandLineOptions_DrainStrategy_value = map[string]int32{ - "Gradual": 0, - "Immediate": 1, - } -) - -func (x CommandLineOptions_DrainStrategy) Enum() *CommandLineOptions_DrainStrategy { - p := new(CommandLineOptions_DrainStrategy) - *p = x - return p -} - -func (x CommandLineOptions_DrainStrategy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CommandLineOptions_DrainStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_admin_v4alpha_server_info_proto_enumTypes[3].Descriptor() -} - -func (CommandLineOptions_DrainStrategy) Type() protoreflect.EnumType { - return &file_envoy_admin_v4alpha_server_info_proto_enumTypes[3] -} - -func (x CommandLineOptions_DrainStrategy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CommandLineOptions_DrainStrategy.Descriptor instead. -func (CommandLineOptions_DrainStrategy) EnumDescriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_server_info_proto_rawDescGZIP(), []int{1, 2} -} - -// Proto representation of the value returned by /server_info, containing -// server version/server status information. -// [#next-free-field: 8] -type ServerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Server version. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // State of the server. - State ServerInfo_State `protobuf:"varint,2,opt,name=state,proto3,enum=envoy.admin.v4alpha.ServerInfo_State" json:"state,omitempty"` - // Uptime since current epoch was started. - UptimeCurrentEpoch *duration.Duration `protobuf:"bytes,3,opt,name=uptime_current_epoch,json=uptimeCurrentEpoch,proto3" json:"uptime_current_epoch,omitempty"` - // Uptime since the start of the first epoch. - UptimeAllEpochs *duration.Duration `protobuf:"bytes,4,opt,name=uptime_all_epochs,json=uptimeAllEpochs,proto3" json:"uptime_all_epochs,omitempty"` - // Hot restart version. - HotRestartVersion string `protobuf:"bytes,5,opt,name=hot_restart_version,json=hotRestartVersion,proto3" json:"hot_restart_version,omitempty"` - // Command line options the server is currently running with. - CommandLineOptions *CommandLineOptions `protobuf:"bytes,6,opt,name=command_line_options,json=commandLineOptions,proto3" json:"command_line_options,omitempty"` - // Populated node identity of this server. - Node *v4alpha.Node `protobuf:"bytes,7,opt,name=node,proto3" json:"node,omitempty"` -} - -func (x *ServerInfo) Reset() { - *x = ServerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_server_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerInfo) ProtoMessage() {} - -func (x *ServerInfo) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_server_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead. -func (*ServerInfo) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_server_info_proto_rawDescGZIP(), []int{0} -} - -func (x *ServerInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *ServerInfo) GetState() ServerInfo_State { - if x != nil { - return x.State - } - return ServerInfo_LIVE -} - -func (x *ServerInfo) GetUptimeCurrentEpoch() *duration.Duration { - if x != nil { - return x.UptimeCurrentEpoch - } - return nil -} - -func (x *ServerInfo) GetUptimeAllEpochs() *duration.Duration { - if x != nil { - return x.UptimeAllEpochs - } - return nil -} - -func (x *ServerInfo) GetHotRestartVersion() string { - if x != nil { - return x.HotRestartVersion - } - return "" -} - -func (x *ServerInfo) GetCommandLineOptions() *CommandLineOptions { - if x != nil { - return x.CommandLineOptions - } - return nil -} - -func (x *ServerInfo) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -// [#next-free-field: 37] -type CommandLineOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // See :option:`--base-id` for details. - BaseId uint64 `protobuf:"varint,1,opt,name=base_id,json=baseId,proto3" json:"base_id,omitempty"` - // See :option:`--use-dynamic-base-id` for details. - UseDynamicBaseId bool `protobuf:"varint,31,opt,name=use_dynamic_base_id,json=useDynamicBaseId,proto3" json:"use_dynamic_base_id,omitempty"` - // See :option:`--base-id-path` for details. - BaseIdPath string `protobuf:"bytes,32,opt,name=base_id_path,json=baseIdPath,proto3" json:"base_id_path,omitempty"` - // See :option:`--concurrency` for details. - Concurrency uint32 `protobuf:"varint,2,opt,name=concurrency,proto3" json:"concurrency,omitempty"` - // See :option:`--config-path` for details. - ConfigPath string `protobuf:"bytes,3,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` - // See :option:`--config-yaml` for details. - ConfigYaml string `protobuf:"bytes,4,opt,name=config_yaml,json=configYaml,proto3" json:"config_yaml,omitempty"` - // See :option:`--allow-unknown-static-fields` for details. - AllowUnknownStaticFields bool `protobuf:"varint,5,opt,name=allow_unknown_static_fields,json=allowUnknownStaticFields,proto3" json:"allow_unknown_static_fields,omitempty"` - // See :option:`--reject-unknown-dynamic-fields` for details. - RejectUnknownDynamicFields bool `protobuf:"varint,26,opt,name=reject_unknown_dynamic_fields,json=rejectUnknownDynamicFields,proto3" json:"reject_unknown_dynamic_fields,omitempty"` - // See :option:`--ignore-unknown-dynamic-fields` for details. - IgnoreUnknownDynamicFields bool `protobuf:"varint,30,opt,name=ignore_unknown_dynamic_fields,json=ignoreUnknownDynamicFields,proto3" json:"ignore_unknown_dynamic_fields,omitempty"` - // See :option:`--admin-address-path` for details. - AdminAddressPath string `protobuf:"bytes,6,opt,name=admin_address_path,json=adminAddressPath,proto3" json:"admin_address_path,omitempty"` - // See :option:`--local-address-ip-version` for details. - LocalAddressIpVersion CommandLineOptions_IpVersion `protobuf:"varint,7,opt,name=local_address_ip_version,json=localAddressIpVersion,proto3,enum=envoy.admin.v4alpha.CommandLineOptions_IpVersion" json:"local_address_ip_version,omitempty"` - // See :option:`--log-level` for details. - LogLevel string `protobuf:"bytes,8,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` - // See :option:`--component-log-level` for details. - ComponentLogLevel string `protobuf:"bytes,9,opt,name=component_log_level,json=componentLogLevel,proto3" json:"component_log_level,omitempty"` - // See :option:`--log-format` for details. - LogFormat string `protobuf:"bytes,10,opt,name=log_format,json=logFormat,proto3" json:"log_format,omitempty"` - // See :option:`--log-format-escaped` for details. - LogFormatEscaped bool `protobuf:"varint,27,opt,name=log_format_escaped,json=logFormatEscaped,proto3" json:"log_format_escaped,omitempty"` - // See :option:`--log-path` for details. - LogPath string `protobuf:"bytes,11,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` - // See :option:`--service-cluster` for details. - ServiceCluster string `protobuf:"bytes,13,opt,name=service_cluster,json=serviceCluster,proto3" json:"service_cluster,omitempty"` - // See :option:`--service-node` for details. - ServiceNode string `protobuf:"bytes,14,opt,name=service_node,json=serviceNode,proto3" json:"service_node,omitempty"` - // See :option:`--service-zone` for details. - ServiceZone string `protobuf:"bytes,15,opt,name=service_zone,json=serviceZone,proto3" json:"service_zone,omitempty"` - // See :option:`--file-flush-interval-msec` for details. - FileFlushInterval *duration.Duration `protobuf:"bytes,16,opt,name=file_flush_interval,json=fileFlushInterval,proto3" json:"file_flush_interval,omitempty"` - // See :option:`--drain-time-s` for details. - DrainTime *duration.Duration `protobuf:"bytes,17,opt,name=drain_time,json=drainTime,proto3" json:"drain_time,omitempty"` - // See :option:`--drain-strategy` for details. - DrainStrategy CommandLineOptions_DrainStrategy `protobuf:"varint,33,opt,name=drain_strategy,json=drainStrategy,proto3,enum=envoy.admin.v4alpha.CommandLineOptions_DrainStrategy" json:"drain_strategy,omitempty"` - // See :option:`--parent-shutdown-time-s` for details. - ParentShutdownTime *duration.Duration `protobuf:"bytes,18,opt,name=parent_shutdown_time,json=parentShutdownTime,proto3" json:"parent_shutdown_time,omitempty"` - // See :option:`--mode` for details. - Mode CommandLineOptions_Mode `protobuf:"varint,19,opt,name=mode,proto3,enum=envoy.admin.v4alpha.CommandLineOptions_Mode" json:"mode,omitempty"` - // See :option:`--disable-hot-restart` for details. - DisableHotRestart bool `protobuf:"varint,22,opt,name=disable_hot_restart,json=disableHotRestart,proto3" json:"disable_hot_restart,omitempty"` - // See :option:`--enable-mutex-tracing` for details. - EnableMutexTracing bool `protobuf:"varint,23,opt,name=enable_mutex_tracing,json=enableMutexTracing,proto3" json:"enable_mutex_tracing,omitempty"` - // See :option:`--restart-epoch` for details. - RestartEpoch uint32 `protobuf:"varint,24,opt,name=restart_epoch,json=restartEpoch,proto3" json:"restart_epoch,omitempty"` - // See :option:`--cpuset-threads` for details. - CpusetThreads bool `protobuf:"varint,25,opt,name=cpuset_threads,json=cpusetThreads,proto3" json:"cpuset_threads,omitempty"` - // See :option:`--disable-extensions` for details. - DisabledExtensions []string `protobuf:"bytes,28,rep,name=disabled_extensions,json=disabledExtensions,proto3" json:"disabled_extensions,omitempty"` - // See :option:`--bootstrap-version` for details. - BootstrapVersion uint32 `protobuf:"varint,29,opt,name=bootstrap_version,json=bootstrapVersion,proto3" json:"bootstrap_version,omitempty"` - // See :option:`--enable-fine-grain-logging` for details. - EnableFineGrainLogging bool `protobuf:"varint,34,opt,name=enable_fine_grain_logging,json=enableFineGrainLogging,proto3" json:"enable_fine_grain_logging,omitempty"` - // See :option:`--socket-path` for details. - SocketPath string `protobuf:"bytes,35,opt,name=socket_path,json=socketPath,proto3" json:"socket_path,omitempty"` - // See :option:`--socket-mode` for details. - SocketMode uint32 `protobuf:"varint,36,opt,name=socket_mode,json=socketMode,proto3" json:"socket_mode,omitempty"` -} - -func (x *CommandLineOptions) Reset() { - *x = CommandLineOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_server_info_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommandLineOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommandLineOptions) ProtoMessage() {} - -func (x *CommandLineOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_server_info_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommandLineOptions.ProtoReflect.Descriptor instead. -func (*CommandLineOptions) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_server_info_proto_rawDescGZIP(), []int{1} -} - -func (x *CommandLineOptions) GetBaseId() uint64 { - if x != nil { - return x.BaseId - } - return 0 -} - -func (x *CommandLineOptions) GetUseDynamicBaseId() bool { - if x != nil { - return x.UseDynamicBaseId - } - return false -} - -func (x *CommandLineOptions) GetBaseIdPath() string { - if x != nil { - return x.BaseIdPath - } - return "" -} - -func (x *CommandLineOptions) GetConcurrency() uint32 { - if x != nil { - return x.Concurrency - } - return 0 -} - -func (x *CommandLineOptions) GetConfigPath() string { - if x != nil { - return x.ConfigPath - } - return "" -} - -func (x *CommandLineOptions) GetConfigYaml() string { - if x != nil { - return x.ConfigYaml - } - return "" -} - -func (x *CommandLineOptions) GetAllowUnknownStaticFields() bool { - if x != nil { - return x.AllowUnknownStaticFields - } - return false -} - -func (x *CommandLineOptions) GetRejectUnknownDynamicFields() bool { - if x != nil { - return x.RejectUnknownDynamicFields - } - return false -} - -func (x *CommandLineOptions) GetIgnoreUnknownDynamicFields() bool { - if x != nil { - return x.IgnoreUnknownDynamicFields - } - return false -} - -func (x *CommandLineOptions) GetAdminAddressPath() string { - if x != nil { - return x.AdminAddressPath - } - return "" -} - -func (x *CommandLineOptions) GetLocalAddressIpVersion() CommandLineOptions_IpVersion { - if x != nil { - return x.LocalAddressIpVersion - } - return CommandLineOptions_v4 -} - -func (x *CommandLineOptions) GetLogLevel() string { - if x != nil { - return x.LogLevel - } - return "" -} - -func (x *CommandLineOptions) GetComponentLogLevel() string { - if x != nil { - return x.ComponentLogLevel - } - return "" -} - -func (x *CommandLineOptions) GetLogFormat() string { - if x != nil { - return x.LogFormat - } - return "" -} - -func (x *CommandLineOptions) GetLogFormatEscaped() bool { - if x != nil { - return x.LogFormatEscaped - } - return false -} - -func (x *CommandLineOptions) GetLogPath() string { - if x != nil { - return x.LogPath - } - return "" -} - -func (x *CommandLineOptions) GetServiceCluster() string { - if x != nil { - return x.ServiceCluster - } - return "" -} - -func (x *CommandLineOptions) GetServiceNode() string { - if x != nil { - return x.ServiceNode - } - return "" -} - -func (x *CommandLineOptions) GetServiceZone() string { - if x != nil { - return x.ServiceZone - } - return "" -} - -func (x *CommandLineOptions) GetFileFlushInterval() *duration.Duration { - if x != nil { - return x.FileFlushInterval - } - return nil -} - -func (x *CommandLineOptions) GetDrainTime() *duration.Duration { - if x != nil { - return x.DrainTime - } - return nil -} - -func (x *CommandLineOptions) GetDrainStrategy() CommandLineOptions_DrainStrategy { - if x != nil { - return x.DrainStrategy - } - return CommandLineOptions_Gradual -} - -func (x *CommandLineOptions) GetParentShutdownTime() *duration.Duration { - if x != nil { - return x.ParentShutdownTime - } - return nil -} - -func (x *CommandLineOptions) GetMode() CommandLineOptions_Mode { - if x != nil { - return x.Mode - } - return CommandLineOptions_Serve -} - -func (x *CommandLineOptions) GetDisableHotRestart() bool { - if x != nil { - return x.DisableHotRestart - } - return false -} - -func (x *CommandLineOptions) GetEnableMutexTracing() bool { - if x != nil { - return x.EnableMutexTracing - } - return false -} - -func (x *CommandLineOptions) GetRestartEpoch() uint32 { - if x != nil { - return x.RestartEpoch - } - return 0 -} - -func (x *CommandLineOptions) GetCpusetThreads() bool { - if x != nil { - return x.CpusetThreads - } - return false -} - -func (x *CommandLineOptions) GetDisabledExtensions() []string { - if x != nil { - return x.DisabledExtensions - } - return nil -} - -func (x *CommandLineOptions) GetBootstrapVersion() uint32 { - if x != nil { - return x.BootstrapVersion - } - return 0 -} - -func (x *CommandLineOptions) GetEnableFineGrainLogging() bool { - if x != nil { - return x.EnableFineGrainLogging - } - return false -} - -func (x *CommandLineOptions) GetSocketPath() string { - if x != nil { - return x.SocketPath - } - return "" -} - -func (x *CommandLineOptions) GetSocketMode() uint32 { - if x != nil { - return x.SocketMode - } - return 0 -} - -var File_envoy_admin_v4alpha_server_info_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_server_info_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x04, 0x0a, 0x0a, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x45, 0x0a, 0x11, - 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, - 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, - 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x22, 0x47, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, - 0x4c, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x49, - 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, - 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, - 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x3a, 0x20, 0x9a, 0xc5, - 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb2, - 0x0e, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x2d, - 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x62, 0x61, - 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x73, 0x65, - 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x42, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, - 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x20, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x79, 0x61, 0x6d, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x59, - 0x61, 0x6d, 0x6c, 0x12, 0x3d, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x75, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x55, - 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x6a, 0x65, 0x63, - 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, - 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x6a, 0x0a, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x67, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2c, - 0x0a, 0x12, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x65, 0x73, 0x63, - 0x61, 0x70, 0x65, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x6f, 0x67, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x7a, - 0x6f, 0x6e, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x49, 0x0a, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, - 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, - 0x66, 0x69, 0x6c, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x64, - 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x21, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x72, 0x61, - 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0d, 0x64, 0x72, 0x61, 0x69, - 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x4b, 0x0a, 0x14, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, - 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x13, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x75, - 0x74, 0x65, 0x78, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, - 0x25, 0x0a, 0x0e, 0x63, 0x70, 0x75, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, - 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x70, 0x75, 0x73, 0x65, 0x74, 0x54, - 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1c, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x1d, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x10, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x19, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, - 0x69, 0x6e, 0x65, 0x5f, 0x67, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, - 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, - 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x23, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x24, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x6f, 0x64, - 0x65, 0x22, 0x1b, 0x0a, 0x09, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, - 0x0a, 0x02, 0x76, 0x34, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x36, 0x10, 0x01, 0x22, 0x2d, - 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x65, 0x72, 0x76, 0x65, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x49, 0x6e, 0x69, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x10, 0x02, 0x22, 0x2b, 0x0a, - 0x0d, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0b, - 0x0a, 0x07, 0x47, 0x72, 0x61, 0x64, 0x75, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, - 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x10, 0x01, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, - 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x14, 0x10, 0x15, - 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x62, 0x6a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, - 0x6c, 0x65, 0x6e, 0x42, 0x3e, 0x0a, 0x21, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_server_info_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_server_info_proto_rawDescData = file_envoy_admin_v4alpha_server_info_proto_rawDesc -) - -func file_envoy_admin_v4alpha_server_info_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_server_info_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_server_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_server_info_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_server_info_proto_rawDescData -} - -var file_envoy_admin_v4alpha_server_info_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_envoy_admin_v4alpha_server_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_admin_v4alpha_server_info_proto_goTypes = []interface{}{ - (ServerInfo_State)(0), // 0: envoy.admin.v4alpha.ServerInfo.State - (CommandLineOptions_IpVersion)(0), // 1: envoy.admin.v4alpha.CommandLineOptions.IpVersion - (CommandLineOptions_Mode)(0), // 2: envoy.admin.v4alpha.CommandLineOptions.Mode - (CommandLineOptions_DrainStrategy)(0), // 3: envoy.admin.v4alpha.CommandLineOptions.DrainStrategy - (*ServerInfo)(nil), // 4: envoy.admin.v4alpha.ServerInfo - (*CommandLineOptions)(nil), // 5: envoy.admin.v4alpha.CommandLineOptions - (*duration.Duration)(nil), // 6: google.protobuf.Duration - (*v4alpha.Node)(nil), // 7: envoy.config.core.v4alpha.Node -} -var file_envoy_admin_v4alpha_server_info_proto_depIdxs = []int32{ - 0, // 0: envoy.admin.v4alpha.ServerInfo.state:type_name -> envoy.admin.v4alpha.ServerInfo.State - 6, // 1: envoy.admin.v4alpha.ServerInfo.uptime_current_epoch:type_name -> google.protobuf.Duration - 6, // 2: envoy.admin.v4alpha.ServerInfo.uptime_all_epochs:type_name -> google.protobuf.Duration - 5, // 3: envoy.admin.v4alpha.ServerInfo.command_line_options:type_name -> envoy.admin.v4alpha.CommandLineOptions - 7, // 4: envoy.admin.v4alpha.ServerInfo.node:type_name -> envoy.config.core.v4alpha.Node - 1, // 5: envoy.admin.v4alpha.CommandLineOptions.local_address_ip_version:type_name -> envoy.admin.v4alpha.CommandLineOptions.IpVersion - 6, // 6: envoy.admin.v4alpha.CommandLineOptions.file_flush_interval:type_name -> google.protobuf.Duration - 6, // 7: envoy.admin.v4alpha.CommandLineOptions.drain_time:type_name -> google.protobuf.Duration - 3, // 8: envoy.admin.v4alpha.CommandLineOptions.drain_strategy:type_name -> envoy.admin.v4alpha.CommandLineOptions.DrainStrategy - 6, // 9: envoy.admin.v4alpha.CommandLineOptions.parent_shutdown_time:type_name -> google.protobuf.Duration - 2, // 10: envoy.admin.v4alpha.CommandLineOptions.mode:type_name -> envoy.admin.v4alpha.CommandLineOptions.Mode - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_server_info_proto_init() } -func file_envoy_admin_v4alpha_server_info_proto_init() { - if File_envoy_admin_v4alpha_server_info_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_server_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_admin_v4alpha_server_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandLineOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_server_info_proto_rawDesc, - NumEnums: 4, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_server_info_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_server_info_proto_depIdxs, - EnumInfos: file_envoy_admin_v4alpha_server_info_proto_enumTypes, - MessageInfos: file_envoy_admin_v4alpha_server_info_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_server_info_proto = out.File - file_envoy_admin_v4alpha_server_info_proto_rawDesc = nil - file_envoy_admin_v4alpha_server_info_proto_goTypes = nil - file_envoy_admin_v4alpha_server_info_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/server_info.pb.validate.go b/pkg/api/envoy/admin/v4alpha/server_info.pb.validate.go deleted file mode 100644 index 9433e4cf21..0000000000 --- a/pkg/api/envoy/admin/v4alpha/server_info.pb.validate.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/server_info.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on ServerInfo with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *ServerInfo) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Version - - // no validation rules for State - - if v, ok := interface{}(m.GetUptimeCurrentEpoch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ServerInfoValidationError{ - field: "UptimeCurrentEpoch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetUptimeAllEpochs()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ServerInfoValidationError{ - field: "UptimeAllEpochs", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for HotRestartVersion - - if v, ok := interface{}(m.GetCommandLineOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ServerInfoValidationError{ - field: "CommandLineOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ServerInfoValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ServerInfoValidationError is the validation error returned by -// ServerInfo.Validate if the designated constraints aren't met. -type ServerInfoValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ServerInfoValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ServerInfoValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ServerInfoValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ServerInfoValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ServerInfoValidationError) ErrorName() string { return "ServerInfoValidationError" } - -// Error satisfies the builtin error interface -func (e ServerInfoValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sServerInfo.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ServerInfoValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ServerInfoValidationError{} - -// Validate checks the field values on CommandLineOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CommandLineOptions) Validate() error { - if m == nil { - return nil - } - - // no validation rules for BaseId - - // no validation rules for UseDynamicBaseId - - // no validation rules for BaseIdPath - - // no validation rules for Concurrency - - // no validation rules for ConfigPath - - // no validation rules for ConfigYaml - - // no validation rules for AllowUnknownStaticFields - - // no validation rules for RejectUnknownDynamicFields - - // no validation rules for IgnoreUnknownDynamicFields - - // no validation rules for AdminAddressPath - - // no validation rules for LocalAddressIpVersion - - // no validation rules for LogLevel - - // no validation rules for ComponentLogLevel - - // no validation rules for LogFormat - - // no validation rules for LogFormatEscaped - - // no validation rules for LogPath - - // no validation rules for ServiceCluster - - // no validation rules for ServiceNode - - // no validation rules for ServiceZone - - if v, ok := interface{}(m.GetFileFlushInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommandLineOptionsValidationError{ - field: "FileFlushInterval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetDrainTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommandLineOptionsValidationError{ - field: "DrainTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DrainStrategy - - if v, ok := interface{}(m.GetParentShutdownTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommandLineOptionsValidationError{ - field: "ParentShutdownTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Mode - - // no validation rules for DisableHotRestart - - // no validation rules for EnableMutexTracing - - // no validation rules for RestartEpoch - - // no validation rules for CpusetThreads - - // no validation rules for BootstrapVersion - - // no validation rules for EnableFineGrainLogging - - // no validation rules for SocketPath - - // no validation rules for SocketMode - - return nil -} - -// CommandLineOptionsValidationError is the validation error returned by -// CommandLineOptions.Validate if the designated constraints aren't met. -type CommandLineOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommandLineOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommandLineOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommandLineOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommandLineOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommandLineOptionsValidationError) ErrorName() string { - return "CommandLineOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e CommandLineOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommandLineOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommandLineOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommandLineOptionsValidationError{} diff --git a/pkg/api/envoy/admin/v4alpha/tap.pb.go b/pkg/api/envoy/admin/v4alpha/tap.pb.go deleted file mode 100644 index b116122aa8..0000000000 --- a/pkg/api/envoy/admin/v4alpha/tap.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/admin/v4alpha/tap.proto - -package envoy_admin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/tap/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// The /tap admin request body that is used to configure an active tap session. -type TapRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The opaque configuration ID used to match the configuration to a loaded extension. - // A tap extension configures a similar opaque ID that is used to match. - ConfigId string `protobuf:"bytes,1,opt,name=config_id,json=configId,proto3" json:"config_id,omitempty"` - // The tap configuration to load. - TapConfig *v4alpha.TapConfig `protobuf:"bytes,2,opt,name=tap_config,json=tapConfig,proto3" json:"tap_config,omitempty"` -} - -func (x *TapRequest) Reset() { - *x = TapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_admin_v4alpha_tap_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TapRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TapRequest) ProtoMessage() {} - -func (x *TapRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_admin_v4alpha_tap_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TapRequest.ProtoReflect.Descriptor instead. -func (*TapRequest) Descriptor() ([]byte, []int) { - return file_envoy_admin_v4alpha_tap_proto_rawDescGZIP(), []int{0} -} - -func (x *TapRequest) GetConfigId() string { - if x != nil { - return x.ConfigId - } - return "" -} - -func (x *TapRequest) GetTapConfig() *v4alpha.TapConfig { - if x != nil { - return x.TapConfig - } - return nil -} - -var File_envoy_admin_v4alpha_tap_proto protoreflect.FileDescriptor - -var file_envoy_admin_v4alpha_tap_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0a, 0x74, - 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, - 0x74, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, - 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x37, 0x0a, 0x21, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_admin_v4alpha_tap_proto_rawDescOnce sync.Once - file_envoy_admin_v4alpha_tap_proto_rawDescData = file_envoy_admin_v4alpha_tap_proto_rawDesc -) - -func file_envoy_admin_v4alpha_tap_proto_rawDescGZIP() []byte { - file_envoy_admin_v4alpha_tap_proto_rawDescOnce.Do(func() { - file_envoy_admin_v4alpha_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v4alpha_tap_proto_rawDescData) - }) - return file_envoy_admin_v4alpha_tap_proto_rawDescData -} - -var file_envoy_admin_v4alpha_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_admin_v4alpha_tap_proto_goTypes = []interface{}{ - (*TapRequest)(nil), // 0: envoy.admin.v4alpha.TapRequest - (*v4alpha.TapConfig)(nil), // 1: envoy.config.tap.v4alpha.TapConfig -} -var file_envoy_admin_v4alpha_tap_proto_depIdxs = []int32{ - 1, // 0: envoy.admin.v4alpha.TapRequest.tap_config:type_name -> envoy.config.tap.v4alpha.TapConfig - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_admin_v4alpha_tap_proto_init() } -func file_envoy_admin_v4alpha_tap_proto_init() { - if File_envoy_admin_v4alpha_tap_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_admin_v4alpha_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_admin_v4alpha_tap_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_admin_v4alpha_tap_proto_goTypes, - DependencyIndexes: file_envoy_admin_v4alpha_tap_proto_depIdxs, - MessageInfos: file_envoy_admin_v4alpha_tap_proto_msgTypes, - }.Build() - File_envoy_admin_v4alpha_tap_proto = out.File - file_envoy_admin_v4alpha_tap_proto_rawDesc = nil - file_envoy_admin_v4alpha_tap_proto_goTypes = nil - file_envoy_admin_v4alpha_tap_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/admin/v4alpha/tap.pb.validate.go b/pkg/api/envoy/admin/v4alpha/tap.pb.validate.go deleted file mode 100644 index 3c29a714fc..0000000000 --- a/pkg/api/envoy/admin/v4alpha/tap.pb.validate.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/admin/v4alpha/tap.proto - -package envoy_admin_v4alpha - -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{} -) - -// Validate checks the field values on TapRequest with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *TapRequest) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetConfigId()) < 1 { - return TapRequestValidationError{ - field: "ConfigId", - reason: "value length must be at least 1 runes", - } - } - - if m.GetTapConfig() == nil { - return TapRequestValidationError{ - field: "TapConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetTapConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapRequestValidationError{ - field: "TapConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// TapRequestValidationError is the validation error returned by -// TapRequest.Validate if the designated constraints aren't met. -type TapRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TapRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TapRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TapRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TapRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TapRequestValidationError) ErrorName() string { return "TapRequestValidationError" } - -// Error satisfies the builtin error interface -func (e TapRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTapRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TapRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TapRequestValidationError{} diff --git a/pkg/api/envoy/annotations/deprecation.pb.go b/pkg/api/envoy/annotations/deprecation.pb.go index b8411b21b3..0c6b50a20f 100644 --- a/pkg/api/envoy/annotations/deprecation.pb.go +++ b/pkg/api/envoy/annotations/deprecation.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/annotations/deprecation.proto -package envoy_annotations +package annotations import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var file_envoy_annotations_deprecation_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FieldOptions)(nil), @@ -34,6 +29,14 @@ var file_envoy_annotations_deprecation_proto_extTypes = []protoimpl.ExtensionInf Tag: "varint,189503207,opt,name=disallowed_by_default", Filename: "envoy/annotations/deprecation.proto", }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 157299826, + Name: "envoy.annotations.deprecated_at_minor_version", + Tag: "bytes,157299826,opt,name=deprecated_at_minor_version", + Filename: "envoy/annotations/deprecation.proto", + }, { ExtendedType: (*descriptorpb.EnumValueOptions)(nil), ExtensionType: (*bool)(nil), @@ -42,18 +45,36 @@ var file_envoy_annotations_deprecation_proto_extTypes = []protoimpl.ExtensionInf Tag: "varint,70100853,opt,name=disallowed_by_default_enum", Filename: "envoy/annotations/deprecation.proto", }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*string)(nil), + Field: 181198657, + Name: "envoy.annotations.deprecated_at_minor_version_enum", + Tag: "bytes,181198657,opt,name=deprecated_at_minor_version_enum", + Filename: "envoy/annotations/deprecation.proto", + }, } // Extension fields to descriptorpb.FieldOptions. var ( // optional bool disallowed_by_default = 189503207; E_DisallowedByDefault = &file_envoy_annotations_deprecation_proto_extTypes[0] + // The API major and minor version on which the field was deprecated + // (e.g., "3.5" for major version 3 and minor version 5). + // + // optional string deprecated_at_minor_version = 157299826; + E_DeprecatedAtMinorVersion = &file_envoy_annotations_deprecation_proto_extTypes[1] ) // Extension fields to descriptorpb.EnumValueOptions. var ( // optional bool disallowed_by_default_enum = 70100853; - E_DisallowedByDefaultEnum = &file_envoy_annotations_deprecation_proto_extTypes[1] + E_DisallowedByDefaultEnum = &file_envoy_annotations_deprecation_proto_extTypes[2] + // The API major and minor version on which the enum value was deprecated + // (e.g., "3.5" for major version 3 and minor version 5). + // + // optional string deprecated_at_minor_version_enum = 181198657; + E_DeprecatedAtMinorVersionEnum = &file_envoy_annotations_deprecation_proto_extTypes[3] ) var File_envoy_annotations_deprecation_proto protoreflect.FileDescriptor @@ -70,13 +91,30 @@ var file_envoy_annotations_deprecation_proto_rawDesc = []byte{ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe7, 0xad, 0xae, 0x5a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x3a, 0x61, 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x62, - 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x21, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0xf5, 0xce, 0xb6, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x64, 0x69, 0x73, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, - 0x6e, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x3a, 0x5f, 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf2, + 0xe8, 0x80, 0x4b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x3a, 0x61, 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, + 0x62, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, + 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0xf5, 0xce, 0xb6, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x64, 0x69, 0x73, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x6c, 0x0a, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0xbe, 0xb3, 0x56, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, + 0x75, 0x6d, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_annotations_deprecation_proto_goTypes = []interface{}{ @@ -85,11 +123,13 @@ var file_envoy_annotations_deprecation_proto_goTypes = []interface{}{ } var file_envoy_annotations_deprecation_proto_depIdxs = []int32{ 0, // 0: envoy.annotations.disallowed_by_default:extendee -> google.protobuf.FieldOptions - 1, // 1: envoy.annotations.disallowed_by_default_enum:extendee -> google.protobuf.EnumValueOptions - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 0, // [0:2] is the sub-list for extension extendee + 0, // 1: envoy.annotations.deprecated_at_minor_version:extendee -> google.protobuf.FieldOptions + 1, // 2: envoy.annotations.disallowed_by_default_enum:extendee -> google.protobuf.EnumValueOptions + 1, // 3: envoy.annotations.deprecated_at_minor_version_enum:extendee -> google.protobuf.EnumValueOptions + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 0, // [0:4] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } @@ -105,7 +145,7 @@ func file_envoy_annotations_deprecation_proto_init() { RawDescriptor: file_envoy_annotations_deprecation_proto_rawDesc, NumEnums: 0, NumMessages: 0, - NumExtensions: 2, + NumExtensions: 4, NumServices: 0, }, GoTypes: file_envoy_annotations_deprecation_proto_goTypes, diff --git a/pkg/api/envoy/annotations/deprecation.pb.validate.go b/pkg/api/envoy/annotations/deprecation.pb.validate.go index 4cf2a75e45..2452fcdd6e 100644 --- a/pkg/api/envoy/annotations/deprecation.pb.validate.go +++ b/pkg/api/envoy/annotations/deprecation.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/annotations/deprecation.proto -package envoy_annotations +package annotations import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/annotations/resource.pb.go b/pkg/api/envoy/annotations/resource.pb.go index e8f14159a7..420543e17e 100644 --- a/pkg/api/envoy/annotations/resource.pb.go +++ b/pkg/api/envoy/annotations/resource.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/annotations/resource.proto -package envoy_annotations +package annotations import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ResourceAnnotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -109,7 +104,11 @@ var file_envoy_annotations_resource_proto_rawDesc = []byte{ 0xe4, 0xb2, 0x7e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/annotations/resource.pb.validate.go b/pkg/api/envoy/annotations/resource.pb.validate.go index eddbddff7b..05dc789682 100644 --- a/pkg/api/envoy/annotations/resource.pb.validate.go +++ b/pkg/api/envoy/annotations/resource.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/annotations/resource.proto -package envoy_annotations +package annotations import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,58 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ResourceAnnotation with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ResourceAnnotation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResourceAnnotation with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResourceAnnotationMultiError, or nil if none found. +func (m *ResourceAnnotation) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceAnnotation) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Type + if len(errors) > 0 { + return ResourceAnnotationMultiError(errors) + } + return nil } +// ResourceAnnotationMultiError is an error wrapping multiple validation errors +// returned by ResourceAnnotation.ValidateAll() if the designated constraints +// aren't met. +type ResourceAnnotationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceAnnotationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceAnnotationMultiError) AllErrors() []error { return m } + // ResourceAnnotationValidationError is the validation error returned by // ResourceAnnotation.Validate if the designated constraints aren't met. type ResourceAnnotationValidationError struct { diff --git a/pkg/api/envoy/api/v2/auth/cert.pb.go b/pkg/api/envoy/api/v2/auth/cert.pb.go index 0fd8fe4169..055d7cc5fa 100644 --- a/pkg/api/envoy/api/v2/auth/cert.pb.go +++ b/pkg/api/envoy/api/v2/auth/cert.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/auth/cert.proto -package envoy_api_v2_auth +package auth import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_api_v2_auth_cert_proto protoreflect.FileDescriptor var file_envoy_api_v2_auth_cert_proto_rawDesc = []byte{ @@ -33,21 +28,23 @@ var file_envoy_api_v2_auth_cert_proto_rawDesc = []byte{ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x5f, 0x0a, - 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x42, 0x09, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, - 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x50, 0x02, - 0x50, 0x03, 0x50, 0x04, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x99, + 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x42, 0x09, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, + 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x50, 0x01, 0x50, 0x02, 0x50, 0x03, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_api_v2_auth_cert_proto_goTypes = []interface{}{} diff --git a/pkg/api/envoy/api/v2/auth/cert.pb.validate.go b/pkg/api/envoy/api/v2/auth/cert.pb.validate.go index 50607b86ed..334ff39864 100644 --- a/pkg/api/envoy/api/v2/auth/cert.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_auth +package auth import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/api/v2/auth/common.pb.go b/pkg/api/envoy/api/v2/auth/common.pb.go index ed3f0951ac..87df8d71fc 100644 --- a/pkg/api/envoy/api/v2/auth/common.pb.go +++ b/pkg/api/envoy/api/v2/auth/common.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/auth/common.proto -package envoy_api_v2_auth +package auth import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "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" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type TlsParameters_TlsProtocol int32 const ( @@ -148,8 +143,7 @@ type TlsParameters struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for - // servers. + // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for both clients and servers. 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_2`` for clients and ``TLSv1_3`` for // servers. @@ -926,14 +920,17 @@ var file_envoy_api_v2_auth_common_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x5f, 0x54, 0x52, 0x55, 0x53, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x55, 0x4e, 0x54, 0x52, 0x55, 0x53, 0x54, 0x45, 0x44, - 0x10, 0x01, 0x42, 0x69, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x10, 0x01, 0x42, 0xa3, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, + 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/auth/common.pb.validate.go b/pkg/api/envoy/api/v2/auth/common.pb.validate.go index 0e640fa29c..fa6c1f45ab 100644 --- a/pkg/api/envoy/api/v2/auth/common.pb.validate.go +++ b/pkg/api/envoy/api/v2/auth/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/auth/common.proto -package envoy_api_v2_auth +package auth import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TlsParameters) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsParameters with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TlsParametersMultiError, or +// nil if none found. +func (m *TlsParameters) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsParameters) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMinimumProtocolVersion())]; !ok { - return TlsParametersValidationError{ + err := TlsParametersValidationError{ field: "TlsMinimumProtocolVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMaximumProtocolVersion())]; !ok { - return TlsParametersValidationError{ + err := TlsParametersValidationError{ field: "TlsMaximumProtocolVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return TlsParametersMultiError(errors) } return nil } +// TlsParametersMultiError is an error wrapping multiple validation errors +// returned by TlsParameters.ValidateAll() if the designated constraints +// aren't met. +type TlsParametersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsParametersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsParametersMultiError) AllErrors() []error { return m } + // TlsParametersValidationError is the validation error returned by // TlsParameters.Validate if the designated constraints aren't met. type TlsParametersValidationError struct { @@ -114,24 +159,61 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *PrivateKeyProvider) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PrivateKeyProvider with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PrivateKeyProviderMultiError, or nil if none found. +func (m *PrivateKeyProvider) ValidateAll() error { + return m.validate(true) +} + +func (m *PrivateKeyProvider) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetProviderName()) < 1 { - return PrivateKeyProviderValidationError{ + err := PrivateKeyProviderValidationError{ field: "ProviderName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *PrivateKeyProvider_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrivateKeyProviderValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrivateKeyProviderValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrivateKeyProviderValidationError{ field: "Config", @@ -143,7 +225,26 @@ func (m *PrivateKeyProvider) Validate() error { case *PrivateKeyProvider_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrivateKeyProviderValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrivateKeyProviderValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrivateKeyProviderValidationError{ field: "TypedConfig", @@ -155,9 +256,30 @@ func (m *PrivateKeyProvider) Validate() error { } + if len(errors) > 0 { + return PrivateKeyProviderMultiError(errors) + } + return nil } +// PrivateKeyProviderMultiError is an error wrapping multiple validation errors +// returned by PrivateKeyProvider.ValidateAll() if the designated constraints +// aren't met. +type PrivateKeyProviderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PrivateKeyProviderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PrivateKeyProviderMultiError) AllErrors() []error { return m } + // PrivateKeyProviderValidationError is the validation error returned by // PrivateKeyProvider.Validate if the designated constraints aren't met. type PrivateKeyProviderValidationError struct { @@ -215,14 +337,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TlsCertificate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsCertificate with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TlsCertificateMultiError, +// or nil if none found. +func (m *TlsCertificate) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsCertificate) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCertificateChain()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCertificateChain()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "CertificateChain", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "CertificateChain", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCertificateChain()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "CertificateChain", @@ -232,7 +387,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrivateKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "PrivateKey", @@ -242,7 +416,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetPrivateKeyProvider()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrivateKeyProvider()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKeyProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKeyProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrivateKeyProvider()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "PrivateKeyProvider", @@ -252,7 +445,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetPassword()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "Password", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "Password", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPassword()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "Password", @@ -262,7 +474,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetOcspStaple()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOcspStaple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "OcspStaple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "OcspStaple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOcspStaple()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "OcspStaple", @@ -275,7 +506,26 @@ func (m *TlsCertificate) Validate() error { for idx, item := range m.GetSignedCertificateTimestamp() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), @@ -287,9 +537,30 @@ func (m *TlsCertificate) Validate() error { } + if len(errors) > 0 { + return TlsCertificateMultiError(errors) + } + return nil } +// TlsCertificateMultiError is an error wrapping multiple validation errors +// returned by TlsCertificate.ValidateAll() if the designated constraints +// aren't met. +type TlsCertificateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsCertificateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsCertificateMultiError) AllErrors() []error { return m } + // TlsCertificateValidationError is the validation error returned by // TlsCertificate.Validate if the designated constraints aren't met. type TlsCertificateValidationError struct { @@ -346,23 +617,60 @@ var _ interface { // Validate checks the field values on TlsSessionTicketKeys with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TlsSessionTicketKeys) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsSessionTicketKeys with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TlsSessionTicketKeysMultiError, or nil if none found. +func (m *TlsSessionTicketKeys) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsSessionTicketKeys) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetKeys()) < 1 { - return TlsSessionTicketKeysValidationError{ + err := TlsSessionTicketKeysValidationError{ field: "Keys", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetKeys() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsSessionTicketKeysValidationError{ + field: fmt.Sprintf("Keys[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsSessionTicketKeysValidationError{ + field: fmt.Sprintf("Keys[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsSessionTicketKeysValidationError{ field: fmt.Sprintf("Keys[%v]", idx), @@ -374,9 +682,30 @@ func (m *TlsSessionTicketKeys) Validate() error { } + if len(errors) > 0 { + return TlsSessionTicketKeysMultiError(errors) + } + return nil } +// TlsSessionTicketKeysMultiError is an error wrapping multiple validation +// errors returned by TlsSessionTicketKeys.ValidateAll() if the designated +// constraints aren't met. +type TlsSessionTicketKeysMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsSessionTicketKeysMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsSessionTicketKeysMultiError) AllErrors() []error { return m } + // TlsSessionTicketKeysValidationError is the validation error returned by // TlsSessionTicketKeys.Validate if the designated constraints aren't met. type TlsSessionTicketKeysValidationError struct { @@ -435,13 +764,46 @@ var _ interface { // Validate checks the field values on CertificateValidationContext with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CertificateValidationContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateValidationContext with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CertificateValidationContextMultiError, or nil if none found. +func (m *CertificateValidationContext) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateValidationContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTrustedCa()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTrustedCa()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "TrustedCa", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "TrustedCa", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrustedCa()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "TrustedCa", @@ -455,10 +817,14 @@ func (m *CertificateValidationContext) Validate() error { _, _ = idx, item if len(item) != 44 { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), reason: "value length must be 44 bytes", } + if !all { + return err + } + errors = append(errors, err) } } @@ -467,10 +833,14 @@ func (m *CertificateValidationContext) Validate() error { _, _ = idx, item if l := len(item); l < 64 || l > 95 { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), reason: "value length must be between 64 and 95 bytes, inclusive", } + if !all { + return err + } + errors = append(errors, err) } } @@ -478,7 +848,26 @@ func (m *CertificateValidationContext) Validate() error { for idx, item := range m.GetMatchSubjectAltNames() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), @@ -490,7 +879,26 @@ func (m *CertificateValidationContext) Validate() error { } - if v, ok := interface{}(m.GetRequireOcspStaple()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequireOcspStaple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "RequireOcspStaple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "RequireOcspStaple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequireOcspStaple()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "RequireOcspStaple", @@ -500,7 +908,26 @@ func (m *CertificateValidationContext) Validate() error { } } - if v, ok := interface{}(m.GetRequireSignedCertificateTimestamp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequireSignedCertificateTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "RequireSignedCertificateTimestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "RequireSignedCertificateTimestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequireSignedCertificateTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "RequireSignedCertificateTimestamp", @@ -510,7 +937,26 @@ func (m *CertificateValidationContext) Validate() error { } } - if v, ok := interface{}(m.GetCrl()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCrl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "Crl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "Crl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCrl()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "Crl", @@ -523,15 +969,40 @@ func (m *CertificateValidationContext) Validate() error { // no validation rules for AllowExpiredCertificate if _, ok := CertificateValidationContext_TrustChainVerification_name[int32(m.GetTrustChainVerification())]; !ok { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: "TrustChainVerification", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return CertificateValidationContextMultiError(errors) } return nil } +// CertificateValidationContextMultiError is an error wrapping multiple +// validation errors returned by CertificateValidationContext.ValidateAll() if +// the designated constraints aren't met. +type CertificateValidationContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateValidationContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateValidationContextMultiError) AllErrors() []error { return m } + // CertificateValidationContextValidationError is the validation error returned // by CertificateValidationContext.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/api/v2/auth/secret.pb.go b/pkg/api/envoy/api/v2/auth/secret.pb.go index 4ad1212a7e..55f142f4f2 100644 --- a/pkg/api/envoy/api/v2/auth/secret.pb.go +++ b/pkg/api/envoy/api/v2/auth/secret.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/auth/secret.proto -package envoy_api_v2_auth +package auth import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type GenericSecret struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -304,14 +299,18 @@ var file_envoy_api_v2_auth_secret_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x69, 0x0a, - 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x42, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0xa3, 0x01, + 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x42, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, + 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/auth/secret.pb.validate.go b/pkg/api/envoy/api/v2/auth/secret.pb.validate.go index 457d9b5f76..e175f7cfd5 100644 --- a/pkg/api/envoy/api/v2/auth/secret.pb.validate.go +++ b/pkg/api/envoy/api/v2/auth/secret.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/auth/secret.proto -package envoy_api_v2_auth +package auth import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GenericSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GenericSecret with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GenericSecretMultiError, or +// nil if none found. +func (m *GenericSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *GenericSecret) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GenericSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GenericSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GenericSecretValidationError{ field: "Secret", @@ -51,9 +86,30 @@ func (m *GenericSecret) Validate() error { } } + if len(errors) > 0 { + return GenericSecretMultiError(errors) + } + return nil } +// GenericSecretMultiError is an error wrapping multiple validation errors +// returned by GenericSecret.ValidateAll() if the designated constraints +// aren't met. +type GenericSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GenericSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GenericSecretMultiError) AllErrors() []error { return m } + // GenericSecretValidationError is the validation error returned by // GenericSecret.Validate if the designated constraints aren't met. type GenericSecretValidationError struct { @@ -109,16 +165,49 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SdsSecretConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SdsSecretConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SdsSecretConfigMultiError, or nil if none found. +func (m *SdsSecretConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SdsSecretConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetSdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SdsSecretConfigValidationError{ + field: "SdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SdsSecretConfigValidationError{ + field: "SdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SdsSecretConfigValidationError{ field: "SdsConfig", @@ -128,9 +217,30 @@ func (m *SdsSecretConfig) Validate() error { } } + if len(errors) > 0 { + return SdsSecretConfigMultiError(errors) + } + return nil } +// SdsSecretConfigMultiError is an error wrapping multiple validation errors +// returned by SdsSecretConfig.ValidateAll() if the designated constraints +// aren't met. +type SdsSecretConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SdsSecretConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SdsSecretConfigMultiError) AllErrors() []error { return m } + // SdsSecretConfigValidationError is the validation error returned by // SdsSecretConfig.Validate if the designated constraints aren't met. type SdsSecretConfigValidationError struct { @@ -186,19 +296,52 @@ var _ interface { } = SdsSecretConfigValidationError{} // Validate checks the field values on Secret with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Secret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Secret with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in SecretMultiError, or nil if none found. +func (m *Secret) ValidateAll() error { + return m.validate(true) +} + +func (m *Secret) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.Type.(type) { case *Secret_TlsCertificate: - if v, ok := interface{}(m.GetTlsCertificate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsCertificate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "TlsCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "TlsCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCertificate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "TlsCertificate", @@ -210,7 +353,26 @@ func (m *Secret) Validate() error { case *Secret_SessionTicketKeys: - if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSessionTicketKeys()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "SessionTicketKeys", @@ -222,7 +384,26 @@ func (m *Secret) Validate() error { case *Secret_ValidationContext: - if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "ValidationContext", @@ -234,7 +415,26 @@ func (m *Secret) Validate() error { case *Secret_GenericSecret: - if v, ok := interface{}(m.GetGenericSecret()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGenericSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "GenericSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "GenericSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGenericSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "GenericSecret", @@ -246,9 +446,29 @@ func (m *Secret) Validate() error { } + if len(errors) > 0 { + return SecretMultiError(errors) + } + return nil } +// SecretMultiError is an error wrapping multiple validation errors returned by +// Secret.ValidateAll() if the designated constraints aren't met. +type SecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretMultiError) AllErrors() []error { return m } + // SecretValidationError is the validation error returned by Secret.Validate if // the designated constraints aren't met. type SecretValidationError struct { diff --git a/pkg/api/envoy/api/v2/auth/tls.pb.go b/pkg/api/envoy/api/v2/auth/tls.pb.go index 5f6f17231a..6efcc07e52 100644 --- a/pkg/api/envoy/api/v2/auth/tls.pb.go +++ b/pkg/api/envoy/api/v2/auth/tls.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/auth/tls.proto -package envoy_api_v2_auth +package auth import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type UpstreamTlsContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -136,10 +131,9 @@ type DownstreamTlsContext struct { // *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig // *DownstreamTlsContext_DisableStatelessSessionResumption SessionTicketKeysType isDownstreamTlsContext_SessionTicketKeysType `protobuf_oneof:"session_ticket_keys_type"` - // If specified, session_timeout will change maximum lifetime (in seconds) of TLS session - // Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) - // ` - // only seconds could be specified (fractional seconds are going to be ignored). + // If specified, ``session_timeout`` will change the maximum lifetime (in seconds) of the TLS session. + // Currently this value is used as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_. + // Only seconds can be specified (fractional seconds are ignored). SessionTimeout *duration.Duration `protobuf:"bytes,6,opt,name=session_timeout,json=sessionTimeout,proto3" json:"session_timeout,omitempty"` } @@ -617,14 +611,18 @@ var file_envoy_api_v2_auth_tls_proto_rawDesc = []byte{ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x19, 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0x66, 0x0a, 0x1f, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x42, - 0x08, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0xa0, 0x01, 0x0a, + 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x42, 0x08, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/auth/tls.pb.validate.go b/pkg/api/envoy/api/v2/auth/tls.pb.validate.go index c1014af797..66a7b7658a 100644 --- a/pkg/api/envoy/api/v2/auth/tls.pb.validate.go +++ b/pkg/api/envoy/api/v2/auth/tls.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/auth/tls.proto -package envoy_api_v2_auth +package auth import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on UpstreamTlsContext with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamTlsContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamTlsContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamTlsContextMultiError, or nil if none found. +func (m *UpstreamTlsContext) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamTlsContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "CommonTlsContext", @@ -52,15 +87,38 @@ func (m *UpstreamTlsContext) Validate() error { } if len(m.GetSni()) > 255 { - return UpstreamTlsContextValidationError{ + err := UpstreamTlsContextValidationError{ field: "Sni", reason: "value length must be at most 255 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AllowRenegotiation - if v, ok := interface{}(m.GetMaxSessionKeys()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxSessionKeys()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "MaxSessionKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "MaxSessionKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxSessionKeys()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "MaxSessionKeys", @@ -70,9 +128,30 @@ func (m *UpstreamTlsContext) Validate() error { } } + if len(errors) > 0 { + return UpstreamTlsContextMultiError(errors) + } + return nil } +// UpstreamTlsContextMultiError is an error wrapping multiple validation errors +// returned by UpstreamTlsContext.ValidateAll() if the designated constraints +// aren't met. +type UpstreamTlsContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamTlsContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamTlsContextMultiError) AllErrors() []error { return m } + // UpstreamTlsContextValidationError is the validation error returned by // UpstreamTlsContext.Validate if the designated constraints aren't met. type UpstreamTlsContextValidationError struct { @@ -131,13 +210,46 @@ var _ interface { // Validate checks the field values on DownstreamTlsContext with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DownstreamTlsContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DownstreamTlsContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DownstreamTlsContextMultiError, or nil if none found. +func (m *DownstreamTlsContext) ValidateAll() error { + return m.validate(true) +} + +func (m *DownstreamTlsContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "CommonTlsContext", @@ -147,7 +259,26 @@ func (m *DownstreamTlsContext) Validate() error { } } - if v, ok := interface{}(m.GetRequireClientCertificate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequireClientCertificate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireClientCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireClientCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequireClientCertificate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireClientCertificate", @@ -157,7 +288,26 @@ func (m *DownstreamTlsContext) Validate() error { } } - if v, ok := interface{}(m.GetRequireSni()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequireSni()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireSni", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireSni", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequireSni()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireSni", @@ -168,32 +318,60 @@ func (m *DownstreamTlsContext) Validate() error { } if d := m.GetSessionTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DownstreamTlsContextValidationError{ + err = DownstreamTlsContextValidationError{ field: "SessionTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - lt := time.Duration(4294967296*time.Second + 0*time.Nanosecond) - gte := time.Duration(0*time.Second + 0*time.Nanosecond) + 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)", + if dur < gte || dur >= lt { + err := DownstreamTlsContextValidationError{ + field: "SessionTimeout", + reason: "value must be inside range [0s, 1193046h28m16s)", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } switch m.SessionTicketKeysType.(type) { case *DownstreamTlsContext_SessionTicketKeys: - if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSessionTicketKeys()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeys", @@ -205,7 +383,26 @@ func (m *DownstreamTlsContext) Validate() error { case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: - if v, ok := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeysSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeysSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeysSdsSecretConfig", @@ -220,9 +417,30 @@ func (m *DownstreamTlsContext) Validate() error { } + if len(errors) > 0 { + return DownstreamTlsContextMultiError(errors) + } + return nil } +// DownstreamTlsContextMultiError is an error wrapping multiple validation +// errors returned by DownstreamTlsContext.ValidateAll() if the designated +// constraints aren't met. +type DownstreamTlsContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DownstreamTlsContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DownstreamTlsContextMultiError) AllErrors() []error { return m } + // DownstreamTlsContextValidationError is the validation error returned by // DownstreamTlsContext.Validate if the designated constraints aren't met. type DownstreamTlsContextValidationError struct { @@ -280,14 +498,47 @@ var _ interface { } = DownstreamTlsContextValidationError{} // Validate checks the field values on CommonTlsContext with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CommonTlsContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonTlsContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonTlsContextMultiError, or nil if none found. +func (m *CommonTlsContext) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonTlsContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTlsParams()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTlsParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsParams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "TlsParams", @@ -300,7 +551,26 @@ func (m *CommonTlsContext) Validate() error { for idx, item := range m.GetTlsCertificates() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: fmt.Sprintf("TlsCertificates[%v]", idx), @@ -313,16 +583,39 @@ func (m *CommonTlsContext) Validate() error { } if len(m.GetTlsCertificateSdsSecretConfigs()) > 1 { - return CommonTlsContextValidationError{ + err := CommonTlsContextValidationError{ field: "TlsCertificateSdsSecretConfigs", reason: "value must contain no more than 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetTlsCertificateSdsSecretConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), @@ -338,7 +631,26 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_ValidationContext: - if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "ValidationContext", @@ -350,7 +662,26 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_ValidationContextSdsSecretConfig: - if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "ValidationContextSdsSecretConfig", @@ -362,7 +693,26 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_CombinedValidationContext: - if v, ok := interface{}(m.GetCombinedValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCombinedValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "CombinedValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "CombinedValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCombinedValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "CombinedValidationContext", @@ -374,9 +724,30 @@ func (m *CommonTlsContext) Validate() error { } + if len(errors) > 0 { + return CommonTlsContextMultiError(errors) + } + return nil } +// CommonTlsContextMultiError is an error wrapping multiple validation errors +// returned by CommonTlsContext.ValidateAll() if the designated constraints +// aren't met. +type CommonTlsContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonTlsContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonTlsContextMultiError) AllErrors() []error { return m } + // CommonTlsContextValidationError is the validation error returned by // CommonTlsContext.Validate if the designated constraints aren't met. type CommonTlsContextValidationError struct { @@ -434,20 +805,59 @@ var _ interface { // Validate checks the field values on // CommonTlsContext_CombinedCertificateValidationContext with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// CommonTlsContext_CombinedCertificateValidationContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonTlsContext_CombinedCertificateValidationContextMultiError, or nil if +// none found. +func (m *CommonTlsContext_CombinedCertificateValidationContext) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonTlsContext_CombinedCertificateValidationContext) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDefaultValidationContext() == nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ + err := CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "DefaultValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "DefaultValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", @@ -458,13 +868,36 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } if m.GetValidationContextSdsSecretConfig() == nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ + err := CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", @@ -474,9 +907,33 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } } + if len(errors) > 0 { + return CommonTlsContext_CombinedCertificateValidationContextMultiError(errors) + } + return nil } +// CommonTlsContext_CombinedCertificateValidationContextMultiError is an error +// wrapping multiple validation errors returned by +// CommonTlsContext_CombinedCertificateValidationContext.ValidateAll() if the +// designated constraints aren't met. +type CommonTlsContext_CombinedCertificateValidationContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) AllErrors() []error { + return m +} + // CommonTlsContext_CombinedCertificateValidationContextValidationError is the // validation error returned by // CommonTlsContext_CombinedCertificateValidationContext.Validate if the diff --git a/pkg/api/envoy/api/v2/cds.pb.go b/pkg/api/envoy/api/v2/cds.pb.go index e0acb18007..4e20807ef6 100644 --- a/pkg/api/envoy/api/v2/cds.pb.go +++ b/pkg/api/envoy/api/v2/cds.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/cds.proto -package envoy_api_v2 +package apiv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type CdsDummy struct { @@ -112,13 +107,17 @@ var file_envoy_api_v2_cds_proto_rawDesc = []byte{ 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x1c, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x16, 0x0a, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x53, 0x0a, 0x1a, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x43, 0x64, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x8e, 0x01, 0x0a, 0x1a, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x43, 0x64, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/cds.pb.validate.go b/pkg/api/envoy/api/v2/cds.pb.validate.go index 723aacab94..9589430e41 100644 --- a/pkg/api/envoy/api/v2/cds.pb.validate.go +++ b/pkg/api/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 envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CdsDummyMultiError, or nil +// if none found. +func (m *CdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *CdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return CdsDummyMultiError(errors) + } + return nil } +// CdsDummyMultiError is an error wrapping multiple validation errors returned +// by CdsDummy.ValidateAll() if the designated constraints aren't met. +type CdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CdsDummyMultiError) AllErrors() []error { return m } + // CdsDummyValidationError is the validation error returned by // CdsDummy.Validate if the designated constraints aren't met. type CdsDummyValidationError struct { diff --git a/pkg/api/envoy/api/v2/cluster.pb.go b/pkg/api/envoy/api/v2/cluster.pb.go index 0feefaae81..fd0dd221f1 100644 --- a/pkg/api/envoy/api/v2/cluster.pb.go +++ b/pkg/api/envoy/api/v2/cluster.pb.go @@ -1,20 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/cluster.proto -package envoy_api_v2 +package apiv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" auth "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/auth" cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/cluster" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -32,10 +31,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Refer to :ref:`service discovery type ` // for an explanation on each type. type Cluster_DiscoveryType int32 @@ -2961,12 +2956,16 @@ var file_envoy_api_v2_cluster_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x0c, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, - 0x65, 0x42, 0x53, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, - 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x42, 0x8e, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/cluster.pb.validate.go b/pkg/api/envoy/api/v2/cluster.pb.validate.go index 73eacc8112..5ab26afec6 100644 --- a/pkg/api/envoy/api/v2/cluster.pb.validate.go +++ b/pkg/api/envoy/api/v2/cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/cluster.proto -package envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Cluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ClusterMultiError, or nil if none found. +func (m *Cluster) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetTransportSocketMatches() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("TransportSocketMatches[%v]", idx), @@ -56,15 +91,38 @@ func (m *Cluster) Validate() error { } if len(m.GetName()) < 1 { - return ClusterValidationError{ + err := ClusterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AltStatName - if v, ok := interface{}(m.GetEdsClusterConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEdsClusterConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "EdsClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "EdsClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEdsClusterConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "EdsClusterConfig", @@ -75,27 +133,55 @@ func (m *Cluster) Validate() error { } if d := m.GetConnectTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ClusterValidationError{ + err = ClusterValidationError{ field: "ConnectTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return ClusterValidationError{ - field: "ConnectTimeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := ClusterValidationError{ + field: "ConnectTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerConnectionBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "PerConnectionBufferLimitBytes", @@ -106,16 +192,39 @@ func (m *Cluster) Validate() error { } if _, ok := Cluster_LbPolicy_name[int32(m.GetLbPolicy())]; !ok { - return ClusterValidationError{ + err := ClusterValidationError{ field: "LbPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHosts() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("Hosts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("Hosts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("Hosts[%v]", idx), @@ -127,7 +236,26 @@ func (m *Cluster) Validate() error { } - if v, ok := interface{}(m.GetLoadAssignment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadAssignment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadAssignment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadAssignment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadAssignment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "LoadAssignment", @@ -140,7 +268,26 @@ func (m *Cluster) Validate() error { for idx, item := range m.GetHealthChecks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("HealthChecks[%v]", idx), @@ -152,7 +299,26 @@ func (m *Cluster) Validate() error { } - if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxRequestsPerConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "MaxRequestsPerConnection", @@ -162,7 +328,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCircuitBreakers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "CircuitBreakers", @@ -172,7 +357,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "TlsContext", @@ -182,7 +386,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "UpstreamHttpProtocolOptions", @@ -192,7 +415,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "CommonHttpProtocolOptions", @@ -202,7 +444,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "HttpProtocolOptions", @@ -212,7 +473,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "Http2ProtocolOptions", @@ -222,62 +502,148 @@ func (m *Cluster) Validate() error { } } - 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, + { + sorted_keys := make([]string, len(m.GetExtensionProtocolOptions())) + i := 0 + for key := range m.GetExtensionProtocolOptions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensionProtocolOptions()[key] + _ = val + + // no validation rules for ExtensionProtocolOptions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("ExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("ExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return 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, + { + sorted_keys := make([]string, len(m.GetTypedExtensionProtocolOptions())) + i := 0 + for key := range m.GetTypedExtensionProtocolOptions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedExtensionProtocolOptions()[key] + _ = val + + // no validation rules for TypedExtensionProtocolOptions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return 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) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ClusterValidationError{ + err = ClusterValidationError{ field: "DnsRefreshRate", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if dur <= gt { - return ClusterValidationError{ - field: "DnsRefreshRate", - reason: "value must be greater than 1ms", + if dur <= gt { + err := ClusterValidationError{ + field: "DnsRefreshRate", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsFailureRefreshRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "DnsFailureRefreshRate", @@ -290,16 +656,39 @@ func (m *Cluster) Validate() error { // no validation rules for RespectDnsTtl if _, ok := Cluster_DnsLookupFamily_name[int32(m.GetDnsLookupFamily())]; !ok { - return ClusterValidationError{ + err := ClusterValidationError{ field: "DnsLookupFamily", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetDnsResolvers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("DnsResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("DnsResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("DnsResolvers[%v]", idx), @@ -313,7 +702,26 @@ func (m *Cluster) Validate() error { // no validation rules for UseTcpForDnsLookups - if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOutlierDetection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "OutlierDetection", @@ -324,27 +732,55 @@ func (m *Cluster) Validate() error { } if d := m.GetCleanupInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ClusterValidationError{ + err = ClusterValidationError{ field: "CleanupInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return ClusterValidationError{ - field: "CleanupInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := ClusterValidationError{ + field: "CleanupInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamBindConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "UpstreamBindConfig", @@ -354,7 +790,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetLbSubsetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLbSubsetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LbSubsetConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LbSubsetConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLbSubsetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "LbSubsetConfig", @@ -364,7 +819,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetCommonLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CommonLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CommonLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "CommonLbConfig", @@ -374,7 +848,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "TransportSocket", @@ -384,7 +877,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "Metadata", @@ -396,7 +908,26 @@ func (m *Cluster) Validate() error { // no validation rules for ProtocolSelection - if v, ok := interface{}(m.GetUpstreamConnectionOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamConnectionOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamConnectionOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamConnectionOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamConnectionOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "UpstreamConnectionOptions", @@ -413,7 +944,26 @@ func (m *Cluster) Validate() error { for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -425,7 +975,26 @@ func (m *Cluster) Validate() error { } - if v, ok := interface{}(m.GetLoadBalancingPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadBalancingPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadBalancingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadBalancingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadBalancingPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "LoadBalancingPolicy", @@ -435,7 +1004,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetLrsServer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLrsServer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LrsServer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LrsServer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLrsServer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "LrsServer", @@ -452,15 +1040,38 @@ func (m *Cluster) Validate() error { case *Cluster_Type: if _, ok := Cluster_DiscoveryType_name[int32(m.GetType())]; !ok { - return ClusterValidationError{ + err := ClusterValidationError{ field: "Type", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } case *Cluster_ClusterType: - if v, ok := interface{}(m.GetClusterType()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClusterType()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "ClusterType", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "ClusterType", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClusterType()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "ClusterType", @@ -476,7 +1087,26 @@ func (m *Cluster) Validate() error { case *Cluster_RingHashLbConfig_: - if v, ok := interface{}(m.GetRingHashLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRingHashLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "RingHashLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "RingHashLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRingHashLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "RingHashLbConfig", @@ -488,7 +1118,26 @@ func (m *Cluster) Validate() error { case *Cluster_OriginalDstLbConfig_: - if v, ok := interface{}(m.GetOriginalDstLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOriginalDstLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OriginalDstLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OriginalDstLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOriginalDstLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "OriginalDstLbConfig", @@ -500,7 +1149,26 @@ func (m *Cluster) Validate() error { case *Cluster_LeastRequestLbConfig_: - if v, ok := interface{}(m.GetLeastRequestLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLeastRequestLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LeastRequestLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LeastRequestLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLeastRequestLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "LeastRequestLbConfig", @@ -512,9 +1180,29 @@ func (m *Cluster) Validate() error { } + if len(errors) > 0 { + return ClusterMultiError(errors) + } + return nil } +// ClusterMultiError is an error wrapping multiple validation errors returned +// by Cluster.ValidateAll() if the designated constraints aren't met. +type ClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterMultiError) AllErrors() []error { return m } + // ClusterValidationError is the validation error returned by Cluster.Validate // if the designated constraints aren't met. type ClusterValidationError struct { @@ -571,16 +1259,49 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *LoadBalancingPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadBalancingPolicy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadBalancingPolicyMultiError, or nil if none found. +func (m *LoadBalancingPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadBalancingPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetPolicies() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadBalancingPolicyValidationError{ + field: fmt.Sprintf("Policies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadBalancingPolicyValidationError{ + field: fmt.Sprintf("Policies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadBalancingPolicyValidationError{ field: fmt.Sprintf("Policies[%v]", idx), @@ -592,9 +1313,30 @@ func (m *LoadBalancingPolicy) Validate() error { } + if len(errors) > 0 { + return LoadBalancingPolicyMultiError(errors) + } + return nil } +// LoadBalancingPolicyMultiError is an error wrapping multiple validation +// errors returned by LoadBalancingPolicy.ValidateAll() if the designated +// constraints aren't met. +type LoadBalancingPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadBalancingPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadBalancingPolicyMultiError) AllErrors() []error { return m } + // LoadBalancingPolicyValidationError is the validation error returned by // LoadBalancingPolicy.Validate if the designated constraints aren't met. type LoadBalancingPolicyValidationError struct { @@ -653,13 +1395,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamBindConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamBindConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamBindConfigMultiError, or nil if none found. +func (m *UpstreamBindConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamBindConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSourceAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamBindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamBindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamBindConfigValidationError{ field: "SourceAddress", @@ -669,9 +1444,30 @@ func (m *UpstreamBindConfig) Validate() error { } } + if len(errors) > 0 { + return UpstreamBindConfigMultiError(errors) + } + return nil } +// UpstreamBindConfigMultiError is an error wrapping multiple validation errors +// returned by UpstreamBindConfig.ValidateAll() if the designated constraints +// aren't met. +type UpstreamBindConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamBindConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamBindConfigMultiError) AllErrors() []error { return m } + // UpstreamBindConfigValidationError is the validation error returned by // UpstreamBindConfig.Validate if the designated constraints aren't met. type UpstreamBindConfigValidationError struct { @@ -730,13 +1526,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamConnectionOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamConnectionOptions with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamConnectionOptionsMultiError, or nil if none found. +func (m *UpstreamConnectionOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamConnectionOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTcpKeepalive()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTcpKeepalive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamConnectionOptionsValidationError{ + field: "TcpKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamConnectionOptionsValidationError{ + field: "TcpKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpKeepalive()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamConnectionOptionsValidationError{ field: "TcpKeepalive", @@ -746,9 +1575,30 @@ func (m *UpstreamConnectionOptions) Validate() error { } } + if len(errors) > 0 { + return UpstreamConnectionOptionsMultiError(errors) + } + return nil } +// UpstreamConnectionOptionsMultiError is an error wrapping multiple validation +// errors returned by UpstreamConnectionOptions.ValidateAll() if the +// designated constraints aren't met. +type UpstreamConnectionOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamConnectionOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamConnectionOptionsMultiError) AllErrors() []error { return m } + // UpstreamConnectionOptionsValidationError is the validation error returned by // UpstreamConnectionOptions.Validate if the designated constraints aren't met. type UpstreamConnectionOptionsValidationError struct { @@ -807,20 +1657,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_TransportSocketMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_TransportSocketMatch with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_TransportSocketMatchMultiError, or nil if none found. +func (m *Cluster_TransportSocketMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_TransportSocketMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return Cluster_TransportSocketMatchValidationError{ + err := Cluster_TransportSocketMatchValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_TransportSocketMatchValidationError{ field: "Match", @@ -830,7 +1717,26 @@ func (m *Cluster_TransportSocketMatch) Validate() error { } } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_TransportSocketMatchValidationError{ field: "TransportSocket", @@ -840,9 +1746,30 @@ func (m *Cluster_TransportSocketMatch) Validate() error { } } + if len(errors) > 0 { + return Cluster_TransportSocketMatchMultiError(errors) + } + return nil } +// Cluster_TransportSocketMatchMultiError is an error wrapping multiple +// validation errors returned by Cluster_TransportSocketMatch.ValidateAll() if +// the designated constraints aren't met. +type Cluster_TransportSocketMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_TransportSocketMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_TransportSocketMatchMultiError) AllErrors() []error { return m } + // Cluster_TransportSocketMatchValidationError is the validation error returned // by Cluster_TransportSocketMatch.Validate if the designated constraints // aren't met. @@ -902,20 +1829,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_CustomClusterType) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_CustomClusterType with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_CustomClusterTypeMultiError, or nil if none found. +func (m *Cluster_CustomClusterType) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CustomClusterType) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return Cluster_CustomClusterTypeValidationError{ + err := Cluster_CustomClusterTypeValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CustomClusterTypeValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CustomClusterTypeValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CustomClusterTypeValidationError{ field: "TypedConfig", @@ -925,9 +1889,30 @@ func (m *Cluster_CustomClusterType) Validate() error { } } + if len(errors) > 0 { + return Cluster_CustomClusterTypeMultiError(errors) + } + return nil } +// Cluster_CustomClusterTypeMultiError is an error wrapping multiple validation +// errors returned by Cluster_CustomClusterType.ValidateAll() if the +// designated constraints aren't met. +type Cluster_CustomClusterTypeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CustomClusterTypeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CustomClusterTypeMultiError) AllErrors() []error { return m } + // Cluster_CustomClusterTypeValidationError is the validation error returned by // Cluster_CustomClusterType.Validate if the designated constraints aren't met. type Cluster_CustomClusterTypeValidationError struct { @@ -986,13 +1971,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_EdsClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_EdsClusterConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_EdsClusterConfigMultiError, or nil if none found. +func (m *Cluster_EdsClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_EdsClusterConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEdsConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_EdsClusterConfigValidationError{ + field: "EdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_EdsClusterConfigValidationError{ + field: "EdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_EdsClusterConfigValidationError{ field: "EdsConfig", @@ -1004,9 +2022,30 @@ func (m *Cluster_EdsClusterConfig) Validate() error { // no validation rules for ServiceName + if len(errors) > 0 { + return Cluster_EdsClusterConfigMultiError(errors) + } + return nil } +// Cluster_EdsClusterConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_EdsClusterConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_EdsClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_EdsClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_EdsClusterConfigMultiError) AllErrors() []error { return m } + // Cluster_EdsClusterConfigValidationError is the validation error returned by // Cluster_EdsClusterConfig.Validate if the designated constraints aren't met. type Cluster_EdsClusterConfigValidationError struct { @@ -1065,20 +2104,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_LbSubsetConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_LbSubsetConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_LbSubsetConfigMultiError, or nil if none found. +func (m *Cluster_LbSubsetConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_LbSubsetConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { - return Cluster_LbSubsetConfigValidationError{ + err := Cluster_LbSubsetConfigValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultSubset()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultSubset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: "DefaultSubset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: "DefaultSubset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultSubset()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: "DefaultSubset", @@ -1091,7 +2167,26 @@ func (m *Cluster_LbSubsetConfig) Validate() error { for idx, item := range m.GetSubsetSelectors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: fmt.Sprintf("SubsetSelectors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: fmt.Sprintf("SubsetSelectors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: fmt.Sprintf("SubsetSelectors[%v]", idx), @@ -1111,9 +2206,30 @@ func (m *Cluster_LbSubsetConfig) Validate() error { // no validation rules for ListAsAny + if len(errors) > 0 { + return Cluster_LbSubsetConfigMultiError(errors) + } + return nil } +// Cluster_LbSubsetConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_LbSubsetConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_LbSubsetConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_LbSubsetConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_LbSubsetConfigMultiError) AllErrors() []error { return m } + // Cluster_LbSubsetConfigValidationError is the validation error returned by // Cluster_LbSubsetConfig.Validate if the designated constraints aren't met. type Cluster_LbSubsetConfigValidationError struct { @@ -1172,26 +2288,65 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_LeastRequestLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_LeastRequestLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_LeastRequestLbConfigMultiError, or nil if none found. +func (m *Cluster_LeastRequestLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_LeastRequestLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetChoiceCount(); wrapper != nil { if wrapper.GetValue() < 2 { - return Cluster_LeastRequestLbConfigValidationError{ + err := Cluster_LeastRequestLbConfigValidationError{ field: "ChoiceCount", reason: "value must be greater than or equal to 2", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return Cluster_LeastRequestLbConfigMultiError(errors) + } + return nil } +// Cluster_LeastRequestLbConfigMultiError is an error wrapping multiple +// validation errors returned by Cluster_LeastRequestLbConfig.ValidateAll() if +// the designated constraints aren't met. +type Cluster_LeastRequestLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_LeastRequestLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_LeastRequestLbConfigMultiError) AllErrors() []error { return m } + // Cluster_LeastRequestLbConfigValidationError is the validation error returned // by Cluster_LeastRequestLbConfig.Validate if the designated constraints // aren't met. @@ -1251,44 +2406,91 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_RingHashLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_RingHashLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_RingHashLbConfigMultiError, or nil if none found. +func (m *Cluster_RingHashLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_RingHashLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMinimumRingSize(); wrapper != nil { if wrapper.GetValue() > 8388608 { - return Cluster_RingHashLbConfigValidationError{ + err := Cluster_RingHashLbConfigValidationError{ field: "MinimumRingSize", reason: "value must be less than or equal to 8388608", } + if !all { + return err + } + errors = append(errors, err) } } if _, ok := Cluster_RingHashLbConfig_HashFunction_name[int32(m.GetHashFunction())]; !ok { - return Cluster_RingHashLbConfigValidationError{ + err := Cluster_RingHashLbConfigValidationError{ field: "HashFunction", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetMaximumRingSize(); wrapper != nil { if wrapper.GetValue() > 8388608 { - return Cluster_RingHashLbConfigValidationError{ + err := Cluster_RingHashLbConfigValidationError{ field: "MaximumRingSize", reason: "value must be less than or equal to 8388608", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return Cluster_RingHashLbConfigMultiError(errors) + } + return nil } +// Cluster_RingHashLbConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_RingHashLbConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_RingHashLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_RingHashLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_RingHashLbConfigMultiError) AllErrors() []error { return m } + // Cluster_RingHashLbConfigValidationError is the validation error returned by // Cluster_RingHashLbConfig.Validate if the designated constraints aren't met. type Cluster_RingHashLbConfigValidationError struct { @@ -1347,17 +2549,52 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_OriginalDstLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_OriginalDstLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_OriginalDstLbConfigMultiError, or nil if none found. +func (m *Cluster_OriginalDstLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_OriginalDstLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for UseHttpHeader + if len(errors) > 0 { + return Cluster_OriginalDstLbConfigMultiError(errors) + } + return nil } +// Cluster_OriginalDstLbConfigMultiError is an error wrapping multiple +// validation errors returned by Cluster_OriginalDstLbConfig.ValidateAll() if +// the designated constraints aren't met. +type Cluster_OriginalDstLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_OriginalDstLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_OriginalDstLbConfigMultiError) AllErrors() []error { return m } + // Cluster_OriginalDstLbConfigValidationError is the validation error returned // by Cluster_OriginalDstLbConfig.Validate if the designated constraints // aren't met. @@ -1417,13 +2654,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_CommonLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_CommonLbConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_CommonLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHealthyPanicThreshold()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHealthyPanicThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "HealthyPanicThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "HealthyPanicThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthyPanicThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "HealthyPanicThreshold", @@ -1433,7 +2703,26 @@ func (m *Cluster_CommonLbConfig) Validate() error { } } - if v, ok := interface{}(m.GetUpdateMergeWindow()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpdateMergeWindow()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "UpdateMergeWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "UpdateMergeWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpdateMergeWindow()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "UpdateMergeWindow", @@ -1447,7 +2736,26 @@ func (m *Cluster_CommonLbConfig) Validate() error { // no validation rules for CloseConnectionsOnHostSetChange - if v, ok := interface{}(m.GetConsistentHashingLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConsistentHashingLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ConsistentHashingLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ConsistentHashingLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsistentHashingLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "ConsistentHashingLbConfig", @@ -1461,7 +2769,26 @@ func (m *Cluster_CommonLbConfig) Validate() error { case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: - if v, ok := interface{}(m.GetZoneAwareLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetZoneAwareLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ZoneAwareLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ZoneAwareLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetZoneAwareLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "ZoneAwareLbConfig", @@ -1473,7 +2800,26 @@ func (m *Cluster_CommonLbConfig) Validate() error { case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: - if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalityWeightedLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "LocalityWeightedLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "LocalityWeightedLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "LocalityWeightedLbConfig", @@ -1485,9 +2831,30 @@ func (m *Cluster_CommonLbConfig) Validate() error { } + if len(errors) > 0 { + return Cluster_CommonLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_CommonLbConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_CommonLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfigValidationError is the validation error returned by // Cluster_CommonLbConfig.Validate if the designated constraints aren't met. type Cluster_CommonLbConfigValidationError struct { @@ -1546,64 +2913,121 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_RefreshRate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_RefreshRate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_RefreshRateMultiError, or nil if none found. +func (m *Cluster_RefreshRate) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_RefreshRate) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetBaseInterval() == nil { - return Cluster_RefreshRateValidationError{ + err := Cluster_RefreshRateValidationError{ field: "BaseInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetBaseInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return Cluster_RefreshRateValidationError{ + err = Cluster_RefreshRateValidationError{ field: "BaseInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + 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 dur <= gt { + err := Cluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return Cluster_RefreshRateValidationError{ + err = Cluster_RefreshRateValidationError{ field: "MaxInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if dur <= gt { - return Cluster_RefreshRateValidationError{ - field: "MaxInterval", - reason: "value must be greater than 1ms", + if dur <= gt { + err := Cluster_RefreshRateValidationError{ + field: "MaxInterval", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return Cluster_RefreshRateMultiError(errors) } return nil } +// Cluster_RefreshRateMultiError is an error wrapping multiple validation +// errors returned by Cluster_RefreshRate.ValidateAll() if the designated +// constraints aren't met. +type Cluster_RefreshRateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_RefreshRateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_RefreshRateMultiError) AllErrors() []error { return m } + // Cluster_RefreshRateValidationError is the validation error returned by // Cluster_RefreshRate.Validate if the designated constraints aren't met. type Cluster_RefreshRateValidationError struct { @@ -1662,22 +3086,64 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_LbSubsetConfig_LbSubsetSelector with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// Cluster_LbSubsetConfig_LbSubsetSelectorMultiError, or nil if none found. +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { - return Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{ + err := Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return Cluster_LbSubsetConfig_LbSubsetSelectorMultiError(errors) } return nil } +// Cluster_LbSubsetConfig_LbSubsetSelectorMultiError is an error wrapping +// multiple validation errors returned by +// Cluster_LbSubsetConfig_LbSubsetSelector.ValidateAll() if the designated +// constraints aren't met. +type Cluster_LbSubsetConfig_LbSubsetSelectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_LbSubsetConfig_LbSubsetSelectorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_LbSubsetConfig_LbSubsetSelectorMultiError) AllErrors() []error { return m } + // Cluster_LbSubsetConfig_LbSubsetSelectorValidationError is the validation // error returned by Cluster_LbSubsetConfig_LbSubsetSelector.Validate if the // designated constraints aren't met. @@ -1737,13 +3203,48 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_CommonLbConfig_ZoneAwareLbConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRoutingEnabled()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRoutingEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "RoutingEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "RoutingEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoutingEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "RoutingEnabled", @@ -1753,7 +3254,26 @@ func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { } } - if v, ok := interface{}(m.GetMinClusterSize()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinClusterSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "MinClusterSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "MinClusterSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinClusterSize()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "MinClusterSize", @@ -1765,9 +3285,31 @@ func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { // no validation rules for FailTrafficOnPanic + if len(errors) > 0 { + return Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError is an error wrapping +// multiple validation errors returned by +// Cluster_CommonLbConfig_ZoneAwareLbConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError is the validation // error returned by Cluster_CommonLbConfig_ZoneAwareLbConfig.Validate if the // designated constraints aren't met. @@ -1827,16 +3369,53 @@ var _ interface { // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_CommonLbConfig_LocalityWeightedLbConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError is an error +// wrapping multiple validation errors returned by +// Cluster_CommonLbConfig_LocalityWeightedLbConfig.ValidateAll() if the +// designated constraints aren't met. +type Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError is the // validation error returned by // Cluster_CommonLbConfig_LocalityWeightedLbConfig.Validate if the designated @@ -1901,18 +3480,55 @@ var _ interface { // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_CommonLbConfig_ConsistentHashingLbConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for UseHostnameForHashing + if len(errors) > 0 { + return Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError is an error +// wrapping multiple validation errors returned by +// Cluster_CommonLbConfig_ConsistentHashingLbConfig.ValidateAll() if the +// designated constraints aren't met. +type Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError is the // validation error returned by // Cluster_CommonLbConfig_ConsistentHashingLbConfig.Validate if the designated @@ -1979,15 +3595,48 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *LoadBalancingPolicy_Policy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadBalancingPolicy_Policy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadBalancingPolicy_PolicyMultiError, or nil if none found. +func (m *LoadBalancingPolicy_Policy) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadBalancingPolicy_Policy) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadBalancingPolicy_PolicyValidationError{ field: "Config", @@ -1997,7 +3646,26 @@ func (m *LoadBalancingPolicy_Policy) Validate() error { } } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadBalancingPolicy_PolicyValidationError{ field: "TypedConfig", @@ -2007,9 +3675,30 @@ func (m *LoadBalancingPolicy_Policy) Validate() error { } } + if len(errors) > 0 { + return LoadBalancingPolicy_PolicyMultiError(errors) + } + return nil } +// LoadBalancingPolicy_PolicyMultiError is an error wrapping multiple +// validation errors returned by LoadBalancingPolicy_Policy.ValidateAll() if +// the designated constraints aren't met. +type LoadBalancingPolicy_PolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadBalancingPolicy_PolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadBalancingPolicy_PolicyMultiError) AllErrors() []error { return m } + // LoadBalancingPolicy_PolicyValidationError is the validation error returned // by LoadBalancingPolicy_Policy.Validate if the designated constraints aren't met. type LoadBalancingPolicy_PolicyValidationError struct { diff --git a/pkg/api/envoy/api/v2/cluster/circuit_breaker.pb.go b/pkg/api/envoy/api/v2/cluster/circuit_breaker.pb.go index f0e10f310c..88e458e1bf 100644 --- a/pkg/api/envoy/api/v2/cluster/circuit_breaker.pb.go +++ b/pkg/api/envoy/api/v2/cluster/circuit_breaker.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/cluster/circuit_breaker.proto -package envoy_api_v2_cluster +package cluster import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // :ref:`Circuit breaking` settings can be // specified individually for each defined priority. type CircuitBreakers struct { @@ -168,7 +163,7 @@ func (x *CircuitBreakers_Thresholds) GetPriority() core.RoutingPriority { if x != nil { return x.Priority } - return core.RoutingPriority_DEFAULT + return core.RoutingPriority(0) } func (x *CircuitBreakers_Thresholds) GetMaxConnections() *wrappers.UInt32Value { @@ -355,13 +350,17 @@ var file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc = []byte{ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x42, 0x94, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x42, 0xd4, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x13, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, - 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xaa, 0x02, - 0x16, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x16, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, + 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xaa, 0x02, 0x16, 0x45, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x19, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, + 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/pkg/api/envoy/api/v2/cluster/circuit_breaker.pb.validate.go b/pkg/api/envoy/api/v2/cluster/circuit_breaker.pb.validate.go index b974c61e86..facf5cb7f5 100644 --- a/pkg/api/envoy/api/v2/cluster/circuit_breaker.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_cluster +package cluster import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ) @@ -32,23 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = core.RoutingPriority(0) ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CircuitBreakers) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CircuitBreakers with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CircuitBreakersMultiError, or nil if none found. +func (m *CircuitBreakers) ValidateAll() error { + return m.validate(true) +} + +func (m *CircuitBreakers) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetThresholds() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakersValidationError{ + field: fmt.Sprintf("Thresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakersValidationError{ + field: fmt.Sprintf("Thresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakersValidationError{ field: fmt.Sprintf("Thresholds[%v]", idx), @@ -60,9 +95,30 @@ func (m *CircuitBreakers) Validate() error { } + if len(errors) > 0 { + return CircuitBreakersMultiError(errors) + } + return nil } +// CircuitBreakersMultiError is an error wrapping multiple validation errors +// returned by CircuitBreakers.ValidateAll() if the designated constraints +// aren't met. +type CircuitBreakersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CircuitBreakersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CircuitBreakersMultiError) AllErrors() []error { return m } + // CircuitBreakersValidationError is the validation error returned by // CircuitBreakers.Validate if the designated constraints aren't met. type CircuitBreakersValidationError struct { @@ -119,20 +175,57 @@ var _ interface { // Validate checks the field values on CircuitBreakers_Thresholds with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CircuitBreakers_Thresholds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CircuitBreakers_Thresholds with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CircuitBreakers_ThresholdsMultiError, or nil if none found. +func (m *CircuitBreakers_Thresholds) ValidateAll() error { + return m.validate(true) +} + +func (m *CircuitBreakers_Thresholds) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := core.RoutingPriority_name[int32(m.GetPriority())]; !ok { - return CircuitBreakers_ThresholdsValidationError{ + err := CircuitBreakers_ThresholdsValidationError{ field: "Priority", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMaxConnections()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxConnections()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConnections()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnections", @@ -142,7 +235,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxPendingRequests()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxPendingRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxPendingRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxPendingRequests", @@ -152,7 +264,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetMaxRequests()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxRequests()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRequests()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRequests", @@ -162,7 +293,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetMaxRetries()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxRetries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRetries()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRetries", @@ -172,7 +322,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetRetryBudget()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryBudget()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "RetryBudget", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "RetryBudget", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryBudget()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "RetryBudget", @@ -184,7 +353,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { // no validation rules for TrackRemaining - if v, ok := interface{}(m.GetMaxConnectionPools()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxConnectionPools()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnectionPools", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnectionPools", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConnectionPools()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnectionPools", @@ -194,9 +382,30 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } + if len(errors) > 0 { + return CircuitBreakers_ThresholdsMultiError(errors) + } + return nil } +// CircuitBreakers_ThresholdsMultiError is an error wrapping multiple +// validation errors returned by CircuitBreakers_Thresholds.ValidateAll() if +// the designated constraints aren't met. +type CircuitBreakers_ThresholdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CircuitBreakers_ThresholdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CircuitBreakers_ThresholdsMultiError) AllErrors() []error { return m } + // CircuitBreakers_ThresholdsValidationError is the validation error returned // by CircuitBreakers_Thresholds.Validate if the designated constraints aren't met. type CircuitBreakers_ThresholdsValidationError struct { @@ -255,13 +464,48 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// CircuitBreakers_Thresholds_RetryBudget with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// CircuitBreakers_Thresholds_RetryBudgetMultiError, or nil if none found. +func (m *CircuitBreakers_Thresholds_RetryBudget) ValidateAll() error { + return m.validate(true) +} + +func (m *CircuitBreakers_Thresholds_RetryBudget) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetBudgetPercent()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetBudgetPercent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "BudgetPercent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "BudgetPercent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBudgetPercent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_Thresholds_RetryBudgetValidationError{ field: "BudgetPercent", @@ -271,7 +515,26 @@ func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { } } - if v, ok := interface{}(m.GetMinRetryConcurrency()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinRetryConcurrency()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "MinRetryConcurrency", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "MinRetryConcurrency", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinRetryConcurrency()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_Thresholds_RetryBudgetValidationError{ field: "MinRetryConcurrency", @@ -281,9 +544,31 @@ func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { } } + if len(errors) > 0 { + return CircuitBreakers_Thresholds_RetryBudgetMultiError(errors) + } + return nil } +// CircuitBreakers_Thresholds_RetryBudgetMultiError is an error wrapping +// multiple validation errors returned by +// CircuitBreakers_Thresholds_RetryBudget.ValidateAll() if the designated +// constraints aren't met. +type CircuitBreakers_Thresholds_RetryBudgetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CircuitBreakers_Thresholds_RetryBudgetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CircuitBreakers_Thresholds_RetryBudgetMultiError) AllErrors() []error { return m } + // CircuitBreakers_Thresholds_RetryBudgetValidationError is the validation // error returned by CircuitBreakers_Thresholds_RetryBudget.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/api/v2/cluster/filter.pb.go b/pkg/api/envoy/api/v2/cluster/filter.pb.go index 87f1b30891..d53d15b4da 100644 --- a/pkg/api/envoy/api/v2/cluster/filter.pb.go +++ b/pkg/api/envoy/api/v2/cluster/filter.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/cluster/filter.proto -package envoy_api_v2_cluster +package cluster import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Filter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -106,13 +101,17 @@ var file_envoy_api_v2_cluster_filter_proto_rawDesc = []byte{ 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x8c, 0x01, 0x0a, + 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xcc, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xaa, 0x02, 0x16, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, - 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x16, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xaa, + 0x02, 0x16, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x19, 0x45, 0x6e, 0x76, 0x6f, 0x79, + 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, diff --git a/pkg/api/envoy/api/v2/cluster/filter.pb.validate.go b/pkg/api/envoy/api/v2/cluster/filter.pb.validate.go index 3be761579d..ad1e36a947 100644 --- a/pkg/api/envoy/api/v2/cluster/filter.pb.validate.go +++ b/pkg/api/envoy/api/v2/cluster/filter.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/cluster/filter.proto -package envoy_api_v2_cluster +package cluster import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Filter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Filter with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in FilterMultiError, or nil if none found. +func (m *Filter) ValidateAll() error { + return m.validate(true) +} + +func (m *Filter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return FilterValidationError{ + err := FilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "TypedConfig", @@ -57,9 +96,29 @@ func (m *Filter) Validate() error { } } + if len(errors) > 0 { + return FilterMultiError(errors) + } + return nil } +// FilterMultiError is an error wrapping multiple validation errors returned by +// Filter.ValidateAll() if the designated constraints aren't met. +type FilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterMultiError) AllErrors() []error { return m } + // FilterValidationError is the validation error returned by Filter.Validate if // the designated constraints aren't met. type FilterValidationError struct { diff --git a/pkg/api/envoy/api/v2/cluster/outlier_detection.pb.go b/pkg/api/envoy/api/v2/cluster/outlier_detection.pb.go index 19a2cb95ec..3902d01abf 100644 --- a/pkg/api/envoy/api/v2/cluster/outlier_detection.pb.go +++ b/pkg/api/envoy/api/v2/cluster/outlier_detection.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/cluster/outlier_detection.proto -package envoy_api_v2_cluster +package cluster import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // See the :ref:`architecture overview ` for // more information on outlier detection. // [#next-free-field: 21] @@ -451,14 +446,18 @@ var file_envoy_api_v2_cluster_outlier_detection_proto_rawDesc = []byte{ 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x96, 0x01, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0xd6, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x15, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xaa, 0x02, 0x16, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x16, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, - 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xf2, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xaa, 0x02, 0x16, 0x45, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x53, 0xea, 0x02, 0x19, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, + 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/pkg/api/envoy/api/v2/cluster/outlier_detection.pb.validate.go b/pkg/api/envoy/api/v2/cluster/outlier_detection.pb.validate.go index 2eae67c441..39216b500c 100644 --- a/pkg/api/envoy/api/v2/cluster/outlier_detection.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_cluster +package cluster import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *OutlierDetection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierDetection with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierDetectionMultiError, or nil if none found. +func (m *OutlierDetection) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierDetection) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConsecutive_5Xx()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConsecutive_5Xx()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "Consecutive_5Xx", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "Consecutive_5Xx", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsecutive_5Xx()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "Consecutive_5Xx", @@ -52,54 +87,76 @@ func (m *OutlierDetection) Validate() error { } if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return OutlierDetectionValidationError{ + err = OutlierDetectionValidationError{ field: "Interval", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return OutlierDetectionValidationError{ - field: "Interval", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := OutlierDetectionValidationError{ + field: "Interval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetBaseEjectionTime(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return OutlierDetectionValidationError{ + err = OutlierDetectionValidationError{ field: "BaseEjectionTime", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return OutlierDetectionValidationError{ - field: "BaseEjectionTime", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := OutlierDetectionValidationError{ + field: "BaseEjectionTime", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if wrapper := m.GetMaxEjectionPercent(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "MaxEjectionPercent", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -107,10 +164,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingConsecutive_5Xx(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingConsecutive_5Xx", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -118,15 +179,38 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingSuccessRate(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetSuccessRateMinimumHosts()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateMinimumHosts()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateMinimumHosts()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "SuccessRateMinimumHosts", @@ -136,7 +220,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetSuccessRateRequestVolume()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateRequestVolume()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateRequestVolume()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "SuccessRateRequestVolume", @@ -146,7 +249,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetSuccessRateStdevFactor()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateStdevFactor()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateStdevFactor", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateStdevFactor", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateStdevFactor()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "SuccessRateStdevFactor", @@ -156,7 +278,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetConsecutiveGatewayFailure()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConsecutiveGatewayFailure()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveGatewayFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveGatewayFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsecutiveGatewayFailure()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "ConsecutiveGatewayFailure", @@ -169,17 +310,40 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingConsecutiveGatewayFailure(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingConsecutiveGatewayFailure", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for SplitExternalLocalOriginErrors - if v, ok := interface{}(m.GetConsecutiveLocalOriginFailure()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConsecutiveLocalOriginFailure()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveLocalOriginFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveLocalOriginFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsecutiveLocalOriginFailure()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "ConsecutiveLocalOriginFailure", @@ -192,10 +356,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingConsecutiveLocalOriginFailure(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingConsecutiveLocalOriginFailure", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -203,10 +371,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingLocalOriginSuccessRate(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingLocalOriginSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -214,10 +386,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetFailurePercentageThreshold(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "FailurePercentageThreshold", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -225,10 +401,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingFailurePercentage(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingFailurePercentage", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -236,15 +416,38 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingFailurePercentageLocalOrigin(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingFailurePercentageLocalOrigin", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetFailurePercentageMinimumHosts()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFailurePercentageMinimumHosts()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFailurePercentageMinimumHosts()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "FailurePercentageMinimumHosts", @@ -254,7 +457,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetFailurePercentageRequestVolume()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFailurePercentageRequestVolume()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFailurePercentageRequestVolume()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "FailurePercentageRequestVolume", @@ -264,9 +486,30 @@ func (m *OutlierDetection) Validate() error { } } + if len(errors) > 0 { + return OutlierDetectionMultiError(errors) + } + return nil } +// OutlierDetectionMultiError is an error wrapping multiple validation errors +// returned by OutlierDetection.ValidateAll() if the designated constraints +// aren't met. +type OutlierDetectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierDetectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierDetectionMultiError) AllErrors() []error { return m } + // OutlierDetectionValidationError is the validation error returned by // OutlierDetection.Validate if the designated constraints aren't met. type OutlierDetectionValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/address.pb.go b/pkg/api/envoy/api/v2/core/address.pb.go index 5fe09c2024..7386fdd537 100644 --- a/pkg/api/envoy/api/v2/core/address.pb.go +++ b/pkg/api/envoy/api/v2/core/address.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/address.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SocketAddress_Protocol int32 const ( @@ -506,7 +501,7 @@ 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. + // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. PrefixLen *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` } @@ -643,13 +638,17 @@ var file_envoy_api_v2_core_address_proto_rawDesc = []byte{ 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, - 0x80, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x42, 0x55, 0x0a, - 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x42, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x80, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x42, 0x8f, 0x01, + 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x42, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/address.pb.validate.go b/pkg/api/envoy/api/v2/core/address.pb.validate.go index bd0c5abdd9..2b9930480e 100644 --- a/pkg/api/envoy/api/v2/core/address.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,33 +31,76 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Pipe with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Pipe) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Pipe with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in PipeMultiError, or nil if none found. +func (m *Pipe) ValidateAll() error { + return m.validate(true) +} + +func (m *Pipe) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPath()) < 1 { - return PipeValidationError{ + err := PipeValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetMode() > 511 { - return PipeValidationError{ + err := PipeValidationError{ field: "Mode", reason: "value must be less than or equal to 511", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PipeMultiError(errors) } return nil } +// PipeMultiError is an error wrapping multiple validation errors returned by +// Pipe.ValidateAll() if the designated constraints aren't met. +type PipeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PipeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PipeMultiError) AllErrors() []error { return m } + // PipeValidationError is the validation error returned by Pipe.Validate if the // designated constraints aren't met. type PipeValidationError struct { @@ -112,25 +156,47 @@ var _ interface { } = PipeValidationError{} // Validate checks the field values on SocketAddress with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SocketAddress) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketAddress with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SocketAddressMultiError, or +// nil if none found. +func (m *SocketAddress) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketAddress) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := SocketAddress_Protocol_name[int32(m.GetProtocol())]; !ok { - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetAddress()) < 1 { - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "Address", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ResolverName @@ -142,26 +208,55 @@ func (m *SocketAddress) Validate() error { case *SocketAddress_PortValue: if m.GetPortValue() > 65535 { - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } + if !all { + return err + } + errors = append(errors, err) } case *SocketAddress_NamedPort: // no validation rules for NamedPort default: - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "PortSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return SocketAddressMultiError(errors) } return nil } +// SocketAddressMultiError is an error wrapping multiple validation errors +// returned by SocketAddress.ValidateAll() if the designated constraints +// aren't met. +type SocketAddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketAddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketAddressMultiError) AllErrors() []error { return m } + // SocketAddressValidationError is the validation error returned by // SocketAddress.Validate if the designated constraints aren't met. type SocketAddressValidationError struct { @@ -217,14 +312,47 @@ var _ interface { } = SocketAddressValidationError{} // Validate checks the field values on TcpKeepalive with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TcpKeepalive) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpKeepalive with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TcpKeepaliveMultiError, or +// nil if none found. +func (m *TcpKeepalive) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpKeepalive) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetKeepaliveProbes()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetKeepaliveProbes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveProbes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveProbes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeepaliveProbes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveProbes", @@ -234,7 +362,26 @@ func (m *TcpKeepalive) Validate() error { } } - if v, ok := interface{}(m.GetKeepaliveTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKeepaliveTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeepaliveTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveTime", @@ -244,7 +391,26 @@ func (m *TcpKeepalive) Validate() error { } } - if v, ok := interface{}(m.GetKeepaliveInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKeepaliveInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeepaliveInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveInterval", @@ -254,9 +420,29 @@ func (m *TcpKeepalive) Validate() error { } } + if len(errors) > 0 { + return TcpKeepaliveMultiError(errors) + } + return nil } +// TcpKeepaliveMultiError is an error wrapping multiple validation errors +// returned by TcpKeepalive.ValidateAll() if the designated constraints aren't met. +type TcpKeepaliveMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpKeepaliveMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpKeepaliveMultiError) AllErrors() []error { return m } + // TcpKeepaliveValidationError is the validation error returned by // TcpKeepalive.Validate if the designated constraints aren't met. type TcpKeepaliveValidationError struct { @@ -312,20 +498,58 @@ var _ interface { } = TcpKeepaliveValidationError{} // Validate checks the field values on BindConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BindConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BindConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BindConfigMultiError, or +// nil if none found. +func (m *BindConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *BindConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetSourceAddress() == nil { - return BindConfigValidationError{ + err := BindConfigValidationError{ field: "SourceAddress", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: "SourceAddress", @@ -335,7 +559,26 @@ func (m *BindConfig) Validate() error { } } - if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFreebind()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: "Freebind", @@ -348,7 +591,26 @@ func (m *BindConfig) Validate() error { for idx, item := range m.GetSocketOptions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), @@ -360,9 +622,29 @@ func (m *BindConfig) Validate() error { } + if len(errors) > 0 { + return BindConfigMultiError(errors) + } + return nil } +// BindConfigMultiError is an error wrapping multiple validation errors +// returned by BindConfig.ValidateAll() if the designated constraints aren't met. +type BindConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BindConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BindConfigMultiError) AllErrors() []error { return m } + // BindConfigValidationError is the validation error returned by // BindConfig.Validate if the designated constraints aren't met. type BindConfigValidationError struct { @@ -418,17 +700,50 @@ var _ interface { } = BindConfigValidationError{} // Validate checks the field values on Address with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Address) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Address with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in AddressMultiError, or nil if none found. +func (m *Address) ValidateAll() error { + return m.validate(true) +} + +func (m *Address) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Address.(type) { case *Address_SocketAddress: - if v, ok := interface{}(m.GetSocketAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSocketAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddressValidationError{ + field: "SocketAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddressValidationError{ + field: "SocketAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "SocketAddress", @@ -440,7 +755,26 @@ func (m *Address) Validate() error { case *Address_Pipe: - if v, ok := interface{}(m.GetPipe()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPipe()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddressValidationError{ + field: "Pipe", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddressValidationError{ + field: "Pipe", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPipe()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "Pipe", @@ -451,16 +785,40 @@ func (m *Address) Validate() error { } default: - return AddressValidationError{ + err := AddressValidationError{ field: "Address", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return AddressMultiError(errors) } return nil } +// AddressMultiError is an error wrapping multiple validation errors returned +// by Address.ValidateAll() if the designated constraints aren't met. +type AddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddressMultiError) AllErrors() []error { return m } + // AddressValidationError is the validation error returned by Address.Validate // if the designated constraints aren't met. type AddressValidationError struct { @@ -516,33 +874,76 @@ var _ interface { } = AddressValidationError{} // Validate checks the field values on CidrRange with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CidrRange) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CidrRange with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CidrRangeMultiError, or nil +// if none found. +func (m *CidrRange) ValidateAll() error { + return m.validate(true) +} + +func (m *CidrRange) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetAddressPrefix()) < 1 { - return CidrRangeValidationError{ + err := CidrRangeValidationError{ field: "AddressPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetPrefixLen(); wrapper != nil { if wrapper.GetValue() > 128 { - return CidrRangeValidationError{ + err := CidrRangeValidationError{ field: "PrefixLen", reason: "value must be less than or equal to 128", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return CidrRangeMultiError(errors) + } + return nil } +// CidrRangeMultiError is an error wrapping multiple validation errors returned +// by CidrRange.ValidateAll() if the designated constraints aren't met. +type CidrRangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CidrRangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CidrRangeMultiError) AllErrors() []error { return m } + // CidrRangeValidationError is the validation error returned by // CidrRange.Validate if the designated constraints aren't met. type CidrRangeValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/backoff.pb.go b/pkg/api/envoy/api/v2/core/backoff.pb.go index 63c548d0df..4a06c14a3d 100644 --- a/pkg/api/envoy/api/v2/core/backoff.pb.go +++ b/pkg/api/envoy/api/v2/core/backoff.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/backoff.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration defining a jittered exponential back off strategy. type BackoffStrategy struct { state protoimpl.MessageState @@ -116,13 +111,17 @@ var file_envoy_api_v2_core_backoff_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x55, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0c, 0x42, 0x61, 0x63, - 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x8f, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0c, 0x42, 0x61, + 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/backoff.pb.validate.go b/pkg/api/envoy/api/v2/core/backoff.pb.validate.go index aff19af90a..3a4f727f3d 100644 --- a/pkg/api/envoy/api/v2/core/backoff.pb.validate.go +++ b/pkg/api/envoy/api/v2/core/backoff.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/backoff.proto -package envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,69 +31,127 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on BackoffStrategy with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *BackoffStrategy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BackoffStrategy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BackoffStrategyMultiError, or nil if none found. +func (m *BackoffStrategy) ValidateAll() error { + return m.validate(true) +} + +func (m *BackoffStrategy) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetBaseInterval() == nil { - return BackoffStrategyValidationError{ + err := BackoffStrategyValidationError{ field: "BaseInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetBaseInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return BackoffStrategyValidationError{ + err = 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 !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := BackoffStrategyValidationError{ + field: "BaseInterval", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return BackoffStrategyValidationError{ + err = 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", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := BackoffStrategyValidationError{ + field: "MaxInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return BackoffStrategyMultiError(errors) } return nil } +// BackoffStrategyMultiError is an error wrapping multiple validation errors +// returned by BackoffStrategy.ValidateAll() if the designated constraints +// aren't met. +type BackoffStrategyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BackoffStrategyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BackoffStrategyMultiError) AllErrors() []error { return m } + // BackoffStrategyValidationError is the validation error returned by // BackoffStrategy.Validate if the designated constraints aren't met. type BackoffStrategyValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/base.pb.go b/pkg/api/envoy/api/v2/core/base.pb.go index 8f8033f90d..96b7652623 100644 --- a/pkg/api/envoy/api/v2/core/base.pb.go +++ b/pkg/api/envoy/api/v2/core/base.pb.go @@ -1,18 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/base.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -28,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Envoy supports :ref:`upstream priority routing // ` both at the route and the virtual // cluster level. The current priority implementation uses different connection @@ -1598,9 +1592,7 @@ var file_envoy_api_v2_core_base_proto_rawDesc = []byte{ 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, @@ -1805,13 +1797,17 @@ var file_envoy_api_v2_core_base_proto_rawDesc = []byte{ 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, - 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x52, 0x0a, 0x1f, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x09, 0x42, - 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, - 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x0c, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x8c, 0x01, 0x0a, 0x1f, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x09, + 0x42, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x0b, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/base.pb.validate.go b/pkg/api/envoy/api/v2/core/base.pb.validate.go index 5f592df48a..838b1b337c 100644 --- a/pkg/api/envoy/api/v2/core/base.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,61 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Locality with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Locality) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Locality with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LocalityMultiError, or nil +// if none found. +func (m *Locality) ValidateAll() error { + return m.validate(true) +} + +func (m *Locality) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Region // no validation rules for Zone // no validation rules for SubZone + if len(errors) > 0 { + return LocalityMultiError(errors) + } + return nil } +// LocalityMultiError is an error wrapping multiple validation errors returned +// by Locality.ValidateAll() if the designated constraints aren't met. +type LocalityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityMultiError) AllErrors() []error { return m } + // LocalityValidationError is the validation error returned by // Locality.Validate if the designated constraints aren't met. type LocalityValidationError struct { @@ -104,14 +141,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BuildVersion) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BuildVersion with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BuildVersionMultiError, or +// nil if none found. +func (m *BuildVersion) ValidateAll() error { + return m.validate(true) +} + +func (m *BuildVersion) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetVersion()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BuildVersionValidationError{ field: "Version", @@ -121,7 +191,26 @@ func (m *BuildVersion) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BuildVersionValidationError{ field: "Metadata", @@ -131,9 +220,29 @@ func (m *BuildVersion) Validate() error { } } + if len(errors) > 0 { + return BuildVersionMultiError(errors) + } + return nil } +// BuildVersionMultiError is an error wrapping multiple validation errors +// returned by BuildVersion.ValidateAll() if the designated constraints aren't met. +type BuildVersionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BuildVersionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BuildVersionMultiError) AllErrors() []error { return m } + // BuildVersionValidationError is the validation error returned by // BuildVersion.Validate if the designated constraints aren't met. type BuildVersionValidationError struct { @@ -189,19 +298,53 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Extension) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Extension with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExtensionMultiError, or nil +// if none found. +func (m *Extension) ValidateAll() error { + return m.validate(true) +} + +func (m *Extension) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for Category // no validation rules for TypeDescriptor - if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetVersion()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtensionValidationError{ field: "Version", @@ -213,9 +356,29 @@ func (m *Extension) Validate() error { // no validation rules for Disabled + if len(errors) > 0 { + return ExtensionMultiError(errors) + } + return nil } +// ExtensionMultiError is an error wrapping multiple validation errors returned +// by Extension.ValidateAll() if the designated constraints aren't met. +type ExtensionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtensionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtensionMultiError) AllErrors() []error { return m } + // ExtensionValidationError is the validation error returned by // Extension.Validate if the designated constraints aren't met. type ExtensionValidationError struct { @@ -271,17 +434,50 @@ var _ interface { } = 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. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Node) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Node with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in NodeMultiError, or nil if none found. +func (m *Node) ValidateAll() error { + return m.validate(true) +} + +func (m *Node) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Id // no validation rules for Cluster - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Metadata", @@ -291,7 +487,26 @@ func (m *Node) Validate() error { } } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Locality", @@ -308,7 +523,26 @@ func (m *Node) Validate() error { for idx, item := range m.GetExtensions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("Extensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("Extensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: fmt.Sprintf("Extensions[%v]", idx), @@ -323,7 +557,26 @@ func (m *Node) Validate() error { for idx, item := range m.GetListeningAddresses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("ListeningAddresses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("ListeningAddresses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: fmt.Sprintf("ListeningAddresses[%v]", idx), @@ -342,7 +595,26 @@ func (m *Node) Validate() error { case *Node_UserAgentBuildVersion: - if v, ok := interface{}(m.GetUserAgentBuildVersion()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUserAgentBuildVersion()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: "UserAgentBuildVersion", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: "UserAgentBuildVersion", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUserAgentBuildVersion()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "UserAgentBuildVersion", @@ -354,9 +626,29 @@ func (m *Node) Validate() error { } + if len(errors) > 0 { + return NodeMultiError(errors) + } + return nil } +// NodeMultiError is an error wrapping multiple validation errors returned by +// Node.ValidateAll() if the designated constraints aren't met. +type NodeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NodeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NodeMultiError) AllErrors() []error { return m } + // NodeValidationError is the validation error returned by Node.Validate if the // designated constraints aren't met. type NodeValidationError struct { @@ -412,32 +704,96 @@ var _ interface { } = NodeValidationError{} // Validate checks the field values on Metadata with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Metadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Metadata with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataMultiError, or nil +// if none found. +func (m *Metadata) ValidateAll() error { + return m.validate(true) +} + +func (m *Metadata) validate(all bool) error { if m == nil { return nil } - for key, val := range m.GetFilterMetadata() { - _ = val - - // no validation rules for FilterMetadata[key] + var errors []error - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataValidationError{ - field: fmt.Sprintf("FilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetFilterMetadata())) + i := 0 + for key := range m.GetFilterMetadata() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetFilterMetadata()[key] + _ = val + + // no validation rules for FilterMetadata[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataValidationError{ + field: fmt.Sprintf("FilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataValidationError{ + field: fmt.Sprintf("FilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetadataValidationError{ + field: fmt.Sprintf("FilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return MetadataMultiError(errors) } return nil } +// MetadataMultiError is an error wrapping multiple validation errors returned +// by Metadata.ValidateAll() if the designated constraints aren't met. +type MetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMultiError) AllErrors() []error { return m } + // MetadataValidationError is the validation error returned by // Metadata.Validate if the designated constraints aren't met. type MetadataValidationError struct { @@ -493,25 +849,64 @@ var _ interface { } = MetadataValidationError{} // Validate checks the field values on RuntimeUInt32 with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeUInt32) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeUInt32 with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeUInt32MultiError, or +// nil if none found. +func (m *RuntimeUInt32) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeUInt32) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for DefaultValue if len(m.GetRuntimeKey()) < 1 { - return RuntimeUInt32ValidationError{ + err := RuntimeUInt32ValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RuntimeUInt32MultiError(errors) } return nil } +// RuntimeUInt32MultiError is an error wrapping multiple validation errors +// returned by RuntimeUInt32.ValidateAll() if the designated constraints +// aren't met. +type RuntimeUInt32MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeUInt32MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeUInt32MultiError) AllErrors() []error { return m } + // RuntimeUInt32ValidationError is the validation error returned by // RuntimeUInt32.Validate if the designated constraints aren't met. type RuntimeUInt32ValidationError struct { @@ -567,25 +962,64 @@ var _ interface { } = RuntimeUInt32ValidationError{} // Validate checks the field values on RuntimeDouble with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeDouble) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeDouble with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeDoubleMultiError, or +// nil if none found. +func (m *RuntimeDouble) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeDouble) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for DefaultValue if len(m.GetRuntimeKey()) < 1 { - return RuntimeDoubleValidationError{ + err := RuntimeDoubleValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RuntimeDoubleMultiError(errors) } return nil } +// RuntimeDoubleMultiError is an error wrapping multiple validation errors +// returned by RuntimeDouble.ValidateAll() if the designated constraints +// aren't met. +type RuntimeDoubleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeDoubleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeDoubleMultiError) AllErrors() []error { return m } + // RuntimeDoubleValidationError is the validation error returned by // RuntimeDouble.Validate if the designated constraints aren't met. type RuntimeDoubleValidationError struct { @@ -642,20 +1076,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeFeatureFlag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeFeatureFlag with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeFeatureFlagMultiError, or nil if none found. +func (m *RuntimeFeatureFlag) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeFeatureFlag) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDefaultValue() == nil { - return RuntimeFeatureFlagValidationError{ + err := RuntimeFeatureFlagValidationError{ field: "DefaultValue", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeFeatureFlagValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeFeatureFlagValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFeatureFlagValidationError{ field: "DefaultValue", @@ -666,15 +1137,40 @@ func (m *RuntimeFeatureFlag) Validate() error { } if len(m.GetRuntimeKey()) < 1 { - return RuntimeFeatureFlagValidationError{ + err := RuntimeFeatureFlagValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RuntimeFeatureFlagMultiError(errors) } return nil } +// RuntimeFeatureFlagMultiError is an error wrapping multiple validation errors +// returned by RuntimeFeatureFlag.ValidateAll() if the designated constraints +// aren't met. +type RuntimeFeatureFlagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeFeatureFlagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeFeatureFlagMultiError) AllErrors() []error { return m } + // RuntimeFeatureFlagValidationError is the validation error returned by // RuntimeFeatureFlag.Validate if the designated constraints aren't met. type RuntimeFeatureFlagValidationError struct { @@ -732,44 +1228,94 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderValue) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderValue with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderValueMultiError, or +// nil if none found. +func (m *HeaderValue) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderValue) validate(all bool) error { if m == nil { return nil } + var errors []error + if l := len(m.GetKey()); l < 1 || l > 16384 { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Key", reason: "value length must be between 1 and 16384 bytes, inclusive", } + if !all { + return err + } + errors = append(errors, err) } if !_HeaderValue_Key_Pattern.MatchString(m.GetKey()) { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Key", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetValue()) > 16384 { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Value", reason: "value length must be at most 16384 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_HeaderValue_Value_Pattern.MatchString(m.GetValue()) { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Value", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HeaderValueMultiError(errors) } return nil } +// HeaderValueMultiError is an error wrapping multiple validation errors +// returned by HeaderValue.ValidateAll() if the designated constraints aren't met. +type HeaderValueMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderValueMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderValueMultiError) AllErrors() []error { return m } + // HeaderValueValidationError is the validation error returned by // HeaderValue.Validate if the designated constraints aren't met. type HeaderValueValidationError struct { @@ -829,21 +1375,58 @@ 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HeaderValueOption) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderValueOption with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HeaderValueOptionMultiError, or nil if none found. +func (m *HeaderValueOption) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderValueOption) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHeader() == nil { - return HeaderValueOptionValidationError{ + err := HeaderValueOptionValidationError{ field: "Header", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Header", @@ -853,7 +1436,26 @@ func (m *HeaderValueOption) Validate() error { } } - if v, ok := interface{}(m.GetAppend()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAppend()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Append", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Append", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAppend()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Append", @@ -863,9 +1465,30 @@ func (m *HeaderValueOption) Validate() error { } } + if len(errors) > 0 { + return HeaderValueOptionMultiError(errors) + } + return nil } +// HeaderValueOptionMultiError is an error wrapping multiple validation errors +// returned by HeaderValueOption.ValidateAll() if the designated constraints +// aren't met. +type HeaderValueOptionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderValueOptionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderValueOptionMultiError) AllErrors() []error { return m } + // HeaderValueOptionValidationError is the validation error returned by // HeaderValueOption.Validate if the designated constraints aren't met. type HeaderValueOptionValidationError struct { @@ -923,16 +1546,50 @@ var _ interface { } = HeaderValueOptionValidationError{} // Validate checks the field values on HeaderMap with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderMap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMap with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderMapMultiError, or nil +// if none found. +func (m *HeaderMap) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMap) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMapValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMapValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMapValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -944,9 +1601,29 @@ func (m *HeaderMap) Validate() error { } + if len(errors) > 0 { + return HeaderMapMultiError(errors) + } + return nil } +// HeaderMapMultiError is an error wrapping multiple validation errors returned +// by HeaderMap.ValidateAll() if the designated constraints aren't met. +type HeaderMapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMapMultiError) AllErrors() []error { return m } + // HeaderMapValidationError is the validation error returned by // HeaderMap.Validate if the designated constraints aren't met. type HeaderMapValidationError struct { @@ -1002,52 +1679,103 @@ var _ interface { } = HeaderMapValidationError{} // Validate checks the field values on DataSource with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DataSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DataSource with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DataSourceMultiError, or +// nil if none found. +func (m *DataSource) ValidateAll() error { + return m.validate(true) +} + +func (m *DataSource) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Specifier.(type) { case *DataSource_Filename: if len(m.GetFilename()) < 1 { - return DataSourceValidationError{ + err := DataSourceValidationError{ field: "Filename", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *DataSource_InlineBytes: if len(m.GetInlineBytes()) < 1 { - return DataSourceValidationError{ + err := DataSourceValidationError{ field: "InlineBytes", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *DataSource_InlineString: if len(m.GetInlineString()) < 1 { - return DataSourceValidationError{ + err := DataSourceValidationError{ field: "InlineString", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } default: - return DataSourceValidationError{ + err := DataSourceValidationError{ field: "Specifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return DataSourceMultiError(errors) + } + return nil } +// DataSourceMultiError is an error wrapping multiple validation errors +// returned by DataSource.ValidateAll() if the designated constraints aren't met. +type DataSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DataSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DataSourceMultiError) AllErrors() []error { return m } + // DataSourceValidationError is the validation error returned by // DataSource.Validate if the designated constraints aren't met. type DataSourceValidationError struct { @@ -1103,14 +1831,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RetryPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RetryPolicyMultiError, or +// nil if none found. +func (m *RetryPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRetryBackOff()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryBackOff", @@ -1120,7 +1881,26 @@ func (m *RetryPolicy) Validate() error { } } - if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNumRetries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "NumRetries", @@ -1130,9 +1910,29 @@ func (m *RetryPolicy) Validate() error { } } + if len(errors) > 0 { + return RetryPolicyMultiError(errors) + } + return nil } +// RetryPolicyMultiError is an error wrapping multiple validation errors +// returned by RetryPolicy.ValidateAll() if the designated constraints aren't met. +type RetryPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicyMultiError) AllErrors() []error { return m } + // RetryPolicyValidationError is the validation error returned by // RetryPolicy.Validate if the designated constraints aren't met. type RetryPolicyValidationError struct { @@ -1188,21 +1988,58 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RemoteDataSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoteDataSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RemoteDataSourceMultiError, or nil if none found. +func (m *RemoteDataSource) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoteDataSource) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHttpUri() == nil { - return RemoteDataSourceValidationError{ + err := RemoteDataSourceValidationError{ field: "HttpUri", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteDataSourceValidationError{ field: "HttpUri", @@ -1213,13 +2050,36 @@ func (m *RemoteDataSource) Validate() error { } if len(m.GetSha256()) < 1 { - return RemoteDataSourceValidationError{ + err := RemoteDataSourceValidationError{ field: "Sha256", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteDataSourceValidationError{ field: "RetryPolicy", @@ -1229,9 +2089,30 @@ func (m *RemoteDataSource) Validate() error { } } + if len(errors) > 0 { + return RemoteDataSourceMultiError(errors) + } + return nil } +// RemoteDataSourceMultiError is an error wrapping multiple validation errors +// returned by RemoteDataSource.ValidateAll() if the designated constraints +// aren't met. +type RemoteDataSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoteDataSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoteDataSourceMultiError) AllErrors() []error { return m } + // RemoteDataSourceValidationError is the validation error returned by // RemoteDataSource.Validate if the designated constraints aren't met. type RemoteDataSourceValidationError struct { @@ -1287,18 +2168,51 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AsyncDataSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AsyncDataSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AsyncDataSourceMultiError, or nil if none found. +func (m *AsyncDataSource) ValidateAll() error { + return m.validate(true) +} + +func (m *AsyncDataSource) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Specifier.(type) { case *AsyncDataSource_Local: - if v, ok := interface{}(m.GetLocal()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocal()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Local", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Local", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocal()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AsyncDataSourceValidationError{ field: "Local", @@ -1310,7 +2224,26 @@ func (m *AsyncDataSource) Validate() error { case *AsyncDataSource_Remote: - if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemote()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Remote", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Remote", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AsyncDataSourceValidationError{ field: "Remote", @@ -1321,16 +2254,41 @@ func (m *AsyncDataSource) Validate() error { } default: - return AsyncDataSourceValidationError{ + err := AsyncDataSourceValidationError{ field: "Specifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return AsyncDataSourceMultiError(errors) + } + return nil } +// AsyncDataSourceMultiError is an error wrapping multiple validation errors +// returned by AsyncDataSource.ValidateAll() if the designated constraints +// aren't met. +type AsyncDataSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AsyncDataSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AsyncDataSourceMultiError) AllErrors() []error { return m } + // AsyncDataSourceValidationError is the validation error returned by // AsyncDataSource.Validate if the designated constraints aren't met. type AsyncDataSourceValidationError struct { @@ -1386,25 +2344,62 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TransportSocket) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TransportSocket with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TransportSocketMultiError, or nil if none found. +func (m *TransportSocket) ValidateAll() error { + return m.validate(true) +} + +func (m *TransportSocket) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return TransportSocketValidationError{ + err := TransportSocketValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *TransportSocket_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TransportSocketValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TransportSocketValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TransportSocketValidationError{ field: "Config", @@ -1416,7 +2411,26 @@ func (m *TransportSocket) Validate() error { case *TransportSocket_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TransportSocketValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TransportSocketValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TransportSocketValidationError{ field: "TypedConfig", @@ -1428,9 +2442,30 @@ func (m *TransportSocket) Validate() error { } + if len(errors) > 0 { + return TransportSocketMultiError(errors) + } + return nil } +// TransportSocketMultiError is an error wrapping multiple validation errors +// returned by TransportSocket.ValidateAll() if the designated constraints +// aren't met. +type TransportSocketMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TransportSocketMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TransportSocketMultiError) AllErrors() []error { return m } + // TransportSocketValidationError is the validation error returned by // TransportSocket.Validate if the designated constraints aren't met. type TransportSocketValidationError struct { @@ -1487,20 +2522,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeFractionalPercent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeFractionalPercent with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeFractionalPercentMultiError, or nil if none found. +func (m *RuntimeFractionalPercent) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeFractionalPercent) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDefaultValue() == nil { - return RuntimeFractionalPercentValidationError{ + err := RuntimeFractionalPercentValidationError{ field: "DefaultValue", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeFractionalPercentValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeFractionalPercentValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFractionalPercentValidationError{ field: "DefaultValue", @@ -1512,9 +2584,30 @@ func (m *RuntimeFractionalPercent) Validate() error { // no validation rules for RuntimeKey + if len(errors) > 0 { + return RuntimeFractionalPercentMultiError(errors) + } + return nil } +// RuntimeFractionalPercentMultiError is an error wrapping multiple validation +// errors returned by RuntimeFractionalPercent.ValidateAll() if the designated +// constraints aren't met. +type RuntimeFractionalPercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeFractionalPercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeFractionalPercentMultiError) AllErrors() []error { return m } + // RuntimeFractionalPercentValidationError is the validation error returned by // RuntimeFractionalPercent.Validate if the designated constraints aren't met. type RuntimeFractionalPercentValidationError struct { @@ -1572,18 +2665,52 @@ var _ interface { } = RuntimeFractionalPercentValidationError{} // Validate checks the field values on ControlPlane with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ControlPlane) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ControlPlane with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ControlPlaneMultiError, or +// nil if none found. +func (m *ControlPlane) ValidateAll() error { + return m.validate(true) +} + +func (m *ControlPlane) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Identifier + if len(errors) > 0 { + return ControlPlaneMultiError(errors) + } + return nil } +// ControlPlaneMultiError is an error wrapping multiple validation errors +// returned by ControlPlane.ValidateAll() if the designated constraints aren't met. +type ControlPlaneMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ControlPlaneMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ControlPlaneMultiError) AllErrors() []error { return m } + // ControlPlaneValidationError is the validation error returned by // ControlPlane.Validate if the designated constraints aren't met. type ControlPlaneValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/config_source.pb.go b/pkg/api/envoy/api/v2/core/config_source.pb.go index 53aa55e8d3..3371ceef27 100644 --- a/pkg/api/envoy/api/v2/core/config_source.pb.go +++ b/pkg/api/envoy/api/v2/core/config_source.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/config_source.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // xDS API version. This is used to describe both resource and transport // protocol versions (in distinct configuration fields). type ApiVersion int32 @@ -712,13 +707,17 @@ var file_envoy_api_v2_core_config_source_proto_rawDesc = []byte{ 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x2e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0a, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x01, - 0x1a, 0x02, 0x08, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x33, 0x10, 0x02, 0x42, 0x5a, 0x0a, 0x1f, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, - 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x02, 0x08, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x33, 0x10, 0x02, 0x42, 0x94, 0x01, 0x0a, + 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x42, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xf2, + 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/config_source.pb.validate.go b/pkg/api/envoy/api/v2/core/config_source.pb.validate.go index b1c183737b..3517b6cfd1 100644 --- a/pkg/api/envoy/api/v2/core/config_source.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ApiConfigSource with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ApiConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApiConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ApiConfigSourceMultiError, or nil if none found. +func (m *ApiConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *ApiConfigSource) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := ApiConfigSource_ApiType_name[int32(m.GetApiType())]; !ok { - return ApiConfigSourceValidationError{ + err := ApiConfigSourceValidationError{ field: "ApiType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return ApiConfigSourceValidationError{ + err := ApiConfigSourceValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetGrpcServices() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: fmt.Sprintf("GrpcServices[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: fmt.Sprintf("GrpcServices[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: fmt.Sprintf("GrpcServices[%v]", idx), @@ -70,7 +113,26 @@ func (m *ApiConfigSource) Validate() error { } - if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRefreshDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RefreshDelay", @@ -81,27 +143,55 @@ func (m *ApiConfigSource) Validate() error { } if d := m.GetRequestTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ApiConfigSourceValidationError{ + err = ApiConfigSourceValidationError{ field: "RequestTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return ApiConfigSourceValidationError{ - field: "RequestTimeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := ApiConfigSourceValidationError{ + field: "RequestTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetRateLimitSettings()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RateLimitSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RateLimitSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitSettings()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RateLimitSettings", @@ -113,9 +203,30 @@ func (m *ApiConfigSource) Validate() error { // no validation rules for SetNodeOnFirstMessageOnly + if len(errors) > 0 { + return ApiConfigSourceMultiError(errors) + } + return nil } +// ApiConfigSourceMultiError is an error wrapping multiple validation errors +// returned by ApiConfigSource.ValidateAll() if the designated constraints +// aren't met. +type ApiConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApiConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApiConfigSourceMultiError) AllErrors() []error { return m } + // ApiConfigSourceValidationError is the validation error returned by // ApiConfigSource.Validate if the designated constraints aren't met. type ApiConfigSourceValidationError struct { @@ -172,15 +283,50 @@ var _ interface { // Validate checks the field values on AggregatedConfigSource with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AggregatedConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AggregatedConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AggregatedConfigSourceMultiError, or nil if none found. +func (m *AggregatedConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *AggregatedConfigSource) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return AggregatedConfigSourceMultiError(errors) + } + return nil } +// AggregatedConfigSourceMultiError is an error wrapping multiple validation +// errors returned by AggregatedConfigSource.ValidateAll() if the designated +// constraints aren't met. +type AggregatedConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AggregatedConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AggregatedConfigSourceMultiError) AllErrors() []error { return m } + // AggregatedConfigSourceValidationError is the validation error returned by // AggregatedConfigSource.Validate if the designated constraints aren't met. type AggregatedConfigSourceValidationError struct { @@ -238,23 +384,62 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SelfConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SelfConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SelfConfigSourceMultiError, or nil if none found. +func (m *SelfConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *SelfConfigSource) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return SelfConfigSourceValidationError{ + err := SelfConfigSourceValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return SelfConfigSourceMultiError(errors) } return nil } +// SelfConfigSourceMultiError is an error wrapping multiple validation errors +// returned by SelfConfigSource.ValidateAll() if the designated constraints +// aren't met. +type SelfConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SelfConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SelfConfigSourceMultiError) AllErrors() []error { return m } + // SelfConfigSourceValidationError is the validation error returned by // SelfConfigSource.Validate if the designated constraints aren't met. type SelfConfigSourceValidationError struct { @@ -310,14 +495,47 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimitSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitSettings with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitSettingsMultiError, or nil if none found. +func (m *RateLimitSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitSettings) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxTokens()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxTokens()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitSettingsValidationError{ + field: "MaxTokens", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitSettingsValidationError{ + field: "MaxTokens", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxTokens()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitSettingsValidationError{ field: "MaxTokens", @@ -330,17 +548,42 @@ func (m *RateLimitSettings) Validate() error { if wrapper := m.GetFillRate(); wrapper != nil { if wrapper.GetValue() <= 0 { - return RateLimitSettingsValidationError{ + err := RateLimitSettingsValidationError{ field: "FillRate", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return RateLimitSettingsMultiError(errors) + } + return nil } +// RateLimitSettingsMultiError is an error wrapping multiple validation errors +// returned by RateLimitSettings.ValidateAll() if the designated constraints +// aren't met. +type RateLimitSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitSettingsMultiError) AllErrors() []error { return m } + // RateLimitSettingsValidationError is the validation error returned by // RateLimitSettings.Validate if the designated constraints aren't met. type RateLimitSettingsValidationError struct { @@ -398,14 +641,47 @@ var _ interface { } = RateLimitSettingsValidationError{} // Validate checks the field values on ConfigSource with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConfigSource with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConfigSourceMultiError, or +// nil if none found. +func (m *ConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *ConfigSource) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetInitialFetchTimeout()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetInitialFetchTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "InitialFetchTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "InitialFetchTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInitialFetchTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "InitialFetchTimeout", @@ -416,10 +692,14 @@ func (m *ConfigSource) Validate() error { } if _, ok := ApiVersion_name[int32(m.GetResourceApiVersion())]; !ok { - return ConfigSourceValidationError{ + err := ConfigSourceValidationError{ field: "ResourceApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigSourceSpecifier.(type) { @@ -429,7 +709,26 @@ func (m *ConfigSource) Validate() error { case *ConfigSource_ApiConfigSource: - if v, ok := interface{}(m.GetApiConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetApiConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "ApiConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "ApiConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApiConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "ApiConfigSource", @@ -441,7 +740,26 @@ func (m *ConfigSource) Validate() error { case *ConfigSource_Ads: - if v, ok := interface{}(m.GetAds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Ads", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Ads", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "Ads", @@ -453,7 +771,26 @@ func (m *ConfigSource) Validate() error { case *ConfigSource_Self: - if v, ok := interface{}(m.GetSelf()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSelf()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Self", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Self", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSelf()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "Self", @@ -464,16 +801,40 @@ func (m *ConfigSource) Validate() error { } default: - return ConfigSourceValidationError{ + err := ConfigSourceValidationError{ field: "ConfigSourceSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ConfigSourceMultiError(errors) + } + return nil } +// ConfigSourceMultiError is an error wrapping multiple validation errors +// returned by ConfigSource.ValidateAll() if the designated constraints aren't met. +type ConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigSourceMultiError) AllErrors() []error { return m } + // ConfigSourceValidationError is the validation error returned by // ConfigSource.Validate if the designated constraints aren't met. type ConfigSourceValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/event_service_config.pb.go b/pkg/api/envoy/api/v2/core/event_service_config.pb.go index 1f034cfb54..e6aaca1938 100644 --- a/pkg/api/envoy/api/v2/core/event_service_config.pb.go +++ b/pkg/api/envoy/api/v2/core/event_service_config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/event_service_config.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] // Configuration of the event reporting service endpoint. type EventServiceConfig struct { @@ -118,14 +113,17 @@ var file_envoy_api_v2_core_event_service_config_proto_rawDesc = []byte{ 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x1e, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x60, 0x0a, 0x1f, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x17, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x9a, 0x01, 0x0a, 0x1f, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x17, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/event_service_config.pb.validate.go b/pkg/api/envoy/api/v2/core/event_service_config.pb.validate.go index 4e710e0376..e64c93ff7e 100644 --- a/pkg/api/envoy/api/v2/core/event_service_config.pb.validate.go +++ b/pkg/api/envoy/api/v2/core/event_service_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/event_service_config.proto -package envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on EventServiceConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EventServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EventServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EventServiceConfigMultiError, or nil if none found. +func (m *EventServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *EventServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ConfigSourceSpecifier.(type) { case *EventServiceConfig_GrpcService: - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EventServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EventServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EventServiceConfigValidationError{ field: "GrpcService", @@ -56,16 +91,41 @@ func (m *EventServiceConfig) Validate() error { } default: - return EventServiceConfigValidationError{ + err := EventServiceConfigValidationError{ field: "ConfigSourceSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return EventServiceConfigMultiError(errors) } return nil } +// EventServiceConfigMultiError is an error wrapping multiple validation errors +// returned by EventServiceConfig.ValidateAll() if the designated constraints +// aren't met. +type EventServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EventServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EventServiceConfigMultiError) AllErrors() []error { return m } + // EventServiceConfigValidationError is the validation error returned by // EventServiceConfig.Validate if the designated constraints aren't met. type EventServiceConfigValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/grpc_method_list.pb.go b/pkg/api/envoy/api/v2/core/grpc_method_list.pb.go index 25a6b685dc..3d0c72bd0a 100644 --- a/pkg/api/envoy/api/v2/core/grpc_method_list.pb.go +++ b/pkg/api/envoy/api/v2/core/grpc_method_list.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/grpc_method_list.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A list of gRPC methods which can be used as an allowlist, for example. type GrpcMethodList struct { state protoimpl.MessageState @@ -155,13 +150,17 @@ var file_envoy_api_v2_core_grpc_method_list_proto_rawDesc = []byte{ 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x42, 0x5c, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x13, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x65, 0x73, 0x42, 0x96, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x13, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, + 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/grpc_method_list.pb.validate.go b/pkg/api/envoy/api/v2/core/grpc_method_list.pb.validate.go index c1c9328613..a2ba0401dd 100644 --- a/pkg/api/envoy/api/v2/core/grpc_method_list.pb.validate.go +++ b/pkg/api/envoy/api/v2/core/grpc_method_list.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/grpc_method_list.proto -package envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcMethodList with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcMethodList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcMethodList with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GrpcMethodListMultiError, +// or nil if none found. +func (m *GrpcMethodList) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcMethodList) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetServices() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcMethodListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcMethodListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcMethodListValidationError{ field: fmt.Sprintf("Services[%v]", idx), @@ -56,9 +91,30 @@ func (m *GrpcMethodList) Validate() error { } + if len(errors) > 0 { + return GrpcMethodListMultiError(errors) + } + return nil } +// GrpcMethodListMultiError is an error wrapping multiple validation errors +// returned by GrpcMethodList.ValidateAll() if the designated constraints +// aren't met. +type GrpcMethodListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcMethodListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcMethodListMultiError) AllErrors() []error { return m } + // GrpcMethodListValidationError is the validation error returned by // GrpcMethodList.Validate if the designated constraints aren't met. type GrpcMethodListValidationError struct { @@ -115,29 +171,72 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcMethodList_Service) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcMethodList_Service with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcMethodList_ServiceMultiError, or nil if none found. +func (m *GrpcMethodList_Service) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcMethodList_Service) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return GrpcMethodList_ServiceValidationError{ + err := GrpcMethodList_ServiceValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetMethodNames()) < 1 { - return GrpcMethodList_ServiceValidationError{ + err := GrpcMethodList_ServiceValidationError{ field: "MethodNames", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return GrpcMethodList_ServiceMultiError(errors) } return nil } +// GrpcMethodList_ServiceMultiError is an error wrapping multiple validation +// errors returned by GrpcMethodList_Service.ValidateAll() if the designated +// constraints aren't met. +type GrpcMethodList_ServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcMethodList_ServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcMethodList_ServiceMultiError) AllErrors() []error { return m } + // GrpcMethodList_ServiceValidationError is the validation error returned by // GrpcMethodList_Service.Validate if the designated constraints aren't met. type GrpcMethodList_ServiceValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/grpc_service.pb.go b/pkg/api/envoy/api/v2/core/grpc_service.pb.go index 8019561b98..86b745d2b6 100644 --- a/pkg/api/envoy/api/v2/core/grpc_service.pb.go +++ b/pkg/api/envoy/api/v2/core/grpc_service.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/grpc_service.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "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" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC service configuration. This is used by :ref:`ApiConfigSource // ` and filter configurations. // [#next-free-field: 6] @@ -1219,13 +1214,17 @@ var file_envoy_api_v2_core_grpc_service_proto_rawDesc = []byte{ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x17, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, - 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, 0x59, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, 0x93, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/grpc_service.pb.validate.go b/pkg/api/envoy/api/v2/core/grpc_service.pb.validate.go index db2cdd6a58..f729e4e0dc 100644 --- a/pkg/api/envoy/api/v2/core/grpc_service.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcService with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GrpcServiceMultiError, or +// nil if none found. +func (m *GrpcService) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: "Timeout", @@ -54,7 +89,26 @@ func (m *GrpcService) Validate() error { for idx, item := range m.GetInitialMetadata() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: fmt.Sprintf("InitialMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: fmt.Sprintf("InitialMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: fmt.Sprintf("InitialMetadata[%v]", idx), @@ -70,7 +124,26 @@ func (m *GrpcService) Validate() error { case *GrpcService_EnvoyGrpc_: - if v, ok := interface{}(m.GetEnvoyGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnvoyGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "EnvoyGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "EnvoyGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnvoyGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: "EnvoyGrpc", @@ -82,7 +155,26 @@ func (m *GrpcService) Validate() error { case *GrpcService_GoogleGrpc_: - if v, ok := interface{}(m.GetGoogleGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "GoogleGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "GoogleGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: "GoogleGrpc", @@ -93,16 +185,40 @@ func (m *GrpcService) Validate() error { } default: - return GrpcServiceValidationError{ + err := GrpcServiceValidationError{ field: "TargetSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return GrpcServiceMultiError(errors) } return nil } +// GrpcServiceMultiError is an error wrapping multiple validation errors +// returned by GrpcService.ValidateAll() if the designated constraints aren't met. +type GrpcServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcServiceMultiError) AllErrors() []error { return m } + // GrpcServiceValidationError is the validation error returned by // GrpcService.Validate if the designated constraints aren't met. type GrpcServiceValidationError struct { @@ -159,22 +275,61 @@ var _ interface { // Validate checks the field values on GrpcService_EnvoyGrpc with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcService_EnvoyGrpc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService_EnvoyGrpc with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcService_EnvoyGrpcMultiError, or nil if none found. +func (m *GrpcService_EnvoyGrpc) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_EnvoyGrpc) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusterName()) < 1 { - return GrpcService_EnvoyGrpcValidationError{ + err := GrpcService_EnvoyGrpcValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return GrpcService_EnvoyGrpcMultiError(errors) } return nil } +// GrpcService_EnvoyGrpcMultiError is an error wrapping multiple validation +// errors returned by GrpcService_EnvoyGrpc.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_EnvoyGrpcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_EnvoyGrpcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_EnvoyGrpcMultiError) AllErrors() []error { return m } + // GrpcService_EnvoyGrpcValidationError is the validation error returned by // GrpcService_EnvoyGrpc.Validate if the designated constraints aren't met. type GrpcService_EnvoyGrpcValidationError struct { @@ -233,20 +388,57 @@ var _ interface { // Validate checks the field values on GrpcService_GoogleGrpc with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService_GoogleGrpc with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpcMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetTargetUri()) < 1 { - return GrpcService_GoogleGrpcValidationError{ + err := GrpcService_GoogleGrpcValidationError{ field: "TargetUri", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetChannelCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetChannelCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "ChannelCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "ChannelCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetChannelCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: "ChannelCredentials", @@ -259,7 +451,26 @@ func (m *GrpcService_GoogleGrpc) Validate() error { for idx, item := range m.GetCallCredentials() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: fmt.Sprintf("CallCredentials[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: fmt.Sprintf("CallCredentials[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: fmt.Sprintf("CallCredentials[%v]", idx), @@ -272,15 +483,38 @@ func (m *GrpcService_GoogleGrpc) Validate() error { } if len(m.GetStatPrefix()) < 1 { - return GrpcService_GoogleGrpcValidationError{ + err := GrpcService_GoogleGrpcValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for CredentialsFactoryName - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: "Config", @@ -290,9 +524,30 @@ func (m *GrpcService_GoogleGrpc) Validate() error { } } + if len(errors) > 0 { + return GrpcService_GoogleGrpcMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpcMultiError is an error wrapping multiple validation +// errors returned by GrpcService_GoogleGrpc.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpcMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpcValidationError is the validation error returned by // GrpcService_GoogleGrpc.Validate if the designated constraints aren't met. type GrpcService_GoogleGrpcValidationError struct { @@ -351,13 +606,47 @@ var _ interface { // Validate checks the field values on GrpcService_GoogleGrpc_SslCredentials // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService_GoogleGrpc_SslCredentials +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_SslCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_SslCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_SslCredentials) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRootCerts()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRootCerts()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "RootCerts", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "RootCerts", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRootCerts()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_SslCredentialsValidationError{ field: "RootCerts", @@ -367,7 +656,26 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { } } - if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrivateKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_SslCredentialsValidationError{ field: "PrivateKey", @@ -377,7 +685,26 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { } } - if v, ok := interface{}(m.GetCertChain()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCertChain()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "CertChain", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "CertChain", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCertChain()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_SslCredentialsValidationError{ field: "CertChain", @@ -387,9 +714,31 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { } } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_SslCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_SslCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_SslCredentials.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_SslCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_SslCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_SslCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_SslCredentialsValidationError is the validation error // returned by GrpcService_GoogleGrpc_SslCredentials.Validate if the // designated constraints aren't met. @@ -449,15 +798,53 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_GoogleLocalCredentials.ValidateAll() if the +// designated constraints aren't met. +type GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError is the // validation error returned by // GrpcService_GoogleGrpc_GoogleLocalCredentials.Validate if the designated @@ -520,17 +907,52 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// GrpcService_GoogleGrpc_ChannelCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_ChannelCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_ChannelCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.CredentialSpecifier.(type) { case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials: - if v, ok := interface{}(m.GetSslCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSslCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "SslCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "SslCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSslCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "SslCredentials", @@ -542,7 +964,26 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { case *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault: - if v, ok := interface{}(m.GetGoogleDefault()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleDefault()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "GoogleDefault", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "GoogleDefault", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleDefault()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "GoogleDefault", @@ -554,7 +995,26 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { case *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials: - if v, ok := interface{}(m.GetLocalCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "LocalCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "LocalCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "LocalCredentials", @@ -565,16 +1025,42 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { } default: - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + err := GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "CredentialSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_ChannelCredentialsMultiError(errors) } return nil } +// GrpcService_GoogleGrpc_ChannelCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_ChannelCredentials.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_ChannelCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_ChannelCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_ChannelCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_ChannelCredentialsValidationError is the validation // error returned by GrpcService_GoogleGrpc_ChannelCredentials.Validate if the // designated constraints aren't met. @@ -634,12 +1120,28 @@ var _ interface { // Validate checks the field values on GrpcService_GoogleGrpc_CallCredentials // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.CredentialSpecifier.(type) { case *GrpcService_GoogleGrpc_CallCredentials_AccessToken: @@ -647,7 +1149,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine: - if v, ok := interface{}(m.GetGoogleComputeEngine()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleComputeEngine()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleComputeEngine", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleComputeEngine", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleComputeEngine()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "GoogleComputeEngine", @@ -662,7 +1183,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess: - if v, ok := interface{}(m.GetServiceAccountJwtAccess()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetServiceAccountJwtAccess()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "ServiceAccountJwtAccess", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "ServiceAccountJwtAccess", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServiceAccountJwtAccess()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "ServiceAccountJwtAccess", @@ -674,7 +1214,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_GoogleIam: - if v, ok := interface{}(m.GetGoogleIam()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleIam()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleIam", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleIam", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleIam()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "GoogleIam", @@ -686,7 +1245,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_FromPlugin: - if v, ok := interface{}(m.GetFromPlugin()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFromPlugin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "FromPlugin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "FromPlugin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFromPlugin()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "FromPlugin", @@ -698,7 +1276,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_StsService_: - if v, ok := interface{}(m.GetStsService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStsService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "StsService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "StsService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStsService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "StsService", @@ -709,16 +1306,42 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { } default: - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ + err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "CredentialSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentialsMultiError(errors) } return nil } +// GrpcService_GoogleGrpc_CallCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_CallCredentialsValidationError is the validation // error returned by GrpcService_GoogleGrpc_CallCredentials.Validate if the // designated constraints aren't met. @@ -779,19 +1402,60 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError, +// or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for JsonKey // no validation rules for TokenLifetimeSeconds + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError +// is an error wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.ValidateAll() +// if the designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError) AllErrors() []error { + return m +} + // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError // is the validation error returned by // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Validate @@ -861,19 +1525,59 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError, or +// nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for AuthorizationToken // no validation rules for AuthoritySelector + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError is an +// error wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.ValidateAll() +// if the designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError) AllErrors() []error { + return m +} + // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError // is the validation error returned by // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Validate if the @@ -943,19 +1647,55 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError, +// or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.ConfigType.(type) { case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ field: "Config", @@ -967,7 +1707,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) V case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ field: "TypedConfig", @@ -979,9 +1738,33 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) V } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError +// is an error wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.ValidateAll() +// if the designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError) AllErrors() []error { + return m +} + // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError // is the validation error returned by // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Validate @@ -1050,13 +1833,28 @@ var _ interface { // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_StsService with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TokenExchangeServiceUri // no validation rules for Resource @@ -1068,26 +1866,56 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Validate() error { // no validation rules for RequestedTokenType if len(m.GetSubjectTokenPath()) < 1 { - return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ + err := GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ field: "SubjectTokenPath", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetSubjectTokenType()) < 1 { - return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ + err := GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ field: "SubjectTokenType", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ActorTokenPath // no validation rules for ActorTokenType + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError is an error +// wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_StsService.ValidateAll() if the +// designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError is the // validation error returned by // GrpcService_GoogleGrpc_CallCredentials_StsService.Validate if the diff --git a/pkg/api/envoy/api/v2/core/health_check.pb.go b/pkg/api/envoy/api/v2/core/health_check.pb.go index abc04abbe8..7d83f146a2 100644 --- a/pkg/api/envoy/api/v2/core/health_check.pb.go +++ b/pkg/api/envoy/api/v2/core/health_check.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/health_check.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -30,10 +29,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Endpoint health status. type HealthStatus int32 @@ -649,7 +644,7 @@ func (x *HealthCheck_HttpHealthCheck) GetCodecClientType() _type.CodecClientType if x != nil { return x.CodecClientType } - return _type.CodecClientType_HTTP1 + return _type.CodecClientType(0) } func (x *HealthCheck_HttpHealthCheck) GetServiceNameMatcher() *matcher.StringMatcher { @@ -1207,13 +1202,16 @@ var file_envoy_api_v2_core_health_check_proto_rawDesc = []byte{ 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x47, 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, - 0x05, 0x42, 0x59, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x42, 0x93, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/health_check.pb.validate.go b/pkg/api/envoy/api/v2/core/health_check.pb.validate.go index d0d4f1dff8..f2af629887 100644 --- a/pkg/api/envoy/api/v2/core/health_check.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" ) @@ -32,76 +33,136 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = _type.CodecClientType(0) ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HealthCheckMultiError, or +// nil if none found. +func (m *HealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetTimeout() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "Timeout", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "Timeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "Timeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "Timeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if m.GetInterval() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "Interval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "Interval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "Interval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "Interval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetInitialJitter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInitialJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "InitialJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "InitialJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInitialJitter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "InitialJitter", @@ -111,7 +172,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIntervalJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "IntervalJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "IntervalJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "IntervalJitter", @@ -124,13 +204,36 @@ func (m *HealthCheck) Validate() error { // no validation rules for IntervalJitterPercent if m.GetUnhealthyThreshold() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "UnhealthyThreshold", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetUnhealthyThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUnhealthyThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "UnhealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "UnhealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUnhealthyThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "UnhealthyThreshold", @@ -141,13 +244,36 @@ func (m *HealthCheck) Validate() error { } if m.GetHealthyThreshold() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "HealthyThreshold", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHealthyThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthyThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthyThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "HealthyThreshold", @@ -157,7 +283,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetAltPort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAltPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "AltPort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "AltPort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAltPort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "AltPort", @@ -167,7 +312,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetReuseConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetReuseConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "ReuseConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "ReuseConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetReuseConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "ReuseConnection", @@ -178,92 +342,147 @@ func (m *HealthCheck) Validate() error { } if d := m.GetNoTrafficInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "NoTrafficInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "NoTrafficInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "NoTrafficInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetUnhealthyInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "UnhealthyInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "UnhealthyInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "UnhealthyInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetUnhealthyEdgeInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "UnhealthyEdgeInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "UnhealthyEdgeInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "UnhealthyEdgeInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetHealthyEdgeInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "HealthyEdgeInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "HealthyEdgeInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "HealthyEdgeInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } // no validation rules for EventLogPath - if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEventService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "EventService", @@ -275,7 +494,26 @@ func (m *HealthCheck) Validate() error { // no validation rules for AlwaysLogHealthCheckFailures - if v, ok := interface{}(m.GetTlsOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TlsOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TlsOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "TlsOptions", @@ -289,7 +527,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_HttpHealthCheck_: - if v, ok := interface{}(m.GetHttpHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HttpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HttpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "HttpHealthCheck", @@ -301,7 +558,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_TcpHealthCheck_: - if v, ok := interface{}(m.GetTcpHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTcpHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TcpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TcpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "TcpHealthCheck", @@ -313,7 +589,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_GrpcHealthCheck_: - if v, ok := interface{}(m.GetGrpcHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "GrpcHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "GrpcHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "GrpcHealthCheck", @@ -325,7 +620,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_CustomHealthCheck_: - if v, ok := interface{}(m.GetCustomHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCustomHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CustomHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CustomHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "CustomHealthCheck", @@ -336,16 +650,40 @@ func (m *HealthCheck) Validate() error { } default: - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "HealthChecker", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HealthCheckMultiError(errors) } return nil } +// HealthCheckMultiError is an error wrapping multiple validation errors +// returned by HealthCheck.ValidateAll() if the designated constraints aren't met. +type HealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckMultiError) AllErrors() []error { return m } + // HealthCheckValidationError is the validation error returned by // HealthCheck.Validate if the designated constraints aren't met. type HealthCheckValidationError struct { @@ -402,37 +740,80 @@ var _ interface { // Validate checks the field values on HealthCheck_Payload with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_Payload) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_Payload with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_PayloadMultiError, or nil if none found. +func (m *HealthCheck_Payload) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_Payload) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Payload.(type) { case *HealthCheck_Payload_Text: if len(m.GetText()) < 1 { - return HealthCheck_PayloadValidationError{ + err := HealthCheck_PayloadValidationError{ field: "Text", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *HealthCheck_Payload_Binary: // no validation rules for Binary default: - return HealthCheck_PayloadValidationError{ + err := HealthCheck_PayloadValidationError{ field: "Payload", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return HealthCheck_PayloadMultiError(errors) + } + return nil } +// HealthCheck_PayloadMultiError is an error wrapping multiple validation +// errors returned by HealthCheck_Payload.ValidateAll() if the designated +// constraints aren't met. +type HealthCheck_PayloadMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_PayloadMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_PayloadMultiError) AllErrors() []error { return m } + // HealthCheck_PayloadValidationError is the validation error returned by // HealthCheck_Payload.Validate if the designated constraints aren't met. type HealthCheck_PayloadValidationError struct { @@ -491,22 +872,59 @@ var _ interface { // Validate checks the field values on HealthCheck_HttpHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_HttpHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_HttpHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_HttpHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_HttpHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_HttpHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Host if len(m.GetPath()) < 1 { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSend()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Send", @@ -516,7 +934,26 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetReceive()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetReceive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Receive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Receive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetReceive()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Receive", @@ -529,16 +966,39 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { // no validation rules for ServiceName if len(m.GetRequestHeadersToAdd()) > 1000 { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -555,7 +1015,26 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { for idx, item := range m.GetExpectedStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("ExpectedStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("ExpectedStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("ExpectedStatuses[%v]", idx), @@ -568,13 +1047,36 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } if _, ok := _type.CodecClientType_name[int32(m.GetCodecClientType())]; !ok { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "CodecClientType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetServiceNameMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetServiceNameMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "ServiceNameMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "ServiceNameMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServiceNameMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "ServiceNameMatcher", @@ -584,9 +1086,30 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } } + if len(errors) > 0 { + return HealthCheck_HttpHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_HttpHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_HttpHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_HttpHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_HttpHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_HttpHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_HttpHealthCheckValidationError is the validation error returned // by HealthCheck_HttpHealthCheck.Validate if the designated constraints // aren't met. @@ -646,13 +1169,46 @@ var _ interface { // Validate checks the field values on HealthCheck_TcpHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_TcpHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_TcpHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_TcpHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_TcpHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_TcpHealthCheck) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSend()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: "Send", @@ -665,7 +1221,26 @@ func (m *HealthCheck_TcpHealthCheck) Validate() error { for idx, item := range m.GetReceive() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: fmt.Sprintf("Receive[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: fmt.Sprintf("Receive[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: fmt.Sprintf("Receive[%v]", idx), @@ -677,9 +1252,30 @@ func (m *HealthCheck_TcpHealthCheck) Validate() error { } + if len(errors) > 0 { + return HealthCheck_TcpHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_TcpHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_TcpHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_TcpHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_TcpHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_TcpHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_TcpHealthCheckValidationError is the validation error returned // by HealthCheck_TcpHealthCheck.Validate if the designated constraints aren't met. type HealthCheck_TcpHealthCheckValidationError struct { @@ -738,17 +1334,52 @@ var _ interface { // Validate checks the field values on HealthCheck_RedisHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_RedisHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_RedisHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_RedisHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_RedisHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_RedisHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Key + if len(errors) > 0 { + return HealthCheck_RedisHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_RedisHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_RedisHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_RedisHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_RedisHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_RedisHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_RedisHealthCheckValidationError is the validation error returned // by HealthCheck_RedisHealthCheck.Validate if the designated constraints // aren't met. @@ -808,19 +1439,54 @@ var _ interface { // Validate checks the field values on HealthCheck_GrpcHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_GrpcHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_GrpcHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_GrpcHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_GrpcHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_GrpcHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ServiceName // no validation rules for Authority + if len(errors) > 0 { + return HealthCheck_GrpcHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_GrpcHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_GrpcHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_GrpcHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_GrpcHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_GrpcHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_GrpcHealthCheckValidationError is the validation error returned // by HealthCheck_GrpcHealthCheck.Validate if the designated constraints // aren't met. @@ -880,24 +1546,61 @@ var _ interface { // Validate checks the field values on HealthCheck_CustomHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_CustomHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_CustomHealthCheck with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// HealthCheck_CustomHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_CustomHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_CustomHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return HealthCheck_CustomHealthCheckValidationError{ + err := HealthCheck_CustomHealthCheckValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *HealthCheck_CustomHealthCheck_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_CustomHealthCheckValidationError{ field: "Config", @@ -909,7 +1612,26 @@ func (m *HealthCheck_CustomHealthCheck) Validate() error { case *HealthCheck_CustomHealthCheck_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_CustomHealthCheckValidationError{ field: "TypedConfig", @@ -921,9 +1643,30 @@ func (m *HealthCheck_CustomHealthCheck) Validate() error { } + if len(errors) > 0 { + return HealthCheck_CustomHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_CustomHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_CustomHealthCheck.ValidateAll() +// if the designated constraints aren't met. +type HealthCheck_CustomHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_CustomHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_CustomHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_CustomHealthCheckValidationError is the validation error // returned by HealthCheck_CustomHealthCheck.Validate if the designated // constraints aren't met. @@ -983,15 +1726,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_TlsOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_TlsOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_TlsOptionsMultiError, or nil if none found. +func (m *HealthCheck_TlsOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_TlsOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return HealthCheck_TlsOptionsMultiError(errors) + } + return nil } +// HealthCheck_TlsOptionsMultiError is an error wrapping multiple validation +// errors returned by HealthCheck_TlsOptions.ValidateAll() if the designated +// constraints aren't met. +type HealthCheck_TlsOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_TlsOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_TlsOptionsMultiError) AllErrors() []error { return m } + // HealthCheck_TlsOptionsValidationError is the validation error returned by // HealthCheck_TlsOptions.Validate if the designated constraints aren't met. type HealthCheck_TlsOptionsValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/http_uri.pb.go b/pkg/api/envoy/api/v2/core/http_uri.pb.go index 04e680eaa5..4b8c617c63 100644 --- a/pkg/api/envoy/api/v2/core/http_uri.pb.go +++ b/pkg/api/envoy/api/v2/core/http_uri.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/http_uri.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Envoy external URI descriptor type HttpUri struct { state protoimpl.MessageState @@ -158,13 +153,16 @@ var file_envoy_api_v2_core_http_uri_proto_rawDesc = []byte{ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x32, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x19, 0x0a, 0x12, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x55, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, - 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x8f, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x55, + 0x72, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/http_uri.pb.validate.go b/pkg/api/envoy/api/v2/core/http_uri.pb.validate.go index e6b859ab47..35c1542cce 100644 --- a/pkg/api/envoy/api/v2/core/http_uri.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,49 +31,81 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpUri with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpUri) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpUri with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in HttpUriMultiError, or nil if none found. +func (m *HttpUri) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpUri) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetUri()) < 1 { - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "Uri", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetTimeout() == nil { - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "Timeout", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HttpUriValidationError{ + err = 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", + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := HttpUriValidationError{ + field: "Timeout", + reason: "value must be greater than or equal to 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } switch m.HttpUpstreamType.(type) { @@ -80,23 +113,51 @@ func (m *HttpUri) Validate() error { case *HttpUri_Cluster: if len(m.GetCluster()) < 1 { - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } default: - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "HttpUpstreamType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HttpUriMultiError(errors) } return nil } +// HttpUriMultiError is an error wrapping multiple validation errors returned +// by HttpUri.ValidateAll() if the designated constraints aren't met. +type HttpUriMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpUriMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpUriMultiError) AllErrors() []error { return m } + // HttpUriValidationError is the validation error returned by HttpUri.Validate // if the designated constraints aren't met. type HttpUriValidationError struct { diff --git a/pkg/api/envoy/api/v2/core/protocol.pb.go b/pkg/api/envoy/api/v2/core/protocol.pb.go index 5f7de0f751..7d25d252fb 100644 --- a/pkg/api/envoy/api/v2/core/protocol.pb.go +++ b/pkg/api/envoy/api/v2/core/protocol.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/protocol.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Action to take when Envoy receives client request with header names containing underscore // characters. // Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented @@ -770,7 +765,7 @@ type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ struct { } type Http1ProtocolOptions_HeaderKeyFormat_Custom_ struct { - // Formats the header according to custom rules. + // Formats the header according to custom rules Custom *Http1ProtocolOptions_HeaderKeyFormat_Custom `protobuf:"bytes,2,opt,name=custom,proto3,oneof"` } @@ -818,6 +813,8 @@ func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Descriptor() ([]byt return file_envoy_api_v2_core_protocol_proto_rawDescGZIP(), []int{3, 0, 0} } +// custom message is datawire code +// remove if possible type Http1ProtocolOptions_HeaderKeyFormat_Custom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1132,13 +1129,17 @@ var file_envoy_api_v2_core_protocol_proto_rawDesc = []byte{ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x56, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, - 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x90, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/protocol.pb.validate.go b/pkg/api/envoy/api/v2/core/protocol.pb.validate.go index efdc6b1cd4..faf867b8ff 100644 --- a/pkg/api/envoy/api/v2/core/protocol.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TcpProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpProtocolOptionsMultiError, or nil if none found. +func (m *TcpProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProtocolOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return TcpProtocolOptionsMultiError(errors) + } + return nil } +// TcpProtocolOptionsMultiError is an error wrapping multiple validation errors +// returned by TcpProtocolOptions.ValidateAll() if the designated constraints +// aren't met. +type TcpProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProtocolOptionsMultiError) AllErrors() []error { return m } + // TcpProtocolOptionsValidationError is the validation error returned by // TcpProtocolOptions.Validate if the designated constraints aren't met. type TcpProtocolOptionsValidationError struct { @@ -102,19 +139,54 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamHttpProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamHttpProtocolOptions with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamHttpProtocolOptionsMultiError, or nil if none found. +func (m *UpstreamHttpProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamHttpProtocolOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for AutoSni // no validation rules for AutoSanValidation + if len(errors) > 0 { + return UpstreamHttpProtocolOptionsMultiError(errors) + } + return nil } +// UpstreamHttpProtocolOptionsMultiError is an error wrapping multiple +// validation errors returned by UpstreamHttpProtocolOptions.ValidateAll() if +// the designated constraints aren't met. +type UpstreamHttpProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamHttpProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamHttpProtocolOptionsMultiError) AllErrors() []error { return m } + // UpstreamHttpProtocolOptionsValidationError is the validation error returned // by UpstreamHttpProtocolOptions.Validate if the designated constraints // aren't met. @@ -174,13 +246,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpProtocolOptionsMultiError, or nil if none found. +func (m *HttpProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "IdleTimeout", @@ -190,7 +295,26 @@ func (m *HttpProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetMaxConnectionDuration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxConnectionDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxConnectionDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxConnectionDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConnectionDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "MaxConnectionDuration", @@ -203,15 +327,38 @@ func (m *HttpProtocolOptions) Validate() error { if wrapper := m.GetMaxHeadersCount(); wrapper != nil { if wrapper.GetValue() < 1 { - return HttpProtocolOptionsValidationError{ + err := HttpProtocolOptionsValidationError{ field: "MaxHeadersCount", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxStreamDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "MaxStreamDuration", @@ -223,9 +370,30 @@ func (m *HttpProtocolOptions) Validate() error { // no validation rules for HeadersWithUnderscoresAction + if len(errors) > 0 { + return HttpProtocolOptionsMultiError(errors) + } + return nil } +// HttpProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by HttpProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type HttpProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpProtocolOptionsMultiError) AllErrors() []error { return m } + // HttpProtocolOptionsValidationError is the validation error returned by // HttpProtocolOptions.Validate if the designated constraints aren't met. type HttpProtocolOptionsValidationError struct { @@ -284,13 +452,46 @@ var _ interface { // Validate checks the field values on Http1ProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Http1ProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http1ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Http1ProtocolOptionsMultiError, or nil if none found. +func (m *Http1ProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAllowAbsoluteUrl()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAllowAbsoluteUrl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "AllowAbsoluteUrl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "AllowAbsoluteUrl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowAbsoluteUrl()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptionsValidationError{ field: "AllowAbsoluteUrl", @@ -304,7 +505,26 @@ func (m *Http1ProtocolOptions) Validate() error { // no validation rules for DefaultHostForHttp_10 - if v, ok := interface{}(m.GetHeaderKeyFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderKeyFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "HeaderKeyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "HeaderKeyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderKeyFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptionsValidationError{ field: "HeaderKeyFormat", @@ -316,9 +536,30 @@ func (m *Http1ProtocolOptions) Validate() error { // no validation rules for EnableTrailers + if len(errors) > 0 { + return Http1ProtocolOptionsMultiError(errors) + } + return nil } +// Http1ProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by Http1ProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type Http1ProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptionsMultiError) AllErrors() []error { return m } + // Http1ProtocolOptionsValidationError is the validation error returned by // Http1ProtocolOptions.Validate if the designated constraints aren't met. type Http1ProtocolOptionsValidationError struct { @@ -377,13 +618,46 @@ var _ interface { // Validate checks the field values on Http2ProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Http2ProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http2ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Http2ProtocolOptionsMultiError, or nil if none found. +func (m *Http2ProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *Http2ProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHpackTableSize()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHpackTableSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "HpackTableSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "HpackTableSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHpackTableSize()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptionsValidationError{ field: "HpackTableSize", @@ -396,10 +670,14 @@ func (m *Http2ProtocolOptions) Validate() error { if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ + err := Http2ProtocolOptionsValidationError{ field: "MaxConcurrentStreams", reason: "value must be inside range [1, 2147483647]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -407,10 +685,14 @@ func (m *Http2ProtocolOptions) Validate() error { if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ + err := Http2ProtocolOptionsValidationError{ field: "InitialStreamWindowSize", reason: "value must be inside range [65535, 2147483647]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -418,10 +700,14 @@ func (m *Http2ProtocolOptions) Validate() error { if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ + err := Http2ProtocolOptionsValidationError{ field: "InitialConnectionWindowSize", reason: "value must be inside range [65535, 2147483647]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -433,10 +719,14 @@ func (m *Http2ProtocolOptions) Validate() error { if wrapper := m.GetMaxOutboundFrames(); wrapper != nil { if wrapper.GetValue() < 1 { - return Http2ProtocolOptionsValidationError{ + err := Http2ProtocolOptionsValidationError{ field: "MaxOutboundFrames", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } @@ -444,15 +734,38 @@ func (m *Http2ProtocolOptions) Validate() error { if wrapper := m.GetMaxOutboundControlFrames(); wrapper != nil { if wrapper.GetValue() < 1 { - return Http2ProtocolOptionsValidationError{ + err := Http2ProtocolOptionsValidationError{ field: "MaxOutboundControlFrames", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetMaxConsecutiveInboundFramesWithEmptyPayload()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxConsecutiveInboundFramesWithEmptyPayload()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxConsecutiveInboundFramesWithEmptyPayload", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxConsecutiveInboundFramesWithEmptyPayload", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConsecutiveInboundFramesWithEmptyPayload()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptionsValidationError{ field: "MaxConsecutiveInboundFramesWithEmptyPayload", @@ -462,7 +775,26 @@ func (m *Http2ProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetMaxInboundPriorityFramesPerStream()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxInboundPriorityFramesPerStream()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxInboundPriorityFramesPerStream", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxInboundPriorityFramesPerStream", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxInboundPriorityFramesPerStream()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptionsValidationError{ field: "MaxInboundPriorityFramesPerStream", @@ -475,10 +807,14 @@ func (m *Http2ProtocolOptions) Validate() error { if wrapper := m.GetMaxInboundWindowUpdateFramesPerDataFrameSent(); wrapper != nil { if wrapper.GetValue() < 1 { - return Http2ProtocolOptionsValidationError{ + err := Http2ProtocolOptionsValidationError{ field: "MaxInboundWindowUpdateFramesPerDataFrameSent", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } @@ -488,7 +824,26 @@ func (m *Http2ProtocolOptions) Validate() error { for idx, item := range m.GetCustomSettingsParameters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptionsValidationError{ field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), @@ -500,9 +855,30 @@ func (m *Http2ProtocolOptions) Validate() error { } + if len(errors) > 0 { + return Http2ProtocolOptionsMultiError(errors) + } + return nil } +// Http2ProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by Http2ProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type Http2ProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http2ProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http2ProtocolOptionsMultiError) AllErrors() []error { return m } + // Http2ProtocolOptionsValidationError is the validation error returned by // Http2ProtocolOptions.Validate if the designated constraints aren't met. type Http2ProtocolOptionsValidationError struct { @@ -561,13 +937,46 @@ var _ interface { // Validate checks the field values on GrpcProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcProtocolOptionsMultiError, or nil if none found. +func (m *GrpcProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcProtocolOptionsValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcProtocolOptionsValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcProtocolOptionsValidationError{ field: "Http2ProtocolOptions", @@ -577,9 +986,30 @@ func (m *GrpcProtocolOptions) Validate() error { } } + if len(errors) > 0 { + return GrpcProtocolOptionsMultiError(errors) + } + return nil } +// GrpcProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by GrpcProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type GrpcProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcProtocolOptionsMultiError) AllErrors() []error { return m } + // GrpcProtocolOptionsValidationError is the validation error returned by // GrpcProtocolOptions.Validate if the designated constraints aren't met. type GrpcProtocolOptionsValidationError struct { @@ -638,17 +1068,51 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http1ProtocolOptions_HeaderKeyFormat +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Http1ProtocolOptions_HeaderKeyFormatMultiError, or nil if none found. +func (m *Http1ProtocolOptions_HeaderKeyFormat) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.HeaderFormat.(type) { case *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_: - if v, ok := interface{}(m.GetProperCaseWords()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProperCaseWords()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "ProperCaseWords", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "ProperCaseWords", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProperCaseWords()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptions_HeaderKeyFormatValidationError{ field: "ProperCaseWords", @@ -660,7 +1124,26 @@ func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { case *Http1ProtocolOptions_HeaderKeyFormat_Custom_: - if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCustom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "Custom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "Custom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptions_HeaderKeyFormatValidationError{ field: "Custom", @@ -671,16 +1154,42 @@ func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { } default: - return Http1ProtocolOptions_HeaderKeyFormatValidationError{ + err := Http1ProtocolOptions_HeaderKeyFormatValidationError{ field: "HeaderFormat", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return Http1ProtocolOptions_HeaderKeyFormatMultiError(errors) + } + return nil } +// Http1ProtocolOptions_HeaderKeyFormatMultiError is an error wrapping multiple +// validation errors returned by +// Http1ProtocolOptions_HeaderKeyFormat.ValidateAll() if the designated +// constraints aren't met. +type Http1ProtocolOptions_HeaderKeyFormatMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptions_HeaderKeyFormatMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptions_HeaderKeyFormatMultiError) AllErrors() []error { return m } + // Http1ProtocolOptions_HeaderKeyFormatValidationError is the validation error // returned by Http1ProtocolOptions_HeaderKeyFormat.Validate if the designated // constraints aren't met. @@ -740,16 +1249,54 @@ var _ interface { // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError, or nil if +// none found. +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError(errors) + } + return nil } +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError is an error +// wrapping multiple validation errors returned by +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.ValidateAll() if the +// designated constraints aren't met. +type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError) AllErrors() []error { return m } + // Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError is the // validation error returned by // Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.Validate if the @@ -816,17 +1363,55 @@ var _ interface { // Validate checks the field values on // Http1ProtocolOptions_HeaderKeyFormat_Custom with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Http1ProtocolOptions_HeaderKeyFormat_Custom) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Http1ProtocolOptions_HeaderKeyFormat_Custom with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError, or nil if none found. +func (m *Http1ProtocolOptions_HeaderKeyFormat_Custom) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat_Custom) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Rules + if len(errors) > 0 { + return Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError(errors) + } + return nil } +// Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError is an error wrapping +// multiple validation errors returned by +// Http1ProtocolOptions_HeaderKeyFormat_Custom.ValidateAll() if the designated +// constraints aren't met. +type Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError) AllErrors() []error { return m } + // Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError is the validation // error returned by Http1ProtocolOptions_HeaderKeyFormat_Custom.Validate if // the designated constraints aren't met. @@ -886,36 +1471,83 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Http2ProtocolOptions_SettingsParameter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Http2ProtocolOptions_SettingsParameter with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// Http2ProtocolOptions_SettingsParameterMultiError, or nil if none found. +func (m *Http2ProtocolOptions_SettingsParameter) ValidateAll() error { + return m.validate(true) +} + +func (m *Http2ProtocolOptions_SettingsParameter) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetIdentifier(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 65536 { - return Http2ProtocolOptions_SettingsParameterValidationError{ + err := Http2ProtocolOptions_SettingsParameterValidationError{ field: "Identifier", reason: "value must be inside range [1, 65536]", } + if !all { + return err + } + errors = append(errors, err) } } else { - return Http2ProtocolOptions_SettingsParameterValidationError{ + err := Http2ProtocolOptions_SettingsParameterValidationError{ field: "Identifier", reason: "value is required and must not be nil.", } + if !all { + return err + } + errors = append(errors, err) } if m.GetValue() == nil { - return Http2ProtocolOptions_SettingsParameterValidationError{ + err := Http2ProtocolOptions_SettingsParameterValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptions_SettingsParameterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptions_SettingsParameterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptions_SettingsParameterValidationError{ field: "Value", @@ -925,9 +1557,31 @@ func (m *Http2ProtocolOptions_SettingsParameter) Validate() error { } } + if len(errors) > 0 { + return Http2ProtocolOptions_SettingsParameterMultiError(errors) + } + return nil } +// Http2ProtocolOptions_SettingsParameterMultiError is an error wrapping +// multiple validation errors returned by +// Http2ProtocolOptions_SettingsParameter.ValidateAll() if the designated +// constraints aren't met. +type Http2ProtocolOptions_SettingsParameterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http2ProtocolOptions_SettingsParameterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http2ProtocolOptions_SettingsParameterMultiError) AllErrors() []error { return m } + // Http2ProtocolOptions_SettingsParameterValidationError is the validation // error returned by Http2ProtocolOptions_SettingsParameter.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/api/v2/core/socket_option.pb.go b/pkg/api/envoy/api/v2/core/socket_option.pb.go index 13b7a051b6..e26207556a 100644 --- a/pkg/api/envoy/api/v2/core/socket_option.pb.go +++ b/pkg/api/envoy/api/v2/core/socket_option.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/core/socket_option.proto -package envoy_api_v2_core +package core import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SocketOption_SocketState int32 const ( @@ -234,13 +229,16 @@ var file_envoy_api_v2_core_socket_option_proto_rawDesc = []byte{ 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0x0c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x42, 0x5a, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x42, 0x11, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x94, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x42, 0x11, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/core/socket_option.pb.validate.go b/pkg/api/envoy/api/v2/core/socket_option.pb.validate.go index 4af8a7bc92..1dac04b6a2 100644 --- a/pkg/api/envoy/api/v2/core/socket_option.pb.validate.go +++ b/pkg/api/envoy/api/v2/core/socket_option.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/socket_option.proto -package envoy_api_v2_core +package core import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SocketOption with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SocketOption) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketOption with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SocketOptionMultiError, or +// nil if none found. +func (m *SocketOption) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketOption) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Description // no validation rules for Level @@ -48,10 +64,14 @@ func (m *SocketOption) Validate() error { // no validation rules for Name if _, ok := SocketOption_SocketState_name[int32(m.GetState())]; !ok { - return SocketOptionValidationError{ + err := SocketOptionValidationError{ field: "State", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.Value.(type) { @@ -63,16 +83,40 @@ func (m *SocketOption) Validate() error { // no validation rules for BufValue default: - return SocketOptionValidationError{ + err := SocketOptionValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return SocketOptionMultiError(errors) + } + return nil } +// SocketOptionMultiError is an error wrapping multiple validation errors +// returned by SocketOption.ValidateAll() if the designated constraints aren't met. +type SocketOptionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketOptionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketOptionMultiError) AllErrors() []error { return m } + // SocketOptionValidationError is the validation error returned by // SocketOption.Validate if the designated constraints aren't met. type SocketOptionValidationError struct { diff --git a/pkg/api/envoy/api/v2/discovery.pb.go b/pkg/api/envoy/api/v2/discovery.pb.go index b4c8dea59e..a4c5828666 100644 --- a/pkg/api/envoy/api/v2/discovery.pb.go +++ b/pkg/api/envoy/api/v2/discovery.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/discovery.proto -package envoy_api_v2 +package apiv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A DiscoveryRequest requests a set of versioned resources of the same type for // a given Envoy node on some API. // [#next-free-field: 7] @@ -696,13 +691,17 @@ var file_envoy_api_v2_discovery_proto_rawDesc = []byte{ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x58, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1c, 0x12, 0x1a, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x93, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, + 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1c, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/discovery.pb.validate.go b/pkg/api/envoy/api/v2/discovery.pb.validate.go index ef58e03168..ddf87860d4 100644 --- a/pkg/api/envoy/api/v2/discovery.pb.validate.go +++ b/pkg/api/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 envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *DiscoveryRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DiscoveryRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DiscoveryRequestMultiError, or nil if none found. +func (m *DiscoveryRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *DiscoveryRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryRequestValidationError{ field: "Node", @@ -57,7 +92,26 @@ func (m *DiscoveryRequest) Validate() error { // no validation rules for ResponseNonce - if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetErrorDetail()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryRequestValidationError{ field: "ErrorDetail", @@ -67,9 +121,30 @@ func (m *DiscoveryRequest) Validate() error { } } + if len(errors) > 0 { + return DiscoveryRequestMultiError(errors) + } + return nil } +// DiscoveryRequestMultiError is an error wrapping multiple validation errors +// returned by DiscoveryRequest.ValidateAll() if the designated constraints +// aren't met. +type DiscoveryRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DiscoveryRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DiscoveryRequestMultiError) AllErrors() []error { return m } + // DiscoveryRequestValidationError is the validation error returned by // DiscoveryRequest.Validate if the designated constraints aren't met. type DiscoveryRequestValidationError struct { @@ -125,19 +200,52 @@ var _ interface { } = DiscoveryRequestValidationError{} // Validate checks the field values on DiscoveryResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *DiscoveryResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DiscoveryResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DiscoveryResponseMultiError, or nil if none found. +func (m *DiscoveryResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DiscoveryResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo for idx, item := range m.GetResources() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryResponseValidationError{ field: fmt.Sprintf("Resources[%v]", idx), @@ -155,7 +263,26 @@ func (m *DiscoveryResponse) Validate() error { // no validation rules for Nonce - if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetControlPlane()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: "ControlPlane", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: "ControlPlane", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryResponseValidationError{ field: "ControlPlane", @@ -165,9 +292,30 @@ func (m *DiscoveryResponse) Validate() error { } } + if len(errors) > 0 { + return DiscoveryResponseMultiError(errors) + } + return nil } +// DiscoveryResponseMultiError is an error wrapping multiple validation errors +// returned by DiscoveryResponse.ValidateAll() if the designated constraints +// aren't met. +type DiscoveryResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DiscoveryResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DiscoveryResponseMultiError) AllErrors() []error { return m } + // DiscoveryResponseValidationError is the validation error returned by // DiscoveryResponse.Validate if the designated constraints aren't met. type DiscoveryResponseValidationError struct { @@ -226,13 +374,46 @@ var _ interface { // Validate checks the field values on DeltaDiscoveryRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DeltaDiscoveryRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeltaDiscoveryRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeltaDiscoveryRequestMultiError, or nil if none found. +func (m *DeltaDiscoveryRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *DeltaDiscoveryRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeltaDiscoveryRequestValidationError{ field: "Node", @@ -248,7 +429,26 @@ func (m *DeltaDiscoveryRequest) Validate() error { // no validation rules for ResponseNonce - if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetErrorDetail()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeltaDiscoveryRequestValidationError{ field: "ErrorDetail", @@ -258,9 +458,30 @@ func (m *DeltaDiscoveryRequest) Validate() error { } } + if len(errors) > 0 { + return DeltaDiscoveryRequestMultiError(errors) + } + return nil } +// DeltaDiscoveryRequestMultiError is an error wrapping multiple validation +// errors returned by DeltaDiscoveryRequest.ValidateAll() if the designated +// constraints aren't met. +type DeltaDiscoveryRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeltaDiscoveryRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeltaDiscoveryRequestMultiError) AllErrors() []error { return m } + // DeltaDiscoveryRequestValidationError is the validation error returned by // DeltaDiscoveryRequest.Validate if the designated constraints aren't met. type DeltaDiscoveryRequestValidationError struct { @@ -319,18 +540,51 @@ var _ interface { // Validate checks the field values on DeltaDiscoveryResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DeltaDiscoveryResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeltaDiscoveryResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeltaDiscoveryResponseMultiError, or nil if none found. +func (m *DeltaDiscoveryResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DeltaDiscoveryResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SystemVersionInfo for idx, item := range m.GetResources() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeltaDiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeltaDiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeltaDiscoveryResponseValidationError{ field: fmt.Sprintf("Resources[%v]", idx), @@ -346,9 +600,30 @@ func (m *DeltaDiscoveryResponse) Validate() error { // no validation rules for Nonce + if len(errors) > 0 { + return DeltaDiscoveryResponseMultiError(errors) + } + return nil } +// DeltaDiscoveryResponseMultiError is an error wrapping multiple validation +// errors returned by DeltaDiscoveryResponse.ValidateAll() if the designated +// constraints aren't met. +type DeltaDiscoveryResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeltaDiscoveryResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeltaDiscoveryResponseMultiError) AllErrors() []error { return m } + // DeltaDiscoveryResponseValidationError is the validation error returned by // DeltaDiscoveryResponse.Validate if the designated constraints aren't met. type DeltaDiscoveryResponseValidationError struct { @@ -406,17 +681,51 @@ var _ interface { } = DeltaDiscoveryResponseValidationError{} // Validate checks the field values on Resource with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Resource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Resource with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResourceMultiError, or nil +// if none found. +func (m *Resource) ValidateAll() error { + return m.validate(true) +} + +func (m *Resource) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for Version - if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResourceValidationError{ field: "Resource", @@ -426,9 +735,29 @@ func (m *Resource) Validate() error { } } + if len(errors) > 0 { + return ResourceMultiError(errors) + } + return nil } +// ResourceMultiError is an error wrapping multiple validation errors returned +// by Resource.ValidateAll() if the designated constraints aren't met. +type ResourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceMultiError) AllErrors() []error { return m } + // ResourceValidationError is the validation error returned by // Resource.Validate if the designated constraints aren't met. type ResourceValidationError struct { diff --git a/pkg/api/envoy/api/v2/eds.pb.go b/pkg/api/envoy/api/v2/eds.pb.go index 682b688e8a..bb961ff2f3 100644 --- a/pkg/api/envoy/api/v2/eds.pb.go +++ b/pkg/api/envoy/api/v2/eds.pb.go @@ -1,19 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/eds.proto -package envoy_api_v2 +package apiv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - 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" codes "google.golang.org/grpc/codes" @@ -31,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type EdsDummy struct { @@ -84,51 +76,49 @@ var file_envoy_api_v2_eds_proto_rawDesc = []byte{ 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x64, 0x73, - 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0x80, 0x03, 0x0a, 0x18, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0e, - 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x7b, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x17, 0x2f, 0x76, 0x32, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x2a, 0x8a, 0xa4, - 0x96, 0xf3, 0x07, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x54, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x45, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1b, 0x12, 0x19, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x08, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0x80, 0x03, 0x0a, + 0x18, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, + 0x01, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7b, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x22, 0x17, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x3a, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, + 0x3a, 0x01, 0x2a, 0x1a, 0x2a, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, + 0x8f, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, + 0x45, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1b, 0x12, 0x19, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/eds.pb.validate.go b/pkg/api/envoy/api/v2/eds.pb.validate.go index a8bb716bbf..1f701fd911 100644 --- a/pkg/api/envoy/api/v2/eds.pb.validate.go +++ b/pkg/api/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 envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *EdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EdsDummyMultiError, or nil +// if none found. +func (m *EdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *EdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return EdsDummyMultiError(errors) + } + return nil } +// EdsDummyMultiError is an error wrapping multiple validation errors returned +// by EdsDummy.ValidateAll() if the designated constraints aren't met. +type EdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EdsDummyMultiError) AllErrors() []error { return m } + // EdsDummyValidationError is the validation error returned by // EdsDummy.Validate if the designated constraints aren't met. type EdsDummyValidationError struct { diff --git a/pkg/api/envoy/api/v2/endpoint.pb.go b/pkg/api/envoy/api/v2/endpoint.pb.go index 4c212b6f41..a777c8c4fc 100644 --- a/pkg/api/envoy/api/v2/endpoint.pb.go +++ b/pkg/api/envoy/api/v2/endpoint.pb.go @@ -1,20 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/endpoint.proto -package envoy_api_v2 +package apiv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -28,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Each route from RDS will map to a single cluster or traffic split across // clusters using weights expressed in the RDS WeightedCluster. // @@ -311,80 +305,82 @@ var file_envoy_api_v2_endpoint_proto_rawDesc = []byte{ 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x06, 0x0a, - 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, - 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0f, - 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, - 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, - 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x42, - 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x1a, 0xe1, 0x03, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5e, 0x0a, - 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, - 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, - 0x64, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x5e, 0x0a, - 0x17, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x16, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x55, 0x0a, - 0x14, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x5f, - 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, - 0x52, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x6c, 0x65, 0x41, - 0x66, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x17, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x1a, 0x7b, 0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x0f, 0x64, 0x72, 0x6f, 0x70, - 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x1a, 0x62, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x55, 0x0a, 0x1a, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, - 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, + 0x06, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x60, + 0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, + 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x12, 0x42, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xe1, 0x03, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x5e, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, + 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, + 0x5e, 0x0a, 0x17, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x16, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x55, 0x0a, 0x14, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6c, + 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, + 0x2a, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x6c, + 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x17, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0x7b, 0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, + 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, + 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x0f, 0x64, 0x72, + 0x6f, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x1a, 0x62, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, + 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x90, 0x01, 0x0a, + 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/endpoint.pb.validate.go b/pkg/api/envoy/api/v2/endpoint.pb.validate.go index 33b7b36d45..6164e74e87 100644 --- a/pkg/api/envoy/api/v2/endpoint.pb.validate.go +++ b/pkg/api/envoy/api/v2/endpoint.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/endpoint.proto -package envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterLoadAssignment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterLoadAssignment with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterLoadAssignmentMultiError, or nil if none found. +func (m *ClusterLoadAssignment) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterLoadAssignment) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusterName()) < 1 { - return ClusterLoadAssignmentValidationError{ + err := ClusterLoadAssignmentValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignmentValidationError{ field: fmt.Sprintf("Endpoints[%v]", idx), @@ -63,24 +102,72 @@ func (m *ClusterLoadAssignment) Validate() error { } - for key, val := range m.GetNamedEndpoints() { - _ = val + { + sorted_keys := make([]string, len(m.GetNamedEndpoints())) + i := 0 + for key := range m.GetNamedEndpoints() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetNamedEndpoints()[key] + _ = val + + // no validation rules for NamedEndpoints[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("NamedEndpoints[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("NamedEndpoints[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("NamedEndpoints[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } - // no validation rules for NamedEndpoints[key] + } + } - if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: "Policy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("NamedEndpoints[%v]", key), + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: "Policy", reason: "embedded message failed validation", cause: err, - } + }) } } - - } - - if v, ok := interface{}(m.GetPolicy()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignmentValidationError{ field: "Policy", @@ -90,9 +177,30 @@ func (m *ClusterLoadAssignment) Validate() error { } } + if len(errors) > 0 { + return ClusterLoadAssignmentMultiError(errors) + } + return nil } +// ClusterLoadAssignmentMultiError is an error wrapping multiple validation +// errors returned by ClusterLoadAssignment.ValidateAll() if the designated +// constraints aren't met. +type ClusterLoadAssignmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterLoadAssignmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterLoadAssignmentMultiError) AllErrors() []error { return m } + // ClusterLoadAssignmentValidationError is the validation error returned by // ClusterLoadAssignment.Validate if the designated constraints aren't met. type ClusterLoadAssignmentValidationError struct { @@ -151,16 +259,49 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterLoadAssignment_Policy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterLoadAssignment_Policy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterLoadAssignment_PolicyMultiError, or nil if none found. +func (m *ClusterLoadAssignment_Policy) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterLoadAssignment_Policy) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetDropOverloads() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignment_PolicyValidationError{ + field: fmt.Sprintf("DropOverloads[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignment_PolicyValidationError{ + field: fmt.Sprintf("DropOverloads[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignment_PolicyValidationError{ field: fmt.Sprintf("DropOverloads[%v]", idx), @@ -175,40 +316,74 @@ func (m *ClusterLoadAssignment_Policy) Validate() error { if wrapper := m.GetOverprovisioningFactor(); wrapper != nil { if wrapper.GetValue() <= 0 { - return ClusterLoadAssignment_PolicyValidationError{ + err := ClusterLoadAssignment_PolicyValidationError{ field: "OverprovisioningFactor", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } if d := m.GetEndpointStaleAfter(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ClusterLoadAssignment_PolicyValidationError{ + err = ClusterLoadAssignment_PolicyValidationError{ field: "EndpointStaleAfter", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return ClusterLoadAssignment_PolicyValidationError{ - field: "EndpointStaleAfter", - reason: "value must be greater than 0s", + if dur <= gt { + err := ClusterLoadAssignment_PolicyValidationError{ + field: "EndpointStaleAfter", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } // no validation rules for DisableOverprovisioning + if len(errors) > 0 { + return ClusterLoadAssignment_PolicyMultiError(errors) + } + return nil } +// ClusterLoadAssignment_PolicyMultiError is an error wrapping multiple +// validation errors returned by ClusterLoadAssignment_Policy.ValidateAll() if +// the designated constraints aren't met. +type ClusterLoadAssignment_PolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterLoadAssignment_PolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterLoadAssignment_PolicyMultiError) AllErrors() []error { return m } + // ClusterLoadAssignment_PolicyValidationError is the validation error returned // by ClusterLoadAssignment_Policy.Validate if the designated constraints // aren't met. @@ -268,20 +443,59 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ClusterLoadAssignment_Policy_DropOverload with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ClusterLoadAssignment_Policy_DropOverloadMultiError, or nil if none found. +func (m *ClusterLoadAssignment_Policy_DropOverload) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterLoadAssignment_Policy_DropOverload) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCategory()) < 1 { - return ClusterLoadAssignment_Policy_DropOverloadValidationError{ + err := ClusterLoadAssignment_Policy_DropOverloadValidationError{ field: "Category", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDropPercentage()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDropPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignment_Policy_DropOverloadValidationError{ + field: "DropPercentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignment_Policy_DropOverloadValidationError{ + field: "DropPercentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDropPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignment_Policy_DropOverloadValidationError{ field: "DropPercentage", @@ -291,9 +505,31 @@ func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { } } + if len(errors) > 0 { + return ClusterLoadAssignment_Policy_DropOverloadMultiError(errors) + } + return nil } +// ClusterLoadAssignment_Policy_DropOverloadMultiError is an error wrapping +// multiple validation errors returned by +// ClusterLoadAssignment_Policy_DropOverload.ValidateAll() if the designated +// constraints aren't met. +type ClusterLoadAssignment_Policy_DropOverloadMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterLoadAssignment_Policy_DropOverloadMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterLoadAssignment_Policy_DropOverloadMultiError) AllErrors() []error { return m } + // ClusterLoadAssignment_Policy_DropOverloadValidationError is the validation // error returned by ClusterLoadAssignment_Policy_DropOverload.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/api/v2/endpoint/endpoint.pb.go b/pkg/api/envoy/api/v2/endpoint/endpoint.pb.go index dd552215ac..439ea38de8 100644 --- a/pkg/api/envoy/api/v2/endpoint/endpoint.pb.go +++ b/pkg/api/envoy/api/v2/endpoint/endpoint.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/endpoint/endpoint.proto -package envoy_api_v2_endpoint +package endpoint import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,26 +19,24 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_api_v2_endpoint_endpoint_proto protoreflect.FileDescriptor var file_envoy_api_v2_endpoint_endpoint_proto_rawDesc = []byte{ 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x36, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x0d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x50, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x74, + 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x0d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_api_v2_endpoint_endpoint_proto_goTypes = []interface{}{} diff --git a/pkg/api/envoy/api/v2/endpoint/endpoint.pb.validate.go b/pkg/api/envoy/api/v2/endpoint/endpoint.pb.validate.go index 49575893f9..fe87961133 100644 --- a/pkg/api/envoy/api/v2/endpoint/endpoint.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_endpoint +package endpoint import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.go b/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.go index c3f02c5342..906e617017 100644 --- a/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.go +++ b/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/endpoint/endpoint_components.proto -package envoy_api_v2_endpoint +package endpoint import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Upstream host identifier. type Endpoint struct { state protoimpl.MessageState @@ -205,7 +200,7 @@ func (x *LbEndpoint) GetHealthStatus() core.HealthStatus { if x != nil { return x.HealthStatus } - return core.HealthStatus_UNKNOWN + return core.HealthStatus(0) } func (x *LbEndpoint) GetMetadata() *core.Metadata { @@ -500,14 +495,18 @@ var file_envoy_api_v2_endpoint_endpoint_components_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, - 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x42, 0x68, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, - 0x17, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, - 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x42, 0xa6, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x42, 0x17, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, + 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.validate.go b/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.validate.go index 2cda6e368e..db694b0f07 100644 --- a/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.validate.go +++ b/pkg/api/envoy/api/v2/endpoint/endpoint_components.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/endpoint/endpoint_components.proto -package envoy_api_v2_endpoint +package endpoint import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ) @@ -32,19 +33,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = core.HealthStatus(0) ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Endpoint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Endpoint with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EndpointMultiError, or nil +// if none found. +func (m *Endpoint) ValidateAll() error { + return m.validate(true) +} + +func (m *Endpoint) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "Address", @@ -54,7 +90,26 @@ func (m *Endpoint) Validate() error { } } - if v, ok := interface{}(m.GetHealthCheckConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthCheckConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "HealthCheckConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "HealthCheckConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "HealthCheckConfig", @@ -66,9 +121,29 @@ func (m *Endpoint) Validate() error { // no validation rules for Hostname + if len(errors) > 0 { + return EndpointMultiError(errors) + } + return nil } +// EndpointMultiError is an error wrapping multiple validation errors returned +// by Endpoint.ValidateAll() if the designated constraints aren't met. +type EndpointMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointMultiError) AllErrors() []error { return m } + // EndpointValidationError is the validation error returned by // Endpoint.Validate if the designated constraints aren't met. type EndpointValidationError struct { @@ -124,15 +199,49 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LbEndpoint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LbEndpoint with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LbEndpointMultiError, or +// nil if none found. +func (m *LbEndpoint) ValidateAll() error { + return m.validate(true) +} + +func (m *LbEndpoint) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for HealthStatus - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Metadata", @@ -145,10 +254,14 @@ func (m *LbEndpoint) Validate() error { if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return LbEndpointValidationError{ + err := LbEndpointValidationError{ field: "LoadBalancingWeight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } @@ -157,7 +270,26 @@ func (m *LbEndpoint) Validate() error { case *LbEndpoint_Endpoint: - if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Endpoint", @@ -172,9 +304,29 @@ func (m *LbEndpoint) Validate() error { } + if len(errors) > 0 { + return LbEndpointMultiError(errors) + } + return nil } +// LbEndpointMultiError is an error wrapping multiple validation errors +// returned by LbEndpoint.ValidateAll() if the designated constraints aren't met. +type LbEndpointMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LbEndpointMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LbEndpointMultiError) AllErrors() []error { return m } + // LbEndpointValidationError is the validation error returned by // LbEndpoint.Validate if the designated constraints aren't met. type LbEndpointValidationError struct { @@ -231,13 +383,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *LocalityLbEndpoints) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityLbEndpoints with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LocalityLbEndpointsMultiError, or nil if none found. +func (m *LocalityLbEndpoints) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityLbEndpoints) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: "Locality", @@ -250,7 +435,26 @@ func (m *LocalityLbEndpoints) Validate() error { for idx, item := range m.GetLbEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: fmt.Sprintf("LbEndpoints[%v]", idx), @@ -265,22 +469,49 @@ func (m *LocalityLbEndpoints) Validate() error { if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return LocalityLbEndpointsValidationError{ + err := LocalityLbEndpointsValidationError{ field: "LoadBalancingWeight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } if m.GetPriority() > 128 { - return LocalityLbEndpointsValidationError{ + err := LocalityLbEndpointsValidationError{ field: "Priority", reason: "value must be less than or equal to 128", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetProximity()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProximity()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Proximity", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Proximity", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProximity()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: "Proximity", @@ -290,9 +521,30 @@ func (m *LocalityLbEndpoints) Validate() error { } } + if len(errors) > 0 { + return LocalityLbEndpointsMultiError(errors) + } + return nil } +// LocalityLbEndpointsMultiError is an error wrapping multiple validation +// errors returned by LocalityLbEndpoints.ValidateAll() if the designated +// constraints aren't met. +type LocalityLbEndpointsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityLbEndpointsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityLbEndpointsMultiError) AllErrors() []error { return m } + // LocalityLbEndpointsValidationError is the validation error returned by // LocalityLbEndpoints.Validate if the designated constraints aren't met. type LocalityLbEndpointsValidationError struct { @@ -351,24 +603,63 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Endpoint_HealthCheckConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Endpoint_HealthCheckConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Endpoint_HealthCheckConfigMultiError, or nil if none found. +func (m *Endpoint_HealthCheckConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Endpoint_HealthCheckConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetPortValue() > 65535 { - return Endpoint_HealthCheckConfigValidationError{ + err := Endpoint_HealthCheckConfigValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Hostname + if len(errors) > 0 { + return Endpoint_HealthCheckConfigMultiError(errors) + } + return nil } +// Endpoint_HealthCheckConfigMultiError is an error wrapping multiple +// validation errors returned by Endpoint_HealthCheckConfig.ValidateAll() if +// the designated constraints aren't met. +type Endpoint_HealthCheckConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Endpoint_HealthCheckConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Endpoint_HealthCheckConfigMultiError) AllErrors() []error { return m } + // Endpoint_HealthCheckConfigValidationError is the validation error returned // by Endpoint_HealthCheckConfig.Validate if the designated constraints aren't met. type Endpoint_HealthCheckConfigValidationError struct { diff --git a/pkg/api/envoy/api/v2/endpoint/load_report.pb.go b/pkg/api/envoy/api/v2/endpoint/load_report.pb.go index 3ddf4a39c7..ddc459e59b 100644 --- a/pkg/api/envoy/api/v2/endpoint/load_report.pb.go +++ b/pkg/api/envoy/api/v2/endpoint/load_report.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/endpoint/load_report.proto -package envoy_api_v2_endpoint +package endpoint import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // These are stats Envoy reports to GLB every so often. Report frequency is // defined by // :ref:`LoadStatsResponse.load_reporting_interval`. @@ -634,14 +629,18 @@ var file_envoy_api_v2_endpoint_load_report_proto_rawDesc = []byte{ 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x64, 0x72, 0x6f, - 0x70, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x60, 0x0a, 0x23, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x42, 0x0f, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x70, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x9e, 0x01, 0x0a, 0x23, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x42, 0x0f, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/endpoint/load_report.pb.validate.go b/pkg/api/envoy/api/v2/endpoint/load_report.pb.validate.go index ae4162f0d1..8023c3941f 100644 --- a/pkg/api/envoy/api/v2/endpoint/load_report.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_endpoint +package endpoint import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamLocalityStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamLocalityStats with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamLocalityStatsMultiError, or nil if none found. +func (m *UpstreamLocalityStats) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamLocalityStats) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: "Locality", @@ -62,7 +97,26 @@ func (m *UpstreamLocalityStats) Validate() error { for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), @@ -77,7 +131,26 @@ func (m *UpstreamLocalityStats) Validate() error { for idx, item := range m.GetUpstreamEndpointStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), @@ -91,9 +164,30 @@ func (m *UpstreamLocalityStats) Validate() error { // no validation rules for Priority + if len(errors) > 0 { + return UpstreamLocalityStatsMultiError(errors) + } + return nil } +// UpstreamLocalityStatsMultiError is an error wrapping multiple validation +// errors returned by UpstreamLocalityStats.ValidateAll() if the designated +// constraints aren't met. +type UpstreamLocalityStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamLocalityStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamLocalityStatsMultiError) AllErrors() []error { return m } + // UpstreamLocalityStatsValidationError is the validation error returned by // UpstreamLocalityStats.Validate if the designated constraints aren't met. type UpstreamLocalityStatsValidationError struct { @@ -152,13 +246,46 @@ var _ interface { // Validate checks the field values on UpstreamEndpointStats with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamEndpointStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamEndpointStats with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamEndpointStatsMultiError, or nil if none found. +func (m *UpstreamEndpointStats) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamEndpointStats) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Address", @@ -168,7 +295,26 @@ func (m *UpstreamEndpointStats) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Metadata", @@ -189,7 +335,26 @@ func (m *UpstreamEndpointStats) Validate() error { for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), @@ -201,9 +366,30 @@ func (m *UpstreamEndpointStats) Validate() error { } + if len(errors) > 0 { + return UpstreamEndpointStatsMultiError(errors) + } + return nil } +// UpstreamEndpointStatsMultiError is an error wrapping multiple validation +// errors returned by UpstreamEndpointStats.ValidateAll() if the designated +// constraints aren't met. +type UpstreamEndpointStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamEndpointStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamEndpointStatsMultiError) AllErrors() []error { return m } + // UpstreamEndpointStatsValidationError is the validation error returned by // UpstreamEndpointStats.Validate if the designated constraints aren't met. type UpstreamEndpointStatsValidationError struct { @@ -262,21 +448,56 @@ var _ interface { // Validate checks the field values on EndpointLoadMetricStats with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EndpointLoadMetricStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointLoadMetricStats with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EndpointLoadMetricStatsMultiError, or nil if none found. +func (m *EndpointLoadMetricStats) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointLoadMetricStats) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for MetricName // no validation rules for NumRequestsFinishedWithMetric // no validation rules for TotalMetricValue + if len(errors) > 0 { + return EndpointLoadMetricStatsMultiError(errors) + } + return nil } +// EndpointLoadMetricStatsMultiError is an error wrapping multiple validation +// errors returned by EndpointLoadMetricStats.ValidateAll() if the designated +// constraints aren't met. +type EndpointLoadMetricStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointLoadMetricStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointLoadMetricStatsMultiError) AllErrors() []error { return m } + // EndpointLoadMetricStatsValidationError is the validation error returned by // EndpointLoadMetricStats.Validate if the designated constraints aren't met. type EndpointLoadMetricStatsValidationError struct { @@ -334,33 +555,74 @@ var _ interface { } = EndpointLoadMetricStatsValidationError{} // Validate checks the field values on ClusterStats with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterStats with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterStatsMultiError, or +// nil if none found. +func (m *ClusterStats) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterStats) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusterName()) < 1 { - return ClusterStatsValidationError{ + err := ClusterStatsValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ClusterServiceName if len(m.GetUpstreamLocalityStats()) < 1 { - return ClusterStatsValidationError{ + err := ClusterStatsValidationError{ field: "UpstreamLocalityStats", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetUpstreamLocalityStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), @@ -377,7 +639,26 @@ func (m *ClusterStats) Validate() error { for idx, item := range m.GetDroppedRequests() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("DroppedRequests[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("DroppedRequests[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("DroppedRequests[%v]", idx), @@ -389,7 +670,26 @@ func (m *ClusterStats) Validate() error { } - if v, ok := interface{}(m.GetLoadReportInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadReportInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: "LoadReportInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: "LoadReportInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadReportInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: "LoadReportInterval", @@ -399,9 +699,29 @@ func (m *ClusterStats) Validate() error { } } + if len(errors) > 0 { + return ClusterStatsMultiError(errors) + } + return nil } +// ClusterStatsMultiError is an error wrapping multiple validation errors +// returned by ClusterStats.ValidateAll() if the designated constraints aren't met. +type ClusterStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterStatsMultiError) AllErrors() []error { return m } + // ClusterStatsValidationError is the validation error returned by // ClusterStats.Validate if the designated constraints aren't met. type ClusterStatsValidationError struct { @@ -458,24 +778,63 @@ var _ interface { // Validate checks the field values on ClusterStats_DroppedRequests with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterStats_DroppedRequests) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterStats_DroppedRequests with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterStats_DroppedRequestsMultiError, or nil if none found. +func (m *ClusterStats_DroppedRequests) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterStats_DroppedRequests) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCategory()) < 1 { - return ClusterStats_DroppedRequestsValidationError{ + err := ClusterStats_DroppedRequestsValidationError{ field: "Category", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DroppedCount + if len(errors) > 0 { + return ClusterStats_DroppedRequestsMultiError(errors) + } + return nil } +// ClusterStats_DroppedRequestsMultiError is an error wrapping multiple +// validation errors returned by ClusterStats_DroppedRequests.ValidateAll() if +// the designated constraints aren't met. +type ClusterStats_DroppedRequestsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterStats_DroppedRequestsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterStats_DroppedRequestsMultiError) AllErrors() []error { return m } + // ClusterStats_DroppedRequestsValidationError is the validation error returned // by ClusterStats_DroppedRequests.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/api/v2/lds.pb.go b/pkg/api/envoy/api/v2/lds.pb.go index 06ff7abab3..a4f6c86ed7 100644 --- a/pkg/api/envoy/api/v2/lds.pb.go +++ b/pkg/api/envoy/api/v2/lds.pb.go @@ -1,19 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/lds.proto -package envoy_api_v2 +package apiv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - 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" codes "google.golang.org/grpc/codes" @@ -31,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type LdsDummy struct { @@ -84,50 +76,48 @@ var file_envoy_api_v2_lds_proto_rawDesc = []byte{ 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, 0x08, 0x4c, 0x64, 0x73, - 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xf3, 0x02, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x0a, 0x0a, 0x08, 0x4c, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xf3, 0x02, 0x0a, + 0x18, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, + 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x0f, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, + 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7b, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x7b, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x17, 0x2f, 0x76, 0x32, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x1d, 0x8a, 0xa4, - 0x96, 0xf3, 0x07, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x54, 0x0a, 0x1a, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x4c, 0x64, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1b, 0x12, 0x19, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x50, 0x08, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x22, 0x17, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x3a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, + 0x3a, 0x01, 0x2a, 0x1a, 0x1d, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x42, 0x8f, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x42, 0x08, 0x4c, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x1b, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/lds.pb.validate.go b/pkg/api/envoy/api/v2/lds.pb.validate.go index 774e1d1cb9..64fa51146e 100644 --- a/pkg/api/envoy/api/v2/lds.pb.validate.go +++ b/pkg/api/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 envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LdsDummyMultiError, or nil +// if none found. +func (m *LdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *LdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return LdsDummyMultiError(errors) + } + return nil } +// LdsDummyMultiError is an error wrapping multiple validation errors returned +// by LdsDummy.ValidateAll() if the designated constraints aren't met. +type LdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LdsDummyMultiError) AllErrors() []error { return m } + // LdsDummyValidationError is the validation error returned by // LdsDummy.Validate if the designated constraints aren't met. type LdsDummyValidationError struct { diff --git a/pkg/api/envoy/api/v2/listener.pb.go b/pkg/api/envoy/api/v2/listener.pb.go index 745fc09a85..d57107d0ef 100644 --- a/pkg/api/envoy/api/v2/listener.pb.go +++ b/pkg/api/envoy/api/v2/listener.pb.go @@ -1,22 +1,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/listener.proto -package envoy_api_v2 +package apiv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/listener" v21 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/accesslog/v2" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -30,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Listener_DrainType int32 const ( @@ -198,6 +192,8 @@ type Listener struct { // To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. TcpFastOpenQueueLength *wrappers.UInt32Value `protobuf:"bytes,12,opt,name=tcp_fast_open_queue_length,json=tcpFastOpenQueueLength,proto3" json:"tcp_fast_open_queue_length,omitempty"` // Specifies the intended direction of the traffic relative to the local Envoy. + // This property is required on Windows for listeners using the original destination filter, + // see :ref:`Original Destination `. TrafficDirection core.TrafficDirection `protobuf:"varint,16,opt,name=traffic_direction,json=trafficDirection,proto3,enum=envoy.api.v2.core.TrafficDirection" json:"traffic_direction,omitempty"` // If the protocol in the listener socket address in :ref:`protocol // ` is :ref:`UDP @@ -385,7 +381,7 @@ func (x *Listener) GetTrafficDirection() core.TrafficDirection { if x != nil { return x.TrafficDirection } - return core.TrafficDirection_UNSPECIFIED + return core.TrafficDirection(0) } func (x *Listener) GetUdpListenerConfig() *listener.UdpListenerConfig { @@ -618,138 +614,140 @@ var file_envoy_api_v2_listener_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x0e, 0x0a, 0x08, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0d, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x0e, 0x0a, 0x08, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0d, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, + 0x75, 0x73, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x12, 0x66, + 0x0a, 0x21, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x48, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x31, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x52, 0x0c, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x3f, 0x0a, 0x0a, 0x64, 0x72, 0x61, + 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x09, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x18, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x4e, 0x0a, 0x24, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x6f, 0x6e, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x4f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x36, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, + 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x46, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x58, 0x0a, 0x1a, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x16, 0x74, 0x63, 0x70, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x50, 0x0a, 0x11, 0x74, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x13, 0x75, + 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x11, 0x75, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x52, 0x0b, 0x61, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, + 0x6a, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x72, + 0x65, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x72, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x4a, 0x0a, 0x0a, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x1a, 0x4c, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, + 0x6f, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x75, 0x73, - 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x21, - 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, - 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, - 0x0d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x31, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x3f, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x69, 0x6e, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x64, - 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x18, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x4e, 0x0a, 0x24, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x63, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x4f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x3c, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, - 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, 0x72, 0x65, - 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x46, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, - 0x1a, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x71, - 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x16, 0x74, 0x63, 0x70, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x51, 0x75, 0x65, 0x75, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x50, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x13, 0x75, 0x64, 0x70, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x55, - 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x11, 0x75, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x52, 0x0b, 0x61, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x6a, 0x0a, - 0x19, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, + 0x50, 0x6f, 0x72, 0x74, 0x1a, 0xa2, 0x01, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x75, - 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, - 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x4a, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x1a, 0x4c, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x56, 0x31, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, 0x50, 0x6f, - 0x72, 0x74, 0x1a, 0xa2, 0x01, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, - 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x1a, 0x0e, 0x0a, 0x0c, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x42, 0x13, 0x0a, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x29, 0x0a, 0x09, 0x44, 0x72, 0x61, 0x69, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, - 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, - 0x10, 0x01, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x42, 0x55, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x62, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x0e, 0x0a, 0x0c, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x42, 0x13, 0x0a, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x29, 0x0a, 0x09, 0x44, 0x72, 0x61, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, + 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x4f, 0x4e, + 0x4c, 0x59, 0x10, 0x01, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x42, 0x90, 0x01, 0x0a, 0x1a, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, + 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/listener.pb.validate.go b/pkg/api/envoy/api/v2/listener.pb.validate.go index 0536b9adac..14b041873e 100644 --- a/pkg/api/envoy/api/v2/listener.pb.validate.go +++ b/pkg/api/envoy/api/v2/listener.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/listener.proto -package envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ) @@ -32,28 +33,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = core.TrafficDirection(0) ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Listener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listener with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenerMultiError, or nil +// if none found. +func (m *Listener) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name if m.GetAddress() == nil { - return ListenerValidationError{ + err := ListenerValidationError{ field: "Address", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Address", @@ -66,7 +106,26 @@ func (m *Listener) Validate() error { for idx, item := range m.GetFilterChains() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("FilterChains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("FilterChains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("FilterChains[%v]", idx), @@ -78,7 +137,26 @@ func (m *Listener) Validate() error { } - if v, ok := interface{}(m.GetUseOriginalDst()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseOriginalDst()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UseOriginalDst", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UseOriginalDst", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseOriginalDst()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "UseOriginalDst", @@ -88,7 +166,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerConnectionBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "PerConnectionBufferLimitBytes", @@ -98,7 +195,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Metadata", @@ -108,7 +224,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDeprecatedV1()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "DeprecatedV1", @@ -123,7 +258,26 @@ func (m *Listener) Validate() error { for idx, item := range m.GetListenerFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("ListenerFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("ListenerFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("ListenerFilters[%v]", idx), @@ -135,7 +289,26 @@ func (m *Listener) Validate() error { } - if v, ok := interface{}(m.GetListenerFiltersTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListenerFiltersTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ListenerFiltersTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ListenerFiltersTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListenerFiltersTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "ListenerFiltersTimeout", @@ -147,7 +320,26 @@ func (m *Listener) Validate() error { // no validation rules for ContinueOnListenerFiltersTimeout - if v, ok := interface{}(m.GetTransparent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransparent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Transparent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Transparent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransparent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Transparent", @@ -157,7 +349,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFreebind()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Freebind", @@ -170,7 +381,26 @@ func (m *Listener) Validate() error { for idx, item := range m.GetSocketOptions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), @@ -182,7 +412,26 @@ func (m *Listener) Validate() error { } - if v, ok := interface{}(m.GetTcpFastOpenQueueLength()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTcpFastOpenQueueLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "TcpFastOpenQueueLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "TcpFastOpenQueueLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpFastOpenQueueLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "TcpFastOpenQueueLength", @@ -194,7 +443,26 @@ func (m *Listener) Validate() error { // no validation rules for TrafficDirection - if v, ok := interface{}(m.GetUdpListenerConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUdpListenerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UdpListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UdpListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUdpListenerConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "UdpListenerConfig", @@ -204,7 +472,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetApiListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "ApiListener", @@ -214,7 +501,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetConnectionBalanceConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectionBalanceConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ConnectionBalanceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ConnectionBalanceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionBalanceConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "ConnectionBalanceConfig", @@ -229,7 +535,26 @@ func (m *Listener) Validate() error { for idx, item := range m.GetAccessLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("AccessLog[%v]", idx), @@ -241,9 +566,29 @@ func (m *Listener) Validate() error { } + if len(errors) > 0 { + return ListenerMultiError(errors) + } + return nil } +// ListenerMultiError is an error wrapping multiple validation errors returned +// by Listener.ValidateAll() if the designated constraints aren't met. +type ListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerMultiError) AllErrors() []error { return m } + // ListenerValidationError is the validation error returned by // Listener.Validate if the designated constraints aren't met. type ListenerValidationError struct { @@ -300,13 +645,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Listener_DeprecatedV1) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listener_DeprecatedV1 with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Listener_DeprecatedV1MultiError, or nil if none found. +func (m *Listener_DeprecatedV1) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener_DeprecatedV1) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetBindToPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Listener_DeprecatedV1ValidationError{ + field: "BindToPort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Listener_DeprecatedV1ValidationError{ + field: "BindToPort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Listener_DeprecatedV1ValidationError{ field: "BindToPort", @@ -316,9 +694,30 @@ func (m *Listener_DeprecatedV1) Validate() error { } } + if len(errors) > 0 { + return Listener_DeprecatedV1MultiError(errors) + } + return nil } +// Listener_DeprecatedV1MultiError is an error wrapping multiple validation +// errors returned by Listener_DeprecatedV1.ValidateAll() if the designated +// constraints aren't met. +type Listener_DeprecatedV1MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Listener_DeprecatedV1MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Listener_DeprecatedV1MultiError) AllErrors() []error { return m } + // Listener_DeprecatedV1ValidationError is the validation error returned by // Listener_DeprecatedV1.Validate if the designated constraints aren't met. type Listener_DeprecatedV1ValidationError struct { @@ -377,17 +776,51 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Listener_ConnectionBalanceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listener_ConnectionBalanceConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// Listener_ConnectionBalanceConfigMultiError, or nil if none found. +func (m *Listener_ConnectionBalanceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener_ConnectionBalanceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.BalanceType.(type) { case *Listener_ConnectionBalanceConfig_ExactBalance_: - if v, ok := interface{}(m.GetExactBalance()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExactBalance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Listener_ConnectionBalanceConfigValidationError{ + field: "ExactBalance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Listener_ConnectionBalanceConfigValidationError{ + field: "ExactBalance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExactBalance()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Listener_ConnectionBalanceConfigValidationError{ field: "ExactBalance", @@ -398,16 +831,42 @@ func (m *Listener_ConnectionBalanceConfig) Validate() error { } default: - return Listener_ConnectionBalanceConfigValidationError{ + err := Listener_ConnectionBalanceConfigValidationError{ field: "BalanceType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return Listener_ConnectionBalanceConfigMultiError(errors) } return nil } +// Listener_ConnectionBalanceConfigMultiError is an error wrapping multiple +// validation errors returned by +// Listener_ConnectionBalanceConfig.ValidateAll() if the designated +// constraints aren't met. +type Listener_ConnectionBalanceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Listener_ConnectionBalanceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Listener_ConnectionBalanceConfigMultiError) AllErrors() []error { return m } + // Listener_ConnectionBalanceConfigValidationError is the validation error // returned by Listener_ConnectionBalanceConfig.Validate if the designated // constraints aren't met. @@ -467,15 +926,53 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Listener_ConnectionBalanceConfig_ExactBalance) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Listener_ConnectionBalanceConfig_ExactBalance with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Listener_ConnectionBalanceConfig_ExactBalanceMultiError, or nil if none found. +func (m *Listener_ConnectionBalanceConfig_ExactBalance) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener_ConnectionBalanceConfig_ExactBalance) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Listener_ConnectionBalanceConfig_ExactBalanceMultiError(errors) + } + return nil } +// Listener_ConnectionBalanceConfig_ExactBalanceMultiError is an error wrapping +// multiple validation errors returned by +// Listener_ConnectionBalanceConfig_ExactBalance.ValidateAll() if the +// designated constraints aren't met. +type Listener_ConnectionBalanceConfig_ExactBalanceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Listener_ConnectionBalanceConfig_ExactBalanceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Listener_ConnectionBalanceConfig_ExactBalanceMultiError) AllErrors() []error { return m } + // Listener_ConnectionBalanceConfig_ExactBalanceValidationError is the // validation error returned by // Listener_ConnectionBalanceConfig_ExactBalance.Validate if the designated diff --git a/pkg/api/envoy/api/v2/listener/listener.pb.go b/pkg/api/envoy/api/v2/listener/listener.pb.go index 74cf058096..bd0b1cbf02 100644 --- a/pkg/api/envoy/api/v2/listener/listener.pb.go +++ b/pkg/api/envoy/api/v2/listener/listener.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/listener/listener.proto -package envoy_api_v2_listener +package listener import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,30 +19,28 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_api_v2_listener_listener_proto protoreflect.FileDescriptor var file_envoy_api_v2_listener_listener_proto_rawDesc = []byte{ 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x6a, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0xab, + 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, - 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0x50, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x02, 0x1a, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, + 0x3a, 0x3a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0x50, 0x00, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_api_v2_listener_listener_proto_goTypes = []interface{}{} diff --git a/pkg/api/envoy/api/v2/listener/listener.pb.validate.go b/pkg/api/envoy/api/v2/listener/listener.pb.validate.go index e54ec61ba4..69bcff355c 100644 --- a/pkg/api/envoy/api/v2/listener/listener.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_listener +package listener import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/api/v2/listener/listener_components.pb.go b/pkg/api/envoy/api/v2/listener/listener_components.pb.go index 40b9b4c60e..2aec91fe14 100644 --- a/pkg/api/envoy/api/v2/listener/listener_components.pb.go +++ b/pkg/api/envoy/api/v2/listener/listener_components.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/listener/listener_components.proto -package envoy_api_v2_listener +package listener import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" auth "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/auth" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FilterChainMatch_ConnectionSourceType int32 const ( @@ -533,7 +528,7 @@ func (x *FilterChain) GetName() string { // rules: // - destination_port_range: // start: 3306 -// end: 3306 +// end: 3307 // - destination_port_range: // start: 15000 // end: 15001 @@ -988,18 +983,22 @@ var file_envoy_api_v2_listener_listener_components_proto_rawDesc = []byte{ 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, - 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x9c, + 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0xdd, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x17, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0xaa, + 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x1a, 0x45, 0x6e, 0x76, 0x6f, + 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/listener/listener_components.pb.validate.go b/pkg/api/envoy/api/v2/listener/listener_components.pb.validate.go index 7b6d788c74..042bd6b19e 100644 --- a/pkg/api/envoy/api/v2/listener/listener_components.pb.validate.go +++ b/pkg/api/envoy/api/v2/listener/listener_components.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/listener/listener_components.proto -package envoy_api_v2_listener +package listener import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Filter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Filter with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in FilterMultiError, or nil if none found. +func (m *Filter) ValidateAll() error { + return m.validate(true) +} + +func (m *Filter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return FilterValidationError{ + err := FilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *Filter_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "Config", @@ -63,7 +102,26 @@ func (m *Filter) Validate() error { case *Filter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "TypedConfig", @@ -75,9 +133,29 @@ func (m *Filter) Validate() error { } + if len(errors) > 0 { + return FilterMultiError(errors) + } + return nil } +// FilterMultiError is an error wrapping multiple validation errors returned by +// Filter.ValidateAll() if the designated constraints aren't met. +type FilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterMultiError) AllErrors() []error { return m } + // FilterValidationError is the validation error returned by Filter.Validate if // the designated constraints aren't met. type FilterValidationError struct { @@ -133,20 +211,38 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *FilterChainMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterChainMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FilterChainMatchMultiError, or nil if none found. +func (m *FilterChainMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterChainMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetDestinationPort(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 65535 { - return FilterChainMatchValidationError{ + err := FilterChainMatchValidationError{ field: "DestinationPort", reason: "value must be inside range [1, 65535]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -154,7 +250,26 @@ func (m *FilterChainMatch) Validate() error { for idx, item := range m.GetPrefixRanges() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("PrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("PrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("PrefixRanges[%v]", idx), @@ -168,7 +283,26 @@ func (m *FilterChainMatch) Validate() error { // no validation rules for AddressSuffix - if v, ok := interface{}(m.GetSuffixLen()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuffixLen()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: "SuffixLen", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: "SuffixLen", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuffixLen()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: "SuffixLen", @@ -179,16 +313,39 @@ func (m *FilterChainMatch) Validate() error { } if _, ok := FilterChainMatch_ConnectionSourceType_name[int32(m.GetSourceType())]; !ok { - return FilterChainMatchValidationError{ + err := FilterChainMatchValidationError{ field: "SourceType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetSourcePrefixRanges() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), @@ -204,19 +361,44 @@ func (m *FilterChainMatch) Validate() error { _, _ = idx, item if val := item; val < 1 || val > 65535 { - return FilterChainMatchValidationError{ + err := FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePorts[%v]", idx), reason: "value must be inside range [1, 65535]", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for TransportProtocol + if len(errors) > 0 { + return FilterChainMatchMultiError(errors) + } + return nil } +// FilterChainMatchMultiError is an error wrapping multiple validation errors +// returned by FilterChainMatch.ValidateAll() if the designated constraints +// aren't met. +type FilterChainMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterChainMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterChainMatchMultiError) AllErrors() []error { return m } + // FilterChainMatchValidationError is the validation error returned by // FilterChainMatch.Validate if the designated constraints aren't met. type FilterChainMatchValidationError struct { @@ -272,14 +454,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterChain) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterChain with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterChainMultiError, or +// nil if none found. +func (m *FilterChain) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterChain) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetFilterChainMatch()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetFilterChainMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "FilterChainMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "FilterChainMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterChainMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "FilterChainMatch", @@ -289,7 +504,26 @@ func (m *FilterChain) Validate() error { } } - if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TlsContext", @@ -302,7 +536,26 @@ func (m *FilterChain) Validate() error { for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -314,7 +567,26 @@ func (m *FilterChain) Validate() error { } - if v, ok := interface{}(m.GetUseProxyProto()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseProxyProto()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "UseProxyProto", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "UseProxyProto", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseProxyProto()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "UseProxyProto", @@ -324,7 +596,26 @@ func (m *FilterChain) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "Metadata", @@ -334,7 +625,26 @@ func (m *FilterChain) Validate() error { } } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TransportSocket", @@ -346,9 +656,29 @@ func (m *FilterChain) Validate() error { // no validation rules for Name + if len(errors) > 0 { + return FilterChainMultiError(errors) + } + return nil } +// FilterChainMultiError is an error wrapping multiple validation errors +// returned by FilterChain.ValidateAll() if the designated constraints aren't met. +type FilterChainMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterChainMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterChainMultiError) AllErrors() []error { return m } + // FilterChainValidationError is the validation error returned by // FilterChain.Validate if the designated constraints aren't met. type FilterChainValidationError struct { @@ -405,17 +735,51 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ListenerFilterChainMatchPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerFilterChainMatchPredicate +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ListenerFilterChainMatchPredicateMultiError, or nil if none found. +func (m *ListenerFilterChainMatchPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerFilterChainMatchPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *ListenerFilterChainMatchPredicate_OrMatch: - if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "OrMatch", @@ -427,7 +791,26 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { case *ListenerFilterChainMatchPredicate_AndMatch: - if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "AndMatch", @@ -439,7 +822,26 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { case *ListenerFilterChainMatchPredicate_NotMatch: - if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "NotMatch", @@ -452,15 +854,38 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { case *ListenerFilterChainMatchPredicate_AnyMatch: if m.GetAnyMatch() != true { - return ListenerFilterChainMatchPredicateValidationError{ + err := ListenerFilterChainMatchPredicateValidationError{ field: "AnyMatch", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *ListenerFilterChainMatchPredicate_DestinationPortRange: - if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestinationPortRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "DestinationPortRange", @@ -471,16 +896,42 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { } default: - return ListenerFilterChainMatchPredicateValidationError{ + err := ListenerFilterChainMatchPredicateValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ListenerFilterChainMatchPredicateMultiError(errors) } return nil } +// ListenerFilterChainMatchPredicateMultiError is an error wrapping multiple +// validation errors returned by +// ListenerFilterChainMatchPredicate.ValidateAll() if the designated +// constraints aren't met. +type ListenerFilterChainMatchPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerFilterChainMatchPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerFilterChainMatchPredicateMultiError) AllErrors() []error { return m } + // ListenerFilterChainMatchPredicateValidationError is the validation error // returned by ListenerFilterChainMatchPredicate.Validate if the designated // constraints aren't met. @@ -539,21 +990,58 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListenerFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenerFilterMultiError, +// or nil if none found. +func (m *ListenerFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return ListenerFilterValidationError{ + err := ListenerFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFilterDisabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterDisabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "FilterDisabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "FilterDisabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterDisabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "FilterDisabled", @@ -567,7 +1055,26 @@ func (m *ListenerFilter) Validate() error { case *ListenerFilter_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "Config", @@ -579,7 +1086,26 @@ func (m *ListenerFilter) Validate() error { case *ListenerFilter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "TypedConfig", @@ -591,9 +1117,30 @@ func (m *ListenerFilter) Validate() error { } + if len(errors) > 0 { + return ListenerFilterMultiError(errors) + } + return nil } +// ListenerFilterMultiError is an error wrapping multiple validation errors +// returned by ListenerFilter.ValidateAll() if the designated constraints +// aren't met. +type ListenerFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerFilterMultiError) AllErrors() []error { return m } + // ListenerFilterValidationError is the validation error returned by // ListenerFilter.Validate if the designated constraints aren't met. type ListenerFilterValidationError struct { @@ -650,23 +1197,62 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListenerFilterChainMatchPredicate_MatchSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ListenerFilterChainMatchPredicate_MatchSet with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ListenerFilterChainMatchPredicate_MatchSetMultiError, or nil if none found. +func (m *ListenerFilterChainMatchPredicate_MatchSet) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerFilterChainMatchPredicate_MatchSet) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRules()) < 2 { - return ListenerFilterChainMatchPredicate_MatchSetValidationError{ + err := ListenerFilterChainMatchPredicate_MatchSetValidationError{ field: "Rules", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicate_MatchSetValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -678,9 +1264,31 @@ func (m *ListenerFilterChainMatchPredicate_MatchSet) Validate() error { } + if len(errors) > 0 { + return ListenerFilterChainMatchPredicate_MatchSetMultiError(errors) + } + return nil } +// ListenerFilterChainMatchPredicate_MatchSetMultiError is an error wrapping +// multiple validation errors returned by +// ListenerFilterChainMatchPredicate_MatchSet.ValidateAll() if the designated +// constraints aren't met. +type ListenerFilterChainMatchPredicate_MatchSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerFilterChainMatchPredicate_MatchSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerFilterChainMatchPredicate_MatchSetMultiError) AllErrors() []error { return m } + // ListenerFilterChainMatchPredicate_MatchSetValidationError is the validation // error returned by ListenerFilterChainMatchPredicate_MatchSet.Validate if // the designated constraints aren't met. diff --git a/pkg/api/envoy/api/v2/listener/quic_config.pb.go b/pkg/api/envoy/api/v2/listener/quic_config.pb.go index 25b940dfb7..a8cdfd72db 100644 --- a/pkg/api/envoy/api/v2/listener/quic_config.pb.go +++ b/pkg/api/envoy/api/v2/listener/quic_config.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/listener/quic_config.proto -package envoy_api_v2_listener +package listener import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" duration "github.com/golang/protobuf/ptypes/duration" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration specific to the QUIC protocol. // Next id: 4 type QuicProtocolOptions struct { @@ -129,17 +124,21 @@ var file_envoy_api_v2_listener_quic_config_proto_rawDesc = []byte{ 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x48, 0x61, - 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x94, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0xd5, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x0f, 0x51, 0x75, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x4e, 0x53, 0xea, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, - 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, - 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, + 0x53, 0xea, 0x02, 0x1a, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, + 0x56, 0x32, 0x3a, 0x3a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, + 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/listener/quic_config.pb.validate.go b/pkg/api/envoy/api/v2/listener/quic_config.pb.validate.go index 6e148decbc..e88fe3fe67 100644 --- a/pkg/api/envoy/api/v2/listener/quic_config.pb.validate.go +++ b/pkg/api/envoy/api/v2/listener/quic_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/listener/quic_config.proto -package envoy_api_v2_listener +package listener import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *QuicProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QuicProtocolOptionsMultiError, or nil if none found. +func (m *QuicProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxConcurrentStreams()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxConcurrentStreams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "MaxConcurrentStreams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "MaxConcurrentStreams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConcurrentStreams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicProtocolOptionsValidationError{ field: "MaxConcurrentStreams", @@ -51,7 +86,26 @@ func (m *QuicProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicProtocolOptionsValidationError{ field: "IdleTimeout", @@ -61,7 +115,26 @@ func (m *QuicProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetCryptoHandshakeTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCryptoHandshakeTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "CryptoHandshakeTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "CryptoHandshakeTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCryptoHandshakeTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicProtocolOptionsValidationError{ field: "CryptoHandshakeTimeout", @@ -71,9 +144,30 @@ func (m *QuicProtocolOptions) Validate() error { } } + if len(errors) > 0 { + return QuicProtocolOptionsMultiError(errors) + } + return nil } +// QuicProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by QuicProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type QuicProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicProtocolOptionsMultiError) AllErrors() []error { return m } + // QuicProtocolOptionsValidationError is the validation error returned by // QuicProtocolOptions.Validate if the designated constraints aren't met. type QuicProtocolOptionsValidationError struct { diff --git a/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.go b/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.go index 5d1893957e..26f9ebe7a7 100644 --- a/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.go +++ b/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/listener/udp_listener_config.proto -package envoy_api_v2_listener +package listener import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" any "github.com/golang/protobuf/ptypes/any" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type UdpListenerConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -191,17 +186,21 @@ var file_envoy_api_v2_listener_udp_listener_config_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x9b, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x67, 0x42, 0xdc, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x16, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, - 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x17, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x1a, 0x45, 0x6e, + 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.validate.go b/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.validate.go index ff7c908c9a..50a96f0443 100644 --- a/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.validate.go +++ b/pkg/api/envoy/api/v2/listener/udp_listener_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/listener/udp_listener_config.proto -package envoy_api_v2_listener +package listener import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,58 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *UdpListenerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpListenerConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UdpListenerConfigMultiError, or nil if none found. +func (m *UdpListenerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpListenerConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for UdpListenerName switch m.ConfigType.(type) { case *UdpListenerConfig_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpListenerConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpListenerConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UdpListenerConfigValidationError{ field: "Config", @@ -59,7 +94,26 @@ func (m *UdpListenerConfig) Validate() error { case *UdpListenerConfig_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpListenerConfigValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpListenerConfigValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UdpListenerConfigValidationError{ field: "TypedConfig", @@ -71,9 +125,30 @@ func (m *UdpListenerConfig) Validate() error { } + if len(errors) > 0 { + return UdpListenerConfigMultiError(errors) + } + return nil } +// UdpListenerConfigMultiError is an error wrapping multiple validation errors +// returned by UdpListenerConfig.ValidateAll() if the designated constraints +// aren't met. +type UdpListenerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpListenerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpListenerConfigMultiError) AllErrors() []error { return m } + // UdpListenerConfigValidationError is the validation error returned by // UdpListenerConfig.Validate if the designated constraints aren't met. type UdpListenerConfigValidationError struct { @@ -132,15 +207,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ActiveRawUdpListenerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActiveRawUdpListenerConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ActiveRawUdpListenerConfigMultiError, or nil if none found. +func (m *ActiveRawUdpListenerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ActiveRawUdpListenerConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return ActiveRawUdpListenerConfigMultiError(errors) + } + return nil } +// ActiveRawUdpListenerConfigMultiError is an error wrapping multiple +// validation errors returned by ActiveRawUdpListenerConfig.ValidateAll() if +// the designated constraints aren't met. +type ActiveRawUdpListenerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActiveRawUdpListenerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActiveRawUdpListenerConfigMultiError) AllErrors() []error { return m } + // ActiveRawUdpListenerConfigValidationError is the validation error returned // by ActiveRawUdpListenerConfig.Validate if the designated constraints aren't met. type ActiveRawUdpListenerConfigValidationError struct { diff --git a/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.go b/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.go index 730d07d984..528096db88 100644 --- a/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.go +++ b/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/ratelimit/ratelimit.proto -package envoy_api_v2_ratelimit +package ratelimit import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A RateLimitDescriptor is a list of hierarchical entries that are used by the service to // determine the final rate limit key and overall allowed limit. Here are some examples of how // they might be used for the domain "envoy". @@ -196,11 +191,15 @@ var file_envoy_api_v2_ratelimit_ratelimit_proto_rawDesc = []byte{ 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x20, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x6c, 0x0a, 0x24, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x26, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, + 0x02, 0x20, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0xab, 0x01, 0x0a, 0x24, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x26, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.validate.go b/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.validate.go index 20952106c8..a15e673406 100644 --- a/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.validate.go +++ b/pkg/api/envoy/api/v2/ratelimit/ratelimit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/ratelimit/ratelimit.proto -package envoy_api_v2_ratelimit +package ratelimit import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RateLimitDescriptor with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitDescriptor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitDescriptor with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitDescriptorMultiError, or nil if none found. +func (m *RateLimitDescriptor) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitDescriptor) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetEntries()) < 1 { - return RateLimitDescriptorValidationError{ + err := RateLimitDescriptorValidationError{ field: "Entries", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetEntries() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitDescriptorValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitDescriptorValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitDescriptorValidationError{ field: fmt.Sprintf("Entries[%v]", idx), @@ -63,9 +102,30 @@ func (m *RateLimitDescriptor) Validate() error { } + if len(errors) > 0 { + return RateLimitDescriptorMultiError(errors) + } + return nil } +// RateLimitDescriptorMultiError is an error wrapping multiple validation +// errors returned by RateLimitDescriptor.ValidateAll() if the designated +// constraints aren't met. +type RateLimitDescriptorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitDescriptorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitDescriptorMultiError) AllErrors() []error { return m } + // RateLimitDescriptorValidationError is the validation error returned by // RateLimitDescriptor.Validate if the designated constraints aren't met. type RateLimitDescriptorValidationError struct { @@ -124,29 +184,72 @@ var _ interface { // Validate checks the field values on RateLimitDescriptor_Entry with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitDescriptor_Entry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitDescriptor_Entry with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitDescriptor_EntryMultiError, or nil if none found. +func (m *RateLimitDescriptor_Entry) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitDescriptor_Entry) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetKey()) < 1 { - return RateLimitDescriptor_EntryValidationError{ + err := RateLimitDescriptor_EntryValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetValue()) < 1 { - return RateLimitDescriptor_EntryValidationError{ + err := RateLimitDescriptor_EntryValidationError{ field: "Value", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RateLimitDescriptor_EntryMultiError(errors) } return nil } +// RateLimitDescriptor_EntryMultiError is an error wrapping multiple validation +// errors returned by RateLimitDescriptor_Entry.ValidateAll() if the +// designated constraints aren't met. +type RateLimitDescriptor_EntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitDescriptor_EntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitDescriptor_EntryMultiError) AllErrors() []error { return m } + // RateLimitDescriptor_EntryValidationError is the validation error returned by // RateLimitDescriptor_Entry.Validate if the designated constraints aren't met. type RateLimitDescriptor_EntryValidationError struct { diff --git a/pkg/api/envoy/api/v2/rds.pb.go b/pkg/api/envoy/api/v2/rds.pb.go index b56d37f99c..eaffd54924 100644 --- a/pkg/api/envoy/api/v2/rds.pb.go +++ b/pkg/api/envoy/api/v2/rds.pb.go @@ -1,18 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/rds.proto -package envoy_api_v2 +package apiv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/wrappers" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type RdsDummy struct { @@ -83,58 +76,59 @@ var file_envoy_api_v2_rds_proto_rawDesc = []byte{ 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, 0x08, 0x52, 0x64, 0x73, 0x44, 0x75, 0x6d, - 0x6d, 0x79, 0x32, 0xee, 0x02, 0x0a, 0x15, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0c, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x5e, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x75, 0x0a, 0x0b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x76, 0x32, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x27, 0x8a, 0xa4, 0x96, 0xf3, - 0x07, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x1b, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, - 0x6f, 0x73, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x56, 0x69, 0x72, 0x74, - 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x1a, 0x26, 0x8a, 0xa4, 0x96, 0xf3, 0x07, - 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, - 0x74, 0x42, 0x51, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, - 0x08, 0x52, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x50, 0x07, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, + 0x08, 0x52, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xee, 0x02, 0x0a, 0x15, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x5e, 0x0a, 0x0b, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x75, 0x0a, 0x0b, 0x46, 0x65, + 0x74, 0x63, 0x68, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x16, 0x22, 0x14, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x3a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, + 0x2a, 0x1a, 0x27, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x1b, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, + 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, + 0x1a, 0x26, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, + 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x8c, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x52, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0x88, 0x01, + 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/rds.pb.validate.go b/pkg/api/envoy/api/v2/rds.pb.validate.go index 5d07d97e3e..02644be4af 100644 --- a/pkg/api/envoy/api/v2/rds.pb.validate.go +++ b/pkg/api/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 envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RdsDummyMultiError, or nil +// if none found. +func (m *RdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *RdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RdsDummyMultiError(errors) + } + return nil } +// RdsDummyMultiError is an error wrapping multiple validation errors returned +// by RdsDummy.ValidateAll() if the designated constraints aren't met. +type RdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RdsDummyMultiError) AllErrors() []error { return m } + // RdsDummyValidationError is the validation error returned by // RdsDummy.Validate if the designated constraints aren't met. type RdsDummyValidationError struct { diff --git a/pkg/api/envoy/api/v2/route.pb.go b/pkg/api/envoy/api/v2/route.pb.go index 3ac990a4ba..622a8d6e0c 100644 --- a/pkg/api/envoy/api/v2/route.pb.go +++ b/pkg/api/envoy/api/v2/route.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/route.proto -package envoy_api_v2 +package apiv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 11] type RouteConfiguration struct { state protoimpl.MessageState @@ -323,13 +318,16 @@ var file_envoy_api_v2_route_proto_rawDesc = []byte{ 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x4f, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x8a, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/route.pb.validate.go b/pkg/api/envoy/api/v2/route.pb.validate.go index b6b361e045..444ab92de5 100644 --- a/pkg/api/envoy/api/v2/route.pb.validate.go +++ b/pkg/api/envoy/api/v2/route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/route.proto -package envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name for idx, item := range m.GetVirtualHosts() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("VirtualHosts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("VirtualHosts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("VirtualHosts[%v]", idx), @@ -58,7 +93,26 @@ func (m *RouteConfiguration) Validate() error { } - if v, ok := interface{}(m.GetVhds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetVhds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Vhds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Vhds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVhds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "Vhds", @@ -72,25 +126,52 @@ func (m *RouteConfiguration) Validate() error { _, _ = idx, item if !_RouteConfiguration_InternalOnlyHeaders_Pattern.MatchString(item) { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: fmt.Sprintf("InternalOnlyHeaders[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetResponseHeadersToAdd()) > 1000 { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -106,25 +187,52 @@ func (m *RouteConfiguration) Validate() error { _, _ = idx, item if !_RouteConfiguration_ResponseHeadersToRemove_Pattern.MatchString(item) { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetRequestHeadersToAdd()) > 1000 { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -140,17 +248,40 @@ func (m *RouteConfiguration) Validate() error { _, _ = idx, item if !_RouteConfiguration_RequestHeadersToRemove_Pattern.MatchString(item) { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for MostSpecificHeaderMutationsWins - if v, ok := interface{}(m.GetValidateClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidateClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "ValidateClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "ValidateClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidateClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "ValidateClusters", @@ -160,9 +291,30 @@ func (m *RouteConfiguration) Validate() error { } } + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil } +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + // RouteConfigurationValidationError is the validation error returned by // RouteConfiguration.Validate if the designated constraints aren't met. type RouteConfigurationValidationError struct { @@ -226,20 +378,57 @@ var _RouteConfiguration_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[ 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. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Vhds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Vhds with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in VhdsMultiError, or nil if none found. +func (m *Vhds) ValidateAll() error { + return m.validate(true) +} + +func (m *Vhds) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetConfigSource() == nil { - return VhdsValidationError{ + err := VhdsValidationError{ field: "ConfigSource", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VhdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VhdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VhdsValidationError{ field: "ConfigSource", @@ -249,9 +438,29 @@ func (m *Vhds) Validate() error { } } + if len(errors) > 0 { + return VhdsMultiError(errors) + } + return nil } +// VhdsMultiError is an error wrapping multiple validation errors returned by +// Vhds.ValidateAll() if the designated constraints aren't met. +type VhdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VhdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VhdsMultiError) AllErrors() []error { return m } + // VhdsValidationError is the validation error returned by Vhds.Validate if the // designated constraints aren't met. type VhdsValidationError struct { diff --git a/pkg/api/envoy/api/v2/route/route.pb.go b/pkg/api/envoy/api/v2/route/route.pb.go index cd50c6d67a..aff91f4b97 100644 --- a/pkg/api/envoy/api/v2/route/route.pb.go +++ b/pkg/api/envoy/api/v2/route/route.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/route/route.proto -package envoy_api_v2_route +package route import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,25 +19,23 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_api_v2_route_route_proto protoreflect.FileDescriptor var file_envoy_api_v2_route_route_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x30, - 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x50, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, + 0x6b, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x00, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_api_v2_route_route_proto_goTypes = []interface{}{} diff --git a/pkg/api/envoy/api/v2/route/route.pb.validate.go b/pkg/api/envoy/api/v2/route/route.pb.validate.go index ce773a8f3d..baf7bd1223 100644 --- a/pkg/api/envoy/api/v2/route/route.pb.validate.go +++ b/pkg/api/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 envoy_api_v2_route +package route import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/api/v2/route/route_components.pb.go b/pkg/api/envoy/api/v2/route/route_components.pb.go index 083a0565eb..d619c63c8e 100644 --- a/pkg/api/envoy/api/v2/route/route_components.pb.go +++ b/pkg/api/envoy/api/v2/route/route_components.pb.go @@ -1,20 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/route/route_components.proto -package envoy_api_v2_route +package route import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -32,10 +31,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type VirtualHost_TlsRequirementType int32 const ( @@ -1727,7 +1722,7 @@ func (x *RouteAction) GetPriority() core.RoutingPriority { if x != nil { return x.Priority } - return core.RoutingPriority_DEFAULT + return core.RoutingPriority(0) } func (x *RouteAction) GetRateLimits() []*RateLimit { @@ -2126,7 +2121,7 @@ func (x *HedgePolicy) GetHedgeOnPerTryTimeout() bool { return false } -// [#next-free-field: 10] +// [#next-free-field: 9] type RedirectAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2149,7 +2144,6 @@ type RedirectAction struct { // Types that are assignable to PathRewriteSpecifier: // *RedirectAction_PathRedirect // *RedirectAction_PrefixRewrite - // *RedirectAction_RegexRewrite PathRewriteSpecifier isRedirectAction_PathRewriteSpecifier `protobuf_oneof:"path_rewrite_specifier"` // The HTTP status code to use in the redirect response. The default response // code is MOVED_PERMANENTLY (301). @@ -2247,13 +2241,6 @@ func (x *RedirectAction) GetPrefixRewrite() string { return "" } -func (x *RedirectAction) GetRegexRewrite() *matcher.RegexMatchAndSubstitute { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_RegexRewrite); ok { - return x.RegexRewrite - } - return nil -} - func (x *RedirectAction) GetResponseCode() RedirectAction_RedirectResponseCode { if x != nil { return x.ResponseCode @@ -2322,39 +2309,10 @@ type RedirectAction_PrefixRewrite struct { PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3,oneof"` } -type RedirectAction_RegexRewrite struct { - // Indicates that during redirect, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - RegexRewrite *matcher.RegexMatchAndSubstitute `protobuf:"bytes,9,opt,name=regex_rewrite,json=regexRewrite,proto3,oneof"` -} - func (*RedirectAction_PathRedirect) isRedirectAction_PathRewriteSpecifier() {} func (*RedirectAction_PrefixRewrite) isRedirectAction_PathRewriteSpecifier() {} -func (*RedirectAction_RegexRewrite) isRedirectAction_PathRewriteSpecifier() {} - type DirectResponseAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2694,7 +2652,7 @@ func (x *VirtualCluster) GetMethod() core.RequestMethod { if x != nil { return x.Method } - return core.RequestMethod_METHOD_UNSPECIFIED + return core.RequestMethod(0) } // Global rate limiting :ref:`architecture overview `. @@ -3973,8 +3931,8 @@ type RouteAction_HashPolicy_FilterState struct { unknownFields protoimpl.UnknownFields // The name of the Object in the per-request filterState, which is an - // Envoy::Http::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Http::Hashable, no hash will be produced. + // Envoy::Hashable object. If there is no data associated with the key, + // or the stored object is not Envoy::Hashable, no hash will be produced. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } @@ -5458,7 +5416,7 @@ var file_envoy_api_v2_route_route_components_proto_rawDesc = []byte{ 0x68, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, - 0x50, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xb1, 0x05, + 0x50, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xdd, 0x04, 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x74, 0x74, 0x70, @@ -5477,211 +5435,209 @@ var file_envoy_api_v2_route_route_components_proto_rawDesc = []byte{ 0x34, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, - 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x70, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x22, 0x77, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x4f, - 0x56, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x4c, 0x59, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x53, 0x45, 0x45, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x54, - 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, - 0x54, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, - 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x04, 0x42, 0x1a, 0x0a, 0x18, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x22, 0x6d, 0x0a, 0x14, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, - 0x10, 0xd8, 0x04, 0x28, 0x64, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x22, 0x6c, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, - 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x22, 0xa6, - 0x02, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x46, 0x0a, 0x0f, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, - 0x6e, 0x67, 0x12, 0x46, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x48, 0x0a, 0x10, 0x6f, 0x76, - 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, - 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x72, 0x74, - 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, - 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x07, 0x70, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x42, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x06, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x22, 0xd3, 0x09, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, - 0x12, 0x48, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x9d, 0x08, 0x0a, 0x06, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x70, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x77, + 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x5f, + 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x45, 0x5f, + 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x45, 0x4d, 0x50, 0x4f, + 0x52, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, + 0x16, 0x0a, 0x12, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x44, + 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x04, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x6d, 0x0a, + 0x14, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x10, 0xd8, 0x04, 0x28, + 0x64, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x6c, 0x0a, 0x09, + 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x09, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x22, 0xa6, 0x02, 0x0a, 0x07, 0x54, + 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x46, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x46, + 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, + 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x48, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, + 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, + 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, + 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, + 0x61, 0x67, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, + 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x06, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x08, + 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x22, 0xd3, 0x09, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3b, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x07, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x5e, - 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5b, - 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x65, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x9d, 0x08, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x5b, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6a, + 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x48, 0x00, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x0f, 0x0a, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x70, 0x0a, - 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, 0x01, 0x01, - 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, - 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x1a, - 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x1a, 0x40, 0x0a, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, - 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, - 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x1a, 0xcc, 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x0f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5b, 0x0a, 0x0e, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, + 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x65, 0x0a, 0x12, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, + 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x1a, 0x0f, 0x0a, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x1a, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x70, 0x0a, 0x0e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, + 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0d, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x1a, 0x0f, 0x0a, 0x0d, 0x52, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x40, 0x0a, 0x0a, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xcc, + 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x45, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, + 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0x17, 0x0a, + 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xdf, 0x03, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, + 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x65, + 0x78, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x33, + 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, + 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x4c, 0x0a, 0x10, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, + 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x0e, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x39, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, + 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x20, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, + 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x02, + 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xaf, 0x02, 0x0a, 0x15, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x45, 0x0a, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x42, 0x17, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xdf, 0x03, 0x0a, 0x0d, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, - 0x08, 0x20, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0b, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, - 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4c, 0x0a, 0x10, 0x73, 0x61, 0x66, 0x65, 0x5f, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x39, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0x18, + 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x50, + 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, - 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x20, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x65, 0x72, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xaf, 0x02, 0x0a, - 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x05, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x12, 0x50, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x5f, - 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x42, 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, - 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x9a, 0x01, 0x0a, 0x20, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x42, + 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5838,64 +5794,63 @@ var file_envoy_api_v2_route_route_components_proto_depIdxs = []int32{ 19, // 69: envoy.api.v2.route.RetryPolicy.retriable_request_headers:type_name -> envoy.api.v2.route.HeaderMatcher 50, // 70: envoy.api.v2.route.HedgePolicy.initial_requests:type_name -> google.protobuf.UInt32Value 59, // 71: envoy.api.v2.route.HedgePolicy.additional_request_chance:type_name -> envoy.type.FractionalPercent - 56, // 72: envoy.api.v2.route.RedirectAction.regex_rewrite:type_name -> envoy.type.matcher.RegexMatchAndSubstitute - 3, // 73: envoy.api.v2.route.RedirectAction.response_code:type_name -> envoy.api.v2.route.RedirectAction.RedirectResponseCode - 60, // 74: envoy.api.v2.route.DirectResponseAction.body:type_name -> envoy.api.v2.core.DataSource - 53, // 75: envoy.api.v2.route.Decorator.propagate:type_name -> google.protobuf.BoolValue - 59, // 76: envoy.api.v2.route.Tracing.client_sampling:type_name -> envoy.type.FractionalPercent - 59, // 77: envoy.api.v2.route.Tracing.random_sampling:type_name -> envoy.type.FractionalPercent - 59, // 78: envoy.api.v2.route.Tracing.overall_sampling:type_name -> envoy.type.FractionalPercent - 61, // 79: envoy.api.v2.route.Tracing.custom_tags:type_name -> envoy.type.tracing.v2.CustomTag - 19, // 80: envoy.api.v2.route.VirtualCluster.headers:type_name -> envoy.api.v2.route.HeaderMatcher - 62, // 81: envoy.api.v2.route.VirtualCluster.method:type_name -> envoy.api.v2.core.RequestMethod - 50, // 82: envoy.api.v2.route.RateLimit.stage:type_name -> google.protobuf.UInt32Value - 41, // 83: envoy.api.v2.route.RateLimit.actions:type_name -> envoy.api.v2.route.RateLimit.Action - 52, // 84: envoy.api.v2.route.HeaderMatcher.safe_regex_match:type_name -> envoy.type.matcher.RegexMatcher - 63, // 85: envoy.api.v2.route.HeaderMatcher.range_match:type_name -> envoy.type.Int64Range - 53, // 86: envoy.api.v2.route.QueryParameterMatcher.regex:type_name -> google.protobuf.BoolValue - 55, // 87: envoy.api.v2.route.QueryParameterMatcher.string_match:type_name -> envoy.type.matcher.StringMatcher - 64, // 88: envoy.api.v2.route.VirtualHost.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 49, // 89: envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 64, // 90: envoy.api.v2.route.Route.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 49, // 91: envoy.api.v2.route.Route.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 50, // 92: envoy.api.v2.route.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value - 51, // 93: envoy.api.v2.route.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.api.v2.core.Metadata - 48, // 94: envoy.api.v2.route.WeightedCluster.ClusterWeight.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 48, // 95: envoy.api.v2.route.WeightedCluster.ClusterWeight.response_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 26, // 96: envoy.api.v2.route.WeightedCluster.ClusterWeight.per_filter_config:type_name -> envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry - 27, // 97: envoy.api.v2.route.WeightedCluster.ClusterWeight.typed_per_filter_config:type_name -> envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - 64, // 98: envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 49, // 99: envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 53, // 100: envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.presented:type_name -> google.protobuf.BoolValue - 53, // 101: envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.validated:type_name -> google.protobuf.BoolValue - 54, // 102: envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.api.v2.core.RuntimeFractionalPercent - 53, // 103: envoy.api.v2.route.RouteAction.RequestMirrorPolicy.trace_sampled:type_name -> google.protobuf.BoolValue - 33, // 104: envoy.api.v2.route.RouteAction.HashPolicy.header:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.Header - 34, // 105: envoy.api.v2.route.RouteAction.HashPolicy.cookie:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.Cookie - 35, // 106: envoy.api.v2.route.RouteAction.HashPolicy.connection_properties:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties - 36, // 107: envoy.api.v2.route.RouteAction.HashPolicy.query_parameter:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter - 37, // 108: envoy.api.v2.route.RouteAction.HashPolicy.filter_state:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.FilterState - 53, // 109: envoy.api.v2.route.RouteAction.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 57, // 110: envoy.api.v2.route.RouteAction.HashPolicy.Cookie.ttl:type_name -> google.protobuf.Duration - 64, // 111: envoy.api.v2.route.RetryPolicy.RetryPriority.config:type_name -> google.protobuf.Struct - 49, // 112: envoy.api.v2.route.RetryPolicy.RetryPriority.typed_config:type_name -> google.protobuf.Any - 64, // 113: envoy.api.v2.route.RetryPolicy.RetryHostPredicate.config:type_name -> google.protobuf.Struct - 49, // 114: envoy.api.v2.route.RetryPolicy.RetryHostPredicate.typed_config:type_name -> google.protobuf.Any - 57, // 115: envoy.api.v2.route.RetryPolicy.RetryBackOff.base_interval:type_name -> google.protobuf.Duration - 57, // 116: envoy.api.v2.route.RetryPolicy.RetryBackOff.max_interval:type_name -> google.protobuf.Duration - 42, // 117: envoy.api.v2.route.RateLimit.Action.source_cluster:type_name -> envoy.api.v2.route.RateLimit.Action.SourceCluster - 43, // 118: envoy.api.v2.route.RateLimit.Action.destination_cluster:type_name -> envoy.api.v2.route.RateLimit.Action.DestinationCluster - 44, // 119: envoy.api.v2.route.RateLimit.Action.request_headers:type_name -> envoy.api.v2.route.RateLimit.Action.RequestHeaders - 45, // 120: envoy.api.v2.route.RateLimit.Action.remote_address:type_name -> envoy.api.v2.route.RateLimit.Action.RemoteAddress - 46, // 121: envoy.api.v2.route.RateLimit.Action.generic_key:type_name -> envoy.api.v2.route.RateLimit.Action.GenericKey - 47, // 122: envoy.api.v2.route.RateLimit.Action.header_value_match:type_name -> envoy.api.v2.route.RateLimit.Action.HeaderValueMatch - 53, // 123: envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.expect_match:type_name -> google.protobuf.BoolValue - 19, // 124: envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.headers:type_name -> envoy.api.v2.route.HeaderMatcher - 125, // [125:125] is the sub-list for method output_type - 125, // [125:125] is the sub-list for method input_type - 125, // [125:125] is the sub-list for extension type_name - 125, // [125:125] is the sub-list for extension extendee - 0, // [0:125] is the sub-list for field type_name + 3, // 72: envoy.api.v2.route.RedirectAction.response_code:type_name -> envoy.api.v2.route.RedirectAction.RedirectResponseCode + 60, // 73: envoy.api.v2.route.DirectResponseAction.body:type_name -> envoy.api.v2.core.DataSource + 53, // 74: envoy.api.v2.route.Decorator.propagate:type_name -> google.protobuf.BoolValue + 59, // 75: envoy.api.v2.route.Tracing.client_sampling:type_name -> envoy.type.FractionalPercent + 59, // 76: envoy.api.v2.route.Tracing.random_sampling:type_name -> envoy.type.FractionalPercent + 59, // 77: envoy.api.v2.route.Tracing.overall_sampling:type_name -> envoy.type.FractionalPercent + 61, // 78: envoy.api.v2.route.Tracing.custom_tags:type_name -> envoy.type.tracing.v2.CustomTag + 19, // 79: envoy.api.v2.route.VirtualCluster.headers:type_name -> envoy.api.v2.route.HeaderMatcher + 62, // 80: envoy.api.v2.route.VirtualCluster.method:type_name -> envoy.api.v2.core.RequestMethod + 50, // 81: envoy.api.v2.route.RateLimit.stage:type_name -> google.protobuf.UInt32Value + 41, // 82: envoy.api.v2.route.RateLimit.actions:type_name -> envoy.api.v2.route.RateLimit.Action + 52, // 83: envoy.api.v2.route.HeaderMatcher.safe_regex_match:type_name -> envoy.type.matcher.RegexMatcher + 63, // 84: envoy.api.v2.route.HeaderMatcher.range_match:type_name -> envoy.type.Int64Range + 53, // 85: envoy.api.v2.route.QueryParameterMatcher.regex:type_name -> google.protobuf.BoolValue + 55, // 86: envoy.api.v2.route.QueryParameterMatcher.string_match:type_name -> envoy.type.matcher.StringMatcher + 64, // 87: envoy.api.v2.route.VirtualHost.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct + 49, // 88: envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any + 64, // 89: envoy.api.v2.route.Route.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct + 49, // 90: envoy.api.v2.route.Route.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any + 50, // 91: envoy.api.v2.route.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value + 51, // 92: envoy.api.v2.route.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.api.v2.core.Metadata + 48, // 93: envoy.api.v2.route.WeightedCluster.ClusterWeight.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption + 48, // 94: envoy.api.v2.route.WeightedCluster.ClusterWeight.response_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption + 26, // 95: envoy.api.v2.route.WeightedCluster.ClusterWeight.per_filter_config:type_name -> envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry + 27, // 96: envoy.api.v2.route.WeightedCluster.ClusterWeight.typed_per_filter_config:type_name -> envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry + 64, // 97: envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct + 49, // 98: envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any + 53, // 99: envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.presented:type_name -> google.protobuf.BoolValue + 53, // 100: envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.validated:type_name -> google.protobuf.BoolValue + 54, // 101: envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.api.v2.core.RuntimeFractionalPercent + 53, // 102: envoy.api.v2.route.RouteAction.RequestMirrorPolicy.trace_sampled:type_name -> google.protobuf.BoolValue + 33, // 103: envoy.api.v2.route.RouteAction.HashPolicy.header:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.Header + 34, // 104: envoy.api.v2.route.RouteAction.HashPolicy.cookie:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.Cookie + 35, // 105: envoy.api.v2.route.RouteAction.HashPolicy.connection_properties:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties + 36, // 106: envoy.api.v2.route.RouteAction.HashPolicy.query_parameter:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter + 37, // 107: envoy.api.v2.route.RouteAction.HashPolicy.filter_state:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.FilterState + 53, // 108: envoy.api.v2.route.RouteAction.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue + 57, // 109: envoy.api.v2.route.RouteAction.HashPolicy.Cookie.ttl:type_name -> google.protobuf.Duration + 64, // 110: envoy.api.v2.route.RetryPolicy.RetryPriority.config:type_name -> google.protobuf.Struct + 49, // 111: envoy.api.v2.route.RetryPolicy.RetryPriority.typed_config:type_name -> google.protobuf.Any + 64, // 112: envoy.api.v2.route.RetryPolicy.RetryHostPredicate.config:type_name -> google.protobuf.Struct + 49, // 113: envoy.api.v2.route.RetryPolicy.RetryHostPredicate.typed_config:type_name -> google.protobuf.Any + 57, // 114: envoy.api.v2.route.RetryPolicy.RetryBackOff.base_interval:type_name -> google.protobuf.Duration + 57, // 115: envoy.api.v2.route.RetryPolicy.RetryBackOff.max_interval:type_name -> google.protobuf.Duration + 42, // 116: envoy.api.v2.route.RateLimit.Action.source_cluster:type_name -> envoy.api.v2.route.RateLimit.Action.SourceCluster + 43, // 117: envoy.api.v2.route.RateLimit.Action.destination_cluster:type_name -> envoy.api.v2.route.RateLimit.Action.DestinationCluster + 44, // 118: envoy.api.v2.route.RateLimit.Action.request_headers:type_name -> envoy.api.v2.route.RateLimit.Action.RequestHeaders + 45, // 119: envoy.api.v2.route.RateLimit.Action.remote_address:type_name -> envoy.api.v2.route.RateLimit.Action.RemoteAddress + 46, // 120: envoy.api.v2.route.RateLimit.Action.generic_key:type_name -> envoy.api.v2.route.RateLimit.Action.GenericKey + 47, // 121: envoy.api.v2.route.RateLimit.Action.header_value_match:type_name -> envoy.api.v2.route.RateLimit.Action.HeaderValueMatch + 53, // 122: envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.expect_match:type_name -> google.protobuf.BoolValue + 19, // 123: envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.headers:type_name -> envoy.api.v2.route.HeaderMatcher + 124, // [124:124] is the sub-list for method output_type + 124, // [124:124] is the sub-list for method input_type + 124, // [124:124] is the sub-list for extension type_name + 124, // [124:124] is the sub-list for extension extendee + 0, // [0:124] is the sub-list for field type_name } func init() { file_envoy_api_v2_route_route_components_proto_init() } @@ -6390,7 +6345,6 @@ func file_envoy_api_v2_route_route_components_proto_init() { (*RedirectAction_SchemeRedirect)(nil), (*RedirectAction_PathRedirect)(nil), (*RedirectAction_PrefixRewrite)(nil), - (*RedirectAction_RegexRewrite)(nil), } file_envoy_api_v2_route_route_components_proto_msgTypes[15].OneofWrappers = []interface{}{ (*HeaderMatcher_ExactMatch)(nil), diff --git a/pkg/api/envoy/api/v2/route/route_components.pb.validate.go b/pkg/api/envoy/api/v2/route/route_components.pb.validate.go index df008b4823..9a0211d8f3 100644 --- a/pkg/api/envoy/api/v2/route/route_components.pb.validate.go +++ b/pkg/api/envoy/api/v2/route/route_components.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/route/route_components.proto -package envoy_api_v2_route +package route import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ) @@ -32,43 +33,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = core.RoutingPriority(0) - - _ = core.RequestMethod(0) ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *VirtualHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on VirtualHost with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in VirtualHostMultiError, or +// nil if none found. +func (m *VirtualHost) ValidateAll() error { + return m.validate(true) +} + +func (m *VirtualHost) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetDomains()) < 1 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "Domains", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetDomains() { _, _ = idx, item if !_VirtualHost_Domains_Pattern.MatchString(item) { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: fmt.Sprintf("Domains[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } @@ -76,7 +102,26 @@ func (m *VirtualHost) Validate() error { for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -89,16 +134,39 @@ func (m *VirtualHost) Validate() error { } if _, ok := VirtualHost_TlsRequirementType_name[int32(m.GetRequireTls())]; !ok { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "RequireTls", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetVirtualClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("VirtualClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("VirtualClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("VirtualClusters[%v]", idx), @@ -113,7 +181,26 @@ func (m *VirtualHost) Validate() error { for idx, item := range m.GetRateLimits() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("RateLimits[%v]", idx), @@ -126,16 +213,39 @@ func (m *VirtualHost) Validate() error { } if len(m.GetRequestHeadersToAdd()) > 1000 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -148,16 +258,39 @@ func (m *VirtualHost) Validate() error { } if len(m.GetResponseHeadersToAdd()) > 1000 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -169,7 +302,26 @@ func (m *VirtualHost) Validate() error { } - if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCors()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "Cors", @@ -179,45 +331,122 @@ func (m *VirtualHost) Validate() error { } } - 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, + { + sorted_keys := make([]string, len(m.GetPerFilterConfig())) + i := 0 + for key := range m.GetPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetPerFilterConfig()[key] + _ = val + + // no validation rules for PerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VirtualHostValidationError{ + field: fmt.Sprintf("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, + { + sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) + i := 0 + for key := range m.GetTypedPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedPerFilterConfig()[key] + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VirtualHostValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } - } + } } // no validation rules for IncludeRequestAttemptCount // no validation rules for IncludeAttemptCountInResponse - if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "RetryPolicy", @@ -227,7 +456,26 @@ func (m *VirtualHost) Validate() error { } } - if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "RetryPolicyTypedConfig", @@ -237,7 +485,26 @@ func (m *VirtualHost) Validate() error { } } - if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHedgePolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "HedgePolicy", @@ -247,7 +514,26 @@ func (m *VirtualHost) Validate() error { } } - if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "PerRequestBufferLimitBytes", @@ -257,9 +543,29 @@ func (m *VirtualHost) Validate() error { } } + if len(errors) > 0 { + return VirtualHostMultiError(errors) + } + return nil } +// VirtualHostMultiError is an error wrapping multiple validation errors +// returned by VirtualHost.ValidateAll() if the designated constraints aren't met. +type VirtualHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VirtualHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VirtualHostMultiError) AllErrors() []error { return m } + // VirtualHostValidationError is the validation error returned by // VirtualHost.Validate if the designated constraints aren't met. type VirtualHostValidationError struct { @@ -317,14 +623,47 @@ var _ interface { 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterAction with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterActionMultiError, or +// nil if none found. +func (m *FilterAction) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterAction) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterActionValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterActionValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterActionValidationError{ field: "Action", @@ -334,9 +673,29 @@ func (m *FilterAction) Validate() error { } } + if len(errors) > 0 { + return FilterActionMultiError(errors) + } + return nil } +// FilterActionMultiError is an error wrapping multiple validation errors +// returned by FilterAction.ValidateAll() if the designated constraints aren't met. +type FilterActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterActionMultiError) AllErrors() []error { return m } + // FilterActionValidationError is the validation error returned by // FilterAction.Validate if the designated constraints aren't met. type FilterActionValidationError struct { @@ -392,22 +751,59 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name if m.GetMatch() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Match", @@ -417,7 +813,26 @@ func (m *Route) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Metadata", @@ -427,7 +842,26 @@ func (m *Route) Validate() error { } } - if v, ok := interface{}(m.GetDecorator()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDecorator()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Decorator", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Decorator", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDecorator()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Decorator", @@ -437,51 +871,132 @@ func (m *Route) Validate() error { } } - 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, + { + sorted_keys := make([]string, len(m.GetPerFilterConfig())) + i := 0 + for key := range m.GetPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetPerFilterConfig()[key] + _ = val + + // no validation rules for PerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: fmt.Sprintf("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, + { + sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) + i := 0 + for key := range m.GetTypedPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedPerFilterConfig()[key] + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } - } + } } if len(m.GetRequestHeadersToAdd()) > 1000 { - return RouteValidationError{ + err := RouteValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -494,16 +1009,39 @@ func (m *Route) Validate() error { } if len(m.GetResponseHeadersToAdd()) > 1000 { - return RouteValidationError{ + err := RouteValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -515,7 +1053,26 @@ func (m *Route) Validate() error { } - if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTracing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Tracing", @@ -525,7 +1082,26 @@ func (m *Route) Validate() error { } } - if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "PerRequestBufferLimitBytes", @@ -539,7 +1115,26 @@ func (m *Route) Validate() error { case *Route_Route: - if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Route", @@ -551,7 +1146,26 @@ func (m *Route) Validate() error { case *Route_Redirect: - if v, ok := interface{}(m.GetRedirect()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRedirect()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Redirect", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Redirect", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirect()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Redirect", @@ -563,7 +1177,26 @@ func (m *Route) Validate() error { case *Route_DirectResponse: - if v, ok := interface{}(m.GetDirectResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDirectResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "DirectResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "DirectResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDirectResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "DirectResponse", @@ -575,7 +1208,26 @@ func (m *Route) Validate() error { case *Route_FilterAction: - if v, ok := interface{}(m.GetFilterAction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "FilterAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "FilterAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterAction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "FilterAction", @@ -586,16 +1238,40 @@ func (m *Route) Validate() error { } default: - return RouteValidationError{ + err := RouteValidationError{ field: "Action", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteMultiError(errors) } return nil } +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + // RouteValidationError is the validation error returned by Route.Validate if // the designated constraints aren't met. type RouteValidationError struct { @@ -651,24 +1327,61 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// WeightedClusterMultiError, or nil if none found. +func (m *WeightedCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusters()) < 1 { - return WeightedClusterValidationError{ + err := WeightedClusterValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -683,19 +1396,44 @@ func (m *WeightedCluster) Validate() error { if wrapper := m.GetTotalWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return WeightedClusterValidationError{ + err := WeightedClusterValidationError{ field: "TotalWeight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for RuntimeKeyPrefix + if len(errors) > 0 { + return WeightedClusterMultiError(errors) + } + return nil } +// WeightedClusterMultiError is an error wrapping multiple validation errors +// returned by WeightedCluster.ValidateAll() if the designated constraints +// aren't met. +type WeightedClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedClusterMultiError) AllErrors() []error { return m } + // WeightedClusterValidationError is the validation error returned by // WeightedCluster.Validate if the designated constraints aren't met. type WeightedClusterValidationError struct { @@ -751,13 +1489,47 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCaseSensitive()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCaseSensitive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "CaseSensitive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "CaseSensitive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCaseSensitive()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "CaseSensitive", @@ -767,7 +1539,26 @@ func (m *RouteMatch) Validate() error { } } - if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "RuntimeFraction", @@ -780,7 +1571,26 @@ func (m *RouteMatch) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -795,7 +1605,26 @@ func (m *RouteMatch) Validate() error { for idx, item := range m.GetQueryParameters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("QueryParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("QueryParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("QueryParameters[%v]", idx), @@ -807,7 +1636,26 @@ func (m *RouteMatch) Validate() error { } - if v, ok := interface{}(m.GetGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Grpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Grpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "Grpc", @@ -817,7 +1665,26 @@ func (m *RouteMatch) Validate() error { } } - if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "TlsContext", @@ -838,22 +1705,49 @@ func (m *RouteMatch) Validate() error { case *RouteMatch_Regex: if len(m.GetRegex()) > 1024 { - return RouteMatchValidationError{ + err := RouteMatchValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *RouteMatch_SafeRegex: if m.GetSafeRegex() == nil { - return RouteMatchValidationError{ + err := RouteMatchValidationError{ field: "SafeRegex", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSafeRegex()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "SafeRegex", @@ -864,16 +1758,40 @@ func (m *RouteMatch) Validate() error { } default: - return RouteMatchValidationError{ + err := RouteMatchValidationError{ field: "PathSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteMatchMultiError(errors) } return nil } +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + // RouteMatchValidationError is the validation error returned by // RouteMatch.Validate if the designated constraints aren't met. type RouteMatchValidationError struct { @@ -929,20 +1847,39 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CorsPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CorsPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CorsPolicyMultiError, or +// nil if none found. +func (m *CorsPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *CorsPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetAllowOriginRegex() { _, _ = idx, item if len(item) > 1024 { - return CorsPolicyValidationError{ + err := CorsPolicyValidationError{ field: fmt.Sprintf("AllowOriginRegex[%v]", idx), reason: "value length must be at most 1024 bytes", } + if !all { + return err + } + errors = append(errors, err) } } @@ -950,7 +1887,26 @@ func (m *CorsPolicy) Validate() error { for idx, item := range m.GetAllowOriginStringMatch() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), @@ -970,7 +1926,26 @@ func (m *CorsPolicy) Validate() error { // no validation rules for MaxAge - if v, ok := interface{}(m.GetAllowCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "AllowCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "AllowCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "AllowCredentials", @@ -980,7 +1955,26 @@ func (m *CorsPolicy) Validate() error { } } - if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "ShadowEnabled", @@ -994,7 +1988,26 @@ func (m *CorsPolicy) Validate() error { case *CorsPolicy_Enabled: - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "Enabled", @@ -1006,7 +2019,26 @@ func (m *CorsPolicy) Validate() error { case *CorsPolicy_FilterEnabled: - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "FilterEnabled", @@ -1018,9 +2050,29 @@ func (m *CorsPolicy) Validate() error { } + if len(errors) > 0 { + return CorsPolicyMultiError(errors) + } + return nil } +// CorsPolicyMultiError is an error wrapping multiple validation errors +// returned by CorsPolicy.ValidateAll() if the designated constraints aren't met. +type CorsPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CorsPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CorsPolicyMultiError) AllErrors() []error { return m } + // CorsPolicyValidationError is the validation error returned by // CorsPolicy.Validate if the designated constraints aren't met. type CorsPolicyValidationError struct { @@ -1076,21 +2128,58 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := RouteAction_ClusterNotFoundResponseCode_name[int32(m.GetClusterNotFoundResponseCode())]; !ok { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterNotFoundResponseCode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MetadataMatch", @@ -1101,13 +2190,36 @@ func (m *RouteAction) Validate() error { } if !_RouteAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "PrefixRewrite", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRegexRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "RegexRewrite", @@ -1117,7 +2229,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "Timeout", @@ -1127,7 +2258,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "IdleTimeout", @@ -1137,7 +2287,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "RetryPolicy", @@ -1147,7 +2316,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "RetryPolicyTypedConfig", @@ -1157,7 +2345,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetRequestMirrorPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestMirrorPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RequestMirrorPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RequestMirrorPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestMirrorPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "RequestMirrorPolicy", @@ -1170,7 +2377,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetRequestMirrorPolicies() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), @@ -1183,16 +2409,39 @@ func (m *RouteAction) Validate() error { } if _, ok := core.RoutingPriority_name[int32(m.GetPriority())]; !ok { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "Priority", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRateLimits() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("RateLimits[%v]", idx), @@ -1204,7 +2453,26 @@ func (m *RouteAction) Validate() error { } - if v, ok := interface{}(m.GetIncludeVhRateLimits()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIncludeVhRateLimits()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IncludeVhRateLimits", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IncludeVhRateLimits", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIncludeVhRateLimits()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "IncludeVhRateLimits", @@ -1217,7 +2485,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetHashPolicy() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("HashPolicy[%v]", idx), @@ -1229,7 +2516,26 @@ func (m *RouteAction) Validate() error { } - if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCors()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "Cors", @@ -1239,7 +2545,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetMaxGrpcTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxGrpcTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxGrpcTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxGrpcTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxGrpcTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MaxGrpcTimeout", @@ -1249,7 +2574,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetGrpcTimeoutOffset()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcTimeoutOffset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "GrpcTimeoutOffset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "GrpcTimeoutOffset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcTimeoutOffset()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "GrpcTimeoutOffset", @@ -1262,7 +2606,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetUpgradeConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("UpgradeConfigs[%v]", idx), @@ -1276,7 +2639,26 @@ func (m *RouteAction) Validate() error { // no validation rules for InternalRedirectAction - if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxInternalRedirects()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxInternalRedirects", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxInternalRedirects", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MaxInternalRedirects", @@ -1284,9 +2666,28 @@ func (m *RouteAction) Validate() error { cause: err, } } - } - - if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { + } + + if all { + switch v := interface{}(m.GetHedgePolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "HedgePolicy", @@ -1301,31 +2702,62 @@ func (m *RouteAction) Validate() error { case *RouteAction_Cluster: if len(m.GetCluster()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_ClusterHeader: if len(m.GetClusterHeader()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterHeader", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterHeader", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "WeightedClusters", @@ -1336,10 +2768,14 @@ func (m *RouteAction) Validate() error { } default: - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } @@ -1348,15 +2784,38 @@ func (m *RouteAction) Validate() error { case *RouteAction_HostRewrite: if !_RouteAction_HostRewrite_Pattern.MatchString(m.GetHostRewrite()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "HostRewrite", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_AutoHostRewrite: - if v, ok := interface{}(m.GetAutoHostRewrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAutoHostRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "AutoHostRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "AutoHostRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAutoHostRewrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "AutoHostRewrite", @@ -1369,17 +2828,41 @@ func (m *RouteAction) Validate() error { case *RouteAction_AutoHostRewriteHeader: if !_RouteAction_AutoHostRewriteHeader_Pattern.MatchString(m.GetAutoHostRewriteHeader()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "AutoHostRewriteHeader", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return RouteActionMultiError(errors) + } + return nil } +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + // RouteActionValidationError is the validation error returned by // RouteAction.Validate if the designated constraints aren't met. type RouteActionValidationError struct { @@ -1443,16 +2926,49 @@ 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RetryPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RetryPolicyMultiError, or +// nil if none found. +func (m *RetryPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for RetryOn - if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNumRetries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "NumRetries", @@ -1462,7 +2978,26 @@ func (m *RetryPolicy) Validate() error { } } - if v, ok := interface{}(m.GetPerTryTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerTryTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "PerTryTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "PerTryTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerTryTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "PerTryTimeout", @@ -1472,7 +3007,26 @@ func (m *RetryPolicy) Validate() error { } } - if v, ok := interface{}(m.GetRetryPriority()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPriority()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryPriority", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryPriority", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPriority()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryPriority", @@ -1485,7 +3039,26 @@ func (m *RetryPolicy) Validate() error { for idx, item := range m.GetRetryHostPredicate() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetryHostPredicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetryHostPredicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetryHostPredicate[%v]", idx), @@ -1499,7 +3072,26 @@ func (m *RetryPolicy) Validate() error { // no validation rules for HostSelectionRetryMaxAttempts - if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryBackOff()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryBackOff", @@ -1512,7 +3104,26 @@ func (m *RetryPolicy) Validate() error { for idx, item := range m.GetRetriableHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetriableHeaders[%v]", idx), @@ -1527,7 +3138,26 @@ func (m *RetryPolicy) Validate() error { for idx, item := range m.GetRetriableRequestHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), @@ -1539,9 +3169,29 @@ func (m *RetryPolicy) Validate() error { } + if len(errors) > 0 { + return RetryPolicyMultiError(errors) + } + return nil } +// RetryPolicyMultiError is an error wrapping multiple validation errors +// returned by RetryPolicy.ValidateAll() if the designated constraints aren't met. +type RetryPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicyMultiError) AllErrors() []error { return m } + // RetryPolicyValidationError is the validation error returned by // RetryPolicy.Validate if the designated constraints aren't met. type RetryPolicyValidationError struct { @@ -1597,25 +3247,62 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HedgePolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HedgePolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HedgePolicyMultiError, or +// nil if none found. +func (m *HedgePolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *HedgePolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetInitialRequests(); wrapper != nil { if wrapper.GetValue() < 1 { - return HedgePolicyValidationError{ + err := HedgePolicyValidationError{ field: "InitialRequests", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetAdditionalRequestChance()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdditionalRequestChance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HedgePolicyValidationError{ + field: "AdditionalRequestChance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HedgePolicyValidationError{ + field: "AdditionalRequestChance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdditionalRequestChance()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HedgePolicyValidationError{ field: "AdditionalRequestChance", @@ -1627,9 +3314,29 @@ func (m *HedgePolicy) Validate() error { // no validation rules for HedgeOnPerTryTimeout + if len(errors) > 0 { + return HedgePolicyMultiError(errors) + } + return nil } +// HedgePolicyMultiError is an error wrapping multiple validation errors +// returned by HedgePolicy.ValidateAll() if the designated constraints aren't met. +type HedgePolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HedgePolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HedgePolicyMultiError) AllErrors() []error { return m } + // HedgePolicyValidationError is the validation error returned by // HedgePolicy.Validate if the designated constraints aren't met. type HedgePolicyValidationError struct { @@ -1685,27 +3392,49 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RedirectAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedirectAction with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RedirectActionMultiError, +// or nil if none found. +func (m *RedirectAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RedirectAction) validate(all bool) error { if m == nil { return nil } + var errors []error + if !_RedirectAction_HostRedirect_Pattern.MatchString(m.GetHostRedirect()) { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "HostRedirect", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for PortRedirect if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "ResponseCode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for StripQuery @@ -1725,38 +3454,55 @@ func (m *RedirectAction) Validate() error { case *RedirectAction_PathRedirect: if !_RedirectAction_PathRedirect_Pattern.MatchString(m.GetPathRedirect()) { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "PathRedirect", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RedirectAction_PrefixRewrite: if !_RedirectAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "PrefixRewrite", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } - } - - case *RedirectAction_RegexRewrite: - - if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RedirectActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - } + if !all { + return err } + errors = append(errors, err) } } + if len(errors) > 0 { + return RedirectActionMultiError(errors) + } + return nil } +// RedirectActionMultiError is an error wrapping multiple validation errors +// returned by RedirectAction.ValidateAll() if the designated constraints +// aren't met. +type RedirectActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedirectActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedirectActionMultiError) AllErrors() []error { return m } + // RedirectActionValidationError is the validation error returned by // RedirectAction.Validate if the designated constraints aren't met. type RedirectActionValidationError struct { @@ -1819,20 +3565,57 @@ 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DirectResponseAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DirectResponseAction with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DirectResponseActionMultiError, or nil if none found. +func (m *DirectResponseAction) ValidateAll() error { + return m.validate(true) +} + +func (m *DirectResponseAction) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetStatus(); val < 100 || val >= 600 { - return DirectResponseActionValidationError{ + err := DirectResponseActionValidationError{ field: "Status", reason: "value must be inside range [100, 600)", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DirectResponseActionValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DirectResponseActionValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DirectResponseActionValidationError{ field: "Body", @@ -1842,9 +3625,30 @@ func (m *DirectResponseAction) Validate() error { } } + if len(errors) > 0 { + return DirectResponseActionMultiError(errors) + } + return nil } +// DirectResponseActionMultiError is an error wrapping multiple validation +// errors returned by DirectResponseAction.ValidateAll() if the designated +// constraints aren't met. +type DirectResponseActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DirectResponseActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DirectResponseActionMultiError) AllErrors() []error { return m } + // DirectResponseActionValidationError is the validation error returned by // DirectResponseAction.Validate if the designated constraints aren't met. type DirectResponseActionValidationError struct { @@ -1902,20 +3706,58 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Decorator) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decorator with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DecoratorMultiError, or nil +// if none found. +func (m *Decorator) ValidateAll() error { + return m.validate(true) +} + +func (m *Decorator) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetOperation()) < 1 { - return DecoratorValidationError{ + err := DecoratorValidationError{ field: "Operation", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPropagate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPropagate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecoratorValidationError{ + field: "Propagate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecoratorValidationError{ + field: "Propagate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPropagate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DecoratorValidationError{ field: "Propagate", @@ -1925,9 +3767,29 @@ func (m *Decorator) Validate() error { } } + if len(errors) > 0 { + return DecoratorMultiError(errors) + } + return nil } +// DecoratorMultiError is an error wrapping multiple validation errors returned +// by Decorator.ValidateAll() if the designated constraints aren't met. +type DecoratorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DecoratorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DecoratorMultiError) AllErrors() []error { return m } + // DecoratorValidationError is the validation error returned by // Decorator.Validate if the designated constraints aren't met. type DecoratorValidationError struct { @@ -1983,13 +3845,46 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Tracing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tracing with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TracingMultiError, or nil if none found. +func (m *Tracing) ValidateAll() error { + return m.validate(true) +} + +func (m *Tracing) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetClientSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "ClientSampling", @@ -1999,7 +3894,26 @@ func (m *Tracing) Validate() error { } } - if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRandomSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "RandomSampling", @@ -2009,7 +3923,26 @@ func (m *Tracing) Validate() error { } } - if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOverallSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "OverallSampling", @@ -2022,7 +3955,26 @@ func (m *Tracing) Validate() error { for idx, item := range m.GetCustomTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: fmt.Sprintf("CustomTags[%v]", idx), @@ -2034,9 +3986,29 @@ func (m *Tracing) Validate() error { } + if len(errors) > 0 { + return TracingMultiError(errors) + } + return nil } +// TracingMultiError is an error wrapping multiple validation errors returned +// by Tracing.ValidateAll() if the designated constraints aren't met. +type TracingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TracingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TracingMultiError) AllErrors() []error { return m } + // TracingValidationError is the validation error returned by Tracing.Validate // if the designated constraints aren't met. type TracingValidationError struct { @@ -2092,24 +4064,61 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *VirtualCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on VirtualCluster with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in VirtualClusterMultiError, +// or nil if none found. +func (m *VirtualCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *VirtualCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPattern()) > 1024 { - return VirtualClusterValidationError{ + err := VirtualClusterValidationError{ field: "Pattern", reason: "value length must be at most 1024 bytes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualClusterValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualClusterValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualClusterValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -2122,17 +4131,42 @@ func (m *VirtualCluster) Validate() error { } if len(m.GetName()) < 1 { - return VirtualClusterValidationError{ + err := VirtualClusterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Method + if len(errors) > 0 { + return VirtualClusterMultiError(errors) + } + return nil } +// VirtualClusterMultiError is an error wrapping multiple validation errors +// returned by VirtualCluster.ValidateAll() if the designated constraints +// aren't met. +type VirtualClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VirtualClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VirtualClusterMultiError) AllErrors() []error { return m } + // VirtualClusterValidationError is the validation error returned by // VirtualCluster.Validate if the designated constraints aren't met. type VirtualClusterValidationError struct { @@ -2188,19 +4222,38 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetStage(); wrapper != nil { if wrapper.GetValue() > 10 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Stage", reason: "value must be less than or equal to 10", } + if !all { + return err + } + errors = append(errors, err) } } @@ -2208,16 +4261,39 @@ func (m *RateLimit) Validate() error { // no validation rules for DisableKey if len(m.GetActions()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Actions", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetActions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: fmt.Sprintf("Actions[%v]", idx), @@ -2229,9 +4305,29 @@ func (m *RateLimit) Validate() error { } + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { @@ -2287,25 +4383,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderMatcherMultiError, or +// nil if none found. +func (m *HeaderMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_HeaderMatcher_Name_Pattern.MatchString(m.GetName()) { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "Name", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for InvertMatch @@ -2318,15 +4436,38 @@ func (m *HeaderMatcher) Validate() error { case *HeaderMatcher_RegexMatch: if len(m.GetRegexMatch()) > 1024 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "RegexMatch", reason: "value length must be at most 1024 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *HeaderMatcher_SafeRegexMatch: - if v, ok := interface{}(m.GetSafeRegexMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSafeRegexMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "SafeRegexMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "SafeRegexMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSafeRegexMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMatcherValidationError{ field: "SafeRegexMatch", @@ -2338,7 +4479,26 @@ func (m *HeaderMatcher) Validate() error { case *HeaderMatcher_RangeMatch: - if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRangeMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMatcherValidationError{ field: "RangeMatch", @@ -2354,26 +4514,55 @@ func (m *HeaderMatcher) Validate() error { case *HeaderMatcher_PrefixMatch: if len(m.GetPrefixMatch()) < 1 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "PrefixMatch", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *HeaderMatcher_SuffixMatch: if len(m.GetSuffixMatch()) < 1 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "SuffixMatch", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return HeaderMatcherMultiError(errors) + } + return nil } +// HeaderMatcherMultiError is an error wrapping multiple validation errors +// returned by HeaderMatcher.ValidateAll() if the designated constraints +// aren't met. +type HeaderMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMatcherMultiError) AllErrors() []error { return m } + // HeaderMatcherValidationError is the validation error returned by // HeaderMatcher.Validate if the designated constraints aren't met. type HeaderMatcherValidationError struct { @@ -2432,22 +4621,59 @@ 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *QueryParameterMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QueryParameterMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QueryParameterMatcherMultiError, or nil if none found. +func (m *QueryParameterMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *QueryParameterMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if l := len(m.GetName()); l < 1 || l > 1024 { - return QueryParameterMatcherValidationError{ + err := QueryParameterMatcherValidationError{ field: "Name", reason: "value length must be between 1 and 1024 bytes, inclusive", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Value - if v, ok := interface{}(m.GetRegex()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRegex()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QueryParameterMatcherValidationError{ + field: "Regex", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QueryParameterMatcherValidationError{ + field: "Regex", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegex()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryParameterMatcherValidationError{ field: "Regex", @@ -2462,13 +4688,36 @@ func (m *QueryParameterMatcher) Validate() error { case *QueryParameterMatcher_StringMatch: if m.GetStringMatch() == nil { - return QueryParameterMatcherValidationError{ + err := QueryParameterMatcherValidationError{ field: "StringMatch", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStringMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QueryParameterMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QueryParameterMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryParameterMatcherValidationError{ field: "StringMatch", @@ -2483,9 +4732,30 @@ func (m *QueryParameterMatcher) Validate() error { } + if len(errors) > 0 { + return QueryParameterMatcherMultiError(errors) + } + return nil } +// QueryParameterMatcherMultiError is an error wrapping multiple validation +// errors returned by QueryParameterMatcher.ValidateAll() if the designated +// constraints aren't met. +type QueryParameterMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QueryParameterMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QueryParameterMatcherMultiError) AllErrors() []error { return m } + // QueryParameterMatcherValidationError is the validation error returned by // QueryParameterMatcher.Validate if the designated constraints aren't met. type QueryParameterMatcherValidationError struct { @@ -2544,20 +4814,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster_ClusterWeight) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster_ClusterWeight with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// WeightedCluster_ClusterWeightMultiError, or nil if none found. +func (m *WeightedCluster_ClusterWeight) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster_ClusterWeight) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetWeight()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeight()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "Weight", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "Weight", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeight()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: "Weight", @@ -2567,7 +4874,26 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: "MetadataMatch", @@ -2578,16 +4904,39 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } if len(m.GetRequestHeadersToAdd()) > 1000 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -2600,16 +4949,39 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } if len(m.GetResponseHeadersToAdd()) > 1000 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -2621,43 +4993,122 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } - 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, + { + sorted_keys := make([]string, len(m.GetPerFilterConfig())) + i := 0 + for key := range m.GetPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetPerFilterConfig()[key] + _ = val + + // no validation rules for PerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("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, + { + sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) + i := 0 + for key := range m.GetTypedPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedPerFilterConfig()[key] + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return WeightedCluster_ClusterWeightMultiError(errors) } return nil } +// WeightedCluster_ClusterWeightMultiError is an error wrapping multiple +// validation errors returned by WeightedCluster_ClusterWeight.ValidateAll() +// if the designated constraints aren't met. +type WeightedCluster_ClusterWeightMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedCluster_ClusterWeightMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } + // WeightedCluster_ClusterWeightValidationError is the validation error // returned by WeightedCluster_ClusterWeight.Validate if the designated // constraints aren't met. @@ -2717,15 +5168,52 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RouteMatch_GrpcRouteMatchOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch_GrpcRouteMatchOptions with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteMatch_GrpcRouteMatchOptionsMultiError, or nil if none found. +func (m *RouteMatch_GrpcRouteMatchOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch_GrpcRouteMatchOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RouteMatch_GrpcRouteMatchOptionsMultiError(errors) + } + return nil } +// RouteMatch_GrpcRouteMatchOptionsMultiError is an error wrapping multiple +// validation errors returned by +// RouteMatch_GrpcRouteMatchOptions.ValidateAll() if the designated +// constraints aren't met. +type RouteMatch_GrpcRouteMatchOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatch_GrpcRouteMatchOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatch_GrpcRouteMatchOptionsMultiError) AllErrors() []error { return m } + // RouteMatch_GrpcRouteMatchOptionsValidationError is the validation error // returned by RouteMatch_GrpcRouteMatchOptions.Validate if the designated // constraints aren't met. @@ -2785,13 +5273,47 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RouteMatch_TlsContextMatchOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch_TlsContextMatchOptions +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RouteMatch_TlsContextMatchOptionsMultiError, or nil if none found. +func (m *RouteMatch_TlsContextMatchOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch_TlsContextMatchOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPresented()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPresented()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Presented", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Presented", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPresented()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatch_TlsContextMatchOptionsValidationError{ field: "Presented", @@ -2801,7 +5323,26 @@ func (m *RouteMatch_TlsContextMatchOptions) Validate() error { } } - if v, ok := interface{}(m.GetValidated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Validated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Validated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatch_TlsContextMatchOptionsValidationError{ field: "Validated", @@ -2811,9 +5352,31 @@ func (m *RouteMatch_TlsContextMatchOptions) Validate() error { } } + if len(errors) > 0 { + return RouteMatch_TlsContextMatchOptionsMultiError(errors) + } + return nil } +// RouteMatch_TlsContextMatchOptionsMultiError is an error wrapping multiple +// validation errors returned by +// RouteMatch_TlsContextMatchOptions.ValidateAll() if the designated +// constraints aren't met. +type RouteMatch_TlsContextMatchOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatch_TlsContextMatchOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatch_TlsContextMatchOptionsMultiError) AllErrors() []error { return m } + // RouteMatch_TlsContextMatchOptionsValidationError is the validation error // returned by RouteMatch_TlsContextMatchOptions.Validate if the designated // constraints aren't met. @@ -2873,22 +5436,59 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_RequestMirrorPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_RequestMirrorPolicy with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_RequestMirrorPolicyMultiError, or nil if none found. +func (m *RouteAction_RequestMirrorPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_RequestMirrorPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCluster()) < 1 { - return RouteAction_RequestMirrorPolicyValidationError{ + err := RouteAction_RequestMirrorPolicyValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for RuntimeKey - if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_RequestMirrorPolicyValidationError{ field: "RuntimeFraction", @@ -2898,7 +5498,26 @@ func (m *RouteAction_RequestMirrorPolicy) Validate() error { } } - if v, ok := interface{}(m.GetTraceSampled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTraceSampled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "TraceSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "TraceSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTraceSampled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_RequestMirrorPolicyValidationError{ field: "TraceSampled", @@ -2908,9 +5527,30 @@ func (m *RouteAction_RequestMirrorPolicy) Validate() error { } } + if len(errors) > 0 { + return RouteAction_RequestMirrorPolicyMultiError(errors) + } + return nil } +// RouteAction_RequestMirrorPolicyMultiError is an error wrapping multiple +// validation errors returned by RouteAction_RequestMirrorPolicy.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_RequestMirrorPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_RequestMirrorPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_RequestMirrorPolicyMultiError) AllErrors() []error { return m } + // RouteAction_RequestMirrorPolicyValidationError is the validation error // returned by RouteAction_RequestMirrorPolicy.Validate if the designated // constraints aren't met. @@ -2970,19 +5610,52 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicyMultiError, or nil if none found. +func (m *RouteAction_HashPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Terminal switch m.PolicySpecifier.(type) { case *RouteAction_HashPolicy_Header_: - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Header", @@ -2994,7 +5667,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_Cookie_: - if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCookie()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Cookie", @@ -3006,7 +5698,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_ConnectionProperties_: - if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectionProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "ConnectionProperties", @@ -3018,7 +5729,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_QueryParameter_: - if v, ok := interface{}(m.GetQueryParameter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetQueryParameter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "QueryParameter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "QueryParameter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQueryParameter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "QueryParameter", @@ -3030,7 +5760,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_FilterState_: - if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "FilterState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "FilterState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "FilterState", @@ -3041,16 +5790,41 @@ func (m *RouteAction_HashPolicy) Validate() error { } default: - return RouteAction_HashPolicyValidationError{ + err := RouteAction_HashPolicyValidationError{ field: "PolicySpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteAction_HashPolicyMultiError(errors) } return nil } +// RouteAction_HashPolicyMultiError is an error wrapping multiple validation +// errors returned by RouteAction_HashPolicy.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicyMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicyValidationError is the validation error returned by // RouteAction_HashPolicy.Validate if the designated constraints aren't met. type RouteAction_HashPolicyValidationError struct { @@ -3109,20 +5883,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_UpgradeConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_UpgradeConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteAction_UpgradeConfigMultiError, or nil if none found. +func (m *RouteAction_UpgradeConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_UpgradeConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if !_RouteAction_UpgradeConfig_UpgradeType_Pattern.MatchString(m.GetUpgradeType()) { - return RouteAction_UpgradeConfigValidationError{ + err := RouteAction_UpgradeConfigValidationError{ field: "UpgradeType", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_UpgradeConfigValidationError{ field: "Enabled", @@ -3132,9 +5943,30 @@ func (m *RouteAction_UpgradeConfig) Validate() error { } } + if len(errors) > 0 { + return RouteAction_UpgradeConfigMultiError(errors) + } + return nil } +// RouteAction_UpgradeConfigMultiError is an error wrapping multiple validation +// errors returned by RouteAction_UpgradeConfig.ValidateAll() if the +// designated constraints aren't met. +type RouteAction_UpgradeConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_UpgradeConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_UpgradeConfigMultiError) AllErrors() []error { return m } + // RouteAction_UpgradeConfigValidationError is the validation error returned by // RouteAction_UpgradeConfig.Validate if the designated constraints aren't met. type RouteAction_UpgradeConfigValidationError struct { @@ -3195,29 +6027,72 @@ var _RouteAction_UpgradeConfig_UpgradeType_Pattern = regexp.MustCompile("^[^\x00 // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy_Header) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_Header with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_HeaderMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_Header) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_Header) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetHeaderName()) < 1 { - return RouteAction_HashPolicy_HeaderValidationError{ + err := RouteAction_HashPolicy_HeaderValidationError{ field: "HeaderName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_RouteAction_HashPolicy_Header_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - return RouteAction_HashPolicy_HeaderValidationError{ + err := RouteAction_HashPolicy_HeaderValidationError{ field: "HeaderName", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RouteAction_HashPolicy_HeaderMultiError(errors) } return nil } +// RouteAction_HashPolicy_HeaderMultiError is an error wrapping multiple +// validation errors returned by RouteAction_HashPolicy_Header.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_HashPolicy_HeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_HeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_HeaderMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_HeaderValidationError is the validation error // returned by RouteAction_HashPolicy_Header.Validate if the designated // constraints aren't met. @@ -3279,20 +6154,57 @@ var _RouteAction_HashPolicy_Header_HeaderName_Pattern = regexp.MustCompile("^[^\ // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy_Cookie) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_Cookie with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_CookieMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_Cookie) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_Cookie) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return RouteAction_HashPolicy_CookieValidationError{ + err := RouteAction_HashPolicy_CookieValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTtl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ + field: "Ttl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ + field: "Ttl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicy_CookieValidationError{ field: "Ttl", @@ -3304,9 +6216,30 @@ func (m *RouteAction_HashPolicy_Cookie) Validate() error { // no validation rules for Path + if len(errors) > 0 { + return RouteAction_HashPolicy_CookieMultiError(errors) + } + return nil } +// RouteAction_HashPolicy_CookieMultiError is an error wrapping multiple +// validation errors returned by RouteAction_HashPolicy_Cookie.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_HashPolicy_CookieMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_CookieMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_CookieMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_CookieValidationError is the validation error // returned by RouteAction_HashPolicy_Cookie.Validate if the designated // constraints aren't met. @@ -3366,17 +6299,55 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy_ConnectionProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RouteAction_HashPolicy_ConnectionProperties with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// RouteAction_HashPolicy_ConnectionPropertiesMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_ConnectionProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_ConnectionProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SourceIp + if len(errors) > 0 { + return RouteAction_HashPolicy_ConnectionPropertiesMultiError(errors) + } + return nil } +// RouteAction_HashPolicy_ConnectionPropertiesMultiError is an error wrapping +// multiple validation errors returned by +// RouteAction_HashPolicy_ConnectionProperties.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicy_ConnectionPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_ConnectionPropertiesValidationError is the validation // error returned by RouteAction_HashPolicy_ConnectionProperties.Validate if // the designated constraints aren't met. @@ -3436,22 +6407,63 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *RouteAction_HashPolicy_QueryParameter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_QueryParameter +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_QueryParameterMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_QueryParameter) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_QueryParameter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return RouteAction_HashPolicy_QueryParameterValidationError{ + err := RouteAction_HashPolicy_QueryParameterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RouteAction_HashPolicy_QueryParameterMultiError(errors) } return nil } +// RouteAction_HashPolicy_QueryParameterMultiError is an error wrapping +// multiple validation errors returned by +// RouteAction_HashPolicy_QueryParameter.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicy_QueryParameterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_QueryParameterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_QueryParameterMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_QueryParameterValidationError is the validation error // returned by RouteAction_HashPolicy_QueryParameter.Validate if the // designated constraints aren't met. @@ -3511,22 +6523,63 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RouteAction_HashPolicy_FilterState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_FilterState +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_FilterStateMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_FilterState) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_FilterState) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetKey()) < 1 { - return RouteAction_HashPolicy_FilterStateValidationError{ + err := RouteAction_HashPolicy_FilterStateValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RouteAction_HashPolicy_FilterStateMultiError(errors) } return nil } +// RouteAction_HashPolicy_FilterStateMultiError is an error wrapping multiple +// validation errors returned by +// RouteAction_HashPolicy_FilterState.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicy_FilterStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_FilterStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_FilterStateMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_FilterStateValidationError is the validation error // returned by RouteAction_HashPolicy_FilterState.Validate if the designated // constraints aren't met. @@ -3586,24 +6639,61 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RetryPolicy_RetryPriority) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_RetryPriority with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RetryPolicy_RetryPriorityMultiError, or nil if none found. +func (m *RetryPolicy_RetryPriority) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_RetryPriority) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return RetryPolicy_RetryPriorityValidationError{ + err := RetryPolicy_RetryPriorityValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *RetryPolicy_RetryPriority_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicy_RetryPriorityValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicy_RetryPriorityValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryPriorityValidationError{ field: "Config", @@ -3615,7 +6705,26 @@ func (m *RetryPolicy_RetryPriority) Validate() error { case *RetryPolicy_RetryPriority_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicy_RetryPriorityValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicy_RetryPriorityValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryPriorityValidationError{ field: "TypedConfig", @@ -3627,9 +6736,30 @@ func (m *RetryPolicy_RetryPriority) Validate() error { } + if len(errors) > 0 { + return RetryPolicy_RetryPriorityMultiError(errors) + } + return nil } +// RetryPolicy_RetryPriorityMultiError is an error wrapping multiple validation +// errors returned by RetryPolicy_RetryPriority.ValidateAll() if the +// designated constraints aren't met. +type RetryPolicy_RetryPriorityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_RetryPriorityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_RetryPriorityMultiError) AllErrors() []error { return m } + // RetryPolicy_RetryPriorityValidationError is the validation error returned by // RetryPolicy_RetryPriority.Validate if the designated constraints aren't met. type RetryPolicy_RetryPriorityValidationError struct { @@ -3688,24 +6818,61 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RetryPolicy_RetryHostPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_RetryHostPredicate with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RetryPolicy_RetryHostPredicateMultiError, or nil if none found. +func (m *RetryPolicy_RetryHostPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_RetryHostPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return RetryPolicy_RetryHostPredicateValidationError{ + err := RetryPolicy_RetryHostPredicateValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *RetryPolicy_RetryHostPredicate_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryHostPredicateValidationError{ field: "Config", @@ -3717,7 +6884,26 @@ func (m *RetryPolicy_RetryHostPredicate) Validate() error { case *RetryPolicy_RetryHostPredicate_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryHostPredicateValidationError{ field: "TypedConfig", @@ -3729,9 +6915,30 @@ func (m *RetryPolicy_RetryHostPredicate) Validate() error { } + if len(errors) > 0 { + return RetryPolicy_RetryHostPredicateMultiError(errors) + } + return nil } +// RetryPolicy_RetryHostPredicateMultiError is an error wrapping multiple +// validation errors returned by RetryPolicy_RetryHostPredicate.ValidateAll() +// if the designated constraints aren't met. +type RetryPolicy_RetryHostPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_RetryHostPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_RetryHostPredicateMultiError) AllErrors() []error { return m } + // RetryPolicy_RetryHostPredicateValidationError is the validation error // returned by RetryPolicy_RetryHostPredicate.Validate if the designated // constraints aren't met. @@ -3791,64 +6998,121 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RetryPolicy_RetryBackOff) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_RetryBackOff with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RetryPolicy_RetryBackOffMultiError, or nil if none found. +func (m *RetryPolicy_RetryBackOff) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_RetryBackOff) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetBaseInterval() == nil { - return RetryPolicy_RetryBackOffValidationError{ + err := RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetBaseInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RetryPolicy_RetryBackOffValidationError{ + err = RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + 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 dur <= gt { + err := RetryPolicy_RetryBackOffValidationError{ + field: "BaseInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RetryPolicy_RetryBackOffValidationError{ + err = RetryPolicy_RetryBackOffValidationError{ field: "MaxInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return RetryPolicy_RetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := RetryPolicy_RetryBackOffValidationError{ + field: "MaxInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return RetryPolicy_RetryBackOffMultiError(errors) } return nil } +// RetryPolicy_RetryBackOffMultiError is an error wrapping multiple validation +// errors returned by RetryPolicy_RetryBackOff.ValidateAll() if the designated +// constraints aren't met. +type RetryPolicy_RetryBackOffMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_RetryBackOffMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_RetryBackOffMultiError) AllErrors() []error { return m } + // RetryPolicy_RetryBackOffValidationError is the validation error returned by // RetryPolicy_RetryBackOff.Validate if the designated constraints aren't met. type RetryPolicy_RetryBackOffValidationError struct { @@ -3906,18 +7170,51 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimit_ActionMultiError, or nil if none found. +func (m *RateLimit_Action) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ActionSpecifier.(type) { case *RateLimit_Action_SourceCluster_: - if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "SourceCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "SourceCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "SourceCluster", @@ -3929,7 +7226,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_DestinationCluster_: - if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestinationCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "DestinationCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "DestinationCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "DestinationCluster", @@ -3941,7 +7257,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_RequestHeaders_: - if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RequestHeaders", @@ -3953,7 +7288,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_RemoteAddress_: - if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RemoteAddress", @@ -3965,7 +7319,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_GenericKey_: - if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGenericKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "GenericKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "GenericKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "GenericKey", @@ -3977,7 +7350,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_HeaderValueMatch_: - if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderValueMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "HeaderValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "HeaderValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "HeaderValueMatch", @@ -3988,16 +7380,41 @@ func (m *RateLimit_Action) Validate() error { } default: - return RateLimit_ActionValidationError{ + err := RateLimit_ActionValidationError{ field: "ActionSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RateLimit_ActionMultiError(errors) } return nil } +// RateLimit_ActionMultiError is an error wrapping multiple validation errors +// returned by RateLimit_Action.ValidateAll() if the designated constraints +// aren't met. +type RateLimit_ActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_ActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_ActionMultiError) AllErrors() []error { return m } + // RateLimit_ActionValidationError is the validation error returned by // RateLimit_Action.Validate if the designated constraints aren't met. type RateLimit_ActionValidationError struct { @@ -4054,15 +7471,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_SourceCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_SourceCluster with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_SourceClusterMultiError, or nil if none found. +func (m *RateLimit_Action_SourceCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_SourceCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RateLimit_Action_SourceClusterMultiError(errors) + } + return nil } +// RateLimit_Action_SourceClusterMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_SourceCluster.ValidateAll() +// if the designated constraints aren't met. +type RateLimit_Action_SourceClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_SourceClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_SourceClusterMultiError) AllErrors() []error { return m } + // RateLimit_Action_SourceClusterValidationError is the validation error // returned by RateLimit_Action_SourceCluster.Validate if the designated // constraints aren't met. @@ -4122,15 +7574,52 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimit_Action_DestinationCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_DestinationCluster +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_DestinationClusterMultiError, or nil if none found. +func (m *RateLimit_Action_DestinationCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_DestinationCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RateLimit_Action_DestinationClusterMultiError(errors) + } + return nil } +// RateLimit_Action_DestinationClusterMultiError is an error wrapping multiple +// validation errors returned by +// RateLimit_Action_DestinationCluster.ValidateAll() if the designated +// constraints aren't met. +type RateLimit_Action_DestinationClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_DestinationClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_DestinationClusterMultiError) AllErrors() []error { return m } + // RateLimit_Action_DestinationClusterValidationError is the validation error // returned by RateLimit_Action_DestinationCluster.Validate if the designated // constraints aren't met. @@ -4190,36 +7679,83 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_RequestHeaders) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_RequestHeaders with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_RequestHeadersMultiError, or nil if none found. +func (m *RateLimit_Action_RequestHeaders) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_RequestHeaders) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetHeaderName()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ + err := RateLimit_Action_RequestHeadersValidationError{ field: "HeaderName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_RateLimit_Action_RequestHeaders_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - return RateLimit_Action_RequestHeadersValidationError{ + err := RateLimit_Action_RequestHeadersValidationError{ field: "HeaderName", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ + err := RateLimit_Action_RequestHeadersValidationError{ field: "DescriptorKey", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RateLimit_Action_RequestHeadersMultiError(errors) } return nil } +// RateLimit_Action_RequestHeadersMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_RequestHeaders.ValidateAll() +// if the designated constraints aren't met. +type RateLimit_Action_RequestHeadersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_RequestHeadersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_RequestHeadersMultiError) AllErrors() []error { return m } + // RateLimit_Action_RequestHeadersValidationError is the validation error // returned by RateLimit_Action_RequestHeaders.Validate if the designated // constraints aren't met. @@ -4281,15 +7817,50 @@ var _RateLimit_Action_RequestHeaders_HeaderName_Pattern = regexp.MustCompile("^[ // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_RemoteAddress) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_RemoteAddress with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_RemoteAddressMultiError, or nil if none found. +func (m *RateLimit_Action_RemoteAddress) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_RemoteAddress) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RateLimit_Action_RemoteAddressMultiError(errors) + } + return nil } +// RateLimit_Action_RemoteAddressMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_RemoteAddress.ValidateAll() +// if the designated constraints aren't met. +type RateLimit_Action_RemoteAddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_RemoteAddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_RemoteAddressMultiError) AllErrors() []error { return m } + // RateLimit_Action_RemoteAddressValidationError is the validation error // returned by RateLimit_Action_RemoteAddress.Validate if the designated // constraints aren't met. @@ -4349,22 +7920,61 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_GenericKey) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_GenericKey with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimit_Action_GenericKeyMultiError, or nil if none found. +func (m *RateLimit_Action_GenericKey) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_GenericKey) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_GenericKeyValidationError{ + err := RateLimit_Action_GenericKeyValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RateLimit_Action_GenericKeyMultiError(errors) } return nil } +// RateLimit_Action_GenericKeyMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_GenericKey.ValidateAll() if +// the designated constraints aren't met. +type RateLimit_Action_GenericKeyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_GenericKeyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_GenericKeyMultiError) AllErrors() []error { return m } + // RateLimit_Action_GenericKeyValidationError is the validation error returned // by RateLimit_Action_GenericKey.Validate if the designated constraints // aren't met. @@ -4424,20 +8034,58 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimit_Action_HeaderValueMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_HeaderValueMatch +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_HeaderValueMatchMultiError, or nil if none found. +func (m *RateLimit_Action_HeaderValueMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_HeaderValueMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_HeaderValueMatchValidationError{ + err := RateLimit_Action_HeaderValueMatchValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetExpectMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExpectMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: "ExpectMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: "ExpectMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpectMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: "ExpectMatch", @@ -4448,16 +8096,39 @@ func (m *RateLimit_Action_HeaderValueMatch) Validate() error { } if len(m.GetHeaders()) < 1 { - return RateLimit_Action_HeaderValueMatchValidationError{ + err := RateLimit_Action_HeaderValueMatchValidationError{ field: "Headers", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -4469,9 +8140,31 @@ func (m *RateLimit_Action_HeaderValueMatch) Validate() error { } + if len(errors) > 0 { + return RateLimit_Action_HeaderValueMatchMultiError(errors) + } + return nil } +// RateLimit_Action_HeaderValueMatchMultiError is an error wrapping multiple +// validation errors returned by +// RateLimit_Action_HeaderValueMatch.ValidateAll() if the designated +// constraints aren't met. +type RateLimit_Action_HeaderValueMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_HeaderValueMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_HeaderValueMatchMultiError) AllErrors() []error { return m } + // RateLimit_Action_HeaderValueMatchValidationError is the validation error // returned by RateLimit_Action_HeaderValueMatch.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/api/v2/scoped_route.pb.go b/pkg/api/envoy/api/v2/scoped_route.pb.go index 6723261856..d472658006 100644 --- a/pkg/api/envoy/api/v2/scoped_route.pb.go +++ b/pkg/api/envoy/api/v2/scoped_route.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/scoped_route.proto -package envoy_api_v2 +package apiv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies a routing scope, which associates a // :ref:`Key` to a // :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name). @@ -310,13 +305,17 @@ var file_envoy_api_v2_scoped_route_proto_rawDesc = []byte{ 0x73, 0x1a, 0x38, 0x0a, 0x08, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x42, 0x0b, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x55, 0x0a, 0x1a, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x53, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, - 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x90, 0x01, 0x0a, 0x1a, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, + 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/scoped_route.pb.validate.go b/pkg/api/envoy/api/v2/scoped_route.pb.validate.go index 7572fcf50f..8beb4099c5 100644 --- a/pkg/api/envoy/api/v2/scoped_route.pb.validate.go +++ b/pkg/api/envoy/api/v2/scoped_route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/scoped_route.proto -package envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,39 +31,85 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ScopedRouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfiguration with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRouteConfigurationMultiError, or nil if none found. +func (m *ScopedRouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return ScopedRouteConfigurationValidationError{ + err := ScopedRouteConfigurationValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetRouteConfigurationName()) < 1 { - return ScopedRouteConfigurationValidationError{ + err := ScopedRouteConfigurationValidationError{ field: "RouteConfigurationName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetKey() == nil { - return ScopedRouteConfigurationValidationError{ + err := ScopedRouteConfigurationValidationError{ field: "Key", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRouteConfigurationValidationError{ + field: "Key", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRouteConfigurationValidationError{ + field: "Key", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRouteConfigurationValidationError{ field: "Key", @@ -72,9 +119,30 @@ func (m *ScopedRouteConfiguration) Validate() error { } } + if len(errors) > 0 { + return ScopedRouteConfigurationMultiError(errors) + } + return nil } +// ScopedRouteConfigurationMultiError is an error wrapping multiple validation +// errors returned by ScopedRouteConfiguration.ValidateAll() if the designated +// constraints aren't met. +type ScopedRouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfigurationMultiError) AllErrors() []error { return m } + // ScopedRouteConfigurationValidationError is the validation error returned by // ScopedRouteConfiguration.Validate if the designated constraints aren't met. type ScopedRouteConfigurationValidationError struct { @@ -133,23 +201,60 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRouteConfiguration_Key) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfiguration_Key with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRouteConfiguration_KeyMultiError, or nil if none found. +func (m *ScopedRouteConfiguration_Key) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfiguration_Key) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFragments()) < 1 { - return ScopedRouteConfiguration_KeyValidationError{ + err := ScopedRouteConfiguration_KeyValidationError{ field: "Fragments", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFragments() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRouteConfiguration_KeyValidationError{ field: fmt.Sprintf("Fragments[%v]", idx), @@ -161,9 +266,30 @@ func (m *ScopedRouteConfiguration_Key) Validate() error { } + if len(errors) > 0 { + return ScopedRouteConfiguration_KeyMultiError(errors) + } + return nil } +// ScopedRouteConfiguration_KeyMultiError is an error wrapping multiple +// validation errors returned by ScopedRouteConfiguration_Key.ValidateAll() if +// the designated constraints aren't met. +type ScopedRouteConfiguration_KeyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfiguration_KeyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfiguration_KeyMultiError) AllErrors() []error { return m } + // ScopedRouteConfiguration_KeyValidationError is the validation error returned // by ScopedRouteConfiguration_Key.Validate if the designated constraints // aren't met. @@ -223,28 +349,69 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *ScopedRouteConfiguration_Key_Fragment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfiguration_Key_Fragment +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ScopedRouteConfiguration_Key_FragmentMultiError, or nil if none found. +func (m *ScopedRouteConfiguration_Key_Fragment) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfiguration_Key_Fragment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Type.(type) { case *ScopedRouteConfiguration_Key_Fragment_StringKey: // no validation rules for StringKey default: - return ScopedRouteConfiguration_Key_FragmentValidationError{ + err := ScopedRouteConfiguration_Key_FragmentValidationError{ field: "Type", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ScopedRouteConfiguration_Key_FragmentMultiError(errors) + } + return nil } +// ScopedRouteConfiguration_Key_FragmentMultiError is an error wrapping +// multiple validation errors returned by +// ScopedRouteConfiguration_Key_Fragment.ValidateAll() if the designated +// constraints aren't met. +type ScopedRouteConfiguration_Key_FragmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfiguration_Key_FragmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfiguration_Key_FragmentMultiError) AllErrors() []error { return m } + // ScopedRouteConfiguration_Key_FragmentValidationError is the validation error // returned by ScopedRouteConfiguration_Key_Fragment.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/api/v2/srds.pb.go b/pkg/api/envoy/api/v2/srds.pb.go index 5e4347b6bf..22a3023444 100644 --- a/pkg/api/envoy/api/v2/srds.pb.go +++ b/pkg/api/envoy/api/v2/srds.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/api/v2/srds.proto -package envoy_api_v2 +package apiv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type SrdsDummy struct { @@ -115,13 +110,17 @@ var file_envoy_api_v2_srds_proto_rawDesc = []byte{ 0x65, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x2d, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x52, 0x0a, 0x1a, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x53, 0x72, 0x64, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8d, 0x01, 0x0a, 0x1a, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x53, 0x72, 0x64, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/api/v2/srds.pb.validate.go b/pkg/api/envoy/api/v2/srds.pb.validate.go index 9b0a1412e6..fd29f29536 100644 --- a/pkg/api/envoy/api/v2/srds.pb.validate.go +++ b/pkg/api/envoy/api/v2/srds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/srds.proto -package envoy_api_v2 +package apiv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SrdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SrdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SrdsDummyMultiError, or nil +// if none found. +func (m *SrdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *SrdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SrdsDummyMultiError(errors) + } + return nil } +// SrdsDummyMultiError is an error wrapping multiple validation errors returned +// by SrdsDummy.ValidateAll() if the designated constraints aren't met. +type SrdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SrdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SrdsDummyMultiError) AllErrors() []error { return m } + // SrdsDummyValidationError is the validation error returned by // SrdsDummy.Validate if the designated constraints aren't met. type SrdsDummyValidationError struct { diff --git a/pkg/api/envoy/config/accesslog/v2/als.pb.go b/pkg/api/envoy/config/accesslog/v2/als.pb.go index 7d2c9549d1..219ff245c6 100644 --- a/pkg/api/envoy/config/accesslog/v2/als.pb.go +++ b/pkg/api/envoy/config/accesslog/v2/als.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/accesslog/v2/als.proto -package envoy_config_accesslog_v2 +package accesslogv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the built-in *envoy.access_loggers.http_grpc* // :ref:`AccessLog `. This configuration will // populate :ref:`StreamAccessLogsMessage.http_logs @@ -328,14 +323,19 @@ var file_envoy_config_accesslog_v2_als_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x6f, 0x4c, - 0x6f, 0x67, 0x42, 0x6c, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x41, - 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, - 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x67, 0x42, 0xba, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x42, 0x08, + 0x41, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/accesslog/v2/als.pb.validate.go b/pkg/api/envoy/config/accesslog/v2/als.pb.validate.go index 0be9c44faf..5cce4aea0a 100644 --- a/pkg/api/envoy/config/accesslog/v2/als.pb.validate.go +++ b/pkg/api/envoy/config/accesslog/v2/als.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/accesslog/v2/als.proto -package envoy_config_accesslog_v2 +package accesslogv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpGrpcAccessLogConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGrpcAccessLogConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpGrpcAccessLogConfigMultiError, or nil if none found. +func (m *HttpGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGrpcAccessLogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return HttpGrpcAccessLogConfigValidationError{ + err := HttpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpGrpcAccessLogConfigValidationError{ field: "CommonConfig", @@ -58,9 +97,30 @@ func (m *HttpGrpcAccessLogConfig) Validate() error { } } + if len(errors) > 0 { + return HttpGrpcAccessLogConfigMultiError(errors) + } + return nil } +// HttpGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by HttpGrpcAccessLogConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + // HttpGrpcAccessLogConfigValidationError is the validation error returned by // HttpGrpcAccessLogConfig.Validate if the designated constraints aren't met. type HttpGrpcAccessLogConfigValidationError struct { @@ -119,20 +179,57 @@ var _ interface { // Validate checks the field values on TcpGrpcAccessLogConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpGrpcAccessLogConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpGrpcAccessLogConfigMultiError, or nil if none found. +func (m *TcpGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpGrpcAccessLogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return TcpGrpcAccessLogConfigValidationError{ + err := TcpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpGrpcAccessLogConfigValidationError{ field: "CommonConfig", @@ -142,9 +239,30 @@ func (m *TcpGrpcAccessLogConfig) Validate() error { } } + if len(errors) > 0 { + return TcpGrpcAccessLogConfigMultiError(errors) + } + return nil } +// TcpGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by TcpGrpcAccessLogConfig.ValidateAll() if the designated +// constraints aren't met. +type TcpGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + // TcpGrpcAccessLogConfigValidationError is the validation error returned by // TcpGrpcAccessLogConfig.Validate if the designated constraints aren't met. type TcpGrpcAccessLogConfigValidationError struct { @@ -203,27 +321,68 @@ var _ interface { // Validate checks the field values on CommonGrpcAccessLogConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommonGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonGrpcAccessLogConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonGrpcAccessLogConfigMultiError, or nil if none found. +func (m *CommonGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonGrpcAccessLogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetLogName()) < 1 { - return CommonGrpcAccessLogConfigValidationError{ + err := CommonGrpcAccessLogConfigValidationError{ field: "LogName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetGrpcService() == nil { - return CommonGrpcAccessLogConfigValidationError{ + err := CommonGrpcAccessLogConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonGrpcAccessLogConfigValidationError{ field: "GrpcService", @@ -234,27 +393,55 @@ func (m *CommonGrpcAccessLogConfig) Validate() error { } if d := m.GetBufferFlushInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return CommonGrpcAccessLogConfigValidationError{ + err = CommonGrpcAccessLogConfigValidationError{ field: "BufferFlushInterval", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return CommonGrpcAccessLogConfigValidationError{ - field: "BufferFlushInterval", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := CommonGrpcAccessLogConfigValidationError{ + field: "BufferFlushInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetBufferSizeBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBufferSizeBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferSizeBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonGrpcAccessLogConfigValidationError{ field: "BufferSizeBytes", @@ -264,9 +451,30 @@ func (m *CommonGrpcAccessLogConfig) Validate() error { } } + if len(errors) > 0 { + return CommonGrpcAccessLogConfigMultiError(errors) + } + return nil } +// CommonGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by CommonGrpcAccessLogConfig.ValidateAll() if the +// designated constraints aren't met. +type CommonGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + // CommonGrpcAccessLogConfigValidationError is the validation error returned by // CommonGrpcAccessLogConfig.Validate if the designated constraints aren't met. type CommonGrpcAccessLogConfigValidationError struct { diff --git a/pkg/api/envoy/config/accesslog/v2/file.pb.go b/pkg/api/envoy/config/accesslog/v2/file.pb.go index 93dad1581b..d830536509 100644 --- a/pkg/api/envoy/config/accesslog/v2/file.pb.go +++ b/pkg/api/envoy/config/accesslog/v2/file.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/accesslog/v2/file.proto -package envoy_config_accesslog_v2 +package accesslogv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Custom configuration for an :ref:`AccessLog ` // that writes log entries directly to a file. Configures the built-in *envoy.access_loggers.file* // AccessLog. @@ -171,14 +166,19 @@ var file_envoy_config_accesslog_v2_file_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, - 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x6d, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x32, 0x42, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, - 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0xbb, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x76, 0x32, 0xf2, + 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/accesslog/v2/file.pb.validate.go b/pkg/api/envoy/config/accesslog/v2/file.pb.validate.go index 826fa6e588..b92aca7263 100644 --- a/pkg/api/envoy/config/accesslog/v2/file.pb.validate.go +++ b/pkg/api/envoy/config/accesslog/v2/file.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/accesslog/v2/file.proto -package envoy_config_accesslog_v2 +package accesslogv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,41 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FileAccessLog with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FileAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileAccessLog with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FileAccessLogMultiError, or +// nil if none found. +func (m *FileAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *FileAccessLog) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPath()) < 1 { - return FileAccessLogValidationError{ + err := FileAccessLogValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.AccessLogFormat.(type) { @@ -55,7 +75,26 @@ func (m *FileAccessLog) Validate() error { case *FileAccessLog_JsonFormat: - if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetJsonFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileAccessLogValidationError{ field: "JsonFormat", @@ -67,7 +106,26 @@ func (m *FileAccessLog) Validate() error { case *FileAccessLog_TypedJsonFormat: - if v, ok := interface{}(m.GetTypedJsonFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedJsonFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "TypedJsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "TypedJsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedJsonFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileAccessLogValidationError{ field: "TypedJsonFormat", @@ -79,9 +137,30 @@ func (m *FileAccessLog) Validate() error { } + if len(errors) > 0 { + return FileAccessLogMultiError(errors) + } + return nil } +// FileAccessLogMultiError is an error wrapping multiple validation errors +// returned by FileAccessLog.ValidateAll() if the designated constraints +// aren't met. +type FileAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileAccessLogMultiError) AllErrors() []error { return m } + // FileAccessLogValidationError is the validation error returned by // FileAccessLog.Validate if the designated constraints aren't met. type FileAccessLogValidationError struct { diff --git a/pkg/api/envoy/config/accesslog/v3/accesslog.pb.go b/pkg/api/envoy/config/accesslog/v3/accesslog.pb.go index c1441e929d..b03417de7f 100644 --- a/pkg/api/envoy/config/accesslog/v3/accesslog.pb.go +++ b/pkg/api/envoy/config/accesslog/v3/accesslog.pb.go @@ -1,21 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/accesslog/v3/accesslog.proto -package envoy_config_accesslog_v3 +package accesslogv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -30,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ComparisonFilter_Op int32 const ( @@ -182,28 +176,15 @@ type AccessLog struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the access log implementation to instantiate. The name must - // match a statically registered access log. Current built-in loggers include: - // - // #. "envoy.access_loggers.file" - // #. "envoy.access_loggers.http_grpc" - // #. "envoy.access_loggers.tcp_grpc" + // The name of the access log extension configuration. 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. 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.access_loggers.file": :ref:`FileAccessLog - // ` - // #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig - // ` - // #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig - // ` + // Custom configuration that must be set according to the access logger extension being instantiated. + // [#extension-category: envoy.access_loggers] // // Types that are assignable to ConfigType: // *AccessLog_TypedConfig - // *AccessLog_HiddenEnvoyDeprecatedConfig ConfigType isAccessLog_ConfigType `protobuf_oneof:"config_type"` } @@ -267,14 +248,6 @@ func (x *AccessLog) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *AccessLog) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*AccessLog_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isAccessLog_ConfigType interface { isAccessLog_ConfigType() } @@ -283,15 +256,8 @@ type AccessLog_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type AccessLog_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,3,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*AccessLog_TypedConfig) isAccessLog_ConfigType() {} -func (*AccessLog_HiddenEnvoyDeprecatedConfig) isAccessLog_ConfigType() {} - // [#next-free-field: 13] type AccessLogFilter struct { state protoimpl.MessageState @@ -493,6 +459,7 @@ type AccessLogFilter_GrpcStatusFilter struct { type AccessLogFilter_ExtensionFilter struct { // Extension filter. + // [#extension-category: envoy.access_loggers.extension_filters] ExtensionFilter *ExtensionFilter `protobuf:"bytes,11,opt,name=extension_filter,json=extensionFilter,proto3,oneof"` } @@ -784,8 +751,8 @@ type RuntimeFilter struct { // 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 + // ` 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). @@ -1189,7 +1156,6 @@ type ExtensionFilter struct { // // Types that are assignable to ConfigType: // *ExtensionFilter_TypedConfig - // *ExtensionFilter_HiddenEnvoyDeprecatedConfig ConfigType isExtensionFilter_ConfigType `protobuf_oneof:"config_type"` } @@ -1246,14 +1212,6 @@ func (x *ExtensionFilter) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *ExtensionFilter) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*ExtensionFilter_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isExtensionFilter_ConfigType interface { isExtensionFilter_ConfigType() } @@ -1262,15 +1220,8 @@ type ExtensionFilter_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type ExtensionFilter_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*ExtensionFilter_TypedConfig) isExtensionFilter_ConfigType() {} -func (*ExtensionFilter_HiddenEnvoyDeprecatedConfig) isExtensionFilter_ConfigType() {} - var File_envoy_config_accesslog_v3_accesslog_proto protoreflect.FileDescriptor var file_envoy_config_accesslog_v3_accesslog_proto_rawDesc = []byte{ @@ -1289,278 +1240,272 @@ var file_envoy_config_accesslog_v3_accesslog_proto_rawDesc = []byte{ 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x02, 0x0a, - 0x09, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, - 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, + 0x01, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x42, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, + 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x6f, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0xf6, 0x08, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x54, 0x0a, 0x0f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x17, 0x6e, 0x6f, 0x74, 0x5f, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x14, 0x6e, 0x6f, 0x74, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x57, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x61, + 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, + 0x61, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x64, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6e, 0x64, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x09, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6f, + 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, - 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, - 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, - 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x22, 0xf6, 0x08, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x12, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x54, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, + 0x17, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xef, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x48, 0x0a, + 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x1c, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x06, 0x0a, 0x02, 0x45, 0x51, 0x10, 0x00, + 0x12, 0x06, 0x0a, 0x02, 0x47, 0x45, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x45, 0x10, 0x02, + 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, + 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xa3, 0x01, 0x0a, 0x10, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x55, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x17, 0x6e, 0x6f, - 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x14, - 0x6e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, - 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x45, 0x0a, 0x0a, 0x61, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, - 0x2e, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6e, - 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x09, 0x6f, 0x72, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x08, 0x6f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0d, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x14, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, - 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5b, - 0x0a, 0x12, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, 0x70, 0x63, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, - 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, - 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x42, 0x17, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xef, 0x01, 0x0a, - 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x48, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, - 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x39, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1c, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x06, 0x0a, 0x02, - 0x45, 0x51, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x45, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, - 0x4c, 0x45, 0x10, 0x02, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xa3, - 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, + 0x22, 0x9f, 0x01, 0x0a, 0x0e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, - 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, + 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x22, 0x54, 0x0a, 0x14, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, + 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x9f, 0x01, 0x0a, 0x0e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, - 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x3a, 0x36, - 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x4a, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x37, 0x9a, 0xc5, 0x88, + 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x22, 0xf9, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, + 0x12, 0x49, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x75, + 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x18, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x6e, 0x65, 0x73, 0x73, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x22, 0x8e, 0x01, 0x0a, 0x09, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, + 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x31, + 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x14, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x3c, - 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x08, 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, + 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x30, + 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x4a, 0x0a, 0x0f, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x46, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, + 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, + 0xea, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x97, 0x01, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x80, 0x01, 0xfa, 0x42, 0x7d, 0x92, 0x01, 0x7a, 0x22, + 0x78, 0x72, 0x76, 0x52, 0x02, 0x4c, 0x48, 0x52, 0x02, 0x55, 0x48, 0x52, 0x02, 0x55, 0x54, 0x52, + 0x02, 0x4c, 0x52, 0x52, 0x02, 0x55, 0x52, 0x52, 0x02, 0x55, 0x46, 0x52, 0x02, 0x55, 0x43, 0x52, + 0x02, 0x55, 0x4f, 0x52, 0x02, 0x4e, 0x52, 0x52, 0x02, 0x44, 0x49, 0x52, 0x02, 0x46, 0x49, 0x52, + 0x02, 0x52, 0x4c, 0x52, 0x04, 0x55, 0x41, 0x45, 0x58, 0x52, 0x04, 0x52, 0x4c, 0x53, 0x45, 0x52, + 0x02, 0x44, 0x43, 0x52, 0x03, 0x55, 0x52, 0x58, 0x52, 0x02, 0x53, 0x49, 0x52, 0x02, 0x49, 0x48, + 0x52, 0x03, 0x44, 0x50, 0x45, 0x52, 0x05, 0x55, 0x4d, 0x53, 0x44, 0x52, 0x52, 0x04, 0x52, 0x46, + 0x43, 0x46, 0x52, 0x04, 0x4e, 0x46, 0x43, 0x46, 0x52, 0x02, 0x44, 0x54, 0x52, 0x03, 0x55, 0x50, + 0x45, 0x52, 0x02, 0x4e, 0x43, 0x52, 0x02, 0x4f, 0x4d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x80, 0x04, 0x0a, + 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x5d, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, + 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x22, 0xb8, 0x02, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x15, + 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, + 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, + 0x4e, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, + 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, + 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, + 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x48, 0x41, + 0x55, 0x53, 0x54, 0x45, 0x44, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, + 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, + 0x0c, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x0b, 0x12, + 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, + 0x10, 0x0c, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0d, + 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, + 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x0f, + 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x10, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, + 0xda, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x66, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x12, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x66, 0x4b, 0x65, 0x79, 0x4e, 0x6f, 0x74, 0x46, + 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xb6, 0x01, 0x0a, + 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, - 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xf9, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x4b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0e, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x12, - 0x3c, 0x0a, 0x1a, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, - 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x18, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, - 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x6e, 0x65, 0x73, 0x73, 0x3a, 0x35, 0x9a, - 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8e, 0x01, 0x0a, 0x09, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x64, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x08, 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x34, 0x9a, - 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0xdc, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x89, 0x01, 0x0a, 0x05, 0x66, - 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x73, 0xfa, 0x42, 0x70, 0x92, - 0x01, 0x6d, 0x22, 0x6b, 0x72, 0x69, 0x52, 0x02, 0x4c, 0x48, 0x52, 0x02, 0x55, 0x48, 0x52, 0x02, - 0x55, 0x54, 0x52, 0x02, 0x4c, 0x52, 0x52, 0x02, 0x55, 0x52, 0x52, 0x02, 0x55, 0x46, 0x52, 0x02, - 0x55, 0x43, 0x52, 0x02, 0x55, 0x4f, 0x52, 0x02, 0x4e, 0x52, 0x52, 0x02, 0x44, 0x49, 0x52, 0x02, - 0x46, 0x49, 0x52, 0x02, 0x52, 0x4c, 0x52, 0x04, 0x55, 0x41, 0x45, 0x58, 0x52, 0x04, 0x52, 0x4c, - 0x53, 0x45, 0x52, 0x02, 0x44, 0x43, 0x52, 0x03, 0x55, 0x52, 0x58, 0x52, 0x02, 0x53, 0x49, 0x52, - 0x02, 0x49, 0x48, 0x52, 0x03, 0x44, 0x50, 0x45, 0x52, 0x05, 0x55, 0x4d, 0x53, 0x44, 0x52, 0x52, - 0x04, 0x52, 0x46, 0x43, 0x46, 0x52, 0x04, 0x4e, 0x46, 0x43, 0x46, 0x52, 0x02, 0x44, 0x54, 0x52, - 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x22, 0x80, 0x04, 0x0a, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0d, 0xfa, - 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x22, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, - 0x4b, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x14, - 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, - 0x4e, 0x54, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, - 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4e, - 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, - 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x06, 0x12, 0x15, - 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, - 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, - 0x45, 0x5f, 0x45, 0x58, 0x48, 0x41, 0x55, 0x53, 0x54, 0x45, 0x44, 0x10, 0x08, 0x12, 0x17, 0x0a, - 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, - 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, - 0x4e, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c, 0x45, - 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, - 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, - 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x41, 0x54, 0x41, 0x5f, - 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, - 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x10, 0x3a, 0x38, 0x9a, 0xc5, 0x88, - 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xda, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x69, 0x66, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, - 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x66, 0x4b, - 0x65, 0x79, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, - 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x22, 0x8c, 0x02, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x42, 0x43, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x91, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1596,47 +1541,44 @@ var file_envoy_config_accesslog_v3_accesslog_proto_goTypes = []interface{}{ (*MetadataFilter)(nil), // 15: envoy.config.accesslog.v3.MetadataFilter (*ExtensionFilter)(nil), // 16: envoy.config.accesslog.v3.ExtensionFilter (*any.Any)(nil), // 17: google.protobuf.Any - (*_struct.Struct)(nil), // 18: google.protobuf.Struct - (*v3.RuntimeUInt32)(nil), // 19: envoy.config.core.v3.RuntimeUInt32 - (*v31.FractionalPercent)(nil), // 20: envoy.type.v3.FractionalPercent - (*v32.HeaderMatcher)(nil), // 21: envoy.config.route.v3.HeaderMatcher - (*v33.MetadataMatcher)(nil), // 22: envoy.type.matcher.v3.MetadataMatcher - (*wrappers.BoolValue)(nil), // 23: google.protobuf.BoolValue + (*v3.RuntimeUInt32)(nil), // 18: envoy.config.core.v3.RuntimeUInt32 + (*v31.FractionalPercent)(nil), // 19: envoy.type.v3.FractionalPercent + (*v32.HeaderMatcher)(nil), // 20: envoy.config.route.v3.HeaderMatcher + (*v33.MetadataMatcher)(nil), // 21: envoy.type.matcher.v3.MetadataMatcher + (*wrappers.BoolValue)(nil), // 22: google.protobuf.BoolValue } var file_envoy_config_accesslog_v3_accesslog_proto_depIdxs = []int32{ 3, // 0: envoy.config.accesslog.v3.AccessLog.filter:type_name -> envoy.config.accesslog.v3.AccessLogFilter 17, // 1: envoy.config.accesslog.v3.AccessLog.typed_config:type_name -> google.protobuf.Any - 18, // 2: envoy.config.accesslog.v3.AccessLog.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 5, // 3: envoy.config.accesslog.v3.AccessLogFilter.status_code_filter:type_name -> envoy.config.accesslog.v3.StatusCodeFilter - 6, // 4: envoy.config.accesslog.v3.AccessLogFilter.duration_filter:type_name -> envoy.config.accesslog.v3.DurationFilter - 7, // 5: envoy.config.accesslog.v3.AccessLogFilter.not_health_check_filter:type_name -> envoy.config.accesslog.v3.NotHealthCheckFilter - 8, // 6: envoy.config.accesslog.v3.AccessLogFilter.traceable_filter:type_name -> envoy.config.accesslog.v3.TraceableFilter - 9, // 7: envoy.config.accesslog.v3.AccessLogFilter.runtime_filter:type_name -> envoy.config.accesslog.v3.RuntimeFilter - 10, // 8: envoy.config.accesslog.v3.AccessLogFilter.and_filter:type_name -> envoy.config.accesslog.v3.AndFilter - 11, // 9: envoy.config.accesslog.v3.AccessLogFilter.or_filter:type_name -> envoy.config.accesslog.v3.OrFilter - 12, // 10: envoy.config.accesslog.v3.AccessLogFilter.header_filter:type_name -> envoy.config.accesslog.v3.HeaderFilter - 13, // 11: envoy.config.accesslog.v3.AccessLogFilter.response_flag_filter:type_name -> envoy.config.accesslog.v3.ResponseFlagFilter - 14, // 12: envoy.config.accesslog.v3.AccessLogFilter.grpc_status_filter:type_name -> envoy.config.accesslog.v3.GrpcStatusFilter - 16, // 13: envoy.config.accesslog.v3.AccessLogFilter.extension_filter:type_name -> envoy.config.accesslog.v3.ExtensionFilter - 15, // 14: envoy.config.accesslog.v3.AccessLogFilter.metadata_filter:type_name -> envoy.config.accesslog.v3.MetadataFilter - 0, // 15: envoy.config.accesslog.v3.ComparisonFilter.op:type_name -> envoy.config.accesslog.v3.ComparisonFilter.Op - 19, // 16: envoy.config.accesslog.v3.ComparisonFilter.value:type_name -> envoy.config.core.v3.RuntimeUInt32 - 4, // 17: envoy.config.accesslog.v3.StatusCodeFilter.comparison:type_name -> envoy.config.accesslog.v3.ComparisonFilter - 4, // 18: envoy.config.accesslog.v3.DurationFilter.comparison:type_name -> envoy.config.accesslog.v3.ComparisonFilter - 20, // 19: envoy.config.accesslog.v3.RuntimeFilter.percent_sampled:type_name -> envoy.type.v3.FractionalPercent - 3, // 20: envoy.config.accesslog.v3.AndFilter.filters:type_name -> envoy.config.accesslog.v3.AccessLogFilter - 3, // 21: envoy.config.accesslog.v3.OrFilter.filters:type_name -> envoy.config.accesslog.v3.AccessLogFilter - 21, // 22: envoy.config.accesslog.v3.HeaderFilter.header:type_name -> envoy.config.route.v3.HeaderMatcher - 1, // 23: envoy.config.accesslog.v3.GrpcStatusFilter.statuses:type_name -> envoy.config.accesslog.v3.GrpcStatusFilter.Status - 22, // 24: envoy.config.accesslog.v3.MetadataFilter.matcher:type_name -> envoy.type.matcher.v3.MetadataMatcher - 23, // 25: envoy.config.accesslog.v3.MetadataFilter.match_if_key_not_found:type_name -> google.protobuf.BoolValue - 17, // 26: envoy.config.accesslog.v3.ExtensionFilter.typed_config:type_name -> google.protobuf.Any - 18, // 27: envoy.config.accesslog.v3.ExtensionFilter.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 28, // [28:28] is the sub-list for method output_type - 28, // [28:28] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 5, // 2: envoy.config.accesslog.v3.AccessLogFilter.status_code_filter:type_name -> envoy.config.accesslog.v3.StatusCodeFilter + 6, // 3: envoy.config.accesslog.v3.AccessLogFilter.duration_filter:type_name -> envoy.config.accesslog.v3.DurationFilter + 7, // 4: envoy.config.accesslog.v3.AccessLogFilter.not_health_check_filter:type_name -> envoy.config.accesslog.v3.NotHealthCheckFilter + 8, // 5: envoy.config.accesslog.v3.AccessLogFilter.traceable_filter:type_name -> envoy.config.accesslog.v3.TraceableFilter + 9, // 6: envoy.config.accesslog.v3.AccessLogFilter.runtime_filter:type_name -> envoy.config.accesslog.v3.RuntimeFilter + 10, // 7: envoy.config.accesslog.v3.AccessLogFilter.and_filter:type_name -> envoy.config.accesslog.v3.AndFilter + 11, // 8: envoy.config.accesslog.v3.AccessLogFilter.or_filter:type_name -> envoy.config.accesslog.v3.OrFilter + 12, // 9: envoy.config.accesslog.v3.AccessLogFilter.header_filter:type_name -> envoy.config.accesslog.v3.HeaderFilter + 13, // 10: envoy.config.accesslog.v3.AccessLogFilter.response_flag_filter:type_name -> envoy.config.accesslog.v3.ResponseFlagFilter + 14, // 11: envoy.config.accesslog.v3.AccessLogFilter.grpc_status_filter:type_name -> envoy.config.accesslog.v3.GrpcStatusFilter + 16, // 12: envoy.config.accesslog.v3.AccessLogFilter.extension_filter:type_name -> envoy.config.accesslog.v3.ExtensionFilter + 15, // 13: envoy.config.accesslog.v3.AccessLogFilter.metadata_filter:type_name -> envoy.config.accesslog.v3.MetadataFilter + 0, // 14: envoy.config.accesslog.v3.ComparisonFilter.op:type_name -> envoy.config.accesslog.v3.ComparisonFilter.Op + 18, // 15: envoy.config.accesslog.v3.ComparisonFilter.value:type_name -> envoy.config.core.v3.RuntimeUInt32 + 4, // 16: envoy.config.accesslog.v3.StatusCodeFilter.comparison:type_name -> envoy.config.accesslog.v3.ComparisonFilter + 4, // 17: envoy.config.accesslog.v3.DurationFilter.comparison:type_name -> envoy.config.accesslog.v3.ComparisonFilter + 19, // 18: envoy.config.accesslog.v3.RuntimeFilter.percent_sampled:type_name -> envoy.type.v3.FractionalPercent + 3, // 19: envoy.config.accesslog.v3.AndFilter.filters:type_name -> envoy.config.accesslog.v3.AccessLogFilter + 3, // 20: envoy.config.accesslog.v3.OrFilter.filters:type_name -> envoy.config.accesslog.v3.AccessLogFilter + 20, // 21: envoy.config.accesslog.v3.HeaderFilter.header:type_name -> envoy.config.route.v3.HeaderMatcher + 1, // 22: envoy.config.accesslog.v3.GrpcStatusFilter.statuses:type_name -> envoy.config.accesslog.v3.GrpcStatusFilter.Status + 21, // 23: envoy.config.accesslog.v3.MetadataFilter.matcher:type_name -> envoy.type.matcher.v3.MetadataMatcher + 22, // 24: envoy.config.accesslog.v3.MetadataFilter.match_if_key_not_found:type_name -> google.protobuf.BoolValue + 17, // 25: envoy.config.accesslog.v3.ExtensionFilter.typed_config:type_name -> google.protobuf.Any + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_envoy_config_accesslog_v3_accesslog_proto_init() } @@ -1828,7 +1770,6 @@ func file_envoy_config_accesslog_v3_accesslog_proto_init() { } file_envoy_config_accesslog_v3_accesslog_proto_msgTypes[0].OneofWrappers = []interface{}{ (*AccessLog_TypedConfig)(nil), - (*AccessLog_HiddenEnvoyDeprecatedConfig)(nil), } file_envoy_config_accesslog_v3_accesslog_proto_msgTypes[1].OneofWrappers = []interface{}{ (*AccessLogFilter_StatusCodeFilter)(nil), @@ -1846,7 +1787,6 @@ func file_envoy_config_accesslog_v3_accesslog_proto_init() { } file_envoy_config_accesslog_v3_accesslog_proto_msgTypes[14].OneofWrappers = []interface{}{ (*ExtensionFilter_TypedConfig)(nil), - (*ExtensionFilter_HiddenEnvoyDeprecatedConfig)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/api/envoy/config/accesslog/v3/accesslog.pb.validate.go b/pkg/api/envoy/config/accesslog/v3/accesslog.pb.validate.go index ea755794b8..a8bb00766b 100644 --- a/pkg/api/envoy/config/accesslog/v3/accesslog.pb.validate.go +++ b/pkg/api/envoy/config/accesslog/v3/accesslog.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/accesslog/v3/accesslog.proto -package envoy_config_accesslog_v3 +package accesslogv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AccessLog with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AccessLogMultiError, or nil +// if none found. +func (m *AccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *AccessLog) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogValidationError{ field: "Filter", @@ -56,22 +92,29 @@ func (m *AccessLog) Validate() error { case *AccessLog_TypedConfig: - 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *AccessLog_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -80,9 +123,29 @@ func (m *AccessLog) Validate() error { } + if len(errors) > 0 { + return AccessLogMultiError(errors) + } + return nil } +// AccessLogMultiError is an error wrapping multiple validation errors returned +// by AccessLog.ValidateAll() if the designated constraints aren't met. +type AccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AccessLogMultiError) AllErrors() []error { return m } + // AccessLogValidationError is the validation error returned by // AccessLog.Validate if the designated constraints aren't met. type AccessLogValidationError struct { @@ -138,18 +201,51 @@ var _ interface { } = AccessLogValidationError{} // Validate checks the field values on AccessLogFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AccessLogFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AccessLogFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AccessLogFilterMultiError, or nil if none found. +func (m *AccessLogFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *AccessLogFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.FilterSpecifier.(type) { case *AccessLogFilter_StatusCodeFilter: - if v, ok := interface{}(m.GetStatusCodeFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatusCodeFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "StatusCodeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "StatusCodeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatusCodeFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "StatusCodeFilter", @@ -161,7 +257,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_DurationFilter: - if v, ok := interface{}(m.GetDurationFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDurationFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "DurationFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "DurationFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDurationFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "DurationFilter", @@ -173,7 +288,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_NotHealthCheckFilter: - if v, ok := interface{}(m.GetNotHealthCheckFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotHealthCheckFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "NotHealthCheckFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "NotHealthCheckFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotHealthCheckFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "NotHealthCheckFilter", @@ -185,7 +319,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_TraceableFilter: - if v, ok := interface{}(m.GetTraceableFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTraceableFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "TraceableFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "TraceableFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTraceableFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "TraceableFilter", @@ -197,7 +350,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_RuntimeFilter: - if v, ok := interface{}(m.GetRuntimeFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "RuntimeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "RuntimeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "RuntimeFilter", @@ -209,7 +381,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_AndFilter: - if v, ok := interface{}(m.GetAndFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "AndFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "AndFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "AndFilter", @@ -221,7 +412,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_OrFilter: - if v, ok := interface{}(m.GetOrFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "OrFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "OrFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "OrFilter", @@ -233,7 +443,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_HeaderFilter: - if v, ok := interface{}(m.GetHeaderFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "HeaderFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "HeaderFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "HeaderFilter", @@ -245,7 +474,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_ResponseFlagFilter: - if v, ok := interface{}(m.GetResponseFlagFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseFlagFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ResponseFlagFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ResponseFlagFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseFlagFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "ResponseFlagFilter", @@ -257,7 +505,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_GrpcStatusFilter: - if v, ok := interface{}(m.GetGrpcStatusFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcStatusFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "GrpcStatusFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "GrpcStatusFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcStatusFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "GrpcStatusFilter", @@ -269,7 +536,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_ExtensionFilter: - if v, ok := interface{}(m.GetExtensionFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExtensionFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ExtensionFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ExtensionFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtensionFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "ExtensionFilter", @@ -281,7 +567,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_MetadataFilter: - if v, ok := interface{}(m.GetMetadataFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "MetadataFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "MetadataFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "MetadataFilter", @@ -292,16 +597,41 @@ func (m *AccessLogFilter) Validate() error { } default: - return AccessLogFilterValidationError{ + err := AccessLogFilterValidationError{ field: "FilterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return AccessLogFilterMultiError(errors) + } + return nil } +// AccessLogFilterMultiError is an error wrapping multiple validation errors +// returned by AccessLogFilter.ValidateAll() if the designated constraints +// aren't met. +type AccessLogFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AccessLogFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AccessLogFilterMultiError) AllErrors() []error { return m } + // AccessLogFilterValidationError is the validation error returned by // AccessLogFilter.Validate if the designated constraints aren't met. type AccessLogFilterValidationError struct { @@ -357,21 +687,58 @@ var _ interface { } = AccessLogFilterValidationError{} // Validate checks the field values on ComparisonFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ComparisonFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ComparisonFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ComparisonFilterMultiError, or nil if none found. +func (m *ComparisonFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ComparisonFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := ComparisonFilter_Op_name[int32(m.GetOp())]; !ok { - return ComparisonFilterValidationError{ + err := ComparisonFilterValidationError{ field: "Op", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ComparisonFilterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ComparisonFilterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ComparisonFilterValidationError{ field: "Value", @@ -381,9 +748,30 @@ func (m *ComparisonFilter) Validate() error { } } + if len(errors) > 0 { + return ComparisonFilterMultiError(errors) + } + return nil } +// ComparisonFilterMultiError is an error wrapping multiple validation errors +// returned by ComparisonFilter.ValidateAll() if the designated constraints +// aren't met. +type ComparisonFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ComparisonFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ComparisonFilterMultiError) AllErrors() []error { return m } + // ComparisonFilterValidationError is the validation error returned by // ComparisonFilter.Validate if the designated constraints aren't met. type ComparisonFilterValidationError struct { @@ -439,21 +827,58 @@ var _ interface { } = ComparisonFilterValidationError{} // Validate checks the field values on StatusCodeFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *StatusCodeFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatusCodeFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StatusCodeFilterMultiError, or nil if none found. +func (m *StatusCodeFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *StatusCodeFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetComparison() == nil { - return StatusCodeFilterValidationError{ + err := StatusCodeFilterValidationError{ field: "Comparison", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetComparison()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatusCodeFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatusCodeFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatusCodeFilterValidationError{ field: "Comparison", @@ -463,9 +888,30 @@ func (m *StatusCodeFilter) Validate() error { } } + if len(errors) > 0 { + return StatusCodeFilterMultiError(errors) + } + return nil } +// StatusCodeFilterMultiError is an error wrapping multiple validation errors +// returned by StatusCodeFilter.ValidateAll() if the designated constraints +// aren't met. +type StatusCodeFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatusCodeFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatusCodeFilterMultiError) AllErrors() []error { return m } + // StatusCodeFilterValidationError is the validation error returned by // StatusCodeFilter.Validate if the designated constraints aren't met. type StatusCodeFilterValidationError struct { @@ -521,21 +967,58 @@ var _ interface { } = StatusCodeFilterValidationError{} // Validate checks the field values on DurationFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DurationFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DurationFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DurationFilterMultiError, +// or nil if none found. +func (m *DurationFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *DurationFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetComparison() == nil { - return DurationFilterValidationError{ + err := DurationFilterValidationError{ field: "Comparison", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetComparison()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DurationFilterValidationError{ field: "Comparison", @@ -545,9 +1028,30 @@ func (m *DurationFilter) Validate() error { } } + if len(errors) > 0 { + return DurationFilterMultiError(errors) + } + return nil } +// DurationFilterMultiError is an error wrapping multiple validation errors +// returned by DurationFilter.ValidateAll() if the designated constraints +// aren't met. +type DurationFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DurationFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DurationFilterMultiError) AllErrors() []error { return m } + // DurationFilterValidationError is the validation error returned by // DurationFilter.Validate if the designated constraints aren't met. type DurationFilterValidationError struct { @@ -604,15 +1108,50 @@ var _ interface { // Validate checks the field values on NotHealthCheckFilter with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *NotHealthCheckFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NotHealthCheckFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// NotHealthCheckFilterMultiError, or nil if none found. +func (m *NotHealthCheckFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *NotHealthCheckFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return NotHealthCheckFilterMultiError(errors) + } + return nil } +// NotHealthCheckFilterMultiError is an error wrapping multiple validation +// errors returned by NotHealthCheckFilter.ValidateAll() if the designated +// constraints aren't met. +type NotHealthCheckFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NotHealthCheckFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NotHealthCheckFilterMultiError) AllErrors() []error { return m } + // NotHealthCheckFilterValidationError is the validation error returned by // NotHealthCheckFilter.Validate if the designated constraints aren't met. type NotHealthCheckFilterValidationError struct { @@ -670,16 +1209,51 @@ var _ interface { } = NotHealthCheckFilterValidationError{} // Validate checks the field values on TraceableFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TraceableFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TraceableFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TraceableFilterMultiError, or nil if none found. +func (m *TraceableFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *TraceableFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return TraceableFilterMultiError(errors) + } + return nil } +// TraceableFilterMultiError is an error wrapping multiple validation errors +// returned by TraceableFilter.ValidateAll() if the designated constraints +// aren't met. +type TraceableFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TraceableFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TraceableFilterMultiError) AllErrors() []error { return m } + // TraceableFilterValidationError is the validation error returned by // TraceableFilter.Validate if the designated constraints aren't met. type TraceableFilterValidationError struct { @@ -735,21 +1309,58 @@ var _ interface { } = TraceableFilterValidationError{} // Validate checks the field values on RuntimeFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeFilterMultiError, or +// nil if none found. +func (m *RuntimeFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeFilterValidationError{ + err := RuntimeFilterValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPercentSampled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPercentSampled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeFilterValidationError{ + field: "PercentSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeFilterValidationError{ + field: "PercentSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentSampled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFilterValidationError{ field: "PercentSampled", @@ -761,9 +1372,30 @@ func (m *RuntimeFilter) Validate() error { // no validation rules for UseIndependentRandomness + if len(errors) > 0 { + return RuntimeFilterMultiError(errors) + } + return nil } +// RuntimeFilterMultiError is an error wrapping multiple validation errors +// returned by RuntimeFilter.ValidateAll() if the designated constraints +// aren't met. +type RuntimeFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeFilterMultiError) AllErrors() []error { return m } + // RuntimeFilterValidationError is the validation error returned by // RuntimeFilter.Validate if the designated constraints aren't met. type RuntimeFilterValidationError struct { @@ -819,23 +1451,61 @@ var _ interface { } = RuntimeFilterValidationError{} // Validate checks the field values on AndFilter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AndFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AndFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AndFilterMultiError, or nil +// if none found. +func (m *AndFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *AndFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFilters()) < 2 { - return AndFilterValidationError{ + err := AndFilterValidationError{ field: "Filters", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AndFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AndFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AndFilterValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -847,9 +1517,29 @@ func (m *AndFilter) Validate() error { } + if len(errors) > 0 { + return AndFilterMultiError(errors) + } + return nil } +// AndFilterMultiError is an error wrapping multiple validation errors returned +// by AndFilter.ValidateAll() if the designated constraints aren't met. +type AndFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AndFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AndFilterMultiError) AllErrors() []error { return m } + // AndFilterValidationError is the validation error returned by // AndFilter.Validate if the designated constraints aren't met. type AndFilterValidationError struct { @@ -905,23 +1595,61 @@ var _ interface { } = AndFilterValidationError{} // Validate checks the field values on OrFilter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OrFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OrFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OrFilterMultiError, or nil +// if none found. +func (m *OrFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *OrFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFilters()) < 2 { - return OrFilterValidationError{ + err := OrFilterValidationError{ field: "Filters", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OrFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OrFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OrFilterValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -933,9 +1661,29 @@ func (m *OrFilter) Validate() error { } + if len(errors) > 0 { + return OrFilterMultiError(errors) + } + return nil } +// OrFilterMultiError is an error wrapping multiple validation errors returned +// by OrFilter.ValidateAll() if the designated constraints aren't met. +type OrFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OrFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OrFilterMultiError) AllErrors() []error { return m } + // OrFilterValidationError is the validation error returned by // OrFilter.Validate if the designated constraints aren't met. type OrFilterValidationError struct { @@ -991,21 +1739,58 @@ var _ interface { } = OrFilterValidationError{} // Validate checks the field values on HeaderFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderFilterMultiError, or +// nil if none found. +func (m *HeaderFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHeader() == nil { - return HeaderFilterValidationError{ + err := HeaderFilterValidationError{ field: "Header", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderFilterValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderFilterValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderFilterValidationError{ field: "Header", @@ -1015,9 +1800,29 @@ func (m *HeaderFilter) Validate() error { } } + if len(errors) > 0 { + return HeaderFilterMultiError(errors) + } + return nil } +// HeaderFilterMultiError is an error wrapping multiple validation errors +// returned by HeaderFilter.ValidateAll() if the designated constraints aren't met. +type HeaderFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderFilterMultiError) AllErrors() []error { return m } + // HeaderFilterValidationError is the validation error returned by // HeaderFilter.Validate if the designated constraints aren't met. type HeaderFilterValidationError struct { @@ -1074,27 +1879,66 @@ var _ interface { // Validate checks the field values on ResponseFlagFilter with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ResponseFlagFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlagFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResponseFlagFilterMultiError, or nil if none found. +func (m *ResponseFlagFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlagFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetFlags() { _, _ = idx, item if _, ok := _ResponseFlagFilter_Flags_InLookup[item]; !ok { - return ResponseFlagFilterValidationError{ + err := 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 IH DPE UMSDR RFCF NFCF DT]", + 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 UMSDR RFCF NFCF DT UPE NC OM]", + } + if !all { + return err } + errors = append(errors, err) } } + if len(errors) > 0 { + return ResponseFlagFilterMultiError(errors) + } + return nil } +// ResponseFlagFilterMultiError is an error wrapping multiple validation errors +// returned by ResponseFlagFilter.ValidateAll() if the designated constraints +// aren't met. +type ResponseFlagFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlagFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlagFilterMultiError) AllErrors() []error { return m } + // ResponseFlagFilterValidationError is the validation error returned by // ResponseFlagFilter.Validate if the designated constraints aren't met. type ResponseFlagFilterValidationError struct { @@ -1175,33 +2019,75 @@ var _ResponseFlagFilter_Flags_InLookup = map[string]struct{}{ "RFCF": {}, "NFCF": {}, "DT": {}, + "UPE": {}, + "NC": {}, + "OM": {}, } // Validate checks the field values on GrpcStatusFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *GrpcStatusFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcStatusFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcStatusFilterMultiError, or nil if none found. +func (m *GrpcStatusFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcStatusFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStatuses() { _, _ = idx, item if _, ok := GrpcStatusFilter_Status_name[int32(item)]; !ok { - return GrpcStatusFilterValidationError{ + err := GrpcStatusFilterValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for Exclude + if len(errors) > 0 { + return GrpcStatusFilterMultiError(errors) + } + return nil } +// GrpcStatusFilterMultiError is an error wrapping multiple validation errors +// returned by GrpcStatusFilter.ValidateAll() if the designated constraints +// aren't met. +type GrpcStatusFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcStatusFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcStatusFilterMultiError) AllErrors() []error { return m } + // GrpcStatusFilterValidationError is the validation error returned by // GrpcStatusFilter.Validate if the designated constraints aren't met. type GrpcStatusFilterValidationError struct { @@ -1257,14 +2143,47 @@ var _ interface { } = GrpcStatusFilterValidationError{} // Validate checks the field values on MetadataFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MetadataFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataFilterMultiError, +// or nil if none found. +func (m *MetadataFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataFilter) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataFilterValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataFilterValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataFilterValidationError{ field: "Matcher", @@ -1274,7 +2193,26 @@ func (m *MetadataFilter) Validate() error { } } - if v, ok := interface{}(m.GetMatchIfKeyNotFound()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatchIfKeyNotFound()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataFilterValidationError{ + field: "MatchIfKeyNotFound", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataFilterValidationError{ + field: "MatchIfKeyNotFound", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatchIfKeyNotFound()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataFilterValidationError{ field: "MatchIfKeyNotFound", @@ -1284,9 +2222,30 @@ func (m *MetadataFilter) Validate() error { } } + if len(errors) > 0 { + return MetadataFilterMultiError(errors) + } + return nil } +// MetadataFilterMultiError is an error wrapping multiple validation errors +// returned by MetadataFilter.ValidateAll() if the designated constraints +// aren't met. +type MetadataFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataFilterMultiError) AllErrors() []error { return m } + // MetadataFilterValidationError is the validation error returned by // MetadataFilter.Validate if the designated constraints aren't met. type MetadataFilterValidationError struct { @@ -1342,35 +2301,56 @@ var _ interface { } = MetadataFilterValidationError{} // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ExtensionFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtensionFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtensionFilterMultiError, or nil if none found. +func (m *ExtensionFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtensionFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.ConfigType.(type) { 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *ExtensionFilter_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtensionFilterValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -1379,9 +2359,30 @@ func (m *ExtensionFilter) Validate() error { } + if len(errors) > 0 { + return ExtensionFilterMultiError(errors) + } + return nil } +// ExtensionFilterMultiError is an error wrapping multiple validation errors +// returned by ExtensionFilter.ValidateAll() if the designated constraints +// aren't met. +type ExtensionFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtensionFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtensionFilterMultiError) AllErrors() []error { return m } + // ExtensionFilterValidationError is the validation error returned by // ExtensionFilter.Validate if the designated constraints aren't met. type ExtensionFilterValidationError struct { diff --git a/pkg/api/envoy/config/accesslog/v4alpha/accesslog.pb.go b/pkg/api/envoy/config/accesslog/v4alpha/accesslog.pb.go deleted file mode 100644 index daf987218d..0000000000 --- a/pkg/api/envoy/config/accesslog/v4alpha/accesslog.pb.go +++ /dev/null @@ -1,1825 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/accesslog/v4alpha/accesslog.proto - -package envoy_config_accesslog_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type ComparisonFilter_Op int32 - -const ( - // = - ComparisonFilter_EQ ComparisonFilter_Op = 0 - // >= - ComparisonFilter_GE ComparisonFilter_Op = 1 - // <= - ComparisonFilter_LE ComparisonFilter_Op = 2 -) - -// Enum value maps for ComparisonFilter_Op. -var ( - ComparisonFilter_Op_name = map[int32]string{ - 0: "EQ", - 1: "GE", - 2: "LE", - } - ComparisonFilter_Op_value = map[string]int32{ - "EQ": 0, - "GE": 1, - "LE": 2, - } -) - -func (x ComparisonFilter_Op) Enum() *ComparisonFilter_Op { - p := new(ComparisonFilter_Op) - *p = x - return p -} - -func (x ComparisonFilter_Op) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ComparisonFilter_Op) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_enumTypes[0].Descriptor() -} - -func (ComparisonFilter_Op) Type() protoreflect.EnumType { - return &file_envoy_config_accesslog_v4alpha_accesslog_proto_enumTypes[0] -} - -func (x ComparisonFilter_Op) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ComparisonFilter_Op.Descriptor instead. -func (ComparisonFilter_Op) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{2, 0} -} - -type GrpcStatusFilter_Status int32 - -const ( - GrpcStatusFilter_OK GrpcStatusFilter_Status = 0 - GrpcStatusFilter_CANCELED GrpcStatusFilter_Status = 1 - GrpcStatusFilter_UNKNOWN GrpcStatusFilter_Status = 2 - GrpcStatusFilter_INVALID_ARGUMENT GrpcStatusFilter_Status = 3 - GrpcStatusFilter_DEADLINE_EXCEEDED GrpcStatusFilter_Status = 4 - GrpcStatusFilter_NOT_FOUND GrpcStatusFilter_Status = 5 - GrpcStatusFilter_ALREADY_EXISTS GrpcStatusFilter_Status = 6 - GrpcStatusFilter_PERMISSION_DENIED GrpcStatusFilter_Status = 7 - GrpcStatusFilter_RESOURCE_EXHAUSTED GrpcStatusFilter_Status = 8 - GrpcStatusFilter_FAILED_PRECONDITION GrpcStatusFilter_Status = 9 - GrpcStatusFilter_ABORTED GrpcStatusFilter_Status = 10 - GrpcStatusFilter_OUT_OF_RANGE GrpcStatusFilter_Status = 11 - GrpcStatusFilter_UNIMPLEMENTED GrpcStatusFilter_Status = 12 - GrpcStatusFilter_INTERNAL GrpcStatusFilter_Status = 13 - GrpcStatusFilter_UNAVAILABLE GrpcStatusFilter_Status = 14 - GrpcStatusFilter_DATA_LOSS GrpcStatusFilter_Status = 15 - GrpcStatusFilter_UNAUTHENTICATED GrpcStatusFilter_Status = 16 -) - -// Enum value maps for GrpcStatusFilter_Status. -var ( - GrpcStatusFilter_Status_name = map[int32]string{ - 0: "OK", - 1: "CANCELED", - 2: "UNKNOWN", - 3: "INVALID_ARGUMENT", - 4: "DEADLINE_EXCEEDED", - 5: "NOT_FOUND", - 6: "ALREADY_EXISTS", - 7: "PERMISSION_DENIED", - 8: "RESOURCE_EXHAUSTED", - 9: "FAILED_PRECONDITION", - 10: "ABORTED", - 11: "OUT_OF_RANGE", - 12: "UNIMPLEMENTED", - 13: "INTERNAL", - 14: "UNAVAILABLE", - 15: "DATA_LOSS", - 16: "UNAUTHENTICATED", - } - GrpcStatusFilter_Status_value = map[string]int32{ - "OK": 0, - "CANCELED": 1, - "UNKNOWN": 2, - "INVALID_ARGUMENT": 3, - "DEADLINE_EXCEEDED": 4, - "NOT_FOUND": 5, - "ALREADY_EXISTS": 6, - "PERMISSION_DENIED": 7, - "RESOURCE_EXHAUSTED": 8, - "FAILED_PRECONDITION": 9, - "ABORTED": 10, - "OUT_OF_RANGE": 11, - "UNIMPLEMENTED": 12, - "INTERNAL": 13, - "UNAVAILABLE": 14, - "DATA_LOSS": 15, - "UNAUTHENTICATED": 16, - } -) - -func (x GrpcStatusFilter_Status) Enum() *GrpcStatusFilter_Status { - p := new(GrpcStatusFilter_Status) - *p = x - return p -} - -func (x GrpcStatusFilter_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GrpcStatusFilter_Status) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_enumTypes[1].Descriptor() -} - -func (GrpcStatusFilter_Status) Type() protoreflect.EnumType { - return &file_envoy_config_accesslog_v4alpha_accesslog_proto_enumTypes[1] -} - -func (x GrpcStatusFilter_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GrpcStatusFilter_Status.Descriptor instead. -func (GrpcStatusFilter_Status) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{12, 0} -} - -type AccessLog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the access log implementation to instantiate. The name must - // match a statically registered access log. Current built-in loggers include: - // - // #. "envoy.access_loggers.file" - // #. "envoy.access_loggers.http_grpc" - // #. "envoy.access_loggers.tcp_grpc" - 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. - 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.access_loggers.file": :ref:`FileAccessLog - // ` - // #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig - // ` - // #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig - // ` - // - // Types that are assignable to ConfigType: - // *AccessLog_TypedConfig - ConfigType isAccessLog_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *AccessLog) Reset() { - *x = AccessLog{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessLog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessLog) ProtoMessage() {} - -func (x *AccessLog) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessLog.ProtoReflect.Descriptor instead. -func (*AccessLog) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{0} -} - -func (x *AccessLog) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *AccessLog) GetFilter() *AccessLogFilter { - if x != nil { - return x.Filter - } - return nil -} - -func (m *AccessLog) GetConfigType() isAccessLog_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *AccessLog) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*AccessLog_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isAccessLog_ConfigType interface { - isAccessLog_ConfigType() -} - -type AccessLog_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*AccessLog_TypedConfig) isAccessLog_ConfigType() {} - -// [#next-free-field: 13] -type AccessLogFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to FilterSpecifier: - // *AccessLogFilter_StatusCodeFilter - // *AccessLogFilter_DurationFilter - // *AccessLogFilter_NotHealthCheckFilter - // *AccessLogFilter_TraceableFilter - // *AccessLogFilter_RuntimeFilter - // *AccessLogFilter_AndFilter - // *AccessLogFilter_OrFilter - // *AccessLogFilter_HeaderFilter - // *AccessLogFilter_ResponseFlagFilter - // *AccessLogFilter_GrpcStatusFilter - // *AccessLogFilter_ExtensionFilter - // *AccessLogFilter_MetadataFilter - FilterSpecifier isAccessLogFilter_FilterSpecifier `protobuf_oneof:"filter_specifier"` -} - -func (x *AccessLogFilter) Reset() { - *x = AccessLogFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessLogFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessLogFilter) ProtoMessage() {} - -func (x *AccessLogFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessLogFilter.ProtoReflect.Descriptor instead. -func (*AccessLogFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{1} -} - -func (m *AccessLogFilter) GetFilterSpecifier() isAccessLogFilter_FilterSpecifier { - if m != nil { - return m.FilterSpecifier - } - return nil -} - -func (x *AccessLogFilter) GetStatusCodeFilter() *StatusCodeFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_StatusCodeFilter); ok { - return x.StatusCodeFilter - } - return nil -} - -func (x *AccessLogFilter) GetDurationFilter() *DurationFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_DurationFilter); ok { - return x.DurationFilter - } - return nil -} - -func (x *AccessLogFilter) GetNotHealthCheckFilter() *NotHealthCheckFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_NotHealthCheckFilter); ok { - return x.NotHealthCheckFilter - } - return nil -} - -func (x *AccessLogFilter) GetTraceableFilter() *TraceableFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_TraceableFilter); ok { - return x.TraceableFilter - } - return nil -} - -func (x *AccessLogFilter) GetRuntimeFilter() *RuntimeFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_RuntimeFilter); ok { - return x.RuntimeFilter - } - return nil -} - -func (x *AccessLogFilter) GetAndFilter() *AndFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_AndFilter); ok { - return x.AndFilter - } - return nil -} - -func (x *AccessLogFilter) GetOrFilter() *OrFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_OrFilter); ok { - return x.OrFilter - } - return nil -} - -func (x *AccessLogFilter) GetHeaderFilter() *HeaderFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_HeaderFilter); ok { - return x.HeaderFilter - } - return nil -} - -func (x *AccessLogFilter) GetResponseFlagFilter() *ResponseFlagFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_ResponseFlagFilter); ok { - return x.ResponseFlagFilter - } - return nil -} - -func (x *AccessLogFilter) GetGrpcStatusFilter() *GrpcStatusFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_GrpcStatusFilter); ok { - return x.GrpcStatusFilter - } - return nil -} - -func (x *AccessLogFilter) GetExtensionFilter() *ExtensionFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_ExtensionFilter); ok { - return x.ExtensionFilter - } - return nil -} - -func (x *AccessLogFilter) GetMetadataFilter() *MetadataFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_MetadataFilter); ok { - return x.MetadataFilter - } - return nil -} - -type isAccessLogFilter_FilterSpecifier interface { - isAccessLogFilter_FilterSpecifier() -} - -type AccessLogFilter_StatusCodeFilter struct { - // Status code filter. - StatusCodeFilter *StatusCodeFilter `protobuf:"bytes,1,opt,name=status_code_filter,json=statusCodeFilter,proto3,oneof"` -} - -type AccessLogFilter_DurationFilter struct { - // Duration filter. - DurationFilter *DurationFilter `protobuf:"bytes,2,opt,name=duration_filter,json=durationFilter,proto3,oneof"` -} - -type AccessLogFilter_NotHealthCheckFilter struct { - // Not health check filter. - NotHealthCheckFilter *NotHealthCheckFilter `protobuf:"bytes,3,opt,name=not_health_check_filter,json=notHealthCheckFilter,proto3,oneof"` -} - -type AccessLogFilter_TraceableFilter struct { - // Traceable filter. - TraceableFilter *TraceableFilter `protobuf:"bytes,4,opt,name=traceable_filter,json=traceableFilter,proto3,oneof"` -} - -type AccessLogFilter_RuntimeFilter struct { - // Runtime filter. - RuntimeFilter *RuntimeFilter `protobuf:"bytes,5,opt,name=runtime_filter,json=runtimeFilter,proto3,oneof"` -} - -type AccessLogFilter_AndFilter struct { - // And filter. - AndFilter *AndFilter `protobuf:"bytes,6,opt,name=and_filter,json=andFilter,proto3,oneof"` -} - -type AccessLogFilter_OrFilter struct { - // Or filter. - OrFilter *OrFilter `protobuf:"bytes,7,opt,name=or_filter,json=orFilter,proto3,oneof"` -} - -type AccessLogFilter_HeaderFilter struct { - // Header filter. - HeaderFilter *HeaderFilter `protobuf:"bytes,8,opt,name=header_filter,json=headerFilter,proto3,oneof"` -} - -type AccessLogFilter_ResponseFlagFilter struct { - // Response flag filter. - ResponseFlagFilter *ResponseFlagFilter `protobuf:"bytes,9,opt,name=response_flag_filter,json=responseFlagFilter,proto3,oneof"` -} - -type AccessLogFilter_GrpcStatusFilter struct { - // gRPC status filter. - GrpcStatusFilter *GrpcStatusFilter `protobuf:"bytes,10,opt,name=grpc_status_filter,json=grpcStatusFilter,proto3,oneof"` -} - -type AccessLogFilter_ExtensionFilter struct { - // Extension filter. - ExtensionFilter *ExtensionFilter `protobuf:"bytes,11,opt,name=extension_filter,json=extensionFilter,proto3,oneof"` -} - -type AccessLogFilter_MetadataFilter struct { - // Metadata Filter - MetadataFilter *MetadataFilter `protobuf:"bytes,12,opt,name=metadata_filter,json=metadataFilter,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_ExtensionFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_MetadataFilter) isAccessLogFilter_FilterSpecifier() {} - -// Filter on an integer comparison. -type ComparisonFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Comparison operator. - Op ComparisonFilter_Op `protobuf:"varint,1,opt,name=op,proto3,enum=envoy.config.accesslog.v4alpha.ComparisonFilter_Op" json:"op,omitempty"` - // Value to compare against. - Value *v4alpha.RuntimeUInt32 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *ComparisonFilter) Reset() { - *x = ComparisonFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ComparisonFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ComparisonFilter) ProtoMessage() {} - -func (x *ComparisonFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ComparisonFilter.ProtoReflect.Descriptor instead. -func (*ComparisonFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{2} -} - -func (x *ComparisonFilter) GetOp() ComparisonFilter_Op { - if x != nil { - return x.Op - } - return ComparisonFilter_EQ -} - -func (x *ComparisonFilter) GetValue() *v4alpha.RuntimeUInt32 { - if x != nil { - return x.Value - } - return nil -} - -// Filters on HTTP response/status code. -type StatusCodeFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Comparison. - Comparison *ComparisonFilter `protobuf:"bytes,1,opt,name=comparison,proto3" json:"comparison,omitempty"` -} - -func (x *StatusCodeFilter) Reset() { - *x = StatusCodeFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatusCodeFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusCodeFilter) ProtoMessage() {} - -func (x *StatusCodeFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusCodeFilter.ProtoReflect.Descriptor instead. -func (*StatusCodeFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{3} -} - -func (x *StatusCodeFilter) GetComparison() *ComparisonFilter { - if x != nil { - return x.Comparison - } - return nil -} - -// Filters on total request duration in milliseconds. -type DurationFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Comparison. - Comparison *ComparisonFilter `protobuf:"bytes,1,opt,name=comparison,proto3" json:"comparison,omitempty"` -} - -func (x *DurationFilter) Reset() { - *x = DurationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DurationFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DurationFilter) ProtoMessage() {} - -func (x *DurationFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DurationFilter.ProtoReflect.Descriptor instead. -func (*DurationFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{4} -} - -func (x *DurationFilter) GetComparison() *ComparisonFilter { - if x != nil { - return x.Comparison - } - 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *NotHealthCheckFilter) Reset() { - *x = NotHealthCheckFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NotHealthCheckFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotHealthCheckFilter) ProtoMessage() {} - -func (x *NotHealthCheckFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NotHealthCheckFilter.ProtoReflect.Descriptor instead. -func (*NotHealthCheckFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{5} -} - -// Filters for requests that are traceable. See the tracing overview for more -// information on how a request becomes traceable. -type TraceableFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TraceableFilter) Reset() { - *x = TraceableFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TraceableFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TraceableFilter) ProtoMessage() {} - -func (x *TraceableFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TraceableFilter.ProtoReflect.Descriptor instead. -func (*TraceableFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{6} -} - -// Filters for random sampling of requests. -type RuntimeFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *v3.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"` -} - -func (x *RuntimeFilter) Reset() { - *x = RuntimeFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeFilter) ProtoMessage() {} - -func (x *RuntimeFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeFilter.ProtoReflect.Descriptor instead. -func (*RuntimeFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{7} -} - -func (x *RuntimeFilter) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -func (x *RuntimeFilter) GetPercentSampled() *v3.FractionalPercent { - if x != nil { - return x.PercentSampled - } - return nil -} - -func (x *RuntimeFilter) GetUseIndependentRandomness() bool { - if x != nil { - return x.UseIndependentRandomness - } - 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filters []*AccessLogFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *AndFilter) Reset() { - *x = AndFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AndFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AndFilter) ProtoMessage() {} - -func (x *AndFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AndFilter.ProtoReflect.Descriptor instead. -func (*AndFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{8} -} - -func (x *AndFilter) GetFilters() []*AccessLogFilter { - if x != nil { - return x.Filters - } - 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filters []*AccessLogFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *OrFilter) Reset() { - *x = OrFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrFilter) ProtoMessage() {} - -func (x *OrFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrFilter.ProtoReflect.Descriptor instead. -func (*OrFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{9} -} - -func (x *OrFilter) GetFilters() []*AccessLogFilter { - if x != nil { - return x.Filters - } - return nil -} - -// Filters requests based on the presence or value of a request header. -type HeaderFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Only requests with a header which matches the specified HeaderMatcher will - // pass the filter check. - Header *v4alpha1.HeaderMatcher `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` -} - -func (x *HeaderFilter) Reset() { - *x = HeaderFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderFilter) ProtoMessage() {} - -func (x *HeaderFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderFilter.ProtoReflect.Descriptor instead. -func (*HeaderFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{10} -} - -func (x *HeaderFilter) GetHeader() *v4alpha1.HeaderMatcher { - if x != nil { - return x.Header - } - 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *ResponseFlagFilter) Reset() { - *x = ResponseFlagFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseFlagFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseFlagFilter) ProtoMessage() {} - -func (x *ResponseFlagFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseFlagFilter.ProtoReflect.Descriptor instead. -func (*ResponseFlagFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{11} -} - -func (x *ResponseFlagFilter) GetFlags() []string { - if x != nil { - return x.Flags - } - 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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.accesslog.v4alpha.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"` -} - -func (x *GrpcStatusFilter) Reset() { - *x = GrpcStatusFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcStatusFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcStatusFilter) ProtoMessage() {} - -func (x *GrpcStatusFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcStatusFilter.ProtoReflect.Descriptor instead. -func (*GrpcStatusFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{12} -} - -func (x *GrpcStatusFilter) GetStatuses() []GrpcStatusFilter_Status { - if x != nil { - return x.Statuses - } - return nil -} - -func (x *GrpcStatusFilter) GetExclude() bool { - if x != nil { - return x.Exclude - } - return false -} - -// Filters based on matching dynamic metadata. -// If the matcher path and key correspond to an existing key in dynamic -// metadata, the request is logged only if the matcher value is equal to the -// metadata value. If the matcher path and key *do not* correspond to an -// existing key in dynamic metadata, the request is logged only if -// match_if_key_not_found is "true" or unset. -type MetadataFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Matcher to check metadata for specified value. For example, to match on the - // access_log_hint metadata, set the filter to "envoy.common" and the path to - // "access_log_hint", and the value to "true". - Matcher *v4alpha2.MetadataMatcher `protobuf:"bytes,1,opt,name=matcher,proto3" json:"matcher,omitempty"` - // Default result if the key does not exist in dynamic metadata: if unset or - // true, then log; if false, then don't log. - MatchIfKeyNotFound *wrappers.BoolValue `protobuf:"bytes,2,opt,name=match_if_key_not_found,json=matchIfKeyNotFound,proto3" json:"match_if_key_not_found,omitempty"` -} - -func (x *MetadataFilter) Reset() { - *x = MetadataFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataFilter) ProtoMessage() {} - -func (x *MetadataFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataFilter.ProtoReflect.Descriptor instead. -func (*MetadataFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{13} -} - -func (x *MetadataFilter) GetMatcher() *v4alpha2.MetadataMatcher { - if x != nil { - return x.Matcher - } - return nil -} - -func (x *MetadataFilter) GetMatchIfKeyNotFound() *wrappers.BoolValue { - if x != nil { - return x.MatchIfKeyNotFound - } - return nil -} - -// Extension filter is statically registered at runtime. -type ExtensionFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter implementation to instantiate. The name must - // match a statically registered filter. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Custom configuration that depends on the filter being instantiated. - // - // Types that are assignable to ConfigType: - // *ExtensionFilter_TypedConfig - ConfigType isExtensionFilter_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *ExtensionFilter) Reset() { - *x = ExtensionFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionFilter) ProtoMessage() {} - -func (x *ExtensionFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionFilter.ProtoReflect.Descriptor instead. -func (*ExtensionFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP(), []int{14} -} - -func (x *ExtensionFilter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *ExtensionFilter) GetConfigType() isExtensionFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *ExtensionFilter) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*ExtensionFilter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isExtensionFilter_ConfigType interface { - isExtensionFilter_ConfigType() -} - -type ExtensionFilter_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*ExtensionFilter_TypedConfig) isExtensionFilter_ConfigType() {} - -var File_envoy_config_accesslog_v4alpha_accesslog_proto protoreflect.FileDescriptor - -var file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xec, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, - 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0xab, 0x09, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0f, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x17, 0x6e, 0x6f, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x14, - 0x6e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x56, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0a, 0x61, 0x6e, - 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6e, 0x64, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x09, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x53, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x66, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x12, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, - 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5c, - 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0f, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x17, 0x0a, 0x10, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x22, 0xf2, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, - 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1c, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x06, 0x0a, 0x02, - 0x45, 0x51, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x45, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, - 0x4c, 0x45, 0x10, 0x02, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, - 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x0a, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, - 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x9d, 0x01, 0x0a, 0x0e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5a, - 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, - 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x14, 0x4e, - 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x43, 0x0a, 0x0f, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x30, 0x9a, - 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, - 0xf2, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x0f, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x53, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, - 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x75, 0x73, 0x65, 0x49, - 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, - 0x6e, 0x65, 0x73, 0x73, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x09, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x53, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x07, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x64, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0x8a, 0x01, 0x0a, 0x08, 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x53, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x07, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x22, 0x8a, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x4b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x2d, - 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xd5, 0x01, - 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x89, 0x01, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x73, 0xfa, 0x42, 0x70, 0x92, 0x01, 0x6d, 0x22, 0x6b, 0x72, 0x69, - 0x52, 0x02, 0x4c, 0x48, 0x52, 0x02, 0x55, 0x48, 0x52, 0x02, 0x55, 0x54, 0x52, 0x02, 0x4c, 0x52, - 0x52, 0x02, 0x55, 0x52, 0x52, 0x02, 0x55, 0x46, 0x52, 0x02, 0x55, 0x43, 0x52, 0x02, 0x55, 0x4f, - 0x52, 0x02, 0x4e, 0x52, 0x52, 0x02, 0x44, 0x49, 0x52, 0x02, 0x46, 0x49, 0x52, 0x02, 0x52, 0x4c, - 0x52, 0x04, 0x55, 0x41, 0x45, 0x58, 0x52, 0x04, 0x52, 0x4c, 0x53, 0x45, 0x52, 0x02, 0x44, 0x43, - 0x52, 0x03, 0x55, 0x52, 0x58, 0x52, 0x02, 0x53, 0x49, 0x52, 0x02, 0x49, 0x48, 0x52, 0x03, 0x44, - 0x50, 0x45, 0x52, 0x05, 0x55, 0x4d, 0x53, 0x44, 0x52, 0x52, 0x04, 0x52, 0x46, 0x43, 0x46, 0x52, - 0x04, 0x4e, 0x46, 0x43, 0x46, 0x52, 0x02, 0x44, 0x54, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, - 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xfe, 0x03, 0x0a, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x62, 0x0a, 0x08, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x22, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, - 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, - 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, - 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, - 0x49, 0x53, 0x54, 0x53, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, 0x16, 0x0a, - 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x48, 0x41, 0x55, 0x53, - 0x54, 0x45, 0x44, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, - 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x0b, - 0x0a, 0x07, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4f, - 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x11, 0x0a, - 0x0d, 0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x0c, - 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0d, 0x12, 0x0f, - 0x0a, 0x0b, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0e, 0x12, - 0x0d, 0x0a, 0x09, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x0f, 0x12, 0x13, - 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, - 0x44, 0x10, 0x10, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x07, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x4e, 0x0a, 0x16, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x66, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x49, 0x66, 0x4b, 0x65, 0x79, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x22, 0xaf, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x48, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescOnce sync.Once - file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescData = file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDesc -) - -func file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescGZIP() []byte { - file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescOnce.Do(func() { - file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescData) - }) - return file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDescData -} - -var file_envoy_config_accesslog_v4alpha_accesslog_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_envoy_config_accesslog_v4alpha_accesslog_proto_goTypes = []interface{}{ - (ComparisonFilter_Op)(0), // 0: envoy.config.accesslog.v4alpha.ComparisonFilter.Op - (GrpcStatusFilter_Status)(0), // 1: envoy.config.accesslog.v4alpha.GrpcStatusFilter.Status - (*AccessLog)(nil), // 2: envoy.config.accesslog.v4alpha.AccessLog - (*AccessLogFilter)(nil), // 3: envoy.config.accesslog.v4alpha.AccessLogFilter - (*ComparisonFilter)(nil), // 4: envoy.config.accesslog.v4alpha.ComparisonFilter - (*StatusCodeFilter)(nil), // 5: envoy.config.accesslog.v4alpha.StatusCodeFilter - (*DurationFilter)(nil), // 6: envoy.config.accesslog.v4alpha.DurationFilter - (*NotHealthCheckFilter)(nil), // 7: envoy.config.accesslog.v4alpha.NotHealthCheckFilter - (*TraceableFilter)(nil), // 8: envoy.config.accesslog.v4alpha.TraceableFilter - (*RuntimeFilter)(nil), // 9: envoy.config.accesslog.v4alpha.RuntimeFilter - (*AndFilter)(nil), // 10: envoy.config.accesslog.v4alpha.AndFilter - (*OrFilter)(nil), // 11: envoy.config.accesslog.v4alpha.OrFilter - (*HeaderFilter)(nil), // 12: envoy.config.accesslog.v4alpha.HeaderFilter - (*ResponseFlagFilter)(nil), // 13: envoy.config.accesslog.v4alpha.ResponseFlagFilter - (*GrpcStatusFilter)(nil), // 14: envoy.config.accesslog.v4alpha.GrpcStatusFilter - (*MetadataFilter)(nil), // 15: envoy.config.accesslog.v4alpha.MetadataFilter - (*ExtensionFilter)(nil), // 16: envoy.config.accesslog.v4alpha.ExtensionFilter - (*any.Any)(nil), // 17: google.protobuf.Any - (*v4alpha.RuntimeUInt32)(nil), // 18: envoy.config.core.v4alpha.RuntimeUInt32 - (*v3.FractionalPercent)(nil), // 19: envoy.type.v3.FractionalPercent - (*v4alpha1.HeaderMatcher)(nil), // 20: envoy.config.route.v4alpha.HeaderMatcher - (*v4alpha2.MetadataMatcher)(nil), // 21: envoy.type.matcher.v4alpha.MetadataMatcher - (*wrappers.BoolValue)(nil), // 22: google.protobuf.BoolValue -} -var file_envoy_config_accesslog_v4alpha_accesslog_proto_depIdxs = []int32{ - 3, // 0: envoy.config.accesslog.v4alpha.AccessLog.filter:type_name -> envoy.config.accesslog.v4alpha.AccessLogFilter - 17, // 1: envoy.config.accesslog.v4alpha.AccessLog.typed_config:type_name -> google.protobuf.Any - 5, // 2: envoy.config.accesslog.v4alpha.AccessLogFilter.status_code_filter:type_name -> envoy.config.accesslog.v4alpha.StatusCodeFilter - 6, // 3: envoy.config.accesslog.v4alpha.AccessLogFilter.duration_filter:type_name -> envoy.config.accesslog.v4alpha.DurationFilter - 7, // 4: envoy.config.accesslog.v4alpha.AccessLogFilter.not_health_check_filter:type_name -> envoy.config.accesslog.v4alpha.NotHealthCheckFilter - 8, // 5: envoy.config.accesslog.v4alpha.AccessLogFilter.traceable_filter:type_name -> envoy.config.accesslog.v4alpha.TraceableFilter - 9, // 6: envoy.config.accesslog.v4alpha.AccessLogFilter.runtime_filter:type_name -> envoy.config.accesslog.v4alpha.RuntimeFilter - 10, // 7: envoy.config.accesslog.v4alpha.AccessLogFilter.and_filter:type_name -> envoy.config.accesslog.v4alpha.AndFilter - 11, // 8: envoy.config.accesslog.v4alpha.AccessLogFilter.or_filter:type_name -> envoy.config.accesslog.v4alpha.OrFilter - 12, // 9: envoy.config.accesslog.v4alpha.AccessLogFilter.header_filter:type_name -> envoy.config.accesslog.v4alpha.HeaderFilter - 13, // 10: envoy.config.accesslog.v4alpha.AccessLogFilter.response_flag_filter:type_name -> envoy.config.accesslog.v4alpha.ResponseFlagFilter - 14, // 11: envoy.config.accesslog.v4alpha.AccessLogFilter.grpc_status_filter:type_name -> envoy.config.accesslog.v4alpha.GrpcStatusFilter - 16, // 12: envoy.config.accesslog.v4alpha.AccessLogFilter.extension_filter:type_name -> envoy.config.accesslog.v4alpha.ExtensionFilter - 15, // 13: envoy.config.accesslog.v4alpha.AccessLogFilter.metadata_filter:type_name -> envoy.config.accesslog.v4alpha.MetadataFilter - 0, // 14: envoy.config.accesslog.v4alpha.ComparisonFilter.op:type_name -> envoy.config.accesslog.v4alpha.ComparisonFilter.Op - 18, // 15: envoy.config.accesslog.v4alpha.ComparisonFilter.value:type_name -> envoy.config.core.v4alpha.RuntimeUInt32 - 4, // 16: envoy.config.accesslog.v4alpha.StatusCodeFilter.comparison:type_name -> envoy.config.accesslog.v4alpha.ComparisonFilter - 4, // 17: envoy.config.accesslog.v4alpha.DurationFilter.comparison:type_name -> envoy.config.accesslog.v4alpha.ComparisonFilter - 19, // 18: envoy.config.accesslog.v4alpha.RuntimeFilter.percent_sampled:type_name -> envoy.type.v3.FractionalPercent - 3, // 19: envoy.config.accesslog.v4alpha.AndFilter.filters:type_name -> envoy.config.accesslog.v4alpha.AccessLogFilter - 3, // 20: envoy.config.accesslog.v4alpha.OrFilter.filters:type_name -> envoy.config.accesslog.v4alpha.AccessLogFilter - 20, // 21: envoy.config.accesslog.v4alpha.HeaderFilter.header:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 1, // 22: envoy.config.accesslog.v4alpha.GrpcStatusFilter.statuses:type_name -> envoy.config.accesslog.v4alpha.GrpcStatusFilter.Status - 21, // 23: envoy.config.accesslog.v4alpha.MetadataFilter.matcher:type_name -> envoy.type.matcher.v4alpha.MetadataMatcher - 22, // 24: envoy.config.accesslog.v4alpha.MetadataFilter.match_if_key_not_found:type_name -> google.protobuf.BoolValue - 17, // 25: envoy.config.accesslog.v4alpha.ExtensionFilter.typed_config:type_name -> google.protobuf.Any - 26, // [26:26] is the sub-list for method output_type - 26, // [26:26] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name -} - -func init() { file_envoy_config_accesslog_v4alpha_accesslog_proto_init() } -func file_envoy_config_accesslog_v4alpha_accesslog_proto_init() { - if File_envoy_config_accesslog_v4alpha_accesslog_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessLog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessLogFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComparisonFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusCodeFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DurationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NotHealthCheckFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraceableFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AndFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseFlagFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcStatusFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*AccessLog_TypedConfig)(nil), - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*AccessLogFilter_StatusCodeFilter)(nil), - (*AccessLogFilter_DurationFilter)(nil), - (*AccessLogFilter_NotHealthCheckFilter)(nil), - (*AccessLogFilter_TraceableFilter)(nil), - (*AccessLogFilter_RuntimeFilter)(nil), - (*AccessLogFilter_AndFilter)(nil), - (*AccessLogFilter_OrFilter)(nil), - (*AccessLogFilter_HeaderFilter)(nil), - (*AccessLogFilter_ResponseFlagFilter)(nil), - (*AccessLogFilter_GrpcStatusFilter)(nil), - (*AccessLogFilter_ExtensionFilter)(nil), - (*AccessLogFilter_MetadataFilter)(nil), - } - file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*ExtensionFilter_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDesc, - NumEnums: 2, - NumMessages: 15, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_accesslog_v4alpha_accesslog_proto_goTypes, - DependencyIndexes: file_envoy_config_accesslog_v4alpha_accesslog_proto_depIdxs, - EnumInfos: file_envoy_config_accesslog_v4alpha_accesslog_proto_enumTypes, - MessageInfos: file_envoy_config_accesslog_v4alpha_accesslog_proto_msgTypes, - }.Build() - File_envoy_config_accesslog_v4alpha_accesslog_proto = out.File - file_envoy_config_accesslog_v4alpha_accesslog_proto_rawDesc = nil - file_envoy_config_accesslog_v4alpha_accesslog_proto_goTypes = nil - file_envoy_config_accesslog_v4alpha_accesslog_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/accesslog/v4alpha/accesslog.pb.validate.go b/pkg/api/envoy/config/accesslog/v4alpha/accesslog.pb.validate.go deleted file mode 100644 index 5c8d8dd163..0000000000 --- a/pkg/api/envoy/config/accesslog/v4alpha/accesslog.pb.validate.go +++ /dev/null @@ -1,1413 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/accesslog/v4alpha/accesslog.proto - -package envoy_config_accesslog_v4alpha - -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{} -) - -// 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 { - if m == nil { - return nil - } - - // no validation rules for Name - - 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, - } - } - } - - switch m.ConfigType.(type) { - - case *AccessLog_TypedConfig: - - 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, - } - } - } - - } - - return nil -} - -// AccessLogValidationError is the validation error returned by -// AccessLog.Validate if the designated constraints aren't met. -type AccessLogValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AccessLogValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AccessLogValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AccessLogValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AccessLogValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AccessLogValidationError) ErrorName() string { return "AccessLogValidationError" } - -// Error satisfies the builtin error interface -func (e AccessLogValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAccessLog.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AccessLogValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AccessLogValidationError{} - -// Validate checks the field values on AccessLogFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *AccessLogFilter) Validate() error { - if m == nil { - return nil - } - - switch m.FilterSpecifier.(type) { - - case *AccessLogFilter_StatusCodeFilter: - - 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: - - 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: - - 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: - - 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: - - 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: - - 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: - - 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: - - 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: - - 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: - - 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, - } - } - } - - case *AccessLogFilter_ExtensionFilter: - - 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, - } - } - } - - case *AccessLogFilter_MetadataFilter: - - if v, ok := interface{}(m.GetMetadataFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "MetadataFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// AccessLogFilterValidationError is the validation error returned by -// AccessLogFilter.Validate if the designated constraints aren't met. -type AccessLogFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AccessLogFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AccessLogFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AccessLogFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AccessLogFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AccessLogFilterValidationError) ErrorName() string { return "AccessLogFilterValidationError" } - -// Error satisfies the builtin error interface -func (e AccessLogFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAccessLogFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AccessLogFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AccessLogFilterValidationError{} - -// Validate checks the field values on ComparisonFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ComparisonFilter) Validate() error { - if m == nil { - return nil - } - - if _, ok := ComparisonFilter_Op_name[int32(m.GetOp())]; !ok { - return ComparisonFilterValidationError{ - field: "Op", - reason: "value must be one of the defined enum values", - } - } - - 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, - } - } - } - - return nil -} - -// ComparisonFilterValidationError is the validation error returned by -// ComparisonFilter.Validate if the designated constraints aren't met. -type ComparisonFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ComparisonFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ComparisonFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ComparisonFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ComparisonFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ComparisonFilterValidationError) ErrorName() string { return "ComparisonFilterValidationError" } - -// Error satisfies the builtin error interface -func (e ComparisonFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sComparisonFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ComparisonFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ComparisonFilterValidationError{} - -// Validate checks the field values on StatusCodeFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *StatusCodeFilter) Validate() error { - if m == nil { - return nil - } - - if m.GetComparison() == nil { - return StatusCodeFilterValidationError{ - field: "Comparison", - reason: "value is required", - } - } - - 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, - } - } - } - - return nil -} - -// StatusCodeFilterValidationError is the validation error returned by -// StatusCodeFilter.Validate if the designated constraints aren't met. -type StatusCodeFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatusCodeFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatusCodeFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatusCodeFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatusCodeFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatusCodeFilterValidationError) ErrorName() string { return "StatusCodeFilterValidationError" } - -// Error satisfies the builtin error interface -func (e StatusCodeFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatusCodeFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatusCodeFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatusCodeFilterValidationError{} - -// Validate checks the field values on DurationFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *DurationFilter) Validate() error { - if m == nil { - return nil - } - - if m.GetComparison() == nil { - return DurationFilterValidationError{ - field: "Comparison", - reason: "value is required", - } - } - - 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, - } - } - } - - return nil -} - -// DurationFilterValidationError is the validation error returned by -// DurationFilter.Validate if the designated constraints aren't met. -type DurationFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DurationFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DurationFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DurationFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DurationFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DurationFilterValidationError) ErrorName() string { return "DurationFilterValidationError" } - -// Error satisfies the builtin error interface -func (e DurationFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDurationFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DurationFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DurationFilterValidationError{} - -// Validate checks the field values on NotHealthCheckFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *NotHealthCheckFilter) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// NotHealthCheckFilterValidationError is the validation error returned by -// NotHealthCheckFilter.Validate if the designated constraints aren't met. -type NotHealthCheckFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NotHealthCheckFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NotHealthCheckFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NotHealthCheckFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NotHealthCheckFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NotHealthCheckFilterValidationError) ErrorName() string { - return "NotHealthCheckFilterValidationError" -} - -// Error satisfies the builtin error interface -func (e NotHealthCheckFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNotHealthCheckFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NotHealthCheckFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NotHealthCheckFilterValidationError{} - -// Validate checks the field values on TraceableFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *TraceableFilter) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// TraceableFilterValidationError is the validation error returned by -// TraceableFilter.Validate if the designated constraints aren't met. -type TraceableFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TraceableFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TraceableFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TraceableFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TraceableFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TraceableFilterValidationError) ErrorName() string { return "TraceableFilterValidationError" } - -// Error satisfies the builtin error interface -func (e TraceableFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTraceableFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TraceableFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TraceableFilterValidationError{} - -// Validate checks the field values on RuntimeFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RuntimeFilter) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeFilterValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - // no validation rules for UseIndependentRandomness - - return nil -} - -// RuntimeFilterValidationError is the validation error returned by -// RuntimeFilter.Validate if the designated constraints aren't met. -type RuntimeFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeFilterValidationError) ErrorName() string { return "RuntimeFilterValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeFilterValidationError{} - -// Validate checks the field values on AndFilter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *AndFilter) Validate() error { - if m == nil { - return nil - } - - if len(m.GetFilters()) < 2 { - return AndFilterValidationError{ - field: "Filters", - reason: "value must contain at least 2 item(s)", - } - } - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - 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, - } - } - } - - } - - return nil -} - -// AndFilterValidationError is the validation error returned by -// AndFilter.Validate if the designated constraints aren't met. -type AndFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AndFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AndFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AndFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AndFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AndFilterValidationError) ErrorName() string { return "AndFilterValidationError" } - -// Error satisfies the builtin error interface -func (e AndFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAndFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AndFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AndFilterValidationError{} - -// Validate checks the field values on OrFilter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *OrFilter) Validate() error { - if m == nil { - return nil - } - - if len(m.GetFilters()) < 2 { - return OrFilterValidationError{ - field: "Filters", - reason: "value must contain at least 2 item(s)", - } - } - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - 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, - } - } - } - - } - - return nil -} - -// OrFilterValidationError is the validation error returned by -// OrFilter.Validate if the designated constraints aren't met. -type OrFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OrFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OrFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OrFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OrFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OrFilterValidationError) ErrorName() string { return "OrFilterValidationError" } - -// Error satisfies the builtin error interface -func (e OrFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOrFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OrFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OrFilterValidationError{} - -// Validate checks the field values on HeaderFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HeaderFilter) Validate() error { - if m == nil { - return nil - } - - if m.GetHeader() == nil { - return HeaderFilterValidationError{ - field: "Header", - reason: "value is required", - } - } - - 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, - } - } - } - - return nil -} - -// HeaderFilterValidationError is the validation error returned by -// HeaderFilter.Validate if the designated constraints aren't met. -type HeaderFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderFilterValidationError) ErrorName() string { return "HeaderFilterValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderFilterValidationError{} - -// Validate checks the field values on ResponseFlagFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ResponseFlagFilter) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetFlags() { - _, _ = idx, item - - 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 IH DPE UMSDR RFCF NFCF DT]", - } - } - - } - - return nil -} - -// ResponseFlagFilterValidationError is the validation error returned by -// ResponseFlagFilter.Validate if the designated constraints aren't met. -type ResponseFlagFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResponseFlagFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResponseFlagFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResponseFlagFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResponseFlagFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResponseFlagFilterValidationError) ErrorName() string { - return "ResponseFlagFilterValidationError" -} - -// Error satisfies the builtin error interface -func (e ResponseFlagFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResponseFlagFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResponseFlagFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResponseFlagFilterValidationError{} - -var _ResponseFlagFilter_Flags_InLookup = map[string]struct{}{ - "LH": {}, - "UH": {}, - "UT": {}, - "LR": {}, - "UR": {}, - "UF": {}, - "UC": {}, - "UO": {}, - "NR": {}, - "DI": {}, - "FI": {}, - "RL": {}, - "UAEX": {}, - "RLSE": {}, - "DC": {}, - "URX": {}, - "SI": {}, - "IH": {}, - "DPE": {}, - "UMSDR": {}, - "RFCF": {}, - "NFCF": {}, - "DT": {}, -} - -// Validate checks the field values on GrpcStatusFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *GrpcStatusFilter) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetStatuses() { - _, _ = idx, item - - if _, ok := GrpcStatusFilter_Status_name[int32(item)]; !ok { - return GrpcStatusFilterValidationError{ - field: fmt.Sprintf("Statuses[%v]", idx), - reason: "value must be one of the defined enum values", - } - } - - } - - // no validation rules for Exclude - - return nil -} - -// GrpcStatusFilterValidationError is the validation error returned by -// GrpcStatusFilter.Validate if the designated constraints aren't met. -type GrpcStatusFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcStatusFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcStatusFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcStatusFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcStatusFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcStatusFilterValidationError) ErrorName() string { return "GrpcStatusFilterValidationError" } - -// Error satisfies the builtin error interface -func (e GrpcStatusFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcStatusFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcStatusFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcStatusFilterValidationError{} - -// Validate checks the field values on MetadataFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *MetadataFilter) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataFilterValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetMatchIfKeyNotFound()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataFilterValidationError{ - field: "MatchIfKeyNotFound", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// MetadataFilterValidationError is the validation error returned by -// MetadataFilter.Validate if the designated constraints aren't met. -type MetadataFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataFilterValidationError) ErrorName() string { return "MetadataFilterValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataFilterValidationError{} - -// 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_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/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.go b/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.go index 3e4229a1b4..2e426780f5 100644 --- a/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.go +++ b/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/bootstrap/v2/bootstrap.proto -package envoy_config_bootstrap_v2 +package bootstrapv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v22 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" auth "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/auth" @@ -16,7 +16,6 @@ import ( v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/overload/v2alpha" v21 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/trace/v2" _ "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" wrappers "github.com/golang/protobuf/ptypes/wrappers" @@ -33,10 +32,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Bootstrap :ref:`configuration overview `. // [#next-free-field: 21] type Bootstrap struct { @@ -1457,12 +1452,17 @@ var file_envoy_config_bootstrap_v2_bootstrap_proto_rawDesc = []byte{ 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x42, 0x43, 0x0a, 0x27, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x79, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x42, 0x91, 0x01, 0x0a, + 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x76, 0x32, 0x3b, 0x62, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.validate.go b/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.validate.go index d5ecb0e7b8..fa19b64cd2 100644 --- a/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.validate.go +++ b/pkg/api/envoy/config/bootstrap/v2/bootstrap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/bootstrap/v2/bootstrap.proto -package envoy_config_bootstrap_v2 +package bootstrapv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Bootstrap with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Bootstrap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Bootstrap with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BootstrapMultiError, or nil +// if none found. +func (m *Bootstrap) ValidateAll() error { + return m.validate(true) +} + +func (m *Bootstrap) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Node", @@ -50,7 +86,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetStaticResources()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStaticResources()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StaticResources", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StaticResources", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStaticResources()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "StaticResources", @@ -60,7 +115,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetDynamicResources()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDynamicResources()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DynamicResources", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DynamicResources", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicResources()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "DynamicResources", @@ -70,7 +144,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetClusterManager()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClusterManager()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "ClusterManager", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "ClusterManager", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClusterManager()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "ClusterManager", @@ -80,7 +173,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetHdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "HdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "HdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "HdsConfig", @@ -95,7 +207,26 @@ func (m *Bootstrap) Validate() error { for idx, item := range m.GetStatsSinks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("StatsSinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("StatsSinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: fmt.Sprintf("StatsSinks[%v]", idx), @@ -107,7 +238,26 @@ func (m *Bootstrap) Validate() error { } - if v, ok := interface{}(m.GetStatsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "StatsConfig", @@ -118,28 +268,56 @@ func (m *Bootstrap) Validate() error { } if d := m.GetStatsFlushInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return BootstrapValidationError{ + err = BootstrapValidationError{ field: "StatsFlushInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - lt := time.Duration(300*time.Second + 0*time.Nanosecond) - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + lt := time.Duration(300*time.Second + 0*time.Nanosecond) + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if dur < gte || dur >= lt { - return BootstrapValidationError{ - field: "StatsFlushInterval", - reason: "value must be inside range [1ms, 5m0s)", + if dur < gte || dur >= lt { + err := BootstrapValidationError{ + field: "StatsFlushInterval", + reason: "value must be inside range [1ms, 5m0s)", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetWatchdog()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWatchdog()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Watchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Watchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWatchdog()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Watchdog", @@ -149,7 +327,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTracing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Tracing", @@ -159,7 +356,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetRuntime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Runtime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Runtime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Runtime", @@ -169,7 +385,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetLayeredRuntime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLayeredRuntime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "LayeredRuntime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "LayeredRuntime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLayeredRuntime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "LayeredRuntime", @@ -179,7 +414,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetAdmin()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdmin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Admin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Admin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdmin()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Admin", @@ -189,7 +443,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetOverloadManager()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOverloadManager()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "OverloadManager", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "OverloadManager", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverloadManager()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "OverloadManager", @@ -203,7 +476,26 @@ func (m *Bootstrap) Validate() error { // no validation rules for HeaderPrefix - if v, ok := interface{}(m.GetStatsServerVersionOverride()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsServerVersionOverride()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsServerVersionOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsServerVersionOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsServerVersionOverride()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "StatsServerVersionOverride", @@ -215,9 +507,29 @@ func (m *Bootstrap) Validate() error { // no validation rules for UseTcpForDnsLookups + if len(errors) > 0 { + return BootstrapMultiError(errors) + } + return nil } +// BootstrapMultiError is an error wrapping multiple validation errors returned +// by Bootstrap.ValidateAll() if the designated constraints aren't met. +type BootstrapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BootstrapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BootstrapMultiError) AllErrors() []error { return m } + // BootstrapValidationError is the validation error returned by // Bootstrap.Validate if the designated constraints aren't met. type BootstrapValidationError struct { @@ -273,17 +585,50 @@ var _ interface { } = BootstrapValidationError{} // Validate checks the field values on Admin with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Admin) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Admin with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in AdminMultiError, or nil if none found. +func (m *Admin) ValidateAll() error { + return m.validate(true) +} + +func (m *Admin) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for AccessLogPath // no validation rules for ProfilePath - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdminValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdminValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdminValidationError{ field: "Address", @@ -296,7 +641,26 @@ func (m *Admin) Validate() error { for idx, item := range m.GetSocketOptions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdminValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdminValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdminValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), @@ -308,9 +672,29 @@ func (m *Admin) Validate() error { } + if len(errors) > 0 { + return AdminMultiError(errors) + } + return nil } +// AdminMultiError is an error wrapping multiple validation errors returned by +// Admin.ValidateAll() if the designated constraints aren't met. +type AdminMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdminMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdminMultiError) AllErrors() []error { return m } + // AdminValidationError is the validation error returned by Admin.Validate if // the designated constraints aren't met. type AdminValidationError struct { @@ -366,16 +750,49 @@ var _ interface { } = AdminValidationError{} // Validate checks the field values on ClusterManager with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterManager) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterManager with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterManagerMultiError, +// or nil if none found. +func (m *ClusterManager) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterManager) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for LocalClusterName - if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOutlierDetection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManagerValidationError{ field: "OutlierDetection", @@ -385,7 +802,26 @@ func (m *ClusterManager) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamBindConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManagerValidationError{ field: "UpstreamBindConfig", @@ -395,7 +831,26 @@ func (m *ClusterManager) Validate() error { } } - if v, ok := interface{}(m.GetLoadStatsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadStatsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "LoadStatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "LoadStatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadStatsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManagerValidationError{ field: "LoadStatsConfig", @@ -405,9 +860,30 @@ func (m *ClusterManager) Validate() error { } } + if len(errors) > 0 { + return ClusterManagerMultiError(errors) + } + return nil } +// ClusterManagerMultiError is an error wrapping multiple validation errors +// returned by ClusterManager.ValidateAll() if the designated constraints +// aren't met. +type ClusterManagerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterManagerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterManagerMultiError) AllErrors() []error { return m } + // ClusterManagerValidationError is the validation error returned by // ClusterManager.Validate if the designated constraints aren't met. type ClusterManagerValidationError struct { @@ -463,13 +939,47 @@ var _ interface { } = ClusterManagerValidationError{} // Validate checks the field values on Watchdog with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Watchdog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Watchdog with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in WatchdogMultiError, or nil +// if none found. +func (m *Watchdog) ValidateAll() error { + return m.validate(true) +} + +func (m *Watchdog) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMissTimeout()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMissTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMissTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "MissTimeout", @@ -479,7 +989,26 @@ func (m *Watchdog) Validate() error { } } - if v, ok := interface{}(m.GetMegamissTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMegamissTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MegamissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MegamissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMegamissTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "MegamissTimeout", @@ -489,7 +1018,26 @@ func (m *Watchdog) Validate() error { } } - if v, ok := interface{}(m.GetKillTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKillTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "KillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "KillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKillTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "KillTimeout", @@ -499,7 +1047,26 @@ func (m *Watchdog) Validate() error { } } - if v, ok := interface{}(m.GetMultikillTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMultikillTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MultikillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MultikillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMultikillTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "MultikillTimeout", @@ -509,9 +1076,29 @@ func (m *Watchdog) Validate() error { } } + if len(errors) > 0 { + return WatchdogMultiError(errors) + } + return nil } +// WatchdogMultiError is an error wrapping multiple validation errors returned +// by Watchdog.ValidateAll() if the designated constraints aren't met. +type WatchdogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WatchdogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WatchdogMultiError) AllErrors() []error { return m } + // WatchdogValidationError is the validation error returned by // Watchdog.Validate if the designated constraints aren't met. type WatchdogValidationError struct { @@ -567,19 +1154,52 @@ var _ interface { } = WatchdogValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Runtime) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Runtime with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RuntimeMultiError, or nil if none found. +func (m *Runtime) ValidateAll() error { + return m.validate(true) +} + +func (m *Runtime) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SymlinkRoot // no validation rules for Subdirectory // no validation rules for OverrideSubdirectory - if v, ok := interface{}(m.GetBase()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBase()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Base", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Base", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBase()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeValidationError{ field: "Base", @@ -589,9 +1209,29 @@ func (m *Runtime) Validate() error { } } + if len(errors) > 0 { + return RuntimeMultiError(errors) + } + return nil } +// RuntimeMultiError is an error wrapping multiple validation errors returned +// by Runtime.ValidateAll() if the designated constraints aren't met. +type RuntimeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeMultiError) AllErrors() []error { return m } + // RuntimeValidationError is the validation error returned by Runtime.Validate // if the designated constraints aren't met. type RuntimeValidationError struct { @@ -647,25 +1287,62 @@ var _ interface { } = RuntimeValidationError{} // Validate checks the field values on RuntimeLayer with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeLayerMultiError, or +// nil if none found. +func (m *RuntimeLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return RuntimeLayerValidationError{ + err := RuntimeLayerValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.LayerSpecifier.(type) { case *RuntimeLayer_StaticLayer: - if v, ok := interface{}(m.GetStaticLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStaticLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "StaticLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "StaticLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStaticLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "StaticLayer", @@ -677,7 +1354,26 @@ func (m *RuntimeLayer) Validate() error { case *RuntimeLayer_DiskLayer_: - if v, ok := interface{}(m.GetDiskLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDiskLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "DiskLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "DiskLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDiskLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "DiskLayer", @@ -689,7 +1385,26 @@ func (m *RuntimeLayer) Validate() error { case *RuntimeLayer_AdminLayer_: - if v, ok := interface{}(m.GetAdminLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdminLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "AdminLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "AdminLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdminLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "AdminLayer", @@ -701,7 +1416,26 @@ func (m *RuntimeLayer) Validate() error { case *RuntimeLayer_RtdsLayer_: - if v, ok := interface{}(m.GetRtdsLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRtdsLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "RtdsLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "RtdsLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtdsLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "RtdsLayer", @@ -712,16 +1446,40 @@ func (m *RuntimeLayer) Validate() error { } default: - return RuntimeLayerValidationError{ + err := RuntimeLayerValidationError{ field: "LayerSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RuntimeLayerMultiError(errors) } return nil } +// RuntimeLayerMultiError is an error wrapping multiple validation errors +// returned by RuntimeLayer.ValidateAll() if the designated constraints aren't met. +type RuntimeLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayerMultiError) AllErrors() []error { return m } + // RuntimeLayerValidationError is the validation error returned by // RuntimeLayer.Validate if the designated constraints aren't met. type RuntimeLayerValidationError struct { @@ -777,17 +1535,50 @@ var _ interface { } = RuntimeLayerValidationError{} // Validate checks the field values on LayeredRuntime with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LayeredRuntime) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LayeredRuntime with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LayeredRuntimeMultiError, +// or nil if none found. +func (m *LayeredRuntime) ValidateAll() error { + return m.validate(true) +} + +func (m *LayeredRuntime) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetLayers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LayeredRuntimeValidationError{ + field: fmt.Sprintf("Layers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LayeredRuntimeValidationError{ + field: fmt.Sprintf("Layers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LayeredRuntimeValidationError{ field: fmt.Sprintf("Layers[%v]", idx), @@ -799,9 +1590,30 @@ func (m *LayeredRuntime) Validate() error { } + if len(errors) > 0 { + return LayeredRuntimeMultiError(errors) + } + return nil } +// LayeredRuntimeMultiError is an error wrapping multiple validation errors +// returned by LayeredRuntime.ValidateAll() if the designated constraints +// aren't met. +type LayeredRuntimeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LayeredRuntimeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LayeredRuntimeMultiError) AllErrors() []error { return m } + // LayeredRuntimeValidationError is the validation error returned by // LayeredRuntime.Validate if the designated constraints aren't met. type LayeredRuntimeValidationError struct { @@ -858,16 +1670,49 @@ var _ interface { // Validate checks the field values on Bootstrap_StaticResources with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Bootstrap_StaticResources) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Bootstrap_StaticResources with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Bootstrap_StaticResourcesMultiError, or nil if none found. +func (m *Bootstrap_StaticResources) ValidateAll() error { + return m.validate(true) +} + +func (m *Bootstrap_StaticResources) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetListeners() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Listeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Listeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_StaticResourcesValidationError{ field: fmt.Sprintf("Listeners[%v]", idx), @@ -882,7 +1727,26 @@ func (m *Bootstrap_StaticResources) Validate() error { for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_StaticResourcesValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -897,7 +1761,26 @@ func (m *Bootstrap_StaticResources) Validate() error { for idx, item := range m.GetSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Secrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Secrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_StaticResourcesValidationError{ field: fmt.Sprintf("Secrets[%v]", idx), @@ -909,9 +1792,30 @@ func (m *Bootstrap_StaticResources) Validate() error { } + if len(errors) > 0 { + return Bootstrap_StaticResourcesMultiError(errors) + } + return nil } +// Bootstrap_StaticResourcesMultiError is an error wrapping multiple validation +// errors returned by Bootstrap_StaticResources.ValidateAll() if the +// designated constraints aren't met. +type Bootstrap_StaticResourcesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Bootstrap_StaticResourcesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Bootstrap_StaticResourcesMultiError) AllErrors() []error { return m } + // Bootstrap_StaticResourcesValidationError is the validation error returned by // Bootstrap_StaticResources.Validate if the designated constraints aren't met. type Bootstrap_StaticResourcesValidationError struct { @@ -970,13 +1874,46 @@ var _ interface { // Validate checks the field values on Bootstrap_DynamicResources with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Bootstrap_DynamicResources) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Bootstrap_DynamicResources with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Bootstrap_DynamicResourcesMultiError, or nil if none found. +func (m *Bootstrap_DynamicResources) ValidateAll() error { + return m.validate(true) +} + +func (m *Bootstrap_DynamicResources) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLdsConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "LdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "LdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_DynamicResourcesValidationError{ field: "LdsConfig", @@ -986,7 +1923,26 @@ func (m *Bootstrap_DynamicResources) Validate() error { } } - if v, ok := interface{}(m.GetCdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "CdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "CdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_DynamicResourcesValidationError{ field: "CdsConfig", @@ -996,7 +1952,26 @@ func (m *Bootstrap_DynamicResources) Validate() error { } } - if v, ok := interface{}(m.GetAdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "AdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "AdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_DynamicResourcesValidationError{ field: "AdsConfig", @@ -1006,9 +1981,30 @@ func (m *Bootstrap_DynamicResources) Validate() error { } } + if len(errors) > 0 { + return Bootstrap_DynamicResourcesMultiError(errors) + } + return nil } +// Bootstrap_DynamicResourcesMultiError is an error wrapping multiple +// validation errors returned by Bootstrap_DynamicResources.ValidateAll() if +// the designated constraints aren't met. +type Bootstrap_DynamicResourcesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Bootstrap_DynamicResourcesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Bootstrap_DynamicResourcesMultiError) AllErrors() []error { return m } + // Bootstrap_DynamicResourcesValidationError is the validation error returned // by Bootstrap_DynamicResources.Validate if the designated constraints aren't met. type Bootstrap_DynamicResourcesValidationError struct { @@ -1067,15 +2063,48 @@ var _ interface { // Validate checks the field values on ClusterManager_OutlierDetection with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterManager_OutlierDetection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterManager_OutlierDetection with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ClusterManager_OutlierDetectionMultiError, or nil if none found. +func (m *ClusterManager_OutlierDetection) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterManager_OutlierDetection) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for EventLogPath - if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEventService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManager_OutlierDetectionValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManager_OutlierDetectionValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManager_OutlierDetectionValidationError{ field: "EventService", @@ -1085,9 +2114,30 @@ func (m *ClusterManager_OutlierDetection) Validate() error { } } + if len(errors) > 0 { + return ClusterManager_OutlierDetectionMultiError(errors) + } + return nil } +// ClusterManager_OutlierDetectionMultiError is an error wrapping multiple +// validation errors returned by ClusterManager_OutlierDetection.ValidateAll() +// if the designated constraints aren't met. +type ClusterManager_OutlierDetectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterManager_OutlierDetectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterManager_OutlierDetectionMultiError) AllErrors() []error { return m } + // ClusterManager_OutlierDetectionValidationError is the validation error // returned by ClusterManager_OutlierDetection.Validate if the designated // constraints aren't met. @@ -1147,21 +2197,56 @@ var _ interface { // Validate checks the field values on RuntimeLayer_DiskLayer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer_DiskLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer_DiskLayer with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeLayer_DiskLayerMultiError, or nil if none found. +func (m *RuntimeLayer_DiskLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer_DiskLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SymlinkRoot // no validation rules for Subdirectory // no validation rules for AppendServiceCluster + if len(errors) > 0 { + return RuntimeLayer_DiskLayerMultiError(errors) + } + return nil } +// RuntimeLayer_DiskLayerMultiError is an error wrapping multiple validation +// errors returned by RuntimeLayer_DiskLayer.ValidateAll() if the designated +// constraints aren't met. +type RuntimeLayer_DiskLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayer_DiskLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayer_DiskLayerMultiError) AllErrors() []error { return m } + // RuntimeLayer_DiskLayerValidationError is the validation error returned by // RuntimeLayer_DiskLayer.Validate if the designated constraints aren't met. type RuntimeLayer_DiskLayerValidationError struct { @@ -1220,15 +2305,50 @@ var _ interface { // Validate checks the field values on RuntimeLayer_AdminLayer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer_AdminLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer_AdminLayer with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeLayer_AdminLayerMultiError, or nil if none found. +func (m *RuntimeLayer_AdminLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer_AdminLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RuntimeLayer_AdminLayerMultiError(errors) + } + return nil } +// RuntimeLayer_AdminLayerMultiError is an error wrapping multiple validation +// errors returned by RuntimeLayer_AdminLayer.ValidateAll() if the designated +// constraints aren't met. +type RuntimeLayer_AdminLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayer_AdminLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayer_AdminLayerMultiError) AllErrors() []error { return m } + // RuntimeLayer_AdminLayerValidationError is the validation error returned by // RuntimeLayer_AdminLayer.Validate if the designated constraints aren't met. type RuntimeLayer_AdminLayerValidationError struct { @@ -1287,15 +2407,48 @@ var _ interface { // Validate checks the field values on RuntimeLayer_RtdsLayer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer_RtdsLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer_RtdsLayer with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeLayer_RtdsLayerMultiError, or nil if none found. +func (m *RuntimeLayer_RtdsLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer_RtdsLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetRtdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRtdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayer_RtdsLayerValidationError{ + field: "RtdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayer_RtdsLayerValidationError{ + field: "RtdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayer_RtdsLayerValidationError{ field: "RtdsConfig", @@ -1305,9 +2458,30 @@ func (m *RuntimeLayer_RtdsLayer) Validate() error { } } + if len(errors) > 0 { + return RuntimeLayer_RtdsLayerMultiError(errors) + } + return nil } +// RuntimeLayer_RtdsLayerMultiError is an error wrapping multiple validation +// errors returned by RuntimeLayer_RtdsLayer.ValidateAll() if the designated +// constraints aren't met. +type RuntimeLayer_RtdsLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayer_RtdsLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayer_RtdsLayerMultiError) AllErrors() []error { return m } + // RuntimeLayer_RtdsLayerValidationError is the validation error returned by // RuntimeLayer_RtdsLayer.Validate if the designated constraints aren't met. type RuntimeLayer_RtdsLayerValidationError struct { diff --git a/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.go b/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.go index a721d98ff3..d71fe70549 100644 --- a/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.go +++ b/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.go @@ -1,24 +1,24 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/bootstrap/v3/bootstrap.proto -package envoy_config_bootstrap_v3 +package bootstrapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v36 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" + v34 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" + v37 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v35 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" + v36 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/metrics/v3" v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/overload/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/trace/v3" - v37 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" - v34 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + v38 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" + v35 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" wrappers "github.com/golang/protobuf/ptypes/wrappers" @@ -35,10 +35,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The events are fired in this order: KILL, MULTIKILL, MEGAMISS, MISS. // Within an event type, actions execute in the order they are configured. // For KILL/MULTIKILL there is a default PANIC that will run after the @@ -100,8 +96,60 @@ func (Watchdog_WatchdogAction_WatchdogEvent) EnumDescriptor() ([]byte, []int) { return file_envoy_config_bootstrap_v3_bootstrap_proto_rawDescGZIP(), []int{4, 0, 0} } +type CustomInlineHeader_InlineHeaderType int32 + +const ( + CustomInlineHeader_REQUEST_HEADER CustomInlineHeader_InlineHeaderType = 0 + CustomInlineHeader_REQUEST_TRAILER CustomInlineHeader_InlineHeaderType = 1 + CustomInlineHeader_RESPONSE_HEADER CustomInlineHeader_InlineHeaderType = 2 + CustomInlineHeader_RESPONSE_TRAILER CustomInlineHeader_InlineHeaderType = 3 +) + +// Enum value maps for CustomInlineHeader_InlineHeaderType. +var ( + CustomInlineHeader_InlineHeaderType_name = map[int32]string{ + 0: "REQUEST_HEADER", + 1: "REQUEST_TRAILER", + 2: "RESPONSE_HEADER", + 3: "RESPONSE_TRAILER", + } + CustomInlineHeader_InlineHeaderType_value = map[string]int32{ + "REQUEST_HEADER": 0, + "REQUEST_TRAILER": 1, + "RESPONSE_HEADER": 2, + "RESPONSE_TRAILER": 3, + } +) + +func (x CustomInlineHeader_InlineHeaderType) Enum() *CustomInlineHeader_InlineHeaderType { + p := new(CustomInlineHeader_InlineHeaderType) + *p = x + return p +} + +func (x CustomInlineHeader_InlineHeaderType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CustomInlineHeader_InlineHeaderType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_config_bootstrap_v3_bootstrap_proto_enumTypes[1].Descriptor() +} + +func (CustomInlineHeader_InlineHeaderType) Type() protoreflect.EnumType { + return &file_envoy_config_bootstrap_v3_bootstrap_proto_enumTypes[1] +} + +func (x CustomInlineHeader_InlineHeaderType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CustomInlineHeader_InlineHeaderType.Descriptor instead. +func (CustomInlineHeader_InlineHeaderType) EnumDescriptor() ([]byte, []int) { + return file_envoy_config_bootstrap_v3_bootstrap_proto_rawDescGZIP(), []int{9, 0} +} + // Bootstrap :ref:`configuration overview `. -// [#next-free-field: 30] +// [#next-free-field: 34] type Bootstrap struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -151,7 +199,7 @@ type Bootstrap struct { // within the server. ClusterManager *ClusterManager `protobuf:"bytes,4,opt,name=cluster_manager,json=clusterManager,proto3" json:"cluster_manager,omitempty"` // Health discovery service config option. - // (:ref:`core.ApiConfigSource `) + // (:ref:`core.ApiConfigSource `) HdsConfig *v3.ApiConfigSource `protobuf:"bytes,14,opt,name=hds_config,json=hdsConfig,proto3" json:"hds_config,omitempty"` // Optional file system path to search for startup flag files. FlagsPath string `protobuf:"bytes,5,opt,name=flags_path,json=flagsPath,proto3" json:"flags_path,omitempty"` @@ -177,12 +225,13 @@ type Bootstrap struct { Watchdog *Watchdog `protobuf:"bytes,8,opt,name=watchdog,proto3" json:"watchdog,omitempty"` // Optional watchdogs configuration. // This is used for specifying different watchdogs for the different subsystems. + // [#extension-category: envoy.guarddog_actions] Watchdogs *Watchdogs `protobuf:"bytes,27,opt,name=watchdogs,proto3" json:"watchdogs,omitempty"` // Configuration for an external tracing provider. // // .. attention:: // This field has been deprecated in favor of :ref:`HttpConnectionManager.Tracing.provider - // `. + // `. // // Deprecated: Do not use. Tracing *v32.Tracing `protobuf:"bytes,9,opt,name=tracing,proto3" json:"tracing,omitempty"` @@ -197,7 +246,7 @@ type Bootstrap struct { // Enable :ref:`stats for event dispatcher `, defaults to false. // Note that this records a value for each iteration of the event loop on every thread. This // should normally be minimal overhead, but when using - // :ref:`statsd `, it will send each observed value + // :ref:`statsd `, it will send each observed value // over the wire individually because the statsd protocol doesn't have any way to represent a // histogram summary. Be aware that this can be a very large volume of data. EnableDispatcherStats bool `protobuf:"varint,16,opt,name=enable_dispatcher_stats,json=enableDispatcherStats,proto3" json:"enable_dispatcher_stats,omitempty"` @@ -213,19 +262,42 @@ type Bootstrap struct { HeaderPrefix string `protobuf:"bytes,18,opt,name=header_prefix,json=headerPrefix,proto3" json:"header_prefix,omitempty"` // Optional proxy version which will be used to set the value of :ref:`server.version statistic // ` if specified. Envoy will not process this value, it will be sent as is to - // :ref:`stats sinks `. + // :ref:`stats sinks `. StatsServerVersionOverride *wrappers.UInt64Value `protobuf:"bytes,19,opt,name=stats_server_version_override,json=statsServerVersionOverride,proto3" json:"stats_server_version_override,omitempty"` // Always use TCP queries instead of UDP queries for DNS lookups. // This may be overridden on a per-cluster basis in cds_config, - // when :ref:`dns_resolvers ` and - // :ref:`use_tcp_for_dns_lookups ` are + // when :ref:`dns_resolvers ` and + // :ref:`use_tcp_for_dns_lookups ` are // specified. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + // + // Deprecated: Do not use. UseTcpForDnsLookups bool `protobuf:"varint,20,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This may be overridden on a per-cluster basis in cds_config, when + // :ref:`dns_resolution_config ` + // is specified. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + // + // Deprecated: Do not use. + DnsResolutionConfig *v3.DnsResolutionConfig `protobuf:"bytes,30,opt,name=dns_resolution_config,json=dnsResolutionConfig,proto3" json:"dns_resolution_config,omitempty"` + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + TypedDnsResolverConfig *v3.TypedExtensionConfig `protobuf:"bytes,31,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"` // Specifies optional bootstrap extensions to be instantiated at startup time. // Each item contains extension specific configuration. + // [#extension-category: envoy.bootstrap] BootstrapExtensions []*v3.TypedExtensionConfig `protobuf:"bytes,21,rep,name=bootstrap_extensions,json=bootstrapExtensions,proto3" json:"bootstrap_extensions,omitempty"` // Specifies optional extensions instantiated at startup time and // invoked during crash time on the request that caused the crash. @@ -257,12 +329,19 @@ type Bootstrap struct { DefaultSocketInterface string `protobuf:"bytes,24,opt,name=default_socket_interface,json=defaultSocketInterface,proto3" json:"default_socket_interface,omitempty"` // Global map of CertificateProvider instances. These instances are referred to by name in the // :ref:`CommonTlsContext.CertificateProviderInstance.instance_name - // ` + // ` // field. // [#not-implemented-hide:] CertificateProviderInstances map[string]*v3.TypedExtensionConfig `protobuf:"bytes,25,rep,name=certificate_provider_instances,json=certificateProviderInstances,proto3" json:"certificate_provider_instances,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRuntime *Runtime `protobuf:"bytes,11,opt,name=hidden_envoy_deprecated_runtime,json=hiddenEnvoyDeprecatedRuntime,proto3" json:"hidden_envoy_deprecated_runtime,omitempty"` + // Specifies a set of headers that need to be registered as inline header. This configuration + // allows users to customize the inline headers on-demand at Envoy startup without modifying + // Envoy's source code. + // + // Note that the 'set-cookie' header cannot be registered as inline header. + InlineHeaders []*CustomInlineHeader `protobuf:"bytes,32,rep,name=inline_headers,json=inlineHeaders,proto3" json:"inline_headers,omitempty"` + // Optional path to a file with performance tracing data created by "Perfetto" SDK in binary + // ProtoBuf format. The default value is "envoy.pftrace". + PerfTracingFilePath string `protobuf:"bytes,33,opt,name=perf_tracing_file_path,json=perfTracingFilePath,proto3" json:"perf_tracing_file_path,omitempty"` } func (x *Bootstrap) Reset() { @@ -446,6 +525,7 @@ func (x *Bootstrap) GetStatsServerVersionOverride() *wrappers.UInt64Value { return nil } +// Deprecated: Do not use. func (x *Bootstrap) GetUseTcpForDnsLookups() bool { if x != nil { return x.UseTcpForDnsLookups @@ -453,6 +533,21 @@ func (x *Bootstrap) GetUseTcpForDnsLookups() bool { return false } +// Deprecated: Do not use. +func (x *Bootstrap) GetDnsResolutionConfig() *v3.DnsResolutionConfig { + if x != nil { + return x.DnsResolutionConfig + } + return nil +} + +func (x *Bootstrap) GetTypedDnsResolverConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.TypedDnsResolverConfig + } + return nil +} + func (x *Bootstrap) GetBootstrapExtensions() []*v3.TypedExtensionConfig { if x != nil { return x.BootstrapExtensions @@ -495,14 +590,20 @@ func (x *Bootstrap) GetCertificateProviderInstances() map[string]*v3.TypedExtens return nil } -// Deprecated: Do not use. -func (x *Bootstrap) GetHiddenEnvoyDeprecatedRuntime() *Runtime { +func (x *Bootstrap) GetInlineHeaders() []*CustomInlineHeader { if x != nil { - return x.HiddenEnvoyDeprecatedRuntime + return x.InlineHeaders } return nil } +func (x *Bootstrap) GetPerfTracingFilePath() string { + if x != nil { + return x.PerfTracingFilePath + } + return "" +} + type isBootstrap_StatsFlush interface { isBootstrap_StatsFlush() } @@ -518,14 +619,21 @@ func (*Bootstrap_StatsFlushOnAdmin) isBootstrap_StatsFlush() {} // Administration interface :ref:`operations documentation // `. +// [#next-free-field: 7] type Admin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Configuration for :ref:`access logs ` + // emitted by the administration server. + AccessLog []*v34.AccessLog `protobuf:"bytes,5,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` // The path to write the access log for the administration server. If no // access log is desired specify ‘/dev/null’. This is only required if - // :ref:`address ` is set. + // :ref:`address ` is set. + // Deprecated in favor of *access_log* which offers more options. + // + // Deprecated: Do not use. AccessLogPath string `protobuf:"bytes,1,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"` // The cpu profiler output path for the administration server. If no profile // path is specified, the default is ‘/var/log/envoy/envoy.prof’. @@ -536,6 +644,9 @@ type Admin struct { // Additional socket options that may not be present in Envoy source code or // precompiled binaries. SocketOptions []*v3.SocketOption `protobuf:"bytes,4,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` + // Indicates whether :ref:`global_downstream_max_connections ` + // should apply to the admin interface or not. + IgnoreGlobalConnLimit bool `protobuf:"varint,6,opt,name=ignore_global_conn_limit,json=ignoreGlobalConnLimit,proto3" json:"ignore_global_conn_limit,omitempty"` } func (x *Admin) Reset() { @@ -570,6 +681,14 @@ func (*Admin) Descriptor() ([]byte, []int) { return file_envoy_config_bootstrap_v3_bootstrap_proto_rawDescGZIP(), []int{1} } +func (x *Admin) GetAccessLog() []*v34.AccessLog { + if x != nil { + return x.AccessLog + } + return nil +} + +// Deprecated: Do not use. func (x *Admin) GetAccessLogPath() string { if x != nil { return x.AccessLogPath @@ -598,6 +717,13 @@ func (x *Admin) GetSocketOptions() []*v3.SocketOption { return nil } +func (x *Admin) GetIgnoreGlobalConnLimit() bool { + if x != nil { + return x.IgnoreGlobalConnLimit + } + return false +} + // Cluster manager :ref:`architecture overview `. type ClusterManager struct { state protoimpl.MessageState @@ -608,9 +734,9 @@ type ClusterManager struct { // this configuration). In order to enable :ref:`zone aware routing // ` this option must be set. // If *local_cluster_name* is defined then :ref:`clusters - // ` must be defined in the :ref:`Bootstrap + // ` must be defined in the :ref:`Bootstrap // static cluster resources - // `. This is unrelated to + // `. This is unrelated to // the :option:`--service-cluster` option which does not `affect zone aware // routing `_. LocalClusterName string `protobuf:"bytes,1,opt,name=local_cluster_name,json=localClusterName,proto3" json:"local_cluster_name,omitempty"` @@ -621,8 +747,8 @@ type ClusterManager struct { UpstreamBindConfig *v3.BindConfig `protobuf:"bytes,3,opt,name=upstream_bind_config,json=upstreamBindConfig,proto3" json:"upstream_bind_config,omitempty"` // A management server endpoint to stream load stats to via // *StreamLoadStats*. This must have :ref:`api_type - // ` :ref:`GRPC - // `. + // ` :ref:`GRPC + // `. LoadStatsConfig *v3.ApiConfigSource `protobuf:"bytes,4,opt,name=load_stats_config,json=loadStatsConfig,proto3" json:"load_stats_config,omitempty"` } @@ -782,7 +908,7 @@ type Watchdog struct { // Sets the threshold for *multikill_timeout* in terms of the percentage of // nonresponsive threads required for the *multikill_timeout*. // If not specified the default is 0. - MultikillThreshold *v34.Percent `protobuf:"bytes,5,opt,name=multikill_threshold,json=multikillThreshold,proto3" json:"multikill_threshold,omitempty"` + MultikillThreshold *v35.Percent `protobuf:"bytes,5,opt,name=multikill_threshold,json=multikillThreshold,proto3" json:"multikill_threshold,omitempty"` } func (x *Watchdog) Reset() { @@ -859,7 +985,7 @@ func (x *Watchdog) GetMultikillTimeout() *duration.Duration { return nil } -func (x *Watchdog) GetMultikillThreshold() *v34.Percent { +func (x *Watchdog) GetMultikillThreshold() *v35.Percent { if x != nil { return x.MultikillThreshold } @@ -1187,30 +1313,111 @@ func (x *LayeredRuntime) GetLayers() []*RuntimeLayer { return nil } +// Used to specify the header that needs to be registered as an inline header. +// +// If request or response contain multiple headers with the same name and the header +// name is registered as an inline header. Then multiple headers will be folded +// into one, and multiple header values will be concatenated by a suitable delimiter. +// The delimiter is generally a comma. +// +// For example, if 'foo' is registered as an inline header, and the headers contains +// the following two headers: +// +// .. code-block:: text +// +// foo: bar +// foo: eep +// +// Then they will eventually be folded into: +// +// .. code-block:: text +// +// foo: bar, eep +// +// Inline headers provide O(1) search performance, but each inline header imposes +// an additional memory overhead on all instances of the corresponding type of +// HeaderMap or TrailerMap. +type CustomInlineHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the header that is expected to be set as the inline header. + InlineHeaderName string `protobuf:"bytes,1,opt,name=inline_header_name,json=inlineHeaderName,proto3" json:"inline_header_name,omitempty"` + // The type of the header that is expected to be set as the inline header. + InlineHeaderType CustomInlineHeader_InlineHeaderType `protobuf:"varint,2,opt,name=inline_header_type,json=inlineHeaderType,proto3,enum=envoy.config.bootstrap.v3.CustomInlineHeader_InlineHeaderType" json:"inline_header_type,omitempty"` +} + +func (x *CustomInlineHeader) Reset() { + *x = CustomInlineHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomInlineHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomInlineHeader) ProtoMessage() {} + +func (x *CustomInlineHeader) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomInlineHeader.ProtoReflect.Descriptor instead. +func (*CustomInlineHeader) Descriptor() ([]byte, []int) { + return file_envoy_config_bootstrap_v3_bootstrap_proto_rawDescGZIP(), []int{9} +} + +func (x *CustomInlineHeader) GetInlineHeaderName() string { + if x != nil { + return x.InlineHeaderName + } + return "" +} + +func (x *CustomInlineHeader) GetInlineHeaderType() CustomInlineHeader_InlineHeaderType { + if x != nil { + return x.InlineHeaderType + } + return CustomInlineHeader_REQUEST_HEADER +} + type Bootstrap_StaticResources struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Static :ref:`Listeners `. These listeners are + // Static :ref:`Listeners `. These listeners are // available regardless of LDS configuration. - Listeners []*v35.Listener `protobuf:"bytes,1,rep,name=listeners,proto3" json:"listeners,omitempty"` + Listeners []*v36.Listener `protobuf:"bytes,1,rep,name=listeners,proto3" json:"listeners,omitempty"` // If a network based configuration source is specified for :ref:`cds_config - // `, it's necessary + // `, it's necessary // to have some initial cluster definitions available to allow Envoy to know // how to speak to the management server. These cluster definitions may not // use :ref:`EDS ` (i.e. they should be static // IP or DNS-based). - Clusters []*v36.Cluster `protobuf:"bytes,2,rep,name=clusters,proto3" json:"clusters,omitempty"` + Clusters []*v37.Cluster `protobuf:"bytes,2,rep,name=clusters,proto3" json:"clusters,omitempty"` // These static secrets can be used by :ref:`SdsSecretConfig - // ` - Secrets []*v37.Secret `protobuf:"bytes,3,rep,name=secrets,proto3" json:"secrets,omitempty"` + // ` + Secrets []*v38.Secret `protobuf:"bytes,3,rep,name=secrets,proto3" json:"secrets,omitempty"` } func (x *Bootstrap_StaticResources) Reset() { *x = Bootstrap_StaticResources{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[9] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1223,7 +1430,7 @@ func (x *Bootstrap_StaticResources) String() string { func (*Bootstrap_StaticResources) ProtoMessage() {} func (x *Bootstrap_StaticResources) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[9] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1239,21 +1446,21 @@ func (*Bootstrap_StaticResources) Descriptor() ([]byte, []int) { return file_envoy_config_bootstrap_v3_bootstrap_proto_rawDescGZIP(), []int{0, 0} } -func (x *Bootstrap_StaticResources) GetListeners() []*v35.Listener { +func (x *Bootstrap_StaticResources) GetListeners() []*v36.Listener { if x != nil { return x.Listeners } return nil } -func (x *Bootstrap_StaticResources) GetClusters() []*v36.Cluster { +func (x *Bootstrap_StaticResources) GetClusters() []*v37.Cluster { if x != nil { return x.Clusters } return nil } -func (x *Bootstrap_StaticResources) GetSecrets() []*v37.Secret { +func (x *Bootstrap_StaticResources) GetSecrets() []*v38.Secret { if x != nil { return x.Secrets } @@ -1266,13 +1473,13 @@ type Bootstrap_DynamicResources struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // All :ref:`Listeners ` are provided by a single + // All :ref:`Listeners ` are provided by a single // :ref:`LDS ` configuration source. LdsConfig *v3.ConfigSource `protobuf:"bytes,1,opt,name=lds_config,json=ldsConfig,proto3" json:"lds_config,omitempty"` // xdstp:// resource locator for listener collection. // [#not-implemented-hide:] LdsResourcesLocator string `protobuf:"bytes,5,opt,name=lds_resources_locator,json=ldsResourcesLocator,proto3" json:"lds_resources_locator,omitempty"` - // All post-bootstrap :ref:`Cluster ` definitions are + // All post-bootstrap :ref:`Cluster ` definitions are // provided by a single :ref:`CDS ` // configuration source. CdsConfig *v3.ConfigSource `protobuf:"bytes,2,opt,name=cds_config,json=cdsConfig,proto3" json:"cds_config,omitempty"` @@ -1281,10 +1488,10 @@ type Bootstrap_DynamicResources struct { CdsResourcesLocator string `protobuf:"bytes,6,opt,name=cds_resources_locator,json=cdsResourcesLocator,proto3" json:"cds_resources_locator,omitempty"` // A single :ref:`ADS ` source may be optionally // specified. This must have :ref:`api_type - // ` :ref:`GRPC - // `. Only - // :ref:`ConfigSources ` that have - // the :ref:`ads ` field set will be + // ` :ref:`GRPC + // `. Only + // :ref:`ConfigSources ` that have + // the :ref:`ads ` field set will be // streamed on the ADS channel. AdsConfig *v3.ApiConfigSource `protobuf:"bytes,3,opt,name=ads_config,json=adsConfig,proto3" json:"ads_config,omitempty"` } @@ -1292,7 +1499,7 @@ type Bootstrap_DynamicResources struct { func (x *Bootstrap_DynamicResources) Reset() { *x = Bootstrap_DynamicResources{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[10] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1305,7 +1512,7 @@ func (x *Bootstrap_DynamicResources) String() string { func (*Bootstrap_DynamicResources) ProtoMessage() {} func (x *Bootstrap_DynamicResources) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[10] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1372,7 +1579,7 @@ type ClusterManager_OutlierDetection struct { func (x *ClusterManager_OutlierDetection) Reset() { *x = ClusterManager_OutlierDetection{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[12] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1385,7 +1592,7 @@ func (x *ClusterManager_OutlierDetection) String() string { func (*ClusterManager_OutlierDetection) ProtoMessage() {} func (x *ClusterManager_OutlierDetection) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[12] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1428,7 +1635,7 @@ type Watchdog_WatchdogAction struct { func (x *Watchdog_WatchdogAction) Reset() { *x = Watchdog_WatchdogAction{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[13] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1441,7 +1648,7 @@ func (x *Watchdog_WatchdogAction) String() string { func (*Watchdog_WatchdogAction) ProtoMessage() {} func (x *Watchdog_WatchdogAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[13] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1497,7 +1704,7 @@ type RuntimeLayer_DiskLayer struct { func (x *RuntimeLayer_DiskLayer) Reset() { *x = RuntimeLayer_DiskLayer{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[14] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1510,7 +1717,7 @@ func (x *RuntimeLayer_DiskLayer) String() string { func (*RuntimeLayer_DiskLayer) ProtoMessage() {} func (x *RuntimeLayer_DiskLayer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[14] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1557,7 +1764,7 @@ type RuntimeLayer_AdminLayer struct { func (x *RuntimeLayer_AdminLayer) Reset() { *x = RuntimeLayer_AdminLayer{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[15] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1570,7 +1777,7 @@ func (x *RuntimeLayer_AdminLayer) String() string { func (*RuntimeLayer_AdminLayer) ProtoMessage() {} func (x *RuntimeLayer_AdminLayer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[15] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1601,7 +1808,7 @@ type RuntimeLayer_RtdsLayer struct { func (x *RuntimeLayer_RtdsLayer) Reset() { *x = RuntimeLayer_RtdsLayer{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[16] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1614,7 +1821,7 @@ func (x *RuntimeLayer_RtdsLayer) String() string { func (*RuntimeLayer_RtdsLayer) ProtoMessage() {} func (x *RuntimeLayer_RtdsLayer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[16] + mi := &file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1651,21 +1858,26 @@ var file_envoy_config_bootstrap_v3_bootstrap_proto_rawDesc = []byte{ 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x65, 0x6e, + 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, + 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, @@ -1702,7 +1914,7 @@ var file_envoy_config_bootstrap_v3_bootstrap_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc7, 0x17, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, + 0x6f, 0x22, 0xde, 0x19, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, @@ -1752,347 +1964,398 @@ var file_envoy_config_bootstrap_v3_bootstrap_proto_rawDesc = []byte{ 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6c, - 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x08, 0x77, 0x61, + 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x08, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, - 0x67, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x12, - 0x42, 0x0a, 0x09, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x73, 0x18, 0x1b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, - 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x73, 0x52, 0x09, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x73, 0x12, 0x3c, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x12, 0x52, 0x0a, 0x0f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, - 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x64, 0x0a, - 0x10, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, - 0x76, 0x33, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x42, 0x0e, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x8a, 0x93, 0xb7, 0x2a, 0x02, - 0x10, 0x01, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x69, - 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x12, 0x5f, 0x0a, 0x1d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, - 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, - 0x65, 0x12, 0x34, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, - 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x14, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x5d, 0x0a, 0x14, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x67, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x08, + 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x12, 0x42, 0x0a, 0x09, 0x77, 0x61, 0x74, 0x63, + 0x68, 0x64, 0x6f, 0x67, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, + 0x73, 0x52, 0x09, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x73, 0x12, 0x45, 0x0a, 0x07, + 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x0b, 0x18, + 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, + 0x69, 0x6e, 0x67, 0x12, 0x52, 0x0a, 0x0f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, + 0x76, 0x33, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, + 0x64, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, + 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x42, 0x0e, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x8a, 0x93, 0xb7, + 0x2a, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x5f, 0x0a, 0x1d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x12, 0x41, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, + 0x30, 0x52, 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x64, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x65, 0x0a, 0x19, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x64, 0x6e, 0x73, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x13, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x0d, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x56, - 0x0a, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x52, 0x16, 0x74, 0x79, 0x70, 0x65, 0x64, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x14, 0x62, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x13, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x0d, 0x66, 0x61, 0x74, 0x61, + 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x74, 0x61, + 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x13, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x12, 0x8c, 0x01, 0x0a, 0x1e, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x12, 0x56, 0x0a, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x13, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x1e, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x1c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x1c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, - 0x73, 0x0a, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x49, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x70, 0x65, 0x72, 0x66, 0x5f, + 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x65, 0x72, 0x66, 0x54, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x9a, 0x02, 0x0a, + 0x0f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x12, 0x40, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x3a, 0x3a, 0x9a, + 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x89, 0x03, 0x0a, 0x10, 0x44, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x41, + 0x0a, 0x0a, 0x6c, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x6c, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0a, 0x63, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x63, + 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x64, 0x73, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x64, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x0a, + 0x61, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x61, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x08, 0x18, 0x01, - 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1c, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x9a, 0x02, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, - 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x08, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x1a, 0x89, 0x03, 0x0a, 0x10, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x6c, 0x64, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x44, + 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4a, + 0x04, 0x08, 0x04, 0x10, 0x05, 0x1a, 0x7b, 0x0a, 0x21, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x42, 0x0d, + 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x4a, 0x04, 0x08, + 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x22, 0x89, 0x03, 0x0a, 0x05, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x0a, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x12, 0x33, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, + 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x37, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, - 0x6c, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x64, 0x73, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, - 0x0a, 0x63, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x63, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x32, 0x0a, 0x15, 0x63, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x13, 0x63, 0x64, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x0a, 0x61, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x09, 0x61, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, - 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x1a, 0x7b, 0x0a, - 0x21, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, - 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, - 0x66, 0x6c, 0x75, 0x73, 0x68, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x22, 0xfe, 0x01, 0x0a, 0x05, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, - 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x37, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, + 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, + 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x63, + 0x6f, 0x6e, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x15, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x43, 0x6f, 0x6e, + 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xcb, + 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x67, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xcb, 0x04, 0x0a, - 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, - 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x67, 0x0a, - 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x69, 0x6e, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc9, 0x01, - 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, + 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x69, + 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x11, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, + 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, + 0xc9, 0x01, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, + 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, + 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x22, 0xb0, 0x01, 0x0a, 0x09, 0x57, - 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, - 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x52, 0x12, 0x6d, 0x61, 0x69, - 0x6e, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x12, - 0x4c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, + 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, + 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x22, 0xb0, 0x01, 0x0a, + 0x09, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x14, 0x6d, 0x61, + 0x69, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, + 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x52, 0x0e, 0x77, - 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x22, 0xba, 0x06, - 0x0a, 0x08, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x12, 0x4c, 0x0a, 0x07, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, - 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x6d, 0x69, 0x73, 0x73, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6d, 0x69, 0x73, 0x73, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x10, 0x6d, 0x65, 0x67, 0x61, 0x6d, 0x69, - 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6d, 0x65, 0x67, - 0x61, 0x6d, 0x69, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, - 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6b, - 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x5a, 0x0a, 0x17, 0x6d, 0x61, - 0x78, 0x5f, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6a, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x32, 0x00, - 0x52, 0x14, 0x6d, 0x61, 0x78, 0x4b, 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, - 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x47, - 0x0a, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x52, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0x85, 0x02, 0x0a, 0x0e, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, - 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, + 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x52, 0x12, 0x6d, + 0x61, 0x69, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, + 0x67, 0x12, 0x4c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x77, 0x61, 0x74, 0x63, + 0x68, 0x64, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x52, + 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x22, + 0xba, 0x06, 0x0a, 0x08, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x12, 0x4c, 0x0a, 0x07, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x22, 0x4d, 0x0a, 0x0d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x55, 0x4c, 0x54, - 0x49, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x45, 0x47, 0x41, 0x4d, - 0x49, 0x53, 0x53, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x49, 0x53, 0x53, 0x10, 0x04, 0x3a, - 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, - 0x32, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x22, 0x51, 0x0a, 0x0b, 0x46, 0x61, - 0x74, 0x61, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xdc, 0x01, - 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, - 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c, - 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x12, 0x33, 0x0a, 0x15, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x75, 0x62, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x14, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x62, 0x61, - 0x73, 0x65, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xdb, 0x06, 0x0a, - 0x0c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1b, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x6b, - 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, - 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0a, 0x72, 0x74, 0x64, 0x73, 0x5f, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x6d, 0x69, + 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6d, 0x69, 0x73, + 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x10, 0x6d, 0x65, 0x67, 0x61, + 0x6d, 0x69, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6d, + 0x65, 0x67, 0x61, 0x6d, 0x69, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, + 0x0a, 0x0c, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0b, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x5a, 0x0a, 0x17, + 0x6d, 0x61, 0x78, 0x5f, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, + 0x32, 0x00, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x4b, 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x11, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x47, 0x0a, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, + 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0x85, 0x02, 0x0a, 0x0e, 0x57, 0x61, + 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x60, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, + 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x0d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x55, + 0x4c, 0x54, 0x49, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x45, 0x47, + 0x41, 0x4d, 0x49, 0x53, 0x53, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x49, 0x53, 0x53, 0x10, + 0x04, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x52, 0x74, 0x64, 0x73, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x72, 0x74, - 0x64, 0x73, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0xc1, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x6b, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x79, 0x6d, - 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x16, - 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0x46, 0x0a, 0x0a, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, - 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x1a, 0x9d, 0x01, 0x0a, 0x09, 0x52, 0x74, 0x64, 0x73, 0x4c, 0x61, 0x79, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x72, 0x74, 0x64, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0a, - 0x72, 0x74, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, - 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x52, 0x74, 0x64, 0x73, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x42, 0x16, 0x0a, 0x0f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x82, 0x01, 0x0a, 0x0e, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, - 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x3a, 0x2f, - 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, - 0x43, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x22, 0x51, 0x0a, 0x0b, + 0x46, 0x61, 0x74, 0x61, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0xdc, 0x01, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x33, 0x0a, 0x15, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, + 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x75, 0x62, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, + 0x62, 0x61, 0x73, 0x65, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xdb, + 0x06, 0x0a, 0x0c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0c, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0a, 0x64, 0x69, + 0x73, 0x6b, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x42, 0x6f, 0x6f, 0x74, - 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x55, + 0x0a, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0a, 0x72, 0x74, 0x64, 0x73, 0x5f, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x52, 0x74, 0x64, 0x73, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, + 0x72, 0x74, 0x64, 0x73, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0xc1, 0x01, 0x0a, 0x09, 0x44, 0x69, + 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x6c, 0x69, + 0x6e, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, + 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, + 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x34, + 0x0a, 0x16, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, + 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, + 0x79, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0x46, 0x0a, + 0x0a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, + 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0x9d, 0x01, 0x0a, 0x09, 0x52, 0x74, 0x64, 0x73, 0x4c, 0x61, + 0x79, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x72, 0x74, 0x64, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x0a, 0x72, 0x74, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, 0x9a, 0xc5, + 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x52, 0x74, 0x64, 0x73, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x42, 0x16, 0x0a, 0x0f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x82, 0x01, 0x0a, + 0x0e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x3f, 0x0a, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, + 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x49, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x12, 0x69, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, + 0xc8, 0x01, 0x00, 0x52, 0x10, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x69, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x66, 0x0a, + 0x10, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x48, 0x45, 0x41, + 0x44, 0x45, 0x52, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, + 0x5f, 0x54, 0x52, 0x41, 0x49, 0x4c, 0x45, 0x52, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, + 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x12, + 0x14, 0x0a, 0x10, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x49, + 0x4c, 0x45, 0x52, 0x10, 0x03, 0x42, 0x91, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, + 0x33, 0x42, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -2107,106 +2370,114 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_rawDescGZIP() []byte { return file_envoy_config_bootstrap_v3_bootstrap_proto_rawDescData } -var file_envoy_config_bootstrap_v3_bootstrap_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_envoy_config_bootstrap_v3_bootstrap_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_envoy_config_bootstrap_v3_bootstrap_proto_goTypes = []interface{}{ (Watchdog_WatchdogAction_WatchdogEvent)(0), // 0: envoy.config.bootstrap.v3.Watchdog.WatchdogAction.WatchdogEvent - (*Bootstrap)(nil), // 1: envoy.config.bootstrap.v3.Bootstrap - (*Admin)(nil), // 2: envoy.config.bootstrap.v3.Admin - (*ClusterManager)(nil), // 3: envoy.config.bootstrap.v3.ClusterManager - (*Watchdogs)(nil), // 4: envoy.config.bootstrap.v3.Watchdogs - (*Watchdog)(nil), // 5: envoy.config.bootstrap.v3.Watchdog - (*FatalAction)(nil), // 6: envoy.config.bootstrap.v3.FatalAction - (*Runtime)(nil), // 7: envoy.config.bootstrap.v3.Runtime - (*RuntimeLayer)(nil), // 8: envoy.config.bootstrap.v3.RuntimeLayer - (*LayeredRuntime)(nil), // 9: envoy.config.bootstrap.v3.LayeredRuntime - (*Bootstrap_StaticResources)(nil), // 10: envoy.config.bootstrap.v3.Bootstrap.StaticResources - (*Bootstrap_DynamicResources)(nil), // 11: envoy.config.bootstrap.v3.Bootstrap.DynamicResources - nil, // 12: envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry - (*ClusterManager_OutlierDetection)(nil), // 13: envoy.config.bootstrap.v3.ClusterManager.OutlierDetection - (*Watchdog_WatchdogAction)(nil), // 14: envoy.config.bootstrap.v3.Watchdog.WatchdogAction - (*RuntimeLayer_DiskLayer)(nil), // 15: envoy.config.bootstrap.v3.RuntimeLayer.DiskLayer - (*RuntimeLayer_AdminLayer)(nil), // 16: envoy.config.bootstrap.v3.RuntimeLayer.AdminLayer - (*RuntimeLayer_RtdsLayer)(nil), // 17: envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer - (*v3.Node)(nil), // 18: envoy.config.core.v3.Node - (*v3.ApiConfigSource)(nil), // 19: envoy.config.core.v3.ApiConfigSource - (*v31.StatsSink)(nil), // 20: envoy.config.metrics.v3.StatsSink - (*v31.StatsConfig)(nil), // 21: envoy.config.metrics.v3.StatsConfig - (*duration.Duration)(nil), // 22: google.protobuf.Duration - (*v32.Tracing)(nil), // 23: envoy.config.trace.v3.Tracing - (*v33.OverloadManager)(nil), // 24: envoy.config.overload.v3.OverloadManager - (*wrappers.UInt64Value)(nil), // 25: google.protobuf.UInt64Value - (*v3.TypedExtensionConfig)(nil), // 26: envoy.config.core.v3.TypedExtensionConfig - (*v3.ConfigSource)(nil), // 27: envoy.config.core.v3.ConfigSource - (*v3.Address)(nil), // 28: envoy.config.core.v3.Address - (*v3.SocketOption)(nil), // 29: envoy.config.core.v3.SocketOption - (*v3.BindConfig)(nil), // 30: envoy.config.core.v3.BindConfig - (*v34.Percent)(nil), // 31: envoy.type.v3.Percent - (*_struct.Struct)(nil), // 32: google.protobuf.Struct - (*v35.Listener)(nil), // 33: envoy.config.listener.v3.Listener - (*v36.Cluster)(nil), // 34: envoy.config.cluster.v3.Cluster - (*v37.Secret)(nil), // 35: envoy.extensions.transport_sockets.tls.v3.Secret - (*v3.EventServiceConfig)(nil), // 36: envoy.config.core.v3.EventServiceConfig + (CustomInlineHeader_InlineHeaderType)(0), // 1: envoy.config.bootstrap.v3.CustomInlineHeader.InlineHeaderType + (*Bootstrap)(nil), // 2: envoy.config.bootstrap.v3.Bootstrap + (*Admin)(nil), // 3: envoy.config.bootstrap.v3.Admin + (*ClusterManager)(nil), // 4: envoy.config.bootstrap.v3.ClusterManager + (*Watchdogs)(nil), // 5: envoy.config.bootstrap.v3.Watchdogs + (*Watchdog)(nil), // 6: envoy.config.bootstrap.v3.Watchdog + (*FatalAction)(nil), // 7: envoy.config.bootstrap.v3.FatalAction + (*Runtime)(nil), // 8: envoy.config.bootstrap.v3.Runtime + (*RuntimeLayer)(nil), // 9: envoy.config.bootstrap.v3.RuntimeLayer + (*LayeredRuntime)(nil), // 10: envoy.config.bootstrap.v3.LayeredRuntime + (*CustomInlineHeader)(nil), // 11: envoy.config.bootstrap.v3.CustomInlineHeader + (*Bootstrap_StaticResources)(nil), // 12: envoy.config.bootstrap.v3.Bootstrap.StaticResources + (*Bootstrap_DynamicResources)(nil), // 13: envoy.config.bootstrap.v3.Bootstrap.DynamicResources + nil, // 14: envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry + (*ClusterManager_OutlierDetection)(nil), // 15: envoy.config.bootstrap.v3.ClusterManager.OutlierDetection + (*Watchdog_WatchdogAction)(nil), // 16: envoy.config.bootstrap.v3.Watchdog.WatchdogAction + (*RuntimeLayer_DiskLayer)(nil), // 17: envoy.config.bootstrap.v3.RuntimeLayer.DiskLayer + (*RuntimeLayer_AdminLayer)(nil), // 18: envoy.config.bootstrap.v3.RuntimeLayer.AdminLayer + (*RuntimeLayer_RtdsLayer)(nil), // 19: envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer + (*v3.Node)(nil), // 20: envoy.config.core.v3.Node + (*v3.ApiConfigSource)(nil), // 21: envoy.config.core.v3.ApiConfigSource + (*v31.StatsSink)(nil), // 22: envoy.config.metrics.v3.StatsSink + (*v31.StatsConfig)(nil), // 23: envoy.config.metrics.v3.StatsConfig + (*duration.Duration)(nil), // 24: google.protobuf.Duration + (*v32.Tracing)(nil), // 25: envoy.config.trace.v3.Tracing + (*v33.OverloadManager)(nil), // 26: envoy.config.overload.v3.OverloadManager + (*wrappers.UInt64Value)(nil), // 27: google.protobuf.UInt64Value + (*v3.DnsResolutionConfig)(nil), // 28: envoy.config.core.v3.DnsResolutionConfig + (*v3.TypedExtensionConfig)(nil), // 29: envoy.config.core.v3.TypedExtensionConfig + (*v3.ConfigSource)(nil), // 30: envoy.config.core.v3.ConfigSource + (*v34.AccessLog)(nil), // 31: envoy.config.accesslog.v3.AccessLog + (*v3.Address)(nil), // 32: envoy.config.core.v3.Address + (*v3.SocketOption)(nil), // 33: envoy.config.core.v3.SocketOption + (*v3.BindConfig)(nil), // 34: envoy.config.core.v3.BindConfig + (*v35.Percent)(nil), // 35: envoy.type.v3.Percent + (*_struct.Struct)(nil), // 36: google.protobuf.Struct + (*v36.Listener)(nil), // 37: envoy.config.listener.v3.Listener + (*v37.Cluster)(nil), // 38: envoy.config.cluster.v3.Cluster + (*v38.Secret)(nil), // 39: envoy.extensions.transport_sockets.tls.v3.Secret + (*v3.EventServiceConfig)(nil), // 40: envoy.config.core.v3.EventServiceConfig } var file_envoy_config_bootstrap_v3_bootstrap_proto_depIdxs = []int32{ - 18, // 0: envoy.config.bootstrap.v3.Bootstrap.node:type_name -> envoy.config.core.v3.Node - 10, // 1: envoy.config.bootstrap.v3.Bootstrap.static_resources:type_name -> envoy.config.bootstrap.v3.Bootstrap.StaticResources - 11, // 2: envoy.config.bootstrap.v3.Bootstrap.dynamic_resources:type_name -> envoy.config.bootstrap.v3.Bootstrap.DynamicResources - 3, // 3: envoy.config.bootstrap.v3.Bootstrap.cluster_manager:type_name -> envoy.config.bootstrap.v3.ClusterManager - 19, // 4: envoy.config.bootstrap.v3.Bootstrap.hds_config:type_name -> envoy.config.core.v3.ApiConfigSource - 20, // 5: envoy.config.bootstrap.v3.Bootstrap.stats_sinks:type_name -> envoy.config.metrics.v3.StatsSink - 21, // 6: envoy.config.bootstrap.v3.Bootstrap.stats_config:type_name -> envoy.config.metrics.v3.StatsConfig - 22, // 7: envoy.config.bootstrap.v3.Bootstrap.stats_flush_interval:type_name -> google.protobuf.Duration - 5, // 8: envoy.config.bootstrap.v3.Bootstrap.watchdog:type_name -> envoy.config.bootstrap.v3.Watchdog - 4, // 9: envoy.config.bootstrap.v3.Bootstrap.watchdogs:type_name -> envoy.config.bootstrap.v3.Watchdogs - 23, // 10: envoy.config.bootstrap.v3.Bootstrap.tracing:type_name -> envoy.config.trace.v3.Tracing - 9, // 11: envoy.config.bootstrap.v3.Bootstrap.layered_runtime:type_name -> envoy.config.bootstrap.v3.LayeredRuntime - 2, // 12: envoy.config.bootstrap.v3.Bootstrap.admin:type_name -> envoy.config.bootstrap.v3.Admin - 24, // 13: envoy.config.bootstrap.v3.Bootstrap.overload_manager:type_name -> envoy.config.overload.v3.OverloadManager - 25, // 14: envoy.config.bootstrap.v3.Bootstrap.stats_server_version_override:type_name -> google.protobuf.UInt64Value - 26, // 15: envoy.config.bootstrap.v3.Bootstrap.bootstrap_extensions:type_name -> envoy.config.core.v3.TypedExtensionConfig - 6, // 16: envoy.config.bootstrap.v3.Bootstrap.fatal_actions:type_name -> envoy.config.bootstrap.v3.FatalAction - 27, // 17: envoy.config.bootstrap.v3.Bootstrap.config_sources:type_name -> envoy.config.core.v3.ConfigSource - 27, // 18: envoy.config.bootstrap.v3.Bootstrap.default_config_source:type_name -> envoy.config.core.v3.ConfigSource - 12, // 19: envoy.config.bootstrap.v3.Bootstrap.certificate_provider_instances:type_name -> envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry - 7, // 20: envoy.config.bootstrap.v3.Bootstrap.hidden_envoy_deprecated_runtime:type_name -> envoy.config.bootstrap.v3.Runtime - 28, // 21: envoy.config.bootstrap.v3.Admin.address:type_name -> envoy.config.core.v3.Address - 29, // 22: envoy.config.bootstrap.v3.Admin.socket_options:type_name -> envoy.config.core.v3.SocketOption - 13, // 23: envoy.config.bootstrap.v3.ClusterManager.outlier_detection:type_name -> envoy.config.bootstrap.v3.ClusterManager.OutlierDetection - 30, // 24: envoy.config.bootstrap.v3.ClusterManager.upstream_bind_config:type_name -> envoy.config.core.v3.BindConfig - 19, // 25: envoy.config.bootstrap.v3.ClusterManager.load_stats_config:type_name -> envoy.config.core.v3.ApiConfigSource - 5, // 26: envoy.config.bootstrap.v3.Watchdogs.main_thread_watchdog:type_name -> envoy.config.bootstrap.v3.Watchdog - 5, // 27: envoy.config.bootstrap.v3.Watchdogs.worker_watchdog:type_name -> envoy.config.bootstrap.v3.Watchdog - 14, // 28: envoy.config.bootstrap.v3.Watchdog.actions:type_name -> envoy.config.bootstrap.v3.Watchdog.WatchdogAction - 22, // 29: envoy.config.bootstrap.v3.Watchdog.miss_timeout:type_name -> google.protobuf.Duration - 22, // 30: envoy.config.bootstrap.v3.Watchdog.megamiss_timeout:type_name -> google.protobuf.Duration - 22, // 31: envoy.config.bootstrap.v3.Watchdog.kill_timeout:type_name -> google.protobuf.Duration - 22, // 32: envoy.config.bootstrap.v3.Watchdog.max_kill_timeout_jitter:type_name -> google.protobuf.Duration - 22, // 33: envoy.config.bootstrap.v3.Watchdog.multikill_timeout:type_name -> google.protobuf.Duration - 31, // 34: envoy.config.bootstrap.v3.Watchdog.multikill_threshold:type_name -> envoy.type.v3.Percent - 26, // 35: envoy.config.bootstrap.v3.FatalAction.config:type_name -> envoy.config.core.v3.TypedExtensionConfig - 32, // 36: envoy.config.bootstrap.v3.Runtime.base:type_name -> google.protobuf.Struct - 32, // 37: envoy.config.bootstrap.v3.RuntimeLayer.static_layer:type_name -> google.protobuf.Struct - 15, // 38: envoy.config.bootstrap.v3.RuntimeLayer.disk_layer:type_name -> envoy.config.bootstrap.v3.RuntimeLayer.DiskLayer - 16, // 39: envoy.config.bootstrap.v3.RuntimeLayer.admin_layer:type_name -> envoy.config.bootstrap.v3.RuntimeLayer.AdminLayer - 17, // 40: envoy.config.bootstrap.v3.RuntimeLayer.rtds_layer:type_name -> envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer - 8, // 41: envoy.config.bootstrap.v3.LayeredRuntime.layers:type_name -> envoy.config.bootstrap.v3.RuntimeLayer - 33, // 42: envoy.config.bootstrap.v3.Bootstrap.StaticResources.listeners:type_name -> envoy.config.listener.v3.Listener - 34, // 43: envoy.config.bootstrap.v3.Bootstrap.StaticResources.clusters:type_name -> envoy.config.cluster.v3.Cluster - 35, // 44: envoy.config.bootstrap.v3.Bootstrap.StaticResources.secrets:type_name -> envoy.extensions.transport_sockets.tls.v3.Secret - 27, // 45: envoy.config.bootstrap.v3.Bootstrap.DynamicResources.lds_config:type_name -> envoy.config.core.v3.ConfigSource - 27, // 46: envoy.config.bootstrap.v3.Bootstrap.DynamicResources.cds_config:type_name -> envoy.config.core.v3.ConfigSource - 19, // 47: envoy.config.bootstrap.v3.Bootstrap.DynamicResources.ads_config:type_name -> envoy.config.core.v3.ApiConfigSource - 26, // 48: envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry.value:type_name -> envoy.config.core.v3.TypedExtensionConfig - 36, // 49: envoy.config.bootstrap.v3.ClusterManager.OutlierDetection.event_service:type_name -> envoy.config.core.v3.EventServiceConfig - 26, // 50: envoy.config.bootstrap.v3.Watchdog.WatchdogAction.config:type_name -> envoy.config.core.v3.TypedExtensionConfig - 0, // 51: envoy.config.bootstrap.v3.Watchdog.WatchdogAction.event:type_name -> envoy.config.bootstrap.v3.Watchdog.WatchdogAction.WatchdogEvent - 27, // 52: envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer.rtds_config:type_name -> envoy.config.core.v3.ConfigSource - 53, // [53:53] is the sub-list for method output_type - 53, // [53:53] is the sub-list for method input_type - 53, // [53:53] is the sub-list for extension type_name - 53, // [53:53] is the sub-list for extension extendee - 0, // [0:53] is the sub-list for field type_name + 20, // 0: envoy.config.bootstrap.v3.Bootstrap.node:type_name -> envoy.config.core.v3.Node + 12, // 1: envoy.config.bootstrap.v3.Bootstrap.static_resources:type_name -> envoy.config.bootstrap.v3.Bootstrap.StaticResources + 13, // 2: envoy.config.bootstrap.v3.Bootstrap.dynamic_resources:type_name -> envoy.config.bootstrap.v3.Bootstrap.DynamicResources + 4, // 3: envoy.config.bootstrap.v3.Bootstrap.cluster_manager:type_name -> envoy.config.bootstrap.v3.ClusterManager + 21, // 4: envoy.config.bootstrap.v3.Bootstrap.hds_config:type_name -> envoy.config.core.v3.ApiConfigSource + 22, // 5: envoy.config.bootstrap.v3.Bootstrap.stats_sinks:type_name -> envoy.config.metrics.v3.StatsSink + 23, // 6: envoy.config.bootstrap.v3.Bootstrap.stats_config:type_name -> envoy.config.metrics.v3.StatsConfig + 24, // 7: envoy.config.bootstrap.v3.Bootstrap.stats_flush_interval:type_name -> google.protobuf.Duration + 6, // 8: envoy.config.bootstrap.v3.Bootstrap.watchdog:type_name -> envoy.config.bootstrap.v3.Watchdog + 5, // 9: envoy.config.bootstrap.v3.Bootstrap.watchdogs:type_name -> envoy.config.bootstrap.v3.Watchdogs + 25, // 10: envoy.config.bootstrap.v3.Bootstrap.tracing:type_name -> envoy.config.trace.v3.Tracing + 10, // 11: envoy.config.bootstrap.v3.Bootstrap.layered_runtime:type_name -> envoy.config.bootstrap.v3.LayeredRuntime + 3, // 12: envoy.config.bootstrap.v3.Bootstrap.admin:type_name -> envoy.config.bootstrap.v3.Admin + 26, // 13: envoy.config.bootstrap.v3.Bootstrap.overload_manager:type_name -> envoy.config.overload.v3.OverloadManager + 27, // 14: envoy.config.bootstrap.v3.Bootstrap.stats_server_version_override:type_name -> google.protobuf.UInt64Value + 28, // 15: envoy.config.bootstrap.v3.Bootstrap.dns_resolution_config:type_name -> envoy.config.core.v3.DnsResolutionConfig + 29, // 16: envoy.config.bootstrap.v3.Bootstrap.typed_dns_resolver_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 29, // 17: envoy.config.bootstrap.v3.Bootstrap.bootstrap_extensions:type_name -> envoy.config.core.v3.TypedExtensionConfig + 7, // 18: envoy.config.bootstrap.v3.Bootstrap.fatal_actions:type_name -> envoy.config.bootstrap.v3.FatalAction + 30, // 19: envoy.config.bootstrap.v3.Bootstrap.config_sources:type_name -> envoy.config.core.v3.ConfigSource + 30, // 20: envoy.config.bootstrap.v3.Bootstrap.default_config_source:type_name -> envoy.config.core.v3.ConfigSource + 14, // 21: envoy.config.bootstrap.v3.Bootstrap.certificate_provider_instances:type_name -> envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry + 11, // 22: envoy.config.bootstrap.v3.Bootstrap.inline_headers:type_name -> envoy.config.bootstrap.v3.CustomInlineHeader + 31, // 23: envoy.config.bootstrap.v3.Admin.access_log:type_name -> envoy.config.accesslog.v3.AccessLog + 32, // 24: envoy.config.bootstrap.v3.Admin.address:type_name -> envoy.config.core.v3.Address + 33, // 25: envoy.config.bootstrap.v3.Admin.socket_options:type_name -> envoy.config.core.v3.SocketOption + 15, // 26: envoy.config.bootstrap.v3.ClusterManager.outlier_detection:type_name -> envoy.config.bootstrap.v3.ClusterManager.OutlierDetection + 34, // 27: envoy.config.bootstrap.v3.ClusterManager.upstream_bind_config:type_name -> envoy.config.core.v3.BindConfig + 21, // 28: envoy.config.bootstrap.v3.ClusterManager.load_stats_config:type_name -> envoy.config.core.v3.ApiConfigSource + 6, // 29: envoy.config.bootstrap.v3.Watchdogs.main_thread_watchdog:type_name -> envoy.config.bootstrap.v3.Watchdog + 6, // 30: envoy.config.bootstrap.v3.Watchdogs.worker_watchdog:type_name -> envoy.config.bootstrap.v3.Watchdog + 16, // 31: envoy.config.bootstrap.v3.Watchdog.actions:type_name -> envoy.config.bootstrap.v3.Watchdog.WatchdogAction + 24, // 32: envoy.config.bootstrap.v3.Watchdog.miss_timeout:type_name -> google.protobuf.Duration + 24, // 33: envoy.config.bootstrap.v3.Watchdog.megamiss_timeout:type_name -> google.protobuf.Duration + 24, // 34: envoy.config.bootstrap.v3.Watchdog.kill_timeout:type_name -> google.protobuf.Duration + 24, // 35: envoy.config.bootstrap.v3.Watchdog.max_kill_timeout_jitter:type_name -> google.protobuf.Duration + 24, // 36: envoy.config.bootstrap.v3.Watchdog.multikill_timeout:type_name -> google.protobuf.Duration + 35, // 37: envoy.config.bootstrap.v3.Watchdog.multikill_threshold:type_name -> envoy.type.v3.Percent + 29, // 38: envoy.config.bootstrap.v3.FatalAction.config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 36, // 39: envoy.config.bootstrap.v3.Runtime.base:type_name -> google.protobuf.Struct + 36, // 40: envoy.config.bootstrap.v3.RuntimeLayer.static_layer:type_name -> google.protobuf.Struct + 17, // 41: envoy.config.bootstrap.v3.RuntimeLayer.disk_layer:type_name -> envoy.config.bootstrap.v3.RuntimeLayer.DiskLayer + 18, // 42: envoy.config.bootstrap.v3.RuntimeLayer.admin_layer:type_name -> envoy.config.bootstrap.v3.RuntimeLayer.AdminLayer + 19, // 43: envoy.config.bootstrap.v3.RuntimeLayer.rtds_layer:type_name -> envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer + 9, // 44: envoy.config.bootstrap.v3.LayeredRuntime.layers:type_name -> envoy.config.bootstrap.v3.RuntimeLayer + 1, // 45: envoy.config.bootstrap.v3.CustomInlineHeader.inline_header_type:type_name -> envoy.config.bootstrap.v3.CustomInlineHeader.InlineHeaderType + 37, // 46: envoy.config.bootstrap.v3.Bootstrap.StaticResources.listeners:type_name -> envoy.config.listener.v3.Listener + 38, // 47: envoy.config.bootstrap.v3.Bootstrap.StaticResources.clusters:type_name -> envoy.config.cluster.v3.Cluster + 39, // 48: envoy.config.bootstrap.v3.Bootstrap.StaticResources.secrets:type_name -> envoy.extensions.transport_sockets.tls.v3.Secret + 30, // 49: envoy.config.bootstrap.v3.Bootstrap.DynamicResources.lds_config:type_name -> envoy.config.core.v3.ConfigSource + 30, // 50: envoy.config.bootstrap.v3.Bootstrap.DynamicResources.cds_config:type_name -> envoy.config.core.v3.ConfigSource + 21, // 51: envoy.config.bootstrap.v3.Bootstrap.DynamicResources.ads_config:type_name -> envoy.config.core.v3.ApiConfigSource + 29, // 52: envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry.value:type_name -> envoy.config.core.v3.TypedExtensionConfig + 40, // 53: envoy.config.bootstrap.v3.ClusterManager.OutlierDetection.event_service:type_name -> envoy.config.core.v3.EventServiceConfig + 29, // 54: envoy.config.bootstrap.v3.Watchdog.WatchdogAction.config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 0, // 55: envoy.config.bootstrap.v3.Watchdog.WatchdogAction.event:type_name -> envoy.config.bootstrap.v3.Watchdog.WatchdogAction.WatchdogEvent + 30, // 56: envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer.rtds_config:type_name -> envoy.config.core.v3.ConfigSource + 57, // [57:57] is the sub-list for method output_type + 57, // [57:57] is the sub-list for method input_type + 57, // [57:57] is the sub-list for extension type_name + 57, // [57:57] is the sub-list for extension extendee + 0, // [0:57] is the sub-list for field type_name } func init() { file_envoy_config_bootstrap_v3_bootstrap_proto_init() } @@ -2324,7 +2595,7 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { } } file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bootstrap_StaticResources); i { + switch v := v.(*CustomInlineHeader); i { case 0: return &v.state case 1: @@ -2336,6 +2607,18 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { } } file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bootstrap_StaticResources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bootstrap_DynamicResources); i { case 0: return &v.state @@ -2347,7 +2630,7 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { return nil } } - file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClusterManager_OutlierDetection); i { case 0: return &v.state @@ -2359,7 +2642,7 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { return nil } } - file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Watchdog_WatchdogAction); i { case 0: return &v.state @@ -2371,7 +2654,7 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { return nil } } - file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RuntimeLayer_DiskLayer); i { case 0: return &v.state @@ -2383,7 +2666,7 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { return nil } } - file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RuntimeLayer_AdminLayer); i { case 0: return &v.state @@ -2395,7 +2678,7 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { return nil } } - file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_bootstrap_v3_bootstrap_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RuntimeLayer_RtdsLayer); i { case 0: return &v.state @@ -2422,8 +2705,8 @@ func file_envoy_config_bootstrap_v3_bootstrap_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_bootstrap_v3_bootstrap_proto_rawDesc, - NumEnums: 1, - NumMessages: 17, + NumEnums: 2, + NumMessages: 18, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.validate.go b/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.validate.go index 27fed30b23..07c9a4a8a2 100644 --- a/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.validate.go +++ b/pkg/api/envoy/config/bootstrap/v3/bootstrap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/bootstrap/v3/bootstrap.proto -package envoy_config_bootstrap_v3 +package bootstrapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Bootstrap with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Bootstrap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Bootstrap with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BootstrapMultiError, or nil +// if none found. +func (m *Bootstrap) ValidateAll() error { + return m.validate(true) +} + +func (m *Bootstrap) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Node", @@ -50,7 +86,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetStaticResources()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStaticResources()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StaticResources", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StaticResources", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStaticResources()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "StaticResources", @@ -60,7 +115,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetDynamicResources()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDynamicResources()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DynamicResources", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DynamicResources", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicResources()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "DynamicResources", @@ -70,7 +144,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetClusterManager()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClusterManager()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "ClusterManager", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "ClusterManager", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClusterManager()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "ClusterManager", @@ -80,7 +173,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetHdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "HdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "HdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "HdsConfig", @@ -95,7 +207,26 @@ func (m *Bootstrap) Validate() error { for idx, item := range m.GetStatsSinks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("StatsSinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("StatsSinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: fmt.Sprintf("StatsSinks[%v]", idx), @@ -107,7 +238,26 @@ func (m *Bootstrap) Validate() error { } - if v, ok := interface{}(m.GetStatsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "StatsConfig", @@ -118,28 +268,56 @@ func (m *Bootstrap) Validate() error { } if d := m.GetStatsFlushInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return BootstrapValidationError{ + err = BootstrapValidationError{ field: "StatsFlushInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - lt := time.Duration(300*time.Second + 0*time.Nanosecond) - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + lt := time.Duration(300*time.Second + 0*time.Nanosecond) + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if dur < gte || dur >= lt { - return BootstrapValidationError{ - field: "StatsFlushInterval", - reason: "value must be inside range [1ms, 5m0s)", + if dur < gte || dur >= lt { + err := BootstrapValidationError{ + field: "StatsFlushInterval", + reason: "value must be inside range [1ms, 5m0s)", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetWatchdog()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWatchdog()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Watchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Watchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWatchdog()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Watchdog", @@ -149,7 +327,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetWatchdogs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWatchdogs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Watchdogs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Watchdogs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWatchdogs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Watchdogs", @@ -159,7 +356,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTracing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Tracing", @@ -169,7 +385,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetLayeredRuntime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLayeredRuntime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "LayeredRuntime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "LayeredRuntime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLayeredRuntime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "LayeredRuntime", @@ -179,7 +414,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetAdmin()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdmin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Admin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "Admin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdmin()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "Admin", @@ -189,7 +443,26 @@ func (m *Bootstrap) Validate() error { } } - if v, ok := interface{}(m.GetOverloadManager()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOverloadManager()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "OverloadManager", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "OverloadManager", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverloadManager()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "OverloadManager", @@ -203,7 +476,26 @@ func (m *Bootstrap) Validate() error { // no validation rules for HeaderPrefix - if v, ok := interface{}(m.GetStatsServerVersionOverride()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsServerVersionOverride()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsServerVersionOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "StatsServerVersionOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsServerVersionOverride()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "StatsServerVersionOverride", @@ -215,10 +507,87 @@ func (m *Bootstrap) Validate() error { // no validation rules for UseTcpForDnsLookups + if all { + switch v := interface{}(m.GetDnsResolutionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolutionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BootstrapValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTypedDnsResolverConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedDnsResolverConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BootstrapValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + for idx, item := range m.GetBootstrapExtensions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("BootstrapExtensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("BootstrapExtensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: fmt.Sprintf("BootstrapExtensions[%v]", idx), @@ -233,7 +602,26 @@ func (m *Bootstrap) Validate() error { for idx, item := range m.GetFatalActions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("FatalActions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("FatalActions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: fmt.Sprintf("FatalActions[%v]", idx), @@ -248,7 +636,26 @@ func (m *Bootstrap) Validate() error { for idx, item := range m.GetConfigSources() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("ConfigSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("ConfigSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: fmt.Sprintf("ConfigSources[%v]", idx), @@ -260,7 +667,26 @@ func (m *Bootstrap) Validate() error { } - if v, ok := interface{}(m.GetDefaultConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DefaultConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: "DefaultConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ field: "DefaultConfigSource", @@ -272,15 +698,78 @@ func (m *Bootstrap) Validate() error { // no validation rules for DefaultSocketInterface - for key, val := range m.GetCertificateProviderInstances() { - _ = val + { + sorted_keys := make([]string, len(m.GetCertificateProviderInstances())) + i := 0 + for key := range m.GetCertificateProviderInstances() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetCertificateProviderInstances()[key] + _ = val + + // no validation rules for CertificateProviderInstances[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("CertificateProviderInstances[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("CertificateProviderInstances[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BootstrapValidationError{ + field: fmt.Sprintf("CertificateProviderInstances[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } - // no validation rules for CertificateProviderInstances[key] + for idx, item := range m.GetInlineHeaders() { + _, _ = idx, item - if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("InlineHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapValidationError{ + field: fmt.Sprintf("InlineHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BootstrapValidationError{ - field: fmt.Sprintf("CertificateProviderInstances[%v]", key), + field: fmt.Sprintf("InlineHeaders[%v]", idx), reason: "embedded message failed validation", cause: err, } @@ -289,32 +778,48 @@ func (m *Bootstrap) Validate() error { } - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedRuntime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "HiddenEnvoyDeprecatedRuntime", - reason: "embedded message failed validation", - cause: err, - } - } - } + // no validation rules for PerfTracingFilePath switch m.StatsFlush.(type) { case *Bootstrap_StatsFlushOnAdmin: if m.GetStatsFlushOnAdmin() != true { - return BootstrapValidationError{ + err := BootstrapValidationError{ field: "StatsFlushOnAdmin", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return BootstrapMultiError(errors) + } + return nil } +// BootstrapMultiError is an error wrapping multiple validation errors returned +// by Bootstrap.ValidateAll() if the designated constraints aren't met. +type BootstrapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BootstrapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BootstrapMultiError) AllErrors() []error { return m } + // BootstrapValidationError is the validation error returned by // Bootstrap.Validate if the designated constraints aren't met. type BootstrapValidationError struct { @@ -370,17 +875,84 @@ var _ interface { } = BootstrapValidationError{} // Validate checks the field values on Admin with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Admin) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Admin with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in AdminMultiError, or nil if none found. +func (m *Admin) ValidateAll() error { + return m.validate(true) +} + +func (m *Admin) validate(all bool) error { if m == nil { return nil } + var errors []error + + for idx, item := range m.GetAccessLog() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdminValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdminValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdminValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + // no validation rules for AccessLogPath // no validation rules for ProfilePath - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdminValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdminValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdminValidationError{ field: "Address", @@ -393,7 +965,26 @@ func (m *Admin) Validate() error { for idx, item := range m.GetSocketOptions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdminValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdminValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdminValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), @@ -405,9 +996,31 @@ func (m *Admin) Validate() error { } + // no validation rules for IgnoreGlobalConnLimit + + if len(errors) > 0 { + return AdminMultiError(errors) + } + return nil } +// AdminMultiError is an error wrapping multiple validation errors returned by +// Admin.ValidateAll() if the designated constraints aren't met. +type AdminMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdminMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdminMultiError) AllErrors() []error { return m } + // AdminValidationError is the validation error returned by Admin.Validate if // the designated constraints aren't met. type AdminValidationError struct { @@ -463,16 +1076,49 @@ var _ interface { } = AdminValidationError{} // Validate checks the field values on ClusterManager with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterManager) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterManager with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterManagerMultiError, +// or nil if none found. +func (m *ClusterManager) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterManager) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for LocalClusterName - if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOutlierDetection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManagerValidationError{ field: "OutlierDetection", @@ -482,7 +1128,26 @@ func (m *ClusterManager) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamBindConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManagerValidationError{ field: "UpstreamBindConfig", @@ -492,7 +1157,26 @@ func (m *ClusterManager) Validate() error { } } - if v, ok := interface{}(m.GetLoadStatsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadStatsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "LoadStatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManagerValidationError{ + field: "LoadStatsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadStatsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManagerValidationError{ field: "LoadStatsConfig", @@ -502,9 +1186,30 @@ func (m *ClusterManager) Validate() error { } } + if len(errors) > 0 { + return ClusterManagerMultiError(errors) + } + return nil } +// ClusterManagerMultiError is an error wrapping multiple validation errors +// returned by ClusterManager.ValidateAll() if the designated constraints +// aren't met. +type ClusterManagerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterManagerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterManagerMultiError) AllErrors() []error { return m } + // ClusterManagerValidationError is the validation error returned by // ClusterManager.Validate if the designated constraints aren't met. type ClusterManagerValidationError struct { @@ -560,13 +1265,47 @@ var _ interface { } = ClusterManagerValidationError{} // Validate checks the field values on Watchdogs with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Watchdogs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Watchdogs with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in WatchdogsMultiError, or nil +// if none found. +func (m *Watchdogs) ValidateAll() error { + return m.validate(true) +} + +func (m *Watchdogs) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMainThreadWatchdog()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMainThreadWatchdog()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogsValidationError{ + field: "MainThreadWatchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogsValidationError{ + field: "MainThreadWatchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMainThreadWatchdog()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogsValidationError{ field: "MainThreadWatchdog", @@ -576,7 +1315,26 @@ func (m *Watchdogs) Validate() error { } } - if v, ok := interface{}(m.GetWorkerWatchdog()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWorkerWatchdog()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogsValidationError{ + field: "WorkerWatchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogsValidationError{ + field: "WorkerWatchdog", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWorkerWatchdog()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogsValidationError{ field: "WorkerWatchdog", @@ -586,9 +1344,29 @@ func (m *Watchdogs) Validate() error { } } + if len(errors) > 0 { + return WatchdogsMultiError(errors) + } + return nil } +// WatchdogsMultiError is an error wrapping multiple validation errors returned +// by Watchdogs.ValidateAll() if the designated constraints aren't met. +type WatchdogsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WatchdogsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WatchdogsMultiError) AllErrors() []error { return m } + // WatchdogsValidationError is the validation error returned by // Watchdogs.Validate if the designated constraints aren't met. type WatchdogsValidationError struct { @@ -644,16 +1422,50 @@ var _ interface { } = WatchdogsValidationError{} // Validate checks the field values on Watchdog with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Watchdog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Watchdog with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in WatchdogMultiError, or nil +// if none found. +func (m *Watchdog) ValidateAll() error { + return m.validate(true) +} + +func (m *Watchdog) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetActions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: fmt.Sprintf("Actions[%v]", idx), @@ -665,7 +1477,26 @@ func (m *Watchdog) Validate() error { } - if v, ok := interface{}(m.GetMissTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMissTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMissTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "MissTimeout", @@ -675,7 +1506,26 @@ func (m *Watchdog) Validate() error { } } - if v, ok := interface{}(m.GetMegamissTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMegamissTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MegamissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MegamissTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMegamissTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "MegamissTimeout", @@ -685,7 +1535,26 @@ func (m *Watchdog) Validate() error { } } - if v, ok := interface{}(m.GetKillTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKillTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "KillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "KillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKillTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "KillTimeout", @@ -696,27 +1565,55 @@ func (m *Watchdog) Validate() error { } if d := m.GetMaxKillTimeoutJitter(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return WatchdogValidationError{ + err = WatchdogValidationError{ field: "MaxKillTimeoutJitter", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gte := time.Duration(0*time.Second + 0*time.Nanosecond) + gte := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur < gte { - return WatchdogValidationError{ - field: "MaxKillTimeoutJitter", - reason: "value must be greater than or equal to 0s", + if dur < gte { + err := WatchdogValidationError{ + field: "MaxKillTimeoutJitter", + reason: "value must be greater than or equal to 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetMultikillTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMultikillTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MultikillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MultikillTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMultikillTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "MultikillTimeout", @@ -726,7 +1623,26 @@ func (m *Watchdog) Validate() error { } } - if v, ok := interface{}(m.GetMultikillThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMultikillThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MultikillThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WatchdogValidationError{ + field: "MultikillThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMultikillThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WatchdogValidationError{ field: "MultikillThreshold", @@ -736,9 +1652,29 @@ func (m *Watchdog) Validate() error { } } + if len(errors) > 0 { + return WatchdogMultiError(errors) + } + return nil } +// WatchdogMultiError is an error wrapping multiple validation errors returned +// by Watchdog.ValidateAll() if the designated constraints aren't met. +type WatchdogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WatchdogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WatchdogMultiError) AllErrors() []error { return m } + // WatchdogValidationError is the validation error returned by // Watchdog.Validate if the designated constraints aren't met. type WatchdogValidationError struct { @@ -794,14 +1730,47 @@ var _ interface { } = WatchdogValidationError{} // Validate checks the field values on FatalAction with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FatalAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FatalAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FatalActionMultiError, or +// nil if none found. +func (m *FatalAction) ValidateAll() error { + return m.validate(true) +} + +func (m *FatalAction) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FatalActionValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FatalActionValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FatalActionValidationError{ field: "Config", @@ -811,9 +1780,29 @@ func (m *FatalAction) Validate() error { } } + if len(errors) > 0 { + return FatalActionMultiError(errors) + } + return nil } +// FatalActionMultiError is an error wrapping multiple validation errors +// returned by FatalAction.ValidateAll() if the designated constraints aren't met. +type FatalActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FatalActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FatalActionMultiError) AllErrors() []error { return m } + // FatalActionValidationError is the validation error returned by // FatalAction.Validate if the designated constraints aren't met. type FatalActionValidationError struct { @@ -869,19 +1858,52 @@ var _ interface { } = FatalActionValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Runtime) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Runtime with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RuntimeMultiError, or nil if none found. +func (m *Runtime) ValidateAll() error { + return m.validate(true) +} + +func (m *Runtime) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SymlinkRoot // no validation rules for Subdirectory // no validation rules for OverrideSubdirectory - if v, ok := interface{}(m.GetBase()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBase()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Base", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Base", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBase()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeValidationError{ field: "Base", @@ -891,9 +1913,29 @@ func (m *Runtime) Validate() error { } } + if len(errors) > 0 { + return RuntimeMultiError(errors) + } + return nil } +// RuntimeMultiError is an error wrapping multiple validation errors returned +// by Runtime.ValidateAll() if the designated constraints aren't met. +type RuntimeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeMultiError) AllErrors() []error { return m } + // RuntimeValidationError is the validation error returned by Runtime.Validate // if the designated constraints aren't met. type RuntimeValidationError struct { @@ -949,25 +1991,62 @@ var _ interface { } = RuntimeValidationError{} // Validate checks the field values on RuntimeLayer with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeLayerMultiError, or +// nil if none found. +func (m *RuntimeLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return RuntimeLayerValidationError{ + err := RuntimeLayerValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.LayerSpecifier.(type) { case *RuntimeLayer_StaticLayer: - if v, ok := interface{}(m.GetStaticLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStaticLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "StaticLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "StaticLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStaticLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "StaticLayer", @@ -979,7 +2058,26 @@ func (m *RuntimeLayer) Validate() error { case *RuntimeLayer_DiskLayer_: - if v, ok := interface{}(m.GetDiskLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDiskLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "DiskLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "DiskLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDiskLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "DiskLayer", @@ -991,7 +2089,26 @@ func (m *RuntimeLayer) Validate() error { case *RuntimeLayer_AdminLayer_: - if v, ok := interface{}(m.GetAdminLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdminLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "AdminLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "AdminLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdminLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "AdminLayer", @@ -1003,7 +2120,26 @@ func (m *RuntimeLayer) Validate() error { case *RuntimeLayer_RtdsLayer_: - if v, ok := interface{}(m.GetRtdsLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRtdsLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "RtdsLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayerValidationError{ + field: "RtdsLayer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtdsLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayerValidationError{ field: "RtdsLayer", @@ -1014,16 +2150,40 @@ func (m *RuntimeLayer) Validate() error { } default: - return RuntimeLayerValidationError{ + err := RuntimeLayerValidationError{ field: "LayerSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RuntimeLayerMultiError(errors) } return nil } +// RuntimeLayerMultiError is an error wrapping multiple validation errors +// returned by RuntimeLayer.ValidateAll() if the designated constraints aren't met. +type RuntimeLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayerMultiError) AllErrors() []error { return m } + // RuntimeLayerValidationError is the validation error returned by // RuntimeLayer.Validate if the designated constraints aren't met. type RuntimeLayerValidationError struct { @@ -1079,17 +2239,50 @@ var _ interface { } = RuntimeLayerValidationError{} // Validate checks the field values on LayeredRuntime with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LayeredRuntime) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LayeredRuntime with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LayeredRuntimeMultiError, +// or nil if none found. +func (m *LayeredRuntime) ValidateAll() error { + return m.validate(true) +} + +func (m *LayeredRuntime) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetLayers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LayeredRuntimeValidationError{ + field: fmt.Sprintf("Layers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LayeredRuntimeValidationError{ + field: fmt.Sprintf("Layers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LayeredRuntimeValidationError{ field: fmt.Sprintf("Layers[%v]", idx), @@ -1101,9 +2294,30 @@ func (m *LayeredRuntime) Validate() error { } + if len(errors) > 0 { + return LayeredRuntimeMultiError(errors) + } + return nil } +// LayeredRuntimeMultiError is an error wrapping multiple validation errors +// returned by LayeredRuntime.ValidateAll() if the designated constraints +// aren't met. +type LayeredRuntimeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LayeredRuntimeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LayeredRuntimeMultiError) AllErrors() []error { return m } + // LayeredRuntimeValidationError is the validation error returned by // LayeredRuntime.Validate if the designated constraints aren't met. type LayeredRuntimeValidationError struct { @@ -1158,18 +2372,188 @@ var _ interface { ErrorName() string } = LayeredRuntimeValidationError{} +// Validate checks the field values on CustomInlineHeader with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CustomInlineHeader) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomInlineHeader with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomInlineHeaderMultiError, or nil if none found. +func (m *CustomInlineHeader) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomInlineHeader) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetInlineHeaderName()) < 1 { + err := CustomInlineHeaderValidationError{ + field: "InlineHeaderName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_CustomInlineHeader_InlineHeaderName_Pattern.MatchString(m.GetInlineHeaderName()) { + err := CustomInlineHeaderValidationError{ + field: "InlineHeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := CustomInlineHeader_InlineHeaderType_name[int32(m.GetInlineHeaderType())]; !ok { + err := CustomInlineHeaderValidationError{ + field: "InlineHeaderType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return CustomInlineHeaderMultiError(errors) + } + + return nil +} + +// CustomInlineHeaderMultiError is an error wrapping multiple validation errors +// returned by CustomInlineHeader.ValidateAll() if the designated constraints +// aren't met. +type CustomInlineHeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomInlineHeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomInlineHeaderMultiError) AllErrors() []error { return m } + +// CustomInlineHeaderValidationError is the validation error returned by +// CustomInlineHeader.Validate if the designated constraints aren't met. +type CustomInlineHeaderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CustomInlineHeaderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CustomInlineHeaderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CustomInlineHeaderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CustomInlineHeaderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CustomInlineHeaderValidationError) ErrorName() string { + return "CustomInlineHeaderValidationError" +} + +// Error satisfies the builtin error interface +func (e CustomInlineHeaderValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCustomInlineHeader.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CustomInlineHeaderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CustomInlineHeaderValidationError{} + +var _CustomInlineHeader_InlineHeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + // Validate checks the field values on Bootstrap_StaticResources with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Bootstrap_StaticResources) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Bootstrap_StaticResources with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Bootstrap_StaticResourcesMultiError, or nil if none found. +func (m *Bootstrap_StaticResources) ValidateAll() error { + return m.validate(true) +} + +func (m *Bootstrap_StaticResources) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetListeners() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Listeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Listeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_StaticResourcesValidationError{ field: fmt.Sprintf("Listeners[%v]", idx), @@ -1184,7 +2568,26 @@ func (m *Bootstrap_StaticResources) Validate() error { for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_StaticResourcesValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -1199,7 +2602,26 @@ func (m *Bootstrap_StaticResources) Validate() error { for idx, item := range m.GetSecrets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Secrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_StaticResourcesValidationError{ + field: fmt.Sprintf("Secrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_StaticResourcesValidationError{ field: fmt.Sprintf("Secrets[%v]", idx), @@ -1211,9 +2633,30 @@ func (m *Bootstrap_StaticResources) Validate() error { } + if len(errors) > 0 { + return Bootstrap_StaticResourcesMultiError(errors) + } + return nil } +// Bootstrap_StaticResourcesMultiError is an error wrapping multiple validation +// errors returned by Bootstrap_StaticResources.ValidateAll() if the +// designated constraints aren't met. +type Bootstrap_StaticResourcesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Bootstrap_StaticResourcesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Bootstrap_StaticResourcesMultiError) AllErrors() []error { return m } + // Bootstrap_StaticResourcesValidationError is the validation error returned by // Bootstrap_StaticResources.Validate if the designated constraints aren't met. type Bootstrap_StaticResourcesValidationError struct { @@ -1272,13 +2715,46 @@ var _ interface { // Validate checks the field values on Bootstrap_DynamicResources with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Bootstrap_DynamicResources) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Bootstrap_DynamicResources with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Bootstrap_DynamicResourcesMultiError, or nil if none found. +func (m *Bootstrap_DynamicResources) ValidateAll() error { + return m.validate(true) +} + +func (m *Bootstrap_DynamicResources) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLdsConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "LdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "LdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_DynamicResourcesValidationError{ field: "LdsConfig", @@ -1290,7 +2766,26 @@ func (m *Bootstrap_DynamicResources) Validate() error { // no validation rules for LdsResourcesLocator - if v, ok := interface{}(m.GetCdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "CdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "CdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_DynamicResourcesValidationError{ field: "CdsConfig", @@ -1302,7 +2797,26 @@ func (m *Bootstrap_DynamicResources) Validate() error { // no validation rules for CdsResourcesLocator - if v, ok := interface{}(m.GetAdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "AdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Bootstrap_DynamicResourcesValidationError{ + field: "AdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Bootstrap_DynamicResourcesValidationError{ field: "AdsConfig", @@ -1312,9 +2826,30 @@ func (m *Bootstrap_DynamicResources) Validate() error { } } + if len(errors) > 0 { + return Bootstrap_DynamicResourcesMultiError(errors) + } + return nil } +// Bootstrap_DynamicResourcesMultiError is an error wrapping multiple +// validation errors returned by Bootstrap_DynamicResources.ValidateAll() if +// the designated constraints aren't met. +type Bootstrap_DynamicResourcesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Bootstrap_DynamicResourcesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Bootstrap_DynamicResourcesMultiError) AllErrors() []error { return m } + // Bootstrap_DynamicResourcesValidationError is the validation error returned // by Bootstrap_DynamicResources.Validate if the designated constraints aren't met. type Bootstrap_DynamicResourcesValidationError struct { @@ -1373,15 +2908,48 @@ var _ interface { // Validate checks the field values on ClusterManager_OutlierDetection with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterManager_OutlierDetection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterManager_OutlierDetection with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ClusterManager_OutlierDetectionMultiError, or nil if none found. +func (m *ClusterManager_OutlierDetection) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterManager_OutlierDetection) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for EventLogPath - if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEventService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterManager_OutlierDetectionValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterManager_OutlierDetectionValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterManager_OutlierDetectionValidationError{ field: "EventService", @@ -1391,9 +2959,30 @@ func (m *ClusterManager_OutlierDetection) Validate() error { } } + if len(errors) > 0 { + return ClusterManager_OutlierDetectionMultiError(errors) + } + return nil } +// ClusterManager_OutlierDetectionMultiError is an error wrapping multiple +// validation errors returned by ClusterManager_OutlierDetection.ValidateAll() +// if the designated constraints aren't met. +type ClusterManager_OutlierDetectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterManager_OutlierDetectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterManager_OutlierDetectionMultiError) AllErrors() []error { return m } + // ClusterManager_OutlierDetectionValidationError is the validation error // returned by ClusterManager_OutlierDetection.Validate if the designated // constraints aren't met. @@ -1453,13 +3042,46 @@ var _ interface { // Validate checks the field values on Watchdog_WatchdogAction with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Watchdog_WatchdogAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Watchdog_WatchdogAction with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Watchdog_WatchdogActionMultiError, or nil if none found. +func (m *Watchdog_WatchdogAction) ValidateAll() error { + return m.validate(true) +} + +func (m *Watchdog_WatchdogAction) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Watchdog_WatchdogActionValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Watchdog_WatchdogActionValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Watchdog_WatchdogActionValidationError{ field: "Config", @@ -1470,15 +3092,40 @@ func (m *Watchdog_WatchdogAction) Validate() error { } if _, ok := Watchdog_WatchdogAction_WatchdogEvent_name[int32(m.GetEvent())]; !ok { - return Watchdog_WatchdogActionValidationError{ + err := Watchdog_WatchdogActionValidationError{ field: "Event", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return Watchdog_WatchdogActionMultiError(errors) } return nil } +// Watchdog_WatchdogActionMultiError is an error wrapping multiple validation +// errors returned by Watchdog_WatchdogAction.ValidateAll() if the designated +// constraints aren't met. +type Watchdog_WatchdogActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Watchdog_WatchdogActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Watchdog_WatchdogActionMultiError) AllErrors() []error { return m } + // Watchdog_WatchdogActionValidationError is the validation error returned by // Watchdog_WatchdogAction.Validate if the designated constraints aren't met. type Watchdog_WatchdogActionValidationError struct { @@ -1537,21 +3184,56 @@ var _ interface { // Validate checks the field values on RuntimeLayer_DiskLayer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer_DiskLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer_DiskLayer with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeLayer_DiskLayerMultiError, or nil if none found. +func (m *RuntimeLayer_DiskLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer_DiskLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SymlinkRoot // no validation rules for Subdirectory // no validation rules for AppendServiceCluster + if len(errors) > 0 { + return RuntimeLayer_DiskLayerMultiError(errors) + } + return nil } +// RuntimeLayer_DiskLayerMultiError is an error wrapping multiple validation +// errors returned by RuntimeLayer_DiskLayer.ValidateAll() if the designated +// constraints aren't met. +type RuntimeLayer_DiskLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayer_DiskLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayer_DiskLayerMultiError) AllErrors() []error { return m } + // RuntimeLayer_DiskLayerValidationError is the validation error returned by // RuntimeLayer_DiskLayer.Validate if the designated constraints aren't met. type RuntimeLayer_DiskLayerValidationError struct { @@ -1610,15 +3292,50 @@ var _ interface { // Validate checks the field values on RuntimeLayer_AdminLayer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer_AdminLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer_AdminLayer with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeLayer_AdminLayerMultiError, or nil if none found. +func (m *RuntimeLayer_AdminLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer_AdminLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RuntimeLayer_AdminLayerMultiError(errors) + } + return nil } +// RuntimeLayer_AdminLayerMultiError is an error wrapping multiple validation +// errors returned by RuntimeLayer_AdminLayer.ValidateAll() if the designated +// constraints aren't met. +type RuntimeLayer_AdminLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayer_AdminLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayer_AdminLayerMultiError) AllErrors() []error { return m } + // RuntimeLayer_AdminLayerValidationError is the validation error returned by // RuntimeLayer_AdminLayer.Validate if the designated constraints aren't met. type RuntimeLayer_AdminLayerValidationError struct { @@ -1677,15 +3394,48 @@ var _ interface { // Validate checks the field values on RuntimeLayer_RtdsLayer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeLayer_RtdsLayer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeLayer_RtdsLayer with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeLayer_RtdsLayerMultiError, or nil if none found. +func (m *RuntimeLayer_RtdsLayer) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeLayer_RtdsLayer) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetRtdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRtdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeLayer_RtdsLayerValidationError{ + field: "RtdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeLayer_RtdsLayerValidationError{ + field: "RtdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeLayer_RtdsLayerValidationError{ field: "RtdsConfig", @@ -1695,9 +3445,30 @@ func (m *RuntimeLayer_RtdsLayer) Validate() error { } } + if len(errors) > 0 { + return RuntimeLayer_RtdsLayerMultiError(errors) + } + return nil } +// RuntimeLayer_RtdsLayerMultiError is an error wrapping multiple validation +// errors returned by RuntimeLayer_RtdsLayer.ValidateAll() if the designated +// constraints aren't met. +type RuntimeLayer_RtdsLayerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeLayer_RtdsLayerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeLayer_RtdsLayerMultiError) AllErrors() []error { return m } + // RuntimeLayer_RtdsLayerValidationError is the validation error returned by // RuntimeLayer_RtdsLayer.Validate if the designated constraints aren't met. type RuntimeLayer_RtdsLayerValidationError struct { diff --git a/pkg/api/envoy/config/bootstrap/v4alpha/bootstrap.pb.go b/pkg/api/envoy/config/bootstrap/v4alpha/bootstrap.pb.go deleted file mode 100644 index dcaf6c9713..0000000000 --- a/pkg/api/envoy/config/bootstrap/v4alpha/bootstrap.pb.go +++ /dev/null @@ -1,2458 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/bootstrap/v4alpha/bootstrap.proto - -package envoy_config_bootstrap_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v4alpha4 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/metrics/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/overload/v3" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/trace/v4alpha" - v4alpha5 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// The events are fired in this order: KILL, MULTIKILL, MEGAMISS, MISS. -// Within an event type, actions execute in the order they are configured. -// For KILL/MULTIKILL there is a default PANIC that will run after the -// registered actions and kills the process if it wasn't already killed. -// It might be useful to specify several debug actions, and possibly an -// alternate FATAL action. -type Watchdog_WatchdogAction_WatchdogEvent int32 - -const ( - Watchdog_WatchdogAction_UNKNOWN Watchdog_WatchdogAction_WatchdogEvent = 0 - Watchdog_WatchdogAction_KILL Watchdog_WatchdogAction_WatchdogEvent = 1 - Watchdog_WatchdogAction_MULTIKILL Watchdog_WatchdogAction_WatchdogEvent = 2 - Watchdog_WatchdogAction_MEGAMISS Watchdog_WatchdogAction_WatchdogEvent = 3 - Watchdog_WatchdogAction_MISS Watchdog_WatchdogAction_WatchdogEvent = 4 -) - -// Enum value maps for Watchdog_WatchdogAction_WatchdogEvent. -var ( - Watchdog_WatchdogAction_WatchdogEvent_name = map[int32]string{ - 0: "UNKNOWN", - 1: "KILL", - 2: "MULTIKILL", - 3: "MEGAMISS", - 4: "MISS", - } - Watchdog_WatchdogAction_WatchdogEvent_value = map[string]int32{ - "UNKNOWN": 0, - "KILL": 1, - "MULTIKILL": 2, - "MEGAMISS": 3, - "MISS": 4, - } -) - -func (x Watchdog_WatchdogAction_WatchdogEvent) Enum() *Watchdog_WatchdogAction_WatchdogEvent { - p := new(Watchdog_WatchdogAction_WatchdogEvent) - *p = x - return p -} - -func (x Watchdog_WatchdogAction_WatchdogEvent) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Watchdog_WatchdogAction_WatchdogEvent) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_enumTypes[0].Descriptor() -} - -func (Watchdog_WatchdogAction_WatchdogEvent) Type() protoreflect.EnumType { - return &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_enumTypes[0] -} - -func (x Watchdog_WatchdogAction_WatchdogEvent) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Watchdog_WatchdogAction_WatchdogEvent.Descriptor instead. -func (Watchdog_WatchdogAction_WatchdogEvent) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{4, 0, 0} -} - -// Bootstrap :ref:`configuration overview `. -// [#next-free-field: 30] -type Bootstrap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Node identity to present to the management server and for instance - // identification purposes (e.g. in generated headers). - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // A list of :ref:`Node ` field names - // that will be included in the context parameters of the effective - // xdstp:// URL that is sent in a discovery request when resource - // locators are used for LDS/CDS. Any non-string field will have its JSON - // encoding set as the context parameter value, with the exception of - // metadata, which will be flattened (see example below). The supported field - // names are: - // - "cluster" - // - "id" - // - "locality.region" - // - "locality.sub_zone" - // - "locality.zone" - // - "metadata" - // - "user_agent_build_version.metadata" - // - "user_agent_build_version.version" - // - "user_agent_name" - // - "user_agent_version" - // - // The node context parameters act as a base layer dictionary for the context - // parameters (i.e. more specific resource specific context parameters will - // override). Field names will be prefixed with “udpa.node.” when included in - // context parameters. - // - // For example, if node_context_params is ``["user_agent_name", "metadata"]``, - // the implied context parameters might be:: - // - // node.user_agent_name: "envoy" - // node.metadata.foo: "{\"bar\": \"baz\"}" - // node.metadata.some: "42" - // node.metadata.thing: "\"thing\"" - // - // [#not-implemented-hide:] - NodeContextParams []string `protobuf:"bytes,26,rep,name=node_context_params,json=nodeContextParams,proto3" json:"node_context_params,omitempty"` - // Statically specified resources. - StaticResources *Bootstrap_StaticResources `protobuf:"bytes,2,opt,name=static_resources,json=staticResources,proto3" json:"static_resources,omitempty"` - // xDS configuration sources. - DynamicResources *Bootstrap_DynamicResources `protobuf:"bytes,3,opt,name=dynamic_resources,json=dynamicResources,proto3" json:"dynamic_resources,omitempty"` - // Configuration for the cluster manager which owns all upstream clusters - // within the server. - ClusterManager *ClusterManager `protobuf:"bytes,4,opt,name=cluster_manager,json=clusterManager,proto3" json:"cluster_manager,omitempty"` - // Health discovery service config option. - // (:ref:`core.ApiConfigSource `) - HdsConfig *v4alpha.ApiConfigSource `protobuf:"bytes,14,opt,name=hds_config,json=hdsConfig,proto3" json:"hds_config,omitempty"` - // Optional file system path to search for startup flag files. - FlagsPath string `protobuf:"bytes,5,opt,name=flags_path,json=flagsPath,proto3" json:"flags_path,omitempty"` - // Optional set of stats sinks. - StatsSinks []*v4alpha1.StatsSink `protobuf:"bytes,6,rep,name=stats_sinks,json=statsSinks,proto3" json:"stats_sinks,omitempty"` - // Configuration for internal processing of stats. - StatsConfig *v4alpha1.StatsConfig `protobuf:"bytes,13,opt,name=stats_config,json=statsConfig,proto3" json:"stats_config,omitempty"` - // Types that are assignable to StatsFlush: - // *Bootstrap_StatsFlushInterval - // *Bootstrap_StatsFlushOnAdmin - StatsFlush isBootstrap_StatsFlush `protobuf_oneof:"stats_flush"` - // Optional watchdog configuration. - // This is for a single watchdog configuration for the entire system. - // Deprecated in favor of *watchdogs* which has finer granularity. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedWatchdog *Watchdog `protobuf:"bytes,8,opt,name=hidden_envoy_deprecated_watchdog,json=hiddenEnvoyDeprecatedWatchdog,proto3" json:"hidden_envoy_deprecated_watchdog,omitempty"` - // Optional watchdogs configuration. - // This is used for specifying different watchdogs for the different subsystems. - Watchdogs *Watchdogs `protobuf:"bytes,27,opt,name=watchdogs,proto3" json:"watchdogs,omitempty"` - // Configuration for an external tracing provider. - // - // .. attention:: - // This field has been deprecated in favor of :ref:`HttpConnectionManager.Tracing.provider - // `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedTracing *v4alpha2.Tracing `protobuf:"bytes,9,opt,name=hidden_envoy_deprecated_tracing,json=hiddenEnvoyDeprecatedTracing,proto3" json:"hidden_envoy_deprecated_tracing,omitempty"` - // Configuration for the runtime configuration provider. If not - // specified, a “null” provider will be used which will result in all defaults - // being used. - LayeredRuntime *LayeredRuntime `protobuf:"bytes,17,opt,name=layered_runtime,json=layeredRuntime,proto3" json:"layered_runtime,omitempty"` - // Configuration for the local administration HTTP server. - Admin *Admin `protobuf:"bytes,12,opt,name=admin,proto3" json:"admin,omitempty"` - // Optional overload manager configuration. - OverloadManager *v3.OverloadManager `protobuf:"bytes,15,opt,name=overload_manager,json=overloadManager,proto3" json:"overload_manager,omitempty"` - // Enable :ref:`stats for event dispatcher `, defaults to false. - // Note that this records a value for each iteration of the event loop on every thread. This - // should normally be minimal overhead, but when using - // :ref:`statsd `, it will send each observed value - // over the wire individually because the statsd protocol doesn't have any way to represent a - // histogram summary. Be aware that this can be a very large volume of data. - EnableDispatcherStats bool `protobuf:"varint,16,opt,name=enable_dispatcher_stats,json=enableDispatcherStats,proto3" json:"enable_dispatcher_stats,omitempty"` - // Optional string which will be used in lieu of x-envoy in prefixing headers. - // - // For example, if this string is present and set to X-Foo, then x-envoy-retry-on will be - // transformed into x-foo-retry-on etc. - // - // Note this applies to the headers Envoy will generate, the headers Envoy will sanitize, and the - // headers Envoy will trust for core code and core extensions only. Be VERY careful making - // changes to this string, especially in multi-layer Envoy deployments or deployments using - // extensions which are not upstream. - HeaderPrefix string `protobuf:"bytes,18,opt,name=header_prefix,json=headerPrefix,proto3" json:"header_prefix,omitempty"` - // Optional proxy version which will be used to set the value of :ref:`server.version statistic - // ` if specified. Envoy will not process this value, it will be sent as is to - // :ref:`stats sinks `. - StatsServerVersionOverride *wrappers.UInt64Value `protobuf:"bytes,19,opt,name=stats_server_version_override,json=statsServerVersionOverride,proto3" json:"stats_server_version_override,omitempty"` - // Always use TCP queries instead of UDP queries for DNS lookups. - // This may be overridden on a per-cluster basis in cds_config, - // when :ref:`dns_resolvers ` and - // :ref:`use_tcp_for_dns_lookups ` are - // specified. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - UseTcpForDnsLookups bool `protobuf:"varint,20,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` - // Specifies optional bootstrap extensions to be instantiated at startup time. - // Each item contains extension specific configuration. - BootstrapExtensions []*v4alpha.TypedExtensionConfig `protobuf:"bytes,21,rep,name=bootstrap_extensions,json=bootstrapExtensions,proto3" json:"bootstrap_extensions,omitempty"` - // Specifies optional extensions instantiated at startup time and - // invoked during crash time on the request that caused the crash. - FatalActions []*FatalAction `protobuf:"bytes,28,rep,name=fatal_actions,json=fatalActions,proto3" json:"fatal_actions,omitempty"` - // Configuration sources that will participate in - // xdstp:// URL authority resolution. The algorithm is as - // follows: - // 1. The authority field is taken from the xdstp:// URL, call - // this *resource_authority*. - // 2. *resource_authority* is compared against the authorities in any peer - // *ConfigSource*. The peer *ConfigSource* is the configuration source - // message which would have been used unconditionally for resolution - // with opaque resource names. If there is a match with an authority, the - // peer *ConfigSource* message is used. - // 3. *resource_authority* is compared sequentially with the authorities in - // each configuration source in *config_sources*. The first *ConfigSource* - // to match wins. - // 4. As a fallback, if no configuration source matches, then - // *default_config_source* is used. - // 5. If *default_config_source* is not specified, resolution fails. - // [#not-implemented-hide:] - ConfigSources []*v4alpha.ConfigSource `protobuf:"bytes,22,rep,name=config_sources,json=configSources,proto3" json:"config_sources,omitempty"` - // Default configuration source for xdstp:// URLs if all - // other resolution fails. - // [#not-implemented-hide:] - DefaultConfigSource *v4alpha.ConfigSource `protobuf:"bytes,23,opt,name=default_config_source,json=defaultConfigSource,proto3" json:"default_config_source,omitempty"` - // Optional overriding of default socket interface. The value must be the name of one of the - // socket interface factories initialized through a bootstrap extension - DefaultSocketInterface string `protobuf:"bytes,24,opt,name=default_socket_interface,json=defaultSocketInterface,proto3" json:"default_socket_interface,omitempty"` - // Global map of CertificateProvider instances. These instances are referred to by name in the - // :ref:`CommonTlsContext.CertificateProviderInstance.instance_name - // ` - // field. - // [#not-implemented-hide:] - CertificateProviderInstances map[string]*v4alpha.TypedExtensionConfig `protobuf:"bytes,25,rep,name=certificate_provider_instances,json=certificateProviderInstances,proto3" json:"certificate_provider_instances,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Bootstrap) Reset() { - *x = Bootstrap{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bootstrap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bootstrap) ProtoMessage() {} - -func (x *Bootstrap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bootstrap.ProtoReflect.Descriptor instead. -func (*Bootstrap) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{0} -} - -func (x *Bootstrap) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *Bootstrap) GetNodeContextParams() []string { - if x != nil { - return x.NodeContextParams - } - return nil -} - -func (x *Bootstrap) GetStaticResources() *Bootstrap_StaticResources { - if x != nil { - return x.StaticResources - } - return nil -} - -func (x *Bootstrap) GetDynamicResources() *Bootstrap_DynamicResources { - if x != nil { - return x.DynamicResources - } - return nil -} - -func (x *Bootstrap) GetClusterManager() *ClusterManager { - if x != nil { - return x.ClusterManager - } - return nil -} - -func (x *Bootstrap) GetHdsConfig() *v4alpha.ApiConfigSource { - if x != nil { - return x.HdsConfig - } - return nil -} - -func (x *Bootstrap) GetFlagsPath() string { - if x != nil { - return x.FlagsPath - } - return "" -} - -func (x *Bootstrap) GetStatsSinks() []*v4alpha1.StatsSink { - if x != nil { - return x.StatsSinks - } - return nil -} - -func (x *Bootstrap) GetStatsConfig() *v4alpha1.StatsConfig { - if x != nil { - return x.StatsConfig - } - return nil -} - -func (m *Bootstrap) GetStatsFlush() isBootstrap_StatsFlush { - if m != nil { - return m.StatsFlush - } - return nil -} - -func (x *Bootstrap) GetStatsFlushInterval() *duration.Duration { - if x, ok := x.GetStatsFlush().(*Bootstrap_StatsFlushInterval); ok { - return x.StatsFlushInterval - } - return nil -} - -func (x *Bootstrap) GetStatsFlushOnAdmin() bool { - if x, ok := x.GetStatsFlush().(*Bootstrap_StatsFlushOnAdmin); ok { - return x.StatsFlushOnAdmin - } - return false -} - -// Deprecated: Do not use. -func (x *Bootstrap) GetHiddenEnvoyDeprecatedWatchdog() *Watchdog { - if x != nil { - return x.HiddenEnvoyDeprecatedWatchdog - } - return nil -} - -func (x *Bootstrap) GetWatchdogs() *Watchdogs { - if x != nil { - return x.Watchdogs - } - return nil -} - -// Deprecated: Do not use. -func (x *Bootstrap) GetHiddenEnvoyDeprecatedTracing() *v4alpha2.Tracing { - if x != nil { - return x.HiddenEnvoyDeprecatedTracing - } - return nil -} - -func (x *Bootstrap) GetLayeredRuntime() *LayeredRuntime { - if x != nil { - return x.LayeredRuntime - } - return nil -} - -func (x *Bootstrap) GetAdmin() *Admin { - if x != nil { - return x.Admin - } - return nil -} - -func (x *Bootstrap) GetOverloadManager() *v3.OverloadManager { - if x != nil { - return x.OverloadManager - } - return nil -} - -func (x *Bootstrap) GetEnableDispatcherStats() bool { - if x != nil { - return x.EnableDispatcherStats - } - return false -} - -func (x *Bootstrap) GetHeaderPrefix() string { - if x != nil { - return x.HeaderPrefix - } - return "" -} - -func (x *Bootstrap) GetStatsServerVersionOverride() *wrappers.UInt64Value { - if x != nil { - return x.StatsServerVersionOverride - } - return nil -} - -func (x *Bootstrap) GetUseTcpForDnsLookups() bool { - if x != nil { - return x.UseTcpForDnsLookups - } - return false -} - -func (x *Bootstrap) GetBootstrapExtensions() []*v4alpha.TypedExtensionConfig { - if x != nil { - return x.BootstrapExtensions - } - return nil -} - -func (x *Bootstrap) GetFatalActions() []*FatalAction { - if x != nil { - return x.FatalActions - } - return nil -} - -func (x *Bootstrap) GetConfigSources() []*v4alpha.ConfigSource { - if x != nil { - return x.ConfigSources - } - return nil -} - -func (x *Bootstrap) GetDefaultConfigSource() *v4alpha.ConfigSource { - if x != nil { - return x.DefaultConfigSource - } - return nil -} - -func (x *Bootstrap) GetDefaultSocketInterface() string { - if x != nil { - return x.DefaultSocketInterface - } - return "" -} - -func (x *Bootstrap) GetCertificateProviderInstances() map[string]*v4alpha.TypedExtensionConfig { - if x != nil { - return x.CertificateProviderInstances - } - return nil -} - -type isBootstrap_StatsFlush interface { - isBootstrap_StatsFlush() -} - -type Bootstrap_StatsFlushInterval struct { - // Optional duration between flushes to configured stats sinks. For - // performance reasons Envoy latches counters and only flushes counters and - // gauges at a periodic interval. If not specified the default is 5000ms (5 - // seconds). Only one of `stats_flush_interval` or `stats_flush_on_admin` - // can be set. - // Duration must be at least 1ms and at most 5 min. - StatsFlushInterval *duration.Duration `protobuf:"bytes,7,opt,name=stats_flush_interval,json=statsFlushInterval,proto3,oneof"` -} - -type Bootstrap_StatsFlushOnAdmin struct { - // Flush stats to sinks only when queried for on the admin interface. If set, - // a flush timer is not created. Only one of `stats_flush_on_admin` or - // `stats_flush_interval` can be set. - StatsFlushOnAdmin bool `protobuf:"varint,29,opt,name=stats_flush_on_admin,json=statsFlushOnAdmin,proto3,oneof"` -} - -func (*Bootstrap_StatsFlushInterval) isBootstrap_StatsFlush() {} - -func (*Bootstrap_StatsFlushOnAdmin) isBootstrap_StatsFlush() {} - -// Administration interface :ref:`operations documentation -// `. -type Admin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The path to write the access log for the administration server. If no - // access log is desired specify ‘/dev/null’. This is only required if - // :ref:`address ` is set. - AccessLogPath string `protobuf:"bytes,1,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"` - // The cpu profiler output path for the administration server. If no profile - // path is specified, the default is ‘/var/log/envoy/envoy.prof’. - ProfilePath string `protobuf:"bytes,2,opt,name=profile_path,json=profilePath,proto3" json:"profile_path,omitempty"` - // The TCP address that the administration server will listen on. - // If not specified, Envoy will not start an administration server. - Address *v4alpha.Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - SocketOptions []*v4alpha.SocketOption `protobuf:"bytes,4,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` -} - -func (x *Admin) Reset() { - *x = Admin{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Admin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Admin) ProtoMessage() {} - -func (x *Admin) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Admin.ProtoReflect.Descriptor instead. -func (*Admin) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{1} -} - -func (x *Admin) GetAccessLogPath() string { - if x != nil { - return x.AccessLogPath - } - return "" -} - -func (x *Admin) GetProfilePath() string { - if x != nil { - return x.ProfilePath - } - return "" -} - -func (x *Admin) GetAddress() *v4alpha.Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *Admin) GetSocketOptions() []*v4alpha.SocketOption { - if x != nil { - return x.SocketOptions - } - return nil -} - -// Cluster manager :ref:`architecture overview `. -type ClusterManager struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the local cluster (i.e., the cluster that owns the Envoy running - // this configuration). In order to enable :ref:`zone aware routing - // ` this option must be set. - // If *local_cluster_name* is defined then :ref:`clusters - // ` must be defined in the :ref:`Bootstrap - // static cluster resources - // `. This is unrelated to - // the :option:`--service-cluster` option which does not `affect zone aware - // routing `_. - LocalClusterName string `protobuf:"bytes,1,opt,name=local_cluster_name,json=localClusterName,proto3" json:"local_cluster_name,omitempty"` - // Optional global configuration for outlier detection. - OutlierDetection *ClusterManager_OutlierDetection `protobuf:"bytes,2,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` - // Optional configuration used to bind newly established upstream connections. - // This may be overridden on a per-cluster basis by upstream_bind_config in the cds_config. - UpstreamBindConfig *v4alpha.BindConfig `protobuf:"bytes,3,opt,name=upstream_bind_config,json=upstreamBindConfig,proto3" json:"upstream_bind_config,omitempty"` - // A management server endpoint to stream load stats to via - // *StreamLoadStats*. This must have :ref:`api_type - // ` :ref:`GRPC - // `. - LoadStatsConfig *v4alpha.ApiConfigSource `protobuf:"bytes,4,opt,name=load_stats_config,json=loadStatsConfig,proto3" json:"load_stats_config,omitempty"` -} - -func (x *ClusterManager) Reset() { - *x = ClusterManager{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterManager) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterManager) ProtoMessage() {} - -func (x *ClusterManager) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterManager.ProtoReflect.Descriptor instead. -func (*ClusterManager) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{2} -} - -func (x *ClusterManager) GetLocalClusterName() string { - if x != nil { - return x.LocalClusterName - } - return "" -} - -func (x *ClusterManager) GetOutlierDetection() *ClusterManager_OutlierDetection { - if x != nil { - return x.OutlierDetection - } - return nil -} - -func (x *ClusterManager) GetUpstreamBindConfig() *v4alpha.BindConfig { - if x != nil { - return x.UpstreamBindConfig - } - return nil -} - -func (x *ClusterManager) GetLoadStatsConfig() *v4alpha.ApiConfigSource { - if x != nil { - return x.LoadStatsConfig - } - return nil -} - -// Allows you to specify different watchdog configs for different subsystems. -// This allows finer tuned policies for the watchdog. If a subsystem is omitted -// the default values for that system will be used. -type Watchdogs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Watchdog for the main thread. - MainThreadWatchdog *Watchdog `protobuf:"bytes,1,opt,name=main_thread_watchdog,json=mainThreadWatchdog,proto3" json:"main_thread_watchdog,omitempty"` - // Watchdog for the worker threads. - WorkerWatchdog *Watchdog `protobuf:"bytes,2,opt,name=worker_watchdog,json=workerWatchdog,proto3" json:"worker_watchdog,omitempty"` -} - -func (x *Watchdogs) Reset() { - *x = Watchdogs{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Watchdogs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Watchdogs) ProtoMessage() {} - -func (x *Watchdogs) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Watchdogs.ProtoReflect.Descriptor instead. -func (*Watchdogs) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{3} -} - -func (x *Watchdogs) GetMainThreadWatchdog() *Watchdog { - if x != nil { - return x.MainThreadWatchdog - } - return nil -} - -func (x *Watchdogs) GetWorkerWatchdog() *Watchdog { - if x != nil { - return x.WorkerWatchdog - } - return nil -} - -// Envoy process watchdog configuration. When configured, this monitors for -// nonresponsive threads and kills the process after the configured thresholds. -// See the :ref:`watchdog documentation ` for more information. -// [#next-free-field: 8] -type Watchdog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Register actions that will fire on given WatchDog events. - // See *WatchDogAction* for priority of events. - Actions []*Watchdog_WatchdogAction `protobuf:"bytes,7,rep,name=actions,proto3" json:"actions,omitempty"` - // The duration after which Envoy counts a nonresponsive thread in the - // *watchdog_miss* statistic. If not specified the default is 200ms. - MissTimeout *duration.Duration `protobuf:"bytes,1,opt,name=miss_timeout,json=missTimeout,proto3" json:"miss_timeout,omitempty"` - // The duration after which Envoy counts a nonresponsive thread in the - // *watchdog_mega_miss* statistic. If not specified the default is - // 1000ms. - MegamissTimeout *duration.Duration `protobuf:"bytes,2,opt,name=megamiss_timeout,json=megamissTimeout,proto3" json:"megamiss_timeout,omitempty"` - // If a watched thread has been nonresponsive for this duration, assume a - // programming error and kill the entire Envoy process. Set to 0 to disable - // kill behavior. If not specified the default is 0 (disabled). - KillTimeout *duration.Duration `protobuf:"bytes,3,opt,name=kill_timeout,json=killTimeout,proto3" json:"kill_timeout,omitempty"` - // Defines the maximum jitter used to adjust the *kill_timeout* if *kill_timeout* is - // enabled. Enabling this feature would help to reduce risk of synchronized - // watchdog kill events across proxies due to external triggers. Set to 0 to - // disable. If not specified the default is 0 (disabled). - MaxKillTimeoutJitter *duration.Duration `protobuf:"bytes,6,opt,name=max_kill_timeout_jitter,json=maxKillTimeoutJitter,proto3" json:"max_kill_timeout_jitter,omitempty"` - // If max(2, ceil(registered_threads * Fraction(*multikill_threshold*))) - // threads have been nonresponsive for at least this duration kill the entire - // Envoy process. Set to 0 to disable this behavior. If not specified the - // default is 0 (disabled). - MultikillTimeout *duration.Duration `protobuf:"bytes,4,opt,name=multikill_timeout,json=multikillTimeout,proto3" json:"multikill_timeout,omitempty"` - // Sets the threshold for *multikill_timeout* in terms of the percentage of - // nonresponsive threads required for the *multikill_timeout*. - // If not specified the default is 0. - MultikillThreshold *v31.Percent `protobuf:"bytes,5,opt,name=multikill_threshold,json=multikillThreshold,proto3" json:"multikill_threshold,omitempty"` -} - -func (x *Watchdog) Reset() { - *x = Watchdog{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Watchdog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Watchdog) ProtoMessage() {} - -func (x *Watchdog) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Watchdog.ProtoReflect.Descriptor instead. -func (*Watchdog) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{4} -} - -func (x *Watchdog) GetActions() []*Watchdog_WatchdogAction { - if x != nil { - return x.Actions - } - return nil -} - -func (x *Watchdog) GetMissTimeout() *duration.Duration { - if x != nil { - return x.MissTimeout - } - return nil -} - -func (x *Watchdog) GetMegamissTimeout() *duration.Duration { - if x != nil { - return x.MegamissTimeout - } - return nil -} - -func (x *Watchdog) GetKillTimeout() *duration.Duration { - if x != nil { - return x.KillTimeout - } - return nil -} - -func (x *Watchdog) GetMaxKillTimeoutJitter() *duration.Duration { - if x != nil { - return x.MaxKillTimeoutJitter - } - return nil -} - -func (x *Watchdog) GetMultikillTimeout() *duration.Duration { - if x != nil { - return x.MultikillTimeout - } - return nil -} - -func (x *Watchdog) GetMultikillThreshold() *v31.Percent { - if x != nil { - return x.MultikillThreshold - } - return nil -} - -// Fatal actions to run while crashing. Actions can be safe (meaning they are -// async-signal safe) or unsafe. We run all safe actions before we run unsafe actions. -// If using an unsafe action that could get stuck or deadlock, it important to -// have an out of band system to terminate the process. -// -// The interface for the extension is ``Envoy::Server::Configuration::FatalAction``. -// *FatalAction* extensions live in the ``envoy.extensions.fatal_actions`` API -// namespace. -type FatalAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Extension specific configuration for the action. It's expected to conform - // to the ``Envoy::Server::Configuration::FatalAction`` interface. - Config *v4alpha.TypedExtensionConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *FatalAction) Reset() { - *x = FatalAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FatalAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FatalAction) ProtoMessage() {} - -func (x *FatalAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FatalAction.ProtoReflect.Descriptor instead. -func (*FatalAction) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{5} -} - -func (x *FatalAction) GetConfig() *v4alpha.TypedExtensionConfig { - if x != nil { - return x.Config - } - return nil -} - -// Runtime :ref:`configuration overview ` (deprecated). -type Runtime struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. Envoy - // will watch the location for changes and reload the file system tree when - // they happen. If this parameter is not set, there will be no disk based - // runtime. - SymlinkRoot string `protobuf:"bytes,1,opt,name=symlink_root,json=symlinkRoot,proto3" json:"symlink_root,omitempty"` - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - Subdirectory string `protobuf:"bytes,2,opt,name=subdirectory,proto3" json:"subdirectory,omitempty"` - // Specifies an optional subdirectory to load within the root directory. If - // specified and the directory exists, configuration values within this - // directory will override those found in the primary subdirectory. This is - // useful when Envoy is deployed across many different types of servers. - // Sometimes it is useful to have a per service cluster directory for runtime - // configuration. See below for exactly how the override directory is used. - OverrideSubdirectory string `protobuf:"bytes,3,opt,name=override_subdirectory,json=overrideSubdirectory,proto3" json:"override_subdirectory,omitempty"` - // Static base runtime. This will be :ref:`overridden - // ` by other runtime layers, e.g. - // disk or admin. This follows the :ref:`runtime protobuf JSON representation - // encoding `. - Base *_struct.Struct `protobuf:"bytes,4,opt,name=base,proto3" json:"base,omitempty"` -} - -func (x *Runtime) Reset() { - *x = Runtime{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Runtime) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Runtime) ProtoMessage() {} - -func (x *Runtime) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Runtime.ProtoReflect.Descriptor instead. -func (*Runtime) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{6} -} - -func (x *Runtime) GetSymlinkRoot() string { - if x != nil { - return x.SymlinkRoot - } - return "" -} - -func (x *Runtime) GetSubdirectory() string { - if x != nil { - return x.Subdirectory - } - return "" -} - -func (x *Runtime) GetOverrideSubdirectory() string { - if x != nil { - return x.OverrideSubdirectory - } - return "" -} - -func (x *Runtime) GetBase() *_struct.Struct { - if x != nil { - return x.Base - } - return nil -} - -// [#next-free-field: 6] -type RuntimeLayer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Descriptive name for the runtime layer. This is only used for the runtime - // :http:get:`/runtime` output. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to LayerSpecifier: - // *RuntimeLayer_StaticLayer - // *RuntimeLayer_DiskLayer_ - // *RuntimeLayer_AdminLayer_ - // *RuntimeLayer_RtdsLayer_ - LayerSpecifier isRuntimeLayer_LayerSpecifier `protobuf_oneof:"layer_specifier"` -} - -func (x *RuntimeLayer) Reset() { - *x = RuntimeLayer{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeLayer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeLayer) ProtoMessage() {} - -func (x *RuntimeLayer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeLayer.ProtoReflect.Descriptor instead. -func (*RuntimeLayer) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{7} -} - -func (x *RuntimeLayer) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *RuntimeLayer) GetLayerSpecifier() isRuntimeLayer_LayerSpecifier { - if m != nil { - return m.LayerSpecifier - } - return nil -} - -func (x *RuntimeLayer) GetStaticLayer() *_struct.Struct { - if x, ok := x.GetLayerSpecifier().(*RuntimeLayer_StaticLayer); ok { - return x.StaticLayer - } - return nil -} - -func (x *RuntimeLayer) GetDiskLayer() *RuntimeLayer_DiskLayer { - if x, ok := x.GetLayerSpecifier().(*RuntimeLayer_DiskLayer_); ok { - return x.DiskLayer - } - return nil -} - -func (x *RuntimeLayer) GetAdminLayer() *RuntimeLayer_AdminLayer { - if x, ok := x.GetLayerSpecifier().(*RuntimeLayer_AdminLayer_); ok { - return x.AdminLayer - } - return nil -} - -func (x *RuntimeLayer) GetRtdsLayer() *RuntimeLayer_RtdsLayer { - if x, ok := x.GetLayerSpecifier().(*RuntimeLayer_RtdsLayer_); ok { - return x.RtdsLayer - } - return nil -} - -type isRuntimeLayer_LayerSpecifier interface { - isRuntimeLayer_LayerSpecifier() -} - -type RuntimeLayer_StaticLayer struct { - // :ref:`Static runtime ` layer. - // This follows the :ref:`runtime protobuf JSON representation encoding - // `. Unlike static xDS resources, this static - // layer is overridable by later layers in the runtime virtual filesystem. - StaticLayer *_struct.Struct `protobuf:"bytes,2,opt,name=static_layer,json=staticLayer,proto3,oneof"` -} - -type RuntimeLayer_DiskLayer_ struct { - DiskLayer *RuntimeLayer_DiskLayer `protobuf:"bytes,3,opt,name=disk_layer,json=diskLayer,proto3,oneof"` -} - -type RuntimeLayer_AdminLayer_ struct { - AdminLayer *RuntimeLayer_AdminLayer `protobuf:"bytes,4,opt,name=admin_layer,json=adminLayer,proto3,oneof"` -} - -type RuntimeLayer_RtdsLayer_ struct { - RtdsLayer *RuntimeLayer_RtdsLayer `protobuf:"bytes,5,opt,name=rtds_layer,json=rtdsLayer,proto3,oneof"` -} - -func (*RuntimeLayer_StaticLayer) isRuntimeLayer_LayerSpecifier() {} - -func (*RuntimeLayer_DiskLayer_) isRuntimeLayer_LayerSpecifier() {} - -func (*RuntimeLayer_AdminLayer_) isRuntimeLayer_LayerSpecifier() {} - -func (*RuntimeLayer_RtdsLayer_) isRuntimeLayer_LayerSpecifier() {} - -// Runtime :ref:`configuration overview `. -type LayeredRuntime struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The :ref:`layers ` of the runtime. This is ordered - // such that later layers in the list overlay earlier entries. - Layers []*RuntimeLayer `protobuf:"bytes,1,rep,name=layers,proto3" json:"layers,omitempty"` -} - -func (x *LayeredRuntime) Reset() { - *x = LayeredRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LayeredRuntime) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LayeredRuntime) ProtoMessage() {} - -func (x *LayeredRuntime) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LayeredRuntime.ProtoReflect.Descriptor instead. -func (*LayeredRuntime) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{8} -} - -func (x *LayeredRuntime) GetLayers() []*RuntimeLayer { - if x != nil { - return x.Layers - } - return nil -} - -type Bootstrap_StaticResources struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Static :ref:`Listeners `. These listeners are - // available regardless of LDS configuration. - Listeners []*v4alpha3.Listener `protobuf:"bytes,1,rep,name=listeners,proto3" json:"listeners,omitempty"` - // If a network based configuration source is specified for :ref:`cds_config - // `, it's necessary - // to have some initial cluster definitions available to allow Envoy to know - // how to speak to the management server. These cluster definitions may not - // use :ref:`EDS ` (i.e. they should be static - // IP or DNS-based). - Clusters []*v4alpha4.Cluster `protobuf:"bytes,2,rep,name=clusters,proto3" json:"clusters,omitempty"` - // These static secrets can be used by :ref:`SdsSecretConfig - // ` - Secrets []*v4alpha5.Secret `protobuf:"bytes,3,rep,name=secrets,proto3" json:"secrets,omitempty"` -} - -func (x *Bootstrap_StaticResources) Reset() { - *x = Bootstrap_StaticResources{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bootstrap_StaticResources) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bootstrap_StaticResources) ProtoMessage() {} - -func (x *Bootstrap_StaticResources) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bootstrap_StaticResources.ProtoReflect.Descriptor instead. -func (*Bootstrap_StaticResources) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Bootstrap_StaticResources) GetListeners() []*v4alpha3.Listener { - if x != nil { - return x.Listeners - } - return nil -} - -func (x *Bootstrap_StaticResources) GetClusters() []*v4alpha4.Cluster { - if x != nil { - return x.Clusters - } - return nil -} - -func (x *Bootstrap_StaticResources) GetSecrets() []*v4alpha5.Secret { - if x != nil { - return x.Secrets - } - return nil -} - -// [#next-free-field: 7] -type Bootstrap_DynamicResources struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // All :ref:`Listeners ` are provided by a single - // :ref:`LDS ` configuration source. - LdsConfig *v4alpha.ConfigSource `protobuf:"bytes,1,opt,name=lds_config,json=ldsConfig,proto3" json:"lds_config,omitempty"` - // xdstp:// resource locator for listener collection. - // [#not-implemented-hide:] - LdsResourcesLocator string `protobuf:"bytes,5,opt,name=lds_resources_locator,json=ldsResourcesLocator,proto3" json:"lds_resources_locator,omitempty"` - // All post-bootstrap :ref:`Cluster ` definitions are - // provided by a single :ref:`CDS ` - // configuration source. - CdsConfig *v4alpha.ConfigSource `protobuf:"bytes,2,opt,name=cds_config,json=cdsConfig,proto3" json:"cds_config,omitempty"` - // xdstp:// resource locator for cluster collection. - // [#not-implemented-hide:] - CdsResourcesLocator string `protobuf:"bytes,6,opt,name=cds_resources_locator,json=cdsResourcesLocator,proto3" json:"cds_resources_locator,omitempty"` - // A single :ref:`ADS ` source may be optionally - // specified. This must have :ref:`api_type - // ` :ref:`GRPC - // `. Only - // :ref:`ConfigSources ` that have - // the :ref:`ads ` field set will be - // streamed on the ADS channel. - AdsConfig *v4alpha.ApiConfigSource `protobuf:"bytes,3,opt,name=ads_config,json=adsConfig,proto3" json:"ads_config,omitempty"` -} - -func (x *Bootstrap_DynamicResources) Reset() { - *x = Bootstrap_DynamicResources{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bootstrap_DynamicResources) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bootstrap_DynamicResources) ProtoMessage() {} - -func (x *Bootstrap_DynamicResources) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bootstrap_DynamicResources.ProtoReflect.Descriptor instead. -func (*Bootstrap_DynamicResources) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Bootstrap_DynamicResources) GetLdsConfig() *v4alpha.ConfigSource { - if x != nil { - return x.LdsConfig - } - return nil -} - -func (x *Bootstrap_DynamicResources) GetLdsResourcesLocator() string { - if x != nil { - return x.LdsResourcesLocator - } - return "" -} - -func (x *Bootstrap_DynamicResources) GetCdsConfig() *v4alpha.ConfigSource { - if x != nil { - return x.CdsConfig - } - return nil -} - -func (x *Bootstrap_DynamicResources) GetCdsResourcesLocator() string { - if x != nil { - return x.CdsResourcesLocator - } - return "" -} - -func (x *Bootstrap_DynamicResources) GetAdsConfig() *v4alpha.ApiConfigSource { - if x != nil { - return x.AdsConfig - } - return nil -} - -type ClusterManager_OutlierDetection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the path to the outlier event log. - EventLogPath string `protobuf:"bytes,1,opt,name=event_log_path,json=eventLogPath,proto3" json:"event_log_path,omitempty"` - // [#not-implemented-hide:] - // The gRPC service for the outlier detection event service. - // If empty, outlier detection events won't be sent to a remote endpoint. - EventService *v4alpha.EventServiceConfig `protobuf:"bytes,2,opt,name=event_service,json=eventService,proto3" json:"event_service,omitempty"` -} - -func (x *ClusterManager_OutlierDetection) Reset() { - *x = ClusterManager_OutlierDetection{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterManager_OutlierDetection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterManager_OutlierDetection) ProtoMessage() {} - -func (x *ClusterManager_OutlierDetection) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterManager_OutlierDetection.ProtoReflect.Descriptor instead. -func (*ClusterManager_OutlierDetection) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *ClusterManager_OutlierDetection) GetEventLogPath() string { - if x != nil { - return x.EventLogPath - } - return "" -} - -func (x *ClusterManager_OutlierDetection) GetEventService() *v4alpha.EventServiceConfig { - if x != nil { - return x.EventService - } - return nil -} - -type Watchdog_WatchdogAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Extension specific configuration for the action. - Config *v4alpha.TypedExtensionConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - Event Watchdog_WatchdogAction_WatchdogEvent `protobuf:"varint,2,opt,name=event,proto3,enum=envoy.config.bootstrap.v4alpha.Watchdog_WatchdogAction_WatchdogEvent" json:"event,omitempty"` -} - -func (x *Watchdog_WatchdogAction) Reset() { - *x = Watchdog_WatchdogAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Watchdog_WatchdogAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Watchdog_WatchdogAction) ProtoMessage() {} - -func (x *Watchdog_WatchdogAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Watchdog_WatchdogAction.ProtoReflect.Descriptor instead. -func (*Watchdog_WatchdogAction) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *Watchdog_WatchdogAction) GetConfig() *v4alpha.TypedExtensionConfig { - if x != nil { - return x.Config - } - return nil -} - -func (x *Watchdog_WatchdogAction) GetEvent() Watchdog_WatchdogAction_WatchdogEvent { - if x != nil { - return x.Event - } - return Watchdog_WatchdogAction_UNKNOWN -} - -// :ref:`Disk runtime ` layer. -type RuntimeLayer_DiskLayer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. - // Envoy will watch the location for changes and reload the file system tree - // when they happen. See documentation on runtime :ref:`atomicity - // ` for further details on how reloads are - // treated. - SymlinkRoot string `protobuf:"bytes,1,opt,name=symlink_root,json=symlinkRoot,proto3" json:"symlink_root,omitempty"` - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - Subdirectory string `protobuf:"bytes,3,opt,name=subdirectory,proto3" json:"subdirectory,omitempty"` - // :ref:`Append ` the - // service cluster to the path under symlink root. - AppendServiceCluster bool `protobuf:"varint,2,opt,name=append_service_cluster,json=appendServiceCluster,proto3" json:"append_service_cluster,omitempty"` -} - -func (x *RuntimeLayer_DiskLayer) Reset() { - *x = RuntimeLayer_DiskLayer{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeLayer_DiskLayer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeLayer_DiskLayer) ProtoMessage() {} - -func (x *RuntimeLayer_DiskLayer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeLayer_DiskLayer.ProtoReflect.Descriptor instead. -func (*RuntimeLayer_DiskLayer) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *RuntimeLayer_DiskLayer) GetSymlinkRoot() string { - if x != nil { - return x.SymlinkRoot - } - return "" -} - -func (x *RuntimeLayer_DiskLayer) GetSubdirectory() string { - if x != nil { - return x.Subdirectory - } - return "" -} - -func (x *RuntimeLayer_DiskLayer) GetAppendServiceCluster() bool { - if x != nil { - return x.AppendServiceCluster - } - return false -} - -// :ref:`Admin console runtime ` layer. -type RuntimeLayer_AdminLayer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RuntimeLayer_AdminLayer) Reset() { - *x = RuntimeLayer_AdminLayer{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeLayer_AdminLayer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeLayer_AdminLayer) ProtoMessage() {} - -func (x *RuntimeLayer_AdminLayer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeLayer_AdminLayer.ProtoReflect.Descriptor instead. -func (*RuntimeLayer_AdminLayer) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{7, 1} -} - -// :ref:`Runtime Discovery Service (RTDS) ` layer. -type RuntimeLayer_RtdsLayer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Resource to subscribe to at *rtds_config* for the RTDS layer. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // RTDS configuration source. - RtdsConfig *v4alpha.ConfigSource `protobuf:"bytes,2,opt,name=rtds_config,json=rtdsConfig,proto3" json:"rtds_config,omitempty"` -} - -func (x *RuntimeLayer_RtdsLayer) Reset() { - *x = RuntimeLayer_RtdsLayer{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeLayer_RtdsLayer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeLayer_RtdsLayer) ProtoMessage() {} - -func (x *RuntimeLayer_RtdsLayer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeLayer_RtdsLayer.ProtoReflect.Descriptor instead. -func (*RuntimeLayer_RtdsLayer) Descriptor() ([]byte, []int) { - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP(), []int{7, 2} -} - -func (x *RuntimeLayer_RtdsLayer) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RuntimeLayer_RtdsLayer) GetRtdsConfig() *v4alpha.ConfigSource { - if x != nil { - return x.RtdsConfig - } - return nil -} - -var File_envoy_config_bootstrap_v4alpha_bootstrap_proto protoreflect.FileDescriptor - -var file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x76, 0x65, - 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, - 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xa3, 0x18, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, - 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x1a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x11, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x11, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x52, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x0f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x0e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x49, 0x0a, - 0x0a, 0x68, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, - 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x68, - 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x53, 0x69, 0x6e, 0x6b, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x53, 0x69, 0x6e, 0x6b, - 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x60, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, - 0x1a, 0x03, 0x08, 0xac, 0x02, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x48, 0x00, 0x52, 0x12, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x3a, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, - 0x5f, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x11, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x75, 0x0a, - 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, - 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, - 0x67, 0x42, 0x02, 0x18, 0x01, 0x52, 0x1d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x64, 0x6f, 0x67, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, - 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, - 0x67, 0x73, 0x52, 0x09, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x73, 0x12, 0x6e, 0x0a, - 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x1c, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x57, 0x0a, - 0x0f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x12, 0x64, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, - 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, - 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x42, 0x0e, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, - 0x01, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, - 0x61, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x5f, 0x0a, 0x1d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, - 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, - 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x62, 0x0a, - 0x14, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x62, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x50, 0x0a, 0x0d, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x13, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x18, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x16, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x1e, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x19, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x1c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0xa9, - 0x02, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x09, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x07, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x3a, 0x3a, - 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, - 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x98, 0x03, 0x0a, 0x10, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x46, 0x0a, 0x0a, 0x6c, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x6c, 0x64, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x64, 0x73, 0x5f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x63, - 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x63, 0x64, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x63, 0x64, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x64, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x61, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4a, - 0x04, 0x08, 0x04, 0x10, 0x05, 0x1a, 0x80, 0x01, 0x0a, 0x21, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, - 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6c, - 0x75, 0x73, 0x68, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x52, - 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x88, 0x02, 0x0a, 0x05, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x3c, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x26, 0x9a, 0xc5, 0x88, - 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x22, 0xdf, 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6c, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, - 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x10, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, - 0x69, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x69, 0x6e, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, 0x11, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x0f, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x1a, 0xce, 0x01, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, - 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x52, - 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x22, 0xe6, 0x01, 0x0a, 0x09, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x73, 0x12, 0x5a, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x61, 0x64, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x52, 0x12, 0x6d, 0x61, 0x69, - 0x6e, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x12, - 0x51, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x73, 0x22, 0x83, - 0x07, 0x0a, 0x08, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x12, 0x51, 0x0a, 0x07, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, - 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, 0x61, - 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, - 0x0a, 0x0c, 0x6d, 0x69, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0b, 0x6d, 0x69, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x10, - 0x6d, 0x65, 0x67, 0x61, 0x6d, 0x69, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0f, 0x6d, 0x65, 0x67, 0x61, 0x6d, 0x69, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x12, 0x5a, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0xaa, 0x01, 0x02, 0x32, 0x00, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x4b, 0x69, 0x6c, 0x6c, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x11, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x47, 0x0a, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6b, 0x69, 0x6c, - 0x6c, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, - 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0xc9, 0x02, - 0x0a, 0x0e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x47, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x05, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x22, 0x4d, 0x0a, 0x0d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x55, 0x4c, 0x54, - 0x49, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x45, 0x47, 0x41, 0x4d, - 0x49, 0x53, 0x53, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x49, 0x53, 0x53, 0x10, 0x04, 0x3a, - 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, - 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, - 0x64, 0x6f, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x64, 0x6f, 0x67, 0x22, 0x84, 0x01, 0x0a, 0x0b, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2c, 0x9a, - 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, - 0x46, 0x61, 0x74, 0x61, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xdc, 0x01, 0x0a, 0x07, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x6c, 0x69, - 0x6e, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, - 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x33, - 0x0a, 0x15, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, - 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xef, 0x06, 0x0a, 0x0c, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, - 0x5a, 0x0a, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x48, 0x00, 0x52, - 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x0a, 0x72, - 0x74, 0x64, 0x73, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x52, 0x74, - 0x64, 0x73, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x72, 0x74, 0x64, 0x73, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x1a, 0xc1, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, - 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x61, 0x70, 0x70, - 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x61, 0x70, 0x70, 0x65, 0x6e, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, - 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x44, - 0x69, 0x73, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0x46, 0x0a, 0x0a, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, - 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x61, 0x79, 0x65, 0x72, - 0x1a, 0xa2, 0x01, 0x0a, 0x09, 0x52, 0x74, 0x64, 0x73, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x72, 0x74, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x0a, 0x72, 0x74, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, 0x9a, 0xc5, - 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x52, 0x74, 0x64, 0x73, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x42, 0x16, 0x0a, 0x0f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x87, 0x01, 0x0a, - 0x0e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, - 0x44, 0x0a, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x06, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x73, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x48, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescOnce sync.Once - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescData = file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDesc -) - -func file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescGZIP() []byte { - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescOnce.Do(func() { - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescData) - }) - return file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDescData -} - -var file_envoy_config_bootstrap_v4alpha_bootstrap_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_envoy_config_bootstrap_v4alpha_bootstrap_proto_goTypes = []interface{}{ - (Watchdog_WatchdogAction_WatchdogEvent)(0), // 0: envoy.config.bootstrap.v4alpha.Watchdog.WatchdogAction.WatchdogEvent - (*Bootstrap)(nil), // 1: envoy.config.bootstrap.v4alpha.Bootstrap - (*Admin)(nil), // 2: envoy.config.bootstrap.v4alpha.Admin - (*ClusterManager)(nil), // 3: envoy.config.bootstrap.v4alpha.ClusterManager - (*Watchdogs)(nil), // 4: envoy.config.bootstrap.v4alpha.Watchdogs - (*Watchdog)(nil), // 5: envoy.config.bootstrap.v4alpha.Watchdog - (*FatalAction)(nil), // 6: envoy.config.bootstrap.v4alpha.FatalAction - (*Runtime)(nil), // 7: envoy.config.bootstrap.v4alpha.Runtime - (*RuntimeLayer)(nil), // 8: envoy.config.bootstrap.v4alpha.RuntimeLayer - (*LayeredRuntime)(nil), // 9: envoy.config.bootstrap.v4alpha.LayeredRuntime - (*Bootstrap_StaticResources)(nil), // 10: envoy.config.bootstrap.v4alpha.Bootstrap.StaticResources - (*Bootstrap_DynamicResources)(nil), // 11: envoy.config.bootstrap.v4alpha.Bootstrap.DynamicResources - nil, // 12: envoy.config.bootstrap.v4alpha.Bootstrap.CertificateProviderInstancesEntry - (*ClusterManager_OutlierDetection)(nil), // 13: envoy.config.bootstrap.v4alpha.ClusterManager.OutlierDetection - (*Watchdog_WatchdogAction)(nil), // 14: envoy.config.bootstrap.v4alpha.Watchdog.WatchdogAction - (*RuntimeLayer_DiskLayer)(nil), // 15: envoy.config.bootstrap.v4alpha.RuntimeLayer.DiskLayer - (*RuntimeLayer_AdminLayer)(nil), // 16: envoy.config.bootstrap.v4alpha.RuntimeLayer.AdminLayer - (*RuntimeLayer_RtdsLayer)(nil), // 17: envoy.config.bootstrap.v4alpha.RuntimeLayer.RtdsLayer - (*v4alpha.Node)(nil), // 18: envoy.config.core.v4alpha.Node - (*v4alpha.ApiConfigSource)(nil), // 19: envoy.config.core.v4alpha.ApiConfigSource - (*v4alpha1.StatsSink)(nil), // 20: envoy.config.metrics.v4alpha.StatsSink - (*v4alpha1.StatsConfig)(nil), // 21: envoy.config.metrics.v4alpha.StatsConfig - (*duration.Duration)(nil), // 22: google.protobuf.Duration - (*v4alpha2.Tracing)(nil), // 23: envoy.config.trace.v4alpha.Tracing - (*v3.OverloadManager)(nil), // 24: envoy.config.overload.v3.OverloadManager - (*wrappers.UInt64Value)(nil), // 25: google.protobuf.UInt64Value - (*v4alpha.TypedExtensionConfig)(nil), // 26: envoy.config.core.v4alpha.TypedExtensionConfig - (*v4alpha.ConfigSource)(nil), // 27: envoy.config.core.v4alpha.ConfigSource - (*v4alpha.Address)(nil), // 28: envoy.config.core.v4alpha.Address - (*v4alpha.SocketOption)(nil), // 29: envoy.config.core.v4alpha.SocketOption - (*v4alpha.BindConfig)(nil), // 30: envoy.config.core.v4alpha.BindConfig - (*v31.Percent)(nil), // 31: envoy.type.v3.Percent - (*_struct.Struct)(nil), // 32: google.protobuf.Struct - (*v4alpha3.Listener)(nil), // 33: envoy.config.listener.v4alpha.Listener - (*v4alpha4.Cluster)(nil), // 34: envoy.config.cluster.v4alpha.Cluster - (*v4alpha5.Secret)(nil), // 35: envoy.extensions.transport_sockets.tls.v4alpha.Secret - (*v4alpha.EventServiceConfig)(nil), // 36: envoy.config.core.v4alpha.EventServiceConfig -} -var file_envoy_config_bootstrap_v4alpha_bootstrap_proto_depIdxs = []int32{ - 18, // 0: envoy.config.bootstrap.v4alpha.Bootstrap.node:type_name -> envoy.config.core.v4alpha.Node - 10, // 1: envoy.config.bootstrap.v4alpha.Bootstrap.static_resources:type_name -> envoy.config.bootstrap.v4alpha.Bootstrap.StaticResources - 11, // 2: envoy.config.bootstrap.v4alpha.Bootstrap.dynamic_resources:type_name -> envoy.config.bootstrap.v4alpha.Bootstrap.DynamicResources - 3, // 3: envoy.config.bootstrap.v4alpha.Bootstrap.cluster_manager:type_name -> envoy.config.bootstrap.v4alpha.ClusterManager - 19, // 4: envoy.config.bootstrap.v4alpha.Bootstrap.hds_config:type_name -> envoy.config.core.v4alpha.ApiConfigSource - 20, // 5: envoy.config.bootstrap.v4alpha.Bootstrap.stats_sinks:type_name -> envoy.config.metrics.v4alpha.StatsSink - 21, // 6: envoy.config.bootstrap.v4alpha.Bootstrap.stats_config:type_name -> envoy.config.metrics.v4alpha.StatsConfig - 22, // 7: envoy.config.bootstrap.v4alpha.Bootstrap.stats_flush_interval:type_name -> google.protobuf.Duration - 5, // 8: envoy.config.bootstrap.v4alpha.Bootstrap.hidden_envoy_deprecated_watchdog:type_name -> envoy.config.bootstrap.v4alpha.Watchdog - 4, // 9: envoy.config.bootstrap.v4alpha.Bootstrap.watchdogs:type_name -> envoy.config.bootstrap.v4alpha.Watchdogs - 23, // 10: envoy.config.bootstrap.v4alpha.Bootstrap.hidden_envoy_deprecated_tracing:type_name -> envoy.config.trace.v4alpha.Tracing - 9, // 11: envoy.config.bootstrap.v4alpha.Bootstrap.layered_runtime:type_name -> envoy.config.bootstrap.v4alpha.LayeredRuntime - 2, // 12: envoy.config.bootstrap.v4alpha.Bootstrap.admin:type_name -> envoy.config.bootstrap.v4alpha.Admin - 24, // 13: envoy.config.bootstrap.v4alpha.Bootstrap.overload_manager:type_name -> envoy.config.overload.v3.OverloadManager - 25, // 14: envoy.config.bootstrap.v4alpha.Bootstrap.stats_server_version_override:type_name -> google.protobuf.UInt64Value - 26, // 15: envoy.config.bootstrap.v4alpha.Bootstrap.bootstrap_extensions:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 6, // 16: envoy.config.bootstrap.v4alpha.Bootstrap.fatal_actions:type_name -> envoy.config.bootstrap.v4alpha.FatalAction - 27, // 17: envoy.config.bootstrap.v4alpha.Bootstrap.config_sources:type_name -> envoy.config.core.v4alpha.ConfigSource - 27, // 18: envoy.config.bootstrap.v4alpha.Bootstrap.default_config_source:type_name -> envoy.config.core.v4alpha.ConfigSource - 12, // 19: envoy.config.bootstrap.v4alpha.Bootstrap.certificate_provider_instances:type_name -> envoy.config.bootstrap.v4alpha.Bootstrap.CertificateProviderInstancesEntry - 28, // 20: envoy.config.bootstrap.v4alpha.Admin.address:type_name -> envoy.config.core.v4alpha.Address - 29, // 21: envoy.config.bootstrap.v4alpha.Admin.socket_options:type_name -> envoy.config.core.v4alpha.SocketOption - 13, // 22: envoy.config.bootstrap.v4alpha.ClusterManager.outlier_detection:type_name -> envoy.config.bootstrap.v4alpha.ClusterManager.OutlierDetection - 30, // 23: envoy.config.bootstrap.v4alpha.ClusterManager.upstream_bind_config:type_name -> envoy.config.core.v4alpha.BindConfig - 19, // 24: envoy.config.bootstrap.v4alpha.ClusterManager.load_stats_config:type_name -> envoy.config.core.v4alpha.ApiConfigSource - 5, // 25: envoy.config.bootstrap.v4alpha.Watchdogs.main_thread_watchdog:type_name -> envoy.config.bootstrap.v4alpha.Watchdog - 5, // 26: envoy.config.bootstrap.v4alpha.Watchdogs.worker_watchdog:type_name -> envoy.config.bootstrap.v4alpha.Watchdog - 14, // 27: envoy.config.bootstrap.v4alpha.Watchdog.actions:type_name -> envoy.config.bootstrap.v4alpha.Watchdog.WatchdogAction - 22, // 28: envoy.config.bootstrap.v4alpha.Watchdog.miss_timeout:type_name -> google.protobuf.Duration - 22, // 29: envoy.config.bootstrap.v4alpha.Watchdog.megamiss_timeout:type_name -> google.protobuf.Duration - 22, // 30: envoy.config.bootstrap.v4alpha.Watchdog.kill_timeout:type_name -> google.protobuf.Duration - 22, // 31: envoy.config.bootstrap.v4alpha.Watchdog.max_kill_timeout_jitter:type_name -> google.protobuf.Duration - 22, // 32: envoy.config.bootstrap.v4alpha.Watchdog.multikill_timeout:type_name -> google.protobuf.Duration - 31, // 33: envoy.config.bootstrap.v4alpha.Watchdog.multikill_threshold:type_name -> envoy.type.v3.Percent - 26, // 34: envoy.config.bootstrap.v4alpha.FatalAction.config:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 32, // 35: envoy.config.bootstrap.v4alpha.Runtime.base:type_name -> google.protobuf.Struct - 32, // 36: envoy.config.bootstrap.v4alpha.RuntimeLayer.static_layer:type_name -> google.protobuf.Struct - 15, // 37: envoy.config.bootstrap.v4alpha.RuntimeLayer.disk_layer:type_name -> envoy.config.bootstrap.v4alpha.RuntimeLayer.DiskLayer - 16, // 38: envoy.config.bootstrap.v4alpha.RuntimeLayer.admin_layer:type_name -> envoy.config.bootstrap.v4alpha.RuntimeLayer.AdminLayer - 17, // 39: envoy.config.bootstrap.v4alpha.RuntimeLayer.rtds_layer:type_name -> envoy.config.bootstrap.v4alpha.RuntimeLayer.RtdsLayer - 8, // 40: envoy.config.bootstrap.v4alpha.LayeredRuntime.layers:type_name -> envoy.config.bootstrap.v4alpha.RuntimeLayer - 33, // 41: envoy.config.bootstrap.v4alpha.Bootstrap.StaticResources.listeners:type_name -> envoy.config.listener.v4alpha.Listener - 34, // 42: envoy.config.bootstrap.v4alpha.Bootstrap.StaticResources.clusters:type_name -> envoy.config.cluster.v4alpha.Cluster - 35, // 43: envoy.config.bootstrap.v4alpha.Bootstrap.StaticResources.secrets:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.Secret - 27, // 44: envoy.config.bootstrap.v4alpha.Bootstrap.DynamicResources.lds_config:type_name -> envoy.config.core.v4alpha.ConfigSource - 27, // 45: envoy.config.bootstrap.v4alpha.Bootstrap.DynamicResources.cds_config:type_name -> envoy.config.core.v4alpha.ConfigSource - 19, // 46: envoy.config.bootstrap.v4alpha.Bootstrap.DynamicResources.ads_config:type_name -> envoy.config.core.v4alpha.ApiConfigSource - 26, // 47: envoy.config.bootstrap.v4alpha.Bootstrap.CertificateProviderInstancesEntry.value:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 36, // 48: envoy.config.bootstrap.v4alpha.ClusterManager.OutlierDetection.event_service:type_name -> envoy.config.core.v4alpha.EventServiceConfig - 26, // 49: envoy.config.bootstrap.v4alpha.Watchdog.WatchdogAction.config:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 0, // 50: envoy.config.bootstrap.v4alpha.Watchdog.WatchdogAction.event:type_name -> envoy.config.bootstrap.v4alpha.Watchdog.WatchdogAction.WatchdogEvent - 27, // 51: envoy.config.bootstrap.v4alpha.RuntimeLayer.RtdsLayer.rtds_config:type_name -> envoy.config.core.v4alpha.ConfigSource - 52, // [52:52] is the sub-list for method output_type - 52, // [52:52] is the sub-list for method input_type - 52, // [52:52] is the sub-list for extension type_name - 52, // [52:52] is the sub-list for extension extendee - 0, // [0:52] is the sub-list for field type_name -} - -func init() { file_envoy_config_bootstrap_v4alpha_bootstrap_proto_init() } -func file_envoy_config_bootstrap_v4alpha_bootstrap_proto_init() { - if File_envoy_config_bootstrap_v4alpha_bootstrap_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bootstrap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Admin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterManager); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Watchdogs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Watchdog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FatalAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Runtime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeLayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LayeredRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bootstrap_StaticResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bootstrap_DynamicResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterManager_OutlierDetection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Watchdog_WatchdogAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeLayer_DiskLayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeLayer_AdminLayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeLayer_RtdsLayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Bootstrap_StatsFlushInterval)(nil), - (*Bootstrap_StatsFlushOnAdmin)(nil), - } - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*RuntimeLayer_StaticLayer)(nil), - (*RuntimeLayer_DiskLayer_)(nil), - (*RuntimeLayer_AdminLayer_)(nil), - (*RuntimeLayer_RtdsLayer_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDesc, - NumEnums: 1, - NumMessages: 17, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_bootstrap_v4alpha_bootstrap_proto_goTypes, - DependencyIndexes: file_envoy_config_bootstrap_v4alpha_bootstrap_proto_depIdxs, - EnumInfos: file_envoy_config_bootstrap_v4alpha_bootstrap_proto_enumTypes, - MessageInfos: file_envoy_config_bootstrap_v4alpha_bootstrap_proto_msgTypes, - }.Build() - File_envoy_config_bootstrap_v4alpha_bootstrap_proto = out.File - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_rawDesc = nil - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_goTypes = nil - file_envoy_config_bootstrap_v4alpha_bootstrap_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/bootstrap/v4alpha/bootstrap.pb.validate.go b/pkg/api/envoy/config/bootstrap/v4alpha/bootstrap.pb.validate.go deleted file mode 100644 index b051ed9c37..0000000000 --- a/pkg/api/envoy/config/bootstrap/v4alpha/bootstrap.pb.validate.go +++ /dev/null @@ -1,1747 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/bootstrap/v4alpha/bootstrap.proto - -package envoy_config_bootstrap_v4alpha - -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{} -) - -// Validate checks the field values on Bootstrap with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Bootstrap) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetStaticResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "StaticResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetDynamicResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "DynamicResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetClusterManager()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "ClusterManager", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHdsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "HdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for FlagsPath - - for idx, item := range m.GetStatsSinks() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: fmt.Sprintf("StatsSinks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetStatsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "StatsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedWatchdog()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "HiddenEnvoyDeprecatedWatchdog", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetWatchdogs()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "Watchdogs", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedTracing()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "HiddenEnvoyDeprecatedTracing", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLayeredRuntime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "LayeredRuntime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAdmin()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "Admin", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetOverloadManager()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "OverloadManager", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for EnableDispatcherStats - - // no validation rules for HeaderPrefix - - if v, ok := interface{}(m.GetStatsServerVersionOverride()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "StatsServerVersionOverride", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for UseTcpForDnsLookups - - for idx, item := range m.GetBootstrapExtensions() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: fmt.Sprintf("BootstrapExtensions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetFatalActions() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: fmt.Sprintf("FatalActions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetConfigSources() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: fmt.Sprintf("ConfigSources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetDefaultConfigSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: "DefaultConfigSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultSocketInterface - - for key, val := range m.GetCertificateProviderInstances() { - _ = val - - // no validation rules for CertificateProviderInstances[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BootstrapValidationError{ - field: fmt.Sprintf("CertificateProviderInstances[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - switch m.StatsFlush.(type) { - - case *Bootstrap_StatsFlushInterval: - - if d := m.GetStatsFlushInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return BootstrapValidationError{ - field: "StatsFlushInterval", - reason: "value is not a valid duration", - cause: err, - } - } - - lt := time.Duration(300*time.Second + 0*time.Nanosecond) - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte || dur >= lt { - return BootstrapValidationError{ - field: "StatsFlushInterval", - reason: "value must be inside range [1ms, 5m0s)", - } - } - - } - - case *Bootstrap_StatsFlushOnAdmin: - - if m.GetStatsFlushOnAdmin() != true { - return BootstrapValidationError{ - field: "StatsFlushOnAdmin", - reason: "value must equal true", - } - } - - } - - return nil -} - -// BootstrapValidationError is the validation error returned by -// Bootstrap.Validate if the designated constraints aren't met. -type BootstrapValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BootstrapValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BootstrapValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BootstrapValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BootstrapValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BootstrapValidationError) ErrorName() string { return "BootstrapValidationError" } - -// Error satisfies the builtin error interface -func (e BootstrapValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBootstrap.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BootstrapValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BootstrapValidationError{} - -// Validate checks the field values on Admin with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Admin) Validate() error { - if m == nil { - return nil - } - - // no validation rules for AccessLogPath - - // no validation rules for ProfilePath - - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdminValidationError{ - field: "Address", - 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 AdminValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// AdminValidationError is the validation error returned by Admin.Validate if -// the designated constraints aren't met. -type AdminValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdminValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdminValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AdminValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdminValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdminValidationError) ErrorName() string { return "AdminValidationError" } - -// Error satisfies the builtin error interface -func (e AdminValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdmin.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdminValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdminValidationError{} - -// Validate checks the field values on ClusterManager with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ClusterManager) Validate() error { - if m == nil { - return nil - } - - // no validation rules for LocalClusterName - - if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterManagerValidationError{ - field: "OutlierDetection", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterManagerValidationError{ - field: "UpstreamBindConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetLoadStatsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterManagerValidationError{ - field: "LoadStatsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ClusterManagerValidationError is the validation error returned by -// ClusterManager.Validate if the designated constraints aren't met. -type ClusterManagerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterManagerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterManagerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterManagerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterManagerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterManagerValidationError) ErrorName() string { return "ClusterManagerValidationError" } - -// Error satisfies the builtin error interface -func (e ClusterManagerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterManager.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterManagerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterManagerValidationError{} - -// Validate checks the field values on Watchdogs with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Watchdogs) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetMainThreadWatchdog()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogsValidationError{ - field: "MainThreadWatchdog", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetWorkerWatchdog()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogsValidationError{ - field: "WorkerWatchdog", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// WatchdogsValidationError is the validation error returned by -// Watchdogs.Validate if the designated constraints aren't met. -type WatchdogsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WatchdogsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WatchdogsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WatchdogsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WatchdogsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WatchdogsValidationError) ErrorName() string { return "WatchdogsValidationError" } - -// Error satisfies the builtin error interface -func (e WatchdogsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWatchdogs.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WatchdogsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WatchdogsValidationError{} - -// Validate checks the field values on Watchdog with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Watchdog) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetActions() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetMissTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogValidationError{ - field: "MissTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetMegamissTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogValidationError{ - field: "MegamissTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetKillTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogValidationError{ - field: "KillTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetMaxKillTimeoutJitter(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return WatchdogValidationError{ - field: "MaxKillTimeoutJitter", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur < gte { - return WatchdogValidationError{ - field: "MaxKillTimeoutJitter", - reason: "value must be greater than or equal to 0s", - } - } - - } - - if v, ok := interface{}(m.GetMultikillTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogValidationError{ - field: "MultikillTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetMultikillThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WatchdogValidationError{ - field: "MultikillThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// WatchdogValidationError is the validation error returned by -// Watchdog.Validate if the designated constraints aren't met. -type WatchdogValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WatchdogValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WatchdogValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WatchdogValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WatchdogValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WatchdogValidationError) ErrorName() string { return "WatchdogValidationError" } - -// Error satisfies the builtin error interface -func (e WatchdogValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWatchdog.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WatchdogValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WatchdogValidationError{} - -// Validate checks the field values on FatalAction with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *FatalAction) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FatalActionValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// FatalActionValidationError is the validation error returned by -// FatalAction.Validate if the designated constraints aren't met. -type FatalActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FatalActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FatalActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FatalActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FatalActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FatalActionValidationError) ErrorName() string { return "FatalActionValidationError" } - -// Error satisfies the builtin error interface -func (e FatalActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFatalAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FatalActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FatalActionValidationError{} - -// 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 - } - - // no validation rules for SymlinkRoot - - // no validation rules for Subdirectory - - // no validation rules for OverrideSubdirectory - - if v, ok := interface{}(m.GetBase()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeValidationError{ - field: "Base", - 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{} - -// Validate checks the field values on RuntimeLayer with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RuntimeLayer) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return RuntimeLayerValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.LayerSpecifier.(type) { - - case *RuntimeLayer_StaticLayer: - - if v, ok := interface{}(m.GetStaticLayer()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeLayerValidationError{ - field: "StaticLayer", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RuntimeLayer_DiskLayer_: - - if v, ok := interface{}(m.GetDiskLayer()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeLayerValidationError{ - field: "DiskLayer", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RuntimeLayer_AdminLayer_: - - if v, ok := interface{}(m.GetAdminLayer()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeLayerValidationError{ - field: "AdminLayer", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RuntimeLayer_RtdsLayer_: - - if v, ok := interface{}(m.GetRtdsLayer()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeLayerValidationError{ - field: "RtdsLayer", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return RuntimeLayerValidationError{ - field: "LayerSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// RuntimeLayerValidationError is the validation error returned by -// RuntimeLayer.Validate if the designated constraints aren't met. -type RuntimeLayerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeLayerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeLayerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeLayerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeLayerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeLayerValidationError) ErrorName() string { return "RuntimeLayerValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeLayerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeLayer.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeLayerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeLayerValidationError{} - -// Validate checks the field values on LayeredRuntime with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *LayeredRuntime) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetLayers() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LayeredRuntimeValidationError{ - field: fmt.Sprintf("Layers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// LayeredRuntimeValidationError is the validation error returned by -// LayeredRuntime.Validate if the designated constraints aren't met. -type LayeredRuntimeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LayeredRuntimeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LayeredRuntimeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LayeredRuntimeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LayeredRuntimeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LayeredRuntimeValidationError) ErrorName() string { return "LayeredRuntimeValidationError" } - -// Error satisfies the builtin error interface -func (e LayeredRuntimeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLayeredRuntime.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LayeredRuntimeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LayeredRuntimeValidationError{} - -// Validate checks the field values on Bootstrap_StaticResources with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Bootstrap_StaticResources) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetListeners() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Bootstrap_StaticResourcesValidationError{ - field: fmt.Sprintf("Listeners[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetClusters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Bootstrap_StaticResourcesValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetSecrets() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Bootstrap_StaticResourcesValidationError{ - field: fmt.Sprintf("Secrets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// Bootstrap_StaticResourcesValidationError is the validation error returned by -// Bootstrap_StaticResources.Validate if the designated constraints aren't met. -type Bootstrap_StaticResourcesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Bootstrap_StaticResourcesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Bootstrap_StaticResourcesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Bootstrap_StaticResourcesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Bootstrap_StaticResourcesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Bootstrap_StaticResourcesValidationError) ErrorName() string { - return "Bootstrap_StaticResourcesValidationError" -} - -// Error satisfies the builtin error interface -func (e Bootstrap_StaticResourcesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBootstrap_StaticResources.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Bootstrap_StaticResourcesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Bootstrap_StaticResourcesValidationError{} - -// Validate checks the field values on Bootstrap_DynamicResources with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Bootstrap_DynamicResources) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetLdsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Bootstrap_DynamicResourcesValidationError{ - field: "LdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for LdsResourcesLocator - - if v, ok := interface{}(m.GetCdsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Bootstrap_DynamicResourcesValidationError{ - field: "CdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for CdsResourcesLocator - - if v, ok := interface{}(m.GetAdsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Bootstrap_DynamicResourcesValidationError{ - field: "AdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// Bootstrap_DynamicResourcesValidationError is the validation error returned -// by Bootstrap_DynamicResources.Validate if the designated constraints aren't met. -type Bootstrap_DynamicResourcesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Bootstrap_DynamicResourcesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Bootstrap_DynamicResourcesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Bootstrap_DynamicResourcesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Bootstrap_DynamicResourcesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Bootstrap_DynamicResourcesValidationError) ErrorName() string { - return "Bootstrap_DynamicResourcesValidationError" -} - -// Error satisfies the builtin error interface -func (e Bootstrap_DynamicResourcesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBootstrap_DynamicResources.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Bootstrap_DynamicResourcesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Bootstrap_DynamicResourcesValidationError{} - -// Validate checks the field values on ClusterManager_OutlierDetection with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClusterManager_OutlierDetection) Validate() error { - if m == nil { - return nil - } - - // no validation rules for EventLogPath - - if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterManager_OutlierDetectionValidationError{ - field: "EventService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ClusterManager_OutlierDetectionValidationError is the validation error -// returned by ClusterManager_OutlierDetection.Validate if the designated -// constraints aren't met. -type ClusterManager_OutlierDetectionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterManager_OutlierDetectionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterManager_OutlierDetectionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterManager_OutlierDetectionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterManager_OutlierDetectionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterManager_OutlierDetectionValidationError) ErrorName() string { - return "ClusterManager_OutlierDetectionValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterManager_OutlierDetectionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterManager_OutlierDetection.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterManager_OutlierDetectionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterManager_OutlierDetectionValidationError{} - -// Validate checks the field values on Watchdog_WatchdogAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Watchdog_WatchdogAction) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Watchdog_WatchdogActionValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := Watchdog_WatchdogAction_WatchdogEvent_name[int32(m.GetEvent())]; !ok { - return Watchdog_WatchdogActionValidationError{ - field: "Event", - reason: "value must be one of the defined enum values", - } - } - - return nil -} - -// Watchdog_WatchdogActionValidationError is the validation error returned by -// Watchdog_WatchdogAction.Validate if the designated constraints aren't met. -type Watchdog_WatchdogActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Watchdog_WatchdogActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Watchdog_WatchdogActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Watchdog_WatchdogActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Watchdog_WatchdogActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Watchdog_WatchdogActionValidationError) ErrorName() string { - return "Watchdog_WatchdogActionValidationError" -} - -// Error satisfies the builtin error interface -func (e Watchdog_WatchdogActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWatchdog_WatchdogAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Watchdog_WatchdogActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Watchdog_WatchdogActionValidationError{} - -// Validate checks the field values on RuntimeLayer_DiskLayer with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RuntimeLayer_DiskLayer) Validate() error { - if m == nil { - return nil - } - - // no validation rules for SymlinkRoot - - // no validation rules for Subdirectory - - // no validation rules for AppendServiceCluster - - return nil -} - -// RuntimeLayer_DiskLayerValidationError is the validation error returned by -// RuntimeLayer_DiskLayer.Validate if the designated constraints aren't met. -type RuntimeLayer_DiskLayerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeLayer_DiskLayerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeLayer_DiskLayerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeLayer_DiskLayerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeLayer_DiskLayerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeLayer_DiskLayerValidationError) ErrorName() string { - return "RuntimeLayer_DiskLayerValidationError" -} - -// Error satisfies the builtin error interface -func (e RuntimeLayer_DiskLayerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeLayer_DiskLayer.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeLayer_DiskLayerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeLayer_DiskLayerValidationError{} - -// Validate checks the field values on RuntimeLayer_AdminLayer with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RuntimeLayer_AdminLayer) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// RuntimeLayer_AdminLayerValidationError is the validation error returned by -// RuntimeLayer_AdminLayer.Validate if the designated constraints aren't met. -type RuntimeLayer_AdminLayerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeLayer_AdminLayerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeLayer_AdminLayerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeLayer_AdminLayerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeLayer_AdminLayerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeLayer_AdminLayerValidationError) ErrorName() string { - return "RuntimeLayer_AdminLayerValidationError" -} - -// Error satisfies the builtin error interface -func (e RuntimeLayer_AdminLayerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeLayer_AdminLayer.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeLayer_AdminLayerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeLayer_AdminLayerValidationError{} - -// Validate checks the field values on RuntimeLayer_RtdsLayer with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RuntimeLayer_RtdsLayer) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - if v, ok := interface{}(m.GetRtdsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeLayer_RtdsLayerValidationError{ - field: "RtdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RuntimeLayer_RtdsLayerValidationError is the validation error returned by -// RuntimeLayer_RtdsLayer.Validate if the designated constraints aren't met. -type RuntimeLayer_RtdsLayerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeLayer_RtdsLayerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeLayer_RtdsLayerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeLayer_RtdsLayerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeLayer_RtdsLayerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeLayer_RtdsLayerValidationError) ErrorName() string { - return "RuntimeLayer_RtdsLayerValidationError" -} - -// Error satisfies the builtin error interface -func (e RuntimeLayer_RtdsLayerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeLayer_RtdsLayer.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeLayer_RtdsLayerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeLayer_RtdsLayerValidationError{} diff --git a/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.go b/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.go index 592e7c35ae..54530876fd 100644 --- a/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.go +++ b/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/cluster/aggregate/v2alpha/cluster.proto -package envoy_config_cluster_aggregate_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the aggregate cluster. See the :ref:`architecture overview // ` for more information. // [#extension: envoy.clusters.aggregate] @@ -96,12 +91,17 @@ var file_envoy_config_cluster_aggregate_v2alpha_cluster_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x35, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, - 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x42, 0x7c, 0x0a, - 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x28, 0x12, 0x26, 0x65, 0x6e, 0x76, + 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x42, 0xcb, 0x01, + 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x28, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, diff --git a/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.validate.go b/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.validate.go index 36893bcdea..d14bfb96b1 100644 --- a/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.validate.go +++ b/pkg/api/envoy/config/cluster/aggregate/v2alpha/cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/cluster/aggregate/v2alpha/cluster.proto -package envoy_config_cluster_aggregate_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClusterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterConfigMultiError, or +// nil if none found. +func (m *ClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusters()) < 1 { - return ClusterConfigValidationError{ + err := ClusterConfigValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ClusterConfigMultiError(errors) } return nil } +// ClusterConfigMultiError is an error wrapping multiple validation errors +// returned by ClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type ClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterConfigMultiError) AllErrors() []error { return m } + // ClusterConfigValidationError is the validation error returned by // ClusterConfig.Validate if the designated constraints aren't met. type ClusterConfigValidationError struct { diff --git a/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.go b/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.go index 36c56bdae6..a65496bb50 100644 --- a/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.go +++ b/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto -package envoy_config_cluster_dynamic_forward_proxy_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview // ` for more information. // [#extension: envoy.clusters.dynamic_forward_proxy] @@ -109,17 +104,23 @@ var file_envoy_config_cluster_dynamic_forward_proxy_v2alpha_cluster_proto_rawDes 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x64, 0x6e, 0x73, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x94, 0x01, 0x0a, 0x40, 0x69, + 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xef, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x34, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x34, + 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.validate.go b/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.validate.go index eb38e7ac66..cf0047c575 100644 --- a/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.validate.go +++ b/pkg/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto -package envoy_config_cluster_dynamic_forward_proxy_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClusterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterConfigMultiError, or +// nil if none found. +func (m *ClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDnsCacheConfig() == nil { - return ClusterConfigValidationError{ + err := ClusterConfigValidationError{ field: "DnsCacheConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterConfigValidationError{ field: "DnsCacheConfig", @@ -58,9 +97,30 @@ func (m *ClusterConfig) Validate() error { } } + if len(errors) > 0 { + return ClusterConfigMultiError(errors) + } + return nil } +// ClusterConfigMultiError is an error wrapping multiple validation errors +// returned by ClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type ClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterConfigMultiError) AllErrors() []error { return m } + // ClusterConfigValidationError is the validation error returned by // ClusterConfig.Validate if the designated constraints aren't met. type ClusterConfigValidationError struct { diff --git a/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.go b/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.go index 83e5926476..5e19b580e0 100644 --- a/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.go +++ b/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/cluster/redis/redis_cluster.proto -package envoy_config_cluster_redis +package redis import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 7] type RedisClusterConfig struct { state protoimpl.MessageState @@ -177,12 +172,16 @@ var file_envoy_config_cluster_redis_redis_cluster_proto_rawDesc = []byte{ 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1c, 0x68, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x47, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, 0x69, - 0x73, 0x42, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x8a, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x42, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.validate.go b/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.validate.go index 580d75dcf3..f7c18f8bae 100644 --- a/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.validate.go +++ b/pkg/api/envoy/config/cluster/redis/redis_cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/cluster/redis/redis_cluster.proto -package envoy_config_cluster_redis +package redis import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,60 +31,112 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RedisClusterConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisClusterConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisClusterConfigMultiError, or nil if none found. +func (m *RedisClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisClusterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if d := m.GetClusterRefreshRate(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RedisClusterConfigValidationError{ + err = RedisClusterConfigValidationError{ field: "ClusterRefreshRate", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return RedisClusterConfigValidationError{ - field: "ClusterRefreshRate", - reason: "value must be greater than 0s", + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshRate", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetClusterRefreshTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RedisClusterConfigValidationError{ + err = RedisClusterConfigValidationError{ field: "ClusterRefreshTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return RedisClusterConfigValidationError{ - field: "ClusterRefreshTimeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetRedirectRefreshInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRedirectRefreshInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisClusterConfigValidationError{ field: "RedirectRefreshInterval", @@ -93,7 +146,26 @@ func (m *RedisClusterConfig) Validate() error { } } - if v, ok := interface{}(m.GetRedirectRefreshThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRedirectRefreshThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisClusterConfigValidationError{ field: "RedirectRefreshThreshold", @@ -107,9 +179,30 @@ func (m *RedisClusterConfig) Validate() error { // no validation rules for HostDegradedRefreshThreshold + if len(errors) > 0 { + return RedisClusterConfigMultiError(errors) + } + return nil } +// RedisClusterConfigMultiError is an error wrapping multiple validation errors +// returned by RedisClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type RedisClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisClusterConfigMultiError) AllErrors() []error { return m } + // RedisClusterConfigValidationError is the validation error returned by // RedisClusterConfig.Validate if the designated constraints aren't met. type RedisClusterConfigValidationError struct { diff --git a/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.go b/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.go index e65babb808..1f8e349f82 100644 --- a/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.go +++ b/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/cluster/v3/circuit_breaker.proto -package envoy_config_cluster_v3 +package clusterv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // :ref:`Circuit breaking` settings can be // specified individually for each defined priority. type CircuitBreakers struct { @@ -37,12 +32,24 @@ type CircuitBreakers struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If multiple :ref:`Thresholds` - // are defined with the same :ref:`RoutingPriority`, + // 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 + // :ref:`RoutingPriority`, the default values // are used. Thresholds []*CircuitBreakers_Thresholds `protobuf:"bytes,1,rep,name=thresholds,proto3" json:"thresholds,omitempty"` + // Optional per-host limits which apply to each individual host in a cluster. + // + // .. note:: + // currently only the :ref:`max_connections + // ` field is supported for per-host limits. + // + // If multiple per-host :ref:`Thresholds` + // are defined with the same :ref:`RoutingPriority`, + // the first one in the list is used. If no per-host Thresholds are defined for a given + // :ref:`RoutingPriority`, + // the cluster will not have per-host limits. + PerHostThresholds []*CircuitBreakers_Thresholds `protobuf:"bytes,2,rep,name=per_host_thresholds,json=perHostThresholds,proto3" json:"per_host_thresholds,omitempty"` } func (x *CircuitBreakers) Reset() { @@ -84,15 +91,22 @@ func (x *CircuitBreakers) GetThresholds() []*CircuitBreakers_Thresholds { return nil } +func (x *CircuitBreakers) GetPerHostThresholds() []*CircuitBreakers_Thresholds { + if x != nil { + return x.PerHostThresholds + } + return nil +} + // A Thresholds defines CircuitBreaker settings for a -// :ref:`RoutingPriority`. +// :ref:`RoutingPriority`. // [#next-free-field: 9] type CircuitBreakers_Thresholds struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The :ref:`RoutingPriority` + // The :ref:`RoutingPriority` // the specified CircuitBreaker settings apply to. Priority v3.RoutingPriority `protobuf:"varint,1,opt,name=priority,proto3,enum=envoy.config.core.v3.RoutingPriority" json:"priority,omitempty"` // The maximum number of connections that Envoy will make to the upstream @@ -100,9 +114,11 @@ type CircuitBreakers_Thresholds struct { MaxConnections *wrappers.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. + // This limit is applied as a connection limit for non-HTTP traffic. MaxPendingRequests *wrappers.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. + // This limit does not apply to non-HTTP traffic. MaxRequests *wrappers.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. @@ -168,7 +184,7 @@ func (x *CircuitBreakers_Thresholds) GetPriority() v3.RoutingPriority { if x != nil { return x.Priority } - return v3.RoutingPriority_DEFAULT + return v3.RoutingPriority(0) } func (x *CircuitBreakers_Thresholds) GetMaxConnections() *wrappers.UInt32Value { @@ -303,75 +319,86 @@ var file_envoy_config_cluster_v3_circuit_breaker_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x80, 0x08, 0x0a, 0x0f, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, + 0x6f, 0x22, 0xe5, 0x08, 0x0a, 0x0f, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x52, 0x0a, - 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x1a, 0xea, 0x06, 0x0a, 0x0a, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x4b, 0x0a, 0x08, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, - 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, - 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3f, 0x0a, - 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3d, - 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x62, 0x0a, - 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, - 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, - 0x64, 0x67, 0x65, 0x74, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, - 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, - 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x63, - 0x6b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, - 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6f, - 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x63, 0x0a, 0x13, 0x70, 0x65, + 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, + 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x52, 0x11, 0x70, 0x65, + 0x72, 0x48, 0x6f, 0x73, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x1a, + 0xea, 0x06, 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x4b, + 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x0f, 0x6d, + 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, + 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0xe2, 0x01, 0x0a, 0x0b, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0e, 0x62, 0x75, - 0x64, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x62, 0x75, 0x64, 0x67, - 0x65, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x15, 0x6d, 0x69, 0x6e, - 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x3a, 0x42, 0x9a, 0xc5, 0x88, - 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, - 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x3a, - 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x69, 0x72, - 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x65, 0x72, 0x73, 0x42, 0x46, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x43, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, + 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x2e, 0x52, 0x65, + 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, + 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, + 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, + 0xe2, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, + 0x3d, 0x0a, 0x0e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, + 0x0d, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x50, + 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x6d, 0x69, 0x6e, + 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x69, + 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, + 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, + 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, + 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x42, 0x90, 0x01, 0x0a, 0x25, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x42, 0x13, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, + 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -398,20 +425,21 @@ var file_envoy_config_cluster_v3_circuit_breaker_proto_goTypes = []interface{}{ } var file_envoy_config_cluster_v3_circuit_breaker_proto_depIdxs = []int32{ 1, // 0: envoy.config.cluster.v3.CircuitBreakers.thresholds:type_name -> envoy.config.cluster.v3.CircuitBreakers.Thresholds - 3, // 1: envoy.config.cluster.v3.CircuitBreakers.Thresholds.priority:type_name -> envoy.config.core.v3.RoutingPriority - 4, // 2: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_connections:type_name -> google.protobuf.UInt32Value - 4, // 3: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_pending_requests:type_name -> google.protobuf.UInt32Value - 4, // 4: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_requests:type_name -> google.protobuf.UInt32Value - 4, // 5: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_retries:type_name -> google.protobuf.UInt32Value - 2, // 6: envoy.config.cluster.v3.CircuitBreakers.Thresholds.retry_budget:type_name -> envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget - 4, // 7: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_connection_pools:type_name -> google.protobuf.UInt32Value - 5, // 8: envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget.budget_percent:type_name -> envoy.type.v3.Percent - 4, // 9: envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget.min_retry_concurrency:type_name -> google.protobuf.UInt32Value - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 1, // 1: envoy.config.cluster.v3.CircuitBreakers.per_host_thresholds:type_name -> envoy.config.cluster.v3.CircuitBreakers.Thresholds + 3, // 2: envoy.config.cluster.v3.CircuitBreakers.Thresholds.priority:type_name -> envoy.config.core.v3.RoutingPriority + 4, // 3: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_connections:type_name -> google.protobuf.UInt32Value + 4, // 4: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_pending_requests:type_name -> google.protobuf.UInt32Value + 4, // 5: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_requests:type_name -> google.protobuf.UInt32Value + 4, // 6: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_retries:type_name -> google.protobuf.UInt32Value + 2, // 7: envoy.config.cluster.v3.CircuitBreakers.Thresholds.retry_budget:type_name -> envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget + 4, // 8: envoy.config.cluster.v3.CircuitBreakers.Thresholds.max_connection_pools:type_name -> google.protobuf.UInt32Value + 5, // 9: envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget.budget_percent:type_name -> envoy.type.v3.Percent + 4, // 10: envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget.min_retry_concurrency:type_name -> google.protobuf.UInt32Value + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_envoy_config_cluster_v3_circuit_breaker_proto_init() } diff --git a/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.validate.go b/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.validate.go index 740e3be6e6..0025701ae7 100644 --- a/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.validate.go +++ b/pkg/api/envoy/config/cluster/v3/circuit_breaker.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/cluster/v3/circuit_breaker.proto -package envoy_config_cluster_v3 +package clusterv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,23 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.RoutingPriority(0) ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CircuitBreakers) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CircuitBreakers with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CircuitBreakersMultiError, or nil if none found. +func (m *CircuitBreakers) ValidateAll() error { + return m.validate(true) +} + +func (m *CircuitBreakers) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetThresholds() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakersValidationError{ + field: fmt.Sprintf("Thresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakersValidationError{ + field: fmt.Sprintf("Thresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakersValidationError{ field: fmt.Sprintf("Thresholds[%v]", idx), @@ -60,9 +95,64 @@ func (m *CircuitBreakers) Validate() error { } + for idx, item := range m.GetPerHostThresholds() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakersValidationError{ + field: fmt.Sprintf("PerHostThresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakersValidationError{ + field: fmt.Sprintf("PerHostThresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakersValidationError{ + field: fmt.Sprintf("PerHostThresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CircuitBreakersMultiError(errors) + } + return nil } +// CircuitBreakersMultiError is an error wrapping multiple validation errors +// returned by CircuitBreakers.ValidateAll() if the designated constraints +// aren't met. +type CircuitBreakersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CircuitBreakersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CircuitBreakersMultiError) AllErrors() []error { return m } + // CircuitBreakersValidationError is the validation error returned by // CircuitBreakers.Validate if the designated constraints aren't met. type CircuitBreakersValidationError struct { @@ -119,20 +209,57 @@ var _ interface { // Validate checks the field values on CircuitBreakers_Thresholds with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CircuitBreakers_Thresholds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CircuitBreakers_Thresholds with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CircuitBreakers_ThresholdsMultiError, or nil if none found. +func (m *CircuitBreakers_Thresholds) ValidateAll() error { + return m.validate(true) +} + +func (m *CircuitBreakers_Thresholds) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := v3.RoutingPriority_name[int32(m.GetPriority())]; !ok { - return CircuitBreakers_ThresholdsValidationError{ + err := CircuitBreakers_ThresholdsValidationError{ field: "Priority", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMaxConnections()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxConnections()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConnections()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnections", @@ -142,7 +269,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxPendingRequests()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxPendingRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxPendingRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxPendingRequests", @@ -152,7 +298,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetMaxRequests()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxRequests()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRequests()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRequests", @@ -162,7 +327,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetMaxRetries()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxRetries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRetries()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRetries", @@ -172,7 +356,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } - if v, ok := interface{}(m.GetRetryBudget()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryBudget()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "RetryBudget", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "RetryBudget", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryBudget()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "RetryBudget", @@ -184,7 +387,26 @@ func (m *CircuitBreakers_Thresholds) Validate() error { // no validation rules for TrackRemaining - if v, ok := interface{}(m.GetMaxConnectionPools()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxConnectionPools()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnectionPools", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnectionPools", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConnectionPools()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnectionPools", @@ -194,9 +416,30 @@ func (m *CircuitBreakers_Thresholds) Validate() error { } } + if len(errors) > 0 { + return CircuitBreakers_ThresholdsMultiError(errors) + } + return nil } +// CircuitBreakers_ThresholdsMultiError is an error wrapping multiple +// validation errors returned by CircuitBreakers_Thresholds.ValidateAll() if +// the designated constraints aren't met. +type CircuitBreakers_ThresholdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CircuitBreakers_ThresholdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CircuitBreakers_ThresholdsMultiError) AllErrors() []error { return m } + // CircuitBreakers_ThresholdsValidationError is the validation error returned // by CircuitBreakers_Thresholds.Validate if the designated constraints aren't met. type CircuitBreakers_ThresholdsValidationError struct { @@ -255,13 +498,48 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// CircuitBreakers_Thresholds_RetryBudget with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// CircuitBreakers_Thresholds_RetryBudgetMultiError, or nil if none found. +func (m *CircuitBreakers_Thresholds_RetryBudget) ValidateAll() error { + return m.validate(true) +} + +func (m *CircuitBreakers_Thresholds_RetryBudget) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetBudgetPercent()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetBudgetPercent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "BudgetPercent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "BudgetPercent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBudgetPercent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_Thresholds_RetryBudgetValidationError{ field: "BudgetPercent", @@ -271,7 +549,26 @@ func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { } } - if v, ok := interface{}(m.GetMinRetryConcurrency()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinRetryConcurrency()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "MinRetryConcurrency", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "MinRetryConcurrency", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinRetryConcurrency()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_Thresholds_RetryBudgetValidationError{ field: "MinRetryConcurrency", @@ -281,9 +578,31 @@ func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { } } + if len(errors) > 0 { + return CircuitBreakers_Thresholds_RetryBudgetMultiError(errors) + } + return nil } +// CircuitBreakers_Thresholds_RetryBudgetMultiError is an error wrapping +// multiple validation errors returned by +// CircuitBreakers_Thresholds_RetryBudget.ValidateAll() if the designated +// constraints aren't met. +type CircuitBreakers_Thresholds_RetryBudgetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CircuitBreakers_Thresholds_RetryBudgetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CircuitBreakers_Thresholds_RetryBudgetMultiError) AllErrors() []error { return m } + // CircuitBreakers_Thresholds_RetryBudgetValidationError is the validation // error returned by CircuitBreakers_Thresholds_RetryBudget.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/cluster/v3/cluster.pb.go b/pkg/api/envoy/config/cluster/v3/cluster.pb.go index 55319bea06..952e443424 100644 --- a/pkg/api/envoy/config/cluster/v3/cluster.pb.go +++ b/pkg/api/envoy/config/cluster/v3/cluster.pb.go @@ -1,21 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/cluster/v3/cluster.proto -package envoy_config_cluster_v3 +package clusterv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/cncf/udpa/go/xds/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/cncf/xds/go/xds/core/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" - v34 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" @@ -33,10 +31,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Refer to :ref:`service discovery type ` // for an explanation on each type. type Cluster_DiscoveryType int32 @@ -135,14 +129,12 @@ const ( // specific load balancer. Consult the configured cluster's documentation for whether to set // this option or not. Cluster_CLUSTER_PROVIDED Cluster_LbPolicy = 6 - // [#not-implemented-hide:] Use the new :ref:`load_balancing_policy - // ` field to determine the LB policy. - // [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field - // and instead using the new load_balancing_policy field as the one and only mechanism for - // configuring this.] + // Use the new :ref:`load_balancing_policy + // ` field to determine the LB policy. + // This has been deprecated in favor of using the :ref:`load_balancing_policy + // ` field without + // setting any value in :ref:`lb_policy`. Cluster_LOAD_BALANCING_POLICY_CONFIG Cluster_LbPolicy = 7 - // Deprecated: Do not use. - Cluster_hidden_envoy_deprecated_ORIGINAL_DST_LB Cluster_LbPolicy = 4 ) // Enum value maps for Cluster_LbPolicy. @@ -155,7 +147,6 @@ var ( 5: "MAGLEV", 6: "CLUSTER_PROVIDED", 7: "LOAD_BALANCING_POLICY_CONFIG", - 4: "hidden_envoy_deprecated_ORIGINAL_DST_LB", } Cluster_LbPolicy_value = map[string]int32{ "ROUND_ROBIN": 0, @@ -165,7 +156,6 @@ var ( "MAGLEV": 5, "CLUSTER_PROVIDED": 6, "LOAD_BALANCING_POLICY_CONFIG": 7, - "hidden_envoy_deprecated_ORIGINAL_DST_LB": 4, } ) @@ -201,17 +191,30 @@ func (Cluster_LbPolicy) EnumDescriptor() ([]byte, []int) { // 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. +// This is semantically equivalent to a non-existent V6_PREFERRED option. +// AUTO is a legacy name that is more opaque than +// necessary and will be deprecated in favor of V6_PREFERRED in a future major version of the API. +// If V4_PREFERRED is specified, the DNS resolver will first perform a lookup for addresses in the +// IPv4 family and fallback to a lookup for addresses in the IPv6 family. i.e., the callback +// target will only get v6 addresses if there were NO v4 addresses to return. +// If ALL is specified, the DNS resolver will perform a lookup for both IPv4 and IPv6 families, +// and return all resolved addresses. When this is used, Happy Eyeballs will be enabled for +// upstream connections. Refer to :ref:`Happy Eyeballs Support ` +// for more information. // For cluster types other than -// :ref:`STRICT_DNS` and -// :ref:`LOGICAL_DNS`, +// :ref:`STRICT_DNS` and +// :ref:`LOGICAL_DNS`, // this setting is // ignored. +// [#next-major-version: deprecate AUTO in favor of a V6_PREFERRED option.] type Cluster_DnsLookupFamily int32 const ( - Cluster_AUTO Cluster_DnsLookupFamily = 0 - Cluster_V4_ONLY Cluster_DnsLookupFamily = 1 - Cluster_V6_ONLY Cluster_DnsLookupFamily = 2 + Cluster_AUTO Cluster_DnsLookupFamily = 0 + Cluster_V4_ONLY Cluster_DnsLookupFamily = 1 + Cluster_V6_ONLY Cluster_DnsLookupFamily = 2 + Cluster_V4_PREFERRED Cluster_DnsLookupFamily = 3 + Cluster_ALL Cluster_DnsLookupFamily = 4 ) // Enum value maps for Cluster_DnsLookupFamily. @@ -220,11 +223,15 @@ var ( 0: "AUTO", 1: "V4_ONLY", 2: "V6_ONLY", + 3: "V4_PREFERRED", + 4: "ALL", } Cluster_DnsLookupFamily_value = map[string]int32{ - "AUTO": 0, - "V4_ONLY": 1, - "V6_ONLY": 2, + "AUTO": 0, + "V4_ONLY": 1, + "V6_ONLY": 2, + "V4_PREFERRED": 3, + "ALL": 4, } ) @@ -259,7 +266,7 @@ 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 + // 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. @@ -375,7 +382,7 @@ const ( Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 3 // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata // keys reduced to - // :ref:`fallback_keys_subset`. + // :ref:`fallback_keys_subset`. // It allows for a fallback to a different, less specific selector if some of the keys of // the selector are considered optional. Cluster_LbSubsetConfig_LbSubsetSelector_KEYS_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 4 @@ -474,7 +481,7 @@ func (x Cluster_RingHashLbConfig_HashFunction) Number() protoreflect.EnumNumber // Deprecated: Use Cluster_RingHashLbConfig_HashFunction.Descriptor instead. func (Cluster_RingHashLbConfig_HashFunction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 5, 0} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 7, 0} } // Cluster list collections. Entries are *Cluster* resources or references. @@ -527,7 +534,7 @@ func (x *ClusterCollection) GetEntries() *v3.CollectionEntry { } // Configuration for a single upstream cluster. -// [#next-free-field: 53] +// [#next-free-field: 57] type Cluster struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -535,9 +542,9 @@ type Cluster struct { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first - // :ref:`match ` is used. + // :ref:`match ` is used. // For example, with the following match // // .. code-block:: yaml @@ -557,7 +564,7 @@ type Cluster struct { // Connections to the endpoints whose metadata value under *envoy.transport_socket_match* // having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. // - // If a :ref:`socket match ` with empty match + // If a :ref:`socket match ` with empty match // criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" // socket match in case above. // @@ -579,20 +586,23 @@ type Cluster struct { // // This field can be used to specify custom transport socket configurations for health // checks by adding matching key/value pairs in a health check's - // :ref:`transport socket match criteria ` field. + // :ref:`transport socket match criteria ` field. // // [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] TransportSocketMatches []*Cluster_TransportSocketMatch `protobuf:"bytes,43,rep,name=transport_socket_matches,json=transportSocketMatches,proto3" json:"transport_socket_matches,omitempty"` // 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. + // ` is not provided. // Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. 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 - // `. + // An optional alternative to the cluster name to be used for observability. This name is used + // emitting stats for the cluster and access logging the cluster name. This will appear as + // additional information in configuration dumps of a cluster's current status as + // :ref:`observability_name ` + // and as an additional tag "upstream_cluster.name" while tracing. Note: 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 assignable to ClusterDiscoveryType: // *Cluster_Type @@ -601,24 +611,24 @@ type Cluster struct { // 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. + // If not set, a default value of 5s will be used. ConnectTimeout *duration.Duration `protobuf:"bytes,4,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` // Soft limit on size of the cluster’s connections read and write buffers. If // unspecified, an implementation defined default is applied (1MiB). PerConnectionBufferLimitBytes *wrappers.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. - // [#comment:TODO: Remove enum constraint :ref:`LOAD_BALANCING_POLICY_CONFIG` when implemented.] LbPolicy Cluster_LbPolicy `protobuf:"varint,6,opt,name=lb_policy,json=lbPolicy,proto3,enum=envoy.config.cluster.v3.Cluster_LbPolicy" json:"lb_policy,omitempty"` // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. + // :ref:`STATIC`, + // :ref:`STRICT_DNS` + // or :ref:`LOGICAL_DNS` clusters. // This field supersedes the *hosts* field in the v2 API. // // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // LoadAssignment *v31.ClusterLoadAssignment `protobuf:"bytes,33,opt,name=load_assignment,json=loadAssignment,proto3" json:"load_assignment,omitempty"` // Optional :ref:`active health checking ` @@ -630,18 +640,23 @@ type Cluster struct { // 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. + // + // .. attention:: + // This field has been deprecated in favor of the :ref:`max_requests_per_connection ` field. + // + // Deprecated: Do not use. MaxRequestsPerConnection *wrappers.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 *CircuitBreakers `protobuf:"bytes,10,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` // HTTP protocol options that are applied only to upstream HTTP connections. // These options apply to all HTTP versions. // This has been deprecated in favor of - // :ref:`upstream_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. + // :ref:`upstream_http_protocol_options ` + // in the :ref:`http_protocol_options ` message. // upstream_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. // // Deprecated: Do not use. @@ -649,23 +664,23 @@ type Cluster struct { // Additional options when handling HTTP requests upstream. These options will be applicable to // both HTTP1 and HTTP2 requests. // This has been deprecated in favor of - // :ref:`common_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. + // :ref:`common_http_protocol_options ` + // in the :ref:`http_protocol_options ` message. // common_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. // // Deprecated: Do not use. CommonHttpProtocolOptions *v32.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. - // This has been deprecated in favor of http_protocol_options fields in the in the - // :ref:`http_protocol_options ` message. + // This has been deprecated in favor of http_protocol_options fields in the + // :ref:`http_protocol_options ` message. // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. // // Deprecated: Do not use. @@ -676,12 +691,12 @@ type Cluster struct { // 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. - // This has been deprecated in favor of http2_protocol_options fields in the in the - // :ref:`http_protocol_options ` + // This has been deprecated in favor of http2_protocol_options fields in the + // :ref:`http_protocol_options ` // message. http2_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` + // :ref:`extension_protocol_options`. + // See :ref:`upstream_http_protocol_options + // ` // for example usage. // // Deprecated: Do not use. @@ -693,22 +708,22 @@ type Cluster struct { // [#next-major-version: make this a list of typed extensions.] 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"` // If the DNS refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, + // :ref:`STRICT_DNS`, + // or :ref:`LOGICAL_DNS`, // this value is used as the cluster’s DNS refresh // rate. The value configured must be at least 1ms. If this setting is not specified, the // value defaults to 5000ms. For cluster types other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` + // :ref:`STRICT_DNS` + // and :ref:`LOGICAL_DNS` // this setting is ignored. DnsRefreshRate *duration.Duration `protobuf:"bytes,16,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"` // If the DNS failure refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, + // :ref:`STRICT_DNS`, + // or :ref:`LOGICAL_DNS`, // this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is // not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types - // other than :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS` this setting is + // other than :ref:`STRICT_DNS` and + // :ref:`LOGICAL_DNS` this setting is // ignored. DnsFailureRefreshRate *Cluster_RefreshRate `protobuf:"bytes,44,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"` // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, @@ -717,34 +732,59 @@ type Cluster struct { RespectDnsTtl bool `protobuf:"varint,39,opt,name=respect_dns_ttl,json=respectDnsTtl,proto3" json:"respect_dns_ttl,omitempty"` // The DNS IP address resolution policy. If this setting is not specified, the // value defaults to - // :ref:`AUTO`. + // :ref:`AUTO`. DnsLookupFamily Cluster_DnsLookupFamily `protobuf:"varint,17,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.config.cluster.v3.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`, + // :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` + // :ref:`STRICT_DNS` + // and :ref:`LOGICAL_DNS` // this setting is ignored. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple's API only allows overriding DNS resolvers via system settings. + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + // + // Deprecated: Do not use. DnsResolvers []*v32.Address `protobuf:"bytes,18,rep,name=dns_resolvers,json=dnsResolvers,proto3" json:"dns_resolvers,omitempty"` - // [#next-major-version: Reconcile DNS options in a single message.] // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + // + // Deprecated: Do not use. UseTcpForDnsLookups bool `protobuf:"varint,45,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + // + // Deprecated: Do not use. + DnsResolutionConfig *v32.DnsResolutionConfig `protobuf:"bytes,53,opt,name=dns_resolution_config,json=dnsResolutionConfig,proto3" json:"dns_resolution_config,omitempty"` + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + TypedDnsResolverConfig *v32.TypedExtensionConfig `protobuf:"bytes,55,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"` + // Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for + // :ref:`STRICT_DNS`, + // or :ref:`LOGICAL_DNS`. + // If true, cluster readiness blocks on warm-up. If false, the cluster will complete + // initialization whether or not warm-up has completed. Defaults to true. + WaitForWarmOnInit *wrappers.BoolValue `protobuf:"bytes,54,opt,name=wait_for_warm_on_init,json=waitForWarmOnInit,proto3" json:"wait_for_warm_on_init,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 *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`. + // :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 @@ -754,7 +794,7 @@ type Cluster struct { // 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` + // :ref:`ORIGINAL_DST` // this setting is ignored. CleanupInterval *duration.Duration `protobuf:"bytes,20,opt,name=cleanup_interval,json=cleanupInterval,proto3" json:"cleanup_interval,omitempty"` // Optional configuration used to bind newly established upstream connections. @@ -765,9 +805,9 @@ type Cluster struct { 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`, - // :ref:`MAGLEV` and - // :ref:`LEAST_REQUEST` + // :ref:`RING_HASH`, + // :ref:`MAGLEV` and + // :ref:`LEAST_REQUEST` // has additional configuration options. // Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding // LbPolicy will generate an error at runtime. @@ -777,12 +817,13 @@ type Cluster struct { // *Cluster_MaglevLbConfig_ // *Cluster_OriginalDstLbConfig_ // *Cluster_LeastRequestLbConfig_ + // *Cluster_RoundRobinLbConfig_ 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. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`UpstreamTlsContexts ` in the `typed_config`. + // To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and + // :ref:`UpstreamTlsContexts ` in the `typed_config`. // If no transport socket configuration is specified, new connections // will be set up with plaintext. TransportSocket *v32.TransportSocket `protobuf:"bytes,24,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` @@ -795,9 +836,9 @@ type Cluster struct { // Determines how Envoy selects the protocol used to speak to upstream hosts. // This has been deprecated in favor of setting explicit protocol selection // in the :ref:`http_protocol_options - // ` message. + // ` message. // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. + // :ref:`extension_protocol_options`. // // Deprecated: Do not use. ProtocolSelection Cluster_ClusterProtocolSelection `protobuf:"varint,26,opt,name=protocol_selection,json=protocolSelection,proto3,enum=envoy.config.cluster.v3.Cluster_ClusterProtocolSelection" json:"protocol_selection,omitempty"` @@ -825,9 +866,8 @@ type Cluster struct { // The chain will be applied to all outgoing connections that Envoy makes to the upstream // servers of this cluster. Filters []*Filter `protobuf:"bytes,40,rep,name=filters,proto3" json:"filters,omitempty"` - // [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the - // :ref:`lb_policy` field has the value - // :ref:`LOAD_BALANCING_POLICY_CONFIG`. + // If this field is set and is supported by the client, it will supersede the value of + // :ref:`lb_policy`. LoadBalancingPolicy *LoadBalancingPolicy `protobuf:"bytes,41,opt,name=load_balancing_policy,json=loadBalancingPolicy,proto3" json:"load_balancing_policy,omitempty"` // [#not-implemented-hide:] // If present, tells the client where to send load reports via LRS. If not present, the @@ -853,7 +893,7 @@ type Cluster struct { // .. attention:: // // This field has been deprecated in favor of `timeout_budgets`, part of - // :ref:`track_cluster_stats `. + // :ref:`track_cluster_stats `. // // Deprecated: Do not use. TrackTimeoutBudgets bool `protobuf:"varint,47,opt,name=track_timeout_budgets,json=trackTimeoutBudgets,proto3" json:"track_timeout_budgets,omitempty"` @@ -874,21 +914,15 @@ type Cluster struct { // If users desire custom connection pool or upstream behavior, for example terminating // CONNECT only if a custom filter indicates it is appropriate, the custom factories // can be registered and configured here. + // [#extension-category: envoy.upstreams] UpstreamConfig *v32.TypedExtensionConfig `protobuf:"bytes,48,opt,name=upstream_config,json=upstreamConfig,proto3" json:"upstream_config,omitempty"` // Configuration to track optional cluster stats. TrackClusterStats *TrackClusterStats `protobuf:"bytes,49,opt,name=track_cluster_stats,json=trackClusterStats,proto3" json:"track_cluster_stats,omitempty"` - // [#not-implemented-hide:] // Preconnect configuration for this cluster. PreconnectPolicy *Cluster_PreconnectPolicy `protobuf:"bytes,50,opt,name=preconnect_policy,json=preconnectPolicy,proto3" json:"preconnect_policy,omitempty"` // If `connection_pool_per_downstream_connection` is true, the cluster will use a separate // connection pool for every downstream connection ConnectionPoolPerDownstreamConnection bool `protobuf:"varint,51,opt,name=connection_pool_per_downstream_connection,json=connectionPoolPerDownstreamConnection,proto3" json:"connection_pool_per_downstream_connection,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedHosts []*v32.Address `protobuf:"bytes,7,rep,name=hidden_envoy_deprecated_hosts,json=hiddenEnvoyDeprecatedHosts,proto3" json:"hidden_envoy_deprecated_hosts,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedTlsContext *v33.UpstreamTlsContext `protobuf:"bytes,11,opt,name=hidden_envoy_deprecated_tls_context,json=hiddenEnvoyDeprecatedTlsContext,proto3" json:"hidden_envoy_deprecated_tls_context,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedExtensionProtocolOptions map[string]*_struct.Struct `protobuf:"bytes,35,rep,name=hidden_envoy_deprecated_extension_protocol_options,json=hiddenEnvoyDeprecatedExtensionProtocolOptions,proto3" json:"hidden_envoy_deprecated_extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *Cluster) Reset() { @@ -1007,6 +1041,7 @@ func (x *Cluster) GetHealthChecks() []*v32.HealthCheck { return nil } +// Deprecated: Do not use. func (x *Cluster) GetMaxRequestsPerConnection() *wrappers.UInt32Value { if x != nil { return x.MaxRequestsPerConnection @@ -1088,6 +1123,7 @@ func (x *Cluster) GetDnsLookupFamily() Cluster_DnsLookupFamily { return Cluster_AUTO } +// Deprecated: Do not use. func (x *Cluster) GetDnsResolvers() []*v32.Address { if x != nil { return x.DnsResolvers @@ -1095,6 +1131,7 @@ func (x *Cluster) GetDnsResolvers() []*v32.Address { return nil } +// Deprecated: Do not use. func (x *Cluster) GetUseTcpForDnsLookups() bool { if x != nil { return x.UseTcpForDnsLookups @@ -1102,6 +1139,28 @@ func (x *Cluster) GetUseTcpForDnsLookups() bool { return false } +// Deprecated: Do not use. +func (x *Cluster) GetDnsResolutionConfig() *v32.DnsResolutionConfig { + if x != nil { + return x.DnsResolutionConfig + } + return nil +} + +func (x *Cluster) GetTypedDnsResolverConfig() *v32.TypedExtensionConfig { + if x != nil { + return x.TypedDnsResolverConfig + } + return nil +} + +func (x *Cluster) GetWaitForWarmOnInit() *wrappers.BoolValue { + if x != nil { + return x.WaitForWarmOnInit + } + return nil +} + func (x *Cluster) GetOutlierDetection() *OutlierDetection { if x != nil { return x.OutlierDetection @@ -1165,6 +1224,13 @@ func (x *Cluster) GetLeastRequestLbConfig() *Cluster_LeastRequestLbConfig { return nil } +func (x *Cluster) GetRoundRobinLbConfig() *Cluster_RoundRobinLbConfig { + if x, ok := x.GetLbConfig().(*Cluster_RoundRobinLbConfig_); ok { + return x.RoundRobinLbConfig + } + return nil +} + func (x *Cluster) GetCommonLbConfig() *Cluster_CommonLbConfig { if x != nil { return x.CommonLbConfig @@ -1272,30 +1338,6 @@ func (x *Cluster) GetConnectionPoolPerDownstreamConnection() bool { return false } -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedHosts() []*v32.Address { - if x != nil { - return x.HiddenEnvoyDeprecatedHosts - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedTlsContext() *v33.UpstreamTlsContext { - if x != nil { - return x.HiddenEnvoyDeprecatedTlsContext - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedExtensionProtocolOptions() map[string]*_struct.Struct { - if x != nil { - return x.HiddenEnvoyDeprecatedExtensionProtocolOptions - } - return nil -} - type isCluster_ClusterDiscoveryType interface { isCluster_ClusterDiscoveryType() } @@ -1339,6 +1381,11 @@ type Cluster_LeastRequestLbConfig_ struct { LeastRequestLbConfig *Cluster_LeastRequestLbConfig `protobuf:"bytes,37,opt,name=least_request_lb_config,json=leastRequestLbConfig,proto3,oneof"` } +type Cluster_RoundRobinLbConfig_ struct { + // Optional configuration for the RoundRobin load balancing policy. + RoundRobinLbConfig *Cluster_RoundRobinLbConfig `protobuf:"bytes,56,opt,name=round_robin_lb_config,json=roundRobinLbConfig,proto3,oneof"` +} + func (*Cluster_RingHashLbConfig_) isCluster_LbConfig() {} func (*Cluster_MaglevLbConfig_) isCluster_LbConfig() {} @@ -1347,7 +1394,9 @@ func (*Cluster_OriginalDstLbConfig_) isCluster_LbConfig() {} func (*Cluster_LeastRequestLbConfig_) isCluster_LbConfig() {} -// [#not-implemented-hide:] Extensible load balancing policy configuration. +func (*Cluster_RoundRobinLbConfig_) isCluster_LbConfig() {} + +// Extensible load balancing policy configuration. // // Every LB policy defined via this mechanism will be identified via a unique name using reverse // DNS notation. If the policy needs configuration parameters, it must define a message for its @@ -1473,6 +1522,10 @@ type UpstreamConnectionOptions struct { // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. TcpKeepalive *v32.TcpKeepalive `protobuf:"bytes,1,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcp_keepalive,omitempty"` + // If enabled, associates the interface name of the local address with the upstream connection. + // This can be used by extensions during processing of requests. The association mechanism is + // implementation specific. Defaults to false due to performance concerns. + SetLocalInterfaceNameOnUpstreamConnections bool `protobuf:"varint,2,opt,name=set_local_interface_name_on_upstream_connections,json=setLocalInterfaceNameOnUpstreamConnections,proto3" json:"set_local_interface_name_on_upstream_connections,omitempty"` } func (x *UpstreamConnectionOptions) Reset() { @@ -1514,6 +1567,13 @@ func (x *UpstreamConnectionOptions) GetTcpKeepalive() *v32.TcpKeepalive { return nil } +func (x *UpstreamConnectionOptions) GetSetLocalInterfaceNameOnUpstreamConnections() bool { + if x != nil { + return x.SetLocalInterfaceNameOnUpstreamConnections + } + return false +} + type TrackClusterStats struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1593,6 +1653,7 @@ type Cluster_TransportSocketMatch struct { // against the values specified in this field. Match *_struct.Struct `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"` // The configuration of the transport socket. + // [#extension-category: envoy.transport_sockets.upstream] TransportSocket *v32.TransportSocket `protobuf:"bytes,3,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` } @@ -1659,6 +1720,7 @@ type Cluster_CustomClusterType struct { 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. + // [#extension-category: envoy.clusters] TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` } @@ -1778,16 +1840,16 @@ type Cluster_LbSubsetConfig struct { // The behavior used when no endpoint subset matches the selected route's // metadata. The value defaults to - // :ref:`NO_FALLBACK`. + // :ref:`NO_FALLBACK`. FallbackPolicy Cluster_LbSubsetConfig_LbSubsetFallbackPolicy `protobuf:"varint,1,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.config.cluster.v3.Cluster_LbSubsetConfig_LbSubsetFallbackPolicy" json:"fallback_policy,omitempty"` // Specifies the default subset of endpoints used during fallback if // fallback_policy is - // :ref:`DEFAULT_SUBSET`. + // :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`. + // :ref:`NO_FALLBACK`. DefaultSubset *_struct.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 @@ -1914,6 +1976,138 @@ func (x *Cluster_LbSubsetConfig) GetListAsAny() bool { return false } +// Configuration for :ref:`slow start mode `. +type Cluster_SlowStartConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the size of slow start window. + // If set, the newly created host remains in slow start mode starting from its creation time + // for the duration of slow start window. + SlowStartWindow *duration.Duration `protobuf:"bytes,1,opt,name=slow_start_window,json=slowStartWindow,proto3" json:"slow_start_window,omitempty"` + // This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0, + // so that endpoint would get linearly increasing amount of traffic. + // When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly. + // The value of aggression parameter should be greater than 0.0. + // By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. + // + // During slow start window, effective weight of an endpoint would be scaled with time factor and aggression: + // `new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))`, + // where `time_factor=(time_since_start_seconds / slow_start_time_seconds)`. + // + // As time progresses, more and more traffic would be sent to endpoint, which is in slow start window. + // Once host exits slow start, time_factor and aggression no longer affect its weight. + Aggression *v32.RuntimeDouble `protobuf:"bytes,2,opt,name=aggression,proto3" json:"aggression,omitempty"` + // Configures the minimum percentage of origin weight that avoids too small new weight, + // which may cause endpoints in slow start mode receive no traffic in slow start window. + // If not specified, the default is 10%. + MinWeightPercent *v33.Percent `protobuf:"bytes,3,opt,name=min_weight_percent,json=minWeightPercent,proto3" json:"min_weight_percent,omitempty"` +} + +func (x *Cluster_SlowStartConfig) Reset() { + *x = Cluster_SlowStartConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster_SlowStartConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster_SlowStartConfig) ProtoMessage() {} + +func (x *Cluster_SlowStartConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster_SlowStartConfig.ProtoReflect.Descriptor instead. +func (*Cluster_SlowStartConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 4} +} + +func (x *Cluster_SlowStartConfig) GetSlowStartWindow() *duration.Duration { + if x != nil { + return x.SlowStartWindow + } + return nil +} + +func (x *Cluster_SlowStartConfig) GetAggression() *v32.RuntimeDouble { + if x != nil { + return x.Aggression + } + return nil +} + +func (x *Cluster_SlowStartConfig) GetMinWeightPercent() *v33.Percent { + if x != nil { + return x.MinWeightPercent + } + return nil +} + +// Specific configuration for the RoundRobin load balancing policy. +type Cluster_RoundRobinLbConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + SlowStartConfig *Cluster_SlowStartConfig `protobuf:"bytes,1,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"` +} + +func (x *Cluster_RoundRobinLbConfig) Reset() { + *x = Cluster_RoundRobinLbConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster_RoundRobinLbConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster_RoundRobinLbConfig) ProtoMessage() {} + +func (x *Cluster_RoundRobinLbConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster_RoundRobinLbConfig.ProtoReflect.Descriptor instead. +func (*Cluster_RoundRobinLbConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 5} +} + +func (x *Cluster_RoundRobinLbConfig) GetSlowStartConfig() *Cluster_SlowStartConfig { + if x != nil { + return x.SlowStartConfig + } + return nil +} + // Specific configuration for the LeastRequest load balancing policy. type Cluster_LeastRequestLbConfig struct { state protoimpl.MessageState @@ -1947,12 +2141,15 @@ type Cluster_LeastRequestLbConfig struct { // .. note:: // This setting only takes effect if all host weights are not equal. ActiveRequestBias *v32.RuntimeDouble `protobuf:"bytes,2,opt,name=active_request_bias,json=activeRequestBias,proto3" json:"active_request_bias,omitempty"` + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + SlowStartConfig *Cluster_SlowStartConfig `protobuf:"bytes,3,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"` } func (x *Cluster_LeastRequestLbConfig) Reset() { *x = Cluster_LeastRequestLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[10] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1965,7 +2162,7 @@ func (x *Cluster_LeastRequestLbConfig) String() string { func (*Cluster_LeastRequestLbConfig) ProtoMessage() {} func (x *Cluster_LeastRequestLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[10] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1978,7 +2175,7 @@ func (x *Cluster_LeastRequestLbConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use Cluster_LeastRequestLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_LeastRequestLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 4} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 6} } func (x *Cluster_LeastRequestLbConfig) GetChoiceCount() *wrappers.UInt32Value { @@ -1995,6 +2192,13 @@ func (x *Cluster_LeastRequestLbConfig) GetActiveRequestBias() *v32.RuntimeDouble return nil } +func (x *Cluster_LeastRequestLbConfig) GetSlowStartConfig() *Cluster_SlowStartConfig { + if x != nil { + return x.SlowStartConfig + } + return nil +} + // Specific configuration for the :ref:`RingHash` // load balancing policy. type Cluster_RingHashLbConfig struct { @@ -2005,21 +2209,21 @@ 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`. + // :ref:`maximum_ring_size`. MinimumRingSize *wrappers.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`. + // :ref:`XX_HASH`. HashFunction Cluster_RingHashLbConfig_HashFunction `protobuf:"varint,3,opt,name=hash_function,json=hashFunction,proto3,enum=envoy.config.cluster.v3.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`. + // :ref:`minimum_ring_size`. MaximumRingSize *wrappers.UInt64Value `protobuf:"bytes,4,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` } func (x *Cluster_RingHashLbConfig) Reset() { *x = Cluster_RingHashLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[11] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2032,7 +2236,7 @@ func (x *Cluster_RingHashLbConfig) String() string { func (*Cluster_RingHashLbConfig) ProtoMessage() {} func (x *Cluster_RingHashLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[11] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2045,7 +2249,7 @@ func (x *Cluster_RingHashLbConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use Cluster_RingHashLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_RingHashLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 5} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 7} } func (x *Cluster_RingHashLbConfig) GetMinimumRingSize() *wrappers.UInt64Value { @@ -2079,14 +2283,14 @@ type Cluster_MaglevLbConfig struct { // The table size for Maglev hashing. The Maglev aims for ‘minimal disruption’ rather than an absolute guarantee. // Minimal disruption means that when the set of upstreams changes, a connection will likely be sent to the same // upstream as it was before. Increasing the table size reduces the amount of disruption. - // The table size must be prime number. If it is not specified, the default is 65537. + // The table size must be prime number limited to 5000011. If it is not specified, the default is 65537. TableSize *wrappers.UInt64Value `protobuf:"bytes,1,opt,name=table_size,json=tableSize,proto3" json:"table_size,omitempty"` } func (x *Cluster_MaglevLbConfig) Reset() { *x = Cluster_MaglevLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[12] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2099,7 +2303,7 @@ func (x *Cluster_MaglevLbConfig) String() string { func (*Cluster_MaglevLbConfig) ProtoMessage() {} func (x *Cluster_MaglevLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[12] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2112,7 +2316,7 @@ func (x *Cluster_MaglevLbConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use Cluster_MaglevLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_MaglevLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 6} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 8} } func (x *Cluster_MaglevLbConfig) GetTableSize() *wrappers.UInt64Value { @@ -2130,9 +2334,8 @@ type Cluster_OriginalDstLbConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // When true, :ref:`x-envoy-original-dst-host - // ` can be used to override destination - // address. + // When true, a HTTP header can be used to override the original dst address. The default header is + // :ref:`x-envoy-original-dst-host `. // // .. attention:: // @@ -2144,12 +2347,15 @@ type Cluster_OriginalDstLbConfig struct { // // If the header appears multiple times only the first value is used. UseHttpHeader bool `protobuf:"varint,1,opt,name=use_http_header,json=useHttpHeader,proto3" json:"use_http_header,omitempty"` + // The http header to override destination address if :ref:`use_http_header `. + // is set to true. If the value is empty, :ref:`x-envoy-original-dst-host ` will be used. + HttpHeaderName string `protobuf:"bytes,2,opt,name=http_header_name,json=httpHeaderName,proto3" json:"http_header_name,omitempty"` } func (x *Cluster_OriginalDstLbConfig) Reset() { *x = Cluster_OriginalDstLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[13] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2162,7 +2368,7 @@ func (x *Cluster_OriginalDstLbConfig) String() string { func (*Cluster_OriginalDstLbConfig) ProtoMessage() {} func (x *Cluster_OriginalDstLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[13] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2175,7 +2381,7 @@ func (x *Cluster_OriginalDstLbConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use Cluster_OriginalDstLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_OriginalDstLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 7} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 9} } func (x *Cluster_OriginalDstLbConfig) GetUseHttpHeader() bool { @@ -2185,8 +2391,15 @@ func (x *Cluster_OriginalDstLbConfig) GetUseHttpHeader() bool { return false } +func (x *Cluster_OriginalDstLbConfig) GetHttpHeaderName() string { + if x != nil { + return x.HttpHeaderName + } + return "" +} + // Common configuration for all load balancer implementations. -// [#next-free-field: 8] +// [#next-free-field: 9] type Cluster_CommonLbConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2198,7 +2411,7 @@ type Cluster_CommonLbConfig struct { // // .. note:: // The specified percent will be truncated to the nearest 1%. - HealthyPanicThreshold *v34.Percent `protobuf:"bytes,1,opt,name=healthy_panic_threshold,json=healthyPanicThreshold,proto3" json:"healthy_panic_threshold,omitempty"` + HealthyPanicThreshold *v33.Percent `protobuf:"bytes,1,opt,name=healthy_panic_threshold,json=healthyPanicThreshold,proto3" json:"healthy_panic_threshold,omitempty"` // Types that are assignable to LocalityConfigSpecifier: // *Cluster_CommonLbConfig_ZoneAwareLbConfig_ // *Cluster_CommonLbConfig_LocalityWeightedLbConfig_ @@ -2218,37 +2431,28 @@ type Cluster_CommonLbConfig struct { // because merging those updates isn't currently safe. See // https://github.com/envoyproxy/envoy/pull/3941. UpdateMergeWindow *duration.Duration `protobuf:"bytes,4,opt,name=update_merge_window,json=updateMergeWindow,proto3" json:"update_merge_window,omitempty"` - // If set to true, Envoy will not consider new hosts when computing load balancing weights until - // they have been health checked for the first time. This will have no effect unless - // active health checking is also configured. - // - // Ignoring a host means that for any load balancing calculations that adjust weights based - // on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and - // panic mode) Envoy will exclude these hosts in the denominator. - // - // For example, with hosts in two priorities P0 and P1, where P0 looks like - // {healthy, unhealthy (new), unhealthy (new)} - // and where P1 looks like - // {healthy, healthy} - // all traffic will still hit P0, as 1 / (3 - 2) = 1. - // - // Enabling this will allow scaling up the number of hosts for a given cluster without entering - // panic mode or triggering priority spillover, assuming the hosts pass the first health check. - // - // If panic mode is triggered, new hosts are still eligible for traffic; they simply do not - // contribute to the calculation when deciding whether panic mode is enabled or not. + // If set to true, Envoy will :ref:`exclude ` new hosts + // when computing load balancing weights until they have been health checked for the first time. + // This will have no effect unless active health checking is also configured. IgnoreNewHostsUntilFirstHc bool `protobuf:"varint,5,opt,name=ignore_new_hosts_until_first_hc,json=ignoreNewHostsUntilFirstHc,proto3" json:"ignore_new_hosts_until_first_hc,omitempty"` // If set to `true`, the cluster manager will drain all existing // connections to upstream hosts whenever hosts are added or removed from the cluster. CloseConnectionsOnHostSetChange bool `protobuf:"varint,6,opt,name=close_connections_on_host_set_change,json=closeConnectionsOnHostSetChange,proto3" json:"close_connections_on_host_set_change,omitempty"` // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) ConsistentHashingLbConfig *Cluster_CommonLbConfig_ConsistentHashingLbConfig `protobuf:"bytes,7,opt,name=consistent_hashing_lb_config,json=consistentHashingLbConfig,proto3" json:"consistent_hashing_lb_config,omitempty"` + // This controls what hosts are considered valid when using + // :ref:`host overrides `, which is used by some + // filters to modify the load balancing decision. + // + // If this is unset then [UNKNOWN, HEALTHY, DEGRADED] will be applied by default. If this is + // set with an empty set of statuses then host overrides will be ignored by the load balancing. + OverrideHostStatus *v32.HealthStatusSet `protobuf:"bytes,8,opt,name=override_host_status,json=overrideHostStatus,proto3" json:"override_host_status,omitempty"` } func (x *Cluster_CommonLbConfig) Reset() { *x = Cluster_CommonLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[14] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2261,7 +2465,7 @@ func (x *Cluster_CommonLbConfig) String() string { func (*Cluster_CommonLbConfig) ProtoMessage() {} func (x *Cluster_CommonLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[14] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2274,10 +2478,10 @@ func (x *Cluster_CommonLbConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use Cluster_CommonLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_CommonLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 8} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 10} } -func (x *Cluster_CommonLbConfig) GetHealthyPanicThreshold() *v34.Percent { +func (x *Cluster_CommonLbConfig) GetHealthyPanicThreshold() *v33.Percent { if x != nil { return x.HealthyPanicThreshold } @@ -2333,6 +2537,13 @@ func (x *Cluster_CommonLbConfig) GetConsistentHashingLbConfig() *Cluster_CommonL return nil } +func (x *Cluster_CommonLbConfig) GetOverrideHostStatus() *v32.HealthStatusSet { + if x != nil { + return x.OverrideHostStatus + } + return nil +} + type isCluster_CommonLbConfig_LocalityConfigSpecifier interface { isCluster_CommonLbConfig_LocalityConfigSpecifier() } @@ -2358,19 +2569,19 @@ type Cluster_RefreshRate struct { // Specifies the base interval between refreshes. This parameter is required and must be greater // than zero and less than - // :ref:`max_interval `. + // :ref:`max_interval `. BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` // Specifies the maximum interval between refreshes. This parameter is optional, but must be // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. + // :ref:`base_interval ` if set. The default + // is 10 times the :ref:`base_interval `. MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` } func (x *Cluster_RefreshRate) Reset() { *x = Cluster_RefreshRate{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[15] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2383,7 +2594,7 @@ func (x *Cluster_RefreshRate) String() string { func (*Cluster_RefreshRate) ProtoMessage() {} func (x *Cluster_RefreshRate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[15] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2396,7 +2607,7 @@ func (x *Cluster_RefreshRate) ProtoReflect() protoreflect.Message { // Deprecated: Use Cluster_RefreshRate.ProtoReflect.Descriptor instead. func (*Cluster_RefreshRate) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 9} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 11} } func (x *Cluster_RefreshRate) GetBaseInterval() *duration.Duration { @@ -2413,7 +2624,6 @@ func (x *Cluster_RefreshRate) GetMaxInterval() *duration.Duration { return nil } -// [#not-implemented-hide:] type Cluster_PreconnectPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2421,7 +2631,7 @@ type Cluster_PreconnectPolicy struct { // Indicates how many streams (rounded up) can be anticipated per-upstream for each // incoming stream. This is useful for high-QPS or latency-sensitive services. Preconnecting - // will only be done if the upstream is healthy. + // will only be done if the upstream is healthy and the cluster has traffic. // // For example if this is 2, for an incoming HTTP/1.1 stream, 2 connections will be // established, one for the new incoming stream, and one for a presumed follow-up stream. For @@ -2439,8 +2649,7 @@ type Cluster_PreconnectPolicy struct { // // If this value is not set, or set explicitly to one, Envoy will fetch as many connections // as needed to serve streams in flight. This means in steady state if a connection is torn down, - // a subsequent streams will pay an upstream-rtt latency penalty waiting for streams to be - // preconnected. + // a subsequent streams will pay an upstream-rtt latency penalty waiting for a new connection. // // This is limited somewhat arbitrarily to 3 because preconnecting too aggressively can // harm latency more than the preconnecting helps. @@ -2448,31 +2657,32 @@ type Cluster_PreconnectPolicy struct { // Indicates how many many streams (rounded up) can be anticipated across a cluster for each // stream, useful for low QPS services. This is currently supported for a subset of // deterministic non-hash-based load-balancing algorithms (weighted round robin, random). - // Unlike per_upstream_preconnect_ratio this preconnects across the upstream instances in a + // Unlike *per_upstream_preconnect_ratio* this preconnects across the upstream instances in a // cluster, doing best effort predictions of what upstream would be picked next and // pre-establishing a connection. // + // Preconnecting will be limited to one preconnect per configured upstream in the cluster and will + // only be done if there are healthy upstreams and the cluster has traffic. + // // For example if preconnecting is set to 2 for a round robin HTTP/2 cluster, on the first // incoming stream, 2 connections will be preconnected - one to the first upstream for this // cluster, one to the second on the assumption there will be a follow-up stream. // - // Preconnecting will be limited to one preconnect per configured upstream in the cluster. - // // If this value is not set, or set explicitly to one, Envoy will fetch as many connections // as needed to serve streams in flight, so during warm up and in steady state if a connection // is closed (and per_upstream_preconnect_ratio is not set), there will be a latency hit for // connection establishment. // // If both this and preconnect_ratio are set, Envoy will make sure both predicted needs are met, - // basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each upstream. - // TODO(alyssawilk) per LB docs and LB overview docs when unhiding. + // basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each + // upstream. PredictivePreconnectRatio *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=predictive_preconnect_ratio,json=predictivePreconnectRatio,proto3" json:"predictive_preconnect_ratio,omitempty"` } func (x *Cluster_PreconnectPolicy) Reset() { *x = Cluster_PreconnectPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[16] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2485,7 +2695,7 @@ func (x *Cluster_PreconnectPolicy) String() string { func (*Cluster_PreconnectPolicy) ProtoMessage() {} func (x *Cluster_PreconnectPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[16] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2498,7 +2708,7 @@ func (x *Cluster_PreconnectPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use Cluster_PreconnectPolicy.ProtoReflect.Descriptor instead. func (*Cluster_PreconnectPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 10} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 12} } func (x *Cluster_PreconnectPolicy) GetPerUpstreamPreconnectRatio() *wrappers.DoubleValue { @@ -2540,13 +2750,13 @@ type Cluster_LbSubsetConfig_LbSubsetSelector struct { // metadata. FallbackPolicy Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy `protobuf:"varint,2,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.config.cluster.v3.Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy" json:"fallback_policy,omitempty"` // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` + // :ref:`keys` used by + // :ref:`KEYS_SUBSET` // fallback policy. // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. // For any other fallback policy the parameter is not used and should not be set. // Only values also present in - // :ref:`keys` are allowed, but + // :ref:`keys` are allowed, but // `fallback_keys_subset` cannot be equal to `keys`. FallbackKeysSubset []string `protobuf:"bytes,3,rep,name=fallback_keys_subset,json=fallbackKeysSubset,proto3" json:"fallback_keys_subset,omitempty"` } @@ -2554,7 +2764,7 @@ type Cluster_LbSubsetConfig_LbSubsetSelector struct { func (x *Cluster_LbSubsetConfig_LbSubsetSelector) Reset() { *x = Cluster_LbSubsetConfig_LbSubsetSelector{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[19] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2567,7 +2777,7 @@ func (x *Cluster_LbSubsetConfig_LbSubsetSelector) String() string { func (*Cluster_LbSubsetConfig_LbSubsetSelector) ProtoMessage() {} func (x *Cluster_LbSubsetConfig_LbSubsetSelector) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[19] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2622,7 +2832,7 @@ type Cluster_CommonLbConfig_ZoneAwareLbConfig struct { // if zone aware routing is configured. If not specified, the default is 100%. // * :ref:`runtime values `. // * :ref:`Zone aware routing support `. - RoutingEnabled *v34.Percent `protobuf:"bytes,1,opt,name=routing_enabled,json=routingEnabled,proto3" json:"routing_enabled,omitempty"` + RoutingEnabled *v33.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. @@ -2639,7 +2849,7 @@ type Cluster_CommonLbConfig_ZoneAwareLbConfig struct { func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) Reset() { *x = Cluster_CommonLbConfig_ZoneAwareLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[20] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2652,7 +2862,7 @@ func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) String() string { func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoMessage() {} func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[20] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2665,10 +2875,10 @@ func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoReflect() protoreflect.M // Deprecated: Use Cluster_CommonLbConfig_ZoneAwareLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 8, 0} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 10, 0} } -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetRoutingEnabled() *v34.Percent { +func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetRoutingEnabled() *v33.Percent { if x != nil { return x.RoutingEnabled } @@ -2700,7 +2910,7 @@ type Cluster_CommonLbConfig_LocalityWeightedLbConfig struct { func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Reset() { *x = Cluster_CommonLbConfig_LocalityWeightedLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[21] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2713,7 +2923,7 @@ func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) String() string { func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoMessage() {} func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[21] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2726,7 +2936,7 @@ func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoReflect() protore // Deprecated: Use Cluster_CommonLbConfig_LocalityWeightedLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 8, 1} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 10, 1} } // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) @@ -2762,7 +2972,7 @@ type Cluster_CommonLbConfig_ConsistentHashingLbConfig struct { func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Reset() { *x = Cluster_CommonLbConfig_ConsistentHashingLbConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[22] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2775,7 +2985,7 @@ func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) String() string { func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoMessage() {} func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[22] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2788,7 +2998,7 @@ func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoReflect() protor // Deprecated: Use Cluster_CommonLbConfig_ConsistentHashingLbConfig.ProtoReflect.Descriptor instead. func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 8, 2} + return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{1, 10, 2} } func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) GetUseHostnameForHashing() bool { @@ -2810,17 +3020,13 @@ type LoadBalancingPolicy_Policy struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Required. The name of the LB policy. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3" json:"hidden_envoy_deprecated_config,omitempty"` + TypedExtensionConfig *v32.TypedExtensionConfig `protobuf:"bytes,4,opt,name=typed_extension_config,json=typedExtensionConfig,proto3" json:"typed_extension_config,omitempty"` } func (x *LoadBalancingPolicy_Policy) Reset() { *x = LoadBalancingPolicy_Policy{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[23] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2833,7 +3039,7 @@ func (x *LoadBalancingPolicy_Policy) String() string { func (*LoadBalancingPolicy_Policy) ProtoMessage() {} func (x *LoadBalancingPolicy_Policy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[23] + mi := &file_envoy_config_cluster_v3_cluster_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2849,24 +3055,9 @@ func (*LoadBalancingPolicy_Policy) Descriptor() ([]byte, []int) { return file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP(), []int{2, 0} } -func (x *LoadBalancingPolicy_Policy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *LoadBalancingPolicy_Policy) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -// Deprecated: Do not use. -func (x *LoadBalancingPolicy_Policy) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { +func (x *LoadBalancingPolicy_Policy) GetTypedExtensionConfig() *v32.TypedExtensionConfig { if x != nil { - return x.HiddenEnvoyDeprecatedConfig + return x.TypedExtensionConfig } return nil } @@ -2900,13 +3091,12 @@ var file_envoy_config_cluster_v3_cluster_proto_rawDesc = []byte{ 0x33, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, @@ -2935,7 +3125,7 @@ var file_envoy_config_cluster_v3_cluster_proto_rawDesc = []byte{ 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, - 0xc8, 0x4b, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x18, 0x74, + 0x8c, 0x50, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, @@ -2944,655 +3134,701 @@ var file_envoy_config_cluster_v3_cluster_proto_rawDesc = []byte{ 0x61, 0x74, 0x63, 0x68, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x6c, 0x74, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, - 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x26, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x42, 0x1a, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x14, 0x0a, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x0b, 0x61, 0x6c, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, 0x0c, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x45, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x10, 0x65, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, + 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x6f, 0x0a, 0x21, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, + 0x02, 0x10, 0x01, 0x52, 0x1d, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6c, 0x62, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x58, 0x0a, 0x0f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x73, 0x73, + 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, + 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, + 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x68, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, + 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x53, 0x0a, 0x10, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, + 0x6b, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, + 0x6b, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, + 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x1e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, + 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x1b, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x77, 0x0a, 0x1c, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0b, 0x18, 0x01, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6b, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x68, 0x74, + 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x74, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x12, 0x18, + 0x01, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x10, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, + 0x30, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x20, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x24, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x65, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1d, 0x74, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x6f, 0x0a, 0x21, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, - 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x10, 0x01, 0x52, 0x1d, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x07, - 0x52, 0x08, 0x6c, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x58, 0x0a, 0x0f, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x21, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0c, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x5b, 0x0a, 0x1b, - 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x10, 0x63, 0x69, 0x72, - 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, - 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x7a, - 0x0a, 0x1e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x1b, 0x75, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6e, 0x0a, 0x1c, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, + 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0e, 0x64, 0x6e, 0x73, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x64, 0x6e, 0x73, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, + 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x5f, + 0x74, 0x74, 0x6c, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x65, + 0x63, 0x74, 0x44, 0x6e, 0x73, 0x54, 0x74, 0x6c, 0x12, 0x66, 0x0a, 0x11, 0x64, 0x6e, 0x73, 0x5f, + 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0f, 0x64, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, + 0x12, 0x4f, 0x0a, 0x0d, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, + 0x33, 0x2e, 0x30, 0x52, 0x0c, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x12, 0x41, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, + 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x2d, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, + 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x35, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0b, + 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x64, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x65, 0x0a, 0x19, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x37, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x16, 0x74, 0x79, 0x70, 0x65, 0x64, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, + 0x66, 0x6f, 0x72, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x69, 0x74, + 0x18, 0x36, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x11, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x57, 0x61, 0x72, 0x6d, 0x4f, + 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x56, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, + 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, 0x0a, 0x15, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6b, - 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x09, 0x18, 0x01, 0x8a, 0x93, - 0xb7, 0x2a, 0x02, 0x10, 0x01, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x20, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1d, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x10, 0x64, 0x6e, - 0x73, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0e, 0x64, - 0x6e, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x65, 0x0a, - 0x18, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, - 0x6e, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, - 0x52, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x5f, - 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, - 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x44, 0x6e, 0x73, 0x54, 0x74, 0x6c, 0x12, 0x66, 0x0a, 0x11, - 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, - 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, - 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x72, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, + 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x75, 0x74, + 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, + 0x10, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0f, 0x63, 0x6c, + 0x65, 0x61, 0x6e, 0x75, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x52, 0x0a, + 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x64, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, - 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x73, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, - 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x56, - 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x76, 0x33, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x59, 0x0a, 0x10, 0x6c, 0x62, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, + 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x6c, 0x62, + 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x13, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x10, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, - 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0f, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x52, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x69, 0x6e, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x10, 0x6c, 0x62, - 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x16, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x6c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x13, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x10, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, - 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x10, 0x6d, 0x61, 0x67, - 0x6c, 0x65, 0x76, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x34, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, 0x62, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, 0x62, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, 0x16, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x13, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x6e, 0x0a, 0x17, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x25, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x14, 0x6c, - 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6c, 0x62, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, + 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x10, + 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x5b, 0x0a, 0x10, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x34, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x67, + 0x6c, 0x65, 0x76, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x0e, 0x6d, + 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, + 0x16, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x6c, 0x62, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, - 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, - 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x19, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x6c, 0x0a, 0x12, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x72, 0x0a, 0x1b, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, - 0x0a, 0x28, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x23, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x60, 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x29, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x0a, 0x6c, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x6c, 0x72, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x63, 0x6b, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, - 0x18, 0x2f, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x63, - 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x12, - 0x53, 0x0a, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x31, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x11, 0x74, - 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x12, 0x5e, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, + 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6e, 0x0a, 0x17, 0x6c, 0x65, + 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x62, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, - 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x10, - 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x58, 0x0a, 0x29, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x6f, 0x6f, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x33, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x25, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x6f, 0x6c, 0x50, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x1d, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x1a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x12, 0x95, 0x01, 0x0a, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6c, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0x18, - 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, - 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x6c, - 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0xc8, 0x01, 0x0a, 0x32, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, - 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x2d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x1a, 0xe6, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x04, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x65, + 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x48, 0x01, 0x52, 0x14, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, 0x15, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x75, 0x6e, + 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, + 0x52, 0x12, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x4c, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6c, + 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x50, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x19, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x75, 0x0a, + 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, + 0x30, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x72, 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x28, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x23, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, + 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, + 0x40, 0x0a, 0x1d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, + 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x28, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x60, 0x0a, 0x15, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, + 0x0a, 0x0a, 0x6c, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x2a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x6c, 0x72, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x12, 0x3f, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x74, + 0x72, 0x61, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x73, 0x12, 0x53, 0x0a, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x6b, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x31, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x5e, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x10, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x58, 0x0a, 0x29, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x33, 0x20, 0x01, 0x28, 0x08, 0x52, 0x25, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xe6, 0x01, + 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x50, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x98, 0x01, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, - 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x98, 0x01, 0x0a, - 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, - 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x1a, 0xa6, 0x01, 0x0a, 0x10, 0x45, 0x64, 0x73, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0a, - 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x65, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x45, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0xc0, 0x08, 0x0a, 0x0e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x79, 0x0a, 0x0f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, - 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, - 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, - 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3e, - 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x6b, - 0x0a, 0x10, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, - 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x61, - 0x77, 0x61, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, - 0x32, 0x0a, 0x15, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x73, 0x63, 0x61, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x61, 0x6e, - 0x69, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x69, 0x73, - 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x6c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x41, 0x6e, 0x79, 0x1a, 0xda, 0x03, 0x0a, 0x10, 0x4c, 0x62, - 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, - 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, - 0x79, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x65, - 0x72, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x92, 0x01, 0x0a, 0x0f, 0x66, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x5f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x66, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x30, 0x0a, 0x14, - 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x66, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x22, 0x79, - 0x0a, 0x1e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, - 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x4e, 0x59, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, - 0x4e, 0x54, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, - 0x53, 0x55, 0x42, 0x53, 0x45, 0x54, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x59, 0x53, - 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, 0x54, 0x10, 0x04, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, - 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x4f, 0x0a, 0x16, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, - 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x4e, 0x59, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, - 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, - 0x55, 0x42, 0x53, 0x45, 0x54, 0x10, 0x02, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x1a, 0xa6, 0x01, 0x0a, 0x10, 0x45, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0a, 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, + 0x65, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x2c, 0x9a, 0xc5, + 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x64, 0x73, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc0, 0x08, 0x0a, 0x0e, 0x4c, + 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x79, 0x0a, + 0x0f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, + 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3e, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, 0x6b, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x73, + 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x1a, 0xe7, 0x01, 0x0a, 0x14, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0c, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x02, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x69, 0x61, 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, - 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x91, 0x03, - 0x0a, 0x10, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, - 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x6d, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, - 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x61, - 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2e, 0x0a, - 0x0c, 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, - 0x07, 0x58, 0x58, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x55, - 0x52, 0x4d, 0x55, 0x52, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x32, 0x10, 0x01, 0x3a, 0x2c, 0x9a, - 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, - 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x02, 0x10, - 0x03, 0x1a, 0x4d, 0x0a, 0x0e, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x1a, 0x6e, 0x0a, 0x13, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, - 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x5f, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x75, 0x73, 0x65, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, - 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0xfc, 0x0a, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x17, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, - 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x15, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x74, 0x0a, 0x14, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x61, 0x77, 0x61, 0x72, - 0x65, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x11, 0x7a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, - 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x89, 0x01, 0x0a, 0x1b, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, - 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x18, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x12, 0x43, 0x0a, 0x1f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, - 0x5f, 0x68, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x67, 0x6e, 0x6f, 0x72, - 0x65, 0x4e, 0x65, 0x77, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x46, 0x69, - 0x72, 0x73, 0x74, 0x48, 0x63, 0x12, 0x4d, 0x0a, 0x24, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x62, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x63, 0x61, + 0x6c, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x4c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, + 0x0e, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x4d, 0x6f, 0x64, 0x65, + 0x41, 0x6e, 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x61, + 0x6e, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x73, + 0x41, 0x6e, 0x79, 0x1a, 0xda, 0x03, 0x0a, 0x10, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x33, 0x0a, 0x16, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x65, + 0x74, 0x12, 0x92, 0x01, 0x0a, 0x0f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x1a, 0x8d, 0x02, 0x0a, 0x11, 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, - 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x31, 0x0a, 0x15, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x12, 0x66, 0x61, 0x69, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4f, 0x6e, 0x50, 0x61, - 0x6e, 0x69, 0x63, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, + 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, + 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x62, + 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x61, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x4b, 0x65, + 0x79, 0x73, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x22, 0x79, 0x0a, 0x1e, 0x4c, 0x62, 0x53, 0x75, + 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x61, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, + 0x54, 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, + 0x4f, 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x41, 0x4e, 0x59, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x12, + 0x0a, 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, 0x54, + 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, + 0x54, 0x10, 0x04, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x1a, 0x5f, 0x0a, 0x18, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x43, 0x9a, - 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x22, 0x4f, 0x0a, 0x16, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x46, 0x61, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, + 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, + 0x4e, 0x59, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, 0x54, 0x10, + 0x02, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, + 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe3, 0x01, + 0x0a, 0x0f, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x45, 0x0a, 0x11, 0x73, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x52, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, + 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x1a, 0x72, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, + 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x11, 0x73, 0x6c, 0x6f, + 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc5, 0x02, 0x0a, 0x14, 0x4c, 0x65, 0x61, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x48, 0x0a, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x02, 0x52, 0x0b, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x61, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x11, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x69, 0x61, 0x73, 0x12, + 0x5c, 0x0a, 0x11, 0x73, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x6c, 0x6f, + 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x73, 0x6c, + 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x30, 0x9a, + 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, + 0x91, 0x03, 0x0a, 0x10, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, + 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, + 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x6d, 0x0a, 0x0d, 0x68, 0x61, + 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, + 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, + 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, + 0x2e, 0x0a, 0x0c, 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0b, 0x0a, 0x07, 0x58, 0x58, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, + 0x4d, 0x55, 0x52, 0x4d, 0x55, 0x52, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x32, 0x10, 0x01, 0x3a, + 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, + 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, + 0x02, 0x10, 0x03, 0x1a, 0x59, 0x0a, 0x0e, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, 0x62, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0xcb, + 0x96, 0xb1, 0x02, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x98, + 0x01, 0x0a, 0x13, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0d, 0x75, 0x73, 0x65, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x28, + 0x0a, 0x10, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, + 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, + 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xd5, 0x0b, 0x0a, 0x0e, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x17, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x61, + 0x6e, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x74, 0x0a, 0x14, + 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, + 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x11, 0x7a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x89, 0x01, 0x0a, 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x1a, 0xf1, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x37, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x15, 0x75, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x46, - 0x6f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x13, 0x68, 0x61, 0x73, - 0x68, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x64, 0x52, 0x11, 0x68, - 0x61, 0x73, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x1b, 0x0a, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, - 0xd2, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x4e, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x2a, 0x04, 0x10, 0xc0, 0x84, - 0x3d, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x4a, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, - 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x27, 0x9a, 0xc5, 0x88, - 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, - 0x52, 0x61, 0x74, 0x65, 0x1a, 0x83, 0x02, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x78, 0x0a, 0x1d, 0x70, 0x65, 0x72, - 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x17, - 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x29, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x55, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x61, - 0x74, 0x69, 0x6f, 0x12, 0x75, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x52, - 0x19, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x1a, 0x66, 0x0a, 0x22, 0x54, 0x79, - 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x79, 0x0a, 0x32, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, - 0x0d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, - 0x52, 0x49, 0x43, 0x54, 0x5f, 0x44, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, - 0x47, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x44, 0x4e, 0x53, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x45, - 0x44, 0x53, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, - 0x5f, 0x44, 0x53, 0x54, 0x10, 0x04, 0x22, 0xc4, 0x01, 0x0a, 0x08, 0x4c, 0x62, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x4f, 0x42, - 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x45, 0x41, 0x53, 0x54, 0x5f, 0x52, 0x45, - 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x49, 0x4e, 0x47, 0x5f, - 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, - 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, 0x47, 0x4c, 0x45, 0x56, 0x10, 0x05, 0x12, 0x14, - 0x0a, 0x10, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, - 0x45, 0x44, 0x10, 0x06, 0x12, 0x20, 0x0a, 0x1c, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, - 0x41, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x43, 0x4f, - 0x4e, 0x46, 0x49, 0x47, 0x10, 0x07, 0x12, 0x35, 0x0a, 0x27, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x4c, - 0x42, 0x10, 0x04, 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, 0x22, 0x35, 0x0a, - 0x0f, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, - 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x34, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x36, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x02, 0x22, 0x54, 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, - 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x1b, 0x0a, - 0x17, 0x55, 0x53, 0x45, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, - 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x01, 0x3a, 0x1b, 0x9a, 0xc5, 0x88, 0x1e, - 0x16, 0x0a, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, - 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x22, 0xf9, 0x02, 0x0a, 0x13, 0x4c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x1a, 0xe7, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x1e, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2e, 0x9a, - 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x27, 0x9a, + 0x69, 0x67, 0x48, 0x00, 0x52, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, + 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x72, 0x67, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x43, 0x0a, 0x1f, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x75, 0x6e, + 0x74, 0x69, 0x6c, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x68, 0x63, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4e, 0x65, 0x77, 0x48, 0x6f, 0x73, + 0x74, 0x73, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x46, 0x69, 0x72, 0x73, 0x74, 0x48, 0x63, 0x12, 0x4d, + 0x0a, 0x24, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6c, + 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x6e, + 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x8a, 0x01, + 0x0a, 0x1c, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x57, 0x0a, 0x14, 0x6f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x65, 0x74, 0x52, + 0x12, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x1a, 0x8d, 0x02, 0x0a, 0x11, 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, + 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x6d, 0x69, + 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4f, 0x6e, + 0x50, 0x61, 0x6e, 0x69, 0x63, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0x5f, 0x0a, 0x18, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, + 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xf1, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x37, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, + 0x65, 0x46, 0x6f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x13, 0x68, + 0x61, 0x73, 0x68, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x64, 0x52, + 0x11, 0x68, 0x61, 0x73, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, + 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1b, 0x0a, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x1a, 0xd2, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, + 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x2a, 0x04, 0x10, + 0xc0, 0x84, 0x3d, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, + 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, - 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x93, 0x01, 0x0a, 0x19, - 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x0d, 0x74, 0x63, 0x70, - 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, - 0x6c, 0x69, 0x76, 0x65, 0x52, 0x0c, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, - 0x76, 0x65, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x72, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x12, - 0x34, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x73, 0x42, 0x3f, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x1a, 0x83, 0x02, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x78, 0x0a, 0x1d, 0x70, + 0x65, 0x72, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x75, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x3f, 0x52, 0x19, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x1a, 0x66, 0x0a, 0x22, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, + 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x5f, 0x44, 0x4e, 0x53, 0x10, + 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x44, 0x4e, 0x53, + 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x44, 0x53, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4f, + 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x53, 0x54, 0x10, 0x04, 0x22, 0xa4, 0x01, + 0x0a, 0x08, 0x4c, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, + 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x4f, 0x42, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4c, + 0x45, 0x41, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, 0x47, + 0x4c, 0x45, 0x56, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, + 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x10, 0x06, 0x12, 0x20, 0x0a, 0x1c, 0x4c, + 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, + 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x07, 0x22, 0x04, 0x08, + 0x04, 0x10, 0x04, 0x2a, 0x0f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x53, + 0x54, 0x5f, 0x4c, 0x42, 0x22, 0x50, 0x0a, 0x0f, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x34, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x56, 0x36, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x56, + 0x34, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x45, 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, + 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x04, 0x22, 0x54, 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, + 0x55, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x12, + 0x1b, 0x0a, 0x17, 0x55, 0x53, 0x45, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, + 0x4d, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x01, 0x3a, 0x1b, 0x9a, 0xc5, + 0x88, 0x1e, 0x16, 0x0a, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x07, + 0x10, 0x08, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x23, 0x10, 0x24, 0x52, 0x05, + 0x68, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x52, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xda, + 0x02, 0x0a, 0x13, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, 0xc8, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x60, 0x0a, 0x16, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x14, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x82, 0x01, 0x0a, 0x12, + 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x44, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, + 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0xf9, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, + 0x0a, 0x0d, 0x74, 0x63, 0x70, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, + 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x0c, 0x74, 0x63, 0x70, 0x4b, 0x65, + 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x12, 0x64, 0x0a, 0x30, 0x73, 0x65, 0x74, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x2a, 0x73, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4f, 0x6e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2d, 0x9a, + 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x72, 0x0a, 0x11, + 0x54, 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x73, + 0x42, 0x89, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3608,7 +3844,7 @@ func file_envoy_config_cluster_v3_cluster_proto_rawDescGZIP() []byte { } var file_envoy_config_cluster_v3_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_envoy_config_cluster_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_envoy_config_cluster_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_envoy_config_cluster_v3_cluster_proto_goTypes = []interface{}{ (Cluster_DiscoveryType)(0), // 0: envoy.config.cluster.v3.Cluster.DiscoveryType (Cluster_LbPolicy)(0), // 1: envoy.config.cluster.v3.Cluster.LbPolicy @@ -3627,129 +3863,137 @@ var file_envoy_config_cluster_v3_cluster_proto_goTypes = []interface{}{ (*Cluster_CustomClusterType)(nil), // 14: envoy.config.cluster.v3.Cluster.CustomClusterType (*Cluster_EdsClusterConfig)(nil), // 15: envoy.config.cluster.v3.Cluster.EdsClusterConfig (*Cluster_LbSubsetConfig)(nil), // 16: envoy.config.cluster.v3.Cluster.LbSubsetConfig - (*Cluster_LeastRequestLbConfig)(nil), // 17: envoy.config.cluster.v3.Cluster.LeastRequestLbConfig - (*Cluster_RingHashLbConfig)(nil), // 18: envoy.config.cluster.v3.Cluster.RingHashLbConfig - (*Cluster_MaglevLbConfig)(nil), // 19: envoy.config.cluster.v3.Cluster.MaglevLbConfig - (*Cluster_OriginalDstLbConfig)(nil), // 20: envoy.config.cluster.v3.Cluster.OriginalDstLbConfig - (*Cluster_CommonLbConfig)(nil), // 21: envoy.config.cluster.v3.Cluster.CommonLbConfig - (*Cluster_RefreshRate)(nil), // 22: envoy.config.cluster.v3.Cluster.RefreshRate - (*Cluster_PreconnectPolicy)(nil), // 23: envoy.config.cluster.v3.Cluster.PreconnectPolicy - nil, // 24: envoy.config.cluster.v3.Cluster.TypedExtensionProtocolOptionsEntry - nil, // 25: envoy.config.cluster.v3.Cluster.HiddenEnvoyDeprecatedExtensionProtocolOptionsEntry - (*Cluster_LbSubsetConfig_LbSubsetSelector)(nil), // 26: envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector - (*Cluster_CommonLbConfig_ZoneAwareLbConfig)(nil), // 27: envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig - (*Cluster_CommonLbConfig_LocalityWeightedLbConfig)(nil), // 28: envoy.config.cluster.v3.Cluster.CommonLbConfig.LocalityWeightedLbConfig - (*Cluster_CommonLbConfig_ConsistentHashingLbConfig)(nil), // 29: envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig - (*LoadBalancingPolicy_Policy)(nil), // 30: envoy.config.cluster.v3.LoadBalancingPolicy.Policy - (*v3.CollectionEntry)(nil), // 31: xds.core.v3.CollectionEntry - (*duration.Duration)(nil), // 32: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 33: google.protobuf.UInt32Value - (*v31.ClusterLoadAssignment)(nil), // 34: envoy.config.endpoint.v3.ClusterLoadAssignment - (*v32.HealthCheck)(nil), // 35: envoy.config.core.v3.HealthCheck - (*CircuitBreakers)(nil), // 36: envoy.config.cluster.v3.CircuitBreakers - (*v32.UpstreamHttpProtocolOptions)(nil), // 37: envoy.config.core.v3.UpstreamHttpProtocolOptions - (*v32.HttpProtocolOptions)(nil), // 38: envoy.config.core.v3.HttpProtocolOptions - (*v32.Http1ProtocolOptions)(nil), // 39: envoy.config.core.v3.Http1ProtocolOptions - (*v32.Http2ProtocolOptions)(nil), // 40: envoy.config.core.v3.Http2ProtocolOptions - (*v32.Address)(nil), // 41: envoy.config.core.v3.Address - (*OutlierDetection)(nil), // 42: envoy.config.cluster.v3.OutlierDetection - (*v32.BindConfig)(nil), // 43: envoy.config.core.v3.BindConfig - (*v32.TransportSocket)(nil), // 44: envoy.config.core.v3.TransportSocket - (*v32.Metadata)(nil), // 45: envoy.config.core.v3.Metadata - (*Filter)(nil), // 46: envoy.config.cluster.v3.Filter - (*v32.ConfigSource)(nil), // 47: envoy.config.core.v3.ConfigSource - (*v32.TypedExtensionConfig)(nil), // 48: envoy.config.core.v3.TypedExtensionConfig - (*v33.UpstreamTlsContext)(nil), // 49: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext - (*v32.TcpKeepalive)(nil), // 50: envoy.config.core.v3.TcpKeepalive - (*_struct.Struct)(nil), // 51: google.protobuf.Struct - (*any.Any)(nil), // 52: google.protobuf.Any - (*v32.RuntimeDouble)(nil), // 53: envoy.config.core.v3.RuntimeDouble - (*wrappers.UInt64Value)(nil), // 54: google.protobuf.UInt64Value - (*v34.Percent)(nil), // 55: envoy.type.v3.Percent - (*wrappers.DoubleValue)(nil), // 56: google.protobuf.DoubleValue + (*Cluster_SlowStartConfig)(nil), // 17: envoy.config.cluster.v3.Cluster.SlowStartConfig + (*Cluster_RoundRobinLbConfig)(nil), // 18: envoy.config.cluster.v3.Cluster.RoundRobinLbConfig + (*Cluster_LeastRequestLbConfig)(nil), // 19: envoy.config.cluster.v3.Cluster.LeastRequestLbConfig + (*Cluster_RingHashLbConfig)(nil), // 20: envoy.config.cluster.v3.Cluster.RingHashLbConfig + (*Cluster_MaglevLbConfig)(nil), // 21: envoy.config.cluster.v3.Cluster.MaglevLbConfig + (*Cluster_OriginalDstLbConfig)(nil), // 22: envoy.config.cluster.v3.Cluster.OriginalDstLbConfig + (*Cluster_CommonLbConfig)(nil), // 23: envoy.config.cluster.v3.Cluster.CommonLbConfig + (*Cluster_RefreshRate)(nil), // 24: envoy.config.cluster.v3.Cluster.RefreshRate + (*Cluster_PreconnectPolicy)(nil), // 25: envoy.config.cluster.v3.Cluster.PreconnectPolicy + nil, // 26: envoy.config.cluster.v3.Cluster.TypedExtensionProtocolOptionsEntry + (*Cluster_LbSubsetConfig_LbSubsetSelector)(nil), // 27: envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector + (*Cluster_CommonLbConfig_ZoneAwareLbConfig)(nil), // 28: envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig + (*Cluster_CommonLbConfig_LocalityWeightedLbConfig)(nil), // 29: envoy.config.cluster.v3.Cluster.CommonLbConfig.LocalityWeightedLbConfig + (*Cluster_CommonLbConfig_ConsistentHashingLbConfig)(nil), // 30: envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig + (*LoadBalancingPolicy_Policy)(nil), // 31: envoy.config.cluster.v3.LoadBalancingPolicy.Policy + (*v3.CollectionEntry)(nil), // 32: xds.core.v3.CollectionEntry + (*duration.Duration)(nil), // 33: google.protobuf.Duration + (*wrappers.UInt32Value)(nil), // 34: google.protobuf.UInt32Value + (*v31.ClusterLoadAssignment)(nil), // 35: envoy.config.endpoint.v3.ClusterLoadAssignment + (*v32.HealthCheck)(nil), // 36: envoy.config.core.v3.HealthCheck + (*CircuitBreakers)(nil), // 37: envoy.config.cluster.v3.CircuitBreakers + (*v32.UpstreamHttpProtocolOptions)(nil), // 38: envoy.config.core.v3.UpstreamHttpProtocolOptions + (*v32.HttpProtocolOptions)(nil), // 39: envoy.config.core.v3.HttpProtocolOptions + (*v32.Http1ProtocolOptions)(nil), // 40: envoy.config.core.v3.Http1ProtocolOptions + (*v32.Http2ProtocolOptions)(nil), // 41: envoy.config.core.v3.Http2ProtocolOptions + (*v32.Address)(nil), // 42: envoy.config.core.v3.Address + (*v32.DnsResolutionConfig)(nil), // 43: envoy.config.core.v3.DnsResolutionConfig + (*v32.TypedExtensionConfig)(nil), // 44: envoy.config.core.v3.TypedExtensionConfig + (*wrappers.BoolValue)(nil), // 45: google.protobuf.BoolValue + (*OutlierDetection)(nil), // 46: envoy.config.cluster.v3.OutlierDetection + (*v32.BindConfig)(nil), // 47: envoy.config.core.v3.BindConfig + (*v32.TransportSocket)(nil), // 48: envoy.config.core.v3.TransportSocket + (*v32.Metadata)(nil), // 49: envoy.config.core.v3.Metadata + (*Filter)(nil), // 50: envoy.config.cluster.v3.Filter + (*v32.ConfigSource)(nil), // 51: envoy.config.core.v3.ConfigSource + (*v32.TcpKeepalive)(nil), // 52: envoy.config.core.v3.TcpKeepalive + (*_struct.Struct)(nil), // 53: google.protobuf.Struct + (*any.Any)(nil), // 54: google.protobuf.Any + (*v32.RuntimeDouble)(nil), // 55: envoy.config.core.v3.RuntimeDouble + (*v33.Percent)(nil), // 56: envoy.type.v3.Percent + (*wrappers.UInt64Value)(nil), // 57: google.protobuf.UInt64Value + (*v32.HealthStatusSet)(nil), // 58: envoy.config.core.v3.HealthStatusSet + (*wrappers.DoubleValue)(nil), // 59: google.protobuf.DoubleValue } var file_envoy_config_cluster_v3_cluster_proto_depIdxs = []int32{ - 31, // 0: envoy.config.cluster.v3.ClusterCollection.entries:type_name -> xds.core.v3.CollectionEntry + 32, // 0: envoy.config.cluster.v3.ClusterCollection.entries:type_name -> xds.core.v3.CollectionEntry 13, // 1: envoy.config.cluster.v3.Cluster.transport_socket_matches:type_name -> envoy.config.cluster.v3.Cluster.TransportSocketMatch 0, // 2: envoy.config.cluster.v3.Cluster.type:type_name -> envoy.config.cluster.v3.Cluster.DiscoveryType 14, // 3: envoy.config.cluster.v3.Cluster.cluster_type:type_name -> envoy.config.cluster.v3.Cluster.CustomClusterType 15, // 4: envoy.config.cluster.v3.Cluster.eds_cluster_config:type_name -> envoy.config.cluster.v3.Cluster.EdsClusterConfig - 32, // 5: envoy.config.cluster.v3.Cluster.connect_timeout:type_name -> google.protobuf.Duration - 33, // 6: envoy.config.cluster.v3.Cluster.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value + 33, // 5: envoy.config.cluster.v3.Cluster.connect_timeout:type_name -> google.protobuf.Duration + 34, // 6: envoy.config.cluster.v3.Cluster.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value 1, // 7: envoy.config.cluster.v3.Cluster.lb_policy:type_name -> envoy.config.cluster.v3.Cluster.LbPolicy - 34, // 8: envoy.config.cluster.v3.Cluster.load_assignment:type_name -> envoy.config.endpoint.v3.ClusterLoadAssignment - 35, // 9: envoy.config.cluster.v3.Cluster.health_checks:type_name -> envoy.config.core.v3.HealthCheck - 33, // 10: envoy.config.cluster.v3.Cluster.max_requests_per_connection:type_name -> google.protobuf.UInt32Value - 36, // 11: envoy.config.cluster.v3.Cluster.circuit_breakers:type_name -> envoy.config.cluster.v3.CircuitBreakers - 37, // 12: envoy.config.cluster.v3.Cluster.upstream_http_protocol_options:type_name -> envoy.config.core.v3.UpstreamHttpProtocolOptions - 38, // 13: envoy.config.cluster.v3.Cluster.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions - 39, // 14: envoy.config.cluster.v3.Cluster.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions - 40, // 15: envoy.config.cluster.v3.Cluster.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions - 24, // 16: envoy.config.cluster.v3.Cluster.typed_extension_protocol_options:type_name -> envoy.config.cluster.v3.Cluster.TypedExtensionProtocolOptionsEntry - 32, // 17: envoy.config.cluster.v3.Cluster.dns_refresh_rate:type_name -> google.protobuf.Duration - 22, // 18: envoy.config.cluster.v3.Cluster.dns_failure_refresh_rate:type_name -> envoy.config.cluster.v3.Cluster.RefreshRate + 35, // 8: envoy.config.cluster.v3.Cluster.load_assignment:type_name -> envoy.config.endpoint.v3.ClusterLoadAssignment + 36, // 9: envoy.config.cluster.v3.Cluster.health_checks:type_name -> envoy.config.core.v3.HealthCheck + 34, // 10: envoy.config.cluster.v3.Cluster.max_requests_per_connection:type_name -> google.protobuf.UInt32Value + 37, // 11: envoy.config.cluster.v3.Cluster.circuit_breakers:type_name -> envoy.config.cluster.v3.CircuitBreakers + 38, // 12: envoy.config.cluster.v3.Cluster.upstream_http_protocol_options:type_name -> envoy.config.core.v3.UpstreamHttpProtocolOptions + 39, // 13: envoy.config.cluster.v3.Cluster.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions + 40, // 14: envoy.config.cluster.v3.Cluster.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions + 41, // 15: envoy.config.cluster.v3.Cluster.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions + 26, // 16: envoy.config.cluster.v3.Cluster.typed_extension_protocol_options:type_name -> envoy.config.cluster.v3.Cluster.TypedExtensionProtocolOptionsEntry + 33, // 17: envoy.config.cluster.v3.Cluster.dns_refresh_rate:type_name -> google.protobuf.Duration + 24, // 18: envoy.config.cluster.v3.Cluster.dns_failure_refresh_rate:type_name -> envoy.config.cluster.v3.Cluster.RefreshRate 2, // 19: envoy.config.cluster.v3.Cluster.dns_lookup_family:type_name -> envoy.config.cluster.v3.Cluster.DnsLookupFamily - 41, // 20: envoy.config.cluster.v3.Cluster.dns_resolvers:type_name -> envoy.config.core.v3.Address - 42, // 21: envoy.config.cluster.v3.Cluster.outlier_detection:type_name -> envoy.config.cluster.v3.OutlierDetection - 32, // 22: envoy.config.cluster.v3.Cluster.cleanup_interval:type_name -> google.protobuf.Duration - 43, // 23: envoy.config.cluster.v3.Cluster.upstream_bind_config:type_name -> envoy.config.core.v3.BindConfig - 16, // 24: envoy.config.cluster.v3.Cluster.lb_subset_config:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig - 18, // 25: envoy.config.cluster.v3.Cluster.ring_hash_lb_config:type_name -> envoy.config.cluster.v3.Cluster.RingHashLbConfig - 19, // 26: envoy.config.cluster.v3.Cluster.maglev_lb_config:type_name -> envoy.config.cluster.v3.Cluster.MaglevLbConfig - 20, // 27: envoy.config.cluster.v3.Cluster.original_dst_lb_config:type_name -> envoy.config.cluster.v3.Cluster.OriginalDstLbConfig - 17, // 28: envoy.config.cluster.v3.Cluster.least_request_lb_config:type_name -> envoy.config.cluster.v3.Cluster.LeastRequestLbConfig - 21, // 29: envoy.config.cluster.v3.Cluster.common_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig - 44, // 30: envoy.config.cluster.v3.Cluster.transport_socket:type_name -> envoy.config.core.v3.TransportSocket - 45, // 31: envoy.config.cluster.v3.Cluster.metadata:type_name -> envoy.config.core.v3.Metadata - 3, // 32: envoy.config.cluster.v3.Cluster.protocol_selection:type_name -> envoy.config.cluster.v3.Cluster.ClusterProtocolSelection - 11, // 33: envoy.config.cluster.v3.Cluster.upstream_connection_options:type_name -> envoy.config.cluster.v3.UpstreamConnectionOptions - 46, // 34: envoy.config.cluster.v3.Cluster.filters:type_name -> envoy.config.cluster.v3.Filter - 9, // 35: envoy.config.cluster.v3.Cluster.load_balancing_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy - 47, // 36: envoy.config.cluster.v3.Cluster.lrs_server:type_name -> envoy.config.core.v3.ConfigSource - 48, // 37: envoy.config.cluster.v3.Cluster.upstream_config:type_name -> envoy.config.core.v3.TypedExtensionConfig - 12, // 38: envoy.config.cluster.v3.Cluster.track_cluster_stats:type_name -> envoy.config.cluster.v3.TrackClusterStats - 23, // 39: envoy.config.cluster.v3.Cluster.preconnect_policy:type_name -> envoy.config.cluster.v3.Cluster.PreconnectPolicy - 41, // 40: envoy.config.cluster.v3.Cluster.hidden_envoy_deprecated_hosts:type_name -> envoy.config.core.v3.Address - 49, // 41: envoy.config.cluster.v3.Cluster.hidden_envoy_deprecated_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext - 25, // 42: envoy.config.cluster.v3.Cluster.hidden_envoy_deprecated_extension_protocol_options:type_name -> envoy.config.cluster.v3.Cluster.HiddenEnvoyDeprecatedExtensionProtocolOptionsEntry - 30, // 43: envoy.config.cluster.v3.LoadBalancingPolicy.policies:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy.Policy - 41, // 44: envoy.config.cluster.v3.UpstreamBindConfig.source_address:type_name -> envoy.config.core.v3.Address - 50, // 45: envoy.config.cluster.v3.UpstreamConnectionOptions.tcp_keepalive:type_name -> envoy.config.core.v3.TcpKeepalive - 51, // 46: envoy.config.cluster.v3.Cluster.TransportSocketMatch.match:type_name -> google.protobuf.Struct - 44, // 47: envoy.config.cluster.v3.Cluster.TransportSocketMatch.transport_socket:type_name -> envoy.config.core.v3.TransportSocket - 52, // 48: envoy.config.cluster.v3.Cluster.CustomClusterType.typed_config:type_name -> google.protobuf.Any - 47, // 49: envoy.config.cluster.v3.Cluster.EdsClusterConfig.eds_config:type_name -> envoy.config.core.v3.ConfigSource - 4, // 50: envoy.config.cluster.v3.Cluster.LbSubsetConfig.fallback_policy:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy - 51, // 51: envoy.config.cluster.v3.Cluster.LbSubsetConfig.default_subset:type_name -> google.protobuf.Struct - 26, // 52: envoy.config.cluster.v3.Cluster.LbSubsetConfig.subset_selectors:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector - 33, // 53: envoy.config.cluster.v3.Cluster.LeastRequestLbConfig.choice_count:type_name -> google.protobuf.UInt32Value - 53, // 54: envoy.config.cluster.v3.Cluster.LeastRequestLbConfig.active_request_bias:type_name -> envoy.config.core.v3.RuntimeDouble - 54, // 55: envoy.config.cluster.v3.Cluster.RingHashLbConfig.minimum_ring_size:type_name -> google.protobuf.UInt64Value - 6, // 56: envoy.config.cluster.v3.Cluster.RingHashLbConfig.hash_function:type_name -> envoy.config.cluster.v3.Cluster.RingHashLbConfig.HashFunction - 54, // 57: envoy.config.cluster.v3.Cluster.RingHashLbConfig.maximum_ring_size:type_name -> google.protobuf.UInt64Value - 54, // 58: envoy.config.cluster.v3.Cluster.MaglevLbConfig.table_size:type_name -> google.protobuf.UInt64Value - 55, // 59: envoy.config.cluster.v3.Cluster.CommonLbConfig.healthy_panic_threshold:type_name -> envoy.type.v3.Percent - 27, // 60: envoy.config.cluster.v3.Cluster.CommonLbConfig.zone_aware_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig - 28, // 61: envoy.config.cluster.v3.Cluster.CommonLbConfig.locality_weighted_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig.LocalityWeightedLbConfig - 32, // 62: envoy.config.cluster.v3.Cluster.CommonLbConfig.update_merge_window:type_name -> google.protobuf.Duration - 29, // 63: envoy.config.cluster.v3.Cluster.CommonLbConfig.consistent_hashing_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig - 32, // 64: envoy.config.cluster.v3.Cluster.RefreshRate.base_interval:type_name -> google.protobuf.Duration - 32, // 65: envoy.config.cluster.v3.Cluster.RefreshRate.max_interval:type_name -> google.protobuf.Duration - 56, // 66: envoy.config.cluster.v3.Cluster.PreconnectPolicy.per_upstream_preconnect_ratio:type_name -> google.protobuf.DoubleValue - 56, // 67: envoy.config.cluster.v3.Cluster.PreconnectPolicy.predictive_preconnect_ratio:type_name -> google.protobuf.DoubleValue - 52, // 68: envoy.config.cluster.v3.Cluster.TypedExtensionProtocolOptionsEntry.value:type_name -> google.protobuf.Any - 51, // 69: envoy.config.cluster.v3.Cluster.HiddenEnvoyDeprecatedExtensionProtocolOptionsEntry.value:type_name -> google.protobuf.Struct - 5, // 70: envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.fallback_policy:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy - 55, // 71: envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig.routing_enabled:type_name -> envoy.type.v3.Percent - 54, // 72: envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig.min_cluster_size:type_name -> google.protobuf.UInt64Value - 33, // 73: envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig.hash_balance_factor:type_name -> google.protobuf.UInt32Value - 52, // 74: envoy.config.cluster.v3.LoadBalancingPolicy.Policy.typed_config:type_name -> google.protobuf.Any - 51, // 75: envoy.config.cluster.v3.LoadBalancingPolicy.Policy.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 76, // [76:76] is the sub-list for method output_type - 76, // [76:76] is the sub-list for method input_type - 76, // [76:76] is the sub-list for extension type_name - 76, // [76:76] is the sub-list for extension extendee - 0, // [0:76] is the sub-list for field type_name + 42, // 20: envoy.config.cluster.v3.Cluster.dns_resolvers:type_name -> envoy.config.core.v3.Address + 43, // 21: envoy.config.cluster.v3.Cluster.dns_resolution_config:type_name -> envoy.config.core.v3.DnsResolutionConfig + 44, // 22: envoy.config.cluster.v3.Cluster.typed_dns_resolver_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 45, // 23: envoy.config.cluster.v3.Cluster.wait_for_warm_on_init:type_name -> google.protobuf.BoolValue + 46, // 24: envoy.config.cluster.v3.Cluster.outlier_detection:type_name -> envoy.config.cluster.v3.OutlierDetection + 33, // 25: envoy.config.cluster.v3.Cluster.cleanup_interval:type_name -> google.protobuf.Duration + 47, // 26: envoy.config.cluster.v3.Cluster.upstream_bind_config:type_name -> envoy.config.core.v3.BindConfig + 16, // 27: envoy.config.cluster.v3.Cluster.lb_subset_config:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig + 20, // 28: envoy.config.cluster.v3.Cluster.ring_hash_lb_config:type_name -> envoy.config.cluster.v3.Cluster.RingHashLbConfig + 21, // 29: envoy.config.cluster.v3.Cluster.maglev_lb_config:type_name -> envoy.config.cluster.v3.Cluster.MaglevLbConfig + 22, // 30: envoy.config.cluster.v3.Cluster.original_dst_lb_config:type_name -> envoy.config.cluster.v3.Cluster.OriginalDstLbConfig + 19, // 31: envoy.config.cluster.v3.Cluster.least_request_lb_config:type_name -> envoy.config.cluster.v3.Cluster.LeastRequestLbConfig + 18, // 32: envoy.config.cluster.v3.Cluster.round_robin_lb_config:type_name -> envoy.config.cluster.v3.Cluster.RoundRobinLbConfig + 23, // 33: envoy.config.cluster.v3.Cluster.common_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig + 48, // 34: envoy.config.cluster.v3.Cluster.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 49, // 35: envoy.config.cluster.v3.Cluster.metadata:type_name -> envoy.config.core.v3.Metadata + 3, // 36: envoy.config.cluster.v3.Cluster.protocol_selection:type_name -> envoy.config.cluster.v3.Cluster.ClusterProtocolSelection + 11, // 37: envoy.config.cluster.v3.Cluster.upstream_connection_options:type_name -> envoy.config.cluster.v3.UpstreamConnectionOptions + 50, // 38: envoy.config.cluster.v3.Cluster.filters:type_name -> envoy.config.cluster.v3.Filter + 9, // 39: envoy.config.cluster.v3.Cluster.load_balancing_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy + 51, // 40: envoy.config.cluster.v3.Cluster.lrs_server:type_name -> envoy.config.core.v3.ConfigSource + 44, // 41: envoy.config.cluster.v3.Cluster.upstream_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 12, // 42: envoy.config.cluster.v3.Cluster.track_cluster_stats:type_name -> envoy.config.cluster.v3.TrackClusterStats + 25, // 43: envoy.config.cluster.v3.Cluster.preconnect_policy:type_name -> envoy.config.cluster.v3.Cluster.PreconnectPolicy + 31, // 44: envoy.config.cluster.v3.LoadBalancingPolicy.policies:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy.Policy + 42, // 45: envoy.config.cluster.v3.UpstreamBindConfig.source_address:type_name -> envoy.config.core.v3.Address + 52, // 46: envoy.config.cluster.v3.UpstreamConnectionOptions.tcp_keepalive:type_name -> envoy.config.core.v3.TcpKeepalive + 53, // 47: envoy.config.cluster.v3.Cluster.TransportSocketMatch.match:type_name -> google.protobuf.Struct + 48, // 48: envoy.config.cluster.v3.Cluster.TransportSocketMatch.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 54, // 49: envoy.config.cluster.v3.Cluster.CustomClusterType.typed_config:type_name -> google.protobuf.Any + 51, // 50: envoy.config.cluster.v3.Cluster.EdsClusterConfig.eds_config:type_name -> envoy.config.core.v3.ConfigSource + 4, // 51: envoy.config.cluster.v3.Cluster.LbSubsetConfig.fallback_policy:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy + 53, // 52: envoy.config.cluster.v3.Cluster.LbSubsetConfig.default_subset:type_name -> google.protobuf.Struct + 27, // 53: envoy.config.cluster.v3.Cluster.LbSubsetConfig.subset_selectors:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector + 33, // 54: envoy.config.cluster.v3.Cluster.SlowStartConfig.slow_start_window:type_name -> google.protobuf.Duration + 55, // 55: envoy.config.cluster.v3.Cluster.SlowStartConfig.aggression:type_name -> envoy.config.core.v3.RuntimeDouble + 56, // 56: envoy.config.cluster.v3.Cluster.SlowStartConfig.min_weight_percent:type_name -> envoy.type.v3.Percent + 17, // 57: envoy.config.cluster.v3.Cluster.RoundRobinLbConfig.slow_start_config:type_name -> envoy.config.cluster.v3.Cluster.SlowStartConfig + 34, // 58: envoy.config.cluster.v3.Cluster.LeastRequestLbConfig.choice_count:type_name -> google.protobuf.UInt32Value + 55, // 59: envoy.config.cluster.v3.Cluster.LeastRequestLbConfig.active_request_bias:type_name -> envoy.config.core.v3.RuntimeDouble + 17, // 60: envoy.config.cluster.v3.Cluster.LeastRequestLbConfig.slow_start_config:type_name -> envoy.config.cluster.v3.Cluster.SlowStartConfig + 57, // 61: envoy.config.cluster.v3.Cluster.RingHashLbConfig.minimum_ring_size:type_name -> google.protobuf.UInt64Value + 6, // 62: envoy.config.cluster.v3.Cluster.RingHashLbConfig.hash_function:type_name -> envoy.config.cluster.v3.Cluster.RingHashLbConfig.HashFunction + 57, // 63: envoy.config.cluster.v3.Cluster.RingHashLbConfig.maximum_ring_size:type_name -> google.protobuf.UInt64Value + 57, // 64: envoy.config.cluster.v3.Cluster.MaglevLbConfig.table_size:type_name -> google.protobuf.UInt64Value + 56, // 65: envoy.config.cluster.v3.Cluster.CommonLbConfig.healthy_panic_threshold:type_name -> envoy.type.v3.Percent + 28, // 66: envoy.config.cluster.v3.Cluster.CommonLbConfig.zone_aware_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig + 29, // 67: envoy.config.cluster.v3.Cluster.CommonLbConfig.locality_weighted_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig.LocalityWeightedLbConfig + 33, // 68: envoy.config.cluster.v3.Cluster.CommonLbConfig.update_merge_window:type_name -> google.protobuf.Duration + 30, // 69: envoy.config.cluster.v3.Cluster.CommonLbConfig.consistent_hashing_lb_config:type_name -> envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig + 58, // 70: envoy.config.cluster.v3.Cluster.CommonLbConfig.override_host_status:type_name -> envoy.config.core.v3.HealthStatusSet + 33, // 71: envoy.config.cluster.v3.Cluster.RefreshRate.base_interval:type_name -> google.protobuf.Duration + 33, // 72: envoy.config.cluster.v3.Cluster.RefreshRate.max_interval:type_name -> google.protobuf.Duration + 59, // 73: envoy.config.cluster.v3.Cluster.PreconnectPolicy.per_upstream_preconnect_ratio:type_name -> google.protobuf.DoubleValue + 59, // 74: envoy.config.cluster.v3.Cluster.PreconnectPolicy.predictive_preconnect_ratio:type_name -> google.protobuf.DoubleValue + 54, // 75: envoy.config.cluster.v3.Cluster.TypedExtensionProtocolOptionsEntry.value:type_name -> google.protobuf.Any + 5, // 76: envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.fallback_policy:type_name -> envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy + 56, // 77: envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig.routing_enabled:type_name -> envoy.type.v3.Percent + 57, // 78: envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig.min_cluster_size:type_name -> google.protobuf.UInt64Value + 34, // 79: envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig.hash_balance_factor:type_name -> google.protobuf.UInt32Value + 44, // 80: envoy.config.cluster.v3.LoadBalancingPolicy.Policy.typed_extension_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 81, // [81:81] is the sub-list for method output_type + 81, // [81:81] is the sub-list for method input_type + 81, // [81:81] is the sub-list for extension type_name + 81, // [81:81] is the sub-list for extension extendee + 0, // [0:81] is the sub-list for field type_name } func init() { file_envoy_config_cluster_v3_cluster_proto_init() } @@ -3882,7 +4126,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { } } file_envoy_config_cluster_v3_cluster_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_LeastRequestLbConfig); i { + switch v := v.(*Cluster_SlowStartConfig); i { case 0: return &v.state case 1: @@ -3894,7 +4138,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { } } file_envoy_config_cluster_v3_cluster_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_RingHashLbConfig); i { + switch v := v.(*Cluster_RoundRobinLbConfig); i { case 0: return &v.state case 1: @@ -3906,7 +4150,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { } } file_envoy_config_cluster_v3_cluster_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_MaglevLbConfig); i { + switch v := v.(*Cluster_LeastRequestLbConfig); i { case 0: return &v.state case 1: @@ -3918,7 +4162,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { } } file_envoy_config_cluster_v3_cluster_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_OriginalDstLbConfig); i { + switch v := v.(*Cluster_RingHashLbConfig); i { case 0: return &v.state case 1: @@ -3930,7 +4174,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { } } file_envoy_config_cluster_v3_cluster_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig); i { + switch v := v.(*Cluster_MaglevLbConfig); i { case 0: return &v.state case 1: @@ -3942,7 +4186,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { } } file_envoy_config_cluster_v3_cluster_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_RefreshRate); i { + switch v := v.(*Cluster_OriginalDstLbConfig); i { case 0: return &v.state case 1: @@ -3954,6 +4198,30 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { } } file_envoy_config_cluster_v3_cluster_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cluster_CommonLbConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_cluster_v3_cluster_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cluster_RefreshRate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_cluster_v3_cluster_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cluster_PreconnectPolicy); i { case 0: return &v.state @@ -3965,7 +4233,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { return nil } } - file_envoy_config_cluster_v3_cluster_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_cluster_v3_cluster_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cluster_LbSubsetConfig_LbSubsetSelector); i { case 0: return &v.state @@ -3977,7 +4245,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { return nil } } - file_envoy_config_cluster_v3_cluster_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_cluster_v3_cluster_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cluster_CommonLbConfig_ZoneAwareLbConfig); i { case 0: return &v.state @@ -3989,7 +4257,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { return nil } } - file_envoy_config_cluster_v3_cluster_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_cluster_v3_cluster_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cluster_CommonLbConfig_LocalityWeightedLbConfig); i { case 0: return &v.state @@ -4001,7 +4269,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { return nil } } - file_envoy_config_cluster_v3_cluster_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_cluster_v3_cluster_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Cluster_CommonLbConfig_ConsistentHashingLbConfig); i { case 0: return &v.state @@ -4013,7 +4281,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { return nil } } - file_envoy_config_cluster_v3_cluster_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_cluster_v3_cluster_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LoadBalancingPolicy_Policy); i { case 0: return &v.state @@ -4033,8 +4301,9 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { (*Cluster_MaglevLbConfig_)(nil), (*Cluster_OriginalDstLbConfig_)(nil), (*Cluster_LeastRequestLbConfig_)(nil), + (*Cluster_RoundRobinLbConfig_)(nil), } - file_envoy_config_cluster_v3_cluster_proto_msgTypes[14].OneofWrappers = []interface{}{ + file_envoy_config_cluster_v3_cluster_proto_msgTypes[16].OneofWrappers = []interface{}{ (*Cluster_CommonLbConfig_ZoneAwareLbConfig_)(nil), (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_)(nil), } @@ -4044,7 +4313,7 @@ func file_envoy_config_cluster_v3_cluster_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_cluster_v3_cluster_proto_rawDesc, NumEnums: 7, - NumMessages: 24, + NumMessages: 25, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/cluster/v3/cluster.pb.validate.go b/pkg/api/envoy/config/cluster/v3/cluster.pb.validate.go index c64c4cc858..2ad9dfb843 100644 --- a/pkg/api/envoy/config/cluster/v3/cluster.pb.validate.go +++ b/pkg/api/envoy/config/cluster/v3/cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/cluster/v3/cluster.proto -package envoy_config_cluster_v3 +package clusterv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClusterCollection with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ClusterCollection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterCollection with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterCollectionMultiError, or nil if none found. +func (m *ClusterCollection) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterCollection) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEntries()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEntries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterCollectionValidationError{ + field: "Entries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterCollectionValidationError{ + field: "Entries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEntries()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterCollectionValidationError{ field: "Entries", @@ -51,9 +86,30 @@ func (m *ClusterCollection) Validate() error { } } + if len(errors) > 0 { + return ClusterCollectionMultiError(errors) + } + return nil } +// ClusterCollectionMultiError is an error wrapping multiple validation errors +// returned by ClusterCollection.ValidateAll() if the designated constraints +// aren't met. +type ClusterCollectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterCollectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterCollectionMultiError) AllErrors() []error { return m } + // ClusterCollectionValidationError is the validation error returned by // ClusterCollection.Validate if the designated constraints aren't met. type ClusterCollectionValidationError struct { @@ -111,16 +167,49 @@ var _ interface { } = ClusterCollectionValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Cluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ClusterMultiError, or nil if none found. +func (m *Cluster) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetTransportSocketMatches() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("TransportSocketMatches[%v]", idx), @@ -133,15 +222,38 @@ func (m *Cluster) Validate() error { } if utf8.RuneCountInString(m.GetName()) < 1 { - return ClusterValidationError{ + err := ClusterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AltStatName - if v, ok := interface{}(m.GetEdsClusterConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEdsClusterConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "EdsClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "EdsClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEdsClusterConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "EdsClusterConfig", @@ -152,27 +264,55 @@ func (m *Cluster) Validate() error { } if d := m.GetConnectTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ClusterValidationError{ + err = ClusterValidationError{ field: "ConnectTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return ClusterValidationError{ - field: "ConnectTimeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := ClusterValidationError{ + field: "ConnectTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerConnectionBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "PerConnectionBufferLimitBytes", @@ -182,21 +322,37 @@ func (m *Cluster) Validate() error { } } - if _, ok := _Cluster_LbPolicy_NotInLookup[m.GetLbPolicy()]; ok { - return ClusterValidationError{ - field: "LbPolicy", - reason: "value must not be in list [7]", - } - } - if _, ok := Cluster_LbPolicy_name[int32(m.GetLbPolicy())]; !ok { - return ClusterValidationError{ + err := ClusterValidationError{ field: "LbPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetLoadAssignment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadAssignment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadAssignment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadAssignment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadAssignment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "LoadAssignment", @@ -209,7 +365,26 @@ func (m *Cluster) Validate() error { for idx, item := range m.GetHealthChecks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("HealthChecks[%v]", idx), @@ -221,7 +396,26 @@ func (m *Cluster) Validate() error { } - if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxRequestsPerConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "MaxRequestsPerConnection", @@ -231,7 +425,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCircuitBreakers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "CircuitBreakers", @@ -241,7 +454,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "UpstreamHttpProtocolOptions", @@ -251,7 +483,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "CommonHttpProtocolOptions", @@ -261,7 +512,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "HttpProtocolOptions", @@ -271,7 +541,26 @@ func (m *Cluster) Validate() error { } } - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "Http2ProtocolOptions", @@ -281,45 +570,102 @@ func (m *Cluster) Validate() error { } } - 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, + { + sorted_keys := make([]string, len(m.GetTypedExtensionProtocolOptions())) + i := 0 + for key := range m.GetTypedExtensionProtocolOptions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedExtensionProtocolOptions()[key] + _ = val + + // no validation rules for TypedExtensionProtocolOptions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return 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) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ClusterValidationError{ + err = ClusterValidationError{ field: "DnsRefreshRate", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if dur <= gt { - return ClusterValidationError{ - field: "DnsRefreshRate", - reason: "value must be greater than 1ms", + if dur <= gt { + err := ClusterValidationError{ + field: "DnsRefreshRate", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsFailureRefreshRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "DnsFailureRefreshRate", @@ -332,16 +678,39 @@ func (m *Cluster) Validate() error { // no validation rules for RespectDnsTtl if _, ok := Cluster_DnsLookupFamily_name[int32(m.GetDnsLookupFamily())]; !ok { - return ClusterValidationError{ + err := ClusterValidationError{ field: "DnsLookupFamily", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetDnsResolvers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("DnsResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("DnsResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: fmt.Sprintf("DnsResolvers[%v]", idx), @@ -355,179 +724,358 @@ func (m *Cluster) Validate() error { // no validation rules for UseTcpForDnsLookups - if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsResolutionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolutionConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "OutlierDetection", + field: "DnsResolutionConfig", 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, + if all { + switch v := interface{}(m.GetTypedDnsResolverConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + 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", + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - - } - - if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedDnsResolverConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "UpstreamBindConfig", + field: "TypedDnsResolverConfig", reason: "embedded message failed validation", cause: err, } } } - if v, ok := interface{}(m.GetLbSubsetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWaitForWarmOnInit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "WaitForWarmOnInit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "WaitForWarmOnInit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWaitForWarmOnInit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "LbSubsetConfig", + field: "WaitForWarmOnInit", reason: "embedded message failed validation", cause: err, } } } - if v, ok := interface{}(m.GetCommonLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOutlierDetection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "CommonLbConfig", + field: "OutlierDetection", 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", + if d := m.GetCleanupInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = ClusterValidationError{ + field: "CleanupInterval", + reason: "value is not a valid duration", cause: err, } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := ClusterValidationError{ + field: "CleanupInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamBindConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "Metadata", + field: "UpstreamBindConfig", reason: "embedded message failed validation", cause: err, } } } - // no validation rules for ProtocolSelection - - if v, ok := interface{}(m.GetUpstreamConnectionOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLbSubsetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LbSubsetConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LbSubsetConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLbSubsetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "UpstreamConnectionOptions", + field: "LbSubsetConfig", reason: "embedded message failed validation", cause: err, } } } - // no validation rules for CloseConnectionsOnHostHealthFailure - - // no validation rules for IgnoreHealthOnHostRemoval - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "CommonLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), + errors = append(errors, ClusterValidationError{ + field: "CommonLbConfig", reason: "embedded message failed validation", cause: err, - } + }) } } - - } - - if v, ok := interface{}(m.GetLoadBalancingPolicy()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetCommonLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "LoadBalancingPolicy", + field: "CommonLbConfig", 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, + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - // no validation rules for TrackTimeoutBudgets - - if v, ok := interface{}(m.GetUpstreamConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "UpstreamConfig", + field: "TransportSocket", reason: "embedded message failed validation", cause: err, } } } - if v, ok := interface{}(m.GetTrackClusterStats()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "TrackClusterStats", + field: "Metadata", reason: "embedded message failed validation", cause: err, } } } - if v, ok := interface{}(m.GetPreconnectPolicy()).(interface{ Validate() error }); ok { + // no validation rules for ProtocolSelection + + if all { + switch v := interface{}(m.GetUpstreamConnectionOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamConnectionOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamConnectionOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamConnectionOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "PreconnectPolicy", + field: "UpstreamConnectionOptions", reason: "embedded message failed validation", cause: err, } } } - // no validation rules for ConnectionPoolPerDownstreamConnection + // no validation rules for CloseConnectionsOnHostHealthFailure + + // no validation rules for IgnoreHealthOnHostRemoval - for idx, item := range m.GetHiddenEnvoyDeprecatedHosts() { + for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedHosts[%v]", idx), + field: fmt.Sprintf("Filters[%v]", idx), reason: "embedded message failed validation", cause: err, } @@ -536,47 +1084,192 @@ func (m *Cluster) Validate() error { } - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedTlsContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadBalancingPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadBalancingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LoadBalancingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else 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 all { + switch v := interface{}(m.GetLrsServer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LrsServer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LrsServer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLrsServer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ - field: "HiddenEnvoyDeprecatedTlsContext", + field: "LrsServer", reason: "embedded message failed validation", cause: err, } } } - for key, val := range m.GetHiddenEnvoyDeprecatedExtensionProtocolOptions() { - _ = val + // no validation rules for TrackTimeoutBudgets - // no validation rules for HiddenEnvoyDeprecatedExtensionProtocolOptions[key] + if all { + switch v := interface{}(m.GetUpstreamConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "UpstreamConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "UpstreamConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTrackClusterStats()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "TrackClusterStats", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedExtensionProtocolOptions[%v]", key), + errors = append(errors, ClusterValidationError{ + field: "TrackClusterStats", reason: "embedded message failed validation", cause: err, - } + }) + } + } + } else if v, ok := interface{}(m.GetTrackClusterStats()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "TrackClusterStats", + reason: "embedded message failed validation", + cause: err, } } + } + if all { + switch v := interface{}(m.GetPreconnectPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "PreconnectPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "PreconnectPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPreconnectPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "PreconnectPolicy", + reason: "embedded message failed validation", + cause: err, + } + } } + // no validation rules for ConnectionPoolPerDownstreamConnection + switch m.ClusterDiscoveryType.(type) { case *Cluster_Type: if _, ok := Cluster_DiscoveryType_name[int32(m.GetType())]; !ok { - return ClusterValidationError{ + err := ClusterValidationError{ field: "Type", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } case *Cluster_ClusterType: - if v, ok := interface{}(m.GetClusterType()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClusterType()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "ClusterType", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "ClusterType", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClusterType()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "ClusterType", @@ -592,7 +1285,26 @@ func (m *Cluster) Validate() error { case *Cluster_RingHashLbConfig_: - if v, ok := interface{}(m.GetRingHashLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRingHashLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "RingHashLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "RingHashLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRingHashLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "RingHashLbConfig", @@ -604,7 +1316,26 @@ func (m *Cluster) Validate() error { case *Cluster_MaglevLbConfig_: - if v, ok := interface{}(m.GetMaglevLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaglevLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "MaglevLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "MaglevLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaglevLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "MaglevLbConfig", @@ -616,7 +1347,26 @@ func (m *Cluster) Validate() error { case *Cluster_OriginalDstLbConfig_: - if v, ok := interface{}(m.GetOriginalDstLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOriginalDstLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OriginalDstLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "OriginalDstLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOriginalDstLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "OriginalDstLbConfig", @@ -628,7 +1378,26 @@ func (m *Cluster) Validate() error { case *Cluster_LeastRequestLbConfig_: - if v, ok := interface{}(m.GetLeastRequestLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLeastRequestLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LeastRequestLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "LeastRequestLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLeastRequestLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterValidationError{ field: "LeastRequestLbConfig", @@ -638,11 +1407,62 @@ func (m *Cluster) Validate() error { } } + case *Cluster_RoundRobinLbConfig_: + + if all { + switch v := interface{}(m.GetRoundRobinLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "RoundRobinLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterValidationError{ + field: "RoundRobinLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoundRobinLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "RoundRobinLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClusterMultiError(errors) } return nil } +// ClusterMultiError is an error wrapping multiple validation errors returned +// by Cluster.ValidateAll() if the designated constraints aren't met. +type ClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterMultiError) AllErrors() []error { return m } + // ClusterValidationError is the validation error returned by Cluster.Validate // if the designated constraints aren't met. type ClusterValidationError struct { @@ -697,22 +1517,51 @@ var _ interface { ErrorName() string } = ClusterValidationError{} -var _Cluster_LbPolicy_NotInLookup = map[Cluster_LbPolicy]struct{}{ - 7: {}, -} - // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *LoadBalancingPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadBalancingPolicy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadBalancingPolicyMultiError, or nil if none found. +func (m *LoadBalancingPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadBalancingPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetPolicies() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadBalancingPolicyValidationError{ + field: fmt.Sprintf("Policies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadBalancingPolicyValidationError{ + field: fmt.Sprintf("Policies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadBalancingPolicyValidationError{ field: fmt.Sprintf("Policies[%v]", idx), @@ -724,9 +1573,30 @@ func (m *LoadBalancingPolicy) Validate() error { } + if len(errors) > 0 { + return LoadBalancingPolicyMultiError(errors) + } + return nil } +// LoadBalancingPolicyMultiError is an error wrapping multiple validation +// errors returned by LoadBalancingPolicy.ValidateAll() if the designated +// constraints aren't met. +type LoadBalancingPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadBalancingPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadBalancingPolicyMultiError) AllErrors() []error { return m } + // LoadBalancingPolicyValidationError is the validation error returned by // LoadBalancingPolicy.Validate if the designated constraints aren't met. type LoadBalancingPolicyValidationError struct { @@ -785,13 +1655,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamBindConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamBindConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamBindConfigMultiError, or nil if none found. +func (m *UpstreamBindConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamBindConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSourceAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamBindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamBindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamBindConfigValidationError{ field: "SourceAddress", @@ -801,9 +1704,30 @@ func (m *UpstreamBindConfig) Validate() error { } } + if len(errors) > 0 { + return UpstreamBindConfigMultiError(errors) + } + return nil } +// UpstreamBindConfigMultiError is an error wrapping multiple validation errors +// returned by UpstreamBindConfig.ValidateAll() if the designated constraints +// aren't met. +type UpstreamBindConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamBindConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamBindConfigMultiError) AllErrors() []error { return m } + // UpstreamBindConfigValidationError is the validation error returned by // UpstreamBindConfig.Validate if the designated constraints aren't met. type UpstreamBindConfigValidationError struct { @@ -862,13 +1786,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamConnectionOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamConnectionOptions with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamConnectionOptionsMultiError, or nil if none found. +func (m *UpstreamConnectionOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamConnectionOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTcpKeepalive()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTcpKeepalive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamConnectionOptionsValidationError{ + field: "TcpKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamConnectionOptionsValidationError{ + field: "TcpKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpKeepalive()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamConnectionOptionsValidationError{ field: "TcpKeepalive", @@ -878,9 +1835,32 @@ func (m *UpstreamConnectionOptions) Validate() error { } } + // no validation rules for SetLocalInterfaceNameOnUpstreamConnections + + if len(errors) > 0 { + return UpstreamConnectionOptionsMultiError(errors) + } + return nil } +// UpstreamConnectionOptionsMultiError is an error wrapping multiple validation +// errors returned by UpstreamConnectionOptions.ValidateAll() if the +// designated constraints aren't met. +type UpstreamConnectionOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamConnectionOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamConnectionOptionsMultiError) AllErrors() []error { return m } + // UpstreamConnectionOptionsValidationError is the validation error returned by // UpstreamConnectionOptions.Validate if the designated constraints aren't met. type UpstreamConnectionOptionsValidationError struct { @@ -938,20 +1918,55 @@ var _ interface { } = UpstreamConnectionOptionsValidationError{} // Validate checks the field values on TrackClusterStats with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TrackClusterStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TrackClusterStats with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TrackClusterStatsMultiError, or nil if none found. +func (m *TrackClusterStats) ValidateAll() error { + return m.validate(true) +} + +func (m *TrackClusterStats) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TimeoutBudgets // no validation rules for RequestResponseSizes + if len(errors) > 0 { + return TrackClusterStatsMultiError(errors) + } + return nil } +// TrackClusterStatsMultiError is an error wrapping multiple validation errors +// returned by TrackClusterStats.ValidateAll() if the designated constraints +// aren't met. +type TrackClusterStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TrackClusterStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TrackClusterStatsMultiError) AllErrors() []error { return m } + // TrackClusterStatsValidationError is the validation error returned by // TrackClusterStats.Validate if the designated constraints aren't met. type TrackClusterStatsValidationError struct { @@ -1010,20 +2025,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_TransportSocketMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_TransportSocketMatch with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_TransportSocketMatchMultiError, or nil if none found. +func (m *Cluster_TransportSocketMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_TransportSocketMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return Cluster_TransportSocketMatchValidationError{ + err := Cluster_TransportSocketMatchValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_TransportSocketMatchValidationError{ field: "Match", @@ -1033,7 +2085,26 @@ func (m *Cluster_TransportSocketMatch) Validate() error { } } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_TransportSocketMatchValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_TransportSocketMatchValidationError{ field: "TransportSocket", @@ -1043,9 +2114,30 @@ func (m *Cluster_TransportSocketMatch) Validate() error { } } - return nil + if len(errors) > 0 { + return Cluster_TransportSocketMatchMultiError(errors) + } + + return nil +} + +// Cluster_TransportSocketMatchMultiError is an error wrapping multiple +// validation errors returned by Cluster_TransportSocketMatch.ValidateAll() if +// the designated constraints aren't met. +type Cluster_TransportSocketMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_TransportSocketMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") } +// AllErrors returns a list of validation violation errors. +func (m Cluster_TransportSocketMatchMultiError) AllErrors() []error { return m } + // Cluster_TransportSocketMatchValidationError is the validation error returned // by Cluster_TransportSocketMatch.Validate if the designated constraints // aren't met. @@ -1105,20 +2197,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_CustomClusterType) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_CustomClusterType with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_CustomClusterTypeMultiError, or nil if none found. +func (m *Cluster_CustomClusterType) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CustomClusterType) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return Cluster_CustomClusterTypeValidationError{ + err := Cluster_CustomClusterTypeValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CustomClusterTypeValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CustomClusterTypeValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CustomClusterTypeValidationError{ field: "TypedConfig", @@ -1128,9 +2257,30 @@ func (m *Cluster_CustomClusterType) Validate() error { } } + if len(errors) > 0 { + return Cluster_CustomClusterTypeMultiError(errors) + } + return nil } +// Cluster_CustomClusterTypeMultiError is an error wrapping multiple validation +// errors returned by Cluster_CustomClusterType.ValidateAll() if the +// designated constraints aren't met. +type Cluster_CustomClusterTypeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CustomClusterTypeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CustomClusterTypeMultiError) AllErrors() []error { return m } + // Cluster_CustomClusterTypeValidationError is the validation error returned by // Cluster_CustomClusterType.Validate if the designated constraints aren't met. type Cluster_CustomClusterTypeValidationError struct { @@ -1189,13 +2339,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_EdsClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_EdsClusterConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_EdsClusterConfigMultiError, or nil if none found. +func (m *Cluster_EdsClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_EdsClusterConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEdsConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_EdsClusterConfigValidationError{ + field: "EdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_EdsClusterConfigValidationError{ + field: "EdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_EdsClusterConfigValidationError{ field: "EdsConfig", @@ -1207,9 +2390,30 @@ func (m *Cluster_EdsClusterConfig) Validate() error { // no validation rules for ServiceName + if len(errors) > 0 { + return Cluster_EdsClusterConfigMultiError(errors) + } + return nil } +// Cluster_EdsClusterConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_EdsClusterConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_EdsClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_EdsClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_EdsClusterConfigMultiError) AllErrors() []error { return m } + // Cluster_EdsClusterConfigValidationError is the validation error returned by // Cluster_EdsClusterConfig.Validate if the designated constraints aren't met. type Cluster_EdsClusterConfigValidationError struct { @@ -1268,20 +2472,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_LbSubsetConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_LbSubsetConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_LbSubsetConfigMultiError, or nil if none found. +func (m *Cluster_LbSubsetConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_LbSubsetConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { - return Cluster_LbSubsetConfigValidationError{ + err := Cluster_LbSubsetConfigValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultSubset()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultSubset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: "DefaultSubset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: "DefaultSubset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultSubset()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: "DefaultSubset", @@ -1294,7 +2535,26 @@ func (m *Cluster_LbSubsetConfig) Validate() error { for idx, item := range m.GetSubsetSelectors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: fmt.Sprintf("SubsetSelectors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_LbSubsetConfigValidationError{ + field: fmt.Sprintf("SubsetSelectors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: fmt.Sprintf("SubsetSelectors[%v]", idx), @@ -1314,9 +2574,30 @@ func (m *Cluster_LbSubsetConfig) Validate() error { // no validation rules for ListAsAny + if len(errors) > 0 { + return Cluster_LbSubsetConfigMultiError(errors) + } + return nil } +// Cluster_LbSubsetConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_LbSubsetConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_LbSubsetConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_LbSubsetConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_LbSubsetConfigMultiError) AllErrors() []error { return m } + // Cluster_LbSubsetConfigValidationError is the validation error returned by // Cluster_LbSubsetConfig.Validate if the designated constraints aren't met. type Cluster_LbSubsetConfigValidationError struct { @@ -1373,26 +2654,383 @@ var _ interface { ErrorName() string } = Cluster_LbSubsetConfigValidationError{} +// Validate checks the field values on Cluster_SlowStartConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Cluster_SlowStartConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_SlowStartConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_SlowStartConfigMultiError, or nil if none found. +func (m *Cluster_SlowStartConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_SlowStartConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSlowStartWindow()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_SlowStartConfigValidationError{ + field: "SlowStartWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_SlowStartConfigValidationError{ + field: "SlowStartWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSlowStartWindow()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_SlowStartConfigValidationError{ + field: "SlowStartWindow", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAggression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_SlowStartConfigValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_SlowStartConfigValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAggression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_SlowStartConfigValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMinWeightPercent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_SlowStartConfigValidationError{ + field: "MinWeightPercent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_SlowStartConfigValidationError{ + field: "MinWeightPercent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinWeightPercent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_SlowStartConfigValidationError{ + field: "MinWeightPercent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Cluster_SlowStartConfigMultiError(errors) + } + + return nil +} + +// Cluster_SlowStartConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_SlowStartConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_SlowStartConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_SlowStartConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_SlowStartConfigMultiError) AllErrors() []error { return m } + +// Cluster_SlowStartConfigValidationError is the validation error returned by +// Cluster_SlowStartConfig.Validate if the designated constraints aren't met. +type Cluster_SlowStartConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_SlowStartConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_SlowStartConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_SlowStartConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_SlowStartConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_SlowStartConfigValidationError) ErrorName() string { + return "Cluster_SlowStartConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_SlowStartConfigValidationError) Error() string { + 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_SlowStartConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_SlowStartConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_SlowStartConfigValidationError{} + +// Validate checks the field values on Cluster_RoundRobinLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Cluster_RoundRobinLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_RoundRobinLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_RoundRobinLbConfigMultiError, or nil if none found. +func (m *Cluster_RoundRobinLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_RoundRobinLbConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSlowStartConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_RoundRobinLbConfigValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_RoundRobinLbConfigValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSlowStartConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_RoundRobinLbConfigValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Cluster_RoundRobinLbConfigMultiError(errors) + } + + return nil +} + +// Cluster_RoundRobinLbConfigMultiError is an error wrapping multiple +// validation errors returned by Cluster_RoundRobinLbConfig.ValidateAll() if +// the designated constraints aren't met. +type Cluster_RoundRobinLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_RoundRobinLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_RoundRobinLbConfigMultiError) AllErrors() []error { return m } + +// Cluster_RoundRobinLbConfigValidationError is the validation error returned +// by Cluster_RoundRobinLbConfig.Validate if the designated constraints aren't met. +type Cluster_RoundRobinLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_RoundRobinLbConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_RoundRobinLbConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_RoundRobinLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_RoundRobinLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_RoundRobinLbConfigValidationError) ErrorName() string { + return "Cluster_RoundRobinLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_RoundRobinLbConfigValidationError) Error() string { + 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_RoundRobinLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_RoundRobinLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_RoundRobinLbConfigValidationError{} + // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_LeastRequestLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_LeastRequestLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_LeastRequestLbConfigMultiError, or nil if none found. +func (m *Cluster_LeastRequestLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_LeastRequestLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetChoiceCount(); wrapper != nil { if wrapper.GetValue() < 2 { - return Cluster_LeastRequestLbConfigValidationError{ + err := Cluster_LeastRequestLbConfigValidationError{ field: "ChoiceCount", reason: "value must be greater than or equal to 2", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetActiveRequestBias()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetActiveRequestBias()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_LeastRequestLbConfigValidationError{ + field: "ActiveRequestBias", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_LeastRequestLbConfigValidationError{ + field: "ActiveRequestBias", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActiveRequestBias()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LeastRequestLbConfigValidationError{ field: "ActiveRequestBias", @@ -1402,9 +3040,59 @@ func (m *Cluster_LeastRequestLbConfig) Validate() error { } } + if all { + switch v := interface{}(m.GetSlowStartConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_LeastRequestLbConfigValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_LeastRequestLbConfigValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSlowStartConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_LeastRequestLbConfigValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Cluster_LeastRequestLbConfigMultiError(errors) + } + return nil } +// Cluster_LeastRequestLbConfigMultiError is an error wrapping multiple +// validation errors returned by Cluster_LeastRequestLbConfig.ValidateAll() if +// the designated constraints aren't met. +type Cluster_LeastRequestLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_LeastRequestLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_LeastRequestLbConfigMultiError) AllErrors() []error { return m } + // Cluster_LeastRequestLbConfigValidationError is the validation error returned // by Cluster_LeastRequestLbConfig.Validate if the designated constraints // aren't met. @@ -1464,44 +3152,91 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_RingHashLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_RingHashLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_RingHashLbConfigMultiError, or nil if none found. +func (m *Cluster_RingHashLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_RingHashLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMinimumRingSize(); wrapper != nil { if wrapper.GetValue() > 8388608 { - return Cluster_RingHashLbConfigValidationError{ + err := Cluster_RingHashLbConfigValidationError{ field: "MinimumRingSize", reason: "value must be less than or equal to 8388608", } + if !all { + return err + } + errors = append(errors, err) } } if _, ok := Cluster_RingHashLbConfig_HashFunction_name[int32(m.GetHashFunction())]; !ok { - return Cluster_RingHashLbConfigValidationError{ + err := Cluster_RingHashLbConfigValidationError{ field: "HashFunction", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetMaximumRingSize(); wrapper != nil { if wrapper.GetValue() > 8388608 { - return Cluster_RingHashLbConfigValidationError{ + err := Cluster_RingHashLbConfigValidationError{ field: "MaximumRingSize", reason: "value must be less than or equal to 8388608", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return Cluster_RingHashLbConfigMultiError(errors) + } + return nil } +// Cluster_RingHashLbConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_RingHashLbConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_RingHashLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_RingHashLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_RingHashLbConfigMultiError) AllErrors() []error { return m } + // Cluster_RingHashLbConfigValidationError is the validation error returned by // Cluster_RingHashLbConfig.Validate if the designated constraints aren't met. type Cluster_RingHashLbConfigValidationError struct { @@ -1560,25 +3295,65 @@ var _ interface { // Validate checks the field values on Cluster_MaglevLbConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_MaglevLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_MaglevLbConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_MaglevLbConfigMultiError, or nil if none found. +func (m *Cluster_MaglevLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_MaglevLbConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTableSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_MaglevLbConfigValidationError{ + var errors []error + + if wrapper := m.GetTableSize(); wrapper != nil { + + if wrapper.GetValue() > 5000011 { + err := Cluster_MaglevLbConfigValidationError{ field: "TableSize", - reason: "embedded message failed validation", - cause: err, + reason: "value must be less than or equal to 5000011", } + if !all { + return err + } + errors = append(errors, err) } + + } + + if len(errors) > 0 { + return Cluster_MaglevLbConfigMultiError(errors) } return nil } +// Cluster_MaglevLbConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_MaglevLbConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_MaglevLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_MaglevLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_MaglevLbConfigMultiError) AllErrors() []error { return m } + // Cluster_MaglevLbConfigValidationError is the validation error returned by // Cluster_MaglevLbConfig.Validate if the designated constraints aren't met. type Cluster_MaglevLbConfigValidationError struct { @@ -1637,17 +3412,54 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_OriginalDstLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_OriginalDstLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_OriginalDstLbConfigMultiError, or nil if none found. +func (m *Cluster_OriginalDstLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_OriginalDstLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for UseHttpHeader + // no validation rules for HttpHeaderName + + if len(errors) > 0 { + return Cluster_OriginalDstLbConfigMultiError(errors) + } + return nil } +// Cluster_OriginalDstLbConfigMultiError is an error wrapping multiple +// validation errors returned by Cluster_OriginalDstLbConfig.ValidateAll() if +// the designated constraints aren't met. +type Cluster_OriginalDstLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_OriginalDstLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_OriginalDstLbConfigMultiError) AllErrors() []error { return m } + // Cluster_OriginalDstLbConfigValidationError is the validation error returned // by Cluster_OriginalDstLbConfig.Validate if the designated constraints // aren't met. @@ -1707,13 +3519,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_CommonLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_CommonLbConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_CommonLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHealthyPanicThreshold()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHealthyPanicThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "HealthyPanicThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "HealthyPanicThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthyPanicThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "HealthyPanicThreshold", @@ -1723,7 +3568,26 @@ func (m *Cluster_CommonLbConfig) Validate() error { } } - if v, ok := interface{}(m.GetUpdateMergeWindow()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpdateMergeWindow()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "UpdateMergeWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "UpdateMergeWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpdateMergeWindow()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "UpdateMergeWindow", @@ -1737,7 +3601,26 @@ func (m *Cluster_CommonLbConfig) Validate() error { // no validation rules for CloseConnectionsOnHostSetChange - if v, ok := interface{}(m.GetConsistentHashingLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConsistentHashingLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ConsistentHashingLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ConsistentHashingLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsistentHashingLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "ConsistentHashingLbConfig", @@ -1747,11 +3630,59 @@ func (m *Cluster_CommonLbConfig) Validate() error { } } + if all { + switch v := interface{}(m.GetOverrideHostStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "OverrideHostStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "OverrideHostStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverrideHostStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfigValidationError{ + field: "OverrideHostStatus", + 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 all { + switch v := interface{}(m.GetZoneAwareLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ZoneAwareLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "ZoneAwareLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetZoneAwareLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "ZoneAwareLbConfig", @@ -1763,7 +3694,26 @@ func (m *Cluster_CommonLbConfig) Validate() error { case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: - if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalityWeightedLbConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "LocalityWeightedLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfigValidationError{ + field: "LocalityWeightedLbConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "LocalityWeightedLbConfig", @@ -1775,9 +3725,30 @@ func (m *Cluster_CommonLbConfig) Validate() error { } + if len(errors) > 0 { + return Cluster_CommonLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfigMultiError is an error wrapping multiple validation +// errors returned by Cluster_CommonLbConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_CommonLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfigValidationError is the validation error returned by // Cluster_CommonLbConfig.Validate if the designated constraints aren't met. type Cluster_CommonLbConfigValidationError struct { @@ -1836,64 +3807,121 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_RefreshRate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_RefreshRate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_RefreshRateMultiError, or nil if none found. +func (m *Cluster_RefreshRate) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_RefreshRate) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetBaseInterval() == nil { - return Cluster_RefreshRateValidationError{ + err := Cluster_RefreshRateValidationError{ field: "BaseInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetBaseInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return Cluster_RefreshRateValidationError{ + err = Cluster_RefreshRateValidationError{ field: "BaseInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + 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 dur <= gt { + err := Cluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return Cluster_RefreshRateValidationError{ + err = Cluster_RefreshRateValidationError{ field: "MaxInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if dur <= gt { - return Cluster_RefreshRateValidationError{ - field: "MaxInterval", - reason: "value must be greater than 1ms", + if dur <= gt { + err := Cluster_RefreshRateValidationError{ + field: "MaxInterval", + reason: "value must be greater than 1ms", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return Cluster_RefreshRateMultiError(errors) } return nil } +// Cluster_RefreshRateMultiError is an error wrapping multiple validation +// errors returned by Cluster_RefreshRate.ValidateAll() if the designated +// constraints aren't met. +type Cluster_RefreshRateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_RefreshRateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_RefreshRateMultiError) AllErrors() []error { return m } + // Cluster_RefreshRateValidationError is the validation error returned by // Cluster_RefreshRate.Validate if the designated constraints aren't met. type Cluster_RefreshRateValidationError struct { @@ -1952,19 +3980,37 @@ var _ interface { // Validate checks the field values on Cluster_PreconnectPolicy with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Cluster_PreconnectPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cluster_PreconnectPolicy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Cluster_PreconnectPolicyMultiError, or nil if none found. +func (m *Cluster_PreconnectPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_PreconnectPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetPerUpstreamPreconnectRatio(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 3 { - return Cluster_PreconnectPolicyValidationError{ + err := Cluster_PreconnectPolicyValidationError{ field: "PerUpstreamPreconnectRatio", reason: "value must be inside range [1, 3]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -1972,17 +4018,42 @@ func (m *Cluster_PreconnectPolicy) Validate() error { if wrapper := m.GetPredictivePreconnectRatio(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 3 { - return Cluster_PreconnectPolicyValidationError{ + err := Cluster_PreconnectPolicyValidationError{ field: "PredictivePreconnectRatio", reason: "value must be inside range [1, 3]", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return Cluster_PreconnectPolicyMultiError(errors) + } + return nil } +// Cluster_PreconnectPolicyMultiError is an error wrapping multiple validation +// errors returned by Cluster_PreconnectPolicy.ValidateAll() if the designated +// constraints aren't met. +type Cluster_PreconnectPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_PreconnectPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_PreconnectPolicyMultiError) AllErrors() []error { return m } + // Cluster_PreconnectPolicyValidationError is the validation error returned by // Cluster_PreconnectPolicy.Validate if the designated constraints aren't met. type Cluster_PreconnectPolicyValidationError struct { @@ -2041,24 +4112,66 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_LbSubsetConfig_LbSubsetSelector with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// Cluster_LbSubsetConfig_LbSubsetSelectorMultiError, or nil if none found. +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SingleHostPerSubset if _, ok := Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { - return Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{ + err := Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return Cluster_LbSubsetConfig_LbSubsetSelectorMultiError(errors) } return nil } +// Cluster_LbSubsetConfig_LbSubsetSelectorMultiError is an error wrapping +// multiple validation errors returned by +// Cluster_LbSubsetConfig_LbSubsetSelector.ValidateAll() if the designated +// constraints aren't met. +type Cluster_LbSubsetConfig_LbSubsetSelectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_LbSubsetConfig_LbSubsetSelectorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_LbSubsetConfig_LbSubsetSelectorMultiError) AllErrors() []error { return m } + // Cluster_LbSubsetConfig_LbSubsetSelectorValidationError is the validation // error returned by Cluster_LbSubsetConfig_LbSubsetSelector.Validate if the // designated constraints aren't met. @@ -2118,13 +4231,48 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_CommonLbConfig_ZoneAwareLbConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRoutingEnabled()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRoutingEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "RoutingEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "RoutingEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoutingEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "RoutingEnabled", @@ -2134,7 +4282,26 @@ func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { } } - if v, ok := interface{}(m.GetMinClusterSize()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinClusterSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "MinClusterSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "MinClusterSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinClusterSize()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "MinClusterSize", @@ -2146,9 +4313,31 @@ func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { // no validation rules for FailTrafficOnPanic + if len(errors) > 0 { + return Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError is an error wrapping +// multiple validation errors returned by +// Cluster_CommonLbConfig_ZoneAwareLbConfig.ValidateAll() if the designated +// constraints aren't met. +type Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError is the validation // error returned by Cluster_CommonLbConfig_ZoneAwareLbConfig.Validate if the // designated constraints aren't met. @@ -2208,16 +4397,53 @@ var _ interface { // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_CommonLbConfig_LocalityWeightedLbConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError is an error +// wrapping multiple validation errors returned by +// Cluster_CommonLbConfig_LocalityWeightedLbConfig.ValidateAll() if the +// designated constraints aren't met. +type Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError is the // validation error returned by // Cluster_CommonLbConfig_LocalityWeightedLbConfig.Validate if the designated @@ -2282,29 +4508,70 @@ var _ interface { // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Cluster_CommonLbConfig_ConsistentHashingLbConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError, or nil if none found. +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for UseHostnameForHashing if wrapper := m.GetHashBalanceFactor(); wrapper != nil { if wrapper.GetValue() < 100 { - return Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError{ + err := Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError{ field: "HashBalanceFactor", reason: "value must be greater than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError(errors) + } + return nil } +// Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError is an error +// wrapping multiple validation errors returned by +// Cluster_CommonLbConfig_ConsistentHashingLbConfig.ValidateAll() if the +// designated constraints aren't met. +type Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError) AllErrors() []error { return m } + // Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError is the // validation error returned by // Cluster_CommonLbConfig_ConsistentHashingLbConfig.Validate if the designated @@ -2371,37 +4638,79 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *LoadBalancingPolicy_Policy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadBalancingPolicy_Policy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadBalancingPolicy_PolicyMultiError, or nil if none found. +func (m *LoadBalancingPolicy_Policy) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadBalancingPolicy_Policy) validate(all bool) error { if m == nil { return nil } - // no validation rules for Name + var errors []error - 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, + if all { + switch v := interface{}(m.GetTypedExtensionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ + field: "TypedExtensionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ + field: "TypedExtensionConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedExtensionConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadBalancingPolicy_PolicyValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedExtensionConfig", reason: "embedded message failed validation", cause: err, } } } + if len(errors) > 0 { + return LoadBalancingPolicy_PolicyMultiError(errors) + } + return nil } +// LoadBalancingPolicy_PolicyMultiError is an error wrapping multiple +// validation errors returned by LoadBalancingPolicy_Policy.ValidateAll() if +// the designated constraints aren't met. +type LoadBalancingPolicy_PolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadBalancingPolicy_PolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadBalancingPolicy_PolicyMultiError) AllErrors() []error { return m } + // LoadBalancingPolicy_PolicyValidationError is the validation error returned // by LoadBalancingPolicy_Policy.Validate if the designated constraints aren't met. type LoadBalancingPolicy_PolicyValidationError struct { diff --git a/pkg/api/envoy/config/cluster/v3/filter.pb.go b/pkg/api/envoy/config/cluster/v3/filter.pb.go index 8311fac3f5..a1577d6fd7 100644 --- a/pkg/api/envoy/config/cluster/v3/filter.pb.go +++ b/pkg/api/envoy/config/cluster/v3/filter.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/cluster/v3/filter.proto -package envoy_config_cluster_v3 +package clusterv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,20 +23,17 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Filter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. + // The name of the filter configuration. 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. + // Note that Envoy's :ref:`downstream network + // filters ` are not valid upstream filters. TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` } @@ -109,12 +105,16 @@ var file_envoy_config_cluster_v3_filter_proto_rawDesc = []byte{ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x3e, 0x0a, 0x25, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x74, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x88, 0x01, 0x0a, 0x25, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/cluster/v3/filter.pb.validate.go b/pkg/api/envoy/config/cluster/v3/filter.pb.validate.go index 7bdeb03d44..515a2e6964 100644 --- a/pkg/api/envoy/config/cluster/v3/filter.pb.validate.go +++ b/pkg/api/envoy/config/cluster/v3/filter.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/cluster/v3/filter.proto -package envoy_config_cluster_v3 +package clusterv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Filter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Filter with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in FilterMultiError, or nil if none found. +func (m *Filter) ValidateAll() error { + return m.validate(true) +} + +func (m *Filter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return FilterValidationError{ + err := FilterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "TypedConfig", @@ -57,9 +96,29 @@ func (m *Filter) Validate() error { } } + if len(errors) > 0 { + return FilterMultiError(errors) + } + return nil } +// FilterMultiError is an error wrapping multiple validation errors returned by +// Filter.ValidateAll() if the designated constraints aren't met. +type FilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterMultiError) AllErrors() []error { return m } + // FilterValidationError is the validation error returned by Filter.Validate if // the designated constraints aren't met. type FilterValidationError struct { diff --git a/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.go b/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.go index eafede7107..bd1355dd1d 100644 --- a/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.go +++ b/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/cluster/v3/outlier_detection.proto -package envoy_config_cluster_v3 +package clusterv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,13 +24,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // See the :ref:`architecture overview ` for // more information on outlier detection. -// [#next-free-field: 22] +// [#next-free-field: 23] type OutlierDetection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -47,7 +42,7 @@ type OutlierDetection struct { Interval *duration.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 and is - // capped by :ref:`max_ejection_time`. + // capped by :ref:`max_ejection_time`. // Defaults to 30000ms or 30s. BaseEjectionTime *duration.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 @@ -89,29 +84,29 @@ type OutlierDetection struct { EnforcingConsecutiveGatewayFailure *wrappers.UInt32Value `protobuf:"bytes,11,opt,name=enforcing_consecutive_gateway_failure,json=enforcingConsecutiveGatewayFailure,proto3" json:"enforcing_consecutive_gateway_failure,omitempty"` // Determines whether to distinguish local origin failures from external errors. If set to true // the following configuration parameters are taken into account: - // :ref:`consecutive_local_origin_failure`, - // :ref:`enforcing_consecutive_local_origin_failure` + // :ref:`consecutive_local_origin_failure`, + // :ref:`enforcing_consecutive_local_origin_failure` // and - // :ref:`enforcing_local_origin_success_rate`. + // :ref:`enforcing_local_origin_success_rate`. // Defaults to false. SplitExternalLocalOriginErrors bool `protobuf:"varint,12,opt,name=split_external_local_origin_errors,json=splitExternalLocalOriginErrors,proto3" json:"split_external_local_origin_errors,omitempty"` // The number of consecutive locally originated failures before ejection // occurs. Defaults to 5. Parameter takes effect only when - // :ref:`split_external_local_origin_errors` + // :ref:`split_external_local_origin_errors` // is set to true. ConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=consecutive_local_origin_failure,json=consecutiveLocalOriginFailure,proto3" json:"consecutive_local_origin_failure,omitempty"` // The % chance that a host will be actually ejected when an outlier status // is detected through consecutive locally originated failures. This setting can be // used to disable ejection or to ramp it up slowly. Defaults to 100. // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` + // :ref:`split_external_local_origin_errors` // is set to true. EnforcingConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,14,opt,name=enforcing_consecutive_local_origin_failure,json=enforcingConsecutiveLocalOriginFailure,proto3" json:"enforcing_consecutive_local_origin_failure,omitempty"` // The % chance that a host will be actually ejected when an outlier status // is detected through success rate statistics for locally originated errors. // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` + // :ref:`split_external_local_origin_errors` // is set to true. EnforcingLocalOriginSuccessRate *wrappers.UInt32Value `protobuf:"bytes,15,opt,name=enforcing_local_origin_success_rate,json=enforcingLocalOriginSuccessRate,proto3" json:"enforcing_local_origin_success_rate,omitempty"` // The failure percentage to use when determining failure percentage-based outlier detection. If @@ -138,10 +133,15 @@ type OutlierDetection struct { // volume is lower than this setting, failure percentage-based ejection will not be performed for // this host. Defaults to 50. FailurePercentageRequestVolume *wrappers.UInt32Value `protobuf:"bytes,20,opt,name=failure_percentage_request_volume,json=failurePercentageRequestVolume,proto3" json:"failure_percentage_request_volume,omitempty"` - // The maximum time that a host is ejected for. See :ref:`base_ejection_time` + // The maximum time that a host is ejected for. See :ref:`base_ejection_time` // for more information. If not specified, the default value (300000ms or 300s) or - // :ref:`base_ejection_time` value is applied, whatever is larger. + // :ref:`base_ejection_time` value is applied, whatever is larger. MaxEjectionTime *duration.Duration `protobuf:"bytes,21,opt,name=max_ejection_time,json=maxEjectionTime,proto3" json:"max_ejection_time,omitempty"` + // The maximum amount of jitter to add to the ejection time, in order to prevent + // a 'thundering herd' effect where all proxies try to reconnect to host at the same time. + // See :ref:`max_ejection_time_jitter` + // Defaults to 0s. + MaxEjectionTimeJitter *duration.Duration `protobuf:"bytes,22,opt,name=max_ejection_time_jitter,json=maxEjectionTimeJitter,proto3" json:"max_ejection_time_jitter,omitempty"` } func (x *OutlierDetection) Reset() { @@ -323,6 +323,13 @@ func (x *OutlierDetection) GetMaxEjectionTime() *duration.Duration { return nil } +func (x *OutlierDetection) GetMaxEjectionTimeJitter() *duration.Duration { + if x != nil { + return x.MaxEjectionTimeJitter + } + return nil +} + var File_envoy_config_cluster_v3_outlier_detection_proto protoreflect.FileDescriptor var file_envoy_config_cluster_v3_outlier_detection_proto_rawDesc = []byte{ @@ -340,7 +347,7 @@ var file_envoy_config_cluster_v3_outlier_detection_proto_rawDesc = []byte{ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x10, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x11, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x35, 0x78, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, @@ -469,15 +476,25 @@ var file_envoy_config_cluster_v3_outlier_detection_proto_rawDesc = []byte{ 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x48, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x15, - 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6a, 0x69, 0x74, + 0x74, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, + 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x92, 0x01, 0x0a, 0x25, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x42, 0x15, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -519,11 +536,12 @@ var file_envoy_config_cluster_v3_outlier_detection_proto_depIdxs = []int32{ 1, // 17: envoy.config.cluster.v3.OutlierDetection.failure_percentage_minimum_hosts:type_name -> google.protobuf.UInt32Value 1, // 18: envoy.config.cluster.v3.OutlierDetection.failure_percentage_request_volume:type_name -> google.protobuf.UInt32Value 2, // 19: envoy.config.cluster.v3.OutlierDetection.max_ejection_time:type_name -> google.protobuf.Duration - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 2, // 20: envoy.config.cluster.v3.OutlierDetection.max_ejection_time_jitter:type_name -> google.protobuf.Duration + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_envoy_config_cluster_v3_outlier_detection_proto_init() } diff --git a/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.validate.go b/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.validate.go index 6545728bb2..9302650d40 100644 --- a/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.validate.go +++ b/pkg/api/envoy/config/cluster/v3/outlier_detection.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/cluster/v3/outlier_detection.proto -package envoy_config_cluster_v3 +package clusterv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *OutlierDetection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierDetection with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierDetectionMultiError, or nil if none found. +func (m *OutlierDetection) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierDetection) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConsecutive_5Xx()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConsecutive_5Xx()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "Consecutive_5Xx", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "Consecutive_5Xx", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsecutive_5Xx()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "Consecutive_5Xx", @@ -52,54 +87,76 @@ func (m *OutlierDetection) Validate() error { } if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return OutlierDetectionValidationError{ + err = OutlierDetectionValidationError{ field: "Interval", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return OutlierDetectionValidationError{ - field: "Interval", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := OutlierDetectionValidationError{ + field: "Interval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetBaseEjectionTime(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return OutlierDetectionValidationError{ + err = OutlierDetectionValidationError{ field: "BaseEjectionTime", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return OutlierDetectionValidationError{ - field: "BaseEjectionTime", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := OutlierDetectionValidationError{ + field: "BaseEjectionTime", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if wrapper := m.GetMaxEjectionPercent(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "MaxEjectionPercent", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -107,10 +164,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingConsecutive_5Xx(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingConsecutive_5Xx", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -118,15 +179,38 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingSuccessRate(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetSuccessRateMinimumHosts()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateMinimumHosts()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateMinimumHosts()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "SuccessRateMinimumHosts", @@ -136,7 +220,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetSuccessRateRequestVolume()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateRequestVolume()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateRequestVolume()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "SuccessRateRequestVolume", @@ -146,7 +249,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetSuccessRateStdevFactor()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuccessRateStdevFactor()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateStdevFactor", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "SuccessRateStdevFactor", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateStdevFactor()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "SuccessRateStdevFactor", @@ -156,7 +278,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetConsecutiveGatewayFailure()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConsecutiveGatewayFailure()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveGatewayFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveGatewayFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsecutiveGatewayFailure()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "ConsecutiveGatewayFailure", @@ -169,17 +310,40 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingConsecutiveGatewayFailure(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingConsecutiveGatewayFailure", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for SplitExternalLocalOriginErrors - if v, ok := interface{}(m.GetConsecutiveLocalOriginFailure()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConsecutiveLocalOriginFailure()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveLocalOriginFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "ConsecutiveLocalOriginFailure", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConsecutiveLocalOriginFailure()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "ConsecutiveLocalOriginFailure", @@ -192,10 +356,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingConsecutiveLocalOriginFailure(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingConsecutiveLocalOriginFailure", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -203,10 +371,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingLocalOriginSuccessRate(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingLocalOriginSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -214,10 +386,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetFailurePercentageThreshold(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "FailurePercentageThreshold", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -225,10 +401,14 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingFailurePercentage(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingFailurePercentage", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } @@ -236,15 +416,38 @@ func (m *OutlierDetection) Validate() error { if wrapper := m.GetEnforcingFailurePercentageLocalOrigin(); wrapper != nil { if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ + err := OutlierDetectionValidationError{ field: "EnforcingFailurePercentageLocalOrigin", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetFailurePercentageMinimumHosts()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFailurePercentageMinimumHosts()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageMinimumHosts", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFailurePercentageMinimumHosts()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "FailurePercentageMinimumHosts", @@ -254,7 +457,26 @@ func (m *OutlierDetection) Validate() error { } } - if v, ok := interface{}(m.GetFailurePercentageRequestVolume()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFailurePercentageRequestVolume()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "FailurePercentageRequestVolume", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFailurePercentageRequestVolume()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ field: "FailurePercentageRequestVolume", @@ -265,29 +487,88 @@ func (m *OutlierDetection) Validate() error { } if d := m.GetMaxEjectionTime(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return OutlierDetectionValidationError{ + err = OutlierDetectionValidationError{ field: "MaxEjectionTime", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := OutlierDetectionValidationError{ + field: "MaxEjectionTime", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + } + } - if dur <= gt { + if all { + switch v := interface{}(m.GetMaxEjectionTimeJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "MaxEjectionTimeJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionValidationError{ + field: "MaxEjectionTimeJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxEjectionTimeJitter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { return OutlierDetectionValidationError{ - field: "MaxEjectionTime", - reason: "value must be greater than 0s", + field: "MaxEjectionTimeJitter", + reason: "embedded message failed validation", + cause: err, } } + } + if len(errors) > 0 { + return OutlierDetectionMultiError(errors) } return nil } +// OutlierDetectionMultiError is an error wrapping multiple validation errors +// returned by OutlierDetection.ValidateAll() if the designated constraints +// aren't met. +type OutlierDetectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierDetectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierDetectionMultiError) AllErrors() []error { return m } + // OutlierDetectionValidationError is the validation error returned by // OutlierDetection.Validate if the designated constraints aren't met. type OutlierDetectionValidationError struct { diff --git a/pkg/api/envoy/config/cluster/v4alpha/circuit_breaker.pb.go b/pkg/api/envoy/config/cluster/v4alpha/circuit_breaker.pb.go deleted file mode 100644 index a86e68dc37..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/circuit_breaker.pb.go +++ /dev/null @@ -1,480 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/cluster/v4alpha/circuit_breaker.proto - -package envoy_config_cluster_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// :ref:`Circuit breaking` settings can be -// specified individually for each defined priority. -type CircuitBreakers struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *CircuitBreakers) Reset() { - *x = CircuitBreakers{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CircuitBreakers) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CircuitBreakers) ProtoMessage() {} - -func (x *CircuitBreakers) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CircuitBreakers.ProtoReflect.Descriptor instead. -func (*CircuitBreakers) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescGZIP(), []int{0} -} - -func (x *CircuitBreakers) GetThresholds() []*CircuitBreakers_Thresholds { - if x != nil { - return x.Thresholds - } - return nil -} - -// A Thresholds defines CircuitBreaker settings for a -// :ref:`RoutingPriority`. -// [#next-free-field: 9] -type CircuitBreakers_Thresholds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The :ref:`RoutingPriority` - // the specified CircuitBreaker settings apply to. - Priority v4alpha.RoutingPriority `protobuf:"varint,1,opt,name=priority,proto3,enum=envoy.config.core.v4alpha.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 *wrappers.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 *wrappers.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 *wrappers.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 *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` - // Specifies a limit on concurrent retries in relation to the number of active requests. This - // parameter is optional. - // - // .. note:: - // - // If this field is set, the retry budget will override any configured retry circuit - // breaker. - RetryBudget *CircuitBreakers_Thresholds_RetryBudget `protobuf:"bytes,8,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,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. - // - // .. note:: - // - // If a retry budget is used in lieu of the max_retries circuit breaker, - // the remaining retry resources remaining will not be tracked. - 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 *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_connection_pools,json=maxConnectionPools,proto3" json:"max_connection_pools,omitempty"` -} - -func (x *CircuitBreakers_Thresholds) Reset() { - *x = CircuitBreakers_Thresholds{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CircuitBreakers_Thresholds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CircuitBreakers_Thresholds) ProtoMessage() {} - -func (x *CircuitBreakers_Thresholds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CircuitBreakers_Thresholds.ProtoReflect.Descriptor instead. -func (*CircuitBreakers_Thresholds) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *CircuitBreakers_Thresholds) GetPriority() v4alpha.RoutingPriority { - if x != nil { - return x.Priority - } - return v4alpha.RoutingPriority_DEFAULT -} - -func (x *CircuitBreakers_Thresholds) GetMaxConnections() *wrappers.UInt32Value { - if x != nil { - return x.MaxConnections - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetMaxPendingRequests() *wrappers.UInt32Value { - if x != nil { - return x.MaxPendingRequests - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetMaxRequests() *wrappers.UInt32Value { - if x != nil { - return x.MaxRequests - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetMaxRetries() *wrappers.UInt32Value { - if x != nil { - return x.MaxRetries - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetRetryBudget() *CircuitBreakers_Thresholds_RetryBudget { - if x != nil { - return x.RetryBudget - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetTrackRemaining() bool { - if x != nil { - return x.TrackRemaining - } - return false -} - -func (x *CircuitBreakers_Thresholds) GetMaxConnectionPools() *wrappers.UInt32Value { - if x != nil { - return x.MaxConnectionPools - } - return nil -} - -type CircuitBreakers_Thresholds_RetryBudget struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the limit on concurrent retries as a percentage of the sum of active requests and - // active pending requests. For example, if there are 100 active requests and the - // budget_percent is set to 25, there may be 25 active retries. - // - // This parameter is optional. Defaults to 20%. - BudgetPercent *v3.Percent `protobuf:"bytes,1,opt,name=budget_percent,json=budgetPercent,proto3" json:"budget_percent,omitempty"` - // Specifies the minimum retry concurrency allowed for the retry budget. The limit on the - // number of active retries may never go below this number. - // - // This parameter is optional. Defaults to 3. - MinRetryConcurrency *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=min_retry_concurrency,json=minRetryConcurrency,proto3" json:"min_retry_concurrency,omitempty"` -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) Reset() { - *x = CircuitBreakers_Thresholds_RetryBudget{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CircuitBreakers_Thresholds_RetryBudget) ProtoMessage() {} - -func (x *CircuitBreakers_Thresholds_RetryBudget) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CircuitBreakers_Thresholds_RetryBudget.ProtoReflect.Descriptor instead. -func (*CircuitBreakers_Thresholds_RetryBudget) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) GetBudgetPercent() *v3.Percent { - if x != nil { - return x.BudgetPercent - } - return nil -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) GetMinRetryConcurrency() *wrappers.UInt32Value { - if x != nil { - return x.MinRetryConcurrency - } - return nil -} - -var File_envoy_config_cluster_v4alpha_circuit_breaker_proto protoreflect.FileDescriptor - -var file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x98, 0x08, 0x0a, 0x0f, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x65, 0x72, 0x73, 0x12, 0x58, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, - 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x73, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x1a, 0xfa, - 0x06, 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x50, 0x0a, - 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, - 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, - 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x69, 0x72, 0x63, - 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, - 0x65, 0x74, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, - 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, - 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x52, - 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0xe5, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0e, 0x62, 0x75, 0x64, 0x67, - 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, - 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, - 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, - 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, - 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, - 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, - 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, - 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x42, 0x4b, 0x0a, 0x2a, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x43, 0x69, 0x72, 0x63, 0x75, - 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescOnce sync.Once - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescData = file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDesc -) - -func file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescGZIP() []byte { - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescOnce.Do(func() { - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescData) - }) - return file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDescData -} - -var file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_config_cluster_v4alpha_circuit_breaker_proto_goTypes = []interface{}{ - (*CircuitBreakers)(nil), // 0: envoy.config.cluster.v4alpha.CircuitBreakers - (*CircuitBreakers_Thresholds)(nil), // 1: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds - (*CircuitBreakers_Thresholds_RetryBudget)(nil), // 2: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.RetryBudget - (v4alpha.RoutingPriority)(0), // 3: envoy.config.core.v4alpha.RoutingPriority - (*wrappers.UInt32Value)(nil), // 4: google.protobuf.UInt32Value - (*v3.Percent)(nil), // 5: envoy.type.v3.Percent -} -var file_envoy_config_cluster_v4alpha_circuit_breaker_proto_depIdxs = []int32{ - 1, // 0: envoy.config.cluster.v4alpha.CircuitBreakers.thresholds:type_name -> envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds - 3, // 1: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.priority:type_name -> envoy.config.core.v4alpha.RoutingPriority - 4, // 2: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.max_connections:type_name -> google.protobuf.UInt32Value - 4, // 3: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.max_pending_requests:type_name -> google.protobuf.UInt32Value - 4, // 4: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.max_requests:type_name -> google.protobuf.UInt32Value - 4, // 5: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.max_retries:type_name -> google.protobuf.UInt32Value - 2, // 6: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.retry_budget:type_name -> envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.RetryBudget - 4, // 7: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.max_connection_pools:type_name -> google.protobuf.UInt32Value - 5, // 8: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.RetryBudget.budget_percent:type_name -> envoy.type.v3.Percent - 4, // 9: envoy.config.cluster.v4alpha.CircuitBreakers.Thresholds.RetryBudget.min_retry_concurrency:type_name -> google.protobuf.UInt32Value - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_envoy_config_cluster_v4alpha_circuit_breaker_proto_init() } -func file_envoy_config_cluster_v4alpha_circuit_breaker_proto_init() { - if File_envoy_config_cluster_v4alpha_circuit_breaker_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CircuitBreakers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CircuitBreakers_Thresholds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CircuitBreakers_Thresholds_RetryBudget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_cluster_v4alpha_circuit_breaker_proto_goTypes, - DependencyIndexes: file_envoy_config_cluster_v4alpha_circuit_breaker_proto_depIdxs, - MessageInfos: file_envoy_config_cluster_v4alpha_circuit_breaker_proto_msgTypes, - }.Build() - File_envoy_config_cluster_v4alpha_circuit_breaker_proto = out.File - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_rawDesc = nil - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_goTypes = nil - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/cluster/v4alpha/circuit_breaker.pb.validate.go b/pkg/api/envoy/config/cluster/v4alpha/circuit_breaker.pb.validate.go deleted file mode 100644 index 409925a803..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/circuit_breaker.pb.validate.go +++ /dev/null @@ -1,342 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/cluster/v4alpha/circuit_breaker.proto - -package envoy_config_cluster_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.RoutingPriority(0) -) - -// 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. -func (m *CircuitBreakers) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetThresholds() { - _, _ = idx, item - - 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, - } - } - } - - } - - return nil -} - -// CircuitBreakersValidationError is the validation error returned by -// CircuitBreakers.Validate if the designated constraints aren't met. -type CircuitBreakersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CircuitBreakersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CircuitBreakersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CircuitBreakersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CircuitBreakersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CircuitBreakersValidationError) ErrorName() string { return "CircuitBreakersValidationError" } - -// Error satisfies the builtin error interface -func (e CircuitBreakersValidationError) Error() string { - 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.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CircuitBreakersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CircuitBreakersValidationError{} - -// Validate checks the field values on CircuitBreakers_Thresholds with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CircuitBreakers_Thresholds) Validate() error { - if m == nil { - return nil - } - - if _, ok := v4alpha.RoutingPriority_name[int32(m.GetPriority())]; !ok { - return CircuitBreakers_ThresholdsValidationError{ - field: "Priority", - reason: "value must be one of the defined enum values", - } - } - - 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, - } - } - } - - 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, - } - } - } - - 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, - } - } - } - - 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{}(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 - - 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, - } - } - } - - return nil -} - -// CircuitBreakers_ThresholdsValidationError is the validation error returned -// by CircuitBreakers_Thresholds.Validate if the designated constraints aren't met. -type CircuitBreakers_ThresholdsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CircuitBreakers_ThresholdsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CircuitBreakers_ThresholdsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CircuitBreakers_ThresholdsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CircuitBreakers_ThresholdsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CircuitBreakers_ThresholdsValidationError) ErrorName() string { - return "CircuitBreakers_ThresholdsValidationError" -} - -// Error satisfies the builtin error interface -func (e CircuitBreakers_ThresholdsValidationError) Error() string { - 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.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CircuitBreakers_ThresholdsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - 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/pkg/api/envoy/config/cluster/v4alpha/cluster.pb.go b/pkg/api/envoy/config/cluster/v4alpha/cluster.pb.go deleted file mode 100644 index 4d828bce82..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/cluster.pb.go +++ /dev/null @@ -1,4025 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/cluster/v4alpha/cluster.proto - -package envoy_config_cluster_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/cncf/udpa/go/xds/core/v3" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// 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 -) - -// Enum value maps for Cluster_DiscoveryType. -var ( - Cluster_DiscoveryType_name = map[int32]string{ - 0: "STATIC", - 1: "STRICT_DNS", - 2: "LOGICAL_DNS", - 3: "EDS", - 4: "ORIGINAL_DST", - } - Cluster_DiscoveryType_value = map[string]int32{ - "STATIC": 0, - "STRICT_DNS": 1, - "LOGICAL_DNS": 2, - "EDS": 3, - "ORIGINAL_DST": 4, - } -) - -func (x Cluster_DiscoveryType) Enum() *Cluster_DiscoveryType { - p := new(Cluster_DiscoveryType) - *p = x - return p -} - -func (x Cluster_DiscoveryType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_DiscoveryType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[0].Descriptor() -} - -func (Cluster_DiscoveryType) Type() protoreflect.EnumType { - return &file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[0] -} - -func (x Cluster_DiscoveryType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_DiscoveryType.Descriptor instead. -func (Cluster_DiscoveryType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 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:`Maglev load balancing policy` - // for an explanation. - Cluster_MAGLEV Cluster_LbPolicy = 5 - // This load balancer type must be specified if the configured cluster provides a cluster - // specific load balancer. Consult the configured cluster's documentation for whether to set - // this option or not. - Cluster_CLUSTER_PROVIDED Cluster_LbPolicy = 6 - // [#not-implemented-hide:] Use the new :ref:`load_balancing_policy - // ` field to determine the LB policy. - // [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field - // and instead using the new load_balancing_policy field as the one and only mechanism for - // configuring this.] - Cluster_LOAD_BALANCING_POLICY_CONFIG Cluster_LbPolicy = 7 -) - -// Enum value maps for Cluster_LbPolicy. -var ( - Cluster_LbPolicy_name = map[int32]string{ - 0: "ROUND_ROBIN", - 1: "LEAST_REQUEST", - 2: "RING_HASH", - 3: "RANDOM", - 5: "MAGLEV", - 6: "CLUSTER_PROVIDED", - 7: "LOAD_BALANCING_POLICY_CONFIG", - } - Cluster_LbPolicy_value = map[string]int32{ - "ROUND_ROBIN": 0, - "LEAST_REQUEST": 1, - "RING_HASH": 2, - "RANDOM": 3, - "MAGLEV": 5, - "CLUSTER_PROVIDED": 6, - "LOAD_BALANCING_POLICY_CONFIG": 7, - } -) - -func (x Cluster_LbPolicy) Enum() *Cluster_LbPolicy { - p := new(Cluster_LbPolicy) - *p = x - return p -} - -func (x Cluster_LbPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_LbPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[1].Descriptor() -} - -func (Cluster_LbPolicy) Type() protoreflect.EnumType { - return &file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[1] -} - -func (x Cluster_LbPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_LbPolicy.Descriptor instead. -func (Cluster_LbPolicy) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 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 -) - -// Enum value maps for Cluster_DnsLookupFamily. -var ( - Cluster_DnsLookupFamily_name = map[int32]string{ - 0: "AUTO", - 1: "V4_ONLY", - 2: "V6_ONLY", - } - Cluster_DnsLookupFamily_value = map[string]int32{ - "AUTO": 0, - "V4_ONLY": 1, - "V6_ONLY": 2, - } -) - -func (x Cluster_DnsLookupFamily) Enum() *Cluster_DnsLookupFamily { - p := new(Cluster_DnsLookupFamily) - *p = x - return p -} - -func (x Cluster_DnsLookupFamily) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_DnsLookupFamily) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[2].Descriptor() -} - -func (Cluster_DnsLookupFamily) Type() protoreflect.EnumType { - return &file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[2] -} - -func (x Cluster_DnsLookupFamily) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_DnsLookupFamily.Descriptor instead. -func (Cluster_DnsLookupFamily) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 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 -) - -// Enum value maps for Cluster_ClusterProtocolSelection. -var ( - Cluster_ClusterProtocolSelection_name = map[int32]string{ - 0: "USE_CONFIGURED_PROTOCOL", - 1: "USE_DOWNSTREAM_PROTOCOL", - } - Cluster_ClusterProtocolSelection_value = map[string]int32{ - "USE_CONFIGURED_PROTOCOL": 0, - "USE_DOWNSTREAM_PROTOCOL": 1, - } -) - -func (x Cluster_ClusterProtocolSelection) Enum() *Cluster_ClusterProtocolSelection { - p := new(Cluster_ClusterProtocolSelection) - *p = x - return p -} - -func (x Cluster_ClusterProtocolSelection) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_ClusterProtocolSelection) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[3].Descriptor() -} - -func (Cluster_ClusterProtocolSelection) Type() protoreflect.EnumType { - return &file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[3] -} - -func (x Cluster_ClusterProtocolSelection) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_ClusterProtocolSelection.Descriptor instead. -func (Cluster_ClusterProtocolSelection) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 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 -) - -// Enum value maps for Cluster_LbSubsetConfig_LbSubsetFallbackPolicy. -var ( - Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name = map[int32]string{ - 0: "NO_FALLBACK", - 1: "ANY_ENDPOINT", - 2: "DEFAULT_SUBSET", - } - Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_value = map[string]int32{ - "NO_FALLBACK": 0, - "ANY_ENDPOINT": 1, - "DEFAULT_SUBSET": 2, - } -) - -func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Enum() *Cluster_LbSubsetConfig_LbSubsetFallbackPolicy { - p := new(Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) - *p = x - return p -} - -func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[4].Descriptor() -} - -func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Type() protoreflect.EnumType { - return &file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[4] -} - -func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig_LbSubsetFallbackPolicy.Descriptor instead. -func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 3, 0} -} - -// Allows to override top level fallback policy per selector. -type Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy int32 - -const ( - // If NOT_DEFINED top level config fallback policy is used instead. - Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 0 - // If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. - Cluster_LbSubsetConfig_LbSubsetSelector_NO_FALLBACK Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 1 - // If ANY_ENDPOINT is selected, any cluster endpoint may be returned - // (subject to policy, health checks, etc). - Cluster_LbSubsetConfig_LbSubsetSelector_ANY_ENDPOINT Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 2 - // If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 3 - // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata - // keys reduced to - // :ref:`fallback_keys_subset`. - // It allows for a fallback to a different, less specific selector if some of the keys of - // the selector are considered optional. - Cluster_LbSubsetConfig_LbSubsetSelector_KEYS_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 4 -) - -// Enum value maps for Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy. -var ( - Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name = map[int32]string{ - 0: "NOT_DEFINED", - 1: "NO_FALLBACK", - 2: "ANY_ENDPOINT", - 3: "DEFAULT_SUBSET", - 4: "KEYS_SUBSET", - } - 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) Enum() *Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy { - p := new(Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) - *p = x - return p -} - -func (x Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[5].Descriptor() -} - -func (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) Type() protoreflect.EnumType { - return &file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[5] -} - -func (x Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy.Descriptor instead. -func (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 3, 0, 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 -) - -// Enum value maps for Cluster_RingHashLbConfig_HashFunction. -var ( - Cluster_RingHashLbConfig_HashFunction_name = map[int32]string{ - 0: "XX_HASH", - 1: "MURMUR_HASH_2", - } - Cluster_RingHashLbConfig_HashFunction_value = map[string]int32{ - "XX_HASH": 0, - "MURMUR_HASH_2": 1, - } -) - -func (x Cluster_RingHashLbConfig_HashFunction) Enum() *Cluster_RingHashLbConfig_HashFunction { - p := new(Cluster_RingHashLbConfig_HashFunction) - *p = x - return p -} - -func (x Cluster_RingHashLbConfig_HashFunction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_RingHashLbConfig_HashFunction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[6].Descriptor() -} - -func (Cluster_RingHashLbConfig_HashFunction) Type() protoreflect.EnumType { - return &file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes[6] -} - -func (x Cluster_RingHashLbConfig_HashFunction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_RingHashLbConfig_HashFunction.Descriptor instead. -func (Cluster_RingHashLbConfig_HashFunction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 5, 0} -} - -// Cluster list collections. Entries are *Cluster* resources or references. -// [#not-implemented-hide:] -type ClusterCollection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Entries *v3.CollectionEntry `protobuf:"bytes,1,opt,name=entries,proto3" json:"entries,omitempty"` -} - -func (x *ClusterCollection) Reset() { - *x = ClusterCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterCollection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterCollection) ProtoMessage() {} - -func (x *ClusterCollection) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterCollection.ProtoReflect.Descriptor instead. -func (*ClusterCollection) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{0} -} - -func (x *ClusterCollection) GetEntries() *v3.CollectionEntry { - if x != nil { - return x.Entries - } - return nil -} - -// Configuration for a single upstream cluster. -// [#next-free-field: 53] -type Cluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration to use different transport sockets for different endpoints. - // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` - // is used to match against the transport sockets as they appear in the list. The first - // :ref:`match ` is used. - // For example, with the following match - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "enableMTLS" - // match: - // acceptMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - name: "defaultToPlaintext" - // match: {} - // transport_socket: - // name: envoy.transport_sockets.raw_buffer - // - // Connections to the endpoints whose metadata value under *envoy.transport_socket_match* - // having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. - // - // If a :ref:`socket match ` with empty match - // criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" - // socket match in case above. - // - // If an endpoint metadata's value under *envoy.transport_socket_match* does not match any - // *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or - // *transport_socket* specified in this cluster. - // - // This field allows gradual and flexible transport socket configuration changes. - // - // The metadata of endpoints in EDS can indicate transport socket capabilities. For example, - // an endpoint's metadata can have two key value pairs as "acceptMTLS": "true", - // "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic - // has "acceptPlaintext": "true" metadata information. - // - // Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS - // traffic for endpoints with "acceptMTLS": "true", by adding a corresponding - // *TransportSocketMatch* in this field. Other client Envoys receive CDS without - // *transport_socket_match* set, and still send plain text traffic to the same cluster. - // - // This field can be used to specify custom transport socket configurations for health - // checks by adding matching key/value pairs in a health check's - // :ref:`transport socket match criteria ` field. - // - // [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] - TransportSocketMatches []*Cluster_TransportSocketMatch `protobuf:"bytes,43,rep,name=transport_socket_matches,json=transportSocketMatches,proto3" json:"transport_socket_matches,omitempty"` - // 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. - 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 assignable 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 *duration.Duration `protobuf:"bytes,4,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - // Soft limit on size of the cluster’s connections read and write buffers. If - // unspecified, an implementation defined default is applied (1MiB). - PerConnectionBufferLimitBytes *wrappers.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. - // [#comment:TODO: Remove enum constraint :ref:`LOAD_BALANCING_POLICY_CONFIG` when implemented.] - LbPolicy Cluster_LbPolicy `protobuf:"varint,6,opt,name=lb_policy,json=lbPolicy,proto3,enum=envoy.config.cluster.v4alpha.Cluster_LbPolicy" json:"lb_policy,omitempty"` - // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. - // This field supersedes the *hosts* field in the v2 API. - // - // .. attention:: - // - // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. - // - LoadAssignment *v31.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 []*v4alpha.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 *wrappers.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 *CircuitBreakers `protobuf:"bytes,10,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` - // HTTP protocol options that are applied only to upstream HTTP connections. - // These options apply to all HTTP versions. - // This has been deprecated in favor of - // :ref:`upstream_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. - // upstream_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` - // for example usage. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedUpstreamHttpProtocolOptions *v4alpha.UpstreamHttpProtocolOptions `protobuf:"bytes,46,opt,name=hidden_envoy_deprecated_upstream_http_protocol_options,json=hiddenEnvoyDeprecatedUpstreamHttpProtocolOptions,proto3" json:"hidden_envoy_deprecated_upstream_http_protocol_options,omitempty"` - // Additional options when handling HTTP requests upstream. These options will be applicable to - // both HTTP1 and HTTP2 requests. - // This has been deprecated in favor of - // :ref:`common_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. - // common_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` - // for example usage. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedCommonHttpProtocolOptions *v4alpha.HttpProtocolOptions `protobuf:"bytes,29,opt,name=hidden_envoy_deprecated_common_http_protocol_options,json=hiddenEnvoyDeprecatedCommonHttpProtocolOptions,proto3" json:"hidden_envoy_deprecated_common_http_protocol_options,omitempty"` - // Additional options when handling HTTP1 requests. - // This has been deprecated in favor of http_protocol_options fields in the in the - // :ref:`http_protocol_options ` message. - // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` - // for example usage. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedHttpProtocolOptions *v4alpha.Http1ProtocolOptions `protobuf:"bytes,13,opt,name=hidden_envoy_deprecated_http_protocol_options,json=hiddenEnvoyDeprecatedHttpProtocolOptions,proto3" json:"hidden_envoy_deprecated_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. - // This has been deprecated in favor of http2_protocol_options fields in the in the - // :ref:`http_protocol_options ` - // message. http2_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See ref:`upstream_http_protocol_options - // ` - // for example usage. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedHttp2ProtocolOptions *v4alpha.Http2ProtocolOptions `protobuf:"bytes,14,opt,name=hidden_envoy_deprecated_http2_protocol_options,json=hiddenEnvoyDeprecatedHttp2ProtocolOptions,proto3" json:"hidden_envoy_deprecated_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. - // [#next-major-version: make this a list of typed extensions.] - 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"` - // 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. The value configured must be at least 1ms. 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 *duration.Duration `protobuf:"bytes,16,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"` - // If the DNS failure refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types - // other than :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS` this setting is - // ignored. - DnsFailureRefreshRate *Cluster_RefreshRate `protobuf:"bytes,44,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"` - // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, - // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS - // resolution. - RespectDnsTtl bool `protobuf:"varint,39,opt,name=respect_dns_ttl,json=respectDnsTtl,proto3" json:"respect_dns_ttl,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.config.cluster.v4alpha.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. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple's API only allows overriding DNS resolvers via system settings. - DnsResolvers []*v4alpha.Address `protobuf:"bytes,18,rep,name=dns_resolvers,json=dnsResolvers,proto3" json:"dns_resolvers,omitempty"` - // [#next-major-version: Reconcile DNS options in a single message.] - // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - UseTcpForDnsLookups bool `protobuf:"varint,45,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,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 *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 *duration.Duration `protobuf:"bytes,20,opt,name=cleanup_interval,json=cleanupInterval,proto3" 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 *v4alpha.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`, - // :ref:`MAGLEV` and - // :ref:`LEAST_REQUEST` - // has additional configuration options. - // Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding - // LbPolicy will generate an error at runtime. - // - // Types that are assignable to LbConfig: - // *Cluster_RingHashLbConfig_ - // *Cluster_MaglevLbConfig_ - // *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. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`UpstreamTlsContexts ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - TransportSocket *v4alpha.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.filters.http.router*. - Metadata *v4alpha.Metadata `protobuf:"bytes,25,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Determines how Envoy selects the protocol used to speak to upstream hosts. - // This has been deprecated in favor of setting explicit protocol selection - // in the :ref:`http_protocol_options - // ` message. - // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedProtocolSelection Cluster_ClusterProtocolSelection `protobuf:"varint,26,opt,name=hidden_envoy_deprecated_protocol_selection,json=hiddenEnvoyDeprecatedProtocolSelection,proto3,enum=envoy.config.cluster.v4alpha.Cluster_ClusterProtocolSelection" json:"hidden_envoy_deprecated_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 set to true, Envoy will ignore the health value of a host when processing its removal - // from service discovery. This means that if active health checking is used, Envoy will *not* - // wait for the endpoint to go unhealthy before removing it. - IgnoreHealthOnHostRemoval bool `protobuf:"varint,32,opt,name=ignore_health_on_host_removal,json=ignoreHealthOnHostRemoval,proto3" json:"ignore_health_on_host_removal,omitempty"` - // An (optional) network filter chain, listed in the order the filters should be applied. - // The chain will be applied to all outgoing connections that Envoy makes to the upstream - // servers of this cluster. - Filters []*Filter `protobuf:"bytes,40,rep,name=filters,proto3" json:"filters,omitempty"` - // [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the - // :ref:`lb_policy` field has the value - // :ref:`LOAD_BALANCING_POLICY_CONFIG`. - LoadBalancingPolicy *LoadBalancingPolicy `protobuf:"bytes,41,opt,name=load_balancing_policy,json=loadBalancingPolicy,proto3" json:"load_balancing_policy,omitempty"` - // [#not-implemented-hide:] - // If present, tells the client where to send load reports via LRS. If not present, the - // client will fall back to a client-side default, which may be either (a) don't send any - // load reports or (b) send load reports for all clusters to a single default server - // (which may be configured in the bootstrap file). - // - // Note that if multiple clusters point to the same LRS server, the client may choose to - // create a separate stream for each cluster or it may choose to coalesce the data for - // multiple clusters onto a single stream. Either way, the client must make sure to send - // the data for any given cluster on no more than one stream. - // - // [#next-major-version: In the v3 API, we should consider restructuring this somehow, - // maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation - // from the LRS stream here.] - LrsServer *v4alpha.ConfigSource `protobuf:"bytes,42,opt,name=lrs_server,json=lrsServer,proto3" json:"lrs_server,omitempty"` - // If track_timeout_budgets is true, the :ref:`timeout budget histograms - // ` will be published for each - // request. These show what percentage of a request's per try and global timeout was used. A value - // of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value - // of 100 would indicate that the request took the entirety of the timeout given to it. - // - // .. attention:: - // - // This field has been deprecated in favor of `timeout_budgets`, part of - // :ref:`track_cluster_stats `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedTrackTimeoutBudgets bool `protobuf:"varint,47,opt,name=hidden_envoy_deprecated_track_timeout_budgets,json=hiddenEnvoyDeprecatedTrackTimeoutBudgets,proto3" json:"hidden_envoy_deprecated_track_timeout_budgets,omitempty"` - // Optional customization and configuration of upstream connection pool, and upstream type. - // - // Currently this field only applies for HTTP traffic but is designed for eventual use for custom - // TCP upstreams. - // - // For HTTP traffic, Envoy will generally take downstream HTTP and send it upstream as upstream - // HTTP, using the http connection pool and the codec from `http2_protocol_options` - // - // For routes where CONNECT termination is configured, Envoy will take downstream CONNECT - // requests and forward the CONNECT payload upstream over raw TCP using the tcp connection pool. - // - // The default pool used is the generic connection pool which creates the HTTP upstream for most - // HTTP requests, and the TCP upstream if CONNECT termination is configured. - // - // If users desire custom connection pool or upstream behavior, for example terminating - // CONNECT only if a custom filter indicates it is appropriate, the custom factories - // can be registered and configured here. - UpstreamConfig *v4alpha.TypedExtensionConfig `protobuf:"bytes,48,opt,name=upstream_config,json=upstreamConfig,proto3" json:"upstream_config,omitempty"` - // Configuration to track optional cluster stats. - TrackClusterStats *TrackClusterStats `protobuf:"bytes,49,opt,name=track_cluster_stats,json=trackClusterStats,proto3" json:"track_cluster_stats,omitempty"` - // [#not-implemented-hide:] - // Preconnect configuration for this cluster. - PreconnectPolicy *Cluster_PreconnectPolicy `protobuf:"bytes,50,opt,name=preconnect_policy,json=preconnectPolicy,proto3" json:"preconnect_policy,omitempty"` - // If `connection_pool_per_downstream_connection` is true, the cluster will use a separate - // connection pool for every downstream connection - ConnectionPoolPerDownstreamConnection bool `protobuf:"varint,51,opt,name=connection_pool_per_downstream_connection,json=connectionPoolPerDownstreamConnection,proto3" json:"connection_pool_per_downstream_connection,omitempty"` -} - -func (x *Cluster) Reset() { - *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster) ProtoMessage() {} - -func (x *Cluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. -func (*Cluster) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1} -} - -func (x *Cluster) GetTransportSocketMatches() []*Cluster_TransportSocketMatch { - if x != nil { - return x.TransportSocketMatches - } - return nil -} - -func (x *Cluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Cluster) GetAltStatName() string { - if x != nil { - return x.AltStatName - } - return "" -} - -func (m *Cluster) GetClusterDiscoveryType() isCluster_ClusterDiscoveryType { - if m != nil { - return m.ClusterDiscoveryType - } - return nil -} - -func (x *Cluster) GetType() Cluster_DiscoveryType { - if x, ok := x.GetClusterDiscoveryType().(*Cluster_Type); ok { - return x.Type - } - return Cluster_STATIC -} - -func (x *Cluster) GetClusterType() *Cluster_CustomClusterType { - if x, ok := x.GetClusterDiscoveryType().(*Cluster_ClusterType); ok { - return x.ClusterType - } - return nil -} - -func (x *Cluster) GetEdsClusterConfig() *Cluster_EdsClusterConfig { - if x != nil { - return x.EdsClusterConfig - } - return nil -} - -func (x *Cluster) GetConnectTimeout() *duration.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -func (x *Cluster) GetPerConnectionBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerConnectionBufferLimitBytes - } - return nil -} - -func (x *Cluster) GetLbPolicy() Cluster_LbPolicy { - if x != nil { - return x.LbPolicy - } - return Cluster_ROUND_ROBIN -} - -func (x *Cluster) GetLoadAssignment() *v31.ClusterLoadAssignment { - if x != nil { - return x.LoadAssignment - } - return nil -} - -func (x *Cluster) GetHealthChecks() []*v4alpha.HealthCheck { - if x != nil { - return x.HealthChecks - } - return nil -} - -func (x *Cluster) GetMaxRequestsPerConnection() *wrappers.UInt32Value { - if x != nil { - return x.MaxRequestsPerConnection - } - return nil -} - -func (x *Cluster) GetCircuitBreakers() *CircuitBreakers { - if x != nil { - return x.CircuitBreakers - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedUpstreamHttpProtocolOptions() *v4alpha.UpstreamHttpProtocolOptions { - if x != nil { - return x.HiddenEnvoyDeprecatedUpstreamHttpProtocolOptions - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedCommonHttpProtocolOptions() *v4alpha.HttpProtocolOptions { - if x != nil { - return x.HiddenEnvoyDeprecatedCommonHttpProtocolOptions - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedHttpProtocolOptions() *v4alpha.Http1ProtocolOptions { - if x != nil { - return x.HiddenEnvoyDeprecatedHttpProtocolOptions - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedHttp2ProtocolOptions() *v4alpha.Http2ProtocolOptions { - if x != nil { - return x.HiddenEnvoyDeprecatedHttp2ProtocolOptions - } - return nil -} - -func (x *Cluster) GetTypedExtensionProtocolOptions() map[string]*any.Any { - if x != nil { - return x.TypedExtensionProtocolOptions - } - return nil -} - -func (x *Cluster) GetDnsRefreshRate() *duration.Duration { - if x != nil { - return x.DnsRefreshRate - } - return nil -} - -func (x *Cluster) GetDnsFailureRefreshRate() *Cluster_RefreshRate { - if x != nil { - return x.DnsFailureRefreshRate - } - return nil -} - -func (x *Cluster) GetRespectDnsTtl() bool { - if x != nil { - return x.RespectDnsTtl - } - return false -} - -func (x *Cluster) GetDnsLookupFamily() Cluster_DnsLookupFamily { - if x != nil { - return x.DnsLookupFamily - } - return Cluster_AUTO -} - -func (x *Cluster) GetDnsResolvers() []*v4alpha.Address { - if x != nil { - return x.DnsResolvers - } - return nil -} - -func (x *Cluster) GetUseTcpForDnsLookups() bool { - if x != nil { - return x.UseTcpForDnsLookups - } - return false -} - -func (x *Cluster) GetOutlierDetection() *OutlierDetection { - if x != nil { - return x.OutlierDetection - } - return nil -} - -func (x *Cluster) GetCleanupInterval() *duration.Duration { - if x != nil { - return x.CleanupInterval - } - return nil -} - -func (x *Cluster) GetUpstreamBindConfig() *v4alpha.BindConfig { - if x != nil { - return x.UpstreamBindConfig - } - return nil -} - -func (x *Cluster) GetLbSubsetConfig() *Cluster_LbSubsetConfig { - if x != nil { - return x.LbSubsetConfig - } - return nil -} - -func (m *Cluster) GetLbConfig() isCluster_LbConfig { - if m != nil { - return m.LbConfig - } - return nil -} - -func (x *Cluster) GetRingHashLbConfig() *Cluster_RingHashLbConfig { - if x, ok := x.GetLbConfig().(*Cluster_RingHashLbConfig_); ok { - return x.RingHashLbConfig - } - return nil -} - -func (x *Cluster) GetMaglevLbConfig() *Cluster_MaglevLbConfig { - if x, ok := x.GetLbConfig().(*Cluster_MaglevLbConfig_); ok { - return x.MaglevLbConfig - } - return nil -} - -func (x *Cluster) GetOriginalDstLbConfig() *Cluster_OriginalDstLbConfig { - if x, ok := x.GetLbConfig().(*Cluster_OriginalDstLbConfig_); ok { - return x.OriginalDstLbConfig - } - return nil -} - -func (x *Cluster) GetLeastRequestLbConfig() *Cluster_LeastRequestLbConfig { - if x, ok := x.GetLbConfig().(*Cluster_LeastRequestLbConfig_); ok { - return x.LeastRequestLbConfig - } - return nil -} - -func (x *Cluster) GetCommonLbConfig() *Cluster_CommonLbConfig { - if x != nil { - return x.CommonLbConfig - } - return nil -} - -func (x *Cluster) GetTransportSocket() *v4alpha.TransportSocket { - if x != nil { - return x.TransportSocket - } - return nil -} - -func (x *Cluster) GetMetadata() *v4alpha.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedProtocolSelection() Cluster_ClusterProtocolSelection { - if x != nil { - return x.HiddenEnvoyDeprecatedProtocolSelection - } - return Cluster_USE_CONFIGURED_PROTOCOL -} - -func (x *Cluster) GetUpstreamConnectionOptions() *UpstreamConnectionOptions { - if x != nil { - return x.UpstreamConnectionOptions - } - return nil -} - -func (x *Cluster) GetCloseConnectionsOnHostHealthFailure() bool { - if x != nil { - return x.CloseConnectionsOnHostHealthFailure - } - return false -} - -func (x *Cluster) GetIgnoreHealthOnHostRemoval() bool { - if x != nil { - return x.IgnoreHealthOnHostRemoval - } - return false -} - -func (x *Cluster) GetFilters() []*Filter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *Cluster) GetLoadBalancingPolicy() *LoadBalancingPolicy { - if x != nil { - return x.LoadBalancingPolicy - } - return nil -} - -func (x *Cluster) GetLrsServer() *v4alpha.ConfigSource { - if x != nil { - return x.LrsServer - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetHiddenEnvoyDeprecatedTrackTimeoutBudgets() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedTrackTimeoutBudgets - } - return false -} - -func (x *Cluster) GetUpstreamConfig() *v4alpha.TypedExtensionConfig { - if x != nil { - return x.UpstreamConfig - } - return nil -} - -func (x *Cluster) GetTrackClusterStats() *TrackClusterStats { - if x != nil { - return x.TrackClusterStats - } - return nil -} - -func (x *Cluster) GetPreconnectPolicy() *Cluster_PreconnectPolicy { - if x != nil { - return x.PreconnectPolicy - } - return nil -} - -func (x *Cluster) GetConnectionPoolPerDownstreamConnection() bool { - if x != nil { - return x.ConnectionPoolPerDownstreamConnection - } - return false -} - -type isCluster_ClusterDiscoveryType interface { - isCluster_ClusterDiscoveryType() -} - -type Cluster_Type struct { - // The :ref:`service discovery type ` - // to use for resolving the cluster. - Type Cluster_DiscoveryType `protobuf:"varint,2,opt,name=type,proto3,enum=envoy.config.cluster.v4alpha.Cluster_DiscoveryType,oneof"` -} - -type Cluster_ClusterType struct { - // The custom cluster type. - ClusterType *Cluster_CustomClusterType `protobuf:"bytes,38,opt,name=cluster_type,json=clusterType,proto3,oneof"` -} - -func (*Cluster_Type) isCluster_ClusterDiscoveryType() {} - -func (*Cluster_ClusterType) isCluster_ClusterDiscoveryType() {} - -type isCluster_LbConfig interface { - isCluster_LbConfig() -} - -type Cluster_RingHashLbConfig_ struct { - // Optional configuration for the Ring Hash load balancing policy. - RingHashLbConfig *Cluster_RingHashLbConfig `protobuf:"bytes,23,opt,name=ring_hash_lb_config,json=ringHashLbConfig,proto3,oneof"` -} - -type Cluster_MaglevLbConfig_ struct { - // Optional configuration for the Maglev load balancing policy. - MaglevLbConfig *Cluster_MaglevLbConfig `protobuf:"bytes,52,opt,name=maglev_lb_config,json=maglevLbConfig,proto3,oneof"` -} - -type Cluster_OriginalDstLbConfig_ struct { - // Optional configuration for the Original Destination load balancing policy. - OriginalDstLbConfig *Cluster_OriginalDstLbConfig `protobuf:"bytes,34,opt,name=original_dst_lb_config,json=originalDstLbConfig,proto3,oneof"` -} - -type Cluster_LeastRequestLbConfig_ struct { - // Optional configuration for the LeastRequest load balancing policy. - LeastRequestLbConfig *Cluster_LeastRequestLbConfig `protobuf:"bytes,37,opt,name=least_request_lb_config,json=leastRequestLbConfig,proto3,oneof"` -} - -func (*Cluster_RingHashLbConfig_) isCluster_LbConfig() {} - -func (*Cluster_MaglevLbConfig_) isCluster_LbConfig() {} - -func (*Cluster_OriginalDstLbConfig_) isCluster_LbConfig() {} - -func (*Cluster_LeastRequestLbConfig_) isCluster_LbConfig() {} - -// [#not-implemented-hide:] Extensible load balancing policy configuration. -// -// Every LB policy defined via this mechanism will be identified via a unique name using reverse -// DNS notation. If the policy needs configuration parameters, it must define a message for its -// own configuration, which will be stored in the config field. The name of the policy will tell -// clients which type of message they should expect to see in the config field. -// -// Note that there are cases where it is useful to be able to independently select LB policies -// for choosing a locality and for choosing an endpoint within that locality. For example, a -// given deployment may always use the same policy to choose the locality, but for choosing the -// endpoint within the locality, some clusters may use weighted-round-robin, while others may -// use some sort of session-based balancing. -// -// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a -// child LB policy for each locality. For each request, the parent chooses the locality and then -// delegates to the child policy for that locality to choose the endpoint within the locality. -// -// To facilitate this, the config message for the top-level LB policy may include a field of -// type LoadBalancingPolicy that specifies the child policy. -type LoadBalancingPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Each client will iterate over the list in order and stop at the first policy that it - // supports. This provides a mechanism for starting to use new LB policies that are not yet - // supported by all clients. - Policies []*LoadBalancingPolicy_Policy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` -} - -func (x *LoadBalancingPolicy) Reset() { - *x = LoadBalancingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadBalancingPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadBalancingPolicy) ProtoMessage() {} - -func (x *LoadBalancingPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadBalancingPolicy.ProtoReflect.Descriptor instead. -func (*LoadBalancingPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{2} -} - -func (x *LoadBalancingPolicy) GetPolicies() []*LoadBalancingPolicy_Policy { - if x != nil { - return x.Policies - } - return nil -} - -// An extensible structure containing the address Envoy should bind to when -// establishing upstream connections. -type UpstreamBindConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address Envoy should bind to when establishing upstream connections. - SourceAddress *v4alpha.Address `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` -} - -func (x *UpstreamBindConfig) Reset() { - *x = UpstreamBindConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamBindConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamBindConfig) ProtoMessage() {} - -func (x *UpstreamBindConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamBindConfig.ProtoReflect.Descriptor instead. -func (*UpstreamBindConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{3} -} - -func (x *UpstreamBindConfig) GetSourceAddress() *v4alpha.Address { - if x != nil { - return x.SourceAddress - } - return nil -} - -type UpstreamConnectionOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - TcpKeepalive *v4alpha.TcpKeepalive `protobuf:"bytes,1,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcp_keepalive,omitempty"` -} - -func (x *UpstreamConnectionOptions) Reset() { - *x = UpstreamConnectionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamConnectionOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamConnectionOptions) ProtoMessage() {} - -func (x *UpstreamConnectionOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamConnectionOptions.ProtoReflect.Descriptor instead. -func (*UpstreamConnectionOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{4} -} - -func (x *UpstreamConnectionOptions) GetTcpKeepalive() *v4alpha.TcpKeepalive { - if x != nil { - return x.TcpKeepalive - } - return nil -} - -type TrackClusterStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If timeout_budgets is true, the :ref:`timeout budget histograms - // ` will be published for each - // request. These show what percentage of a request's per try and global timeout was used. A value - // of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value - // of 100 would indicate that the request took the entirety of the timeout given to it. - TimeoutBudgets bool `protobuf:"varint,1,opt,name=timeout_budgets,json=timeoutBudgets,proto3" json:"timeout_budgets,omitempty"` - // If request_response_sizes is true, then the :ref:`histograms - // ` tracking header and body sizes - // of requests and responses will be published. - RequestResponseSizes bool `protobuf:"varint,2,opt,name=request_response_sizes,json=requestResponseSizes,proto3" json:"request_response_sizes,omitempty"` -} - -func (x *TrackClusterStats) Reset() { - *x = TrackClusterStats{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TrackClusterStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TrackClusterStats) ProtoMessage() {} - -func (x *TrackClusterStats) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TrackClusterStats.ProtoReflect.Descriptor instead. -func (*TrackClusterStats) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{5} -} - -func (x *TrackClusterStats) GetTimeoutBudgets() bool { - if x != nil { - return x.TimeoutBudgets - } - return false -} - -func (x *TrackClusterStats) GetRequestResponseSizes() bool { - if x != nil { - return x.RequestResponseSizes - } - return false -} - -// TransportSocketMatch specifies what transport socket config will be used -// when the match conditions are satisfied. -type Cluster_TransportSocketMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the match, used in stats generation. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional endpoint metadata match criteria. - // The connection to the endpoint with metadata matching what is set in this field - // will use the transport socket configuration specified here. - // The endpoint's metadata entry in *envoy.transport_socket_match* is used to match - // against the values specified in this field. - Match *_struct.Struct `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"` - // The configuration of the transport socket. - TransportSocket *v4alpha.TransportSocket `protobuf:"bytes,3,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` -} - -func (x *Cluster_TransportSocketMatch) Reset() { - *x = Cluster_TransportSocketMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_TransportSocketMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_TransportSocketMatch) ProtoMessage() {} - -func (x *Cluster_TransportSocketMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_TransportSocketMatch.ProtoReflect.Descriptor instead. -func (*Cluster_TransportSocketMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *Cluster_TransportSocketMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Cluster_TransportSocketMatch) GetMatch() *_struct.Struct { - if x != nil { - return x.Match - } - return nil -} - -func (x *Cluster_TransportSocketMatch) GetTransportSocket() *v4alpha.TransportSocket { - if x != nil { - return x.TransportSocket - } - return nil -} - -// Extended cluster type. -type Cluster_CustomClusterType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *Cluster_CustomClusterType) Reset() { - *x = Cluster_CustomClusterType{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CustomClusterType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CustomClusterType) ProtoMessage() {} - -func (x *Cluster_CustomClusterType) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CustomClusterType.ProtoReflect.Descriptor instead. -func (*Cluster_CustomClusterType) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *Cluster_CustomClusterType) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Cluster_CustomClusterType) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -// Only valid when discovery type is EDS. -type Cluster_EdsClusterConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration for the source of EDS updates for this Cluster. - EdsConfig *v4alpha.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. This may be a xdstp:// URL. - ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` -} - -func (x *Cluster_EdsClusterConfig) Reset() { - *x = Cluster_EdsClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_EdsClusterConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_EdsClusterConfig) ProtoMessage() {} - -func (x *Cluster_EdsClusterConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_EdsClusterConfig.ProtoReflect.Descriptor instead. -func (*Cluster_EdsClusterConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 2} -} - -func (x *Cluster_EdsClusterConfig) GetEdsConfig() *v4alpha.ConfigSource { - if x != nil { - return x.EdsConfig - } - return nil -} - -func (x *Cluster_EdsClusterConfig) GetServiceName() string { - if x != nil { - return x.ServiceName - } - return "" -} - -// Optionally divide the endpoints in this cluster into subsets defined by -// endpoint metadata and selected by route and weighted cluster metadata. -// [#next-free-field: 8] -type Cluster_LbSubsetConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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.config.cluster.v4alpha.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 *_struct.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 disproportionately 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"` - // If true, metadata specified for a metadata key will be matched against the corresponding - // endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value - // and any of the elements in the list matches the criteria. - ListAsAny bool `protobuf:"varint,7,opt,name=list_as_any,json=listAsAny,proto3" json:"list_as_any,omitempty"` -} - -func (x *Cluster_LbSubsetConfig) Reset() { - *x = Cluster_LbSubsetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_LbSubsetConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_LbSubsetConfig) ProtoMessage() {} - -func (x *Cluster_LbSubsetConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig.ProtoReflect.Descriptor instead. -func (*Cluster_LbSubsetConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 3} -} - -func (x *Cluster_LbSubsetConfig) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetFallbackPolicy { - if x != nil { - return x.FallbackPolicy - } - return Cluster_LbSubsetConfig_NO_FALLBACK -} - -func (x *Cluster_LbSubsetConfig) GetDefaultSubset() *_struct.Struct { - if x != nil { - return x.DefaultSubset - } - return nil -} - -func (x *Cluster_LbSubsetConfig) GetSubsetSelectors() []*Cluster_LbSubsetConfig_LbSubsetSelector { - if x != nil { - return x.SubsetSelectors - } - return nil -} - -func (x *Cluster_LbSubsetConfig) GetLocalityWeightAware() bool { - if x != nil { - return x.LocalityWeightAware - } - return false -} - -func (x *Cluster_LbSubsetConfig) GetScaleLocalityWeight() bool { - if x != nil { - return x.ScaleLocalityWeight - } - return false -} - -func (x *Cluster_LbSubsetConfig) GetPanicModeAny() bool { - if x != nil { - return x.PanicModeAny - } - return false -} - -func (x *Cluster_LbSubsetConfig) GetListAsAny() bool { - if x != nil { - return x.ListAsAny - } - return false -} - -// Specific configuration for the LeastRequest load balancing policy. -type Cluster_LeastRequestLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` - // The following formula is used to calculate the dynamic weights when hosts have different load - // balancing weights: - // - // `weight = load_balancing_weight / (active_requests + 1)^active_request_bias` - // - // The larger the active request bias is, the more aggressively active requests will lower the - // effective weight when all host weights are not equal. - // - // `active_request_bias` must be greater than or equal to 0.0. - // - // When `active_request_bias == 0.0` the Least Request Load Balancer doesn't consider the number - // of active requests at the time it picks a host and behaves like the Round Robin Load - // Balancer. - // - // When `active_request_bias > 0.0` the Least Request Load Balancer scales the load balancing - // weight by the number of active requests at the time it does a pick. - // - // The value is cached for performance reasons and refreshed whenever one of the Load Balancer's - // host sets changes, e.g., whenever there is a host membership update or a host load balancing - // weight change. - // - // .. note:: - // This setting only takes effect if all host weights are not equal. - ActiveRequestBias *v4alpha.RuntimeDouble `protobuf:"bytes,2,opt,name=active_request_bias,json=activeRequestBias,proto3" json:"active_request_bias,omitempty"` -} - -func (x *Cluster_LeastRequestLbConfig) Reset() { - *x = Cluster_LeastRequestLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_LeastRequestLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_LeastRequestLbConfig) ProtoMessage() {} - -func (x *Cluster_LeastRequestLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_LeastRequestLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_LeastRequestLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 4} -} - -func (x *Cluster_LeastRequestLbConfig) GetChoiceCount() *wrappers.UInt32Value { - if x != nil { - return x.ChoiceCount - } - return nil -} - -func (x *Cluster_LeastRequestLbConfig) GetActiveRequestBias() *v4alpha.RuntimeDouble { - if x != nil { - return x.ActiveRequestBias - } - return nil -} - -// Specific configuration for the :ref:`RingHash` -// load balancing policy. -type Cluster_RingHashLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *wrappers.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.config.cluster.v4alpha.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 *wrappers.UInt64Value `protobuf:"bytes,4,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` -} - -func (x *Cluster_RingHashLbConfig) Reset() { - *x = Cluster_RingHashLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_RingHashLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_RingHashLbConfig) ProtoMessage() {} - -func (x *Cluster_RingHashLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_RingHashLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_RingHashLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 5} -} - -func (x *Cluster_RingHashLbConfig) GetMinimumRingSize() *wrappers.UInt64Value { - if x != nil { - return x.MinimumRingSize - } - return nil -} - -func (x *Cluster_RingHashLbConfig) GetHashFunction() Cluster_RingHashLbConfig_HashFunction { - if x != nil { - return x.HashFunction - } - return Cluster_RingHashLbConfig_XX_HASH -} - -func (x *Cluster_RingHashLbConfig) GetMaximumRingSize() *wrappers.UInt64Value { - if x != nil { - return x.MaximumRingSize - } - return nil -} - -// Specific configuration for the :ref:`Maglev` -// load balancing policy. -type Cluster_MaglevLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The table size for Maglev hashing. The Maglev aims for ‘minimal disruption’ rather than an absolute guarantee. - // Minimal disruption means that when the set of upstreams changes, a connection will likely be sent to the same - // upstream as it was before. Increasing the table size reduces the amount of disruption. - // The table size must be prime number. If it is not specified, the default is 65537. - TableSize *wrappers.UInt64Value `protobuf:"bytes,1,opt,name=table_size,json=tableSize,proto3" json:"table_size,omitempty"` -} - -func (x *Cluster_MaglevLbConfig) Reset() { - *x = Cluster_MaglevLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_MaglevLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_MaglevLbConfig) ProtoMessage() {} - -func (x *Cluster_MaglevLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_MaglevLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_MaglevLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 6} -} - -func (x *Cluster_MaglevLbConfig) GetTableSize() *wrappers.UInt64Value { - if x != nil { - return x.TableSize - } - return nil -} - -// Specific configuration for the -// :ref:`Original Destination ` -// load balancing policy. -type Cluster_OriginalDstLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - UseHttpHeader bool `protobuf:"varint,1,opt,name=use_http_header,json=useHttpHeader,proto3" json:"use_http_header,omitempty"` -} - -func (x *Cluster_OriginalDstLbConfig) Reset() { - *x = Cluster_OriginalDstLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_OriginalDstLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_OriginalDstLbConfig) ProtoMessage() {} - -func (x *Cluster_OriginalDstLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_OriginalDstLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_OriginalDstLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 7} -} - -func (x *Cluster_OriginalDstLbConfig) GetUseHttpHeader() bool { - if x != nil { - return x.UseHttpHeader - } - return false -} - -// Common configuration for all load balancer implementations. -// [#next-free-field: 8] -type Cluster_CommonLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configures the :ref:`healthy panic threshold `. - // If not specified, the default is 50%. - // To disable panic mode, set to 0%. - // - // .. note:: - // The specified percent will be truncated to the nearest 1%. - HealthyPanicThreshold *v32.Percent `protobuf:"bytes,1,opt,name=healthy_panic_threshold,json=healthyPanicThreshold,proto3" json:"healthy_panic_threshold,omitempty"` - // Types that are assignable 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). Please always keep in mind that the use of sandbox technologies may change this - // behavior. - // - // 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 *duration.Duration `protobuf:"bytes,4,opt,name=update_merge_window,json=updateMergeWindow,proto3" json:"update_merge_window,omitempty"` - // If set to true, Envoy will not consider new hosts when computing load balancing weights until - // they have been health checked for the first time. This will have no effect unless - // active health checking is also configured. - // - // Ignoring a host means that for any load balancing calculations that adjust weights based - // on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and - // panic mode) Envoy will exclude these hosts in the denominator. - // - // For example, with hosts in two priorities P0 and P1, where P0 looks like - // {healthy, unhealthy (new), unhealthy (new)} - // and where P1 looks like - // {healthy, healthy} - // all traffic will still hit P0, as 1 / (3 - 2) = 1. - // - // Enabling this will allow scaling up the number of hosts for a given cluster without entering - // panic mode or triggering priority spillover, assuming the hosts pass the first health check. - // - // If panic mode is triggered, new hosts are still eligible for traffic; they simply do not - // contribute to the calculation when deciding whether panic mode is enabled or not. - IgnoreNewHostsUntilFirstHc bool `protobuf:"varint,5,opt,name=ignore_new_hosts_until_first_hc,json=ignoreNewHostsUntilFirstHc,proto3" json:"ignore_new_hosts_until_first_hc,omitempty"` - // If set to `true`, the cluster manager will drain all existing - // connections to upstream hosts whenever hosts are added or removed from the cluster. - CloseConnectionsOnHostSetChange bool `protobuf:"varint,6,opt,name=close_connections_on_host_set_change,json=closeConnectionsOnHostSetChange,proto3" json:"close_connections_on_host_set_change,omitempty"` - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - ConsistentHashingLbConfig *Cluster_CommonLbConfig_ConsistentHashingLbConfig `protobuf:"bytes,7,opt,name=consistent_hashing_lb_config,json=consistentHashingLbConfig,proto3" json:"consistent_hashing_lb_config,omitempty"` -} - -func (x *Cluster_CommonLbConfig) Reset() { - *x = Cluster_CommonLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 8} -} - -func (x *Cluster_CommonLbConfig) GetHealthyPanicThreshold() *v32.Percent { - if x != nil { - return x.HealthyPanicThreshold - } - return nil -} - -func (m *Cluster_CommonLbConfig) GetLocalityConfigSpecifier() isCluster_CommonLbConfig_LocalityConfigSpecifier { - if m != nil { - return m.LocalityConfigSpecifier - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetZoneAwareLbConfig() *Cluster_CommonLbConfig_ZoneAwareLbConfig { - if x, ok := x.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_ZoneAwareLbConfig_); ok { - return x.ZoneAwareLbConfig - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetLocalityWeightedLbConfig() *Cluster_CommonLbConfig_LocalityWeightedLbConfig { - if x, ok := x.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_LocalityWeightedLbConfig_); ok { - return x.LocalityWeightedLbConfig - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetUpdateMergeWindow() *duration.Duration { - if x != nil { - return x.UpdateMergeWindow - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetIgnoreNewHostsUntilFirstHc() bool { - if x != nil { - return x.IgnoreNewHostsUntilFirstHc - } - return false -} - -func (x *Cluster_CommonLbConfig) GetCloseConnectionsOnHostSetChange() bool { - if x != nil { - return x.CloseConnectionsOnHostSetChange - } - return false -} - -func (x *Cluster_CommonLbConfig) GetConsistentHashingLbConfig() *Cluster_CommonLbConfig_ConsistentHashingLbConfig { - if x != nil { - return x.ConsistentHashingLbConfig - } - 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() { -} - -type Cluster_RefreshRate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the base interval between refreshes. This parameter is required and must be greater - // than zero and less than - // :ref:`max_interval `. - BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` - // Specifies the maximum interval between refreshes. This parameter is optional, but must be - // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. - MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *Cluster_RefreshRate) Reset() { - *x = Cluster_RefreshRate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_RefreshRate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_RefreshRate) ProtoMessage() {} - -func (x *Cluster_RefreshRate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_RefreshRate.ProtoReflect.Descriptor instead. -func (*Cluster_RefreshRate) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 9} -} - -func (x *Cluster_RefreshRate) GetBaseInterval() *duration.Duration { - if x != nil { - return x.BaseInterval - } - return nil -} - -func (x *Cluster_RefreshRate) GetMaxInterval() *duration.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -// [#not-implemented-hide:] -type Cluster_PreconnectPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Indicates how many streams (rounded up) can be anticipated per-upstream for each - // incoming stream. This is useful for high-QPS or latency-sensitive services. Preconnecting - // will only be done if the upstream is healthy. - // - // For example if this is 2, for an incoming HTTP/1.1 stream, 2 connections will be - // established, one for the new incoming stream, and one for a presumed follow-up stream. For - // HTTP/2, only one connection would be established by default as one connection can - // serve both the original and presumed follow-up stream. - // - // In steady state for non-multiplexed connections a value of 1.5 would mean if there were 100 - // active streams, there would be 100 connections in use, and 50 connections preconnected. - // This might be a useful value for something like short lived single-use connections, - // for example proxying HTTP/1.1 if keep-alive were false and each stream resulted in connection - // termination. It would likely be overkill for long lived connections, such as TCP proxying SMTP - // or regular HTTP/1.1 with keep-alive. For long lived traffic, a value of 1.05 would be more - // reasonable, where for every 100 connections, 5 preconnected connections would be in the queue - // in case of unexpected disconnects where the connection could not be reused. - // - // If this value is not set, or set explicitly to one, Envoy will fetch as many connections - // as needed to serve streams in flight. This means in steady state if a connection is torn down, - // a subsequent streams will pay an upstream-rtt latency penalty waiting for streams to be - // preconnected. - // - // This is limited somewhat arbitrarily to 3 because preconnecting too aggressively can - // harm latency more than the preconnecting helps. - PerUpstreamPreconnectRatio *wrappers.DoubleValue `protobuf:"bytes,1,opt,name=per_upstream_preconnect_ratio,json=perUpstreamPreconnectRatio,proto3" json:"per_upstream_preconnect_ratio,omitempty"` - // Indicates how many many streams (rounded up) can be anticipated across a cluster for each - // stream, useful for low QPS services. This is currently supported for a subset of - // deterministic non-hash-based load-balancing algorithms (weighted round robin, random). - // Unlike per_upstream_preconnect_ratio this preconnects across the upstream instances in a - // cluster, doing best effort predictions of what upstream would be picked next and - // pre-establishing a connection. - // - // For example if preconnecting is set to 2 for a round robin HTTP/2 cluster, on the first - // incoming stream, 2 connections will be preconnected - one to the first upstream for this - // cluster, one to the second on the assumption there will be a follow-up stream. - // - // Preconnecting will be limited to one preconnect per configured upstream in the cluster. - // - // If this value is not set, or set explicitly to one, Envoy will fetch as many connections - // as needed to serve streams in flight, so during warm up and in steady state if a connection - // is closed (and per_upstream_preconnect_ratio is not set), there will be a latency hit for - // connection establishment. - // - // If both this and preconnect_ratio are set, Envoy will make sure both predicted needs are met, - // basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each upstream. - // TODO(alyssawilk) per LB docs and LB overview docs when unhiding. - PredictivePreconnectRatio *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=predictive_preconnect_ratio,json=predictivePreconnectRatio,proto3" json:"predictive_preconnect_ratio,omitempty"` -} - -func (x *Cluster_PreconnectPolicy) Reset() { - *x = Cluster_PreconnectPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_PreconnectPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_PreconnectPolicy) ProtoMessage() {} - -func (x *Cluster_PreconnectPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_PreconnectPolicy.ProtoReflect.Descriptor instead. -func (*Cluster_PreconnectPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 10} -} - -func (x *Cluster_PreconnectPolicy) GetPerUpstreamPreconnectRatio() *wrappers.DoubleValue { - if x != nil { - return x.PerUpstreamPreconnectRatio - } - return nil -} - -func (x *Cluster_PreconnectPolicy) GetPredictivePreconnectRatio() *wrappers.DoubleValue { - if x != nil { - return x.PredictivePreconnectRatio - } - return nil -} - -// Specifications for subsets. -type Cluster_LbSubsetConfig_LbSubsetSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of keys to match with the weighted cluster metadata. - Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` - // Selects a mode of operation in which each subset has only one host. This mode uses the same rules for - // choosing a host, but updating hosts is faster, especially for large numbers of hosts. - // - // If a match is found to a host, that host will be used regardless of priority levels, unless the host is unhealthy. - // - // Currently, this mode is only supported if `subset_selectors` has only one entry, and `keys` contains - // only one entry. - // - // When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in `keys` - // will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge - // :ref:`lb_subsets_single_host_per_subset_duplicate` indicates how many duplicates are - // present in the current configuration. - SingleHostPerSubset bool `protobuf:"varint,4,opt,name=single_host_per_subset,json=singleHostPerSubset,proto3" json:"single_host_per_subset,omitempty"` - // The behavior used when no endpoint subset matches the selected route's - // metadata. - FallbackPolicy Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy `protobuf:"varint,2,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.config.cluster.v4alpha.Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy" json:"fallback_policy,omitempty"` - // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` - // fallback policy. - // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. - // For any other fallback policy the parameter is not used and should not be set. - // Only values also present in - // :ref:`keys` are allowed, but - // `fallback_keys_subset` cannot be equal to `keys`. - FallbackKeysSubset []string `protobuf:"bytes,3,rep,name=fallback_keys_subset,json=fallbackKeysSubset,proto3" json:"fallback_keys_subset,omitempty"` -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) Reset() { - *x = Cluster_LbSubsetConfig_LbSubsetSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_LbSubsetConfig_LbSubsetSelector) ProtoMessage() {} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig_LbSubsetSelector.ProtoReflect.Descriptor instead. -func (*Cluster_LbSubsetConfig_LbSubsetSelector) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 3, 0} -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) GetKeys() []string { - if x != nil { - return x.Keys - } - return nil -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) GetSingleHostPerSubset() bool { - if x != nil { - return x.SingleHostPerSubset - } - return false -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy { - if x != nil { - return x.FallbackPolicy - } - return Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) GetFallbackKeysSubset() []string { - if x != nil { - return x.FallbackKeysSubset - } - return nil -} - -// Configuration for :ref:`zone aware routing -// `. -type Cluster_CommonLbConfig_ZoneAwareLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *v32.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 *wrappers.UInt64Value `protobuf:"bytes,2,opt,name=min_cluster_size,json=minClusterSize,proto3" json:"min_cluster_size,omitempty"` - // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic - // mode`. Instead, the cluster will fail all - // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a - // failing service. - FailTrafficOnPanic bool `protobuf:"varint,3,opt,name=fail_traffic_on_panic,json=failTrafficOnPanic,proto3" json:"fail_traffic_on_panic,omitempty"` -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) Reset() { - *x = Cluster_CommonLbConfig_ZoneAwareLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig_ZoneAwareLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 8, 0} -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetRoutingEnabled() *v32.Percent { - if x != nil { - return x.RoutingEnabled - } - return nil -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetMinClusterSize() *wrappers.UInt64Value { - if x != nil { - return x.MinClusterSize - } - return nil -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetFailTrafficOnPanic() bool { - if x != nil { - return x.FailTrafficOnPanic - } - return false -} - -// Configuration for :ref:`locality weighted load balancing -// ` -type Cluster_CommonLbConfig_LocalityWeightedLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Reset() { - *x = Cluster_CommonLbConfig_LocalityWeightedLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig_LocalityWeightedLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 8, 1} -} - -// Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) -type Cluster_CommonLbConfig_ConsistentHashingLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If set to `true`, the cluster will use hostname instead of the resolved - // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. - UseHostnameForHashing bool `protobuf:"varint,1,opt,name=use_hostname_for_hashing,json=useHostnameForHashing,proto3" json:"use_hostname_for_hashing,omitempty"` - // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 - // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. - // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. - // Minimum is 100. - // - // Applies to both Ring Hash and Maglev load balancers. - // - // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified - // `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests - // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing - // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify - // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the - // cascading overflow effect when choosing the next host in the ring/table). - // - // If weights are specified on the hosts, they are respected. - // - // This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts - // being probed, so use a higher value if you require better performance. - HashBalanceFactor *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=hash_balance_factor,json=hashBalanceFactor,proto3" json:"hash_balance_factor,omitempty"` -} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Reset() { - *x = Cluster_CommonLbConfig_ConsistentHashingLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig_ConsistentHashingLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{1, 8, 2} -} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) GetUseHostnameForHashing() bool { - if x != nil { - return x.UseHostnameForHashing - } - return false -} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) GetHashBalanceFactor() *wrappers.UInt32Value { - if x != nil { - return x.HashBalanceFactor - } - return nil -} - -type LoadBalancingPolicy_Policy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The name of the LB policy. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *LoadBalancingPolicy_Policy) Reset() { - *x = LoadBalancingPolicy_Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadBalancingPolicy_Policy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadBalancingPolicy_Policy) ProtoMessage() {} - -func (x *LoadBalancingPolicy_Policy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadBalancingPolicy_Policy.ProtoReflect.Descriptor instead. -func (*LoadBalancingPolicy_Policy) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *LoadBalancingPolicy_Policy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *LoadBalancingPolicy_Policy) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -var File_envoy_config_cluster_v4alpha_cluster_proto protoreflect.FileDescriptor - -var file_envoy_config_cluster_v4alpha_cluster_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x32, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, - 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, - 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x11, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x65, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x9b, 0x4d, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, - 0x74, 0x0a, 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x2b, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x16, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x26, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x64, 0x0a, 0x12, 0x65, 0x64, 0x73, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x64, 0x73, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x65, - 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x4c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x6f, 0x0a, - 0x21, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x10, 0x01, 0x52, - 0x1d, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, - 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x57, - 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x07, 0x52, 0x08, 0x6c, - 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x58, 0x0a, 0x0f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x0e, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x4b, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x5b, - 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, - 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x10, 0x63, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x36, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x30, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x34, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1d, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, - 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x2d, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x9d, - 0x01, 0x0a, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x32, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x09, 0x18, 0x01, 0x8a, 0x93, 0xb7, 0x2a, - 0x02, 0x10, 0x01, 0x52, 0x29, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x91, - 0x01, 0x0a, 0x20, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x1d, 0x74, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, - 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0e, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x6a, 0x0a, 0x18, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, - 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6e, 0x73, - 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, - 0x65, 0x63, 0x74, 0x44, 0x6e, 0x73, 0x54, 0x74, 0x6c, 0x12, 0x6b, 0x0a, 0x11, 0x64, 0x6e, 0x73, - 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6e, 0x73, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x47, 0x0a, 0x0d, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x0c, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, - 0x34, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, - 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x5b, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, - 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x10, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x10, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, - 0x00, 0x52, 0x0f, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x57, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, - 0x69, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x69, 0x6e, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a, 0x10, 0x6c, - 0x62, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, - 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x6c, 0x62, 0x53, - 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x13, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x48, 0x01, 0x52, 0x10, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x10, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x5f, 0x6c, - 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x34, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, 0x62, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, 0x62, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x16, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x48, 0x01, 0x52, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, - 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, 0x6c, 0x65, 0x61, 0x73, - 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x14, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x9e, 0x01, 0x0a, 0x2a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x26, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x77, 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x55, 0x0a, 0x28, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x23, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x4f, 0x6e, 0x48, 0x6f, 0x73, - 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x65, 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x46, 0x0a, 0x0a, 0x6c, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x2a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x6c, 0x72, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x2d, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x0f, - 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x31, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x63, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x32, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x10, 0x70, 0x72, 0x65, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x58, 0x0a, 0x29, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x33, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x25, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, - 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf6, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x55, 0x0a, 0x10, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, - 0xa3, 0x01, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x38, 0x9a, 0xc5, 0x88, - 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x1a, 0xb6, 0x01, 0x0a, 0x10, 0x45, 0x64, 0x73, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x0a, 0x65, 0x64, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x65, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x64, - 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe5, - 0x08, 0x0a, 0x0e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0e, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x3e, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x75, 0x62, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x73, 0x65, - 0x74, 0x12, 0x70, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x63, 0x61, 0x6c, 0x65, - 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, - 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6e, - 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x61, 0x6e, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x41, 0x6e, - 0x79, 0x1a, 0xea, 0x03, 0x0a, 0x10, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x73, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x12, - 0x97, 0x01, 0x0a, 0x0f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x64, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x66, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, - 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x22, 0x79, 0x0a, 0x1e, 0x4c, - 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, - 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, - 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, - 0x10, 0x0a, 0x0c, 0x41, 0x4e, 0x59, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, - 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x42, - 0x53, 0x45, 0x54, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x53, 0x55, - 0x42, 0x53, 0x45, 0x54, 0x10, 0x04, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, - 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, - 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x4f, - 0x0a, 0x16, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x46, - 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x4e, 0x59, - 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, - 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, 0x54, 0x10, 0x02, 0x3a, - 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xf7, 0x01, 0x0a, 0x14, 0x4c, 0x65, 0x61, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x48, 0x0a, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x02, 0x52, 0x0b, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x13, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x61, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, - 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, - 0x69, 0x61, 0x73, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0xa1, 0x03, 0x0a, 0x10, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x69, - 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x72, 0x0a, 0x0d, 0x68, - 0x61, 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, - 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x46, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x54, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, - 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, - 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2e, 0x0a, 0x0c, 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x58, 0x58, 0x5f, 0x48, 0x41, 0x53, 0x48, - 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x55, 0x52, 0x4d, 0x55, 0x52, 0x5f, 0x48, 0x41, 0x53, - 0x48, 0x5f, 0x32, 0x10, 0x01, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x69, - 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, - 0x08, 0x02, 0x10, 0x03, 0x1a, 0x84, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x4c, - 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x67, - 0x6c, 0x65, 0x76, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x79, 0x0a, 0x13, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x73, 0x65, - 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, - 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xb7, 0x0b, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x17, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x61, 0x6e, 0x69, 0x63, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x79, 0x0a, 0x14, 0x7a, 0x6f, 0x6e, - 0x65, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x5a, 0x6f, - 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, - 0x00, 0x52, 0x11, 0x7a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8e, 0x01, 0x0a, 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x18, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x12, 0x43, 0x0a, 0x1f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, - 0x5f, 0x68, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x67, 0x6e, 0x6f, 0x72, - 0x65, 0x4e, 0x65, 0x77, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x46, 0x69, - 0x72, 0x73, 0x74, 0x48, 0x63, 0x12, 0x4d, 0x0a, 0x24, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x62, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x19, 0x63, 0x6f, 0x6e, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x98, 0x02, 0x0a, 0x11, 0x5a, 0x6f, 0x6e, 0x65, 0x41, - 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0f, - 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x46, 0x0a, - 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, - 0x63, 0x4f, 0x6e, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, - 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x1a, 0x6a, 0x0a, 0x18, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x4e, 0x9a, - 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xfc, 0x01, - 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x18, 0x75, - 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, - 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x64, 0x52, 0x11, 0x68, 0x61, 0x73, 0x68, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x4f, 0x9a, 0xc5, 0x88, - 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x35, 0x9a, 0xc5, - 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x1b, 0x0a, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x1a, 0xdd, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, - 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x2a, 0x04, 0x10, 0xc0, - 0x84, 0x3d, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, - 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x32, 0x9a, 0xc5, - 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, - 0x1a, 0xbc, 0x02, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x78, 0x0a, 0x1d, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, - 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf0, 0x3f, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, - 0x75, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, - 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x52, 0x19, 0x70, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, - 0x66, 0x0a, 0x22, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, - 0x49, 0x43, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x5f, 0x44, - 0x4e, 0x53, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x41, 0x4c, 0x5f, - 0x44, 0x4e, 0x53, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x44, 0x53, 0x10, 0x03, 0x12, 0x10, - 0x0a, 0x0c, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x53, 0x54, 0x10, 0x04, - 0x22, 0xa4, 0x01, 0x0a, 0x08, 0x4c, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, - 0x0b, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x4f, 0x42, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, - 0x0a, 0x0d, 0x4c, 0x45, 0x41, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, - 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, - 0x4d, 0x41, 0x47, 0x4c, 0x45, 0x56, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, 0x55, 0x53, - 0x54, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x10, 0x06, 0x12, 0x20, - 0x0a, 0x1c, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x49, 0x4e, 0x47, - 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x07, - 0x22, 0x04, 0x08, 0x04, 0x10, 0x04, 0x2a, 0x0f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, - 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x4c, 0x42, 0x22, 0x35, 0x0a, 0x0f, 0x44, 0x6e, 0x73, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, - 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x34, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, - 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x36, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x22, 0x54, - 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x53, - 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, - 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x53, 0x45, 0x5f, 0x44, - 0x4f, 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, - 0x4f, 0x4c, 0x10, 0x01, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, - 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x23, 0x10, - 0x24, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xc0, 0x02, 0x0a, 0x13, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x54, 0x0a, 0x08, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, - 0x9e, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, - 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa3, 0x01, 0x0a, 0x19, 0x55, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x0d, 0x74, 0x63, 0x70, 0x5f, 0x6b, - 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x63, 0x70, 0x4b, 0x65, - 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x0c, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, - 0x61, 0x6c, 0x69, 0x76, 0x65, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xa4, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x12, 0x34, - 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x44, 0x0a, 0x2a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_cluster_v4alpha_cluster_proto_rawDescOnce sync.Once - file_envoy_config_cluster_v4alpha_cluster_proto_rawDescData = file_envoy_config_cluster_v4alpha_cluster_proto_rawDesc -) - -func file_envoy_config_cluster_v4alpha_cluster_proto_rawDescGZIP() []byte { - file_envoy_config_cluster_v4alpha_cluster_proto_rawDescOnce.Do(func() { - file_envoy_config_cluster_v4alpha_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_cluster_v4alpha_cluster_proto_rawDescData) - }) - return file_envoy_config_cluster_v4alpha_cluster_proto_rawDescData -} - -var file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_envoy_config_cluster_v4alpha_cluster_proto_goTypes = []interface{}{ - (Cluster_DiscoveryType)(0), // 0: envoy.config.cluster.v4alpha.Cluster.DiscoveryType - (Cluster_LbPolicy)(0), // 1: envoy.config.cluster.v4alpha.Cluster.LbPolicy - (Cluster_DnsLookupFamily)(0), // 2: envoy.config.cluster.v4alpha.Cluster.DnsLookupFamily - (Cluster_ClusterProtocolSelection)(0), // 3: envoy.config.cluster.v4alpha.Cluster.ClusterProtocolSelection - (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy)(0), // 4: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy - (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy)(0), // 5: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy - (Cluster_RingHashLbConfig_HashFunction)(0), // 6: envoy.config.cluster.v4alpha.Cluster.RingHashLbConfig.HashFunction - (*ClusterCollection)(nil), // 7: envoy.config.cluster.v4alpha.ClusterCollection - (*Cluster)(nil), // 8: envoy.config.cluster.v4alpha.Cluster - (*LoadBalancingPolicy)(nil), // 9: envoy.config.cluster.v4alpha.LoadBalancingPolicy - (*UpstreamBindConfig)(nil), // 10: envoy.config.cluster.v4alpha.UpstreamBindConfig - (*UpstreamConnectionOptions)(nil), // 11: envoy.config.cluster.v4alpha.UpstreamConnectionOptions - (*TrackClusterStats)(nil), // 12: envoy.config.cluster.v4alpha.TrackClusterStats - (*Cluster_TransportSocketMatch)(nil), // 13: envoy.config.cluster.v4alpha.Cluster.TransportSocketMatch - (*Cluster_CustomClusterType)(nil), // 14: envoy.config.cluster.v4alpha.Cluster.CustomClusterType - (*Cluster_EdsClusterConfig)(nil), // 15: envoy.config.cluster.v4alpha.Cluster.EdsClusterConfig - (*Cluster_LbSubsetConfig)(nil), // 16: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig - (*Cluster_LeastRequestLbConfig)(nil), // 17: envoy.config.cluster.v4alpha.Cluster.LeastRequestLbConfig - (*Cluster_RingHashLbConfig)(nil), // 18: envoy.config.cluster.v4alpha.Cluster.RingHashLbConfig - (*Cluster_MaglevLbConfig)(nil), // 19: envoy.config.cluster.v4alpha.Cluster.MaglevLbConfig - (*Cluster_OriginalDstLbConfig)(nil), // 20: envoy.config.cluster.v4alpha.Cluster.OriginalDstLbConfig - (*Cluster_CommonLbConfig)(nil), // 21: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig - (*Cluster_RefreshRate)(nil), // 22: envoy.config.cluster.v4alpha.Cluster.RefreshRate - (*Cluster_PreconnectPolicy)(nil), // 23: envoy.config.cluster.v4alpha.Cluster.PreconnectPolicy - nil, // 24: envoy.config.cluster.v4alpha.Cluster.TypedExtensionProtocolOptionsEntry - (*Cluster_LbSubsetConfig_LbSubsetSelector)(nil), // 25: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.LbSubsetSelector - (*Cluster_CommonLbConfig_ZoneAwareLbConfig)(nil), // 26: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.ZoneAwareLbConfig - (*Cluster_CommonLbConfig_LocalityWeightedLbConfig)(nil), // 27: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.LocalityWeightedLbConfig - (*Cluster_CommonLbConfig_ConsistentHashingLbConfig)(nil), // 28: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.ConsistentHashingLbConfig - (*LoadBalancingPolicy_Policy)(nil), // 29: envoy.config.cluster.v4alpha.LoadBalancingPolicy.Policy - (*v3.CollectionEntry)(nil), // 30: xds.core.v3.CollectionEntry - (*duration.Duration)(nil), // 31: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 32: google.protobuf.UInt32Value - (*v31.ClusterLoadAssignment)(nil), // 33: envoy.config.endpoint.v3.ClusterLoadAssignment - (*v4alpha.HealthCheck)(nil), // 34: envoy.config.core.v4alpha.HealthCheck - (*CircuitBreakers)(nil), // 35: envoy.config.cluster.v4alpha.CircuitBreakers - (*v4alpha.UpstreamHttpProtocolOptions)(nil), // 36: envoy.config.core.v4alpha.UpstreamHttpProtocolOptions - (*v4alpha.HttpProtocolOptions)(nil), // 37: envoy.config.core.v4alpha.HttpProtocolOptions - (*v4alpha.Http1ProtocolOptions)(nil), // 38: envoy.config.core.v4alpha.Http1ProtocolOptions - (*v4alpha.Http2ProtocolOptions)(nil), // 39: envoy.config.core.v4alpha.Http2ProtocolOptions - (*v4alpha.Address)(nil), // 40: envoy.config.core.v4alpha.Address - (*OutlierDetection)(nil), // 41: envoy.config.cluster.v4alpha.OutlierDetection - (*v4alpha.BindConfig)(nil), // 42: envoy.config.core.v4alpha.BindConfig - (*v4alpha.TransportSocket)(nil), // 43: envoy.config.core.v4alpha.TransportSocket - (*v4alpha.Metadata)(nil), // 44: envoy.config.core.v4alpha.Metadata - (*Filter)(nil), // 45: envoy.config.cluster.v4alpha.Filter - (*v4alpha.ConfigSource)(nil), // 46: envoy.config.core.v4alpha.ConfigSource - (*v4alpha.TypedExtensionConfig)(nil), // 47: envoy.config.core.v4alpha.TypedExtensionConfig - (*v4alpha.TcpKeepalive)(nil), // 48: envoy.config.core.v4alpha.TcpKeepalive - (*_struct.Struct)(nil), // 49: google.protobuf.Struct - (*any.Any)(nil), // 50: google.protobuf.Any - (*v4alpha.RuntimeDouble)(nil), // 51: envoy.config.core.v4alpha.RuntimeDouble - (*wrappers.UInt64Value)(nil), // 52: google.protobuf.UInt64Value - (*v32.Percent)(nil), // 53: envoy.type.v3.Percent - (*wrappers.DoubleValue)(nil), // 54: google.protobuf.DoubleValue -} -var file_envoy_config_cluster_v4alpha_cluster_proto_depIdxs = []int32{ - 30, // 0: envoy.config.cluster.v4alpha.ClusterCollection.entries:type_name -> xds.core.v3.CollectionEntry - 13, // 1: envoy.config.cluster.v4alpha.Cluster.transport_socket_matches:type_name -> envoy.config.cluster.v4alpha.Cluster.TransportSocketMatch - 0, // 2: envoy.config.cluster.v4alpha.Cluster.type:type_name -> envoy.config.cluster.v4alpha.Cluster.DiscoveryType - 14, // 3: envoy.config.cluster.v4alpha.Cluster.cluster_type:type_name -> envoy.config.cluster.v4alpha.Cluster.CustomClusterType - 15, // 4: envoy.config.cluster.v4alpha.Cluster.eds_cluster_config:type_name -> envoy.config.cluster.v4alpha.Cluster.EdsClusterConfig - 31, // 5: envoy.config.cluster.v4alpha.Cluster.connect_timeout:type_name -> google.protobuf.Duration - 32, // 6: envoy.config.cluster.v4alpha.Cluster.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 1, // 7: envoy.config.cluster.v4alpha.Cluster.lb_policy:type_name -> envoy.config.cluster.v4alpha.Cluster.LbPolicy - 33, // 8: envoy.config.cluster.v4alpha.Cluster.load_assignment:type_name -> envoy.config.endpoint.v3.ClusterLoadAssignment - 34, // 9: envoy.config.cluster.v4alpha.Cluster.health_checks:type_name -> envoy.config.core.v4alpha.HealthCheck - 32, // 10: envoy.config.cluster.v4alpha.Cluster.max_requests_per_connection:type_name -> google.protobuf.UInt32Value - 35, // 11: envoy.config.cluster.v4alpha.Cluster.circuit_breakers:type_name -> envoy.config.cluster.v4alpha.CircuitBreakers - 36, // 12: envoy.config.cluster.v4alpha.Cluster.hidden_envoy_deprecated_upstream_http_protocol_options:type_name -> envoy.config.core.v4alpha.UpstreamHttpProtocolOptions - 37, // 13: envoy.config.cluster.v4alpha.Cluster.hidden_envoy_deprecated_common_http_protocol_options:type_name -> envoy.config.core.v4alpha.HttpProtocolOptions - 38, // 14: envoy.config.cluster.v4alpha.Cluster.hidden_envoy_deprecated_http_protocol_options:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions - 39, // 15: envoy.config.cluster.v4alpha.Cluster.hidden_envoy_deprecated_http2_protocol_options:type_name -> envoy.config.core.v4alpha.Http2ProtocolOptions - 24, // 16: envoy.config.cluster.v4alpha.Cluster.typed_extension_protocol_options:type_name -> envoy.config.cluster.v4alpha.Cluster.TypedExtensionProtocolOptionsEntry - 31, // 17: envoy.config.cluster.v4alpha.Cluster.dns_refresh_rate:type_name -> google.protobuf.Duration - 22, // 18: envoy.config.cluster.v4alpha.Cluster.dns_failure_refresh_rate:type_name -> envoy.config.cluster.v4alpha.Cluster.RefreshRate - 2, // 19: envoy.config.cluster.v4alpha.Cluster.dns_lookup_family:type_name -> envoy.config.cluster.v4alpha.Cluster.DnsLookupFamily - 40, // 20: envoy.config.cluster.v4alpha.Cluster.dns_resolvers:type_name -> envoy.config.core.v4alpha.Address - 41, // 21: envoy.config.cluster.v4alpha.Cluster.outlier_detection:type_name -> envoy.config.cluster.v4alpha.OutlierDetection - 31, // 22: envoy.config.cluster.v4alpha.Cluster.cleanup_interval:type_name -> google.protobuf.Duration - 42, // 23: envoy.config.cluster.v4alpha.Cluster.upstream_bind_config:type_name -> envoy.config.core.v4alpha.BindConfig - 16, // 24: envoy.config.cluster.v4alpha.Cluster.lb_subset_config:type_name -> envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig - 18, // 25: envoy.config.cluster.v4alpha.Cluster.ring_hash_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.RingHashLbConfig - 19, // 26: envoy.config.cluster.v4alpha.Cluster.maglev_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.MaglevLbConfig - 20, // 27: envoy.config.cluster.v4alpha.Cluster.original_dst_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.OriginalDstLbConfig - 17, // 28: envoy.config.cluster.v4alpha.Cluster.least_request_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.LeastRequestLbConfig - 21, // 29: envoy.config.cluster.v4alpha.Cluster.common_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.CommonLbConfig - 43, // 30: envoy.config.cluster.v4alpha.Cluster.transport_socket:type_name -> envoy.config.core.v4alpha.TransportSocket - 44, // 31: envoy.config.cluster.v4alpha.Cluster.metadata:type_name -> envoy.config.core.v4alpha.Metadata - 3, // 32: envoy.config.cluster.v4alpha.Cluster.hidden_envoy_deprecated_protocol_selection:type_name -> envoy.config.cluster.v4alpha.Cluster.ClusterProtocolSelection - 11, // 33: envoy.config.cluster.v4alpha.Cluster.upstream_connection_options:type_name -> envoy.config.cluster.v4alpha.UpstreamConnectionOptions - 45, // 34: envoy.config.cluster.v4alpha.Cluster.filters:type_name -> envoy.config.cluster.v4alpha.Filter - 9, // 35: envoy.config.cluster.v4alpha.Cluster.load_balancing_policy:type_name -> envoy.config.cluster.v4alpha.LoadBalancingPolicy - 46, // 36: envoy.config.cluster.v4alpha.Cluster.lrs_server:type_name -> envoy.config.core.v4alpha.ConfigSource - 47, // 37: envoy.config.cluster.v4alpha.Cluster.upstream_config:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 12, // 38: envoy.config.cluster.v4alpha.Cluster.track_cluster_stats:type_name -> envoy.config.cluster.v4alpha.TrackClusterStats - 23, // 39: envoy.config.cluster.v4alpha.Cluster.preconnect_policy:type_name -> envoy.config.cluster.v4alpha.Cluster.PreconnectPolicy - 29, // 40: envoy.config.cluster.v4alpha.LoadBalancingPolicy.policies:type_name -> envoy.config.cluster.v4alpha.LoadBalancingPolicy.Policy - 40, // 41: envoy.config.cluster.v4alpha.UpstreamBindConfig.source_address:type_name -> envoy.config.core.v4alpha.Address - 48, // 42: envoy.config.cluster.v4alpha.UpstreamConnectionOptions.tcp_keepalive:type_name -> envoy.config.core.v4alpha.TcpKeepalive - 49, // 43: envoy.config.cluster.v4alpha.Cluster.TransportSocketMatch.match:type_name -> google.protobuf.Struct - 43, // 44: envoy.config.cluster.v4alpha.Cluster.TransportSocketMatch.transport_socket:type_name -> envoy.config.core.v4alpha.TransportSocket - 50, // 45: envoy.config.cluster.v4alpha.Cluster.CustomClusterType.typed_config:type_name -> google.protobuf.Any - 46, // 46: envoy.config.cluster.v4alpha.Cluster.EdsClusterConfig.eds_config:type_name -> envoy.config.core.v4alpha.ConfigSource - 4, // 47: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.fallback_policy:type_name -> envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy - 49, // 48: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.default_subset:type_name -> google.protobuf.Struct - 25, // 49: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.subset_selectors:type_name -> envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.LbSubsetSelector - 32, // 50: envoy.config.cluster.v4alpha.Cluster.LeastRequestLbConfig.choice_count:type_name -> google.protobuf.UInt32Value - 51, // 51: envoy.config.cluster.v4alpha.Cluster.LeastRequestLbConfig.active_request_bias:type_name -> envoy.config.core.v4alpha.RuntimeDouble - 52, // 52: envoy.config.cluster.v4alpha.Cluster.RingHashLbConfig.minimum_ring_size:type_name -> google.protobuf.UInt64Value - 6, // 53: envoy.config.cluster.v4alpha.Cluster.RingHashLbConfig.hash_function:type_name -> envoy.config.cluster.v4alpha.Cluster.RingHashLbConfig.HashFunction - 52, // 54: envoy.config.cluster.v4alpha.Cluster.RingHashLbConfig.maximum_ring_size:type_name -> google.protobuf.UInt64Value - 52, // 55: envoy.config.cluster.v4alpha.Cluster.MaglevLbConfig.table_size:type_name -> google.protobuf.UInt64Value - 53, // 56: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.healthy_panic_threshold:type_name -> envoy.type.v3.Percent - 26, // 57: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.zone_aware_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.ZoneAwareLbConfig - 27, // 58: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.locality_weighted_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.LocalityWeightedLbConfig - 31, // 59: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.update_merge_window:type_name -> google.protobuf.Duration - 28, // 60: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.consistent_hashing_lb_config:type_name -> envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.ConsistentHashingLbConfig - 31, // 61: envoy.config.cluster.v4alpha.Cluster.RefreshRate.base_interval:type_name -> google.protobuf.Duration - 31, // 62: envoy.config.cluster.v4alpha.Cluster.RefreshRate.max_interval:type_name -> google.protobuf.Duration - 54, // 63: envoy.config.cluster.v4alpha.Cluster.PreconnectPolicy.per_upstream_preconnect_ratio:type_name -> google.protobuf.DoubleValue - 54, // 64: envoy.config.cluster.v4alpha.Cluster.PreconnectPolicy.predictive_preconnect_ratio:type_name -> google.protobuf.DoubleValue - 50, // 65: envoy.config.cluster.v4alpha.Cluster.TypedExtensionProtocolOptionsEntry.value:type_name -> google.protobuf.Any - 5, // 66: envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.LbSubsetSelector.fallback_policy:type_name -> envoy.config.cluster.v4alpha.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy - 53, // 67: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.ZoneAwareLbConfig.routing_enabled:type_name -> envoy.type.v3.Percent - 52, // 68: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.ZoneAwareLbConfig.min_cluster_size:type_name -> google.protobuf.UInt64Value - 32, // 69: envoy.config.cluster.v4alpha.Cluster.CommonLbConfig.ConsistentHashingLbConfig.hash_balance_factor:type_name -> google.protobuf.UInt32Value - 50, // 70: envoy.config.cluster.v4alpha.LoadBalancingPolicy.Policy.typed_config:type_name -> google.protobuf.Any - 71, // [71:71] is the sub-list for method output_type - 71, // [71:71] is the sub-list for method input_type - 71, // [71:71] is the sub-list for extension type_name - 71, // [71:71] is the sub-list for extension extendee - 0, // [0:71] is the sub-list for field type_name -} - -func init() { file_envoy_config_cluster_v4alpha_cluster_proto_init() } -func file_envoy_config_cluster_v4alpha_cluster_proto_init() { - if File_envoy_config_cluster_v4alpha_cluster_proto != nil { - return - } - file_envoy_config_cluster_v4alpha_circuit_breaker_proto_init() - file_envoy_config_cluster_v4alpha_filter_proto_init() - file_envoy_config_cluster_v4alpha_outlier_detection_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadBalancingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamBindConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamConnectionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrackClusterStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_TransportSocketMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CustomClusterType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_EdsClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_LbSubsetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_LeastRequestLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_RingHashLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_MaglevLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_OriginalDstLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_RefreshRate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_PreconnectPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_LbSubsetConfig_LbSubsetSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig_ZoneAwareLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig_LocalityWeightedLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig_ConsistentHashingLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadBalancingPolicy_Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Cluster_Type)(nil), - (*Cluster_ClusterType)(nil), - (*Cluster_RingHashLbConfig_)(nil), - (*Cluster_MaglevLbConfig_)(nil), - (*Cluster_OriginalDstLbConfig_)(nil), - (*Cluster_LeastRequestLbConfig_)(nil), - } - file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*Cluster_CommonLbConfig_ZoneAwareLbConfig_)(nil), - (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_cluster_v4alpha_cluster_proto_rawDesc, - NumEnums: 7, - NumMessages: 23, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_cluster_v4alpha_cluster_proto_goTypes, - DependencyIndexes: file_envoy_config_cluster_v4alpha_cluster_proto_depIdxs, - EnumInfos: file_envoy_config_cluster_v4alpha_cluster_proto_enumTypes, - MessageInfos: file_envoy_config_cluster_v4alpha_cluster_proto_msgTypes, - }.Build() - File_envoy_config_cluster_v4alpha_cluster_proto = out.File - file_envoy_config_cluster_v4alpha_cluster_proto_rawDesc = nil - file_envoy_config_cluster_v4alpha_cluster_proto_goTypes = nil - file_envoy_config_cluster_v4alpha_cluster_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/cluster/v4alpha/cluster.pb.validate.go b/pkg/api/envoy/config/cluster/v4alpha/cluster.pb.validate.go deleted file mode 100644 index 72c9fe6cb3..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/cluster.pb.validate.go +++ /dev/null @@ -1,2407 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/cluster/v4alpha/cluster.proto - -package envoy_config_cluster_v4alpha - -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{} -) - -// Validate checks the field values on ClusterCollection with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ClusterCollection) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetEntries()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterCollectionValidationError{ - field: "Entries", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ClusterCollectionValidationError is the validation error returned by -// ClusterCollection.Validate if the designated constraints aren't met. -type ClusterCollectionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterCollectionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterCollectionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterCollectionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterCollectionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterCollectionValidationError) ErrorName() string { - return "ClusterCollectionValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterCollectionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterCollection.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterCollectionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterCollectionValidationError{} - -// 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 utf8.RuneCountInString(m.GetName()) < 1 { - return ClusterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - // 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_NotInLookup[m.GetLbPolicy()]; ok { - return ClusterValidationError{ - field: "LbPolicy", - reason: "value must not be in list [7]", - } - } - - if _, ok := Cluster_LbPolicy_name[int32(m.GetLbPolicy())]; !ok { - return ClusterValidationError{ - field: "LbPolicy", - reason: "value must be one of the defined enum values", - } - } - - 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.GetHiddenEnvoyDeprecatedUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "HiddenEnvoyDeprecatedUpstreamHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "HiddenEnvoyDeprecatedCommonHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "HiddenEnvoyDeprecatedHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedHttp2ProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "HiddenEnvoyDeprecatedHttp2ProtocolOptions", - 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 HiddenEnvoyDeprecatedProtocolSelection - - 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 IgnoreHealthOnHostRemoval - - 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 HiddenEnvoyDeprecatedTrackTimeoutBudgets - - if v, ok := interface{}(m.GetUpstreamConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "UpstreamConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTrackClusterStats()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "TrackClusterStats", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetPreconnectPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "PreconnectPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ConnectionPoolPerDownstreamConnection - - 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_MaglevLbConfig_: - - if v, ok := interface{}(m.GetMaglevLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "MaglevLbConfig", - 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{} - -var _Cluster_LbPolicy_NotInLookup = map[Cluster_LbPolicy]struct{}{ - 7: {}, -} - -// 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 TrackClusterStats with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *TrackClusterStats) Validate() error { - if m == nil { - return nil - } - - // no validation rules for TimeoutBudgets - - // no validation rules for RequestResponseSizes - - return nil -} - -// TrackClusterStatsValidationError is the validation error returned by -// TrackClusterStats.Validate if the designated constraints aren't met. -type TrackClusterStatsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TrackClusterStatsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TrackClusterStatsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TrackClusterStatsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TrackClusterStatsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TrackClusterStatsValidationError) ErrorName() string { - return "TrackClusterStatsValidationError" -} - -// Error satisfies the builtin error interface -func (e TrackClusterStatsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTrackClusterStats.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TrackClusterStatsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TrackClusterStatsValidationError{} - -// 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 utf8.RuneCountInString(m.GetName()) < 1 { - return Cluster_CustomClusterTypeValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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", - } - } - - } - - if v, ok := interface{}(m.GetActiveRequestBias()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_LeastRequestLbConfigValidationError{ - field: "ActiveRequestBias", - reason: "embedded message failed validation", - cause: err, - } - } - } - - 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_MaglevLbConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_MaglevLbConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetTableSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_MaglevLbConfigValidationError{ - field: "TableSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// Cluster_MaglevLbConfigValidationError is the validation error returned by -// Cluster_MaglevLbConfig.Validate if the designated constraints aren't met. -type Cluster_MaglevLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_MaglevLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_MaglevLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_MaglevLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_MaglevLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_MaglevLbConfigValidationError) ErrorName() string { - return "Cluster_MaglevLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_MaglevLbConfigValidationError) Error() string { - 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_MaglevLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_MaglevLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_MaglevLbConfigValidationError{} - -// 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_PreconnectPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_PreconnectPolicy) Validate() error { - if m == nil { - return nil - } - - if wrapper := m.GetPerUpstreamPreconnectRatio(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 3 { - return Cluster_PreconnectPolicyValidationError{ - field: "PerUpstreamPreconnectRatio", - reason: "value must be inside range [1, 3]", - } - } - - } - - if wrapper := m.GetPredictivePreconnectRatio(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 3 { - return Cluster_PreconnectPolicyValidationError{ - field: "PredictivePreconnectRatio", - reason: "value must be inside range [1, 3]", - } - } - - } - - return nil -} - -// Cluster_PreconnectPolicyValidationError is the validation error returned by -// Cluster_PreconnectPolicy.Validate if the designated constraints aren't met. -type Cluster_PreconnectPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_PreconnectPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_PreconnectPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_PreconnectPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_PreconnectPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_PreconnectPolicyValidationError) ErrorName() string { - return "Cluster_PreconnectPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_PreconnectPolicyValidationError) Error() string { - 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_PreconnectPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_PreconnectPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_PreconnectPolicyValidationError{} - -// 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 - } - - // no validation rules for SingleHostPerSubset - - 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 - - if wrapper := m.GetHashBalanceFactor(); wrapper != nil { - - if wrapper.GetValue() < 100 { - return Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError{ - field: "HashBalanceFactor", - reason: "value must be greater than or equal to 100", - } - } - - } - - 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.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/pkg/api/envoy/config/cluster/v4alpha/filter.pb.go b/pkg/api/envoy/config/cluster/v4alpha/filter.pb.go deleted file mode 100644 index 1dfd6fbf83..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/filter.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/cluster/v4alpha/filter.proto - -package envoy_config_cluster_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - 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. - TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *Filter) Reset() { - *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Filter) ProtoMessage() {} - -func (x *Filter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Filter.ProtoReflect.Descriptor instead. -func (*Filter) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_filter_proto_rawDescGZIP(), []int{0} -} - -func (x *Filter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Filter) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -var File_envoy_config_cluster_v4alpha_filter_proto protoreflect.FileDescriptor - -var file_envoy_config_cluster_v4alpha_filter_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x85, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x43, 0x0a, 0x2a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_cluster_v4alpha_filter_proto_rawDescOnce sync.Once - file_envoy_config_cluster_v4alpha_filter_proto_rawDescData = file_envoy_config_cluster_v4alpha_filter_proto_rawDesc -) - -func file_envoy_config_cluster_v4alpha_filter_proto_rawDescGZIP() []byte { - file_envoy_config_cluster_v4alpha_filter_proto_rawDescOnce.Do(func() { - file_envoy_config_cluster_v4alpha_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_cluster_v4alpha_filter_proto_rawDescData) - }) - return file_envoy_config_cluster_v4alpha_filter_proto_rawDescData -} - -var file_envoy_config_cluster_v4alpha_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_cluster_v4alpha_filter_proto_goTypes = []interface{}{ - (*Filter)(nil), // 0: envoy.config.cluster.v4alpha.Filter - (*any.Any)(nil), // 1: google.protobuf.Any -} -var file_envoy_config_cluster_v4alpha_filter_proto_depIdxs = []int32{ - 1, // 0: envoy.config.cluster.v4alpha.Filter.typed_config:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_cluster_v4alpha_filter_proto_init() } -func file_envoy_config_cluster_v4alpha_filter_proto_init() { - if File_envoy_config_cluster_v4alpha_filter_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_cluster_v4alpha_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_cluster_v4alpha_filter_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_cluster_v4alpha_filter_proto_goTypes, - DependencyIndexes: file_envoy_config_cluster_v4alpha_filter_proto_depIdxs, - MessageInfos: file_envoy_config_cluster_v4alpha_filter_proto_msgTypes, - }.Build() - File_envoy_config_cluster_v4alpha_filter_proto = out.File - file_envoy_config_cluster_v4alpha_filter_proto_rawDesc = nil - file_envoy_config_cluster_v4alpha_filter_proto_goTypes = nil - file_envoy_config_cluster_v4alpha_filter_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/cluster/v4alpha/filter.pb.validate.go b/pkg/api/envoy/config/cluster/v4alpha/filter.pb.validate.go deleted file mode 100644 index caa5054b90..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/filter.pb.validate.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/cluster/v4alpha/filter.proto - -package envoy_config_cluster_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetName()) < 1 { - return FilterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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/pkg/api/envoy/config/cluster/v4alpha/outlier_detection.pb.go b/pkg/api/envoy/config/cluster/v4alpha/outlier_detection.pb.go deleted file mode 100644 index 4fa454c15e..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/outlier_detection.pb.go +++ /dev/null @@ -1,567 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/cluster/v4alpha/outlier_detection.proto - -package envoy_config_cluster_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// See the :ref:`architecture overview ` for -// more information on outlier detection. -// [#next-free-field: 22] -type OutlierDetection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of consecutive 5xx responses or local origin errors that are mapped - // to 5xx error codes before a consecutive 5xx ejection - // occurs. Defaults to 5. - Consecutive_5Xx *wrappers.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 *duration.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 and is - // capped by :ref:`max_ejection_time`. - // Defaults to 30000ms or 30s. - BaseEjectionTime *duration.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 *wrappers.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 *wrappers.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 *wrappers.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 *wrappers.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 *wrappers.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 *wrappers.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 codes) - // before a consecutive gateway failure ejection occurs. Defaults to 5. - ConsecutiveGatewayFailure *wrappers.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 *wrappers.UInt32Value `protobuf:"bytes,11,opt,name=enforcing_consecutive_gateway_failure,json=enforcingConsecutiveGatewayFailure,proto3" json:"enforcing_consecutive_gateway_failure,omitempty"` - // Determines whether to distinguish local origin failures from external errors. If set to true - // the following configuration parameters are taken into account: - // :ref:`consecutive_local_origin_failure`, - // :ref:`enforcing_consecutive_local_origin_failure` - // and - // :ref:`enforcing_local_origin_success_rate`. - // Defaults to false. - SplitExternalLocalOriginErrors bool `protobuf:"varint,12,opt,name=split_external_local_origin_errors,json=splitExternalLocalOriginErrors,proto3" json:"split_external_local_origin_errors,omitempty"` - // The number of consecutive locally originated failures before ejection - // occurs. Defaults to 5. Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - ConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=consecutive_local_origin_failure,json=consecutiveLocalOriginFailure,proto3" json:"consecutive_local_origin_failure,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive locally originated failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - EnforcingConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,14,opt,name=enforcing_consecutive_local_origin_failure,json=enforcingConsecutiveLocalOriginFailure,proto3" json:"enforcing_consecutive_local_origin_failure,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics for locally originated errors. - // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - EnforcingLocalOriginSuccessRate *wrappers.UInt32Value `protobuf:"bytes,15,opt,name=enforcing_local_origin_success_rate,json=enforcingLocalOriginSuccessRate,proto3" json:"enforcing_local_origin_success_rate,omitempty"` - // The failure percentage to use when determining failure percentage-based outlier detection. If - // the failure percentage of a given host is greater than or equal to this value, it will be - // ejected. Defaults to 85. - FailurePercentageThreshold *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=failure_percentage_threshold,json=failurePercentageThreshold,proto3" json:"failure_percentage_threshold,omitempty"` - // The % chance that a host will be actually ejected when an outlier status is detected through - // failure percentage statistics. This setting can be used to disable ejection or to ramp it up - // slowly. Defaults to 0. - // - // [#next-major-version: setting this without setting failure_percentage_threshold should be - // invalid in v4.] - EnforcingFailurePercentage *wrappers.UInt32Value `protobuf:"bytes,17,opt,name=enforcing_failure_percentage,json=enforcingFailurePercentage,proto3" json:"enforcing_failure_percentage,omitempty"` - // The % chance that a host will be actually ejected when an outlier status is detected through - // local-origin failure percentage statistics. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. - EnforcingFailurePercentageLocalOrigin *wrappers.UInt32Value `protobuf:"bytes,18,opt,name=enforcing_failure_percentage_local_origin,json=enforcingFailurePercentageLocalOrigin,proto3" json:"enforcing_failure_percentage_local_origin,omitempty"` - // The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. - // If the total number of hosts in the cluster is less than this value, failure percentage-based - // ejection will not be performed. Defaults to 5. - FailurePercentageMinimumHosts *wrappers.UInt32Value `protobuf:"bytes,19,opt,name=failure_percentage_minimum_hosts,json=failurePercentageMinimumHosts,proto3" json:"failure_percentage_minimum_hosts,omitempty"` - // The minimum number of total requests that must be collected in one interval (as defined by the - // interval duration above) to perform failure percentage-based ejection for this host. If the - // volume is lower than this setting, failure percentage-based ejection will not be performed for - // this host. Defaults to 50. - FailurePercentageRequestVolume *wrappers.UInt32Value `protobuf:"bytes,20,opt,name=failure_percentage_request_volume,json=failurePercentageRequestVolume,proto3" json:"failure_percentage_request_volume,omitempty"` - // The maximum time that a host is ejected for. See :ref:`base_ejection_time` - // for more information. If not specified, the default value (300000ms or 300s) or - // :ref:`base_ejection_time` value is applied, whatever is larger. - MaxEjectionTime *duration.Duration `protobuf:"bytes,21,opt,name=max_ejection_time,json=maxEjectionTime,proto3" json:"max_ejection_time,omitempty"` -} - -func (x *OutlierDetection) Reset() { - *x = OutlierDetection{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_cluster_v4alpha_outlier_detection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutlierDetection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutlierDetection) ProtoMessage() {} - -func (x *OutlierDetection) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_cluster_v4alpha_outlier_detection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutlierDetection.ProtoReflect.Descriptor instead. -func (*OutlierDetection) Descriptor() ([]byte, []int) { - return file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescGZIP(), []int{0} -} - -func (x *OutlierDetection) GetConsecutive_5Xx() *wrappers.UInt32Value { - if x != nil { - return x.Consecutive_5Xx - } - return nil -} - -func (x *OutlierDetection) GetInterval() *duration.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *OutlierDetection) GetBaseEjectionTime() *duration.Duration { - if x != nil { - return x.BaseEjectionTime - } - return nil -} - -func (x *OutlierDetection) GetMaxEjectionPercent() *wrappers.UInt32Value { - if x != nil { - return x.MaxEjectionPercent - } - return nil -} - -func (x *OutlierDetection) GetEnforcingConsecutive_5Xx() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingConsecutive_5Xx - } - return nil -} - -func (x *OutlierDetection) GetEnforcingSuccessRate() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingSuccessRate - } - return nil -} - -func (x *OutlierDetection) GetSuccessRateMinimumHosts() *wrappers.UInt32Value { - if x != nil { - return x.SuccessRateMinimumHosts - } - return nil -} - -func (x *OutlierDetection) GetSuccessRateRequestVolume() *wrappers.UInt32Value { - if x != nil { - return x.SuccessRateRequestVolume - } - return nil -} - -func (x *OutlierDetection) GetSuccessRateStdevFactor() *wrappers.UInt32Value { - if x != nil { - return x.SuccessRateStdevFactor - } - return nil -} - -func (x *OutlierDetection) GetConsecutiveGatewayFailure() *wrappers.UInt32Value { - if x != nil { - return x.ConsecutiveGatewayFailure - } - return nil -} - -func (x *OutlierDetection) GetEnforcingConsecutiveGatewayFailure() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingConsecutiveGatewayFailure - } - return nil -} - -func (x *OutlierDetection) GetSplitExternalLocalOriginErrors() bool { - if x != nil { - return x.SplitExternalLocalOriginErrors - } - return false -} - -func (x *OutlierDetection) GetConsecutiveLocalOriginFailure() *wrappers.UInt32Value { - if x != nil { - return x.ConsecutiveLocalOriginFailure - } - return nil -} - -func (x *OutlierDetection) GetEnforcingConsecutiveLocalOriginFailure() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingConsecutiveLocalOriginFailure - } - return nil -} - -func (x *OutlierDetection) GetEnforcingLocalOriginSuccessRate() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingLocalOriginSuccessRate - } - return nil -} - -func (x *OutlierDetection) GetFailurePercentageThreshold() *wrappers.UInt32Value { - if x != nil { - return x.FailurePercentageThreshold - } - return nil -} - -func (x *OutlierDetection) GetEnforcingFailurePercentage() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingFailurePercentage - } - return nil -} - -func (x *OutlierDetection) GetEnforcingFailurePercentageLocalOrigin() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingFailurePercentageLocalOrigin - } - return nil -} - -func (x *OutlierDetection) GetFailurePercentageMinimumHosts() *wrappers.UInt32Value { - if x != nil { - return x.FailurePercentageMinimumHosts - } - return nil -} - -func (x *OutlierDetection) GetFailurePercentageRequestVolume() *wrappers.UInt32Value { - if x != nil { - return x.FailurePercentageRequestVolume - } - return nil -} - -func (x *OutlierDetection) GetMaxEjectionTime() *duration.Duration { - if x != nil { - return x.MaxEjectionTime - } - return nil -} - -var File_envoy_config_cluster_v4alpha_outlier_detection_proto protoreflect.FileDescriptor - -var file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDesc = []byte{ - 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6f, - 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xc0, 0x10, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x35, 0x78, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x35, 0x78, 0x78, 0x12, 0x3f, 0x0a, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, - 0x2a, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x51, 0x0a, 0x12, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x10, 0x62, - 0x61, 0x73, 0x65, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x57, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x2a, 0x02, 0x18, 0x64, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x19, 0x65, 0x6e, 0x66, 0x6f, - 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x35, 0x78, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x18, 0x64, 0x52, 0x17, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x35, 0x78, 0x78, 0x12, 0x5b, 0x0a, 0x16, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x18, 0x64, 0x52, 0x14, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x1a, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, - 0x73, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x1b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x18, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x12, 0x57, 0x0a, 0x19, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x5f, 0x73, 0x74, 0x64, 0x65, 0x76, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x16, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x64, 0x65, 0x76, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5c, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x19, 0x63, 0x6f, - 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x78, 0x0a, 0x25, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x22, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x76, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x12, 0x4a, 0x0a, 0x22, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x73, - 0x70, 0x6c, 0x69, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x65, 0x0a, - 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x76, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x2a, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, - 0x52, 0x26, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x73, 0x0a, 0x23, 0x65, 0x6e, 0x66, 0x6f, - 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x1f, 0x65, 0x6e, - 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x67, 0x0a, - 0x1c, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x1a, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x67, 0x0a, 0x1c, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, - 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, - 0x02, 0x18, 0x64, 0x52, 0x1a, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, - 0x7f, 0x0a, 0x29, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x25, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x12, 0x65, 0x0a, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x21, 0x66, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x1e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x12, 0x4f, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, - 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, - 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x4d, 0x0a, 0x2a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x15, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescOnce sync.Once - file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescData = file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDesc -) - -func file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescGZIP() []byte { - file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescOnce.Do(func() { - file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescData) - }) - return file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDescData -} - -var file_envoy_config_cluster_v4alpha_outlier_detection_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_cluster_v4alpha_outlier_detection_proto_goTypes = []interface{}{ - (*OutlierDetection)(nil), // 0: envoy.config.cluster.v4alpha.OutlierDetection - (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 2: google.protobuf.Duration -} -var file_envoy_config_cluster_v4alpha_outlier_detection_proto_depIdxs = []int32{ - 1, // 0: envoy.config.cluster.v4alpha.OutlierDetection.consecutive_5xx:type_name -> google.protobuf.UInt32Value - 2, // 1: envoy.config.cluster.v4alpha.OutlierDetection.interval:type_name -> google.protobuf.Duration - 2, // 2: envoy.config.cluster.v4alpha.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration - 1, // 3: envoy.config.cluster.v4alpha.OutlierDetection.max_ejection_percent:type_name -> google.protobuf.UInt32Value - 1, // 4: envoy.config.cluster.v4alpha.OutlierDetection.enforcing_consecutive_5xx:type_name -> google.protobuf.UInt32Value - 1, // 5: envoy.config.cluster.v4alpha.OutlierDetection.enforcing_success_rate:type_name -> google.protobuf.UInt32Value - 1, // 6: envoy.config.cluster.v4alpha.OutlierDetection.success_rate_minimum_hosts:type_name -> google.protobuf.UInt32Value - 1, // 7: envoy.config.cluster.v4alpha.OutlierDetection.success_rate_request_volume:type_name -> google.protobuf.UInt32Value - 1, // 8: envoy.config.cluster.v4alpha.OutlierDetection.success_rate_stdev_factor:type_name -> google.protobuf.UInt32Value - 1, // 9: envoy.config.cluster.v4alpha.OutlierDetection.consecutive_gateway_failure:type_name -> google.protobuf.UInt32Value - 1, // 10: envoy.config.cluster.v4alpha.OutlierDetection.enforcing_consecutive_gateway_failure:type_name -> google.protobuf.UInt32Value - 1, // 11: envoy.config.cluster.v4alpha.OutlierDetection.consecutive_local_origin_failure:type_name -> google.protobuf.UInt32Value - 1, // 12: envoy.config.cluster.v4alpha.OutlierDetection.enforcing_consecutive_local_origin_failure:type_name -> google.protobuf.UInt32Value - 1, // 13: envoy.config.cluster.v4alpha.OutlierDetection.enforcing_local_origin_success_rate:type_name -> google.protobuf.UInt32Value - 1, // 14: envoy.config.cluster.v4alpha.OutlierDetection.failure_percentage_threshold:type_name -> google.protobuf.UInt32Value - 1, // 15: envoy.config.cluster.v4alpha.OutlierDetection.enforcing_failure_percentage:type_name -> google.protobuf.UInt32Value - 1, // 16: envoy.config.cluster.v4alpha.OutlierDetection.enforcing_failure_percentage_local_origin:type_name -> google.protobuf.UInt32Value - 1, // 17: envoy.config.cluster.v4alpha.OutlierDetection.failure_percentage_minimum_hosts:type_name -> google.protobuf.UInt32Value - 1, // 18: envoy.config.cluster.v4alpha.OutlierDetection.failure_percentage_request_volume:type_name -> google.protobuf.UInt32Value - 2, // 19: envoy.config.cluster.v4alpha.OutlierDetection.max_ejection_time:type_name -> google.protobuf.Duration - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_envoy_config_cluster_v4alpha_outlier_detection_proto_init() } -func file_envoy_config_cluster_v4alpha_outlier_detection_proto_init() { - if File_envoy_config_cluster_v4alpha_outlier_detection_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_cluster_v4alpha_outlier_detection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutlierDetection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_cluster_v4alpha_outlier_detection_proto_goTypes, - DependencyIndexes: file_envoy_config_cluster_v4alpha_outlier_detection_proto_depIdxs, - MessageInfos: file_envoy_config_cluster_v4alpha_outlier_detection_proto_msgTypes, - }.Build() - File_envoy_config_cluster_v4alpha_outlier_detection_proto = out.File - file_envoy_config_cluster_v4alpha_outlier_detection_proto_rawDesc = nil - file_envoy_config_cluster_v4alpha_outlier_detection_proto_goTypes = nil - file_envoy_config_cluster_v4alpha_outlier_detection_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/cluster/v4alpha/outlier_detection.pb.validate.go b/pkg/api/envoy/config/cluster/v4alpha/outlier_detection.pb.validate.go deleted file mode 100644 index 576bd2b191..0000000000 --- a/pkg/api/envoy/config/cluster/v4alpha/outlier_detection.pb.validate.go +++ /dev/null @@ -1,343 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/cluster/v4alpha/outlier_detection.proto - -package envoy_config_cluster_v4alpha - -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{} -) - -// 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. -func (m *OutlierDetection) Validate() error { - if m == nil { - return nil - } - - 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 := ptypes.Duration(d) - if err != nil { - return OutlierDetectionValidationError{ - field: "Interval", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return OutlierDetectionValidationError{ - field: "Interval", - reason: "value must be greater than 0s", - } - } - - } - - if d := m.GetBaseEjectionTime(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return OutlierDetectionValidationError{ - field: "BaseEjectionTime", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return OutlierDetectionValidationError{ - field: "BaseEjectionTime", - reason: "value must be greater than 0s", - } - } - - } - - if wrapper := m.GetMaxEjectionPercent(); wrapper != nil { - - if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ - field: "MaxEjectionPercent", - reason: "value must be less than or equal to 100", - } - } - - } - - if wrapper := m.GetEnforcingConsecutive_5Xx(); wrapper != nil { - - if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ - field: "EnforcingConsecutive_5Xx", - reason: "value must be less than or equal to 100", - } - } - - } - - if wrapper := m.GetEnforcingSuccessRate(); wrapper != nil { - - if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ - field: "EnforcingSuccessRate", - reason: "value must be less than or equal to 100", - } - } - - } - - 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, - } - } - } - - 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, - } - } - } - - 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, - } - } - } - - 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, - } - } - } - - if wrapper := m.GetEnforcingConsecutiveGatewayFailure(); wrapper != nil { - - if wrapper.GetValue() > 100 { - return OutlierDetectionValidationError{ - field: "EnforcingConsecutiveGatewayFailure", - reason: "value must be less than or equal to 100", - } - } - - } - - // 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, - } - } - } - - if d := m.GetMaxEjectionTime(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return OutlierDetectionValidationError{ - field: "MaxEjectionTime", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return OutlierDetectionValidationError{ - field: "MaxEjectionTime", - reason: "value must be greater than 0s", - } - } - - } - - return nil -} - -// OutlierDetectionValidationError is the validation error returned by -// OutlierDetection.Validate if the designated constraints aren't met. -type OutlierDetectionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OutlierDetectionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OutlierDetectionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OutlierDetectionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OutlierDetectionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OutlierDetectionValidationError) ErrorName() string { return "OutlierDetectionValidationError" } - -// Error satisfies the builtin error interface -func (e OutlierDetectionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOutlierDetection.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OutlierDetectionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OutlierDetectionValidationError{} diff --git a/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.go b/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.go index d17bb99e48..e6711dd58c 100644 --- a/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.go +++ b/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto -package envoy_config_common_dynamic_forward_proxy_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview // ` for more information. // [#next-free-field: 7] @@ -134,7 +129,7 @@ func (x *DnsCacheConfig) GetDnsLookupFamily() v2.Cluster_DnsLookupFamily { if x != nil { return x.DnsLookupFamily } - return v2.Cluster_AUTO + return v2.Cluster_DnsLookupFamily(0) } func (x *DnsCacheConfig) GetDnsRefreshRate() *duration.Duration { @@ -214,17 +209,23 @@ var file_envoy_config_common_dynamic_forward_proxy_v2alpha_dns_cache_proto_rawDe 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x42, 0x92, 0x01, 0x0a, 0x3f, 0x69, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x42, 0xec, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, - 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x32, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x32, 0x12, + 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, + 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.validate.go b/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.validate.go index 0bc9ad7943..33f2cba59d 100644 --- a/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.validate.go +++ b/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto -package envoy_config_common_dynamic_forward_proxy_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" ) @@ -32,87 +33,151 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v2.Cluster_DnsLookupFamily(0) ) // Validate checks the field values on DnsCacheConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DnsCacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsCacheConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DnsCacheConfigMultiError, +// or nil if none found. +func (m *DnsCacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsCacheConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return DnsCacheConfigValidationError{ + err := DnsCacheConfigValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := v2.Cluster_DnsLookupFamily_name[int32(m.GetDnsLookupFamily())]; !ok { - return DnsCacheConfigValidationError{ + err := DnsCacheConfigValidationError{ field: "DnsLookupFamily", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetDnsRefreshRate(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DnsCacheConfigValidationError{ + err = DnsCacheConfigValidationError{ field: "DnsRefreshRate", reason: "value is not a valid duration", cause: err, } - } - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - return DnsCacheConfigValidationError{ - field: "DnsRefreshRate", - reason: "value must be greater than or equal to 1ms", + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := DnsCacheConfigValidationError{ + field: "DnsRefreshRate", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetHostTtl(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DnsCacheConfigValidationError{ + err = DnsCacheConfigValidationError{ field: "HostTtl", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return DnsCacheConfigValidationError{ - field: "HostTtl", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := DnsCacheConfigValidationError{ + field: "HostTtl", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if wrapper := m.GetMaxHosts(); wrapper != nil { if wrapper.GetValue() <= 0 { - return DnsCacheConfigValidationError{ + err := DnsCacheConfigValidationError{ field: "MaxHosts", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsFailureRefreshRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsCacheConfigValidationError{ field: "DnsFailureRefreshRate", @@ -122,9 +187,30 @@ func (m *DnsCacheConfig) Validate() error { } } + if len(errors) > 0 { + return DnsCacheConfigMultiError(errors) + } + return nil } +// DnsCacheConfigMultiError is an error wrapping multiple validation errors +// returned by DnsCacheConfig.ValidateAll() if the designated constraints +// aren't met. +type DnsCacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsCacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsCacheConfigMultiError) AllErrors() []error { return m } + // DnsCacheConfigValidationError is the validation error returned by // DnsCacheConfig.Validate if the designated constraints aren't met. type DnsCacheConfigValidationError struct { diff --git a/pkg/api/envoy/config/common/key_value/v3/config.pb.go b/pkg/api/envoy/config/common/key_value/v3/config.pb.go new file mode 100644 index 0000000000..0bcf74dfb7 --- /dev/null +++ b/pkg/api/envoy/config/common/key_value/v3/config.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/config/common/key_value/v3/config.proto + +package key_valuev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This shared configuration for Envoy key value stores. +type KeyValueStoreConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [#extension-category: envoy.common.key_value] + Config *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *KeyValueStoreConfig) Reset() { + *x = KeyValueStoreConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_key_value_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyValueStoreConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyValueStoreConfig) ProtoMessage() {} + +func (x *KeyValueStoreConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_key_value_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyValueStoreConfig.ProtoReflect.Descriptor instead. +func (*KeyValueStoreConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_common_key_value_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *KeyValueStoreConfig) GetConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.Config + } + return nil +} + +var File_envoy_config_common_key_value_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_config_common_key_value_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x76, + 0x33, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x6d, 0x0a, 0x13, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x42, + 0x9c, 0x01, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, + 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6b, 0x65, + 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x6b, 0x65, 0x79, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_common_key_value_v3_config_proto_rawDescOnce sync.Once + file_envoy_config_common_key_value_v3_config_proto_rawDescData = file_envoy_config_common_key_value_v3_config_proto_rawDesc +) + +func file_envoy_config_common_key_value_v3_config_proto_rawDescGZIP() []byte { + file_envoy_config_common_key_value_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_config_common_key_value_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_common_key_value_v3_config_proto_rawDescData) + }) + return file_envoy_config_common_key_value_v3_config_proto_rawDescData +} + +var file_envoy_config_common_key_value_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_common_key_value_v3_config_proto_goTypes = []interface{}{ + (*KeyValueStoreConfig)(nil), // 0: envoy.config.common.key_value.v3.KeyValueStoreConfig + (*v3.TypedExtensionConfig)(nil), // 1: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_config_common_key_value_v3_config_proto_depIdxs = []int32{ + 1, // 0: envoy.config.common.key_value.v3.KeyValueStoreConfig.config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_config_common_key_value_v3_config_proto_init() } +func file_envoy_config_common_key_value_v3_config_proto_init() { + if File_envoy_config_common_key_value_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_common_key_value_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValueStoreConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_common_key_value_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_common_key_value_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_config_common_key_value_v3_config_proto_depIdxs, + MessageInfos: file_envoy_config_common_key_value_v3_config_proto_msgTypes, + }.Build() + File_envoy_config_common_key_value_v3_config_proto = out.File + file_envoy_config_common_key_value_v3_config_proto_rawDesc = nil + file_envoy_config_common_key_value_v3_config_proto_goTypes = nil + file_envoy_config_common_key_value_v3_config_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/config/common/key_value/v3/config.pb.validate.go b/pkg/api/envoy/config/common/key_value/v3/config.pb.validate.go new file mode 100644 index 0000000000..44fbaeb927 --- /dev/null +++ b/pkg/api/envoy/config/common/key_value/v3/config.pb.validate.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/common/key_value/v3/config.proto + +package key_valuev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on KeyValueStoreConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *KeyValueStoreConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on KeyValueStoreConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// KeyValueStoreConfigMultiError, or nil if none found. +func (m *KeyValueStoreConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *KeyValueStoreConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetConfig() == nil { + err := KeyValueStoreConfigValidationError{ + field: "Config", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, KeyValueStoreConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, KeyValueStoreConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return KeyValueStoreConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return KeyValueStoreConfigMultiError(errors) + } + + return nil +} + +// KeyValueStoreConfigMultiError is an error wrapping multiple validation +// errors returned by KeyValueStoreConfig.ValidateAll() if the designated +// constraints aren't met. +type KeyValueStoreConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m KeyValueStoreConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m KeyValueStoreConfigMultiError) AllErrors() []error { return m } + +// KeyValueStoreConfigValidationError is the validation error returned by +// KeyValueStoreConfig.Validate if the designated constraints aren't met. +type KeyValueStoreConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e KeyValueStoreConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e KeyValueStoreConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e KeyValueStoreConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e KeyValueStoreConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e KeyValueStoreConfigValidationError) ErrorName() string { + return "KeyValueStoreConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e KeyValueStoreConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sKeyValueStoreConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = KeyValueStoreConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = KeyValueStoreConfigValidationError{} diff --git a/pkg/api/envoy/config/common/matcher/v3/matcher.pb.go b/pkg/api/envoy/config/common/matcher/v3/matcher.pb.go index 884d9b7c65..45794ce381 100644 --- a/pkg/api/envoy/config/common/matcher/v3/matcher.pb.go +++ b/pkg/api/envoy/config/common/matcher/v3/matcher.pb.go @@ -1,18 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/common/matcher/v3/matcher.proto -package envoy_config_common_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -26,17 +26,11 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A matcher, which may traverse a matching tree in order to result in a match action. // During matching, the tree will be traversed until a match is found, or if no match // is found the action specified by the most specific on_no_match will be evaluated. // As an on_no_match might result in another matching tree being evaluated, this process // might repeat several times until the final OnMatch (or no match) is decided. -// -// This API is a work in progress. type Matcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -711,6 +705,7 @@ type Matcher_MatcherList_Predicate struct { // *Matcher_MatcherList_Predicate_SinglePredicate_ // *Matcher_MatcherList_Predicate_OrMatcher // *Matcher_MatcherList_Predicate_AndMatcher + // *Matcher_MatcherList_Predicate_NotMatcher MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"` } @@ -774,6 +769,13 @@ func (x *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Pre return nil } +func (x *Matcher_MatcherList_Predicate) GetNotMatcher() *Matcher_MatcherList_Predicate { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_NotMatcher); ok { + return x.NotMatcher + } + return nil +} + type isMatcher_MatcherList_Predicate_MatchType interface { isMatcher_MatcherList_Predicate_MatchType() } @@ -793,12 +795,19 @@ type Matcher_MatcherList_Predicate_AndMatcher struct { AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"` } +type Matcher_MatcherList_Predicate_NotMatcher struct { + // The invert of a predicate + NotMatcher *Matcher_MatcherList_Predicate `protobuf:"bytes,4,opt,name=not_matcher,json=notMatcher,proto3,oneof"` +} + func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {} func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {} func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {} +func (*Matcher_MatcherList_Predicate_NotMatcher) isMatcher_MatcherList_Predicate_MatchType() {} + // An individual matcher. type Matcher_MatcherList_FieldMatcher struct { state protoimpl.MessageState @@ -864,6 +873,7 @@ type Matcher_MatcherList_Predicate_SinglePredicate struct { unknownFields protoimpl.UnknownFields // Protocol-specific specification of input field to match on. + // [#extension-category: envoy.matching.common_inputs] Input *v31.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // Types that are assignable to Matcher: // *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch @@ -942,6 +952,7 @@ type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct { type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct { // Extension for custom matching logic. + // [#extension-category: envoy.matching.input_matchers] CustomMatch *v31.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"` } @@ -1195,72 +1206,76 @@ var file_envoy_config_common_matcher_v3_matcher_proto_rawDesc = []byte{ 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xf8, 0x10, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x58, 0x0a, - 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xe4, 0x11, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0c, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, + 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, + 0x4f, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x09, 0x6f, 0x6e, 0x4e, 0x6f, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x1a, 0xa5, 0x01, 0x0a, 0x07, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, - 0x65, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, - 0x65, 0x12, 0x4f, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x09, 0x6f, 0x6e, 0x4e, 0x6f, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x1a, 0xa5, 0x01, 0x0a, 0x07, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, - 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, - 0x00, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xc0, 0x08, 0x0a, 0x0b, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x73, 0x1a, 0xfa, 0x05, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x12, 0x7a, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x12, 0x44, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xa2, 0x09, 0x0a, 0x0b, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0a, - 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x09, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x6e, 0x0a, 0x0b, 0x61, 0x6e, - 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, - 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x87, 0x02, 0x0a, 0x0f, 0x53, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, + 0x1a, 0xdc, 0x06, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x7a, + 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0a, 0x6f, 0x72, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6f, + 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x6e, 0x0a, 0x0b, 0x61, 0x6e, 0x64, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x6e, + 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, + 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x87, 0x02, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4a, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, @@ -1337,107 +1352,113 @@ var file_envoy_config_common_matcher_v3_matcher_proto_rawDesc = []byte{ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x13, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xe8, 0x08, 0x0a, - 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, - 0x54, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x56, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, - 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4d, 0x0a, - 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, - 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x6f, 0x0a, 0x1a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, - 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x71, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, + 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, + 0x01, 0x42, 0x13, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xe8, 0x08, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x08, 0x6f, 0x72, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x56, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, + 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4d, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, - 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, - 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x71, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, - 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x73, 0x0a, 0x1c, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, + 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x6f, + 0x0a, 0x1a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x71, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x71, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x73, 0x0a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, + 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x7c, 0x0a, 0x1f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, + 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x7e, 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, + 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1c, 0x68, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, + 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x5a, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x74, 0x12, 0x4e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0x52, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, + 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x6b, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x7c, 0x0a, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, + 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, + 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x1a, 0x7b, 0x0a, 0x10, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, + 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, + 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, + 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x97, 0x01, 0x0a, 0x2c, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, - 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x7e, - 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, - 0x52, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x5a, - 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x12, 0x4e, 0x0a, 0x05, 0x72, 0x75, - 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, - 0x02, 0x08, 0x02, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, - 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x52, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x14, - 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x6b, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x73, 0x1a, 0x7b, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, - 0x46, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, - 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1498,20 +1519,21 @@ var file_envoy_config_common_matcher_v3_matcher_proto_depIdxs = []int32{ 9, // 21: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.single_predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate 10, // 22: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.or_matcher:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList 10, // 23: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.and_matcher:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList - 7, // 24: envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher.predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate - 4, // 25: envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher.on_match:type_name -> envoy.config.common.matcher.v3.Matcher.OnMatch - 16, // 26: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.input:type_name -> envoy.config.core.v3.TypedExtensionConfig - 17, // 27: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.value_match:type_name -> envoy.type.matcher.v3.StringMatcher - 16, // 28: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.custom_match:type_name -> envoy.config.core.v3.TypedExtensionConfig - 7, // 29: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList.predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate - 12, // 30: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.map:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry - 4, // 31: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry.value:type_name -> envoy.config.common.matcher.v3.Matcher.OnMatch - 1, // 32: envoy.config.common.matcher.v3.MatchPredicate.MatchSet.rules:type_name -> envoy.config.common.matcher.v3.MatchPredicate - 33, // [33:33] is the sub-list for method output_type - 33, // [33:33] is the sub-list for method input_type - 33, // [33:33] is the sub-list for extension type_name - 33, // [33:33] is the sub-list for extension extendee - 0, // [0:33] is the sub-list for field type_name + 7, // 24: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.not_matcher:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate + 7, // 25: envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher.predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate + 4, // 26: envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher.on_match:type_name -> envoy.config.common.matcher.v3.Matcher.OnMatch + 16, // 27: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.input:type_name -> envoy.config.core.v3.TypedExtensionConfig + 17, // 28: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.value_match:type_name -> envoy.type.matcher.v3.StringMatcher + 16, // 29: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.custom_match:type_name -> envoy.config.core.v3.TypedExtensionConfig + 7, // 30: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList.predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate + 12, // 31: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.map:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry + 4, // 32: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry.value:type_name -> envoy.config.common.matcher.v3.Matcher.OnMatch + 1, // 33: envoy.config.common.matcher.v3.MatchPredicate.MatchSet.rules:type_name -> envoy.config.common.matcher.v3.MatchPredicate + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_envoy_config_common_matcher_v3_matcher_proto_init() } @@ -1718,6 +1740,7 @@ func file_envoy_config_common_matcher_v3_matcher_proto_init() { (*Matcher_MatcherList_Predicate_SinglePredicate_)(nil), (*Matcher_MatcherList_Predicate_OrMatcher)(nil), (*Matcher_MatcherList_Predicate_AndMatcher)(nil), + (*Matcher_MatcherList_Predicate_NotMatcher)(nil), } file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[9].OneofWrappers = []interface{}{ (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch)(nil), diff --git a/pkg/api/envoy/config/common/matcher/v3/matcher.pb.validate.go b/pkg/api/envoy/config/common/matcher/v3/matcher.pb.validate.go index 7f3ee876bf..953a15afef 100644 --- a/pkg/api/envoy/config/common/matcher/v3/matcher.pb.validate.go +++ b/pkg/api/envoy/config/common/matcher/v3/matcher.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/common/matcher/v3/matcher.proto -package envoy_config_common_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Matcher with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Matcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in MatcherMultiError, or nil if none found. +func (m *Matcher) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetOnNoMatch()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetOnNoMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "OnNoMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "OnNoMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnNoMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatcherValidationError{ field: "OnNoMatch", @@ -54,7 +89,26 @@ func (m *Matcher) Validate() error { case *Matcher_MatcherList_: - if v, ok := interface{}(m.GetMatcherList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatcherList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcherList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatcherValidationError{ field: "MatcherList", @@ -66,7 +120,26 @@ func (m *Matcher) Validate() error { case *Matcher_MatcherTree_: - if v, ok := interface{}(m.GetMatcherTree()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatcherTree()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherTree", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherTree", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcherTree()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatcherValidationError{ field: "MatcherTree", @@ -77,16 +150,40 @@ func (m *Matcher) Validate() error { } default: - return MatcherValidationError{ + err := MatcherValidationError{ field: "MatcherType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MatcherMultiError(errors) } return nil } +// MatcherMultiError is an error wrapping multiple validation errors returned +// by Matcher.ValidateAll() if the designated constraints aren't met. +type MatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatcherMultiError) AllErrors() []error { return m } + // MatcherValidationError is the validation error returned by Matcher.Validate // if the designated constraints aren't met. type MatcherValidationError struct { @@ -142,18 +239,51 @@ var _ interface { } = MatcherValidationError{} // Validate checks the field values on MatchPredicate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MatchPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MatchPredicateMultiError, +// or nil if none found. +func (m *MatchPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *MatchPredicate_OrMatch: - if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "OrMatch", @@ -165,7 +295,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_AndMatch: - if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "AndMatch", @@ -177,7 +326,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_NotMatch: - if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "NotMatch", @@ -190,15 +358,38 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_AnyMatch: if m.GetAnyMatch() != true { - return MatchPredicateValidationError{ + err := MatchPredicateValidationError{ field: "AnyMatch", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *MatchPredicate_HttpRequestHeadersMatch: - if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestHeadersMatch", @@ -210,7 +401,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpRequestTrailersMatch: - if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestTrailersMatch", @@ -222,7 +432,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseHeadersMatch: - if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseHeadersMatch", @@ -234,7 +463,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseTrailersMatch: - if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseTrailersMatch", @@ -246,7 +494,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpRequestGenericBodyMatch: - if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestGenericBodyMatch", @@ -258,7 +525,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseGenericBodyMatch: - if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseGenericBodyMatch", @@ -269,16 +555,41 @@ func (m *MatchPredicate) Validate() error { } default: - return MatchPredicateValidationError{ + err := MatchPredicateValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return MatchPredicateMultiError(errors) + } + return nil } +// MatchPredicateMultiError is an error wrapping multiple validation errors +// returned by MatchPredicate.ValidateAll() if the designated constraints +// aren't met. +type MatchPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicateMultiError) AllErrors() []error { return m } + // MatchPredicateValidationError is the validation error returned by // MatchPredicate.Validate if the designated constraints aren't met. type MatchPredicateValidationError struct { @@ -334,17 +645,50 @@ var _ interface { } = MatchPredicateValidationError{} // Validate checks the field values on HttpHeadersMatch with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HttpHeadersMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpHeadersMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpHeadersMatchMultiError, or nil if none found. +func (m *HttpHeadersMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpHeadersMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpHeadersMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -356,9 +700,30 @@ func (m *HttpHeadersMatch) Validate() error { } + if len(errors) > 0 { + return HttpHeadersMatchMultiError(errors) + } + return nil } +// HttpHeadersMatchMultiError is an error wrapping multiple validation errors +// returned by HttpHeadersMatch.ValidateAll() if the designated constraints +// aren't met. +type HttpHeadersMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpHeadersMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpHeadersMatchMultiError) AllErrors() []error { return m } + // HttpHeadersMatchValidationError is the validation error returned by // HttpHeadersMatch.Validate if the designated constraints aren't met. type HttpHeadersMatchValidationError struct { @@ -415,25 +780,62 @@ var _ interface { // Validate checks the field values on HttpGenericBodyMatch with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpGenericBodyMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpGenericBodyMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for BytesLimit if len(m.GetPatterns()) < 1 { - return HttpGenericBodyMatchValidationError{ + err := HttpGenericBodyMatchValidationError{ field: "Patterns", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPatterns() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpGenericBodyMatchValidationError{ field: fmt.Sprintf("Patterns[%v]", idx), @@ -445,9 +847,30 @@ func (m *HttpGenericBodyMatch) Validate() error { } + if len(errors) > 0 { + return HttpGenericBodyMatchMultiError(errors) + } + return nil } +// HttpGenericBodyMatchMultiError is an error wrapping multiple validation +// errors returned by HttpGenericBodyMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatchMultiError) AllErrors() []error { return m } + // HttpGenericBodyMatchValidationError is the validation error returned by // HttpGenericBodyMatch.Validate if the designated constraints aren't met. type HttpGenericBodyMatchValidationError struct { @@ -505,18 +928,51 @@ var _ interface { } = HttpGenericBodyMatchValidationError{} // Validate checks the field values on Matcher_OnMatch with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *Matcher_OnMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_OnMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Matcher_OnMatchMultiError, or nil if none found. +func (m *Matcher_OnMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_OnMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.OnMatch.(type) { case *Matcher_OnMatch_Matcher: - if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_OnMatchValidationError{ field: "Matcher", @@ -528,7 +984,26 @@ func (m *Matcher_OnMatch) Validate() error { case *Matcher_OnMatch_Action: - if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_OnMatchValidationError{ field: "Action", @@ -539,16 +1014,41 @@ func (m *Matcher_OnMatch) Validate() error { } default: - return Matcher_OnMatchValidationError{ + err := Matcher_OnMatchValidationError{ field: "OnMatch", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return Matcher_OnMatchMultiError(errors) + } + return nil } +// Matcher_OnMatchMultiError is an error wrapping multiple validation errors +// returned by Matcher_OnMatch.ValidateAll() if the designated constraints +// aren't met. +type Matcher_OnMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_OnMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_OnMatchMultiError) AllErrors() []error { return m } + // Matcher_OnMatchValidationError is the validation error returned by // Matcher_OnMatch.Validate if the designated constraints aren't met. type Matcher_OnMatchValidationError struct { @@ -605,23 +1105,60 @@ var _ interface { // Validate checks the field values on Matcher_MatcherList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Matcher_MatcherList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Matcher_MatcherListMultiError, or nil if none found. +func (m *Matcher_MatcherList) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetMatchers()) < 1 { - return Matcher_MatcherListValidationError{ + err := Matcher_MatcherListValidationError{ field: "Matchers", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetMatchers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherListValidationError{ + field: fmt.Sprintf("Matchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherListValidationError{ + field: fmt.Sprintf("Matchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherListValidationError{ field: fmt.Sprintf("Matchers[%v]", idx), @@ -633,9 +1170,30 @@ func (m *Matcher_MatcherList) Validate() error { } + if len(errors) > 0 { + return Matcher_MatcherListMultiError(errors) + } + return nil } +// Matcher_MatcherListMultiError is an error wrapping multiple validation +// errors returned by Matcher_MatcherList.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherListMultiError) AllErrors() []error { return m } + // Matcher_MatcherListValidationError is the validation error returned by // Matcher_MatcherList.Validate if the designated constraints aren't met. type Matcher_MatcherListValidationError struct { @@ -694,20 +1252,57 @@ var _ interface { // Validate checks the field values on Matcher_MatcherTree with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Matcher_MatcherTree) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherTree with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Matcher_MatcherTreeMultiError, or nil if none found. +func (m *Matcher_MatcherTree) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherTree) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetInput() == nil { - return Matcher_MatcherTreeValidationError{ + err := Matcher_MatcherTreeValidationError{ field: "Input", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInput()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherTreeValidationError{ field: "Input", @@ -721,7 +1316,26 @@ func (m *Matcher_MatcherTree) Validate() error { case *Matcher_MatcherTree_ExactMatchMap: - if v, ok := interface{}(m.GetExactMatchMap()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExactMatchMap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "ExactMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "ExactMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExactMatchMap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherTreeValidationError{ field: "ExactMatchMap", @@ -733,7 +1347,26 @@ func (m *Matcher_MatcherTree) Validate() error { case *Matcher_MatcherTree_PrefixMatchMap: - if v, ok := interface{}(m.GetPrefixMatchMap()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrefixMatchMap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "PrefixMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "PrefixMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrefixMatchMap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherTreeValidationError{ field: "PrefixMatchMap", @@ -745,7 +1378,26 @@ func (m *Matcher_MatcherTree) Validate() error { case *Matcher_MatcherTree_CustomMatch: - if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCustomMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherTreeValidationError{ field: "CustomMatch", @@ -756,16 +1408,41 @@ func (m *Matcher_MatcherTree) Validate() error { } default: - return Matcher_MatcherTreeValidationError{ + err := Matcher_MatcherTreeValidationError{ field: "TreeType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return Matcher_MatcherTreeMultiError(errors) } return nil } +// Matcher_MatcherTreeMultiError is an error wrapping multiple validation +// errors returned by Matcher_MatcherTree.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherTreeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherTreeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherTreeMultiError) AllErrors() []error { return m } + // Matcher_MatcherTreeValidationError is the validation error returned by // Matcher_MatcherTree.Validate if the designated constraints aren't met. type Matcher_MatcherTreeValidationError struct { @@ -824,17 +1501,50 @@ var _ interface { // Validate checks the field values on Matcher_MatcherList_Predicate with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Matcher_MatcherList_Predicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherList_Predicate with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// Matcher_MatcherList_PredicateMultiError, or nil if none found. +func (m *Matcher_MatcherList_Predicate) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_Predicate) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.MatchType.(type) { case *Matcher_MatcherList_Predicate_SinglePredicate_: - if v, ok := interface{}(m.GetSinglePredicate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSinglePredicate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "SinglePredicate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "SinglePredicate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSinglePredicate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_PredicateValidationError{ field: "SinglePredicate", @@ -846,7 +1556,26 @@ func (m *Matcher_MatcherList_Predicate) Validate() error { case *Matcher_MatcherList_Predicate_OrMatcher: - if v, ok := interface{}(m.GetOrMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "OrMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "OrMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_PredicateValidationError{ field: "OrMatcher", @@ -858,7 +1587,26 @@ func (m *Matcher_MatcherList_Predicate) Validate() error { case *Matcher_MatcherList_Predicate_AndMatcher: - if v, ok := interface{}(m.GetAndMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "AndMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "AndMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_PredicateValidationError{ field: "AndMatcher", @@ -868,17 +1616,73 @@ func (m *Matcher_MatcherList_Predicate) Validate() error { } } + case *Matcher_MatcherList_Predicate_NotMatcher: + + if all { + switch v := interface{}(m.GetNotMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "NotMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "NotMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_PredicateValidationError{ + field: "NotMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: - return Matcher_MatcherList_PredicateValidationError{ + err := Matcher_MatcherList_PredicateValidationError{ field: "MatchType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return Matcher_MatcherList_PredicateMultiError(errors) } return nil } +// Matcher_MatcherList_PredicateMultiError is an error wrapping multiple +// validation errors returned by Matcher_MatcherList_Predicate.ValidateAll() +// if the designated constraints aren't met. +type Matcher_MatcherList_PredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_PredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_PredicateMultiError) AllErrors() []error { return m } + // Matcher_MatcherList_PredicateValidationError is the validation error // returned by Matcher_MatcherList_Predicate.Validate if the designated // constraints aren't met. @@ -938,20 +1742,58 @@ var _ interface { // Validate checks the field values on Matcher_MatcherList_FieldMatcher with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Matcher_MatcherList_FieldMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherList_FieldMatcher with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// Matcher_MatcherList_FieldMatcherMultiError, or nil if none found. +func (m *Matcher_MatcherList_FieldMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_FieldMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetPredicate() == nil { - return Matcher_MatcherList_FieldMatcherValidationError{ + err := Matcher_MatcherList_FieldMatcherValidationError{ field: "Predicate", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPredicate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPredicate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "Predicate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "Predicate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPredicate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_FieldMatcherValidationError{ field: "Predicate", @@ -962,13 +1804,36 @@ func (m *Matcher_MatcherList_FieldMatcher) Validate() error { } if m.GetOnMatch() == nil { - return Matcher_MatcherList_FieldMatcherValidationError{ + err := Matcher_MatcherList_FieldMatcherValidationError{ field: "OnMatch", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOnMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_FieldMatcherValidationError{ field: "OnMatch", @@ -978,9 +1843,31 @@ func (m *Matcher_MatcherList_FieldMatcher) Validate() error { } } + if len(errors) > 0 { + return Matcher_MatcherList_FieldMatcherMultiError(errors) + } + return nil } +// Matcher_MatcherList_FieldMatcherMultiError is an error wrapping multiple +// validation errors returned by +// Matcher_MatcherList_FieldMatcher.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherList_FieldMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_FieldMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_FieldMatcherMultiError) AllErrors() []error { return m } + // Matcher_MatcherList_FieldMatcherValidationError is the validation error // returned by Matcher_MatcherList_FieldMatcher.Validate if the designated // constraints aren't met. @@ -1040,20 +1927,59 @@ var _ interface { // Validate checks the field values on // Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Matcher_MatcherList_Predicate_SinglePredicateMultiError, or nil if none found. +func (m *Matcher_MatcherList_Predicate_SinglePredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_Predicate_SinglePredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetInput() == nil { - return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ field: "Input", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInput()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ field: "Input", @@ -1067,7 +1993,26 @@ func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error { case *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch: - if v, ok := interface{}(m.GetValueMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValueMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "ValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "ValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValueMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ field: "ValueMatch", @@ -1079,7 +2024,26 @@ func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error { case *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch: - if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCustomMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ field: "CustomMatch", @@ -1090,16 +2054,42 @@ func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error { } default: - return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ field: "Matcher", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return Matcher_MatcherList_Predicate_SinglePredicateMultiError(errors) } return nil } +// Matcher_MatcherList_Predicate_SinglePredicateMultiError is an error wrapping +// multiple validation errors returned by +// Matcher_MatcherList_Predicate_SinglePredicate.ValidateAll() if the +// designated constraints aren't met. +type Matcher_MatcherList_Predicate_SinglePredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) AllErrors() []error { return m } + // Matcher_MatcherList_Predicate_SinglePredicateValidationError is the // validation error returned by // Matcher_MatcherList_Predicate_SinglePredicate.Validate if the designated @@ -1162,23 +2152,62 @@ var _ interface { // Validate checks the field values on // Matcher_MatcherList_Predicate_PredicateList with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Matcher_MatcherList_Predicate_PredicateList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Matcher_MatcherList_Predicate_PredicateList with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Matcher_MatcherList_Predicate_PredicateListMultiError, or nil if none found. +func (m *Matcher_MatcherList_Predicate_PredicateList) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_Predicate_PredicateList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPredicate()) < 2 { - return Matcher_MatcherList_Predicate_PredicateListValidationError{ + err := Matcher_MatcherList_Predicate_PredicateListValidationError{ field: "Predicate", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPredicate() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{ + field: fmt.Sprintf("Predicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{ + field: fmt.Sprintf("Predicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Matcher_MatcherList_Predicate_PredicateListValidationError{ field: fmt.Sprintf("Predicate[%v]", idx), @@ -1190,9 +2219,31 @@ func (m *Matcher_MatcherList_Predicate_PredicateList) Validate() error { } + if len(errors) > 0 { + return Matcher_MatcherList_Predicate_PredicateListMultiError(errors) + } + return nil } +// Matcher_MatcherList_Predicate_PredicateListMultiError is an error wrapping +// multiple validation errors returned by +// Matcher_MatcherList_Predicate_PredicateList.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherList_Predicate_PredicateListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_Predicate_PredicateListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_Predicate_PredicateListMultiError) AllErrors() []error { return m } + // Matcher_MatcherList_Predicate_PredicateListValidationError is the validation // error returned by Matcher_MatcherList_Predicate_PredicateList.Validate if // the designated constraints aren't met. @@ -1252,39 +2303,107 @@ var _ interface { // Validate checks the field values on Matcher_MatcherTree_MatchMap with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Matcher_MatcherTree_MatchMap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherTree_MatchMap with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Matcher_MatcherTree_MatchMapMultiError, or nil if none found. +func (m *Matcher_MatcherTree_MatchMap) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherTree_MatchMap) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetMap()) < 1 { - return Matcher_MatcherTree_MatchMapValidationError{ + err := Matcher_MatcherTree_MatchMapValidationError{ field: "Map", reason: "value must contain at least 1 pair(s)", } + if !all { + return err + } + errors = append(errors, err) } - for key, val := range m.GetMap() { - _ = val - - // no validation rules for Map[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherTree_MatchMapValidationError{ - field: fmt.Sprintf("Map[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetMap())) + i := 0 + for key := range m.GetMap() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetMap()[key] + _ = val + + // no validation rules for Map[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{ + field: fmt.Sprintf("Map[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{ + field: fmt.Sprintf("Map[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherTree_MatchMapValidationError{ + field: fmt.Sprintf("Map[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return Matcher_MatcherTree_MatchMapMultiError(errors) } return nil } +// Matcher_MatcherTree_MatchMapMultiError is an error wrapping multiple +// validation errors returned by Matcher_MatcherTree_MatchMap.ValidateAll() if +// the designated constraints aren't met. +type Matcher_MatcherTree_MatchMapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherTree_MatchMapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherTree_MatchMapMultiError) AllErrors() []error { return m } + // Matcher_MatcherTree_MatchMapValidationError is the validation error returned // by Matcher_MatcherTree_MatchMap.Validate if the designated constraints // aren't met. @@ -1344,23 +2463,60 @@ var _ interface { // Validate checks the field values on MatchPredicate_MatchSet with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MatchPredicate_MatchSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate_MatchSet with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MatchPredicate_MatchSetMultiError, or nil if none found. +func (m *MatchPredicate_MatchSet) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate_MatchSet) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRules()) < 2 { - return MatchPredicate_MatchSetValidationError{ + err := MatchPredicate_MatchSetValidationError{ field: "Rules", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicate_MatchSetValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -1372,9 +2528,30 @@ func (m *MatchPredicate_MatchSet) Validate() error { } + if len(errors) > 0 { + return MatchPredicate_MatchSetMultiError(errors) + } + return nil } +// MatchPredicate_MatchSetMultiError is an error wrapping multiple validation +// errors returned by MatchPredicate_MatchSet.ValidateAll() if the designated +// constraints aren't met. +type MatchPredicate_MatchSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicate_MatchSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicate_MatchSetMultiError) AllErrors() []error { return m } + // MatchPredicate_MatchSetValidationError is the validation error returned by // MatchPredicate_MatchSet.Validate if the designated constraints aren't met. type MatchPredicate_MatchSetValidationError struct { @@ -1433,43 +2610,92 @@ var _ interface { // Validate checks the field values on HttpGenericBodyMatch_GenericTextMatch // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *HttpGenericBodyMatch_GenericTextMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch_GenericTextMatch +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// HttpGenericBodyMatch_GenericTextMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch_GenericTextMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch_GenericTextMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *HttpGenericBodyMatch_GenericTextMatch_StringMatch: if utf8.RuneCountInString(m.GetStringMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ field: "StringMatch", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch: if len(m.GetBinaryMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ field: "BinaryMatch", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } default: - return HttpGenericBodyMatch_GenericTextMatchValidationError{ + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return HttpGenericBodyMatch_GenericTextMatchMultiError(errors) + } + return nil } +// HttpGenericBodyMatch_GenericTextMatchMultiError is an error wrapping +// multiple validation errors returned by +// HttpGenericBodyMatch_GenericTextMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatch_GenericTextMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) AllErrors() []error { return m } + // HttpGenericBodyMatch_GenericTextMatchValidationError is the validation error // returned by HttpGenericBodyMatch_GenericTextMatch.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/common/matcher/v4alpha/matcher.pb.go b/pkg/api/envoy/config/common/matcher/v4alpha/matcher.pb.go deleted file mode 100644 index 78245b3ad7..0000000000 --- a/pkg/api/envoy/config/common/matcher/v4alpha/matcher.pb.go +++ /dev/null @@ -1,1816 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/common/matcher/v4alpha/matcher.proto - -package envoy_config_common_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A matcher, which may traverse a matching tree in order to result in a match action. -// During matching, the tree will be traversed until a match is found, or if no match -// is found the action specified by the most specific on_no_match will be evaluated. -// As an on_no_match might result in another matching tree being evaluated, this process -// might repeat several times until the final OnMatch (or no match) is decided. -// -// This API is a work in progress. -type Matcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatcherType: - // *Matcher_MatcherList_ - // *Matcher_MatcherTree_ - MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` - // Optional OnMatch to use if the matcher failed. - // If specified, the OnMatch is used, and the matcher is considered - // to have matched. - // If not specified, the matcher is considered not to have matched. - OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"` -} - -func (x *Matcher) Reset() { - *x = Matcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher) ProtoMessage() {} - -func (x *Matcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher.ProtoReflect.Descriptor instead. -func (*Matcher) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0} -} - -func (m *Matcher) GetMatcherType() isMatcher_MatcherType { - if m != nil { - return m.MatcherType - } - return nil -} - -func (x *Matcher) GetMatcherList() *Matcher_MatcherList { - if x, ok := x.GetMatcherType().(*Matcher_MatcherList_); ok { - return x.MatcherList - } - return nil -} - -func (x *Matcher) GetMatcherTree() *Matcher_MatcherTree { - if x, ok := x.GetMatcherType().(*Matcher_MatcherTree_); ok { - return x.MatcherTree - } - return nil -} - -func (x *Matcher) GetOnNoMatch() *Matcher_OnMatch { - if x != nil { - return x.OnNoMatch - } - return nil -} - -type isMatcher_MatcherType interface { - isMatcher_MatcherType() -} - -type Matcher_MatcherList_ struct { - // A linear list of matchers to evaluate. - MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"` -} - -type Matcher_MatcherTree_ struct { - // A match tree to evaluate. - MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"` -} - -func (*Matcher_MatcherList_) isMatcher_MatcherType() {} - -func (*Matcher_MatcherTree_) isMatcher_MatcherType() {} - -// Match configuration. This is a recursive structure which allows complex nested match -// configurations to be built using various logical operators. -// [#next-free-field: 11] -type MatchPredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *MatchPredicate_OrMatch - // *MatchPredicate_AndMatch - // *MatchPredicate_NotMatch - // *MatchPredicate_AnyMatch - // *MatchPredicate_HttpRequestHeadersMatch - // *MatchPredicate_HttpRequestTrailersMatch - // *MatchPredicate_HttpResponseHeadersMatch - // *MatchPredicate_HttpResponseTrailersMatch - // *MatchPredicate_HttpRequestGenericBodyMatch - // *MatchPredicate_HttpResponseGenericBodyMatch - Rule isMatchPredicate_Rule `protobuf_oneof:"rule"` -} - -func (x *MatchPredicate) Reset() { - *x = MatchPredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MatchPredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MatchPredicate) ProtoMessage() {} - -func (x *MatchPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MatchPredicate.ProtoReflect.Descriptor instead. -func (*MatchPredicate) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{1} -} - -func (m *MatchPredicate) GetRule() isMatchPredicate_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *MatchPredicate) GetOrMatch() *MatchPredicate_MatchSet { - if x, ok := x.GetRule().(*MatchPredicate_OrMatch); ok { - return x.OrMatch - } - return nil -} - -func (x *MatchPredicate) GetAndMatch() *MatchPredicate_MatchSet { - if x, ok := x.GetRule().(*MatchPredicate_AndMatch); ok { - return x.AndMatch - } - return nil -} - -func (x *MatchPredicate) GetNotMatch() *MatchPredicate { - if x, ok := x.GetRule().(*MatchPredicate_NotMatch); ok { - return x.NotMatch - } - return nil -} - -func (x *MatchPredicate) GetAnyMatch() bool { - if x, ok := x.GetRule().(*MatchPredicate_AnyMatch); ok { - return x.AnyMatch - } - return false -} - -func (x *MatchPredicate) GetHttpRequestHeadersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpRequestHeadersMatch); ok { - return x.HttpRequestHeadersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpRequestTrailersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpRequestTrailersMatch); ok { - return x.HttpRequestTrailersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpResponseHeadersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpResponseHeadersMatch); ok { - return x.HttpResponseHeadersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpResponseTrailersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpResponseTrailersMatch); ok { - return x.HttpResponseTrailersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpRequestGenericBodyMatch() *HttpGenericBodyMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpRequestGenericBodyMatch); ok { - return x.HttpRequestGenericBodyMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpResponseGenericBodyMatch() *HttpGenericBodyMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpResponseGenericBodyMatch); ok { - return x.HttpResponseGenericBodyMatch - } - return nil -} - -type isMatchPredicate_Rule interface { - isMatchPredicate_Rule() -} - -type MatchPredicate_OrMatch struct { - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - OrMatch *MatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"` -} - -type MatchPredicate_AndMatch struct { - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - AndMatch *MatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"` -} - -type MatchPredicate_NotMatch struct { - // A negation match. The match configuration will match if the negated match condition matches. - NotMatch *MatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"` -} - -type MatchPredicate_AnyMatch struct { - // The match configuration will always match. - AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"` -} - -type MatchPredicate_HttpRequestHeadersMatch struct { - // HTTP request headers match configuration. - HttpRequestHeadersMatch *HttpHeadersMatch `protobuf:"bytes,5,opt,name=http_request_headers_match,json=httpRequestHeadersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpRequestTrailersMatch struct { - // HTTP request trailers match configuration. - HttpRequestTrailersMatch *HttpHeadersMatch `protobuf:"bytes,6,opt,name=http_request_trailers_match,json=httpRequestTrailersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpResponseHeadersMatch struct { - // HTTP response headers match configuration. - HttpResponseHeadersMatch *HttpHeadersMatch `protobuf:"bytes,7,opt,name=http_response_headers_match,json=httpResponseHeadersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpResponseTrailersMatch struct { - // HTTP response trailers match configuration. - HttpResponseTrailersMatch *HttpHeadersMatch `protobuf:"bytes,8,opt,name=http_response_trailers_match,json=httpResponseTrailersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpRequestGenericBodyMatch struct { - // HTTP request generic body match configuration. - HttpRequestGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,9,opt,name=http_request_generic_body_match,json=httpRequestGenericBodyMatch,proto3,oneof"` -} - -type MatchPredicate_HttpResponseGenericBodyMatch struct { - // HTTP response generic body match configuration. - HttpResponseGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,10,opt,name=http_response_generic_body_match,json=httpResponseGenericBodyMatch,proto3,oneof"` -} - -func (*MatchPredicate_OrMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_AndMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_NotMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_AnyMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpRequestHeadersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpRequestTrailersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpResponseHeadersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpResponseTrailersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpRequestGenericBodyMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpResponseGenericBodyMatch) isMatchPredicate_Rule() {} - -// HTTP headers match configuration. -type HttpHeadersMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // HTTP headers to match. - Headers []*v4alpha.HeaderMatcher `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *HttpHeadersMatch) Reset() { - *x = HttpHeadersMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpHeadersMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpHeadersMatch) ProtoMessage() {} - -func (x *HttpHeadersMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpHeadersMatch.ProtoReflect.Descriptor instead. -func (*HttpHeadersMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{2} -} - -func (x *HttpHeadersMatch) GetHeaders() []*v4alpha.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -// HTTP generic body match configuration. -// List of text strings and hex strings to be located in HTTP body. -// All specified strings must be found in the HTTP body for positive match. -// The search may be limited to specified number of bytes from the body start. -// -// .. attention:: -// -// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. -// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified -// to scan only part of the http body. -type HttpGenericBodyMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). - BytesLimit uint32 `protobuf:"varint,1,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"` - // List of patterns to match. - Patterns []*HttpGenericBodyMatch_GenericTextMatch `protobuf:"bytes,2,rep,name=patterns,proto3" json:"patterns,omitempty"` -} - -func (x *HttpGenericBodyMatch) Reset() { - *x = HttpGenericBodyMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpGenericBodyMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpGenericBodyMatch) ProtoMessage() {} - -func (x *HttpGenericBodyMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpGenericBodyMatch.ProtoReflect.Descriptor instead. -func (*HttpGenericBodyMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{3} -} - -func (x *HttpGenericBodyMatch) GetBytesLimit() uint32 { - if x != nil { - return x.BytesLimit - } - return 0 -} - -func (x *HttpGenericBodyMatch) GetPatterns() []*HttpGenericBodyMatch_GenericTextMatch { - if x != nil { - return x.Patterns - } - return nil -} - -// What to do if a match is successful. -type Matcher_OnMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to OnMatch: - // *Matcher_OnMatch_Matcher - // *Matcher_OnMatch_Action - OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` -} - -func (x *Matcher_OnMatch) Reset() { - *x = Matcher_OnMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_OnMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_OnMatch) ProtoMessage() {} - -func (x *Matcher_OnMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_OnMatch.ProtoReflect.Descriptor instead. -func (*Matcher_OnMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *Matcher_OnMatch) GetOnMatch() isMatcher_OnMatch_OnMatch { - if m != nil { - return m.OnMatch - } - return nil -} - -func (x *Matcher_OnMatch) GetMatcher() *Matcher { - if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Matcher); ok { - return x.Matcher - } - return nil -} - -func (x *Matcher_OnMatch) GetAction() *v4alpha1.TypedExtensionConfig { - if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Action); ok { - return x.Action - } - return nil -} - -type isMatcher_OnMatch_OnMatch interface { - isMatcher_OnMatch_OnMatch() -} - -type Matcher_OnMatch_Matcher struct { - // Nested matcher to evaluate. - // If the nested matcher does not match and does not specify - // on_no_match, then this matcher is considered not to have - // matched, even if a predicate at this level or above returned - // true. - Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"` -} - -type Matcher_OnMatch_Action struct { - // Protocol-specific action to take. - Action *v4alpha1.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"` -} - -func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {} - -func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {} - -// A linear list of field matchers. -// The field matchers are evaluated in order, and the first match -// wins. -type Matcher_MatcherList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of matchers. First match wins. - Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"` -} - -func (x *Matcher_MatcherList) Reset() { - *x = Matcher_MatcherList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList) ProtoMessage() {} - -func (x *Matcher_MatcherList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher { - if x != nil { - return x.Matchers - } - return nil -} - -type Matcher_MatcherTree struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Protocol-specific specification of input field to match on. - Input *v4alpha1.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - // Exact or prefix match maps in which to look up the input value. - // If the lookup succeeds, the match is considered successful, and - // the corresponding OnMatch is used. - // - // Types that are assignable to TreeType: - // *Matcher_MatcherTree_ExactMatchMap - // *Matcher_MatcherTree_PrefixMatchMap - // *Matcher_MatcherTree_CustomMatch - TreeType isMatcher_MatcherTree_TreeType `protobuf_oneof:"tree_type"` -} - -func (x *Matcher_MatcherTree) Reset() { - *x = Matcher_MatcherTree{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherTree) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherTree) ProtoMessage() {} - -func (x *Matcher_MatcherTree) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherTree.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherTree) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *Matcher_MatcherTree) GetInput() *v4alpha1.TypedExtensionConfig { - if x != nil { - return x.Input - } - return nil -} - -func (m *Matcher_MatcherTree) GetTreeType() isMatcher_MatcherTree_TreeType { - if m != nil { - return m.TreeType - } - return nil -} - -func (x *Matcher_MatcherTree) GetExactMatchMap() *Matcher_MatcherTree_MatchMap { - if x, ok := x.GetTreeType().(*Matcher_MatcherTree_ExactMatchMap); ok { - return x.ExactMatchMap - } - return nil -} - -func (x *Matcher_MatcherTree) GetPrefixMatchMap() *Matcher_MatcherTree_MatchMap { - if x, ok := x.GetTreeType().(*Matcher_MatcherTree_PrefixMatchMap); ok { - return x.PrefixMatchMap - } - return nil -} - -func (x *Matcher_MatcherTree) GetCustomMatch() *v4alpha1.TypedExtensionConfig { - if x, ok := x.GetTreeType().(*Matcher_MatcherTree_CustomMatch); ok { - return x.CustomMatch - } - return nil -} - -type isMatcher_MatcherTree_TreeType interface { - isMatcher_MatcherTree_TreeType() -} - -type Matcher_MatcherTree_ExactMatchMap struct { - ExactMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,2,opt,name=exact_match_map,json=exactMatchMap,proto3,oneof"` -} - -type Matcher_MatcherTree_PrefixMatchMap struct { - // Longest matching prefix wins. - PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"` -} - -type Matcher_MatcherTree_CustomMatch struct { - // Extension for custom matching logic. - CustomMatch *v4alpha1.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"` -} - -func (*Matcher_MatcherTree_ExactMatchMap) isMatcher_MatcherTree_TreeType() {} - -func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {} - -func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {} - -// Predicate to determine if a match is successful. -type Matcher_MatcherList_Predicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchType: - // *Matcher_MatcherList_Predicate_SinglePredicate_ - // *Matcher_MatcherList_Predicate_OrMatcher - // *Matcher_MatcherList_Predicate_AndMatcher - MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"` -} - -func (x *Matcher_MatcherList_Predicate) Reset() { - *x = Matcher_MatcherList_Predicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_Predicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_Predicate) ProtoMessage() {} - -func (x *Matcher_MatcherList_Predicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_Predicate.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_Predicate) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 1, 0} -} - -func (m *Matcher_MatcherList_Predicate) GetMatchType() isMatcher_MatcherList_Predicate_MatchType { - if m != nil { - return m.MatchType - } - return nil -} - -func (x *Matcher_MatcherList_Predicate) GetSinglePredicate() *Matcher_MatcherList_Predicate_SinglePredicate { - if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_SinglePredicate_); ok { - return x.SinglePredicate - } - return nil -} - -func (x *Matcher_MatcherList_Predicate) GetOrMatcher() *Matcher_MatcherList_Predicate_PredicateList { - if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_OrMatcher); ok { - return x.OrMatcher - } - return nil -} - -func (x *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Predicate_PredicateList { - if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_AndMatcher); ok { - return x.AndMatcher - } - return nil -} - -type isMatcher_MatcherList_Predicate_MatchType interface { - isMatcher_MatcherList_Predicate_MatchType() -} - -type Matcher_MatcherList_Predicate_SinglePredicate_ struct { - // A single predicate to evaluate. - SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"` -} - -type Matcher_MatcherList_Predicate_OrMatcher struct { - // A list of predicates to be OR-ed together. - OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"` -} - -type Matcher_MatcherList_Predicate_AndMatcher struct { - // A list of predicates to be AND-ed together. - AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"` -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {} - -func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {} - -func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {} - -// An individual matcher. -type Matcher_MatcherList_FieldMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Determines if the match succeeds. - Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"` - // What to do if the match succeeds. - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` -} - -func (x *Matcher_MatcherList_FieldMatcher) Reset() { - *x = Matcher_MatcherList_FieldMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_FieldMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_FieldMatcher) ProtoMessage() {} - -func (x *Matcher_MatcherList_FieldMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_FieldMatcher.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_FieldMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 1, 1} -} - -func (x *Matcher_MatcherList_FieldMatcher) GetPredicate() *Matcher_MatcherList_Predicate { - if x != nil { - return x.Predicate - } - return nil -} - -func (x *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch { - if x != nil { - return x.OnMatch - } - return nil -} - -// Predicate for a single input field. -type Matcher_MatcherList_Predicate_SinglePredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Protocol-specific specification of input field to match on. - Input *v4alpha1.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - // Types that are assignable to Matcher: - // *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch - // *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch - Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"` -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) Reset() { - *x = Matcher_MatcherList_Predicate_SinglePredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate) ProtoMessage() {} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_Predicate_SinglePredicate.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_Predicate_SinglePredicate) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 0} -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetInput() *v4alpha1.TypedExtensionConfig { - if x != nil { - return x.Input - } - return nil -} - -func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetMatcher() isMatcher_MatcherList_Predicate_SinglePredicate_Matcher { - if m != nil { - return m.Matcher - } - return nil -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetValueMatch() *v4alpha2.StringMatcher { - if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch); ok { - return x.ValueMatch - } - return nil -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetCustomMatch() *v4alpha1.TypedExtensionConfig { - if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch); ok { - return x.CustomMatch - } - return nil -} - -type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface { - isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() -} - -type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct { - // Built-in string matcher. - ValueMatch *v4alpha2.StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"` -} - -type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct { - // Extension for custom matching logic. - CustomMatch *v4alpha1.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"` -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { -} - -// A list of two or more matchers. Used to allow using a list within a oneof. -type Matcher_MatcherList_Predicate_PredicateList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"` -} - -func (x *Matcher_MatcherList_Predicate_PredicateList) Reset() { - *x = Matcher_MatcherList_Predicate_PredicateList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_Predicate_PredicateList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_Predicate_PredicateList) ProtoMessage() {} - -func (x *Matcher_MatcherList_Predicate_PredicateList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_Predicate_PredicateList.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_Predicate_PredicateList) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 1} -} - -func (x *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_MatcherList_Predicate { - if x != nil { - return x.Predicate - } - return nil -} - -// A map of configured matchers. Used to allow using a map within a oneof. -type Matcher_MatcherTree_MatchMap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Map map[string]*Matcher_OnMatch `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Matcher_MatcherTree_MatchMap) Reset() { - *x = Matcher_MatcherTree_MatchMap{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherTree_MatchMap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherTree_MatchMap) ProtoMessage() {} - -func (x *Matcher_MatcherTree_MatchMap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherTree_MatchMap.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherTree_MatchMap) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{0, 2, 0} -} - -func (x *Matcher_MatcherTree_MatchMap) GetMap() map[string]*Matcher_OnMatch { - if x != nil { - return x.Map - } - return nil -} - -// A set of match configurations used for logical operations. -type MatchPredicate_MatchSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of rules that make up the set. - Rules []*MatchPredicate `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *MatchPredicate_MatchSet) Reset() { - *x = MatchPredicate_MatchSet{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MatchPredicate_MatchSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MatchPredicate_MatchSet) ProtoMessage() {} - -func (x *MatchPredicate_MatchSet) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MatchPredicate_MatchSet.ProtoReflect.Descriptor instead. -func (*MatchPredicate_MatchSet) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *MatchPredicate_MatchSet) GetRules() []*MatchPredicate { - if x != nil { - return x.Rules - } - return nil -} - -type HttpGenericBodyMatch_GenericTextMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *HttpGenericBodyMatch_GenericTextMatch_StringMatch - // *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch - Rule isHttpGenericBodyMatch_GenericTextMatch_Rule `protobuf_oneof:"rule"` -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) Reset() { - *x = HttpGenericBodyMatch_GenericTextMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpGenericBodyMatch_GenericTextMatch) ProtoMessage() {} - -func (x *HttpGenericBodyMatch_GenericTextMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpGenericBodyMatch_GenericTextMatch.ProtoReflect.Descriptor instead. -func (*HttpGenericBodyMatch_GenericTextMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP(), []int{3, 0} -} - -func (m *HttpGenericBodyMatch_GenericTextMatch) GetRule() isHttpGenericBodyMatch_GenericTextMatch_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) GetStringMatch() string { - if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_StringMatch); ok { - return x.StringMatch - } - return "" -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) GetBinaryMatch() []byte { - if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch); ok { - return x.BinaryMatch - } - return nil -} - -type isHttpGenericBodyMatch_GenericTextMatch_Rule interface { - isHttpGenericBodyMatch_GenericTextMatch_Rule() -} - -type HttpGenericBodyMatch_GenericTextMatch_StringMatch struct { - // Text string to be located in HTTP body. - StringMatch string `protobuf:"bytes,1,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -type HttpGenericBodyMatch_GenericTextMatch_BinaryMatch struct { - // Sequence of bytes to be located in HTTP body. - BinaryMatch []byte `protobuf:"bytes,2,opt,name=binary_match,json=binaryMatch,proto3,oneof"` -} - -func (*HttpGenericBodyMatch_GenericTextMatch_StringMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { -} - -func (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { -} - -var File_envoy_config_common_matcher_v4alpha_matcher_proto protoreflect.FileDescriptor - -var file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDesc = []byte{ - 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x16, 0x0a, 0x07, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5d, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x54, 0x72, 0x65, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, - 0x09, 0x6f, 0x6e, 0x4e, 0x6f, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xe6, 0x01, 0x0a, 0x07, 0x4f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x49, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x48, 0x00, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x35, 0x9a, 0xc5, 0x88, - 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x1a, 0xe3, 0x0b, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, - 0x1a, 0x8b, 0x08, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x7f, - 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, - 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, - 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, - 0x71, 0x0a, 0x0a, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x12, 0x73, 0x0a, 0x0b, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x6e, 0x64, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0xeb, 0x02, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x05, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x0b, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x54, 0x0a, 0x0c, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x3a, 0x53, 0x9a, 0xc5, 0x88, 0x1e, 0x4e, 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0e, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xce, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x3a, 0x51, 0x9a, 0xc5, 0x88, 0x1e, 0x4c, 0x0a, 0x4a, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0a, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x9d, - 0x02, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x6a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x3a, 0x39, - 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x84, 0x06, 0x0a, 0x0b, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x4f, 0x0a, 0x05, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x6b, 0x0a, 0x0f, 0x65, 0x78, - 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x6d, 0x0a, 0x10, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x54, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, - 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xa4, 0x02, 0x0a, - 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x66, 0x0a, 0x03, 0x6d, 0x61, 0x70, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x9a, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x6d, 0x61, - 0x70, 0x1a, 0x6c, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x4a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x4d, 0x61, 0x70, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x42, 0x10, - 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, - 0x13, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x22, 0x92, 0x0a, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x5b, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x52, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, - 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x74, 0x0a, 0x1a, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x76, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, - 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, - 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x76, 0x0a, 0x1b, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x78, 0x0a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, - 0x52, 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, - 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x81, 0x01, 0x0a, 0x1f, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x48, 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x83, 0x01, 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x9e, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x65, 0x74, 0x12, 0x53, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, - 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x04, - 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x8f, 0x01, 0x0a, 0x10, 0x48, 0x74, - 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, - 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xb0, 0x03, 0x0a, 0x14, - 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x70, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x1a, 0xc8, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x62, 0x69, - 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, - 0x61, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x4b, 0x9a, 0xc5, 0x88, 0x1e, 0x46, 0x0a, - 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x4b, - 0x0a, 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescOnce sync.Once - file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescData = file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDesc -) - -func file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescGZIP() []byte { - file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescOnce.Do(func() { - file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescData) - }) - return file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDescData -} - -var file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_envoy_config_common_matcher_v4alpha_matcher_proto_goTypes = []interface{}{ - (*Matcher)(nil), // 0: envoy.config.common.matcher.v4alpha.Matcher - (*MatchPredicate)(nil), // 1: envoy.config.common.matcher.v4alpha.MatchPredicate - (*HttpHeadersMatch)(nil), // 2: envoy.config.common.matcher.v4alpha.HttpHeadersMatch - (*HttpGenericBodyMatch)(nil), // 3: envoy.config.common.matcher.v4alpha.HttpGenericBodyMatch - (*Matcher_OnMatch)(nil), // 4: envoy.config.common.matcher.v4alpha.Matcher.OnMatch - (*Matcher_MatcherList)(nil), // 5: envoy.config.common.matcher.v4alpha.Matcher.MatcherList - (*Matcher_MatcherTree)(nil), // 6: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree - (*Matcher_MatcherList_Predicate)(nil), // 7: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate - (*Matcher_MatcherList_FieldMatcher)(nil), // 8: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.FieldMatcher - (*Matcher_MatcherList_Predicate_SinglePredicate)(nil), // 9: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.SinglePredicate - (*Matcher_MatcherList_Predicate_PredicateList)(nil), // 10: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.PredicateList - (*Matcher_MatcherTree_MatchMap)(nil), // 11: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.MatchMap - nil, // 12: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.MatchMap.MapEntry - (*MatchPredicate_MatchSet)(nil), // 13: envoy.config.common.matcher.v4alpha.MatchPredicate.MatchSet - (*HttpGenericBodyMatch_GenericTextMatch)(nil), // 14: envoy.config.common.matcher.v4alpha.HttpGenericBodyMatch.GenericTextMatch - (*v4alpha.HeaderMatcher)(nil), // 15: envoy.config.route.v4alpha.HeaderMatcher - (*v4alpha1.TypedExtensionConfig)(nil), // 16: envoy.config.core.v4alpha.TypedExtensionConfig - (*v4alpha2.StringMatcher)(nil), // 17: envoy.type.matcher.v4alpha.StringMatcher -} -var file_envoy_config_common_matcher_v4alpha_matcher_proto_depIdxs = []int32{ - 5, // 0: envoy.config.common.matcher.v4alpha.Matcher.matcher_list:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherList - 6, // 1: envoy.config.common.matcher.v4alpha.Matcher.matcher_tree:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherTree - 4, // 2: envoy.config.common.matcher.v4alpha.Matcher.on_no_match:type_name -> envoy.config.common.matcher.v4alpha.Matcher.OnMatch - 13, // 3: envoy.config.common.matcher.v4alpha.MatchPredicate.or_match:type_name -> envoy.config.common.matcher.v4alpha.MatchPredicate.MatchSet - 13, // 4: envoy.config.common.matcher.v4alpha.MatchPredicate.and_match:type_name -> envoy.config.common.matcher.v4alpha.MatchPredicate.MatchSet - 1, // 5: envoy.config.common.matcher.v4alpha.MatchPredicate.not_match:type_name -> envoy.config.common.matcher.v4alpha.MatchPredicate - 2, // 6: envoy.config.common.matcher.v4alpha.MatchPredicate.http_request_headers_match:type_name -> envoy.config.common.matcher.v4alpha.HttpHeadersMatch - 2, // 7: envoy.config.common.matcher.v4alpha.MatchPredicate.http_request_trailers_match:type_name -> envoy.config.common.matcher.v4alpha.HttpHeadersMatch - 2, // 8: envoy.config.common.matcher.v4alpha.MatchPredicate.http_response_headers_match:type_name -> envoy.config.common.matcher.v4alpha.HttpHeadersMatch - 2, // 9: envoy.config.common.matcher.v4alpha.MatchPredicate.http_response_trailers_match:type_name -> envoy.config.common.matcher.v4alpha.HttpHeadersMatch - 3, // 10: envoy.config.common.matcher.v4alpha.MatchPredicate.http_request_generic_body_match:type_name -> envoy.config.common.matcher.v4alpha.HttpGenericBodyMatch - 3, // 11: envoy.config.common.matcher.v4alpha.MatchPredicate.http_response_generic_body_match:type_name -> envoy.config.common.matcher.v4alpha.HttpGenericBodyMatch - 15, // 12: envoy.config.common.matcher.v4alpha.HttpHeadersMatch.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 14, // 13: envoy.config.common.matcher.v4alpha.HttpGenericBodyMatch.patterns:type_name -> envoy.config.common.matcher.v4alpha.HttpGenericBodyMatch.GenericTextMatch - 0, // 14: envoy.config.common.matcher.v4alpha.Matcher.OnMatch.matcher:type_name -> envoy.config.common.matcher.v4alpha.Matcher - 16, // 15: envoy.config.common.matcher.v4alpha.Matcher.OnMatch.action:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 8, // 16: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.matchers:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherList.FieldMatcher - 16, // 17: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.input:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 11, // 18: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.exact_match_map:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.MatchMap - 11, // 19: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.prefix_match_map:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.MatchMap - 16, // 20: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.custom_match:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 9, // 21: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.single_predicate:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.SinglePredicate - 10, // 22: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.or_matcher:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.PredicateList - 10, // 23: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.and_matcher:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.PredicateList - 7, // 24: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.FieldMatcher.predicate:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate - 4, // 25: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.FieldMatcher.on_match:type_name -> envoy.config.common.matcher.v4alpha.Matcher.OnMatch - 16, // 26: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.SinglePredicate.input:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 17, // 27: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.SinglePredicate.value_match:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 16, // 28: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.SinglePredicate.custom_match:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 7, // 29: envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate.PredicateList.predicate:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherList.Predicate - 12, // 30: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.MatchMap.map:type_name -> envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.MatchMap.MapEntry - 4, // 31: envoy.config.common.matcher.v4alpha.Matcher.MatcherTree.MatchMap.MapEntry.value:type_name -> envoy.config.common.matcher.v4alpha.Matcher.OnMatch - 1, // 32: envoy.config.common.matcher.v4alpha.MatchPredicate.MatchSet.rules:type_name -> envoy.config.common.matcher.v4alpha.MatchPredicate - 33, // [33:33] is the sub-list for method output_type - 33, // [33:33] is the sub-list for method input_type - 33, // [33:33] is the sub-list for extension type_name - 33, // [33:33] is the sub-list for extension extendee - 0, // [0:33] is the sub-list for field type_name -} - -func init() { file_envoy_config_common_matcher_v4alpha_matcher_proto_init() } -func file_envoy_config_common_matcher_v4alpha_matcher_proto_init() { - if File_envoy_config_common_matcher_v4alpha_matcher_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchPredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpHeadersMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpGenericBodyMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_OnMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherTree); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_Predicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_FieldMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_Predicate_SinglePredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_Predicate_PredicateList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherTree_MatchMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchPredicate_MatchSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpGenericBodyMatch_GenericTextMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Matcher_MatcherList_)(nil), - (*Matcher_MatcherTree_)(nil), - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*MatchPredicate_OrMatch)(nil), - (*MatchPredicate_AndMatch)(nil), - (*MatchPredicate_NotMatch)(nil), - (*MatchPredicate_AnyMatch)(nil), - (*MatchPredicate_HttpRequestHeadersMatch)(nil), - (*MatchPredicate_HttpRequestTrailersMatch)(nil), - (*MatchPredicate_HttpResponseHeadersMatch)(nil), - (*MatchPredicate_HttpResponseTrailersMatch)(nil), - (*MatchPredicate_HttpRequestGenericBodyMatch)(nil), - (*MatchPredicate_HttpResponseGenericBodyMatch)(nil), - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*Matcher_OnMatch_Matcher)(nil), - (*Matcher_OnMatch_Action)(nil), - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*Matcher_MatcherTree_ExactMatchMap)(nil), - (*Matcher_MatcherTree_PrefixMatchMap)(nil), - (*Matcher_MatcherTree_CustomMatch)(nil), - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*Matcher_MatcherList_Predicate_SinglePredicate_)(nil), - (*Matcher_MatcherList_Predicate_OrMatcher)(nil), - (*Matcher_MatcherList_Predicate_AndMatcher)(nil), - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[9].OneofWrappers = []interface{}{ - (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch)(nil), - (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch)(nil), - } - file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*HttpGenericBodyMatch_GenericTextMatch_StringMatch)(nil), - (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDesc, - NumEnums: 0, - NumMessages: 15, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_common_matcher_v4alpha_matcher_proto_goTypes, - DependencyIndexes: file_envoy_config_common_matcher_v4alpha_matcher_proto_depIdxs, - MessageInfos: file_envoy_config_common_matcher_v4alpha_matcher_proto_msgTypes, - }.Build() - File_envoy_config_common_matcher_v4alpha_matcher_proto = out.File - file_envoy_config_common_matcher_v4alpha_matcher_proto_rawDesc = nil - file_envoy_config_common_matcher_v4alpha_matcher_proto_goTypes = nil - file_envoy_config_common_matcher_v4alpha_matcher_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/common/mutation_rules/v3/mutation_rules.pb.go b/pkg/api/envoy/config/common/mutation_rules/v3/mutation_rules.pb.go new file mode 100644 index 0000000000..5495a2264d --- /dev/null +++ b/pkg/api/envoy/config/common/mutation_rules/v3/mutation_rules.pb.go @@ -0,0 +1,307 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/config/common/mutation_rules/v3/mutation_rules.proto + +package mutation_rulesv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The HeaderMutationRules structure specifies what headers may be +// manipulated by a processing filter. This set of rules makes it +// possible to control which modifications a filter may make. +// +// By default, an external processing server may add, modify, or remove +// any header except for an "Envoy internal" header (which is typically +// denoted by an x-envoy prefix) or specific headers that may affect +// further filter processing: +// +// * host +// * :authority +// * :scheme +// * :method +// +// Every attempt to add, change, append, or remove a header will be +// tested against the rules here. Disallowed header mutations will be +// ignored unless *disallow_is_error* is set to true. +// +// Attempts to remove headers are further constrained -- regardless of the +// settings, system-defined headers (that start with ":") and the "host" +// header may never be removed. +// +// In addition, a counter will be incremented whenever a mutation is +// rejected. In the ext_proc filter, that counter is named +// "rejected_header_mutations". +// [#next-free-field: 8] +type HeaderMutationRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // By default, certain headers that could affect processing of subsequent + // filters or request routing cannot be modified. These headers are + // "host", ":authority", ":scheme", and ":method". Setting this parameter + // to true allows these headers to be modified as well. + AllowAllRouting *wrappers.BoolValue `protobuf:"bytes,1,opt,name=allow_all_routing,json=allowAllRouting,proto3" json:"allow_all_routing,omitempty"` + // If true, allow modification of envoy internal headers. By default, these + // start with "x-envoy" but this may be overridden in the *Bootstrap* + // configuration using the + // :ref:`header_prefix ` + // field. Default is false. + AllowEnvoy *wrappers.BoolValue `protobuf:"bytes,2,opt,name=allow_envoy,json=allowEnvoy,proto3" json:"allow_envoy,omitempty"` + // If true, prevent modification of any system header, defined as a header + // that starts with a ":" character, regardless of any other settings. + // A processing server may still override the ":status" of an HTTP response + // using an *ImmediateResponse* message. Default is false. + DisallowSystem *wrappers.BoolValue `protobuf:"bytes,3,opt,name=disallow_system,json=disallowSystem,proto3" json:"disallow_system,omitempty"` + // If true, prevent modifications of all header values, regardless of any + // other settings. A processing server may still override the ":status" + // of an HTTP response using an *ImmediateResponse* message. Default is false. + DisallowAll *wrappers.BoolValue `protobuf:"bytes,4,opt,name=disallow_all,json=disallowAll,proto3" json:"disallow_all,omitempty"` + // If set, specifically allow any header that matches this regular + // expression. This overrides all other settings except for + // *disallow_expression*. + AllowExpression *v3.RegexMatcher `protobuf:"bytes,5,opt,name=allow_expression,json=allowExpression,proto3" json:"allow_expression,omitempty"` + // If set, specifically disallow any header that matches this regular + // expression regardless of any other settings. + DisallowExpression *v3.RegexMatcher `protobuf:"bytes,6,opt,name=disallow_expression,json=disallowExpression,proto3" json:"disallow_expression,omitempty"` + // If true, and if the rules in this list cause a header mutation to be + // disallowed, then the filter using this configuration will terminate the + // request with a 500 error. In addition, regardless of the setting of this + // parameter, any attempt to set, add, or modify a disallowed header will + // cause the "rejected_header_mutations" counter to be incremented. + // Default is false. + DisallowIsError *wrappers.BoolValue `protobuf:"bytes,7,opt,name=disallow_is_error,json=disallowIsError,proto3" json:"disallow_is_error,omitempty"` +} + +func (x *HeaderMutationRules) Reset() { + *x = HeaderMutationRules{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderMutationRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderMutationRules) ProtoMessage() {} + +func (x *HeaderMutationRules) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderMutationRules.ProtoReflect.Descriptor instead. +func (*HeaderMutationRules) Descriptor() ([]byte, []int) { + return file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescGZIP(), []int{0} +} + +func (x *HeaderMutationRules) GetAllowAllRouting() *wrappers.BoolValue { + if x != nil { + return x.AllowAllRouting + } + return nil +} + +func (x *HeaderMutationRules) GetAllowEnvoy() *wrappers.BoolValue { + if x != nil { + return x.AllowEnvoy + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowSystem() *wrappers.BoolValue { + if x != nil { + return x.DisallowSystem + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowAll() *wrappers.BoolValue { + if x != nil { + return x.DisallowAll + } + return nil +} + +func (x *HeaderMutationRules) GetAllowExpression() *v3.RegexMatcher { + if x != nil { + return x.AllowExpression + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowExpression() *v3.RegexMatcher { + if x != nil { + return x.DisallowExpression + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowIsError() *wrappers.BoolValue { + if x != nil { + return x.DisallowIsError + } + return nil +} + +var File_envoy_config_common_mutation_rules_v3_mutation_rules_proto protoreflect.FileDescriptor + +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x04, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x46, 0x0a, + 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6e, 0x76, + 0x6f, 0x79, 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x12, 0x4e, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, + 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x11, + 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x73, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x42, 0xb2, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x4d, 0x75, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, + 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, + 0x3b, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescOnce sync.Once + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData = file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc +) + +func file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescGZIP() []byte { + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescOnce.Do(func() { + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData) + }) + return file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData +} + +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_goTypes = []interface{}{ + (*HeaderMutationRules)(nil), // 0: envoy.config.common.mutation_rules.v3.HeaderMutationRules + (*wrappers.BoolValue)(nil), // 1: google.protobuf.BoolValue + (*v3.RegexMatcher)(nil), // 2: envoy.type.matcher.v3.RegexMatcher +} +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_depIdxs = []int32{ + 1, // 0: envoy.config.common.mutation_rules.v3.HeaderMutationRules.allow_all_routing:type_name -> google.protobuf.BoolValue + 1, // 1: envoy.config.common.mutation_rules.v3.HeaderMutationRules.allow_envoy:type_name -> google.protobuf.BoolValue + 1, // 2: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_system:type_name -> google.protobuf.BoolValue + 1, // 3: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_all:type_name -> google.protobuf.BoolValue + 2, // 4: envoy.config.common.mutation_rules.v3.HeaderMutationRules.allow_expression:type_name -> envoy.type.matcher.v3.RegexMatcher + 2, // 5: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_expression:type_name -> envoy.type.matcher.v3.RegexMatcher + 1, // 6: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_is_error:type_name -> google.protobuf.BoolValue + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_init() } +func file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_init() { + if File_envoy_config_common_mutation_rules_v3_mutation_rules_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderMutationRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_goTypes, + DependencyIndexes: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_depIdxs, + MessageInfos: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes, + }.Build() + File_envoy_config_common_mutation_rules_v3_mutation_rules_proto = out.File + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc = nil + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_goTypes = nil + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/config/common/mutation_rules/v3/mutation_rules.pb.validate.go b/pkg/api/envoy/config/common/mutation_rules/v3/mutation_rules.pb.validate.go new file mode 100644 index 0000000000..772d2061ef --- /dev/null +++ b/pkg/api/envoy/config/common/mutation_rules/v3/mutation_rules.pb.validate.go @@ -0,0 +1,341 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/common/mutation_rules/v3/mutation_rules.proto + +package mutation_rulesv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HeaderMutationRules with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HeaderMutationRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMutationRules with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HeaderMutationRulesMultiError, or nil if none found. +func (m *HeaderMutationRules) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMutationRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAllowAllRouting()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowAllRouting", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowAllRouting", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowAllRouting()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "AllowAllRouting", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAllowEnvoy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowEnvoy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowEnvoy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowEnvoy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "AllowEnvoy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowSystem()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowSystem", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowSystem", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowSystem()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowSystem", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowAll()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowAll", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowAll", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowAll()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowAll", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAllowExpression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowExpression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "AllowExpression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowExpression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowExpression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowExpression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowIsError()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowIsError", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowIsError", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowIsError()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowIsError", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HeaderMutationRulesMultiError(errors) + } + + return nil +} + +// HeaderMutationRulesMultiError is an error wrapping multiple validation +// errors returned by HeaderMutationRules.ValidateAll() if the designated +// constraints aren't met. +type HeaderMutationRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMutationRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMutationRulesMultiError) AllErrors() []error { return m } + +// HeaderMutationRulesValidationError is the validation error returned by +// HeaderMutationRules.Validate if the designated constraints aren't met. +type HeaderMutationRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderMutationRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderMutationRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderMutationRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderMutationRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderMutationRulesValidationError) ErrorName() string { + return "HeaderMutationRulesValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderMutationRulesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHeaderMutationRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderMutationRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderMutationRulesValidationError{} diff --git a/pkg/api/envoy/config/common/tap/v2alpha/common.pb.go b/pkg/api/envoy/config/common/tap/v2alpha/common.pb.go index 1ece582a20..8c1a5f5b46 100644 --- a/pkg/api/envoy/config/common/tap/v2alpha/common.pb.go +++ b/pkg/api/envoy/config/common/tap/v2alpha/common.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/common/tap/v2alpha/common.proto -package envoy_config_common_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/tap/v2alpha" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Common configuration for all tap extensions. type CommonExtensionConfig struct { state protoimpl.MessageState @@ -195,14 +190,19 @@ var file_envoy_config_common_tap_v2alpha_common_proto_rawDesc = []byte{ 0x0b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x49, 0x64, 0x42, 0x6c, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x20, 0x12, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x64, 0x42, 0xb4, 0x01, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x74, 0x61, 0x70, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x20, 0x12, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/common/tap/v2alpha/common.pb.validate.go b/pkg/api/envoy/config/common/tap/v2alpha/common.pb.validate.go index 204eb2e5f1..a32918960c 100644 --- a/pkg/api/envoy/config/common/tap/v2alpha/common.pb.validate.go +++ b/pkg/api/envoy/config/common/tap/v2alpha/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/common/tap/v2alpha/common.proto -package envoy_config_common_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CommonExtensionConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommonExtensionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonExtensionConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonExtensionConfigMultiError, or nil if none found. +func (m *CommonExtensionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonExtensionConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ConfigType.(type) { case *CommonExtensionConfig_AdminConfig: - if v, ok := interface{}(m.GetAdminConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdminConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "AdminConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "AdminConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdminConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonExtensionConfigValidationError{ field: "AdminConfig", @@ -57,7 +92,26 @@ func (m *CommonExtensionConfig) Validate() error { case *CommonExtensionConfig_StaticConfig: - if v, ok := interface{}(m.GetStaticConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStaticConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "StaticConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "StaticConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStaticConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonExtensionConfigValidationError{ field: "StaticConfig", @@ -68,16 +122,41 @@ func (m *CommonExtensionConfig) Validate() error { } default: - return CommonExtensionConfigValidationError{ + err := CommonExtensionConfigValidationError{ field: "ConfigType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return CommonExtensionConfigMultiError(errors) + } + return nil } +// CommonExtensionConfigMultiError is an error wrapping multiple validation +// errors returned by CommonExtensionConfig.ValidateAll() if the designated +// constraints aren't met. +type CommonExtensionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonExtensionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonExtensionConfigMultiError) AllErrors() []error { return m } + // CommonExtensionConfigValidationError is the validation error returned by // CommonExtensionConfig.Validate if the designated constraints aren't met. type CommonExtensionConfigValidationError struct { @@ -135,23 +214,61 @@ var _ interface { } = CommonExtensionConfigValidationError{} // Validate checks the field values on AdminConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AdminConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdminConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AdminConfigMultiError, or +// nil if none found. +func (m *AdminConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AdminConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetConfigId()) < 1 { - return AdminConfigValidationError{ + err := AdminConfigValidationError{ field: "ConfigId", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AdminConfigMultiError(errors) } return nil } +// AdminConfigMultiError is an error wrapping multiple validation errors +// returned by AdminConfig.ValidateAll() if the designated constraints aren't met. +type AdminConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdminConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdminConfigMultiError) AllErrors() []error { return m } + // AdminConfigValidationError is the validation error returned by // AdminConfig.Validate if the designated constraints aren't met. type AdminConfigValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/address.pb.go b/pkg/api/envoy/config/core/v3/address.pb.go index 80193e5943..0972beb283 100644 --- a/pkg/api/envoy/config/core/v3/address.pb.go +++ b/pkg/api/envoy/config/core/v3/address.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/address.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SocketAddress_Protocol int32 const ( @@ -134,9 +129,9 @@ func (x *Pipe) GetMode() uint32 { return 0 } -// [#not-implemented-hide:] The address represents an envoy internal listener. -// TODO(lambdai): Make this address available for listener and endpoint. -// TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30. +// The address represents an envoy internal listener. +// [#comment: TODO(lambdai): Make this address available for listener and endpoint. +// TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30.] type EnvoyInternalAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -198,7 +193,7 @@ type isEnvoyInternalAddress_AddressNameSpecifier interface { } type EnvoyInternalAddress_ServerListenerName struct { - // [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. + // [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. ServerListenerName string `protobuf:"bytes,1,opt,name=server_listener_name,json=serverListenerName,proto3,oneof"` } @@ -215,13 +210,13 @@ type SocketAddress struct { // 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 + // 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 + // `, 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 `. + // via :ref:`resolver_name `. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Types that are assignable to PortSpecifier: // *SocketAddress_PortValue @@ -331,7 +326,7 @@ type SocketAddress_PortValue struct { type SocketAddress_NamedPort struct { // This is only valid if :ref:`resolver_name - // ` is specified below and the + // ` is specified below and the // named resolver is capable of named port resolution. NamedPort string `protobuf:"bytes,4,opt,name=named_port,json=namedPort,proto3,oneof"` } @@ -420,7 +415,7 @@ type BindConfig struct { SourceAddress *SocketAddress `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` // Whether to set the *IP_FREEBIND* option when creating the socket. When this // flag is set to true, allows the :ref:`source_address - // ` to be an IP address + // ` 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 @@ -591,7 +586,7 @@ 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. + // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. PrefixLen *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` } @@ -757,11 +752,15 @@ var file_envoy_config_core_v3_address_proto_rawDesc = []byte{ 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0x3c, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x80, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/core/v3/address.pb.validate.go b/pkg/api/envoy/config/core/v3/address.pb.validate.go index fad807ad45..862ed83270 100644 --- a/pkg/api/envoy/config/core/v3/address.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/address.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/address.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,33 +31,76 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Pipe with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Pipe) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Pipe with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in PipeMultiError, or nil if none found. +func (m *Pipe) ValidateAll() error { + return m.validate(true) +} + +func (m *Pipe) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetPath()) < 1 { - return PipeValidationError{ + err := PipeValidationError{ field: "Path", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetMode() > 511 { - return PipeValidationError{ + err := PipeValidationError{ field: "Mode", reason: "value must be less than or equal to 511", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PipeMultiError(errors) } return nil } +// PipeMultiError is an error wrapping multiple validation errors returned by +// Pipe.ValidateAll() if the designated constraints aren't met. +type PipeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PipeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PipeMultiError) AllErrors() []error { return m } + // PipeValidationError is the validation error returned by Pipe.Validate if the // designated constraints aren't met. type PipeValidationError struct { @@ -113,28 +157,67 @@ var _ interface { // Validate checks the field values on EnvoyInternalAddress with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EnvoyInternalAddress) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EnvoyInternalAddress with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EnvoyInternalAddressMultiError, or nil if none found. +func (m *EnvoyInternalAddress) ValidateAll() error { + return m.validate(true) +} + +func (m *EnvoyInternalAddress) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.AddressNameSpecifier.(type) { case *EnvoyInternalAddress_ServerListenerName: // no validation rules for ServerListenerName default: - return EnvoyInternalAddressValidationError{ + err := EnvoyInternalAddressValidationError{ field: "AddressNameSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return EnvoyInternalAddressMultiError(errors) + } + return nil } +// EnvoyInternalAddressMultiError is an error wrapping multiple validation +// errors returned by EnvoyInternalAddress.ValidateAll() if the designated +// constraints aren't met. +type EnvoyInternalAddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EnvoyInternalAddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EnvoyInternalAddressMultiError) AllErrors() []error { return m } + // EnvoyInternalAddressValidationError is the validation error returned by // EnvoyInternalAddress.Validate if the designated constraints aren't met. type EnvoyInternalAddressValidationError struct { @@ -192,25 +275,47 @@ var _ interface { } = EnvoyInternalAddressValidationError{} // Validate checks the field values on SocketAddress with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SocketAddress) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketAddress with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SocketAddressMultiError, or +// nil if none found. +func (m *SocketAddress) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketAddress) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := SocketAddress_Protocol_name[int32(m.GetProtocol())]; !ok { - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetAddress()) < 1 { - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "Address", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ResolverName @@ -222,26 +327,55 @@ func (m *SocketAddress) Validate() error { case *SocketAddress_PortValue: if m.GetPortValue() > 65535 { - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } + if !all { + return err + } + errors = append(errors, err) } case *SocketAddress_NamedPort: // no validation rules for NamedPort default: - return SocketAddressValidationError{ + err := SocketAddressValidationError{ field: "PortSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return SocketAddressMultiError(errors) + } + return nil } +// SocketAddressMultiError is an error wrapping multiple validation errors +// returned by SocketAddress.ValidateAll() if the designated constraints +// aren't met. +type SocketAddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketAddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketAddressMultiError) AllErrors() []error { return m } + // SocketAddressValidationError is the validation error returned by // SocketAddress.Validate if the designated constraints aren't met. type SocketAddressValidationError struct { @@ -297,14 +431,47 @@ var _ interface { } = SocketAddressValidationError{} // Validate checks the field values on TcpKeepalive with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TcpKeepalive) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpKeepalive with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TcpKeepaliveMultiError, or +// nil if none found. +func (m *TcpKeepalive) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpKeepalive) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetKeepaliveProbes()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetKeepaliveProbes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveProbes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveProbes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeepaliveProbes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveProbes", @@ -314,7 +481,26 @@ func (m *TcpKeepalive) Validate() error { } } - if v, ok := interface{}(m.GetKeepaliveTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKeepaliveTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeepaliveTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveTime", @@ -324,7 +510,26 @@ func (m *TcpKeepalive) Validate() error { } } - if v, ok := interface{}(m.GetKeepaliveInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKeepaliveInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpKeepaliveValidationError{ + field: "KeepaliveInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeepaliveInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveInterval", @@ -334,9 +539,29 @@ func (m *TcpKeepalive) Validate() error { } } + if len(errors) > 0 { + return TcpKeepaliveMultiError(errors) + } + return nil } +// TcpKeepaliveMultiError is an error wrapping multiple validation errors +// returned by TcpKeepalive.ValidateAll() if the designated constraints aren't met. +type TcpKeepaliveMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpKeepaliveMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpKeepaliveMultiError) AllErrors() []error { return m } + // TcpKeepaliveValidationError is the validation error returned by // TcpKeepalive.Validate if the designated constraints aren't met. type TcpKeepaliveValidationError struct { @@ -392,20 +617,58 @@ var _ interface { } = TcpKeepaliveValidationError{} // Validate checks the field values on BindConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BindConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BindConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BindConfigMultiError, or +// nil if none found. +func (m *BindConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *BindConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetSourceAddress() == nil { - return BindConfigValidationError{ + err := BindConfigValidationError{ field: "SourceAddress", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: "SourceAddress", @@ -415,7 +678,26 @@ func (m *BindConfig) Validate() error { } } - if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFreebind()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: "Freebind", @@ -428,7 +710,26 @@ func (m *BindConfig) Validate() error { for idx, item := range m.GetSocketOptions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BindConfigValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), @@ -440,9 +741,29 @@ func (m *BindConfig) Validate() error { } + if len(errors) > 0 { + return BindConfigMultiError(errors) + } + return nil } +// BindConfigMultiError is an error wrapping multiple validation errors +// returned by BindConfig.ValidateAll() if the designated constraints aren't met. +type BindConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BindConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BindConfigMultiError) AllErrors() []error { return m } + // BindConfigValidationError is the validation error returned by // BindConfig.Validate if the designated constraints aren't met. type BindConfigValidationError struct { @@ -498,17 +819,50 @@ var _ interface { } = BindConfigValidationError{} // Validate checks the field values on Address with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Address) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Address with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in AddressMultiError, or nil if none found. +func (m *Address) ValidateAll() error { + return m.validate(true) +} + +func (m *Address) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Address.(type) { case *Address_SocketAddress: - if v, ok := interface{}(m.GetSocketAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSocketAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddressValidationError{ + field: "SocketAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddressValidationError{ + field: "SocketAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "SocketAddress", @@ -520,7 +874,26 @@ func (m *Address) Validate() error { case *Address_Pipe: - if v, ok := interface{}(m.GetPipe()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPipe()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddressValidationError{ + field: "Pipe", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddressValidationError{ + field: "Pipe", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPipe()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "Pipe", @@ -532,7 +905,26 @@ func (m *Address) Validate() error { case *Address_EnvoyInternalAddress: - if v, ok := interface{}(m.GetEnvoyInternalAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnvoyInternalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddressValidationError{ + field: "EnvoyInternalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddressValidationError{ + field: "EnvoyInternalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnvoyInternalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "EnvoyInternalAddress", @@ -543,16 +935,40 @@ func (m *Address) Validate() error { } default: - return AddressValidationError{ + err := AddressValidationError{ field: "Address", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return AddressMultiError(errors) } return nil } +// AddressMultiError is an error wrapping multiple validation errors returned +// by Address.ValidateAll() if the designated constraints aren't met. +type AddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddressMultiError) AllErrors() []error { return m } + // AddressValidationError is the validation error returned by Address.Validate // if the designated constraints aren't met. type AddressValidationError struct { @@ -608,33 +1024,76 @@ var _ interface { } = AddressValidationError{} // Validate checks the field values on CidrRange with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CidrRange) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CidrRange with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CidrRangeMultiError, or nil +// if none found. +func (m *CidrRange) ValidateAll() error { + return m.validate(true) +} + +func (m *CidrRange) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetAddressPrefix()) < 1 { - return CidrRangeValidationError{ + err := CidrRangeValidationError{ field: "AddressPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetPrefixLen(); wrapper != nil { if wrapper.GetValue() > 128 { - return CidrRangeValidationError{ + err := CidrRangeValidationError{ field: "PrefixLen", reason: "value must be less than or equal to 128", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return CidrRangeMultiError(errors) + } + return nil } +// CidrRangeMultiError is an error wrapping multiple validation errors returned +// by CidrRange.ValidateAll() if the designated constraints aren't met. +type CidrRangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CidrRangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CidrRangeMultiError) AllErrors() []error { return m } + // CidrRangeValidationError is the validation error returned by // CidrRange.Validate if the designated constraints aren't met. type CidrRangeValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/backoff.pb.go b/pkg/api/envoy/config/core/v3/backoff.pb.go index b750556935..ba8fb494c7 100644 --- a/pkg/api/envoy/config/core/v3/backoff.pb.go +++ b/pkg/api/envoy/config/core/v3/backoff.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/backoff.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration defining a jittered exponential back off strategy. type BackoffStrategy struct { state protoimpl.MessageState @@ -36,13 +31,13 @@ type BackoffStrategy struct { // The base interval to be used for the next back off computation. It should // be greater than zero and less than or equal to :ref:`max_interval - // `. + // `. BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` // Specifies the maximum interval between retries. This parameter is optional, // but must be greater than or equal to the :ref:`base_interval - // ` if set. The default + // ` if set. The default // is 10 times the :ref:`base_interval - // `. + // `. MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` } @@ -119,12 +114,16 @@ var file_envoy_config_core_v3_backoff_proto_rawDesc = []byte{ 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x61, 0x63, 0x6b, - 0x6f, 0x66, 0x66, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x3c, 0x0a, 0x22, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x42, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x66, 0x66, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x80, 0x01, 0x0a, 0x22, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x42, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, + 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/core/v3/backoff.pb.validate.go b/pkg/api/envoy/config/core/v3/backoff.pb.validate.go index 6ca23aaa65..c9b6590ccb 100644 --- a/pkg/api/envoy/config/core/v3/backoff.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/backoff.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/backoff.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,69 +31,127 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on BackoffStrategy with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *BackoffStrategy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BackoffStrategy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BackoffStrategyMultiError, or nil if none found. +func (m *BackoffStrategy) ValidateAll() error { + return m.validate(true) +} + +func (m *BackoffStrategy) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetBaseInterval() == nil { - return BackoffStrategyValidationError{ + err := BackoffStrategyValidationError{ field: "BaseInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetBaseInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return BackoffStrategyValidationError{ + err = 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 !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := BackoffStrategyValidationError{ + field: "BaseInterval", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return BackoffStrategyValidationError{ + err = 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", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := BackoffStrategyValidationError{ + field: "MaxInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return BackoffStrategyMultiError(errors) } return nil } +// BackoffStrategyMultiError is an error wrapping multiple validation errors +// returned by BackoffStrategy.ValidateAll() if the designated constraints +// aren't met. +type BackoffStrategyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BackoffStrategyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BackoffStrategyMultiError) AllErrors() []error { return m } + // BackoffStrategyValidationError is the validation error returned by // BackoffStrategy.Validate if the designated constraints aren't met. type BackoffStrategyValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/base.pb.go b/pkg/api/envoy/config/core/v3/base.pb.go index f70edfd513..04c8a9b5d0 100644 --- a/pkg/api/envoy/config/core/v3/base.pb.go +++ b/pkg/api/envoy/config/core/v3/base.pb.go @@ -1,18 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/base.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + v31 "github.com/cncf/xds/go/xds/core/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -28,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Envoy supports :ref:`upstream priority routing // ` both at the route and the virtual // cluster level. The current priority implementation uses different connection @@ -209,17 +205,75 @@ func (TrafficDirection) EnumDescriptor() ([]byte, []int) { return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{2} } +// Describes the supported actions types for header append action. +type HeaderValueOption_HeaderAppendAction int32 + +const ( + // This action will append the specified value to the existing values if the header + // already exists. If the header doesn't exist then this will add the header with + // specified key and value. + HeaderValueOption_APPEND_IF_EXISTS_OR_ADD HeaderValueOption_HeaderAppendAction = 0 + // This action will add the header if it doesn't already exist. If the header + // already exists then this will be a no-op. + HeaderValueOption_ADD_IF_ABSENT HeaderValueOption_HeaderAppendAction = 1 + // This action will overwrite the specified value by discarding any existing values if + // the header already exists. If the header doesn't exist then this will add the header + // with specified key and value. + HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD HeaderValueOption_HeaderAppendAction = 2 +) + +// Enum value maps for HeaderValueOption_HeaderAppendAction. +var ( + HeaderValueOption_HeaderAppendAction_name = map[int32]string{ + 0: "APPEND_IF_EXISTS_OR_ADD", + 1: "ADD_IF_ABSENT", + 2: "OVERWRITE_IF_EXISTS_OR_ADD", + } + HeaderValueOption_HeaderAppendAction_value = map[string]int32{ + "APPEND_IF_EXISTS_OR_ADD": 0, + "ADD_IF_ABSENT": 1, + "OVERWRITE_IF_EXISTS_OR_ADD": 2, + } +) + +func (x HeaderValueOption_HeaderAppendAction) Enum() *HeaderValueOption_HeaderAppendAction { + p := new(HeaderValueOption_HeaderAppendAction) + *p = x + return p +} + +func (x HeaderValueOption_HeaderAppendAction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderValueOption_HeaderAppendAction) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_config_core_v3_base_proto_enumTypes[3].Descriptor() +} + +func (HeaderValueOption_HeaderAppendAction) Type() protoreflect.EnumType { + return &file_envoy_config_core_v3_base_proto_enumTypes[3] +} + +func (x HeaderValueOption_HeaderAppendAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderValueOption_HeaderAppendAction.Descriptor instead. +func (HeaderValueOption_HeaderAppendAction) EnumDescriptor() ([]byte, []int) { + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{11, 0} +} + // Identifies location of where either Envoy runs or where upstream hosts run. type Locality struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Region this :ref:`zone ` belongs to. + // Region 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 `, + // 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) // `_ @@ -443,7 +497,7 @@ func (x *Extension) GetDisabled() bool { // Identifies a specific Envoy instance. The node identifier is presented to the // management server, which may use this identifier to distinguish per Envoy // configuration for serving. -// [#next-free-field: 12] +// [#next-free-field: 13] type Node struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -460,10 +514,10 @@ type Node struct { // 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:`runtime override directory `, // :ref:`user agent addition - // `, + // `, // :ref:`HTTP global rate limiting `, // :ref:`CDS `, and :ref:`HTTP tracing // `, either in this message or via @@ -472,6 +526,12 @@ type Node struct { // Opaque metadata extending the node identifier. Envoy will pass this // directly to the management server. Metadata *_struct.Struct `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Map from xDS resource type URL to dynamic context parameters. These may vary at runtime (unlike + // other fields in this message). For example, the xDS client may have a shard identifier that + // changes during the lifetime of the xDS client. In Envoy, this would be achieved by updating the + // dynamic context on the Server::Instance's LocalInfo context provider. The shard ID dynamic + // parameter then appears in this field during future discovery requests. + DynamicParameters map[string]*v31.ContextParams `protobuf:"bytes,12,rep,name=dynamic_parameters,json=dynamicParameters,proto3" json:"dynamic_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Locality specifying where the Envoy instance is running. Locality *Locality `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"` // Free-form string that identifies the entity requesting config. @@ -496,8 +556,6 @@ type Node struct { // // Deprecated: Do not use. ListeningAddresses []*Address `protobuf:"bytes,11,rep,name=listening_addresses,json=listeningAddresses,proto3" json:"listening_addresses,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedBuildVersion string `protobuf:"bytes,5,opt,name=hidden_envoy_deprecated_build_version,json=hiddenEnvoyDeprecatedBuildVersion,proto3" json:"hidden_envoy_deprecated_build_version,omitempty"` } func (x *Node) Reset() { @@ -553,6 +611,13 @@ func (x *Node) GetMetadata() *_struct.Struct { return nil } +func (x *Node) GetDynamicParameters() map[string]*v31.ContextParams { + if x != nil { + return x.DynamicParameters + } + return nil +} + func (x *Node) GetLocality() *Locality { if x != nil { return x.Locality @@ -610,14 +675,6 @@ func (x *Node) GetListeningAddresses() []*Address { return nil } -// Deprecated: Do not use. -func (x *Node) GetHiddenEnvoyDeprecatedBuildVersion() string { - if x != nil { - return x.HiddenEnvoyDeprecatedBuildVersion - } - return "" -} - type isNode_UserAgentVersionType interface { isNode_UserAgentVersionType() } @@ -666,7 +723,18 @@ 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. + // If both *filter_metadata* and + // :ref:`typed_filter_metadata ` + // fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. FilterMetadata map[string]*_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"` + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + // The value is encoded as google.protobuf.Any. + // If both :ref:`filter_metadata ` + // and *typed_filter_metadata* fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. + TypedFilterMetadata map[string]*any.Any `protobuf:"bytes,2,rep,name=typed_filter_metadata,json=typedFilterMetadata,proto3" json:"typed_filter_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *Metadata) Reset() { @@ -708,6 +776,13 @@ func (x *Metadata) GetFilterMetadata() map[string]*_struct.Struct { return nil } +func (x *Metadata) GetTypedFilterMetadata() map[string]*any.Any { + if x != nil { + return x.TypedFilterMetadata + } + return nil +} + // Runtime derived uint32 with a default when not specified. type RuntimeUInt32 struct { state protoimpl.MessageState @@ -942,6 +1017,64 @@ func (x *RuntimeFeatureFlag) GetRuntimeKey() string { return "" } +// Query parameter name/value pair. +type QueryParameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The key of the query parameter. Case sensitive. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The value of the query parameter. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *QueryParameter) Reset() { + *x = QueryParameter{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_base_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParameter) ProtoMessage() {} + +func (x *QueryParameter) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_base_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryParameter.ProtoReflect.Descriptor instead. +func (*QueryParameter) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryParameter) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *QueryParameter) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + // Header name/value pair. type HeaderValue struct { state protoimpl.MessageState @@ -961,7 +1094,7 @@ type HeaderValue struct { func (x *HeaderValue) Reset() { *x = HeaderValue{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[9] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -974,7 +1107,7 @@ func (x *HeaderValue) String() string { func (*HeaderValue) ProtoMessage() {} func (x *HeaderValue) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[9] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -987,7 +1120,7 @@ func (x *HeaderValue) ProtoReflect() protoreflect.Message { // Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead. func (*HeaderValue) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{9} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{10} } func (x *HeaderValue) GetKey() string { @@ -1015,12 +1148,15 @@ type HeaderValueOption struct { // Should the value be appended? If true (default), the value is appended to // existing values. Otherwise it replaces any existing values. Append *wrappers.BoolValue `protobuf:"bytes,2,opt,name=append,proto3" json:"append,omitempty"` + // [#not-implemented-hide:] Describes the action taken to append/overwrite the given value for an existing header + // or to only add this header if it's absent. Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD`. + AppendAction HeaderValueOption_HeaderAppendAction `protobuf:"varint,3,opt,name=append_action,json=appendAction,proto3,enum=envoy.config.core.v3.HeaderValueOption_HeaderAppendAction" json:"append_action,omitempty"` } func (x *HeaderValueOption) Reset() { *x = HeaderValueOption{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[10] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1033,7 +1169,7 @@ func (x *HeaderValueOption) String() string { func (*HeaderValueOption) ProtoMessage() {} func (x *HeaderValueOption) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[10] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1046,7 +1182,7 @@ func (x *HeaderValueOption) ProtoReflect() protoreflect.Message { // Deprecated: Use HeaderValueOption.ProtoReflect.Descriptor instead. func (*HeaderValueOption) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{10} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{11} } func (x *HeaderValueOption) GetHeader() *HeaderValue { @@ -1063,6 +1199,13 @@ func (x *HeaderValueOption) GetAppend() *wrappers.BoolValue { return nil } +func (x *HeaderValueOption) GetAppendAction() HeaderValueOption_HeaderAppendAction { + if x != nil { + return x.AppendAction + } + return HeaderValueOption_APPEND_IF_EXISTS_OR_ADD +} + // Wrapper for a set of headers. type HeaderMap struct { state protoimpl.MessageState @@ -1075,7 +1218,7 @@ type HeaderMap struct { func (x *HeaderMap) Reset() { *x = HeaderMap{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[11] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1088,7 +1231,7 @@ func (x *HeaderMap) String() string { func (*HeaderMap) ProtoMessage() {} func (x *HeaderMap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[11] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1101,7 +1244,7 @@ func (x *HeaderMap) ProtoReflect() protoreflect.Message { // Deprecated: Use HeaderMap.ProtoReflect.Descriptor instead. func (*HeaderMap) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{11} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{12} } func (x *HeaderMap) GetHeaders() []*HeaderValue { @@ -1125,7 +1268,7 @@ type WatchedDirectory struct { func (x *WatchedDirectory) Reset() { *x = WatchedDirectory{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[12] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1138,7 +1281,7 @@ func (x *WatchedDirectory) String() string { func (*WatchedDirectory) ProtoMessage() {} func (x *WatchedDirectory) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[12] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1151,7 +1294,7 @@ func (x *WatchedDirectory) ProtoReflect() protoreflect.Message { // Deprecated: Use WatchedDirectory.ProtoReflect.Descriptor instead. func (*WatchedDirectory) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{12} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{13} } func (x *WatchedDirectory) GetPath() string { @@ -1161,7 +1304,7 @@ func (x *WatchedDirectory) GetPath() string { return "" } -// Data source consisting of either a file or an inline value. +// Data source consisting of a file, an inline value, or an environment variable. type DataSource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1171,13 +1314,14 @@ type DataSource struct { // *DataSource_Filename // *DataSource_InlineBytes // *DataSource_InlineString + // *DataSource_EnvironmentVariable Specifier isDataSource_Specifier `protobuf_oneof:"specifier"` } func (x *DataSource) Reset() { *x = DataSource{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[13] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1190,7 +1334,7 @@ func (x *DataSource) String() string { func (*DataSource) ProtoMessage() {} func (x *DataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[13] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1203,7 +1347,7 @@ func (x *DataSource) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSource.ProtoReflect.Descriptor instead. func (*DataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{13} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{14} } func (m *DataSource) GetSpecifier() isDataSource_Specifier { @@ -1234,6 +1378,13 @@ func (x *DataSource) GetInlineString() string { return "" } +func (x *DataSource) GetEnvironmentVariable() string { + if x, ok := x.GetSpecifier().(*DataSource_EnvironmentVariable); ok { + return x.EnvironmentVariable + } + return "" +} + type isDataSource_Specifier interface { isDataSource_Specifier() } @@ -1253,19 +1404,26 @@ type DataSource_InlineString struct { InlineString string `protobuf:"bytes,3,opt,name=inline_string,json=inlineString,proto3,oneof"` } +type DataSource_EnvironmentVariable struct { + // Environment variable data source. + EnvironmentVariable string `protobuf:"bytes,4,opt,name=environment_variable,json=environmentVariable,proto3,oneof"` +} + func (*DataSource_Filename) isDataSource_Specifier() {} func (*DataSource_InlineBytes) isDataSource_Specifier() {} func (*DataSource_InlineString) isDataSource_Specifier() {} +func (*DataSource_EnvironmentVariable) isDataSource_Specifier() {} + // The message specifies the retry policy of remote data source when fetching fails. type RetryPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Specifies parameters that control :ref:`retry backoff strategy `. + // Specifies parameters that control :ref:`retry backoff strategy `. // This parameter is optional, in which case the default base interval is 1000 milliseconds. The // default maximum interval is 10 times the base interval. RetryBackOff *BackoffStrategy `protobuf:"bytes,1,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` @@ -1277,7 +1435,7 @@ type RetryPolicy struct { func (x *RetryPolicy) Reset() { *x = RetryPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[14] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1290,7 +1448,7 @@ func (x *RetryPolicy) String() string { func (*RetryPolicy) ProtoMessage() {} func (x *RetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[14] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1303,7 +1461,7 @@ func (x *RetryPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead. func (*RetryPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{14} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{15} } func (x *RetryPolicy) GetRetryBackOff() *BackoffStrategy { @@ -1337,7 +1495,7 @@ type RemoteDataSource struct { func (x *RemoteDataSource) Reset() { *x = RemoteDataSource{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[15] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1350,7 +1508,7 @@ func (x *RemoteDataSource) String() string { func (*RemoteDataSource) ProtoMessage() {} func (x *RemoteDataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[15] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1363,7 +1521,7 @@ func (x *RemoteDataSource) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoteDataSource.ProtoReflect.Descriptor instead. func (*RemoteDataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{15} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{16} } func (x *RemoteDataSource) GetHttpUri() *HttpUri { @@ -1402,7 +1560,7 @@ type AsyncDataSource struct { func (x *AsyncDataSource) Reset() { *x = AsyncDataSource{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[16] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1415,7 +1573,7 @@ func (x *AsyncDataSource) String() string { func (*AsyncDataSource) ProtoMessage() {} func (x *AsyncDataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[16] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1428,7 +1586,7 @@ func (x *AsyncDataSource) ProtoReflect() protoreflect.Message { // Deprecated: Use AsyncDataSource.ProtoReflect.Descriptor instead. func (*AsyncDataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{16} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{17} } func (m *AsyncDataSource) GetSpecifier() isAsyncDataSource_Specifier { @@ -1471,7 +1629,7 @@ func (*AsyncDataSource_Local) isAsyncDataSource_Specifier() {} func (*AsyncDataSource_Remote) isAsyncDataSource_Specifier() {} // Configuration for transport socket in :ref:`listeners ` and -// :ref:`clusters `. If the configuration is +// :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 { @@ -1487,14 +1645,13 @@ type TransportSocket struct { // // Types that are assignable to ConfigType: // *TransportSocket_TypedConfig - // *TransportSocket_HiddenEnvoyDeprecatedConfig ConfigType isTransportSocket_ConfigType `protobuf_oneof:"config_type"` } func (x *TransportSocket) Reset() { *x = TransportSocket{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[17] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1507,7 +1664,7 @@ func (x *TransportSocket) String() string { func (*TransportSocket) ProtoMessage() {} func (x *TransportSocket) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[17] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1520,7 +1677,7 @@ func (x *TransportSocket) ProtoReflect() protoreflect.Message { // Deprecated: Use TransportSocket.ProtoReflect.Descriptor instead. func (*TransportSocket) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{17} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{18} } func (x *TransportSocket) GetName() string { @@ -1544,14 +1701,6 @@ func (x *TransportSocket) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *TransportSocket) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*TransportSocket_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isTransportSocket_ConfigType interface { isTransportSocket_ConfigType() } @@ -1560,22 +1709,15 @@ type TransportSocket_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type TransportSocket_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*TransportSocket_TypedConfig) isTransportSocket_ConfigType() {} -func (*TransportSocket_HiddenEnvoyDeprecatedConfig) isTransportSocket_ConfigType() {} - // Runtime derived FractionalPercent with defaults for when the numerator or denominator is not // specified via a runtime key. // // .. note:: // // Parsing of the runtime key's data is implemented such that it may be represented as a -// :ref:`FractionalPercent ` proto represented as JSON/YAML +// :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. @@ -1593,7 +1735,7 @@ type RuntimeFractionalPercent struct { func (x *RuntimeFractionalPercent) Reset() { *x = RuntimeFractionalPercent{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[18] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1606,7 +1748,7 @@ func (x *RuntimeFractionalPercent) String() string { func (*RuntimeFractionalPercent) ProtoMessage() {} func (x *RuntimeFractionalPercent) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[18] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1619,7 +1761,7 @@ func (x *RuntimeFractionalPercent) ProtoReflect() protoreflect.Message { // Deprecated: Use RuntimeFractionalPercent.ProtoReflect.Descriptor instead. func (*RuntimeFractionalPercent) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{18} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{19} } func (x *RuntimeFractionalPercent) GetDefaultValue() *v3.FractionalPercent { @@ -1651,7 +1793,7 @@ type ControlPlane struct { func (x *ControlPlane) Reset() { *x = ControlPlane{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[19] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1664,7 +1806,7 @@ func (x *ControlPlane) String() string { func (*ControlPlane) ProtoMessage() {} func (x *ControlPlane) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[19] + mi := &file_envoy_config_core_v3_base_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1677,7 +1819,7 @@ func (x *ControlPlane) ProtoReflect() protoreflect.Message { // Deprecated: Use ControlPlane.ProtoReflect.Descriptor instead. func (*ControlPlane) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{19} + return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{20} } func (x *ControlPlane) GetIdentifier() string { @@ -1706,183 +1848,228 @@ var file_envoy_config_core_v3_base_proto_rawDesc = []byte{ 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x08, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, - 0x6f, 0x6e, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x5a, 0x6f, 0x6e, 0x65, 0x3a, 0x21, - 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x22, 0xa4, 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xe2, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x74, 0x79, 0x70, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, - 0x3c, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, - 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x05, - 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x18, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x52, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x25, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x21, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x1d, 0x9a, 0xc5, - 0x88, 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x75, + 0x62, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, + 0x62, 0x5a, 0x6f, 0x6e, 0x65, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa4, 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, + 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0xe2, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x27, 0x0a, + 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, + 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb2, 0x06, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x60, 0x0a, 0x12, + 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3a, + 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x13, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x60, 0x0a, 0x16, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x1d, 0x9a, 0xc5, 0x88, 0x1e, + 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb1, 0x03, 0x0a, 0x08, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x6b, 0x0a, 0x15, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x74, 0x79, 0x70, + 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x5a, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x21, 0x9a, 0xc5, - 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x86, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5c, 0x0a, 0x18, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, + 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01, + 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, + 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x26, + 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x22, 0x77, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x22, + 0x86, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x22, 0x77, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, - 0x79, 0x22, 0x86, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, - 0x65, 0x79, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x12, 0x52, + 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x12, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, + 0x49, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, - 0x67, 0x12, 0x49, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, - 0x6c, 0x61, 0x67, 0x22, 0x7f, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x23, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x11, 0xfa, 0x42, 0x0e, 0x72, 0x0c, 0x10, 0x01, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x01, 0xc8, - 0x01, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x72, 0x0a, 0x28, 0x80, 0x80, - 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x24, - 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x32, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x61, 0x70, 0x70, - 0x65, 0x6e, 0x64, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x6c, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x12, 0x3b, 0x0a, 0x07, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, - 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x22, 0x2f, 0x0a, - 0x10, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xb6, - 0x01, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, - 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x69, 0x6e, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x67, 0x22, 0x41, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x7f, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x11, 0xfa, 0x42, 0x0e, 0x72, 0x0c, 0x10, 0x01, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x01, + 0xc8, 0x01, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x72, 0x0a, 0x28, 0x80, + 0x80, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x03, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x32, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x61, 0x70, + 0x70, 0x65, 0x6e, 0x64, 0x12, 0x69, 0x0a, 0x0d, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x6e, + 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x64, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, + 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, + 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x44, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, 0x53, + 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, + 0x54, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, + 0x41, 0x44, 0x44, 0x10, 0x02, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x6c, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x12, 0x3b, + 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x22, 0x9a, 0xc5, 0x88, + 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x22, + 0x2f, 0x0a, 0x10, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x22, 0xf4, 0x01, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x25, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x66, 0x69, + 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, + 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x69, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x14, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x13, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x10, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, @@ -1927,60 +2114,59 @@ var file_envoy_config_core_v3_base_proto_rawDesc = []byte{ 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x10, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x86, 0x02, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb0, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, - 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xbf, - 0x01, 0x0a, 0x18, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0d, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x31, 0x9a, - 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x22, 0x55, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x2a, 0x28, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, - 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, - 0x01, 0x2a, 0x89, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, - 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x08, - 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, - 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x0b, 0x0a, - 0x07, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, - 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, - 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x09, 0x2a, 0x3e, 0x0a, - 0x10, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x39, 0x0a, - 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x42, 0x09, 0x42, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, + 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xbf, 0x01, 0x0a, 0x18, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x0c, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, + 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, + 0x65, 0x2a, 0x28, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, + 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x2a, 0x89, 0x01, 0x0a, 0x0d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, + 0x12, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, + 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, + 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, + 0x07, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, + 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x09, 0x2a, 0x3e, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x55, 0x54, + 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x7d, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x42, + 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1995,74 +2181,83 @@ func file_envoy_config_core_v3_base_proto_rawDescGZIP() []byte { return file_envoy_config_core_v3_base_proto_rawDescData } -var file_envoy_config_core_v3_base_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_envoy_config_core_v3_base_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_envoy_config_core_v3_base_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_envoy_config_core_v3_base_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_envoy_config_core_v3_base_proto_goTypes = []interface{}{ - (RoutingPriority)(0), // 0: envoy.config.core.v3.RoutingPriority - (RequestMethod)(0), // 1: envoy.config.core.v3.RequestMethod - (TrafficDirection)(0), // 2: envoy.config.core.v3.TrafficDirection - (*Locality)(nil), // 3: envoy.config.core.v3.Locality - (*BuildVersion)(nil), // 4: envoy.config.core.v3.BuildVersion - (*Extension)(nil), // 5: envoy.config.core.v3.Extension - (*Node)(nil), // 6: envoy.config.core.v3.Node - (*Metadata)(nil), // 7: envoy.config.core.v3.Metadata - (*RuntimeUInt32)(nil), // 8: envoy.config.core.v3.RuntimeUInt32 - (*RuntimePercent)(nil), // 9: envoy.config.core.v3.RuntimePercent - (*RuntimeDouble)(nil), // 10: envoy.config.core.v3.RuntimeDouble - (*RuntimeFeatureFlag)(nil), // 11: envoy.config.core.v3.RuntimeFeatureFlag - (*HeaderValue)(nil), // 12: envoy.config.core.v3.HeaderValue - (*HeaderValueOption)(nil), // 13: envoy.config.core.v3.HeaderValueOption - (*HeaderMap)(nil), // 14: envoy.config.core.v3.HeaderMap - (*WatchedDirectory)(nil), // 15: envoy.config.core.v3.WatchedDirectory - (*DataSource)(nil), // 16: envoy.config.core.v3.DataSource - (*RetryPolicy)(nil), // 17: envoy.config.core.v3.RetryPolicy - (*RemoteDataSource)(nil), // 18: envoy.config.core.v3.RemoteDataSource - (*AsyncDataSource)(nil), // 19: envoy.config.core.v3.AsyncDataSource - (*TransportSocket)(nil), // 20: envoy.config.core.v3.TransportSocket - (*RuntimeFractionalPercent)(nil), // 21: envoy.config.core.v3.RuntimeFractionalPercent - (*ControlPlane)(nil), // 22: envoy.config.core.v3.ControlPlane - nil, // 23: envoy.config.core.v3.Metadata.FilterMetadataEntry - (*v3.SemanticVersion)(nil), // 24: envoy.type.v3.SemanticVersion - (*_struct.Struct)(nil), // 25: google.protobuf.Struct - (*Address)(nil), // 26: envoy.config.core.v3.Address - (*v3.Percent)(nil), // 27: envoy.type.v3.Percent - (*wrappers.BoolValue)(nil), // 28: google.protobuf.BoolValue - (*BackoffStrategy)(nil), // 29: envoy.config.core.v3.BackoffStrategy - (*wrappers.UInt32Value)(nil), // 30: google.protobuf.UInt32Value - (*HttpUri)(nil), // 31: envoy.config.core.v3.HttpUri - (*any.Any)(nil), // 32: google.protobuf.Any - (*v3.FractionalPercent)(nil), // 33: envoy.type.v3.FractionalPercent + (RoutingPriority)(0), // 0: envoy.config.core.v3.RoutingPriority + (RequestMethod)(0), // 1: envoy.config.core.v3.RequestMethod + (TrafficDirection)(0), // 2: envoy.config.core.v3.TrafficDirection + (HeaderValueOption_HeaderAppendAction)(0), // 3: envoy.config.core.v3.HeaderValueOption.HeaderAppendAction + (*Locality)(nil), // 4: envoy.config.core.v3.Locality + (*BuildVersion)(nil), // 5: envoy.config.core.v3.BuildVersion + (*Extension)(nil), // 6: envoy.config.core.v3.Extension + (*Node)(nil), // 7: envoy.config.core.v3.Node + (*Metadata)(nil), // 8: envoy.config.core.v3.Metadata + (*RuntimeUInt32)(nil), // 9: envoy.config.core.v3.RuntimeUInt32 + (*RuntimePercent)(nil), // 10: envoy.config.core.v3.RuntimePercent + (*RuntimeDouble)(nil), // 11: envoy.config.core.v3.RuntimeDouble + (*RuntimeFeatureFlag)(nil), // 12: envoy.config.core.v3.RuntimeFeatureFlag + (*QueryParameter)(nil), // 13: envoy.config.core.v3.QueryParameter + (*HeaderValue)(nil), // 14: envoy.config.core.v3.HeaderValue + (*HeaderValueOption)(nil), // 15: envoy.config.core.v3.HeaderValueOption + (*HeaderMap)(nil), // 16: envoy.config.core.v3.HeaderMap + (*WatchedDirectory)(nil), // 17: envoy.config.core.v3.WatchedDirectory + (*DataSource)(nil), // 18: envoy.config.core.v3.DataSource + (*RetryPolicy)(nil), // 19: envoy.config.core.v3.RetryPolicy + (*RemoteDataSource)(nil), // 20: envoy.config.core.v3.RemoteDataSource + (*AsyncDataSource)(nil), // 21: envoy.config.core.v3.AsyncDataSource + (*TransportSocket)(nil), // 22: envoy.config.core.v3.TransportSocket + (*RuntimeFractionalPercent)(nil), // 23: envoy.config.core.v3.RuntimeFractionalPercent + (*ControlPlane)(nil), // 24: envoy.config.core.v3.ControlPlane + nil, // 25: envoy.config.core.v3.Node.DynamicParametersEntry + nil, // 26: envoy.config.core.v3.Metadata.FilterMetadataEntry + nil, // 27: envoy.config.core.v3.Metadata.TypedFilterMetadataEntry + (*v3.SemanticVersion)(nil), // 28: envoy.type.v3.SemanticVersion + (*_struct.Struct)(nil), // 29: google.protobuf.Struct + (*Address)(nil), // 30: envoy.config.core.v3.Address + (*v3.Percent)(nil), // 31: envoy.type.v3.Percent + (*wrappers.BoolValue)(nil), // 32: google.protobuf.BoolValue + (*BackoffStrategy)(nil), // 33: envoy.config.core.v3.BackoffStrategy + (*wrappers.UInt32Value)(nil), // 34: google.protobuf.UInt32Value + (*HttpUri)(nil), // 35: envoy.config.core.v3.HttpUri + (*any.Any)(nil), // 36: google.protobuf.Any + (*v3.FractionalPercent)(nil), // 37: envoy.type.v3.FractionalPercent + (*v31.ContextParams)(nil), // 38: xds.core.v3.ContextParams } var file_envoy_config_core_v3_base_proto_depIdxs = []int32{ - 24, // 0: envoy.config.core.v3.BuildVersion.version:type_name -> envoy.type.v3.SemanticVersion - 25, // 1: envoy.config.core.v3.BuildVersion.metadata:type_name -> google.protobuf.Struct - 4, // 2: envoy.config.core.v3.Extension.version:type_name -> envoy.config.core.v3.BuildVersion - 25, // 3: envoy.config.core.v3.Node.metadata:type_name -> google.protobuf.Struct - 3, // 4: envoy.config.core.v3.Node.locality:type_name -> envoy.config.core.v3.Locality - 4, // 5: envoy.config.core.v3.Node.user_agent_build_version:type_name -> envoy.config.core.v3.BuildVersion - 5, // 6: envoy.config.core.v3.Node.extensions:type_name -> envoy.config.core.v3.Extension - 26, // 7: envoy.config.core.v3.Node.listening_addresses:type_name -> envoy.config.core.v3.Address - 23, // 8: envoy.config.core.v3.Metadata.filter_metadata:type_name -> envoy.config.core.v3.Metadata.FilterMetadataEntry - 27, // 9: envoy.config.core.v3.RuntimePercent.default_value:type_name -> envoy.type.v3.Percent - 28, // 10: envoy.config.core.v3.RuntimeFeatureFlag.default_value:type_name -> google.protobuf.BoolValue - 12, // 11: envoy.config.core.v3.HeaderValueOption.header:type_name -> envoy.config.core.v3.HeaderValue - 28, // 12: envoy.config.core.v3.HeaderValueOption.append:type_name -> google.protobuf.BoolValue - 12, // 13: envoy.config.core.v3.HeaderMap.headers:type_name -> envoy.config.core.v3.HeaderValue - 29, // 14: envoy.config.core.v3.RetryPolicy.retry_back_off:type_name -> envoy.config.core.v3.BackoffStrategy - 30, // 15: envoy.config.core.v3.RetryPolicy.num_retries:type_name -> google.protobuf.UInt32Value - 31, // 16: envoy.config.core.v3.RemoteDataSource.http_uri:type_name -> envoy.config.core.v3.HttpUri - 17, // 17: envoy.config.core.v3.RemoteDataSource.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy - 16, // 18: envoy.config.core.v3.AsyncDataSource.local:type_name -> envoy.config.core.v3.DataSource - 18, // 19: envoy.config.core.v3.AsyncDataSource.remote:type_name -> envoy.config.core.v3.RemoteDataSource - 32, // 20: envoy.config.core.v3.TransportSocket.typed_config:type_name -> google.protobuf.Any - 25, // 21: envoy.config.core.v3.TransportSocket.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 33, // 22: envoy.config.core.v3.RuntimeFractionalPercent.default_value:type_name -> envoy.type.v3.FractionalPercent - 25, // 23: envoy.config.core.v3.Metadata.FilterMetadataEntry.value:type_name -> google.protobuf.Struct - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 28, // 0: envoy.config.core.v3.BuildVersion.version:type_name -> envoy.type.v3.SemanticVersion + 29, // 1: envoy.config.core.v3.BuildVersion.metadata:type_name -> google.protobuf.Struct + 5, // 2: envoy.config.core.v3.Extension.version:type_name -> envoy.config.core.v3.BuildVersion + 29, // 3: envoy.config.core.v3.Node.metadata:type_name -> google.protobuf.Struct + 25, // 4: envoy.config.core.v3.Node.dynamic_parameters:type_name -> envoy.config.core.v3.Node.DynamicParametersEntry + 4, // 5: envoy.config.core.v3.Node.locality:type_name -> envoy.config.core.v3.Locality + 5, // 6: envoy.config.core.v3.Node.user_agent_build_version:type_name -> envoy.config.core.v3.BuildVersion + 6, // 7: envoy.config.core.v3.Node.extensions:type_name -> envoy.config.core.v3.Extension + 30, // 8: envoy.config.core.v3.Node.listening_addresses:type_name -> envoy.config.core.v3.Address + 26, // 9: envoy.config.core.v3.Metadata.filter_metadata:type_name -> envoy.config.core.v3.Metadata.FilterMetadataEntry + 27, // 10: envoy.config.core.v3.Metadata.typed_filter_metadata:type_name -> envoy.config.core.v3.Metadata.TypedFilterMetadataEntry + 31, // 11: envoy.config.core.v3.RuntimePercent.default_value:type_name -> envoy.type.v3.Percent + 32, // 12: envoy.config.core.v3.RuntimeFeatureFlag.default_value:type_name -> google.protobuf.BoolValue + 14, // 13: envoy.config.core.v3.HeaderValueOption.header:type_name -> envoy.config.core.v3.HeaderValue + 32, // 14: envoy.config.core.v3.HeaderValueOption.append:type_name -> google.protobuf.BoolValue + 3, // 15: envoy.config.core.v3.HeaderValueOption.append_action:type_name -> envoy.config.core.v3.HeaderValueOption.HeaderAppendAction + 14, // 16: envoy.config.core.v3.HeaderMap.headers:type_name -> envoy.config.core.v3.HeaderValue + 33, // 17: envoy.config.core.v3.RetryPolicy.retry_back_off:type_name -> envoy.config.core.v3.BackoffStrategy + 34, // 18: envoy.config.core.v3.RetryPolicy.num_retries:type_name -> google.protobuf.UInt32Value + 35, // 19: envoy.config.core.v3.RemoteDataSource.http_uri:type_name -> envoy.config.core.v3.HttpUri + 19, // 20: envoy.config.core.v3.RemoteDataSource.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy + 18, // 21: envoy.config.core.v3.AsyncDataSource.local:type_name -> envoy.config.core.v3.DataSource + 20, // 22: envoy.config.core.v3.AsyncDataSource.remote:type_name -> envoy.config.core.v3.RemoteDataSource + 36, // 23: envoy.config.core.v3.TransportSocket.typed_config:type_name -> google.protobuf.Any + 37, // 24: envoy.config.core.v3.RuntimeFractionalPercent.default_value:type_name -> envoy.type.v3.FractionalPercent + 38, // 25: envoy.config.core.v3.Node.DynamicParametersEntry.value:type_name -> xds.core.v3.ContextParams + 29, // 26: envoy.config.core.v3.Metadata.FilterMetadataEntry.value:type_name -> google.protobuf.Struct + 36, // 27: envoy.config.core.v3.Metadata.TypedFilterMetadataEntry.value:type_name -> google.protobuf.Any + 28, // [28:28] is the sub-list for method output_type + 28, // [28:28] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_base_proto_init() } @@ -2183,7 +2378,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderValue); i { + switch v := v.(*QueryParameter); i { case 0: return &v.state case 1: @@ -2195,7 +2390,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderValueOption); i { + switch v := v.(*HeaderValue); i { case 0: return &v.state case 1: @@ -2207,7 +2402,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMap); i { + switch v := v.(*HeaderValueOption); i { case 0: return &v.state case 1: @@ -2219,7 +2414,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WatchedDirectory); i { + switch v := v.(*HeaderMap); i { case 0: return &v.state case 1: @@ -2231,7 +2426,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSource); i { + switch v := v.(*WatchedDirectory); i { case 0: return &v.state case 1: @@ -2243,7 +2438,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy); i { + switch v := v.(*DataSource); i { case 0: return &v.state case 1: @@ -2255,7 +2450,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoteDataSource); i { + switch v := v.(*RetryPolicy); i { case 0: return &v.state case 1: @@ -2267,7 +2462,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AsyncDataSource); i { + switch v := v.(*RemoteDataSource); i { case 0: return &v.state case 1: @@ -2279,7 +2474,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransportSocket); i { + switch v := v.(*AsyncDataSource); i { case 0: return &v.state case 1: @@ -2291,7 +2486,7 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeFractionalPercent); i { + switch v := v.(*TransportSocket); i { case 0: return &v.state case 1: @@ -2303,6 +2498,18 @@ func file_envoy_config_core_v3_base_proto_init() { } } file_envoy_config_core_v3_base_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RuntimeFractionalPercent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_base_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ControlPlane); i { case 0: return &v.state @@ -2319,26 +2526,26 @@ func file_envoy_config_core_v3_base_proto_init() { (*Node_UserAgentVersion)(nil), (*Node_UserAgentBuildVersion)(nil), } - file_envoy_config_core_v3_base_proto_msgTypes[13].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_base_proto_msgTypes[14].OneofWrappers = []interface{}{ (*DataSource_Filename)(nil), (*DataSource_InlineBytes)(nil), (*DataSource_InlineString)(nil), + (*DataSource_EnvironmentVariable)(nil), } - file_envoy_config_core_v3_base_proto_msgTypes[16].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_base_proto_msgTypes[17].OneofWrappers = []interface{}{ (*AsyncDataSource_Local)(nil), (*AsyncDataSource_Remote)(nil), } - file_envoy_config_core_v3_base_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_base_proto_msgTypes[18].OneofWrappers = []interface{}{ (*TransportSocket_TypedConfig)(nil), - (*TransportSocket_HiddenEnvoyDeprecatedConfig)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_core_v3_base_proto_rawDesc, - NumEnums: 3, - NumMessages: 21, + NumEnums: 4, + NumMessages: 24, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/core/v3/base.pb.validate.go b/pkg/api/envoy/config/core/v3/base.pb.validate.go index 7cbab94d64..69610293b2 100644 --- a/pkg/api/envoy/config/core/v3/base.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/base.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/base.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,61 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Locality with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Locality) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Locality with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LocalityMultiError, or nil +// if none found. +func (m *Locality) ValidateAll() error { + return m.validate(true) +} + +func (m *Locality) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Region // no validation rules for Zone // no validation rules for SubZone + if len(errors) > 0 { + return LocalityMultiError(errors) + } + return nil } +// LocalityMultiError is an error wrapping multiple validation errors returned +// by Locality.ValidateAll() if the designated constraints aren't met. +type LocalityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityMultiError) AllErrors() []error { return m } + // LocalityValidationError is the validation error returned by // Locality.Validate if the designated constraints aren't met. type LocalityValidationError struct { @@ -104,14 +141,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BuildVersion) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BuildVersion with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BuildVersionMultiError, or +// nil if none found. +func (m *BuildVersion) ValidateAll() error { + return m.validate(true) +} + +func (m *BuildVersion) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetVersion()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BuildVersionValidationError{ field: "Version", @@ -121,7 +191,26 @@ func (m *BuildVersion) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BuildVersionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BuildVersionValidationError{ field: "Metadata", @@ -131,9 +220,29 @@ func (m *BuildVersion) Validate() error { } } + if len(errors) > 0 { + return BuildVersionMultiError(errors) + } + return nil } +// BuildVersionMultiError is an error wrapping multiple validation errors +// returned by BuildVersion.ValidateAll() if the designated constraints aren't met. +type BuildVersionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BuildVersionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BuildVersionMultiError) AllErrors() []error { return m } + // BuildVersionValidationError is the validation error returned by // BuildVersion.Validate if the designated constraints aren't met. type BuildVersionValidationError struct { @@ -189,19 +298,53 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Extension) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Extension with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExtensionMultiError, or nil +// if none found. +func (m *Extension) ValidateAll() error { + return m.validate(true) +} + +func (m *Extension) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for Category // no validation rules for TypeDescriptor - if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetVersion()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionValidationError{ + field: "Version", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtensionValidationError{ field: "Version", @@ -213,9 +356,29 @@ func (m *Extension) Validate() error { // no validation rules for Disabled + if len(errors) > 0 { + return ExtensionMultiError(errors) + } + return nil } +// ExtensionMultiError is an error wrapping multiple validation errors returned +// by Extension.ValidateAll() if the designated constraints aren't met. +type ExtensionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtensionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtensionMultiError) AllErrors() []error { return m } + // ExtensionValidationError is the validation error returned by // Extension.Validate if the designated constraints aren't met. type ExtensionValidationError struct { @@ -271,17 +434,50 @@ var _ interface { } = 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. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Node) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Node with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in NodeMultiError, or nil if none found. +func (m *Node) ValidateAll() error { + return m.validate(true) +} + +func (m *Node) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Id // no validation rules for Cluster - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Metadata", @@ -291,7 +487,72 @@ func (m *Node) Validate() error { } } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + { + sorted_keys := make([]string, len(m.GetDynamicParameters())) + i := 0 + for key := range m.GetDynamicParameters() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetDynamicParameters()[key] + _ = val + + // no validation rules for DynamicParameters[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("DynamicParameters[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("DynamicParameters[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return NodeValidationError{ + field: fmt.Sprintf("DynamicParameters[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Locality", @@ -306,7 +567,26 @@ func (m *Node) Validate() error { for idx, item := range m.GetExtensions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("Extensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("Extensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: fmt.Sprintf("Extensions[%v]", idx), @@ -321,7 +601,26 @@ func (m *Node) Validate() error { for idx, item := range m.GetListeningAddresses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("ListeningAddresses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: fmt.Sprintf("ListeningAddresses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: fmt.Sprintf("ListeningAddresses[%v]", idx), @@ -333,8 +632,6 @@ func (m *Node) Validate() error { } - // no validation rules for HiddenEnvoyDeprecatedBuildVersion - switch m.UserAgentVersionType.(type) { case *Node_UserAgentVersion: @@ -342,7 +639,26 @@ func (m *Node) Validate() error { case *Node_UserAgentBuildVersion: - if v, ok := interface{}(m.GetUserAgentBuildVersion()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUserAgentBuildVersion()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeValidationError{ + field: "UserAgentBuildVersion", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeValidationError{ + field: "UserAgentBuildVersion", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUserAgentBuildVersion()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "UserAgentBuildVersion", @@ -354,9 +670,29 @@ func (m *Node) Validate() error { } + if len(errors) > 0 { + return NodeMultiError(errors) + } + return nil } +// NodeMultiError is an error wrapping multiple validation errors returned by +// Node.ValidateAll() if the designated constraints aren't met. +type NodeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NodeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NodeMultiError) AllErrors() []error { return m } + // NodeValidationError is the validation error returned by Node.Validate if the // designated constraints aren't met. type NodeValidationError struct { @@ -412,32 +748,142 @@ var _ interface { } = NodeValidationError{} // Validate checks the field values on Metadata with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Metadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Metadata with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataMultiError, or nil +// if none found. +func (m *Metadata) ValidateAll() error { + return m.validate(true) +} + +func (m *Metadata) validate(all bool) error { if m == nil { return nil } - for key, val := range m.GetFilterMetadata() { - _ = val + var errors []error - // no validation rules for FilterMetadata[key] + { + sorted_keys := make([]string, len(m.GetFilterMetadata())) + i := 0 + for key := range m.GetFilterMetadata() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetFilterMetadata()[key] + _ = val + + // no validation rules for FilterMetadata[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataValidationError{ + field: fmt.Sprintf("FilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataValidationError{ + field: fmt.Sprintf("FilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetadataValidationError{ + field: fmt.Sprintf("FilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataValidationError{ - field: fmt.Sprintf("FilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, + } + } + + { + sorted_keys := make([]string, len(m.GetTypedFilterMetadata())) + i := 0 + for key := range m.GetTypedFilterMetadata() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedFilterMetadata()[key] + _ = val + + // no validation rules for TypedFilterMetadata[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataValidationError{ + field: fmt.Sprintf("TypedFilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataValidationError{ + field: fmt.Sprintf("TypedFilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetadataValidationError{ + field: fmt.Sprintf("TypedFilterMetadata[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return MetadataMultiError(errors) } return nil } +// MetadataMultiError is an error wrapping multiple validation errors returned +// by Metadata.ValidateAll() if the designated constraints aren't met. +type MetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMultiError) AllErrors() []error { return m } + // MetadataValidationError is the validation error returned by // Metadata.Validate if the designated constraints aren't met. type MetadataValidationError struct { @@ -493,25 +939,64 @@ var _ interface { } = MetadataValidationError{} // Validate checks the field values on RuntimeUInt32 with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeUInt32) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeUInt32 with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeUInt32MultiError, or +// nil if none found. +func (m *RuntimeUInt32) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeUInt32) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for DefaultValue if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeUInt32ValidationError{ + err := RuntimeUInt32ValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RuntimeUInt32MultiError(errors) } return nil } +// RuntimeUInt32MultiError is an error wrapping multiple validation errors +// returned by RuntimeUInt32.ValidateAll() if the designated constraints +// aren't met. +type RuntimeUInt32MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeUInt32MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeUInt32MultiError) AllErrors() []error { return m } + // RuntimeUInt32ValidationError is the validation error returned by // RuntimeUInt32.Validate if the designated constraints aren't met. type RuntimeUInt32ValidationError struct { @@ -567,14 +1052,47 @@ var _ interface { } = RuntimeUInt32ValidationError{} // Validate checks the field values on RuntimePercent with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimePercent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimePercent with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimePercentMultiError, +// or nil if none found. +func (m *RuntimePercent) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimePercent) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetDefaultValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimePercentValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimePercentValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimePercentValidationError{ field: "DefaultValue", @@ -585,15 +1103,40 @@ func (m *RuntimePercent) Validate() error { } if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimePercentValidationError{ + err := RuntimePercentValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RuntimePercentMultiError(errors) } return nil } +// RuntimePercentMultiError is an error wrapping multiple validation errors +// returned by RuntimePercent.ValidateAll() if the designated constraints +// aren't met. +type RuntimePercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimePercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimePercentMultiError) AllErrors() []error { return m } + // RuntimePercentValidationError is the validation error returned by // RuntimePercent.Validate if the designated constraints aren't met. type RuntimePercentValidationError struct { @@ -649,25 +1192,64 @@ var _ interface { } = RuntimePercentValidationError{} // Validate checks the field values on RuntimeDouble with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeDouble) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeDouble with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeDoubleMultiError, or +// nil if none found. +func (m *RuntimeDouble) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeDouble) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for DefaultValue if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeDoubleValidationError{ + err := RuntimeDoubleValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RuntimeDoubleMultiError(errors) } return nil } +// RuntimeDoubleMultiError is an error wrapping multiple validation errors +// returned by RuntimeDouble.ValidateAll() if the designated constraints +// aren't met. +type RuntimeDoubleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeDoubleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeDoubleMultiError) AllErrors() []error { return m } + // RuntimeDoubleValidationError is the validation error returned by // RuntimeDouble.Validate if the designated constraints aren't met. type RuntimeDoubleValidationError struct { @@ -724,20 +1306,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeFeatureFlag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeFeatureFlag with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeFeatureFlagMultiError, or nil if none found. +func (m *RuntimeFeatureFlag) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeFeatureFlag) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDefaultValue() == nil { - return RuntimeFeatureFlagValidationError{ + err := RuntimeFeatureFlagValidationError{ field: "DefaultValue", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeFeatureFlagValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeFeatureFlagValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFeatureFlagValidationError{ field: "DefaultValue", @@ -748,15 +1367,40 @@ func (m *RuntimeFeatureFlag) Validate() error { } if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeFeatureFlagValidationError{ + err := RuntimeFeatureFlagValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RuntimeFeatureFlagMultiError(errors) } return nil } +// RuntimeFeatureFlagMultiError is an error wrapping multiple validation errors +// returned by RuntimeFeatureFlag.ValidateAll() if the designated constraints +// aren't met. +type RuntimeFeatureFlagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeFeatureFlagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeFeatureFlagMultiError) AllErrors() []error { return m } + // RuntimeFeatureFlagValidationError is the validation error returned by // RuntimeFeatureFlag.Validate if the designated constraints aren't met. type RuntimeFeatureFlagValidationError struct { @@ -813,52 +1457,219 @@ var _ interface { ErrorName() string } = RuntimeFeatureFlagValidationError{} +// Validate checks the field values on QueryParameter with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *QueryParameter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QueryParameter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in QueryParameterMultiError, +// or nil if none found. +func (m *QueryParameter) ValidateAll() error { + return m.validate(true) +} + +func (m *QueryParameter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := QueryParameterValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Value + + if len(errors) > 0 { + return QueryParameterMultiError(errors) + } + + return nil +} + +// QueryParameterMultiError is an error wrapping multiple validation errors +// returned by QueryParameter.ValidateAll() if the designated constraints +// aren't met. +type QueryParameterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QueryParameterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QueryParameterMultiError) AllErrors() []error { return m } + +// QueryParameterValidationError is the validation error returned by +// QueryParameter.Validate if the designated constraints aren't met. +type QueryParameterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e QueryParameterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e QueryParameterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e QueryParameterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e QueryParameterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e QueryParameterValidationError) ErrorName() string { return "QueryParameterValidationError" } + +// Error satisfies the builtin error interface +func (e QueryParameterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sQueryParameter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = QueryParameterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = QueryParameterValidationError{} + // Validate checks the field values on HeaderValue with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderValue) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderValue with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderValueMultiError, or +// nil if none found. +func (m *HeaderValue) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderValue) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetKey()) < 1 { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetKey()) > 16384 { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Key", reason: "value length must be at most 16384 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_HeaderValue_Key_Pattern.MatchString(m.GetKey()) { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Key", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetValue()) > 16384 { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Value", reason: "value length must be at most 16384 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_HeaderValue_Value_Pattern.MatchString(m.GetValue()) { - return HeaderValueValidationError{ + err := HeaderValueValidationError{ field: "Value", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HeaderValueMultiError(errors) } return nil } +// HeaderValueMultiError is an error wrapping multiple validation errors +// returned by HeaderValue.ValidateAll() if the designated constraints aren't met. +type HeaderValueMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderValueMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderValueMultiError) AllErrors() []error { return m } + // HeaderValueValidationError is the validation error returned by // HeaderValue.Validate if the designated constraints aren't met. type HeaderValueValidationError struct { @@ -918,21 +1729,58 @@ 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HeaderValueOption) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderValueOption with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HeaderValueOptionMultiError, or nil if none found. +func (m *HeaderValueOption) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderValueOption) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHeader() == nil { - return HeaderValueOptionValidationError{ + err := HeaderValueOptionValidationError{ field: "Header", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Header", @@ -942,7 +1790,26 @@ func (m *HeaderValueOption) Validate() error { } } - if v, ok := interface{}(m.GetAppend()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAppend()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Append", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderValueOptionValidationError{ + field: "Append", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAppend()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Append", @@ -952,9 +1819,41 @@ func (m *HeaderValueOption) Validate() error { } } + if _, ok := HeaderValueOption_HeaderAppendAction_name[int32(m.GetAppendAction())]; !ok { + err := HeaderValueOptionValidationError{ + field: "AppendAction", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HeaderValueOptionMultiError(errors) + } + return nil } +// HeaderValueOptionMultiError is an error wrapping multiple validation errors +// returned by HeaderValueOption.ValidateAll() if the designated constraints +// aren't met. +type HeaderValueOptionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderValueOptionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderValueOptionMultiError) AllErrors() []error { return m } + // HeaderValueOptionValidationError is the validation error returned by // HeaderValueOption.Validate if the designated constraints aren't met. type HeaderValueOptionValidationError struct { @@ -1012,16 +1911,50 @@ var _ interface { } = HeaderValueOptionValidationError{} // Validate checks the field values on HeaderMap with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderMap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMap with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderMapMultiError, or nil +// if none found. +func (m *HeaderMap) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMap) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMapValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMapValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMapValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -1033,9 +1966,29 @@ func (m *HeaderMap) Validate() error { } + if len(errors) > 0 { + return HeaderMapMultiError(errors) + } + return nil } +// HeaderMapMultiError is an error wrapping multiple validation errors returned +// by HeaderMap.ValidateAll() if the designated constraints aren't met. +type HeaderMapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMapMultiError) AllErrors() []error { return m } + // HeaderMapValidationError is the validation error returned by // HeaderMap.Validate if the designated constraints aren't met. type HeaderMapValidationError struct { @@ -1091,23 +2044,62 @@ var _ interface { } = HeaderMapValidationError{} // Validate checks the field values on WatchedDirectory with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *WatchedDirectory) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WatchedDirectory with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// WatchedDirectoryMultiError, or nil if none found. +func (m *WatchedDirectory) ValidateAll() error { + return m.validate(true) +} + +func (m *WatchedDirectory) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetPath()) < 1 { - return WatchedDirectoryValidationError{ + err := WatchedDirectoryValidationError{ field: "Path", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return WatchedDirectoryMultiError(errors) } return nil } +// WatchedDirectoryMultiError is an error wrapping multiple validation errors +// returned by WatchedDirectory.ValidateAll() if the designated constraints +// aren't met. +type WatchedDirectoryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WatchedDirectoryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WatchedDirectoryMultiError) AllErrors() []error { return m } + // WatchedDirectoryValidationError is the validation error returned by // WatchedDirectory.Validate if the designated constraints aren't met. type WatchedDirectoryValidationError struct { @@ -1163,21 +2155,40 @@ var _ interface { } = WatchedDirectoryValidationError{} // Validate checks the field values on DataSource with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DataSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DataSource with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DataSourceMultiError, or +// nil if none found. +func (m *DataSource) ValidateAll() error { + return m.validate(true) +} + +func (m *DataSource) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Specifier.(type) { case *DataSource_Filename: if utf8.RuneCountInString(m.GetFilename()) < 1 { - return DataSourceValidationError{ + err := DataSourceValidationError{ field: "Filename", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *DataSource_InlineBytes: @@ -1186,17 +2197,54 @@ func (m *DataSource) Validate() error { case *DataSource_InlineString: // no validation rules for InlineString + case *DataSource_EnvironmentVariable: + + if utf8.RuneCountInString(m.GetEnvironmentVariable()) < 1 { + err := DataSourceValidationError{ + field: "EnvironmentVariable", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + default: - return DataSourceValidationError{ + err := DataSourceValidationError{ field: "Specifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return DataSourceMultiError(errors) } return nil } +// DataSourceMultiError is an error wrapping multiple validation errors +// returned by DataSource.ValidateAll() if the designated constraints aren't met. +type DataSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DataSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DataSourceMultiError) AllErrors() []error { return m } + // DataSourceValidationError is the validation error returned by // DataSource.Validate if the designated constraints aren't met. type DataSourceValidationError struct { @@ -1252,14 +2300,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RetryPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RetryPolicyMultiError, or +// nil if none found. +func (m *RetryPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRetryBackOff()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryBackOff", @@ -1269,7 +2350,26 @@ func (m *RetryPolicy) Validate() error { } } - if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNumRetries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "NumRetries", @@ -1279,9 +2379,29 @@ func (m *RetryPolicy) Validate() error { } } + if len(errors) > 0 { + return RetryPolicyMultiError(errors) + } + return nil } +// RetryPolicyMultiError is an error wrapping multiple validation errors +// returned by RetryPolicy.ValidateAll() if the designated constraints aren't met. +type RetryPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicyMultiError) AllErrors() []error { return m } + // RetryPolicyValidationError is the validation error returned by // RetryPolicy.Validate if the designated constraints aren't met. type RetryPolicyValidationError struct { @@ -1337,21 +2457,58 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RemoteDataSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoteDataSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RemoteDataSourceMultiError, or nil if none found. +func (m *RemoteDataSource) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoteDataSource) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHttpUri() == nil { - return RemoteDataSourceValidationError{ + err := RemoteDataSourceValidationError{ field: "HttpUri", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteDataSourceValidationError{ field: "HttpUri", @@ -1362,13 +2519,36 @@ func (m *RemoteDataSource) Validate() error { } if utf8.RuneCountInString(m.GetSha256()) < 1 { - return RemoteDataSourceValidationError{ + err := RemoteDataSourceValidationError{ field: "Sha256", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteDataSourceValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteDataSourceValidationError{ field: "RetryPolicy", @@ -1378,9 +2558,30 @@ func (m *RemoteDataSource) Validate() error { } } + if len(errors) > 0 { + return RemoteDataSourceMultiError(errors) + } + return nil } +// RemoteDataSourceMultiError is an error wrapping multiple validation errors +// returned by RemoteDataSource.ValidateAll() if the designated constraints +// aren't met. +type RemoteDataSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoteDataSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoteDataSourceMultiError) AllErrors() []error { return m } + // RemoteDataSourceValidationError is the validation error returned by // RemoteDataSource.Validate if the designated constraints aren't met. type RemoteDataSourceValidationError struct { @@ -1436,18 +2637,51 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AsyncDataSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AsyncDataSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AsyncDataSourceMultiError, or nil if none found. +func (m *AsyncDataSource) ValidateAll() error { + return m.validate(true) +} + +func (m *AsyncDataSource) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Specifier.(type) { case *AsyncDataSource_Local: - if v, ok := interface{}(m.GetLocal()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocal()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Local", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Local", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocal()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AsyncDataSourceValidationError{ field: "Local", @@ -1459,7 +2693,26 @@ func (m *AsyncDataSource) Validate() error { case *AsyncDataSource_Remote: - if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemote()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Remote", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AsyncDataSourceValidationError{ + field: "Remote", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AsyncDataSourceValidationError{ field: "Remote", @@ -1470,16 +2723,41 @@ func (m *AsyncDataSource) Validate() error { } default: - return AsyncDataSourceValidationError{ + err := AsyncDataSourceValidationError{ field: "Specifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return AsyncDataSourceMultiError(errors) } return nil } +// AsyncDataSourceMultiError is an error wrapping multiple validation errors +// returned by AsyncDataSource.ValidateAll() if the designated constraints +// aren't met. +type AsyncDataSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AsyncDataSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AsyncDataSourceMultiError) AllErrors() []error { return m } + // AsyncDataSourceValidationError is the validation error returned by // AsyncDataSource.Validate if the designated constraints aren't met. type AsyncDataSourceValidationError struct { @@ -1535,40 +2813,65 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TransportSocket) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TransportSocket with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TransportSocketMultiError, or nil if none found. +func (m *TransportSocket) ValidateAll() error { + return m.validate(true) +} + +func (m *TransportSocket) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return TransportSocketValidationError{ + err := TransportSocketValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *TransportSocket_TypedConfig: - 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TransportSocketValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TransportSocketValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *TransportSocket_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TransportSocketValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -1577,9 +2880,30 @@ func (m *TransportSocket) Validate() error { } + if len(errors) > 0 { + return TransportSocketMultiError(errors) + } + return nil } +// TransportSocketMultiError is an error wrapping multiple validation errors +// returned by TransportSocket.ValidateAll() if the designated constraints +// aren't met. +type TransportSocketMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TransportSocketMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TransportSocketMultiError) AllErrors() []error { return m } + // TransportSocketValidationError is the validation error returned by // TransportSocket.Validate if the designated constraints aren't met. type TransportSocketValidationError struct { @@ -1636,20 +2960,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RuntimeFractionalPercent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeFractionalPercent with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RuntimeFractionalPercentMultiError, or nil if none found. +func (m *RuntimeFractionalPercent) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeFractionalPercent) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDefaultValue() == nil { - return RuntimeFractionalPercentValidationError{ + err := RuntimeFractionalPercentValidationError{ field: "DefaultValue", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeFractionalPercentValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeFractionalPercentValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFractionalPercentValidationError{ field: "DefaultValue", @@ -1661,9 +3022,30 @@ func (m *RuntimeFractionalPercent) Validate() error { // no validation rules for RuntimeKey + if len(errors) > 0 { + return RuntimeFractionalPercentMultiError(errors) + } + return nil } +// RuntimeFractionalPercentMultiError is an error wrapping multiple validation +// errors returned by RuntimeFractionalPercent.ValidateAll() if the designated +// constraints aren't met. +type RuntimeFractionalPercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeFractionalPercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeFractionalPercentMultiError) AllErrors() []error { return m } + // RuntimeFractionalPercentValidationError is the validation error returned by // RuntimeFractionalPercent.Validate if the designated constraints aren't met. type RuntimeFractionalPercentValidationError struct { @@ -1721,18 +3103,52 @@ var _ interface { } = RuntimeFractionalPercentValidationError{} // Validate checks the field values on ControlPlane with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ControlPlane) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ControlPlane with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ControlPlaneMultiError, or +// nil if none found. +func (m *ControlPlane) ValidateAll() error { + return m.validate(true) +} + +func (m *ControlPlane) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Identifier + if len(errors) > 0 { + return ControlPlaneMultiError(errors) + } + return nil } +// ControlPlaneMultiError is an error wrapping multiple validation errors +// returned by ControlPlane.ValidateAll() if the designated constraints aren't met. +type ControlPlaneMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ControlPlaneMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ControlPlaneMultiError) AllErrors() []error { return m } + // ControlPlaneValidationError is the validation error returned by // ControlPlane.Validate if the designated constraints aren't met. type ControlPlaneValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/config_source.pb.go b/pkg/api/envoy/config/core/v3/config_source.pb.go index a517d90fdf..89583b2039 100644 --- a/pkg/api/envoy/config/core/v3/config_source.pb.go +++ b/pkg/api/envoy/config/core/v3/config_source.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/config_source.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/cncf/udpa/go/xds/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/cncf/xds/go/xds/core/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _ "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" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // xDS API and non-xDS services version. This is used to describe both resource and transport // protocol versions (in distinct configuration fields). type ApiVersion int32 @@ -99,7 +95,7 @@ const ( // value. Instead we throw an exception if this is ever used. // // Deprecated: Do not use. - ApiConfigSource_hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY ApiConfigSource_ApiType = 0 + ApiConfigSource_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE ApiConfigSource_ApiType = 0 // REST-JSON v2 API. The `canonical JSON encoding // `_ for // the v2 protos is used. @@ -123,7 +119,7 @@ const ( // Enum value maps for ApiConfigSource_ApiType. var ( ApiConfigSource_ApiType_name = map[int32]string{ - 0: "hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY", + 0: "DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE", 1: "REST", 2: "GRPC", 3: "DELTA_GRPC", @@ -131,12 +127,12 @@ var ( 6: "AGGREGATED_DELTA_GRPC", } ApiConfigSource_ApiType_value = map[string]int32{ - "hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY": 0, - "REST": 1, - "GRPC": 2, - "DELTA_GRPC": 3, - "AGGREGATED_GRPC": 5, - "AGGREGATED_DELTA_GRPC": 6, + "DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE": 0, + "REST": 1, + "GRPC": 2, + "DELTA_GRPC": 3, + "AGGREGATED_GRPC": 5, + "AGGREGATED_DELTA_GRPC": 6, } ) @@ -169,7 +165,7 @@ func (ApiConfigSource_ApiType) EnumDescriptor() ([]byte, []int) { // API configuration source. This identifies the API type and cluster that Envoy // will use to fetch an xDS API. -// [#next-free-field: 9] +// [#next-free-field: 10] type ApiConfigSource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -201,6 +197,15 @@ type ApiConfigSource struct { RateLimitSettings *RateLimitSettings `protobuf:"bytes,6,opt,name=rate_limit_settings,json=rateLimitSettings,proto3" json:"rate_limit_settings,omitempty"` // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. SetNodeOnFirstMessageOnly bool `protobuf:"varint,7,opt,name=set_node_on_first_message_only,json=setNodeOnFirstMessageOnly,proto3" json:"set_node_on_first_message_only,omitempty"` + // A list of config validators that will be executed when a new update is + // received from the ApiConfigSource. Note that each validator handles a + // specific xDS service type, and only the validators corresponding to the + // type url (in `:ref: DiscoveryResponse` or `:ref: DeltaDiscoveryResponse`) + // will be invoked. + // If the validator returns false or throws an exception, the config will be rejected by + // the client, and a NACK will be sent. + // [#extension-category: envoy.config.validators] + ConfigValidators []*TypedExtensionConfig `protobuf:"bytes,9,rep,name=config_validators,json=configValidators,proto3" json:"config_validators,omitempty"` } func (x *ApiConfigSource) Reset() { @@ -239,7 +244,7 @@ func (x *ApiConfigSource) GetApiType() ApiConfigSource_ApiType { if x != nil { return x.ApiType } - return ApiConfigSource_hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY + return ApiConfigSource_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE } func (x *ApiConfigSource) GetTransportApiVersion() ApiVersion { @@ -291,8 +296,15 @@ func (x *ApiConfigSource) GetSetNodeOnFirstMessageOnly() bool { return false } +func (x *ApiConfigSource) GetConfigValidators() []*TypedExtensionConfig { + if x != nil { + return x.ConfigValidators + } + return nil +} + // Aggregated Discovery Service (ADS) options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to +// set in :ref:`ConfigSource ` can be used to // specify that ADS is to be used. type AggregatedConfigSource struct { state protoimpl.MessageState @@ -334,7 +346,7 @@ func (*AggregatedConfigSource) Descriptor() ([]byte, []int) { // [#not-implemented-hide:] // Self-referencing config source options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to +// set in :ref:`ConfigSource ` can be used to // specify that other data can be obtained from the same server. type SelfConfigSource struct { state protoimpl.MessageState @@ -445,13 +457,98 @@ func (x *RateLimitSettings) GetFillRate() *wrappers.DoubleValue { return nil } +// Local filesystem path configuration source. +type PathConfigSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Path on the filesystem to source and watch for configuration updates. + // When sourcing configuration for a :ref:`secret `, + // the certificate and key files are also watched for updates. + // + // .. note:: + // + // The path to the source must exist at config load time. + // + // .. note:: + // + // If `watched_directory` is *not* configured, Envoy will watch the file path for *moves.* + // This is because in general only moves are atomic. The same method of swapping files as is + // demonstrated in the :ref:`runtime documentation ` can be + // used here also. If `watched_directory` is configured, no watch will be placed directly on + // this path. Instead, the configured `watched_directory` will be used to trigger reloads of + // this path. This is required in certain deployment scenarios. See below for more information. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // If configured, this directory will be watched for *moves.* When an entry in this directory is + // moved to, the `path` will be reloaded. This is required in certain deployment scenarios. + // + // Specifically, if trying to load an xDS resource using a + // `Kubernetes ConfigMap `_, the + // following configuration might be used: + // 1. Store xds.yaml inside a ConfigMap. + // 2. Mount the ConfigMap to `/config_map/xds` + // 3. Configure path `/config_map/xds/xds.yaml` + // 4. Configure watched directory `/config_map/xds` + // + // The above configuration will ensure that Envoy watches the owning directory for moves which is + // required due to how Kubernetes manages ConfigMap symbolic links during atomic updates. + WatchedDirectory *WatchedDirectory `protobuf:"bytes,2,opt,name=watched_directory,json=watchedDirectory,proto3" json:"watched_directory,omitempty"` +} + +func (x *PathConfigSource) Reset() { + *x = PathConfigSource{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathConfigSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathConfigSource) ProtoMessage() {} + +func (x *PathConfigSource) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathConfigSource.ProtoReflect.Descriptor instead. +func (*PathConfigSource) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{4} +} + +func (x *PathConfigSource) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *PathConfigSource) GetWatchedDirectory() *WatchedDirectory { + if x != nil { + return x.WatchedDirectory + } + return nil +} + // Configuration for :ref:`listeners `, :ref:`clusters // `, :ref:`routes -// `, :ref:`endpoints +// `, :ref:`endpoints // ` etc. may either be sourced from the // filesystem or from an xDS API source. Filesystem configs are watched with // inotify for updates. -// [#next-free-field: 8] +// [#next-free-field: 9] type ConfigSource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -464,6 +561,7 @@ type ConfigSource struct { Authorities []*v3.Authority `protobuf:"bytes,7,rep,name=authorities,proto3" json:"authorities,omitempty"` // Types that are assignable to ConfigSourceSpecifier: // *ConfigSource_Path + // *ConfigSource_PathConfigSource // *ConfigSource_ApiConfigSource // *ConfigSource_Ads // *ConfigSource_Self @@ -485,7 +583,7 @@ type ConfigSource struct { func (x *ConfigSource) Reset() { *x = ConfigSource{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[4] + mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -498,7 +596,7 @@ func (x *ConfigSource) String() string { func (*ConfigSource) ProtoMessage() {} func (x *ConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[4] + mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -511,7 +609,7 @@ func (x *ConfigSource) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigSource.ProtoReflect.Descriptor instead. func (*ConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{4} + return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{5} } func (x *ConfigSource) GetAuthorities() []*v3.Authority { @@ -528,6 +626,7 @@ func (m *ConfigSource) GetConfigSourceSpecifier() isConfigSource_ConfigSourceSpe return nil } +// Deprecated: Do not use. func (x *ConfigSource) GetPath() string { if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_Path); ok { return x.Path @@ -535,6 +634,13 @@ func (x *ConfigSource) GetPath() string { return "" } +func (x *ConfigSource) GetPathConfigSource() *PathConfigSource { + if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_PathConfigSource); ok { + return x.PathConfigSource + } + return nil +} + func (x *ConfigSource) GetApiConfigSource() *ApiConfigSource { if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_ApiConfigSource); ok { return x.ApiConfigSource @@ -575,22 +681,17 @@ type isConfigSource_ConfigSourceSpecifier interface { } type ConfigSource_Path struct { - // Path on the filesystem to source and watch for configuration updates. - // When sourcing configuration for :ref:`secret `, - // the certificate and key files are also watched for updates. - // - // .. note:: - // - // The path to the source must exist at config load time. - // - // .. note:: + // Deprecated in favor of `path_config_source`. Use that field instead. // - // Envoy will only watch the file path for *moves.* This is because in general only moves - // are atomic. The same method of swapping files as is demonstrated in the - // :ref:`runtime documentation ` can be used here also. + // Deprecated: Do not use. Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` } +type ConfigSource_PathConfigSource struct { + // Local filesystem path configuration source. + PathConfigSource *PathConfigSource `protobuf:"bytes,8,opt,name=path_config_source,json=pathConfigSource,proto3,oneof"` +} + type ConfigSource_ApiConfigSource struct { // API configuration source. ApiConfigSource *ApiConfigSource `protobuf:"bytes,2,opt,name=api_config_source,json=apiConfigSource,proto3,oneof"` @@ -606,7 +707,7 @@ type ConfigSource_Self struct { // [#not-implemented-hide:] // When set, the client will access the resources from the same server it got the // ConfigSource from, although not necessarily from the same stream. This is similar to the - // :ref:`ads` field, except that the client may use a + // :ref:`ads` field, except that the client may use a // different stream to the same server. As a result, this field can be used for things // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) // LDS to RDS on the same server without requiring the management server to know its name @@ -619,12 +720,104 @@ type ConfigSource_Self struct { func (*ConfigSource_Path) isConfigSource_ConfigSourceSpecifier() {} +func (*ConfigSource_PathConfigSource) isConfigSource_ConfigSourceSpecifier() {} + func (*ConfigSource_ApiConfigSource) isConfigSource_ConfigSourceSpecifier() {} func (*ConfigSource_Ads) isConfigSource_ConfigSourceSpecifier() {} func (*ConfigSource_Self) isConfigSource_ConfigSourceSpecifier() {} +// Configuration source specifier for a late-bound extension configuration. The +// parent resource is warmed until all the initial extension configurations are +// received, unless the flag to apply the default configuration is set. +// Subsequent extension updates are atomic on a per-worker basis. Once an +// extension configuration is applied to a request or a connection, it remains +// constant for the duration of processing. If the initial delivery of the +// extension configuration fails, due to a timeout for example, the optional +// default configuration is applied. Without a default configuration, the +// extension is disabled, until an extension configuration is received. The +// behavior of a disabled extension depends on the context. For example, a +// filter chain with a disabled extension filter rejects all incoming streams. +type ExtensionConfigSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConfigSource *ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + // Optional default configuration to use as the initial configuration if + // there is a failure to receive the initial extension configuration or if + // `apply_default_config_without_warming` flag is set. + DefaultConfig *any.Any `protobuf:"bytes,2,opt,name=default_config,json=defaultConfig,proto3" json:"default_config,omitempty"` + // Use the default config as the initial configuration without warming and + // waiting for the first discovery response. Requires the default configuration + // to be supplied. + ApplyDefaultConfigWithoutWarming bool `protobuf:"varint,3,opt,name=apply_default_config_without_warming,json=applyDefaultConfigWithoutWarming,proto3" json:"apply_default_config_without_warming,omitempty"` + // A set of permitted extension type URLs. Extension configuration updates are rejected + // if they do not match any type URL in the set. + TypeUrls []string `protobuf:"bytes,4,rep,name=type_urls,json=typeUrls,proto3" json:"type_urls,omitempty"` +} + +func (x *ExtensionConfigSource) Reset() { + *x = ExtensionConfigSource{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtensionConfigSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtensionConfigSource) ProtoMessage() {} + +func (x *ExtensionConfigSource) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtensionConfigSource.ProtoReflect.Descriptor instead. +func (*ExtensionConfigSource) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{6} +} + +func (x *ExtensionConfigSource) GetConfigSource() *ConfigSource { + if x != nil { + return x.ConfigSource + } + return nil +} + +func (x *ExtensionConfigSource) GetDefaultConfig() *any.Any { + if x != nil { + return x.DefaultConfig + } + return nil +} + +func (x *ExtensionConfigSource) GetApplyDefaultConfigWithoutWarming() bool { + if x != nil { + return x.ApplyDefaultConfigWithoutWarming + } + return false +} + +func (x *ExtensionConfigSource) GetTypeUrls() []string { + if x != nil { + return x.TypeUrls + } + return nil +} + var File_envoy_config_core_v3_config_source_proto protoreflect.FileDescriptor var file_envoy_config_core_v3_config_source_proto_rawDesc = []byte{ @@ -632,143 +825,192 @@ var file_envoy_config_core_v3_config_source_proto_rawDesc = []byte{ 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x06, 0x0a, 0x0f, 0x41, 0x70, 0x69, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x08, 0x61, 0x70, - 0x69, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x65, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x78, 0x64, 0x73, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x06, 0x0a, 0x0f, 0x41, 0x70, 0x69, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x08, + 0x61, 0x70, 0x69, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, + 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2e, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5e, - 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, - 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0c, 0x67, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x72, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x4c, 0x0a, 0x0f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x0c, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, + 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x57, 0x0a, 0x13, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x41, 0x0a, 0x1e, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6f, - 0x6e, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, - 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x4f, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x9c, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x3d, 0x0a, 0x2f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x55, 0x4e, 0x53, - 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x54, 0x5f, 0x4c, 0x45, - 0x47, 0x41, 0x43, 0x59, 0x10, 0x00, 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, - 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x52, - 0x50, 0x43, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, 0x52, - 0x50, 0x43, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, - 0x45, 0x44, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x47, 0x47, - 0x52, 0x45, 0x47, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, 0x52, - 0x50, 0x43, 0x10, 0x06, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, - 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x49, - 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, - 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x10, 0x53, 0x65, - 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x5e, - 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x29, - 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x11, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x3b, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x09, - 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0e, 0xfa, - 0x42, 0x0b, 0x12, 0x09, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x08, 0x66, - 0x69, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x22, 0xa7, 0x04, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x14, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x11, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x70, 0x69, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x61, 0x64, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x73, - 0x65, 0x6c, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x48, 0x00, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x66, 0x12, 0x4d, 0x0a, 0x15, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x5c, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, - 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x70, 0x69, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x1e, 0x0a, - 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x2e, 0x0a, - 0x0a, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x04, 0x41, - 0x55, 0x54, 0x4f, 0x10, 0x00, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0a, 0x0a, 0x02, 0x56, 0x32, 0x10, - 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x33, 0x10, 0x02, 0x42, 0x41, 0x0a, - 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x4c, 0x0a, + 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x57, 0x0a, 0x13, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x1e, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x65, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4f, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x57, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x22, 0x92, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x25, + 0x44, 0x45, 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x55, + 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, + 0x52, 0x50, 0x43, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, + 0x52, 0x50, 0x43, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, + 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x47, + 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, + 0x52, 0x50, 0x43, 0x10, 0x06, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, + 0x49, 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, + 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x10, 0x53, + 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, + 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x11, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x3b, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x49, 0x0a, + 0x09, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0e, + 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x08, + 0x66, 0x69, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, + 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x8c, 0x05, 0x0a, 0x0c, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0b, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, + 0x30, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x56, 0x0a, 0x12, 0x70, 0x61, 0x74, + 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, + 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x10, 0x70, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x53, 0x0a, 0x11, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x42, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x61, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x66, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, + 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, + 0x52, 0x04, 0x73, 0x65, 0x6c, 0x66, 0x12, 0x4d, 0x0a, 0x15, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x5c, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x1e, 0x0a, 0x17, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9e, 0x02, 0x0a, 0x15, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x24, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x77, 0x69, 0x74, + 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x57, 0x61, 0x72, + 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x73, 0x2a, 0x40, 0x0a, 0x0a, 0x41, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x04, 0x41, 0x55, 0x54, + 0x4f, 0x10, 0x00, 0x1a, 0x0b, 0x08, 0x01, 0x8a, 0xf4, 0x9b, 0xb3, 0x05, 0x03, 0x33, 0x2e, 0x30, + 0x12, 0x13, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x01, 0x1a, 0x0b, 0x08, 0x01, 0x8a, 0xf4, 0x9b, 0xb3, + 0x05, 0x03, 0x33, 0x2e, 0x30, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x33, 0x10, 0x02, 0x42, 0x85, 0x01, + 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -784,7 +1026,7 @@ func file_envoy_config_core_v3_config_source_proto_rawDescGZIP() []byte { } var file_envoy_config_core_v3_config_source_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_config_core_v3_config_source_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_config_core_v3_config_source_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_envoy_config_core_v3_config_source_proto_goTypes = []interface{}{ (ApiVersion)(0), // 0: envoy.config.core.v3.ApiVersion (ApiConfigSource_ApiType)(0), // 1: envoy.config.core.v3.ApiConfigSource.ApiType @@ -792,34 +1034,44 @@ var file_envoy_config_core_v3_config_source_proto_goTypes = []interface{}{ (*AggregatedConfigSource)(nil), // 3: envoy.config.core.v3.AggregatedConfigSource (*SelfConfigSource)(nil), // 4: envoy.config.core.v3.SelfConfigSource (*RateLimitSettings)(nil), // 5: envoy.config.core.v3.RateLimitSettings - (*ConfigSource)(nil), // 6: envoy.config.core.v3.ConfigSource - (*GrpcService)(nil), // 7: envoy.config.core.v3.GrpcService - (*duration.Duration)(nil), // 8: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value - (*wrappers.DoubleValue)(nil), // 10: google.protobuf.DoubleValue - (*v3.Authority)(nil), // 11: xds.core.v3.Authority + (*PathConfigSource)(nil), // 6: envoy.config.core.v3.PathConfigSource + (*ConfigSource)(nil), // 7: envoy.config.core.v3.ConfigSource + (*ExtensionConfigSource)(nil), // 8: envoy.config.core.v3.ExtensionConfigSource + (*GrpcService)(nil), // 9: envoy.config.core.v3.GrpcService + (*duration.Duration)(nil), // 10: google.protobuf.Duration + (*TypedExtensionConfig)(nil), // 11: envoy.config.core.v3.TypedExtensionConfig + (*wrappers.UInt32Value)(nil), // 12: google.protobuf.UInt32Value + (*wrappers.DoubleValue)(nil), // 13: google.protobuf.DoubleValue + (*WatchedDirectory)(nil), // 14: envoy.config.core.v3.WatchedDirectory + (*v3.Authority)(nil), // 15: xds.core.v3.Authority + (*any.Any)(nil), // 16: google.protobuf.Any } var file_envoy_config_core_v3_config_source_proto_depIdxs = []int32{ 1, // 0: envoy.config.core.v3.ApiConfigSource.api_type:type_name -> envoy.config.core.v3.ApiConfigSource.ApiType 0, // 1: envoy.config.core.v3.ApiConfigSource.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion - 7, // 2: envoy.config.core.v3.ApiConfigSource.grpc_services:type_name -> envoy.config.core.v3.GrpcService - 8, // 3: envoy.config.core.v3.ApiConfigSource.refresh_delay:type_name -> google.protobuf.Duration - 8, // 4: envoy.config.core.v3.ApiConfigSource.request_timeout:type_name -> google.protobuf.Duration + 9, // 2: envoy.config.core.v3.ApiConfigSource.grpc_services:type_name -> envoy.config.core.v3.GrpcService + 10, // 3: envoy.config.core.v3.ApiConfigSource.refresh_delay:type_name -> google.protobuf.Duration + 10, // 4: envoy.config.core.v3.ApiConfigSource.request_timeout:type_name -> google.protobuf.Duration 5, // 5: envoy.config.core.v3.ApiConfigSource.rate_limit_settings:type_name -> envoy.config.core.v3.RateLimitSettings - 0, // 6: envoy.config.core.v3.SelfConfigSource.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion - 9, // 7: envoy.config.core.v3.RateLimitSettings.max_tokens:type_name -> google.protobuf.UInt32Value - 10, // 8: envoy.config.core.v3.RateLimitSettings.fill_rate:type_name -> google.protobuf.DoubleValue - 11, // 9: envoy.config.core.v3.ConfigSource.authorities:type_name -> xds.core.v3.Authority - 2, // 10: envoy.config.core.v3.ConfigSource.api_config_source:type_name -> envoy.config.core.v3.ApiConfigSource - 3, // 11: envoy.config.core.v3.ConfigSource.ads:type_name -> envoy.config.core.v3.AggregatedConfigSource - 4, // 12: envoy.config.core.v3.ConfigSource.self:type_name -> envoy.config.core.v3.SelfConfigSource - 8, // 13: envoy.config.core.v3.ConfigSource.initial_fetch_timeout:type_name -> google.protobuf.Duration - 0, // 14: envoy.config.core.v3.ConfigSource.resource_api_version:type_name -> envoy.config.core.v3.ApiVersion - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 11, // 6: envoy.config.core.v3.ApiConfigSource.config_validators:type_name -> envoy.config.core.v3.TypedExtensionConfig + 0, // 7: envoy.config.core.v3.SelfConfigSource.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion + 12, // 8: envoy.config.core.v3.RateLimitSettings.max_tokens:type_name -> google.protobuf.UInt32Value + 13, // 9: envoy.config.core.v3.RateLimitSettings.fill_rate:type_name -> google.protobuf.DoubleValue + 14, // 10: envoy.config.core.v3.PathConfigSource.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory + 15, // 11: envoy.config.core.v3.ConfigSource.authorities:type_name -> xds.core.v3.Authority + 6, // 12: envoy.config.core.v3.ConfigSource.path_config_source:type_name -> envoy.config.core.v3.PathConfigSource + 2, // 13: envoy.config.core.v3.ConfigSource.api_config_source:type_name -> envoy.config.core.v3.ApiConfigSource + 3, // 14: envoy.config.core.v3.ConfigSource.ads:type_name -> envoy.config.core.v3.AggregatedConfigSource + 4, // 15: envoy.config.core.v3.ConfigSource.self:type_name -> envoy.config.core.v3.SelfConfigSource + 10, // 16: envoy.config.core.v3.ConfigSource.initial_fetch_timeout:type_name -> google.protobuf.Duration + 0, // 17: envoy.config.core.v3.ConfigSource.resource_api_version:type_name -> envoy.config.core.v3.ApiVersion + 7, // 18: envoy.config.core.v3.ExtensionConfigSource.config_source:type_name -> envoy.config.core.v3.ConfigSource + 16, // 19: envoy.config.core.v3.ExtensionConfigSource.default_config:type_name -> google.protobuf.Any + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_config_source_proto_init() } @@ -827,6 +1079,8 @@ func file_envoy_config_core_v3_config_source_proto_init() { if File_envoy_config_core_v3_config_source_proto != nil { return } + file_envoy_config_core_v3_base_proto_init() + file_envoy_config_core_v3_extension_proto_init() file_envoy_config_core_v3_grpc_service_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_config_core_v3_config_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -878,6 +1132,18 @@ func file_envoy_config_core_v3_config_source_proto_init() { } } file_envoy_config_core_v3_config_source_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathConfigSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_config_source_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConfigSource); i { case 0: return &v.state @@ -889,9 +1155,22 @@ func file_envoy_config_core_v3_config_source_proto_init() { return nil } } + file_envoy_config_core_v3_config_source_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtensionConfigSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_envoy_config_core_v3_config_source_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_config_source_proto_msgTypes[5].OneofWrappers = []interface{}{ (*ConfigSource_Path)(nil), + (*ConfigSource_PathConfigSource)(nil), (*ConfigSource_ApiConfigSource)(nil), (*ConfigSource_Ads)(nil), (*ConfigSource_Self)(nil), @@ -902,7 +1181,7 @@ func file_envoy_config_core_v3_config_source_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_core_v3_config_source_proto_rawDesc, NumEnums: 2, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/core/v3/config_source.pb.validate.go b/pkg/api/envoy/config/core/v3/config_source.pb.validate.go index 11a22692a5..33367e727a 100644 --- a/pkg/api/envoy/config/core/v3/config_source.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/config_source.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/config_source.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ApiConfigSource with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ApiConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApiConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ApiConfigSourceMultiError, or nil if none found. +func (m *ApiConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *ApiConfigSource) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := ApiConfigSource_ApiType_name[int32(m.GetApiType())]; !ok { - return ApiConfigSourceValidationError{ + err := ApiConfigSourceValidationError{ field: "ApiType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return ApiConfigSourceValidationError{ + err := ApiConfigSourceValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetGrpcServices() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: fmt.Sprintf("GrpcServices[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: fmt.Sprintf("GrpcServices[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: fmt.Sprintf("GrpcServices[%v]", idx), @@ -70,7 +113,26 @@ func (m *ApiConfigSource) Validate() error { } - if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRefreshDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RefreshDelay", @@ -81,27 +143,55 @@ func (m *ApiConfigSource) Validate() error { } if d := m.GetRequestTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ApiConfigSourceValidationError{ + err = ApiConfigSourceValidationError{ field: "RequestTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return ApiConfigSourceValidationError{ - field: "RequestTimeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := ApiConfigSourceValidationError{ + field: "RequestTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetRateLimitSettings()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RateLimitSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: "RateLimitSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitSettings()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RateLimitSettings", @@ -113,9 +203,64 @@ func (m *ApiConfigSource) Validate() error { // no validation rules for SetNodeOnFirstMessageOnly + for idx, item := range m.GetConfigValidators() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: fmt.Sprintf("ConfigValidators[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiConfigSourceValidationError{ + field: fmt.Sprintf("ConfigValidators[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ApiConfigSourceValidationError{ + field: fmt.Sprintf("ConfigValidators[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ApiConfigSourceMultiError(errors) + } + return nil } +// ApiConfigSourceMultiError is an error wrapping multiple validation errors +// returned by ApiConfigSource.ValidateAll() if the designated constraints +// aren't met. +type ApiConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApiConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApiConfigSourceMultiError) AllErrors() []error { return m } + // ApiConfigSourceValidationError is the validation error returned by // ApiConfigSource.Validate if the designated constraints aren't met. type ApiConfigSourceValidationError struct { @@ -172,15 +317,50 @@ var _ interface { // Validate checks the field values on AggregatedConfigSource with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AggregatedConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AggregatedConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AggregatedConfigSourceMultiError, or nil if none found. +func (m *AggregatedConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *AggregatedConfigSource) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return AggregatedConfigSourceMultiError(errors) + } + return nil } +// AggregatedConfigSourceMultiError is an error wrapping multiple validation +// errors returned by AggregatedConfigSource.ValidateAll() if the designated +// constraints aren't met. +type AggregatedConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AggregatedConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AggregatedConfigSourceMultiError) AllErrors() []error { return m } + // AggregatedConfigSourceValidationError is the validation error returned by // AggregatedConfigSource.Validate if the designated constraints aren't met. type AggregatedConfigSourceValidationError struct { @@ -238,23 +418,62 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SelfConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SelfConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SelfConfigSourceMultiError, or nil if none found. +func (m *SelfConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *SelfConfigSource) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return SelfConfigSourceValidationError{ + err := SelfConfigSourceValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return SelfConfigSourceMultiError(errors) } return nil } +// SelfConfigSourceMultiError is an error wrapping multiple validation errors +// returned by SelfConfigSource.ValidateAll() if the designated constraints +// aren't met. +type SelfConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SelfConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SelfConfigSourceMultiError) AllErrors() []error { return m } + // SelfConfigSourceValidationError is the validation error returned by // SelfConfigSource.Validate if the designated constraints aren't met. type SelfConfigSourceValidationError struct { @@ -310,14 +529,47 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimitSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitSettings with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitSettingsMultiError, or nil if none found. +func (m *RateLimitSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitSettings) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxTokens()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxTokens()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitSettingsValidationError{ + field: "MaxTokens", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitSettingsValidationError{ + field: "MaxTokens", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxTokens()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitSettingsValidationError{ field: "MaxTokens", @@ -330,17 +582,42 @@ func (m *RateLimitSettings) Validate() error { if wrapper := m.GetFillRate(); wrapper != nil { if wrapper.GetValue() <= 0 { - return RateLimitSettingsValidationError{ + err := RateLimitSettingsValidationError{ field: "FillRate", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return RateLimitSettingsMultiError(errors) + } + return nil } +// RateLimitSettingsMultiError is an error wrapping multiple validation errors +// returned by RateLimitSettings.ValidateAll() if the designated constraints +// aren't met. +type RateLimitSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitSettingsMultiError) AllErrors() []error { return m } + // RateLimitSettingsValidationError is the validation error returned by // RateLimitSettings.Validate if the designated constraints aren't met. type RateLimitSettingsValidationError struct { @@ -397,18 +674,191 @@ var _ interface { ErrorName() string } = RateLimitSettingsValidationError{} +// Validate checks the field values on PathConfigSource with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *PathConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PathConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PathConfigSourceMultiError, or nil if none found. +func (m *PathConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *PathConfigSource) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPath()) < 1 { + err := PathConfigSourceValidationError{ + field: "Path", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetWatchedDirectory()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PathConfigSourceValidationError{ + field: "WatchedDirectory", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PathConfigSourceValidationError{ + field: "WatchedDirectory", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PathConfigSourceValidationError{ + field: "WatchedDirectory", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return PathConfigSourceMultiError(errors) + } + + return nil +} + +// PathConfigSourceMultiError is an error wrapping multiple validation errors +// returned by PathConfigSource.ValidateAll() if the designated constraints +// aren't met. +type PathConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathConfigSourceMultiError) AllErrors() []error { return m } + +// PathConfigSourceValidationError is the validation error returned by +// PathConfigSource.Validate if the designated constraints aren't met. +type PathConfigSourceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PathConfigSourceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PathConfigSourceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PathConfigSourceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PathConfigSourceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PathConfigSourceValidationError) ErrorName() string { return "PathConfigSourceValidationError" } + +// Error satisfies the builtin error interface +func (e PathConfigSourceValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPathConfigSource.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PathConfigSourceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PathConfigSourceValidationError{} + // Validate checks the field values on ConfigSource with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConfigSource with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConfigSourceMultiError, or +// nil if none found. +func (m *ConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *ConfigSource) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetAuthorities() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: fmt.Sprintf("Authorities[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: fmt.Sprintf("Authorities[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: fmt.Sprintf("Authorities[%v]", idx), @@ -420,7 +870,26 @@ func (m *ConfigSource) Validate() error { } - if v, ok := interface{}(m.GetInitialFetchTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInitialFetchTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "InitialFetchTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "InitialFetchTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInitialFetchTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "InitialFetchTimeout", @@ -431,10 +900,14 @@ func (m *ConfigSource) Validate() error { } if _, ok := ApiVersion_name[int32(m.GetResourceApiVersion())]; !ok { - return ConfigSourceValidationError{ + err := ConfigSourceValidationError{ field: "ResourceApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigSourceSpecifier.(type) { @@ -442,9 +915,59 @@ func (m *ConfigSource) Validate() error { case *ConfigSource_Path: // no validation rules for Path + case *ConfigSource_PathConfigSource: + + if all { + switch v := interface{}(m.GetPathConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "PathConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "PathConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPathConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigSourceValidationError{ + field: "PathConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + case *ConfigSource_ApiConfigSource: - if v, ok := interface{}(m.GetApiConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetApiConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "ApiConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "ApiConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApiConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "ApiConfigSource", @@ -456,7 +979,26 @@ func (m *ConfigSource) Validate() error { case *ConfigSource_Ads: - if v, ok := interface{}(m.GetAds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Ads", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Ads", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "Ads", @@ -468,7 +1010,26 @@ func (m *ConfigSource) Validate() error { case *ConfigSource_Self: - if v, ok := interface{}(m.GetSelf()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSelf()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Self", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigSourceValidationError{ + field: "Self", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSelf()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "Self", @@ -479,16 +1040,40 @@ func (m *ConfigSource) Validate() error { } default: - return ConfigSourceValidationError{ + err := ConfigSourceValidationError{ field: "ConfigSourceSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ConfigSourceMultiError(errors) + } + return nil } +// ConfigSourceMultiError is an error wrapping multiple validation errors +// returned by ConfigSource.ValidateAll() if the designated constraints aren't met. +type ConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigSourceMultiError) AllErrors() []error { return m } + // ConfigSourceValidationError is the validation error returned by // ConfigSource.Validate if the designated constraints aren't met. type ConfigSourceValidationError struct { @@ -542,3 +1127,162 @@ var _ interface { Cause() error ErrorName() string } = ConfigSourceValidationError{} + +// Validate checks the field values on ExtensionConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExtensionConfigSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtensionConfigSource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtensionConfigSourceMultiError, or nil if none found. +func (m *ExtensionConfigSource) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtensionConfigSource) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetConfigSource() == nil { + err := ExtensionConfigSourceValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if a := m.GetConfigSource(); a != nil { + + } + + if all { + switch v := interface{}(m.GetDefaultConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionConfigSourceValidationError{ + field: "DefaultConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionConfigSourceValidationError{ + field: "DefaultConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtensionConfigSourceValidationError{ + field: "DefaultConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ApplyDefaultConfigWithoutWarming + + if len(m.GetTypeUrls()) < 1 { + err := ExtensionConfigSourceValidationError{ + field: "TypeUrls", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ExtensionConfigSourceMultiError(errors) + } + + return nil +} + +// ExtensionConfigSourceMultiError is an error wrapping multiple validation +// errors returned by ExtensionConfigSource.ValidateAll() if the designated +// constraints aren't met. +type ExtensionConfigSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtensionConfigSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtensionConfigSourceMultiError) AllErrors() []error { return m } + +// ExtensionConfigSourceValidationError is the validation error returned by +// ExtensionConfigSource.Validate if the designated constraints aren't met. +type ExtensionConfigSourceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExtensionConfigSourceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExtensionConfigSourceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExtensionConfigSourceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExtensionConfigSourceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExtensionConfigSourceValidationError) ErrorName() string { + return "ExtensionConfigSourceValidationError" +} + +// Error satisfies the builtin error interface +func (e ExtensionConfigSourceValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExtensionConfigSource.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExtensionConfigSourceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExtensionConfigSourceValidationError{} diff --git a/pkg/api/envoy/config/core/v3/event_service_config.pb.go b/pkg/api/envoy/config/core/v3/event_service_config.pb.go index 4cb3741ef8..60ad09f0e8 100644 --- a/pkg/api/envoy/config/core/v3/event_service_config.pb.go +++ b/pkg/api/envoy/config/core/v3/event_service_config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/event_service_config.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] // Configuration of the event reporting service endpoint. type EventServiceConfig struct { @@ -122,12 +117,16 @@ var file_envoy_config_core_v3_event_service_config_proto_rawDesc = []byte{ 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1e, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x47, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x17, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x8b, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x17, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/core/v3/event_service_config.pb.validate.go b/pkg/api/envoy/config/core/v3/event_service_config.pb.validate.go index c797b32fd8..971a6d6018 100644 --- a/pkg/api/envoy/config/core/v3/event_service_config.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/event_service_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/event_service_config.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on EventServiceConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EventServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EventServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EventServiceConfigMultiError, or nil if none found. +func (m *EventServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *EventServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ConfigSourceSpecifier.(type) { case *EventServiceConfig_GrpcService: - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EventServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EventServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EventServiceConfigValidationError{ field: "GrpcService", @@ -56,16 +91,41 @@ func (m *EventServiceConfig) Validate() error { } default: - return EventServiceConfigValidationError{ + err := EventServiceConfigValidationError{ field: "ConfigSourceSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return EventServiceConfigMultiError(errors) } return nil } +// EventServiceConfigMultiError is an error wrapping multiple validation errors +// returned by EventServiceConfig.ValidateAll() if the designated constraints +// aren't met. +type EventServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EventServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EventServiceConfigMultiError) AllErrors() []error { return m } + // EventServiceConfigValidationError is the validation error returned by // EventServiceConfig.Validate if the designated constraints aren't met. type EventServiceConfigValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/extension.pb.go b/pkg/api/envoy/config/core/v3/extension.pb.go index d405a33bc9..02aa194c7a 100644 --- a/pkg/api/envoy/config/core/v3/extension.pb.go +++ b/pkg/api/envoy/config/core/v3/extension.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/extension.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Message type for extension configuration. // [#next-major-version: revisit all existing typed_config that doesn't use this wrapper.]. type TypedExtensionConfig struct { @@ -39,8 +34,9 @@ type TypedExtensionConfig struct { // it serves the role of an opaque identifier. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The typed config for the extension. The type URL will be used to identify - // the extension. In the case that the type URL is *udpa.type.v1.TypedStruct*, - // the inner type URL of *TypedStruct* will be utilized. See the + // the extension. In the case that the type URL is *xds.type.v3.TypedStruct* + // (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type + // URL of *TypedStruct* will be utilized. See the // :ref:`extension configuration overview // ` for further details. TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` @@ -92,141 +88,35 @@ func (x *TypedExtensionConfig) GetTypedConfig() *any.Any { return nil } -// Configuration source specifier for a late-bound extension configuration. The -// parent resource is warmed until all the initial extension configurations are -// received, unless the flag to apply the default configuration is set. -// Subsequent extension updates are atomic on a per-worker basis. Once an -// extension configuration is applied to a request or a connection, it remains -// constant for the duration of processing. If the initial delivery of the -// extension configuration fails, due to a timeout for example, the optional -// default configuration is applied. Without a default configuration, the -// extension is disabled, until an extension configuration is received. The -// behavior of a disabled extension depends on the context. For example, a -// filter chain with a disabled extension filter rejects all incoming streams. -type ExtensionConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConfigSource *ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` - // Optional default configuration to use as the initial configuration if - // there is a failure to receive the initial extension configuration or if - // `apply_default_config_without_warming` flag is set. - DefaultConfig *any.Any `protobuf:"bytes,2,opt,name=default_config,json=defaultConfig,proto3" json:"default_config,omitempty"` - // Use the default config as the initial configuration without warming and - // waiting for the first discovery response. Requires the default configuration - // to be supplied. - ApplyDefaultConfigWithoutWarming bool `protobuf:"varint,3,opt,name=apply_default_config_without_warming,json=applyDefaultConfigWithoutWarming,proto3" json:"apply_default_config_without_warming,omitempty"` - // A set of permitted extension type URLs. Extension configuration updates are rejected - // if they do not match any type URL in the set. - TypeUrls []string `protobuf:"bytes,4,rep,name=type_urls,json=typeUrls,proto3" json:"type_urls,omitempty"` -} - -func (x *ExtensionConfigSource) Reset() { - *x = ExtensionConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_extension_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionConfigSource) ProtoMessage() {} - -func (x *ExtensionConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_extension_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionConfigSource.ProtoReflect.Descriptor instead. -func (*ExtensionConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_extension_proto_rawDescGZIP(), []int{1} -} - -func (x *ExtensionConfigSource) GetConfigSource() *ConfigSource { - if x != nil { - return x.ConfigSource - } - return nil -} - -func (x *ExtensionConfigSource) GetDefaultConfig() *any.Any { - if x != nil { - return x.DefaultConfig - } - return nil -} - -func (x *ExtensionConfigSource) GetApplyDefaultConfigWithoutWarming() bool { - if x != nil { - return x.ApplyDefaultConfigWithoutWarming - } - return false -} - -func (x *ExtensionConfigSource) GetTypeUrls() []string { - if x != nil { - return x.TypeUrls - } - return nil -} - var File_envoy_config_core_v3_extension_proto protoreflect.FileDescriptor var file_envoy_config_core_v3_extension_proto_rawDesc = []byte{ 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76, 0x0a, 0x14, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x22, 0x9e, 0x02, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, - 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x24, 0x61, - 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x77, 0x61, 0x72, 0x6d, - 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x57, 0x69, 0x74, - 0x68, 0x6f, 0x75, 0x74, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x09, 0x74, - 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, - 0x6c, 0x73, 0x42, 0x3e, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x76, 0x0a, 0x14, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x82, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, + 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -241,22 +131,18 @@ func file_envoy_config_core_v3_extension_proto_rawDescGZIP() []byte { return file_envoy_config_core_v3_extension_proto_rawDescData } -var file_envoy_config_core_v3_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_config_core_v3_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_envoy_config_core_v3_extension_proto_goTypes = []interface{}{ - (*TypedExtensionConfig)(nil), // 0: envoy.config.core.v3.TypedExtensionConfig - (*ExtensionConfigSource)(nil), // 1: envoy.config.core.v3.ExtensionConfigSource - (*any.Any)(nil), // 2: google.protobuf.Any - (*ConfigSource)(nil), // 3: envoy.config.core.v3.ConfigSource + (*TypedExtensionConfig)(nil), // 0: envoy.config.core.v3.TypedExtensionConfig + (*any.Any)(nil), // 1: google.protobuf.Any } var file_envoy_config_core_v3_extension_proto_depIdxs = []int32{ - 2, // 0: envoy.config.core.v3.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any - 3, // 1: envoy.config.core.v3.ExtensionConfigSource.config_source:type_name -> envoy.config.core.v3.ConfigSource - 2, // 2: envoy.config.core.v3.ExtensionConfigSource.default_config:type_name -> google.protobuf.Any - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 1, // 0: envoy.config.core.v3.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_extension_proto_init() } @@ -264,7 +150,6 @@ func file_envoy_config_core_v3_extension_proto_init() { if File_envoy_config_core_v3_extension_proto != nil { return } - file_envoy_config_core_v3_config_source_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_config_core_v3_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TypedExtensionConfig); i { @@ -278,18 +163,6 @@ func file_envoy_config_core_v3_extension_proto_init() { return nil } } - file_envoy_config_core_v3_extension_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -297,7 +170,7 @@ func file_envoy_config_core_v3_extension_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_core_v3_extension_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/core/v3/extension.pb.validate.go b/pkg/api/envoy/config/core/v3/extension.pb.validate.go index 2e399dbe59..9c915d3833 100644 --- a/pkg/api/envoy/config/core/v3/extension.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/extension.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/extension.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,38 +31,82 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TypedExtensionConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TypedExtensionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TypedExtensionConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TypedExtensionConfigMultiError, or nil if none found. +func (m *TypedExtensionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TypedExtensionConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return TypedExtensionConfigValidationError{ + err := TypedExtensionConfigValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetTypedConfig() == nil { - return TypedExtensionConfigValidationError{ + err := TypedExtensionConfigValidationError{ field: "TypedConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if a := m.GetTypedConfig(); a != nil { } + if len(errors) > 0 { + return TypedExtensionConfigMultiError(errors) + } + return nil } +// TypedExtensionConfigMultiError is an error wrapping multiple validation +// errors returned by TypedExtensionConfig.ValidateAll() if the designated +// constraints aren't met. +type TypedExtensionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TypedExtensionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TypedExtensionConfigMultiError) AllErrors() []error { return m } + // TypedExtensionConfigValidationError is the validation error returned by // TypedExtensionConfig.Validate if the designated constraints aren't met. type TypedExtensionConfigValidationError struct { @@ -117,100 +162,3 @@ var _ interface { Cause() error ErrorName() string } = TypedExtensionConfigValidationError{} - -// Validate checks the field values on ExtensionConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ExtensionConfigSource) Validate() error { - if m == nil { - return nil - } - - if m.GetConfigSource() == nil { - return ExtensionConfigSourceValidationError{ - field: "ConfigSource", - reason: "value is required", - } - } - - if a := m.GetConfigSource(); a != nil { - - } - - if v, ok := interface{}(m.GetDefaultConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionConfigSourceValidationError{ - field: "DefaultConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ApplyDefaultConfigWithoutWarming - - if len(m.GetTypeUrls()) < 1 { - return ExtensionConfigSourceValidationError{ - field: "TypeUrls", - reason: "value must contain at least 1 item(s)", - } - } - - return nil -} - -// ExtensionConfigSourceValidationError is the validation error returned by -// ExtensionConfigSource.Validate if the designated constraints aren't met. -type ExtensionConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtensionConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtensionConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtensionConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtensionConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtensionConfigSourceValidationError) ErrorName() string { - return "ExtensionConfigSourceValidationError" -} - -// Error satisfies the builtin error interface -func (e ExtensionConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtensionConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtensionConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtensionConfigSourceValidationError{} diff --git a/pkg/api/envoy/config/core/v3/grpc_method_list.pb.go b/pkg/api/envoy/config/core/v3/grpc_method_list.pb.go index 454a806112..01595ff17e 100644 --- a/pkg/api/envoy/config/core/v3/grpc_method_list.pb.go +++ b/pkg/api/envoy/config/core/v3/grpc_method_list.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/grpc_method_list.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A list of gRPC methods which can be used as an allowlist, for example. type GrpcMethodList struct { state protoimpl.MessageState @@ -161,12 +156,16 @@ var file_envoy_config_core_v3_grpc_method_list_proto_rawDesc = []byte{ 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x43, 0x0a, 0x22, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x42, 0x13, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x87, 0x01, 0x0a, 0x22, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x42, 0x13, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/core/v3/grpc_method_list.pb.validate.go b/pkg/api/envoy/config/core/v3/grpc_method_list.pb.validate.go index 9057d259a0..4fc134e94e 100644 --- a/pkg/api/envoy/config/core/v3/grpc_method_list.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/grpc_method_list.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/grpc_method_list.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcMethodList with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcMethodList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcMethodList with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GrpcMethodListMultiError, +// or nil if none found. +func (m *GrpcMethodList) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcMethodList) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetServices() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcMethodListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcMethodListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcMethodListValidationError{ field: fmt.Sprintf("Services[%v]", idx), @@ -56,9 +91,30 @@ func (m *GrpcMethodList) Validate() error { } + if len(errors) > 0 { + return GrpcMethodListMultiError(errors) + } + return nil } +// GrpcMethodListMultiError is an error wrapping multiple validation errors +// returned by GrpcMethodList.ValidateAll() if the designated constraints +// aren't met. +type GrpcMethodListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcMethodListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcMethodListMultiError) AllErrors() []error { return m } + // GrpcMethodListValidationError is the validation error returned by // GrpcMethodList.Validate if the designated constraints aren't met. type GrpcMethodListValidationError struct { @@ -115,29 +171,72 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcMethodList_Service) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcMethodList_Service with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcMethodList_ServiceMultiError, or nil if none found. +func (m *GrpcMethodList_Service) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcMethodList_Service) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return GrpcMethodList_ServiceValidationError{ + err := GrpcMethodList_ServiceValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetMethodNames()) < 1 { - return GrpcMethodList_ServiceValidationError{ + err := GrpcMethodList_ServiceValidationError{ field: "MethodNames", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return GrpcMethodList_ServiceMultiError(errors) } return nil } +// GrpcMethodList_ServiceMultiError is an error wrapping multiple validation +// errors returned by GrpcMethodList_Service.ValidateAll() if the designated +// constraints aren't met. +type GrpcMethodList_ServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcMethodList_ServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcMethodList_ServiceMultiError) AllErrors() []error { return m } + // GrpcMethodList_ServiceValidationError is the validation error returned by // GrpcMethodList_Service.Validate if the designated constraints aren't met. type GrpcMethodList_ServiceValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/grpc_service.pb.go b/pkg/api/envoy/config/core/v3/grpc_service.pb.go index 699b341c14..b9396927d0 100644 --- a/pkg/api/envoy/config/core/v3/grpc_service.pb.go +++ b/pkg/api/envoy/config/core/v3/grpc_service.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/grpc_service.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "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" @@ -28,12 +27,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. +// ` and filter configurations. // [#next-free-field: 6] type GrpcService struct { state protoimpl.MessageState @@ -150,8 +145,8 @@ type GrpcService_EnvoyGrpc struct { unknownFields protoimpl.UnknownFields // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`transport_socket - // `. + // in the :ref:`Cluster ` :ref:`transport_socket + // `. ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` // The `:authority` header in the grpc request. If this field is not set, the authority header value will be `cluster_name`. // Note that this authority does not override the SNI. The SNI is provided by the transport socket of the cluster. @@ -212,7 +207,7 @@ type GrpcService_GoogleGrpc struct { // The target URI when using the `Google C++ gRPC client // `_. SSL credentials will be supplied in - // :ref:`channel_credentials `. + // :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 @@ -876,9 +871,10 @@ type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin struct unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // [#extension-category: envoy.grpc_credentials] + // // Types that are assignable to ConfigType: // *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig - // *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_HiddenEnvoyDeprecatedConfig ConfigType isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType `protobuf_oneof:"config_type"` } @@ -935,14 +931,6 @@ func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) G return nil } -// Deprecated: Do not use. -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType interface { isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() } @@ -951,17 +939,9 @@ type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedC TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() { } -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_HiddenEnvoyDeprecatedConfig) isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() { -} - // Security token service configuration that allows Google gRPC to // fetch security token from an OAuth 2.0 authorization server. // See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and @@ -1206,7 +1186,7 @@ var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x21, 0x0a, 0x0b, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x21, 0x0a, 0x0b, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, @@ -1235,7 +1215,7 @@ var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x47, 0x72, 0x70, 0x63, - 0x1a, 0xd0, 0x1d, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x12, + 0x1a, 0xfa, 0x1c, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x12, 0x26, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x72, 0x69, 0x12, 0x70, 0x0a, 0x13, 0x63, 0x68, 0x61, 0x6e, 0x6e, @@ -1322,7 +1302,7 @@ var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xde, 0x0f, 0x0a, 0x0f, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x88, 0x0f, 0x0a, 0x0f, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, @@ -1393,95 +1373,94 @@ var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x1a, 0xc0, 0x02, 0x0a, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, + 0x73, 0x1a, 0xea, 0x01, 0x0a, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x5d, 0x9a, 0xc5, 0x88, 0x1e, 0x58, 0x0a, 0x56, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x1a, 0xd7, 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x72, - 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x72, 0x69, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x30, - 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, - 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x69, 0x67, 0x3a, 0x5d, 0x9a, 0xc5, 0x88, 0x1e, 0x58, 0x0a, 0x56, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3f, - 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, + 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xd7, + 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, + 0x1a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x17, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x72, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x4a, 0x9a, 0xc5, + 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, + 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x74, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, + 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xc3, 0x02, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x56, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x41, + 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x1a, 0x63, + 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, + 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x16, 0x0a, 0x0f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, + 0xf8, 0x42, 0x01, 0x1a, 0x77, 0x0a, 0x09, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x54, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, - 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xc3, 0x02, 0x0a, - 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x56, 0x0a, 0x04, - 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x41, 0x72, 0x67, 0x73, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, - 0x61, 0x72, 0x67, 0x73, 0x1a, 0x63, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, - 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x16, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x77, 0x0a, 0x09, 0x41, 0x72, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x54, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, - 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, - 0x72, 0x70, 0x63, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x17, 0x0a, 0x10, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, 0x40, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, + 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x24, 0x9a, + 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x42, 0x17, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x42, 0x84, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1543,13 +1522,12 @@ var file_envoy_config_core_v3_grpc_service_proto_depIdxs = []int32{ 11, // 19: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.sts_service:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.StsService 13, // 20: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.args:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry 20, // 21: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin.typed_config:type_name -> google.protobuf.Any - 16, // 22: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 12, // 23: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry.value:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.Value - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 12, // 22: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry.value:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.Value + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_grpc_service_proto_init() } @@ -1736,7 +1714,6 @@ func file_envoy_config_core_v3_grpc_service_proto_init() { } file_envoy_config_core_v3_grpc_service_proto_msgTypes[10].OneofWrappers = []interface{}{ (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_HiddenEnvoyDeprecatedConfig)(nil), } file_envoy_config_core_v3_grpc_service_proto_msgTypes[12].OneofWrappers = []interface{}{ (*GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue)(nil), diff --git a/pkg/api/envoy/config/core/v3/grpc_service.pb.validate.go b/pkg/api/envoy/config/core/v3/grpc_service.pb.validate.go index fea8740e79..56d2507221 100644 --- a/pkg/api/envoy/config/core/v3/grpc_service.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/grpc_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/grpc_service.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcService with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GrpcServiceMultiError, or +// nil if none found. +func (m *GrpcService) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: "Timeout", @@ -54,7 +89,26 @@ func (m *GrpcService) Validate() error { for idx, item := range m.GetInitialMetadata() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: fmt.Sprintf("InitialMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: fmt.Sprintf("InitialMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: fmt.Sprintf("InitialMetadata[%v]", idx), @@ -70,7 +124,26 @@ func (m *GrpcService) Validate() error { case *GrpcService_EnvoyGrpc_: - if v, ok := interface{}(m.GetEnvoyGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnvoyGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "EnvoyGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "EnvoyGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnvoyGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: "EnvoyGrpc", @@ -82,7 +155,26 @@ func (m *GrpcService) Validate() error { case *GrpcService_GoogleGrpc_: - if v, ok := interface{}(m.GetGoogleGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "GoogleGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcServiceValidationError{ + field: "GoogleGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcServiceValidationError{ field: "GoogleGrpc", @@ -93,16 +185,40 @@ func (m *GrpcService) Validate() error { } default: - return GrpcServiceValidationError{ + err := GrpcServiceValidationError{ field: "TargetSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return GrpcServiceMultiError(errors) } return nil } +// GrpcServiceMultiError is an error wrapping multiple validation errors +// returned by GrpcService.ValidateAll() if the designated constraints aren't met. +type GrpcServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcServiceMultiError) AllErrors() []error { return m } + // GrpcServiceValidationError is the validation error returned by // GrpcService.Validate if the designated constraints aren't met. type GrpcServiceValidationError struct { @@ -159,43 +275,94 @@ var _ interface { // Validate checks the field values on GrpcService_EnvoyGrpc with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcService_EnvoyGrpc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService_EnvoyGrpc with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcService_EnvoyGrpcMultiError, or nil if none found. +func (m *GrpcService_EnvoyGrpc) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_EnvoyGrpc) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return GrpcService_EnvoyGrpcValidationError{ + err := GrpcService_EnvoyGrpcValidationError{ field: "ClusterName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetAuthority()) < 0 { - return GrpcService_EnvoyGrpcValidationError{ + err := GrpcService_EnvoyGrpcValidationError{ field: "Authority", reason: "value length must be at least 0 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetAuthority()) > 16384 { - return GrpcService_EnvoyGrpcValidationError{ + err := GrpcService_EnvoyGrpcValidationError{ field: "Authority", reason: "value length must be at most 16384 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_GrpcService_EnvoyGrpc_Authority_Pattern.MatchString(m.GetAuthority()) { - return GrpcService_EnvoyGrpcValidationError{ + err := GrpcService_EnvoyGrpcValidationError{ field: "Authority", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return GrpcService_EnvoyGrpcMultiError(errors) } return nil } +// GrpcService_EnvoyGrpcMultiError is an error wrapping multiple validation +// errors returned by GrpcService_EnvoyGrpc.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_EnvoyGrpcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_EnvoyGrpcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_EnvoyGrpcMultiError) AllErrors() []error { return m } + // GrpcService_EnvoyGrpcValidationError is the validation error returned by // GrpcService_EnvoyGrpc.Validate if the designated constraints aren't met. type GrpcService_EnvoyGrpcValidationError struct { @@ -256,20 +423,57 @@ var _GrpcService_EnvoyGrpc_Authority_Pattern = regexp.MustCompile("^[^\x00\n\r]* // Validate checks the field values on GrpcService_GoogleGrpc with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService_GoogleGrpc with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpcMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetTargetUri()) < 1 { - return GrpcService_GoogleGrpcValidationError{ + err := GrpcService_GoogleGrpcValidationError{ field: "TargetUri", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetChannelCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetChannelCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "ChannelCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "ChannelCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetChannelCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: "ChannelCredentials", @@ -282,7 +486,26 @@ func (m *GrpcService_GoogleGrpc) Validate() error { for idx, item := range m.GetCallCredentials() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: fmt.Sprintf("CallCredentials[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: fmt.Sprintf("CallCredentials[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: fmt.Sprintf("CallCredentials[%v]", idx), @@ -295,15 +518,38 @@ func (m *GrpcService_GoogleGrpc) Validate() error { } if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return GrpcService_GoogleGrpcValidationError{ + err := GrpcService_GoogleGrpcValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for CredentialsFactoryName - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: "Config", @@ -313,7 +559,26 @@ func (m *GrpcService_GoogleGrpc) Validate() error { } } - if v, ok := interface{}(m.GetPerStreamBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerStreamBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "PerStreamBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "PerStreamBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerStreamBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: "PerStreamBufferLimitBytes", @@ -323,7 +588,26 @@ func (m *GrpcService_GoogleGrpc) Validate() error { } } - if v, ok := interface{}(m.GetChannelArgs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetChannelArgs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "ChannelArgs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpcValidationError{ + field: "ChannelArgs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetChannelArgs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpcValidationError{ field: "ChannelArgs", @@ -333,9 +617,30 @@ func (m *GrpcService_GoogleGrpc) Validate() error { } } + if len(errors) > 0 { + return GrpcService_GoogleGrpcMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpcMultiError is an error wrapping multiple validation +// errors returned by GrpcService_GoogleGrpc.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpcMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpcValidationError is the validation error returned by // GrpcService_GoogleGrpc.Validate if the designated constraints aren't met. type GrpcService_GoogleGrpcValidationError struct { @@ -394,13 +699,47 @@ var _ interface { // Validate checks the field values on GrpcService_GoogleGrpc_SslCredentials // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService_GoogleGrpc_SslCredentials +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_SslCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_SslCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_SslCredentials) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRootCerts()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRootCerts()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "RootCerts", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "RootCerts", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRootCerts()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_SslCredentialsValidationError{ field: "RootCerts", @@ -410,7 +749,26 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { } } - if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrivateKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_SslCredentialsValidationError{ field: "PrivateKey", @@ -420,7 +778,26 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { } } - if v, ok := interface{}(m.GetCertChain()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCertChain()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "CertChain", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ + field: "CertChain", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCertChain()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_SslCredentialsValidationError{ field: "CertChain", @@ -430,9 +807,31 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { } } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_SslCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_SslCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_SslCredentials.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_SslCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_SslCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_SslCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_SslCredentialsValidationError is the validation error // returned by GrpcService_GoogleGrpc_SslCredentials.Validate if the // designated constraints aren't met. @@ -492,15 +891,53 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_GoogleLocalCredentials.ValidateAll() if the +// designated constraints aren't met. +type GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError is the // validation error returned by // GrpcService_GoogleGrpc_GoogleLocalCredentials.Validate if the designated @@ -563,17 +1000,52 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// GrpcService_GoogleGrpc_ChannelCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_ChannelCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_ChannelCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.CredentialSpecifier.(type) { case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials: - if v, ok := interface{}(m.GetSslCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSslCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "SslCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "SslCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSslCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "SslCredentials", @@ -585,7 +1057,26 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { case *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault: - if v, ok := interface{}(m.GetGoogleDefault()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleDefault()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "GoogleDefault", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "GoogleDefault", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleDefault()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "GoogleDefault", @@ -597,7 +1088,26 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { case *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials: - if v, ok := interface{}(m.GetLocalCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "LocalCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + field: "LocalCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "LocalCredentials", @@ -608,16 +1118,42 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { } default: - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ + err := GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ field: "CredentialSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_ChannelCredentialsMultiError(errors) } return nil } +// GrpcService_GoogleGrpc_ChannelCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_ChannelCredentials.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_ChannelCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_ChannelCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_ChannelCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_ChannelCredentialsValidationError is the validation // error returned by GrpcService_GoogleGrpc_ChannelCredentials.Validate if the // designated constraints aren't met. @@ -677,12 +1213,28 @@ var _ interface { // Validate checks the field values on GrpcService_GoogleGrpc_CallCredentials // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentialsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.CredentialSpecifier.(type) { case *GrpcService_GoogleGrpc_CallCredentials_AccessToken: @@ -690,7 +1242,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine: - if v, ok := interface{}(m.GetGoogleComputeEngine()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleComputeEngine()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleComputeEngine", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleComputeEngine", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleComputeEngine()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "GoogleComputeEngine", @@ -705,7 +1276,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess: - if v, ok := interface{}(m.GetServiceAccountJwtAccess()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetServiceAccountJwtAccess()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "ServiceAccountJwtAccess", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "ServiceAccountJwtAccess", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServiceAccountJwtAccess()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "ServiceAccountJwtAccess", @@ -717,7 +1307,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_GoogleIam: - if v, ok := interface{}(m.GetGoogleIam()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleIam()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleIam", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "GoogleIam", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleIam()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "GoogleIam", @@ -729,7 +1338,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_FromPlugin: - if v, ok := interface{}(m.GetFromPlugin()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFromPlugin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "FromPlugin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "FromPlugin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFromPlugin()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "FromPlugin", @@ -741,7 +1369,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_StsService_: - if v, ok := interface{}(m.GetStsService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStsService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "StsService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ + field: "StsService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStsService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "StsService", @@ -752,16 +1399,42 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { } default: - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ + err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ field: "CredentialSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentialsMultiError(errors) } return nil } +// GrpcService_GoogleGrpc_CallCredentialsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentialsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_CallCredentialsValidationError is the validation // error returned by GrpcService_GoogleGrpc_CallCredentials.Validate if the // designated constraints aren't met. @@ -821,32 +1494,98 @@ var _ interface { // Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *GrpcService_GoogleGrpc_ChannelArgs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcService_GoogleGrpc_ChannelArgs +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_ChannelArgsMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_ChannelArgs) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_ChannelArgs) validate(all bool) error { if m == nil { return nil } - for key, val := range m.GetArgs() { - _ = val - - // no validation rules for Args[key] + var errors []error - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelArgsValidationError{ - field: fmt.Sprintf("Args[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetArgs())) + i := 0 + for key := range m.GetArgs() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetArgs()[key] + _ = val + + // no validation rules for Args[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelArgsValidationError{ + field: fmt.Sprintf("Args[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_ChannelArgsValidationError{ + field: fmt.Sprintf("Args[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GrpcService_GoogleGrpc_ChannelArgsValidationError{ + field: fmt.Sprintf("Args[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_ChannelArgsMultiError(errors) } return nil } +// GrpcService_GoogleGrpc_ChannelArgsMultiError is an error wrapping multiple +// validation errors returned by +// GrpcService_GoogleGrpc_ChannelArgs.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_ChannelArgsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_ChannelArgsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_ChannelArgsMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_ChannelArgsValidationError is the validation error // returned by GrpcService_GoogleGrpc_ChannelArgs.Validate if the designated // constraints aren't met. @@ -907,19 +1646,60 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError, +// or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for JsonKey // no validation rules for TokenLifetimeSeconds + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError +// is an error wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.ValidateAll() +// if the designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError) AllErrors() []error { + return m +} + // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError // is the validation error returned by // GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Validate @@ -989,19 +1769,59 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError, or +// nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for AuthorizationToken // no validation rules for AuthoritySelector + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError is an +// error wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.ValidateAll() +// if the designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError) AllErrors() []error { + return m +} + // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError // is the validation error returned by // GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Validate if the @@ -1071,34 +1891,58 @@ var _ interface { // Validate checks the field values on // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError, +// or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.ConfigType.(type) { case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig: - 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -1107,9 +1951,33 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) V } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError +// is an error wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.ValidateAll() +// if the designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError) AllErrors() []error { + return m +} + // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError // is the validation error returned by // GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Validate @@ -1178,13 +2046,28 @@ var _ interface { // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_CallCredentials_StsService with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TokenExchangeServiceUri // no validation rules for Resource @@ -1196,26 +2079,56 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Validate() error { // no validation rules for RequestedTokenType if utf8.RuneCountInString(m.GetSubjectTokenPath()) < 1 { - return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ + err := GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ field: "SubjectTokenPath", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetSubjectTokenType()) < 1 { - return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ + err := GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ field: "SubjectTokenType", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ActorTokenPath // no validation rules for ActorTokenType + if len(errors) > 0 { + return GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError(errors) + } + return nil } +// GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError is an error +// wrapping multiple validation errors returned by +// GrpcService_GoogleGrpc_CallCredentials_StsService.ValidateAll() if the +// designated constraints aren't met. +type GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError is the // validation error returned by // GrpcService_GoogleGrpc_CallCredentials_StsService.Validate if the @@ -1282,12 +2195,28 @@ var _ interface { // Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs_Value // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcService_GoogleGrpc_ChannelArgs_Value with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError, or nil if none found. +func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ValueSpecifier.(type) { case *GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue: @@ -1297,16 +2226,42 @@ func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) Validate() error { // no validation rules for IntValue default: - return GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{ + err := GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{ field: "ValueSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError(errors) } return nil } +// GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError is an error wrapping +// multiple validation errors returned by +// GrpcService_GoogleGrpc_ChannelArgs_Value.ValidateAll() if the designated +// constraints aren't met. +type GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError) AllErrors() []error { return m } + // GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError is the validation // error returned by GrpcService_GoogleGrpc_ChannelArgs_Value.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/core/v3/health_check.pb.go b/pkg/api/envoy/config/core/v3/health_check.pb.go index 0111a207c7..c5b606286e 100644 --- a/pkg/api/envoy/config/core/v3/health_check.pb.go +++ b/pkg/api/envoy/config/core/v3/health_check.pb.go @@ -1,18 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/health_check.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" @@ -30,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Endpoint health status. type HealthStatus int32 @@ -104,6 +98,54 @@ func (HealthStatus) EnumDescriptor() ([]byte, []int) { return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0} } +type HealthStatusSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An order-independent set of health status. + Statuses []HealthStatus `protobuf:"varint,1,rep,packed,name=statuses,proto3,enum=envoy.config.core.v3.HealthStatus" json:"statuses,omitempty"` +} + +func (x *HealthStatusSet) Reset() { + *x = HealthStatusSet{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthStatusSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthStatusSet) ProtoMessage() {} + +func (x *HealthStatusSet) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthStatusSet.ProtoReflect.Descriptor instead. +func (*HealthStatusSet) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0} +} + +func (x *HealthStatusSet) GetStatuses() []HealthStatus { + if x != nil { + return x.Statuses + } + return nil +} + // [#next-free-field: 25] type HealthCheck struct { state protoimpl.MessageState @@ -130,8 +172,10 @@ type HealthCheck struct { // 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. + // unhealthy. Note that for *http* health checking if a host responds with a code not in + // :ref:`expected_statuses ` + // or :ref:`retriable_statuses `, + // this threshold is ignored and the host is considered immediately unhealthy. UnhealthyThreshold *wrappers.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 @@ -203,7 +247,7 @@ type HealthCheck struct { // This allows overriding the cluster TLS settings, just for health check connections. TlsOptions *HealthCheck_TlsOptions `protobuf:"bytes,21,opt,name=tls_options,json=tlsOptions,proto3" json:"tls_options,omitempty"` // Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's - // :ref:`tranport socket matches `. + // :ref:`tranport socket matches `. // For example, the following match criteria // // .. code-block:: yaml @@ -211,7 +255,7 @@ type HealthCheck struct { // transport_socket_match_criteria: // useMTLS: true // - // Will match the following :ref:`cluster socket match ` + // Will match the following :ref:`cluster socket match ` // // .. code-block:: yaml // @@ -224,13 +268,13 @@ type HealthCheck struct { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // // If the key/values pairs specified do not match any - // :ref:`transport socket matches `, - // the cluster's :ref:`transport socket ` + // :ref:`transport socket matches `, + // the cluster's :ref:`transport socket ` // will be used for health check socket configuration. TransportSocketMatchCriteria *_struct.Struct `protobuf:"bytes,23,opt,name=transport_socket_match_criteria,json=transportSocketMatchCriteria,proto3" json:"transport_socket_match_criteria,omitempty"` } @@ -238,7 +282,7 @@ type HealthCheck struct { func (x *HealthCheck) Reset() { *x = HealthCheck{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[0] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -251,7 +295,7 @@ func (x *HealthCheck) String() string { func (*HealthCheck) ProtoMessage() {} func (x *HealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[0] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -264,7 +308,7 @@ func (x *HealthCheck) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead. func (*HealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1} } func (x *HealthCheck) GetTimeout() *duration.Duration { @@ -482,7 +526,7 @@ type HealthCheck_Payload struct { func (x *HealthCheck_Payload) Reset() { *x = HealthCheck_Payload{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[1] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -495,7 +539,7 @@ func (x *HealthCheck_Payload) String() string { func (*HealthCheck_Payload) ProtoMessage() {} func (x *HealthCheck_Payload) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[1] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -508,7 +552,7 @@ func (x *HealthCheck_Payload) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck_Payload.ProtoReflect.Descriptor instead. func (*HealthCheck_Payload) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0, 0} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 0} } func (m *HealthCheck_Payload) GetPayload() isHealthCheck_Payload_Payload { @@ -550,7 +594,7 @@ func (*HealthCheck_Payload_Text) isHealthCheck_Payload_Payload() {} func (*HealthCheck_Payload_Binary) isHealthCheck_Payload_Payload() {} -// [#next-free-field: 12] +// [#next-free-field: 13] type HealthCheck_HttpHealthCheck struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -559,7 +603,7 @@ 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. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Specifies the HTTP path that will be requested during health checking. For example // */healthcheck*. @@ -578,26 +622,33 @@ type HealthCheck_HttpHealthCheck struct { RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open - // semantics of :ref:`Int64Range `. The start and end of each + // semantics of :ref:`Int64Range `. The start and end of each // range are required. Only statuses in the range [100, 600) are allowed. ExpectedStatuses []*v3.Int64Range `protobuf:"bytes,9,rep,name=expected_statuses,json=expectedStatuses,proto3" json:"expected_statuses,omitempty"` + // Specifies a list of HTTP response statuses considered retriable. If provided, responses in this range + // will count towards the configured :ref:`unhealthy_threshold `, + // but will not result in the host being considered immediately unhealthy. Ranges follow half-open semantics of + // :ref:`Int64Range `. The start and end of each range are required. + // Only statuses in the range [100, 600) are allowed. The :ref:`expected_statuses ` + // field takes precedence for any range overlaps with this field i.e. if status code 200 is both retriable and expected, a 200 response will + // be considered a successful health check. By default all responses not in + // :ref:`expected_statuses ` will result in + // the host being considered immediately unhealthy i.e. if status code 200 is expected and there are no configured retriable statuses, any + // non-200 response will result in the host being marked unhealthy. + RetriableStatuses []*v3.Int64Range `protobuf:"bytes,12,rep,name=retriable_statuses,json=retriableStatuses,proto3" json:"retriable_statuses,omitempty"` // Use specified application protocol for health checks. CodecClientType v3.CodecClientType `protobuf:"varint,10,opt,name=codec_client_type,json=codecClientType,proto3,enum=envoy.type.v3.CodecClientType" json:"codec_client_type,omitempty"` // An optional service name parameter which is used to validate the identity of // the health checked cluster using a :ref:`StringMatcher - // `. See the :ref:`architecture overview + // `. See the :ref:`architecture overview // ` for more information. ServiceNameMatcher *v31.StringMatcher `protobuf:"bytes,11,opt,name=service_name_matcher,json=serviceNameMatcher,proto3" json:"service_name_matcher,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedServiceName string `protobuf:"bytes,5,opt,name=hidden_envoy_deprecated_service_name,json=hiddenEnvoyDeprecatedServiceName,proto3" json:"hidden_envoy_deprecated_service_name,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedUseHttp2 bool `protobuf:"varint,7,opt,name=hidden_envoy_deprecated_use_http2,json=hiddenEnvoyDeprecatedUseHttp2,proto3" json:"hidden_envoy_deprecated_use_http2,omitempty"` } func (x *HealthCheck_HttpHealthCheck) Reset() { *x = HealthCheck_HttpHealthCheck{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[2] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -610,7 +661,7 @@ func (x *HealthCheck_HttpHealthCheck) String() string { func (*HealthCheck_HttpHealthCheck) ProtoMessage() {} func (x *HealthCheck_HttpHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[2] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -623,7 +674,7 @@ func (x *HealthCheck_HttpHealthCheck) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck_HttpHealthCheck.ProtoReflect.Descriptor instead. func (*HealthCheck_HttpHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0, 1} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 1} } func (x *HealthCheck_HttpHealthCheck) GetHost() string { @@ -675,34 +726,25 @@ func (x *HealthCheck_HttpHealthCheck) GetExpectedStatuses() []*v3.Int64Range { return nil } -func (x *HealthCheck_HttpHealthCheck) GetCodecClientType() v3.CodecClientType { - if x != nil { - return x.CodecClientType - } - return v3.CodecClientType_HTTP1 -} - -func (x *HealthCheck_HttpHealthCheck) GetServiceNameMatcher() *v31.StringMatcher { +func (x *HealthCheck_HttpHealthCheck) GetRetriableStatuses() []*v3.Int64Range { if x != nil { - return x.ServiceNameMatcher + return x.RetriableStatuses } return nil } -// Deprecated: Do not use. -func (x *HealthCheck_HttpHealthCheck) GetHiddenEnvoyDeprecatedServiceName() string { +func (x *HealthCheck_HttpHealthCheck) GetCodecClientType() v3.CodecClientType { if x != nil { - return x.HiddenEnvoyDeprecatedServiceName + return x.CodecClientType } - return "" + return v3.CodecClientType(0) } -// Deprecated: Do not use. -func (x *HealthCheck_HttpHealthCheck) GetHiddenEnvoyDeprecatedUseHttp2() bool { +func (x *HealthCheck_HttpHealthCheck) GetServiceNameMatcher() *v31.StringMatcher { if x != nil { - return x.HiddenEnvoyDeprecatedUseHttp2 + return x.ServiceNameMatcher } - return false + return nil } type HealthCheck_TcpHealthCheck struct { @@ -721,7 +763,7 @@ type HealthCheck_TcpHealthCheck struct { func (x *HealthCheck_TcpHealthCheck) Reset() { *x = HealthCheck_TcpHealthCheck{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[3] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -734,7 +776,7 @@ func (x *HealthCheck_TcpHealthCheck) String() string { func (*HealthCheck_TcpHealthCheck) ProtoMessage() {} func (x *HealthCheck_TcpHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[3] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -747,7 +789,7 @@ func (x *HealthCheck_TcpHealthCheck) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck_TcpHealthCheck.ProtoReflect.Descriptor instead. func (*HealthCheck_TcpHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0, 2} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 2} } func (x *HealthCheck_TcpHealthCheck) GetSend() *HealthCheck_Payload { @@ -779,7 +821,7 @@ type HealthCheck_RedisHealthCheck struct { func (x *HealthCheck_RedisHealthCheck) Reset() { *x = HealthCheck_RedisHealthCheck{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[4] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -792,7 +834,7 @@ func (x *HealthCheck_RedisHealthCheck) String() string { func (*HealthCheck_RedisHealthCheck) ProtoMessage() {} func (x *HealthCheck_RedisHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[4] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -805,7 +847,7 @@ func (x *HealthCheck_RedisHealthCheck) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck_RedisHealthCheck.ProtoReflect.Descriptor instead. func (*HealthCheck_RedisHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0, 3} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 3} } func (x *HealthCheck_RedisHealthCheck) GetKey() string { @@ -833,14 +875,19 @@ type HealthCheck_GrpcHealthCheck struct { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` + // Specifies a list of key-value pairs that should be added to the metadata of each GRPC call + // that is sent to the health checked cluster. For more information, including details on header value syntax, + // see the documentation on :ref:`custom request headers + // `. + InitialMetadata []*HeaderValueOption `protobuf:"bytes,3,rep,name=initial_metadata,json=initialMetadata,proto3" json:"initial_metadata,omitempty"` } func (x *HealthCheck_GrpcHealthCheck) Reset() { *x = HealthCheck_GrpcHealthCheck{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[5] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -853,7 +900,7 @@ func (x *HealthCheck_GrpcHealthCheck) String() string { func (*HealthCheck_GrpcHealthCheck) ProtoMessage() {} func (x *HealthCheck_GrpcHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[5] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,7 +913,7 @@ func (x *HealthCheck_GrpcHealthCheck) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck_GrpcHealthCheck.ProtoReflect.Descriptor instead. func (*HealthCheck_GrpcHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0, 4} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 4} } func (x *HealthCheck_GrpcHealthCheck) GetServiceName() string { @@ -883,6 +930,13 @@ func (x *HealthCheck_GrpcHealthCheck) GetAuthority() string { return "" } +func (x *HealthCheck_GrpcHealthCheck) GetInitialMetadata() []*HeaderValueOption { + if x != nil { + return x.InitialMetadata + } + return nil +} + // Custom health check. type HealthCheck_CustomHealthCheck struct { state protoimpl.MessageState @@ -893,17 +947,17 @@ type HealthCheck_CustomHealthCheck struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // A custom health checker specific configuration which depends on the custom health checker // being instantiated. See :api:`envoy/config/health_checker` for reference. + // [#extension-category: envoy.health_checkers] // // Types that are assignable to ConfigType: // *HealthCheck_CustomHealthCheck_TypedConfig - // *HealthCheck_CustomHealthCheck_HiddenEnvoyDeprecatedConfig ConfigType isHealthCheck_CustomHealthCheck_ConfigType `protobuf_oneof:"config_type"` } func (x *HealthCheck_CustomHealthCheck) Reset() { *x = HealthCheck_CustomHealthCheck{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[6] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -916,7 +970,7 @@ func (x *HealthCheck_CustomHealthCheck) String() string { func (*HealthCheck_CustomHealthCheck) ProtoMessage() {} func (x *HealthCheck_CustomHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[6] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -929,7 +983,7 @@ func (x *HealthCheck_CustomHealthCheck) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck_CustomHealthCheck.ProtoReflect.Descriptor instead. func (*HealthCheck_CustomHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0, 5} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 5} } func (x *HealthCheck_CustomHealthCheck) GetName() string { @@ -953,14 +1007,6 @@ func (x *HealthCheck_CustomHealthCheck) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *HealthCheck_CustomHealthCheck) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*HealthCheck_CustomHealthCheck_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isHealthCheck_CustomHealthCheck_ConfigType interface { isHealthCheck_CustomHealthCheck_ConfigType() } @@ -969,16 +1015,8 @@ type HealthCheck_CustomHealthCheck_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type HealthCheck_CustomHealthCheck_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*HealthCheck_CustomHealthCheck_TypedConfig) isHealthCheck_CustomHealthCheck_ConfigType() {} -func (*HealthCheck_CustomHealthCheck_HiddenEnvoyDeprecatedConfig) isHealthCheck_CustomHealthCheck_ConfigType() { -} - // Health checks occur over the transport socket specified for the cluster. This implies that if a // cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. // @@ -990,7 +1028,7 @@ type HealthCheck_TlsOptions struct { // Specifies the ALPN protocols for health check connections. This is useful if the // corresponding upstream is using ALPN-based :ref:`FilterChainMatch - // ` along with different protocols for health checks + // ` along with different protocols for health checks // versus data connections. If empty, no ALPN protocols will be set on health check connections. AlpnProtocols []string `protobuf:"bytes,1,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` } @@ -998,7 +1036,7 @@ type HealthCheck_TlsOptions struct { func (x *HealthCheck_TlsOptions) Reset() { *x = HealthCheck_TlsOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[7] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1011,7 +1049,7 @@ func (x *HealthCheck_TlsOptions) String() string { func (*HealthCheck_TlsOptions) ProtoMessage() {} func (x *HealthCheck_TlsOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[7] + mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1024,7 +1062,7 @@ func (x *HealthCheck_TlsOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheck_TlsOptions.ProtoReflect.Descriptor instead. func (*HealthCheck_TlsOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0, 6} + return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 6} } func (x *HealthCheck_TlsOptions) GetAlpnProtocols() []string { @@ -1059,260 +1097,265 @@ var file_envoy_config_core_v3_health_check_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x1d, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, + 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x65, + 0x74, 0x12, 0x4d, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, + 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, + 0x22, 0xef, 0x1c, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x12, 0x3f, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x41, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, + 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, - 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, - 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x13, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x13, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, + 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x11, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x12, 0x37, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x53, - 0x0a, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x07, 0x61, 0x6c, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x10, - 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x11, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x48, 0x00, 0x52, 0x0f, 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x12, 0x5c, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x2e, 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x48, 0x00, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x5f, 0x0a, 0x11, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, + 0x52, 0x07, 0x61, 0x6c, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x72, 0x65, 0x75, + 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x5f, 0x0a, 0x11, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, + 0x52, 0x0f, 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x5c, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, + 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, + 0x0e, 0x74, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, + 0x5f, 0x0a, 0x11, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x47, 0x72, + 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, + 0x0f, 0x67, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x12, 0x65, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x48, 0x00, 0x52, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x12, 0x65, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x13, 0x6e, 0x6f, - 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x11, 0x6e, 0x6f, - 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x62, 0x0a, 0x1b, 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x18, + 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x74, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x18, 0x6e, 0x6f, 0x54, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x52, 0x0a, 0x12, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, - 0x01, 0x02, 0x2a, 0x00, 0x52, 0x11, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5b, 0x0a, 0x17, 0x75, 0x6e, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x15, 0x75, - 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x12, 0x57, 0x0a, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, - 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x79, 0x45, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x24, 0x0a, - 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x46, 0x0a, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x6c, 0x6f, 0x67, - 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x61, 0x6c, - 0x77, 0x61, 0x79, 0x73, 0x4c, 0x6f, 0x67, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0b, 0x74, 0x6c, - 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x11, 0x6e, 0x6f, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x62, 0x0a, 0x1b, + 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x18, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x12, 0x52, 0x0a, 0x12, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, + 0x00, 0x52, 0x11, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5b, 0x0a, 0x17, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x79, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x15, 0x75, 0x6e, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x57, 0x0a, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x65, 0x64, 0x67, + 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, 0x64, + 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x46, 0x0a, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x61, 0x6c, 0x77, 0x61, 0x79, + 0x73, 0x4c, 0x6f, 0x67, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, + 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5e, 0x0a, 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, + 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x1a, 0x80, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x18, 0x0a, 0x06, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x06, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, + 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0e, 0x0a, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xaa, 0x06, 0x0a, 0x0f, 0x48, 0x74, + 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1f, 0x0a, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, + 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, + 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x2e, 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x74, - 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5e, 0x0a, 0x1f, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x1c, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x1a, 0x80, 0x01, 0x0a, 0x07, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x3a, 0x2c, - 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0e, 0x0a, 0x07, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xe3, 0x06, 0x0a, - 0x0f, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0x1f, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, - 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x04, 0x73, - 0x65, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, - 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, - 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, - 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, - 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x46, - 0x0a, 0x11, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x11, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x64, - 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x14, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x21, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x32, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1d, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x48, 0x74, 0x74, 0x70, 0x32, 0x3a, 0x34, 0x9a, 0xc5, - 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x1a, 0xc9, 0x01, 0x0a, 0x0e, 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x04, - 0x73, 0x65, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x04, 0x73, 0x65, 0x6e, 0x64, + 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, - 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x5b, - 0x0a, 0x10, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x95, 0x01, 0x0a, 0x0f, - 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, - 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, - 0x01, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, - 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, + 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, + 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x65, + 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x72, 0x65, 0x74, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x54, 0x0a, + 0x11, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, + 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x52, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x75, 0x73, 0x65, + 0x5f, 0x68, 0x74, 0x74, 0x70, 0x32, 0x1a, 0xc9, 0x01, 0x0a, 0x0e, 0x54, 0x63, 0x70, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x65, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x3a, 0x33, 0x9a, + 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x1a, 0x96, 0x02, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x0d, 0x0a, - 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x64, 0x0a, 0x0a, - 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, - 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x73, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x15, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, - 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x2a, 0x60, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, 0x0c, - 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x47, - 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, 0x05, 0x42, 0x40, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x1a, 0x5b, 0x0a, 0x10, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x52, + 0x65, 0x64, 0x69, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, + 0xf4, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, + 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x5d, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, + 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0xc0, 0x01, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x0d, 0x0a, 0x0b, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x64, 0x0a, 0x0a, 0x54, 0x6c, 0x73, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x3a, 0x2f, + 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, + 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x15, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x0a, + 0x10, 0x0b, 0x2a, 0x60, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, + 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, + 0x45, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x47, 0x52, 0x41, 0x44, + 0x45, 0x44, 0x10, 0x05, 0x42, 0x84, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, + 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1328,64 +1371,67 @@ func file_envoy_config_core_v3_health_check_proto_rawDescGZIP() []byte { } var file_envoy_config_core_v3_health_check_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v3_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_envoy_config_core_v3_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_envoy_config_core_v3_health_check_proto_goTypes = []interface{}{ (HealthStatus)(0), // 0: envoy.config.core.v3.HealthStatus - (*HealthCheck)(nil), // 1: envoy.config.core.v3.HealthCheck - (*HealthCheck_Payload)(nil), // 2: envoy.config.core.v3.HealthCheck.Payload - (*HealthCheck_HttpHealthCheck)(nil), // 3: envoy.config.core.v3.HealthCheck.HttpHealthCheck - (*HealthCheck_TcpHealthCheck)(nil), // 4: envoy.config.core.v3.HealthCheck.TcpHealthCheck - (*HealthCheck_RedisHealthCheck)(nil), // 5: envoy.config.core.v3.HealthCheck.RedisHealthCheck - (*HealthCheck_GrpcHealthCheck)(nil), // 6: envoy.config.core.v3.HealthCheck.GrpcHealthCheck - (*HealthCheck_CustomHealthCheck)(nil), // 7: envoy.config.core.v3.HealthCheck.CustomHealthCheck - (*HealthCheck_TlsOptions)(nil), // 8: envoy.config.core.v3.HealthCheck.TlsOptions - (*duration.Duration)(nil), // 9: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 10: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 11: google.protobuf.BoolValue - (*EventServiceConfig)(nil), // 12: envoy.config.core.v3.EventServiceConfig - (*_struct.Struct)(nil), // 13: google.protobuf.Struct - (*HeaderValueOption)(nil), // 14: envoy.config.core.v3.HeaderValueOption - (*v3.Int64Range)(nil), // 15: envoy.type.v3.Int64Range - (v3.CodecClientType)(0), // 16: envoy.type.v3.CodecClientType - (*v31.StringMatcher)(nil), // 17: envoy.type.matcher.v3.StringMatcher - (*any.Any)(nil), // 18: google.protobuf.Any + (*HealthStatusSet)(nil), // 1: envoy.config.core.v3.HealthStatusSet + (*HealthCheck)(nil), // 2: envoy.config.core.v3.HealthCheck + (*HealthCheck_Payload)(nil), // 3: envoy.config.core.v3.HealthCheck.Payload + (*HealthCheck_HttpHealthCheck)(nil), // 4: envoy.config.core.v3.HealthCheck.HttpHealthCheck + (*HealthCheck_TcpHealthCheck)(nil), // 5: envoy.config.core.v3.HealthCheck.TcpHealthCheck + (*HealthCheck_RedisHealthCheck)(nil), // 6: envoy.config.core.v3.HealthCheck.RedisHealthCheck + (*HealthCheck_GrpcHealthCheck)(nil), // 7: envoy.config.core.v3.HealthCheck.GrpcHealthCheck + (*HealthCheck_CustomHealthCheck)(nil), // 8: envoy.config.core.v3.HealthCheck.CustomHealthCheck + (*HealthCheck_TlsOptions)(nil), // 9: envoy.config.core.v3.HealthCheck.TlsOptions + (*duration.Duration)(nil), // 10: google.protobuf.Duration + (*wrappers.UInt32Value)(nil), // 11: google.protobuf.UInt32Value + (*wrappers.BoolValue)(nil), // 12: google.protobuf.BoolValue + (*EventServiceConfig)(nil), // 13: envoy.config.core.v3.EventServiceConfig + (*_struct.Struct)(nil), // 14: google.protobuf.Struct + (*HeaderValueOption)(nil), // 15: envoy.config.core.v3.HeaderValueOption + (*v3.Int64Range)(nil), // 16: envoy.type.v3.Int64Range + (v3.CodecClientType)(0), // 17: envoy.type.v3.CodecClientType + (*v31.StringMatcher)(nil), // 18: envoy.type.matcher.v3.StringMatcher + (*any.Any)(nil), // 19: google.protobuf.Any } var file_envoy_config_core_v3_health_check_proto_depIdxs = []int32{ - 9, // 0: envoy.config.core.v3.HealthCheck.timeout:type_name -> google.protobuf.Duration - 9, // 1: envoy.config.core.v3.HealthCheck.interval:type_name -> google.protobuf.Duration - 9, // 2: envoy.config.core.v3.HealthCheck.initial_jitter:type_name -> google.protobuf.Duration - 9, // 3: envoy.config.core.v3.HealthCheck.interval_jitter:type_name -> google.protobuf.Duration - 10, // 4: envoy.config.core.v3.HealthCheck.unhealthy_threshold:type_name -> google.protobuf.UInt32Value - 10, // 5: envoy.config.core.v3.HealthCheck.healthy_threshold:type_name -> google.protobuf.UInt32Value - 10, // 6: envoy.config.core.v3.HealthCheck.alt_port:type_name -> google.protobuf.UInt32Value - 11, // 7: envoy.config.core.v3.HealthCheck.reuse_connection:type_name -> google.protobuf.BoolValue - 3, // 8: envoy.config.core.v3.HealthCheck.http_health_check:type_name -> envoy.config.core.v3.HealthCheck.HttpHealthCheck - 4, // 9: envoy.config.core.v3.HealthCheck.tcp_health_check:type_name -> envoy.config.core.v3.HealthCheck.TcpHealthCheck - 6, // 10: envoy.config.core.v3.HealthCheck.grpc_health_check:type_name -> envoy.config.core.v3.HealthCheck.GrpcHealthCheck - 7, // 11: envoy.config.core.v3.HealthCheck.custom_health_check:type_name -> envoy.config.core.v3.HealthCheck.CustomHealthCheck - 9, // 12: envoy.config.core.v3.HealthCheck.no_traffic_interval:type_name -> google.protobuf.Duration - 9, // 13: envoy.config.core.v3.HealthCheck.no_traffic_healthy_interval:type_name -> google.protobuf.Duration - 9, // 14: envoy.config.core.v3.HealthCheck.unhealthy_interval:type_name -> google.protobuf.Duration - 9, // 15: envoy.config.core.v3.HealthCheck.unhealthy_edge_interval:type_name -> google.protobuf.Duration - 9, // 16: envoy.config.core.v3.HealthCheck.healthy_edge_interval:type_name -> google.protobuf.Duration - 12, // 17: envoy.config.core.v3.HealthCheck.event_service:type_name -> envoy.config.core.v3.EventServiceConfig - 8, // 18: envoy.config.core.v3.HealthCheck.tls_options:type_name -> envoy.config.core.v3.HealthCheck.TlsOptions - 13, // 19: envoy.config.core.v3.HealthCheck.transport_socket_match_criteria:type_name -> google.protobuf.Struct - 2, // 20: envoy.config.core.v3.HealthCheck.HttpHealthCheck.send:type_name -> envoy.config.core.v3.HealthCheck.Payload - 2, // 21: envoy.config.core.v3.HealthCheck.HttpHealthCheck.receive:type_name -> envoy.config.core.v3.HealthCheck.Payload - 14, // 22: envoy.config.core.v3.HealthCheck.HttpHealthCheck.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 15, // 23: envoy.config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses:type_name -> envoy.type.v3.Int64Range - 16, // 24: envoy.config.core.v3.HealthCheck.HttpHealthCheck.codec_client_type:type_name -> envoy.type.v3.CodecClientType - 17, // 25: envoy.config.core.v3.HealthCheck.HttpHealthCheck.service_name_matcher:type_name -> envoy.type.matcher.v3.StringMatcher - 2, // 26: envoy.config.core.v3.HealthCheck.TcpHealthCheck.send:type_name -> envoy.config.core.v3.HealthCheck.Payload - 2, // 27: envoy.config.core.v3.HealthCheck.TcpHealthCheck.receive:type_name -> envoy.config.core.v3.HealthCheck.Payload - 18, // 28: envoy.config.core.v3.HealthCheck.CustomHealthCheck.typed_config:type_name -> google.protobuf.Any - 13, // 29: envoy.config.core.v3.HealthCheck.CustomHealthCheck.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 0, // 0: envoy.config.core.v3.HealthStatusSet.statuses:type_name -> envoy.config.core.v3.HealthStatus + 10, // 1: envoy.config.core.v3.HealthCheck.timeout:type_name -> google.protobuf.Duration + 10, // 2: envoy.config.core.v3.HealthCheck.interval:type_name -> google.protobuf.Duration + 10, // 3: envoy.config.core.v3.HealthCheck.initial_jitter:type_name -> google.protobuf.Duration + 10, // 4: envoy.config.core.v3.HealthCheck.interval_jitter:type_name -> google.protobuf.Duration + 11, // 5: envoy.config.core.v3.HealthCheck.unhealthy_threshold:type_name -> google.protobuf.UInt32Value + 11, // 6: envoy.config.core.v3.HealthCheck.healthy_threshold:type_name -> google.protobuf.UInt32Value + 11, // 7: envoy.config.core.v3.HealthCheck.alt_port:type_name -> google.protobuf.UInt32Value + 12, // 8: envoy.config.core.v3.HealthCheck.reuse_connection:type_name -> google.protobuf.BoolValue + 4, // 9: envoy.config.core.v3.HealthCheck.http_health_check:type_name -> envoy.config.core.v3.HealthCheck.HttpHealthCheck + 5, // 10: envoy.config.core.v3.HealthCheck.tcp_health_check:type_name -> envoy.config.core.v3.HealthCheck.TcpHealthCheck + 7, // 11: envoy.config.core.v3.HealthCheck.grpc_health_check:type_name -> envoy.config.core.v3.HealthCheck.GrpcHealthCheck + 8, // 12: envoy.config.core.v3.HealthCheck.custom_health_check:type_name -> envoy.config.core.v3.HealthCheck.CustomHealthCheck + 10, // 13: envoy.config.core.v3.HealthCheck.no_traffic_interval:type_name -> google.protobuf.Duration + 10, // 14: envoy.config.core.v3.HealthCheck.no_traffic_healthy_interval:type_name -> google.protobuf.Duration + 10, // 15: envoy.config.core.v3.HealthCheck.unhealthy_interval:type_name -> google.protobuf.Duration + 10, // 16: envoy.config.core.v3.HealthCheck.unhealthy_edge_interval:type_name -> google.protobuf.Duration + 10, // 17: envoy.config.core.v3.HealthCheck.healthy_edge_interval:type_name -> google.protobuf.Duration + 13, // 18: envoy.config.core.v3.HealthCheck.event_service:type_name -> envoy.config.core.v3.EventServiceConfig + 9, // 19: envoy.config.core.v3.HealthCheck.tls_options:type_name -> envoy.config.core.v3.HealthCheck.TlsOptions + 14, // 20: envoy.config.core.v3.HealthCheck.transport_socket_match_criteria:type_name -> google.protobuf.Struct + 3, // 21: envoy.config.core.v3.HealthCheck.HttpHealthCheck.send:type_name -> envoy.config.core.v3.HealthCheck.Payload + 3, // 22: envoy.config.core.v3.HealthCheck.HttpHealthCheck.receive:type_name -> envoy.config.core.v3.HealthCheck.Payload + 15, // 23: envoy.config.core.v3.HealthCheck.HttpHealthCheck.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 16, // 24: envoy.config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses:type_name -> envoy.type.v3.Int64Range + 16, // 25: envoy.config.core.v3.HealthCheck.HttpHealthCheck.retriable_statuses:type_name -> envoy.type.v3.Int64Range + 17, // 26: envoy.config.core.v3.HealthCheck.HttpHealthCheck.codec_client_type:type_name -> envoy.type.v3.CodecClientType + 18, // 27: envoy.config.core.v3.HealthCheck.HttpHealthCheck.service_name_matcher:type_name -> envoy.type.matcher.v3.StringMatcher + 3, // 28: envoy.config.core.v3.HealthCheck.TcpHealthCheck.send:type_name -> envoy.config.core.v3.HealthCheck.Payload + 3, // 29: envoy.config.core.v3.HealthCheck.TcpHealthCheck.receive:type_name -> envoy.config.core.v3.HealthCheck.Payload + 15, // 30: envoy.config.core.v3.HealthCheck.GrpcHealthCheck.initial_metadata:type_name -> envoy.config.core.v3.HeaderValueOption + 19, // 31: envoy.config.core.v3.HealthCheck.CustomHealthCheck.typed_config:type_name -> google.protobuf.Any + 32, // [32:32] is the sub-list for method output_type + 32, // [32:32] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_health_check_proto_init() } @@ -1397,7 +1443,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { file_envoy_config_core_v3_event_service_config_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_config_core_v3_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck); i { + switch v := v.(*HealthStatusSet); i { case 0: return &v.state case 1: @@ -1409,7 +1455,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } file_envoy_config_core_v3_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_Payload); i { + switch v := v.(*HealthCheck); i { case 0: return &v.state case 1: @@ -1421,7 +1467,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } file_envoy_config_core_v3_health_check_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_HttpHealthCheck); i { + switch v := v.(*HealthCheck_Payload); i { case 0: return &v.state case 1: @@ -1433,7 +1479,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } file_envoy_config_core_v3_health_check_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_TcpHealthCheck); i { + switch v := v.(*HealthCheck_HttpHealthCheck); i { case 0: return &v.state case 1: @@ -1445,7 +1491,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } file_envoy_config_core_v3_health_check_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_RedisHealthCheck); i { + switch v := v.(*HealthCheck_TcpHealthCheck); i { case 0: return &v.state case 1: @@ -1457,7 +1503,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } file_envoy_config_core_v3_health_check_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_GrpcHealthCheck); i { + switch v := v.(*HealthCheck_RedisHealthCheck); i { case 0: return &v.state case 1: @@ -1469,7 +1515,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } file_envoy_config_core_v3_health_check_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_CustomHealthCheck); i { + switch v := v.(*HealthCheck_GrpcHealthCheck); i { case 0: return &v.state case 1: @@ -1481,6 +1527,18 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } file_envoy_config_core_v3_health_check_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheck_CustomHealthCheck); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_health_check_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HealthCheck_TlsOptions); i { case 0: return &v.state @@ -1493,19 +1551,18 @@ func file_envoy_config_core_v3_health_check_proto_init() { } } } - file_envoy_config_core_v3_health_check_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_health_check_proto_msgTypes[1].OneofWrappers = []interface{}{ (*HealthCheck_HttpHealthCheck_)(nil), (*HealthCheck_TcpHealthCheck_)(nil), (*HealthCheck_GrpcHealthCheck_)(nil), (*HealthCheck_CustomHealthCheck_)(nil), } - file_envoy_config_core_v3_health_check_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_health_check_proto_msgTypes[2].OneofWrappers = []interface{}{ (*HealthCheck_Payload_Text)(nil), (*HealthCheck_Payload_Binary)(nil), } - file_envoy_config_core_v3_health_check_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_health_check_proto_msgTypes[7].OneofWrappers = []interface{}{ (*HealthCheck_CustomHealthCheck_TypedConfig)(nil), - (*HealthCheck_CustomHealthCheck_HiddenEnvoyDeprecatedConfig)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1513,7 +1570,7 @@ func file_envoy_config_core_v3_health_check_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_core_v3_health_check_proto_rawDesc, NumEnums: 1, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/core/v3/health_check.pb.validate.go b/pkg/api/envoy/config/core/v3/health_check.pb.validate.go index 1fcedfb678..eb29d7dfe1 100644 --- a/pkg/api/envoy/config/core/v3/health_check.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/health_check.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/health_check.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" ) @@ -32,76 +33,252 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.CodecClientType(0) ) +// Validate checks the field values on HealthStatusSet with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *HealthStatusSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthStatusSet with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthStatusSetMultiError, or nil if none found. +func (m *HealthStatusSet) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthStatusSet) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetStatuses() { + _, _ = idx, item + + if _, ok := HealthStatus_name[int32(item)]; !ok { + err := HealthStatusSetValidationError{ + field: fmt.Sprintf("Statuses[%v]", idx), + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return HealthStatusSetMultiError(errors) + } + + return nil +} + +// HealthStatusSetMultiError is an error wrapping multiple validation errors +// returned by HealthStatusSet.ValidateAll() if the designated constraints +// aren't met. +type HealthStatusSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthStatusSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthStatusSetMultiError) AllErrors() []error { return m } + +// HealthStatusSetValidationError is the validation error returned by +// HealthStatusSet.Validate if the designated constraints aren't met. +type HealthStatusSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthStatusSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthStatusSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthStatusSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthStatusSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthStatusSetValidationError) ErrorName() string { return "HealthStatusSetValidationError" } + +// Error satisfies the builtin error interface +func (e HealthStatusSetValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHealthStatusSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthStatusSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthStatusSetValidationError{} + // Validate checks the field values on HealthCheck with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HealthCheckMultiError, or +// nil if none found. +func (m *HealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetTimeout() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "Timeout", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "Timeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "Timeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "Timeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if m.GetInterval() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "Interval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "Interval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "Interval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "Interval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetInitialJitter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInitialJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "InitialJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "InitialJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInitialJitter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "InitialJitter", @@ -111,7 +288,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIntervalJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "IntervalJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "IntervalJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "IntervalJitter", @@ -124,13 +320,36 @@ func (m *HealthCheck) Validate() error { // no validation rules for IntervalJitterPercent if m.GetUnhealthyThreshold() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "UnhealthyThreshold", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetUnhealthyThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUnhealthyThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "UnhealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "UnhealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUnhealthyThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "UnhealthyThreshold", @@ -141,13 +360,36 @@ func (m *HealthCheck) Validate() error { } if m.GetHealthyThreshold() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "HealthyThreshold", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHealthyThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthyThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HealthyThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthyThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "HealthyThreshold", @@ -157,7 +399,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetAltPort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAltPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "AltPort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "AltPort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAltPort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "AltPort", @@ -167,7 +428,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetReuseConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetReuseConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "ReuseConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "ReuseConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetReuseConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "ReuseConnection", @@ -178,113 +458,177 @@ func (m *HealthCheck) Validate() error { } if d := m.GetNoTrafficInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "NoTrafficInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "NoTrafficInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "NoTrafficInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetNoTrafficHealthyInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "NoTrafficHealthyInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "NoTrafficHealthyInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "NoTrafficHealthyInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetUnhealthyInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "UnhealthyInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "UnhealthyInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "UnhealthyInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetUnhealthyEdgeInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "UnhealthyEdgeInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "UnhealthyEdgeInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "UnhealthyEdgeInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetHealthyEdgeInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HealthCheckValidationError{ + err = HealthCheckValidationError{ field: "HealthyEdgeInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return HealthCheckValidationError{ - field: "HealthyEdgeInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := HealthCheckValidationError{ + field: "HealthyEdgeInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } // no validation rules for EventLogPath - if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEventService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "EventService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "EventService", @@ -296,7 +640,26 @@ func (m *HealthCheck) Validate() error { // no validation rules for AlwaysLogHealthCheckFailures - if v, ok := interface{}(m.GetTlsOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TlsOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TlsOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "TlsOptions", @@ -306,7 +669,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetTransportSocketMatchCriteria()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocketMatchCriteria()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TransportSocketMatchCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TransportSocketMatchCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocketMatchCriteria()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "TransportSocketMatchCriteria", @@ -320,7 +702,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_HttpHealthCheck_: - if v, ok := interface{}(m.GetHttpHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HttpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "HttpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "HttpHealthCheck", @@ -332,7 +733,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_TcpHealthCheck_: - if v, ok := interface{}(m.GetTcpHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTcpHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TcpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "TcpHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "TcpHealthCheck", @@ -344,7 +764,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_GrpcHealthCheck_: - if v, ok := interface{}(m.GetGrpcHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "GrpcHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "GrpcHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "GrpcHealthCheck", @@ -356,7 +795,26 @@ func (m *HealthCheck) Validate() error { case *HealthCheck_CustomHealthCheck_: - if v, ok := interface{}(m.GetCustomHealthCheck()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCustomHealthCheck()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CustomHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CustomHealthCheck", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomHealthCheck()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "CustomHealthCheck", @@ -367,16 +825,40 @@ func (m *HealthCheck) Validate() error { } default: - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "HealthChecker", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HealthCheckMultiError(errors) } return nil } +// HealthCheckMultiError is an error wrapping multiple validation errors +// returned by HealthCheck.ValidateAll() if the designated constraints aren't met. +type HealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckMultiError) AllErrors() []error { return m } + // HealthCheckValidationError is the validation error returned by // HealthCheck.Validate if the designated constraints aren't met. type HealthCheckValidationError struct { @@ -433,37 +915,80 @@ var _ interface { // Validate checks the field values on HealthCheck_Payload with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_Payload) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_Payload with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_PayloadMultiError, or nil if none found. +func (m *HealthCheck_Payload) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_Payload) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Payload.(type) { case *HealthCheck_Payload_Text: if utf8.RuneCountInString(m.GetText()) < 1 { - return HealthCheck_PayloadValidationError{ + err := HealthCheck_PayloadValidationError{ field: "Text", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *HealthCheck_Payload_Binary: // no validation rules for Binary default: - return HealthCheck_PayloadValidationError{ + err := HealthCheck_PayloadValidationError{ field: "Payload", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return HealthCheck_PayloadMultiError(errors) + } + return nil } +// HealthCheck_PayloadMultiError is an error wrapping multiple validation +// errors returned by HealthCheck_Payload.ValidateAll() if the designated +// constraints aren't met. +type HealthCheck_PayloadMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_PayloadMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_PayloadMultiError) AllErrors() []error { return m } + // HealthCheck_PayloadValidationError is the validation error returned by // HealthCheck_Payload.Validate if the designated constraints aren't met. type HealthCheck_PayloadValidationError struct { @@ -522,34 +1047,79 @@ var _ interface { // Validate checks the field values on HealthCheck_HttpHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_HttpHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_HttpHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_HttpHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_HttpHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_HttpHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + if !_HealthCheck_HttpHealthCheck_Host_Pattern.MatchString(m.GetHost()) { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "Host", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetPath()) < 1 { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "Path", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_HealthCheck_HttpHealthCheck_Path_Pattern.MatchString(m.GetPath()) { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "Path", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSend()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Send", @@ -559,7 +1129,26 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetReceive()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetReceive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Receive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "Receive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetReceive()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Receive", @@ -570,16 +1159,39 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } if len(m.GetRequestHeadersToAdd()) > 1000 { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -595,10 +1207,14 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { _, _ = idx, item if !_HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern.MatchString(item) { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } @@ -606,7 +1222,26 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { for idx, item := range m.GetExpectedStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("ExpectedStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("ExpectedStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("ExpectedStatuses[%v]", idx), @@ -618,14 +1253,71 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } + for idx, item := range m.GetRetriableStatuses() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("RetriableStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("RetriableStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheck_HttpHealthCheckValidationError{ + field: fmt.Sprintf("RetriableStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if _, ok := v3.CodecClientType_name[int32(m.GetCodecClientType())]; !ok { - return HealthCheck_HttpHealthCheckValidationError{ + err := HealthCheck_HttpHealthCheckValidationError{ field: "CodecClientType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetServiceNameMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetServiceNameMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "ServiceNameMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ + field: "ServiceNameMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServiceNameMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "ServiceNameMatcher", @@ -635,13 +1327,30 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } } - // no validation rules for HiddenEnvoyDeprecatedServiceName - - // no validation rules for HiddenEnvoyDeprecatedUseHttp2 + if len(errors) > 0 { + return HealthCheck_HttpHealthCheckMultiError(errors) + } return nil } +// HealthCheck_HttpHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_HttpHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_HttpHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_HttpHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_HttpHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_HttpHealthCheckValidationError is the validation error returned // by HealthCheck_HttpHealthCheck.Validate if the designated constraints // aren't met. @@ -707,13 +1416,46 @@ var _HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern = regexp.MustCom // Validate checks the field values on HealthCheck_TcpHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_TcpHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_TcpHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_TcpHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_TcpHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_TcpHealthCheck) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSend()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: "Send", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: "Send", @@ -726,7 +1468,26 @@ func (m *HealthCheck_TcpHealthCheck) Validate() error { for idx, item := range m.GetReceive() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: fmt.Sprintf("Receive[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ + field: fmt.Sprintf("Receive[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: fmt.Sprintf("Receive[%v]", idx), @@ -738,9 +1499,30 @@ func (m *HealthCheck_TcpHealthCheck) Validate() error { } + if len(errors) > 0 { + return HealthCheck_TcpHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_TcpHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_TcpHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_TcpHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_TcpHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_TcpHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_TcpHealthCheckValidationError is the validation error returned // by HealthCheck_TcpHealthCheck.Validate if the designated constraints aren't met. type HealthCheck_TcpHealthCheckValidationError struct { @@ -799,17 +1581,52 @@ var _ interface { // Validate checks the field values on HealthCheck_RedisHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_RedisHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_RedisHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_RedisHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_RedisHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_RedisHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Key + if len(errors) > 0 { + return HealthCheck_RedisHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_RedisHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_RedisHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_RedisHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_RedisHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_RedisHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_RedisHealthCheckValidationError is the validation error returned // by HealthCheck_RedisHealthCheck.Validate if the designated constraints // aren't met. @@ -869,24 +1686,108 @@ var _ interface { // Validate checks the field values on HealthCheck_GrpcHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_GrpcHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_GrpcHealthCheck with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_GrpcHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_GrpcHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_GrpcHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ServiceName if !_HealthCheck_GrpcHealthCheck_Authority_Pattern.MatchString(m.GetAuthority()) { - return HealthCheck_GrpcHealthCheckValidationError{ + err := HealthCheck_GrpcHealthCheckValidationError{ field: "Authority", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(m.GetInitialMetadata()) > 1000 { + err := HealthCheck_GrpcHealthCheckValidationError{ + field: "InitialMetadata", + reason: "value must contain no more than 1000 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetInitialMetadata() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_GrpcHealthCheckValidationError{ + field: fmt.Sprintf("InitialMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_GrpcHealthCheckValidationError{ + field: fmt.Sprintf("InitialMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheck_GrpcHealthCheckValidationError{ + field: fmt.Sprintf("InitialMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HealthCheck_GrpcHealthCheckMultiError(errors) } return nil } +// HealthCheck_GrpcHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_GrpcHealthCheck.ValidateAll() if +// the designated constraints aren't met. +type HealthCheck_GrpcHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_GrpcHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_GrpcHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_GrpcHealthCheckValidationError is the validation error returned // by HealthCheck_GrpcHealthCheck.Validate if the designated constraints // aren't met. @@ -948,39 +1849,64 @@ var _HealthCheck_GrpcHealthCheck_Authority_Pattern = regexp.MustCompile("^[^\x00 // Validate checks the field values on HealthCheck_CustomHealthCheck with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_CustomHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_CustomHealthCheck with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// HealthCheck_CustomHealthCheckMultiError, or nil if none found. +func (m *HealthCheck_CustomHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_CustomHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return HealthCheck_CustomHealthCheckValidationError{ + err := HealthCheck_CustomHealthCheckValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *HealthCheck_CustomHealthCheck_TypedConfig: - 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *HealthCheck_CustomHealthCheck_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_CustomHealthCheckValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -989,9 +1915,30 @@ func (m *HealthCheck_CustomHealthCheck) Validate() error { } + if len(errors) > 0 { + return HealthCheck_CustomHealthCheckMultiError(errors) + } + return nil } +// HealthCheck_CustomHealthCheckMultiError is an error wrapping multiple +// validation errors returned by HealthCheck_CustomHealthCheck.ValidateAll() +// if the designated constraints aren't met. +type HealthCheck_CustomHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_CustomHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_CustomHealthCheckMultiError) AllErrors() []error { return m } + // HealthCheck_CustomHealthCheckValidationError is the validation error // returned by HealthCheck_CustomHealthCheck.Validate if the designated // constraints aren't met. @@ -1051,15 +1998,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheck_TlsOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck_TlsOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheck_TlsOptionsMultiError, or nil if none found. +func (m *HealthCheck_TlsOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck_TlsOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return HealthCheck_TlsOptionsMultiError(errors) + } + return nil } +// HealthCheck_TlsOptionsMultiError is an error wrapping multiple validation +// errors returned by HealthCheck_TlsOptions.ValidateAll() if the designated +// constraints aren't met. +type HealthCheck_TlsOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheck_TlsOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheck_TlsOptionsMultiError) AllErrors() []error { return m } + // HealthCheck_TlsOptionsValidationError is the validation error returned by // HealthCheck_TlsOptions.Validate if the designated constraints aren't met. type HealthCheck_TlsOptionsValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/http_uri.pb.go b/pkg/api/envoy/config/core/v3/http_uri.pb.go index cfe3c3fda6..836e9e4bc7 100644 --- a/pkg/api/envoy/config/core/v3/http_uri.pb.go +++ b/pkg/api/envoy/config/core/v3/http_uri.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/http_uri.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Envoy external URI descriptor type HttpUri struct { state protoimpl.MessageState @@ -161,11 +156,15 @@ var file_envoy_config_core_v3_http_uri_proto_rawDesc = []byte{ 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x42, 0x19, 0x0a, 0x12, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x42, 0x3c, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x80, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/core/v3/http_uri.pb.validate.go b/pkg/api/envoy/config/core/v3/http_uri.pb.validate.go index cfcf922f8e..c9af6f7dab 100644 --- a/pkg/api/envoy/config/core/v3/http_uri.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/http_uri.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/http_uri.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,49 +31,81 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpUri with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpUri) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpUri with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in HttpUriMultiError, or nil if none found. +func (m *HttpUri) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpUri) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetUri()) < 1 { - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "Uri", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetTimeout() == nil { - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "Timeout", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HttpUriValidationError{ + err = 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", + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := HttpUriValidationError{ + field: "Timeout", + reason: "value must be greater than or equal to 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } switch m.HttpUpstreamType.(type) { @@ -80,23 +113,51 @@ func (m *HttpUri) Validate() error { case *HttpUri_Cluster: if utf8.RuneCountInString(m.GetCluster()) < 1 { - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "Cluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } default: - return HttpUriValidationError{ + err := HttpUriValidationError{ field: "HttpUpstreamType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HttpUriMultiError(errors) } return nil } +// HttpUriMultiError is an error wrapping multiple validation errors returned +// by HttpUri.ValidateAll() if the designated constraints aren't met. +type HttpUriMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpUriMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpUriMultiError) AllErrors() []error { return m } + // HttpUriValidationError is the validation error returned by HttpUri.Validate // if the designated constraints aren't met. type HttpUriValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/protocol.pb.go b/pkg/api/envoy/config/core/v3/protocol.pb.go index 3073f7c2de..8d97d435ad 100644 --- a/pkg/api/envoy/config/core/v3/protocol.pb.go +++ b/pkg/api/envoy/config/core/v3/protocol.pb.go @@ -1,16 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/protocol.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Action to take when Envoy receives client request with header names containing underscore // characters. // Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented @@ -44,7 +41,7 @@ const ( // end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter // is incremented for each rejected request. HttpProtocolOptions_REJECT_REQUEST HttpProtocolOptions_HeadersWithUnderscoresAction = 1 - // Drop the header with name containing underscores. The header is dropped before the filter chain is + // Drop the client header with name containing underscores. The header is dropped before the filter chain is // invoked and as such filters will not see dropped headers. The // "httpN.dropped_headers_with_underscores" is incremented for each dropped header. HttpProtocolOptions_DROP_HEADER HttpProtocolOptions_HeadersWithUnderscoresAction = 2 @@ -88,7 +85,7 @@ func (x HttpProtocolOptions_HeadersWithUnderscoresAction) Number() protoreflect. // Deprecated: Use HttpProtocolOptions_HeadersWithUnderscoresAction.Descriptor instead. func (HttpProtocolOptions_HeadersWithUnderscoresAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{2, 0} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{5, 0} } // [#not-implemented-hide:] @@ -130,26 +127,209 @@ func (*TcpProtocolOptions) Descriptor() ([]byte, []int) { return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{0} } +// Config for keepalive probes in a QUIC connection. +// Note that QUIC keep-alive probing packets work differently from HTTP/2 keep-alive PINGs in a sense that the probing packet +// itself doesn't timeout waiting for a probing response. Quic has a shorter idle timeout than TCP, so it doesn't rely on such probing to discover dead connections. If the peer fails to respond, the connection will idle timeout eventually. Thus, they are configured differently from :ref:`connection_keepalive `. +type QuicKeepAliveSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The max interval for a connection to send keep-alive probing packets (with PING or PATH_RESPONSE). The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout while not less than 1s to avoid throttling the connection or flooding the peer with probes. + // + // If :ref:`initial_interval ` is absent or zero, a client connection will use this value to start probing. + // + // If zero, disable keepalive probing. + // If absent, use the QUICHE default interval to probe. + MaxInterval *duration.Duration `protobuf:"bytes,1,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` + // The interval to send the first few keep-alive probing packets to prevent connection from hitting the idle timeout. Subsequent probes will be sent, each one with an interval exponentially longer than previous one, till it reaches :ref:`max_interval `. And the probes afterwards will always use :ref:`max_interval `. + // + // The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout and smaller than max_interval to take effect. + // + // If absent or zero, disable keepalive probing for a server connection. For a client connection, if :ref:`max_interval ` is also zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time. + InitialInterval *duration.Duration `protobuf:"bytes,2,opt,name=initial_interval,json=initialInterval,proto3" json:"initial_interval,omitempty"` +} + +func (x *QuicKeepAliveSettings) Reset() { + *x = QuicKeepAliveSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuicKeepAliveSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuicKeepAliveSettings) ProtoMessage() {} + +func (x *QuicKeepAliveSettings) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuicKeepAliveSettings.ProtoReflect.Descriptor instead. +func (*QuicKeepAliveSettings) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{1} +} + +func (x *QuicKeepAliveSettings) GetMaxInterval() *duration.Duration { + if x != nil { + return x.MaxInterval + } + return nil +} + +func (x *QuicKeepAliveSettings) GetInitialInterval() *duration.Duration { + if x != nil { + return x.InitialInterval + } + return nil +} + +// QUIC protocol options which apply to both downstream and upstream connections. +// [#next-free-field: 6] +type QuicProtocolOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Maximum number of streams that the client can negotiate per connection. 100 + // if not specified. + MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` + // `Initial stream-level flow-control receive window + // `_ size. Valid values range from + // 1 to 16777216 (2^24, maximum supported by QUICHE) and defaults to 65536 (2^16). + // + // NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. If configured smaller than it, we will use 16384 instead. + // QUICHE IETF Quic implementation supports 1 bytes window. We only support increasing the default window size now, so it's also the minimum. + // + // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the + // QUIC stream send and receive buffers. Once the buffer reaches this pointer, watermark callbacks will fire to + // stop the flow of data to the stream buffers. + InitialStreamWindowSize *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=initial_stream_window_size,json=initialStreamWindowSize,proto3" json:"initial_stream_window_size,omitempty"` + // Similar to *initial_stream_window_size*, but for connection-level + // flow-control. Valid values rage from 1 to 25165824 (24MB, maximum supported by QUICHE) and defaults to 65536 (2^16). + // window. Currently, this has the same minimum/default as *initial_stream_window_size*. + // + // NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. We only support increasing the default + // window size now, so it's also the minimum. + InitialConnectionWindowSize *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=initial_connection_window_size,json=initialConnectionWindowSize,proto3" json:"initial_connection_window_size,omitempty"` + // The number of timeouts that can occur before port migration is triggered for QUIC clients. + // This defaults to 1. If set to 0, port migration will not occur on path degrading. + // Timeout here refers to QUIC internal path degrading timeout mechanism, such as PTO. + // This has no effect on server sessions. + NumTimeoutsToTriggerPortMigration *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=num_timeouts_to_trigger_port_migration,json=numTimeoutsToTriggerPortMigration,proto3" json:"num_timeouts_to_trigger_port_migration,omitempty"` + // Probes the peer at the configured interval to solicit traffic, i.e. ACK or PATH_RESPONSE, from the peer to push back connection idle timeout. + // If absent, use the default keepalive behavior of which a client connection sends PINGs every 15s, and a server connection doesn't do anything. + ConnectionKeepalive *QuicKeepAliveSettings `protobuf:"bytes,5,opt,name=connection_keepalive,json=connectionKeepalive,proto3" json:"connection_keepalive,omitempty"` +} + +func (x *QuicProtocolOptions) Reset() { + *x = QuicProtocolOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuicProtocolOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuicProtocolOptions) ProtoMessage() {} + +func (x *QuicProtocolOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuicProtocolOptions.ProtoReflect.Descriptor instead. +func (*QuicProtocolOptions) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{2} +} + +func (x *QuicProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value { + if x != nil { + return x.MaxConcurrentStreams + } + return nil +} + +func (x *QuicProtocolOptions) GetInitialStreamWindowSize() *wrappers.UInt32Value { + if x != nil { + return x.InitialStreamWindowSize + } + return nil +} + +func (x *QuicProtocolOptions) GetInitialConnectionWindowSize() *wrappers.UInt32Value { + if x != nil { + return x.InitialConnectionWindowSize + } + return nil +} + +func (x *QuicProtocolOptions) GetNumTimeoutsToTriggerPortMigration() *wrappers.UInt32Value { + if x != nil { + return x.NumTimeoutsToTriggerPortMigration + } + return nil +} + +func (x *QuicProtocolOptions) GetConnectionKeepalive() *QuicKeepAliveSettings { + if x != nil { + return x.ConnectionKeepalive + } + return nil +} + type UpstreamHttpProtocolOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Set transport socket `SNI `_ for new - // upstream connections based on the downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. + // upstream connections based on the downstream HTTP host/authority header or any other arbitrary + // header when :ref:`override_auto_sni_header ` + // is set, as seen by the :ref:`router filter `. AutoSni bool `protobuf:"varint,1,opt,name=auto_sni,json=autoSni,proto3" json:"auto_sni,omitempty"` // Automatic validate upstream presented certificate for new upstream connections based on the - // downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - // This field is intended to set with `auto_sni` field. + // downstream HTTP host/authority header or any other arbitrary header when :ref:`override_auto_sni_header ` + // is set, as seen by the :ref:`router filter `. + // This field is intended to be set with `auto_sni` field. AutoSanValidation bool `protobuf:"varint,2,opt,name=auto_san_validation,json=autoSanValidation,proto3" json:"auto_san_validation,omitempty"` + // An optional alternative to the host/authority header to be used for setting the SNI value. + // It should be a valid downstream HTTP header, as seen by the + // :ref:`router filter `. + // If unset, host/authority header will be used for populating the SNI. If the specified header + // is not found or the value is empty, host/authority header will be used instead. + // This field is intended to be set with `auto_sni` and/or `auto_san_validation` fields. + // If none of these fields are set then setting this would be a no-op. + OverrideAutoSniHeader string `protobuf:"bytes,3,opt,name=override_auto_sni_header,json=overrideAutoSniHeader,proto3" json:"override_auto_sni_header,omitempty"` } func (x *UpstreamHttpProtocolOptions) Reset() { *x = UpstreamHttpProtocolOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[1] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -162,7 +342,7 @@ func (x *UpstreamHttpProtocolOptions) String() string { func (*UpstreamHttpProtocolOptions) ProtoMessage() {} func (x *UpstreamHttpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[1] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -175,7 +355,7 @@ func (x *UpstreamHttpProtocolOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use UpstreamHttpProtocolOptions.ProtoReflect.Descriptor instead. func (*UpstreamHttpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{1} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{3} } func (x *UpstreamHttpProtocolOptions) GetAutoSni() bool { @@ -192,7 +372,107 @@ func (x *UpstreamHttpProtocolOptions) GetAutoSanValidation() bool { return false } -// [#next-free-field: 6] +func (x *UpstreamHttpProtocolOptions) GetOverrideAutoSniHeader() string { + if x != nil { + return x.OverrideAutoSniHeader + } + return "" +} + +// Configures the alternate protocols cache which tracks alternate protocols that can be used to +// make an HTTP connection to an origin server. See https://tools.ietf.org/html/rfc7838 for +// HTTP Alternative Services and https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https-04 +// for the "HTTPS" DNS resource record. +type AlternateProtocolsCacheOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the cache. Multiple named caches allow independent alternate protocols cache + // configurations to operate within a single Envoy process using different configurations. All + // alternate protocols cache options with the same name *must* be equal in all fields when + // referenced from different configuration components. Configuration will fail to load if this is + // not the case. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The maximum number of entries that the cache will hold. If not specified defaults to 1024. + // + // .. note: + // + // The implementation is approximate and enforced independently on each worker thread, thus + // it is possible for the maximum entries in the cache to go slightly above the configured + // value depending on timing. This is similar to how other circuit breakers work. + MaxEntries *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` + // Allows configuring a persistent + // :ref:`key value store ` to flush + // alternate protocols entries to disk. + // This function is currently only supported if concurrency is 1 + // Cached entries will take precedence over pre-populated entries below. + KeyValueStoreConfig *TypedExtensionConfig `protobuf:"bytes,3,opt,name=key_value_store_config,json=keyValueStoreConfig,proto3" json:"key_value_store_config,omitempty"` + // Allows pre-populating the cache with entries, as described above. + PrepopulatedEntries []*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry `protobuf:"bytes,4,rep,name=prepopulated_entries,json=prepopulatedEntries,proto3" json:"prepopulated_entries,omitempty"` +} + +func (x *AlternateProtocolsCacheOptions) Reset() { + *x = AlternateProtocolsCacheOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AlternateProtocolsCacheOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlternateProtocolsCacheOptions) ProtoMessage() {} + +func (x *AlternateProtocolsCacheOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlternateProtocolsCacheOptions.ProtoReflect.Descriptor instead. +func (*AlternateProtocolsCacheOptions) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{4} +} + +func (x *AlternateProtocolsCacheOptions) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AlternateProtocolsCacheOptions) GetMaxEntries() *wrappers.UInt32Value { + if x != nil { + return x.MaxEntries + } + return nil +} + +func (x *AlternateProtocolsCacheOptions) GetKeyValueStoreConfig() *TypedExtensionConfig { + if x != nil { + return x.KeyValueStoreConfig + } + return nil +} + +func (x *AlternateProtocolsCacheOptions) GetPrepopulatedEntries() []*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry { + if x != nil { + return x.PrepopulatedEntries + } + return nil +} + +// [#next-free-field: 7] type HttpProtocolOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -203,7 +483,7 @@ type HttpProtocolOptions struct { // idle timeout is reached the connection will be closed. If the connection is an HTTP/2 // downstream connection a drain sequence will occur prior to closing the connection, see // :ref:`drain_timeout - // `. + // `. // Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. // If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. // @@ -213,14 +493,14 @@ type HttpProtocolOptions struct { // // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" // is configured, this timeout is scaled for downstream connections according to the value for - // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. + // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. IdleTimeout *duration.Duration `protobuf:"bytes,1,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` // The maximum duration of a connection. The duration is defined as a period since a connection // was established. If not set, there is no max duration. When max_connection_duration is reached - // the connection will be closed. Drain sequence will occur prior to closing the connection if - // if's applicable. See :ref:`drain_timeout - // `. - // Note: not implemented for upstream connections. + // and if there are no active streams, the connection will be closed. If the connection is a + // downstream connection and there are any active streams, the drain sequence will kick-in, + // and the connection will be force-closed after the drain period. See :ref:`drain_timeout + // `. MaxConnectionDuration *duration.Duration `protobuf:"bytes,3,opt,name=max_connection_duration,json=maxConnectionDuration,proto3" json:"max_connection_duration,omitempty"` // The maximum number of headers. If unconfigured, the default // maximum number of request headers allowed is 100. Requests that exceed this limit will receive @@ -232,13 +512,20 @@ type HttpProtocolOptions struct { // Action to take when a client request with a header name containing underscore characters is received. // If this setting is not specified, the value defaults to ALLOW. // Note: upstream responses are not affected by this setting. + // Note: this only affects client headers. It does not affect headers added + // by Envoy filters and does not have any impact if added to cluster config. HeadersWithUnderscoresAction HttpProtocolOptions_HeadersWithUnderscoresAction `protobuf:"varint,5,opt,name=headers_with_underscores_action,json=headersWithUnderscoresAction,proto3,enum=envoy.config.core.v3.HttpProtocolOptions_HeadersWithUnderscoresAction" json:"headers_with_underscores_action,omitempty"` + // Optional maximum requests for both upstream and downstream connections. + // If not specified, there is no limit. + // Setting this parameter to 1 will effectively disable keep alive. + // For HTTP/2 and HTTP/3, due to concurrent stream processing, the limit is approximate. + MaxRequestsPerConnection *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` } func (x *HttpProtocolOptions) Reset() { *x = HttpProtocolOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[2] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -251,7 +538,7 @@ func (x *HttpProtocolOptions) String() string { func (*HttpProtocolOptions) ProtoMessage() {} func (x *HttpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[2] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -264,7 +551,7 @@ func (x *HttpProtocolOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpProtocolOptions.ProtoReflect.Descriptor instead. func (*HttpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{2} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{5} } func (x *HttpProtocolOptions) GetIdleTimeout() *duration.Duration { @@ -302,6 +589,13 @@ func (x *HttpProtocolOptions) GetHeadersWithUnderscoresAction() HttpProtocolOpti return HttpProtocolOptions_ALLOW } +func (x *HttpProtocolOptions) GetMaxRequestsPerConnection() *wrappers.UInt32Value { + if x != nil { + return x.MaxRequestsPerConnection + } + return nil +} + // [#next-free-field: 8] type Http1ProtocolOptions struct { state protoimpl.MessageState @@ -338,7 +632,7 @@ type Http1ProtocolOptions struct { // Allows Envoy to process requests/responses with both `Content-Length` and `Transfer-Encoding` // headers set. By default such messages are rejected, but if option is enabled - Envoy will // remove Content-Length header and process message. - // See `RFC7230, sec. 3.3.3 ` for details. + // See `RFC7230, sec. 3.3.3 `_ for details. // // .. attention:: // Enabling this option might lead to request smuggling vulnerability, especially if traffic @@ -356,7 +650,7 @@ type Http1ProtocolOptions struct { func (x *Http1ProtocolOptions) Reset() { *x = Http1ProtocolOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[3] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -369,7 +663,7 @@ func (x *Http1ProtocolOptions) String() string { func (*Http1ProtocolOptions) ProtoMessage() {} func (x *Http1ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[3] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -382,7 +676,7 @@ func (x *Http1ProtocolOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use Http1ProtocolOptions.ProtoReflect.Descriptor instead. func (*Http1ProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{3} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6} } func (x *Http1ProtocolOptions) GetAllowAbsoluteUrl() *wrappers.BoolValue { @@ -440,6 +734,7 @@ type KeepaliveSettings struct { unknownFields protoimpl.UnknownFields // Send HTTP/2 PING frames at this period, in order to test that the connection is still alive. + // If this is zero, interval PINGs will not be sent. Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` // How long to wait for a response to a keepalive PING. If a response is not received within this // time period, the connection will be aborted. @@ -448,12 +743,20 @@ type KeepaliveSettings struct { // A value of zero means there will be no jitter. // The default value is 15%. IntervalJitter *v3.Percent `protobuf:"bytes,3,opt,name=interval_jitter,json=intervalJitter,proto3" json:"interval_jitter,omitempty"` + // If the connection has been idle for this duration, send a HTTP/2 ping ahead + // of new stream creation, to quickly detect dead connections. + // If this is zero, this type of PING will not be sent. + // If an interval ping is outstanding, a second ping will not be sent as the + // interval ping will determine if the connection is dead. + // + // The same feature for HTTP/3 is given by inheritance from QUICHE which uses :ref:`connection idle_timeout ` and the current PTO of the connection to decide whether to probe before sending a new request. + ConnectionIdleInterval *duration.Duration `protobuf:"bytes,4,opt,name=connection_idle_interval,json=connectionIdleInterval,proto3" json:"connection_idle_interval,omitempty"` } func (x *KeepaliveSettings) Reset() { *x = KeepaliveSettings{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[4] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -466,7 +769,7 @@ func (x *KeepaliveSettings) String() string { func (*KeepaliveSettings) ProtoMessage() {} func (x *KeepaliveSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[4] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -479,7 +782,7 @@ func (x *KeepaliveSettings) ProtoReflect() protoreflect.Message { // Deprecated: Use KeepaliveSettings.ProtoReflect.Descriptor instead. func (*KeepaliveSettings) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{4} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{7} } func (x *KeepaliveSettings) GetInterval() *duration.Duration { @@ -503,6 +806,13 @@ func (x *KeepaliveSettings) GetIntervalJitter() *v3.Percent { return nil } +func (x *KeepaliveSettings) GetConnectionIdleInterval() *duration.Duration { + if x != nil { + return x.ConnectionIdleInterval + } + return nil +} + // [#next-free-field: 16] type Http2ProtocolOptions struct { state protoimpl.MessageState @@ -521,6 +831,10 @@ type Http2ProtocolOptions struct { // For upstream connections, this also limits how many streams Envoy will initiate concurrently // on a single connection. If the limit is reached, Envoy may queue requests or establish // additional connections (as allowed per circuit breaker limits). + // + // This acts as an upper bound: Envoy will lower the max concurrent streams allowed on a given + // connection based on upstream settings. Config dumps will reflect the configured upper bound, + // not the per-connection negotiated limits. MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` // `Initial stream-level flow-control window // `_ size. Valid values range from 65535 @@ -550,16 +864,12 @@ type Http2ProtocolOptions struct { // be written into the socket). Exceeding this limit triggers flood mitigation and connection is // terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due // to flood mitigation. The default limit is 10000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. MaxOutboundFrames *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_outbound_frames,json=maxOutboundFrames,proto3" json:"max_outbound_frames,omitempty"` // Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, // preventing high memory utilization when receiving continuous stream of these frames. Exceeding // this limit triggers flood mitigation and connection is terminated. The // ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood // mitigation. The default limit is 1000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. MaxOutboundControlFrames *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=max_outbound_control_frames,json=maxOutboundControlFrames,proto3" json:"max_outbound_control_frames,omitempty"` // Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an // empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but @@ -567,33 +877,33 @@ type Http2ProtocolOptions struct { // stat tracks the number of connections terminated due to flood mitigation. // Setting this to 0 will terminate connection upon receiving first frame with an empty payload // and no end stream flag. The default limit is 1. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. 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"` // Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number // of PRIORITY frames received over the lifetime of connection exceeds the value calculated // using this formula:: // - // max_inbound_priority_frames_per_stream * (1 + inbound_streams) + // max_inbound_priority_frames_per_stream * (1 + opened_streams) // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks + // the connection is terminated. For downstream connections the `opened_streams` is incremented when + // Envoy receives complete response headers from the upstream server. For upstream connection the + // `opened_streams` is incremented when Envoy send the HEADERS frame for a new stream. The + // ``http2.inbound_priority_frames_flood`` stat tracks // the number of connections terminated due to flood mitigation. The default limit is 100. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. 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"` // Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number // of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated // using this formula:: // - // 1 + 2 * (inbound_streams + - // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) + // 5 + 2 * (opened_streams + + // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 10. + // the connection is terminated. For downstream connections the `opened_streams` is incremented when + // Envoy receives complete response headers from the upstream server. For upstream connections the + // `opened_streams` is incremented when Envoy sends the HEADERS frame for a new stream. The + // ``http2.inbound_priority_frames_flood`` stat tracks the number of connections terminated due to + // flood mitigation. The default max_inbound_window_update_frames_per_data_frame_sent value is 10. // Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, // but more complex implementations that try to estimate available bandwidth require at least 2. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. 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"` // Allows invalid HTTP messaging and headers. When this option is disabled (default), then // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, @@ -654,7 +964,7 @@ type Http2ProtocolOptions struct { func (x *Http2ProtocolOptions) Reset() { *x = Http2ProtocolOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[5] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -667,7 +977,7 @@ func (x *Http2ProtocolOptions) String() string { func (*Http2ProtocolOptions) ProtoMessage() {} func (x *Http2ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[5] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -680,7 +990,7 @@ func (x *Http2ProtocolOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use Http2ProtocolOptions.ProtoReflect.Descriptor instead. func (*Http2ProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{5} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{8} } func (x *Http2ProtocolOptions) GetHpackTableSize() *wrappers.UInt32Value { @@ -801,7 +1111,7 @@ type GrpcProtocolOptions struct { func (x *GrpcProtocolOptions) Reset() { *x = GrpcProtocolOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[6] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -814,7 +1124,7 @@ func (x *GrpcProtocolOptions) String() string { func (*GrpcProtocolOptions) ProtoMessage() {} func (x *GrpcProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[6] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -827,7 +1137,7 @@ func (x *GrpcProtocolOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use GrpcProtocolOptions.ProtoReflect.Descriptor instead. func (*GrpcProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{9} } func (x *GrpcProtocolOptions) GetHttp2ProtocolOptions() *Http2ProtocolOptions { @@ -837,6 +1147,218 @@ func (x *GrpcProtocolOptions) GetHttp2ProtocolOptions() *Http2ProtocolOptions { return nil } +// A message which allows using HTTP/3. +// [#next-free-field: 6] +type Http3ProtocolOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QuicProtocolOptions *QuicProtocolOptions `protobuf:"bytes,1,opt,name=quic_protocol_options,json=quicProtocolOptions,proto3" json:"quic_protocol_options,omitempty"` + // Allows invalid HTTP messaging and headers. When this option is disabled (default), then + // the whole HTTP/3 connection is terminated upon receiving invalid HEADERS frame. However, + // when this option is enabled, only the offending stream is terminated. + // + // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging + // `. + OverrideStreamErrorOnInvalidHttpMessage *wrappers.BoolValue `protobuf:"bytes,2,opt,name=override_stream_error_on_invalid_http_message,json=overrideStreamErrorOnInvalidHttpMessage,proto3" json:"override_stream_error_on_invalid_http_message,omitempty"` + // Allows proxying Websocket and other upgrades over HTTP/3 CONNECT using + // the header mechanisms from the `HTTP/2 extended connect RFC + // `_ + // and settings `proposed for HTTP/3 + // `_ + // Note that HTTP/3 CONNECT is not yet an RFC. + AllowExtendedConnect bool `protobuf:"varint,5,opt,name=allow_extended_connect,json=allowExtendedConnect,proto3" json:"allow_extended_connect,omitempty"` +} + +func (x *Http3ProtocolOptions) Reset() { + *x = Http3ProtocolOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Http3ProtocolOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Http3ProtocolOptions) ProtoMessage() {} + +func (x *Http3ProtocolOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Http3ProtocolOptions.ProtoReflect.Descriptor instead. +func (*Http3ProtocolOptions) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{10} +} + +func (x *Http3ProtocolOptions) GetQuicProtocolOptions() *QuicProtocolOptions { + if x != nil { + return x.QuicProtocolOptions + } + return nil +} + +func (x *Http3ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrappers.BoolValue { + if x != nil { + return x.OverrideStreamErrorOnInvalidHttpMessage + } + return nil +} + +func (x *Http3ProtocolOptions) GetAllowExtendedConnect() bool { + if x != nil { + return x.AllowExtendedConnect + } + return false +} + +// A message to control transformations to the :scheme header +type SchemeHeaderTransformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Transformation: + // *SchemeHeaderTransformation_SchemeToOverwrite + Transformation isSchemeHeaderTransformation_Transformation `protobuf_oneof:"transformation"` +} + +func (x *SchemeHeaderTransformation) Reset() { + *x = SchemeHeaderTransformation{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SchemeHeaderTransformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchemeHeaderTransformation) ProtoMessage() {} + +func (x *SchemeHeaderTransformation) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SchemeHeaderTransformation.ProtoReflect.Descriptor instead. +func (*SchemeHeaderTransformation) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{11} +} + +func (m *SchemeHeaderTransformation) GetTransformation() isSchemeHeaderTransformation_Transformation { + if m != nil { + return m.Transformation + } + return nil +} + +func (x *SchemeHeaderTransformation) GetSchemeToOverwrite() string { + if x, ok := x.GetTransformation().(*SchemeHeaderTransformation_SchemeToOverwrite); ok { + return x.SchemeToOverwrite + } + return "" +} + +type isSchemeHeaderTransformation_Transformation interface { + isSchemeHeaderTransformation_Transformation() +} + +type SchemeHeaderTransformation_SchemeToOverwrite struct { + // Overwrite any Scheme header with the contents of this string. + SchemeToOverwrite string `protobuf:"bytes,1,opt,name=scheme_to_overwrite,json=schemeToOverwrite,proto3,oneof"` +} + +func (*SchemeHeaderTransformation_SchemeToOverwrite) isSchemeHeaderTransformation_Transformation() {} + +// Allows pre-populating the cache with HTTP/3 alternate protocols entries with a 7 day lifetime. +// This will cause Envoy to attempt HTTP/3 to those upstreams, even if the upstreams have not +// advertised HTTP/3 support. These entries will be overwritten by alt-svc +// response headers or cached values. +// As with regular cached entries, if the origin response would result in clearing an existing +// alternate protocol cache entry, pre-populated entries will also be cleared. +// Adding a cache entry with hostname=foo.com port=123 is the equivalent of getting +// response headers +// alt-svc: h3=:"123"; ma=86400" in a response to a request to foo.com:123 +type AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The host name for the alternate protocol entry. + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + // The port for the alternate protocol entry. + Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` +} + +func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) Reset() { + *x = AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) ProtoMessage() {} + +func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.ProtoReflect.Descriptor instead. +func (*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) GetPort() uint32 { + if x != nil { + return x.Port + } + return 0 +} + +// [#next-free-field: 9] type Http1ProtocolOptions_HeaderKeyFormat struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -845,13 +1367,14 @@ type Http1ProtocolOptions_HeaderKeyFormat struct { // Types that are assignable to HeaderFormat: // *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ // *Http1ProtocolOptions_HeaderKeyFormat_Custom_ + // *Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter HeaderFormat isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat `protobuf_oneof:"header_format"` } func (x *Http1ProtocolOptions_HeaderKeyFormat) Reset() { *x = Http1ProtocolOptions_HeaderKeyFormat{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[7] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -864,7 +1387,7 @@ func (x *Http1ProtocolOptions_HeaderKeyFormat) String() string { func (*Http1ProtocolOptions_HeaderKeyFormat) ProtoMessage() {} func (x *Http1ProtocolOptions_HeaderKeyFormat) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[7] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -877,7 +1400,7 @@ func (x *Http1ProtocolOptions_HeaderKeyFormat) ProtoReflect() protoreflect.Messa // Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat.ProtoReflect.Descriptor instead. func (*Http1ProtocolOptions_HeaderKeyFormat) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{3, 0} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6, 0} } func (m *Http1ProtocolOptions_HeaderKeyFormat) GetHeaderFormat() isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat { @@ -901,6 +1424,13 @@ func (x *Http1ProtocolOptions_HeaderKeyFormat) GetCustom() *Http1ProtocolOptions return nil } +func (x *Http1ProtocolOptions_HeaderKeyFormat) GetStatefulFormatter() *TypedExtensionConfig { + if x, ok := x.GetHeaderFormat().(*Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter); ok { + return x.StatefulFormatter + } + return nil +} + type isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat interface { isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() } @@ -919,12 +1449,22 @@ type Http1ProtocolOptions_HeaderKeyFormat_Custom_ struct { Custom *Http1ProtocolOptions_HeaderKeyFormat_Custom `protobuf:"bytes,2,opt,name=custom,proto3,oneof"` } +type Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter struct { + // Configuration for stateful formatter extensions that allow using received headers to + // affect the output of encoding headers. E.g., preserving case during proxying. + // [#extension-category: envoy.http.stateful_header_formatters] + StatefulFormatter *TypedExtensionConfig `protobuf:"bytes,8,opt,name=stateful_formatter,json=statefulFormatter,proto3,oneof"` +} + func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { } func (*Http1ProtocolOptions_HeaderKeyFormat_Custom_) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { } +func (*Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { +} + type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -934,7 +1474,7 @@ type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords struct { func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Reset() { *x = Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[8] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -947,7 +1487,7 @@ func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) String() string { func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoMessage() {} func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[8] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -960,9 +1500,11 @@ func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoReflect() pr // Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.ProtoReflect.Descriptor instead. func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{3, 0, 0} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6, 0, 0} } +// custom message is datawire code +// remove if possible type Http1ProtocolOptions_HeaderKeyFormat_Custom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -978,7 +1520,7 @@ type Http1ProtocolOptions_HeaderKeyFormat_Custom struct { func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) Reset() { *x = Http1ProtocolOptions_HeaderKeyFormat_Custom{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[9] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -991,7 +1533,7 @@ func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) String() string { func (*Http1ProtocolOptions_HeaderKeyFormat_Custom) ProtoMessage() {} func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[9] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1004,7 +1546,7 @@ func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) ProtoReflect() protoreflec // Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat_Custom.ProtoReflect.Descriptor instead. func (*Http1ProtocolOptions_HeaderKeyFormat_Custom) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{3, 0, 1} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6, 0, 1} } func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) GetRules() map[string]string { @@ -1030,7 +1572,7 @@ type Http2ProtocolOptions_SettingsParameter struct { func (x *Http2ProtocolOptions_SettingsParameter) Reset() { *x = Http2ProtocolOptions_SettingsParameter{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[11] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1043,7 +1585,7 @@ func (x *Http2ProtocolOptions_SettingsParameter) String() string { func (*Http2ProtocolOptions_SettingsParameter) ProtoMessage() {} func (x *Http2ProtocolOptions_SettingsParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[11] + mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1056,7 +1598,7 @@ func (x *Http2ProtocolOptions_SettingsParameter) ProtoReflect() protoreflect.Mes // Deprecated: Use Http2ProtocolOptions_SettingsParameter.ProtoReflect.Descriptor instead. func (*Http2ProtocolOptions_SettingsParameter) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{5, 0} + return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{8, 0} } func (x *Http2ProtocolOptions_SettingsParameter) GetIdentifier() *wrappers.UInt32Value { @@ -1079,287 +1621,419 @@ var file_envoy_config_core_v3_protocol_proto_rawDesc = []byte{ 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1b, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x12, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, - 0x6e, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x6e, - 0x69, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x61, 0x6e, 0x5f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, - 0x61, 0x75, 0x74, 0x6f, 0x53, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, 0x04, 0x0a, 0x13, 0x48, 0x74, 0x74, 0x70, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, 0x0a, - 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x51, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x41, 0x0a, 0x12, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x4b, 0x65, 0x65, 0x70, 0x41, + 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4a, 0x0a, 0x0c, + 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, + 0x42, 0x09, 0xaa, 0x01, 0x06, 0x22, 0x00, 0x32, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x78, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x52, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, + 0x42, 0x09, 0xaa, 0x01, 0x06, 0x22, 0x00, 0x32, 0x02, 0x08, 0x01, 0x52, 0x0f, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xa8, 0x04, 0x0a, + 0x13, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x14, 0x6d, 0x61, 0x78, + 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x12, 0x67, 0x0a, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x80, 0x08, 0x28, + 0x01, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x6f, 0x0a, 0x1e, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x80, 0x0c, 0x28, 0x01, 0x52, 0x1b, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x7a, 0x0a, 0x26, 0x6e, + 0x75, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x74, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x28, 0x01, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x8d, - 0x01, 0x0a, 0x1f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, - 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, - 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x1c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x64, - 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4e, - 0x0a, 0x1c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x64, - 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, - 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, - 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, - 0x0b, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x3a, 0x2c, - 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbd, 0x09, 0x0a, - 0x14, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, - 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x12, - 0x24, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, - 0x30, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x48, - 0x74, 0x74, 0x70, 0x31, 0x30, 0x12, 0x36, 0x0a, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, - 0x30, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x48, 0x6f, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x31, 0x30, 0x12, 0x66, 0x0a, - 0x11, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, + 0x18, 0x05, 0x28, 0x00, 0x52, 0x21, 0x6e, 0x75, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x73, 0x54, 0x6f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x69, + 0x63, 0x4b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x5f, + 0x73, 0x6e, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x53, + 0x6e, 0x69, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x61, 0x6e, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x11, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x18, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x61, + 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x6e, 0x69, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, + 0x01, 0x52, 0x15, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x53, + 0x6e, 0x69, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, + 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd7, + 0x03, 0x0a, 0x1e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, + 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x13, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x84, 0x01, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x70, + 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6c, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x6c, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x70, 0x72, 0x65, 0x70, 0x6f, + 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x68, + 0x0a, 0x1c, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, + 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x68, + 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xff, 0xff, 0x03, + 0x20, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x05, 0x0a, 0x13, 0x48, 0x74, 0x74, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, + 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x51, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, + 0x02, 0x28, 0x01, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, + 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x8d, 0x01, 0x0a, 0x1f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, + 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x1c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, + 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x5b, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4e, 0x0a, 0x1c, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x64, 0x65, 0x72, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, + 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, + 0x52, 0x4f, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x3a, 0x2c, 0x9a, 0xc5, + 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd4, 0x09, 0x0a, 0x14, 0x48, + 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x62, 0x73, + 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x24, 0x0a, + 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x30, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x48, 0x74, 0x74, + 0x70, 0x31, 0x30, 0x12, 0x36, 0x0a, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x30, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, + 0x73, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x31, 0x30, 0x12, 0x66, 0x0a, 0x11, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x14, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x7a, + 0x0a, 0x2d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, + 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0xa5, 0x05, 0x0a, 0x0f, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x78, + 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x77, 0x6f, + 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, + 0x57, 0x6f, 0x72, 0x64, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x43, + 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x30, - 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x12, 0x7a, 0x0a, 0x2d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x8e, 0x05, 0x0a, - 0x0f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x12, 0x78, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, - 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x43, 0x61, - 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x60, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, - 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x1a, 0xec, 0x01, 0x0a, 0x06, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x62, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x5b, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, + 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x1a, 0x60, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, + 0x57, 0x6f, 0x72, 0x64, 0x73, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, + 0x6f, 0x72, 0x64, 0x73, 0x1a, 0xa6, 0x01, 0x0a, 0x06, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, + 0x62, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x3d, 0x9a, + 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x14, 0x0a, 0x0d, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, - 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x14, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x2d, 0x9a, - 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe0, 0x01, 0x0a, - 0x11, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x45, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, + 0x73, 0x22, 0xc1, 0x02, 0x0a, 0x11, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, + 0x84, 0x3d, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x43, 0x0a, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, + 0x08, 0x01, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x3f, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, + 0x65, 0x72, 0x12, 0x61, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x43, 0x0a, 0x07, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x32, - 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3f, - 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x22, - 0xf8, 0x0d, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x10, 0x68, 0x70, 0x61, 0x63, - 0x6b, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x16, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x81, 0x0e, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, + 0x0a, 0x10, 0x68, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x68, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x61, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x2a, 0x08, 0x18, 0xff, 0xff, 0xff, 0xff, + 0x07, 0x28, 0x01, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x6a, 0x0a, 0x1a, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, + 0x2a, 0x0a, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x17, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x72, 0x0a, 0x1e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, + 0x2a, 0x0a, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x1b, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x55, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0e, 0x68, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x61, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d, - 0xfa, 0x42, 0x0a, 0x2a, 0x08, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0x01, 0x52, 0x14, 0x6d, - 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x73, 0x12, 0x6a, 0x0a, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x2a, 0x0a, 0x18, 0xff, 0xff, 0xff, - 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x72, 0x0a, 0x1e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x2a, 0x0a, 0x18, 0xff, 0xff, 0xff, - 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x1b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x55, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x4f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x1b, + 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x4f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x31, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x2b, 0x6d, 0x61, + 0x78, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x6f, 0x0a, 0x26, 0x6d, 0x61, 0x78, + 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x21, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x50, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x91, 0x01, 0x0a, 0x34, 0x6d, + 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, + 0x52, 0x2c, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x5e, + 0x0a, 0x26, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, + 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, + 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x21, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x7a, + 0x0a, 0x2d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, + 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x7a, 0x0a, 0x1a, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x18, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4b, 0x65, 0x65, 0x70, + 0x61, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x13, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, + 0x76, 0x65, 0x1a, 0xe5, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, - 0x02, 0x28, 0x01, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x66, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x28, 0x01, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, - 0x31, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, - 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x2b, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x6f, 0x0a, 0x26, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x21, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x12, 0x91, 0x01, 0x0a, 0x34, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x2c, 0x6d, 0x61, 0x78, 0x49, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x26, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, - 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x21, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x12, - 0x7a, 0x0a, 0x2d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x7a, 0x0a, 0x1a, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x18, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4b, 0x65, 0x65, - 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x13, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, - 0x69, 0x76, 0x65, 0x1a, 0xe5, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0a, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x13, 0xfa, 0x42, 0x08, - 0x2a, 0x06, 0x18, 0xff, 0xff, 0x03, 0x28, 0x00, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, - 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x13, 0xfa, 0x42, 0x08, 0x2a, + 0x06, 0x18, 0xff, 0xff, 0x03, 0x28, 0x00, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, + 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, - 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x13, 0x47, - 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, - 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x42, 0x3d, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x13, 0x47, 0x72, + 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, + 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, + 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xb1, 0x02, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x15, 0x71, 0x75, + 0x69, 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x71, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7a, 0x0a, 0x2d, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x27, 0x6f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x52, + 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x22, 0x74, 0x0a, 0x1a, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x13, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x74, 0x6f, + 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x72, 0x0d, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x52, 0x05, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x54, 0x6f, + 0x4f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x81, 0x01, 0x0a, 0x22, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1375,61 +2049,83 @@ func file_envoy_config_core_v3_protocol_proto_rawDescGZIP() []byte { } var file_envoy_config_core_v3_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v3_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_envoy_config_core_v3_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_envoy_config_core_v3_protocol_proto_goTypes = []interface{}{ - (HttpProtocolOptions_HeadersWithUnderscoresAction)(0), // 0: envoy.config.core.v3.HttpProtocolOptions.HeadersWithUnderscoresAction - (*TcpProtocolOptions)(nil), // 1: envoy.config.core.v3.TcpProtocolOptions - (*UpstreamHttpProtocolOptions)(nil), // 2: envoy.config.core.v3.UpstreamHttpProtocolOptions - (*HttpProtocolOptions)(nil), // 3: envoy.config.core.v3.HttpProtocolOptions - (*Http1ProtocolOptions)(nil), // 4: envoy.config.core.v3.Http1ProtocolOptions - (*KeepaliveSettings)(nil), // 5: envoy.config.core.v3.KeepaliveSettings - (*Http2ProtocolOptions)(nil), // 6: envoy.config.core.v3.Http2ProtocolOptions - (*GrpcProtocolOptions)(nil), // 7: envoy.config.core.v3.GrpcProtocolOptions - (*Http1ProtocolOptions_HeaderKeyFormat)(nil), // 8: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat - (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords)(nil), // 9: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords - (*Http1ProtocolOptions_HeaderKeyFormat_Custom)(nil), // 10: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom - nil, // 11: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom.RulesEntry - (*Http2ProtocolOptions_SettingsParameter)(nil), // 12: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter - (*duration.Duration)(nil), // 13: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 14: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 15: google.protobuf.BoolValue - (*v3.Percent)(nil), // 16: envoy.type.v3.Percent + (HttpProtocolOptions_HeadersWithUnderscoresAction)(0), // 0: envoy.config.core.v3.HttpProtocolOptions.HeadersWithUnderscoresAction + (*TcpProtocolOptions)(nil), // 1: envoy.config.core.v3.TcpProtocolOptions + (*QuicKeepAliveSettings)(nil), // 2: envoy.config.core.v3.QuicKeepAliveSettings + (*QuicProtocolOptions)(nil), // 3: envoy.config.core.v3.QuicProtocolOptions + (*UpstreamHttpProtocolOptions)(nil), // 4: envoy.config.core.v3.UpstreamHttpProtocolOptions + (*AlternateProtocolsCacheOptions)(nil), // 5: envoy.config.core.v3.AlternateProtocolsCacheOptions + (*HttpProtocolOptions)(nil), // 6: envoy.config.core.v3.HttpProtocolOptions + (*Http1ProtocolOptions)(nil), // 7: envoy.config.core.v3.Http1ProtocolOptions + (*KeepaliveSettings)(nil), // 8: envoy.config.core.v3.KeepaliveSettings + (*Http2ProtocolOptions)(nil), // 9: envoy.config.core.v3.Http2ProtocolOptions + (*GrpcProtocolOptions)(nil), // 10: envoy.config.core.v3.GrpcProtocolOptions + (*Http3ProtocolOptions)(nil), // 11: envoy.config.core.v3.Http3ProtocolOptions + (*SchemeHeaderTransformation)(nil), // 12: envoy.config.core.v3.SchemeHeaderTransformation + (*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry)(nil), // 13: envoy.config.core.v3.AlternateProtocolsCacheOptions.AlternateProtocolsCacheEntry + (*Http1ProtocolOptions_HeaderKeyFormat)(nil), // 14: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat + (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords)(nil), // 15: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords + (*Http1ProtocolOptions_HeaderKeyFormat_Custom)(nil), // 16: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom + nil, // 17: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom.RulesEntry + (*Http2ProtocolOptions_SettingsParameter)(nil), // 18: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter + (*duration.Duration)(nil), // 19: google.protobuf.Duration + (*wrappers.UInt32Value)(nil), // 20: google.protobuf.UInt32Value + (*TypedExtensionConfig)(nil), // 21: envoy.config.core.v3.TypedExtensionConfig + (*wrappers.BoolValue)(nil), // 22: google.protobuf.BoolValue + (*v3.Percent)(nil), // 23: envoy.type.v3.Percent } var file_envoy_config_core_v3_protocol_proto_depIdxs = []int32{ - 13, // 0: envoy.config.core.v3.HttpProtocolOptions.idle_timeout:type_name -> google.protobuf.Duration - 13, // 1: envoy.config.core.v3.HttpProtocolOptions.max_connection_duration:type_name -> google.protobuf.Duration - 14, // 2: envoy.config.core.v3.HttpProtocolOptions.max_headers_count:type_name -> google.protobuf.UInt32Value - 13, // 3: envoy.config.core.v3.HttpProtocolOptions.max_stream_duration:type_name -> google.protobuf.Duration - 0, // 4: envoy.config.core.v3.HttpProtocolOptions.headers_with_underscores_action:type_name -> envoy.config.core.v3.HttpProtocolOptions.HeadersWithUnderscoresAction - 15, // 5: envoy.config.core.v3.Http1ProtocolOptions.allow_absolute_url:type_name -> google.protobuf.BoolValue - 8, // 6: envoy.config.core.v3.Http1ProtocolOptions.header_key_format:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat - 15, // 7: envoy.config.core.v3.Http1ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 13, // 8: envoy.config.core.v3.KeepaliveSettings.interval:type_name -> google.protobuf.Duration - 13, // 9: envoy.config.core.v3.KeepaliveSettings.timeout:type_name -> google.protobuf.Duration - 16, // 10: envoy.config.core.v3.KeepaliveSettings.interval_jitter:type_name -> envoy.type.v3.Percent - 14, // 11: envoy.config.core.v3.Http2ProtocolOptions.hpack_table_size:type_name -> google.protobuf.UInt32Value - 14, // 12: envoy.config.core.v3.Http2ProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value - 14, // 13: envoy.config.core.v3.Http2ProtocolOptions.initial_stream_window_size:type_name -> google.protobuf.UInt32Value - 14, // 14: envoy.config.core.v3.Http2ProtocolOptions.initial_connection_window_size:type_name -> google.protobuf.UInt32Value - 14, // 15: envoy.config.core.v3.Http2ProtocolOptions.max_outbound_frames:type_name -> google.protobuf.UInt32Value - 14, // 16: envoy.config.core.v3.Http2ProtocolOptions.max_outbound_control_frames:type_name -> google.protobuf.UInt32Value - 14, // 17: envoy.config.core.v3.Http2ProtocolOptions.max_consecutive_inbound_frames_with_empty_payload:type_name -> google.protobuf.UInt32Value - 14, // 18: envoy.config.core.v3.Http2ProtocolOptions.max_inbound_priority_frames_per_stream:type_name -> google.protobuf.UInt32Value - 14, // 19: envoy.config.core.v3.Http2ProtocolOptions.max_inbound_window_update_frames_per_data_frame_sent:type_name -> google.protobuf.UInt32Value - 15, // 20: envoy.config.core.v3.Http2ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 12, // 21: envoy.config.core.v3.Http2ProtocolOptions.custom_settings_parameters:type_name -> envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter - 5, // 22: envoy.config.core.v3.Http2ProtocolOptions.connection_keepalive:type_name -> envoy.config.core.v3.KeepaliveSettings - 6, // 23: envoy.config.core.v3.GrpcProtocolOptions.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions - 9, // 24: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.proper_case_words:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords - 10, // 25: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.custom:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom - 11, // 26: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom.rules:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom.RulesEntry - 14, // 27: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter.identifier:type_name -> google.protobuf.UInt32Value - 14, // 28: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter.value:type_name -> google.protobuf.UInt32Value - 29, // [29:29] is the sub-list for method output_type - 29, // [29:29] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 19, // 0: envoy.config.core.v3.QuicKeepAliveSettings.max_interval:type_name -> google.protobuf.Duration + 19, // 1: envoy.config.core.v3.QuicKeepAliveSettings.initial_interval:type_name -> google.protobuf.Duration + 20, // 2: envoy.config.core.v3.QuicProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value + 20, // 3: envoy.config.core.v3.QuicProtocolOptions.initial_stream_window_size:type_name -> google.protobuf.UInt32Value + 20, // 4: envoy.config.core.v3.QuicProtocolOptions.initial_connection_window_size:type_name -> google.protobuf.UInt32Value + 20, // 5: envoy.config.core.v3.QuicProtocolOptions.num_timeouts_to_trigger_port_migration:type_name -> google.protobuf.UInt32Value + 2, // 6: envoy.config.core.v3.QuicProtocolOptions.connection_keepalive:type_name -> envoy.config.core.v3.QuicKeepAliveSettings + 20, // 7: envoy.config.core.v3.AlternateProtocolsCacheOptions.max_entries:type_name -> google.protobuf.UInt32Value + 21, // 8: envoy.config.core.v3.AlternateProtocolsCacheOptions.key_value_store_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 13, // 9: envoy.config.core.v3.AlternateProtocolsCacheOptions.prepopulated_entries:type_name -> envoy.config.core.v3.AlternateProtocolsCacheOptions.AlternateProtocolsCacheEntry + 19, // 10: envoy.config.core.v3.HttpProtocolOptions.idle_timeout:type_name -> google.protobuf.Duration + 19, // 11: envoy.config.core.v3.HttpProtocolOptions.max_connection_duration:type_name -> google.protobuf.Duration + 20, // 12: envoy.config.core.v3.HttpProtocolOptions.max_headers_count:type_name -> google.protobuf.UInt32Value + 19, // 13: envoy.config.core.v3.HttpProtocolOptions.max_stream_duration:type_name -> google.protobuf.Duration + 0, // 14: envoy.config.core.v3.HttpProtocolOptions.headers_with_underscores_action:type_name -> envoy.config.core.v3.HttpProtocolOptions.HeadersWithUnderscoresAction + 20, // 15: envoy.config.core.v3.HttpProtocolOptions.max_requests_per_connection:type_name -> google.protobuf.UInt32Value + 22, // 16: envoy.config.core.v3.Http1ProtocolOptions.allow_absolute_url:type_name -> google.protobuf.BoolValue + 14, // 17: envoy.config.core.v3.Http1ProtocolOptions.header_key_format:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat + 22, // 18: envoy.config.core.v3.Http1ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue + 19, // 19: envoy.config.core.v3.KeepaliveSettings.interval:type_name -> google.protobuf.Duration + 19, // 20: envoy.config.core.v3.KeepaliveSettings.timeout:type_name -> google.protobuf.Duration + 23, // 21: envoy.config.core.v3.KeepaliveSettings.interval_jitter:type_name -> envoy.type.v3.Percent + 19, // 22: envoy.config.core.v3.KeepaliveSettings.connection_idle_interval:type_name -> google.protobuf.Duration + 20, // 23: envoy.config.core.v3.Http2ProtocolOptions.hpack_table_size:type_name -> google.protobuf.UInt32Value + 20, // 24: envoy.config.core.v3.Http2ProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value + 20, // 25: envoy.config.core.v3.Http2ProtocolOptions.initial_stream_window_size:type_name -> google.protobuf.UInt32Value + 20, // 26: envoy.config.core.v3.Http2ProtocolOptions.initial_connection_window_size:type_name -> google.protobuf.UInt32Value + 20, // 27: envoy.config.core.v3.Http2ProtocolOptions.max_outbound_frames:type_name -> google.protobuf.UInt32Value + 20, // 28: envoy.config.core.v3.Http2ProtocolOptions.max_outbound_control_frames:type_name -> google.protobuf.UInt32Value + 20, // 29: envoy.config.core.v3.Http2ProtocolOptions.max_consecutive_inbound_frames_with_empty_payload:type_name -> google.protobuf.UInt32Value + 20, // 30: envoy.config.core.v3.Http2ProtocolOptions.max_inbound_priority_frames_per_stream:type_name -> google.protobuf.UInt32Value + 20, // 31: envoy.config.core.v3.Http2ProtocolOptions.max_inbound_window_update_frames_per_data_frame_sent:type_name -> google.protobuf.UInt32Value + 22, // 32: envoy.config.core.v3.Http2ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue + 18, // 33: envoy.config.core.v3.Http2ProtocolOptions.custom_settings_parameters:type_name -> envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter + 8, // 34: envoy.config.core.v3.Http2ProtocolOptions.connection_keepalive:type_name -> envoy.config.core.v3.KeepaliveSettings + 9, // 35: envoy.config.core.v3.GrpcProtocolOptions.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions + 3, // 36: envoy.config.core.v3.Http3ProtocolOptions.quic_protocol_options:type_name -> envoy.config.core.v3.QuicProtocolOptions + 22, // 37: envoy.config.core.v3.Http3ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue + 15, // 38: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.proper_case_words:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords + 16, // 39: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.custom:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom + 21, // 40: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.stateful_formatter:type_name -> envoy.config.core.v3.TypedExtensionConfig + 17, // 41: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom.rules:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.Custom.RulesEntry + 20, // 42: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter.identifier:type_name -> google.protobuf.UInt32Value + 20, // 43: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter.value:type_name -> google.protobuf.UInt32Value + 44, // [44:44] is the sub-list for method output_type + 44, // [44:44] is the sub-list for method input_type + 44, // [44:44] is the sub-list for extension type_name + 44, // [44:44] is the sub-list for extension extendee + 0, // [0:44] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_protocol_proto_init() } @@ -1437,6 +2133,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { if File_envoy_config_core_v3_protocol_proto != nil { return } + file_envoy_config_core_v3_extension_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_config_core_v3_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TcpProtocolOptions); i { @@ -1451,7 +2148,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamHttpProtocolOptions); i { + switch v := v.(*QuicKeepAliveSettings); i { case 0: return &v.state case 1: @@ -1463,7 +2160,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpProtocolOptions); i { + switch v := v.(*QuicProtocolOptions); i { case 0: return &v.state case 1: @@ -1475,7 +2172,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions); i { + switch v := v.(*UpstreamHttpProtocolOptions); i { case 0: return &v.state case 1: @@ -1487,7 +2184,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeepaliveSettings); i { + switch v := v.(*AlternateProtocolsCacheOptions); i { case 0: return &v.state case 1: @@ -1499,7 +2196,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http2ProtocolOptions); i { + switch v := v.(*HttpProtocolOptions); i { case 0: return &v.state case 1: @@ -1511,7 +2208,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcProtocolOptions); i { + switch v := v.(*Http1ProtocolOptions); i { case 0: return &v.state case 1: @@ -1523,7 +2220,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat); i { + switch v := v.(*KeepaliveSettings); i { case 0: return &v.state case 1: @@ -1535,7 +2232,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords); i { + switch v := v.(*Http2ProtocolOptions); i { case 0: return &v.state case 1: @@ -1547,7 +2244,19 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat_Custom); i { + switch v := v.(*GrpcProtocolOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_protocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Http3ProtocolOptions); i { case 0: return &v.state case 1: @@ -1559,6 +2268,66 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } file_envoy_config_core_v3_protocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SchemeHeaderTransformation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_protocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_protocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat_Custom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_protocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Http2ProtocolOptions_SettingsParameter); i { case 0: return &v.state @@ -1571,9 +2340,13 @@ func file_envoy_config_core_v3_protocol_proto_init() { } } } - file_envoy_config_core_v3_protocol_proto_msgTypes[7].OneofWrappers = []interface{}{ + file_envoy_config_core_v3_protocol_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*SchemeHeaderTransformation_SchemeToOverwrite)(nil), + } + file_envoy_config_core_v3_protocol_proto_msgTypes[13].OneofWrappers = []interface{}{ (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_)(nil), (*Http1ProtocolOptions_HeaderKeyFormat_Custom_)(nil), + (*Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1581,7 +2354,7 @@ func file_envoy_config_core_v3_protocol_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_core_v3_protocol_proto_rawDesc, NumEnums: 1, - NumMessages: 12, + NumMessages: 18, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/core/v3/protocol.pb.validate.go b/pkg/api/envoy/config/core/v3/protocol.pb.validate.go index 1e7f3378d6..55560d616b 100644 --- a/pkg/api/envoy/config/core/v3/protocol.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/protocol.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/protocol.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TcpProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpProtocolOptionsMultiError, or nil if none found. +func (m *TcpProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProtocolOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return TcpProtocolOptionsMultiError(errors) + } + return nil } +// TcpProtocolOptionsMultiError is an error wrapping multiple validation errors +// returned by TcpProtocolOptions.ValidateAll() if the designated constraints +// aren't met. +type TcpProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProtocolOptionsMultiError) AllErrors() []error { return m } + // TcpProtocolOptionsValidationError is the validation error returned by // TcpProtocolOptions.Validate if the designated constraints aren't met. type TcpProtocolOptionsValidationError struct { @@ -100,25 +137,117 @@ 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 { +// Validate checks the field values on QuicKeepAliveSettings with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *QuicKeepAliveSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicKeepAliveSettings with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QuicKeepAliveSettingsMultiError, or nil if none found. +func (m *QuicKeepAliveSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicKeepAliveSettings) validate(all bool) error { if m == nil { return nil } - // no validation rules for AutoSni + var errors []error - // no validation rules for AutoSanValidation + if d := m.GetMaxInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = QuicKeepAliveSettingsValidationError{ + field: "MaxInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + lte := time.Duration(0*time.Second + 0*time.Nanosecond) + gte := time.Duration(1*time.Second + 0*time.Nanosecond) + + if dur > lte && dur < gte { + err := QuicKeepAliveSettingsValidationError{ + field: "MaxInterval", + reason: "value must be outside range (0s, 1s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if d := m.GetInitialInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = QuicKeepAliveSettingsValidationError{ + field: "InitialInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + lte := time.Duration(0*time.Second + 0*time.Nanosecond) + gte := time.Duration(1*time.Second + 0*time.Nanosecond) + + if dur > lte && dur < gte { + err := QuicKeepAliveSettingsValidationError{ + field: "InitialInterval", + reason: "value must be outside range (0s, 1s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return QuicKeepAliveSettingsMultiError(errors) + } return nil } -// UpstreamHttpProtocolOptionsValidationError is the validation error returned -// by UpstreamHttpProtocolOptions.Validate if the designated constraints -// aren't met. -type UpstreamHttpProtocolOptionsValidationError struct { +// QuicKeepAliveSettingsMultiError is an error wrapping multiple validation +// errors returned by QuicKeepAliveSettings.ValidateAll() if the designated +// constraints aren't met. +type QuicKeepAliveSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicKeepAliveSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicKeepAliveSettingsMultiError) AllErrors() []error { return m } + +// QuicKeepAliveSettingsValidationError is the validation error returned by +// QuicKeepAliveSettings.Validate if the designated constraints aren't met. +type QuicKeepAliveSettingsValidationError struct { field string reason string cause error @@ -126,24 +255,24 @@ type UpstreamHttpProtocolOptionsValidationError struct { } // Field function returns field value. -func (e UpstreamHttpProtocolOptionsValidationError) Field() string { return e.field } +func (e QuicKeepAliveSettingsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e UpstreamHttpProtocolOptionsValidationError) Reason() string { return e.reason } +func (e QuicKeepAliveSettingsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e UpstreamHttpProtocolOptionsValidationError) Cause() error { return e.cause } +func (e QuicKeepAliveSettingsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e UpstreamHttpProtocolOptionsValidationError) Key() bool { return e.key } +func (e QuicKeepAliveSettingsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e UpstreamHttpProtocolOptionsValidationError) ErrorName() string { - return "UpstreamHttpProtocolOptionsValidationError" +func (e QuicKeepAliveSettingsValidationError) ErrorName() string { + return "QuicKeepAliveSettingsValidationError" } // Error satisfies the builtin error interface -func (e UpstreamHttpProtocolOptionsValidationError) Error() string { +func (e QuicKeepAliveSettingsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -155,14 +284,14 @@ func (e UpstreamHttpProtocolOptionsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sUpstreamHttpProtocolOptions.%s: %s%s", + "invalid %sQuicKeepAliveSettings.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = UpstreamHttpProtocolOptionsValidationError{} +var _ error = QuicKeepAliveSettingsValidationError{} var _ interface { Field() string @@ -170,65 +299,146 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = UpstreamHttpProtocolOptionsValidationError{} +} = QuicKeepAliveSettingsValidationError{} -// Validate checks the field values on HttpProtocolOptions with the rules +// 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 *HttpProtocolOptions) Validate() error { +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *QuicProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QuicProtocolOptionsMultiError, or nil if none found. +func (m *QuicProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicProtocolOptions) validate(all bool) error { if m == nil { return nil } - 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, + var errors []error + + if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := QuicProtocolOptionsValidationError{ + field: "MaxConcurrentStreams", + reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } + } - if v, ok := interface{}(m.GetMaxConnectionDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "MaxConnectionDuration", - reason: "embedded message failed validation", - cause: err, + if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 1 || val > 16777216 { + err := QuicProtocolOptionsValidationError{ + field: "InitialStreamWindowSize", + reason: "value must be inside range [1, 16777216]", } + if !all { + return err + } + errors = append(errors, err) } + } - if wrapper := m.GetMaxHeadersCount(); wrapper != nil { + if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { - if wrapper.GetValue() < 1 { - return HttpProtocolOptionsValidationError{ - field: "MaxHeadersCount", - reason: "value must be greater than or equal to 1", + if val := wrapper.GetValue(); val < 1 || val > 25165824 { + err := QuicProtocolOptionsValidationError{ + field: "InitialConnectionWindowSize", + reason: "value must be inside range [1, 25165824]", + } + if !all { + return err } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { + if wrapper := m.GetNumTimeoutsToTriggerPortMigration(); wrapper != nil { + + if val := wrapper.GetValue(); val < 0 || val > 5 { + err := QuicProtocolOptionsValidationError{ + field: "NumTimeoutsToTriggerPortMigration", + reason: "value must be inside range [0, 5]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetConnectionKeepalive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "ConnectionKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "ConnectionKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionKeepalive()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "MaxStreamDuration", + return QuicProtocolOptionsValidationError{ + field: "ConnectionKeepalive", reason: "embedded message failed validation", cause: err, } } } - // no validation rules for HeadersWithUnderscoresAction + if len(errors) > 0 { + return QuicProtocolOptionsMultiError(errors) + } return nil } -// HttpProtocolOptionsValidationError is the validation error returned by -// HttpProtocolOptions.Validate if the designated constraints aren't met. -type HttpProtocolOptionsValidationError struct { +// QuicProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by QuicProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type QuicProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicProtocolOptionsMultiError) AllErrors() []error { return m } + +// QuicProtocolOptionsValidationError is the validation error returned by +// QuicProtocolOptions.Validate if the designated constraints aren't met. +type QuicProtocolOptionsValidationError struct { field string reason string cause error @@ -236,24 +446,24 @@ type HttpProtocolOptionsValidationError struct { } // Field function returns field value. -func (e HttpProtocolOptionsValidationError) Field() string { return e.field } +func (e QuicProtocolOptionsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e HttpProtocolOptionsValidationError) Reason() string { return e.reason } +func (e QuicProtocolOptionsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e HttpProtocolOptionsValidationError) Cause() error { return e.cause } +func (e QuicProtocolOptionsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e HttpProtocolOptionsValidationError) Key() bool { return e.key } +func (e QuicProtocolOptionsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e HttpProtocolOptionsValidationError) ErrorName() string { - return "HttpProtocolOptionsValidationError" +func (e QuicProtocolOptionsValidationError) ErrorName() string { + return "QuicProtocolOptionsValidationError" } // Error satisfies the builtin error interface -func (e HttpProtocolOptionsValidationError) Error() string { +func (e QuicProtocolOptionsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -265,14 +475,14 @@ func (e HttpProtocolOptionsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sHttpProtocolOptions.%s: %s%s", + "invalid %sQuicProtocolOptions.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = HttpProtocolOptionsValidationError{} +var _ error = QuicProtocolOptionsValidationError{} var _ interface { Field() string @@ -280,60 +490,77 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = HttpProtocolOptionsValidationError{} +} = QuicProtocolOptionsValidationError{} -// Validate checks the field values on Http1ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Http1ProtocolOptions) Validate() error { +// Validate checks the field values on UpstreamHttpProtocolOptions with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *UpstreamHttpProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamHttpProtocolOptions with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamHttpProtocolOptionsMultiError, or nil if none found. +func (m *UpstreamHttpProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamHttpProtocolOptions) validate(all bool) error { if m == nil { return nil } - 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, - } - } - } + var errors []error - // no validation rules for AcceptHttp_10 + // no validation rules for AutoSni - // no validation rules for DefaultHostForHttp_10 + // no validation rules for AutoSanValidation - 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, + if m.GetOverrideAutoSniHeader() != "" { + + if !_UpstreamHttpProtocolOptions_OverrideAutoSniHeader_Pattern.MatchString(m.GetOverrideAutoSniHeader()) { + err := UpstreamHttpProtocolOptionsValidationError{ + field: "OverrideAutoSniHeader", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) } - } - - // no validation rules for EnableTrailers - // no validation rules for AllowChunkedLength + } - if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } + if len(errors) > 0 { + return UpstreamHttpProtocolOptionsMultiError(errors) } return nil } -// Http1ProtocolOptionsValidationError is the validation error returned by -// Http1ProtocolOptions.Validate if the designated constraints aren't met. -type Http1ProtocolOptionsValidationError struct { +// UpstreamHttpProtocolOptionsMultiError is an error wrapping multiple +// validation errors returned by UpstreamHttpProtocolOptions.ValidateAll() if +// the designated constraints aren't met. +type UpstreamHttpProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamHttpProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamHttpProtocolOptionsMultiError) AllErrors() []error { return m } + +// UpstreamHttpProtocolOptionsValidationError is the validation error returned +// by UpstreamHttpProtocolOptions.Validate if the designated constraints +// aren't met. +type UpstreamHttpProtocolOptionsValidationError struct { field string reason string cause error @@ -341,24 +568,24 @@ type Http1ProtocolOptionsValidationError struct { } // Field function returns field value. -func (e Http1ProtocolOptionsValidationError) Field() string { return e.field } +func (e UpstreamHttpProtocolOptionsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e Http1ProtocolOptionsValidationError) Reason() string { return e.reason } +func (e UpstreamHttpProtocolOptionsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e Http1ProtocolOptionsValidationError) Cause() error { return e.cause } +func (e UpstreamHttpProtocolOptionsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e Http1ProtocolOptionsValidationError) Key() bool { return e.key } +func (e UpstreamHttpProtocolOptionsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e Http1ProtocolOptionsValidationError) ErrorName() string { - return "Http1ProtocolOptionsValidationError" +func (e UpstreamHttpProtocolOptionsValidationError) ErrorName() string { + return "UpstreamHttpProtocolOptionsValidationError" } // Error satisfies the builtin error interface -func (e Http1ProtocolOptionsValidationError) Error() string { +func (e UpstreamHttpProtocolOptionsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -370,14 +597,14 @@ func (e Http1ProtocolOptionsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sHttp1ProtocolOptions.%s: %s%s", + "invalid %sUpstreamHttpProtocolOptions.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = Http1ProtocolOptionsValidationError{} +var _ error = UpstreamHttpProtocolOptionsValidationError{} var _ interface { Field() string @@ -385,88 +612,1190 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = Http1ProtocolOptionsValidationError{} +} = UpstreamHttpProtocolOptionsValidationError{} -// Validate checks the field values on KeepaliveSettings with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *KeepaliveSettings) Validate() error { +var _UpstreamHttpProtocolOptions_OverrideAutoSniHeader_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +// Validate checks the field values on AlternateProtocolsCacheOptions with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AlternateProtocolsCacheOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AlternateProtocolsCacheOptions with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// AlternateProtocolsCacheOptionsMultiError, or nil if none found. +func (m *AlternateProtocolsCacheOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *AlternateProtocolsCacheOptions) validate(all bool) error { if m == nil { return nil } - if m.GetInterval() == nil { - return KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value is required", - } - } + var errors []error - if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value is not a valid duration", - cause: err, - } + if utf8.RuneCountInString(m.GetName()) < 1 { + err := AlternateProtocolsCacheOptionsValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + if wrapper := m.GetMaxEntries(); wrapper != nil { - if dur < gte { - return KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value must be greater than or equal to 1ms", + if wrapper.GetValue() <= 0 { + err := AlternateProtocolsCacheOptionsValidationError{ + field: "MaxEntries", + reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } - if m.GetTimeout() == nil { - return KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value is required", - } - } - - if d := m.GetTimeout(); d != nil { - dur, err := ptypes.Duration(d) + if all { + switch v := interface{}(m.GetKeyValueStoreConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ + field: "KeyValueStoreConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ + field: "KeyValueStoreConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeyValueStoreConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AlternateProtocolsCacheOptionsValidationError{ + field: "KeyValueStoreConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetPrepopulatedEntries() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ + field: fmt.Sprintf("PrepopulatedEntries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ + field: fmt.Sprintf("PrepopulatedEntries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AlternateProtocolsCacheOptionsValidationError{ + field: fmt.Sprintf("PrepopulatedEntries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return AlternateProtocolsCacheOptionsMultiError(errors) + } + + return nil +} + +// AlternateProtocolsCacheOptionsMultiError is an error wrapping multiple +// validation errors returned by AlternateProtocolsCacheOptions.ValidateAll() +// if the designated constraints aren't met. +type AlternateProtocolsCacheOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AlternateProtocolsCacheOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AlternateProtocolsCacheOptionsMultiError) AllErrors() []error { return m } + +// AlternateProtocolsCacheOptionsValidationError is the validation error +// returned by AlternateProtocolsCacheOptions.Validate if the designated +// constraints aren't met. +type AlternateProtocolsCacheOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AlternateProtocolsCacheOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AlternateProtocolsCacheOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AlternateProtocolsCacheOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AlternateProtocolsCacheOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AlternateProtocolsCacheOptionsValidationError) ErrorName() string { + return "AlternateProtocolsCacheOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e AlternateProtocolsCacheOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAlternateProtocolsCacheOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AlternateProtocolsCacheOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AlternateProtocolsCacheOptionsValidationError{} + +// Validate checks the field values on HttpProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HttpProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpProtocolOptionsMultiError, or nil if none found. +func (m *HttpProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpProtocolOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxConnectionDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxConnectionDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxConnectionDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConnectionDuration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptionsValidationError{ + field: "MaxConnectionDuration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetMaxHeadersCount(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := HttpProtocolOptionsValidationError{ + field: "MaxHeadersCount", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetMaxStreamDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptionsValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for HeadersWithUnderscoresAction + + if all { + switch v := interface{}(m.GetMaxRequestsPerConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptionsValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpProtocolOptionsMultiError(errors) + } + + return nil +} + +// HttpProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by HttpProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type HttpProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpProtocolOptionsMultiError) AllErrors() []error { return m } + +// HttpProtocolOptionsValidationError is the validation error returned by +// HttpProtocolOptions.Validate if the designated constraints aren't met. +type HttpProtocolOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpProtocolOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpProtocolOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpProtocolOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpProtocolOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpProtocolOptionsValidationError) ErrorName() string { + return "HttpProtocolOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpProtocolOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpProtocolOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpProtocolOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpProtocolOptionsValidationError{} + +// Validate checks the field values on Http1ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Http1ProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http1ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Http1ProtocolOptionsMultiError, or nil if none found. +func (m *Http1ProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAllowAbsoluteUrl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "AllowAbsoluteUrl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "AllowAbsoluteUrl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowAbsoluteUrl()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http1ProtocolOptionsValidationError{ + field: "AllowAbsoluteUrl", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for AcceptHttp_10 + + // no validation rules for DefaultHostForHttp_10 + + if all { + switch v := interface{}(m.GetHeaderKeyFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "HeaderKeyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "HeaderKeyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderKeyFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http1ProtocolOptionsValidationError{ + field: "HeaderKeyFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for EnableTrailers + + // no validation rules for AllowChunkedLength + + if all { + switch v := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http1ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Http1ProtocolOptionsMultiError(errors) + } + + return nil +} + +// Http1ProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by Http1ProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type Http1ProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptionsMultiError) AllErrors() []error { return m } + +// Http1ProtocolOptionsValidationError is the validation error returned by +// Http1ProtocolOptions.Validate if the designated constraints aren't met. +type Http1ProtocolOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Http1ProtocolOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Http1ProtocolOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Http1ProtocolOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Http1ProtocolOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Http1ProtocolOptionsValidationError) ErrorName() string { + return "Http1ProtocolOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e Http1ProtocolOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttp1ProtocolOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Http1ProtocolOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Http1ProtocolOptionsValidationError{} + +// Validate checks the field values on KeepaliveSettings with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *KeepaliveSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on KeepaliveSettings with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// KeepaliveSettingsMultiError, or nil if none found. +func (m *KeepaliveSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *KeepaliveSettings) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return KeepaliveSettingsValidationError{ + err = KeepaliveSettingsValidationError{ + field: "Interval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := KeepaliveSettingsValidationError{ + field: "Interval", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if m.GetTimeout() == nil { + err := KeepaliveSettingsValidationError{ + field: "Timeout", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetTimeout(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = KeepaliveSettingsValidationError{ field: "Timeout", reason: "value is not a valid duration", cause: err, } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := KeepaliveSettingsValidationError{ + field: "Timeout", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetIntervalJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, KeepaliveSettingsValidationError{ + field: "IntervalJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, KeepaliveSettingsValidationError{ + field: "IntervalJitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return KeepaliveSettingsValidationError{ + field: "IntervalJitter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if d := m.GetConnectionIdleInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = KeepaliveSettingsValidationError{ + field: "ConnectionIdleInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := KeepaliveSettingsValidationError{ + field: "ConnectionIdleInterval", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return KeepaliveSettingsMultiError(errors) + } + + return nil +} + +// KeepaliveSettingsMultiError is an error wrapping multiple validation errors +// returned by KeepaliveSettings.ValidateAll() if the designated constraints +// aren't met. +type KeepaliveSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m KeepaliveSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m KeepaliveSettingsMultiError) AllErrors() []error { return m } + +// KeepaliveSettingsValidationError is the validation error returned by +// KeepaliveSettings.Validate if the designated constraints aren't met. +type KeepaliveSettingsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e KeepaliveSettingsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e KeepaliveSettingsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e KeepaliveSettingsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e KeepaliveSettingsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e KeepaliveSettingsValidationError) ErrorName() string { + return "KeepaliveSettingsValidationError" +} + +// Error satisfies the builtin error interface +func (e KeepaliveSettingsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sKeepaliveSettings.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = KeepaliveSettingsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = KeepaliveSettingsValidationError{} + +// Validate checks the field values on Http2ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Http2ProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http2ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Http2ProtocolOptionsMultiError, or nil if none found. +func (m *Http2ProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *Http2ProtocolOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHpackTableSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "HpackTableSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "HpackTableSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHpackTableSize()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http2ProtocolOptionsValidationError{ + field: "HpackTableSize", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { + + if val := wrapper.GetValue(); val < 1 || val > 2147483647 { + err := Http2ProtocolOptionsValidationError{ + field: "MaxConcurrentStreams", + reason: "value must be inside range [1, 2147483647]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { + err := Http2ProtocolOptionsValidationError{ + field: "InitialStreamWindowSize", + reason: "value must be inside range [65535, 2147483647]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { + err := Http2ProtocolOptionsValidationError{ + field: "InitialConnectionWindowSize", + reason: "value must be inside range [65535, 2147483647]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + // no validation rules for AllowConnect + + // no validation rules for AllowMetadata + + if wrapper := m.GetMaxOutboundFrames(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := Http2ProtocolOptionsValidationError{ + field: "MaxOutboundFrames", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetMaxOutboundControlFrames(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := Http2ProtocolOptionsValidationError{ + field: "MaxOutboundControlFrames", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetMaxConsecutiveInboundFramesWithEmptyPayload()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxConsecutiveInboundFramesWithEmptyPayload", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxConsecutiveInboundFramesWithEmptyPayload", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxConsecutiveInboundFramesWithEmptyPayload()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http2ProtocolOptionsValidationError{ + field: "MaxConsecutiveInboundFramesWithEmptyPayload", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxInboundPriorityFramesPerStream()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxInboundPriorityFramesPerStream", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "MaxInboundPriorityFramesPerStream", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxInboundPriorityFramesPerStream()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http2ProtocolOptionsValidationError{ + field: "MaxInboundPriorityFramesPerStream", + reason: "embedded message failed validation", + cause: err, + } } + } - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + if wrapper := m.GetMaxInboundWindowUpdateFramesPerDataFrameSent(); wrapper != nil { - if dur < gte { - return KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value must be greater than or equal to 1ms", + if wrapper.GetValue() < 1 { + err := Http2ProtocolOptionsValidationError{ + field: "MaxInboundWindowUpdateFramesPerDataFrameSent", + reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { + // no validation rules for StreamErrorOnInvalidHttpMessaging + + if all { + switch v := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return KeepaliveSettingsValidationError{ - field: "IntervalJitter", + return Http2ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetCustomSettingsParameters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http2ProtocolOptionsValidationError{ + field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetConnectionKeepalive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "ConnectionKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptionsValidationError{ + field: "ConnectionKeepalive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionKeepalive()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http2ProtocolOptionsValidationError{ + field: "ConnectionKeepalive", reason: "embedded message failed validation", cause: err, } } } + if len(errors) > 0 { + return Http2ProtocolOptionsMultiError(errors) + } + return nil } -// KeepaliveSettingsValidationError is the validation error returned by -// KeepaliveSettings.Validate if the designated constraints aren't met. -type KeepaliveSettingsValidationError struct { +// Http2ProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by Http2ProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type Http2ProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http2ProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http2ProtocolOptionsMultiError) AllErrors() []error { return m } + +// Http2ProtocolOptionsValidationError is the validation error returned by +// Http2ProtocolOptions.Validate if the designated constraints aren't met. +type Http2ProtocolOptionsValidationError struct { field string reason string cause error @@ -474,24 +1803,24 @@ type KeepaliveSettingsValidationError struct { } // Field function returns field value. -func (e KeepaliveSettingsValidationError) Field() string { return e.field } +func (e Http2ProtocolOptionsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e KeepaliveSettingsValidationError) Reason() string { return e.reason } +func (e Http2ProtocolOptionsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e KeepaliveSettingsValidationError) Cause() error { return e.cause } +func (e Http2ProtocolOptionsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e KeepaliveSettingsValidationError) Key() bool { return e.key } +func (e Http2ProtocolOptionsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e KeepaliveSettingsValidationError) ErrorName() string { - return "KeepaliveSettingsValidationError" +func (e Http2ProtocolOptionsValidationError) ErrorName() string { + return "Http2ProtocolOptionsValidationError" } // Error satisfies the builtin error interface -func (e KeepaliveSettingsValidationError) Error() string { +func (e Http2ProtocolOptionsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -503,14 +1832,14 @@ func (e KeepaliveSettingsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sKeepaliveSettings.%s: %s%s", + "invalid %sHttp2ProtocolOptions.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = KeepaliveSettingsValidationError{} +var _ error = Http2ProtocolOptionsValidationError{} var _ interface { Field() string @@ -518,159 +1847,367 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = KeepaliveSettingsValidationError{} +} = Http2ProtocolOptionsValidationError{} -// Validate checks the field values on Http2ProtocolOptions with the rules +// Validate checks the field values on GrpcProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Http2ProtocolOptions) Validate() error { +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GrpcProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcProtocolOptionsMultiError, or nil if none found. +func (m *GrpcProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHpackTableSize()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcProtocolOptionsValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcProtocolOptionsValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "HpackTableSize", + return GrpcProtocolOptionsValidationError{ + field: "Http2ProtocolOptions", reason: "embedded message failed validation", cause: err, } } } - if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { + if len(errors) > 0 { + return GrpcProtocolOptionsMultiError(errors) + } - if val := wrapper.GetValue(); val < 1 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", - reason: "value must be inside range [1, 2147483647]", - } - } + return nil +} + +// GrpcProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by GrpcProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type GrpcProtocolOptionsMultiError []error +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) } + return strings.Join(msgs, "; ") +} - if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { +// AllErrors returns a list of validation violation errors. +func (m GrpcProtocolOptionsMultiError) AllErrors() []error { return m } - if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ - field: "InitialStreamWindowSize", - reason: "value must be inside range [65535, 2147483647]", - } - } +// GrpcProtocolOptionsValidationError is the validation error returned by +// GrpcProtocolOptions.Validate if the designated constraints aren't met. +type GrpcProtocolOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcProtocolOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcProtocolOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcProtocolOptionsValidationError) Cause() error { return e.cause } +// Key function returns key value. +func (e GrpcProtocolOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcProtocolOptionsValidationError) ErrorName() string { + return "GrpcProtocolOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e GrpcProtocolOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } - if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { + key := "" + if e.key { + key = "key for " + } - if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ - field: "InitialConnectionWindowSize", - reason: "value must be inside range [65535, 2147483647]", + return fmt.Sprintf( + "invalid %sGrpcProtocolOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcProtocolOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcProtocolOptionsValidationError{} + +// Validate checks the field values on Http3ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Http3ProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http3ProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Http3ProtocolOptionsMultiError, or nil if none found. +func (m *Http3ProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *Http3ProtocolOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetQuicProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http3ProtocolOptionsValidationError{ + field: "QuicProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http3ProtocolOptionsValidationError{ + field: "QuicProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuicProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http3ProtocolOptionsValidationError{ + field: "QuicProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http3ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http3ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) } } + } else if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http3ProtocolOptionsValidationError{ + field: "OverrideStreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for AllowExtendedConnect + + if len(errors) > 0 { + return Http3ProtocolOptionsMultiError(errors) + } + + return nil +} + +// Http3ProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by Http3ProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type Http3ProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http3ProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http3ProtocolOptionsMultiError) AllErrors() []error { return m } + +// Http3ProtocolOptionsValidationError is the validation error returned by +// Http3ProtocolOptions.Validate if the designated constraints aren't met. +type Http3ProtocolOptionsValidationError struct { + field string + reason string + cause error + key bool +} - } +// Field function returns field value. +func (e Http3ProtocolOptionsValidationError) Field() string { return e.field } - // no validation rules for AllowConnect +// Reason function returns reason value. +func (e Http3ProtocolOptionsValidationError) Reason() string { return e.reason } - // no validation rules for AllowMetadata +// Cause function returns cause value. +func (e Http3ProtocolOptionsValidationError) Cause() error { return e.cause } - if wrapper := m.GetMaxOutboundFrames(); wrapper != nil { +// Key function returns key value. +func (e Http3ProtocolOptionsValidationError) Key() bool { return e.key } - if wrapper.GetValue() < 1 { - return Http2ProtocolOptionsValidationError{ - field: "MaxOutboundFrames", - reason: "value must be greater than or equal to 1", - } - } +// ErrorName returns error name. +func (e Http3ProtocolOptionsValidationError) ErrorName() string { + return "Http3ProtocolOptionsValidationError" +} +// Error satisfies the builtin error interface +func (e Http3ProtocolOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } - if wrapper := m.GetMaxOutboundControlFrames(); wrapper != nil { - - if wrapper.GetValue() < 1 { - return Http2ProtocolOptionsValidationError{ - field: "MaxOutboundControlFrames", - reason: "value must be greater than or equal to 1", - } - } - + key := "" + if e.key { + key = "key for " } - 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, - } - } - } + return fmt.Sprintf( + "invalid %sHttp3ProtocolOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} - 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, - } - } - } +var _ error = Http3ProtocolOptionsValidationError{} - if wrapper := m.GetMaxInboundWindowUpdateFramesPerDataFrameSent(); wrapper != nil { +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Http3ProtocolOptionsValidationError{} - if wrapper.GetValue() < 1 { - return Http2ProtocolOptionsValidationError{ - field: "MaxInboundWindowUpdateFramesPerDataFrameSent", - reason: "value must be greater than or equal to 1", - } - } +// Validate checks the field values on SchemeHeaderTransformation with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SchemeHeaderTransformation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SchemeHeaderTransformation with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SchemeHeaderTransformationMultiError, or nil if none found. +func (m *SchemeHeaderTransformation) ValidateAll() error { + return m.validate(true) +} +func (m *SchemeHeaderTransformation) validate(all bool) error { + if m == nil { + return nil } - // no validation rules for StreamErrorOnInvalidHttpMessaging + var errors []error - if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } - } + switch m.Transformation.(type) { - for idx, item := range m.GetCustomSettingsParameters() { - _, _ = idx, item + case *SchemeHeaderTransformation_SchemeToOverwrite: - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if _, ok := _SchemeHeaderTransformation_SchemeToOverwrite_InLookup[m.GetSchemeToOverwrite()]; !ok { + err := SchemeHeaderTransformationValidationError{ + field: "SchemeToOverwrite", + reason: "value must be in list [http https]", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetConnectionKeepalive()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - } - } + if len(errors) > 0 { + return SchemeHeaderTransformationMultiError(errors) } return nil } -// Http2ProtocolOptionsValidationError is the validation error returned by -// Http2ProtocolOptions.Validate if the designated constraints aren't met. -type Http2ProtocolOptionsValidationError struct { +// SchemeHeaderTransformationMultiError is an error wrapping multiple +// validation errors returned by SchemeHeaderTransformation.ValidateAll() if +// the designated constraints aren't met. +type SchemeHeaderTransformationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SchemeHeaderTransformationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SchemeHeaderTransformationMultiError) AllErrors() []error { return m } + +// SchemeHeaderTransformationValidationError is the validation error returned +// by SchemeHeaderTransformation.Validate if the designated constraints aren't met. +type SchemeHeaderTransformationValidationError struct { field string reason string cause error @@ -678,24 +2215,24 @@ type Http2ProtocolOptionsValidationError struct { } // Field function returns field value. -func (e Http2ProtocolOptionsValidationError) Field() string { return e.field } +func (e SchemeHeaderTransformationValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e Http2ProtocolOptionsValidationError) Reason() string { return e.reason } +func (e SchemeHeaderTransformationValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e Http2ProtocolOptionsValidationError) Cause() error { return e.cause } +func (e SchemeHeaderTransformationValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e Http2ProtocolOptionsValidationError) Key() bool { return e.key } +func (e SchemeHeaderTransformationValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e Http2ProtocolOptionsValidationError) ErrorName() string { - return "Http2ProtocolOptionsValidationError" +func (e SchemeHeaderTransformationValidationError) ErrorName() string { + return "SchemeHeaderTransformationValidationError" } // Error satisfies the builtin error interface -func (e Http2ProtocolOptionsValidationError) Error() string { +func (e SchemeHeaderTransformationValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -707,14 +2244,14 @@ func (e Http2ProtocolOptionsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sHttp2ProtocolOptions.%s: %s%s", + "invalid %sSchemeHeaderTransformation.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = Http2ProtocolOptionsValidationError{} +var _ error = SchemeHeaderTransformationValidationError{} var _ interface { Field() string @@ -722,32 +2259,96 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = Http2ProtocolOptionsValidationError{} +} = SchemeHeaderTransformationValidationError{} -// Validate checks the field values on GrpcProtocolOptions with the rules +var _SchemeHeaderTransformation_SchemeToOverwrite_InLookup = map[string]struct{}{ + "http": {}, + "https": {}, +} + +// Validate checks the field values on +// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *GrpcProtocolOptions) Validate() error { +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError, or +// nil if none found. +func (m *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) ValidateAll() error { + return m.validate(true) +} + +func (m *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) validate(all bool) error { if m == nil { return nil } - 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, + var errors []error + + if m.GetHostname() != "" { + + if !_AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry_Hostname_Pattern.MatchString(m.GetHostname()) { + err := AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{ + field: "Hostname", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if val := m.GetPort(); val <= 0 || val >= 65535 { + err := AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{ + field: "Port", + reason: "value must be inside range (0, 65535)", + } + if !all { + return err } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError(errors) } return nil } -// GrpcProtocolOptionsValidationError is the validation error returned by -// GrpcProtocolOptions.Validate if the designated constraints aren't met. -type GrpcProtocolOptionsValidationError struct { +// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError is an +// error wrapping multiple validation errors returned by +// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.ValidateAll() +// if the designated constraints aren't met. +type AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError) AllErrors() []error { + return m +} + +// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError +// is the validation error returned by +// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.Validate if the +// designated constraints aren't met. +type AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError struct { field string reason string cause error @@ -755,24 +2356,32 @@ type GrpcProtocolOptionsValidationError struct { } // Field function returns field value. -func (e GrpcProtocolOptionsValidationError) Field() string { return e.field } +func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Field() string { + return e.field +} // Reason function returns reason value. -func (e GrpcProtocolOptionsValidationError) Reason() string { return e.reason } +func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Reason() string { + return e.reason +} // Cause function returns cause value. -func (e GrpcProtocolOptionsValidationError) Cause() error { return e.cause } +func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Cause() error { + return e.cause +} // Key function returns key value. -func (e GrpcProtocolOptionsValidationError) Key() bool { return e.key } +func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Key() bool { + return e.key +} // ErrorName returns error name. -func (e GrpcProtocolOptionsValidationError) ErrorName() string { - return "GrpcProtocolOptionsValidationError" +func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) ErrorName() string { + return "AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError" } // Error satisfies the builtin error interface -func (e GrpcProtocolOptionsValidationError) Error() string { +func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -784,14 +2393,14 @@ func (e GrpcProtocolOptionsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sGrpcProtocolOptions.%s: %s%s", + "invalid %sAlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = GrpcProtocolOptionsValidationError{} +var _ error = AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{} var _ interface { Field() string @@ -799,21 +2408,57 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = GrpcProtocolOptionsValidationError{} +} = AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{} + +var _AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry_Hostname_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") // Validate checks the field values on Http1ProtocolOptions_HeaderKeyFormat // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http1ProtocolOptions_HeaderKeyFormat +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Http1ProtocolOptions_HeaderKeyFormatMultiError, or nil if none found. +func (m *Http1ProtocolOptions_HeaderKeyFormat) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.HeaderFormat.(type) { case *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_: - if v, ok := interface{}(m.GetProperCaseWords()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProperCaseWords()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "ProperCaseWords", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "ProperCaseWords", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProperCaseWords()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptions_HeaderKeyFormatValidationError{ field: "ProperCaseWords", @@ -825,7 +2470,26 @@ func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { case *Http1ProtocolOptions_HeaderKeyFormat_Custom_: - if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCustom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "Custom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "Custom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptions_HeaderKeyFormatValidationError{ field: "Custom", @@ -835,17 +2499,74 @@ func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { } } + case *Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter: + + if all { + switch v := interface{}(m.GetStatefulFormatter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "StatefulFormatter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "StatefulFormatter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatefulFormatter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "StatefulFormatter", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: - return Http1ProtocolOptions_HeaderKeyFormatValidationError{ + err := Http1ProtocolOptions_HeaderKeyFormatValidationError{ field: "HeaderFormat", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return Http1ProtocolOptions_HeaderKeyFormatMultiError(errors) } return nil } +// Http1ProtocolOptions_HeaderKeyFormatMultiError is an error wrapping multiple +// validation errors returned by +// Http1ProtocolOptions_HeaderKeyFormat.ValidateAll() if the designated +// constraints aren't met. +type Http1ProtocolOptions_HeaderKeyFormatMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptions_HeaderKeyFormatMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptions_HeaderKeyFormatMultiError) AllErrors() []error { return m } + // Http1ProtocolOptions_HeaderKeyFormatValidationError is the validation error // returned by Http1ProtocolOptions_HeaderKeyFormat.Validate if the designated // constraints aren't met. @@ -905,16 +2626,54 @@ var _ interface { // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError, or nil if +// none found. +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError(errors) + } + return nil } +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError is an error +// wrapping multiple validation errors returned by +// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.ValidateAll() if the +// designated constraints aren't met. +type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError) AllErrors() []error { return m } + // Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError is the // validation error returned by // Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.Validate if the @@ -981,17 +2740,55 @@ var _ interface { // Validate checks the field values on // Http1ProtocolOptions_HeaderKeyFormat_Custom with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Http1ProtocolOptions_HeaderKeyFormat_Custom) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Http1ProtocolOptions_HeaderKeyFormat_Custom with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError, or nil if none found. +func (m *Http1ProtocolOptions_HeaderKeyFormat_Custom) ValidateAll() error { + return m.validate(true) +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat_Custom) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Rules + if len(errors) > 0 { + return Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError(errors) + } + return nil } +// Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError is an error wrapping +// multiple validation errors returned by +// Http1ProtocolOptions_HeaderKeyFormat_Custom.ValidateAll() if the designated +// constraints aren't met. +type Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http1ProtocolOptions_HeaderKeyFormat_CustomMultiError) AllErrors() []error { return m } + // Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError is the validation // error returned by Http1ProtocolOptions_HeaderKeyFormat_Custom.Validate if // the designated constraints aren't met. @@ -1051,36 +2848,83 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Http2ProtocolOptions_SettingsParameter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Http2ProtocolOptions_SettingsParameter with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// Http2ProtocolOptions_SettingsParameterMultiError, or nil if none found. +func (m *Http2ProtocolOptions_SettingsParameter) ValidateAll() error { + return m.validate(true) +} + +func (m *Http2ProtocolOptions_SettingsParameter) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetIdentifier(); wrapper != nil { if val := wrapper.GetValue(); val < 0 || val > 65535 { - return Http2ProtocolOptions_SettingsParameterValidationError{ + err := Http2ProtocolOptions_SettingsParameterValidationError{ field: "Identifier", reason: "value must be inside range [0, 65535]", } + if !all { + return err + } + errors = append(errors, err) } } else { - return Http2ProtocolOptions_SettingsParameterValidationError{ + err := Http2ProtocolOptions_SettingsParameterValidationError{ field: "Identifier", reason: "value is required and must not be nil.", } + if !all { + return err + } + errors = append(errors, err) } if m.GetValue() == nil { - return Http2ProtocolOptions_SettingsParameterValidationError{ + err := Http2ProtocolOptions_SettingsParameterValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http2ProtocolOptions_SettingsParameterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http2ProtocolOptions_SettingsParameterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptions_SettingsParameterValidationError{ field: "Value", @@ -1090,9 +2934,31 @@ func (m *Http2ProtocolOptions_SettingsParameter) Validate() error { } } + if len(errors) > 0 { + return Http2ProtocolOptions_SettingsParameterMultiError(errors) + } + return nil } +// Http2ProtocolOptions_SettingsParameterMultiError is an error wrapping +// multiple validation errors returned by +// Http2ProtocolOptions_SettingsParameter.ValidateAll() if the designated +// constraints aren't met. +type Http2ProtocolOptions_SettingsParameterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http2ProtocolOptions_SettingsParameterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http2ProtocolOptions_SettingsParameterMultiError) AllErrors() []error { return m } + // Http2ProtocolOptions_SettingsParameterValidationError is the validation // error returned by Http2ProtocolOptions_SettingsParameter.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/core/v3/proxy_protocol.pb.go b/pkg/api/envoy/config/core/v3/proxy_protocol.pb.go index 696200cc4a..7443089b36 100644 --- a/pkg/api/envoy/config/core/v3/proxy_protocol.pb.go +++ b/pkg/api/envoy/config/core/v3/proxy_protocol.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/proxy_protocol.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ProxyProtocolConfig_Version int32 const ( @@ -132,21 +126,23 @@ var file_envoy_config_core_v3_proxy_protocol_proto_rawDesc = []byte{ 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x13, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x4b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, - 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x31, 0x10, 0x00, - 0x12, 0x06, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x01, 0x42, 0x42, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x12, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x7d, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x06, 0x0a, 0x02, 0x56, 0x31, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x01, 0x42, + 0x86, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/core/v3/proxy_protocol.pb.validate.go b/pkg/api/envoy/config/core/v3/proxy_protocol.pb.validate.go index 947259cb4b..c25e882e51 100644 --- a/pkg/api/envoy/config/core/v3/proxy_protocol.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/proxy_protocol.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/proxy_protocol.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,58 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ProxyProtocolConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ProxyProtocolConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocolConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProxyProtocolConfigMultiError, or nil if none found. +func (m *ProxyProtocolConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocolConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Version + if len(errors) > 0 { + return ProxyProtocolConfigMultiError(errors) + } + return nil } +// ProxyProtocolConfigMultiError is an error wrapping multiple validation +// errors returned by ProxyProtocolConfig.ValidateAll() if the designated +// constraints aren't met. +type ProxyProtocolConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocolConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocolConfigMultiError) AllErrors() []error { return m } + // ProxyProtocolConfigValidationError is the validation error returned by // ProxyProtocolConfig.Validate if the designated constraints aren't met. type ProxyProtocolConfigValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/resolver.pb.go b/pkg/api/envoy/config/core/v3/resolver.pb.go new file mode 100644 index 0000000000..66916f8473 --- /dev/null +++ b/pkg/api/envoy/config/core/v3/resolver.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/config/core/v3/resolver.proto + +package corev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration of DNS resolver option flags which control the behavior of the DNS resolver. +type DnsResolverOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Use TCP for all DNS queries instead of the default protocol UDP. + UseTcpForDnsLookups bool `protobuf:"varint,1,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` + // Do not use the default search domains; only query hostnames as-is or as aliases. + NoDefaultSearchDomain bool `protobuf:"varint,2,opt,name=no_default_search_domain,json=noDefaultSearchDomain,proto3" json:"no_default_search_domain,omitempty"` +} + +func (x *DnsResolverOptions) Reset() { + *x = DnsResolverOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsResolverOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsResolverOptions) ProtoMessage() {} + +func (x *DnsResolverOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsResolverOptions.ProtoReflect.Descriptor instead. +func (*DnsResolverOptions) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_resolver_proto_rawDescGZIP(), []int{0} +} + +func (x *DnsResolverOptions) GetUseTcpForDnsLookups() bool { + if x != nil { + return x.UseTcpForDnsLookups + } + return false +} + +func (x *DnsResolverOptions) GetNoDefaultSearchDomain() bool { + if x != nil { + return x.NoDefaultSearchDomain + } + return false +} + +// DNS resolution configuration which includes the underlying dns resolver addresses and options. +type DnsResolutionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of dns resolver addresses. If specified, the DNS client library will perform resolution + // via the underlying DNS resolvers. Otherwise, the default system resolvers + // (e.g., /etc/resolv.conf) will be used. + Resolvers []*Address `protobuf:"bytes,1,rep,name=resolvers,proto3" json:"resolvers,omitempty"` + // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. + DnsResolverOptions *DnsResolverOptions `protobuf:"bytes,2,opt,name=dns_resolver_options,json=dnsResolverOptions,proto3" json:"dns_resolver_options,omitempty"` +} + +func (x *DnsResolutionConfig) Reset() { + *x = DnsResolutionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsResolutionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsResolutionConfig) ProtoMessage() {} + +func (x *DnsResolutionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsResolutionConfig.ProtoReflect.Descriptor instead. +func (*DnsResolutionConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_resolver_proto_rawDescGZIP(), []int{1} +} + +func (x *DnsResolutionConfig) GetResolvers() []*Address { + if x != nil { + return x.Resolvers + } + return nil +} + +func (x *DnsResolutionConfig) GetDnsResolverOptions() *DnsResolverOptions { + if x != nil { + return x.DnsResolverOptions + } + return nil +} + +var File_envoy_config_core_v3_resolver_proto protoreflect.FileDescriptor + +var file_envoy_config_core_v3_resolver_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x12, 0x44, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, + 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, 0x6e, + 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6e, 0x6f, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x6e, 0x6f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0xb8, 0x01, + 0x0a, 0x13, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x14, + 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x81, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, + 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, + 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_core_v3_resolver_proto_rawDescOnce sync.Once + file_envoy_config_core_v3_resolver_proto_rawDescData = file_envoy_config_core_v3_resolver_proto_rawDesc +) + +func file_envoy_config_core_v3_resolver_proto_rawDescGZIP() []byte { + file_envoy_config_core_v3_resolver_proto_rawDescOnce.Do(func() { + file_envoy_config_core_v3_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_resolver_proto_rawDescData) + }) + return file_envoy_config_core_v3_resolver_proto_rawDescData +} + +var file_envoy_config_core_v3_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_config_core_v3_resolver_proto_goTypes = []interface{}{ + (*DnsResolverOptions)(nil), // 0: envoy.config.core.v3.DnsResolverOptions + (*DnsResolutionConfig)(nil), // 1: envoy.config.core.v3.DnsResolutionConfig + (*Address)(nil), // 2: envoy.config.core.v3.Address +} +var file_envoy_config_core_v3_resolver_proto_depIdxs = []int32{ + 2, // 0: envoy.config.core.v3.DnsResolutionConfig.resolvers:type_name -> envoy.config.core.v3.Address + 0, // 1: envoy.config.core.v3.DnsResolutionConfig.dns_resolver_options:type_name -> envoy.config.core.v3.DnsResolverOptions + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_config_core_v3_resolver_proto_init() } +func file_envoy_config_core_v3_resolver_proto_init() { + if File_envoy_config_core_v3_resolver_proto != nil { + return + } + file_envoy_config_core_v3_address_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_config_core_v3_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsResolverOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_resolver_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsResolutionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_core_v3_resolver_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_core_v3_resolver_proto_goTypes, + DependencyIndexes: file_envoy_config_core_v3_resolver_proto_depIdxs, + MessageInfos: file_envoy_config_core_v3_resolver_proto_msgTypes, + }.Build() + File_envoy_config_core_v3_resolver_proto = out.File + file_envoy_config_core_v3_resolver_proto_rawDesc = nil + file_envoy_config_core_v3_resolver_proto_goTypes = nil + file_envoy_config_core_v3_resolver_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/config/core/v3/resolver.pb.validate.go b/pkg/api/envoy/config/core/v3/resolver.pb.validate.go new file mode 100644 index 0000000000..30de106fe2 --- /dev/null +++ b/pkg/api/envoy/config/core/v3/resolver.pb.validate.go @@ -0,0 +1,318 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/core/v3/resolver.proto + +package corev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DnsResolverOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DnsResolverOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsResolverOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsResolverOptionsMultiError, or nil if none found. +func (m *DnsResolverOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsResolverOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for UseTcpForDnsLookups + + // no validation rules for NoDefaultSearchDomain + + if len(errors) > 0 { + return DnsResolverOptionsMultiError(errors) + } + + return nil +} + +// DnsResolverOptionsMultiError is an error wrapping multiple validation errors +// returned by DnsResolverOptions.ValidateAll() if the designated constraints +// aren't met. +type DnsResolverOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsResolverOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsResolverOptionsMultiError) AllErrors() []error { return m } + +// DnsResolverOptionsValidationError is the validation error returned by +// DnsResolverOptions.Validate if the designated constraints aren't met. +type DnsResolverOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsResolverOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsResolverOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsResolverOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsResolverOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsResolverOptionsValidationError) ErrorName() string { + return "DnsResolverOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsResolverOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDnsResolverOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsResolverOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsResolverOptionsValidationError{} + +// Validate checks the field values on DnsResolutionConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DnsResolutionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsResolutionConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsResolutionConfigMultiError, or nil if none found. +func (m *DnsResolutionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsResolutionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetResolvers()) < 1 { + err := DnsResolutionConfigValidationError{ + field: "Resolvers", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetResolvers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsResolutionConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsResolutionConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsResolutionConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetDnsResolverOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsResolutionConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsResolutionConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolverOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsResolutionConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DnsResolutionConfigMultiError(errors) + } + + return nil +} + +// DnsResolutionConfigMultiError is an error wrapping multiple validation +// errors returned by DnsResolutionConfig.ValidateAll() if the designated +// constraints aren't met. +type DnsResolutionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsResolutionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsResolutionConfigMultiError) AllErrors() []error { return m } + +// DnsResolutionConfigValidationError is the validation error returned by +// DnsResolutionConfig.Validate if the designated constraints aren't met. +type DnsResolutionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsResolutionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsResolutionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsResolutionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsResolutionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsResolutionConfigValidationError) ErrorName() string { + return "DnsResolutionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsResolutionConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDnsResolutionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsResolutionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsResolutionConfigValidationError{} diff --git a/pkg/api/envoy/config/core/v3/socket_option.pb.go b/pkg/api/envoy/config/core/v3/socket_option.pb.go index d7f86227fe..eb34f0cac8 100644 --- a/pkg/api/envoy/config/core/v3/socket_option.pb.go +++ b/pkg/api/envoy/config/core/v3/socket_option.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/socket_option.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SocketOption_SocketState int32 const ( @@ -237,11 +232,16 @@ var file_envoy_config_core_v3_socket_option_proto_rawDesc = []byte{ 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x42, 0x41, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xf8, 0x42, 0x01, 0x42, 0x85, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x53, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, + 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/core/v3/socket_option.pb.validate.go b/pkg/api/envoy/config/core/v3/socket_option.pb.validate.go index b4497936fe..336c7f404d 100644 --- a/pkg/api/envoy/config/core/v3/socket_option.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/socket_option.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/socket_option.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SocketOption with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SocketOption) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketOption with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SocketOptionMultiError, or +// nil if none found. +func (m *SocketOption) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketOption) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Description // no validation rules for Level @@ -48,10 +64,14 @@ func (m *SocketOption) Validate() error { // no validation rules for Name if _, ok := SocketOption_SocketState_name[int32(m.GetState())]; !ok { - return SocketOptionValidationError{ + err := SocketOptionValidationError{ field: "State", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.Value.(type) { @@ -63,16 +83,40 @@ func (m *SocketOption) Validate() error { // no validation rules for BufValue default: - return SocketOptionValidationError{ + err := SocketOptionValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return SocketOptionMultiError(errors) + } + return nil } +// SocketOptionMultiError is an error wrapping multiple validation errors +// returned by SocketOption.ValidateAll() if the designated constraints aren't met. +type SocketOptionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketOptionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketOptionMultiError) AllErrors() []error { return m } + // SocketOptionValidationError is the validation error returned by // SocketOption.Validate if the designated constraints aren't met. type SocketOptionValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/substitution_format_string.pb.go b/pkg/api/envoy/config/core/v3/substitution_format_string.pb.go index c26dada50c..107324ba94 100644 --- a/pkg/api/envoy/config/core/v3/substitution_format_string.pb.go +++ b/pkg/api/envoy/config/core/v3/substitution_format_string.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/core/v3/substitution_format_string.proto -package envoy_config_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,13 +24,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration to use multiple :ref:`command operators ` // to generate a new string in either plain text or JSON format. -// [#next-free-field: 6] +// [#next-free-field: 7] type SubstitutionFormatString struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -57,6 +53,10 @@ type SubstitutionFormatString struct { // content_type: "text/html; charset=UTF-8" // ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // Specifies a collection of Formatter plugins that can be called from the access log configuration. + // See the formatters extensions documentation for details. + // [#extension-category: envoy.formatter] + Formatters []*TypedExtensionConfig `protobuf:"bytes,6,rep,name=formatters,proto3" json:"formatters,omitempty"` } func (x *SubstitutionFormatString) Reset() { @@ -134,6 +134,13 @@ func (x *SubstitutionFormatString) GetContentType() string { return "" } +func (x *SubstitutionFormatString) GetFormatters() []*TypedExtensionConfig { + if x != nil { + return x.Formatters + } + return nil +} + type isSubstitutionFormatString_Format interface { isSubstitutionFormatString_Format() } @@ -223,38 +230,52 @@ var file_envoy_config_core_v3_substitution_format_string_proto_rawDesc = []byte{ 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x02, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x65, - 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x50, - 0x0a, 0x12, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x10, - 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x6d, 0x69, - 0x74, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, - 0x0d, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x4d, - 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x42, 0x1d, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x8c, 0x03, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2e, 0x0a, 0x0b, + 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, + 0x52, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x44, 0x0a, 0x0b, + 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x12, 0x50, 0x0a, 0x12, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x48, 0x00, 0x52, 0x10, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x6f, 0x6d, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x42, + 0x0d, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x91, + 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x1d, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -274,15 +295,17 @@ var file_envoy_config_core_v3_substitution_format_string_proto_goTypes = []inter (*SubstitutionFormatString)(nil), // 0: envoy.config.core.v3.SubstitutionFormatString (*_struct.Struct)(nil), // 1: google.protobuf.Struct (*DataSource)(nil), // 2: envoy.config.core.v3.DataSource + (*TypedExtensionConfig)(nil), // 3: envoy.config.core.v3.TypedExtensionConfig } var file_envoy_config_core_v3_substitution_format_string_proto_depIdxs = []int32{ 1, // 0: envoy.config.core.v3.SubstitutionFormatString.json_format:type_name -> google.protobuf.Struct 2, // 1: envoy.config.core.v3.SubstitutionFormatString.text_format_source:type_name -> envoy.config.core.v3.DataSource - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 2: envoy.config.core.v3.SubstitutionFormatString.formatters:type_name -> envoy.config.core.v3.TypedExtensionConfig + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_substitution_format_string_proto_init() } @@ -291,6 +314,7 @@ func file_envoy_config_core_v3_substitution_format_string_proto_init() { return } file_envoy_config_core_v3_base_proto_init() + file_envoy_config_core_v3_extension_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_config_core_v3_substitution_format_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubstitutionFormatString); i { diff --git a/pkg/api/envoy/config/core/v3/substitution_format_string.pb.validate.go b/pkg/api/envoy/config/core/v3/substitution_format_string.pb.validate.go index 3d2b5d9a73..f2e83192bd 100644 --- a/pkg/api/envoy/config/core/v3/substitution_format_string.pb.validate.go +++ b/pkg/api/envoy/config/core/v3/substitution_format_string.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/core/v3/substitution_format_string.proto -package envoy_config_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,70 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SubstitutionFormatString with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SubstitutionFormatString) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubstitutionFormatString with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SubstitutionFormatStringMultiError, or nil if none found. +func (m *SubstitutionFormatString) ValidateAll() error { + return m.validate(true) +} + +func (m *SubstitutionFormatString) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for OmitEmptyValues // no validation rules for ContentType + for idx, item := range m.GetFormatters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubstitutionFormatStringValidationError{ + field: fmt.Sprintf("Formatters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubstitutionFormatStringValidationError{ + field: fmt.Sprintf("Formatters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubstitutionFormatStringValidationError{ + field: fmt.Sprintf("Formatters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + switch m.Format.(type) { case *SubstitutionFormatString_TextFormat: @@ -53,13 +103,36 @@ func (m *SubstitutionFormatString) Validate() error { case *SubstitutionFormatString_JsonFormat: if m.GetJsonFormat() == nil { - return SubstitutionFormatStringValidationError{ + err := SubstitutionFormatStringValidationError{ field: "JsonFormat", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetJsonFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubstitutionFormatStringValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubstitutionFormatStringValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SubstitutionFormatStringValidationError{ field: "JsonFormat", @@ -71,7 +144,26 @@ func (m *SubstitutionFormatString) Validate() error { case *SubstitutionFormatString_TextFormatSource: - if v, ok := interface{}(m.GetTextFormatSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTextFormatSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubstitutionFormatStringValidationError{ + field: "TextFormatSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubstitutionFormatStringValidationError{ + field: "TextFormatSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTextFormatSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SubstitutionFormatStringValidationError{ field: "TextFormatSource", @@ -82,16 +174,41 @@ func (m *SubstitutionFormatString) Validate() error { } default: - return SubstitutionFormatStringValidationError{ + err := SubstitutionFormatStringValidationError{ field: "Format", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return SubstitutionFormatStringMultiError(errors) } return nil } +// SubstitutionFormatStringMultiError is an error wrapping multiple validation +// errors returned by SubstitutionFormatString.ValidateAll() if the designated +// constraints aren't met. +type SubstitutionFormatStringMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubstitutionFormatStringMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubstitutionFormatStringMultiError) AllErrors() []error { return m } + // SubstitutionFormatStringValidationError is the validation error returned by // SubstitutionFormatString.Validate if the designated constraints aren't met. type SubstitutionFormatStringValidationError struct { diff --git a/pkg/api/envoy/config/core/v3/udp_socket_config.pb.go b/pkg/api/envoy/config/core/v3/udp_socket_config.pb.go new file mode 100644 index 0000000000..ba5015d184 --- /dev/null +++ b/pkg/api/envoy/config/core/v3/udp_socket_config.pb.go @@ -0,0 +1,190 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/config/core/v3/udp_socket_config.proto + +package corev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Generic UDP socket configuration. +type UdpSocketConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum size of received UDP datagrams. Using a larger size will cause Envoy to allocate + // more memory per socket. Received datagrams above this size will be dropped. If not set + // defaults to 1500 bytes. + MaxRxDatagramSize *wrappers.UInt64Value `protobuf:"bytes,1,opt,name=max_rx_datagram_size,json=maxRxDatagramSize,proto3" json:"max_rx_datagram_size,omitempty"` + // Configures whether Generic Receive Offload (GRO) + // _ is preferred when reading from the + // UDP socket. The default is context dependent and is documented where UdpSocketConfig is used. + // This option affects performance but not functionality. If GRO is not supported by the operating + // system, non-GRO receive will be used. + PreferGro *wrappers.BoolValue `protobuf:"bytes,2,opt,name=prefer_gro,json=preferGro,proto3" json:"prefer_gro,omitempty"` +} + +func (x *UdpSocketConfig) Reset() { + *x = UdpSocketConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_udp_socket_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UdpSocketConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UdpSocketConfig) ProtoMessage() {} + +func (x *UdpSocketConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_udp_socket_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UdpSocketConfig.ProtoReflect.Descriptor instead. +func (*UdpSocketConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_udp_socket_config_proto_rawDescGZIP(), []int{0} +} + +func (x *UdpSocketConfig) GetMaxRxDatagramSize() *wrappers.UInt64Value { + if x != nil { + return x.MaxRxDatagramSize + } + return nil +} + +func (x *UdpSocketConfig) GetPreferGro() *wrappers.BoolValue { + if x != nil { + return x.PreferGro + } + return nil +} + +var File_envoy_config_core_v3_udp_socket_config_proto protoreflect.FileDescriptor + +var file_envoy_config_core_v3_udp_socket_config_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x01, 0x0a, + 0x0f, 0x55, 0x64, 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x5a, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x78, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x67, + 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, + 0x08, 0x32, 0x06, 0x10, 0x80, 0x80, 0x04, 0x20, 0x00, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x52, 0x78, + 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x39, 0x0a, 0x0a, + 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x42, 0x88, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, + 0x55, 0x64, 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_core_v3_udp_socket_config_proto_rawDescOnce sync.Once + file_envoy_config_core_v3_udp_socket_config_proto_rawDescData = file_envoy_config_core_v3_udp_socket_config_proto_rawDesc +) + +func file_envoy_config_core_v3_udp_socket_config_proto_rawDescGZIP() []byte { + file_envoy_config_core_v3_udp_socket_config_proto_rawDescOnce.Do(func() { + file_envoy_config_core_v3_udp_socket_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_udp_socket_config_proto_rawDescData) + }) + return file_envoy_config_core_v3_udp_socket_config_proto_rawDescData +} + +var file_envoy_config_core_v3_udp_socket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_core_v3_udp_socket_config_proto_goTypes = []interface{}{ + (*UdpSocketConfig)(nil), // 0: envoy.config.core.v3.UdpSocketConfig + (*wrappers.UInt64Value)(nil), // 1: google.protobuf.UInt64Value + (*wrappers.BoolValue)(nil), // 2: google.protobuf.BoolValue +} +var file_envoy_config_core_v3_udp_socket_config_proto_depIdxs = []int32{ + 1, // 0: envoy.config.core.v3.UdpSocketConfig.max_rx_datagram_size:type_name -> google.protobuf.UInt64Value + 2, // 1: envoy.config.core.v3.UdpSocketConfig.prefer_gro:type_name -> google.protobuf.BoolValue + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_config_core_v3_udp_socket_config_proto_init() } +func file_envoy_config_core_v3_udp_socket_config_proto_init() { + if File_envoy_config_core_v3_udp_socket_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_core_v3_udp_socket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UdpSocketConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_core_v3_udp_socket_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_core_v3_udp_socket_config_proto_goTypes, + DependencyIndexes: file_envoy_config_core_v3_udp_socket_config_proto_depIdxs, + MessageInfos: file_envoy_config_core_v3_udp_socket_config_proto_msgTypes, + }.Build() + File_envoy_config_core_v3_udp_socket_config_proto = out.File + file_envoy_config_core_v3_udp_socket_config_proto_rawDesc = nil + file_envoy_config_core_v3_udp_socket_config_proto_goTypes = nil + file_envoy_config_core_v3_udp_socket_config_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/config/core/v3/udp_socket_config.pb.validate.go b/pkg/api/envoy/config/core/v3/udp_socket_config.pb.validate.go new file mode 100644 index 0000000000..f0c17960d1 --- /dev/null +++ b/pkg/api/envoy/config/core/v3/udp_socket_config.pb.validate.go @@ -0,0 +1,180 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/core/v3/udp_socket_config.proto + +package corev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UdpSocketConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *UdpSocketConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpSocketConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UdpSocketConfigMultiError, or nil if none found. +func (m *UdpSocketConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpSocketConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetMaxRxDatagramSize(); wrapper != nil { + + if val := wrapper.GetValue(); val <= 0 || val >= 65536 { + err := UdpSocketConfigValidationError{ + field: "MaxRxDatagramSize", + reason: "value must be inside range (0, 65536)", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetPreferGro()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpSocketConfigValidationError{ + field: "PreferGro", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpSocketConfigValidationError{ + field: "PreferGro", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPreferGro()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpSocketConfigValidationError{ + field: "PreferGro", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UdpSocketConfigMultiError(errors) + } + + return nil +} + +// UdpSocketConfigMultiError is an error wrapping multiple validation errors +// returned by UdpSocketConfig.ValidateAll() if the designated constraints +// aren't met. +type UdpSocketConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpSocketConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpSocketConfigMultiError) AllErrors() []error { return m } + +// UdpSocketConfigValidationError is the validation error returned by +// UdpSocketConfig.Validate if the designated constraints aren't met. +type UdpSocketConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UdpSocketConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UdpSocketConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UdpSocketConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UdpSocketConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UdpSocketConfigValidationError) ErrorName() string { return "UdpSocketConfigValidationError" } + +// Error satisfies the builtin error interface +func (e UdpSocketConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUdpSocketConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UdpSocketConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UdpSocketConfigValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/address.pb.go b/pkg/api/envoy/config/core/v4alpha/address.pb.go deleted file mode 100644 index 022584cbb6..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/address.pb.go +++ /dev/null @@ -1,943 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/address.proto - -package envoy_config_core_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type SocketAddress_Protocol int32 - -const ( - SocketAddress_TCP SocketAddress_Protocol = 0 - SocketAddress_UDP SocketAddress_Protocol = 1 -) - -// Enum value maps for SocketAddress_Protocol. -var ( - SocketAddress_Protocol_name = map[int32]string{ - 0: "TCP", - 1: "UDP", - } - SocketAddress_Protocol_value = map[string]int32{ - "TCP": 0, - "UDP": 1, - } -) - -func (x SocketAddress_Protocol) Enum() *SocketAddress_Protocol { - p := new(SocketAddress_Protocol) - *p = x - return p -} - -func (x SocketAddress_Protocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SocketAddress_Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_address_proto_enumTypes[0].Descriptor() -} - -func (SocketAddress_Protocol) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_address_proto_enumTypes[0] -} - -func (x SocketAddress_Protocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SocketAddress_Protocol.Descriptor instead. -func (SocketAddress_Protocol) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{2, 0} -} - -type Pipe struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Unix Domain Socket path. On Linux, paths starting with '@' will use the - // abstract namespace. The starting '@' is replaced by a null byte by Envoy. - // Paths starting with '@' will result in an error in environments other than - // Linux. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // The mode for the Pipe. Not applicable for abstract sockets. - Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"` -} - -func (x *Pipe) Reset() { - *x = Pipe{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Pipe) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pipe) ProtoMessage() {} - -func (x *Pipe) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Pipe.ProtoReflect.Descriptor instead. -func (*Pipe) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{0} -} - -func (x *Pipe) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Pipe) GetMode() uint32 { - if x != nil { - return x.Mode - } - return 0 -} - -// [#not-implemented-hide:] The address represents an envoy internal listener. -// TODO(lambdai): Make this address available for listener and endpoint. -// TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30. -type EnvoyInternalAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to AddressNameSpecifier: - // *EnvoyInternalAddress_ServerListenerName - AddressNameSpecifier isEnvoyInternalAddress_AddressNameSpecifier `protobuf_oneof:"address_name_specifier"` -} - -func (x *EnvoyInternalAddress) Reset() { - *x = EnvoyInternalAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnvoyInternalAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnvoyInternalAddress) ProtoMessage() {} - -func (x *EnvoyInternalAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnvoyInternalAddress.ProtoReflect.Descriptor instead. -func (*EnvoyInternalAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{1} -} - -func (m *EnvoyInternalAddress) GetAddressNameSpecifier() isEnvoyInternalAddress_AddressNameSpecifier { - if m != nil { - return m.AddressNameSpecifier - } - return nil -} - -func (x *EnvoyInternalAddress) GetServerListenerName() string { - if x, ok := x.GetAddressNameSpecifier().(*EnvoyInternalAddress_ServerListenerName); ok { - return x.ServerListenerName - } - return "" -} - -type isEnvoyInternalAddress_AddressNameSpecifier interface { - isEnvoyInternalAddress_AddressNameSpecifier() -} - -type EnvoyInternalAddress_ServerListenerName struct { - // [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. - ServerListenerName string `protobuf:"bytes,1,opt,name=server_listener_name,json=serverListenerName,proto3,oneof"` -} - -func (*EnvoyInternalAddress_ServerListenerName) isEnvoyInternalAddress_AddressNameSpecifier() {} - -// [#next-free-field: 7] -type SocketAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Protocol SocketAddress_Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=envoy.config.core.v4alpha.SocketAddress_Protocol" json:"protocol,omitempty"` - // The address for this socket. :ref:`Listeners ` will bind - // to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` - // to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: - // It is possible to distinguish a Listener address via the prefix/suffix matching - // in :ref:`FilterChainMatch `.] When used - // within an upstream :ref:`BindConfig `, the address - // controls the source address of outbound connections. For :ref:`clusters - // `, the cluster type determines whether the - // address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS - // (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized - // via :ref:`resolver_name `. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // Types that are assignable to PortSpecifier: - // *SocketAddress_PortValue - // *SocketAddress_NamedPort - PortSpecifier isSocketAddress_PortSpecifier `protobuf_oneof:"port_specifier"` - // The name of the custom resolver. This must have been registered with Envoy. If - // this is empty, a context dependent default applies. If the address is a concrete - // IP address, no resolution will occur. If address is a hostname this - // should be set for resolution other than DNS. Specifying a custom resolver with - // *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime. - ResolverName string `protobuf:"bytes,5,opt,name=resolver_name,json=resolverName,proto3" json:"resolver_name,omitempty"` - // When binding to an IPv6 address above, this enables `IPv4 compatibility - // `_. Binding to ``::`` will - // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into - // IPv6 space as ``::FFFF:``. - Ipv4Compat bool `protobuf:"varint,6,opt,name=ipv4_compat,json=ipv4Compat,proto3" json:"ipv4_compat,omitempty"` -} - -func (x *SocketAddress) Reset() { - *x = SocketAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SocketAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SocketAddress) ProtoMessage() {} - -func (x *SocketAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SocketAddress.ProtoReflect.Descriptor instead. -func (*SocketAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{2} -} - -func (x *SocketAddress) GetProtocol() SocketAddress_Protocol { - if x != nil { - return x.Protocol - } - return SocketAddress_TCP -} - -func (x *SocketAddress) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (m *SocketAddress) GetPortSpecifier() isSocketAddress_PortSpecifier { - if m != nil { - return m.PortSpecifier - } - return nil -} - -func (x *SocketAddress) GetPortValue() uint32 { - if x, ok := x.GetPortSpecifier().(*SocketAddress_PortValue); ok { - return x.PortValue - } - return 0 -} - -func (x *SocketAddress) GetNamedPort() string { - if x, ok := x.GetPortSpecifier().(*SocketAddress_NamedPort); ok { - return x.NamedPort - } - return "" -} - -func (x *SocketAddress) GetResolverName() string { - if x != nil { - return x.ResolverName - } - return "" -} - -func (x *SocketAddress) GetIpv4Compat() bool { - if x != nil { - return x.Ipv4Compat - } - return false -} - -type isSocketAddress_PortSpecifier interface { - isSocketAddress_PortSpecifier() -} - -type SocketAddress_PortValue struct { - PortValue uint32 `protobuf:"varint,3,opt,name=port_value,json=portValue,proto3,oneof"` -} - -type SocketAddress_NamedPort struct { - // This is only valid if :ref:`resolver_name - // ` is specified below and the - // named resolver is capable of named port resolution. - NamedPort string `protobuf:"bytes,4,opt,name=named_port,json=namedPort,proto3,oneof"` -} - -func (*SocketAddress_PortValue) isSocketAddress_PortSpecifier() {} - -func (*SocketAddress_NamedPort) isSocketAddress_PortSpecifier() {} - -type TcpKeepalive struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum number of keepalive probes to send without response before deciding - // the connection is dead. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 9.) - KeepaliveProbes *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=keepalive_probes,json=keepaliveProbes,proto3" json:"keepalive_probes,omitempty"` - // The number of seconds a connection needs to be idle before keep-alive probes - // start being sent. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 7200s (i.e., 2 hours.) - KeepaliveTime *wrappers.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 *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=keepalive_interval,json=keepaliveInterval,proto3" json:"keepalive_interval,omitempty"` -} - -func (x *TcpKeepalive) Reset() { - *x = TcpKeepalive{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpKeepalive) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpKeepalive) ProtoMessage() {} - -func (x *TcpKeepalive) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpKeepalive.ProtoReflect.Descriptor instead. -func (*TcpKeepalive) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{3} -} - -func (x *TcpKeepalive) GetKeepaliveProbes() *wrappers.UInt32Value { - if x != nil { - return x.KeepaliveProbes - } - return nil -} - -func (x *TcpKeepalive) GetKeepaliveTime() *wrappers.UInt32Value { - if x != nil { - return x.KeepaliveTime - } - return nil -} - -func (x *TcpKeepalive) GetKeepaliveInterval() *wrappers.UInt32Value { - if x != nil { - return x.KeepaliveInterval - } - return nil -} - -type BindConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address to bind to when creating a socket. - SourceAddress *SocketAddress `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` - // Whether to set the *IP_FREEBIND* option when creating the socket. When this - // flag is set to true, allows the :ref:`source_address - // ` to be an IP address - // that is not configured on the system running Envoy. When this flag is set - // to false, the option *IP_FREEBIND* is disabled on the socket. When this - // flag is not set (default), the socket is not modified, i.e. the option is - // neither enabled nor disabled. - Freebind *wrappers.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"` -} - -func (x *BindConfig) Reset() { - *x = BindConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BindConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BindConfig) ProtoMessage() {} - -func (x *BindConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BindConfig.ProtoReflect.Descriptor instead. -func (*BindConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{4} -} - -func (x *BindConfig) GetSourceAddress() *SocketAddress { - if x != nil { - return x.SourceAddress - } - return nil -} - -func (x *BindConfig) GetFreebind() *wrappers.BoolValue { - if x != nil { - return x.Freebind - } - return nil -} - -func (x *BindConfig) GetSocketOptions() []*SocketOption { - if x != nil { - return x.SocketOptions - } - return nil -} - -// Addresses specify either a logical or physical address and port, which are -// used to tell Envoy where to bind/listen, connect to upstream and find -// management servers. -type Address struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Address: - // *Address_SocketAddress - // *Address_Pipe - // *Address_EnvoyInternalAddress - Address isAddress_Address `protobuf_oneof:"address"` -} - -func (x *Address) Reset() { - *x = Address{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Address) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Address) ProtoMessage() {} - -func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Address.ProtoReflect.Descriptor instead. -func (*Address) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{5} -} - -func (m *Address) GetAddress() isAddress_Address { - if m != nil { - return m.Address - } - return nil -} - -func (x *Address) GetSocketAddress() *SocketAddress { - if x, ok := x.GetAddress().(*Address_SocketAddress); ok { - return x.SocketAddress - } - return nil -} - -func (x *Address) GetPipe() *Pipe { - if x, ok := x.GetAddress().(*Address_Pipe); ok { - return x.Pipe - } - return nil -} - -func (x *Address) GetEnvoyInternalAddress() *EnvoyInternalAddress { - if x, ok := x.GetAddress().(*Address_EnvoyInternalAddress); ok { - return x.EnvoyInternalAddress - } - return nil -} - -type isAddress_Address interface { - isAddress_Address() -} - -type Address_SocketAddress struct { - SocketAddress *SocketAddress `protobuf:"bytes,1,opt,name=socket_address,json=socketAddress,proto3,oneof"` -} - -type Address_Pipe struct { - Pipe *Pipe `protobuf:"bytes,2,opt,name=pipe,proto3,oneof"` -} - -type Address_EnvoyInternalAddress struct { - // [#not-implemented-hide:] - EnvoyInternalAddress *EnvoyInternalAddress `protobuf:"bytes,3,opt,name=envoy_internal_address,json=envoyInternalAddress,proto3,oneof"` -} - -func (*Address_SocketAddress) isAddress_Address() {} - -func (*Address_Pipe) isAddress_Address() {} - -func (*Address_EnvoyInternalAddress) isAddress_Address() {} - -// CidrRange specifies an IP Address and a prefix length to construct -// the subnet mask for a `CIDR `_ range. -type CidrRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. - AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` - // Length of prefix, e.g. 0, 32. - PrefixLen *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` -} - -func (x *CidrRange) Reset() { - *x = CidrRange{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CidrRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CidrRange) ProtoMessage() {} - -func (x *CidrRange) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_address_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CidrRange.ProtoReflect.Descriptor instead. -func (*CidrRange) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_address_proto_rawDescGZIP(), []int{6} -} - -func (x *CidrRange) GetAddressPrefix() string { - if x != nil { - return x.AddressPrefix - } - return "" -} - -func (x *CidrRange) GetPrefixLen() *wrappers.UInt32Value { - if x != nil { - return x.PrefixLen - } - return nil -} - -var File_envoy_config_core_v4alpha_address_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_address_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, - 0x0a, 0x04, 0x50, 0x69, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0xff, 0x03, 0x52, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x14, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x14, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x42, 0x1d, 0x0a, 0x16, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x22, 0xfe, 0x02, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x57, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x21, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x2a, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x48, 0x00, - 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, - 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x34, 0x43, 0x6f, 0x6d, 0x70, - 0x61, 0x74, 0x22, 0x1c, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x07, - 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x01, - 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x15, 0x0a, 0x0e, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x22, 0x93, 0x02, 0x0a, 0x0c, 0x54, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, - 0x69, 0x76, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x6b, 0x65, 0x65, - 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0e, - 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0d, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x4b, 0x0a, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x6b, 0x65, 0x65, - 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x28, - 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x4b, - 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x0a, 0x42, 0x69, 0x6e, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x4e, 0x0a, 0x0e, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, - 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0xb1, 0x02, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x51, - 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x35, 0x0a, 0x04, 0x70, 0x69, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x69, 0x70, 0x65, - 0x48, 0x00, 0x52, 0x04, 0x70, 0x69, 0x70, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x14, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0e, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xa9, 0x01, 0x0a, 0x09, 0x43, 0x69, 0x64, 0x72, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0x80, 0x01, - 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x3a, 0x25, 0x9a, 0xc5, 0x88, - 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x42, 0x41, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_address_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_address_proto_rawDescData = file_envoy_config_core_v4alpha_address_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_address_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_address_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_address_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_address_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_address_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v4alpha_address_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_config_core_v4alpha_address_proto_goTypes = []interface{}{ - (SocketAddress_Protocol)(0), // 0: envoy.config.core.v4alpha.SocketAddress.Protocol - (*Pipe)(nil), // 1: envoy.config.core.v4alpha.Pipe - (*EnvoyInternalAddress)(nil), // 2: envoy.config.core.v4alpha.EnvoyInternalAddress - (*SocketAddress)(nil), // 3: envoy.config.core.v4alpha.SocketAddress - (*TcpKeepalive)(nil), // 4: envoy.config.core.v4alpha.TcpKeepalive - (*BindConfig)(nil), // 5: envoy.config.core.v4alpha.BindConfig - (*Address)(nil), // 6: envoy.config.core.v4alpha.Address - (*CidrRange)(nil), // 7: envoy.config.core.v4alpha.CidrRange - (*wrappers.UInt32Value)(nil), // 8: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 9: google.protobuf.BoolValue - (*SocketOption)(nil), // 10: envoy.config.core.v4alpha.SocketOption -} -var file_envoy_config_core_v4alpha_address_proto_depIdxs = []int32{ - 0, // 0: envoy.config.core.v4alpha.SocketAddress.protocol:type_name -> envoy.config.core.v4alpha.SocketAddress.Protocol - 8, // 1: envoy.config.core.v4alpha.TcpKeepalive.keepalive_probes:type_name -> google.protobuf.UInt32Value - 8, // 2: envoy.config.core.v4alpha.TcpKeepalive.keepalive_time:type_name -> google.protobuf.UInt32Value - 8, // 3: envoy.config.core.v4alpha.TcpKeepalive.keepalive_interval:type_name -> google.protobuf.UInt32Value - 3, // 4: envoy.config.core.v4alpha.BindConfig.source_address:type_name -> envoy.config.core.v4alpha.SocketAddress - 9, // 5: envoy.config.core.v4alpha.BindConfig.freebind:type_name -> google.protobuf.BoolValue - 10, // 6: envoy.config.core.v4alpha.BindConfig.socket_options:type_name -> envoy.config.core.v4alpha.SocketOption - 3, // 7: envoy.config.core.v4alpha.Address.socket_address:type_name -> envoy.config.core.v4alpha.SocketAddress - 1, // 8: envoy.config.core.v4alpha.Address.pipe:type_name -> envoy.config.core.v4alpha.Pipe - 2, // 9: envoy.config.core.v4alpha.Address.envoy_internal_address:type_name -> envoy.config.core.v4alpha.EnvoyInternalAddress - 8, // 10: envoy.config.core.v4alpha.CidrRange.prefix_len:type_name -> google.protobuf.UInt32Value - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_address_proto_init() } -func file_envoy_config_core_v4alpha_address_proto_init() { - if File_envoy_config_core_v4alpha_address_proto != nil { - return - } - file_envoy_config_core_v4alpha_socket_option_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pipe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnvoyInternalAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SocketAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpKeepalive); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BindConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CidrRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*EnvoyInternalAddress_ServerListenerName)(nil), - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*SocketAddress_PortValue)(nil), - (*SocketAddress_NamedPort)(nil), - } - file_envoy_config_core_v4alpha_address_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*Address_SocketAddress)(nil), - (*Address_Pipe)(nil), - (*Address_EnvoyInternalAddress)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_address_proto_rawDesc, - NumEnums: 1, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_address_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_address_proto_depIdxs, - EnumInfos: file_envoy_config_core_v4alpha_address_proto_enumTypes, - MessageInfos: file_envoy_config_core_v4alpha_address_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_address_proto = out.File - file_envoy_config_core_v4alpha_address_proto_rawDesc = nil - file_envoy_config_core_v4alpha_address_proto_goTypes = nil - file_envoy_config_core_v4alpha_address_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/address.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/address.pb.validate.go deleted file mode 100644 index 6af41c3d5e..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/address.pb.validate.go +++ /dev/null @@ -1,690 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/address.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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 { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetPath()) < 1 { - return PipeValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - } - - if m.GetMode() > 511 { - return PipeValidationError{ - field: "Mode", - reason: "value must be less than or equal to 511", - } - } - - return nil -} - -// PipeValidationError is the validation error returned by Pipe.Validate if the -// designated constraints aren't met. -type PipeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PipeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PipeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PipeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PipeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PipeValidationError) ErrorName() string { return "PipeValidationError" } - -// Error satisfies the builtin error interface -func (e PipeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPipe.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PipeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PipeValidationError{} - -// Validate checks the field values on EnvoyInternalAddress with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *EnvoyInternalAddress) Validate() error { - if m == nil { - return nil - } - - switch m.AddressNameSpecifier.(type) { - - case *EnvoyInternalAddress_ServerListenerName: - // no validation rules for ServerListenerName - - default: - return EnvoyInternalAddressValidationError{ - field: "AddressNameSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// EnvoyInternalAddressValidationError is the validation error returned by -// EnvoyInternalAddress.Validate if the designated constraints aren't met. -type EnvoyInternalAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EnvoyInternalAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EnvoyInternalAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EnvoyInternalAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EnvoyInternalAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EnvoyInternalAddressValidationError) ErrorName() string { - return "EnvoyInternalAddressValidationError" -} - -// Error satisfies the builtin error interface -func (e EnvoyInternalAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEnvoyInternalAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EnvoyInternalAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EnvoyInternalAddressValidationError{} - -// Validate checks the field values on SocketAddress with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *SocketAddress) Validate() error { - if m == nil { - return nil - } - - if _, ok := SocketAddress_Protocol_name[int32(m.GetProtocol())]; !ok { - return SocketAddressValidationError{ - field: "Protocol", - reason: "value must be one of the defined enum values", - } - } - - if utf8.RuneCountInString(m.GetAddress()) < 1 { - return SocketAddressValidationError{ - field: "Address", - reason: "value length must be at least 1 runes", - } - } - - // no validation rules for ResolverName - - // no validation rules for Ipv4Compat - - switch m.PortSpecifier.(type) { - - case *SocketAddress_PortValue: - - if m.GetPortValue() > 65535 { - return SocketAddressValidationError{ - field: "PortValue", - reason: "value must be less than or equal to 65535", - } - } - - case *SocketAddress_NamedPort: - // no validation rules for NamedPort - - default: - return SocketAddressValidationError{ - field: "PortSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// SocketAddressValidationError is the validation error returned by -// SocketAddress.Validate if the designated constraints aren't met. -type SocketAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SocketAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SocketAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SocketAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SocketAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SocketAddressValidationError) ErrorName() string { return "SocketAddressValidationError" } - -// Error satisfies the builtin error interface -func (e SocketAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSocketAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SocketAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SocketAddressValidationError{} - -// Validate checks the field values on TcpKeepalive with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *TcpKeepalive) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetKeepaliveProbes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveProbes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetKeepaliveTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if 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, - } - } - } - - return nil -} - -// TcpKeepaliveValidationError is the validation error returned by -// TcpKeepalive.Validate if the designated constraints aren't met. -type TcpKeepaliveValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpKeepaliveValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpKeepaliveValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpKeepaliveValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpKeepaliveValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpKeepaliveValidationError) ErrorName() string { return "TcpKeepaliveValidationError" } - -// Error satisfies the builtin error interface -func (e TcpKeepaliveValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTcpKeepalive.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpKeepaliveValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpKeepaliveValidationError{} - -// Validate checks the field values on BindConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *BindConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetSourceAddress() == nil { - return BindConfigValidationError{ - field: "SourceAddress", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetSocketOptions() { - _, _ = idx, item - - if 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, - } - } - } - - } - - return nil -} - -// BindConfigValidationError is the validation error returned by -// BindConfig.Validate if the designated constraints aren't met. -type BindConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BindConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BindConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BindConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BindConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BindConfigValidationError) ErrorName() string { return "BindConfigValidationError" } - -// Error satisfies the builtin error interface -func (e BindConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBindConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BindConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BindConfigValidationError{} - -// Validate checks the field values on Address with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Address) Validate() error { - if m == nil { - return nil - } - - switch m.Address.(type) { - - case *Address_SocketAddress: - - if v, ok := interface{}(m.GetSocketAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "SocketAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Address_Pipe: - - if v, ok := interface{}(m.GetPipe()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "Pipe", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Address_EnvoyInternalAddress: - - if v, ok := interface{}(m.GetEnvoyInternalAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "EnvoyInternalAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return AddressValidationError{ - field: "Address", - reason: "value is required", - } - - } - - return nil -} - -// AddressValidationError is the validation error returned by Address.Validate -// if the designated constraints aren't met. -type AddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AddressValidationError) ErrorName() string { return "AddressValidationError" } - -// Error satisfies the builtin error interface -func (e AddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AddressValidationError{} - -// Validate checks the field values on CidrRange with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *CidrRange) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetAddressPrefix()) < 1 { - return CidrRangeValidationError{ - field: "AddressPrefix", - reason: "value length must be at least 1 runes", - } - } - - if wrapper := m.GetPrefixLen(); wrapper != nil { - - if wrapper.GetValue() > 128 { - return CidrRangeValidationError{ - field: "PrefixLen", - reason: "value must be less than or equal to 128", - } - } - - } - - return nil -} - -// CidrRangeValidationError is the validation error returned by -// CidrRange.Validate if the designated constraints aren't met. -type CidrRangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CidrRangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CidrRangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CidrRangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CidrRangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CidrRangeValidationError) ErrorName() string { return "CidrRangeValidationError" } - -// Error satisfies the builtin error interface -func (e CidrRangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCidrRange.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CidrRangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CidrRangeValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/backoff.pb.go b/pkg/api/envoy/config/core/v4alpha/backoff.pb.go deleted file mode 100644 index 4c0bd8b92b..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/backoff.pb.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/backoff.proto - -package envoy_config_core_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration defining a jittered exponential back off strategy. -type BackoffStrategy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The base interval to be used for the next back off computation. It should - // be greater than zero and less than or equal to :ref:`max_interval - // `. - BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` - // Specifies the maximum interval between retries. This parameter is optional, - // but must be greater than or equal to the :ref:`base_interval - // ` if set. The default - // is 10 times the :ref:`base_interval - // `. - MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *BackoffStrategy) Reset() { - *x = BackoffStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_backoff_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BackoffStrategy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackoffStrategy) ProtoMessage() {} - -func (x *BackoffStrategy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_backoff_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackoffStrategy.ProtoReflect.Descriptor instead. -func (*BackoffStrategy) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_backoff_proto_rawDescGZIP(), []int{0} -} - -func (x *BackoffStrategy) GetBaseInterval() *duration.Duration { - if x != nil { - return x.BaseInterval - } - return nil -} - -func (x *BackoffStrategy) GetMaxInterval() *duration.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -var File_envoy_config_core_v4alpha_backoff_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_backoff_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x6f, 0x66, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xd6, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x53, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x32, - 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, - 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, - 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x41, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_backoff_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_backoff_proto_rawDescData = file_envoy_config_core_v4alpha_backoff_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_backoff_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_backoff_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_backoff_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_backoff_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_backoff_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_backoff_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v4alpha_backoff_proto_goTypes = []interface{}{ - (*BackoffStrategy)(nil), // 0: envoy.config.core.v4alpha.BackoffStrategy - (*duration.Duration)(nil), // 1: google.protobuf.Duration -} -var file_envoy_config_core_v4alpha_backoff_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v4alpha.BackoffStrategy.base_interval:type_name -> google.protobuf.Duration - 1, // 1: envoy.config.core.v4alpha.BackoffStrategy.max_interval:type_name -> google.protobuf.Duration - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_backoff_proto_init() } -func file_envoy_config_core_v4alpha_backoff_proto_init() { - if File_envoy_config_core_v4alpha_backoff_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_backoff_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackoffStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_backoff_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_backoff_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_backoff_proto_depIdxs, - MessageInfos: file_envoy_config_core_v4alpha_backoff_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_backoff_proto = out.File - file_envoy_config_core_v4alpha_backoff_proto_rawDesc = nil - file_envoy_config_core_v4alpha_backoff_proto_goTypes = nil - file_envoy_config_core_v4alpha_backoff_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/backoff.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/backoff.pb.validate.go deleted file mode 100644 index 2bd8f0a61b..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/backoff.pb.validate.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/backoff.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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/pkg/api/envoy/config/core/v4alpha/base.pb.go b/pkg/api/envoy/config/core/v4alpha/base.pb.go deleted file mode 100644 index 548d5c5f7e..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/base.pb.go +++ /dev/null @@ -1,2332 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/base.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Envoy supports :ref:`upstream priority routing -// ` both at the route and the virtual -// cluster level. The current priority implementation uses different connection -// pool and circuit breaking settings for each priority level. This means that -// even for HTTP/2 requests, two physical connections will be used to an -// upstream host. In the future Envoy will likely support true HTTP/2 priority -// over a single upstream connection. -type RoutingPriority int32 - -const ( - RoutingPriority_DEFAULT RoutingPriority = 0 - RoutingPriority_HIGH RoutingPriority = 1 -) - -// Enum value maps for RoutingPriority. -var ( - RoutingPriority_name = map[int32]string{ - 0: "DEFAULT", - 1: "HIGH", - } - RoutingPriority_value = map[string]int32{ - "DEFAULT": 0, - "HIGH": 1, - } -) - -func (x RoutingPriority) Enum() *RoutingPriority { - p := new(RoutingPriority) - *p = x - return p -} - -func (x RoutingPriority) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RoutingPriority) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_base_proto_enumTypes[0].Descriptor() -} - -func (RoutingPriority) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_base_proto_enumTypes[0] -} - -func (x RoutingPriority) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RoutingPriority.Descriptor instead. -func (RoutingPriority) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{0} -} - -// HTTP request method. -type RequestMethod int32 - -const ( - RequestMethod_METHOD_UNSPECIFIED RequestMethod = 0 - RequestMethod_GET RequestMethod = 1 - RequestMethod_HEAD RequestMethod = 2 - RequestMethod_POST RequestMethod = 3 - RequestMethod_PUT RequestMethod = 4 - RequestMethod_DELETE RequestMethod = 5 - RequestMethod_CONNECT RequestMethod = 6 - RequestMethod_OPTIONS RequestMethod = 7 - RequestMethod_TRACE RequestMethod = 8 - RequestMethod_PATCH RequestMethod = 9 -) - -// Enum value maps for RequestMethod. -var ( - RequestMethod_name = map[int32]string{ - 0: "METHOD_UNSPECIFIED", - 1: "GET", - 2: "HEAD", - 3: "POST", - 4: "PUT", - 5: "DELETE", - 6: "CONNECT", - 7: "OPTIONS", - 8: "TRACE", - 9: "PATCH", - } - RequestMethod_value = map[string]int32{ - "METHOD_UNSPECIFIED": 0, - "GET": 1, - "HEAD": 2, - "POST": 3, - "PUT": 4, - "DELETE": 5, - "CONNECT": 6, - "OPTIONS": 7, - "TRACE": 8, - "PATCH": 9, - } -) - -func (x RequestMethod) Enum() *RequestMethod { - p := new(RequestMethod) - *p = x - return p -} - -func (x RequestMethod) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RequestMethod) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_base_proto_enumTypes[1].Descriptor() -} - -func (RequestMethod) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_base_proto_enumTypes[1] -} - -func (x RequestMethod) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RequestMethod.Descriptor instead. -func (RequestMethod) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{1} -} - -// Identifies the direction of the traffic relative to the local Envoy. -type TrafficDirection int32 - -const ( - // Default option is unspecified. - TrafficDirection_UNSPECIFIED TrafficDirection = 0 - // The transport is used for incoming traffic. - TrafficDirection_INBOUND TrafficDirection = 1 - // The transport is used for outgoing traffic. - TrafficDirection_OUTBOUND TrafficDirection = 2 -) - -// Enum value maps for TrafficDirection. -var ( - TrafficDirection_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "INBOUND", - 2: "OUTBOUND", - } - TrafficDirection_value = map[string]int32{ - "UNSPECIFIED": 0, - "INBOUND": 1, - "OUTBOUND": 2, - } -) - -func (x TrafficDirection) Enum() *TrafficDirection { - p := new(TrafficDirection) - *p = x - return p -} - -func (x TrafficDirection) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TrafficDirection) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_base_proto_enumTypes[2].Descriptor() -} - -func (TrafficDirection) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_base_proto_enumTypes[2] -} - -func (x TrafficDirection) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TrafficDirection.Descriptor instead. -func (TrafficDirection) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{2} -} - -// Identifies location of where either Envoy runs or where upstream hosts run. -type Locality struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Region this :ref:`zone ` belongs to. - Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` - // Defines the local service zone where Envoy is running. Though optional, it - // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, - // either in this message or via :option:`--service-zone`. The meaning of zone - // is context dependent, e.g. `Availability Zone (AZ) - // `_ - // on AWS, `Zone `_ on - // GCP, etc. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // When used for locality of upstream hosts, this field further splits zone - // into smaller chunks of sub-zones so they can be load balanced - // independently. - SubZone string `protobuf:"bytes,3,opt,name=sub_zone,json=subZone,proto3" json:"sub_zone,omitempty"` -} - -func (x *Locality) Reset() { - *x = Locality{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Locality) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Locality) ProtoMessage() {} - -func (x *Locality) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Locality.ProtoReflect.Descriptor instead. -func (*Locality) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{0} -} - -func (x *Locality) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *Locality) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *Locality) GetSubZone() string { - if x != nil { - return x.SubZone - } - return "" -} - -// BuildVersion combines SemVer version of extension with free-form build information -// (i.e. 'alpha', 'private-build') as a set of strings. -type BuildVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // SemVer version of extension. - Version *v3.SemanticVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Free-form build information. - // Envoy defines several well known keys in the source/common/version/version.h file - Metadata *_struct.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *BuildVersion) Reset() { - *x = BuildVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuildVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuildVersion) ProtoMessage() {} - -func (x *BuildVersion) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BuildVersion.ProtoReflect.Descriptor instead. -func (*BuildVersion) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{1} -} - -func (x *BuildVersion) GetVersion() *v3.SemanticVersion { - if x != nil { - return x.Version - } - return nil -} - -func (x *BuildVersion) GetMetadata() *_struct.Struct { - if x != nil { - return x.Metadata - } - return nil -} - -// Version and identification for an Envoy extension. -// [#next-free-field: 6] -type Extension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This is the name of the Envoy filter as specified in the Envoy - // configuration, e.g. envoy.filters.http.router, com.acme.widget. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Category of the extension. - // Extension category names use reverse DNS notation. For instance "envoy.filters.listener" - // for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from - // acme.com vendor. - // [#comment:TODO(yanavlasov): Link to the doc with existing envoy category names.] - Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` - // [#not-implemented-hide:] Type descriptor of extension configuration proto. - // [#comment:TODO(yanavlasov): Link to the doc with existing configuration protos.] - // [#comment:TODO(yanavlasov): Add tests when PR #9391 lands.] - TypeDescriptor string `protobuf:"bytes,3,opt,name=type_descriptor,json=typeDescriptor,proto3" json:"type_descriptor,omitempty"` - // The version is a property of the extension and maintained independently - // of other extensions and the Envoy API. - // This field is not set when extension did not provide version information. - Version *BuildVersion `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - // Indicates that the extension is present but was disabled via dynamic configuration. - Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"` -} - -func (x *Extension) Reset() { - *x = Extension{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Extension) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Extension) ProtoMessage() {} - -func (x *Extension) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Extension.ProtoReflect.Descriptor instead. -func (*Extension) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{2} -} - -func (x *Extension) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Extension) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *Extension) GetTypeDescriptor() string { - if x != nil { - return x.TypeDescriptor - } - return "" -} - -func (x *Extension) GetVersion() *BuildVersion { - if x != nil { - return x.Version - } - return nil -} - -func (x *Extension) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// Identifies a specific Envoy instance. The node identifier is presented to the -// management server, which may use this identifier to distinguish per Envoy -// configuration for serving. -// [#next-free-field: 12] -type Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An opaque node identifier for the Envoy node. This also provides the local - // service node name. It should be set if any of the following features are - // used: :ref:`statsd `, :ref:`CDS - // `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-node`. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Defines the local service cluster name where Envoy is running. Though - // optional, it should be set if any of the following features are used: - // :ref:`statsd `, :ref:`health check cluster - // verification - // `, - // :ref:`runtime override directory `, - // :ref:`user agent addition - // `, - // :ref:`HTTP global rate limiting `, - // :ref:`CDS `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-cluster`. - Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` - // Opaque metadata extending the node identifier. Envoy will pass this - // directly to the management server. - Metadata *_struct.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"` - // Free-form string that identifies the entity requesting config. - // E.g. "envoy" or "grpc" - UserAgentName string `protobuf:"bytes,6,opt,name=user_agent_name,json=userAgentName,proto3" json:"user_agent_name,omitempty"` - // Types that are assignable to UserAgentVersionType: - // *Node_UserAgentVersion - // *Node_UserAgentBuildVersion - UserAgentVersionType isNode_UserAgentVersionType `protobuf_oneof:"user_agent_version_type"` - // List of extensions and their versions supported by the node. - Extensions []*Extension `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty"` - // Client feature support list. These are well known features described - // in the Envoy API repository for a given major version of an API. Client features - // use reverse DNS naming scheme, for example `com.acme.feature`. - // See :ref:`the list of features ` that xDS client may - // support. - ClientFeatures []string `protobuf:"bytes,10,rep,name=client_features,json=clientFeatures,proto3" json:"client_features,omitempty"` - // Known listening ports on the node as a generic hint to the management server - // for filtering :ref:`listeners ` to be returned. For example, - // if there is a listener bound to port 80, the list can optionally contain the - // SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedListeningAddresses []*Address `protobuf:"bytes,11,rep,name=hidden_envoy_deprecated_listening_addresses,json=hiddenEnvoyDeprecatedListeningAddresses,proto3" json:"hidden_envoy_deprecated_listening_addresses,omitempty"` -} - -func (x *Node) Reset() { - *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Node) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Node) ProtoMessage() {} - -func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Node.ProtoReflect.Descriptor instead. -func (*Node) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{3} -} - -func (x *Node) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Node) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *Node) GetMetadata() *_struct.Struct { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Node) GetLocality() *Locality { - if x != nil { - return x.Locality - } - return nil -} - -func (x *Node) GetUserAgentName() string { - if x != nil { - return x.UserAgentName - } - return "" -} - -func (m *Node) GetUserAgentVersionType() isNode_UserAgentVersionType { - if m != nil { - return m.UserAgentVersionType - } - return nil -} - -func (x *Node) GetUserAgentVersion() string { - if x, ok := x.GetUserAgentVersionType().(*Node_UserAgentVersion); ok { - return x.UserAgentVersion - } - return "" -} - -func (x *Node) GetUserAgentBuildVersion() *BuildVersion { - if x, ok := x.GetUserAgentVersionType().(*Node_UserAgentBuildVersion); ok { - return x.UserAgentBuildVersion - } - return nil -} - -func (x *Node) GetExtensions() []*Extension { - if x != nil { - return x.Extensions - } - return nil -} - -func (x *Node) GetClientFeatures() []string { - if x != nil { - return x.ClientFeatures - } - return nil -} - -// Deprecated: Do not use. -func (x *Node) GetHiddenEnvoyDeprecatedListeningAddresses() []*Address { - if x != nil { - return x.HiddenEnvoyDeprecatedListeningAddresses - } - return nil -} - -type isNode_UserAgentVersionType interface { - isNode_UserAgentVersionType() -} - -type Node_UserAgentVersion struct { - // Free-form string that identifies the version of the entity requesting config. - // E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" - UserAgentVersion string `protobuf:"bytes,7,opt,name=user_agent_version,json=userAgentVersion,proto3,oneof"` -} - -type Node_UserAgentBuildVersion struct { - // Structured version of the entity requesting config. - UserAgentBuildVersion *BuildVersion `protobuf:"bytes,8,opt,name=user_agent_build_version,json=userAgentBuildVersion,proto3,oneof"` -} - -func (*Node_UserAgentVersion) isNode_UserAgentVersionType() {} - -func (*Node_UserAgentBuildVersion) isNode_UserAgentVersionType() {} - -// Metadata provides additional inputs to filters based on matched listeners, -// filter chains, routes and endpoints. It is structured as a map, usually from -// filter name (in reverse DNS format) to metadata specific to the filter. Metadata -// key-values for a filter are merged as connection and request handling occurs, -// with later values for the same key overriding earlier values. -// -// An example use of metadata is providing additional values to -// http_connection_manager in the envoy.http_connection_manager.access_log -// namespace. -// -// Another example use of metadata is to per service config info in cluster metadata, which may get -// consumed by multiple filters. -// -// For load balancing, Metadata provides a means to subset cluster endpoints. -// Endpoints have a Metadata object associated and routes contain a Metadata -// object to match against. There are some well defined metadata used today for -// this purpose: -// -// * ``{"envoy.lb": {"canary": }}`` This indicates the canary status of an -// endpoint and is also used during header processing -// (x-envoy-upstream-canary) and for stats purposes. -// [#next-major-version: move to type/metadata/v2] -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* - // namespace is reserved for Envoy's built-in filters. - 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"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{4} -} - -func (x *Metadata) GetFilterMetadata() map[string]*_struct.Struct { - if x != nil { - return x.FilterMetadata - } - return nil -} - -// Runtime derived uint32 with a default when not specified. -type RuntimeUInt32 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue uint32 `protobuf:"varint,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. - RuntimeKey string `protobuf:"bytes,3,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeUInt32) Reset() { - *x = RuntimeUInt32{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeUInt32) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeUInt32) ProtoMessage() {} - -func (x *RuntimeUInt32) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeUInt32.ProtoReflect.Descriptor instead. -func (*RuntimeUInt32) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{5} -} - -func (x *RuntimeUInt32) GetDefaultValue() uint32 { - if x != nil { - return x.DefaultValue - } - return 0 -} - -func (x *RuntimeUInt32) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Runtime derived percentage with a default when not specified. -type RuntimePercent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue *v3.Percent `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimePercent) Reset() { - *x = RuntimePercent{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimePercent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimePercent) ProtoMessage() {} - -func (x *RuntimePercent) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimePercent.ProtoReflect.Descriptor instead. -func (*RuntimePercent) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{6} -} - -func (x *RuntimePercent) GetDefaultValue() *v3.Percent { - if x != nil { - return x.DefaultValue - } - return nil -} - -func (x *RuntimePercent) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Runtime derived double with a default when not specified. -type RuntimeDouble struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue float64 `protobuf:"fixed64,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeDouble) Reset() { - *x = RuntimeDouble{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeDouble) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeDouble) ProtoMessage() {} - -func (x *RuntimeDouble) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeDouble.ProtoReflect.Descriptor instead. -func (*RuntimeDouble) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{7} -} - -func (x *RuntimeDouble) GetDefaultValue() float64 { - if x != nil { - return x.DefaultValue - } - return 0 -} - -func (x *RuntimeDouble) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Runtime derived bool with a default when not specified. -type RuntimeFeatureFlag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue *wrappers.BoolValue `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. The boolean value must - // be represented via its - // `canonical JSON encoding `_. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeFeatureFlag) Reset() { - *x = RuntimeFeatureFlag{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeFeatureFlag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeFeatureFlag) ProtoMessage() {} - -func (x *RuntimeFeatureFlag) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeFeatureFlag.ProtoReflect.Descriptor instead. -func (*RuntimeFeatureFlag) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{8} -} - -func (x *RuntimeFeatureFlag) GetDefaultValue() *wrappers.BoolValue { - if x != nil { - return x.DefaultValue - } - return nil -} - -func (x *RuntimeFeatureFlag) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Header name/value pair. -type HeaderValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Header name. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Header value. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown header values are replaced with the empty string instead of `-`. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *HeaderValue) Reset() { - *x = HeaderValue{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderValue) ProtoMessage() {} - -func (x *HeaderValue) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead. -func (*HeaderValue) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{9} -} - -func (x *HeaderValue) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *HeaderValue) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Header name/value pair plus option to control append behavior. -type HeaderValueOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Header name/value pair that this option applies to. - Header *HeaderValue `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // Should the value be appended? If true (default), the value is appended to - // existing values. Otherwise it replaces any existing values. - Append *wrappers.BoolValue `protobuf:"bytes,2,opt,name=append,proto3" json:"append,omitempty"` -} - -func (x *HeaderValueOption) Reset() { - *x = HeaderValueOption{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderValueOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderValueOption) ProtoMessage() {} - -func (x *HeaderValueOption) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderValueOption.ProtoReflect.Descriptor instead. -func (*HeaderValueOption) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{10} -} - -func (x *HeaderValueOption) GetHeader() *HeaderValue { - if x != nil { - return x.Header - } - return nil -} - -func (x *HeaderValueOption) GetAppend() *wrappers.BoolValue { - if x != nil { - return x.Append - } - return nil -} - -// Wrapper for a set of headers. -type HeaderMap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Headers []*HeaderValue `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *HeaderMap) Reset() { - *x = HeaderMap{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMap) ProtoMessage() {} - -func (x *HeaderMap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMap.ProtoReflect.Descriptor instead. -func (*HeaderMap) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{11} -} - -func (x *HeaderMap) GetHeaders() []*HeaderValue { - if x != nil { - return x.Headers - } - return nil -} - -// A directory that is watched for changes, e.g. by inotify on Linux. Move/rename -// events inside this directory trigger the watch. -type WatchedDirectory struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Directory path to watch. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *WatchedDirectory) Reset() { - *x = WatchedDirectory{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WatchedDirectory) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WatchedDirectory) ProtoMessage() {} - -func (x *WatchedDirectory) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WatchedDirectory.ProtoReflect.Descriptor instead. -func (*WatchedDirectory) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{12} -} - -func (x *WatchedDirectory) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -// Data source consisting of either a file or an inline value. -type DataSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Specifier: - // *DataSource_Filename - // *DataSource_InlineBytes - // *DataSource_InlineString - Specifier isDataSource_Specifier `protobuf_oneof:"specifier"` -} - -func (x *DataSource) Reset() { - *x = DataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DataSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DataSource) ProtoMessage() {} - -func (x *DataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DataSource.ProtoReflect.Descriptor instead. -func (*DataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{13} -} - -func (m *DataSource) GetSpecifier() isDataSource_Specifier { - if m != nil { - return m.Specifier - } - return nil -} - -func (x *DataSource) GetFilename() string { - if x, ok := x.GetSpecifier().(*DataSource_Filename); ok { - return x.Filename - } - return "" -} - -func (x *DataSource) GetInlineBytes() []byte { - if x, ok := x.GetSpecifier().(*DataSource_InlineBytes); ok { - return x.InlineBytes - } - return nil -} - -func (x *DataSource) GetInlineString() string { - if x, ok := x.GetSpecifier().(*DataSource_InlineString); ok { - return x.InlineString - } - return "" -} - -type isDataSource_Specifier interface { - isDataSource_Specifier() -} - -type DataSource_Filename struct { - // Local filesystem data source. - Filename string `protobuf:"bytes,1,opt,name=filename,proto3,oneof"` -} - -type DataSource_InlineBytes struct { - // Bytes inlined in the configuration. - InlineBytes []byte `protobuf:"bytes,2,opt,name=inline_bytes,json=inlineBytes,proto3,oneof"` -} - -type DataSource_InlineString struct { - // String inlined in the configuration. - InlineString string `protobuf:"bytes,3,opt,name=inline_string,json=inlineString,proto3,oneof"` -} - -func (*DataSource_Filename) isDataSource_Specifier() {} - -func (*DataSource_InlineBytes) isDataSource_Specifier() {} - -func (*DataSource_InlineString) isDataSource_Specifier() {} - -// The message specifies the retry policy of remote data source when fetching fails. -type RetryPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies parameters that control :ref:`retry backoff strategy `. - // This parameter is optional, in which case the default base interval is 1000 milliseconds. The - // default maximum interval is 10 times the base interval. - RetryBackOff *BackoffStrategy `protobuf:"bytes,1,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. - MaxRetries *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` -} - -func (x *RetryPolicy) Reset() { - *x = RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy) ProtoMessage() {} - -func (x *RetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead. -func (*RetryPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{14} -} - -func (x *RetryPolicy) GetRetryBackOff() *BackoffStrategy { - if x != nil { - return x.RetryBackOff - } - return nil -} - -func (x *RetryPolicy) GetMaxRetries() *wrappers.UInt32Value { - if x != nil { - return x.MaxRetries - } - return nil -} - -// The message specifies how to fetch data from remote and how to verify it. -type RemoteDataSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The HTTP URI to fetch the remote data. - HttpUri *HttpUri `protobuf:"bytes,1,opt,name=http_uri,json=httpUri,proto3" json:"http_uri,omitempty"` - // SHA256 string for verifying data. - Sha256 string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"` - // Retry policy for fetching remote data. - RetryPolicy *RetryPolicy `protobuf:"bytes,3,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` -} - -func (x *RemoteDataSource) Reset() { - *x = RemoteDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoteDataSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoteDataSource) ProtoMessage() {} - -func (x *RemoteDataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoteDataSource.ProtoReflect.Descriptor instead. -func (*RemoteDataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{15} -} - -func (x *RemoteDataSource) GetHttpUri() *HttpUri { - if x != nil { - return x.HttpUri - } - return nil -} - -func (x *RemoteDataSource) GetSha256() string { - if x != nil { - return x.Sha256 - } - return "" -} - -func (x *RemoteDataSource) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -// Async data source which support async data fetch. -type AsyncDataSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Specifier: - // *AsyncDataSource_Local - // *AsyncDataSource_Remote - Specifier isAsyncDataSource_Specifier `protobuf_oneof:"specifier"` -} - -func (x *AsyncDataSource) Reset() { - *x = AsyncDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AsyncDataSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AsyncDataSource) ProtoMessage() {} - -func (x *AsyncDataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AsyncDataSource.ProtoReflect.Descriptor instead. -func (*AsyncDataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{16} -} - -func (m *AsyncDataSource) GetSpecifier() isAsyncDataSource_Specifier { - if m != nil { - return m.Specifier - } - return nil -} - -func (x *AsyncDataSource) GetLocal() *DataSource { - if x, ok := x.GetSpecifier().(*AsyncDataSource_Local); ok { - return x.Local - } - return nil -} - -func (x *AsyncDataSource) GetRemote() *RemoteDataSource { - if x, ok := x.GetSpecifier().(*AsyncDataSource_Remote); ok { - return x.Remote - } - return nil -} - -type isAsyncDataSource_Specifier interface { - isAsyncDataSource_Specifier() -} - -type AsyncDataSource_Local struct { - // Local async data source. - Local *DataSource `protobuf:"bytes,1,opt,name=local,proto3,oneof"` -} - -type AsyncDataSource_Remote struct { - // Remote async data source. - Remote *RemoteDataSource `protobuf:"bytes,2,opt,name=remote,proto3,oneof"` -} - -func (*AsyncDataSource_Local) isAsyncDataSource_Specifier() {} - -func (*AsyncDataSource_Remote) isAsyncDataSource_Specifier() {} - -// Configuration for transport socket in :ref:`listeners ` and -// :ref:`clusters `. If the configuration is -// empty, a default transport socket implementation and configuration will be -// chosen based on the platform and existence of tls_context. -type TransportSocket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the transport socket to instantiate. The name must match a supported transport - // socket implementation. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Implementation specific configuration which depends on the implementation being instantiated. - // See the supported transport socket implementations for further documentation. - // - // Types that are assignable to ConfigType: - // *TransportSocket_TypedConfig - ConfigType isTransportSocket_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *TransportSocket) Reset() { - *x = TransportSocket{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransportSocket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransportSocket) ProtoMessage() {} - -func (x *TransportSocket) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransportSocket.ProtoReflect.Descriptor instead. -func (*TransportSocket) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{17} -} - -func (x *TransportSocket) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *TransportSocket) GetConfigType() isTransportSocket_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *TransportSocket) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*TransportSocket_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isTransportSocket_ConfigType interface { - isTransportSocket_ConfigType() -} - -type TransportSocket_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*TransportSocket_TypedConfig) isTransportSocket_ConfigType() {} - -// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not -// specified via a runtime key. -// -// .. note:: -// -// Parsing of the runtime key's data is implemented such that it may be represented as a -// :ref:`FractionalPercent ` proto represented as JSON/YAML -// and may also be represented as an integer with the assumption that the value is an integral -// percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse -// as a `FractionalPercent` whose numerator is 42 and denominator is HUNDRED. -type RuntimeFractionalPercent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if the runtime value's for the numerator/denominator keys are not available. - DefaultValue *v3.FractionalPercent `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key for a YAML representation of a FractionalPercent. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeFractionalPercent) Reset() { - *x = RuntimeFractionalPercent{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeFractionalPercent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeFractionalPercent) ProtoMessage() {} - -func (x *RuntimeFractionalPercent) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeFractionalPercent.ProtoReflect.Descriptor instead. -func (*RuntimeFractionalPercent) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{18} -} - -func (x *RuntimeFractionalPercent) GetDefaultValue() *v3.FractionalPercent { - if x != nil { - return x.DefaultValue - } - return nil -} - -func (x *RuntimeFractionalPercent) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Identifies a specific ControlPlane instance that Envoy is connected to. -type ControlPlane struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An opaque control plane identifier that uniquely identifies an instance - // of control plane. This can be used to identify which control plane instance, - // the Envoy is connected to. - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` -} - -func (x *ControlPlane) Reset() { - *x = ControlPlane{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ControlPlane) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ControlPlane) ProtoMessage() {} - -func (x *ControlPlane) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_base_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ControlPlane.ProtoReflect.Descriptor instead. -func (*ControlPlane) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_base_proto_rawDescGZIP(), []int{19} -} - -func (x *ControlPlane) GetIdentifier() string { - if x != nil { - return x.Identifier - } - return "" -} - -var File_envoy_config_core_v4alpha_base_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_base_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, - 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x73, 0x75, 0x62, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x73, 0x75, 0x62, 0x5a, 0x6f, 0x6e, 0x65, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa7, 0x01, - 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x28, 0x9a, - 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xea, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x74, 0x79, 0x70, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x41, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x25, 0x9a, - 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaa, 0x05, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, - 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x2b, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x27, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3a, - 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x42, 0x19, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, - 0x10, 0x06, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0xee, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x60, - 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x1a, 0x5a, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x24, 0x9a, 0xc5, - 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x4b, 0x65, 0x79, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x22, 0xa3, - 0x01, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x12, 0x3b, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, - 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, - 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, - 0x22, 0xb9, 0x01, 0x0a, 0x12, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x49, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x2e, 0x9a, 0xc5, - 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x82, 0x01, 0x0a, - 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0x72, 0x0c, - 0x10, 0x01, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x72, 0x0a, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, - 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, - 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x61, - 0x70, 0x70, 0x65, 0x6e, 0x64, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, - 0x70, 0x12, 0x40, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x22, 0x5d, 0x0a, 0x10, 0x57, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1b, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, - 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x23, 0x0a, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x69, - 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x26, 0x9a, 0xc5, 0x88, - 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x10, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc7, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, - 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, - 0x66, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, - 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, - 0xf5, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x12, 0x1f, 0x0a, - 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x49, - 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x41, 0x73, 0x79, 0x6e, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x05, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, - 0x73, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x10, - 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0xb3, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, - 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, - 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc2, 0x01, 0x0a, 0x18, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0x58, 0x0a, 0x0c, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x28, 0x9a, 0xc5, 0x88, - 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x2a, 0x28, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, - 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x2a, - 0x89, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, - 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, - 0x50, 0x4f, 0x53, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, - 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x43, - 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x53, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x08, - 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x09, 0x2a, 0x3e, 0x0a, 0x10, 0x54, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, - 0x08, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x3e, 0x0a, 0x27, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x09, 0x42, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_base_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_base_proto_rawDescData = file_envoy_config_core_v4alpha_base_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_base_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_base_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_base_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_base_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_base_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_envoy_config_core_v4alpha_base_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_envoy_config_core_v4alpha_base_proto_goTypes = []interface{}{ - (RoutingPriority)(0), // 0: envoy.config.core.v4alpha.RoutingPriority - (RequestMethod)(0), // 1: envoy.config.core.v4alpha.RequestMethod - (TrafficDirection)(0), // 2: envoy.config.core.v4alpha.TrafficDirection - (*Locality)(nil), // 3: envoy.config.core.v4alpha.Locality - (*BuildVersion)(nil), // 4: envoy.config.core.v4alpha.BuildVersion - (*Extension)(nil), // 5: envoy.config.core.v4alpha.Extension - (*Node)(nil), // 6: envoy.config.core.v4alpha.Node - (*Metadata)(nil), // 7: envoy.config.core.v4alpha.Metadata - (*RuntimeUInt32)(nil), // 8: envoy.config.core.v4alpha.RuntimeUInt32 - (*RuntimePercent)(nil), // 9: envoy.config.core.v4alpha.RuntimePercent - (*RuntimeDouble)(nil), // 10: envoy.config.core.v4alpha.RuntimeDouble - (*RuntimeFeatureFlag)(nil), // 11: envoy.config.core.v4alpha.RuntimeFeatureFlag - (*HeaderValue)(nil), // 12: envoy.config.core.v4alpha.HeaderValue - (*HeaderValueOption)(nil), // 13: envoy.config.core.v4alpha.HeaderValueOption - (*HeaderMap)(nil), // 14: envoy.config.core.v4alpha.HeaderMap - (*WatchedDirectory)(nil), // 15: envoy.config.core.v4alpha.WatchedDirectory - (*DataSource)(nil), // 16: envoy.config.core.v4alpha.DataSource - (*RetryPolicy)(nil), // 17: envoy.config.core.v4alpha.RetryPolicy - (*RemoteDataSource)(nil), // 18: envoy.config.core.v4alpha.RemoteDataSource - (*AsyncDataSource)(nil), // 19: envoy.config.core.v4alpha.AsyncDataSource - (*TransportSocket)(nil), // 20: envoy.config.core.v4alpha.TransportSocket - (*RuntimeFractionalPercent)(nil), // 21: envoy.config.core.v4alpha.RuntimeFractionalPercent - (*ControlPlane)(nil), // 22: envoy.config.core.v4alpha.ControlPlane - nil, // 23: envoy.config.core.v4alpha.Metadata.FilterMetadataEntry - (*v3.SemanticVersion)(nil), // 24: envoy.type.v3.SemanticVersion - (*_struct.Struct)(nil), // 25: google.protobuf.Struct - (*Address)(nil), // 26: envoy.config.core.v4alpha.Address - (*v3.Percent)(nil), // 27: envoy.type.v3.Percent - (*wrappers.BoolValue)(nil), // 28: google.protobuf.BoolValue - (*BackoffStrategy)(nil), // 29: envoy.config.core.v4alpha.BackoffStrategy - (*wrappers.UInt32Value)(nil), // 30: google.protobuf.UInt32Value - (*HttpUri)(nil), // 31: envoy.config.core.v4alpha.HttpUri - (*any.Any)(nil), // 32: google.protobuf.Any - (*v3.FractionalPercent)(nil), // 33: envoy.type.v3.FractionalPercent -} -var file_envoy_config_core_v4alpha_base_proto_depIdxs = []int32{ - 24, // 0: envoy.config.core.v4alpha.BuildVersion.version:type_name -> envoy.type.v3.SemanticVersion - 25, // 1: envoy.config.core.v4alpha.BuildVersion.metadata:type_name -> google.protobuf.Struct - 4, // 2: envoy.config.core.v4alpha.Extension.version:type_name -> envoy.config.core.v4alpha.BuildVersion - 25, // 3: envoy.config.core.v4alpha.Node.metadata:type_name -> google.protobuf.Struct - 3, // 4: envoy.config.core.v4alpha.Node.locality:type_name -> envoy.config.core.v4alpha.Locality - 4, // 5: envoy.config.core.v4alpha.Node.user_agent_build_version:type_name -> envoy.config.core.v4alpha.BuildVersion - 5, // 6: envoy.config.core.v4alpha.Node.extensions:type_name -> envoy.config.core.v4alpha.Extension - 26, // 7: envoy.config.core.v4alpha.Node.hidden_envoy_deprecated_listening_addresses:type_name -> envoy.config.core.v4alpha.Address - 23, // 8: envoy.config.core.v4alpha.Metadata.filter_metadata:type_name -> envoy.config.core.v4alpha.Metadata.FilterMetadataEntry - 27, // 9: envoy.config.core.v4alpha.RuntimePercent.default_value:type_name -> envoy.type.v3.Percent - 28, // 10: envoy.config.core.v4alpha.RuntimeFeatureFlag.default_value:type_name -> google.protobuf.BoolValue - 12, // 11: envoy.config.core.v4alpha.HeaderValueOption.header:type_name -> envoy.config.core.v4alpha.HeaderValue - 28, // 12: envoy.config.core.v4alpha.HeaderValueOption.append:type_name -> google.protobuf.BoolValue - 12, // 13: envoy.config.core.v4alpha.HeaderMap.headers:type_name -> envoy.config.core.v4alpha.HeaderValue - 29, // 14: envoy.config.core.v4alpha.RetryPolicy.retry_back_off:type_name -> envoy.config.core.v4alpha.BackoffStrategy - 30, // 15: envoy.config.core.v4alpha.RetryPolicy.max_retries:type_name -> google.protobuf.UInt32Value - 31, // 16: envoy.config.core.v4alpha.RemoteDataSource.http_uri:type_name -> envoy.config.core.v4alpha.HttpUri - 17, // 17: envoy.config.core.v4alpha.RemoteDataSource.retry_policy:type_name -> envoy.config.core.v4alpha.RetryPolicy - 16, // 18: envoy.config.core.v4alpha.AsyncDataSource.local:type_name -> envoy.config.core.v4alpha.DataSource - 18, // 19: envoy.config.core.v4alpha.AsyncDataSource.remote:type_name -> envoy.config.core.v4alpha.RemoteDataSource - 32, // 20: envoy.config.core.v4alpha.TransportSocket.typed_config:type_name -> google.protobuf.Any - 33, // 21: envoy.config.core.v4alpha.RuntimeFractionalPercent.default_value:type_name -> envoy.type.v3.FractionalPercent - 25, // 22: envoy.config.core.v4alpha.Metadata.FilterMetadataEntry.value:type_name -> google.protobuf.Struct - 23, // [23:23] is the sub-list for method output_type - 23, // [23:23] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_base_proto_init() } -func file_envoy_config_core_v4alpha_base_proto_init() { - if File_envoy_config_core_v4alpha_base_proto != nil { - return - } - file_envoy_config_core_v4alpha_address_proto_init() - file_envoy_config_core_v4alpha_backoff_proto_init() - file_envoy_config_core_v4alpha_http_uri_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Locality); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Extension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeUInt32); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimePercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeDouble); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeFeatureFlag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderValueOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WatchedDirectory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoteDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AsyncDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransportSocket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeFractionalPercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ControlPlane); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Node_UserAgentVersion)(nil), - (*Node_UserAgentBuildVersion)(nil), - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[13].OneofWrappers = []interface{}{ - (*DataSource_Filename)(nil), - (*DataSource_InlineBytes)(nil), - (*DataSource_InlineString)(nil), - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[16].OneofWrappers = []interface{}{ - (*AsyncDataSource_Local)(nil), - (*AsyncDataSource_Remote)(nil), - } - file_envoy_config_core_v4alpha_base_proto_msgTypes[17].OneofWrappers = []interface{}{ - (*TransportSocket_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_base_proto_rawDesc, - NumEnums: 3, - NumMessages: 21, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_base_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_base_proto_depIdxs, - EnumInfos: file_envoy_config_core_v4alpha_base_proto_enumTypes, - MessageInfos: file_envoy_config_core_v4alpha_base_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_base_proto = out.File - file_envoy_config_core_v4alpha_base_proto_rawDesc = nil - file_envoy_config_core_v4alpha_base_proto_goTypes = nil - file_envoy_config_core_v4alpha_base_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/base.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/base.pb.validate.go deleted file mode 100644 index 8c9e93bafd..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/base.pb.validate.go +++ /dev/null @@ -1,1774 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/base.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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 { - if m == nil { - return nil - } - - // no validation rules for Region - - // no validation rules for Zone - - // no validation rules for SubZone - - return nil -} - -// LocalityValidationError is the validation error returned by -// Locality.Validate if the designated constraints aren't met. -type LocalityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalityValidationError) ErrorName() string { return "LocalityValidationError" } - -// Error satisfies the builtin error interface -func (e LocalityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocality.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalityValidationError{} - -// Validate checks the field values on BuildVersion with the rules defined in -// the proto definition for this message. If any rules are violated, 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 { - if m == nil { - return nil - } - - // no validation rules for Id - - // no validation rules for Cluster - - 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, - } - } - } - - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for UserAgentName - - for idx, item := range m.GetExtensions() { - _, _ = idx, item - - if 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.GetHiddenEnvoyDeprecatedListeningAddresses() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedListeningAddresses[%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 -} - -// NodeValidationError is the validation error returned by Node.Validate if the -// designated constraints aren't met. -type NodeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NodeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NodeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NodeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NodeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NodeValidationError) ErrorName() string { return "NodeValidationError" } - -// Error satisfies the builtin error interface -func (e NodeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNode.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NodeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NodeValidationError{} - -// Validate checks the field values on Metadata with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Metadata) Validate() error { - if m == nil { - return nil - } - - 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 -} - -// MetadataValidationError is the validation error returned by -// Metadata.Validate if the designated constraints aren't met. -type MetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataValidationError) ErrorName() string { return "MetadataValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataValidationError{} - -// Validate checks the field values on RuntimeUInt32 with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RuntimeUInt32) Validate() error { - if m == nil { - return nil - } - - // no validation rules for DefaultValue - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeUInt32ValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// RuntimeUInt32ValidationError is the validation error returned by -// RuntimeUInt32.Validate if the designated constraints aren't met. -type RuntimeUInt32ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeUInt32ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeUInt32ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeUInt32ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeUInt32ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeUInt32ValidationError) ErrorName() string { return "RuntimeUInt32ValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeUInt32ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeUInt32.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeUInt32ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeUInt32ValidationError{} - -// Validate checks the field values on RuntimePercent with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RuntimePercent) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimePercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimePercentValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// RuntimePercentValidationError is the validation error returned by -// RuntimePercent.Validate if the designated constraints aren't met. -type RuntimePercentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimePercentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimePercentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimePercentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimePercentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimePercentValidationError) ErrorName() string { return "RuntimePercentValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimePercentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimePercent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimePercentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimePercentValidationError{} - -// Validate checks the field values on RuntimeDouble with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RuntimeDouble) Validate() error { - if m == nil { - return nil - } - - // no validation rules for DefaultValue - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeDoubleValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// RuntimeDoubleValidationError is the validation error returned by -// RuntimeDouble.Validate if the designated constraints aren't met. -type RuntimeDoubleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeDoubleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeDoubleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeDoubleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeDoubleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeDoubleValidationError) ErrorName() string { return "RuntimeDoubleValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeDoubleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeDouble.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeDoubleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeDoubleValidationError{} - -// Validate checks the field values on RuntimeFeatureFlag with the rules -// defined in the proto definition for this message. If any rules are -// violated, 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 utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - return RuntimeFeatureFlagValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - } - - 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. -func (m *HeaderValue) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetKey()) < 1 { - return HeaderValueValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - } - - if len(m.GetKey()) > 16384 { - return HeaderValueValidationError{ - field: "Key", - reason: "value length must be at most 16384 bytes", - } - } - - 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", - reason: "value length must be at most 16384 bytes", - } - } - - if !_HeaderValue_Value_Pattern.MatchString(m.GetValue()) { - return HeaderValueValidationError{ - field: "Value", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - return nil -} - -// HeaderValueValidationError is the validation error returned by -// HeaderValue.Validate if the designated constraints aren't met. -type HeaderValueValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderValueValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderValueValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderValueValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderValueValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderValueValidationError) ErrorName() string { return "HeaderValueValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderValueValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderValue.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderValueValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderValueValidationError{} - -var _HeaderValue_Key_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _HeaderValue_Value_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HeaderValueOption with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *HeaderValueOption) Validate() error { - if m == nil { - return nil - } - - if m.GetHeader() == nil { - return HeaderValueOptionValidationError{ - field: "Header", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderValueOptionValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if 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, - } - } - } - - return nil -} - -// HeaderValueOptionValidationError is the validation error returned by -// HeaderValueOption.Validate if the designated constraints aren't met. -type HeaderValueOptionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderValueOptionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderValueOptionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderValueOptionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderValueOptionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderValueOptionValidationError) ErrorName() string { - return "HeaderValueOptionValidationError" -} - -// Error satisfies the builtin error interface -func (e HeaderValueOptionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderValueOption.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderValueOptionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderValueOptionValidationError{} - -// Validate checks the field values on HeaderMap with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HeaderMap) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - 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, - } - } - } - - } - - return nil -} - -// HeaderMapValidationError is the validation error returned by -// HeaderMap.Validate if the designated constraints aren't met. -type HeaderMapValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderMapValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderMapValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderMapValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderMapValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderMapValidationError) ErrorName() string { return "HeaderMapValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderMapValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderMap.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderMapValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderMapValidationError{} - -// Validate checks the field values on WatchedDirectory with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *WatchedDirectory) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetPath()) < 1 { - return WatchedDirectoryValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// WatchedDirectoryValidationError is the validation error returned by -// WatchedDirectory.Validate if the designated constraints aren't met. -type WatchedDirectoryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WatchedDirectoryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WatchedDirectoryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WatchedDirectoryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WatchedDirectoryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WatchedDirectoryValidationError) ErrorName() string { return "WatchedDirectoryValidationError" } - -// Error satisfies the builtin error interface -func (e WatchedDirectoryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWatchedDirectory.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WatchedDirectoryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WatchedDirectoryValidationError{} - -// Validate checks the field values on DataSource with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *DataSource) Validate() error { - if m == nil { - return nil - } - - switch m.Specifier.(type) { - - case *DataSource_Filename: - - if utf8.RuneCountInString(m.GetFilename()) < 1 { - return DataSourceValidationError{ - field: "Filename", - reason: "value length must be at least 1 runes", - } - } - - case *DataSource_InlineBytes: - // no validation rules for InlineBytes - - case *DataSource_InlineString: - // no validation rules for InlineString - - default: - return DataSourceValidationError{ - field: "Specifier", - reason: "value is required", - } - - } - - return nil -} - -// DataSourceValidationError is the validation error returned by -// DataSource.Validate if the designated constraints aren't met. -type DataSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DataSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DataSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DataSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DataSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DataSourceValidationError) ErrorName() string { return "DataSourceValidationError" } - -// Error satisfies the builtin error interface -func (e DataSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDataSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DataSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DataSourceValidationError{} - -// Validate checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, 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.GetMaxRetries()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "MaxRetries", - 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 utf8.RuneCountInString(m.GetSha256()) < 1 { - return RemoteDataSourceValidationError{ - field: "Sha256", - reason: "value length must be at least 1 runes", - } - } - - 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. -func (m *TransportSocket) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return TransportSocketValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - case *TransportSocket_TypedConfig: - - 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, - } - } - } - - } - - return nil -} - -// TransportSocketValidationError is the validation error returned by -// TransportSocket.Validate if the designated constraints aren't met. -type TransportSocketValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TransportSocketValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TransportSocketValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TransportSocketValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TransportSocketValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TransportSocketValidationError) ErrorName() string { return "TransportSocketValidationError" } - -// Error satisfies the builtin error interface -func (e TransportSocketValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTransportSocket.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TransportSocketValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TransportSocketValidationError{} - -// Validate checks the field values on RuntimeFractionalPercent with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RuntimeFractionalPercent) Validate() error { - if m == nil { - return nil - } - - if m.GetDefaultValue() == nil { - return RuntimeFractionalPercentValidationError{ - field: "DefaultValue", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeFractionalPercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for RuntimeKey - - return nil -} - -// RuntimeFractionalPercentValidationError is the validation error returned by -// RuntimeFractionalPercent.Validate if the designated constraints aren't met. -type RuntimeFractionalPercentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeFractionalPercentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeFractionalPercentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeFractionalPercentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeFractionalPercentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeFractionalPercentValidationError) ErrorName() string { - return "RuntimeFractionalPercentValidationError" -} - -// Error satisfies the builtin error interface -func (e RuntimeFractionalPercentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeFractionalPercent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeFractionalPercentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeFractionalPercentValidationError{} - -// Validate checks the field values on ControlPlane with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ControlPlane) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Identifier - - return nil -} - -// ControlPlaneValidationError is the validation error returned by -// ControlPlane.Validate if the designated constraints aren't met. -type ControlPlaneValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ControlPlaneValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ControlPlaneValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ControlPlaneValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ControlPlaneValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ControlPlaneValidationError) ErrorName() string { return "ControlPlaneValidationError" } - -// Error satisfies the builtin error interface -func (e ControlPlaneValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sControlPlane.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ControlPlaneValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ControlPlaneValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/config_source.pb.go b/pkg/api/envoy/config/core/v4alpha/config_source.pb.go deleted file mode 100644 index 46643ffcc0..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/config_source.pb.go +++ /dev/null @@ -1,927 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/config_source.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/cncf/udpa/go/xds/core/v3" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// xDS API and non-xDS services version. This is used to describe both resource and transport -// protocol versions (in distinct configuration fields). -type ApiVersion int32 - -const ( - // When not specified, we assume v2, to ease migration to Envoy's stable API - // versioning. If a client does not support v2 (e.g. due to deprecation), this - // is an invalid value. - // - // Deprecated: Do not use. - ApiVersion_hidden_envoy_deprecated_AUTO ApiVersion = 0 - // Use xDS v2 API. - // - // Deprecated: Do not use. - ApiVersion_hidden_envoy_deprecated_V2 ApiVersion = 1 - // Use xDS v3 API. - ApiVersion_V3 ApiVersion = 2 -) - -// Enum value maps for ApiVersion. -var ( - ApiVersion_name = map[int32]string{ - 0: "hidden_envoy_deprecated_AUTO", - 1: "hidden_envoy_deprecated_V2", - 2: "V3", - } - ApiVersion_value = map[string]int32{ - "hidden_envoy_deprecated_AUTO": 0, - "hidden_envoy_deprecated_V2": 1, - "V3": 2, - } -) - -func (x ApiVersion) Enum() *ApiVersion { - p := new(ApiVersion) - *p = x - return p -} - -func (x ApiVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ApiVersion) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_config_source_proto_enumTypes[0].Descriptor() -} - -func (ApiVersion) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_config_source_proto_enumTypes[0] -} - -func (x ApiVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ApiVersion.Descriptor instead. -func (ApiVersion) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP(), []int{0} -} - -// APIs may be fetched via either REST or gRPC. -type ApiConfigSource_ApiType int32 - -const ( - // Ideally this would be 'reserved 0' but one can't reserve the default - // value. Instead we throw an exception if this is ever used. - // - // Deprecated: Do not use. - ApiConfigSource_hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE ApiConfigSource_ApiType = 0 - // REST-JSON v2 API. The `canonical JSON encoding - // `_ for - // the v2 protos is used. - ApiConfigSource_REST ApiConfigSource_ApiType = 1 - // SotW gRPC service. - ApiConfigSource_GRPC ApiConfigSource_ApiType = 2 - // Using the delta xDS gRPC service, i.e. DeltaDiscovery{Request,Response} - // rather than Discovery{Request,Response}. Rather than sending Envoy the entire state - // with every update, the xDS server only sends what has changed since the last update. - ApiConfigSource_DELTA_GRPC ApiConfigSource_ApiType = 3 - // SotW xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - ApiConfigSource_AGGREGATED_GRPC ApiConfigSource_ApiType = 5 - // Delta xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - ApiConfigSource_AGGREGATED_DELTA_GRPC ApiConfigSource_ApiType = 6 -) - -// Enum value maps for ApiConfigSource_ApiType. -var ( - ApiConfigSource_ApiType_name = map[int32]string{ - 0: "hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE", - 1: "REST", - 2: "GRPC", - 3: "DELTA_GRPC", - 5: "AGGREGATED_GRPC", - 6: "AGGREGATED_DELTA_GRPC", - } - ApiConfigSource_ApiType_value = map[string]int32{ - "hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE": 0, - "REST": 1, - "GRPC": 2, - "DELTA_GRPC": 3, - "AGGREGATED_GRPC": 5, - "AGGREGATED_DELTA_GRPC": 6, - } -) - -func (x ApiConfigSource_ApiType) Enum() *ApiConfigSource_ApiType { - p := new(ApiConfigSource_ApiType) - *p = x - return p -} - -func (x ApiConfigSource_ApiType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ApiConfigSource_ApiType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_config_source_proto_enumTypes[1].Descriptor() -} - -func (ApiConfigSource_ApiType) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_config_source_proto_enumTypes[1] -} - -func (x ApiConfigSource_ApiType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ApiConfigSource_ApiType.Descriptor instead. -func (ApiConfigSource_ApiType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP(), []int{0, 0} -} - -// API configuration source. This identifies the API type and cluster that Envoy -// will use to fetch an xDS API. -// [#next-free-field: 9] -type ApiConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // API type (gRPC, REST, delta gRPC) - ApiType ApiConfigSource_ApiType `protobuf:"varint,1,opt,name=api_type,json=apiType,proto3,enum=envoy.config.core.v4alpha.ApiConfigSource_ApiType" json:"api_type,omitempty"` - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - TransportApiVersion ApiVersion `protobuf:"varint,8,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"transport_api_version,omitempty"` - // Cluster names should be used only with REST. If > 1 - // cluster is defined, clusters will be cycled through if any kind of failure - // occurs. - // - // .. note:: - // - // The cluster with name ``cluster_name`` must be statically defined and its - // type must not be ``EDS``. - ClusterNames []string `protobuf:"bytes,2,rep,name=cluster_names,json=clusterNames,proto3" json:"cluster_names,omitempty"` - // Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, - // services will be cycled through if any kind of failure occurs. - GrpcServices []*GrpcService `protobuf:"bytes,4,rep,name=grpc_services,json=grpcServices,proto3" json:"grpc_services,omitempty"` - // For REST APIs, the delay between successive polls. - RefreshDelay *duration.Duration `protobuf:"bytes,3,opt,name=refresh_delay,json=refreshDelay,proto3" json:"refresh_delay,omitempty"` - // For REST APIs, the request timeout. If not set, a default value of 1s will be used. - RequestTimeout *duration.Duration `protobuf:"bytes,5,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` - // For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be - // rate limited. - RateLimitSettings *RateLimitSettings `protobuf:"bytes,6,opt,name=rate_limit_settings,json=rateLimitSettings,proto3" json:"rate_limit_settings,omitempty"` - // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. - SetNodeOnFirstMessageOnly bool `protobuf:"varint,7,opt,name=set_node_on_first_message_only,json=setNodeOnFirstMessageOnly,proto3" json:"set_node_on_first_message_only,omitempty"` -} - -func (x *ApiConfigSource) Reset() { - *x = ApiConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApiConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApiConfigSource) ProtoMessage() {} - -func (x *ApiConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApiConfigSource.ProtoReflect.Descriptor instead. -func (*ApiConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP(), []int{0} -} - -func (x *ApiConfigSource) GetApiType() ApiConfigSource_ApiType { - if x != nil { - return x.ApiType - } - return ApiConfigSource_hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE -} - -func (x *ApiConfigSource) GetTransportApiVersion() ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return ApiVersion_hidden_envoy_deprecated_AUTO -} - -func (x *ApiConfigSource) GetClusterNames() []string { - if x != nil { - return x.ClusterNames - } - return nil -} - -func (x *ApiConfigSource) GetGrpcServices() []*GrpcService { - if x != nil { - return x.GrpcServices - } - return nil -} - -func (x *ApiConfigSource) GetRefreshDelay() *duration.Duration { - if x != nil { - return x.RefreshDelay - } - return nil -} - -func (x *ApiConfigSource) GetRequestTimeout() *duration.Duration { - if x != nil { - return x.RequestTimeout - } - return nil -} - -func (x *ApiConfigSource) GetRateLimitSettings() *RateLimitSettings { - if x != nil { - return x.RateLimitSettings - } - return nil -} - -func (x *ApiConfigSource) GetSetNodeOnFirstMessageOnly() bool { - if x != nil { - return x.SetNodeOnFirstMessageOnly - } - return false -} - -// Aggregated Discovery Service (ADS) options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that ADS is to be used. -type AggregatedConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AggregatedConfigSource) Reset() { - *x = AggregatedConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AggregatedConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AggregatedConfigSource) ProtoMessage() {} - -func (x *AggregatedConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AggregatedConfigSource.ProtoReflect.Descriptor instead. -func (*AggregatedConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP(), []int{1} -} - -// [#not-implemented-hide:] -// Self-referencing config source options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that other data can be obtained from the same server. -type SelfConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - TransportApiVersion ApiVersion `protobuf:"varint,1,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"transport_api_version,omitempty"` -} - -func (x *SelfConfigSource) Reset() { - *x = SelfConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SelfConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SelfConfigSource) ProtoMessage() {} - -func (x *SelfConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SelfConfigSource.ProtoReflect.Descriptor instead. -func (*SelfConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP(), []int{2} -} - -func (x *SelfConfigSource) GetTransportApiVersion() ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return ApiVersion_hidden_envoy_deprecated_AUTO -} - -// Rate Limit settings to be applied for discovery requests made by Envoy. -type RateLimitSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a - // default value of 100 will be used. - MaxTokens *wrappers.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 *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=fill_rate,json=fillRate,proto3" json:"fill_rate,omitempty"` -} - -func (x *RateLimitSettings) Reset() { - *x = RateLimitSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitSettings) ProtoMessage() {} - -func (x *RateLimitSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimitSettings.ProtoReflect.Descriptor instead. -func (*RateLimitSettings) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP(), []int{3} -} - -func (x *RateLimitSettings) GetMaxTokens() *wrappers.UInt32Value { - if x != nil { - return x.MaxTokens - } - return nil -} - -func (x *RateLimitSettings) GetFillRate() *wrappers.DoubleValue { - if x != nil { - return x.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. -// [#next-free-field: 8] -type ConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Authorities that this config source may be used for. An authority specified in a xdstp:// URL - // is resolved to a *ConfigSource* prior to configuration fetch. This field provides the - // association between authority name and configuration source. - // [#not-implemented-hide:] - Authorities []*v3.Authority `protobuf:"bytes,7,rep,name=authorities,proto3" json:"authorities,omitempty"` - // Types that are assignable to ConfigSourceSpecifier: - // *ConfigSource_Path - // *ConfigSource_ApiConfigSource - // *ConfigSource_Ads - // *ConfigSource_Self - ConfigSourceSpecifier isConfigSource_ConfigSourceSpecifier `protobuf_oneof:"config_source_specifier"` - // When this timeout is specified, Envoy will wait no longer than the specified time for first - // config response on this xDS subscription during the :ref:`initialization process - // `. After reaching the timeout, Envoy will move to the next - // initialization phase, even if the first config is not delivered yet. The timer is activated - // when the xDS API subscription starts, and is disarmed on first config update or on error. 0 - // means no timeout - Envoy will wait indefinitely for the first xDS config (unless another - // timeout applies). The default is 15s. - InitialFetchTimeout *duration.Duration `protobuf:"bytes,4,opt,name=initial_fetch_timeout,json=initialFetchTimeout,proto3" json:"initial_fetch_timeout,omitempty"` - // API version for xDS resources. This implies the type URLs that the client - // will request for resources and the resource type that the client will in - // turn expect to be delivered. - ResourceApiVersion ApiVersion `protobuf:"varint,6,opt,name=resource_api_version,json=resourceApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"resource_api_version,omitempty"` -} - -func (x *ConfigSource) Reset() { - *x = ConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigSource) ProtoMessage() {} - -func (x *ConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_config_source_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfigSource.ProtoReflect.Descriptor instead. -func (*ConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP(), []int{4} -} - -func (x *ConfigSource) GetAuthorities() []*v3.Authority { - if x != nil { - return x.Authorities - } - return nil -} - -func (m *ConfigSource) GetConfigSourceSpecifier() isConfigSource_ConfigSourceSpecifier { - if m != nil { - return m.ConfigSourceSpecifier - } - return nil -} - -func (x *ConfigSource) GetPath() string { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_Path); ok { - return x.Path - } - return "" -} - -func (x *ConfigSource) GetApiConfigSource() *ApiConfigSource { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_ApiConfigSource); ok { - return x.ApiConfigSource - } - return nil -} - -func (x *ConfigSource) GetAds() *AggregatedConfigSource { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_Ads); ok { - return x.Ads - } - return nil -} - -func (x *ConfigSource) GetSelf() *SelfConfigSource { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_Self); ok { - return x.Self - } - return nil -} - -func (x *ConfigSource) GetInitialFetchTimeout() *duration.Duration { - if x != nil { - return x.InitialFetchTimeout - } - return nil -} - -func (x *ConfigSource) GetResourceApiVersion() ApiVersion { - if x != nil { - return x.ResourceApiVersion - } - return ApiVersion_hidden_envoy_deprecated_AUTO -} - -type isConfigSource_ConfigSourceSpecifier interface { - isConfigSource_ConfigSourceSpecifier() -} - -type ConfigSource_Path struct { - // Path on the filesystem to source and watch for configuration updates. - // When sourcing configuration for :ref:`secret `, - // the certificate and key files are also watched for updates. - // - // .. note:: - // - // The path to the source must exist at config load time. - // - // .. note:: - // - // Envoy will only watch the file path for *moves.* This is because in general only moves - // are atomic. The same method of swapping files as is demonstrated in the - // :ref:`runtime documentation ` can be used here also. - Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` -} - -type ConfigSource_ApiConfigSource struct { - // API configuration source. - ApiConfigSource *ApiConfigSource `protobuf:"bytes,2,opt,name=api_config_source,json=apiConfigSource,proto3,oneof"` -} - -type ConfigSource_Ads struct { - // When set, ADS will be used to fetch resources. The ADS API configuration - // source in the bootstrap configuration is used. - Ads *AggregatedConfigSource `protobuf:"bytes,3,opt,name=ads,proto3,oneof"` -} - -type ConfigSource_Self struct { - // [#not-implemented-hide:] - // When set, the client will access the resources from the same server it got the - // ConfigSource from, although not necessarily from the same stream. This is similar to the - // :ref:`ads` field, except that the client may use a - // different stream to the same server. As a result, this field can be used for things - // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) - // LDS to RDS on the same server without requiring the management server to know its name - // or required credentials. - // [#next-major-version: In xDS v3, consider replacing the ads field with this one, since - // this field can implicitly mean to use the same stream in the case where the ConfigSource - // is provided via ADS and the specified data can also be obtained via ADS.] - Self *SelfConfigSource `protobuf:"bytes,5,opt,name=self,proto3,oneof"` -} - -func (*ConfigSource_Path) isConfigSource_ConfigSourceSpecifier() {} - -func (*ConfigSource_ApiConfigSource) isConfigSource_ConfigSourceSpecifier() {} - -func (*ConfigSource_Ads) isConfigSource_ConfigSourceSpecifier() {} - -func (*ConfigSource_Self) isConfigSource_ConfigSourceSpecifier() {} - -var File_envoy_config_core_v4alpha_config_source_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_config_source_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x06, 0x0a, 0x0f, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x61, 0x70, 0x69, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x70, 0x69, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, - 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0d, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0c, 0x67, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x5c, 0x0a, 0x13, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x1e, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4f, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xaa, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x69, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x3d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x44, 0x45, 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x55, - 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, - 0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, - 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, - 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x47, - 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x06, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x32, 0x9a, 0xc5, - 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x22, 0xa5, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, - 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x11, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3b, - 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x66, - 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0e, 0xfa, 0x42, - 0x0b, 0x12, 0x09, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x08, 0x66, 0x69, - 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xbe, 0x04, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x78, 0x64, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x14, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x58, 0x0a, 0x11, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, - 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, - 0x0f, 0x61, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x45, 0x0a, 0x03, 0x61, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x66, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x48, 0x00, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x66, 0x12, 0x4d, 0x0a, 0x15, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x61, 0x0a, 0x14, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x28, 0x9a, 0xc5, - 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x1e, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x5e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x1c, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x22, 0x0a, 0x1a, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x56, 0x32, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x06, - 0x0a, 0x02, 0x56, 0x33, 0x10, 0x02, 0x42, 0x46, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_config_source_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_config_source_proto_rawDescData = file_envoy_config_core_v4alpha_config_source_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_config_source_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_config_source_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_config_source_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_config_source_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_config_source_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_config_source_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_config_core_v4alpha_config_source_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_config_core_v4alpha_config_source_proto_goTypes = []interface{}{ - (ApiVersion)(0), // 0: envoy.config.core.v4alpha.ApiVersion - (ApiConfigSource_ApiType)(0), // 1: envoy.config.core.v4alpha.ApiConfigSource.ApiType - (*ApiConfigSource)(nil), // 2: envoy.config.core.v4alpha.ApiConfigSource - (*AggregatedConfigSource)(nil), // 3: envoy.config.core.v4alpha.AggregatedConfigSource - (*SelfConfigSource)(nil), // 4: envoy.config.core.v4alpha.SelfConfigSource - (*RateLimitSettings)(nil), // 5: envoy.config.core.v4alpha.RateLimitSettings - (*ConfigSource)(nil), // 6: envoy.config.core.v4alpha.ConfigSource - (*GrpcService)(nil), // 7: envoy.config.core.v4alpha.GrpcService - (*duration.Duration)(nil), // 8: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value - (*wrappers.DoubleValue)(nil), // 10: google.protobuf.DoubleValue - (*v3.Authority)(nil), // 11: xds.core.v3.Authority -} -var file_envoy_config_core_v4alpha_config_source_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v4alpha.ApiConfigSource.api_type:type_name -> envoy.config.core.v4alpha.ApiConfigSource.ApiType - 0, // 1: envoy.config.core.v4alpha.ApiConfigSource.transport_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 7, // 2: envoy.config.core.v4alpha.ApiConfigSource.grpc_services:type_name -> envoy.config.core.v4alpha.GrpcService - 8, // 3: envoy.config.core.v4alpha.ApiConfigSource.refresh_delay:type_name -> google.protobuf.Duration - 8, // 4: envoy.config.core.v4alpha.ApiConfigSource.request_timeout:type_name -> google.protobuf.Duration - 5, // 5: envoy.config.core.v4alpha.ApiConfigSource.rate_limit_settings:type_name -> envoy.config.core.v4alpha.RateLimitSettings - 0, // 6: envoy.config.core.v4alpha.SelfConfigSource.transport_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 9, // 7: envoy.config.core.v4alpha.RateLimitSettings.max_tokens:type_name -> google.protobuf.UInt32Value - 10, // 8: envoy.config.core.v4alpha.RateLimitSettings.fill_rate:type_name -> google.protobuf.DoubleValue - 11, // 9: envoy.config.core.v4alpha.ConfigSource.authorities:type_name -> xds.core.v3.Authority - 2, // 10: envoy.config.core.v4alpha.ConfigSource.api_config_source:type_name -> envoy.config.core.v4alpha.ApiConfigSource - 3, // 11: envoy.config.core.v4alpha.ConfigSource.ads:type_name -> envoy.config.core.v4alpha.AggregatedConfigSource - 4, // 12: envoy.config.core.v4alpha.ConfigSource.self:type_name -> envoy.config.core.v4alpha.SelfConfigSource - 8, // 13: envoy.config.core.v4alpha.ConfigSource.initial_fetch_timeout:type_name -> google.protobuf.Duration - 0, // 14: envoy.config.core.v4alpha.ConfigSource.resource_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_config_source_proto_init() } -func file_envoy_config_core_v4alpha_config_source_proto_init() { - if File_envoy_config_core_v4alpha_config_source_proto != nil { - return - } - file_envoy_config_core_v4alpha_grpc_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_config_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApiConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_config_source_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_config_source_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SelfConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_config_source_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_config_source_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_config_source_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*ConfigSource_Path)(nil), - (*ConfigSource_ApiConfigSource)(nil), - (*ConfigSource_Ads)(nil), - (*ConfigSource_Self)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_config_source_proto_rawDesc, - NumEnums: 2, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_config_source_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_config_source_proto_depIdxs, - EnumInfos: file_envoy_config_core_v4alpha_config_source_proto_enumTypes, - MessageInfos: file_envoy_config_core_v4alpha_config_source_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_config_source_proto = out.File - file_envoy_config_core_v4alpha_config_source_proto_rawDesc = nil - file_envoy_config_core_v4alpha_config_source_proto_goTypes = nil - file_envoy_config_core_v4alpha_config_source_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/config_source.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/config_source.pb.validate.go deleted file mode 100644 index 57620c591e..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/config_source.pb.validate.go +++ /dev/null @@ -1,544 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/config_source.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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. -func (m *ApiConfigSource) Validate() error { - if m == nil { - return nil - } - - if _, ok := ApiConfigSource_ApiType_name[int32(m.GetApiType())]; !ok { - return ApiConfigSourceValidationError{ - field: "ApiType", - reason: "value must be one of the defined enum values", - } - } - - 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 - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ApiConfigSourceValidationError{ - field: fmt.Sprintf("GrpcServices[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ApiConfigSourceValidationError{ - field: "RefreshDelay", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetRequestTimeout(); d != nil { - dur, err := 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) - - if dur <= gt { - return ApiConfigSourceValidationError{ - field: "RequestTimeout", - reason: "value must be greater than 0s", - } - } - - } - - 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 -} - -// ApiConfigSourceValidationError is the validation error returned by -// ApiConfigSource.Validate if the designated constraints aren't met. -type ApiConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ApiConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ApiConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ApiConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ApiConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ApiConfigSourceValidationError) ErrorName() string { return "ApiConfigSourceValidationError" } - -// Error satisfies the builtin error interface -func (e ApiConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sApiConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ApiConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ApiConfigSourceValidationError{} - -// Validate checks the field values on AggregatedConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *AggregatedConfigSource) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// AggregatedConfigSourceValidationError is the validation error returned by -// AggregatedConfigSource.Validate if the designated constraints aren't met. -type AggregatedConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AggregatedConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AggregatedConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AggregatedConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AggregatedConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AggregatedConfigSourceValidationError) ErrorName() string { - return "AggregatedConfigSourceValidationError" -} - -// Error satisfies the builtin error interface -func (e AggregatedConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAggregatedConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AggregatedConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AggregatedConfigSourceValidationError{} - -// Validate checks the field values on SelfConfigSource with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *SelfConfigSource) Validate() error { - if m == nil { - return nil - } - - if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return SelfConfigSourceValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - } - - 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. -func (m *RateLimitSettings) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetMaxTokens()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitSettingsValidationError{ - field: "MaxTokens", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetFillRate(); wrapper != nil { - - if wrapper.GetValue() <= 0 { - return RateLimitSettingsValidationError{ - field: "FillRate", - reason: "value must be greater than 0", - } - } - - } - - return nil -} - -// RateLimitSettingsValidationError is the validation error returned by -// RateLimitSettings.Validate if the designated constraints aren't met. -type RateLimitSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitSettingsValidationError) ErrorName() string { - return "RateLimitSettingsValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitSettingsValidationError{} - -// Validate checks the field values on ConfigSource with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ConfigSource) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetAuthorities() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: fmt.Sprintf("Authorities[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if 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: - // no validation rules for Path - - case *ConfigSource_ApiConfigSource: - - if v, ok := interface{}(m.GetApiConfigSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "ApiConfigSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ConfigSource_Ads: - - if v, ok := interface{}(m.GetAds()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "Ads", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ConfigSource_Self: - - if v, ok := interface{}(m.GetSelf()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "Self", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return ConfigSourceValidationError{ - field: "ConfigSourceSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// ConfigSourceValidationError is the validation error returned by -// ConfigSource.Validate if the designated constraints aren't met. -type ConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ConfigSourceValidationError) ErrorName() string { return "ConfigSourceValidationError" } - -// Error satisfies the builtin error interface -func (e ConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ConfigSourceValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/event_service_config.pb.go b/pkg/api/envoy/config/core/v4alpha/event_service_config.pb.go deleted file mode 100644 index be3ebaa299..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/event_service_config.pb.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/event_service_config.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] -// Configuration of the event reporting service endpoint. -type EventServiceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ConfigSourceSpecifier: - // *EventServiceConfig_GrpcService - ConfigSourceSpecifier isEventServiceConfig_ConfigSourceSpecifier `protobuf_oneof:"config_source_specifier"` -} - -func (x *EventServiceConfig) Reset() { - *x = EventServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_event_service_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventServiceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventServiceConfig) ProtoMessage() {} - -func (x *EventServiceConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_event_service_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventServiceConfig.ProtoReflect.Descriptor instead. -func (*EventServiceConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_event_service_config_proto_rawDescGZIP(), []int{0} -} - -func (m *EventServiceConfig) GetConfigSourceSpecifier() isEventServiceConfig_ConfigSourceSpecifier { - if m != nil { - return m.ConfigSourceSpecifier - } - return nil -} - -func (x *EventServiceConfig) GetGrpcService() *GrpcService { - if x, ok := x.GetConfigSourceSpecifier().(*EventServiceConfig_GrpcService); ok { - return x.GrpcService - } - return nil -} - -type isEventServiceConfig_ConfigSourceSpecifier interface { - isEventServiceConfig_ConfigSourceSpecifier() -} - -type EventServiceConfig_GrpcService struct { - // Specifies the gRPC service that hosts the event reporting service. - GrpcService *GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3,oneof"` -} - -func (*EventServiceConfig_GrpcService) isEventServiceConfig_ConfigSourceSpecifier() {} - -var File_envoy_config_core_v4alpha_event_service_config_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_event_service_config_proto_rawDesc = []byte{ - 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x12, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x4b, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, - 0x00, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x2e, - 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1e, - 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x4c, - 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_event_service_config_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_event_service_config_proto_rawDescData = file_envoy_config_core_v4alpha_event_service_config_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_event_service_config_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_event_service_config_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_event_service_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_event_service_config_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_event_service_config_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_event_service_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v4alpha_event_service_config_proto_goTypes = []interface{}{ - (*EventServiceConfig)(nil), // 0: envoy.config.core.v4alpha.EventServiceConfig - (*GrpcService)(nil), // 1: envoy.config.core.v4alpha.GrpcService -} -var file_envoy_config_core_v4alpha_event_service_config_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v4alpha.EventServiceConfig.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_event_service_config_proto_init() } -func file_envoy_config_core_v4alpha_event_service_config_proto_init() { - if File_envoy_config_core_v4alpha_event_service_config_proto != nil { - return - } - file_envoy_config_core_v4alpha_grpc_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_event_service_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_event_service_config_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*EventServiceConfig_GrpcService)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_event_service_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_event_service_config_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_event_service_config_proto_depIdxs, - MessageInfos: file_envoy_config_core_v4alpha_event_service_config_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_event_service_config_proto = out.File - file_envoy_config_core_v4alpha_event_service_config_proto_rawDesc = nil - file_envoy_config_core_v4alpha_event_service_config_proto_goTypes = nil - file_envoy_config_core_v4alpha_event_service_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/event_service_config.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/event_service_config.pb.validate.go deleted file mode 100644 index 82fa24dd33..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/event_service_config.pb.validate.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/event_service_config.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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/pkg/api/envoy/config/core/v4alpha/extension.pb.go b/pkg/api/envoy/config/core/v4alpha/extension.pb.go deleted file mode 100644 index a499c374c8..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/extension.pb.go +++ /dev/null @@ -1,322 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/extension.proto - -package envoy_config_core_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Message type for extension configuration. -// [#next-major-version: revisit all existing typed_config that doesn't use this wrapper.]. -type TypedExtensionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of an extension. This is not used to select the extension, instead - // it serves the role of an opaque identifier. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The typed config for the extension. The type URL will be used to identify - // the extension. In the case that the type URL is *udpa.type.v1.TypedStruct*, - // the inner type URL of *TypedStruct* will be utilized. See the - // :ref:`extension configuration overview - // ` for further details. - TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *TypedExtensionConfig) Reset() { - *x = TypedExtensionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_extension_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypedExtensionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypedExtensionConfig) ProtoMessage() {} - -func (x *TypedExtensionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_extension_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypedExtensionConfig.ProtoReflect.Descriptor instead. -func (*TypedExtensionConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_extension_proto_rawDescGZIP(), []int{0} -} - -func (x *TypedExtensionConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TypedExtensionConfig) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -// Configuration source specifier for a late-bound extension configuration. The -// parent resource is warmed until all the initial extension configurations are -// received, unless the flag to apply the default configuration is set. -// Subsequent extension updates are atomic on a per-worker basis. Once an -// extension configuration is applied to a request or a connection, it remains -// constant for the duration of processing. If the initial delivery of the -// extension configuration fails, due to a timeout for example, the optional -// default configuration is applied. Without a default configuration, the -// extension is disabled, until an extension configuration is received. The -// behavior of a disabled extension depends on the context. For example, a -// filter chain with a disabled extension filter rejects all incoming streams. -type ExtensionConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConfigSource *ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` - // Optional default configuration to use as the initial configuration if - // there is a failure to receive the initial extension configuration or if - // `apply_default_config_without_warming` flag is set. - DefaultConfig *any.Any `protobuf:"bytes,2,opt,name=default_config,json=defaultConfig,proto3" json:"default_config,omitempty"` - // Use the default config as the initial configuration without warming and - // waiting for the first discovery response. Requires the default configuration - // to be supplied. - ApplyDefaultConfigWithoutWarming bool `protobuf:"varint,3,opt,name=apply_default_config_without_warming,json=applyDefaultConfigWithoutWarming,proto3" json:"apply_default_config_without_warming,omitempty"` - // A set of permitted extension type URLs. Extension configuration updates are rejected - // if they do not match any type URL in the set. - TypeUrls []string `protobuf:"bytes,4,rep,name=type_urls,json=typeUrls,proto3" json:"type_urls,omitempty"` -} - -func (x *ExtensionConfigSource) Reset() { - *x = ExtensionConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_extension_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionConfigSource) ProtoMessage() {} - -func (x *ExtensionConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_extension_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionConfigSource.ProtoReflect.Descriptor instead. -func (*ExtensionConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_extension_proto_rawDescGZIP(), []int{1} -} - -func (x *ExtensionConfigSource) GetConfigSource() *ConfigSource { - if x != nil { - return x.ConfigSource - } - return nil -} - -func (x *ExtensionConfigSource) GetDefaultConfig() *any.Any { - if x != nil { - return x.DefaultConfig - } - return nil -} - -func (x *ExtensionConfigSource) GetApplyDefaultConfigWithoutWarming() bool { - if x != nil { - return x.ApplyDefaultConfigWithoutWarming - } - return false -} - -func (x *ExtensionConfigSource) GetTypeUrls() []string { - if x != nil { - return x.TypeUrls - } - return nil -} - -var File_envoy_config_core_v4alpha_extension_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_extension_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x01, 0x0a, 0x14, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xd6, 0x02, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x24, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x77, 0x69, - 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x57, 0x61, - 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, - 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x73, 0x3a, 0x31, 0x9a, 0xc5, - 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, - 0x43, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_extension_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_extension_proto_rawDescData = file_envoy_config_core_v4alpha_extension_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_extension_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_extension_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_extension_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_extension_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_core_v4alpha_extension_proto_goTypes = []interface{}{ - (*TypedExtensionConfig)(nil), // 0: envoy.config.core.v4alpha.TypedExtensionConfig - (*ExtensionConfigSource)(nil), // 1: envoy.config.core.v4alpha.ExtensionConfigSource - (*any.Any)(nil), // 2: google.protobuf.Any - (*ConfigSource)(nil), // 3: envoy.config.core.v4alpha.ConfigSource -} -var file_envoy_config_core_v4alpha_extension_proto_depIdxs = []int32{ - 2, // 0: envoy.config.core.v4alpha.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any - 3, // 1: envoy.config.core.v4alpha.ExtensionConfigSource.config_source:type_name -> envoy.config.core.v4alpha.ConfigSource - 2, // 2: envoy.config.core.v4alpha.ExtensionConfigSource.default_config:type_name -> google.protobuf.Any - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_extension_proto_init() } -func file_envoy_config_core_v4alpha_extension_proto_init() { - if File_envoy_config_core_v4alpha_extension_proto != nil { - return - } - file_envoy_config_core_v4alpha_config_source_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypedExtensionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_extension_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_extension_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_extension_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_extension_proto_depIdxs, - MessageInfos: file_envoy_config_core_v4alpha_extension_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_extension_proto = out.File - file_envoy_config_core_v4alpha_extension_proto_rawDesc = nil - file_envoy_config_core_v4alpha_extension_proto_goTypes = nil - file_envoy_config_core_v4alpha_extension_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/extension.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/extension.pb.validate.go deleted file mode 100644 index 322e9fb86e..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/extension.pb.validate.go +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/extension.proto - -package envoy_config_core_v4alpha - -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{} -) - -// Validate checks the field values on TypedExtensionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *TypedExtensionConfig) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return TypedExtensionConfigValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if m.GetTypedConfig() == nil { - return TypedExtensionConfigValidationError{ - field: "TypedConfig", - reason: "value is required", - } - } - - if a := m.GetTypedConfig(); a != nil { - - } - - return nil -} - -// TypedExtensionConfigValidationError is the validation error returned by -// TypedExtensionConfig.Validate if the designated constraints aren't met. -type TypedExtensionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TypedExtensionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TypedExtensionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TypedExtensionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TypedExtensionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TypedExtensionConfigValidationError) ErrorName() string { - return "TypedExtensionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e TypedExtensionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTypedExtensionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TypedExtensionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TypedExtensionConfigValidationError{} - -// Validate checks the field values on ExtensionConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ExtensionConfigSource) Validate() error { - if m == nil { - return nil - } - - if m.GetConfigSource() == nil { - return ExtensionConfigSourceValidationError{ - field: "ConfigSource", - reason: "value is required", - } - } - - if a := m.GetConfigSource(); a != nil { - - } - - if v, ok := interface{}(m.GetDefaultConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionConfigSourceValidationError{ - field: "DefaultConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ApplyDefaultConfigWithoutWarming - - if len(m.GetTypeUrls()) < 1 { - return ExtensionConfigSourceValidationError{ - field: "TypeUrls", - reason: "value must contain at least 1 item(s)", - } - } - - return nil -} - -// ExtensionConfigSourceValidationError is the validation error returned by -// ExtensionConfigSource.Validate if the designated constraints aren't met. -type ExtensionConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtensionConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtensionConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtensionConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtensionConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtensionConfigSourceValidationError) ErrorName() string { - return "ExtensionConfigSourceValidationError" -} - -// Error satisfies the builtin error interface -func (e ExtensionConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtensionConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtensionConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtensionConfigSourceValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/grpc_method_list.pb.go b/pkg/api/envoy/config/core/v4alpha/grpc_method_list.pb.go deleted file mode 100644 index b5280772d4..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/grpc_method_list.pb.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/grpc_method_list.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A list of gRPC methods which can be used as an allowlist, for example. -type GrpcMethodList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Services []*GrpcMethodList_Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` -} - -func (x *GrpcMethodList) Reset() { - *x = GrpcMethodList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcMethodList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcMethodList) ProtoMessage() {} - -func (x *GrpcMethodList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcMethodList.ProtoReflect.Descriptor instead. -func (*GrpcMethodList) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescGZIP(), []int{0} -} - -func (x *GrpcMethodList) GetServices() []*GrpcMethodList_Service { - if x != nil { - return x.Services - } - return nil -} - -type GrpcMethodList_Service struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the gRPC service. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The names of the gRPC methods in this service. - MethodNames []string `protobuf:"bytes,2,rep,name=method_names,json=methodNames,proto3" json:"method_names,omitempty"` -} - -func (x *GrpcMethodList_Service) Reset() { - *x = GrpcMethodList_Service{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcMethodList_Service) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcMethodList_Service) ProtoMessage() {} - -func (x *GrpcMethodList_Service) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcMethodList_Service.ProtoReflect.Descriptor instead. -func (*GrpcMethodList_Service) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *GrpcMethodList_Service) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GrpcMethodList_Service) GetMethodNames() []string { - if x != nil { - return x.MethodNames - } - return nil -} - -var File_envoy_config_core_v4alpha_grpc_method_list_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x0e, 0x47, 0x72, 0x70, - 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x08, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x07, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, - 0x02, 0x08, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x48, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x47, 0x72, 0x70, - 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescData = file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_core_v4alpha_grpc_method_list_proto_goTypes = []interface{}{ - (*GrpcMethodList)(nil), // 0: envoy.config.core.v4alpha.GrpcMethodList - (*GrpcMethodList_Service)(nil), // 1: envoy.config.core.v4alpha.GrpcMethodList.Service -} -var file_envoy_config_core_v4alpha_grpc_method_list_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v4alpha.GrpcMethodList.services:type_name -> envoy.config.core.v4alpha.GrpcMethodList.Service - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_grpc_method_list_proto_init() } -func file_envoy_config_core_v4alpha_grpc_method_list_proto_init() { - if File_envoy_config_core_v4alpha_grpc_method_list_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcMethodList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcMethodList_Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_grpc_method_list_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_grpc_method_list_proto_depIdxs, - MessageInfos: file_envoy_config_core_v4alpha_grpc_method_list_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_grpc_method_list_proto = out.File - file_envoy_config_core_v4alpha_grpc_method_list_proto_rawDesc = nil - file_envoy_config_core_v4alpha_grpc_method_list_proto_goTypes = nil - file_envoy_config_core_v4alpha_grpc_method_list_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/grpc_method_list.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/grpc_method_list.pb.validate.go deleted file mode 100644 index d4c58acee6..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/grpc_method_list.pb.validate.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/grpc_method_list.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetName()) < 1 { - return GrpcMethodList_ServiceValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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/pkg/api/envoy/config/core/v4alpha/grpc_service.pb.go b/pkg/api/envoy/config/core/v4alpha/grpc_service.pb.go deleted file mode 100644 index 0550904f84..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/grpc_service.pb.go +++ /dev/null @@ -1,1755 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/grpc_service.proto - -package envoy_config_core_v4alpha - -import ( - _ "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" - duration "github.com/golang/protobuf/ptypes/duration" - _struct "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. -// [#next-free-field: 6] -type GrpcService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to TargetSpecifier: - // *GrpcService_EnvoyGrpc_ - // *GrpcService_GoogleGrpc_ - TargetSpecifier isGrpcService_TargetSpecifier `protobuf_oneof:"target_specifier"` - // The timeout for the gRPC request. This is the timeout for a specific - // request. - Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` - // Additional metadata to include in streams initiated to the GrpcService. This can be used for - // scenarios in which additional ad hoc authorization headers (e.g. ``x-foo-bar: baz-key``) are to - // be injected. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers - // `. - InitialMetadata []*HeaderValue `protobuf:"bytes,5,rep,name=initial_metadata,json=initialMetadata,proto3" json:"initial_metadata,omitempty"` -} - -func (x *GrpcService) Reset() { - *x = GrpcService{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService) ProtoMessage() {} - -func (x *GrpcService) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService.ProtoReflect.Descriptor instead. -func (*GrpcService) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0} -} - -func (m *GrpcService) GetTargetSpecifier() isGrpcService_TargetSpecifier { - if m != nil { - return m.TargetSpecifier - } - return nil -} - -func (x *GrpcService) GetEnvoyGrpc() *GrpcService_EnvoyGrpc { - if x, ok := x.GetTargetSpecifier().(*GrpcService_EnvoyGrpc_); ok { - return x.EnvoyGrpc - } - return nil -} - -func (x *GrpcService) GetGoogleGrpc() *GrpcService_GoogleGrpc { - if x, ok := x.GetTargetSpecifier().(*GrpcService_GoogleGrpc_); ok { - return x.GoogleGrpc - } - return nil -} - -func (x *GrpcService) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *GrpcService) GetInitialMetadata() []*HeaderValue { - if x != nil { - return x.InitialMetadata - } - return nil -} - -type isGrpcService_TargetSpecifier interface { - isGrpcService_TargetSpecifier() -} - -type GrpcService_EnvoyGrpc_ struct { - // Envoy's in-built gRPC client. - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - EnvoyGrpc *GrpcService_EnvoyGrpc `protobuf:"bytes,1,opt,name=envoy_grpc,json=envoyGrpc,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ struct { - // `Google C++ gRPC client `_ - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - GoogleGrpc *GrpcService_GoogleGrpc `protobuf:"bytes,2,opt,name=google_grpc,json=googleGrpc,proto3,oneof"` -} - -func (*GrpcService_EnvoyGrpc_) isGrpcService_TargetSpecifier() {} - -func (*GrpcService_GoogleGrpc_) isGrpcService_TargetSpecifier() {} - -type GrpcService_EnvoyGrpc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`transport_socket - // `. - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - // The `:authority` header in the grpc request. If this field is not set, the authority header value will be `cluster_name`. - // Note that this authority does not override the SNI. The SNI is provided by the transport socket of the cluster. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` -} - -func (x *GrpcService_EnvoyGrpc) Reset() { - *x = GrpcService_EnvoyGrpc{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_EnvoyGrpc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_EnvoyGrpc) ProtoMessage() {} - -func (x *GrpcService_EnvoyGrpc) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_EnvoyGrpc.ProtoReflect.Descriptor instead. -func (*GrpcService_EnvoyGrpc) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *GrpcService_EnvoyGrpc) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *GrpcService_EnvoyGrpc) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -// [#next-free-field: 9] -type GrpcService_GoogleGrpc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The target URI when using the `Google C++ gRPC client - // `_. SSL credentials will be supplied in - // :ref:`channel_credentials `. - TargetUri string `protobuf:"bytes,1,opt,name=target_uri,json=targetUri,proto3" json:"target_uri,omitempty"` - ChannelCredentials *GrpcService_GoogleGrpc_ChannelCredentials `protobuf:"bytes,2,opt,name=channel_credentials,json=channelCredentials,proto3" json:"channel_credentials,omitempty"` - // A set of call credentials that can be composed with `channel credentials - // `_. - CallCredentials []*GrpcService_GoogleGrpc_CallCredentials `protobuf:"bytes,3,rep,name=call_credentials,json=callCredentials,proto3" json:"call_credentials,omitempty"` - // The human readable prefix to use when emitting statistics for the gRPC - // service. - // - // .. csv-table:: - // :header: Name, Type, Description - // :widths: 1, 1, 2 - // - // streams_total, Counter, Total number of streams opened - // streams_closed_, Counter, Total streams closed with - StatPrefix string `protobuf:"bytes,4,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // The name of the Google gRPC credentials factory to use. This must have been registered with - // Envoy. If this is empty, a default credentials factory will be used that sets up channel - // credentials based on other configuration parameters. - CredentialsFactoryName string `protobuf:"bytes,5,opt,name=credentials_factory_name,json=credentialsFactoryName,proto3" json:"credentials_factory_name,omitempty"` - // Additional configuration for site-specific customizations of the Google - // gRPC library. - Config *_struct.Struct `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"` - // How many bytes each stream can buffer internally. - // If not set an implementation defined default is applied (1MiB). - PerStreamBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=per_stream_buffer_limit_bytes,json=perStreamBufferLimitBytes,proto3" json:"per_stream_buffer_limit_bytes,omitempty"` - // Custom channels args. - ChannelArgs *GrpcService_GoogleGrpc_ChannelArgs `protobuf:"bytes,8,opt,name=channel_args,json=channelArgs,proto3" json:"channel_args,omitempty"` -} - -func (x *GrpcService_GoogleGrpc) Reset() { - *x = GrpcService_GoogleGrpc{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *GrpcService_GoogleGrpc) GetTargetUri() string { - if x != nil { - return x.TargetUri - } - return "" -} - -func (x *GrpcService_GoogleGrpc) GetChannelCredentials() *GrpcService_GoogleGrpc_ChannelCredentials { - if x != nil { - return x.ChannelCredentials - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetCallCredentials() []*GrpcService_GoogleGrpc_CallCredentials { - if x != nil { - return x.CallCredentials - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *GrpcService_GoogleGrpc) GetCredentialsFactoryName() string { - if x != nil { - return x.CredentialsFactoryName - } - return "" -} - -func (x *GrpcService_GoogleGrpc) GetConfig() *_struct.Struct { - if x != nil { - return x.Config - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetPerStreamBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerStreamBufferLimitBytes - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetChannelArgs() *GrpcService_GoogleGrpc_ChannelArgs { - if x != nil { - return x.ChannelArgs - } - return nil -} - -// See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. -type GrpcService_GoogleGrpc_SslCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // PEM encoded server root certificates. - RootCerts *DataSource `protobuf:"bytes,1,opt,name=root_certs,json=rootCerts,proto3" json:"root_certs,omitempty"` - // PEM encoded client private key. - PrivateKey *DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // PEM encoded client certificate chain. - CertChain *DataSource `protobuf:"bytes,3,opt,name=cert_chain,json=certChain,proto3" json:"cert_chain,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) Reset() { - *x = GrpcService_GoogleGrpc_SslCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_SslCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_SslCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_SslCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_SslCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 0} -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) GetRootCerts() *DataSource { - if x != nil { - return x.RootCerts - } - return nil -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) GetPrivateKey() *DataSource { - if x != nil { - return x.PrivateKey - } - return nil -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) GetCertChain() *DataSource { - if x != nil { - return x.CertChain - } - return nil -} - -// Local channel credentials. Only UDS is supported for now. -// See https://github.com/grpc/grpc/pull/15909. -type GrpcService_GoogleGrpc_GoogleLocalCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GrpcService_GoogleGrpc_GoogleLocalCredentials) Reset() { - *x = GrpcService_GoogleGrpc_GoogleLocalCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_GoogleLocalCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_GoogleLocalCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_GoogleLocalCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_GoogleLocalCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_GoogleLocalCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 1} -} - -// See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call -// credential types. -type GrpcService_GoogleGrpc_ChannelCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to CredentialSpecifier: - // *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials - // *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault - // *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials - CredentialSpecifier isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier `protobuf_oneof:"credential_specifier"` -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) Reset() { - *x = GrpcService_GoogleGrpc_ChannelCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_ChannelCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_ChannelCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 2} -} - -func (m *GrpcService_GoogleGrpc_ChannelCredentials) GetCredentialSpecifier() isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier { - if m != nil { - return m.CredentialSpecifier - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) GetSslCredentials() *GrpcService_GoogleGrpc_SslCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials); ok { - return x.SslCredentials - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) GetGoogleDefault() *emptypb.Empty { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault); ok { - return x.GoogleDefault - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) GetLocalCredentials() *GrpcService_GoogleGrpc_GoogleLocalCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials); ok { - return x.LocalCredentials - } - return nil -} - -type isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier interface { - isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() -} - -type GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials struct { - SslCredentials *GrpcService_GoogleGrpc_SslCredentials `protobuf:"bytes,1,opt,name=ssl_credentials,json=sslCredentials,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault struct { - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - GoogleDefault *emptypb.Empty `protobuf:"bytes,2,opt,name=google_default,json=googleDefault,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials struct { - LocalCredentials *GrpcService_GoogleGrpc_GoogleLocalCredentials `protobuf:"bytes,3,opt,name=local_credentials,json=localCredentials,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials) isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault) isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials) isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() { -} - -// [#next-free-field: 8] -type GrpcService_GoogleGrpc_CallCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to CredentialSpecifier: - // *GrpcService_GoogleGrpc_CallCredentials_AccessToken - // *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine - // *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken - // *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess - // *GrpcService_GoogleGrpc_CallCredentials_GoogleIam - // *GrpcService_GoogleGrpc_CallCredentials_FromPlugin - // *GrpcService_GoogleGrpc_CallCredentials_StsService_ - CredentialSpecifier isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier `protobuf_oneof:"credential_specifier"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3} -} - -func (m *GrpcService_GoogleGrpc_CallCredentials) GetCredentialSpecifier() isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier { - if m != nil { - return m.CredentialSpecifier - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetAccessToken() string { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_AccessToken); ok { - return x.AccessToken - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetGoogleComputeEngine() *emptypb.Empty { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine); ok { - return x.GoogleComputeEngine - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetGoogleRefreshToken() string { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken); ok { - return x.GoogleRefreshToken - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetServiceAccountJwtAccess() *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess); ok { - return x.ServiceAccountJwtAccess - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetGoogleIam() *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_GoogleIam); ok { - return x.GoogleIam - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetFromPlugin() *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_FromPlugin); ok { - return x.FromPlugin - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetStsService() *GrpcService_GoogleGrpc_CallCredentials_StsService { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_StsService_); ok { - return x.StsService - } - return nil -} - -type isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier interface { - isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() -} - -type GrpcService_GoogleGrpc_CallCredentials_AccessToken struct { - // Access token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#ad3a80da696ffdaea943f0f858d7a360d. - AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine struct { - // Google Compute Engine credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - GoogleComputeEngine *emptypb.Empty `protobuf:"bytes,2,opt,name=google_compute_engine,json=googleComputeEngine,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken struct { - // Google refresh token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a96901c997b91bc6513b08491e0dca37c. - GoogleRefreshToken string `protobuf:"bytes,3,opt,name=google_refresh_token,json=googleRefreshToken,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess struct { - // Service Account JWT Access credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a92a9f959d6102461f66ee973d8e9d3aa. - ServiceAccountJwtAccess *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials `protobuf:"bytes,4,opt,name=service_account_jwt_access,json=serviceAccountJwtAccess,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleIam struct { - // Google IAM credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a9fc1fc101b41e680d47028166e76f9d0. - GoogleIam *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials `protobuf:"bytes,5,opt,name=google_iam,json=googleIam,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_FromPlugin struct { - // Custom authenticator credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a823c6a4b19ffc71fb33e90154ee2ad07. - // https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms. - FromPlugin *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin `protobuf:"bytes,6,opt,name=from_plugin,json=fromPlugin,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_StsService_ struct { - // Custom security token service which implements OAuth 2.0 token exchange. - // https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 - // See https://github.com/grpc/grpc/pull/19587. - StsService *GrpcService_GoogleGrpc_CallCredentials_StsService `protobuf:"bytes,7,opt,name=sts_service,json=stsService,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_CallCredentials_AccessToken) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIam) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_FromPlugin) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_StsService_) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -// Channel arguments. -type GrpcService_GoogleGrpc_ChannelArgs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // See grpc_types.h GRPC_ARG #defines for keys that work here. - Args map[string]*GrpcService_GoogleGrpc_ChannelArgs_Value `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) Reset() { - *x = GrpcService_GoogleGrpc_ChannelArgs{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_ChannelArgs) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_ChannelArgs.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_ChannelArgs) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 4} -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) GetArgs() map[string]*GrpcService_GoogleGrpc_ChannelArgs_Value { - if x != nil { - return x.Args - } - return nil -} - -type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JsonKey string `protobuf:"bytes,1,opt,name=json_key,json=jsonKey,proto3" json:"json_key,omitempty"` - TokenLifetimeSeconds uint64 `protobuf:"varint,2,opt,name=token_lifetime_seconds,json=tokenLifetimeSeconds,proto3" json:"token_lifetime_seconds,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 0} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) GetJsonKey() string { - if x != nil { - return x.JsonKey - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) GetTokenLifetimeSeconds() uint64 { - if x != nil { - return x.TokenLifetimeSeconds - } - return 0 -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AuthorizationToken string `protobuf:"bytes,1,opt,name=authorization_token,json=authorizationToken,proto3" json:"authorization_token,omitempty"` - AuthoritySelector string `protobuf:"bytes,2,opt,name=authority_selector,json=authoritySelector,proto3" json:"authority_selector,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 1} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) GetAuthorizationToken() string { - if x != nil { - return x.AuthorizationToken - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) GetAuthoritySelector() string { - if x != nil { - return x.AuthoritySelector - } - return "" -} - -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to ConfigType: - // *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig - ConfigType isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 2} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetConfigType() isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType interface { - isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() -} - -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() { -} - -// Security token service configuration that allows Google gRPC to -// fetch security token from an OAuth 2.0 authorization server. -// See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and -// https://github.com/grpc/grpc/pull/19587. -// [#next-free-field: 10] -type GrpcService_GoogleGrpc_CallCredentials_StsService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // URI of the token exchange service that handles token exchange requests. - // [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - // https://github.com/envoyproxy/protoc-gen-validate/issues/303] - TokenExchangeServiceUri string `protobuf:"bytes,1,opt,name=token_exchange_service_uri,json=tokenExchangeServiceUri,proto3" json:"token_exchange_service_uri,omitempty"` - // Location of the target service or resource where the client - // intends to use the requested security token. - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - // Logical name of the target service where the client intends to - // use the requested security token. - Audience string `protobuf:"bytes,3,opt,name=audience,proto3" json:"audience,omitempty"` - // The desired scope of the requested security token in the - // context of the service or resource where the token will be used. - Scope string `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"` - // Type of the requested security token. - RequestedTokenType string `protobuf:"bytes,5,opt,name=requested_token_type,json=requestedTokenType,proto3" json:"requested_token_type,omitempty"` - // The path of subject token, a security token that represents the - // identity of the party on behalf of whom the request is being made. - SubjectTokenPath string `protobuf:"bytes,6,opt,name=subject_token_path,json=subjectTokenPath,proto3" json:"subject_token_path,omitempty"` - // Type of the subject token. - SubjectTokenType string `protobuf:"bytes,7,opt,name=subject_token_type,json=subjectTokenType,proto3" json:"subject_token_type,omitempty"` - // The path of actor token, a security token that represents the identity - // of the acting party. The acting party is authorized to use the - // requested security token and act on behalf of the subject. - ActorTokenPath string `protobuf:"bytes,8,opt,name=actor_token_path,json=actorTokenPath,proto3" json:"actor_token_path,omitempty"` - // Type of the actor token. - ActorTokenType string `protobuf:"bytes,9,opt,name=actor_token_type,json=actorTokenType,proto3" json:"actor_token_type,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_StsService{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_StsService) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_StsService.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_StsService) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 3} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetTokenExchangeServiceUri() string { - if x != nil { - return x.TokenExchangeServiceUri - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetAudience() string { - if x != nil { - return x.Audience - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetScope() string { - if x != nil { - return x.Scope - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetRequestedTokenType() string { - if x != nil { - return x.RequestedTokenType - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetSubjectTokenPath() string { - if x != nil { - return x.SubjectTokenPath - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetSubjectTokenType() string { - if x != nil { - return x.SubjectTokenType - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetActorTokenPath() string { - if x != nil { - return x.ActorTokenPath - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetActorTokenType() string { - if x != nil { - return x.ActorTokenType - } - return "" -} - -type GrpcService_GoogleGrpc_ChannelArgs_Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Pointer values are not supported, since they don't make any sense when - // delivered via the API. - // - // Types that are assignable to ValueSpecifier: - // *GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue - // *GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue - ValueSpecifier isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier `protobuf_oneof:"value_specifier"` -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) Reset() { - *x = GrpcService_GoogleGrpc_ChannelArgs_Value{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_ChannelArgs_Value) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_ChannelArgs_Value.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_ChannelArgs_Value) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP(), []int{0, 1, 4, 0} -} - -func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) GetValueSpecifier() isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier { - if m != nil { - return m.ValueSpecifier - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) GetStringValue() string { - if x, ok := x.GetValueSpecifier().(*GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue); ok { - return x.StringValue - } - return "" -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) GetIntValue() int64 { - if x, ok := x.GetValueSpecifier().(*GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue); ok { - return x.IntValue - } - return 0 -} - -type isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier interface { - isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier() -} - -type GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue struct { - IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue) isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier() { -} - -func (*GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue) isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier() { -} - -var File_envoy_config_core_v4alpha_grpc_service_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_grpc_service_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8a, 0x23, 0x0a, 0x0b, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x67, 0x72, 0x70, 0x63, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x76, 0x6f, 0x79, 0x47, 0x72, 0x70, 0x63, 0x48, 0x00, 0x52, 0x09, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x47, 0x72, 0x70, 0x63, 0x12, 0x54, 0x0a, 0x0b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, - 0x67, 0x72, 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x48, 0x00, 0x52, - 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x12, 0x33, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x12, 0x51, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0x9b, 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x47, 0x72, 0x70, - 0x63, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x11, 0xfa, 0x42, 0x0e, 0x72, 0x0c, 0x10, 0x00, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x02, - 0xc8, 0x01, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x31, - 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x47, 0x72, 0x70, - 0x63, 0x1a, 0xe3, 0x1e, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, - 0x12, 0x26, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x72, 0x69, 0x12, 0x75, 0x0a, 0x13, 0x63, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x12, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, - 0x6c, 0x0a, 0x10, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, - 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x0f, 0x63, 0x61, - 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x28, 0x0a, - 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x38, 0x0a, 0x18, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x5e, 0x0a, 0x1d, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x19, 0x70, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x60, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, - 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x41, 0x72, 0x67, 0x73, 0x1a, 0xaf, 0x02, 0x0a, 0x0e, 0x53, 0x73, 0x6c, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x5f, - 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x4e, 0x0a, - 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, - 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x44, 0x0a, - 0x0a, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x63, 0x65, 0x72, 0x74, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x63, 0x0a, 0x16, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x3a, 0x49, 0x9a, 0xc5, 0x88, 0x1e, 0x44, 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x9f, 0x03, 0x0a, 0x12, - 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x73, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, - 0x0e, 0x73, 0x73, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, - 0x3f, 0x0a, 0x0e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, - 0x00, 0x52, 0x0d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x77, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, - 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x42, 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xac, 0x0f, - 0x0a, 0x0f, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x12, 0x23, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x4c, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, - 0x13, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x45, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6a, 0x77, 0x74, - 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x64, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, - 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x17, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x77, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x77, - 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x69, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x61, 0x6d, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, - 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x48, 0x00, - 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x6f, 0x0a, 0x0b, - 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, - 0x00, 0x52, 0x0a, 0x73, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0xdc, 0x01, - 0x0a, 0x22, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4a, 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x73, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, - 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x14, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x3a, 0x65, 0x9a, 0xc5, 0x88, 0x1e, 0x60, 0x0a, 0x5e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xcf, 0x01, 0x0a, - 0x14, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x57, 0x9a, 0xc5, 0x88, 0x1e, 0x52, 0x0a, 0x50, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xed, - 0x01, 0x0a, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, - 0x60, 0x9a, 0xc5, 0x88, 0x1e, 0x5b, 0x0a, 0x59, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xda, - 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, - 0x1a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x17, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x72, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, - 0x68, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x4d, 0x9a, 0xc5, - 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x42, 0x9a, 0xc5, 0x88, - 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, - 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xd4, 0x03, 0x0a, - 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x5b, 0x0a, 0x04, - 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x1a, 0xa9, 0x01, 0x0a, 0x05, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x16, 0x0a, - 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x7c, 0x0a, 0x09, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x59, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, - 0x67, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, - 0x72, 0x67, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x42, 0x17, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, - 0x45, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x10, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_grpc_service_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_grpc_service_proto_rawDescData = file_envoy_config_core_v4alpha_grpc_service_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_grpc_service_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_grpc_service_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_grpc_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_grpc_service_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_grpc_service_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_envoy_config_core_v4alpha_grpc_service_proto_goTypes = []interface{}{ - (*GrpcService)(nil), // 0: envoy.config.core.v4alpha.GrpcService - (*GrpcService_EnvoyGrpc)(nil), // 1: envoy.config.core.v4alpha.GrpcService.EnvoyGrpc - (*GrpcService_GoogleGrpc)(nil), // 2: envoy.config.core.v4alpha.GrpcService.GoogleGrpc - (*GrpcService_GoogleGrpc_SslCredentials)(nil), // 3: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.SslCredentials - (*GrpcService_GoogleGrpc_GoogleLocalCredentials)(nil), // 4: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.GoogleLocalCredentials - (*GrpcService_GoogleGrpc_ChannelCredentials)(nil), // 5: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelCredentials - (*GrpcService_GoogleGrpc_CallCredentials)(nil), // 6: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials - (*GrpcService_GoogleGrpc_ChannelArgs)(nil), // 7: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs - (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials)(nil), // 8: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials - (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials)(nil), // 9: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials - (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin)(nil), // 10: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin - (*GrpcService_GoogleGrpc_CallCredentials_StsService)(nil), // 11: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.StsService - (*GrpcService_GoogleGrpc_ChannelArgs_Value)(nil), // 12: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs.Value - nil, // 13: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry - (*duration.Duration)(nil), // 14: google.protobuf.Duration - (*HeaderValue)(nil), // 15: envoy.config.core.v4alpha.HeaderValue - (*_struct.Struct)(nil), // 16: google.protobuf.Struct - (*wrappers.UInt32Value)(nil), // 17: google.protobuf.UInt32Value - (*DataSource)(nil), // 18: envoy.config.core.v4alpha.DataSource - (*emptypb.Empty)(nil), // 19: google.protobuf.Empty - (*any.Any)(nil), // 20: google.protobuf.Any -} -var file_envoy_config_core_v4alpha_grpc_service_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v4alpha.GrpcService.envoy_grpc:type_name -> envoy.config.core.v4alpha.GrpcService.EnvoyGrpc - 2, // 1: envoy.config.core.v4alpha.GrpcService.google_grpc:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc - 14, // 2: envoy.config.core.v4alpha.GrpcService.timeout:type_name -> google.protobuf.Duration - 15, // 3: envoy.config.core.v4alpha.GrpcService.initial_metadata:type_name -> envoy.config.core.v4alpha.HeaderValue - 5, // 4: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.channel_credentials:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelCredentials - 6, // 5: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.call_credentials:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials - 16, // 6: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.config:type_name -> google.protobuf.Struct - 17, // 7: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.per_stream_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 7, // 8: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.channel_args:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs - 18, // 9: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.SslCredentials.root_certs:type_name -> envoy.config.core.v4alpha.DataSource - 18, // 10: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.SslCredentials.private_key:type_name -> envoy.config.core.v4alpha.DataSource - 18, // 11: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.SslCredentials.cert_chain:type_name -> envoy.config.core.v4alpha.DataSource - 3, // 12: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelCredentials.ssl_credentials:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.SslCredentials - 19, // 13: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelCredentials.google_default:type_name -> google.protobuf.Empty - 4, // 14: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelCredentials.local_credentials:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.GoogleLocalCredentials - 19, // 15: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.google_compute_engine:type_name -> google.protobuf.Empty - 8, // 16: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.service_account_jwt_access:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials - 9, // 17: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.google_iam:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials - 10, // 18: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.from_plugin:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin - 11, // 19: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.sts_service:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.StsService - 13, // 20: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs.args:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry - 20, // 21: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin.typed_config:type_name -> google.protobuf.Any - 12, // 22: envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry.value:type_name -> envoy.config.core.v4alpha.GrpcService.GoogleGrpc.ChannelArgs.Value - 23, // [23:23] is the sub-list for method output_type - 23, // [23:23] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_grpc_service_proto_init() } -func file_envoy_config_core_v4alpha_grpc_service_proto_init() { - if File_envoy_config_core_v4alpha_grpc_service_proto != nil { - return - } - file_envoy_config_core_v4alpha_base_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_EnvoyGrpc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_SslCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_GoogleLocalCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_ChannelCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_ChannelArgs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_StsService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_ChannelArgs_Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*GrpcService_EnvoyGrpc_)(nil), - (*GrpcService_GoogleGrpc_)(nil), - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials)(nil), - (*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault)(nil), - (*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials)(nil), - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_CallCredentials_AccessToken)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_GoogleIam)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_FromPlugin)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_StsService_)(nil), - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig)(nil), - } - file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes[12].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue)(nil), - (*GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_grpc_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_grpc_service_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_grpc_service_proto_depIdxs, - MessageInfos: file_envoy_config_core_v4alpha_grpc_service_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_grpc_service_proto = out.File - file_envoy_config_core_v4alpha_grpc_service_proto_rawDesc = nil - file_envoy_config_core_v4alpha_grpc_service_proto_goTypes = nil - file_envoy_config_core_v4alpha_grpc_service_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/grpc_service.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/grpc_service.pb.validate.go deleted file mode 100644 index 5ffbd6519d..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/grpc_service.pb.validate.go +++ /dev/null @@ -1,1353 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/grpc_service.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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. -func (m *GrpcService) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetInitialMetadata() { - _, _ = idx, item - - if 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, - } - } - } - - } - - switch m.TargetSpecifier.(type) { - - case *GrpcService_EnvoyGrpc_: - - if v, ok := interface{}(m.GetEnvoyGrpc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "EnvoyGrpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_: - - if v, ok := interface{}(m.GetGoogleGrpc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "GoogleGrpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return GrpcServiceValidationError{ - field: "TargetSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// GrpcServiceValidationError is the validation error returned by -// GrpcService.Validate if the designated constraints aren't met. -type GrpcServiceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcServiceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcServiceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcServiceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcServiceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcServiceValidationError) ErrorName() string { return "GrpcServiceValidationError" } - -// Error satisfies the builtin error interface -func (e GrpcServiceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcServiceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcServiceValidationError{} - -// Validate checks the field values on GrpcService_EnvoyGrpc with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *GrpcService_EnvoyGrpc) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return GrpcService_EnvoyGrpcValidationError{ - field: "ClusterName", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetAuthority()) < 0 { - return GrpcService_EnvoyGrpcValidationError{ - field: "Authority", - reason: "value length must be at least 0 runes", - } - } - - if len(m.GetAuthority()) > 16384 { - return GrpcService_EnvoyGrpcValidationError{ - field: "Authority", - reason: "value length must be at most 16384 bytes", - } - } - - if !_GrpcService_EnvoyGrpc_Authority_Pattern.MatchString(m.GetAuthority()) { - return GrpcService_EnvoyGrpcValidationError{ - field: "Authority", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - return nil -} - -// GrpcService_EnvoyGrpcValidationError is the validation error returned by -// GrpcService_EnvoyGrpc.Validate if the designated constraints aren't met. -type GrpcService_EnvoyGrpcValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_EnvoyGrpcValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_EnvoyGrpcValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_EnvoyGrpcValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_EnvoyGrpcValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_EnvoyGrpcValidationError) ErrorName() string { - return "GrpcService_EnvoyGrpcValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_EnvoyGrpcValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_EnvoyGrpc.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_EnvoyGrpcValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_EnvoyGrpcValidationError{} - -var _GrpcService_EnvoyGrpc_Authority_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on GrpcService_GoogleGrpc with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *GrpcService_GoogleGrpc) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetTargetUri()) < 1 { - return GrpcService_GoogleGrpcValidationError{ - field: "TargetUri", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetChannelCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "ChannelCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetCallCredentials() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: fmt.Sprintf("CallCredentials[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return GrpcService_GoogleGrpcValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - // no validation rules for CredentialsFactoryName - - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetPerStreamBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "PerStreamBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetChannelArgs()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "ChannelArgs", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// GrpcService_GoogleGrpcValidationError is the validation error returned by -// GrpcService_GoogleGrpc.Validate if the designated constraints aren't met. -type GrpcService_GoogleGrpcValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpcValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpcValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpcValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpcValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpcValidationError) ErrorName() string { - return "GrpcService_GoogleGrpcValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpcValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpcValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpcValidationError{} - -// Validate checks the field values on GrpcService_GoogleGrpc_SslCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetRootCerts()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "RootCerts", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if 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, - } - } - } - - return nil -} - -// GrpcService_GoogleGrpc_SslCredentialsValidationError is the validation error -// returned by GrpcService_GoogleGrpc_SslCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_SslCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_SslCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_SslCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_SslCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_SslCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError is the -// validation error returned by -// GrpcService_GoogleGrpc_GoogleLocalCredentials.Validate if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_GoogleLocalCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { - if m == nil { - return nil - } - - switch m.CredentialSpecifier.(type) { - - case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials: - - if v, ok := interface{}(m.GetSslCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "SslCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault: - - if v, ok := interface{}(m.GetGoogleDefault()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "GoogleDefault", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials: - - if v, ok := interface{}(m.GetLocalCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "LocalCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// GrpcService_GoogleGrpc_ChannelCredentialsValidationError is the validation -// error returned by GrpcService_GoogleGrpc_ChannelCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_ChannelCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_ChannelCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_ChannelCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_ChannelCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_ChannelCredentialsValidationError{} - -// Validate checks the field values on GrpcService_GoogleGrpc_CallCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { - if m == nil { - return nil - } - - switch m.CredentialSpecifier.(type) { - - case *GrpcService_GoogleGrpc_CallCredentials_AccessToken: - // no validation rules for AccessToken - - case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine: - - if v, ok := interface{}(m.GetGoogleComputeEngine()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleComputeEngine", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken: - // no validation rules for GoogleRefreshToken - - case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess: - - if v, ok := interface{}(m.GetServiceAccountJwtAccess()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "ServiceAccountJwtAccess", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_GoogleIam: - - if v, ok := interface{}(m.GetGoogleIam()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleIam", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_FromPlugin: - - if v, ok := interface{}(m.GetFromPlugin()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "FromPlugin", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_StsService_: - - if v, ok := interface{}(m.GetStsService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "StsService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentialsValidationError is the validation -// error returned by GrpcService_GoogleGrpc_CallCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentialsValidationError{} - -// Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_ChannelArgs) Validate() error { - if m == nil { - return nil - } - - for key, val := range m.GetArgs() { - _ = val - - // no validation rules for Args[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelArgsValidationError{ - field: fmt.Sprintf("Args[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// GrpcService_GoogleGrpc_ChannelArgsValidationError is the validation error -// returned by GrpcService_GoogleGrpc_ChannelArgs.Validate if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_ChannelArgsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_ChannelArgsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_ChannelArgs.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_ChannelArgsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_ChannelArgsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Validate() error { - if m == nil { - return nil - } - - // no validation rules for JsonKey - - // no validation rules for TokenLifetimeSeconds - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError -// is the validation error returned by -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Validate -// if the designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Validate() error { - if m == nil { - return nil - } - - // no validation rules for AuthorizationToken - - // no validation rules for AuthoritySelector - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError -// is the validation error returned by -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - switch m.ConfigType.(type) { - - case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig: - - 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, - } - } - } - - } - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError -// is the validation error returned by -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Validate -// if the designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_StsService with the rules defined in -// the proto definition for this message. If any rules are violated, 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 utf8.RuneCountInString(m.GetSubjectTokenPath()) < 1 { - return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ - field: "SubjectTokenPath", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetSubjectTokenType()) < 1 { - return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ - field: "SubjectTokenType", - reason: "value length must be at least 1 runes", - } - } - - // 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{} - -// Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs_Value -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) Validate() error { - if m == nil { - return nil - } - - switch m.ValueSpecifier.(type) { - - case *GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue: - // no validation rules for StringValue - - case *GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue: - // no validation rules for IntValue - - default: - return GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{ - field: "ValueSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError is the validation -// error returned by GrpcService_GoogleGrpc_ChannelArgs_Value.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_ChannelArgs_Value.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/health_check.pb.go b/pkg/api/envoy/config/core/v4alpha/health_check.pb.go deleted file mode 100644 index 135be24c54..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/health_check.pb.go +++ /dev/null @@ -1,1483 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/health_check.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Endpoint health status. -type HealthStatus int32 - -const ( - // The health status is not known. This is interpreted by Envoy as *HEALTHY*. - HealthStatus_UNKNOWN HealthStatus = 0 - // Healthy. - HealthStatus_HEALTHY HealthStatus = 1 - // Unhealthy. - HealthStatus_UNHEALTHY HealthStatus = 2 - // Connection draining in progress. E.g., - // ``_ - // or - // ``_. - // This is interpreted by Envoy as *UNHEALTHY*. - HealthStatus_DRAINING HealthStatus = 3 - // Health check timed out. This is part of HDS and is interpreted by Envoy as - // *UNHEALTHY*. - HealthStatus_TIMEOUT HealthStatus = 4 - // Degraded. - HealthStatus_DEGRADED HealthStatus = 5 -) - -// Enum value maps for HealthStatus. -var ( - HealthStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "HEALTHY", - 2: "UNHEALTHY", - 3: "DRAINING", - 4: "TIMEOUT", - 5: "DEGRADED", - } - HealthStatus_value = map[string]int32{ - "UNKNOWN": 0, - "HEALTHY": 1, - "UNHEALTHY": 2, - "DRAINING": 3, - "TIMEOUT": 4, - "DEGRADED": 5, - } -) - -func (x HealthStatus) Enum() *HealthStatus { - p := new(HealthStatus) - *p = x - return p -} - -func (x HealthStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_health_check_proto_enumTypes[0].Descriptor() -} - -func (HealthStatus) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_health_check_proto_enumTypes[0] -} - -func (x HealthStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HealthStatus.Descriptor instead. -func (HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0} -} - -// [#next-free-field: 25] -type HealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The time to wait for a health check response. If the timeout is reached the - // health check attempt will be considered a failure. - Timeout *duration.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` - // The interval between health checks. - Interval *duration.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` - // An optional jitter amount in milliseconds. If specified, Envoy will start health - // checking after for a random time in ms between 0 and initial_jitter. This only - // applies to the first health check. - InitialJitter *duration.Duration `protobuf:"bytes,20,opt,name=initial_jitter,json=initialJitter,proto3" json:"initial_jitter,omitempty"` - // An optional jitter amount in milliseconds. If specified, during every - // interval Envoy will add interval_jitter to the wait time. - IntervalJitter *duration.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 *wrappers.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 *wrappers.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 *wrappers.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 *wrappers.BoolValue `protobuf:"bytes,7,opt,name=reuse_connection,json=reuseConnection,proto3" json:"reuse_connection,omitempty"` - // Types that are assignable to HealthChecker: - // *HealthCheck_HttpHealthCheck_ - // *HealthCheck_TcpHealthCheck_ - // *HealthCheck_GrpcHealthCheck_ - // *HealthCheck_CustomHealthCheck_ - HealthChecker isHealthCheck_HealthChecker `protobuf_oneof:"health_checker"` - // The "no traffic interval" is a special health check interval that is used when a cluster has - // never had traffic routed to it. This lower interval allows cluster information to be kept up to - // date, without sending a potentially large amount of active health checking traffic for no - // reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. Note that this interval takes precedence over - // any other. - // - // The default value for "no traffic interval" is 60 seconds. - NoTrafficInterval *duration.Duration `protobuf:"bytes,12,opt,name=no_traffic_interval,json=noTrafficInterval,proto3" json:"no_traffic_interval,omitempty"` - // The "no traffic healthy interval" is a special health check interval that - // is used for hosts that are currently passing active health checking - // (including new hosts) when the cluster has received no traffic. - // - // This is useful for when we want to send frequent health checks with - // `no_traffic_interval` but then revert to lower frequency `no_traffic_healthy_interval` once - // a host in the cluster is marked as healthy. - // - // Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. - // - // If no_traffic_healthy_interval is not set, it will default to the - // no traffic interval and send that interval regardless of health state. - NoTrafficHealthyInterval *duration.Duration `protobuf:"bytes,24,opt,name=no_traffic_healthy_interval,json=noTrafficHealthyInterval,proto3" json:"no_traffic_healthy_interval,omitempty"` - // The "unhealthy interval" is a health check interval that is used for hosts that are marked as - // unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the - // standard health check interval that is defined. - // - // The default value for "unhealthy interval" is the same as "interval". - UnhealthyInterval *duration.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 *duration.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 *duration.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"` - // [#not-implemented-hide:] - // The gRPC service for the health check event service. - // If empty, health check events won't be sent to a remote endpoint. - EventService *EventServiceConfig `protobuf:"bytes,22,opt,name=event_service,json=eventService,proto3" json:"event_service,omitempty"` - // If set to true, health check failure events will always be logged. If set to false, only the - // initial health check failure event will be logged. - // The default value is false. - AlwaysLogHealthCheckFailures bool `protobuf:"varint,19,opt,name=always_log_health_check_failures,json=alwaysLogHealthCheckFailures,proto3" json:"always_log_health_check_failures,omitempty"` - // This allows overriding the cluster TLS settings, just for health check connections. - TlsOptions *HealthCheck_TlsOptions `protobuf:"bytes,21,opt,name=tls_options,json=tlsOptions,proto3" json:"tls_options,omitempty"` - // Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's - // :ref:`tranport socket matches `. - // For example, the following match criteria - // - // .. code-block:: yaml - // - // transport_socket_match_criteria: - // useMTLS: true - // - // Will match the following :ref:`cluster socket match ` - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "useMTLS" - // match: - // useMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. - // This allows using different transport socket capabilities for health checking versus proxying to the - // endpoint. - // - // If the key/values pairs specified do not match any - // :ref:`transport socket matches `, - // the cluster's :ref:`transport socket ` - // will be used for health check socket configuration. - TransportSocketMatchCriteria *_struct.Struct `protobuf:"bytes,23,opt,name=transport_socket_match_criteria,json=transportSocketMatchCriteria,proto3" json:"transport_socket_match_criteria,omitempty"` -} - -func (x *HealthCheck) Reset() { - *x = HealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck) ProtoMessage() {} - -func (x *HealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0} -} - -func (x *HealthCheck) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *HealthCheck) GetInterval() *duration.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *HealthCheck) GetInitialJitter() *duration.Duration { - if x != nil { - return x.InitialJitter - } - return nil -} - -func (x *HealthCheck) GetIntervalJitter() *duration.Duration { - if x != nil { - return x.IntervalJitter - } - return nil -} - -func (x *HealthCheck) GetIntervalJitterPercent() uint32 { - if x != nil { - return x.IntervalJitterPercent - } - return 0 -} - -func (x *HealthCheck) GetUnhealthyThreshold() *wrappers.UInt32Value { - if x != nil { - return x.UnhealthyThreshold - } - return nil -} - -func (x *HealthCheck) GetHealthyThreshold() *wrappers.UInt32Value { - if x != nil { - return x.HealthyThreshold - } - return nil -} - -func (x *HealthCheck) GetAltPort() *wrappers.UInt32Value { - if x != nil { - return x.AltPort - } - return nil -} - -func (x *HealthCheck) GetReuseConnection() *wrappers.BoolValue { - if x != nil { - return x.ReuseConnection - } - return nil -} - -func (m *HealthCheck) GetHealthChecker() isHealthCheck_HealthChecker { - if m != nil { - return m.HealthChecker - } - return nil -} - -func (x *HealthCheck) GetHttpHealthCheck() *HealthCheck_HttpHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_HttpHealthCheck_); ok { - return x.HttpHealthCheck - } - return nil -} - -func (x *HealthCheck) GetTcpHealthCheck() *HealthCheck_TcpHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_TcpHealthCheck_); ok { - return x.TcpHealthCheck - } - return nil -} - -func (x *HealthCheck) GetGrpcHealthCheck() *HealthCheck_GrpcHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_GrpcHealthCheck_); ok { - return x.GrpcHealthCheck - } - return nil -} - -func (x *HealthCheck) GetCustomHealthCheck() *HealthCheck_CustomHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_CustomHealthCheck_); ok { - return x.CustomHealthCheck - } - return nil -} - -func (x *HealthCheck) GetNoTrafficInterval() *duration.Duration { - if x != nil { - return x.NoTrafficInterval - } - return nil -} - -func (x *HealthCheck) GetNoTrafficHealthyInterval() *duration.Duration { - if x != nil { - return x.NoTrafficHealthyInterval - } - return nil -} - -func (x *HealthCheck) GetUnhealthyInterval() *duration.Duration { - if x != nil { - return x.UnhealthyInterval - } - return nil -} - -func (x *HealthCheck) GetUnhealthyEdgeInterval() *duration.Duration { - if x != nil { - return x.UnhealthyEdgeInterval - } - return nil -} - -func (x *HealthCheck) GetHealthyEdgeInterval() *duration.Duration { - if x != nil { - return x.HealthyEdgeInterval - } - return nil -} - -func (x *HealthCheck) GetEventLogPath() string { - if x != nil { - return x.EventLogPath - } - return "" -} - -func (x *HealthCheck) GetEventService() *EventServiceConfig { - if x != nil { - return x.EventService - } - return nil -} - -func (x *HealthCheck) GetAlwaysLogHealthCheckFailures() bool { - if x != nil { - return x.AlwaysLogHealthCheckFailures - } - return false -} - -func (x *HealthCheck) GetTlsOptions() *HealthCheck_TlsOptions { - if x != nil { - return x.TlsOptions - } - return nil -} - -func (x *HealthCheck) GetTransportSocketMatchCriteria() *_struct.Struct { - if x != nil { - return x.TransportSocketMatchCriteria - } - return nil -} - -type isHealthCheck_HealthChecker interface { - isHealthCheck_HealthChecker() -} - -type HealthCheck_HttpHealthCheck_ struct { - // HTTP health check. - HttpHealthCheck *HealthCheck_HttpHealthCheck `protobuf:"bytes,8,opt,name=http_health_check,json=httpHealthCheck,proto3,oneof"` -} - -type HealthCheck_TcpHealthCheck_ struct { - // TCP health check. - TcpHealthCheck *HealthCheck_TcpHealthCheck `protobuf:"bytes,9,opt,name=tcp_health_check,json=tcpHealthCheck,proto3,oneof"` -} - -type HealthCheck_GrpcHealthCheck_ struct { - // gRPC health check. - GrpcHealthCheck *HealthCheck_GrpcHealthCheck `protobuf:"bytes,11,opt,name=grpc_health_check,json=grpcHealthCheck,proto3,oneof"` -} - -type HealthCheck_CustomHealthCheck_ struct { - // Custom health check. - CustomHealthCheck *HealthCheck_CustomHealthCheck `protobuf:"bytes,13,opt,name=custom_health_check,json=customHealthCheck,proto3,oneof"` -} - -func (*HealthCheck_HttpHealthCheck_) isHealthCheck_HealthChecker() {} - -func (*HealthCheck_TcpHealthCheck_) isHealthCheck_HealthChecker() {} - -func (*HealthCheck_GrpcHealthCheck_) isHealthCheck_HealthChecker() {} - -func (*HealthCheck_CustomHealthCheck_) isHealthCheck_HealthChecker() {} - -// Describes the encoding of the payload bytes in the payload. -type HealthCheck_Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Payload: - // *HealthCheck_Payload_Text - // *HealthCheck_Payload_Binary - Payload isHealthCheck_Payload_Payload `protobuf_oneof:"payload"` -} - -func (x *HealthCheck_Payload) Reset() { - *x = HealthCheck_Payload{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_Payload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_Payload) ProtoMessage() {} - -func (x *HealthCheck_Payload) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_Payload.ProtoReflect.Descriptor instead. -func (*HealthCheck_Payload) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *HealthCheck_Payload) GetPayload() isHealthCheck_Payload_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (x *HealthCheck_Payload) GetText() string { - if x, ok := x.GetPayload().(*HealthCheck_Payload_Text); ok { - return x.Text - } - return "" -} - -func (x *HealthCheck_Payload) GetBinary() []byte { - if x, ok := x.GetPayload().(*HealthCheck_Payload_Binary); ok { - return x.Binary - } - return nil -} - -type isHealthCheck_Payload_Payload interface { - isHealthCheck_Payload_Payload() -} - -type HealthCheck_Payload_Text struct { - // Hex encoded payload. E.g., "000000FF". - Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"` -} - -type HealthCheck_Payload_Binary struct { - // [#not-implemented-hide:] Binary payload. - Binary []byte `protobuf:"bytes,2,opt,name=binary,proto3,oneof"` -} - -func (*HealthCheck_Payload_Text) isHealthCheck_Payload_Payload() {} - -func (*HealthCheck_Payload_Binary) isHealthCheck_Payload_Payload() {} - -// [#next-free-field: 12] -type HealthCheck_HttpHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value of the host header in the HTTP health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // Specifies the HTTP path that will be requested during health checking. For example - // */healthcheck*. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // [#not-implemented-hide:] HTTP specific payload. - Send *HealthCheck_Payload `protobuf:"bytes,3,opt,name=send,proto3" json:"send,omitempty"` - // [#not-implemented-hide:] HTTP specific response. - Receive *HealthCheck_Payload `protobuf:"bytes,4,opt,name=receive,proto3" json:"receive,omitempty"` - // Specifies a list of HTTP headers that should be added to each request that is sent to the - // health checked cluster. For more information, including details on header value syntax, see - // the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request that is sent to the - // health checked cluster. - RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default - // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open - // semantics of :ref:`Int64Range `. The start and end of each - // range are required. Only statuses in the range [100, 600) are allowed. - ExpectedStatuses []*v3.Int64Range `protobuf:"bytes,9,rep,name=expected_statuses,json=expectedStatuses,proto3" json:"expected_statuses,omitempty"` - // Use specified application protocol for health checks. - CodecClientType v3.CodecClientType `protobuf:"varint,10,opt,name=codec_client_type,json=codecClientType,proto3,enum=envoy.type.v3.CodecClientType" json:"codec_client_type,omitempty"` - // An optional service name parameter which is used to validate the identity of - // the health checked cluster using a :ref:`StringMatcher - // `. See the :ref:`architecture overview - // ` for more information. - ServiceNameMatcher *v4alpha.StringMatcher `protobuf:"bytes,11,opt,name=service_name_matcher,json=serviceNameMatcher,proto3" json:"service_name_matcher,omitempty"` -} - -func (x *HealthCheck_HttpHealthCheck) Reset() { - *x = HealthCheck_HttpHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_HttpHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_HttpHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_HttpHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_HttpHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_HttpHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *HealthCheck_HttpHealthCheck) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *HealthCheck_HttpHealthCheck) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *HealthCheck_HttpHealthCheck) GetSend() *HealthCheck_Payload { - if x != nil { - return x.Send - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetReceive() *HealthCheck_Payload { - if x != nil { - return x.Receive - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetRequestHeadersToAdd() []*HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetExpectedStatuses() []*v3.Int64Range { - if x != nil { - return x.ExpectedStatuses - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetCodecClientType() v3.CodecClientType { - if x != nil { - return x.CodecClientType - } - return v3.CodecClientType_HTTP1 -} - -func (x *HealthCheck_HttpHealthCheck) GetServiceNameMatcher() *v4alpha.StringMatcher { - if x != nil { - return x.ServiceNameMatcher - } - return nil -} - -type HealthCheck_TcpHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Empty payloads imply a connect-only health check. - Send *HealthCheck_Payload `protobuf:"bytes,1,opt,name=send,proto3" json:"send,omitempty"` - // When checking the response, “fuzzy” matching is performed such that each - // binary block must be found, and in the order specified, but not - // necessarily contiguous. - Receive []*HealthCheck_Payload `protobuf:"bytes,2,rep,name=receive,proto3" json:"receive,omitempty"` -} - -func (x *HealthCheck_TcpHealthCheck) Reset() { - *x = HealthCheck_TcpHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_TcpHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_TcpHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_TcpHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_TcpHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_TcpHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *HealthCheck_TcpHealthCheck) GetSend() *HealthCheck_Payload { - if x != nil { - return x.Send - } - return nil -} - -func (x *HealthCheck_TcpHealthCheck) GetReceive() []*HealthCheck_Payload { - if x != nil { - return x.Receive - } - return nil -} - -type HealthCheck_RedisHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If set, optionally perform ``EXISTS `` instead of ``PING``. A return value - // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other - // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance - // by setting the specified key to any value and waiting for traffic to drain. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *HealthCheck_RedisHealthCheck) Reset() { - *x = HealthCheck_RedisHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_RedisHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_RedisHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_RedisHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_RedisHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_RedisHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *HealthCheck_RedisHealthCheck) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -// `grpc.health.v1.Health -// `_-based -// healthcheck. See `gRPC doc `_ -// for details. -type HealthCheck_GrpcHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An optional service name parameter which will be sent to gRPC service in - // `grpc.health.v1.HealthCheckRequest - // `_. - // message. See `gRPC health-checking overview - // `_ for more information. - ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` - // The value of the :authority header in the gRPC health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` -} - -func (x *HealthCheck_GrpcHealthCheck) Reset() { - *x = HealthCheck_GrpcHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_GrpcHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_GrpcHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_GrpcHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_GrpcHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_GrpcHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0, 4} -} - -func (x *HealthCheck_GrpcHealthCheck) GetServiceName() string { - if x != nil { - return x.ServiceName - } - return "" -} - -func (x *HealthCheck_GrpcHealthCheck) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -// Custom health check. -type HealthCheck_CustomHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The registered name of the custom health checker. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A custom health checker specific configuration which depends on the custom health checker - // being instantiated. See :api:`envoy/config/health_checker` for reference. - // - // Types that are assignable to ConfigType: - // *HealthCheck_CustomHealthCheck_TypedConfig - ConfigType isHealthCheck_CustomHealthCheck_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *HealthCheck_CustomHealthCheck) Reset() { - *x = HealthCheck_CustomHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_CustomHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_CustomHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_CustomHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_CustomHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_CustomHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0, 5} -} - -func (x *HealthCheck_CustomHealthCheck) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *HealthCheck_CustomHealthCheck) GetConfigType() isHealthCheck_CustomHealthCheck_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *HealthCheck_CustomHealthCheck) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*HealthCheck_CustomHealthCheck_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isHealthCheck_CustomHealthCheck_ConfigType interface { - isHealthCheck_CustomHealthCheck_ConfigType() -} - -type HealthCheck_CustomHealthCheck_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*HealthCheck_CustomHealthCheck_TypedConfig) isHealthCheck_CustomHealthCheck_ConfigType() {} - -// Health checks occur over the transport socket specified for the cluster. This implies that if a -// cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. -// -// This allows overriding the cluster TLS settings, just for health check connections. -type HealthCheck_TlsOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the ALPN protocols for health check connections. This is useful if the - // corresponding upstream is using ALPN-based :ref:`FilterChainMatch - // ` along with different protocols for health checks - // versus data connections. If empty, no ALPN protocols will be set on health check connections. - AlpnProtocols []string `protobuf:"bytes,1,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` -} - -func (x *HealthCheck_TlsOptions) Reset() { - *x = HealthCheck_TlsOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_TlsOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_TlsOptions) ProtoMessage() {} - -func (x *HealthCheck_TlsOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_health_check_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_TlsOptions.ProtoReflect.Descriptor instead. -func (*HealthCheck_TlsOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP(), []int{0, 6} -} - -func (x *HealthCheck_TlsOptions) GetAlpnProtocols() []string { - if x != nil { - return x.AlpnProtocols - } - return nil -} - -var File_envoy_config_core_v4alpha_health_check_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_health_check_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x1c, 0x0a, - 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, - 0x08, 0x01, 0x2a, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, - 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x40, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, - 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, - 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x57, - 0x0a, 0x13, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x08, - 0x61, 0x6c, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x61, 0x6c, - 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x75, - 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x11, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, - 0x00, 0x52, 0x0f, 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x61, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x64, 0x0a, 0x11, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x72, 0x70, 0x63, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x6a, 0x0a, 0x13, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x74, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x11, 0x6e, 0x6f, 0x54, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x62, 0x0a, 0x1b, - 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x18, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, - 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x52, 0x0a, 0x12, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, - 0x00, 0x52, 0x11, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5b, 0x0a, 0x17, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x79, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x15, 0x75, 0x6e, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x57, 0x0a, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x65, 0x64, 0x67, - 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, 0x64, - 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x52, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x6c, - 0x6f, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, - 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, - 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x4c, 0x6f, 0x67, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0b, - 0x74, 0x6c, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x5e, 0x0a, 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, - 0x72, 0x69, 0x61, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x52, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x1a, 0x83, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1d, 0x0a, 0x04, - 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x62, - 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x62, - 0x69, 0x6e, 0x61, 0x72, 0x79, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0e, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf7, 0x05, 0x0a, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1f, 0x0a, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, - 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, - 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x42, - 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x04, 0x73, 0x65, - 0x6e, 0x64, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x6c, 0x0a, 0x16, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, - 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, - 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, - 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, - 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x10, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, - 0x54, 0x0a, 0x11, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x04, 0x08, 0x05, 0x10, - 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x32, - 0x1a, 0xd6, 0x01, 0x0a, 0x0e, 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x12, 0x42, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x52, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x63, 0x70, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x5e, 0x0a, 0x10, 0x52, 0x65, 0x64, - 0x69, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, - 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x98, 0x01, 0x0a, 0x0f, 0x47, 0x72, - 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, - 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x29, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x37, 0x9a, 0xc5, 0x88, - 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x1a, 0xc3, 0x01, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x0d, 0x0a, - 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x67, 0x0a, 0x0a, 0x54, 0x6c, - 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x3a, - 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x15, 0x0a, 0x0e, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x2a, 0x60, 0x0a, 0x0c, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, - 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, - 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, - 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0c, 0x0a, - 0x08, 0x44, 0x45, 0x47, 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, 0x05, 0x42, 0x45, 0x0a, 0x27, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_health_check_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_health_check_proto_rawDescData = file_envoy_config_core_v4alpha_health_check_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_health_check_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_health_check_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_health_check_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_health_check_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_health_check_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v4alpha_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_envoy_config_core_v4alpha_health_check_proto_goTypes = []interface{}{ - (HealthStatus)(0), // 0: envoy.config.core.v4alpha.HealthStatus - (*HealthCheck)(nil), // 1: envoy.config.core.v4alpha.HealthCheck - (*HealthCheck_Payload)(nil), // 2: envoy.config.core.v4alpha.HealthCheck.Payload - (*HealthCheck_HttpHealthCheck)(nil), // 3: envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck - (*HealthCheck_TcpHealthCheck)(nil), // 4: envoy.config.core.v4alpha.HealthCheck.TcpHealthCheck - (*HealthCheck_RedisHealthCheck)(nil), // 5: envoy.config.core.v4alpha.HealthCheck.RedisHealthCheck - (*HealthCheck_GrpcHealthCheck)(nil), // 6: envoy.config.core.v4alpha.HealthCheck.GrpcHealthCheck - (*HealthCheck_CustomHealthCheck)(nil), // 7: envoy.config.core.v4alpha.HealthCheck.CustomHealthCheck - (*HealthCheck_TlsOptions)(nil), // 8: envoy.config.core.v4alpha.HealthCheck.TlsOptions - (*duration.Duration)(nil), // 9: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 10: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 11: google.protobuf.BoolValue - (*EventServiceConfig)(nil), // 12: envoy.config.core.v4alpha.EventServiceConfig - (*_struct.Struct)(nil), // 13: google.protobuf.Struct - (*HeaderValueOption)(nil), // 14: envoy.config.core.v4alpha.HeaderValueOption - (*v3.Int64Range)(nil), // 15: envoy.type.v3.Int64Range - (v3.CodecClientType)(0), // 16: envoy.type.v3.CodecClientType - (*v4alpha.StringMatcher)(nil), // 17: envoy.type.matcher.v4alpha.StringMatcher - (*any.Any)(nil), // 18: google.protobuf.Any -} -var file_envoy_config_core_v4alpha_health_check_proto_depIdxs = []int32{ - 9, // 0: envoy.config.core.v4alpha.HealthCheck.timeout:type_name -> google.protobuf.Duration - 9, // 1: envoy.config.core.v4alpha.HealthCheck.interval:type_name -> google.protobuf.Duration - 9, // 2: envoy.config.core.v4alpha.HealthCheck.initial_jitter:type_name -> google.protobuf.Duration - 9, // 3: envoy.config.core.v4alpha.HealthCheck.interval_jitter:type_name -> google.protobuf.Duration - 10, // 4: envoy.config.core.v4alpha.HealthCheck.unhealthy_threshold:type_name -> google.protobuf.UInt32Value - 10, // 5: envoy.config.core.v4alpha.HealthCheck.healthy_threshold:type_name -> google.protobuf.UInt32Value - 10, // 6: envoy.config.core.v4alpha.HealthCheck.alt_port:type_name -> google.protobuf.UInt32Value - 11, // 7: envoy.config.core.v4alpha.HealthCheck.reuse_connection:type_name -> google.protobuf.BoolValue - 3, // 8: envoy.config.core.v4alpha.HealthCheck.http_health_check:type_name -> envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck - 4, // 9: envoy.config.core.v4alpha.HealthCheck.tcp_health_check:type_name -> envoy.config.core.v4alpha.HealthCheck.TcpHealthCheck - 6, // 10: envoy.config.core.v4alpha.HealthCheck.grpc_health_check:type_name -> envoy.config.core.v4alpha.HealthCheck.GrpcHealthCheck - 7, // 11: envoy.config.core.v4alpha.HealthCheck.custom_health_check:type_name -> envoy.config.core.v4alpha.HealthCheck.CustomHealthCheck - 9, // 12: envoy.config.core.v4alpha.HealthCheck.no_traffic_interval:type_name -> google.protobuf.Duration - 9, // 13: envoy.config.core.v4alpha.HealthCheck.no_traffic_healthy_interval:type_name -> google.protobuf.Duration - 9, // 14: envoy.config.core.v4alpha.HealthCheck.unhealthy_interval:type_name -> google.protobuf.Duration - 9, // 15: envoy.config.core.v4alpha.HealthCheck.unhealthy_edge_interval:type_name -> google.protobuf.Duration - 9, // 16: envoy.config.core.v4alpha.HealthCheck.healthy_edge_interval:type_name -> google.protobuf.Duration - 12, // 17: envoy.config.core.v4alpha.HealthCheck.event_service:type_name -> envoy.config.core.v4alpha.EventServiceConfig - 8, // 18: envoy.config.core.v4alpha.HealthCheck.tls_options:type_name -> envoy.config.core.v4alpha.HealthCheck.TlsOptions - 13, // 19: envoy.config.core.v4alpha.HealthCheck.transport_socket_match_criteria:type_name -> google.protobuf.Struct - 2, // 20: envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck.send:type_name -> envoy.config.core.v4alpha.HealthCheck.Payload - 2, // 21: envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck.receive:type_name -> envoy.config.core.v4alpha.HealthCheck.Payload - 14, // 22: envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck.request_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 15, // 23: envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck.expected_statuses:type_name -> envoy.type.v3.Int64Range - 16, // 24: envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck.codec_client_type:type_name -> envoy.type.v3.CodecClientType - 17, // 25: envoy.config.core.v4alpha.HealthCheck.HttpHealthCheck.service_name_matcher:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 2, // 26: envoy.config.core.v4alpha.HealthCheck.TcpHealthCheck.send:type_name -> envoy.config.core.v4alpha.HealthCheck.Payload - 2, // 27: envoy.config.core.v4alpha.HealthCheck.TcpHealthCheck.receive:type_name -> envoy.config.core.v4alpha.HealthCheck.Payload - 18, // 28: envoy.config.core.v4alpha.HealthCheck.CustomHealthCheck.typed_config:type_name -> google.protobuf.Any - 29, // [29:29] is the sub-list for method output_type - 29, // [29:29] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_health_check_proto_init() } -func file_envoy_config_core_v4alpha_health_check_proto_init() { - if File_envoy_config_core_v4alpha_health_check_proto != nil { - return - } - file_envoy_config_core_v4alpha_base_proto_init() - file_envoy_config_core_v4alpha_event_service_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_Payload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_HttpHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_TcpHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_RedisHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_GrpcHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_CustomHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_TlsOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*HealthCheck_HttpHealthCheck_)(nil), - (*HealthCheck_TcpHealthCheck_)(nil), - (*HealthCheck_GrpcHealthCheck_)(nil), - (*HealthCheck_CustomHealthCheck_)(nil), - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*HealthCheck_Payload_Text)(nil), - (*HealthCheck_Payload_Binary)(nil), - } - file_envoy_config_core_v4alpha_health_check_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*HealthCheck_CustomHealthCheck_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_health_check_proto_rawDesc, - NumEnums: 1, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_health_check_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_health_check_proto_depIdxs, - EnumInfos: file_envoy_config_core_v4alpha_health_check_proto_enumTypes, - MessageInfos: file_envoy_config_core_v4alpha_health_check_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_health_check_proto = out.File - file_envoy_config_core_v4alpha_health_check_proto_rawDesc = nil - file_envoy_config_core_v4alpha_health_check_proto_goTypes = nil - file_envoy_config_core_v4alpha_health_check_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/health_check.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/health_check.pb.validate.go deleted file mode 100644 index 5569784201..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/health_check.pb.validate.go +++ /dev/null @@ -1,1101 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/health_check.proto - -package envoy_config_core_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} - - _ = v3.CodecClientType(0) -) - -// 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. -func (m *HealthCheck) Validate() error { - if m == nil { - return nil - } - - if m.GetTimeout() == nil { - return HealthCheckValidationError{ - field: "Timeout", - reason: "value is required", - } - } - - if d := m.GetTimeout(); d != nil { - 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) - - if dur <= gt { - return HealthCheckValidationError{ - field: "Timeout", - reason: "value must be greater than 0s", - } - } - - } - - if m.GetInterval() == nil { - return HealthCheckValidationError{ - field: "Interval", - reason: "value is required", - } - } - - if d := m.GetInterval(); d != nil { - 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) - - if dur <= gt { - return HealthCheckValidationError{ - field: "Interval", - reason: "value must be greater than 0s", - } - } - - } - - 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{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for IntervalJitterPercent - - if m.GetUnhealthyThreshold() == nil { - return HealthCheckValidationError{ - field: "UnhealthyThreshold", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetUnhealthyThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "UnhealthyThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetHealthyThreshold() == nil { - return HealthCheckValidationError{ - field: "HealthyThreshold", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetHealthyThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "HealthyThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAltPort()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "AltPort", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if 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 := ptypes.Duration(d) - if err != nil { - return HealthCheckValidationError{ - field: "NoTrafficInterval", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return HealthCheckValidationError{ - field: "NoTrafficInterval", - reason: "value must be greater than 0s", - } - } - - } - - if d := m.GetNoTrafficHealthyInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return HealthCheckValidationError{ - field: "NoTrafficHealthyInterval", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return HealthCheckValidationError{ - field: "NoTrafficHealthyInterval", - reason: "value must be greater than 0s", - } - } - - } - - if d := m.GetUnhealthyInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return HealthCheckValidationError{ - field: "UnhealthyInterval", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return HealthCheckValidationError{ - field: "UnhealthyInterval", - reason: "value must be greater than 0s", - } - } - - } - - if d := m.GetUnhealthyEdgeInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return HealthCheckValidationError{ - field: "UnhealthyEdgeInterval", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return HealthCheckValidationError{ - field: "UnhealthyEdgeInterval", - reason: "value must be greater than 0s", - } - } - - } - - if d := m.GetHealthyEdgeInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return HealthCheckValidationError{ - field: "HealthyEdgeInterval", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return HealthCheckValidationError{ - field: "HealthyEdgeInterval", - reason: "value must be greater than 0s", - } - } - - } - - // 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, - } - } - } - - if v, ok := interface{}(m.GetTransportSocketMatchCriteria()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "TransportSocketMatchCriteria", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.HealthChecker.(type) { - - case *HealthCheck_HttpHealthCheck_: - - if v, ok := interface{}(m.GetHttpHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "HttpHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HealthCheck_TcpHealthCheck_: - - if v, ok := interface{}(m.GetTcpHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "TcpHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HealthCheck_GrpcHealthCheck_: - - if v, ok := interface{}(m.GetGrpcHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "GrpcHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HealthCheck_CustomHealthCheck_: - - if v, ok := interface{}(m.GetCustomHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "CustomHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return HealthCheckValidationError{ - field: "HealthChecker", - reason: "value is required", - } - - } - - return nil -} - -// HealthCheckValidationError is the validation error returned by -// HealthCheck.Validate if the designated constraints aren't met. -type HealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckValidationError) ErrorName() string { return "HealthCheckValidationError" } - -// Error satisfies the builtin error interface -func (e HealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_Payload with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheck_Payload) Validate() error { - if m == nil { - return nil - } - - switch m.Payload.(type) { - - case *HealthCheck_Payload_Text: - - if utf8.RuneCountInString(m.GetText()) < 1 { - return HealthCheck_PayloadValidationError{ - field: "Text", - reason: "value length must be at least 1 runes", - } - } - - case *HealthCheck_Payload_Binary: - // no validation rules for Binary - - default: - return HealthCheck_PayloadValidationError{ - field: "Payload", - reason: "value is required", - } - - } - - return nil -} - -// HealthCheck_PayloadValidationError is the validation error returned by -// HealthCheck_Payload.Validate if the designated constraints aren't met. -type HealthCheck_PayloadValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_PayloadValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_PayloadValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_PayloadValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_PayloadValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_PayloadValidationError) ErrorName() string { - return "HealthCheck_PayloadValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_PayloadValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_Payload.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_PayloadValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_PayloadValidationError{} - -// Validate checks the field values on HealthCheck_HttpHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheck_HttpHealthCheck) Validate() error { - if m == nil { - return nil - } - - if !_HealthCheck_HttpHealthCheck_Host_Pattern.MatchString(m.GetHost()) { - return HealthCheck_HttpHealthCheckValidationError{ - field: "Host", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - if utf8.RuneCountInString(m.GetPath()) < 1 { - return HealthCheck_HttpHealthCheckValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - } - - if !_HealthCheck_HttpHealthCheck_Path_Pattern.MatchString(m.GetPath()) { - return HealthCheck_HttpHealthCheckValidationError{ - field: "Path", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - 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, - } - } - } - - 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, - } - } - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - return HealthCheck_HttpHealthCheckValidationError{ - 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 HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if !_HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern.MatchString(item) { - return HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - for idx, item := range m.GetExpectedStatuses() { - _, _ = idx, item - - 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 := v3.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 -} - -// HealthCheck_HttpHealthCheckValidationError is the validation error returned -// by HealthCheck_HttpHealthCheck.Validate if the designated constraints -// aren't met. -type HealthCheck_HttpHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_HttpHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_HttpHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_HttpHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_HttpHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_HttpHealthCheckValidationError) ErrorName() string { - return "HealthCheck_HttpHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_HttpHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_HttpHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_HttpHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_HttpHealthCheckValidationError{} - -var _HealthCheck_HttpHealthCheck_Host_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _HealthCheck_HttpHealthCheck_Path_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HealthCheck_TcpHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheck_TcpHealthCheck) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_TcpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetReceive() { - _, _ = idx, item - - if 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, - } - } - } - - } - - return nil -} - -// HealthCheck_TcpHealthCheckValidationError is the validation error returned -// by HealthCheck_TcpHealthCheck.Validate if the designated constraints aren't met. -type HealthCheck_TcpHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_TcpHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_TcpHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_TcpHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_TcpHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_TcpHealthCheckValidationError) ErrorName() string { - return "HealthCheck_TcpHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_TcpHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_TcpHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_TcpHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_TcpHealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_RedisHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheck_RedisHealthCheck) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Key - - return nil -} - -// HealthCheck_RedisHealthCheckValidationError is the validation error returned -// by HealthCheck_RedisHealthCheck.Validate if the designated constraints -// aren't met. -type HealthCheck_RedisHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_RedisHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_RedisHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_RedisHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_RedisHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_RedisHealthCheckValidationError) ErrorName() string { - return "HealthCheck_RedisHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_RedisHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_RedisHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_RedisHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_RedisHealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_GrpcHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheck_GrpcHealthCheck) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ServiceName - - if !_HealthCheck_GrpcHealthCheck_Authority_Pattern.MatchString(m.GetAuthority()) { - return HealthCheck_GrpcHealthCheckValidationError{ - field: "Authority", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - return nil -} - -// HealthCheck_GrpcHealthCheckValidationError is the validation error returned -// by HealthCheck_GrpcHealthCheck.Validate if the designated constraints -// aren't met. -type HealthCheck_GrpcHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_GrpcHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_GrpcHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_GrpcHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_GrpcHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_GrpcHealthCheckValidationError) ErrorName() string { - return "HealthCheck_GrpcHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_GrpcHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_GrpcHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_GrpcHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_GrpcHealthCheckValidationError{} - -var _HealthCheck_GrpcHealthCheck_Authority_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HealthCheck_CustomHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheck_CustomHealthCheck) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return HealthCheck_CustomHealthCheckValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - case *HealthCheck_CustomHealthCheck_TypedConfig: - - 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, - } - } - } - - } - - return nil -} - -// HealthCheck_CustomHealthCheckValidationError is the validation error -// returned by HealthCheck_CustomHealthCheck.Validate if the designated -// constraints aren't met. -type HealthCheck_CustomHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_CustomHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_CustomHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_CustomHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_CustomHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_CustomHealthCheckValidationError) ErrorName() string { - return "HealthCheck_CustomHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_CustomHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_CustomHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_CustomHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_CustomHealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_TlsOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, 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/pkg/api/envoy/config/core/v4alpha/http_uri.pb.go b/pkg/api/envoy/config/core/v4alpha/http_uri.pb.go deleted file mode 100644 index f2c61cb896..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/http_uri.pb.go +++ /dev/null @@ -1,238 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/http_uri.proto - -package envoy_config_core_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Envoy external URI descriptor -type HttpUri struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The HTTP server URI. It should be a full FQDN with protocol, host and path. - // - // Example: - // - // .. code-block:: yaml - // - // uri: https://www.googleapis.com/oauth2/v1/certs - // - Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - // Specify how `uri` is to be fetched. Today, this requires an explicit - // cluster, but in the future we may support dynamic cluster creation or - // inline DNS resolution. See `issue - // `_. - // - // Types that are assignable to HttpUpstreamType: - // *HttpUri_Cluster - HttpUpstreamType isHttpUri_HttpUpstreamType `protobuf_oneof:"http_upstream_type"` - // Sets the maximum duration in milliseconds that a response can take to arrive upon request. - Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` -} - -func (x *HttpUri) Reset() { - *x = HttpUri{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_http_uri_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpUri) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpUri) ProtoMessage() {} - -func (x *HttpUri) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_http_uri_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpUri.ProtoReflect.Descriptor instead. -func (*HttpUri) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_http_uri_proto_rawDescGZIP(), []int{0} -} - -func (x *HttpUri) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - -func (m *HttpUri) GetHttpUpstreamType() isHttpUri_HttpUpstreamType { - if m != nil { - return m.HttpUpstreamType - } - return nil -} - -func (x *HttpUri) GetCluster() string { - if x, ok := x.GetHttpUpstreamType().(*HttpUri_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *HttpUri) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -type isHttpUri_HttpUpstreamType interface { - isHttpUri_HttpUpstreamType() -} - -type HttpUri_Cluster struct { - // A cluster is created in the Envoy "cluster_manager" config - // section. This field specifies the cluster name. - // - // Example: - // - // .. code-block:: yaml - // - // cluster: jwks_cluster - // - Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3,oneof"` -} - -func (*HttpUri_Cluster) isHttpUri_HttpUpstreamType() {} - -var File_envoy_config_core_v4alpha_http_uri_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_http_uri_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xca, 0x01, 0x0a, 0x07, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x12, 0x19, 0x0a, 0x03, - 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x23, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, - 0x08, 0x01, 0x32, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3a, 0x23, 0x9a, - 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, - 0x72, 0x69, 0x42, 0x19, 0x0a, 0x12, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x41, 0x0a, - 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, - 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_http_uri_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_http_uri_proto_rawDescData = file_envoy_config_core_v4alpha_http_uri_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_http_uri_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_http_uri_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_http_uri_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_http_uri_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_http_uri_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_http_uri_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v4alpha_http_uri_proto_goTypes = []interface{}{ - (*HttpUri)(nil), // 0: envoy.config.core.v4alpha.HttpUri - (*duration.Duration)(nil), // 1: google.protobuf.Duration -} -var file_envoy_config_core_v4alpha_http_uri_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v4alpha.HttpUri.timeout:type_name -> google.protobuf.Duration - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_http_uri_proto_init() } -func file_envoy_config_core_v4alpha_http_uri_proto_init() { - if File_envoy_config_core_v4alpha_http_uri_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_http_uri_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpUri); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_http_uri_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*HttpUri_Cluster)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_http_uri_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_http_uri_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_http_uri_proto_depIdxs, - MessageInfos: file_envoy_config_core_v4alpha_http_uri_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_http_uri_proto = out.File - file_envoy_config_core_v4alpha_http_uri_proto_rawDesc = nil - file_envoy_config_core_v4alpha_http_uri_proto_goTypes = nil - file_envoy_config_core_v4alpha_http_uri_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/http_uri.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/http_uri.pb.validate.go deleted file mode 100644 index b4f736332d..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/http_uri.pb.validate.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/http_uri.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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 { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetUri()) < 1 { - return HttpUriValidationError{ - field: "Uri", - reason: "value length must be at least 1 runes", - } - } - - if m.GetTimeout() == nil { - return HttpUriValidationError{ - field: "Timeout", - reason: "value is required", - } - } - - 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: - - if utf8.RuneCountInString(m.GetCluster()) < 1 { - return HttpUriValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - } - - default: - return HttpUriValidationError{ - field: "HttpUpstreamType", - reason: "value is required", - } - - } - - return nil -} - -// HttpUriValidationError is the validation error returned by HttpUri.Validate -// if the designated constraints aren't met. -type HttpUriValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpUriValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpUriValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpUriValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpUriValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpUriValidationError) ErrorName() string { return "HttpUriValidationError" } - -// Error satisfies the builtin error interface -func (e HttpUriValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpUri.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpUriValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpUriValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/protocol.pb.go b/pkg/api/envoy/config/core/v4alpha/protocol.pb.go deleted file mode 100644 index 227f574786..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/protocol.pb.go +++ /dev/null @@ -1,1608 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/protocol.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Action to take when Envoy receives client request with header names containing underscore -// characters. -// Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented -// as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore -// characters. -type HttpProtocolOptions_HeadersWithUnderscoresAction int32 - -const ( - // Allow headers with underscores. This is the default behavior. - HttpProtocolOptions_ALLOW HttpProtocolOptions_HeadersWithUnderscoresAction = 0 - // Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests - // end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter - // is incremented for each rejected request. - HttpProtocolOptions_REJECT_REQUEST HttpProtocolOptions_HeadersWithUnderscoresAction = 1 - // Drop the header with name containing underscores. The header is dropped before the filter chain is - // invoked and as such filters will not see dropped headers. The - // "httpN.dropped_headers_with_underscores" is incremented for each dropped header. - HttpProtocolOptions_DROP_HEADER HttpProtocolOptions_HeadersWithUnderscoresAction = 2 -) - -// Enum value maps for HttpProtocolOptions_HeadersWithUnderscoresAction. -var ( - HttpProtocolOptions_HeadersWithUnderscoresAction_name = map[int32]string{ - 0: "ALLOW", - 1: "REJECT_REQUEST", - 2: "DROP_HEADER", - } - HttpProtocolOptions_HeadersWithUnderscoresAction_value = map[string]int32{ - "ALLOW": 0, - "REJECT_REQUEST": 1, - "DROP_HEADER": 2, - } -) - -func (x HttpProtocolOptions_HeadersWithUnderscoresAction) Enum() *HttpProtocolOptions_HeadersWithUnderscoresAction { - p := new(HttpProtocolOptions_HeadersWithUnderscoresAction) - *p = x - return p -} - -func (x HttpProtocolOptions_HeadersWithUnderscoresAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpProtocolOptions_HeadersWithUnderscoresAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_protocol_proto_enumTypes[0].Descriptor() -} - -func (HttpProtocolOptions_HeadersWithUnderscoresAction) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_protocol_proto_enumTypes[0] -} - -func (x HttpProtocolOptions_HeadersWithUnderscoresAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpProtocolOptions_HeadersWithUnderscoresAction.Descriptor instead. -func (HttpProtocolOptions_HeadersWithUnderscoresAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{2, 0} -} - -// [#not-implemented-hide:] -type TcpProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TcpProtocolOptions) Reset() { - *x = TcpProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpProtocolOptions) ProtoMessage() {} - -func (x *TcpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpProtocolOptions.ProtoReflect.Descriptor instead. -func (*TcpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{0} -} - -type UpstreamHttpProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Set transport socket `SNI `_ for new - // upstream connections based on the downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - AutoSni bool `protobuf:"varint,1,opt,name=auto_sni,json=autoSni,proto3" json:"auto_sni,omitempty"` - // Automatic validate upstream presented certificate for new upstream connections based on the - // downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - // This field is intended to set with `auto_sni` field. - AutoSanValidation bool `protobuf:"varint,2,opt,name=auto_san_validation,json=autoSanValidation,proto3" json:"auto_san_validation,omitempty"` -} - -func (x *UpstreamHttpProtocolOptions) Reset() { - *x = UpstreamHttpProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamHttpProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamHttpProtocolOptions) ProtoMessage() {} - -func (x *UpstreamHttpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamHttpProtocolOptions.ProtoReflect.Descriptor instead. -func (*UpstreamHttpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{1} -} - -func (x *UpstreamHttpProtocolOptions) GetAutoSni() bool { - if x != nil { - return x.AutoSni - } - return false -} - -func (x *UpstreamHttpProtocolOptions) GetAutoSanValidation() bool { - if x != nil { - return x.AutoSanValidation - } - return false -} - -// [#next-free-field: 6] -type HttpProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The idle timeout for connections. The idle timeout is defined as the - // period in which there are no active requests. When the - // idle timeout is reached the connection will be closed. If the connection is an HTTP/2 - // downstream connection a drain sequence will occur prior to closing the connection, see - // :ref:`drain_timeout - // `. - // Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. - // If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled for downstream connections according to the value for - // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. - IdleTimeout *duration.Duration `protobuf:"bytes,1,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` - // The maximum duration of a connection. The duration is defined as a period since a connection - // was established. If not set, there is no max duration. When max_connection_duration is reached - // the connection will be closed. Drain sequence will occur prior to closing the connection if - // if's applicable. See :ref:`drain_timeout - // `. - // Note: not implemented for upstream connections. - MaxConnectionDuration *duration.Duration `protobuf:"bytes,3,opt,name=max_connection_duration,json=maxConnectionDuration,proto3" json:"max_connection_duration,omitempty"` - // The maximum number of headers. If unconfigured, the default - // maximum number of request headers allowed is 100. Requests that exceed this limit will receive - // a 431 response for HTTP/1.x and cause a stream reset for HTTP/2. - MaxHeadersCount *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_headers_count,json=maxHeadersCount,proto3" json:"max_headers_count,omitempty"` - // Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be - // reset independent of any other timeouts. If not specified, this value is not set. - MaxStreamDuration *duration.Duration `protobuf:"bytes,4,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` - // Action to take when a client request with a header name containing underscore characters is received. - // If this setting is not specified, the value defaults to ALLOW. - // Note: upstream responses are not affected by this setting. - HeadersWithUnderscoresAction HttpProtocolOptions_HeadersWithUnderscoresAction `protobuf:"varint,5,opt,name=headers_with_underscores_action,json=headersWithUnderscoresAction,proto3,enum=envoy.config.core.v4alpha.HttpProtocolOptions_HeadersWithUnderscoresAction" json:"headers_with_underscores_action,omitempty"` -} - -func (x *HttpProtocolOptions) Reset() { - *x = HttpProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpProtocolOptions) ProtoMessage() {} - -func (x *HttpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpProtocolOptions.ProtoReflect.Descriptor instead. -func (*HttpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{2} -} - -func (x *HttpProtocolOptions) GetIdleTimeout() *duration.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *HttpProtocolOptions) GetMaxConnectionDuration() *duration.Duration { - if x != nil { - return x.MaxConnectionDuration - } - return nil -} - -func (x *HttpProtocolOptions) GetMaxHeadersCount() *wrappers.UInt32Value { - if x != nil { - return x.MaxHeadersCount - } - return nil -} - -func (x *HttpProtocolOptions) GetMaxStreamDuration() *duration.Duration { - if x != nil { - return x.MaxStreamDuration - } - return nil -} - -func (x *HttpProtocolOptions) GetHeadersWithUnderscoresAction() HttpProtocolOptions_HeadersWithUnderscoresAction { - if x != nil { - return x.HeadersWithUnderscoresAction - } - return HttpProtocolOptions_ALLOW -} - -// [#next-free-field: 8] -type Http1ProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Handle HTTP requests with absolute URLs in the requests. These requests - // are generally sent by clients to forward/explicit proxies. This allows clients to configure - // envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the - // *http_proxy* environment variable. - AllowAbsoluteUrl *wrappers.BoolValue `protobuf:"bytes,1,opt,name=allow_absolute_url,json=allowAbsoluteUrl,proto3" json:"allow_absolute_url,omitempty"` - // Handle incoming HTTP/1.0 and HTTP 0.9 requests. - // This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 - // style connect logic, dechunking, and handling lack of client host iff - // *default_host_for_http_10* is configured. - AcceptHttp_10 bool `protobuf:"varint,2,opt,name=accept_http_10,json=acceptHttp10,proto3" json:"accept_http_10,omitempty"` - // A default host for HTTP/1.0 requests. This is highly suggested if *accept_http_10* is true as - // Envoy does not otherwise support HTTP/1.0 without a Host header. - // This is a no-op if *accept_http_10* is not true. - DefaultHostForHttp_10 string `protobuf:"bytes,3,opt,name=default_host_for_http_10,json=defaultHostForHttp10,proto3" json:"default_host_for_http_10,omitempty"` - // Describes how the keys for response headers should be formatted. By default, all header keys - // are lower cased. - HeaderKeyFormat *Http1ProtocolOptions_HeaderKeyFormat `protobuf:"bytes,4,opt,name=header_key_format,json=headerKeyFormat,proto3" json:"header_key_format,omitempty"` - // Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers. - // - // .. attention:: - // - // Note that this only happens when Envoy is chunk encoding which occurs when: - // - The request is HTTP/1.1. - // - Is neither a HEAD only request nor a HTTP Upgrade. - // - Not a response to a HEAD request. - // - The content length header is not present. - EnableTrailers bool `protobuf:"varint,5,opt,name=enable_trailers,json=enableTrailers,proto3" json:"enable_trailers,omitempty"` - // Allows Envoy to process requests/responses with both `Content-Length` and `Transfer-Encoding` - // headers set. By default such messages are rejected, but if option is enabled - Envoy will - // remove Content-Length header and process message. - // See `RFC7230, sec. 3.3.3 ` for details. - // - // .. attention:: - // Enabling this option might lead to request smuggling vulnerability, especially if traffic - // is proxied via multiple layers of proxies. - AllowChunkedLength bool `protobuf:"varint,6,opt,name=allow_chunked_length,json=allowChunkedLength,proto3" json:"allow_chunked_length,omitempty"` - // Allows invalid HTTP messaging. When this option is false, then Envoy will terminate - // HTTP/1.1 connections upon receiving an invalid HTTP message. However, - // when this option is true, then Envoy will leave the HTTP/1.1 connection - // open where possible. - // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // `. - OverrideStreamErrorOnInvalidHttpMessage *wrappers.BoolValue `protobuf:"bytes,7,opt,name=override_stream_error_on_invalid_http_message,json=overrideStreamErrorOnInvalidHttpMessage,proto3" json:"override_stream_error_on_invalid_http_message,omitempty"` -} - -func (x *Http1ProtocolOptions) Reset() { - *x = Http1ProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http1ProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http1ProtocolOptions) ProtoMessage() {} - -func (x *Http1ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http1ProtocolOptions.ProtoReflect.Descriptor instead. -func (*Http1ProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{3} -} - -func (x *Http1ProtocolOptions) GetAllowAbsoluteUrl() *wrappers.BoolValue { - if x != nil { - return x.AllowAbsoluteUrl - } - return nil -} - -func (x *Http1ProtocolOptions) GetAcceptHttp_10() bool { - if x != nil { - return x.AcceptHttp_10 - } - return false -} - -func (x *Http1ProtocolOptions) GetDefaultHostForHttp_10() string { - if x != nil { - return x.DefaultHostForHttp_10 - } - return "" -} - -func (x *Http1ProtocolOptions) GetHeaderKeyFormat() *Http1ProtocolOptions_HeaderKeyFormat { - if x != nil { - return x.HeaderKeyFormat - } - return nil -} - -func (x *Http1ProtocolOptions) GetEnableTrailers() bool { - if x != nil { - return x.EnableTrailers - } - return false -} - -func (x *Http1ProtocolOptions) GetAllowChunkedLength() bool { - if x != nil { - return x.AllowChunkedLength - } - return false -} - -func (x *Http1ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrappers.BoolValue { - if x != nil { - return x.OverrideStreamErrorOnInvalidHttpMessage - } - return nil -} - -type KeepaliveSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Send HTTP/2 PING frames at this period, in order to test that the connection is still alive. - Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` - // How long to wait for a response to a keepalive PING. If a response is not received within this - // time period, the connection will be aborted. - Timeout *duration.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - // A random jitter amount as a percentage of interval that will be added to each interval. - // A value of zero means there will be no jitter. - // The default value is 15%. - IntervalJitter *v3.Percent `protobuf:"bytes,3,opt,name=interval_jitter,json=intervalJitter,proto3" json:"interval_jitter,omitempty"` -} - -func (x *KeepaliveSettings) Reset() { - *x = KeepaliveSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeepaliveSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeepaliveSettings) ProtoMessage() {} - -func (x *KeepaliveSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeepaliveSettings.ProtoReflect.Descriptor instead. -func (*KeepaliveSettings) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{4} -} - -func (x *KeepaliveSettings) GetInterval() *duration.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *KeepaliveSettings) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *KeepaliveSettings) GetIntervalJitter() *v3.Percent { - if x != nil { - return x.IntervalJitter - } - return nil -} - -// [#next-free-field: 16] -type Http2ProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `Maximum table size `_ - // (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values - // range from 0 to 4294967295 (2^32 - 1) and defaults to 4096. 0 effectively disables header - // compression. - HpackTableSize *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=hpack_table_size,json=hpackTableSize,proto3" json:"hpack_table_size,omitempty"` - // `Maximum concurrent streams `_ - // allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1) - // and defaults to 2147483647. - // - // For upstream connections, this also limits how many streams Envoy will initiate concurrently - // on a single connection. If the limit is reached, Envoy may queue requests or establish - // additional connections (as allowed per circuit breaker limits). - MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` - // `Initial stream-level flow-control window - // `_ size. Valid values range from 65535 - // (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456 - // (256 * 1024 * 1024). - // - // NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default - // window size now, so it's also the minimum. - // - // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the - // HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to - // stop the flow of data to the codec buffers. - InitialStreamWindowSize *wrappers.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 *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=initial_connection_window_size,json=initialConnectionWindowSize,proto3" json:"initial_connection_window_size,omitempty"` - // Allows proxying Websocket and other upgrades over H2 connect. - AllowConnect bool `protobuf:"varint,5,opt,name=allow_connect,json=allowConnect,proto3" json:"allow_connect,omitempty"` - // [#not-implemented-hide:] Hiding until envoy has full metadata support. - // Still under implementation. DO NOT USE. - // - // Allows metadata. See [metadata - // docs](https://github.com/envoyproxy/envoy/blob/main/source/docs/h2_metadata.md) for more - // information. - AllowMetadata bool `protobuf:"varint,6,opt,name=allow_metadata,json=allowMetadata,proto3" json:"allow_metadata,omitempty"` - // Limit the number of pending outbound downstream frames of all types (frames that are waiting to - // be written into the socket). Exceeding this limit triggers flood mitigation and connection is - // terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due - // to flood mitigation. The default limit is 10000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - MaxOutboundFrames *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_outbound_frames,json=maxOutboundFrames,proto3" json:"max_outbound_frames,omitempty"` - // Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, - // preventing high memory utilization when receiving continuous stream of these frames. Exceeding - // this limit triggers flood mitigation and connection is terminated. The - // ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood - // mitigation. The default limit is 1000. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - MaxOutboundControlFrames *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=max_outbound_control_frames,json=maxOutboundControlFrames,proto3" json:"max_outbound_control_frames,omitempty"` - // Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an - // empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but - // might be a result of a broken HTTP/2 implementation. The `http2.inbound_empty_frames_flood`` - // stat tracks the number of connections terminated due to flood mitigation. - // Setting this to 0 will terminate connection upon receiving first frame with an empty payload - // and no end stream flag. The default limit is 1. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - 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"` - // Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number - // of PRIORITY frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // max_inbound_priority_frames_per_stream * (1 + inbound_streams) - // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 100. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - 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"` - // Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number - // of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // 1 + 2 * (inbound_streams + - // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) - // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 10. - // Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, - // but more complex implementations that try to estimate available bandwidth require at least 2. - // NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - // `envoy.reloadable_features.upstream_http2_flood_checks` flag. - 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"` - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // This is overridden by HCM :ref:`stream_error_on_invalid_http_messaging - // ` - // iff present. - // - // This is deprecated in favor of :ref:`override_stream_error_on_invalid_http_message - // ` - // - // See `RFC7540, sec. 8.1 `_ for details. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedStreamErrorOnInvalidHttpMessaging bool `protobuf:"varint,12,opt,name=hidden_envoy_deprecated_stream_error_on_invalid_http_messaging,json=hiddenEnvoyDeprecatedStreamErrorOnInvalidHttpMessaging,proto3" json:"hidden_envoy_deprecated_stream_error_on_invalid_http_messaging,omitempty"` - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // This overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // ` - // - // See `RFC7540, sec. 8.1 `_ for details. - OverrideStreamErrorOnInvalidHttpMessage *wrappers.BoolValue `protobuf:"bytes,14,opt,name=override_stream_error_on_invalid_http_message,json=overrideStreamErrorOnInvalidHttpMessage,proto3" json:"override_stream_error_on_invalid_http_message,omitempty"` - // [#not-implemented-hide:] - // Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions: - // - // 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by - // Envoy. - // - // 2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field - // 'allow_connect'. - // - // Note that custom parameters specified through this field can not also be set in the - // corresponding named parameters: - // - // .. code-block:: text - // - // ID Field Name - // ---------------- - // 0x1 hpack_table_size - // 0x3 max_concurrent_streams - // 0x4 initial_stream_window_size - // - // Collisions will trigger config validation failure on load/update. Likewise, inconsistencies - // between custom parameters with the same identifier will trigger a failure. - // - // See `IANA HTTP/2 Settings - // `_ for - // standardized identifiers. - CustomSettingsParameters []*Http2ProtocolOptions_SettingsParameter `protobuf:"bytes,13,rep,name=custom_settings_parameters,json=customSettingsParameters,proto3" json:"custom_settings_parameters,omitempty"` - // Send HTTP/2 PING frames to verify that the connection is still healthy. If the remote peer - // does not respond within the configured timeout, the connection will be aborted. - ConnectionKeepalive *KeepaliveSettings `protobuf:"bytes,15,opt,name=connection_keepalive,json=connectionKeepalive,proto3" json:"connection_keepalive,omitempty"` -} - -func (x *Http2ProtocolOptions) Reset() { - *x = Http2ProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http2ProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http2ProtocolOptions) ProtoMessage() {} - -func (x *Http2ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http2ProtocolOptions.ProtoReflect.Descriptor instead. -func (*Http2ProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{5} -} - -func (x *Http2ProtocolOptions) GetHpackTableSize() *wrappers.UInt32Value { - if x != nil { - return x.HpackTableSize - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value { - if x != nil { - return x.MaxConcurrentStreams - } - return nil -} - -func (x *Http2ProtocolOptions) GetInitialStreamWindowSize() *wrappers.UInt32Value { - if x != nil { - return x.InitialStreamWindowSize - } - return nil -} - -func (x *Http2ProtocolOptions) GetInitialConnectionWindowSize() *wrappers.UInt32Value { - if x != nil { - return x.InitialConnectionWindowSize - } - return nil -} - -func (x *Http2ProtocolOptions) GetAllowConnect() bool { - if x != nil { - return x.AllowConnect - } - return false -} - -func (x *Http2ProtocolOptions) GetAllowMetadata() bool { - if x != nil { - return x.AllowMetadata - } - return false -} - -func (x *Http2ProtocolOptions) GetMaxOutboundFrames() *wrappers.UInt32Value { - if x != nil { - return x.MaxOutboundFrames - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxOutboundControlFrames() *wrappers.UInt32Value { - if x != nil { - return x.MaxOutboundControlFrames - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxConsecutiveInboundFramesWithEmptyPayload() *wrappers.UInt32Value { - if x != nil { - return x.MaxConsecutiveInboundFramesWithEmptyPayload - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxInboundPriorityFramesPerStream() *wrappers.UInt32Value { - if x != nil { - return x.MaxInboundPriorityFramesPerStream - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxInboundWindowUpdateFramesPerDataFrameSent() *wrappers.UInt32Value { - if x != nil { - return x.MaxInboundWindowUpdateFramesPerDataFrameSent - } - return nil -} - -// Deprecated: Do not use. -func (x *Http2ProtocolOptions) GetHiddenEnvoyDeprecatedStreamErrorOnInvalidHttpMessaging() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedStreamErrorOnInvalidHttpMessaging - } - return false -} - -func (x *Http2ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrappers.BoolValue { - if x != nil { - return x.OverrideStreamErrorOnInvalidHttpMessage - } - return nil -} - -func (x *Http2ProtocolOptions) GetCustomSettingsParameters() []*Http2ProtocolOptions_SettingsParameter { - if x != nil { - return x.CustomSettingsParameters - } - return nil -} - -func (x *Http2ProtocolOptions) GetConnectionKeepalive() *KeepaliveSettings { - if x != nil { - return x.ConnectionKeepalive - } - return nil -} - -// [#not-implemented-hide:] -type GrpcProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Http2ProtocolOptions *Http2ProtocolOptions `protobuf:"bytes,1,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` -} - -func (x *GrpcProtocolOptions) Reset() { - *x = GrpcProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcProtocolOptions) ProtoMessage() {} - -func (x *GrpcProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcProtocolOptions.ProtoReflect.Descriptor instead. -func (*GrpcProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{6} -} - -func (x *GrpcProtocolOptions) GetHttp2ProtocolOptions() *Http2ProtocolOptions { - if x != nil { - return x.Http2ProtocolOptions - } - return nil -} - -type Http1ProtocolOptions_HeaderKeyFormat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to HeaderFormat: - // *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ - // *Http1ProtocolOptions_HeaderKeyFormat_Custom_ - HeaderFormat isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat `protobuf_oneof:"header_format"` -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) Reset() { - *x = Http1ProtocolOptions_HeaderKeyFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http1ProtocolOptions_HeaderKeyFormat) ProtoMessage() {} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat.ProtoReflect.Descriptor instead. -func (*Http1ProtocolOptions_HeaderKeyFormat) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{3, 0} -} - -func (m *Http1ProtocolOptions_HeaderKeyFormat) GetHeaderFormat() isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat { - if m != nil { - return m.HeaderFormat - } - return nil -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) GetProperCaseWords() *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords { - if x, ok := x.GetHeaderFormat().(*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_); ok { - return x.ProperCaseWords - } - return nil -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) GetCustom() *Http1ProtocolOptions_HeaderKeyFormat_Custom { - if x, ok := x.GetHeaderFormat().(*Http1ProtocolOptions_HeaderKeyFormat_Custom_); ok { - return x.Custom - } - return nil -} - -type isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat interface { - isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() -} - -type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ struct { - // Formats the header by proper casing words: the first character and any character following - // a special character will be capitalized if it's an alpha character. For example, - // "content-type" becomes "Content-Type", and "foo$b#$are" becomes "Foo$B#$Are". - // Note that while this results in most headers following conventional casing, certain headers - // are not covered. For example, the "TE" header will be formatted as "Te". - ProperCaseWords *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords `protobuf:"bytes,1,opt,name=proper_case_words,json=properCaseWords,proto3,oneof"` -} - -type Http1ProtocolOptions_HeaderKeyFormat_Custom_ struct { - // Formats the header according to custom rules. - Custom *Http1ProtocolOptions_HeaderKeyFormat_Custom `protobuf:"bytes,2,opt,name=custom,proto3,oneof"` -} - -func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { -} - -func (*Http1ProtocolOptions_HeaderKeyFormat_Custom_) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { -} - -type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Reset() { - *x = Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoMessage() {} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.ProtoReflect.Descriptor instead. -func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{3, 0, 0} -} - -type Http1ProtocolOptions_HeaderKeyFormat_Custom struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Custom header rewrite rules. - // In each rule of the map, the key is a case-insensitive header name. The value - // is the new header value, case-sensitive. This allows for custom header - // capitalization, eg: `x-my-header-key` -> `X-MY-HEADER-Key` - Rules map[string]string `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) Reset() { - *x = Http1ProtocolOptions_HeaderKeyFormat_Custom{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http1ProtocolOptions_HeaderKeyFormat_Custom) ProtoMessage() {} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat_Custom.ProtoReflect.Descriptor instead. -func (*Http1ProtocolOptions_HeaderKeyFormat_Custom) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{3, 0, 1} -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_Custom) GetRules() map[string]string { - if x != nil { - return x.Rules - } - return nil -} - -// Defines a parameter to be sent in the SETTINGS frame. -// See `RFC7540, sec. 6.5.1 `_ for details. -type Http2ProtocolOptions_SettingsParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The 16 bit parameter identifier. - Identifier *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // The 32 bit parameter value. - Value *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Http2ProtocolOptions_SettingsParameter) Reset() { - *x = Http2ProtocolOptions_SettingsParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http2ProtocolOptions_SettingsParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http2ProtocolOptions_SettingsParameter) ProtoMessage() {} - -func (x *Http2ProtocolOptions_SettingsParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_protocol_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http2ProtocolOptions_SettingsParameter.ProtoReflect.Descriptor instead. -func (*Http2ProtocolOptions_SettingsParameter) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *Http2ProtocolOptions_SettingsParameter) GetIdentifier() *wrappers.UInt32Value { - if x != nil { - return x.Identifier - } - return nil -} - -func (x *Http2ProtocolOptions_SettingsParameter) GetValue() *wrappers.UInt32Value { - if x != nil { - return x.Value - } - return nil -} - -var File_envoy_config_core_v4alpha_protocol_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_protocol_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x44, 0x0a, - 0x12, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x6e, 0x69, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x6e, 0x69, 0x12, 0x2e, - 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x61, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x75, 0x74, - 0x6f, 0x53, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x37, - 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xda, 0x04, 0x0a, 0x13, 0x48, 0x74, 0x74, 0x70, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, 0x0a, - 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x51, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x28, 0x01, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x92, - 0x01, 0x0a, 0x1f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, - 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, - 0x74, 0x68, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x4e, 0x0a, 0x1c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, - 0x74, 0x68, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x12, - 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, - 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, - 0x52, 0x10, 0x02, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xdd, 0x09, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x48, 0x0a, - 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f, - 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x62, 0x73, 0x6f, - 0x6c, 0x75, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x30, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0c, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x48, 0x74, 0x74, 0x70, 0x31, 0x30, 0x12, 0x36, 0x0a, - 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x66, 0x6f, - 0x72, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x30, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x48, - 0x74, 0x74, 0x70, 0x31, 0x30, 0x12, 0x6b, 0x0a, 0x11, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x7a, 0x0a, - 0x2d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, - 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0xa6, 0x05, 0x0a, 0x0f, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x7d, 0x0a, - 0x11, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x77, 0x6f, 0x72, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x60, 0x0a, 0x06, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x63, - 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, - 0x73, 0x3a, 0x50, 0x9a, 0xc5, 0x88, 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, - 0x72, 0x64, 0x73, 0x1a, 0xf4, 0x01, 0x0a, 0x06, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x67, - 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, - 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x14, 0x0a, 0x0d, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8f, 0x02, 0x0a, 0x11, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, - 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x45, 0x0a, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, - 0x01, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x43, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, - 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xb6, 0x0e, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x32, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x46, 0x0a, 0x10, 0x68, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x68, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x61, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, - 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x2a, 0x08, 0x18, 0xff, 0xff, 0xff, - 0xff, 0x07, 0x28, 0x01, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x6a, 0x0a, 0x1a, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, - 0x0c, 0x2a, 0x0a, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x17, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x72, 0x0a, 0x1e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, - 0x0c, 0x2a, 0x0a, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x1b, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x55, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x4f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x64, 0x0a, - 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x4f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x31, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x73, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x2b, 0x6d, - 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x6f, 0x0a, 0x26, 0x6d, 0x61, - 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x21, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x91, 0x01, 0x0a, 0x34, - 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x77, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, - 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, - 0x01, 0x52, 0x2c, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x57, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, - 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x12, - 0x82, 0x01, 0x0a, 0x3e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, - 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x36, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, - 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x69, 0x6e, 0x67, 0x12, 0x7a, 0x0a, 0x2d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, - 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, - 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, - 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x7f, 0x0a, 0x1a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x18, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x5f, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4b, 0x65, 0x65, 0x70, - 0x61, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x13, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, - 0x76, 0x65, 0x1a, 0xe8, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x13, 0xfa, 0x42, 0x08, 0x2a, - 0x06, 0x18, 0xff, 0xff, 0x03, 0x28, 0x00, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, - 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x3a, 0x30, 0x9a, - 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xad, 0x01, 0x0a, 0x13, 0x47, 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x65, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2f, - 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, - 0x42, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_protocol_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_protocol_proto_rawDescData = file_envoy_config_core_v4alpha_protocol_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_protocol_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_protocol_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_protocol_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_protocol_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v4alpha_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_envoy_config_core_v4alpha_protocol_proto_goTypes = []interface{}{ - (HttpProtocolOptions_HeadersWithUnderscoresAction)(0), // 0: envoy.config.core.v4alpha.HttpProtocolOptions.HeadersWithUnderscoresAction - (*TcpProtocolOptions)(nil), // 1: envoy.config.core.v4alpha.TcpProtocolOptions - (*UpstreamHttpProtocolOptions)(nil), // 2: envoy.config.core.v4alpha.UpstreamHttpProtocolOptions - (*HttpProtocolOptions)(nil), // 3: envoy.config.core.v4alpha.HttpProtocolOptions - (*Http1ProtocolOptions)(nil), // 4: envoy.config.core.v4alpha.Http1ProtocolOptions - (*KeepaliveSettings)(nil), // 5: envoy.config.core.v4alpha.KeepaliveSettings - (*Http2ProtocolOptions)(nil), // 6: envoy.config.core.v4alpha.Http2ProtocolOptions - (*GrpcProtocolOptions)(nil), // 7: envoy.config.core.v4alpha.GrpcProtocolOptions - (*Http1ProtocolOptions_HeaderKeyFormat)(nil), // 8: envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat - (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords)(nil), // 9: envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords - (*Http1ProtocolOptions_HeaderKeyFormat_Custom)(nil), // 10: envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.Custom - nil, // 11: envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.Custom.RulesEntry - (*Http2ProtocolOptions_SettingsParameter)(nil), // 12: envoy.config.core.v4alpha.Http2ProtocolOptions.SettingsParameter - (*duration.Duration)(nil), // 13: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 14: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 15: google.protobuf.BoolValue - (*v3.Percent)(nil), // 16: envoy.type.v3.Percent -} -var file_envoy_config_core_v4alpha_protocol_proto_depIdxs = []int32{ - 13, // 0: envoy.config.core.v4alpha.HttpProtocolOptions.idle_timeout:type_name -> google.protobuf.Duration - 13, // 1: envoy.config.core.v4alpha.HttpProtocolOptions.max_connection_duration:type_name -> google.protobuf.Duration - 14, // 2: envoy.config.core.v4alpha.HttpProtocolOptions.max_headers_count:type_name -> google.protobuf.UInt32Value - 13, // 3: envoy.config.core.v4alpha.HttpProtocolOptions.max_stream_duration:type_name -> google.protobuf.Duration - 0, // 4: envoy.config.core.v4alpha.HttpProtocolOptions.headers_with_underscores_action:type_name -> envoy.config.core.v4alpha.HttpProtocolOptions.HeadersWithUnderscoresAction - 15, // 5: envoy.config.core.v4alpha.Http1ProtocolOptions.allow_absolute_url:type_name -> google.protobuf.BoolValue - 8, // 6: envoy.config.core.v4alpha.Http1ProtocolOptions.header_key_format:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat - 15, // 7: envoy.config.core.v4alpha.Http1ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 13, // 8: envoy.config.core.v4alpha.KeepaliveSettings.interval:type_name -> google.protobuf.Duration - 13, // 9: envoy.config.core.v4alpha.KeepaliveSettings.timeout:type_name -> google.protobuf.Duration - 16, // 10: envoy.config.core.v4alpha.KeepaliveSettings.interval_jitter:type_name -> envoy.type.v3.Percent - 14, // 11: envoy.config.core.v4alpha.Http2ProtocolOptions.hpack_table_size:type_name -> google.protobuf.UInt32Value - 14, // 12: envoy.config.core.v4alpha.Http2ProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value - 14, // 13: envoy.config.core.v4alpha.Http2ProtocolOptions.initial_stream_window_size:type_name -> google.protobuf.UInt32Value - 14, // 14: envoy.config.core.v4alpha.Http2ProtocolOptions.initial_connection_window_size:type_name -> google.protobuf.UInt32Value - 14, // 15: envoy.config.core.v4alpha.Http2ProtocolOptions.max_outbound_frames:type_name -> google.protobuf.UInt32Value - 14, // 16: envoy.config.core.v4alpha.Http2ProtocolOptions.max_outbound_control_frames:type_name -> google.protobuf.UInt32Value - 14, // 17: envoy.config.core.v4alpha.Http2ProtocolOptions.max_consecutive_inbound_frames_with_empty_payload:type_name -> google.protobuf.UInt32Value - 14, // 18: envoy.config.core.v4alpha.Http2ProtocolOptions.max_inbound_priority_frames_per_stream:type_name -> google.protobuf.UInt32Value - 14, // 19: envoy.config.core.v4alpha.Http2ProtocolOptions.max_inbound_window_update_frames_per_data_frame_sent:type_name -> google.protobuf.UInt32Value - 15, // 20: envoy.config.core.v4alpha.Http2ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 12, // 21: envoy.config.core.v4alpha.Http2ProtocolOptions.custom_settings_parameters:type_name -> envoy.config.core.v4alpha.Http2ProtocolOptions.SettingsParameter - 5, // 22: envoy.config.core.v4alpha.Http2ProtocolOptions.connection_keepalive:type_name -> envoy.config.core.v4alpha.KeepaliveSettings - 6, // 23: envoy.config.core.v4alpha.GrpcProtocolOptions.http2_protocol_options:type_name -> envoy.config.core.v4alpha.Http2ProtocolOptions - 9, // 24: envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.proper_case_words:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords - 10, // 25: envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.custom:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.Custom - 11, // 26: envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.Custom.rules:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions.HeaderKeyFormat.Custom.RulesEntry - 14, // 27: envoy.config.core.v4alpha.Http2ProtocolOptions.SettingsParameter.identifier:type_name -> google.protobuf.UInt32Value - 14, // 28: envoy.config.core.v4alpha.Http2ProtocolOptions.SettingsParameter.value:type_name -> google.protobuf.UInt32Value - 29, // [29:29] is the sub-list for method output_type - 29, // [29:29] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_protocol_proto_init() } -func file_envoy_config_core_v4alpha_protocol_proto_init() { - if File_envoy_config_core_v4alpha_protocol_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamHttpProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeepaliveSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http2ProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat_Custom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http2ProtocolOptions_SettingsParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_protocol_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_)(nil), - (*Http1ProtocolOptions_HeaderKeyFormat_Custom_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_protocol_proto_rawDesc, - NumEnums: 1, - NumMessages: 12, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_protocol_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_protocol_proto_depIdxs, - EnumInfos: file_envoy_config_core_v4alpha_protocol_proto_enumTypes, - MessageInfos: file_envoy_config_core_v4alpha_protocol_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_protocol_proto = out.File - file_envoy_config_core_v4alpha_protocol_proto_rawDesc = nil - file_envoy_config_core_v4alpha_protocol_proto_goTypes = nil - file_envoy_config_core_v4alpha_protocol_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/protocol.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/protocol.pb.validate.go deleted file mode 100644 index 2509a2c66d..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/protocol.pb.validate.go +++ /dev/null @@ -1,1151 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/protocol.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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. -func (m *TcpProtocolOptions) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// TcpProtocolOptionsValidationError is the validation error returned by -// TcpProtocolOptions.Validate if the designated constraints aren't met. -type TcpProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpProtocolOptionsValidationError) ErrorName() string { - return "TcpProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e TcpProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTcpProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpProtocolOptionsValidationError{} - -// Validate checks the field values on 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. -func (m *HttpProtocolOptions) Validate() error { - if m == nil { - return nil - } - - 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{}(m.GetMaxConnectionDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "MaxConnectionDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetMaxHeadersCount(); wrapper != nil { - - if wrapper.GetValue() < 1 { - 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, - } - } - } - - // no validation rules for HeadersWithUnderscoresAction - - return nil -} - -// HttpProtocolOptionsValidationError is the validation error returned by -// HttpProtocolOptions.Validate if the designated constraints aren't met. -type HttpProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpProtocolOptionsValidationError) ErrorName() string { - return "HttpProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpProtocolOptionsValidationError{} - -// Validate checks the field values on Http1ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Http1ProtocolOptions) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetAllowAbsoluteUrl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "AllowAbsoluteUrl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AcceptHttp_10 - - // no validation rules for DefaultHostForHttp_10 - - if v, ok := interface{}(m.GetHeaderKeyFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "HeaderKeyFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for EnableTrailers - - // no validation rules for AllowChunkedLength - - if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// Http1ProtocolOptionsValidationError is the validation error returned by -// Http1ProtocolOptions.Validate if the designated constraints aren't met. -type Http1ProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http1ProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http1ProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http1ProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http1ProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http1ProtocolOptionsValidationError) ErrorName() string { - return "Http1ProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e Http1ProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp1ProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http1ProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http1ProtocolOptionsValidationError{} - -// Validate checks the field values on KeepaliveSettings with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *KeepaliveSettings) Validate() error { - if m == nil { - return nil - } - - if m.GetInterval() == nil { - return KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value is required", - } - } - - if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - return KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value must be greater than or equal to 1ms", - } - } - - } - - if m.GetTimeout() == nil { - return KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value is required", - } - } - - if d := m.GetTimeout(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - return KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value must be greater than or equal to 1ms", - } - } - - } - - if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return KeepaliveSettingsValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// KeepaliveSettingsValidationError is the validation error returned by -// KeepaliveSettings.Validate if the designated constraints aren't met. -type KeepaliveSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KeepaliveSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KeepaliveSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KeepaliveSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KeepaliveSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KeepaliveSettingsValidationError) ErrorName() string { - return "KeepaliveSettingsValidationError" -} - -// Error satisfies the builtin error interface -func (e KeepaliveSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKeepaliveSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KeepaliveSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KeepaliveSettingsValidationError{} - -// Validate checks the field values on Http2ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Http2ProtocolOptions) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHpackTableSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "HpackTableSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", - reason: "value must be inside range [1, 2147483647]", - } - } - - } - - if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { - - if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ - field: "InitialStreamWindowSize", - reason: "value must be inside range [65535, 2147483647]", - } - } - - } - - if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { - - if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - return Http2ProtocolOptionsValidationError{ - field: "InitialConnectionWindowSize", - reason: "value must be inside range [65535, 2147483647]", - } - } - - } - - // no validation rules for AllowConnect - - // 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 HiddenEnvoyDeprecatedStreamErrorOnInvalidHttpMessaging - - if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetCustomSettingsParameters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetConnectionKeepalive()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// Http2ProtocolOptionsValidationError is the validation error returned by -// Http2ProtocolOptions.Validate if the designated constraints aren't met. -type Http2ProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http2ProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http2ProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http2ProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http2ProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http2ProtocolOptionsValidationError) ErrorName() string { - return "Http2ProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e Http2ProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp2ProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http2ProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http2ProtocolOptionsValidationError{} - -// Validate checks the field values on GrpcProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *GrpcProtocolOptions) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - return nil -} - -// GrpcProtocolOptionsValidationError is the validation error returned by -// GrpcProtocolOptions.Validate if the designated constraints aren't met. -type GrpcProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcProtocolOptionsValidationError) ErrorName() string { - return "GrpcProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcProtocolOptionsValidationError{} - -// Validate checks the field values on 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, - } - } - } - - case *Http1ProtocolOptions_HeaderKeyFormat_Custom_: - - if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "Custom", - 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 -// Http1ProtocolOptions_HeaderKeyFormat_Custom with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Http1ProtocolOptions_HeaderKeyFormat_Custom) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Rules - - return nil -} - -// Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError is the validation -// error returned by Http1ProtocolOptions_HeaderKeyFormat_Custom.Validate if -// the designated constraints aren't met. -type Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError) ErrorName() string { - return "Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError" -} - -// Error satisfies the builtin error interface -func (e Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError) Error() string { - 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_Custom.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http1ProtocolOptions_HeaderKeyFormat_CustomValidationError{} - -// 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 < 0 || val > 65535 { - return Http2ProtocolOptions_SettingsParameterValidationError{ - field: "Identifier", - reason: "value must be inside range [0, 65535]", - } - } - - } 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/pkg/api/envoy/config/core/v4alpha/proxy_protocol.pb.go b/pkg/api/envoy/config/core/v4alpha/proxy_protocol.pb.go deleted file mode 100644 index ea47d6eb7d..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/proxy_protocol.pb.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/proxy_protocol.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type ProxyProtocolConfig_Version int32 - -const ( - // PROXY protocol version 1. Human readable format. - ProxyProtocolConfig_V1 ProxyProtocolConfig_Version = 0 - // PROXY protocol version 2. Binary format. - ProxyProtocolConfig_V2 ProxyProtocolConfig_Version = 1 -) - -// Enum value maps for ProxyProtocolConfig_Version. -var ( - ProxyProtocolConfig_Version_name = map[int32]string{ - 0: "V1", - 1: "V2", - } - ProxyProtocolConfig_Version_value = map[string]int32{ - "V1": 0, - "V2": 1, - } -) - -func (x ProxyProtocolConfig_Version) Enum() *ProxyProtocolConfig_Version { - p := new(ProxyProtocolConfig_Version) - *p = x - return p -} - -func (x ProxyProtocolConfig_Version) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProxyProtocolConfig_Version) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_proxy_protocol_proto_enumTypes[0].Descriptor() -} - -func (ProxyProtocolConfig_Version) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_proxy_protocol_proto_enumTypes[0] -} - -func (x ProxyProtocolConfig_Version) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProxyProtocolConfig_Version.Descriptor instead. -func (ProxyProtocolConfig_Version) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescGZIP(), []int{0, 0} -} - -type ProxyProtocolConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details - Version ProxyProtocolConfig_Version `protobuf:"varint,1,opt,name=version,proto3,enum=envoy.config.core.v4alpha.ProxyProtocolConfig_Version" json:"version,omitempty"` -} - -func (x *ProxyProtocolConfig) Reset() { - *x = ProxyProtocolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_proxy_protocol_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProxyProtocolConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProxyProtocolConfig) ProtoMessage() {} - -func (x *ProxyProtocolConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_proxy_protocol_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProxyProtocolConfig.ProtoReflect.Descriptor instead. -func (*ProxyProtocolConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescGZIP(), []int{0} -} - -func (x *ProxyProtocolConfig) GetVersion() ProxyProtocolConfig_Version { - if x != nil { - return x.Version - } - return ProxyProtocolConfig_V1 -} - -var File_envoy_config_core_v4alpha_proxy_protocol_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x22, 0x19, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x56, - 0x31, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, - 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x47, 0x0a, 0x27, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescData = file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_proxy_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v4alpha_proxy_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v4alpha_proxy_protocol_proto_goTypes = []interface{}{ - (ProxyProtocolConfig_Version)(0), // 0: envoy.config.core.v4alpha.ProxyProtocolConfig.Version - (*ProxyProtocolConfig)(nil), // 1: envoy.config.core.v4alpha.ProxyProtocolConfig -} -var file_envoy_config_core_v4alpha_proxy_protocol_proto_depIdxs = []int32{ - 0, // 0: envoy.config.core.v4alpha.ProxyProtocolConfig.version:type_name -> envoy.config.core.v4alpha.ProxyProtocolConfig.Version - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_proxy_protocol_proto_init() } -func file_envoy_config_core_v4alpha_proxy_protocol_proto_init() { - if File_envoy_config_core_v4alpha_proxy_protocol_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_proxy_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProxyProtocolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_proxy_protocol_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_proxy_protocol_proto_depIdxs, - EnumInfos: file_envoy_config_core_v4alpha_proxy_protocol_proto_enumTypes, - MessageInfos: file_envoy_config_core_v4alpha_proxy_protocol_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_proxy_protocol_proto = out.File - file_envoy_config_core_v4alpha_proxy_protocol_proto_rawDesc = nil - file_envoy_config_core_v4alpha_proxy_protocol_proto_goTypes = nil - file_envoy_config_core_v4alpha_proxy_protocol_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/proxy_protocol.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/proxy_protocol.pb.validate.go deleted file mode 100644 index e53abcf286..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/proxy_protocol.pb.validate.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/proxy_protocol.proto - -package envoy_config_core_v4alpha - -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{} -) - -// Validate checks the field values on ProxyProtocolConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ProxyProtocolConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Version - - return nil -} - -// ProxyProtocolConfigValidationError is the validation error returned by -// ProxyProtocolConfig.Validate if the designated constraints aren't met. -type ProxyProtocolConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ProxyProtocolConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ProxyProtocolConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ProxyProtocolConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ProxyProtocolConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ProxyProtocolConfigValidationError) ErrorName() string { - return "ProxyProtocolConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e ProxyProtocolConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sProxyProtocolConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ProxyProtocolConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ProxyProtocolConfigValidationError{} diff --git a/pkg/api/envoy/config/core/v4alpha/socket_option.pb.go b/pkg/api/envoy/config/core/v4alpha/socket_option.pb.go deleted file mode 100644 index 5e628541ea..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/socket_option.pb.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/socket_option.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type SocketOption_SocketState int32 - -const ( - // Socket options are applied after socket creation but before binding the socket to a port - SocketOption_STATE_PREBIND SocketOption_SocketState = 0 - // Socket options are applied after binding the socket to a port but before calling listen() - SocketOption_STATE_BOUND SocketOption_SocketState = 1 - // Socket options are applied after calling listen() - SocketOption_STATE_LISTENING SocketOption_SocketState = 2 -) - -// Enum value maps for SocketOption_SocketState. -var ( - SocketOption_SocketState_name = map[int32]string{ - 0: "STATE_PREBIND", - 1: "STATE_BOUND", - 2: "STATE_LISTENING", - } - SocketOption_SocketState_value = map[string]int32{ - "STATE_PREBIND": 0, - "STATE_BOUND": 1, - "STATE_LISTENING": 2, - } -) - -func (x SocketOption_SocketState) Enum() *SocketOption_SocketState { - p := new(SocketOption_SocketState) - *p = x - return p -} - -func (x SocketOption_SocketState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SocketOption_SocketState) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v4alpha_socket_option_proto_enumTypes[0].Descriptor() -} - -func (SocketOption_SocketState) Type() protoreflect.EnumType { - return &file_envoy_config_core_v4alpha_socket_option_proto_enumTypes[0] -} - -func (x SocketOption_SocketState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SocketOption_SocketState.Descriptor instead. -func (SocketOption_SocketState) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_socket_option_proto_rawDescGZIP(), []int{0, 0} -} - -// Generic socket option message. This would be used to set socket options that -// might not exist in upstream kernels or precompiled Envoy binaries. -// [#next-free-field: 7] -type SocketOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An optional name to give this socket option for debugging, etc. - // Uniqueness is not required and no special meaning is assumed. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP - Level int64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` - // The numeric name as passed to setsockopt - Name int64 `protobuf:"varint,3,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to Value: - // *SocketOption_IntValue - // *SocketOption_BufValue - Value isSocketOption_Value `protobuf_oneof:"value"` - // The state in which the option will be applied. When used in BindConfig - // STATE_PREBIND is currently the only valid value. - State SocketOption_SocketState `protobuf:"varint,6,opt,name=state,proto3,enum=envoy.config.core.v4alpha.SocketOption_SocketState" json:"state,omitempty"` -} - -func (x *SocketOption) Reset() { - *x = SocketOption{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_socket_option_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SocketOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SocketOption) ProtoMessage() {} - -func (x *SocketOption) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_socket_option_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SocketOption.ProtoReflect.Descriptor instead. -func (*SocketOption) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_socket_option_proto_rawDescGZIP(), []int{0} -} - -func (x *SocketOption) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *SocketOption) GetLevel() int64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *SocketOption) GetName() int64 { - if x != nil { - return x.Name - } - return 0 -} - -func (m *SocketOption) GetValue() isSocketOption_Value { - if m != nil { - return m.Value - } - return nil -} - -func (x *SocketOption) GetIntValue() int64 { - if x, ok := x.GetValue().(*SocketOption_IntValue); ok { - return x.IntValue - } - return 0 -} - -func (x *SocketOption) GetBufValue() []byte { - if x, ok := x.GetValue().(*SocketOption_BufValue); ok { - return x.BufValue - } - return nil -} - -func (x *SocketOption) GetState() SocketOption_SocketState { - if x != nil { - return x.State - } - return SocketOption_STATE_PREBIND -} - -type isSocketOption_Value interface { - isSocketOption_Value() -} - -type SocketOption_IntValue struct { - // Because many sockopts take an int value. - IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3,oneof"` -} - -type SocketOption_BufValue struct { - // Otherwise it's a byte buffer. - BufValue []byte `protobuf:"bytes,5,opt,name=buf_value,json=bufValue,proto3,oneof"` -} - -func (*SocketOption_IntValue) isSocketOption_Value() {} - -func (*SocketOption_BufValue) isSocketOption_Value() {} - -var File_envoy_config_core_v4alpha_socket_option_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_socket_option_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x02, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x62, 0x75, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x08, 0x62, 0x75, 0x66, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x53, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x46, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x52, - 0x45, 0x42, 0x49, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x3a, 0x28, 0x9a, - 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x46, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x11, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_socket_option_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_socket_option_proto_rawDescData = file_envoy_config_core_v4alpha_socket_option_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_socket_option_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_socket_option_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_socket_option_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_socket_option_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_socket_option_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_socket_option_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v4alpha_socket_option_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v4alpha_socket_option_proto_goTypes = []interface{}{ - (SocketOption_SocketState)(0), // 0: envoy.config.core.v4alpha.SocketOption.SocketState - (*SocketOption)(nil), // 1: envoy.config.core.v4alpha.SocketOption -} -var file_envoy_config_core_v4alpha_socket_option_proto_depIdxs = []int32{ - 0, // 0: envoy.config.core.v4alpha.SocketOption.state:type_name -> envoy.config.core.v4alpha.SocketOption.SocketState - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_socket_option_proto_init() } -func file_envoy_config_core_v4alpha_socket_option_proto_init() { - if File_envoy_config_core_v4alpha_socket_option_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_socket_option_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SocketOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_socket_option_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*SocketOption_IntValue)(nil), - (*SocketOption_BufValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_socket_option_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_socket_option_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_socket_option_proto_depIdxs, - EnumInfos: file_envoy_config_core_v4alpha_socket_option_proto_enumTypes, - MessageInfos: file_envoy_config_core_v4alpha_socket_option_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_socket_option_proto = out.File - file_envoy_config_core_v4alpha_socket_option_proto_rawDesc = nil - file_envoy_config_core_v4alpha_socket_option_proto_goTypes = nil - file_envoy_config_core_v4alpha_socket_option_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/socket_option.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/socket_option.pb.validate.go deleted file mode 100644 index ede0baed94..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/socket_option.pb.validate.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/socket_option.proto - -package envoy_config_core_v4alpha - -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{} -) - -// 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/pkg/api/envoy/config/core/v4alpha/substitution_format_string.pb.go b/pkg/api/envoy/config/core/v4alpha/substitution_format_string.pb.go deleted file mode 100644 index 4de38bcd36..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/substitution_format_string.pb.go +++ /dev/null @@ -1,342 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/core/v4alpha/substitution_format_string.proto - -package envoy_config_core_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration to use multiple :ref:`command operators ` -// to generate a new string in either plain text or JSON format. -// [#next-free-field: 6] -type SubstitutionFormatString struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Format: - // *SubstitutionFormatString_HiddenEnvoyDeprecatedTextFormat - // *SubstitutionFormatString_JsonFormat - // *SubstitutionFormatString_TextFormatSource - Format isSubstitutionFormatString_Format `protobuf_oneof:"format"` - // If set to true, when command operators are evaluated to null, - // - // * for ``text_format``, the output of the empty operator is changed from ``-`` to an - // empty string, so that empty values are omitted entirely. - // * for ``json_format`` the keys with null values are omitted in the output structure. - OmitEmptyValues bool `protobuf:"varint,3,opt,name=omit_empty_values,json=omitEmptyValues,proto3" json:"omit_empty_values,omitempty"` - // Specify a *content_type* field. - // If this field is not set then ``text/plain`` is used for *text_format* and - // ``application/json`` is used for *json_format*. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // content_type: "text/html; charset=UTF-8" - // - ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` -} - -func (x *SubstitutionFormatString) Reset() { - *x = SubstitutionFormatString{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v4alpha_substitution_format_string_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubstitutionFormatString) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubstitutionFormatString) ProtoMessage() {} - -func (x *SubstitutionFormatString) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v4alpha_substitution_format_string_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubstitutionFormatString.ProtoReflect.Descriptor instead. -func (*SubstitutionFormatString) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescGZIP(), []int{0} -} - -func (m *SubstitutionFormatString) GetFormat() isSubstitutionFormatString_Format { - if m != nil { - return m.Format - } - return nil -} - -// Deprecated: Do not use. -func (x *SubstitutionFormatString) GetHiddenEnvoyDeprecatedTextFormat() string { - if x, ok := x.GetFormat().(*SubstitutionFormatString_HiddenEnvoyDeprecatedTextFormat); ok { - return x.HiddenEnvoyDeprecatedTextFormat - } - return "" -} - -func (x *SubstitutionFormatString) GetJsonFormat() *_struct.Struct { - if x, ok := x.GetFormat().(*SubstitutionFormatString_JsonFormat); ok { - return x.JsonFormat - } - return nil -} - -func (x *SubstitutionFormatString) GetTextFormatSource() *DataSource { - if x, ok := x.GetFormat().(*SubstitutionFormatString_TextFormatSource); ok { - return x.TextFormatSource - } - return nil -} - -func (x *SubstitutionFormatString) GetOmitEmptyValues() bool { - if x != nil { - return x.OmitEmptyValues - } - return false -} - -func (x *SubstitutionFormatString) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -type isSubstitutionFormatString_Format interface { - isSubstitutionFormatString_Format() -} - -type SubstitutionFormatString_HiddenEnvoyDeprecatedTextFormat struct { - // Specify a format with command operators to form a text string. - // Its details is described in :ref:`format string`. - // - // For example, setting ``text_format`` like below, - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // generates plain text similar to: - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - // Deprecated in favor of :ref:`text_format_source `. To migrate text format strings, use the :ref:`inline_string ` field. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedTextFormat string `protobuf:"bytes,1,opt,name=hidden_envoy_deprecated_text_format,json=hiddenEnvoyDeprecatedTextFormat,proto3,oneof"` -} - -type SubstitutionFormatString_JsonFormat struct { - // Specify a format with command operators to form a JSON string. - // Its details is described in :ref:`format dictionary`. - // Values are rendered as strings, numbers, or boolean values as appropriate. - // Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA). - // See the documentation for a specific command operator for details. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // - // The following JSON object would be created: - // - // .. code-block:: json - // - // { - // "status": 500, - // "message": "My error message" - // } - // - JsonFormat *_struct.Struct `protobuf:"bytes,2,opt,name=json_format,json=jsonFormat,proto3,oneof"` -} - -type SubstitutionFormatString_TextFormatSource struct { - // Specify a format with command operators to form a text string. - // Its details is described in :ref:`format string`. - // - // For example, setting ``text_format`` like below, - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format_source: - // inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // generates plain text similar to: - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - TextFormatSource *DataSource `protobuf:"bytes,5,opt,name=text_format_source,json=textFormatSource,proto3,oneof"` -} - -func (*SubstitutionFormatString_HiddenEnvoyDeprecatedTextFormat) isSubstitutionFormatString_Format() { -} - -func (*SubstitutionFormatString_JsonFormat) isSubstitutionFormatString_Format() {} - -func (*SubstitutionFormatString_TextFormatSource) isSubstitutionFormatString_Format() {} - -var File_envoy_config_core_v4alpha_substitution_format_string_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x75, 0x62, 0x73, - 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x73, 0x74, - 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x12, 0x52, 0x0a, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, - 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x65, 0x78, - 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, - 0x00, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x55, 0x0a, - 0x12, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x48, 0x00, 0x52, 0x10, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0f, 0x6f, 0x6d, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x0d, 0x0a, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x52, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x1d, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescOnce sync.Once - file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescData = file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDesc -) - -func file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescGZIP() []byte { - file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescData) - }) - return file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDescData -} - -var file_envoy_config_core_v4alpha_substitution_format_string_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v4alpha_substitution_format_string_proto_goTypes = []interface{}{ - (*SubstitutionFormatString)(nil), // 0: envoy.config.core.v4alpha.SubstitutionFormatString - (*_struct.Struct)(nil), // 1: google.protobuf.Struct - (*DataSource)(nil), // 2: envoy.config.core.v4alpha.DataSource -} -var file_envoy_config_core_v4alpha_substitution_format_string_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v4alpha.SubstitutionFormatString.json_format:type_name -> google.protobuf.Struct - 2, // 1: envoy.config.core.v4alpha.SubstitutionFormatString.text_format_source:type_name -> envoy.config.core.v4alpha.DataSource - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v4alpha_substitution_format_string_proto_init() } -func file_envoy_config_core_v4alpha_substitution_format_string_proto_init() { - if File_envoy_config_core_v4alpha_substitution_format_string_proto != nil { - return - } - file_envoy_config_core_v4alpha_base_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v4alpha_substitution_format_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubstitutionFormatString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v4alpha_substitution_format_string_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*SubstitutionFormatString_HiddenEnvoyDeprecatedTextFormat)(nil), - (*SubstitutionFormatString_JsonFormat)(nil), - (*SubstitutionFormatString_TextFormatSource)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v4alpha_substitution_format_string_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v4alpha_substitution_format_string_proto_depIdxs, - MessageInfos: file_envoy_config_core_v4alpha_substitution_format_string_proto_msgTypes, - }.Build() - File_envoy_config_core_v4alpha_substitution_format_string_proto = out.File - file_envoy_config_core_v4alpha_substitution_format_string_proto_rawDesc = nil - file_envoy_config_core_v4alpha_substitution_format_string_proto_goTypes = nil - file_envoy_config_core_v4alpha_substitution_format_string_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/core/v4alpha/substitution_format_string.pb.validate.go b/pkg/api/envoy/config/core/v4alpha/substitution_format_string.pb.validate.go deleted file mode 100644 index cfe94d50f7..0000000000 --- a/pkg/api/envoy/config/core/v4alpha/substitution_format_string.pb.validate.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v4alpha/substitution_format_string.proto - -package envoy_config_core_v4alpha - -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{} -) - -// Validate checks the field values on SubstitutionFormatString with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *SubstitutionFormatString) Validate() error { - if m == nil { - return nil - } - - // no validation rules for OmitEmptyValues - - // no validation rules for ContentType - - switch m.Format.(type) { - - case *SubstitutionFormatString_HiddenEnvoyDeprecatedTextFormat: - // no validation rules for HiddenEnvoyDeprecatedTextFormat - - case *SubstitutionFormatString_JsonFormat: - - if m.GetJsonFormat() == nil { - return SubstitutionFormatStringValidationError{ - field: "JsonFormat", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SubstitutionFormatStringValidationError{ - field: "JsonFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *SubstitutionFormatString_TextFormatSource: - - if v, ok := interface{}(m.GetTextFormatSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SubstitutionFormatStringValidationError{ - field: "TextFormatSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return SubstitutionFormatStringValidationError{ - field: "Format", - reason: "value is required", - } - - } - - return nil -} - -// SubstitutionFormatStringValidationError is the validation error returned by -// SubstitutionFormatString.Validate if the designated constraints aren't met. -type SubstitutionFormatStringValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SubstitutionFormatStringValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SubstitutionFormatStringValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SubstitutionFormatStringValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SubstitutionFormatStringValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SubstitutionFormatStringValidationError) ErrorName() string { - return "SubstitutionFormatStringValidationError" -} - -// Error satisfies the builtin error interface -func (e SubstitutionFormatStringValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSubstitutionFormatString.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SubstitutionFormatStringValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SubstitutionFormatStringValidationError{} diff --git a/pkg/api/envoy/config/endpoint/v3/endpoint.pb.go b/pkg/api/envoy/config/endpoint/v3/endpoint.pb.go index 19d7fa37c6..7ae0cb5d9b 100644 --- a/pkg/api/envoy/config/endpoint/v3/endpoint.pb.go +++ b/pkg/api/envoy/config/endpoint/v3/endpoint.pb.go @@ -1,19 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/endpoint/v3/endpoint.proto -package envoy_config_endpoint_v3 +package endpointv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -27,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Each route from RDS will map to a single cluster or traffic split across // clusters using weights expressed in the RDS WeightedCluster. // @@ -47,9 +41,9 @@ type ClusterLoadAssignment struct { unknownFields protoimpl.UnknownFields // Name of the cluster. This will be the :ref:`service_name - // ` value if specified + // ` 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 []*LocalityLbEndpoints `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` @@ -168,8 +162,6 @@ type ClusterLoadAssignment_Policy struct { // are considered stale and should be marked unhealthy. // Defaults to 0 which means endpoints never go stale. EndpointStaleAfter *duration.Duration `protobuf:"bytes,4,opt,name=endpoint_stale_after,json=endpointStaleAfter,proto3" json:"endpoint_stale_after,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedDisableOverprovisioning bool `protobuf:"varint,5,opt,name=hidden_envoy_deprecated_disable_overprovisioning,json=hiddenEnvoyDeprecatedDisableOverprovisioning,proto3" json:"hidden_envoy_deprecated_disable_overprovisioning,omitempty"` } func (x *ClusterLoadAssignment_Policy) Reset() { @@ -225,14 +217,6 @@ func (x *ClusterLoadAssignment_Policy) GetEndpointStaleAfter() *duration.Duratio return nil } -// Deprecated: Do not use. -func (x *ClusterLoadAssignment_Policy) GetHiddenEnvoyDeprecatedDisableOverprovisioning() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedDisableOverprovisioning - } - return false -} - // [#not-implemented-hide:] type ClusterLoadAssignment_Policy_DropOverload struct { state protoimpl.MessageState @@ -303,94 +287,92 @@ var file_envoy_config_endpoint_v3_endpoint_proto_rawDesc = []byte{ 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x08, - 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, - 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, - 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x6c, 0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, - 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, - 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x4e, - 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x8f, - 0x05, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x6a, 0x0a, 0x0e, 0x64, 0x72, 0x6f, - 0x70, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, - 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, - 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x5e, 0x0a, 0x17, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x16, 0x6f, - 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x46, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x55, 0x0a, 0x14, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x53, 0x74, 0x61, 0x6c, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x30, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x2c, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0xbd, 0x01, 0x0a, 0x0c, 0x44, 0x72, 0x6f, - 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x49, - 0x0a, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, - 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xa6, 0x08, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x6c, 0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, + 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x12, 0x4e, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x1a, 0xc3, 0x04, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x6a, 0x0a, 0x0e, 0x64, + 0x72, 0x6f, 0x70, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x44, 0x72, 0x6f, 0x70, - 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, - 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, - 0x1a, 0x65, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x4f, 0x76, + 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x5e, 0x0a, 0x17, 0x6f, 0x76, 0x65, 0x72, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, + 0x16, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x55, 0x0a, 0x14, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x6c, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x1a, 0xbd, + 0x01, 0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x23, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, + 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x3a, + 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x3a, 0x30, + 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x52, 0x18, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0x65, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0x9a, + 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x8d, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x42, 0x41, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/endpoint/v3/endpoint.pb.validate.go b/pkg/api/envoy/config/endpoint/v3/endpoint.pb.validate.go index e656663d0c..50dfaafab3 100644 --- a/pkg/api/envoy/config/endpoint/v3/endpoint.pb.validate.go +++ b/pkg/api/envoy/config/endpoint/v3/endpoint.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/endpoint/v3/endpoint.proto -package envoy_config_endpoint_v3 +package endpointv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterLoadAssignment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterLoadAssignment with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterLoadAssignmentMultiError, or nil if none found. +func (m *ClusterLoadAssignment) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterLoadAssignment) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return ClusterLoadAssignmentValidationError{ + err := ClusterLoadAssignmentValidationError{ field: "ClusterName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignmentValidationError{ field: fmt.Sprintf("Endpoints[%v]", idx), @@ -63,24 +102,72 @@ func (m *ClusterLoadAssignment) Validate() error { } - for key, val := range m.GetNamedEndpoints() { - _ = val + { + sorted_keys := make([]string, len(m.GetNamedEndpoints())) + i := 0 + for key := range m.GetNamedEndpoints() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetNamedEndpoints()[key] + _ = val + + // no validation rules for NamedEndpoints[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("NamedEndpoints[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("NamedEndpoints[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("NamedEndpoints[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } - // no validation rules for NamedEndpoints[key] + } + } - if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: "Policy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("NamedEndpoints[%v]", key), + errors = append(errors, ClusterLoadAssignmentValidationError{ + field: "Policy", reason: "embedded message failed validation", cause: err, - } + }) } } - - } - - if v, ok := interface{}(m.GetPolicy()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignmentValidationError{ field: "Policy", @@ -90,9 +177,30 @@ func (m *ClusterLoadAssignment) Validate() error { } } + if len(errors) > 0 { + return ClusterLoadAssignmentMultiError(errors) + } + return nil } +// ClusterLoadAssignmentMultiError is an error wrapping multiple validation +// errors returned by ClusterLoadAssignment.ValidateAll() if the designated +// constraints aren't met. +type ClusterLoadAssignmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterLoadAssignmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterLoadAssignmentMultiError) AllErrors() []error { return m } + // ClusterLoadAssignmentValidationError is the validation error returned by // ClusterLoadAssignment.Validate if the designated constraints aren't met. type ClusterLoadAssignmentValidationError struct { @@ -151,16 +259,49 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterLoadAssignment_Policy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterLoadAssignment_Policy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterLoadAssignment_PolicyMultiError, or nil if none found. +func (m *ClusterLoadAssignment_Policy) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterLoadAssignment_Policy) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetDropOverloads() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignment_PolicyValidationError{ + field: fmt.Sprintf("DropOverloads[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignment_PolicyValidationError{ + field: fmt.Sprintf("DropOverloads[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignment_PolicyValidationError{ field: fmt.Sprintf("DropOverloads[%v]", idx), @@ -175,40 +316,72 @@ func (m *ClusterLoadAssignment_Policy) Validate() error { if wrapper := m.GetOverprovisioningFactor(); wrapper != nil { if wrapper.GetValue() <= 0 { - return ClusterLoadAssignment_PolicyValidationError{ + err := ClusterLoadAssignment_PolicyValidationError{ field: "OverprovisioningFactor", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } if d := m.GetEndpointStaleAfter(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return ClusterLoadAssignment_PolicyValidationError{ + err = ClusterLoadAssignment_PolicyValidationError{ field: "EndpointStaleAfter", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return ClusterLoadAssignment_PolicyValidationError{ - field: "EndpointStaleAfter", - reason: "value must be greater than 0s", + if dur <= gt { + err := ClusterLoadAssignment_PolicyValidationError{ + field: "EndpointStaleAfter", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - // no validation rules for HiddenEnvoyDeprecatedDisableOverprovisioning + if len(errors) > 0 { + return ClusterLoadAssignment_PolicyMultiError(errors) + } return nil } +// ClusterLoadAssignment_PolicyMultiError is an error wrapping multiple +// validation errors returned by ClusterLoadAssignment_Policy.ValidateAll() if +// the designated constraints aren't met. +type ClusterLoadAssignment_PolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterLoadAssignment_PolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterLoadAssignment_PolicyMultiError) AllErrors() []error { return m } + // ClusterLoadAssignment_PolicyValidationError is the validation error returned // by ClusterLoadAssignment_Policy.Validate if the designated constraints // aren't met. @@ -268,20 +441,59 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ClusterLoadAssignment_Policy_DropOverload with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ClusterLoadAssignment_Policy_DropOverloadMultiError, or nil if none found. +func (m *ClusterLoadAssignment_Policy_DropOverload) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterLoadAssignment_Policy_DropOverload) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCategory()) < 1 { - return ClusterLoadAssignment_Policy_DropOverloadValidationError{ + err := ClusterLoadAssignment_Policy_DropOverloadValidationError{ field: "Category", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDropPercentage()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDropPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterLoadAssignment_Policy_DropOverloadValidationError{ + field: "DropPercentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterLoadAssignment_Policy_DropOverloadValidationError{ + field: "DropPercentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDropPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterLoadAssignment_Policy_DropOverloadValidationError{ field: "DropPercentage", @@ -291,9 +503,31 @@ func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { } } + if len(errors) > 0 { + return ClusterLoadAssignment_Policy_DropOverloadMultiError(errors) + } + return nil } +// ClusterLoadAssignment_Policy_DropOverloadMultiError is an error wrapping +// multiple validation errors returned by +// ClusterLoadAssignment_Policy_DropOverload.ValidateAll() if the designated +// constraints aren't met. +type ClusterLoadAssignment_Policy_DropOverloadMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterLoadAssignment_Policy_DropOverloadMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterLoadAssignment_Policy_DropOverloadMultiError) AllErrors() []error { return m } + // ClusterLoadAssignment_Policy_DropOverloadValidationError is the validation // error returned by ClusterLoadAssignment_Policy_DropOverload.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.go b/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.go index 64e9f797ec..ca94d0599b 100644 --- a/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.go +++ b/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/endpoint/v3/endpoint_components.proto -package envoy_config_endpoint_v3 +package endpointv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Upstream host identifier. type Endpoint struct { state protoimpl.MessageState @@ -41,7 +36,7 @@ type Endpoint struct { // // 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 ` + // specified :ref:`resolver ` // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, // and will be resolved via DNS. Address *v3.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` @@ -56,7 +51,7 @@ type Endpoint struct { // The hostname associated with this endpoint. This hostname is not used for routing or address // resolution. If provided, it will be associated with the endpoint, and can be used for features // that require a hostname, like - // :ref:`auto_host_rewrite `. + // :ref:`auto_host_rewrite `. Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` } @@ -133,7 +128,7 @@ type LbEndpoint struct { // 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 + // :ref:`RouteAction ` metadata_match field // to subset the endpoints considered in cluster load balancing. Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // The optional load balancing weight of the upstream host; at least 1. @@ -205,7 +200,7 @@ func (x *LbEndpoint) GetHealthStatus() v3.HealthStatus { if x != nil { return x.HealthStatus } - return v3.HealthStatus_UNKNOWN + return v3.HealthStatus(0) } func (x *LbEndpoint) GetMetadata() *v3.Metadata { @@ -239,11 +234,70 @@ func (*LbEndpoint_Endpoint) isLbEndpoint_HostIdentifier() {} func (*LbEndpoint_EndpointName) isLbEndpoint_HostIdentifier() {} +// [#not-implemented-hide:] +// A configuration for a LEDS collection. +type LedsClusterLocalityConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration for the source of LEDS updates for a Locality. + LedsConfig *v3.ConfigSource `protobuf:"bytes,1,opt,name=leds_config,json=ledsConfig,proto3" json:"leds_config,omitempty"` + // The xDS transport protocol glob collection resource name. + // The service is only supported in delta xDS (incremental) mode. + LedsCollectionName string `protobuf:"bytes,2,opt,name=leds_collection_name,json=ledsCollectionName,proto3" json:"leds_collection_name,omitempty"` +} + +func (x *LedsClusterLocalityConfig) Reset() { + *x = LedsClusterLocalityConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LedsClusterLocalityConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedsClusterLocalityConfig) ProtoMessage() {} + +func (x *LedsClusterLocalityConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedsClusterLocalityConfig.ProtoReflect.Descriptor instead. +func (*LedsClusterLocalityConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_endpoint_v3_endpoint_components_proto_rawDescGZIP(), []int{2} +} + +func (x *LedsClusterLocalityConfig) GetLedsConfig() *v3.ConfigSource { + if x != nil { + return x.LedsConfig + } + return nil +} + +func (x *LedsClusterLocalityConfig) GetLedsCollectionName() string { + if x != nil { + return x.LedsCollectionName + } + return "" +} + // 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. -// [#next-free-field: 7] +// One can have multiple LocalityLbEndpoints for a locality, but only if +// they have different priorities. +// [#next-free-field: 9] type LocalityLbEndpoints struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -252,7 +306,15 @@ type LocalityLbEndpoints struct { // Identifies location of where the upstream hosts run. Locality *v3.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` // The group of endpoints belonging to the locality specified. + // [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be + // deprecated and replaced by *load_balancer_endpoints*.] LbEndpoints []*LbEndpoint `protobuf:"bytes,2,rep,name=lb_endpoints,json=lbEndpoints,proto3" json:"lb_endpoints,omitempty"` + // [#not-implemented-hide:] + // + // Types that are assignable to LbConfig: + // *LocalityLbEndpoints_LoadBalancerEndpoints + // *LocalityLbEndpoints_LedsClusterLocalityConfig + LbConfig isLocalityLbEndpoints_LbConfig `protobuf_oneof:"lb_config"` // Optional: Per priority/region/zone/sub_zone weight; at least 1. 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 @@ -287,7 +349,7 @@ type LocalityLbEndpoints struct { func (x *LocalityLbEndpoints) Reset() { *x = LocalityLbEndpoints{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[2] + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -300,7 +362,7 @@ func (x *LocalityLbEndpoints) String() string { func (*LocalityLbEndpoints) ProtoMessage() {} func (x *LocalityLbEndpoints) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[2] + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -313,7 +375,7 @@ func (x *LocalityLbEndpoints) ProtoReflect() protoreflect.Message { // Deprecated: Use LocalityLbEndpoints.ProtoReflect.Descriptor instead. func (*LocalityLbEndpoints) Descriptor() ([]byte, []int) { - return file_envoy_config_endpoint_v3_endpoint_components_proto_rawDescGZIP(), []int{2} + return file_envoy_config_endpoint_v3_endpoint_components_proto_rawDescGZIP(), []int{3} } func (x *LocalityLbEndpoints) GetLocality() *v3.Locality { @@ -330,6 +392,27 @@ func (x *LocalityLbEndpoints) GetLbEndpoints() []*LbEndpoint { return nil } +func (m *LocalityLbEndpoints) GetLbConfig() isLocalityLbEndpoints_LbConfig { + if m != nil { + return m.LbConfig + } + return nil +} + +func (x *LocalityLbEndpoints) GetLoadBalancerEndpoints() *LocalityLbEndpoints_LbEndpointList { + if x, ok := x.GetLbConfig().(*LocalityLbEndpoints_LoadBalancerEndpoints); ok { + return x.LoadBalancerEndpoints + } + return nil +} + +func (x *LocalityLbEndpoints) GetLedsClusterLocalityConfig() *LedsClusterLocalityConfig { + if x, ok := x.GetLbConfig().(*LocalityLbEndpoints_LedsClusterLocalityConfig); ok { + return x.LedsClusterLocalityConfig + } + return nil +} + func (x *LocalityLbEndpoints) GetLoadBalancingWeight() *wrappers.UInt32Value { if x != nil { return x.LoadBalancingWeight @@ -351,6 +434,26 @@ func (x *LocalityLbEndpoints) GetProximity() *wrappers.UInt32Value { return nil } +type isLocalityLbEndpoints_LbConfig interface { + isLocalityLbEndpoints_LbConfig() +} + +type LocalityLbEndpoints_LoadBalancerEndpoints struct { + // The group of endpoints belonging to the locality. + // [#comment:TODO(adisuissa): Once LEDS is implemented the *lb_endpoints* field + // needs to be deprecated.] + LoadBalancerEndpoints *LocalityLbEndpoints_LbEndpointList `protobuf:"bytes,7,opt,name=load_balancer_endpoints,json=loadBalancerEndpoints,proto3,oneof"` +} + +type LocalityLbEndpoints_LedsClusterLocalityConfig struct { + // LEDS Configuration for the current locality. + LedsClusterLocalityConfig *LedsClusterLocalityConfig `protobuf:"bytes,8,opt,name=leds_cluster_locality_config,json=ledsClusterLocalityConfig,proto3,oneof"` +} + +func (*LocalityLbEndpoints_LoadBalancerEndpoints) isLocalityLbEndpoints_LbConfig() {} + +func (*LocalityLbEndpoints_LedsClusterLocalityConfig) isLocalityLbEndpoints_LbConfig() {} + // The optional health check configuration. type Endpoint_HealthCheckConfig struct { state protoimpl.MessageState @@ -365,8 +468,8 @@ type Endpoint_HealthCheckConfig struct { // to have different health check address port. PortValue uint32 `protobuf:"varint,1,opt,name=port_value,json=portValue,proto3" json:"port_value,omitempty"` // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this + // (see: :ref:`host ` and + // :ref:`authority `). Setting this // to a non-empty value allows overriding the cluster level configuration for a specific // endpoint. Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` @@ -375,7 +478,7 @@ type Endpoint_HealthCheckConfig struct { func (x *Endpoint_HealthCheckConfig) Reset() { *x = Endpoint_HealthCheckConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[3] + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -388,7 +491,7 @@ func (x *Endpoint_HealthCheckConfig) String() string { func (*Endpoint_HealthCheckConfig) ProtoMessage() {} func (x *Endpoint_HealthCheckConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[3] + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -418,6 +521,55 @@ func (x *Endpoint_HealthCheckConfig) GetHostname() string { return "" } +// [#not-implemented-hide:] +// A list of endpoints of a specific locality. +type LocalityLbEndpoints_LbEndpointList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LbEndpoints []*LbEndpoint `protobuf:"bytes,1,rep,name=lb_endpoints,json=lbEndpoints,proto3" json:"lb_endpoints,omitempty"` +} + +func (x *LocalityLbEndpoints_LbEndpointList) Reset() { + *x = LocalityLbEndpoints_LbEndpointList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocalityLbEndpoints_LbEndpointList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocalityLbEndpoints_LbEndpointList) ProtoMessage() {} + +func (x *LocalityLbEndpoints_LbEndpointList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocalityLbEndpoints_LbEndpointList.ProtoReflect.Descriptor instead. +func (*LocalityLbEndpoints_LbEndpointList) Descriptor() ([]byte, []int) { + return file_envoy_config_endpoint_v3_endpoint_components_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *LocalityLbEndpoints_LbEndpointList) GetLbEndpoints() []*LbEndpoint { + if x != nil { + return x.LbEndpoints + } + return nil +} + var File_envoy_config_endpoint_v3_endpoint_components_proto protoreflect.FileDescriptor var file_envoy_config_endpoint_v3_endpoint_components_proto_rawDesc = []byte{ @@ -430,96 +582,135 @@ var file_envoy_config_endpoint_v3_endpoint_components_proto_rawDesc = []byte{ 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x03, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, - 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x1a, - 0x92, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, - 0x18, 0xff, 0xff, 0x03, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x37, 0x9a, 0xc5, 0x88, - 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x91, 0x03, 0x0a, 0x0a, - 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x81, 0x03, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x37, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, + 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x92, 0x01, 0x0a, 0x11, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x28, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x52, 0x09, + 0x70, 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x25, + 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x91, 0x03, 0x0a, 0x0a, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, + 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0c, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, + 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x59, 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x27, 0x9a, + 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x4c, 0x62, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x92, 0x01, 0x0a, 0x19, 0x4c, 0x65, + 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x43, 0x0a, 0x0b, 0x6c, 0x65, 0x64, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x0a, 0x6c, 0x65, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x14, + 0x6c, 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x65, 0x64, 0x73, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xe1, + 0x05, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x47, 0x0a, 0x0c, 0x6c, 0x62, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, + 0x6c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x76, 0x0a, 0x17, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0d, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x13, - 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2e, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x11, 0x0a, 0x0f, - 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, - 0x89, 0x03, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x12, 0x47, 0x0a, 0x0c, 0x6c, 0x62, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x4c, 0x62, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x15, 0x6c, 0x6f, + 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x76, 0x0a, 0x1c, 0x6c, 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x0b, 0x6c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x15, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x28, 0x01, 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, - 0x67, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, - 0x18, 0x80, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, - 0x09, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, - 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x4b, 0x0a, 0x26, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x17, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x65, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, + 0x52, 0x19, 0x6c, 0x65, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x15, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, + 0x01, 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, + 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, + 0x80, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x09, + 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x1a, 0x59, 0x0a, 0x0e, 0x4c, 0x62, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0c, 0x6c, 0x62, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x62, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x6c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x97, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x17, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -534,34 +725,41 @@ func file_envoy_config_endpoint_v3_endpoint_components_proto_rawDescGZIP() []byt return file_envoy_config_endpoint_v3_endpoint_components_proto_rawDescData } -var file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_envoy_config_endpoint_v3_endpoint_components_proto_goTypes = []interface{}{ - (*Endpoint)(nil), // 0: envoy.config.endpoint.v3.Endpoint - (*LbEndpoint)(nil), // 1: envoy.config.endpoint.v3.LbEndpoint - (*LocalityLbEndpoints)(nil), // 2: envoy.config.endpoint.v3.LocalityLbEndpoints - (*Endpoint_HealthCheckConfig)(nil), // 3: envoy.config.endpoint.v3.Endpoint.HealthCheckConfig - (*v3.Address)(nil), // 4: envoy.config.core.v3.Address - (v3.HealthStatus)(0), // 5: envoy.config.core.v3.HealthStatus - (*v3.Metadata)(nil), // 6: envoy.config.core.v3.Metadata - (*wrappers.UInt32Value)(nil), // 7: google.protobuf.UInt32Value - (*v3.Locality)(nil), // 8: envoy.config.core.v3.Locality + (*Endpoint)(nil), // 0: envoy.config.endpoint.v3.Endpoint + (*LbEndpoint)(nil), // 1: envoy.config.endpoint.v3.LbEndpoint + (*LedsClusterLocalityConfig)(nil), // 2: envoy.config.endpoint.v3.LedsClusterLocalityConfig + (*LocalityLbEndpoints)(nil), // 3: envoy.config.endpoint.v3.LocalityLbEndpoints + (*Endpoint_HealthCheckConfig)(nil), // 4: envoy.config.endpoint.v3.Endpoint.HealthCheckConfig + (*LocalityLbEndpoints_LbEndpointList)(nil), // 5: envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList + (*v3.Address)(nil), // 6: envoy.config.core.v3.Address + (v3.HealthStatus)(0), // 7: envoy.config.core.v3.HealthStatus + (*v3.Metadata)(nil), // 8: envoy.config.core.v3.Metadata + (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value + (*v3.ConfigSource)(nil), // 10: envoy.config.core.v3.ConfigSource + (*v3.Locality)(nil), // 11: envoy.config.core.v3.Locality } var file_envoy_config_endpoint_v3_endpoint_components_proto_depIdxs = []int32{ - 4, // 0: envoy.config.endpoint.v3.Endpoint.address:type_name -> envoy.config.core.v3.Address - 3, // 1: envoy.config.endpoint.v3.Endpoint.health_check_config:type_name -> envoy.config.endpoint.v3.Endpoint.HealthCheckConfig + 6, // 0: envoy.config.endpoint.v3.Endpoint.address:type_name -> envoy.config.core.v3.Address + 4, // 1: envoy.config.endpoint.v3.Endpoint.health_check_config:type_name -> envoy.config.endpoint.v3.Endpoint.HealthCheckConfig 0, // 2: envoy.config.endpoint.v3.LbEndpoint.endpoint:type_name -> envoy.config.endpoint.v3.Endpoint - 5, // 3: envoy.config.endpoint.v3.LbEndpoint.health_status:type_name -> envoy.config.core.v3.HealthStatus - 6, // 4: envoy.config.endpoint.v3.LbEndpoint.metadata:type_name -> envoy.config.core.v3.Metadata - 7, // 5: envoy.config.endpoint.v3.LbEndpoint.load_balancing_weight:type_name -> google.protobuf.UInt32Value - 8, // 6: envoy.config.endpoint.v3.LocalityLbEndpoints.locality:type_name -> envoy.config.core.v3.Locality - 1, // 7: envoy.config.endpoint.v3.LocalityLbEndpoints.lb_endpoints:type_name -> envoy.config.endpoint.v3.LbEndpoint - 7, // 8: envoy.config.endpoint.v3.LocalityLbEndpoints.load_balancing_weight:type_name -> google.protobuf.UInt32Value - 7, // 9: envoy.config.endpoint.v3.LocalityLbEndpoints.proximity:type_name -> google.protobuf.UInt32Value - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 7, // 3: envoy.config.endpoint.v3.LbEndpoint.health_status:type_name -> envoy.config.core.v3.HealthStatus + 8, // 4: envoy.config.endpoint.v3.LbEndpoint.metadata:type_name -> envoy.config.core.v3.Metadata + 9, // 5: envoy.config.endpoint.v3.LbEndpoint.load_balancing_weight:type_name -> google.protobuf.UInt32Value + 10, // 6: envoy.config.endpoint.v3.LedsClusterLocalityConfig.leds_config:type_name -> envoy.config.core.v3.ConfigSource + 11, // 7: envoy.config.endpoint.v3.LocalityLbEndpoints.locality:type_name -> envoy.config.core.v3.Locality + 1, // 8: envoy.config.endpoint.v3.LocalityLbEndpoints.lb_endpoints:type_name -> envoy.config.endpoint.v3.LbEndpoint + 5, // 9: envoy.config.endpoint.v3.LocalityLbEndpoints.load_balancer_endpoints:type_name -> envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList + 2, // 10: envoy.config.endpoint.v3.LocalityLbEndpoints.leds_cluster_locality_config:type_name -> envoy.config.endpoint.v3.LedsClusterLocalityConfig + 9, // 11: envoy.config.endpoint.v3.LocalityLbEndpoints.load_balancing_weight:type_name -> google.protobuf.UInt32Value + 9, // 12: envoy.config.endpoint.v3.LocalityLbEndpoints.proximity:type_name -> google.protobuf.UInt32Value + 1, // 13: envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.lb_endpoints:type_name -> envoy.config.endpoint.v3.LbEndpoint + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_envoy_config_endpoint_v3_endpoint_components_proto_init() } @@ -595,7 +793,7 @@ func file_envoy_config_endpoint_v3_endpoint_components_proto_init() { } } file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalityLbEndpoints); i { + switch v := v.(*LedsClusterLocalityConfig); i { case 0: return &v.state case 1: @@ -607,6 +805,18 @@ func file_envoy_config_endpoint_v3_endpoint_components_proto_init() { } } file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocalityLbEndpoints); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Endpoint_HealthCheckConfig); i { case 0: return &v.state @@ -618,18 +828,34 @@ func file_envoy_config_endpoint_v3_endpoint_components_proto_init() { return nil } } + file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocalityLbEndpoints_LbEndpointList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[1].OneofWrappers = []interface{}{ (*LbEndpoint_Endpoint)(nil), (*LbEndpoint_EndpointName)(nil), } + file_envoy_config_endpoint_v3_endpoint_components_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*LocalityLbEndpoints_LoadBalancerEndpoints)(nil), + (*LocalityLbEndpoints_LedsClusterLocalityConfig)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_endpoint_v3_endpoint_components_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.validate.go b/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.validate.go index 097667154f..28911ccee7 100644 --- a/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.validate.go +++ b/pkg/api/envoy/config/endpoint/v3/endpoint_components.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/endpoint/v3/endpoint_components.proto -package envoy_config_endpoint_v3 +package endpointv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,19 +33,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.HealthStatus(0) ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Endpoint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Endpoint with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EndpointMultiError, or nil +// if none found. +func (m *Endpoint) ValidateAll() error { + return m.validate(true) +} + +func (m *Endpoint) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "Address", @@ -54,7 +90,26 @@ func (m *Endpoint) Validate() error { } } - if v, ok := interface{}(m.GetHealthCheckConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthCheckConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "HealthCheckConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointValidationError{ + field: "HealthCheckConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "HealthCheckConfig", @@ -66,9 +121,29 @@ func (m *Endpoint) Validate() error { // no validation rules for Hostname + if len(errors) > 0 { + return EndpointMultiError(errors) + } + return nil } +// EndpointMultiError is an error wrapping multiple validation errors returned +// by Endpoint.ValidateAll() if the designated constraints aren't met. +type EndpointMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointMultiError) AllErrors() []error { return m } + // EndpointValidationError is the validation error returned by // Endpoint.Validate if the designated constraints aren't met. type EndpointValidationError struct { @@ -124,15 +199,49 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LbEndpoint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LbEndpoint with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LbEndpointMultiError, or +// nil if none found. +func (m *LbEndpoint) ValidateAll() error { + return m.validate(true) +} + +func (m *LbEndpoint) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for HealthStatus - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Metadata", @@ -145,10 +254,14 @@ func (m *LbEndpoint) Validate() error { if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return LbEndpointValidationError{ + err := LbEndpointValidationError{ field: "LoadBalancingWeight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } @@ -157,7 +270,26 @@ func (m *LbEndpoint) Validate() error { case *LbEndpoint_Endpoint: - if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LbEndpointValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Endpoint", @@ -172,9 +304,29 @@ func (m *LbEndpoint) Validate() error { } + if len(errors) > 0 { + return LbEndpointMultiError(errors) + } + return nil } +// LbEndpointMultiError is an error wrapping multiple validation errors +// returned by LbEndpoint.ValidateAll() if the designated constraints aren't met. +type LbEndpointMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LbEndpointMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LbEndpointMultiError) AllErrors() []error { return m } + // LbEndpointValidationError is the validation error returned by // LbEndpoint.Validate if the designated constraints aren't met. type LbEndpointValidationError struct { @@ -229,15 +381,181 @@ var _ interface { ErrorName() string } = LbEndpointValidationError{} +// Validate checks the field values on LedsClusterLocalityConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *LedsClusterLocalityConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LedsClusterLocalityConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LedsClusterLocalityConfigMultiError, or nil if none found. +func (m *LedsClusterLocalityConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *LedsClusterLocalityConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetLedsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LedsClusterLocalityConfigValidationError{ + field: "LedsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LedsClusterLocalityConfigValidationError{ + field: "LedsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLedsConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LedsClusterLocalityConfigValidationError{ + field: "LedsConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for LedsCollectionName + + if len(errors) > 0 { + return LedsClusterLocalityConfigMultiError(errors) + } + + return nil +} + +// LedsClusterLocalityConfigMultiError is an error wrapping multiple validation +// errors returned by LedsClusterLocalityConfig.ValidateAll() if the +// designated constraints aren't met. +type LedsClusterLocalityConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LedsClusterLocalityConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LedsClusterLocalityConfigMultiError) AllErrors() []error { return m } + +// LedsClusterLocalityConfigValidationError is the validation error returned by +// LedsClusterLocalityConfig.Validate if the designated constraints aren't met. +type LedsClusterLocalityConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LedsClusterLocalityConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LedsClusterLocalityConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LedsClusterLocalityConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LedsClusterLocalityConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LedsClusterLocalityConfigValidationError) ErrorName() string { + return "LedsClusterLocalityConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e LedsClusterLocalityConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLedsClusterLocalityConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LedsClusterLocalityConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LedsClusterLocalityConfigValidationError{} + // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *LocalityLbEndpoints) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityLbEndpoints with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LocalityLbEndpointsMultiError, or nil if none found. +func (m *LocalityLbEndpoints) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityLbEndpoints) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: "Locality", @@ -250,7 +568,26 @@ func (m *LocalityLbEndpoints) Validate() error { for idx, item := range m.GetLbEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: fmt.Sprintf("LbEndpoints[%v]", idx), @@ -265,22 +602,49 @@ func (m *LocalityLbEndpoints) Validate() error { if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return LocalityLbEndpointsValidationError{ + err := LocalityLbEndpointsValidationError{ field: "LoadBalancingWeight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } if m.GetPriority() > 128 { - return LocalityLbEndpointsValidationError{ + err := LocalityLbEndpointsValidationError{ field: "Priority", reason: "value must be less than or equal to 128", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetProximity()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProximity()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Proximity", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "Proximity", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProximity()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: "Proximity", @@ -290,9 +654,96 @@ func (m *LocalityLbEndpoints) Validate() error { } } + switch m.LbConfig.(type) { + + case *LocalityLbEndpoints_LoadBalancerEndpoints: + + if all { + switch v := interface{}(m.GetLoadBalancerEndpoints()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "LoadBalancerEndpoints", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "LoadBalancerEndpoints", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadBalancerEndpoints()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityLbEndpointsValidationError{ + field: "LoadBalancerEndpoints", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *LocalityLbEndpoints_LedsClusterLocalityConfig: + + if all { + switch v := interface{}(m.GetLedsClusterLocalityConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "LedsClusterLocalityConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpointsValidationError{ + field: "LedsClusterLocalityConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLedsClusterLocalityConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityLbEndpointsValidationError{ + field: "LedsClusterLocalityConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return LocalityLbEndpointsMultiError(errors) + } + return nil } +// LocalityLbEndpointsMultiError is an error wrapping multiple validation +// errors returned by LocalityLbEndpoints.ValidateAll() if the designated +// constraints aren't met. +type LocalityLbEndpointsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityLbEndpointsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityLbEndpointsMultiError) AllErrors() []error { return m } + // LocalityLbEndpointsValidationError is the validation error returned by // LocalityLbEndpoints.Validate if the designated constraints aren't met. type LocalityLbEndpointsValidationError struct { @@ -351,24 +802,63 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Endpoint_HealthCheckConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Endpoint_HealthCheckConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Endpoint_HealthCheckConfigMultiError, or nil if none found. +func (m *Endpoint_HealthCheckConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Endpoint_HealthCheckConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetPortValue() > 65535 { - return Endpoint_HealthCheckConfigValidationError{ + err := Endpoint_HealthCheckConfigValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Hostname + if len(errors) > 0 { + return Endpoint_HealthCheckConfigMultiError(errors) + } + return nil } +// Endpoint_HealthCheckConfigMultiError is an error wrapping multiple +// validation errors returned by Endpoint_HealthCheckConfig.ValidateAll() if +// the designated constraints aren't met. +type Endpoint_HealthCheckConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Endpoint_HealthCheckConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Endpoint_HealthCheckConfigMultiError) AllErrors() []error { return m } + // Endpoint_HealthCheckConfigValidationError is the validation error returned // by Endpoint_HealthCheckConfig.Validate if the designated constraints aren't met. type Endpoint_HealthCheckConfigValidationError struct { @@ -424,3 +914,142 @@ var _ interface { Cause() error ErrorName() string } = Endpoint_HealthCheckConfigValidationError{} + +// Validate checks the field values on LocalityLbEndpoints_LbEndpointList with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *LocalityLbEndpoints_LbEndpointList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityLbEndpoints_LbEndpointList +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// LocalityLbEndpoints_LbEndpointListMultiError, or nil if none found. +func (m *LocalityLbEndpoints_LbEndpointList) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityLbEndpoints_LbEndpointList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetLbEndpoints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityLbEndpoints_LbEndpointListValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityLbEndpoints_LbEndpointListValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityLbEndpoints_LbEndpointListValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return LocalityLbEndpoints_LbEndpointListMultiError(errors) + } + + return nil +} + +// LocalityLbEndpoints_LbEndpointListMultiError is an error wrapping multiple +// validation errors returned by +// LocalityLbEndpoints_LbEndpointList.ValidateAll() if the designated +// constraints aren't met. +type LocalityLbEndpoints_LbEndpointListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityLbEndpoints_LbEndpointListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityLbEndpoints_LbEndpointListMultiError) AllErrors() []error { return m } + +// LocalityLbEndpoints_LbEndpointListValidationError is the validation error +// returned by LocalityLbEndpoints_LbEndpointList.Validate if the designated +// constraints aren't met. +type LocalityLbEndpoints_LbEndpointListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LocalityLbEndpoints_LbEndpointListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LocalityLbEndpoints_LbEndpointListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LocalityLbEndpoints_LbEndpointListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LocalityLbEndpoints_LbEndpointListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LocalityLbEndpoints_LbEndpointListValidationError) ErrorName() string { + return "LocalityLbEndpoints_LbEndpointListValidationError" +} + +// Error satisfies the builtin error interface +func (e LocalityLbEndpoints_LbEndpointListValidationError) Error() string { + 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_LbEndpointList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LocalityLbEndpoints_LbEndpointListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LocalityLbEndpoints_LbEndpointListValidationError{} diff --git a/pkg/api/envoy/config/endpoint/v3/load_report.pb.go b/pkg/api/envoy/config/endpoint/v3/load_report.pb.go index dddeaa4f64..3833380f61 100644 --- a/pkg/api/envoy/config/endpoint/v3/load_report.pb.go +++ b/pkg/api/envoy/config/endpoint/v3/load_report.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/endpoint/v3/load_report.proto -package envoy_config_endpoint_v3 +package endpointv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,12 +25,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // These are stats Envoy reports to the management server at a frequency defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. +// :ref:`LoadStatsResponse.load_reporting_interval`. // Stats per upstream region/zone and optionally per subzone. // [#next-free-field: 9] type UpstreamLocalityStats struct { @@ -58,7 +53,7 @@ type UpstreamLocalityStats struct { 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`. + // :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. @@ -339,7 +334,7 @@ func (x *EndpointLoadMetricStats) GetTotalMetricValue() float64 { } // Per cluster load stats. Envoy reports these stats a management server in a -// :ref:`LoadStatsRequest` +// :ref:`LoadStatsRequest` // Next ID: 7 // [#next-free-field: 7] type ClusterStats struct { @@ -648,11 +643,16 @@ var file_envoy_config_endpoint_v3_load_report_proto_rawDesc = []byte{ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x42, 0x43, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x73, 0x42, 0x8f, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, + 0x33, 0x3b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/endpoint/v3/load_report.pb.validate.go b/pkg/api/envoy/config/endpoint/v3/load_report.pb.validate.go index 10f128fa6b..00b2ac0ef2 100644 --- a/pkg/api/envoy/config/endpoint/v3/load_report.pb.validate.go +++ b/pkg/api/envoy/config/endpoint/v3/load_report.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/endpoint/v3/load_report.proto -package envoy_config_endpoint_v3 +package endpointv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamLocalityStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamLocalityStats with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamLocalityStatsMultiError, or nil if none found. +func (m *UpstreamLocalityStats) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamLocalityStats) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: "Locality", @@ -62,7 +97,26 @@ func (m *UpstreamLocalityStats) Validate() error { for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), @@ -77,7 +131,26 @@ func (m *UpstreamLocalityStats) Validate() error { for idx, item := range m.GetUpstreamEndpointStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), @@ -91,9 +164,30 @@ func (m *UpstreamLocalityStats) Validate() error { // no validation rules for Priority + if len(errors) > 0 { + return UpstreamLocalityStatsMultiError(errors) + } + return nil } +// UpstreamLocalityStatsMultiError is an error wrapping multiple validation +// errors returned by UpstreamLocalityStats.ValidateAll() if the designated +// constraints aren't met. +type UpstreamLocalityStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamLocalityStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamLocalityStatsMultiError) AllErrors() []error { return m } + // UpstreamLocalityStatsValidationError is the validation error returned by // UpstreamLocalityStats.Validate if the designated constraints aren't met. type UpstreamLocalityStatsValidationError struct { @@ -152,13 +246,46 @@ var _ interface { // Validate checks the field values on UpstreamEndpointStats with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamEndpointStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamEndpointStats with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamEndpointStatsMultiError, or nil if none found. +func (m *UpstreamEndpointStats) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamEndpointStats) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Address", @@ -168,7 +295,26 @@ func (m *UpstreamEndpointStats) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Metadata", @@ -189,7 +335,26 @@ func (m *UpstreamEndpointStats) Validate() error { for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamEndpointStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), @@ -201,9 +366,30 @@ func (m *UpstreamEndpointStats) Validate() error { } + if len(errors) > 0 { + return UpstreamEndpointStatsMultiError(errors) + } + return nil } +// UpstreamEndpointStatsMultiError is an error wrapping multiple validation +// errors returned by UpstreamEndpointStats.ValidateAll() if the designated +// constraints aren't met. +type UpstreamEndpointStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamEndpointStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamEndpointStatsMultiError) AllErrors() []error { return m } + // UpstreamEndpointStatsValidationError is the validation error returned by // UpstreamEndpointStats.Validate if the designated constraints aren't met. type UpstreamEndpointStatsValidationError struct { @@ -262,21 +448,56 @@ var _ interface { // Validate checks the field values on EndpointLoadMetricStats with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EndpointLoadMetricStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointLoadMetricStats with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EndpointLoadMetricStatsMultiError, or nil if none found. +func (m *EndpointLoadMetricStats) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointLoadMetricStats) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for MetricName // no validation rules for NumRequestsFinishedWithMetric // no validation rules for TotalMetricValue + if len(errors) > 0 { + return EndpointLoadMetricStatsMultiError(errors) + } + return nil } +// EndpointLoadMetricStatsMultiError is an error wrapping multiple validation +// errors returned by EndpointLoadMetricStats.ValidateAll() if the designated +// constraints aren't met. +type EndpointLoadMetricStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointLoadMetricStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointLoadMetricStatsMultiError) AllErrors() []error { return m } + // EndpointLoadMetricStatsValidationError is the validation error returned by // EndpointLoadMetricStats.Validate if the designated constraints aren't met. type EndpointLoadMetricStatsValidationError struct { @@ -334,33 +555,74 @@ var _ interface { } = EndpointLoadMetricStatsValidationError{} // Validate checks the field values on ClusterStats with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterStats with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterStatsMultiError, or +// nil if none found. +func (m *ClusterStats) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterStats) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return ClusterStatsValidationError{ + err := ClusterStatsValidationError{ field: "ClusterName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ClusterServiceName if len(m.GetUpstreamLocalityStats()) < 1 { - return ClusterStatsValidationError{ + err := ClusterStatsValidationError{ field: "UpstreamLocalityStats", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetUpstreamLocalityStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), @@ -377,7 +639,26 @@ func (m *ClusterStats) Validate() error { for idx, item := range m.GetDroppedRequests() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("DroppedRequests[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: fmt.Sprintf("DroppedRequests[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("DroppedRequests[%v]", idx), @@ -389,7 +670,26 @@ func (m *ClusterStats) Validate() error { } - if v, ok := interface{}(m.GetLoadReportInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadReportInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: "LoadReportInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatsValidationError{ + field: "LoadReportInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadReportInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: "LoadReportInterval", @@ -399,9 +699,29 @@ func (m *ClusterStats) Validate() error { } } + if len(errors) > 0 { + return ClusterStatsMultiError(errors) + } + return nil } +// ClusterStatsMultiError is an error wrapping multiple validation errors +// returned by ClusterStats.ValidateAll() if the designated constraints aren't met. +type ClusterStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterStatsMultiError) AllErrors() []error { return m } + // ClusterStatsValidationError is the validation error returned by // ClusterStats.Validate if the designated constraints aren't met. type ClusterStatsValidationError struct { @@ -458,24 +778,63 @@ var _ interface { // Validate checks the field values on ClusterStats_DroppedRequests with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterStats_DroppedRequests) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterStats_DroppedRequests with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterStats_DroppedRequestsMultiError, or nil if none found. +func (m *ClusterStats_DroppedRequests) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterStats_DroppedRequests) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCategory()) < 1 { - return ClusterStats_DroppedRequestsValidationError{ + err := ClusterStats_DroppedRequestsValidationError{ field: "Category", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DroppedCount + if len(errors) > 0 { + return ClusterStats_DroppedRequestsMultiError(errors) + } + return nil } +// ClusterStats_DroppedRequestsMultiError is an error wrapping multiple +// validation errors returned by ClusterStats_DroppedRequests.ValidateAll() if +// the designated constraints aren't met. +type ClusterStats_DroppedRequestsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterStats_DroppedRequestsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterStats_DroppedRequestsMultiError) AllErrors() []error { return m } + // ClusterStats_DroppedRequestsValidationError is the validation error returned // by ClusterStats_DroppedRequests.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/config/filter/accesslog/v2/accesslog.pb.go b/pkg/api/envoy/config/filter/accesslog/v2/accesslog.pb.go index 269d72b37b..10889c9ba8 100644 --- a/pkg/api/envoy/config/filter/accesslog/v2/accesslog.pb.go +++ b/pkg/api/envoy/config/filter/accesslog/v2/accesslog.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/accesslog/v2/accesslog.proto -package envoy_config_filter_accesslog_v2 +package accesslogv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ComparisonFilter_Op int32 const ( @@ -1393,14 +1388,20 @@ var file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x6b, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x1b, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0xc0, 0x01, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1b, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go b/pkg/api/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go index 17fb37975e..973157f116 100644 --- a/pkg/api/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go +++ b/pkg/api/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 envoy_config_filter_accesslog_v2 +package accesslogv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AccessLog with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AccessLogMultiError, or nil +// if none found. +func (m *AccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *AccessLog) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name - if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogValidationError{ field: "Filter", @@ -56,7 +92,26 @@ func (m *AccessLog) Validate() error { case *AccessLog_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogValidationError{ field: "Config", @@ -68,7 +123,26 @@ func (m *AccessLog) Validate() error { case *AccessLog_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogValidationError{ field: "TypedConfig", @@ -80,9 +154,29 @@ func (m *AccessLog) Validate() error { } + if len(errors) > 0 { + return AccessLogMultiError(errors) + } + return nil } +// AccessLogMultiError is an error wrapping multiple validation errors returned +// by AccessLog.ValidateAll() if the designated constraints aren't met. +type AccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AccessLogMultiError) AllErrors() []error { return m } + // AccessLogValidationError is the validation error returned by // AccessLog.Validate if the designated constraints aren't met. type AccessLogValidationError struct { @@ -138,18 +232,51 @@ var _ interface { } = AccessLogValidationError{} // Validate checks the field values on AccessLogFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AccessLogFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AccessLogFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AccessLogFilterMultiError, or nil if none found. +func (m *AccessLogFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *AccessLogFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.FilterSpecifier.(type) { case *AccessLogFilter_StatusCodeFilter: - if v, ok := interface{}(m.GetStatusCodeFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatusCodeFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "StatusCodeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "StatusCodeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatusCodeFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "StatusCodeFilter", @@ -161,7 +288,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_DurationFilter: - if v, ok := interface{}(m.GetDurationFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDurationFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "DurationFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "DurationFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDurationFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "DurationFilter", @@ -173,7 +319,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_NotHealthCheckFilter: - if v, ok := interface{}(m.GetNotHealthCheckFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotHealthCheckFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "NotHealthCheckFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "NotHealthCheckFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotHealthCheckFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "NotHealthCheckFilter", @@ -185,7 +350,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_TraceableFilter: - if v, ok := interface{}(m.GetTraceableFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTraceableFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "TraceableFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "TraceableFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTraceableFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "TraceableFilter", @@ -197,7 +381,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_RuntimeFilter: - if v, ok := interface{}(m.GetRuntimeFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "RuntimeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "RuntimeFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "RuntimeFilter", @@ -209,7 +412,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_AndFilter: - if v, ok := interface{}(m.GetAndFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "AndFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "AndFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "AndFilter", @@ -221,7 +443,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_OrFilter: - if v, ok := interface{}(m.GetOrFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "OrFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "OrFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "OrFilter", @@ -233,7 +474,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_HeaderFilter: - if v, ok := interface{}(m.GetHeaderFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "HeaderFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "HeaderFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "HeaderFilter", @@ -245,7 +505,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_ResponseFlagFilter: - if v, ok := interface{}(m.GetResponseFlagFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseFlagFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ResponseFlagFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ResponseFlagFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseFlagFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "ResponseFlagFilter", @@ -257,7 +536,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_GrpcStatusFilter: - if v, ok := interface{}(m.GetGrpcStatusFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcStatusFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "GrpcStatusFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "GrpcStatusFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcStatusFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "GrpcStatusFilter", @@ -269,7 +567,26 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_ExtensionFilter: - if v, ok := interface{}(m.GetExtensionFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExtensionFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ExtensionFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogFilterValidationError{ + field: "ExtensionFilter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtensionFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogFilterValidationError{ field: "ExtensionFilter", @@ -280,16 +597,41 @@ func (m *AccessLogFilter) Validate() error { } default: - return AccessLogFilterValidationError{ + err := AccessLogFilterValidationError{ field: "FilterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return AccessLogFilterMultiError(errors) } return nil } +// AccessLogFilterMultiError is an error wrapping multiple validation errors +// returned by AccessLogFilter.ValidateAll() if the designated constraints +// aren't met. +type AccessLogFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AccessLogFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AccessLogFilterMultiError) AllErrors() []error { return m } + // AccessLogFilterValidationError is the validation error returned by // AccessLogFilter.Validate if the designated constraints aren't met. type AccessLogFilterValidationError struct { @@ -345,21 +687,58 @@ var _ interface { } = AccessLogFilterValidationError{} // Validate checks the field values on ComparisonFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ComparisonFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ComparisonFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ComparisonFilterMultiError, or nil if none found. +func (m *ComparisonFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ComparisonFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := ComparisonFilter_Op_name[int32(m.GetOp())]; !ok { - return ComparisonFilterValidationError{ + err := ComparisonFilterValidationError{ field: "Op", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ComparisonFilterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ComparisonFilterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ComparisonFilterValidationError{ field: "Value", @@ -369,9 +748,30 @@ func (m *ComparisonFilter) Validate() error { } } + if len(errors) > 0 { + return ComparisonFilterMultiError(errors) + } + return nil } +// ComparisonFilterMultiError is an error wrapping multiple validation errors +// returned by ComparisonFilter.ValidateAll() if the designated constraints +// aren't met. +type ComparisonFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ComparisonFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ComparisonFilterMultiError) AllErrors() []error { return m } + // ComparisonFilterValidationError is the validation error returned by // ComparisonFilter.Validate if the designated constraints aren't met. type ComparisonFilterValidationError struct { @@ -427,21 +827,58 @@ var _ interface { } = ComparisonFilterValidationError{} // Validate checks the field values on StatusCodeFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *StatusCodeFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatusCodeFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StatusCodeFilterMultiError, or nil if none found. +func (m *StatusCodeFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *StatusCodeFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetComparison() == nil { - return StatusCodeFilterValidationError{ + err := StatusCodeFilterValidationError{ field: "Comparison", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetComparison()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatusCodeFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatusCodeFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatusCodeFilterValidationError{ field: "Comparison", @@ -451,9 +888,30 @@ func (m *StatusCodeFilter) Validate() error { } } + if len(errors) > 0 { + return StatusCodeFilterMultiError(errors) + } + return nil } +// StatusCodeFilterMultiError is an error wrapping multiple validation errors +// returned by StatusCodeFilter.ValidateAll() if the designated constraints +// aren't met. +type StatusCodeFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatusCodeFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatusCodeFilterMultiError) AllErrors() []error { return m } + // StatusCodeFilterValidationError is the validation error returned by // StatusCodeFilter.Validate if the designated constraints aren't met. type StatusCodeFilterValidationError struct { @@ -509,21 +967,58 @@ var _ interface { } = StatusCodeFilterValidationError{} // Validate checks the field values on DurationFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DurationFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DurationFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DurationFilterMultiError, +// or nil if none found. +func (m *DurationFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *DurationFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetComparison() == nil { - return DurationFilterValidationError{ + err := DurationFilterValidationError{ field: "Comparison", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetComparison()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DurationFilterValidationError{ field: "Comparison", @@ -533,9 +1028,30 @@ func (m *DurationFilter) Validate() error { } } + if len(errors) > 0 { + return DurationFilterMultiError(errors) + } + return nil } +// DurationFilterMultiError is an error wrapping multiple validation errors +// returned by DurationFilter.ValidateAll() if the designated constraints +// aren't met. +type DurationFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DurationFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DurationFilterMultiError) AllErrors() []error { return m } + // DurationFilterValidationError is the validation error returned by // DurationFilter.Validate if the designated constraints aren't met. type DurationFilterValidationError struct { @@ -592,15 +1108,50 @@ var _ interface { // Validate checks the field values on NotHealthCheckFilter with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *NotHealthCheckFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NotHealthCheckFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// NotHealthCheckFilterMultiError, or nil if none found. +func (m *NotHealthCheckFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *NotHealthCheckFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return NotHealthCheckFilterMultiError(errors) + } + return nil } +// NotHealthCheckFilterMultiError is an error wrapping multiple validation +// errors returned by NotHealthCheckFilter.ValidateAll() if the designated +// constraints aren't met. +type NotHealthCheckFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NotHealthCheckFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NotHealthCheckFilterMultiError) AllErrors() []error { return m } + // NotHealthCheckFilterValidationError is the validation error returned by // NotHealthCheckFilter.Validate if the designated constraints aren't met. type NotHealthCheckFilterValidationError struct { @@ -658,16 +1209,51 @@ var _ interface { } = NotHealthCheckFilterValidationError{} // Validate checks the field values on TraceableFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TraceableFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TraceableFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TraceableFilterMultiError, or nil if none found. +func (m *TraceableFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *TraceableFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return TraceableFilterMultiError(errors) + } + return nil } +// TraceableFilterMultiError is an error wrapping multiple validation errors +// returned by TraceableFilter.ValidateAll() if the designated constraints +// aren't met. +type TraceableFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TraceableFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TraceableFilterMultiError) AllErrors() []error { return m } + // TraceableFilterValidationError is the validation error returned by // TraceableFilter.Validate if the designated constraints aren't met. type TraceableFilterValidationError struct { @@ -723,21 +1309,58 @@ var _ interface { } = TraceableFilterValidationError{} // Validate checks the field values on RuntimeFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RuntimeFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RuntimeFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RuntimeFilterMultiError, or +// nil if none found. +func (m *RuntimeFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *RuntimeFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRuntimeKey()) < 1 { - return RuntimeFilterValidationError{ + err := RuntimeFilterValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPercentSampled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPercentSampled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeFilterValidationError{ + field: "PercentSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeFilterValidationError{ + field: "PercentSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentSampled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFilterValidationError{ field: "PercentSampled", @@ -749,9 +1372,30 @@ func (m *RuntimeFilter) Validate() error { // no validation rules for UseIndependentRandomness + if len(errors) > 0 { + return RuntimeFilterMultiError(errors) + } + return nil } +// RuntimeFilterMultiError is an error wrapping multiple validation errors +// returned by RuntimeFilter.ValidateAll() if the designated constraints +// aren't met. +type RuntimeFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeFilterMultiError) AllErrors() []error { return m } + // RuntimeFilterValidationError is the validation error returned by // RuntimeFilter.Validate if the designated constraints aren't met. type RuntimeFilterValidationError struct { @@ -807,23 +1451,61 @@ var _ interface { } = RuntimeFilterValidationError{} // Validate checks the field values on AndFilter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AndFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AndFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AndFilterMultiError, or nil +// if none found. +func (m *AndFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *AndFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFilters()) < 2 { - return AndFilterValidationError{ + err := AndFilterValidationError{ field: "Filters", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AndFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AndFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AndFilterValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -835,9 +1517,29 @@ func (m *AndFilter) Validate() error { } + if len(errors) > 0 { + return AndFilterMultiError(errors) + } + return nil } +// AndFilterMultiError is an error wrapping multiple validation errors returned +// by AndFilter.ValidateAll() if the designated constraints aren't met. +type AndFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AndFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AndFilterMultiError) AllErrors() []error { return m } + // AndFilterValidationError is the validation error returned by // AndFilter.Validate if the designated constraints aren't met. type AndFilterValidationError struct { @@ -893,23 +1595,61 @@ var _ interface { } = AndFilterValidationError{} // Validate checks the field values on OrFilter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OrFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OrFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OrFilterMultiError, or nil +// if none found. +func (m *OrFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *OrFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFilters()) < 2 { - return OrFilterValidationError{ + err := OrFilterValidationError{ field: "Filters", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OrFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OrFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OrFilterValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -921,9 +1661,29 @@ func (m *OrFilter) Validate() error { } + if len(errors) > 0 { + return OrFilterMultiError(errors) + } + return nil } +// OrFilterMultiError is an error wrapping multiple validation errors returned +// by OrFilter.ValidateAll() if the designated constraints aren't met. +type OrFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OrFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OrFilterMultiError) AllErrors() []error { return m } + // OrFilterValidationError is the validation error returned by // OrFilter.Validate if the designated constraints aren't met. type OrFilterValidationError struct { @@ -979,21 +1739,58 @@ var _ interface { } = OrFilterValidationError{} // Validate checks the field values on HeaderFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderFilterMultiError, or +// nil if none found. +func (m *HeaderFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHeader() == nil { - return HeaderFilterValidationError{ + err := HeaderFilterValidationError{ field: "Header", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderFilterValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderFilterValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderFilterValidationError{ field: "Header", @@ -1003,9 +1800,29 @@ func (m *HeaderFilter) Validate() error { } } + if len(errors) > 0 { + return HeaderFilterMultiError(errors) + } + return nil } +// HeaderFilterMultiError is an error wrapping multiple validation errors +// returned by HeaderFilter.ValidateAll() if the designated constraints aren't met. +type HeaderFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderFilterMultiError) AllErrors() []error { return m } + // HeaderFilterValidationError is the validation error returned by // HeaderFilter.Validate if the designated constraints aren't met. type HeaderFilterValidationError struct { @@ -1062,27 +1879,66 @@ var _ interface { // Validate checks the field values on ResponseFlagFilter with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ResponseFlagFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlagFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResponseFlagFilterMultiError, or nil if none found. +func (m *ResponseFlagFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlagFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetFlags() { _, _ = idx, item if _, ok := _ResponseFlagFilter_Flags_InLookup[item]; !ok { - return ResponseFlagFilterValidationError{ + err := 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 IH DPE]", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return ResponseFlagFilterMultiError(errors) + } + return nil } +// ResponseFlagFilterMultiError is an error wrapping multiple validation errors +// returned by ResponseFlagFilter.ValidateAll() if the designated constraints +// aren't met. +type ResponseFlagFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlagFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlagFilterMultiError) AllErrors() []error { return m } + // ResponseFlagFilterValidationError is the validation error returned by // ResponseFlagFilter.Validate if the designated constraints aren't met. type ResponseFlagFilterValidationError struct { @@ -1162,30 +2018,69 @@ var _ResponseFlagFilter_Flags_InLookup = map[string]struct{}{ } // Validate checks the field values on GrpcStatusFilter with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *GrpcStatusFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcStatusFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcStatusFilterMultiError, or nil if none found. +func (m *GrpcStatusFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcStatusFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStatuses() { _, _ = idx, item if _, ok := GrpcStatusFilter_Status_name[int32(item)]; !ok { - return GrpcStatusFilterValidationError{ + err := GrpcStatusFilterValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for Exclude + if len(errors) > 0 { + return GrpcStatusFilterMultiError(errors) + } + return nil } +// GrpcStatusFilterMultiError is an error wrapping multiple validation errors +// returned by GrpcStatusFilter.ValidateAll() if the designated constraints +// aren't met. +type GrpcStatusFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcStatusFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcStatusFilterMultiError) AllErrors() []error { return m } + // GrpcStatusFilterValidationError is the validation error returned by // GrpcStatusFilter.Validate if the designated constraints aren't met. type GrpcStatusFilterValidationError struct { @@ -1241,20 +2136,53 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ExtensionFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtensionFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtensionFilterMultiError, or nil if none found. +func (m *ExtensionFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtensionFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.ConfigType.(type) { case *ExtensionFilter_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtensionFilterValidationError{ field: "Config", @@ -1266,7 +2194,26 @@ func (m *ExtensionFilter) Validate() error { case *ExtensionFilter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtensionFilterValidationError{ field: "TypedConfig", @@ -1278,9 +2225,30 @@ func (m *ExtensionFilter) Validate() error { } + if len(errors) > 0 { + return ExtensionFilterMultiError(errors) + } + return nil } +// ExtensionFilterMultiError is an error wrapping multiple validation errors +// returned by ExtensionFilter.ValidateAll() if the designated constraints +// aren't met. +type ExtensionFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtensionFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtensionFilterMultiError) AllErrors() []error { return m } + // ExtensionFilterValidationError is the validation error returned by // ExtensionFilter.Validate if the designated constraints aren't met. type ExtensionFilterValidationError struct { diff --git a/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.go b/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.go index 22a6a3393d..54683bd8be 100644 --- a/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.go +++ b/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/dubbo/router/v2alpha1/router.proto -package envoy_config_filter_dubbo_router_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Router struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -77,17 +72,22 @@ var file_envoy_config_filter_dubbo_router_v2alpha1_router_proto_rawDesc = []byte 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0x8e, 0x01, 0x0a, + 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0xe0, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x38, 0x12, 0x36, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x38, 0x12, + 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.validate.go b/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.validate.go index 927b6022ef..dffd0811c6 100644 --- a/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.validate.go +++ b/pkg/api/envoy/config/filter/dubbo/router/v2alpha1/router.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/dubbo/router/v2alpha1/router.proto -package envoy_config_filter_dubbo_router_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Router with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RouterMultiError(errors) + } + return nil } +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + // RouterValidationError is the validation error returned by Router.Validate if // the designated constraints aren't met. type RouterValidationError struct { diff --git a/pkg/api/envoy/config/filter/fault/v2/fault.pb.go b/pkg/api/envoy/config/filter/fault/v2/fault.pb.go index fb7f3f23cb..c4070a8894 100644 --- a/pkg/api/envoy/config/filter/fault/v2/fault.pb.go +++ b/pkg/api/envoy/config/filter/fault/v2/fault.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/fault/v2/fault.proto -package envoy_config_filter_fault_v2 +package faultv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FaultDelay_FaultDelayType int32 const ( @@ -474,15 +469,20 @@ var file_envoy_config_filter_fault_v2_fault_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x4b, 0x62, 0x70, 0x73, 0x1a, 0x0d, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x11, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x72, 0x0a, 0x2a, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2a, 0x12, 0x28, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xbf, 0x01, 0x0a, 0x2a, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x32, 0x3b, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2a, 0x12, 0x28, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/fault/v2/fault.pb.validate.go b/pkg/api/envoy/config/filter/fault/v2/fault.pb.validate.go index a8dddd3b0d..3423c58e11 100644 --- a/pkg/api/envoy/config/filter/fault/v2/fault.pb.validate.go +++ b/pkg/api/envoy/config/filter/fault/v2/fault.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/fault/v2/fault.proto -package envoy_config_filter_fault_v2 +package faultv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FaultDelay with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FaultDelay) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultDelay with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FaultDelayMultiError, or +// nil if none found. +func (m *FaultDelay) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultDelay) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Type - if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "Percentage", @@ -57,29 +93,57 @@ func (m *FaultDelay) Validate() error { case *FaultDelay_FixedDelay: if d := m.GetFixedDelay(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return FaultDelayValidationError{ + err = FaultDelayValidationError{ field: "FixedDelay", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return FaultDelayValidationError{ - field: "FixedDelay", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := FaultDelayValidationError{ + field: "FixedDelay", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } case *FaultDelay_HeaderDelay_: - if v, ok := interface{}(m.GetHeaderDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "HeaderDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "HeaderDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "HeaderDelay", @@ -90,16 +154,40 @@ func (m *FaultDelay) Validate() error { } default: - return FaultDelayValidationError{ + err := FaultDelayValidationError{ field: "FaultDelaySecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return FaultDelayMultiError(errors) } return nil } +// FaultDelayMultiError is an error wrapping multiple validation errors +// returned by FaultDelay.ValidateAll() if the designated constraints aren't met. +type FaultDelayMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultDelayMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultDelayMultiError) AllErrors() []error { return m } + // FaultDelayValidationError is the validation error returned by // FaultDelay.Validate if the designated constraints aren't met. type FaultDelayValidationError struct { @@ -155,14 +243,47 @@ var _ interface { } = FaultDelayValidationError{} // Validate checks the field values on FaultRateLimit with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FaultRateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultRateLimit with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FaultRateLimitMultiError, +// or nil if none found. +func (m *FaultRateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultRateLimit) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "Percentage", @@ -176,7 +297,26 @@ func (m *FaultRateLimit) Validate() error { case *FaultRateLimit_FixedLimit_: - if v, ok := interface{}(m.GetFixedLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFixedLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "FixedLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "FixedLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFixedLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "FixedLimit", @@ -188,7 +328,26 @@ func (m *FaultRateLimit) Validate() error { case *FaultRateLimit_HeaderLimit_: - if v, ok := interface{}(m.GetHeaderLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "HeaderLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "HeaderLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "HeaderLimit", @@ -199,16 +358,41 @@ func (m *FaultRateLimit) Validate() error { } default: - return FaultRateLimitValidationError{ + err := FaultRateLimitValidationError{ field: "LimitType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return FaultRateLimitMultiError(errors) + } + return nil } +// FaultRateLimitMultiError is an error wrapping multiple validation errors +// returned by FaultRateLimit.ValidateAll() if the designated constraints +// aren't met. +type FaultRateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultRateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultRateLimitMultiError) AllErrors() []error { return m } + // FaultRateLimitValidationError is the validation error returned by // FaultRateLimit.Validate if the designated constraints aren't met. type FaultRateLimitValidationError struct { @@ -265,15 +449,50 @@ var _ interface { // Validate checks the field values on FaultDelay_HeaderDelay with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultDelay_HeaderDelay) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultDelay_HeaderDelay with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultDelay_HeaderDelayMultiError, or nil if none found. +func (m *FaultDelay_HeaderDelay) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultDelay_HeaderDelay) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return FaultDelay_HeaderDelayMultiError(errors) + } + return nil } +// FaultDelay_HeaderDelayMultiError is an error wrapping multiple validation +// errors returned by FaultDelay_HeaderDelay.ValidateAll() if the designated +// constraints aren't met. +type FaultDelay_HeaderDelayMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultDelay_HeaderDelayMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultDelay_HeaderDelayMultiError) AllErrors() []error { return m } + // FaultDelay_HeaderDelayValidationError is the validation error returned by // FaultDelay_HeaderDelay.Validate if the designated constraints aren't met. type FaultDelay_HeaderDelayValidationError struct { @@ -332,22 +551,61 @@ var _ interface { // Validate checks the field values on FaultRateLimit_FixedLimit with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultRateLimit_FixedLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultRateLimit_FixedLimit with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultRateLimit_FixedLimitMultiError, or nil if none found. +func (m *FaultRateLimit_FixedLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultRateLimit_FixedLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetLimitKbps() < 1 { - return FaultRateLimit_FixedLimitValidationError{ + err := FaultRateLimit_FixedLimitValidationError{ field: "LimitKbps", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FaultRateLimit_FixedLimitMultiError(errors) } return nil } +// FaultRateLimit_FixedLimitMultiError is an error wrapping multiple validation +// errors returned by FaultRateLimit_FixedLimit.ValidateAll() if the +// designated constraints aren't met. +type FaultRateLimit_FixedLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultRateLimit_FixedLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultRateLimit_FixedLimitMultiError) AllErrors() []error { return m } + // FaultRateLimit_FixedLimitValidationError is the validation error returned by // FaultRateLimit_FixedLimit.Validate if the designated constraints aren't met. type FaultRateLimit_FixedLimitValidationError struct { @@ -406,15 +664,50 @@ var _ interface { // Validate checks the field values on FaultRateLimit_HeaderLimit with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultRateLimit_HeaderLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultRateLimit_HeaderLimit with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultRateLimit_HeaderLimitMultiError, or nil if none found. +func (m *FaultRateLimit_HeaderLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultRateLimit_HeaderLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return FaultRateLimit_HeaderLimitMultiError(errors) + } + return nil } +// FaultRateLimit_HeaderLimitMultiError is an error wrapping multiple +// validation errors returned by FaultRateLimit_HeaderLimit.ValidateAll() if +// the designated constraints aren't met. +type FaultRateLimit_HeaderLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultRateLimit_HeaderLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultRateLimit_HeaderLimitMultiError) AllErrors() []error { return m } + // FaultRateLimit_HeaderLimitValidationError is the validation error returned // by FaultRateLimit_HeaderLimit.Validate if the designated constraints aren't met. type FaultRateLimit_HeaderLimitValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.go b/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.go index 72f3575b8e..46296bd75c 100644 --- a/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.go +++ b/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.go @@ -1,20 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto -package envoy_config_filter_http_adaptive_concurrency_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -28,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration parameters for the gradient controller. type GradientControllerConfig struct { state protoimpl.MessageState @@ -344,107 +338,111 @@ var file_envoy_config_filter_http_adaptive_concurrency_v2alpha_adaptive_concurre 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x08, 0x0a, 0x18, 0x47, 0x72, 0x61, 0x64, - 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x1b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x19, - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x12, 0xb5, 0x01, 0x0a, 0x18, 0x63, 0x6f, - 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x71, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, - 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x61, - 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x16, 0x63, 0x6f, 0x6e, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x74, 0x74, 0x5f, 0x63, 0x61, - 0x6c, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x6b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x54, 0x54, 0x43, 0x61, 0x6c, 0x63, 0x75, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x52, 0x74, 0x74, 0x43, 0x61, - 0x6c, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0xe5, 0x01, 0x0a, 0x21, 0x43, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6c, - 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, - 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x2a, 0x02, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, - 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x1a, 0xd6, 0x02, 0x0a, 0x1b, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x54, 0x54, 0x43, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x08, 0x0a, 0x18, 0x47, 0x72, + 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x1b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x52, 0x19, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x12, 0xb5, 0x01, 0x0a, 0x18, + 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x71, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x16, 0x63, 0x6f, 0x6e, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x74, 0x74, 0x5f, + 0x63, 0x61, 0x6c, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x6b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, + 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x54, 0x54, 0x43, 0x61, 0x6c, + 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x52, 0x74, 0x74, + 0x43, 0x61, 0x6c, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0xe5, 0x01, 0x0a, 0x21, 0x43, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x41, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, - 0x00, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x2b, 0x0a, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0f, - 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0e, 0x6d, 0x69, - 0x6e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x06, - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x22, 0x98, 0x02, 0x0a, 0x13, 0x41, 0x64, - 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x12, 0x99, 0x01, 0x0a, 0x1a, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x12, 0x59, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x63, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, + 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x1a, 0xd6, 0x02, 0x0a, 0x1b, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x54, + 0x54, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, + 0x02, 0x20, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x4e, + 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0e, + 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, + 0x0a, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x22, 0x98, 0x02, 0x0a, 0x13, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x12, 0x99, 0x01, 0x0a, 0x1a, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x18, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x3f, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x42, 0x24, 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x84, 0x02, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, - 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x18, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x24, - 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x42, 0xa6, 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x18, 0x41, 0x64, - 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x37, 0x12, 0x35, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x18, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5c, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, 0x64, 0x61, 0x70, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x37, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, diff --git a/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.validate.go b/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.validate.go index 208b88ea7f..dad754be23 100644 --- a/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto -package envoy_config_filter_http_adaptive_concurrency_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GradientControllerConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GradientControllerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GradientControllerConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GradientControllerConfigMultiError, or nil if none found. +func (m *GradientControllerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSampleAggregatePercentile()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSampleAggregatePercentile()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "SampleAggregatePercentile", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "SampleAggregatePercentile", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSampleAggregatePercentile()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfigValidationError{ field: "SampleAggregatePercentile", @@ -52,13 +87,36 @@ func (m *GradientControllerConfig) Validate() error { } if m.GetConcurrencyLimitParams() == nil { - return GradientControllerConfigValidationError{ + err := GradientControllerConfigValidationError{ field: "ConcurrencyLimitParams", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConcurrencyLimitParams()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConcurrencyLimitParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConcurrencyLimitParams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfigValidationError{ field: "ConcurrencyLimitParams", @@ -69,13 +127,36 @@ func (m *GradientControllerConfig) Validate() error { } if m.GetMinRttCalcParams() == nil { - return GradientControllerConfigValidationError{ + err := GradientControllerConfigValidationError{ field: "MinRttCalcParams", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMinRttCalcParams()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinRttCalcParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinRttCalcParams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfigValidationError{ field: "MinRttCalcParams", @@ -85,9 +166,30 @@ func (m *GradientControllerConfig) Validate() error { } } + if len(errors) > 0 { + return GradientControllerConfigMultiError(errors) + } + return nil } +// GradientControllerConfigMultiError is an error wrapping multiple validation +// errors returned by GradientControllerConfig.ValidateAll() if the designated +// constraints aren't met. +type GradientControllerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfigMultiError) AllErrors() []error { return m } + // GradientControllerConfigValidationError is the validation error returned by // GradientControllerConfig.Validate if the designated constraints aren't met. type GradientControllerConfigValidationError struct { @@ -146,13 +248,46 @@ var _ interface { // Validate checks the field values on AdaptiveConcurrency with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AdaptiveConcurrency) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdaptiveConcurrency with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AdaptiveConcurrencyMultiError, or nil if none found. +func (m *AdaptiveConcurrency) ValidateAll() error { + return m.validate(true) +} + +func (m *AdaptiveConcurrency) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdaptiveConcurrencyValidationError{ field: "Enabled", @@ -167,13 +302,36 @@ func (m *AdaptiveConcurrency) Validate() error { case *AdaptiveConcurrency_GradientControllerConfig: if m.GetGradientControllerConfig() == nil { - return AdaptiveConcurrencyValidationError{ + err := AdaptiveConcurrencyValidationError{ field: "GradientControllerConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGradientControllerConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGradientControllerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGradientControllerConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdaptiveConcurrencyValidationError{ field: "GradientControllerConfig", @@ -184,16 +342,41 @@ func (m *AdaptiveConcurrency) Validate() error { } default: - return AdaptiveConcurrencyValidationError{ + err := AdaptiveConcurrencyValidationError{ field: "ConcurrencyControllerConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return AdaptiveConcurrencyMultiError(errors) } return nil } +// AdaptiveConcurrencyMultiError is an error wrapping multiple validation +// errors returned by AdaptiveConcurrency.ValidateAll() if the designated +// constraints aren't met. +type AdaptiveConcurrencyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdaptiveConcurrencyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdaptiveConcurrencyMultiError) AllErrors() []error { return m } + // AdaptiveConcurrencyValidationError is the validation error returned by // AdaptiveConcurrency.Validate if the designated constraints aren't met. type AdaptiveConcurrencyValidationError struct { @@ -253,54 +436,111 @@ var _ interface { // Validate checks the field values on // GradientControllerConfig_ConcurrencyLimitCalculationParams with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GradientControllerConfig_ConcurrencyLimitCalculationParams with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError, or +// nil if none found. +func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMaxConcurrencyLimit(); wrapper != nil { if wrapper.GetValue() <= 0 { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ field: "MaxConcurrencyLimit", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } if m.GetConcurrencyUpdateInterval() == nil { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ field: "ConcurrencyUpdateInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetConcurrencyUpdateInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + err = GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ field: "ConcurrencyUpdateInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ - field: "ConcurrencyUpdateInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + field: "ConcurrencyUpdateInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError(errors) } return nil } +// GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError is an +// error wrapping multiple validation errors returned by +// GradientControllerConfig_ConcurrencyLimitCalculationParams.ValidateAll() if +// the designated constraints aren't met. +type GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError) AllErrors() []error { + return m +} + // GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError is // the validation error returned by // GradientControllerConfig_ConcurrencyLimitCalculationParams.Validate if the @@ -369,53 +609,105 @@ var _ interface { // Validate checks the field values on // GradientControllerConfig_MinimumRTTCalculationParams with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *GradientControllerConfig_MinimumRTTCalculationParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GradientControllerConfig_MinimumRTTCalculationParams with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// GradientControllerConfig_MinimumRTTCalculationParamsMultiError, or nil if +// none found. +func (m *GradientControllerConfig_MinimumRTTCalculationParams) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig_MinimumRTTCalculationParams) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetInterval() == nil { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Interval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err = GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Interval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ - field: "Interval", - reason: "value must be greater than 0s", + if dur <= gt { + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Interval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if wrapper := m.GetRequestCount(); wrapper != nil { if wrapper.GetValue() <= 0 { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "RequestCount", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetJitter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Jitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Jitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJitter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Jitter", @@ -428,15 +720,38 @@ func (m *GradientControllerConfig_MinimumRTTCalculationParams) Validate() error if wrapper := m.GetMinConcurrency(); wrapper != nil { if wrapper.GetValue() <= 0 { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "MinConcurrency", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBuffer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Buffer", @@ -446,9 +761,31 @@ func (m *GradientControllerConfig_MinimumRTTCalculationParams) Validate() error } } + if len(errors) > 0 { + return GradientControllerConfig_MinimumRTTCalculationParamsMultiError(errors) + } + return nil } +// GradientControllerConfig_MinimumRTTCalculationParamsMultiError is an error +// wrapping multiple validation errors returned by +// GradientControllerConfig_MinimumRTTCalculationParams.ValidateAll() if the +// designated constraints aren't met. +type GradientControllerConfig_MinimumRTTCalculationParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfig_MinimumRTTCalculationParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfig_MinimumRTTCalculationParamsMultiError) AllErrors() []error { return m } + // GradientControllerConfig_MinimumRTTCalculationParamsValidationError is the // validation error returned by // GradientControllerConfig_MinimumRTTCalculationParams.Validate if the diff --git a/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.go b/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.go index 28b924df66..a17c3df2ce 100644 --- a/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.go +++ b/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto -package envoy_config_filter_http_aws_lambda_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Config_InvocationMode int32 const ( @@ -234,16 +229,22 @@ var file_envoy_config_filter_http_aws_lambda_v2alpha_aws_lambda_proto_rawDesc = 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x90, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x69, 0x67, 0x42, 0xe4, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x41, 0x77, 0x73, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, - 0x64, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2f, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, + 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, + 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.validate.go b/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.validate.go index 333c63a787..3b76fb680b 100644 --- a/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto -package envoy_config_filter_http_aws_lambda_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetArn()) < 1 { - return ConfigValidationError{ + err := ConfigValidationError{ field: "Arn", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for PayloadPassthrough if _, ok := Config_InvocationMode_name[int32(m.GetInvocationMode())]; !ok { - return ConfigValidationError{ + err := ConfigValidationError{ field: "InvocationMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ConfigMultiError(errors) } return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { @@ -114,14 +158,47 @@ var _ interface { } = ConfigValidationError{} // Validate checks the field values on PerRouteConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetInvokeConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetInvokeConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "InvokeConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "InvokeConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInvokeConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerRouteConfigValidationError{ field: "InvokeConfig", @@ -131,9 +208,30 @@ func (m *PerRouteConfig) Validate() error { } } + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil } +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + // PerRouteConfigValidationError is the validation error returned by // PerRouteConfig.Validate if the designated constraints aren't met. type PerRouteConfigValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.go b/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.go index 78b71ccbe3..56dc7d6014 100644 --- a/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.go +++ b/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto -package envoy_config_filter_http_aws_request_signing_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Top level configuration for the AWS request signing filter. type AwsRequestSigning struct { state protoimpl.MessageState @@ -134,18 +129,23 @@ var file_envoy_config_filter_http_aws_request_signing_v2alpha_aws_request_signin 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x42, 0xa2, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x72, 0x69, 0x74, 0x65, 0x42, 0xff, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x16, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x36, 0x12, 0x34, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x36, 0x12, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.validate.go b/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.validate.go index 5be373f163..471c070a83 100644 --- a/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto -package envoy_config_filter_http_aws_request_signing_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,36 +31,80 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AwsRequestSigning with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AwsRequestSigning) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AwsRequestSigning with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AwsRequestSigningMultiError, or nil if none found. +func (m *AwsRequestSigning) ValidateAll() error { + return m.validate(true) +} + +func (m *AwsRequestSigning) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetServiceName()) < 1 { - return AwsRequestSigningValidationError{ + err := AwsRequestSigningValidationError{ field: "ServiceName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetRegion()) < 1 { - return AwsRequestSigningValidationError{ + err := AwsRequestSigningValidationError{ field: "Region", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for HostRewrite + if len(errors) > 0 { + return AwsRequestSigningMultiError(errors) + } + return nil } +// AwsRequestSigningMultiError is an error wrapping multiple validation errors +// returned by AwsRequestSigning.ValidateAll() if the designated constraints +// aren't met. +type AwsRequestSigningMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AwsRequestSigningMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AwsRequestSigningMultiError) AllErrors() []error { return m } + // AwsRequestSigningValidationError is the validation error returned by // AwsRequestSigning.Validate if the designated constraints aren't met. type AwsRequestSigningValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.go b/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.go index d6f73e9a1a..7661379da9 100644 --- a/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.go +++ b/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/buffer/v2/buffer.proto -package envoy_config_filter_http_buffer_v2 +package bufferv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Buffer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -191,15 +186,20 @@ var file_envoy_config_filter_http_buffer_v2_buffer_proto_rawDesc = []byte{ 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x42, 0x78, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x75, - 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xf8, 0x42, 0x01, 0x42, 0xcc, 0x01, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, + 0x76, 0x32, 0x3b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.validate.go b/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.validate.go index 4177ef1d9b..4a7f027c55 100644 --- a/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/buffer/v2/buffer.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/buffer/v2/buffer.proto -package envoy_config_filter_http_buffer_v2 +package bufferv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Buffer with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Buffer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Buffer with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in BufferMultiError, or nil if none found. +func (m *Buffer) ValidateAll() error { + return m.validate(true) +} + +func (m *Buffer) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMaxRequestBytes(); wrapper != nil { if wrapper.GetValue() <= 0 { - return BufferValidationError{ + err := BufferValidationError{ field: "MaxRequestBytes", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } else { - return BufferValidationError{ + err := BufferValidationError{ field: "MaxRequestBytes", reason: "value is required and must not be nil.", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return BufferMultiError(errors) } return nil } +// BufferMultiError is an error wrapping multiple validation errors returned by +// Buffer.ValidateAll() if the designated constraints aren't met. +type BufferMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferMultiError) AllErrors() []error { return m } + // BufferValidationError is the validation error returned by Buffer.Validate if // the designated constraints aren't met. type BufferValidationError struct { @@ -114,34 +158,75 @@ var _ interface { } = BufferValidationError{} // Validate checks the field values on BufferPerRoute with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BufferPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferPerRoute with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BufferPerRouteMultiError, +// or nil if none found. +func (m *BufferPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Override.(type) { case *BufferPerRoute_Disabled: if m.GetDisabled() != true { - return BufferPerRouteValidationError{ + err := BufferPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *BufferPerRoute_Buffer: if m.GetBuffer() == nil { - return BufferPerRouteValidationError{ + err := BufferPerRouteValidationError{ field: "Buffer", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBuffer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferPerRouteValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferPerRouteValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BufferPerRouteValidationError{ field: "Buffer", @@ -152,16 +237,41 @@ func (m *BufferPerRoute) Validate() error { } default: - return BufferPerRouteValidationError{ + err := BufferPerRouteValidationError{ field: "Override", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return BufferPerRouteMultiError(errors) } return nil } +// BufferPerRouteMultiError is an error wrapping multiple validation errors +// returned by BufferPerRoute.ValidateAll() if the designated constraints +// aren't met. +type BufferPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferPerRouteMultiError) AllErrors() []error { return m } + // BufferPerRouteValidationError is the validation error returned by // BufferPerRoute.Validate if the designated constraints aren't met. type BufferPerRouteValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.go b/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.go index b0aa78075c..0759866c75 100644 --- a/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.go +++ b/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/cache/v2alpha/cache.proto -package envoy_config_filter_http_cache_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CacheConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -265,16 +260,21 @@ var file_envoy_config_filter_http_cache_v2alpha_cache_proto_rawDesc = []byte{ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x42, 0x87, 0x01, 0x0a, 0x34, 0x69, + 0x72, 0x73, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x42, 0xd6, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.validate.go b/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.validate.go index 5c68c40746..3253c8460e 100644 --- a/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/cache/v2alpha/cache.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/cache/v2alpha/cache.proto -package envoy_config_filter_http_cache_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,41 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CacheConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CacheConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CacheConfigMultiError, or +// nil if none found. +func (m *CacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CacheConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetTypedConfig() == nil { - return CacheConfigValidationError{ + err := CacheConfigValidationError{ field: "TypedConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if a := m.GetTypedConfig(); a != nil { @@ -55,7 +75,26 @@ func (m *CacheConfig) Validate() error { for idx, item := range m.GetAllowedVaryHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CacheConfigValidationError{ field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), @@ -67,7 +106,26 @@ func (m *CacheConfig) Validate() error { } - if v, ok := interface{}(m.GetKeyCreatorParams()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKeyCreatorParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeyCreatorParams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CacheConfigValidationError{ field: "KeyCreatorParams", @@ -79,9 +137,29 @@ func (m *CacheConfig) Validate() error { // no validation rules for MaxBodyBytes + if len(errors) > 0 { + return CacheConfigMultiError(errors) + } + return nil } +// CacheConfigMultiError is an error wrapping multiple validation errors +// returned by CacheConfig.ValidateAll() if the designated constraints aren't met. +type CacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CacheConfigMultiError) AllErrors() []error { return m } + // CacheConfigValidationError is the validation error returned by // CacheConfig.Validate if the designated constraints aren't met. type CacheConfigValidationError struct { @@ -138,12 +216,26 @@ var _ interface { // Validate checks the field values on CacheConfig_KeyCreatorParams with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CacheConfig_KeyCreatorParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CacheConfig_KeyCreatorParams with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CacheConfig_KeyCreatorParamsMultiError, or nil if none found. +func (m *CacheConfig_KeyCreatorParams) ValidateAll() error { + return m.validate(true) +} + +func (m *CacheConfig_KeyCreatorParams) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ExcludeScheme // no validation rules for ExcludeHost @@ -151,7 +243,26 @@ func (m *CacheConfig_KeyCreatorParams) Validate() error { for idx, item := range m.GetQueryParametersIncluded() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CacheConfig_KeyCreatorParamsValidationError{ field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), @@ -166,7 +277,26 @@ func (m *CacheConfig_KeyCreatorParams) Validate() error { for idx, item := range m.GetQueryParametersExcluded() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CacheConfig_KeyCreatorParamsValidationError{ field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), @@ -178,9 +308,30 @@ func (m *CacheConfig_KeyCreatorParams) Validate() error { } + if len(errors) > 0 { + return CacheConfig_KeyCreatorParamsMultiError(errors) + } + return nil } +// CacheConfig_KeyCreatorParamsMultiError is an error wrapping multiple +// validation errors returned by CacheConfig_KeyCreatorParams.ValidateAll() if +// the designated constraints aren't met. +type CacheConfig_KeyCreatorParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CacheConfig_KeyCreatorParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CacheConfig_KeyCreatorParamsMultiError) AllErrors() []error { return m } + // CacheConfig_KeyCreatorParamsValidationError is the validation error returned // by CacheConfig_KeyCreatorParams.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.go b/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.go index 86854eed6e..9f76c29e45 100644 --- a/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.go +++ b/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/compressor/v2/compressor.proto -package envoy_config_filter_http_compressor_v2 +package compressorv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type Compressor struct { state protoimpl.MessageState @@ -160,16 +155,22 @@ var file_envoy_config_filter_http_compressor_v2_compressor_proto_rawDesc = []byt 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x84, 0x01, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0xe0, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, - 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.validate.go b/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.validate.go index da65e05942..734eb826f4 100644 --- a/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/compressor/v2/compressor.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/compressor/v2/compressor.proto -package envoy_config_filter_http_compressor_v2 +package compressorv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Compressor with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Compressor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CompressorMultiError, or +// nil if none found. +func (m *Compressor) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetContentLength()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetContentLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetContentLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CompressorValidationError{ field: "ContentLength", @@ -54,7 +90,26 @@ func (m *Compressor) Validate() error { // no validation rules for RemoveAcceptEncodingHeader - if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CompressorValidationError{ field: "RuntimeEnabled", @@ -64,9 +119,29 @@ func (m *Compressor) Validate() error { } } + if len(errors) > 0 { + return CompressorMultiError(errors) + } + return nil } +// CompressorMultiError is an error wrapping multiple validation errors +// returned by Compressor.ValidateAll() if the designated constraints aren't met. +type CompressorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CompressorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CompressorMultiError) AllErrors() []error { return m } + // CompressorValidationError is the validation error returned by // Compressor.Validate if the designated constraints aren't met. type CompressorValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.go b/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.go index deb3d23e2a..667fed0e36 100644 --- a/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.go +++ b/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/cors/v2/cors.proto -package envoy_config_filter_http_cors_v2 +package corsv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Cors filter config. type Cors struct { state protoimpl.MessageState @@ -77,15 +72,20 @@ var file_envoy_config_filter_http_cors_v2_cors_proto_rawDesc = []byte{ 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x06, - 0x0a, 0x04, 0x43, 0x6f, 0x72, 0x73, 0x42, 0x72, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, 0x25, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x0a, 0x04, 0x43, 0x6f, 0x72, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x43, 0x6f, 0x72, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x32, 0x3b, + 0x63, 0x6f, 0x72, 0x73, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, 0x25, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, + 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.validate.go b/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.validate.go index 6570ab76cc..2f0fd84961 100644 --- a/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/cors/v2/cors.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/cors/v2/cors.proto -package envoy_config_filter_http_cors_v2 +package corsv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Cors with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Cors) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cors with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in CorsMultiError, or nil if none found. +func (m *Cors) ValidateAll() error { + return m.validate(true) +} + +func (m *Cors) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return CorsMultiError(errors) + } + return nil } +// CorsMultiError is an error wrapping multiple validation errors returned by +// Cors.ValidateAll() if the designated constraints aren't met. +type CorsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CorsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CorsMultiError) AllErrors() []error { return m } + // CorsValidationError is the validation error returned by Cors.Validate if the // designated constraints aren't met. type CorsValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.go b/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.go index 8ae4ec1e99..8e3b4e2f41 100644 --- a/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.go +++ b/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/csrf/v2/csrf.proto -package envoy_config_filter_http_csrf_v2 +package csrfv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // CSRF filter config. type CsrfPolicy struct { state protoimpl.MessageState @@ -149,15 +144,20 @@ var file_envoy_config_filter_http_csrf_v2_csrf_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x42, 0x72, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x43, 0x73, 0x72, - 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, 0x25, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, - 0x72, 0x66, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x2e, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x43, 0x73, + 0x72, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x73, 0x72, 0x66, 0x2f, + 0x76, 0x32, 0x3b, 0x63, 0x73, 0x72, 0x66, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, + 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, + 0x73, 0x72, 0x66, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.validate.go b/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.validate.go index f041906c7c..eeafd02f7f 100644 --- a/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/csrf/v2/csrf.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/csrf/v2/csrf.proto -package envoy_config_filter_http_csrf_v2 +package csrfv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CsrfPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CsrfPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CsrfPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CsrfPolicyMultiError, or +// nil if none found. +func (m *CsrfPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *CsrfPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetFilterEnabled() == nil { - return CsrfPolicyValidationError{ + err := CsrfPolicyValidationError{ field: "FilterEnabled", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "FilterEnabled", @@ -57,7 +97,26 @@ func (m *CsrfPolicy) Validate() error { } } - if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "ShadowEnabled", @@ -70,7 +129,26 @@ func (m *CsrfPolicy) Validate() error { for idx, item := range m.GetAdditionalOrigins() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: fmt.Sprintf("AdditionalOrigins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: fmt.Sprintf("AdditionalOrigins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: fmt.Sprintf("AdditionalOrigins[%v]", idx), @@ -82,9 +160,29 @@ func (m *CsrfPolicy) Validate() error { } + if len(errors) > 0 { + return CsrfPolicyMultiError(errors) + } + return nil } +// CsrfPolicyMultiError is an error wrapping multiple validation errors +// returned by CsrfPolicy.ValidateAll() if the designated constraints aren't met. +type CsrfPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CsrfPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CsrfPolicyMultiError) AllErrors() []error { return m } + // CsrfPolicyValidationError is the validation error returned by // CsrfPolicy.Validate if the designated constraints aren't met. type CsrfPolicyValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.go b/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.go index 55dc45db9b..8fdf302769 100644 --- a/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.go +++ b/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto -package envoy_config_filter_http_dynamic_forward_proxy_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/dynamic_forward_proxy/v2alpha" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the dynamic forward proxy HTTP filter. See the :ref:`architecture overview // ` for more information. // [#extension: envoy.filters.http.dynamic_forward_proxy] @@ -226,18 +221,24 @@ var file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_ 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0xa8, 0x01, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x87, 0x02, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x18, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x38, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x64, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x38, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.validate.go b/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.validate.go index edaf1bf657..d824476e6d 100644 --- a/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto -package envoy_config_filter_http_dynamic_forward_proxy_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDnsCacheConfig() == nil { - return FilterConfigValidationError{ + err := FilterConfigValidationError{ field: "DnsCacheConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterConfigValidationError{ field: "DnsCacheConfig", @@ -58,9 +97,29 @@ func (m *FilterConfig) Validate() error { } } + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil } +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + // FilterConfigValidationError is the validation error returned by // FilterConfig.Validate if the designated constraints aren't met. type FilterConfigValidationError struct { @@ -116,13 +175,27 @@ var _ interface { } = FilterConfigValidationError{} // Validate checks the field values on PerRouteConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.HostRewriteSpecifier.(type) { case *PerRouteConfig_HostRewrite: @@ -133,9 +206,30 @@ func (m *PerRouteConfig) Validate() error { } + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil } +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + // PerRouteConfigValidationError is the validation error returned by // PerRouteConfig.Validate if the designated constraints aren't met. type PerRouteConfigValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.go b/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.go index b662f37c68..4c7cfb2050 100644 --- a/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.go +++ b/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/dynamo/v2/dynamo.proto -package envoy_config_filter_http_dynamo_v2 +package dynamov2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Dynamo filter config. type Dynamo struct { state protoimpl.MessageState @@ -77,15 +72,21 @@ var file_envoy_config_filter_http_dynamo_v2_dynamo_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x42, 0x78, - 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x2e, - 0x76, 0x32, 0x42, 0x0b, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x42, 0xcc, + 0x01, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, + 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x79, + 0x6e, 0x61, 0x6d, 0x6f, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x6f, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.validate.go b/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.validate.go index cc526a170a..a04b421637 100644 --- a/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/dynamo/v2/dynamo.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/dynamo/v2/dynamo.proto -package envoy_config_filter_http_dynamo_v2 +package dynamov2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Dynamo with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Dynamo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Dynamo with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in DynamoMultiError, or nil if none found. +func (m *Dynamo) ValidateAll() error { + return m.validate(true) +} + +func (m *Dynamo) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return DynamoMultiError(errors) + } + return nil } +// DynamoMultiError is an error wrapping multiple validation errors returned by +// Dynamo.ValidateAll() if the designated constraints aren't met. +type DynamoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DynamoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DynamoMultiError) AllErrors() []error { return m } + // DynamoValidationError is the validation error returned by Dynamo.Validate if // the designated constraints aren't met. type DynamoValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.go b/pkg/api/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.go index 125da933b5..5ecb0988b3 100644 --- a/pkg/api/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.go +++ b/pkg/api/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.go @@ -1,19 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/ext_authz/v2/ext_authz.proto -package envoy_config_filter_http_ext_authz_v2 +package ext_authzv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 12] type ExtAuthz struct { state protoimpl.MessageState @@ -843,15 +838,21 @@ var file_envoy_config_filter_http_ext_authz_v2_ext_authz_proto_rawDesc = []byte{ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, - 0x80, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0xda, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2c, 0x12, 0x2a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, - 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go b/pkg/api/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go index 6a286be009..918c22d0c1 100644 --- a/pkg/api/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/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/http/ext_authz/v2/ext_authz.proto -package envoy_config_filter_http_ext_authz_v2 +package ext_authzv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ExtAuthz) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtAuthz with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExtAuthzMultiError, or nil +// if none found. +func (m *ExtAuthz) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtAuthz) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for FailureModeAllow // no validation rules for UseAlpha - if v, ok := interface{}(m.GetWithRequestBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWithRequestBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "WithRequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "WithRequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWithRequestBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "WithRequestBody", @@ -56,7 +92,26 @@ func (m *ExtAuthz) Validate() error { // no validation rules for ClearRouteCache - if v, ok := interface{}(m.GetStatusOnError()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatusOnError()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "StatusOnError", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "StatusOnError", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatusOnError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "StatusOnError", @@ -66,7 +121,26 @@ func (m *ExtAuthz) Validate() error { } } - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "FilterEnabled", @@ -76,7 +150,26 @@ func (m *ExtAuthz) Validate() error { } } - if v, ok := interface{}(m.GetDenyAtDisable()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDenyAtDisable()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "DenyAtDisable", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "DenyAtDisable", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDenyAtDisable()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "DenyAtDisable", @@ -92,7 +185,26 @@ func (m *ExtAuthz) Validate() error { case *ExtAuthz_GrpcService: - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "GrpcService", @@ -104,7 +216,26 @@ func (m *ExtAuthz) Validate() error { case *ExtAuthz_HttpService: - if v, ok := interface{}(m.GetHttpService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "HttpService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "HttpService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "HttpService", @@ -116,9 +247,29 @@ func (m *ExtAuthz) Validate() error { } + if len(errors) > 0 { + return ExtAuthzMultiError(errors) + } + return nil } +// ExtAuthzMultiError is an error wrapping multiple validation errors returned +// by ExtAuthz.ValidateAll() if the designated constraints aren't met. +type ExtAuthzMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtAuthzMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtAuthzMultiError) AllErrors() []error { return m } + // ExtAuthzValidationError is the validation error returned by // ExtAuthz.Validate if the designated constraints aren't met. type ExtAuthzValidationError struct { @@ -174,25 +325,64 @@ var _ interface { } = ExtAuthzValidationError{} // Validate checks the field values on BufferSettings with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BufferSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferSettings with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BufferSettingsMultiError, +// or nil if none found. +func (m *BufferSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferSettings) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMaxRequestBytes() <= 0 { - return BufferSettingsValidationError{ + err := BufferSettingsValidationError{ field: "MaxRequestBytes", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AllowPartialMessage + if len(errors) > 0 { + return BufferSettingsMultiError(errors) + } + return nil } +// BufferSettingsMultiError is an error wrapping multiple validation errors +// returned by BufferSettings.ValidateAll() if the designated constraints +// aren't met. +type BufferSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferSettingsMultiError) AllErrors() []error { return m } + // BufferSettingsValidationError is the validation error returned by // BufferSettings.Validate if the designated constraints aren't met. type BufferSettingsValidationError struct { @@ -248,14 +438,47 @@ var _ interface { } = BufferSettingsValidationError{} // Validate checks the field values on HttpService with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpService with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpServiceMultiError, or +// nil if none found. +func (m *HttpService) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpService) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetServerUri()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetServerUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "ServerUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "ServerUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServerUri()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "ServerUri", @@ -267,7 +490,26 @@ func (m *HttpService) Validate() error { // no validation rules for PathPrefix - if v, ok := interface{}(m.GetAuthorizationRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAuthorizationRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthorizationRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationRequest", @@ -277,7 +519,26 @@ func (m *HttpService) Validate() error { } } - if v, ok := interface{}(m.GetAuthorizationResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAuthorizationResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthorizationResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationResponse", @@ -287,9 +548,29 @@ func (m *HttpService) Validate() error { } } + if len(errors) > 0 { + return HttpServiceMultiError(errors) + } + return nil } +// HttpServiceMultiError is an error wrapping multiple validation errors +// returned by HttpService.ValidateAll() if the designated constraints aren't met. +type HttpServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpServiceMultiError) AllErrors() []error { return m } + // HttpServiceValidationError is the validation error returned by // HttpService.Validate if the designated constraints aren't met. type HttpServiceValidationError struct { @@ -346,13 +627,46 @@ var _ interface { // Validate checks the field values on AuthorizationRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AuthorizationRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AuthorizationRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AuthorizationRequestMultiError, or nil if none found. +func (m *AuthorizationRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AuthorizationRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAllowedHeaders()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAllowedHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: "AllowedHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: "AllowedHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationRequestValidationError{ field: "AllowedHeaders", @@ -365,7 +679,26 @@ func (m *AuthorizationRequest) Validate() error { for idx, item := range m.GetHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationRequestValidationError{ field: fmt.Sprintf("HeadersToAdd[%v]", idx), @@ -377,9 +710,30 @@ func (m *AuthorizationRequest) Validate() error { } + if len(errors) > 0 { + return AuthorizationRequestMultiError(errors) + } + return nil } +// AuthorizationRequestMultiError is an error wrapping multiple validation +// errors returned by AuthorizationRequest.ValidateAll() if the designated +// constraints aren't met. +type AuthorizationRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AuthorizationRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AuthorizationRequestMultiError) AllErrors() []error { return m } + // AuthorizationRequestValidationError is the validation error returned by // AuthorizationRequest.Validate if the designated constraints aren't met. type AuthorizationRequestValidationError struct { @@ -438,13 +792,46 @@ var _ interface { // Validate checks the field values on AuthorizationResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AuthorizationResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AuthorizationResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AuthorizationResponseMultiError, or nil if none found. +func (m *AuthorizationResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *AuthorizationResponse) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAllowedUpstreamHeaders()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAllowedUpstreamHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedUpstreamHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedUpstreamHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedUpstreamHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedUpstreamHeaders", @@ -454,7 +841,26 @@ func (m *AuthorizationResponse) Validate() error { } } - if v, ok := interface{}(m.GetAllowedClientHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowedClientHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedClientHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedClientHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedClientHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedClientHeaders", @@ -464,9 +870,30 @@ func (m *AuthorizationResponse) Validate() error { } } + if len(errors) > 0 { + return AuthorizationResponseMultiError(errors) + } + return nil } +// AuthorizationResponseMultiError is an error wrapping multiple validation +// errors returned by AuthorizationResponse.ValidateAll() if the designated +// constraints aren't met. +type AuthorizationResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AuthorizationResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AuthorizationResponseMultiError) AllErrors() []error { return m } + // AuthorizationResponseValidationError is the validation error returned by // AuthorizationResponse.Validate if the designated constraints aren't met. type AuthorizationResponseValidationError struct { @@ -524,34 +951,75 @@ var _ interface { } = AuthorizationResponseValidationError{} // Validate checks the field values on ExtAuthzPerRoute with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ExtAuthzPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtAuthzPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtAuthzPerRouteMultiError, or nil if none found. +func (m *ExtAuthzPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtAuthzPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Override.(type) { case *ExtAuthzPerRoute_Disabled: if m.GetDisabled() != true { - return ExtAuthzPerRouteValidationError{ + err := ExtAuthzPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *ExtAuthzPerRoute_CheckSettings: if m.GetCheckSettings() == nil { - return ExtAuthzPerRouteValidationError{ + err := ExtAuthzPerRouteValidationError{ field: "CheckSettings", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCheckSettings()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCheckSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzPerRouteValidationError{ + field: "CheckSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzPerRouteValidationError{ + field: "CheckSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCheckSettings()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzPerRouteValidationError{ field: "CheckSettings", @@ -562,16 +1030,41 @@ func (m *ExtAuthzPerRoute) Validate() error { } default: - return ExtAuthzPerRouteValidationError{ + err := ExtAuthzPerRouteValidationError{ field: "Override", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ExtAuthzPerRouteMultiError(errors) + } + return nil } +// ExtAuthzPerRouteMultiError is an error wrapping multiple validation errors +// returned by ExtAuthzPerRoute.ValidateAll() if the designated constraints +// aren't met. +type ExtAuthzPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtAuthzPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtAuthzPerRouteMultiError) AllErrors() []error { return m } + // ExtAuthzPerRouteValidationError is the validation error returned by // ExtAuthzPerRoute.Validate if the designated constraints aren't met. type ExtAuthzPerRouteValidationError struct { @@ -627,18 +1120,53 @@ var _ interface { } = ExtAuthzPerRouteValidationError{} // Validate checks the field values on CheckSettings with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CheckSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckSettings with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckSettingsMultiError, or +// nil if none found. +func (m *CheckSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckSettings) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ContextExtensions + if len(errors) > 0 { + return CheckSettingsMultiError(errors) + } + return nil } +// CheckSettingsMultiError is an error wrapping multiple validation errors +// returned by CheckSettings.ValidateAll() if the designated constraints +// aren't met. +type CheckSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckSettingsMultiError) AllErrors() []error { return m } + // CheckSettingsValidationError is the validation error returned by // CheckSettings.Validate if the designated constraints aren't met. type CheckSettingsValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.go b/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.go index 19706e7142..866cbcccf8 100644 --- a/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.go +++ b/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/fault/v2/fault.proto -package envoy_config_filter_http_fault_v2 +package faultv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/fault/v2" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FaultAbort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -451,14 +446,20 @@ var file_envoy_config_filter_http_fault_v2_fault_proto_rawDesc = []byte{ 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, - 0x75, 0x0a, 0x2f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, - 0x76, 0x32, 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x28, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xc7, 0x01, 0x0a, 0x2f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x32, 0x3b, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x28, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.validate.go b/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.validate.go index efe2c76f95..c6aa2b42f7 100644 --- a/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/fault/v2/fault.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/fault/v2/fault.proto -package envoy_config_filter_http_fault_v2 +package faultv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FaultAbort with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FaultAbort) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultAbort with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FaultAbortMultiError, or +// nil if none found. +func (m *FaultAbort) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultAbort) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultAbortValidationError{ field: "Percentage", @@ -55,15 +91,38 @@ func (m *FaultAbort) Validate() error { case *FaultAbort_HttpStatus: if val := m.GetHttpStatus(); val < 200 || val >= 600 { - return FaultAbortValidationError{ + err := FaultAbortValidationError{ field: "HttpStatus", reason: "value must be inside range [200, 600)", } + if !all { + return err + } + errors = append(errors, err) } case *FaultAbort_HeaderAbort_: - if v, ok := interface{}(m.GetHeaderAbort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderAbort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "HeaderAbort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "HeaderAbort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderAbort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultAbortValidationError{ field: "HeaderAbort", @@ -74,16 +133,40 @@ func (m *FaultAbort) Validate() error { } default: - return FaultAbortValidationError{ + err := FaultAbortValidationError{ field: "ErrorType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return FaultAbortMultiError(errors) + } + return nil } +// FaultAbortMultiError is an error wrapping multiple validation errors +// returned by FaultAbort.ValidateAll() if the designated constraints aren't met. +type FaultAbortMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultAbortMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultAbortMultiError) AllErrors() []error { return m } + // FaultAbortValidationError is the validation error returned by // FaultAbort.Validate if the designated constraints aren't met. type FaultAbortValidationError struct { @@ -139,13 +222,47 @@ var _ interface { } = FaultAbortValidationError{} // Validate checks the field values on HTTPFault with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HTTPFault) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPFault with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HTTPFaultMultiError, or nil +// if none found. +func (m *HTTPFault) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPFault) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "Delay", @@ -155,7 +272,26 @@ func (m *HTTPFault) Validate() error { } } - if v, ok := interface{}(m.GetAbort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAbort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Abort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Abort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAbort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "Abort", @@ -170,7 +306,26 @@ func (m *HTTPFault) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -182,7 +337,26 @@ func (m *HTTPFault) Validate() error { } - if v, ok := interface{}(m.GetMaxActiveFaults()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxActiveFaults()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "MaxActiveFaults", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "MaxActiveFaults", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxActiveFaults()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "MaxActiveFaults", @@ -192,7 +366,26 @@ func (m *HTTPFault) Validate() error { } } - if v, ok := interface{}(m.GetResponseRateLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseRateLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "ResponseRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "ResponseRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseRateLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "ResponseRateLimit", @@ -214,9 +407,29 @@ func (m *HTTPFault) Validate() error { // no validation rules for ResponseRateLimitPercentRuntime + if len(errors) > 0 { + return HTTPFaultMultiError(errors) + } + return nil } +// HTTPFaultMultiError is an error wrapping multiple validation errors returned +// by HTTPFault.ValidateAll() if the designated constraints aren't met. +type HTTPFaultMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPFaultMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPFaultMultiError) AllErrors() []error { return m } + // HTTPFaultValidationError is the validation error returned by // HTTPFault.Validate if the designated constraints aren't met. type HTTPFaultValidationError struct { @@ -273,15 +486,50 @@ var _ interface { // Validate checks the field values on FaultAbort_HeaderAbort with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultAbort_HeaderAbort) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultAbort_HeaderAbort with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultAbort_HeaderAbortMultiError, or nil if none found. +func (m *FaultAbort_HeaderAbort) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultAbort_HeaderAbort) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return FaultAbort_HeaderAbortMultiError(errors) + } + return nil } +// FaultAbort_HeaderAbortMultiError is an error wrapping multiple validation +// errors returned by FaultAbort_HeaderAbort.ValidateAll() if the designated +// constraints aren't met. +type FaultAbort_HeaderAbortMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultAbort_HeaderAbortMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultAbort_HeaderAbortMultiError) AllErrors() []error { return m } + // FaultAbort_HeaderAbortValidationError is the validation error returned by // FaultAbort_HeaderAbort.Validate if the designated constraints aren't met. type FaultAbort_HeaderAbortValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.go b/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.go index e7b139a215..2ff3c790ab 100644 --- a/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.go +++ b/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/grpc_http1_bridge/v2/config.proto -package envoy_config_filter_http_grpc_http1_bridge_v2 +package grpc_http1_bridgev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC HTTP/1.1 Bridge filter config. type Config struct { state protoimpl.MessageState @@ -79,16 +74,23 @@ var file_envoy_config_filter_http_grpc_http1_bridge_v2_config_proto_rawDesc = [] 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0x8e, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0xf8, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x34, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, - 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, + 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x76, 0x32, 0xf2, 0x98, 0xfe, + 0x8f, 0x05, 0x34, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.validate.go b/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.validate.go index eb0993b3c9..3e04ade487 100644 --- a/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/grpc_http1_bridge/v2/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/grpc_http1_bridge/v2/config.proto -package envoy_config_filter_http_grpc_http1_bridge_v2 +package grpc_http1_bridgev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.go b/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.go index 2745ed7969..0f1eada6d5 100644 --- a/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.go +++ b/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto -package envoy_config_filter_http_grpc_http1_reverse_bridge_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC reverse bridge filter configuration type FilterConfig struct { state protoimpl.MessageState @@ -166,17 +161,24 @@ var file_envoy_config_filter_http_grpc_http1_reverse_bridge_v2alpha1_config_prot 0x14, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x42, 0xa4, 0x01, 0x0a, 0x49, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x64, 0x42, 0x88, 0x02, 0x0a, 0x49, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, - 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x3c, 0x12, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, - 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x62, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x3c, 0x12, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, + 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.validate.go b/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.validate.go index 904a0336da..3ad55e870d 100644 --- a/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto -package envoy_config_filter_http_grpc_http1_reverse_bridge_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetContentType()) < 1 { - return FilterConfigValidationError{ + err := FilterConfigValidationError{ field: "ContentType", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for WithholdGrpcFrames + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil } +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + // FilterConfigValidationError is the validation error returned by // FilterConfig.Validate if the designated constraints aren't met. type FilterConfigValidationError struct { @@ -109,17 +149,52 @@ var _ interface { // Validate checks the field values on FilterConfigPerRoute with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FilterConfigPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfigPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FilterConfigPerRouteMultiError, or nil if none found. +func (m *FilterConfigPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfigPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Disabled + if len(errors) > 0 { + return FilterConfigPerRouteMultiError(errors) + } + return nil } +// FilterConfigPerRouteMultiError is an error wrapping multiple validation +// errors returned by FilterConfigPerRoute.ValidateAll() if the designated +// constraints aren't met. +type FilterConfigPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigPerRouteMultiError) AllErrors() []error { return m } + // FilterConfigPerRouteValidationError is the validation error returned by // FilterConfigPerRoute.Validate if the designated constraints aren't met. type FilterConfigPerRouteValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.go b/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.go index 122d47e1d5..a8404d53ac 100644 --- a/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.go +++ b/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/grpc_stats/v2alpha/config.proto -package envoy_config_filter_http_grpc_stats_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC statistics filter configuration type FilterConfig struct { state protoimpl.MessageState @@ -129,10 +123,8 @@ type FilterConfig_StatsForAllMethods struct { // // .. attention:: // If neither `individual_method_stats_allowlist` nor `stats_for_all_methods` is set, the - // behavior will default to `stats_for_all_methods=true`. This default value is deprecated, - // and in a future release, if neither field is set, it will default to - // `stats_for_all_methods=false` in order to be safe by default. This behavior can be - // controlled with runtime override + // behavior will default to `stats_for_all_methods=false`. This default value is changed due + // to the previous value being deprecated. This behavior can be changed with runtime override // `envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default`. StatsForAllMethods *wrappers.BoolValue `protobuf:"bytes,3,opt,name=stats_for_all_methods,json=statsForAllMethods,proto3,oneof"` } @@ -217,42 +209,46 @@ var file_envoy_config_filter_http_grpc_stats_v2alpha_config_proto_rawDesc = []by 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x02, 0x0a, 0x0c, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6d, - 0x69, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x6e, 0x0a, 0x21, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, - 0x64, 0x75, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1e, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, - 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x41, 0x6c, 0x6c, - 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, - 0x66, 0x6f, 0x72, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x42, 0x1b, 0x0a, 0x19, 0x70, 0x65, 0x72, 0x5f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x85, - 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x98, 0x02, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, + 0x69, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x6e, 0x0a, + 0x21, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, + 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1e, 0x69, + 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x4f, 0x0a, + 0x15, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x42, 0x1b, + 0x0a, 0x19, 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x0c, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x34, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0xd9, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.validate.go b/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.validate.go index d9b39b4dd6..caad314261 100644 --- a/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/grpc_stats/v2alpha/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/grpc_stats/v2alpha/config.proto -package envoy_config_filter_http_grpc_stats_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,58 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for EmitFilterState switch m.PerMethodStatSpecifier.(type) { case *FilterConfig_IndividualMethodStatsAllowlist: - if v, ok := interface{}(m.GetIndividualMethodStatsAllowlist()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIndividualMethodStatsAllowlist()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "IndividualMethodStatsAllowlist", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "IndividualMethodStatsAllowlist", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIndividualMethodStatsAllowlist()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterConfigValidationError{ field: "IndividualMethodStatsAllowlist", @@ -59,7 +94,26 @@ func (m *FilterConfig) Validate() error { case *FilterConfig_StatsForAllMethods: - if v, ok := interface{}(m.GetStatsForAllMethods()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsForAllMethods()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "StatsForAllMethods", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "StatsForAllMethods", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsForAllMethods()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterConfigValidationError{ field: "StatsForAllMethods", @@ -71,9 +125,29 @@ func (m *FilterConfig) Validate() error { } + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil } +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + // FilterConfigValidationError is the validation error returned by // FilterConfig.Validate if the designated constraints aren't met. type FilterConfigValidationError struct { @@ -129,20 +203,54 @@ var _ interface { } = FilterConfigValidationError{} // Validate checks the field values on FilterObject with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterObject) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterObject with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterObjectMultiError, or +// nil if none found. +func (m *FilterObject) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterObject) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for RequestMessageCount // no validation rules for ResponseMessageCount + if len(errors) > 0 { + return FilterObjectMultiError(errors) + } + return nil } +// FilterObjectMultiError is an error wrapping multiple validation errors +// returned by FilterObject.ValidateAll() if the designated constraints aren't met. +type FilterObjectMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterObjectMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterObjectMultiError) AllErrors() []error { return m } + // FilterObjectValidationError is the validation error returned by // FilterObject.Validate if the designated constraints aren't met. type FilterObjectValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.go b/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.go index 5d8c16d974..3d5970d594 100644 --- a/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.go +++ b/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/grpc_web/v2/grpc_web.proto -package envoy_config_filter_http_grpc_web_v2 +package grpc_webv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC Web filter config. type GrpcWeb struct { state protoimpl.MessageState @@ -78,15 +73,21 @@ var file_envoy_config_filter_http_grpc_web_v2_grpc_web_proto_rawDesc = []byte{ 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x09, 0x0a, 0x07, 0x47, 0x72, - 0x70, 0x63, 0x57, 0x65, 0x62, 0x42, 0x7d, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x47, 0x72, 0x70, - 0x63, 0x57, 0x65, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x63, 0x57, 0x65, 0x62, 0x42, 0xd5, 0x01, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x47, 0x72, + 0x70, 0x63, 0x57, 0x65, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2f, 0x76, 0x32, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, + 0x65, 0x62, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, + 0x65, 0x62, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.validate.go b/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.validate.go index b14b0bf779..57d0c531ae 100644 --- a/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/grpc_web/v2/grpc_web.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/grpc_web/v2/grpc_web.proto -package envoy_config_filter_http_grpc_web_v2 +package grpc_webv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcWeb with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcWeb) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcWeb with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in GrpcWebMultiError, or nil if none found. +func (m *GrpcWeb) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcWeb) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return GrpcWebMultiError(errors) + } + return nil } +// GrpcWebMultiError is an error wrapping multiple validation errors returned +// by GrpcWeb.ValidateAll() if the designated constraints aren't met. +type GrpcWebMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcWebMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcWebMultiError) AllErrors() []error { return m } + // GrpcWebValidationError is the validation error returned by GrpcWeb.Validate // if the designated constraints aren't met. type GrpcWebValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.go b/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.go index e38c5d5459..a6b0274e8d 100644 --- a/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.go +++ b/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/gzip/v2/gzip.proto -package envoy_config_filter_http_gzip_v2 +package gzipv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/http/compressor/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Gzip_CompressionStrategy int32 const ( @@ -405,15 +400,20 @@ var file_envoy_config_filter_http_gzip_v2_gzip_proto_rawDesc = []byte{ 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x07, - 0x0a, 0x03, 0x52, 0x4c, 0x45, 0x10, 0x03, 0x42, 0x72, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, 0x25, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, - 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x0a, 0x03, 0x52, 0x4c, 0x45, 0x10, 0x03, 0x42, 0xc2, 0x01, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2f, 0x76, 0x32, + 0x3b, 0x67, 0x7a, 0x69, 0x70, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, 0x25, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, + 0x70, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.validate.go b/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.validate.go index 616d47b7c5..5fa551c503 100644 --- a/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/gzip/v2/gzip.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/gzip/v2/gzip.proto -package envoy_config_filter_http_gzip_v2 +package gzipv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Gzip with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Gzip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in GzipMultiError, or nil if none found. +func (m *Gzip) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMemoryLevel(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 9 { - return GzipValidationError{ + err := GzipValidationError{ field: "MemoryLevel", reason: "value must be inside range [1, 9]", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetContentLength()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetContentLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GzipValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GzipValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetContentLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GzipValidationError{ field: "ContentLength", @@ -62,17 +101,25 @@ func (m *Gzip) Validate() error { } if _, ok := Gzip_CompressionLevel_Enum_name[int32(m.GetCompressionLevel())]; !ok { - return GzipValidationError{ + err := GzipValidationError{ field: "CompressionLevel", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := Gzip_CompressionStrategy_name[int32(m.GetCompressionStrategy())]; !ok { - return GzipValidationError{ + err := GzipValidationError{ field: "CompressionStrategy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DisableOnEtagHeader @@ -82,15 +129,38 @@ func (m *Gzip) Validate() error { if wrapper := m.GetWindowBits(); wrapper != nil { if val := wrapper.GetValue(); val < 9 || val > 15 { - return GzipValidationError{ + err := GzipValidationError{ field: "WindowBits", reason: "value must be inside range [9, 15]", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetCompressor()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCompressor()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GzipValidationError{ + field: "Compressor", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GzipValidationError{ + field: "Compressor", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompressor()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GzipValidationError{ field: "Compressor", @@ -100,9 +170,29 @@ func (m *Gzip) Validate() error { } } + if len(errors) > 0 { + return GzipMultiError(errors) + } + return nil } +// GzipMultiError is an error wrapping multiple validation errors returned by +// Gzip.ValidateAll() if the designated constraints aren't met. +type GzipMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GzipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GzipMultiError) AllErrors() []error { return m } + // GzipValidationError is the validation error returned by Gzip.Validate if the // designated constraints aren't met. type GzipValidationError struct { @@ -159,15 +249,50 @@ var _ interface { // Validate checks the field values on Gzip_CompressionLevel with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Gzip_CompressionLevel) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip_CompressionLevel with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Gzip_CompressionLevelMultiError, or nil if none found. +func (m *Gzip_CompressionLevel) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip_CompressionLevel) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Gzip_CompressionLevelMultiError(errors) + } + return nil } +// Gzip_CompressionLevelMultiError is an error wrapping multiple validation +// errors returned by Gzip_CompressionLevel.ValidateAll() if the designated +// constraints aren't met. +type Gzip_CompressionLevelMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Gzip_CompressionLevelMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Gzip_CompressionLevelMultiError) AllErrors() []error { return m } + // Gzip_CompressionLevelValidationError is the validation error returned by // Gzip_CompressionLevel.Validate if the designated constraints aren't met. type Gzip_CompressionLevelValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.go b/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.go index c6a1dd4c5c..70bce3f2df 100644 --- a/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.go +++ b/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto -package envoy_config_filter_http_header_to_metadata_v2 +package header_to_metadatav2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Config_ValueType int32 const ( @@ -433,18 +428,24 @@ var file_envoy_config_filter_http_header_to_metadata_v2_header_to_metadata_proto 0x45, 0x52, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x22, 0x23, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x53, 0x45, 0x36, 0x34, 0x10, 0x01, 0x42, 0x9a, 0x01, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x53, 0x45, 0x36, 0x34, 0x10, 0x01, 0x42, 0x86, 0x02, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x15, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x3b, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go b/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go index 27fae17807..d5d1315f99 100644 --- a/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto -package envoy_config_filter_http_header_to_metadata_v2 +package header_to_metadatav2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetRequestRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigValidationError{ field: fmt.Sprintf("RequestRules[%v]", idx), @@ -58,7 +93,26 @@ func (m *Config) Validate() error { for idx, item := range m.GetResponseRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("ResponseRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("ResponseRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigValidationError{ field: fmt.Sprintf("ResponseRules[%v]", idx), @@ -70,9 +124,29 @@ func (m *Config) Validate() error { } + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { @@ -129,19 +203,37 @@ var _ interface { // Validate checks the field values on Config_KeyValuePair with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Config_KeyValuePair) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config_KeyValuePair with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Config_KeyValuePairMultiError, or nil if none found. +func (m *Config_KeyValuePair) ValidateAll() error { + return m.validate(true) +} + +func (m *Config_KeyValuePair) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for MetadataNamespace if len(m.GetKey()) < 1 { - return Config_KeyValuePairValidationError{ + err := Config_KeyValuePairValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Value @@ -150,9 +242,30 @@ func (m *Config_KeyValuePair) Validate() error { // no validation rules for Encode + if len(errors) > 0 { + return Config_KeyValuePairMultiError(errors) + } + return nil } +// Config_KeyValuePairMultiError is an error wrapping multiple validation +// errors returned by Config_KeyValuePair.ValidateAll() if the designated +// constraints aren't met. +type Config_KeyValuePairMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Config_KeyValuePairMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Config_KeyValuePairMultiError) AllErrors() []error { return m } + // Config_KeyValuePairValidationError is the validation error returned by // Config_KeyValuePair.Validate if the designated constraints aren't met. type Config_KeyValuePairValidationError struct { @@ -210,28 +323,69 @@ var _ interface { } = Config_KeyValuePairValidationError{} // Validate checks the field values on Config_Rule with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config_Rule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config_Rule with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Config_RuleMultiError, or +// nil if none found. +func (m *Config_Rule) ValidateAll() error { + return m.validate(true) +} + +func (m *Config_Rule) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetHeader()) < 1 { - return Config_RuleValidationError{ + err := Config_RuleValidationError{ field: "Header", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_Config_Rule_Header_Pattern.MatchString(m.GetHeader()) { - return Config_RuleValidationError{ + err := Config_RuleValidationError{ field: "Header", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetOnHeaderPresent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOnHeaderPresent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnHeaderPresent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderPresent", @@ -241,7 +395,26 @@ func (m *Config_Rule) Validate() error { } } - if v, ok := interface{}(m.GetOnHeaderMissing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOnHeaderMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnHeaderMissing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderMissing", @@ -253,9 +426,29 @@ func (m *Config_Rule) Validate() error { // no validation rules for Remove + if len(errors) > 0 { + return Config_RuleMultiError(errors) + } + return nil } +// Config_RuleMultiError is an error wrapping multiple validation errors +// returned by Config_Rule.ValidateAll() if the designated constraints aren't met. +type Config_RuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Config_RuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Config_RuleMultiError) AllErrors() []error { return m } + // Config_RuleValidationError is the validation error returned by // Config_Rule.Validate if the designated constraints aren't met. type Config_RuleValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.go b/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.go index 7b66e961b2..5d9fc19a16 100644 --- a/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.go +++ b/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/health_check/v2/health_check.proto -package envoy_config_filter_http_health_check_v2 +package health_checkv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type HealthCheck struct { state protoimpl.MessageState @@ -170,12 +165,18 @@ var file_envoy_config_filter_http_health_check_v2_health_check_proto_rawDesc = [ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x42, 0x89, 0x01, 0x0a, 0x36, 0x69, + 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x42, 0xe9, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x76, 0x32, 0x3b, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x76, 0x33, 0xba, 0x80, diff --git a/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.validate.go b/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.validate.go index fa1a09f96a..a6ea215a4a 100644 --- a/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/health_check/v2/health_check.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/health_check/v2/health_check.proto -package envoy_config_filter_http_health_check_v2 +package health_checkv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HealthCheckMultiError, or +// nil if none found. +func (m *HealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetPassThroughMode() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "PassThroughMode", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPassThroughMode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPassThroughMode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "PassThroughMode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "PassThroughMode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPassThroughMode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "PassThroughMode", @@ -58,7 +97,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetCacheTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCacheTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CacheTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CacheTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "CacheTime", @@ -68,27 +126,75 @@ func (m *HealthCheck) Validate() error { } } - for key, val := range m.GetClusterMinHealthyPercentages() { - _ = val + { + sorted_keys := make([]string, len(m.GetClusterMinHealthyPercentages())) + i := 0 + for key := range m.GetClusterMinHealthyPercentages() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetClusterMinHealthyPercentages()[key] + _ = val - // no validation rules for ClusterMinHealthyPercentages[key] + // no validation rules for ClusterMinHealthyPercentages[key] - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + 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 all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -100,9 +206,29 @@ func (m *HealthCheck) Validate() error { } + if len(errors) > 0 { + return HealthCheckMultiError(errors) + } + return nil } +// HealthCheckMultiError is an error wrapping multiple validation errors +// returned by HealthCheck.ValidateAll() if the designated constraints aren't met. +type HealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckMultiError) AllErrors() []error { return m } + // HealthCheckValidationError is the validation error returned by // HealthCheck.Validate if the designated constraints aren't met. type HealthCheckValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.go b/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.go index 652d22ce43..e9850abb97 100644 --- a/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.go +++ b/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto -package envoy_config_filter_http_ip_tagging_v2 +package ip_taggingv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The type of requests the filter should apply to. The supported types // are internal, external or both. The // :ref:`x-forwarded-for` header is @@ -243,16 +238,21 @@ var file_envoy_config_filter_http_ip_tagging_v2_ip_tagging_proto_rawDesc = []byt 0x22, 0x33, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, - 0x4e, 0x41, 0x4c, 0x10, 0x02, 0x42, 0x83, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x4e, 0x41, 0x4c, 0x10, 0x02, 0x42, 0xdf, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x49, 0x70, 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x3b, + 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go b/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go index 8d92e69522..d0663de5d1 100644 --- a/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto -package envoy_config_filter_http_ip_tagging_v2 +package ip_taggingv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on IPTagging with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *IPTagging) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IPTagging with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in IPTaggingMultiError, or nil +// if none found. +func (m *IPTagging) ValidateAll() error { + return m.validate(true) +} + +func (m *IPTagging) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := IPTagging_RequestType_name[int32(m.GetRequestType())]; !ok { - return IPTaggingValidationError{ + err := IPTaggingValidationError{ field: "RequestType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetIpTags()) < 1 { - return IPTaggingValidationError{ + err := IPTaggingValidationError{ field: "IpTags", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetIpTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IPTaggingValidationError{ + field: fmt.Sprintf("IpTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IPTaggingValidationError{ + field: fmt.Sprintf("IpTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTaggingValidationError{ field: fmt.Sprintf("IpTags[%v]", idx), @@ -69,9 +113,29 @@ func (m *IPTagging) Validate() error { } + if len(errors) > 0 { + return IPTaggingMultiError(errors) + } + return nil } +// IPTaggingMultiError is an error wrapping multiple validation errors returned +// by IPTagging.ValidateAll() if the designated constraints aren't met. +type IPTaggingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IPTaggingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IPTaggingMultiError) AllErrors() []error { return m } + // IPTaggingValidationError is the validation error returned by // IPTagging.Validate if the designated constraints aren't met. type IPTaggingValidationError struct { @@ -127,19 +191,52 @@ var _ interface { } = IPTaggingValidationError{} // Validate checks the field values on IPTagging_IPTag with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *IPTagging_IPTag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IPTagging_IPTag with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// IPTagging_IPTagMultiError, or nil if none found. +func (m *IPTagging_IPTag) ValidateAll() error { + return m.validate(true) +} + +func (m *IPTagging_IPTag) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for IpTagName for idx, item := range m.GetIpList() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IPTagging_IPTagValidationError{ + field: fmt.Sprintf("IpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IPTagging_IPTagValidationError{ + field: fmt.Sprintf("IpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTagging_IPTagValidationError{ field: fmt.Sprintf("IpList[%v]", idx), @@ -151,9 +248,30 @@ func (m *IPTagging_IPTag) Validate() error { } + if len(errors) > 0 { + return IPTagging_IPTagMultiError(errors) + } + return nil } +// IPTagging_IPTagMultiError is an error wrapping multiple validation errors +// returned by IPTagging_IPTag.ValidateAll() if the designated constraints +// aren't met. +type IPTagging_IPTagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IPTagging_IPTagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IPTagging_IPTagMultiError) AllErrors() []error { return m } + // IPTagging_IPTagValidationError is the validation error returned by // IPTagging_IPTag.Validate if the designated constraints aren't met. type IPTagging_IPTagValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.go b/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.go index 6a6355d296..0b7a855c3f 100644 --- a/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.go +++ b/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/jwt_authn/v2alpha/config.proto -package envoy_config_filter_http_jwt_authn_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Please see following for JWT authentication flow: // // * `JSON Web Token (JWT) `_ @@ -1316,16 +1311,21 @@ var file_envoy_config_filter_http_jwt_authn_v2alpha_config_proto_rawDesc = []byt 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x83, 0x01, + 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd6, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2c, 0x12, - 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, - 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6a, 0x77, 0x74, 0x5f, 0x61, + 0x75, 0x74, 0x68, 0x6e, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go b/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go index 34f5eca2a0..c538f01c09 100644 --- a/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/jwt_authn/v2alpha/config.proto -package envoy_config_filter_http_jwt_authn_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,41 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on JwtProvider with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *JwtProvider) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtProvider with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwtProviderMultiError, or +// nil if none found. +func (m *JwtProvider) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtProvider) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetIssuer()) < 1 { - return JwtProviderValidationError{ + err := JwtProviderValidationError{ field: "Issuer", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Forward @@ -53,7 +73,26 @@ func (m *JwtProvider) Validate() error { for idx, item := range m.GetFromHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: fmt.Sprintf("FromHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: fmt.Sprintf("FromHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: fmt.Sprintf("FromHeaders[%v]", idx), @@ -73,7 +112,26 @@ func (m *JwtProvider) Validate() error { case *JwtProvider_RemoteJwks: - if v, ok := interface{}(m.GetRemoteJwks()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteJwks()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "RemoteJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "RemoteJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteJwks()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: "RemoteJwks", @@ -85,7 +143,26 @@ func (m *JwtProvider) Validate() error { case *JwtProvider_LocalJwks: - if v, ok := interface{}(m.GetLocalJwks()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalJwks()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "LocalJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "LocalJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalJwks()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: "LocalJwks", @@ -96,16 +173,40 @@ func (m *JwtProvider) Validate() error { } default: - return JwtProviderValidationError{ + err := JwtProviderValidationError{ field: "JwksSourceSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return JwtProviderMultiError(errors) } return nil } +// JwtProviderMultiError is an error wrapping multiple validation errors +// returned by JwtProvider.ValidateAll() if the designated constraints aren't met. +type JwtProviderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtProviderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtProviderMultiError) AllErrors() []error { return m } + // JwtProviderValidationError is the validation error returned by // JwtProvider.Validate if the designated constraints aren't met. type JwtProviderValidationError struct { @@ -161,13 +262,47 @@ var _ interface { } = JwtProviderValidationError{} // Validate checks the field values on RemoteJwks with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RemoteJwks) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoteJwks with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RemoteJwksMultiError, or +// nil if none found. +func (m *RemoteJwks) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoteJwks) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttpUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "HttpUri", @@ -177,7 +312,26 @@ func (m *RemoteJwks) Validate() error { } } - if v, ok := interface{}(m.GetCacheDuration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCacheDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "CacheDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "CacheDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "CacheDuration", @@ -187,9 +341,29 @@ func (m *RemoteJwks) Validate() error { } } + if len(errors) > 0 { + return RemoteJwksMultiError(errors) + } + return nil } +// RemoteJwksMultiError is an error wrapping multiple validation errors +// returned by RemoteJwks.ValidateAll() if the designated constraints aren't met. +type RemoteJwksMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoteJwksMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoteJwksMultiError) AllErrors() []error { return m } + // RemoteJwksValidationError is the validation error returned by // RemoteJwks.Validate if the designated constraints aren't met. type RemoteJwksValidationError struct { @@ -245,24 +419,63 @@ var _ interface { } = RemoteJwksValidationError{} // Validate checks the field values on JwtHeader with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *JwtHeader) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtHeader with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwtHeaderMultiError, or nil +// if none found. +func (m *JwtHeader) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtHeader) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return JwtHeaderValidationError{ + err := JwtHeaderValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ValuePrefix + if len(errors) > 0 { + return JwtHeaderMultiError(errors) + } + return nil } +// JwtHeaderMultiError is an error wrapping multiple validation errors returned +// by JwtHeader.ValidateAll() if the designated constraints aren't met. +type JwtHeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtHeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtHeaderMultiError) AllErrors() []error { return m } + // JwtHeaderValidationError is the validation error returned by // JwtHeader.Validate if the designated constraints aren't met. type JwtHeaderValidationError struct { @@ -319,17 +532,52 @@ var _ interface { // Validate checks the field values on ProviderWithAudiences with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ProviderWithAudiences) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProviderWithAudiences with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProviderWithAudiencesMultiError, or nil if none found. +func (m *ProviderWithAudiences) ValidateAll() error { + return m.validate(true) +} + +func (m *ProviderWithAudiences) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ProviderName + if len(errors) > 0 { + return ProviderWithAudiencesMultiError(errors) + } + return nil } +// ProviderWithAudiencesMultiError is an error wrapping multiple validation +// errors returned by ProviderWithAudiences.ValidateAll() if the designated +// constraints aren't met. +type ProviderWithAudiencesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProviderWithAudiencesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProviderWithAudiencesMultiError) AllErrors() []error { return m } + // ProviderWithAudiencesValidationError is the validation error returned by // ProviderWithAudiences.Validate if the designated constraints aren't met. type ProviderWithAudiencesValidationError struct { @@ -387,13 +635,27 @@ var _ interface { } = ProviderWithAudiencesValidationError{} // Validate checks the field values on JwtRequirement with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *JwtRequirement) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirement with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwtRequirementMultiError, +// or nil if none found. +func (m *JwtRequirement) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirement) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.RequiresType.(type) { case *JwtRequirement_ProviderName: @@ -401,7 +663,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_ProviderAndAudiences: - if v, ok := interface{}(m.GetProviderAndAudiences()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProviderAndAudiences()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "ProviderAndAudiences", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "ProviderAndAudiences", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProviderAndAudiences()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "ProviderAndAudiences", @@ -413,7 +694,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_RequiresAny: - if v, ok := interface{}(m.GetRequiresAny()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequiresAny()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAny", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAny", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequiresAny()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAny", @@ -425,7 +725,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_RequiresAll: - if v, ok := interface{}(m.GetRequiresAll()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequiresAll()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAll", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAll", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequiresAll()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAll", @@ -437,7 +756,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_AllowMissingOrFailed: - if v, ok := interface{}(m.GetAllowMissingOrFailed()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowMissingOrFailed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissingOrFailed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissingOrFailed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowMissingOrFailed()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "AllowMissingOrFailed", @@ -449,7 +787,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_AllowMissing: - if v, ok := interface{}(m.GetAllowMissing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowMissing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "AllowMissing", @@ -461,9 +818,30 @@ func (m *JwtRequirement) Validate() error { } + if len(errors) > 0 { + return JwtRequirementMultiError(errors) + } + return nil } +// JwtRequirementMultiError is an error wrapping multiple validation errors +// returned by JwtRequirement.ValidateAll() if the designated constraints +// aren't met. +type JwtRequirementMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementMultiError) AllErrors() []error { return m } + // JwtRequirementValidationError is the validation error returned by // JwtRequirement.Validate if the designated constraints aren't met. type JwtRequirementValidationError struct { @@ -520,23 +898,60 @@ var _ interface { // Validate checks the field values on JwtRequirementOrList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *JwtRequirementOrList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirementOrList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// JwtRequirementOrListMultiError, or nil if none found. +func (m *JwtRequirementOrList) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirementOrList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRequirements()) < 2 { - return JwtRequirementOrListValidationError{ + err := JwtRequirementOrListValidationError{ field: "Requirements", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequirements() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementOrListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementOrListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementOrListValidationError{ field: fmt.Sprintf("Requirements[%v]", idx), @@ -548,9 +963,30 @@ func (m *JwtRequirementOrList) Validate() error { } + if len(errors) > 0 { + return JwtRequirementOrListMultiError(errors) + } + return nil } +// JwtRequirementOrListMultiError is an error wrapping multiple validation +// errors returned by JwtRequirementOrList.ValidateAll() if the designated +// constraints aren't met. +type JwtRequirementOrListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementOrListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementOrListMultiError) AllErrors() []error { return m } + // JwtRequirementOrListValidationError is the validation error returned by // JwtRequirementOrList.Validate if the designated constraints aren't met. type JwtRequirementOrListValidationError struct { @@ -609,23 +1045,60 @@ var _ interface { // Validate checks the field values on JwtRequirementAndList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *JwtRequirementAndList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirementAndList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// JwtRequirementAndListMultiError, or nil if none found. +func (m *JwtRequirementAndList) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirementAndList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRequirements()) < 2 { - return JwtRequirementAndListValidationError{ + err := JwtRequirementAndListValidationError{ field: "Requirements", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequirements() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementAndListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementAndListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementAndListValidationError{ field: fmt.Sprintf("Requirements[%v]", idx), @@ -637,9 +1110,30 @@ func (m *JwtRequirementAndList) Validate() error { } + if len(errors) > 0 { + return JwtRequirementAndListMultiError(errors) + } + return nil } +// JwtRequirementAndListMultiError is an error wrapping multiple validation +// errors returned by JwtRequirementAndList.ValidateAll() if the designated +// constraints aren't met. +type JwtRequirementAndListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementAndListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementAndListMultiError) AllErrors() []error { return m } + // JwtRequirementAndListValidationError is the validation error returned by // JwtRequirementAndList.Validate if the designated constraints aren't met. type JwtRequirementAndListValidationError struct { @@ -697,21 +1191,58 @@ var _ interface { } = JwtRequirementAndListValidationError{} // Validate checks the field values on RequirementRule with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RequirementRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RequirementRule with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RequirementRuleMultiError, or nil if none found. +func (m *RequirementRule) ValidateAll() error { + return m.validate(true) +} + +func (m *RequirementRule) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatch() == nil { - return RequirementRuleValidationError{ + err := RequirementRuleValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Match", @@ -721,7 +1252,26 @@ func (m *RequirementRule) Validate() error { } } - if v, ok := interface{}(m.GetRequires()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequires()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Requires", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Requires", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequires()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Requires", @@ -731,9 +1281,30 @@ func (m *RequirementRule) Validate() error { } } + if len(errors) > 0 { + return RequirementRuleMultiError(errors) + } + return nil } +// RequirementRuleMultiError is an error wrapping multiple validation errors +// returned by RequirementRule.ValidateAll() if the designated constraints +// aren't met. +type RequirementRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RequirementRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RequirementRuleMultiError) AllErrors() []error { return m } + // RequirementRuleValidationError is the validation error returned by // RequirementRule.Validate if the designated constraints aren't met. type RequirementRuleValidationError struct { @@ -789,40 +1360,108 @@ var _ interface { } = RequirementRuleValidationError{} // Validate checks the field values on FilterStateRule with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *FilterStateRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterStateRule with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FilterStateRuleMultiError, or nil if none found. +func (m *FilterStateRule) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterStateRule) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return FilterStateRuleValidationError{ + err := FilterStateRuleValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - for key, val := range m.GetRequires() { - _ = val - - // no validation rules for Requires[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterStateRuleValidationError{ - field: fmt.Sprintf("Requires[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetRequires())) + i := 0 + for key := range m.GetRequires() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetRequires()[key] + _ = val + + // no validation rules for Requires[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return FilterStateRuleMultiError(errors) } return nil } +// FilterStateRuleMultiError is an error wrapping multiple validation errors +// returned by FilterStateRule.ValidateAll() if the designated constraints +// aren't met. +type FilterStateRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterStateRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterStateRuleMultiError) AllErrors() []error { return m } + // FilterStateRuleValidationError is the validation error returned by // FilterStateRule.Validate if the designated constraints aren't met. type FilterStateRuleValidationError struct { @@ -878,34 +1517,96 @@ var _ interface { } = FilterStateRuleValidationError{} // Validate checks the field values on JwtAuthentication with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *JwtAuthentication) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtAuthentication with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// JwtAuthenticationMultiError, or nil if none found. +func (m *JwtAuthentication) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtAuthentication) validate(all bool) error { if m == nil { return nil } - for key, val := range m.GetProviders() { - _ = val + var errors []error - // no validation rules for Providers[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtAuthenticationValidationError{ - field: fmt.Sprintf("Providers[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetProviders())) + i := 0 + for key := range m.GetProviders() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetProviders()[key] + _ = val + + // no validation rules for Providers[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } - } + } } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -917,7 +1618,26 @@ func (m *JwtAuthentication) Validate() error { } - if v, ok := interface{}(m.GetFilterStateRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterStateRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: "FilterStateRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: "FilterStateRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterStateRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: "FilterStateRules", @@ -929,9 +1649,30 @@ func (m *JwtAuthentication) Validate() error { // no validation rules for BypassCorsPreflight + if len(errors) > 0 { + return JwtAuthenticationMultiError(errors) + } + return nil } +// JwtAuthenticationMultiError is an error wrapping multiple validation errors +// returned by JwtAuthentication.ValidateAll() if the designated constraints +// aren't met. +type JwtAuthenticationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtAuthenticationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtAuthenticationMultiError) AllErrors() []error { return m } + // JwtAuthenticationValidationError is the validation error returned by // JwtAuthentication.Validate if the designated constraints aren't met. type JwtAuthenticationValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.go b/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.go index 6e66efa5b7..c1bf37160e 100644 --- a/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.go +++ b/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/lua/v2/lua.proto -package envoy_config_filter_http_lua_v2 +package luav2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Lua struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -94,14 +89,19 @@ var file_envoy_config_filter_http_lua_v2_lua_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x03, 0x4c, 0x75, 0x61, 0x12, 0x28, 0x0a, 0x0b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x6c, 0x69, 0x6e, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x6f, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x4c, 0x75, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x26, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0xbd, 0x01, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x4c, 0x75, 0x61, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6c, 0x75, 0x61, 0x2f, 0x76, 0x32, 0x3b, 0x6c, 0x75, 0x61, 0x76, + 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x26, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.validate.go b/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.validate.go index b7e10434df..36e7d534a5 100644 --- a/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/lua/v2/lua.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/lua/v2/lua.proto -package envoy_config_filter_http_lua_v2 +package luav2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Lua with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Lua) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Lua with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in LuaMultiError, or nil if none found. +func (m *Lua) ValidateAll() error { + return m.validate(true) +} + +func (m *Lua) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetInlineCode()) < 1 { - return LuaValidationError{ + err := LuaValidationError{ field: "InlineCode", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return LuaMultiError(errors) } return nil } +// LuaMultiError is an error wrapping multiple validation errors returned by +// Lua.ValidateAll() if the designated constraints aren't met. +type LuaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LuaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LuaMultiError) AllErrors() []error { return m } + // LuaValidationError is the validation error returned by Lua.Validate if the // designated constraints aren't met. type LuaValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.go b/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.go index 185c0e96d0..de77685a6e 100644 --- a/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.go +++ b/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/on_demand/v2/on_demand.proto -package envoy_config_filter_http_on_demand_v2 +package on_demandv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OnDemand struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -77,18 +71,22 @@ var file_envoy_config_filter_http_on_demand_v2_on_demand_proto_rawDesc = []byte{ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, 0x08, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, - 0x6e, 0x64, 0x42, 0x80, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, - 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x4f, 0x6e, 0x44, 0x65, - 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, + 0x08, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0xda, 0x01, 0x0a, 0x33, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, + 0x32, 0x42, 0x0d, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2f, 0x76, 0x32, + 0x3b, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.validate.go b/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.validate.go index a002cfff33..ad47f49b98 100644 --- a/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/on_demand/v2/on_demand.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/on_demand/v2/on_demand.proto -package envoy_config_filter_http_on_demand_v2 +package on_demandv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OnDemand with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OnDemand) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OnDemand with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OnDemandMultiError, or nil +// if none found. +func (m *OnDemand) ValidateAll() error { + return m.validate(true) +} + +func (m *OnDemand) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return OnDemandMultiError(errors) + } + return nil } +// OnDemandMultiError is an error wrapping multiple validation errors returned +// by OnDemand.ValidateAll() if the designated constraints aren't met. +type OnDemandMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OnDemandMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OnDemandMultiError) AllErrors() []error { return m } + // OnDemandValidationError is the validation error returned by // OnDemand.Validate if the designated constraints aren't met. type OnDemandValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.go b/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.go index 07bf7e983d..8de093e8c8 100644 --- a/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.go +++ b/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/original_src/v2alpha1/original_src.proto -package envoy_config_filter_http_original_src_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The Original Src filter binds upstream connections to the original source address determined // for the request. This address could come from something like the Proxy Protocol filter, or it // could come from trusted http headers. @@ -95,20 +89,24 @@ var file_envoy_config_filter_http_original_src_v2alpha1_original_src_proto_rawDe 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x21, 0x0a, 0x0b, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, - 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x8f, - 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, - 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x22, 0x21, 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, + 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0xe6, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, + 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.validate.go b/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.validate.go index 2562ca3ef9..65c296e651 100644 --- a/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/original_src/v2alpha1/original_src.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/original_src/v2alpha1/original_src.proto -package envoy_config_filter_http_original_src_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OriginalSrc with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OriginalSrc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalSrc with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OriginalSrcMultiError, or +// nil if none found. +func (m *OriginalSrc) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalSrc) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Mark + if len(errors) > 0 { + return OriginalSrcMultiError(errors) + } + return nil } +// OriginalSrcMultiError is an error wrapping multiple validation errors +// returned by OriginalSrc.ValidateAll() if the designated constraints aren't met. +type OriginalSrcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalSrcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalSrcMultiError) AllErrors() []error { return m } + // OriginalSrcValidationError is the validation error returned by // OriginalSrc.Validate if the designated constraints aren't met. type OriginalSrcValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.go b/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.go index fb6053a9d6..5187beedf9 100644 --- a/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.go +++ b/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/rate_limit/v2/rate_limit.proto -package envoy_config_filter_http_rate_limit_v2 +package rate_limitv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 8] type RateLimit struct { state protoimpl.MessageState @@ -195,16 +190,22 @@ var file_envoy_config_filter_http_rate_limit_v2_rate_limit_proto_rawDesc = []byt 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x82, 0x01, 0x0a, 0x34, 0x69, + 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0xde, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, + 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.validate.go b/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.validate.go index c53952d6dd..61bf8d469e 100644 --- a/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/rate_limit/v2/rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/rate_limit/v2/rate_limit.proto -package envoy_config_filter_http_rate_limit_v2 +package rate_limitv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,38 +31,85 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetDomain()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Domain", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetStage() > 10 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Stage", reason: "value must be less than or equal to 10", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := _RateLimit_RequestType_InLookup[m.GetRequestType()]; !ok { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RequestType", reason: "value must be in list [internal external both ]", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "Timeout", @@ -76,13 +124,36 @@ func (m *RateLimit) Validate() error { // no validation rules for RateLimitedAsResourceExhausted if m.GetRateLimitService() == nil { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RateLimitService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "RateLimitService", @@ -92,9 +163,29 @@ func (m *RateLimit) Validate() error { } } + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.go b/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.go index 7632bd2928..90edb89e92 100644 --- a/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.go +++ b/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/rbac/v2/rbac.proto -package envoy_config_filter_http_rbac_v2 +package rbacv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/rbac/v2" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // RBAC filter config. type RBAC struct { state protoimpl.MessageState @@ -151,29 +145,33 @@ var file_envoy_config_filter_http_rbac_v2_rbac_proto_rawDesc = []byte{ 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, - 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x77, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, + 0x41, 0x43, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x68, 0x61, + 0x64, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x05, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x42, 0x41, 0x43, 0x52, 0x0b, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x22, 0x50, 0x0a, 0x0c, 0x52, 0x42, 0x41, 0x43, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x72, 0x62, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x04, 0x72, 0x62, 0x61, 0x63, 0x4a, 0x04, 0x08, - 0x01, 0x10, 0x02, 0x42, 0x72, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, - 0x61, 0x63, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x0b, 0x73, 0x68, 0x61, + 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x0c, 0x52, 0x42, 0x41, 0x43, + 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x72, 0x62, 0x61, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x04, + 0x72, 0x62, 0x61, 0x63, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0xc2, 0x01, 0x0a, 0x2e, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x52, + 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x62, 0x61, 0x63, + 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x62, 0x61, 0x63, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, + 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.validate.go b/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.validate.go index 3e8bbc31ba..3d7e7be60b 100644 --- a/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/rbac/v2/rbac.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/rbac/v2/rbac.proto -package envoy_config_filter_http_rbac_v2 +package rbacv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "Rules", @@ -50,7 +85,26 @@ func (m *RBAC) Validate() error { } } - if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "ShadowRules", @@ -60,9 +114,29 @@ func (m *RBAC) Validate() error { } } + if len(errors) > 0 { + return RBACMultiError(errors) + } + return nil } +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + // RBACValidationError is the validation error returned by RBAC.Validate if the // designated constraints aren't met. type RBACValidationError struct { @@ -118,14 +192,47 @@ var _ interface { } = RBACValidationError{} // Validate checks the field values on RBACPerRoute with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RBACPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBACPerRoute with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RBACPerRouteMultiError, or +// nil if none found. +func (m *RBACPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *RBACPerRoute) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRbac()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRbac()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACPerRouteValidationError{ + field: "Rbac", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACPerRouteValidationError{ + field: "Rbac", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRbac()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACPerRouteValidationError{ field: "Rbac", @@ -135,9 +242,29 @@ func (m *RBACPerRoute) Validate() error { } } + if len(errors) > 0 { + return RBACPerRouteMultiError(errors) + } + return nil } +// RBACPerRouteMultiError is an error wrapping multiple validation errors +// returned by RBACPerRoute.ValidateAll() if the designated constraints aren't met. +type RBACPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACPerRouteMultiError) AllErrors() []error { return m } + // RBACPerRouteValidationError is the validation error returned by // RBACPerRoute.Validate if the designated constraints aren't met. type RBACPerRouteValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/router/v2/router.pb.go b/pkg/api/envoy/config/filter/http/router/v2/router.pb.go index 016f0c1622..44ce8b9158 100644 --- a/pkg/api/envoy/config/filter/http/router/v2/router.pb.go +++ b/pkg/api/envoy/config/filter/http/router/v2/router.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/router/v2/router.proto -package envoy_config_filter_http_router_v2 +package routerv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/accesslog/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 7] type Router struct { state protoimpl.MessageState @@ -201,15 +196,20 @@ var file_envoy_config_filter_http_router_v2_router_proto_rawDesc = []byte{ 0x5f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x71, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x71, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x42, 0x78, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6f, 0x75, 0x74, 0x42, 0xcc, 0x01, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/router/v2/router.pb.validate.go b/pkg/api/envoy/config/filter/http/router/v2/router.pb.validate.go index dc548d6853..2447658edc 100644 --- a/pkg/api/envoy/config/filter/http/router/v2/router.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/router/v2/router.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/router/v2/router.proto -package envoy_config_filter_http_router_v2 +package routerv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Router with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDynamicStats()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetDynamicStats()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouterValidationError{ + field: "DynamicStats", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouterValidationError{ + field: "DynamicStats", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicStats()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: "DynamicStats", @@ -55,7 +90,26 @@ func (m *Router) Validate() error { for idx, item := range m.GetUpstreamLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouterValidationError{ + field: fmt.Sprintf("UpstreamLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouterValidationError{ + field: fmt.Sprintf("UpstreamLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: fmt.Sprintf("UpstreamLog[%v]", idx), @@ -73,19 +127,43 @@ func (m *Router) Validate() error { _, _ = idx, item if _, ok := _Router_StrictCheckHeaders_InLookup[item]; !ok { - return RouterValidationError{ + err := RouterValidationError{ field: fmt.Sprintf("StrictCheckHeaders[%v]", idx), reason: "value must be in list [x-envoy-upstream-rq-timeout-ms x-envoy-upstream-rq-per-try-timeout-ms x-envoy-max-retries x-envoy-retry-grpc-on x-envoy-retry-on]", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for RespectExpectedRqTimeout + if len(errors) > 0 { + return RouterMultiError(errors) + } + return nil } +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + // RouterValidationError is the validation error returned by Router.Validate if // the designated constraints aren't met. type RouterValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.go b/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.go index bf70f2d868..1eb4596100 100644 --- a/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.go +++ b/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/squash/v2/squash.proto -package envoy_config_filter_http_squash_v2 +package squashv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type Squash struct { state protoimpl.MessageState @@ -173,15 +168,20 @@ var file_envoy_config_filter_http_squash_v2_squash_proto_rawDesc = []byte{ 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x50, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x42, 0x78, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x71, 0x75, - 0x61, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x53, 0x71, 0x75, 0x61, 0x73, 0x68, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x71, 0x75, 0x61, 0x73, - 0x68, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x64, 0x42, 0xcc, 0x01, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x71, + 0x75, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x53, 0x71, 0x75, 0x61, 0x73, 0x68, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x2f, 0x76, + 0x32, 0x3b, 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, + 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.validate.go b/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.validate.go index 93d570c699..5c0da617ff 100644 --- a/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/squash/v2/squash.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/squash/v2/squash.proto -package envoy_config_filter_http_squash_v2 +package squashv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Squash with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Squash) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Squash with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in SquashMultiError, or nil if none found. +func (m *Squash) ValidateAll() error { + return m.validate(true) +} + +func (m *Squash) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCluster()) < 1 { - return SquashValidationError{ + err := SquashValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetAttachmentTemplate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAttachmentTemplate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SquashValidationError{ + field: "AttachmentTemplate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SquashValidationError{ + field: "AttachmentTemplate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAttachmentTemplate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SquashValidationError{ field: "AttachmentTemplate", @@ -57,7 +96,26 @@ func (m *Squash) Validate() error { } } - if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SquashValidationError{ + field: "RequestTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SquashValidationError{ + field: "RequestTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SquashValidationError{ field: "RequestTimeout", @@ -67,7 +125,26 @@ func (m *Squash) Validate() error { } } - if v, ok := interface{}(m.GetAttachmentTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAttachmentTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SquashValidationError{ + field: "AttachmentTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SquashValidationError{ + field: "AttachmentTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAttachmentTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SquashValidationError{ field: "AttachmentTimeout", @@ -77,7 +154,26 @@ func (m *Squash) Validate() error { } } - if v, ok := interface{}(m.GetAttachmentPollPeriod()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAttachmentPollPeriod()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SquashValidationError{ + field: "AttachmentPollPeriod", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SquashValidationError{ + field: "AttachmentPollPeriod", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAttachmentPollPeriod()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SquashValidationError{ field: "AttachmentPollPeriod", @@ -87,9 +183,29 @@ func (m *Squash) Validate() error { } } + if len(errors) > 0 { + return SquashMultiError(errors) + } + return nil } +// SquashMultiError is an error wrapping multiple validation errors returned by +// Squash.ValidateAll() if the designated constraints aren't met. +type SquashMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SquashMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SquashMultiError) AllErrors() []error { return m } + // SquashValidationError is the validation error returned by Squash.Validate if // the designated constraints aren't met. type SquashValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.go b/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.go index 00eac47e70..79128c59b8 100644 --- a/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.go +++ b/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/tap/v2alpha/tap.proto -package envoy_config_filter_http_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/tap/v2alpha" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Top level configuration for the tap filter. type Tap struct { state protoimpl.MessageState @@ -100,15 +95,20 @@ var file_envoy_config_filter_http_tap_v2alpha_tap_proto_rawDesc = []byte{ 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x74, 0x0a, 0x32, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x26, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xc1, 0x01, 0x0a, 0x32, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x74, + 0x61, 0x70, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x26, + 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.validate.go b/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.validate.go index d595cf04c6..3b8be25d6c 100644 --- a/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/tap/v2alpha/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/tap/v2alpha/tap.proto -package envoy_config_filter_http_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Tap with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Tap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tap with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TapMultiError, or nil if none found. +func (m *Tap) ValidateAll() error { + return m.validate(true) +} + +func (m *Tap) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return TapValidationError{ + err := TapValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapValidationError{ field: "CommonConfig", @@ -57,9 +96,29 @@ func (m *Tap) Validate() error { } } + if len(errors) > 0 { + return TapMultiError(errors) + } + return nil } +// TapMultiError is an error wrapping multiple validation errors returned by +// Tap.ValidateAll() if the designated constraints aren't met. +type TapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapMultiError) AllErrors() []error { return m } + // TapValidationError is the validation error returned by Tap.Validate if the // designated constraints aren't met. type TapValidationError struct { diff --git a/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.go b/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.go index eb52211fb6..ca97e6efbc 100644 --- a/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.go +++ b/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/http/transcoder/v2/transcoder.proto -package envoy_config_filter_http_transcoder_v2 +package transcoderv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 10] type GrpcJsonTranscoder struct { state protoimpl.MessageState @@ -128,9 +123,9 @@ type GrpcJsonTranscoder struct { // // {"code":5,"details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","requestId":"r-1"}]} // - // In order to transcode the message, the ``google.rpc.RequestInfo`` type from - // the ``google/rpc/error_details.proto`` should be included in the configured - // :ref:`proto descriptor set `. + // In order to transcode the message, the ``google.rpc.RequestInfo`` type from + // the ``google/rpc/error_details.proto`` should be included in the configured + // :ref:`proto descriptor set `. ConvertGrpcStatus bool `protobuf:"varint,9,opt,name=convert_grpc_status,json=convertGrpcStatus,proto3" json:"convert_grpc_status,omitempty"` } @@ -406,16 +401,22 @@ var file_envoy_config_filter_http_transcoder_v2_transcoder_proto_rawDesc = []byt 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0x15, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x8e, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xea, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x37, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, + 0x3b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, + 0x8f, 0x05, 0x37, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.validate.go b/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.validate.go index 7193343a19..45e21c3074 100644 --- a/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.validate.go +++ b/pkg/api/envoy/config/filter/http/transcoder/v2/transcoder.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/http/transcoder/v2/transcoder.proto -package envoy_config_filter_http_transcoder_v2 +package transcoderv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcJsonTranscoder with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcJsonTranscoder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcJsonTranscoder with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcJsonTranscoderMultiError, or nil if none found. +func (m *GrpcJsonTranscoder) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetServices()) < 1 { - return GrpcJsonTranscoderValidationError{ + err := GrpcJsonTranscoderValidationError{ field: "Services", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPrintOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrintOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "PrintOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "PrintOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrintOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcJsonTranscoderValidationError{ field: "PrintOptions", @@ -75,16 +114,41 @@ func (m *GrpcJsonTranscoder) Validate() error { // no validation rules for ProtoDescriptorBin default: - return GrpcJsonTranscoderValidationError{ + err := GrpcJsonTranscoderValidationError{ field: "DescriptorSet", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return GrpcJsonTranscoderMultiError(errors) + } + return nil } +// GrpcJsonTranscoderMultiError is an error wrapping multiple validation errors +// returned by GrpcJsonTranscoder.ValidateAll() if the designated constraints +// aren't met. +type GrpcJsonTranscoderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoderMultiError) AllErrors() []error { return m } + // GrpcJsonTranscoderValidationError is the validation error returned by // GrpcJsonTranscoder.Validate if the designated constraints aren't met. type GrpcJsonTranscoderValidationError struct { @@ -143,12 +207,26 @@ var _ interface { // Validate checks the field values on GrpcJsonTranscoder_PrintOptions with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcJsonTranscoder_PrintOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcJsonTranscoder_PrintOptions with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// GrpcJsonTranscoder_PrintOptionsMultiError, or nil if none found. +func (m *GrpcJsonTranscoder_PrintOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder_PrintOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for AddWhitespace // no validation rules for AlwaysPrintPrimitiveFields @@ -157,9 +235,30 @@ func (m *GrpcJsonTranscoder_PrintOptions) Validate() error { // no validation rules for PreserveProtoFieldNames + if len(errors) > 0 { + return GrpcJsonTranscoder_PrintOptionsMultiError(errors) + } + return nil } +// GrpcJsonTranscoder_PrintOptionsMultiError is an error wrapping multiple +// validation errors returned by GrpcJsonTranscoder_PrintOptions.ValidateAll() +// if the designated constraints aren't met. +type GrpcJsonTranscoder_PrintOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoder_PrintOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoder_PrintOptionsMultiError) AllErrors() []error { return m } + // GrpcJsonTranscoder_PrintOptionsValidationError is the validation error // returned by GrpcJsonTranscoder_PrintOptions.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.go b/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.go index 7b72f3054f..eacdfc6f19 100644 --- a/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.go +++ b/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/listener/http_inspector/v2/http_inspector.proto -package envoy_config_filter_listener_http_inspector_v2 +package http_inspectorv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HttpInspector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -79,17 +74,23 @@ var file_envoy_config_filter_listener_http_inspector_v2_http_inspector_proto_raw 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x97, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0xff, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2f, 0x76, 0x32, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.validate.go b/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.validate.go index 33f8829688..5c251adbcb 100644 --- a/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.validate.go +++ b/pkg/api/envoy/config/filter/listener/http_inspector/v2/http_inspector.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/listener/http_inspector/v2/http_inspector.proto -package envoy_config_filter_listener_http_inspector_v2 +package http_inspectorv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpInspector with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpInspector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpInspector with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpInspectorMultiError, or +// nil if none found. +func (m *HttpInspector) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpInspector) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return HttpInspectorMultiError(errors) + } + return nil } +// HttpInspectorMultiError is an error wrapping multiple validation errors +// returned by HttpInspector.ValidateAll() if the designated constraints +// aren't met. +type HttpInspectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpInspectorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpInspectorMultiError) AllErrors() []error { return m } + // HttpInspectorValidationError is the validation error returned by // HttpInspector.Validate if the designated constraints aren't met. type HttpInspectorValidationError struct { diff --git a/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.go b/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.go index 190f2bb61f..66045574bb 100644 --- a/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.go +++ b/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/listener/original_dst/v2/original_dst.proto -package envoy_config_filter_listener_original_dst_v2 +package original_dstv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OriginalDst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -78,17 +73,23 @@ var file_envoy_config_filter_listener_original_dst_v2_original_dst_proto_rawDesc 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0d, - 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x42, 0x91, 0x01, + 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x42, 0xf5, 0x01, 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x33, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5a, 0x62, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, + 0x73, 0x74, 0x2f, 0x76, 0x32, 0x3b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, + 0x73, 0x74, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x33, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.validate.go b/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.validate.go index e661e0b740..89013841ea 100644 --- a/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.validate.go +++ b/pkg/api/envoy/config/filter/listener/original_dst/v2/original_dst.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/listener/original_dst/v2/original_dst.proto -package envoy_config_filter_listener_original_dst_v2 +package original_dstv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OriginalDst with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OriginalDst) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalDst with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OriginalDstMultiError, or +// nil if none found. +func (m *OriginalDst) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalDst) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return OriginalDstMultiError(errors) + } + return nil } +// OriginalDstMultiError is an error wrapping multiple validation errors +// returned by OriginalDst.ValidateAll() if the designated constraints aren't met. +type OriginalDstMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalDstMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalDstMultiError) AllErrors() []error { return m } + // OriginalDstValidationError is the validation error returned by // OriginalDst.Validate if the designated constraints aren't met. type OriginalDstValidationError struct { diff --git a/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.go b/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.go index 04d089466b..1cf32ec35f 100644 --- a/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.go +++ b/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/listener/original_src/v2alpha1/original_src.proto -package envoy_config_filter_listener_original_src_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The Original Src filter binds upstream connections to the original source address determined // for the connection. This address could come from something like the Proxy Protocol filter, or it // could come from trusted http headers. @@ -104,23 +98,27 @@ var file_envoy_config_filter_listener_original_src_v2alpha1_original_src_proto_r 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, - 0x72, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, - 0x61, 0x72, 0x6b, 0x42, 0x97, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x33, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, - 0x72, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0b, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x69, 0x6e, + 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x69, + 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0xf2, 0x01, 0x0a, 0x40, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, + 0xfe, 0x8f, 0x05, 0x33, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.validate.go b/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.validate.go index acca1ba5fa..e94ee90a08 100644 --- a/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.validate.go +++ b/pkg/api/envoy/config/filter/listener/original_src/v2alpha1/original_src.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/listener/original_src/v2alpha1/original_src.proto -package envoy_config_filter_listener_original_src_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,59 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OriginalSrc with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OriginalSrc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalSrc with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OriginalSrcMultiError, or +// nil if none found. +func (m *OriginalSrc) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalSrc) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for BindPort // no validation rules for Mark + if len(errors) > 0 { + return OriginalSrcMultiError(errors) + } + return nil } +// OriginalSrcMultiError is an error wrapping multiple validation errors +// returned by OriginalSrc.ValidateAll() if the designated constraints aren't met. +type OriginalSrcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalSrcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalSrcMultiError) AllErrors() []error { return m } + // OriginalSrcValidationError is the validation error returned by // OriginalSrc.Validate if the designated constraints aren't met. type OriginalSrcValidationError struct { diff --git a/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.go b/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.go index ac140658b6..d5d4cc1728 100644 --- a/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.go +++ b/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto -package envoy_config_filter_listener_proxy_protocol_v2 +package proxy_protocolv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ProxyProtocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -79,17 +74,23 @@ var file_envoy_config_filter_listener_proxy_protocol_v2_proxy_protocol_proto_raw 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x97, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0xff, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2f, 0x76, 0x32, 0x3b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.validate.go b/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.validate.go index 8a29ab5249..9aa08d086e 100644 --- a/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.validate.go +++ b/pkg/api/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto -package envoy_config_filter_listener_proxy_protocol_v2 +package proxy_protocolv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ProxyProtocol with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ProxyProtocol) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocol with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ProxyProtocolMultiError, or +// nil if none found. +func (m *ProxyProtocol) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocol) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return ProxyProtocolMultiError(errors) + } + return nil } +// ProxyProtocolMultiError is an error wrapping multiple validation errors +// returned by ProxyProtocol.ValidateAll() if the designated constraints +// aren't met. +type ProxyProtocolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocolMultiError) AllErrors() []error { return m } + // ProxyProtocolValidationError is the validation error returned by // ProxyProtocol.Validate if the designated constraints aren't met. type ProxyProtocolValidationError struct { diff --git a/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.go b/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.go index b7035e8a02..e2f0ea96d8 100644 --- a/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.go +++ b/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto -package envoy_config_filter_listener_tls_inspector_v2 +package tls_inspectorv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type TlsInspector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -79,16 +74,23 @@ var file_envoy_config_filter_listener_tls_inspector_v2_tls_inspector_proto_rawDe 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x54, 0x6c, 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x42, 0x94, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x72, 0x42, 0xfa, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x74, 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x54, 0x6c, 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x34, 0x12, 0x32, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x74, 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x74, 0x6c, 0x73, 0x5f, + 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x6c, 0x73, + 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x34, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x74, 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.validate.go b/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.validate.go index a1e1e50966..9ec318835d 100644 --- a/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.validate.go +++ b/pkg/api/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto -package envoy_config_filter_listener_tls_inspector_v2 +package tls_inspectorv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TlsInspector with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TlsInspector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsInspector with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TlsInspectorMultiError, or +// nil if none found. +func (m *TlsInspector) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsInspector) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return TlsInspectorMultiError(errors) + } + return nil } +// TlsInspectorMultiError is an error wrapping multiple validation errors +// returned by TlsInspector.ValidateAll() if the designated constraints aren't met. +type TlsInspectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsInspectorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsInspectorMultiError) AllErrors() []error { return m } + // TlsInspectorValidationError is the validation error returned by // TlsInspector.Validate if the designated constraints aren't met. type TlsInspectorValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.go b/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.go index fa84bfa148..a5736c0d7f 100644 --- a/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.go +++ b/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto -package envoy_config_filter_network_client_ssl_auth_v2 +package client_ssl_authv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ClientSSLAuth struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -148,17 +143,23 @@ var file_envoy_config_filter_network_client_ssl_auth_v2_client_ssl_auth_proto_ra 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0b, 0x69, 0x70, 0x57, 0x68, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x97, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x42, 0x80, 0x02, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x73, 0x6c, 0x41, 0x75, 0x74, 0x68, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x76, 0x32, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, + 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.validate.go b/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.validate.go index 1936db1fbf..3b3357204a 100644 --- a/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto -package envoy_config_filter_network_client_ssl_auth_v2 +package client_ssl_authv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,32 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClientSSLAuth with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClientSSLAuth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientSSLAuth with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClientSSLAuthMultiError, or +// nil if none found. +func (m *ClientSSLAuth) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientSSLAuth) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetAuthApiCluster()) < 1 { - return ClientSSLAuthValidationError{ + err := ClientSSLAuthValidationError{ field: "AuthApiCluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetStatPrefix()) < 1 { - return ClientSSLAuthValidationError{ + err := ClientSSLAuthValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRefreshDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: "RefreshDelay", @@ -68,7 +111,26 @@ func (m *ClientSSLAuth) Validate() error { for idx, item := range m.GetIpWhiteList() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: fmt.Sprintf("IpWhiteList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: fmt.Sprintf("IpWhiteList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: fmt.Sprintf("IpWhiteList[%v]", idx), @@ -80,9 +142,30 @@ func (m *ClientSSLAuth) Validate() error { } + if len(errors) > 0 { + return ClientSSLAuthMultiError(errors) + } + return nil } +// ClientSSLAuthMultiError is an error wrapping multiple validation errors +// returned by ClientSSLAuth.ValidateAll() if the designated constraints +// aren't met. +type ClientSSLAuthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientSSLAuthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientSSLAuthMultiError) AllErrors() []error { return m } + // ClientSSLAuthValidationError is the validation error returned by // ClientSSLAuth.Validate if the designated constraints aren't met. type ClientSSLAuthValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.go b/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.go index 4abf47787a..0bbc876806 100644 --- a/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.go +++ b/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/direct_response/v2/config.proto -package envoy_config_filter_network_direct_response_v2 +package direct_responsev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Config struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -95,16 +90,23 @@ var file_envoy_config_filter_network_direct_response_v2_config_proto_rawDesc = [ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x90, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0xf9, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x32, - 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.validate.go b/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.validate.go index 262d918090..1c175eba8e 100644 --- a/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/direct_response/v2/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/direct_response/v2/config.proto -package envoy_config_filter_network_direct_response_v2 +package direct_responsev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigValidationError{ field: "Response", @@ -50,9 +85,29 @@ func (m *Config) Validate() error { } } + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.go b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.go index b118c5e3d8..6e47fb936f 100644 --- a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.go +++ b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto -package envoy_config_filter_network_dubbo_proxy_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Dubbo Protocol types supported by Envoy. type ProtocolType int32 @@ -328,16 +323,22 @@ var file_envoy_config_filter_network_dubbo_proxy_v2alpha1_dubbo_proxy_proto_rawD 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x10, 0x00, 0x2a, 0x21, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x73, 0x73, 0x69, 0x61, 0x6e, 0x32, - 0x10, 0x00, 0x42, 0x92, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x10, 0x00, 0x42, 0xeb, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go index 54dc41a4cb..24d1319ca4 100644 --- a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto -package envoy_config_filter_network_dubbo_proxy_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,41 +31,88 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on DubboProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DubboProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DubboProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DubboProxyMultiError, or +// nil if none found. +func (m *DubboProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *DubboProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return DubboProxyValidationError{ + err := DubboProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProtocolType_name[int32(m.GetProtocolType())]; !ok { - return DubboProxyValidationError{ + err := DubboProxyValidationError{ field: "ProtocolType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := SerializationType_name[int32(m.GetSerializationType())]; !ok { - return DubboProxyValidationError{ + err := DubboProxyValidationError{ field: "SerializationType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRouteConfig() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboProxyValidationError{ field: fmt.Sprintf("RouteConfig[%v]", idx), @@ -79,7 +127,26 @@ func (m *DubboProxy) Validate() error { for idx, item := range m.GetDubboFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("DubboFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("DubboFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboProxyValidationError{ field: fmt.Sprintf("DubboFilters[%v]", idx), @@ -91,9 +158,29 @@ func (m *DubboProxy) Validate() error { } + if len(errors) > 0 { + return DubboProxyMultiError(errors) + } + return nil } +// DubboProxyMultiError is an error wrapping multiple validation errors +// returned by DubboProxy.ValidateAll() if the designated constraints aren't met. +type DubboProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DubboProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DubboProxyMultiError) AllErrors() []error { return m } + // DubboProxyValidationError is the validation error returned by // DubboProxy.Validate if the designated constraints aren't met. type DubboProxyValidationError struct { @@ -149,21 +236,58 @@ var _ interface { } = DubboProxyValidationError{} // Validate checks the field values on DubboFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DubboFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DubboFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DubboFilterMultiError, or +// nil if none found. +func (m *DubboFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *DubboFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return DubboFilterValidationError{ + err := DubboFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboFilterValidationError{ field: "Config", @@ -173,9 +297,29 @@ func (m *DubboFilter) Validate() error { } } + if len(errors) > 0 { + return DubboFilterMultiError(errors) + } + return nil } +// DubboFilterMultiError is an error wrapping multiple validation errors +// returned by DubboFilter.ValidateAll() if the designated constraints aren't met. +type DubboFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DubboFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DubboFilterMultiError) AllErrors() []error { return m } + // DubboFilterValidationError is the validation error returned by // DubboFilter.Validate if the designated constraints aren't met. type DubboFilterValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.go b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.go index ae50bd9064..e621a4d451 100644 --- a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.go +++ b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto -package envoy_config_filter_network_dubbo_proxy_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type RouteConfiguration struct { state protoimpl.MessageState @@ -569,16 +564,22 @@ var file_envoy_config_filter_network_dubbo_proxy_v2alpha1_route_proto_rawDesc = 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x42, 0x8d, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x02, 0x38, 0x01, 0x42, 0xe6, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, - 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, 0xfe, + 0x8f, 0x05, 0x31, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go index f3c5713c7e..a1c2ae05dd 100644 --- a/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto -package envoy_config_filter_network_dubbo_proxy_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for Interface @@ -52,7 +68,26 @@ func (m *RouteConfiguration) Validate() error { for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -64,9 +99,30 @@ func (m *RouteConfiguration) Validate() error { } + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil } +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + // RouteConfigurationValidationError is the validation error returned by // RouteConfiguration.Validate if the designated constraints aren't met. type RouteConfigurationValidationError struct { @@ -124,20 +180,57 @@ var _ interface { } = RouteConfigurationValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatch() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Match", @@ -148,13 +241,36 @@ func (m *Route) Validate() error { } if m.GetRoute() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Route", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Route", @@ -164,9 +280,29 @@ func (m *Route) Validate() error { } } + if len(errors) > 0 { + return RouteMultiError(errors) + } + return nil } +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + // RouteValidationError is the validation error returned by Route.Validate if // the designated constraints aren't met. type RouteValidationError struct { @@ -222,13 +358,47 @@ var _ interface { } = RouteValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMethod()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMethod()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Method", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Method", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMethod()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "Method", @@ -241,7 +411,26 @@ func (m *RouteMatch) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -253,9 +442,29 @@ func (m *RouteMatch) Validate() error { } + if len(errors) > 0 { + return RouteMatchMultiError(errors) + } + return nil } +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + // RouteMatchValidationError is the validation error returned by // RouteMatch.Validate if the designated constraints aren't met. type RouteMatchValidationError struct { @@ -311,13 +520,27 @@ var _ interface { } = RouteMatchValidationError{} // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ClusterSpecifier.(type) { case *RouteAction_Cluster: @@ -325,7 +548,26 @@ func (m *RouteAction) Validate() error { case *RouteAction_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "WeightedClusters", @@ -336,16 +578,40 @@ func (m *RouteAction) Validate() error { } default: - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteActionMultiError(errors) } return nil } +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + // RouteActionValidationError is the validation error returned by // RouteAction.Validate if the designated constraints aren't met. type RouteActionValidationError struct { @@ -401,14 +667,47 @@ var _ interface { } = RouteActionValidationError{} // Validate checks the field values on MethodMatch with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MethodMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MethodMatchMultiError, or +// nil if none found. +func (m *MethodMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatch) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: "Name", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: "Name", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatchValidationError{ field: "Name", @@ -418,26 +717,75 @@ func (m *MethodMatch) Validate() error { } } - for key, val := range m.GetParamsMatch() { - _ = val - - // no validation rules for ParamsMatch[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MethodMatchValidationError{ - field: fmt.Sprintf("ParamsMatch[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]uint32, len(m.GetParamsMatch())) + i := 0 + for key := range m.GetParamsMatch() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetParamsMatch()[key] + _ = val + + // no validation rules for ParamsMatch[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return MethodMatchMultiError(errors) } return nil } +// MethodMatchMultiError is an error wrapping multiple validation errors +// returned by MethodMatch.ValidateAll() if the designated constraints aren't met. +type MethodMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatchMultiError) AllErrors() []error { return m } + // MethodMatchValidationError is the validation error returned by // MethodMatch.Validate if the designated constraints aren't met. type MethodMatchValidationError struct { @@ -494,12 +842,27 @@ var _ interface { // Validate checks the field values on MethodMatch_ParameterMatchSpecifier with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *MethodMatch_ParameterMatchSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatch_ParameterMatchSpecifier +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// MethodMatch_ParameterMatchSpecifierMultiError, or nil if none found. +func (m *MethodMatch_ParameterMatchSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatch_ParameterMatchSpecifier) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ParameterMatchSpecifier.(type) { case *MethodMatch_ParameterMatchSpecifier_ExactMatch: @@ -507,7 +870,26 @@ func (m *MethodMatch_ParameterMatchSpecifier) Validate() error { case *MethodMatch_ParameterMatchSpecifier_RangeMatch: - if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRangeMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatch_ParameterMatchSpecifierValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatch_ParameterMatchSpecifierValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatch_ParameterMatchSpecifierValidationError{ field: "RangeMatch", @@ -519,9 +901,31 @@ func (m *MethodMatch_ParameterMatchSpecifier) Validate() error { } + if len(errors) > 0 { + return MethodMatch_ParameterMatchSpecifierMultiError(errors) + } + return nil } +// MethodMatch_ParameterMatchSpecifierMultiError is an error wrapping multiple +// validation errors returned by +// MethodMatch_ParameterMatchSpecifier.ValidateAll() if the designated +// constraints aren't met. +type MethodMatch_ParameterMatchSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatch_ParameterMatchSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatch_ParameterMatchSpecifierMultiError) AllErrors() []error { return m } + // MethodMatch_ParameterMatchSpecifierValidationError is the validation error // returned by MethodMatch_ParameterMatchSpecifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.go b/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.go index 6fc348add0..c63b9170d5 100644 --- a/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.go +++ b/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/echo/v2/echo.proto -package envoy_config_filter_network_echo_v2 +package echov2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Echo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -76,15 +71,21 @@ var file_envoy_config_filter_network_echo_v2_echo_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x06, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x42, 0x78, 0x0a, 0x31, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, 0x68, 0x6f, 0x2e, 0x76, - 0x32, 0x42, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x2a, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, 0x68, 0x6f, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x06, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x42, 0xcb, 0x01, 0x0a, + 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, 0x68, 0x6f, 0x2e, + 0x76, 0x32, 0x42, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x63, 0x68, 0x6f, + 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2a, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, 0x68, 0x6f, 0x2e, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.validate.go b/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.validate.go index cffeeb0327..9d8c98b5ba 100644 --- a/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/echo/v2/echo.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/echo/v2/echo.proto -package envoy_config_filter_network_echo_v2 +package echov2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Echo with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Echo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Echo with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in EchoMultiError, or nil if none found. +func (m *Echo) ValidateAll() error { + return m.validate(true) +} + +func (m *Echo) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return EchoMultiError(errors) + } + return nil } +// EchoMultiError is an error wrapping multiple validation errors returned by +// Echo.ValidateAll() if the designated constraints aren't met. +type EchoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EchoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EchoMultiError) AllErrors() []error { return m } + // EchoValidationError is the validation error returned by Echo.Validate if the // designated constraints aren't met. type EchoValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go b/pkg/api/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go index b35c5c8618..ade6dbda9d 100644 --- a/pkg/api/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go +++ b/pkg/api/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/ext_authz/v2/ext_authz.proto -package envoy_config_filter_network_ext_authz_v2 +package ext_authzv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // External Authorization filter calls out to an external service over the // gRPC Authorization API defined by // :ref:`CheckRequest `. @@ -145,16 +140,22 @@ var file_envoy_config_filter_network_ext_authz_v2_ext_authz_proto_rawDesc = []by 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x42, 0x86, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x63, 0x61, 0x74, 0x65, 0x42, 0xe3, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, + 0x32, 0x3b, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x32, 0xf2, 0x98, 0xfe, + 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.validate.go b/pkg/api/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.validate.go index b8385c988c..45a32d52fc 100644 --- a/pkg/api/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.validate.go +++ b/pkg/api/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 envoy_config_filter_network_ext_authz_v2 +package ext_authzv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ExtAuthz) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtAuthz with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExtAuthzMultiError, or nil +// if none found. +func (m *ExtAuthz) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtAuthz) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return ExtAuthzValidationError{ + err := ExtAuthzValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "GrpcService", @@ -61,9 +101,29 @@ func (m *ExtAuthz) Validate() error { // no validation rules for IncludePeerCertificate + if len(errors) > 0 { + return ExtAuthzMultiError(errors) + } + return nil } +// ExtAuthzMultiError is an error wrapping multiple validation errors returned +// by ExtAuthz.ValidateAll() if the designated constraints aren't met. +type ExtAuthzMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtAuthzMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtAuthzMultiError) AllErrors() []error { return m } + // ExtAuthzValidationError is the validation error returned by // ExtAuthz.Validate if the designated constraints aren't met. type ExtAuthzValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go b/pkg/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go index e665d2961e..2669c0d958 100644 --- a/pkg/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go +++ b/pkg/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto -package envoy_config_filter_network_http_connection_manager_v2 +package http_connection_managerv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v21 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" @@ -16,7 +16,6 @@ import ( _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" v22 "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -34,10 +33,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HttpConnectionManager_CodecType int32 const ( @@ -222,79 +217,6 @@ func (HttpConnectionManager_ForwardClientCertDetails) EnumDescriptor() ([]byte, return file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_rawDescGZIP(), []int{0, 2} } -// Determines the action for request that contain %2F, %2f, %5C or %5c sequences in the URI path. -// This operation occurs before URL normalization and the merge slashes transformations if they were enabled. -type HttpConnectionManager_PathWithEscapedSlashesAction int32 - -const ( - // Default behavior specific to implementation (i.e. Envoy) of this configuration option. - // Envoy, by default, takes the KEEP_UNCHANGED action. - // NOTE: the implementation may change the default behavior at-will. - HttpConnectionManager_IMPLEMENTATION_SPECIFIC_DEFAULT HttpConnectionManager_PathWithEscapedSlashesAction = 0 - // Keep escaped slashes. - HttpConnectionManager_KEEP_UNCHANGED HttpConnectionManager_PathWithEscapedSlashesAction = 1 - // Reject client request with the 400 status. gRPC requests will be rejected with the INTERNAL (13) error code. - // The "httpN.downstream_rq_failed_path_normalization" counter is incremented for each rejected request. - HttpConnectionManager_REJECT_REQUEST HttpConnectionManager_PathWithEscapedSlashesAction = 2 - // Unescape %2F and %5C sequences and redirect request to the new path if these sequences were present. - // Redirect occurs after path normalization and merge slashes transformations if they were configured. - // NOTE: gRPC requests will be rejected with the INTERNAL (13) error code. - // This option minimizes possibility of path confusion exploits by forcing request with unescaped slashes to - // traverse all parties: downstream client, intermediate proxies, Envoy and upstream server. - // The "httpN.downstream_rq_redirected_with_normalized_path" counter is incremented for each - // redirected request. - HttpConnectionManager_UNESCAPE_AND_REDIRECT HttpConnectionManager_PathWithEscapedSlashesAction = 3 - // Unescape %2F and %5C sequences. - // Note: this option should not be enabled if intermediaries perform path based access control as - // it may lead to path confusion vulnerabilities. - HttpConnectionManager_UNESCAPE_AND_FORWARD HttpConnectionManager_PathWithEscapedSlashesAction = 4 -) - -// Enum value maps for HttpConnectionManager_PathWithEscapedSlashesAction. -var ( - HttpConnectionManager_PathWithEscapedSlashesAction_name = map[int32]string{ - 0: "IMPLEMENTATION_SPECIFIC_DEFAULT", - 1: "KEEP_UNCHANGED", - 2: "REJECT_REQUEST", - 3: "UNESCAPE_AND_REDIRECT", - 4: "UNESCAPE_AND_FORWARD", - } - HttpConnectionManager_PathWithEscapedSlashesAction_value = map[string]int32{ - "IMPLEMENTATION_SPECIFIC_DEFAULT": 0, - "KEEP_UNCHANGED": 1, - "REJECT_REQUEST": 2, - "UNESCAPE_AND_REDIRECT": 3, - "UNESCAPE_AND_FORWARD": 4, - } -) - -func (x HttpConnectionManager_PathWithEscapedSlashesAction) Enum() *HttpConnectionManager_PathWithEscapedSlashesAction { - p := new(HttpConnectionManager_PathWithEscapedSlashesAction) - *p = x - return p -} - -func (x HttpConnectionManager_PathWithEscapedSlashesAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpConnectionManager_PathWithEscapedSlashesAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes[3].Descriptor() -} - -func (HttpConnectionManager_PathWithEscapedSlashesAction) Type() protoreflect.EnumType { - return &file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes[3] -} - -func (x HttpConnectionManager_PathWithEscapedSlashesAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpConnectionManager_PathWithEscapedSlashesAction.Descriptor instead. -func (HttpConnectionManager_PathWithEscapedSlashesAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_rawDescGZIP(), []int{0, 3} -} - type HttpConnectionManager_Tracing_OperationName int32 const ( @@ -327,11 +249,11 @@ func (x HttpConnectionManager_Tracing_OperationName) String() string { } func (HttpConnectionManager_Tracing_OperationName) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes[4].Descriptor() + return file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes[3].Descriptor() } func (HttpConnectionManager_Tracing_OperationName) Type() protoreflect.EnumType { - return &file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes[4] + return &file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes[3] } func (x HttpConnectionManager_Tracing_OperationName) Number() protoreflect.EnumNumber { @@ -343,7 +265,7 @@ func (HttpConnectionManager_Tracing_OperationName) EnumDescriptor() ([]byte, []i return file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_rawDescGZIP(), []int{0, 0, 0} } -// [#next-free-field: 46] +// [#next-free-field: 37] type HttpConnectionManager struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -389,8 +311,6 @@ type HttpConnectionManager struct { // 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 *wrappers.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 @@ -578,13 +498,6 @@ type HttpConnectionManager struct { // with `prefix` match set to `/dir`. Defaults to `false`. Note that slash merging is not part of // `HTTP spec `_ and is provided for convenience. MergeSlashes bool `protobuf:"varint,33,opt,name=merge_slashes,json=mergeSlashes,proto3" json:"merge_slashes,omitempty"` - // Action to take when request URL path contains escaped slash sequences (%2F, %2f, %5C and %5c). - // The default value can be overridden by the :ref:`http_connection_manager.path_with_escaped_slashes_action` - // runtime variable. - // The :ref:`http_connection_manager.path_with_escaped_slashes_action_sampling` runtime - // variable can be used to apply the action to a portion of all requests. - // XXX: Backported from the v3 API - PathWithEscapedSlashesAction HttpConnectionManager_PathWithEscapedSlashesAction `protobuf:"varint,45,opt,name=path_with_escaped_slashes_action,json=pathWithEscapedSlashesAction,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_PathWithEscapedSlashesAction" json:"path_with_escaped_slashes_action,omitempty"` // The configuration of the request ID extension. This includes operations such as // generation, validation, and associated tracing operations. // @@ -596,14 +509,6 @@ type HttpConnectionManager struct { // // 3. Tracing decision (sampled, forced, etc) is set in 14th byte of the UUID. RequestIdExtension *RequestIDExtension `protobuf:"bytes,36,opt,name=request_id_extension,json=requestIdExtension,proto3" json:"request_id_extension,omitempty"` - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` - // local port and request method is not CONNECT. This affects the upstream host header as well. - // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // XXX: Backported from the v3 API - StripMatchingHostPort bool `protobuf:"varint,39,opt,name=strip_matching_host_port,json=stripMatchingHostPort,proto3" json:"strip_matching_host_port,omitempty"` } func (x *HttpConnectionManager) Reset() { @@ -884,13 +789,6 @@ func (x *HttpConnectionManager) GetMergeSlashes() bool { return false } -func (x *HttpConnectionManager) GetPathWithEscapedSlashesAction() HttpConnectionManager_PathWithEscapedSlashesAction { - if x != nil { - return x.PathWithEscapedSlashesAction - } - return HttpConnectionManager_IMPLEMENTATION_SPECIFIC_DEFAULT -} - func (x *HttpConnectionManager) GetRequestIdExtension() *RequestIDExtension { if x != nil { return x.RequestIdExtension @@ -898,13 +796,6 @@ func (x *HttpConnectionManager) GetRequestIdExtension() *RequestIDExtension { return nil } -func (x *HttpConnectionManager) GetStripMatchingHostPort() bool { - if x != nil { - return x.StripMatchingHostPort - } - return false -} - type isHttpConnectionManager_RouteSpecifier interface { isHttpConnectionManager_RouteSpecifier() } @@ -2106,7 +1997,7 @@ var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x26, 0x0a, 0x15, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x23, 0x0a, 0x15, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x80, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, @@ -2184,236 +2075,211 @@ var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_ 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6b, 0x62, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x60, 0x20, - 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x4b, 0x62, 0x12, 0x46, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0x80, 0x40, + 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x4b, 0x62, 0x12, 0x46, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, + 0x05, 0x01, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x49, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, - 0x01, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x49, - 0x0a, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, - 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, - 0x15, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, - 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4a, 0x0a, 0x0a, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x48, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x5f, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x10, 0x75, 0x73, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x72, - 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x11, 0x78, 0x66, 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x48, - 0x6f, 0x70, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x63, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, + 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, + 0x0a, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0c, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, + 0x0a, 0x15, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, + 0x64, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4a, 0x0a, + 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0d, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x48, 0x0a, 0x12, 0x75, 0x73, 0x65, + 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x10, 0x75, 0x73, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, + 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x11, 0x78, 0x66, 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, + 0x48, 0x6f, 0x70, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x63, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x78, 0x66, 0x66, 0x5f, 0x61, + 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, + 0x70, 0x58, 0x66, 0x66, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, + 0x61, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x76, 0x69, 0x61, 0x12, 0x4a, 0x0a, 0x13, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0xaf, 0x01, 0x0a, 0x1b, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, + 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x66, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x46, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x18, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x1f, + 0x73, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x78, 0x66, 0x66, 0x5f, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, - 0x58, 0x66, 0x66, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x61, - 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x76, 0x69, 0x61, 0x12, 0x4a, 0x0a, 0x13, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0xaf, 0x01, 0x0a, 0x1b, 0x66, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x66, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x46, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x18, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, - 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x1f, 0x73, - 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x52, 0x1b, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2c, 0x0a, + 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x31, 0x30, 0x30, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x12, 0x65, 0x0a, 0x31, 0x72, + 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x61, 0x73, 0x5f, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x76, 0x36, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x2a, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x74, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x49, 0x70, + 0x76, 0x36, 0x12, 0x84, 0x01, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x5b, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x6e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, + 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x21, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, + 0x73, 0x12, 0x7c, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, + 0xb6, 0x05, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x9c, 0x01, 0x0a, 0x0e, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x63, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, - 0x1b, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x31, - 0x30, 0x30, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x12, 0x65, 0x0a, 0x31, 0x72, 0x65, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x72, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x2a, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, - 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x49, 0x70, 0x76, - 0x36, 0x12, 0x84, 0x01, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x5b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x6e, 0x6f, 0x72, 0x6d, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x6e, 0x6f, - 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6d, - 0x65, 0x72, 0x67, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, - 0x12, 0xb2, 0x01, 0x0a, 0x20, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, - 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x6a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x57, - 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, - 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, - 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x69, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x27, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, 0x72, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x1a, 0xb6, 0x05, 0x0a, - 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x9c, 0x01, 0x0a, 0x0e, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x63, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x15, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, - 0x54, 0x61, 0x67, 0x73, 0x12, 0x3c, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, - 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x67, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, + 0x82, 0x01, 0x02, 0x10, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x0d, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x18, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x66, 0x6f, + 0x72, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x46, 0x6f, 0x72, 0x54, 0x61, 0x67, 0x73, 0x12, 0x3c, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, + 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, + 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, - 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x12, 0x3e, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x6d, 0x61, - 0x78, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x74, 0x68, 0x54, 0x61, - 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x28, 0x0a, 0x0d, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, - 0x49, 0x4e, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x47, 0x52, - 0x45, 0x53, 0x53, 0x10, 0x01, 0x1a, 0x3a, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, - 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x1a, 0xa7, 0x01, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, + 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x74, + 0x68, 0x54, 0x61, 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x12, 0x3f, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x28, + 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x1a, 0x3a, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x1a, 0xa7, 0x01, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, + 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x03, 0x75, 0x72, 0x69, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0xc6, + 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x5c, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, - 0x64, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x03, 0x75, 0x72, 0x69, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0xc6, 0x01, 0x0a, 0x0d, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, - 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x5c, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x34, - 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x22, 0x36, 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, - 0x54, 0x54, 0x50, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, - 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x1a, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x56, - 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x50, 0x50, - 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, - 0x10, 0x0a, 0x0c, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, 0x10, - 0x02, 0x22, 0x79, 0x0a, 0x18, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0c, 0x0a, - 0x08, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, - 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, - 0x0e, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, - 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, 0x5f, 0x53, 0x45, - 0x54, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x46, 0x4f, - 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x22, 0xa0, 0x01, 0x0a, - 0x1c, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, - 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, - 0x1f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x43, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, - 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x45, 0x50, 0x5f, 0x55, 0x4e, 0x43, 0x48, 0x41, - 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, - 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, - 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, - 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x04, 0x42, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x36, 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x63, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, + 0x50, 0x32, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x03, 0x22, + 0x53, 0x0a, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, + 0x09, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, + 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, 0x53, 0x45, 0x4e, 0x54, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, + 0x47, 0x48, 0x10, 0x02, 0x22, 0x79, 0x0a, 0x18, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, 0x10, 0x00, 0x12, 0x10, + 0x0a, 0x0c, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, + 0x52, 0x44, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, + 0x5f, 0x53, 0x45, 0x54, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, + 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x1b, 0x10, 0x1c, 0x22, 0x8a, 0x01, 0x0a, 0x03, 0x52, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, @@ -2539,19 +2405,26 @@ var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_ 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xaf, 0x01, 0x0a, 0x44, 0x69, 0x6f, 0x2e, + 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa8, 0x02, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x1a, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x3d, 0x12, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x77, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x3d, 0x12, 0x3b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2566,101 +2439,99 @@ func file_envoy_config_filter_network_http_connection_manager_v2_http_connection return file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_rawDescData } -var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_goTypes = []interface{}{ (HttpConnectionManager_CodecType)(0), // 0: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.CodecType (HttpConnectionManager_ServerHeaderTransformation)(0), // 1: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.ServerHeaderTransformation (HttpConnectionManager_ForwardClientCertDetails)(0), // 2: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.ForwardClientCertDetails - (HttpConnectionManager_PathWithEscapedSlashesAction)(0), // 3: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.PathWithEscapedSlashesAction - (HttpConnectionManager_Tracing_OperationName)(0), // 4: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.OperationName - (*HttpConnectionManager)(nil), // 5: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager - (*Rds)(nil), // 6: envoy.config.filter.network.http_connection_manager.v2.Rds - (*ScopedRouteConfigurationsList)(nil), // 7: envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList - (*ScopedRoutes)(nil), // 8: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes - (*ScopedRds)(nil), // 9: envoy.config.filter.network.http_connection_manager.v2.ScopedRds - (*HttpFilter)(nil), // 10: envoy.config.filter.network.http_connection_manager.v2.HttpFilter - (*RequestIDExtension)(nil), // 11: envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension - (*HttpConnectionManager_Tracing)(nil), // 12: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing - (*HttpConnectionManager_InternalAddressConfig)(nil), // 13: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig - (*HttpConnectionManager_SetCurrentClientCertDetails)(nil), // 14: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails - (*HttpConnectionManager_UpgradeConfig)(nil), // 15: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig - (*ScopedRoutes_ScopeKeyBuilder)(nil), // 16: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), // 17: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), // 18: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 19: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement - (*v21.RouteConfiguration)(nil), // 20: envoy.api.v2.RouteConfiguration - (*wrappers.BoolValue)(nil), // 21: google.protobuf.BoolValue - (*core.HttpProtocolOptions)(nil), // 22: envoy.api.v2.core.HttpProtocolOptions - (*core.Http1ProtocolOptions)(nil), // 23: envoy.api.v2.core.Http1ProtocolOptions - (*core.Http2ProtocolOptions)(nil), // 24: envoy.api.v2.core.Http2ProtocolOptions - (*wrappers.UInt32Value)(nil), // 25: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 26: google.protobuf.Duration - (*v2.AccessLog)(nil), // 27: envoy.config.filter.accesslog.v2.AccessLog - (*core.ConfigSource)(nil), // 28: envoy.api.v2.core.ConfigSource - (*v21.ScopedRouteConfiguration)(nil), // 29: envoy.api.v2.ScopedRouteConfiguration - (*_struct.Struct)(nil), // 30: google.protobuf.Struct - (*any.Any)(nil), // 31: google.protobuf.Any - (*_type.Percent)(nil), // 32: envoy.type.Percent - (*v22.CustomTag)(nil), // 33: envoy.type.tracing.v2.CustomTag - (*v23.Tracing_Http)(nil), // 34: envoy.config.trace.v2.Tracing.Http + (HttpConnectionManager_Tracing_OperationName)(0), // 3: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.OperationName + (*HttpConnectionManager)(nil), // 4: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager + (*Rds)(nil), // 5: envoy.config.filter.network.http_connection_manager.v2.Rds + (*ScopedRouteConfigurationsList)(nil), // 6: envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList + (*ScopedRoutes)(nil), // 7: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes + (*ScopedRds)(nil), // 8: envoy.config.filter.network.http_connection_manager.v2.ScopedRds + (*HttpFilter)(nil), // 9: envoy.config.filter.network.http_connection_manager.v2.HttpFilter + (*RequestIDExtension)(nil), // 10: envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension + (*HttpConnectionManager_Tracing)(nil), // 11: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing + (*HttpConnectionManager_InternalAddressConfig)(nil), // 12: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig + (*HttpConnectionManager_SetCurrentClientCertDetails)(nil), // 13: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails + (*HttpConnectionManager_UpgradeConfig)(nil), // 14: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig + (*ScopedRoutes_ScopeKeyBuilder)(nil), // 15: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), // 16: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), // 17: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 18: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement + (*v21.RouteConfiguration)(nil), // 19: envoy.api.v2.RouteConfiguration + (*wrappers.BoolValue)(nil), // 20: google.protobuf.BoolValue + (*core.HttpProtocolOptions)(nil), // 21: envoy.api.v2.core.HttpProtocolOptions + (*core.Http1ProtocolOptions)(nil), // 22: envoy.api.v2.core.Http1ProtocolOptions + (*core.Http2ProtocolOptions)(nil), // 23: envoy.api.v2.core.Http2ProtocolOptions + (*wrappers.UInt32Value)(nil), // 24: google.protobuf.UInt32Value + (*duration.Duration)(nil), // 25: google.protobuf.Duration + (*v2.AccessLog)(nil), // 26: envoy.config.filter.accesslog.v2.AccessLog + (*core.ConfigSource)(nil), // 27: envoy.api.v2.core.ConfigSource + (*v21.ScopedRouteConfiguration)(nil), // 28: envoy.api.v2.ScopedRouteConfiguration + (*_struct.Struct)(nil), // 29: google.protobuf.Struct + (*any.Any)(nil), // 30: google.protobuf.Any + (*_type.Percent)(nil), // 31: envoy.type.Percent + (*v22.CustomTag)(nil), // 32: envoy.type.tracing.v2.CustomTag + (*v23.Tracing_Http)(nil), // 33: envoy.config.trace.v2.Tracing.Http } var file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_depIdxs = []int32{ 0, // 0: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.codec_type:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.CodecType - 6, // 1: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.rds:type_name -> envoy.config.filter.network.http_connection_manager.v2.Rds - 20, // 2: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.route_config:type_name -> envoy.api.v2.RouteConfiguration - 8, // 3: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.scoped_routes:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes - 10, // 4: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.http_filters:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpFilter - 21, // 5: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue - 12, // 6: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.tracing:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing - 22, // 7: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.api.v2.core.HttpProtocolOptions - 23, // 8: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.http_protocol_options:type_name -> envoy.api.v2.core.Http1ProtocolOptions - 24, // 9: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.http2_protocol_options:type_name -> envoy.api.v2.core.Http2ProtocolOptions + 5, // 1: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.rds:type_name -> envoy.config.filter.network.http_connection_manager.v2.Rds + 19, // 2: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.route_config:type_name -> envoy.api.v2.RouteConfiguration + 7, // 3: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.scoped_routes:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes + 9, // 4: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.http_filters:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpFilter + 20, // 5: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue + 11, // 6: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.tracing:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing + 21, // 7: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.api.v2.core.HttpProtocolOptions + 22, // 8: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.http_protocol_options:type_name -> envoy.api.v2.core.Http1ProtocolOptions + 23, // 9: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.http2_protocol_options:type_name -> envoy.api.v2.core.Http2ProtocolOptions 1, // 10: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.server_header_transformation:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.ServerHeaderTransformation - 25, // 11: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value - 26, // 12: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.idle_timeout:type_name -> google.protobuf.Duration - 26, // 13: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration - 26, // 14: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration - 26, // 15: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration - 26, // 16: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration - 27, // 17: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.access_log:type_name -> envoy.config.filter.accesslog.v2.AccessLog - 21, // 18: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue - 13, // 19: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.internal_address_config:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig - 21, // 20: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue + 24, // 11: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value + 25, // 12: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.idle_timeout:type_name -> google.protobuf.Duration + 25, // 13: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration + 25, // 14: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration + 25, // 15: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration + 25, // 16: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration + 26, // 17: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.access_log:type_name -> envoy.config.filter.accesslog.v2.AccessLog + 20, // 18: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue + 12, // 19: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.internal_address_config:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig + 20, // 20: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue 2, // 21: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.forward_client_cert_details:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.ForwardClientCertDetails - 14, // 22: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.set_current_client_cert_details:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails - 15, // 23: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.upgrade_configs:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig - 21, // 24: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue - 3, // 25: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.path_with_escaped_slashes_action:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.PathWithEscapedSlashesAction - 11, // 26: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.request_id_extension:type_name -> envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension - 28, // 27: envoy.config.filter.network.http_connection_manager.v2.Rds.config_source:type_name -> envoy.api.v2.core.ConfigSource - 29, // 28: envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.api.v2.ScopedRouteConfiguration - 16, // 29: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder - 28, // 30: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.rds_config_source:type_name -> envoy.api.v2.core.ConfigSource - 7, // 31: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_route_configurations_list:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList - 9, // 32: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_rds:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRds - 28, // 33: envoy.config.filter.network.http_connection_manager.v2.ScopedRds.scoped_rds_config_source:type_name -> envoy.api.v2.core.ConfigSource - 30, // 34: envoy.config.filter.network.http_connection_manager.v2.HttpFilter.config:type_name -> google.protobuf.Struct - 31, // 35: envoy.config.filter.network.http_connection_manager.v2.HttpFilter.typed_config:type_name -> google.protobuf.Any - 31, // 36: envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension.typed_config:type_name -> google.protobuf.Any - 4, // 37: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.operation_name:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.OperationName - 32, // 38: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.Percent - 32, // 39: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.Percent - 32, // 40: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.Percent - 25, // 41: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value - 33, // 42: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v2.CustomTag - 34, // 43: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v2.Tracing.Http - 21, // 44: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue - 10, // 45: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig.filters:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpFilter - 21, // 46: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 17, // 47: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.fragments:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder - 18, // 48: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.header_value_extractor:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor - 19, // 49: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement - 50, // [50:50] is the sub-list for method output_type - 50, // [50:50] is the sub-list for method input_type - 50, // [50:50] is the sub-list for extension type_name - 50, // [50:50] is the sub-list for extension extendee - 0, // [0:50] is the sub-list for field type_name + 13, // 22: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.set_current_client_cert_details:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails + 14, // 23: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.upgrade_configs:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig + 20, // 24: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue + 10, // 25: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.request_id_extension:type_name -> envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension + 27, // 26: envoy.config.filter.network.http_connection_manager.v2.Rds.config_source:type_name -> envoy.api.v2.core.ConfigSource + 28, // 27: envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.api.v2.ScopedRouteConfiguration + 15, // 28: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder + 27, // 29: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.rds_config_source:type_name -> envoy.api.v2.core.ConfigSource + 6, // 30: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_route_configurations_list:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList + 8, // 31: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_rds:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRds + 27, // 32: envoy.config.filter.network.http_connection_manager.v2.ScopedRds.scoped_rds_config_source:type_name -> envoy.api.v2.core.ConfigSource + 29, // 33: envoy.config.filter.network.http_connection_manager.v2.HttpFilter.config:type_name -> google.protobuf.Struct + 30, // 34: envoy.config.filter.network.http_connection_manager.v2.HttpFilter.typed_config:type_name -> google.protobuf.Any + 30, // 35: envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension.typed_config:type_name -> google.protobuf.Any + 3, // 36: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.operation_name:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.OperationName + 31, // 37: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.Percent + 31, // 38: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.Percent + 31, // 39: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.Percent + 24, // 40: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value + 32, // 41: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v2.CustomTag + 33, // 42: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v2.Tracing.Http + 20, // 43: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue + 9, // 44: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig.filters:type_name -> envoy.config.filter.network.http_connection_manager.v2.HttpFilter + 20, // 45: envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue + 16, // 46: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.fragments:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder + 17, // 47: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.header_value_extractor:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor + 18, // 48: envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement + 49, // [49:49] is the sub-list for method output_type + 49, // [49:49] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } func init() { @@ -2877,7 +2748,7 @@ func file_envoy_config_filter_network_http_connection_manager_v2_http_connection File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_rawDesc, - NumEnums: 5, + NumEnums: 4, NumMessages: 15, NumExtensions: 0, NumServices: 0, diff --git a/pkg/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.validate.go b/pkg/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.validate.go index 86c4848e12..b47209800b 100644 --- a/pkg/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.validate.go +++ b/pkg/api/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 envoy_config_filter_network_http_connection_manager_v2 +package http_connection_managerv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpConnectionManager) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpConnectionManager with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpConnectionManagerMultiError, or nil if none found. +func (m *HttpConnectionManager) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HttpConnectionManager_CodecType_name[int32(m.GetCodecType())]; !ok { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "CodecType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetStatPrefix()) < 1 { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHttpFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("HttpFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("HttpFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: fmt.Sprintf("HttpFilters[%v]", idx), @@ -70,7 +113,26 @@ func (m *HttpConnectionManager) Validate() error { } - if v, ok := interface{}(m.GetAddUserAgent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddUserAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "AddUserAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "AddUserAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddUserAgent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "AddUserAgent", @@ -80,7 +142,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTracing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "Tracing", @@ -90,7 +171,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "CommonHttpProtocolOptions", @@ -100,7 +200,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "HttpProtocolOptions", @@ -110,7 +229,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "Http2ProtocolOptions", @@ -123,24 +261,51 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for ServerName if _, ok := HttpConnectionManager_ServerHeaderTransformation_name[int32(m.GetServerHeaderTransformation())]; !ok { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "ServerHeaderTransformation", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetMaxRequestHeadersKb(); wrapper != nil { - if val := wrapper.GetValue(); val <= 0 || val > 96 { - return HttpConnectionManagerValidationError{ + if val := wrapper.GetValue(); val <= 0 || val > 8192 { + err := HttpConnectionManagerValidationError{ field: "MaxRequestHeadersKb", - reason: "value must be inside range (0, 96]", + reason: "value must be inside range (0, 8192]", + } + if !all { + return err } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "IdleTimeout", @@ -150,7 +315,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetStreamIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStreamIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "StreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "StreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "StreamIdleTimeout", @@ -160,7 +344,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "RequestTimeout", @@ -170,7 +373,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetDrainTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDrainTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DrainTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DrainTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "DrainTimeout", @@ -180,7 +402,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetDelayedCloseTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDelayedCloseTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DelayedCloseTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DelayedCloseTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelayedCloseTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "DelayedCloseTimeout", @@ -193,7 +434,26 @@ func (m *HttpConnectionManager) Validate() error { for idx, item := range m.GetAccessLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: fmt.Sprintf("AccessLog[%v]", idx), @@ -205,7 +465,26 @@ func (m *HttpConnectionManager) Validate() error { } - if v, ok := interface{}(m.GetUseRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "UseRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "UseRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "UseRemoteAddress", @@ -217,7 +496,26 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for XffNumTrustedHops - if v, ok := interface{}(m.GetInternalAddressConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInternalAddressConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "InternalAddressConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "InternalAddressConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInternalAddressConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "InternalAddressConfig", @@ -231,7 +529,26 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for Via - if v, ok := interface{}(m.GetGenerateRequestId()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGenerateRequestId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "GenerateRequestId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "GenerateRequestId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGenerateRequestId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "GenerateRequestId", @@ -244,13 +561,36 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for PreserveExternalRequestId if _, ok := HttpConnectionManager_ForwardClientCertDetails_name[int32(m.GetForwardClientCertDetails())]; !ok { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "ForwardClientCertDetails", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSetCurrentClientCertDetails()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSetCurrentClientCertDetails()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "SetCurrentClientCertDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "SetCurrentClientCertDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSetCurrentClientCertDetails()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "SetCurrentClientCertDetails", @@ -267,7 +607,26 @@ func (m *HttpConnectionManager) Validate() error { for idx, item := range m.GetUpgradeConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: fmt.Sprintf("UpgradeConfigs[%v]", idx), @@ -279,7 +638,26 @@ func (m *HttpConnectionManager) Validate() error { } - if v, ok := interface{}(m.GetNormalizePath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNormalizePath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "NormalizePath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "NormalizePath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNormalizePath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "NormalizePath", @@ -291,9 +669,26 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for MergeSlashes - // no validation rules for PathWithEscapedSlashesAction - - if v, ok := interface{}(m.GetRequestIdExtension()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestIdExtension()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestIdExtension", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestIdExtension", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestIdExtension()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "RequestIdExtension", @@ -303,13 +698,30 @@ func (m *HttpConnectionManager) Validate() error { } } - // no validation rules for StripMatchingHostPort - switch m.RouteSpecifier.(type) { case *HttpConnectionManager_Rds: - if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "Rds", @@ -321,7 +733,26 @@ func (m *HttpConnectionManager) Validate() error { case *HttpConnectionManager_RouteConfig: - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "RouteConfig", @@ -333,7 +764,26 @@ func (m *HttpConnectionManager) Validate() error { case *HttpConnectionManager_ScopedRoutes: - if v, ok := interface{}(m.GetScopedRoutes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRoutes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "ScopedRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "ScopedRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRoutes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "ScopedRoutes", @@ -344,16 +794,41 @@ func (m *HttpConnectionManager) Validate() error { } default: - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "RouteSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HttpConnectionManagerMultiError(errors) } return nil } +// HttpConnectionManagerMultiError is an error wrapping multiple validation +// errors returned by HttpConnectionManager.ValidateAll() if the designated +// constraints aren't met. +type HttpConnectionManagerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManagerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManagerMultiError) AllErrors() []error { return m } + // HttpConnectionManagerValidationError is the validation error returned by // HttpConnectionManager.Validate if the designated constraints aren't met. type HttpConnectionManagerValidationError struct { @@ -411,20 +886,57 @@ var _ interface { } = HttpConnectionManagerValidationError{} // Validate checks the field values on Rds with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Rds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Rds with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RdsMultiError, or nil if none found. +func (m *Rds) ValidateAll() error { + return m.validate(true) +} + +func (m *Rds) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetConfigSource() == nil { - return RdsValidationError{ + err := RdsValidationError{ field: "ConfigSource", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RdsValidationError{ field: "ConfigSource", @@ -435,15 +947,39 @@ func (m *Rds) Validate() error { } if len(m.GetRouteConfigName()) < 1 { - return RdsValidationError{ + err := RdsValidationError{ field: "RouteConfigName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RdsMultiError(errors) } return nil } +// RdsMultiError is an error wrapping multiple validation errors returned by +// Rds.ValidateAll() if the designated constraints aren't met. +type RdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RdsMultiError) AllErrors() []error { return m } + // RdsValidationError is the validation error returned by Rds.Validate if the // designated constraints aren't met. type RdsValidationError struct { @@ -500,23 +1036,60 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRouteConfigurationsList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfigurationsList with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ScopedRouteConfigurationsListMultiError, or nil if none found. +func (m *ScopedRouteConfigurationsList) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfigurationsList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetScopedRouteConfigurations()) < 1 { - return ScopedRouteConfigurationsListValidationError{ + err := ScopedRouteConfigurationsListValidationError{ field: "ScopedRouteConfigurations", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetScopedRouteConfigurations() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRouteConfigurationsListValidationError{ + field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRouteConfigurationsListValidationError{ + field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRouteConfigurationsListValidationError{ field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx), @@ -528,9 +1101,30 @@ func (m *ScopedRouteConfigurationsList) Validate() error { } + if len(errors) > 0 { + return ScopedRouteConfigurationsListMultiError(errors) + } + return nil } +// ScopedRouteConfigurationsListMultiError is an error wrapping multiple +// validation errors returned by ScopedRouteConfigurationsList.ValidateAll() +// if the designated constraints aren't met. +type ScopedRouteConfigurationsListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfigurationsListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfigurationsListMultiError) AllErrors() []error { return m } + // ScopedRouteConfigurationsListValidationError is the validation error // returned by ScopedRouteConfigurationsList.Validate if the designated // constraints aren't met. @@ -589,28 +1183,69 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRoutes with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ScopedRoutesMultiError, or +// nil if none found. +func (m *ScopedRoutes) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return ScopedRoutesValidationError{ + err := ScopedRoutesValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetScopeKeyBuilder() == nil { - return ScopedRoutesValidationError{ + err := ScopedRoutesValidationError{ field: "ScopeKeyBuilder", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetScopeKeyBuilder()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopeKeyBuilder()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopeKeyBuilder", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopeKeyBuilder", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopeKeyBuilder()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "ScopeKeyBuilder", @@ -621,13 +1256,36 @@ func (m *ScopedRoutes) Validate() error { } if m.GetRdsConfigSource() == nil { - return ScopedRoutesValidationError{ + err := ScopedRoutesValidationError{ field: "RdsConfigSource", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRdsConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRdsConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "RdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "RdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRdsConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "RdsConfigSource", @@ -641,7 +1299,26 @@ func (m *ScopedRoutes) Validate() error { case *ScopedRoutes_ScopedRouteConfigurationsList: - if v, ok := interface{}(m.GetScopedRouteConfigurationsList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRouteConfigurationsList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRouteConfigurationsList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRouteConfigurationsList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRouteConfigurationsList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "ScopedRouteConfigurationsList", @@ -653,7 +1330,26 @@ func (m *ScopedRoutes) Validate() error { case *ScopedRoutes_ScopedRds: - if v, ok := interface{}(m.GetScopedRds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "ScopedRds", @@ -664,16 +1360,40 @@ func (m *ScopedRoutes) Validate() error { } default: - return ScopedRoutesValidationError{ + err := ScopedRoutesValidationError{ field: "ConfigSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ScopedRoutesMultiError(errors) } return nil } +// ScopedRoutesMultiError is an error wrapping multiple validation errors +// returned by ScopedRoutes.ValidateAll() if the designated constraints aren't met. +type ScopedRoutesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesMultiError) AllErrors() []error { return m } + // ScopedRoutesValidationError is the validation error returned by // ScopedRoutes.Validate if the designated constraints aren't met. type ScopedRoutesValidationError struct { @@ -729,20 +1449,58 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRds with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ScopedRdsMultiError, or nil +// if none found. +func (m *ScopedRds) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRds) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetScopedRdsConfigSource() == nil { - return ScopedRdsValidationError{ + err := ScopedRdsValidationError{ field: "ScopedRdsConfigSource", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetScopedRdsConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRdsConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRdsValidationError{ + field: "ScopedRdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRdsValidationError{ + field: "ScopedRdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRdsConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRdsValidationError{ field: "ScopedRdsConfigSource", @@ -752,9 +1510,29 @@ func (m *ScopedRds) Validate() error { } } + if len(errors) > 0 { + return ScopedRdsMultiError(errors) + } + return nil } +// ScopedRdsMultiError is an error wrapping multiple validation errors returned +// by ScopedRds.ValidateAll() if the designated constraints aren't met. +type ScopedRdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRdsMultiError) AllErrors() []error { return m } + // ScopedRdsValidationError is the validation error returned by // ScopedRds.Validate if the designated constraints aren't met. type ScopedRdsValidationError struct { @@ -810,24 +1588,62 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpFilterMultiError, or +// nil if none found. +func (m *HttpFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return HttpFilterValidationError{ + err := HttpFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *HttpFilter_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpFilterValidationError{ field: "Config", @@ -839,7 +1655,26 @@ func (m *HttpFilter) Validate() error { case *HttpFilter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpFilterValidationError{ field: "TypedConfig", @@ -851,9 +1686,29 @@ func (m *HttpFilter) Validate() error { } + if len(errors) > 0 { + return HttpFilterMultiError(errors) + } + return nil } +// HttpFilterMultiError is an error wrapping multiple validation errors +// returned by HttpFilter.ValidateAll() if the designated constraints aren't met. +type HttpFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpFilterMultiError) AllErrors() []error { return m } + // HttpFilterValidationError is the validation error returned by // HttpFilter.Validate if the designated constraints aren't met. type HttpFilterValidationError struct { @@ -910,13 +1765,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RequestIDExtension) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RequestIDExtension with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RequestIDExtensionMultiError, or nil if none found. +func (m *RequestIDExtension) ValidateAll() error { + return m.validate(true) +} + +func (m *RequestIDExtension) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequestIDExtensionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequestIDExtensionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequestIDExtensionValidationError{ field: "TypedConfig", @@ -926,9 +1814,30 @@ func (m *RequestIDExtension) Validate() error { } } + if len(errors) > 0 { + return RequestIDExtensionMultiError(errors) + } + return nil } +// RequestIDExtensionMultiError is an error wrapping multiple validation errors +// returned by RequestIDExtension.ValidateAll() if the designated constraints +// aren't met. +type RequestIDExtensionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RequestIDExtensionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RequestIDExtensionMultiError) AllErrors() []error { return m } + // RequestIDExtensionValidationError is the validation error returned by // RequestIDExtension.Validate if the designated constraints aren't met. type RequestIDExtensionValidationError struct { @@ -987,20 +1896,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpConnectionManager_Tracing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpConnectionManager_Tracing with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// HttpConnectionManager_TracingMultiError, or nil if none found. +func (m *HttpConnectionManager_Tracing) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_Tracing) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HttpConnectionManager_Tracing_OperationName_name[int32(m.GetOperationName())]; !ok { - return HttpConnectionManager_TracingValidationError{ + err := HttpConnectionManager_TracingValidationError{ field: "OperationName", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClientSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: "ClientSampling", @@ -1010,7 +1956,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { } } - if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRandomSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: "RandomSampling", @@ -1020,7 +1985,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { } } - if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOverallSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: "OverallSampling", @@ -1032,7 +2016,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { // no validation rules for Verbose - if v, ok := interface{}(m.GetMaxPathTagLength()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxPathTagLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "MaxPathTagLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "MaxPathTagLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPathTagLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: "MaxPathTagLength", @@ -1045,7 +2048,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { for idx, item := range m.GetCustomTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: fmt.Sprintf("CustomTags[%v]", idx), @@ -1057,7 +2079,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { } - if v, ok := interface{}(m.GetProvider()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProvider()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "Provider", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "Provider", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProvider()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: "Provider", @@ -1067,9 +2108,30 @@ func (m *HttpConnectionManager_Tracing) Validate() error { } } + if len(errors) > 0 { + return HttpConnectionManager_TracingMultiError(errors) + } + return nil } +// HttpConnectionManager_TracingMultiError is an error wrapping multiple +// validation errors returned by HttpConnectionManager_Tracing.ValidateAll() +// if the designated constraints aren't met. +type HttpConnectionManager_TracingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_TracingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_TracingMultiError) AllErrors() []error { return m } + // HttpConnectionManager_TracingValidationError is the validation error // returned by HttpConnectionManager_Tracing.Validate if the designated // constraints aren't met. @@ -1129,17 +2191,55 @@ var _ interface { // Validate checks the field values on // HttpConnectionManager_InternalAddressConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpConnectionManager_InternalAddressConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpConnectionManager_InternalAddressConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// HttpConnectionManager_InternalAddressConfigMultiError, or nil if none found. +func (m *HttpConnectionManager_InternalAddressConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_InternalAddressConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for UnixSockets + if len(errors) > 0 { + return HttpConnectionManager_InternalAddressConfigMultiError(errors) + } + return nil } +// HttpConnectionManager_InternalAddressConfigMultiError is an error wrapping +// multiple validation errors returned by +// HttpConnectionManager_InternalAddressConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpConnectionManager_InternalAddressConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_InternalAddressConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_InternalAddressConfigMultiError) AllErrors() []error { return m } + // HttpConnectionManager_InternalAddressConfigValidationError is the validation // error returned by HttpConnectionManager_InternalAddressConfig.Validate if // the designated constraints aren't met. @@ -1199,14 +2299,48 @@ var _ interface { // Validate checks the field values on // HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpConnectionManager_SetCurrentClientCertDetails) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// HttpConnectionManager_SetCurrentClientCertDetailsMultiError, or nil if none found. +func (m *HttpConnectionManager_SetCurrentClientCertDetails) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_SetCurrentClientCertDetails) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ field: "Subject", @@ -1224,9 +2358,31 @@ func (m *HttpConnectionManager_SetCurrentClientCertDetails) Validate() error { // no validation rules for Uri + if len(errors) > 0 { + return HttpConnectionManager_SetCurrentClientCertDetailsMultiError(errors) + } + return nil } +// HttpConnectionManager_SetCurrentClientCertDetailsMultiError is an error +// wrapping multiple validation errors returned by +// HttpConnectionManager_SetCurrentClientCertDetails.ValidateAll() if the +// designated constraints aren't met. +type HttpConnectionManager_SetCurrentClientCertDetailsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_SetCurrentClientCertDetailsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_SetCurrentClientCertDetailsMultiError) AllErrors() []error { return m } + // HttpConnectionManager_SetCurrentClientCertDetailsValidationError is the // validation error returned by // HttpConnectionManager_SetCurrentClientCertDetails.Validate if the @@ -1293,18 +2449,52 @@ var _ interface { // Validate checks the field values on HttpConnectionManager_UpgradeConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *HttpConnectionManager_UpgradeConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpConnectionManager_UpgradeConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// HttpConnectionManager_UpgradeConfigMultiError, or nil if none found. +func (m *HttpConnectionManager_UpgradeConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_UpgradeConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for UpgradeType for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_UpgradeConfigValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -1316,7 +2506,26 @@ func (m *HttpConnectionManager_UpgradeConfig) Validate() error { } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_UpgradeConfigValidationError{ field: "Enabled", @@ -1326,9 +2535,31 @@ func (m *HttpConnectionManager_UpgradeConfig) Validate() error { } } + if len(errors) > 0 { + return HttpConnectionManager_UpgradeConfigMultiError(errors) + } + return nil } +// HttpConnectionManager_UpgradeConfigMultiError is an error wrapping multiple +// validation errors returned by +// HttpConnectionManager_UpgradeConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpConnectionManager_UpgradeConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_UpgradeConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_UpgradeConfigMultiError) AllErrors() []error { return m } + // HttpConnectionManager_UpgradeConfigValidationError is the validation error // returned by HttpConnectionManager_UpgradeConfig.Validate if the designated // constraints aren't met. @@ -1388,23 +2619,60 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRoutes_ScopeKeyBuilder with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilderMultiError, or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFragments()) < 1 { - return ScopedRoutes_ScopeKeyBuilderValidationError{ + err := ScopedRoutes_ScopeKeyBuilderValidationError{ field: "Fragments", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFragments() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilderValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilderValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutes_ScopeKeyBuilderValidationError{ field: fmt.Sprintf("Fragments[%v]", idx), @@ -1416,9 +2684,30 @@ func (m *ScopedRoutes_ScopeKeyBuilder) Validate() error { } + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilderMultiError(errors) + } + return nil } +// ScopedRoutes_ScopeKeyBuilderMultiError is an error wrapping multiple +// validation errors returned by ScopedRoutes_ScopeKeyBuilder.ValidateAll() if +// the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilderMultiError) AllErrors() []error { return m } + // ScopedRoutes_ScopeKeyBuilderValidationError is the validation error returned // by ScopedRoutes_ScopeKeyBuilder.Validate if the designated constraints // aren't met. @@ -1478,17 +2767,52 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError, or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Type.(type) { case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_: - if v, ok := interface{}(m.GetHeaderValueExtractor()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderValueExtractor()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + field: "HeaderValueExtractor", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + field: "HeaderValueExtractor", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderValueExtractor()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ field: "HeaderValueExtractor", @@ -1499,16 +2823,42 @@ func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Validate() error { } default: - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ field: "Type", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError(errors) } return nil } +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError is an error wrapping +// multiple validation errors returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError) AllErrors() []error { return m } + // ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError is the // validation error returned by // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Validate if the designated @@ -1570,17 +2920,37 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Validate() error { + return m.validate(false) +} + +// ValidateAll 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, the result is a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError, +// or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ElementSeparator @@ -1592,7 +2962,26 @@ func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Vali case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element: - if v, ok := interface{}(m.GetElement()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetElement()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + field: "Element", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + field: "Element", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetElement()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ field: "Element", @@ -1604,9 +2993,33 @@ func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Vali } + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError(errors) + } + return nil } +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError +// is an error wrapping multiple validation errors returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.ValidateAll() +// if the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError) AllErrors() []error { + return m +} + // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError // is the validation error returned by // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Validate @@ -1676,29 +3089,78 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Validate() error { + return m.validate(false) +} + +// ValidateAll 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, the result is a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError, +// or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetSeparator()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ field: "Separator", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetKey()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError(errors) } return nil } +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError +// is an error wrapping multiple validation errors returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.ValidateAll() +// if the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError) AllErrors() []error { + return m +} + // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError // is the validation error returned by // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Validate diff --git a/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.go b/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.go index 02ddf17234..86f7cfcf2e 100644 --- a/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.go +++ b/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto -package envoy_config_filter_network_kafka_broker_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type KafkaBroker struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -94,17 +89,23 @@ var file_envoy_config_filter_network_kafka_broker_v2alpha1_kafka_broker_proto_ra 0x6f, 0x22, 0x37, 0x0a, 0x0b, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x95, 0x01, 0x0a, 0x3f, 0x69, + 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0xef, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x32, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6b, 0x61, 0x66, 0x6b, 0x61, - 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, 0x6f, + 0x6b, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x32, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.validate.go b/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.validate.go index 863ed81837..6a25e5f7a7 100644 --- a/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto -package envoy_config_filter_network_kafka_broker_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on KafkaBroker with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *KafkaBroker) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on KafkaBroker with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in KafkaBrokerMultiError, or +// nil if none found. +func (m *KafkaBroker) ValidateAll() error { + return m.validate(true) +} + +func (m *KafkaBroker) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return KafkaBrokerValidationError{ + err := KafkaBrokerValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return KafkaBrokerMultiError(errors) } return nil } +// KafkaBrokerMultiError is an error wrapping multiple validation errors +// returned by KafkaBroker.ValidateAll() if the designated constraints aren't met. +type KafkaBrokerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m KafkaBrokerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m KafkaBrokerMultiError) AllErrors() []error { return m } + // KafkaBrokerValidationError is the validation error returned by // KafkaBroker.Validate if the designated constraints aren't met. type KafkaBrokerValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.go b/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.go index a9d5d6f659..401bb30db0 100644 --- a/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.go +++ b/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto -package envoy_config_filter_network_local_rate_limit_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type LocalRateLimit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -141,18 +136,24 @@ var file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_p 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x9e, 0x01, 0x0a, 0x42, + 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0xfb, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, - 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.validate.go b/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.validate.go index 07ba19f50b..c87c216fb5 100644 --- a/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto -package envoy_config_filter_network_local_rate_limit_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,32 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on LocalRateLimit with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LocalRateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalRateLimit with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LocalRateLimitMultiError, +// or nil if none found. +func (m *LocalRateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalRateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return LocalRateLimitValidationError{ + err := LocalRateLimitValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetTokenBucket() == nil { - return LocalRateLimitValidationError{ + err := LocalRateLimitValidationError{ field: "TokenBucket", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTokenBucket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "TokenBucket", @@ -65,7 +108,26 @@ func (m *LocalRateLimit) Validate() error { } } - if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "RuntimeEnabled", @@ -75,9 +137,30 @@ func (m *LocalRateLimit) Validate() error { } } + if len(errors) > 0 { + return LocalRateLimitMultiError(errors) + } + return nil } +// LocalRateLimitMultiError is an error wrapping multiple validation errors +// returned by LocalRateLimit.ValidateAll() if the designated constraints +// aren't met. +type LocalRateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalRateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalRateLimitMultiError) AllErrors() []error { return m } + // LocalRateLimitValidationError is the validation error returned by // LocalRateLimit.Validate if the designated constraints aren't met. type LocalRateLimitValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.go b/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.go index 9da70ba206..35947c9c09 100644 --- a/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.go +++ b/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto -package envoy_config_filter_network_mongo_proxy_v2 +package mongo_proxyv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/fault/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type MongoProxy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -140,16 +135,22 @@ var file_envoy_config_filter_network_mongo_proxy_v2_mongo_proxy_proto_rawDesc = 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x8c, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xed, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, 0x6f, 0x6e, + 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, 0x3b, 0x6d, 0x6f, 0x6e, 0x67, + 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.validate.go b/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.validate.go index 2ef4182b80..e573af061e 100644 --- a/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto -package envoy_config_filter_network_mongo_proxy_v2 +package mongo_proxyv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MongoProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MongoProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MongoProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MongoProxyMultiError, or +// nil if none found. +func (m *MongoProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *MongoProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return MongoProxyValidationError{ + err := MongoProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AccessLog - if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MongoProxyValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MongoProxyValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MongoProxyValidationError{ field: "Delay", @@ -61,9 +101,29 @@ func (m *MongoProxy) Validate() error { // no validation rules for EmitDynamicMetadata + if len(errors) > 0 { + return MongoProxyMultiError(errors) + } + return nil } +// MongoProxyMultiError is an error wrapping multiple validation errors +// returned by MongoProxy.ValidateAll() if the designated constraints aren't met. +type MongoProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MongoProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MongoProxyMultiError) AllErrors() []error { return m } + // MongoProxyValidationError is the validation error returned by // MongoProxy.Validate if the designated constraints aren't met. type MongoProxyValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.go b/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.go index 4091454b07..ac51f29249 100644 --- a/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.go +++ b/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto -package envoy_config_filter_network_mysql_proxy_v1alpha1 +package v1alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type MySQLProxy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -107,17 +102,22 @@ var file_envoy_config_filter_network_mysql_proxy_v1alpha1_mysql_proxy_proto_rawD 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x42, 0x92, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x42, 0xeb, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x31, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x79, 0x73, + 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.validate.go b/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.validate.go index 2d2a1cefb8..0b5ba3db84 100644 --- a/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto -package envoy_config_filter_network_mysql_proxy_v1alpha1 +package v1alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MySQLProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MySQLProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MySQLProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MySQLProxyMultiError, or +// nil if none found. +func (m *MySQLProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *MySQLProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return MySQLProxyValidationError{ + err := MySQLProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AccessLog + if len(errors) > 0 { + return MySQLProxyMultiError(errors) + } + return nil } +// MySQLProxyMultiError is an error wrapping multiple validation errors +// returned by MySQLProxy.ValidateAll() if the designated constraints aren't met. +type MySQLProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MySQLProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MySQLProxyMultiError) AllErrors() []error { return m } + // MySQLProxyValidationError is the validation error returned by // MySQLProxy.Validate if the designated constraints aren't met. type MySQLProxyValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.go b/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.go index 6cf7afa091..6bf78d95ba 100644 --- a/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.go +++ b/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/rate_limit/v2/rate_limit.proto -package envoy_config_filter_network_rate_limit_v2 +package rate_limitv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" ratelimit "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/ratelimit" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 7] type RateLimit struct { state protoimpl.MessageState @@ -175,16 +170,22 @@ var file_envoy_config_filter_network_rate_limit_v2_rate_limit_proto_rawDesc = [] 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x88, 0x01, 0x0a, 0x37, 0x69, + 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0xe7, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.validate.go b/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.validate.go index 27169299ae..72865e5ee9 100644 --- a/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/rate_limit/v2/rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/rate_limit/v2/rate_limit.proto -package envoy_config_filter_network_rate_limit_v2 +package rate_limitv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,41 +31,88 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetDomain()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Domain", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetDescriptors()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Descriptors", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetDescriptors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: fmt.Sprintf("Descriptors[%v]", idx), @@ -76,7 +124,26 @@ func (m *RateLimit) Validate() error { } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "Timeout", @@ -89,13 +156,36 @@ func (m *RateLimit) Validate() error { // no validation rules for FailureModeDeny if m.GetRateLimitService() == nil { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RateLimitService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "RateLimitService", @@ -105,9 +195,29 @@ func (m *RateLimit) Validate() error { } } + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.go b/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.go index dc136bf602..297c069974 100644 --- a/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.go +++ b/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/rbac/v2/rbac.proto -package envoy_config_filter_network_rbac_v2 +package rbacv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/rbac/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RBAC_EnforcementType int32 const ( @@ -201,15 +196,20 @@ var file_envoy_config_filter_network_rbac_v2_rbac_proto_rawDesc = []byte{ 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x4e, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x54, 0x49, - 0x4e, 0x55, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x42, 0x78, 0x0a, 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x52, 0x62, - 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2a, 0x12, - 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4e, 0x55, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x42, 0xcb, 0x01, 0x0a, 0x31, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x52, + 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, + 0x62, 0x61, 0x63, 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x62, 0x61, 0x63, 0x76, 0x32, 0xf2, 0x98, 0xfe, + 0x8f, 0x05, 0x2a, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.validate.go b/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.validate.go index 12fc250d42..3f9353d1c8 100644 --- a/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/rbac/v2/rbac.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/rbac/v2/rbac.proto -package envoy_config_filter_network_rbac_v2 +package rbacv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "Rules", @@ -50,7 +85,26 @@ func (m *RBAC) Validate() error { } } - if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "ShadowRules", @@ -61,17 +115,41 @@ func (m *RBAC) Validate() error { } if len(m.GetStatPrefix()) < 1 { - return RBACValidationError{ + err := RBACValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for EnforcementType + if len(errors) > 0 { + return RBACMultiError(errors) + } + return nil } +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + // RBACValidationError is the validation error returned by RBAC.Validate if the // designated constraints aren't met. type RBACValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.go b/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.go index 4b69bd8849..21d0a481b7 100644 --- a/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.go +++ b/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto -package envoy_config_filter_network_redis_proxy_v2 +package redis_proxyv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // ReadPolicy controls how Envoy routes read commands to Redis nodes. This is currently // supported for Redis Cluster. All ReadPolicy settings except MASTER may return stale data // because replication is asynchronous and requires some delay. You need to ensure that your @@ -828,17 +823,23 @@ var file_envoy_config_filter_network_redis_proxy_v2_redis_proxy_proto_rawDesc = 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, - 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x8c, + 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0xed, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x52, 0x65, 0x64, - 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, + 0x32, 0x3b, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x32, 0xf2, + 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go b/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go index ab937ba72c..36084d7a8f 100644 --- a/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto -package envoy_config_filter_network_redis_proxy_v2 +package redis_proxyv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,33 +31,76 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RedisProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RedisProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RedisProxyMultiError, or +// nil if none found. +func (m *RedisProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return RedisProxyValidationError{ + err := RedisProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Cluster if m.GetSettings() == nil { - return RedisProxyValidationError{ + err := RedisProxyValidationError{ field: "Settings", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSettings()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "Settings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "Settings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSettings()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "Settings", @@ -68,7 +112,26 @@ func (m *RedisProxy) Validate() error { // no validation rules for LatencyInMicros - if v, ok := interface{}(m.GetPrefixRoutes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrefixRoutes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "PrefixRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "PrefixRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrefixRoutes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "PrefixRoutes", @@ -78,7 +141,26 @@ func (m *RedisProxy) Validate() error { } } - if v, ok := interface{}(m.GetDownstreamAuthPassword()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamAuthPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamAuthPassword()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "DownstreamAuthPassword", @@ -88,9 +170,29 @@ func (m *RedisProxy) Validate() error { } } + if len(errors) > 0 { + return RedisProxyMultiError(errors) + } + return nil } +// RedisProxyMultiError is an error wrapping multiple validation errors +// returned by RedisProxy.ValidateAll() if the designated constraints aren't met. +type RedisProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxyMultiError) AllErrors() []error { return m } + // RedisProxyValidationError is the validation error returned by // RedisProxy.Validate if the designated constraints aren't met. type RedisProxyValidationError struct { @@ -147,13 +249,46 @@ var _ interface { // Validate checks the field values on RedisProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisProtocolOptionsMultiError, or nil if none found. +func (m *RedisProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAuthPassword()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAuthPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthPassword()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProtocolOptionsValidationError{ field: "AuthPassword", @@ -163,9 +298,30 @@ func (m *RedisProtocolOptions) Validate() error { } } + if len(errors) > 0 { + return RedisProtocolOptionsMultiError(errors) + } + return nil } +// RedisProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by RedisProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type RedisProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProtocolOptionsMultiError) AllErrors() []error { return m } + // RedisProtocolOptionsValidationError is the validation error returned by // RedisProtocolOptions.Validate if the designated constraints aren't met. type RedisProtocolOptionsValidationError struct { @@ -224,17 +380,35 @@ var _ interface { // Validate checks the field values on RedisProxy_ConnPoolSettings with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProxy_ConnPoolSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_ConnPoolSettings with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisProxy_ConnPoolSettingsMultiError, or nil if none found. +func (m *RedisProxy_ConnPoolSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_ConnPoolSettings) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetOpTimeout() == nil { - return RedisProxy_ConnPoolSettingsValidationError{ + err := RedisProxy_ConnPoolSettingsValidationError{ field: "OpTimeout", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for EnableHashtagging @@ -243,7 +417,26 @@ func (m *RedisProxy_ConnPoolSettings) Validate() error { // no validation rules for MaxBufferSizeBeforeFlush - if v, ok := interface{}(m.GetBufferFlushTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBufferFlushTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "BufferFlushTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "BufferFlushTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferFlushTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "BufferFlushTimeout", @@ -253,7 +446,26 @@ func (m *RedisProxy_ConnPoolSettings) Validate() error { } } - if v, ok := interface{}(m.GetMaxUpstreamUnknownConnections()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxUpstreamUnknownConnections()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "MaxUpstreamUnknownConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "MaxUpstreamUnknownConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxUpstreamUnknownConnections()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "MaxUpstreamUnknownConnections", @@ -266,15 +478,40 @@ func (m *RedisProxy_ConnPoolSettings) Validate() error { // no validation rules for EnableCommandStats if _, ok := RedisProxy_ConnPoolSettings_ReadPolicy_name[int32(m.GetReadPolicy())]; !ok { - return RedisProxy_ConnPoolSettingsValidationError{ + err := RedisProxy_ConnPoolSettingsValidationError{ field: "ReadPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RedisProxy_ConnPoolSettingsMultiError(errors) } return nil } +// RedisProxy_ConnPoolSettingsMultiError is an error wrapping multiple +// validation errors returned by RedisProxy_ConnPoolSettings.ValidateAll() if +// the designated constraints aren't met. +type RedisProxy_ConnPoolSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_ConnPoolSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_ConnPoolSettingsMultiError) AllErrors() []error { return m } + // RedisProxy_ConnPoolSettingsValidationError is the validation error returned // by RedisProxy_ConnPoolSettings.Validate if the designated constraints // aren't met. @@ -334,16 +571,49 @@ var _ interface { // Validate checks the field values on RedisProxy_PrefixRoutes with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProxy_PrefixRoutes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_PrefixRoutes with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisProxy_PrefixRoutesMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutesValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -359,7 +629,26 @@ func (m *RedisProxy_PrefixRoutes) Validate() error { // no validation rules for CatchAllCluster - if v, ok := interface{}(m.GetCatchAllRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCatchAllRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: "CatchAllRoute", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: "CatchAllRoute", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCatchAllRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutesValidationError{ field: "CatchAllRoute", @@ -369,9 +658,30 @@ func (m *RedisProxy_PrefixRoutes) Validate() error { } } + if len(errors) > 0 { + return RedisProxy_PrefixRoutesMultiError(errors) + } + return nil } +// RedisProxy_PrefixRoutesMultiError is an error wrapping multiple validation +// errors returned by RedisProxy_PrefixRoutes.ValidateAll() if the designated +// constraints aren't met. +type RedisProxy_PrefixRoutesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutesMultiError) AllErrors() []error { return m } + // RedisProxy_PrefixRoutesValidationError is the validation error returned by // RedisProxy_PrefixRoutes.Validate if the designated constraints aren't met. type RedisProxy_PrefixRoutesValidationError struct { @@ -430,27 +740,64 @@ var _ interface { // Validate checks the field values on RedisProxy_PrefixRoutes_Route with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProxy_PrefixRoutes_Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_PrefixRoutes_Route with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RedisProxy_PrefixRoutes_RouteMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes_Route) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes_Route) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Prefix // no validation rules for RemovePrefix if len(m.GetCluster()) < 1 { - return RedisProxy_PrefixRoutes_RouteValidationError{ + err := RedisProxy_PrefixRoutes_RouteValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestMirrorPolicy() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_RouteValidationError{ + field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_RouteValidationError{ + field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutes_RouteValidationError{ field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), @@ -462,9 +809,30 @@ func (m *RedisProxy_PrefixRoutes_Route) Validate() error { } + if len(errors) > 0 { + return RedisProxy_PrefixRoutes_RouteMultiError(errors) + } + return nil } +// RedisProxy_PrefixRoutes_RouteMultiError is an error wrapping multiple +// validation errors returned by RedisProxy_PrefixRoutes_Route.ValidateAll() +// if the designated constraints aren't met. +type RedisProxy_PrefixRoutes_RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutes_RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutes_RouteMultiError) AllErrors() []error { return m } + // RedisProxy_PrefixRoutes_RouteValidationError is the validation error // returned by RedisProxy_PrefixRoutes_Route.Validate if the designated // constraints aren't met. @@ -524,21 +892,59 @@ var _ interface { // Validate checks the field values on // RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCluster()) < 1 { - return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + err := RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ field: "RuntimeFraction", @@ -550,9 +956,31 @@ func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) Validate() error { // no validation rules for ExcludeReadCommands + if len(errors) > 0 { + return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError(errors) + } + return nil } +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError is an error +// wrapping multiple validation errors returned by +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.ValidateAll() if the +// designated constraints aren't met. +type RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError) AllErrors() []error { return m } + // RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError is the // validation error returned by // RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.Validate if the diff --git a/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.go b/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.go index 8427b5a704..8056406d15 100644 --- a/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.go +++ b/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto -package envoy_config_filter_network_sni_cluster_v2 +package sni_clusterv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SniCluster struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -78,16 +73,22 @@ var file_envoy_config_filter_network_sni_cluster_v2_sni_cluster_proto_rawDesc = 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0c, 0x0a, 0x0a, 0x53, 0x6e, 0x69, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x8c, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0xed, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x53, 0x6e, 0x69, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6e, 0x69, 0x5f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x73, 0x6e, 0x69, 0x5f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x31, 0x12, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.validate.go b/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.validate.go index c8bbeaa9b6..f5b8e9256e 100644 --- a/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/sni_cluster/v2/sni_cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto -package envoy_config_filter_network_sni_cluster_v2 +package sni_clusterv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SniCluster with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SniCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SniCluster with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SniClusterMultiError, or +// nil if none found. +func (m *SniCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *SniCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SniClusterMultiError(errors) + } + return nil } +// SniClusterMultiError is an error wrapping multiple validation errors +// returned by SniCluster.ValidateAll() if the designated constraints aren't met. +type SniClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SniClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SniClusterMultiError) AllErrors() []error { return m } + // SniClusterValidationError is the validation error returned by // SniCluster.Validate if the designated constraints aren't met. type SniClusterValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go b/pkg/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go index 1061d6aa61..f8661d35eb 100644 --- a/pkg/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go +++ b/pkg/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto -package envoy_config_filter_network_tcp_proxy_v2 +package tcp_proxyv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/accesslog/v2" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 13] type TcpProxy struct { state protoimpl.MessageState @@ -708,16 +703,22 @@ var file_envoy_config_filter_network_tcp_proxy_v2_tcp_proxy_proto_rawDesc = []by 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x86, 0x01, 0x0a, 0x36, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xe3, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x63, 0x70, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go b/pkg/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go index 487ad6b501..a25abf163d 100644 --- a/pkg/api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go +++ b/pkg/api/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 envoy_config_filter_network_tcp_proxy_v2 +package tcp_proxyv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TcpProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TcpProxyMultiError, or nil +// if none found. +func (m *TcpProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "MetadataMatch", @@ -57,7 +97,26 @@ func (m *TcpProxy) Validate() error { } } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "IdleTimeout", @@ -67,7 +126,26 @@ func (m *TcpProxy) Validate() error { } } - if v, ok := interface{}(m.GetDownstreamIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "DownstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "DownstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "DownstreamIdleTimeout", @@ -77,7 +155,26 @@ func (m *TcpProxy) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "UpstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "UpstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "UpstreamIdleTimeout", @@ -90,7 +187,26 @@ func (m *TcpProxy) Validate() error { for idx, item := range m.GetAccessLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: fmt.Sprintf("AccessLog[%v]", idx), @@ -102,7 +218,26 @@ func (m *TcpProxy) Validate() error { } - if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDeprecatedV1()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "DeprecatedV1", @@ -115,25 +250,52 @@ func (m *TcpProxy) Validate() error { if wrapper := m.GetMaxConnectAttempts(); wrapper != nil { if wrapper.GetValue() < 1 { - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "MaxConnectAttempts", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetHashPolicy()) > 1 { - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "HashPolicy", reason: "value must contain no more than 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHashPolicy() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: fmt.Sprintf("HashPolicy[%v]", idx), @@ -145,7 +307,26 @@ func (m *TcpProxy) Validate() error { } - if v, ok := interface{}(m.GetTunnelingConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTunnelingConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "TunnelingConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "TunnelingConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTunnelingConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "TunnelingConfig", @@ -162,7 +343,26 @@ func (m *TcpProxy) Validate() error { case *TcpProxy_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "WeightedClusters", @@ -173,16 +373,40 @@ func (m *TcpProxy) Validate() error { } default: - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return TcpProxyMultiError(errors) } return nil } +// TcpProxyMultiError is an error wrapping multiple validation errors returned +// by TcpProxy.ValidateAll() if the designated constraints aren't met. +type TcpProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxyMultiError) AllErrors() []error { return m } + // TcpProxyValidationError is the validation error returned by // TcpProxy.Validate if the designated constraints aren't met. type TcpProxyValidationError struct { @@ -239,23 +463,60 @@ var _ interface { // Validate checks the field values on TcpProxy_DeprecatedV1 with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProxy_DeprecatedV1) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy_DeprecatedV1 with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpProxy_DeprecatedV1MultiError, or nil if none found. +func (m *TcpProxy_DeprecatedV1) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_DeprecatedV1) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRoutes()) < 1 { - return TcpProxy_DeprecatedV1ValidationError{ + err := TcpProxy_DeprecatedV1ValidationError{ field: "Routes", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_DeprecatedV1ValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_DeprecatedV1ValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1ValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -267,9 +528,30 @@ func (m *TcpProxy_DeprecatedV1) Validate() error { } + if len(errors) > 0 { + return TcpProxy_DeprecatedV1MultiError(errors) + } + return nil } +// TcpProxy_DeprecatedV1MultiError is an error wrapping multiple validation +// errors returned by TcpProxy_DeprecatedV1.ValidateAll() if the designated +// constraints aren't met. +type TcpProxy_DeprecatedV1MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_DeprecatedV1MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_DeprecatedV1MultiError) AllErrors() []error { return m } + // TcpProxy_DeprecatedV1ValidationError is the validation error returned by // TcpProxy_DeprecatedV1.Validate if the designated constraints aren't met. type TcpProxy_DeprecatedV1ValidationError struct { @@ -328,23 +610,60 @@ var _ interface { // Validate checks the field values on TcpProxy_WeightedCluster with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProxy_WeightedCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy_WeightedCluster with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpProxy_WeightedClusterMultiError, or nil if none found. +func (m *TcpProxy_WeightedCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_WeightedCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusters()) < 1 { - return TcpProxy_WeightedClusterValidationError{ + err := TcpProxy_WeightedClusterValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -356,9 +675,30 @@ func (m *TcpProxy_WeightedCluster) Validate() error { } + if len(errors) > 0 { + return TcpProxy_WeightedClusterMultiError(errors) + } + return nil } +// TcpProxy_WeightedClusterMultiError is an error wrapping multiple validation +// errors returned by TcpProxy_WeightedCluster.ValidateAll() if the designated +// constraints aren't met. +type TcpProxy_WeightedClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_WeightedClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_WeightedClusterMultiError) AllErrors() []error { return m } + // TcpProxy_WeightedClusterValidationError is the validation error returned by // TcpProxy_WeightedCluster.Validate if the designated constraints aren't met. type TcpProxy_WeightedClusterValidationError struct { @@ -417,22 +757,61 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProxy_TunnelingConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy_TunnelingConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpProxy_TunnelingConfigMultiError, or nil if none found. +func (m *TcpProxy_TunnelingConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_TunnelingConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetHostname()) < 1 { - return TcpProxy_TunnelingConfigValidationError{ + err := TcpProxy_TunnelingConfigValidationError{ field: "Hostname", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return TcpProxy_TunnelingConfigMultiError(errors) } return nil } +// TcpProxy_TunnelingConfigMultiError is an error wrapping multiple validation +// errors returned by TcpProxy_TunnelingConfig.ValidateAll() if the designated +// constraints aren't met. +type TcpProxy_TunnelingConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_TunnelingConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_TunnelingConfigMultiError) AllErrors() []error { return m } + // TcpProxy_TunnelingConfigValidationError is the validation error returned by // TcpProxy_TunnelingConfig.Validate if the designated constraints aren't met. type TcpProxy_TunnelingConfigValidationError struct { @@ -491,23 +870,60 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProxy_DeprecatedV1_TCPRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy_DeprecatedV1_TCPRoute with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// TcpProxy_DeprecatedV1_TCPRouteMultiError, or nil if none found. +func (m *TcpProxy_DeprecatedV1_TCPRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_DeprecatedV1_TCPRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCluster()) < 1 { - return TcpProxy_DeprecatedV1_TCPRouteValidationError{ + err := TcpProxy_DeprecatedV1_TCPRouteValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetDestinationIpList() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_DeprecatedV1_TCPRouteValidationError{ + field: fmt.Sprintf("DestinationIpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_DeprecatedV1_TCPRouteValidationError{ + field: fmt.Sprintf("DestinationIpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1_TCPRouteValidationError{ field: fmt.Sprintf("DestinationIpList[%v]", idx), @@ -524,7 +940,26 @@ func (m *TcpProxy_DeprecatedV1_TCPRoute) Validate() error { for idx, item := range m.GetSourceIpList() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_DeprecatedV1_TCPRouteValidationError{ + field: fmt.Sprintf("SourceIpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_DeprecatedV1_TCPRouteValidationError{ + field: fmt.Sprintf("SourceIpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1_TCPRouteValidationError{ field: fmt.Sprintf("SourceIpList[%v]", idx), @@ -538,9 +973,30 @@ func (m *TcpProxy_DeprecatedV1_TCPRoute) Validate() error { // no validation rules for SourcePorts + if len(errors) > 0 { + return TcpProxy_DeprecatedV1_TCPRouteMultiError(errors) + } + return nil } +// TcpProxy_DeprecatedV1_TCPRouteMultiError is an error wrapping multiple +// validation errors returned by TcpProxy_DeprecatedV1_TCPRoute.ValidateAll() +// if the designated constraints aren't met. +type TcpProxy_DeprecatedV1_TCPRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_DeprecatedV1_TCPRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_DeprecatedV1_TCPRouteMultiError) AllErrors() []error { return m } + // TcpProxy_DeprecatedV1_TCPRouteValidationError is the validation error // returned by TcpProxy_DeprecatedV1_TCPRoute.Validate if the designated // constraints aren't met. @@ -600,27 +1056,70 @@ var _ interface { // Validate checks the field values on TcpProxy_WeightedCluster_ClusterWeight // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// TcpProxy_WeightedCluster_ClusterWeight with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// TcpProxy_WeightedCluster_ClusterWeightMultiError, or nil if none found. +func (m *TcpProxy_WeightedCluster_ClusterWeight) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_WeightedCluster_ClusterWeight) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return TcpProxy_WeightedCluster_ClusterWeightValidationError{ + err := TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetWeight() < 1 { - return TcpProxy_WeightedCluster_ClusterWeightValidationError{ + err := TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Weight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "MetadataMatch", @@ -630,9 +1129,31 @@ func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { } } + if len(errors) > 0 { + return TcpProxy_WeightedCluster_ClusterWeightMultiError(errors) + } + return nil } +// TcpProxy_WeightedCluster_ClusterWeightMultiError is an error wrapping +// multiple validation errors returned by +// TcpProxy_WeightedCluster_ClusterWeight.ValidateAll() if the designated +// constraints aren't met. +type TcpProxy_WeightedCluster_ClusterWeightMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_WeightedCluster_ClusterWeightMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } + // TcpProxy_WeightedCluster_ClusterWeightValidationError is the validation // error returned by TcpProxy_WeightedCluster_ClusterWeight.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.go b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.go index 7a8945dd17..b876820445 100644 --- a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.go +++ b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto -package envoy_config_filter_network_thrift_proxy_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RouteConfiguration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -628,16 +623,22 @@ var file_envoy_config_filter_network_thrift_proxy_v2alpha1_route_proto_rawDesc = 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x8f, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x42, 0xe9, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x32, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x32, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.validate.go b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.validate.go index 0b0af8e0b5..6dd6da39b7 100644 --- a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto -package envoy_config_filter_network_thrift_proxy_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -58,9 +93,30 @@ func (m *RouteConfiguration) Validate() error { } + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil } +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + // RouteConfigurationValidationError is the validation error returned by // RouteConfiguration.Validate if the designated constraints aren't met. type RouteConfigurationValidationError struct { @@ -118,20 +174,57 @@ var _ interface { } = RouteConfigurationValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatch() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Match", @@ -142,13 +235,36 @@ func (m *Route) Validate() error { } if m.GetRoute() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Route", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Route", @@ -158,9 +274,29 @@ func (m *Route) Validate() error { } } + if len(errors) > 0 { + return RouteMultiError(errors) + } + return nil } +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + // RouteValidationError is the validation error returned by Route.Validate if // the designated constraints aren't met. type RouteValidationError struct { @@ -216,18 +352,52 @@ var _ interface { } = RouteValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Invert for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -248,16 +418,40 @@ func (m *RouteMatch) Validate() error { // no validation rules for ServiceName default: - return RouteMatchValidationError{ + err := RouteMatchValidationError{ field: "MatchSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return RouteMatchMultiError(errors) + } + return nil } +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + // RouteMatchValidationError is the validation error returned by // RouteMatch.Validate if the designated constraints aren't met. type RouteMatchValidationError struct { @@ -313,14 +507,47 @@ var _ interface { } = RouteMatchValidationError{} // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MetadataMatch", @@ -333,7 +560,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetRateLimits() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("RateLimits[%v]", idx), @@ -352,15 +598,38 @@ func (m *RouteAction) Validate() error { case *RouteAction_Cluster: if len(m.GetCluster()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "WeightedClusters", @@ -373,23 +642,51 @@ func (m *RouteAction) Validate() error { case *RouteAction_ClusterHeader: if len(m.GetClusterHeader()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterHeader", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } default: - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteActionMultiError(errors) } return nil } +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + // RouteActionValidationError is the validation error returned by // RouteAction.Validate if the designated constraints aren't met. type RouteActionValidationError struct { @@ -445,24 +742,61 @@ var _ interface { } = RouteActionValidationError{} // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// WeightedClusterMultiError, or nil if none found. +func (m *WeightedCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusters()) < 1 { - return WeightedClusterValidationError{ + err := WeightedClusterValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -474,9 +808,30 @@ func (m *WeightedCluster) Validate() error { } + if len(errors) > 0 { + return WeightedClusterMultiError(errors) + } + return nil } +// WeightedClusterMultiError is an error wrapping multiple validation errors +// returned by WeightedCluster.ValidateAll() if the designated constraints +// aren't met. +type WeightedClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedClusterMultiError) AllErrors() []error { return m } + // WeightedClusterValidationError is the validation error returned by // WeightedCluster.Validate if the designated constraints aren't met. type WeightedClusterValidationError struct { @@ -533,31 +888,72 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster_ClusterWeight) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster_ClusterWeight with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// WeightedCluster_ClusterWeightMultiError, or nil if none found. +func (m *WeightedCluster_ClusterWeight) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster_ClusterWeight) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "Weight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: "MetadataMatch", @@ -567,9 +963,30 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } } + if len(errors) > 0 { + return WeightedCluster_ClusterWeightMultiError(errors) + } + return nil } +// WeightedCluster_ClusterWeightMultiError is an error wrapping multiple +// validation errors returned by WeightedCluster_ClusterWeight.ValidateAll() +// if the designated constraints aren't met. +type WeightedCluster_ClusterWeightMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedCluster_ClusterWeightMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } + // WeightedCluster_ClusterWeightValidationError is the validation error // returned by WeightedCluster_ClusterWeight.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.go b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.go index c6f4de13d4..279dd7bcb2 100644 --- a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.go +++ b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto -package envoy_config_filter_network_thrift_proxy_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Thrift transport types supported by Envoy. type TransportType int32 @@ -498,17 +493,22 @@ var file_envoy_config_filter_network_thrift_proxy_v2alpha1_thrift_proxy_proto_ra 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x41, 0x58, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x43, 0x54, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x57, 0x49, 0x54, 0x54, - 0x45, 0x52, 0x10, 0x04, 0x42, 0x95, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x45, 0x52, 0x10, 0x04, 0x42, 0xef, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x32, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x32, 0x12, 0x30, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go index b005a6a6f2..8086450cbc 100644 --- a/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto -package envoy_config_filter_network_thrift_proxy_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,39 +31,85 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ThriftProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ThriftProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ThriftProxyMultiError, or +// nil if none found. +func (m *ThriftProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { - return ThriftProxyValidationError{ + err := ThriftProxyValidationError{ field: "Transport", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { - return ThriftProxyValidationError{ + err := ThriftProxyValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetStatPrefix()) < 1 { - return ThriftProxyValidationError{ + err := ThriftProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftProxyValidationError{ field: "RouteConfig", @@ -75,7 +122,26 @@ func (m *ThriftProxy) Validate() error { for idx, item := range m.GetThriftFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("ThriftFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("ThriftFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftProxyValidationError{ field: fmt.Sprintf("ThriftFilters[%v]", idx), @@ -87,9 +153,29 @@ func (m *ThriftProxy) Validate() error { } + if len(errors) > 0 { + return ThriftProxyMultiError(errors) + } + return nil } +// ThriftProxyMultiError is an error wrapping multiple validation errors +// returned by ThriftProxy.ValidateAll() if the designated constraints aren't met. +type ThriftProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftProxyMultiError) AllErrors() []error { return m } + // ThriftProxyValidationError is the validation error returned by // ThriftProxy.Validate if the designated constraints aren't met. type ThriftProxyValidationError struct { @@ -145,25 +231,62 @@ var _ interface { } = ThriftProxyValidationError{} // Validate checks the field values on ThriftFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ThriftFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ThriftFilterMultiError, or +// nil if none found. +func (m *ThriftFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return ThriftFilterValidationError{ + err := ThriftFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *ThriftFilter_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftFilterValidationError{ field: "Config", @@ -175,7 +298,26 @@ func (m *ThriftFilter) Validate() error { case *ThriftFilter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftFilterValidationError{ field: "TypedConfig", @@ -187,9 +329,29 @@ func (m *ThriftFilter) Validate() error { } + if len(errors) > 0 { + return ThriftFilterMultiError(errors) + } + return nil } +// ThriftFilterMultiError is an error wrapping multiple validation errors +// returned by ThriftFilter.ValidateAll() if the designated constraints aren't met. +type ThriftFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftFilterMultiError) AllErrors() []error { return m } + // ThriftFilterValidationError is the validation error returned by // ThriftFilter.Validate if the designated constraints aren't met. type ThriftFilterValidationError struct { @@ -246,29 +408,72 @@ var _ interface { // Validate checks the field values on ThriftProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ThriftProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ThriftProtocolOptionsMultiError, or nil if none found. +func (m *ThriftProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftProtocolOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { - return ThriftProtocolOptionsValidationError{ + err := ThriftProtocolOptionsValidationError{ field: "Transport", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { - return ThriftProtocolOptionsValidationError{ + err := ThriftProtocolOptionsValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ThriftProtocolOptionsMultiError(errors) } return nil } +// ThriftProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by ThriftProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type ThriftProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftProtocolOptionsMultiError) AllErrors() []error { return m } + // ThriftProtocolOptionsValidationError is the validation error returned by // ThriftProtocolOptions.Validate if the designated constraints aren't met. type ThriftProtocolOptionsValidationError struct { diff --git a/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.go b/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.go index a15e3cb00a..f20ea21904 100644 --- a/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.go +++ b/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto -package envoy_config_filter_network_zookeeper_proxy_v1alpha1 +package v1alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ZooKeeperProxy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -131,18 +126,24 @@ var file_envoy_config_filter_network_zookeeper_proxy_v1alpha1_zookeeper_proxy_pr 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, - 0x6d, 0x61, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x9e, + 0x6d, 0x61, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0xfb, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x5a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x35, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x35, 0x12, + 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.validate.go b/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.validate.go index 90d885f742..5d16a6b733 100644 --- a/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto -package envoy_config_filter_network_zookeeper_proxy_v1alpha1 +package v1alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ZooKeeperProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ZooKeeperProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ZooKeeperProxy with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ZooKeeperProxyMultiError, +// or nil if none found. +func (m *ZooKeeperProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *ZooKeeperProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return ZooKeeperProxyValidationError{ + err := ZooKeeperProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AccessLog - if v, ok := interface{}(m.GetMaxPacketBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxPacketBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZooKeeperProxyValidationError{ + field: "MaxPacketBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZooKeeperProxyValidationError{ + field: "MaxPacketBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPacketBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZooKeeperProxyValidationError{ field: "MaxPacketBytes", @@ -60,9 +99,30 @@ func (m *ZooKeeperProxy) Validate() error { } } + if len(errors) > 0 { + return ZooKeeperProxyMultiError(errors) + } + return nil } +// ZooKeeperProxyMultiError is an error wrapping multiple validation errors +// returned by ZooKeeperProxy.ValidateAll() if the designated constraints +// aren't met. +type ZooKeeperProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZooKeeperProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZooKeeperProxyMultiError) AllErrors() []error { return m } + // ZooKeeperProxyValidationError is the validation error returned by // ZooKeeperProxy.Validate if the designated constraints aren't met. type ZooKeeperProxyValidationError struct { diff --git a/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.go b/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.go index 4c6912c80d..eb2ae7189e 100644 --- a/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.go +++ b/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto -package envoy_config_filter_thrift_rate_limit_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type RateLimit struct { state protoimpl.MessageState @@ -165,18 +160,23 @@ var file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDesc 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0xa2, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0xf9, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x44, 0x12, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2f, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x44, 0x12, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.validate.go b/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.validate.go index f9b5cf13b9..63911fb263 100644 --- a/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.validate.go +++ b/pkg/api/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto -package envoy_config_filter_thrift_rate_limit_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,31 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetDomain()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Domain", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetStage() > 10 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Stage", reason: "value must be less than or equal to 10", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "Timeout", @@ -67,13 +111,36 @@ func (m *RateLimit) Validate() error { // no validation rules for FailureModeDeny if m.GetRateLimitService() == nil { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RateLimitService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "RateLimitService", @@ -83,9 +150,29 @@ func (m *RateLimit) Validate() error { } } + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { diff --git a/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.go b/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.go index 8b100cd18b..e7c52b2680 100644 --- a/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.go +++ b/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/thrift/router/v2alpha1/router.proto -package envoy_config_filter_thrift_router_v2alpha1 +package v2alpha1 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Router struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -75,13 +70,18 @@ var file_envoy_config_filter_thrift_router_v2alpha1_router_proto_rawDesc = []byt 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0x51, - 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0xa4, + 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.validate.go b/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.validate.go index 175d75e764..149d0c6b5f 100644 --- a/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.validate.go +++ b/pkg/api/envoy/config/filter/thrift/router/v2alpha1/router.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/thrift/router/v2alpha1/router.proto -package envoy_config_filter_thrift_router_v2alpha1 +package v2alpha1 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Router with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RouterMultiError(errors) + } + return nil } +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + // RouterValidationError is the validation error returned by Router.Validate if // the designated constraints aren't met. type RouterValidationError struct { diff --git a/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.go b/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.go index a467f0030d..a1d404fbab 100644 --- a/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.go +++ b/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto -package envoy_config_filter_udp_udp_proxy_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the UDP proxy filter. type UdpProxyConfig struct { state protoimpl.MessageState @@ -143,16 +138,21 @@ var file_envoy_config_filter_udp_udp_proxy_v2alpha_udp_proxy_proto_rawDesc = []b 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x83, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xd5, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, + 0x75, 0x64, 0x70, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.validate.go b/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.validate.go index e55312af22..60062a8ceb 100644 --- a/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.validate.go +++ b/pkg/api/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto -package envoy_config_filter_udp_udp_proxy_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on UdpProxyConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *UdpProxyConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpProxyConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in UdpProxyConfigMultiError, +// or nil if none found. +func (m *UdpProxyConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpProxyConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetStatPrefix()) < 1 { - return UdpProxyConfigValidationError{ + err := UdpProxyConfigValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UdpProxyConfigValidationError{ field: "IdleTimeout", @@ -63,23 +102,52 @@ func (m *UdpProxyConfig) Validate() error { case *UdpProxyConfig_Cluster: if len(m.GetCluster()) < 1 { - return UdpProxyConfigValidationError{ + err := UdpProxyConfigValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } default: - return UdpProxyConfigValidationError{ + err := UdpProxyConfigValidationError{ field: "RouteSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return UdpProxyConfigMultiError(errors) + } + return nil } +// UdpProxyConfigMultiError is an error wrapping multiple validation errors +// returned by UdpProxyConfig.ValidateAll() if the designated constraints +// aren't met. +type UdpProxyConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpProxyConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpProxyConfigMultiError) AllErrors() []error { return m } + // UdpProxyConfigValidationError is the validation error returned by // UdpProxyConfig.Validate if the designated constraints aren't met. type UdpProxyConfigValidationError struct { diff --git a/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.go b/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.go index 4d93e80d49..3d7536761e 100644 --- a/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.go +++ b/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/grpc_credential/v2alpha/aws_iam.proto -package envoy_config_grpc_credential_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type AwsIamConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -109,12 +104,17 @@ var file_envoy_config_grpc_credential_v2alpha_aws_iam_proto_rawDesc = []byte{ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, 0x4b, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x41, 0x77, - 0x73, 0x49, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, 0x98, 0x01, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x41, + 0x77, 0x73, 0x49, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.validate.go b/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.validate.go index 03dd0e5778..28076b850b 100644 --- a/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.validate.go +++ b/pkg/api/envoy/config/grpc_credential/v2alpha/aws_iam.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/grpc_credential/v2alpha/aws_iam.proto -package envoy_config_grpc_credential_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AwsIamConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AwsIamConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AwsIamConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AwsIamConfigMultiError, or +// nil if none found. +func (m *AwsIamConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AwsIamConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetServiceName()) < 1 { - return AwsIamConfigValidationError{ + err := AwsIamConfigValidationError{ field: "ServiceName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Region + if len(errors) > 0 { + return AwsIamConfigMultiError(errors) + } + return nil } +// AwsIamConfigMultiError is an error wrapping multiple validation errors +// returned by AwsIamConfig.ValidateAll() if the designated constraints aren't met. +type AwsIamConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AwsIamConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AwsIamConfigMultiError) AllErrors() []error { return m } + // AwsIamConfigValidationError is the validation error returned by // AwsIamConfig.Validate if the designated constraints aren't met. type AwsIamConfigValidationError struct { diff --git a/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.go b/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.go index 9c6f9f7b18..930d6c1e3e 100644 --- a/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.go +++ b/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/grpc_credential/v2alpha/file_based_metadata.proto -package envoy_config_grpc_credential_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FileBasedMetadataConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -121,13 +116,18 @@ var file_envoy_config_grpc_credential_v2alpha_file_based_metadata_proto_rawDesc 0x64, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x56, 0x0a, - 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0xa3, 0x01, + 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x42, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.validate.go b/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.validate.go index 613bbc227d..d396629612 100644 --- a/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.validate.go +++ b/pkg/api/envoy/config/grpc_credential/v2alpha/file_based_metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/grpc_credential/v2alpha/file_based_metadata.proto -package envoy_config_grpc_credential_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FileBasedMetadataConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FileBasedMetadataConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileBasedMetadataConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FileBasedMetadataConfigMultiError, or nil if none found. +func (m *FileBasedMetadataConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FileBasedMetadataConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSecretData()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSecretData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileBasedMetadataConfigValidationError{ + field: "SecretData", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileBasedMetadataConfigValidationError{ + field: "SecretData", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecretData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileBasedMetadataConfigValidationError{ field: "SecretData", @@ -55,9 +90,30 @@ func (m *FileBasedMetadataConfig) Validate() error { // no validation rules for HeaderPrefix + if len(errors) > 0 { + return FileBasedMetadataConfigMultiError(errors) + } + return nil } +// FileBasedMetadataConfigMultiError is an error wrapping multiple validation +// errors returned by FileBasedMetadataConfig.ValidateAll() if the designated +// constraints aren't met. +type FileBasedMetadataConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileBasedMetadataConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileBasedMetadataConfigMultiError) AllErrors() []error { return m } + // FileBasedMetadataConfigValidationError is the validation error returned by // FileBasedMetadataConfig.Validate if the designated constraints aren't met. type FileBasedMetadataConfigValidationError struct { diff --git a/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.go b/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.go index aad32454d4..708be421f9 100644 --- a/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.go +++ b/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/grpc_credential/v3/aws_iam.proto -package envoy_config_grpc_credential_v3 +package grpc_credentialv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type AwsIamConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -114,12 +109,18 @@ var file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDesc = []byte{ 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x77, - 0x73, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x46, 0x0a, 0x2d, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x41, 0x77, 0x73, - 0x49, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa0, 0x01, 0x0a, 0x2d, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x41, 0x77, + 0x73, 0x49, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.validate.go b/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.validate.go index ecdc26b141..211ceea2d4 100644 --- a/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.validate.go +++ b/pkg/api/envoy/config/grpc_credential/v3/aws_iam.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/grpc_credential/v3/aws_iam.proto -package envoy_config_grpc_credential_v3 +package grpc_credentialv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AwsIamConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AwsIamConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AwsIamConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AwsIamConfigMultiError, or +// nil if none found. +func (m *AwsIamConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AwsIamConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetServiceName()) < 1 { - return AwsIamConfigValidationError{ + err := AwsIamConfigValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Region + if len(errors) > 0 { + return AwsIamConfigMultiError(errors) + } + return nil } +// AwsIamConfigMultiError is an error wrapping multiple validation errors +// returned by AwsIamConfig.ValidateAll() if the designated constraints aren't met. +type AwsIamConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AwsIamConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AwsIamConfigMultiError) AllErrors() []error { return m } + // AwsIamConfigValidationError is the validation error returned by // AwsIamConfig.Validate if the designated constraints aren't met. type AwsIamConfigValidationError struct { diff --git a/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.go b/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.go index 9944372e6c..536cd725fd 100644 --- a/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.go +++ b/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/grpc_credential/v3/file_based_metadata.proto -package envoy_config_grpc_credential_v3 +package grpc_credentialv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FileBasedMetadataConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -128,12 +123,18 @@ var file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDesc = []b 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x51, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, - 0x76, 0x33, 0x42, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x42, 0xab, 0x01, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x2e, 0x76, 0x33, 0x42, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.validate.go b/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.validate.go index 0421c0614d..8c271b8628 100644 --- a/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.validate.go +++ b/pkg/api/envoy/config/grpc_credential/v3/file_based_metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/grpc_credential/v3/file_based_metadata.proto -package envoy_config_grpc_credential_v3 +package grpc_credentialv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FileBasedMetadataConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FileBasedMetadataConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileBasedMetadataConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FileBasedMetadataConfigMultiError, or nil if none found. +func (m *FileBasedMetadataConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FileBasedMetadataConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSecretData()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSecretData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileBasedMetadataConfigValidationError{ + field: "SecretData", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileBasedMetadataConfigValidationError{ + field: "SecretData", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecretData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileBasedMetadataConfigValidationError{ field: "SecretData", @@ -55,9 +90,30 @@ func (m *FileBasedMetadataConfig) Validate() error { // no validation rules for HeaderPrefix + if len(errors) > 0 { + return FileBasedMetadataConfigMultiError(errors) + } + return nil } +// FileBasedMetadataConfigMultiError is an error wrapping multiple validation +// errors returned by FileBasedMetadataConfig.ValidateAll() if the designated +// constraints aren't met. +type FileBasedMetadataConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileBasedMetadataConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileBasedMetadataConfigMultiError) AllErrors() []error { return m } + // FileBasedMetadataConfigValidationError is the validation error returned by // FileBasedMetadataConfig.Validate if the designated constraints aren't met. type FileBasedMetadataConfigValidationError struct { diff --git a/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.go b/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.go index 4fe56787f4..9145ce3568 100644 --- a/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.go +++ b/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/health_checker/redis/v2/redis.proto -package envoy_config_health_checker_redis_v2 +package redisv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Redis struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -89,12 +84,17 @@ var file_envoy_config_health_checker_redis_v2_redis_proto_rawDesc = []byte{ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x19, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x42, 0x4a, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x2e, - 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x79, 0x42, 0x9f, 0x01, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, + 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x52, 0x65, 0x64, 0x69, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x64, 0x69, + 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x65, 0x64, 0x69, 0x73, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.validate.go b/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.validate.go index 63ce25c275..4d4ff34aa2 100644 --- a/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.validate.go +++ b/pkg/api/envoy/config/health_checker/redis/v2/redis.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/health_checker/redis/v2/redis.proto -package envoy_config_health_checker_redis_v2 +package redisv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Redis with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Redis) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Redis with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RedisMultiError, or nil if none found. +func (m *Redis) ValidateAll() error { + return m.validate(true) +} + +func (m *Redis) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Key + if len(errors) > 0 { + return RedisMultiError(errors) + } + return nil } +// RedisMultiError is an error wrapping multiple validation errors returned by +// Redis.ValidateAll() if the designated constraints aren't met. +type RedisMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisMultiError) AllErrors() []error { return m } + // RedisValidationError is the validation error returned by Redis.Validate if // the designated constraints aren't met. type RedisValidationError struct { diff --git a/pkg/api/envoy/config/listener/v2/api_listener.pb.go b/pkg/api/envoy/config/listener/v2/api_listener.pb.go index db6a7d323f..b00dae7ba8 100644 --- a/pkg/api/envoy/config/listener/v2/api_listener.pb.go +++ b/pkg/api/envoy/config/listener/v2/api_listener.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/listener/v2/api_listener.proto -package envoy_config_listener_v2 +package listenerv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Describes a type of API listener, which is used in non-proxy clients. The type of API // exposed to the non-proxy application depends on the type of API listener. type ApiListener struct { @@ -101,14 +96,19 @@ var file_envoy_config_listener_v2_api_listener_proto_rawDesc = []byte{ 0x12, 0x37, 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x70, - 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x64, 0x0a, 0x26, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x42, 0x10, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0xb0, 0x01, 0x0a, 0x26, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/listener/v2/api_listener.pb.validate.go b/pkg/api/envoy/config/listener/v2/api_listener.pb.validate.go index 7c77f3b864..e1a8103861 100644 --- a/pkg/api/envoy/config/listener/v2/api_listener.pb.validate.go +++ b/pkg/api/envoy/config/listener/v2/api_listener.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/listener/v2/api_listener.proto -package envoy_config_listener_v2 +package listenerv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ApiListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApiListener with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ApiListenerMultiError, or +// nil if none found. +func (m *ApiListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ApiListener) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetApiListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiListenerValidationError{ field: "ApiListener", @@ -51,9 +86,29 @@ func (m *ApiListener) Validate() error { } } + if len(errors) > 0 { + return ApiListenerMultiError(errors) + } + return nil } +// ApiListenerMultiError is an error wrapping multiple validation errors +// returned by ApiListener.ValidateAll() if the designated constraints aren't met. +type ApiListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApiListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApiListenerMultiError) AllErrors() []error { return m } + // ApiListenerValidationError is the validation error returned by // ApiListener.Validate if the designated constraints aren't met. type ApiListenerValidationError struct { diff --git a/pkg/api/envoy/config/listener/v3/api_listener.pb.go b/pkg/api/envoy/config/listener/v3/api_listener.pb.go index a2e7ea2bb9..969af9831c 100644 --- a/pkg/api/envoy/config/listener/v3/api_listener.pb.go +++ b/pkg/api/envoy/config/listener/v3/api_listener.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/listener/v3/api_listener.proto -package envoy_config_listener_v3 +package listenerv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Describes a type of API listener, which is used in non-proxy clients. The type of API // exposed to the non-proxy application depends on the type of API listener. type ApiListener struct { @@ -36,7 +31,8 @@ type ApiListener struct { // The type in this field determines the type of API listener. At present, the following // types are supported: - // envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) + // envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager (HTTP) + // envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager (HTTP) // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the // specific config message for each type of API listener. We could not do this in v2 because // it would have caused circular dependencies for go protos: lds.proto depends on this file, @@ -104,12 +100,17 @@ var file_envoy_config_listener_v3_api_listener_proto_rawDesc = []byte{ 0x0b, 0x61, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, - 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x44, 0x0a, 0x26, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x42, 0x10, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x90, 0x01, 0x0a, 0x26, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/listener/v3/api_listener.pb.validate.go b/pkg/api/envoy/config/listener/v3/api_listener.pb.validate.go index 02bf5972ec..610b40124f 100644 --- a/pkg/api/envoy/config/listener/v3/api_listener.pb.validate.go +++ b/pkg/api/envoy/config/listener/v3/api_listener.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/listener/v3/api_listener.proto -package envoy_config_listener_v3 +package listenerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ApiListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApiListener with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ApiListenerMultiError, or +// nil if none found. +func (m *ApiListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ApiListener) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetApiListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApiListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApiListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiListenerValidationError{ field: "ApiListener", @@ -51,9 +86,29 @@ func (m *ApiListener) Validate() error { } } + if len(errors) > 0 { + return ApiListenerMultiError(errors) + } + return nil } +// ApiListenerMultiError is an error wrapping multiple validation errors +// returned by ApiListener.ValidateAll() if the designated constraints aren't met. +type ApiListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApiListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApiListenerMultiError) AllErrors() []error { return m } + // ApiListenerValidationError is the validation error returned by // ApiListener.Validate if the designated constraints aren't met. type ApiListenerValidationError struct { diff --git a/pkg/api/envoy/config/listener/v3/listener.pb.go b/pkg/api/envoy/config/listener/v3/listener.pb.go index 7f9427b1b1..c5bd45a2ca 100644 --- a/pkg/api/envoy/config/listener/v3/listener.pb.go +++ b/pkg/api/envoy/config/listener/v3/listener.pb.go @@ -1,21 +1,22 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/listener/v3/listener.proto -package envoy_config_listener_v3 +package listenerv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/cncf/udpa/go/xds/core/v3" - v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/core/v3" + v32 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -29,10 +30,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Listener_DrainType int32 const ( @@ -133,7 +130,7 @@ func (x *ListenerCollection) GetEntries() []*v3.CollectionEntry { return nil } -// [#next-free-field: 27] +// [#next-free-field: 33] type Listener struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -147,14 +144,35 @@ type Listener struct { // 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 *v31.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Optional prefix to use on listener stats. If empty, the stats will be rooted at + // `listener.
.`. If non-empty, stats will be rooted at + // `listener..`. + StatPrefix string `protobuf:"bytes,28,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` // A list of filter chains to consider for this listener. The - // :ref:`FilterChain ` with the most specific - // :ref:`FilterChainMatch ` criteria is used on a + // :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 []*FilterChain `protobuf:"bytes,3,rep,name=filter_chains,json=filterChains,proto3" json:"filter_chains,omitempty"` + // :ref:`Matcher API ` resolving the filter chain name from the + // network properties. This matcher is used as a replacement for the filter chain match condition + // :ref:`filter_chain_match + // `. If specified, all + // :ref:`filter_chains ` must have a + // non-empty and unique :ref:`name ` field + // and not specify :ref:`filter_chain_match + // ` field. + // + // .. note:: + // + // Once matched, each connection is permanently bound to its filter chain. + // If the matcher changes but the filter chain remains the same, the + // connections bound to the filter chain are not drained. If, however, the + // filter chain is removed or structurally modified, then the drain for its + // connections is initiated. + FilterChainMatcher *v32.Matcher `protobuf:"bytes,32,opt,name=filter_chain_matcher,json=filterChainMatcher,proto3" json:"filter_chain_matcher,omitempty"` // 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 @@ -177,13 +195,12 @@ type Listener struct { DrainType Listener_DrainType `protobuf:"varint,8,opt,name=drain_type,json=drainType,proto3,enum=envoy.config.listener.v3.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 + // :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. // UDP Listener filters can be specified when the protocol in the listener socket address in - // :ref:`protocol ` is :ref:`UDP - // `. - // UDP listeners currently support a single filter. + // :ref:`protocol ` is :ref:`UDP + // `. ListenerFilters []*ListenerFilter `protobuf:"bytes,9,rep,name=listener_filters,json=listenerFilters,proto3" json:"listener_filters,omitempty"` // 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 unless @@ -203,7 +220,7 @@ type Listener struct { // *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 + // ` 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 @@ -239,17 +256,17 @@ type Listener struct { // To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. TcpFastOpenQueueLength *wrappers.UInt32Value `protobuf:"bytes,12,opt,name=tcp_fast_open_queue_length,json=tcpFastOpenQueueLength,proto3" json:"tcp_fast_open_queue_length,omitempty"` // Specifies the intended direction of the traffic relative to the local Envoy. + // This property is required on Windows for listeners using the original destination filter, + // see :ref:`Original Destination `. TrafficDirection v31.TrafficDirection `protobuf:"varint,16,opt,name=traffic_direction,json=trafficDirection,proto3,enum=envoy.config.core.v3.TrafficDirection" json:"traffic_direction,omitempty"` // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // listener to create, i.e. :ref:`udp_listener_name - // ` = "raw_udp_listener" for - // creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". + // ` is :ref:`UDP + // `, this field specifies UDP + // listener specific configuration. UdpListenerConfig *UdpListenerConfig `protobuf:"bytes,18,opt,name=udp_listener_config,json=udpListenerConfig,proto3" json:"udp_listener_config,omitempty"` // Used to represent an API listener, which is used in non-proxy clients. The type of API // exposed to the non-proxy application depends on the type of API listener. - // When this field is set, no other field except for :ref:`name` + // When this field is set, no other field except for :ref:`name` // should be set. // // .. note:: @@ -267,38 +284,63 @@ type Listener struct { // The listener's connection balancer configuration, currently only applicable to TCP listeners. // If no configuration is specified, Envoy will not attempt to balance active connections between // worker threads. + // + // In the scenario that the listener X redirects all the connections to the listeners Y1 and Y2 + // by setting :ref:`use_original_dst ` in X + // and :ref:`bind_to_port ` to false in Y1 and Y2, + // it is recommended to disable the balance config in listener X to avoid the cost of balancing, and + // enable the balance config in Y1 and Y2 to balance the connections among the workers. ConnectionBalanceConfig *Listener_ConnectionBalanceConfig `protobuf:"bytes,20,opt,name=connection_balance_config,json=connectionBalanceConfig,proto3" json:"connection_balance_config,omitempty"` + // Deprecated. Use `enable_reuse_port` instead. + // + // Deprecated: Do not use. + ReusePort bool `protobuf:"varint,21,opt,name=reuse_port,json=reusePort,proto3" json:"reuse_port,omitempty"` // When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and // create one socket for each worker thread. This makes inbound connections // distribute among worker threads roughly evenly in cases where there are a high number - // of connections. When this flag is set to false, all worker threads share one socket. + // of connections. When this flag is set to false, all worker threads share one socket. This field + // defaults to true. // - // Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart - // (see `3rd paragraph in 'soreuseport' commit message - // `_). - // This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket - // `_. - ReusePort bool `protobuf:"varint,21,opt,name=reuse_port,json=reusePort,proto3" json:"reuse_port,omitempty"` + // .. attention:: + // + // Although this field defaults to true, it has different behavior on different platforms. See + // the following text for more information. + // + // * On Linux, reuse_port is respected for both TCP and UDP listeners. It also works correctly + // with hot restart. + // * On macOS, reuse_port for TCP does not do what it does on Linux. Instead of load balancing, + // the last socket wins and receives all connections/packets. For TCP, reuse_port is force + // disabled and the user is warned. For UDP, it is enabled, but only one worker will receive + // packets. For QUIC/H3, SW routing will send packets to other workers. For "raw" UDP, only + // a single worker will currently receive packets. + // * On Windows, reuse_port for TCP has undefined behavior. It is force disabled and the user + // is warned similar to macOS. It is left enabled for UDP with undefined behavior currently. + EnableReusePort *wrappers.BoolValue `protobuf:"bytes,29,opt,name=enable_reuse_port,json=enableReusePort,proto3" json:"enable_reuse_port,omitempty"` // Configuration for :ref:`access logs ` // emitted by this listener. - AccessLog []*v32.AccessLog `protobuf:"bytes,22,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // writer to create, i.e. :ref:`name ` - // = "udp_default_writer" for creating a udp writer with writing in passthrough mode, - // = "udp_gso_batch_writer" for creating a udp writer with writing in batch mode. - // If not present, treat it as "udp_default_writer". - // [#not-implemented-hide:] - UdpWriterConfig *v31.TypedExtensionConfig `protobuf:"bytes,23,opt,name=udp_writer_config,json=udpWriterConfig,proto3" json:"udp_writer_config,omitempty"` + AccessLog []*v33.AccessLog `protobuf:"bytes,22,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` // The maximum length a tcp listener's pending connections queue can grow to. If no value is // provided net.core.somaxconn will be used on Linux and 128 otherwise. TcpBacklogSize *wrappers.UInt32Value `protobuf:"bytes,24,opt,name=tcp_backlog_size,json=tcpBacklogSize,proto3" json:"tcp_backlog_size,omitempty"` // Whether the listener should bind to the port. A listener that doesn't // bind can only receive connections redirected from other listeners that set - // :ref:`use_original_dst ` + // :ref:`use_original_dst ` // to true. Default is true. BindToPort *wrappers.BoolValue `protobuf:"bytes,26,opt,name=bind_to_port,json=bindToPort,proto3" json:"bind_to_port,omitempty"` + // The exclusive listener type and the corresponding config. + // TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 + // Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. + // [#not-implemented-hide:] + // + // Types that are assignable to ListenerSpecifier: + // *Listener_InternalListener + ListenerSpecifier isListener_ListenerSpecifier `protobuf_oneof:"listener_specifier"` + // Enable MPTCP (multi-path TCP) on this listener. Clients will be allowed to establish + // MPTCP connections. Non-MPTCP clients will fall back to regular TCP. + EnableMptcp bool `protobuf:"varint,30,opt,name=enable_mptcp,json=enableMptcp,proto3" json:"enable_mptcp,omitempty"` + // Whether the listener should limit connections based upon the value of + // :ref:`global_downstream_max_connections `. + IgnoreGlobalConnLimit bool `protobuf:"varint,31,opt,name=ignore_global_conn_limit,json=ignoreGlobalConnLimit,proto3" json:"ignore_global_conn_limit,omitempty"` } func (x *Listener) Reset() { @@ -347,6 +389,13 @@ func (x *Listener) GetAddress() *v31.Address { return nil } +func (x *Listener) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + func (x *Listener) GetFilterChains() []*FilterChain { if x != nil { return x.FilterChains @@ -354,6 +403,13 @@ func (x *Listener) GetFilterChains() []*FilterChain { return nil } +func (x *Listener) GetFilterChainMatcher() *v32.Matcher { + if x != nil { + return x.FilterChainMatcher + } + return nil +} + func (x *Listener) GetUseOriginalDst() *wrappers.BoolValue { if x != nil { return x.UseOriginalDst @@ -450,7 +506,7 @@ func (x *Listener) GetTrafficDirection() v31.TrafficDirection { if x != nil { return x.TrafficDirection } - return v31.TrafficDirection_UNSPECIFIED + return v31.TrafficDirection(0) } func (x *Listener) GetUdpListenerConfig() *UdpListenerConfig { @@ -474,6 +530,7 @@ func (x *Listener) GetConnectionBalanceConfig() *Listener_ConnectionBalanceConfi return nil } +// Deprecated: Do not use. func (x *Listener) GetReusePort() bool { if x != nil { return x.ReusePort @@ -481,16 +538,16 @@ func (x *Listener) GetReusePort() bool { return false } -func (x *Listener) GetAccessLog() []*v32.AccessLog { +func (x *Listener) GetEnableReusePort() *wrappers.BoolValue { if x != nil { - return x.AccessLog + return x.EnableReusePort } return nil } -func (x *Listener) GetUdpWriterConfig() *v31.TypedExtensionConfig { +func (x *Listener) GetAccessLog() []*v33.AccessLog { if x != nil { - return x.UdpWriterConfig + return x.AccessLog } return nil } @@ -509,6 +566,58 @@ func (x *Listener) GetBindToPort() *wrappers.BoolValue { return nil } +func (m *Listener) GetListenerSpecifier() isListener_ListenerSpecifier { + if m != nil { + return m.ListenerSpecifier + } + return nil +} + +func (x *Listener) GetInternalListener() *Listener_InternalListenerConfig { + if x, ok := x.GetListenerSpecifier().(*Listener_InternalListener); ok { + return x.InternalListener + } + return nil +} + +func (x *Listener) GetEnableMptcp() bool { + if x != nil { + return x.EnableMptcp + } + return false +} + +func (x *Listener) GetIgnoreGlobalConnLimit() bool { + if x != nil { + return x.IgnoreGlobalConnLimit + } + return false +} + +type isListener_ListenerSpecifier interface { + isListener_ListenerSpecifier() +} + +type Listener_InternalListener struct { + // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the + // :ref:`envoy cluster ` to create a user space connection to. + // The internal listener acts as a tcp listener. It supports listener filters and network filter chains. + // The internal listener require :ref:`address ` has + // field `envoy_internal_address`. + // + // There are some limitations are derived from the implementation. The known limitations include + // + // * :ref:`ConnectionBalanceConfig ` is not + // allowed because both cluster connection and listener connection must be owned by the same dispatcher. + // * :ref:`tcp_backlog_size ` + // * :ref:`freebind ` + // * :ref:`transparent ` + // [#not-implemented-hide:] + InternalListener *Listener_InternalListenerConfig `protobuf:"bytes,27,opt,name=internal_listener,json=internalListener,proto3,oneof"` +} + +func (*Listener_InternalListener) isListener_ListenerSpecifier() {} + // [#not-implemented-hide:] type Listener_DeprecatedV1 struct { state protoimpl.MessageState @@ -520,7 +629,7 @@ type Listener_DeprecatedV1 struct { // set use_original_dst parameter to true. Default is true. // // This is deprecated. Use :ref:`Listener.bind_to_port - // ` + // ` BindToPort *wrappers.BoolValue `protobuf:"bytes,1,opt,name=bind_to_port,json=bindToPort,proto3" json:"bind_to_port,omitempty"` } @@ -632,6 +741,46 @@ type Listener_ConnectionBalanceConfig_ExactBalance_ struct { func (*Listener_ConnectionBalanceConfig_ExactBalance_) isListener_ConnectionBalanceConfig_BalanceType() { } +// Configuration for envoy internal listener. All the future internal listener features should be added here. +// [#not-implemented-hide:] +type Listener_InternalListenerConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Listener_InternalListenerConfig) Reset() { + *x = Listener_InternalListenerConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_listener_v3_listener_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Listener_InternalListenerConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Listener_InternalListenerConfig) ProtoMessage() {} + +func (x *Listener_InternalListenerConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_listener_v3_listener_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Listener_InternalListenerConfig.ProtoReflect.Descriptor instead. +func (*Listener_InternalListenerConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_listener_v3_listener_proto_rawDescGZIP(), []int{1, 2} +} + // A connection balancer implementation that does exact balancing. This means that a lock is // held during balancing so that connection counts are nearly exactly balanced between worker // threads. This is "nearly" exact in the sense that a connection might close in parallel thus @@ -647,7 +796,7 @@ type Listener_ConnectionBalanceConfig_ExactBalance struct { func (x *Listener_ConnectionBalanceConfig_ExactBalance) Reset() { *x = Listener_ConnectionBalanceConfig_ExactBalance{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v3_listener_proto_msgTypes[4] + mi := &file_envoy_config_listener_v3_listener_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -660,7 +809,7 @@ func (x *Listener_ConnectionBalanceConfig_ExactBalance) String() string { func (*Listener_ConnectionBalanceConfig_ExactBalance) ProtoMessage() {} func (x *Listener_ConnectionBalanceConfig_ExactBalance) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v3_listener_proto_msgTypes[4] + mi := &file_envoy_config_listener_v3_listener_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -690,53 +839,63 @@ var file_envoy_config_listener_v3_listener_proto_rawDesc = []byte{ 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, - 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x75, - 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4c, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, - 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x22, 0xdd, 0x12, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, + 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4c, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xda, 0x15, 0x0a, 0x08, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x1c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x4a, + 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0c, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, + 0x52, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x4f, @@ -757,129 +916,150 @@ var file_envoy_config_listener_v3_listener_proto_rawDesc = []byte{ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x58, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, + 0x12, 0x61, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x4b, 0x0a, 0x0a, 0x64, 0x72, - 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x64, 0x72, - 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x18, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x4e, 0x0a, 0x24, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x6f, 0x6e, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x4f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, - 0x36, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, - 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x1a, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x74, 0x63, 0x70, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, - 0x6e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x11, - 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x5b, 0x0a, 0x13, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x75, 0x64, 0x70, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, - 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x13, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x0b, 0x61, 0x70, 0x69, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x76, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, - 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x16, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x56, 0x0a, 0x11, 0x75, 0x64, 0x70, 0x5f, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x75, 0x64, 0x70, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x10, - 0x74, 0x63, 0x70, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x42, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, + 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x56, 0x31, 0x12, 0x4b, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x72, 0x61, 0x69, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x53, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x18, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x24, 0x63, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x65, 0x4f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, + 0x62, 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, 0x50, 0x6f, - 0x72, 0x74, 0x1a, 0x77, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x56, 0x31, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, 0x50, 0x6f, 0x72, 0x74, - 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x1a, 0xa7, 0x02, 0x0a, 0x17, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, - 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x51, 0x0a, 0x0c, 0x45, 0x78, 0x61, 0x63, 0x74, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, - 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, - 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, + 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x1a, 0x74, + 0x63, 0x70, 0x5f, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x74, + 0x63, 0x70, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x13, 0x75, 0x64, + 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x75, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x52, 0x0b, 0x61, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x12, 0x76, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x42, 0x13, 0x0a, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x29, 0x0a, 0x09, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, - 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, - 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4a, 0x04, - 0x08, 0x0e, 0x10, 0x0f, 0x42, 0x41, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0d, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x0a, 0x72, 0x65, 0x75, + 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, + 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x09, 0x72, 0x65, 0x75, 0x73, + 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, + 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x16, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x6f, 0x67, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, + 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x42, + 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x69, + 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x62, 0x69, + 0x6e, 0x64, 0x54, 0x6f, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x68, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, + 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x70, 0x74, + 0x63, 0x70, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x4d, 0x70, 0x74, 0x63, 0x70, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x47, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x77, + 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x3c, + 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, 0x50, 0x6f, 0x72, 0x74, 0x3a, 0x29, 0x9a, 0xc5, + 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x1a, 0xa7, 0x02, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x1a, 0x51, 0x0a, 0x0c, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x13, 0x0a, 0x0c, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x1a, 0x18, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x29, 0x0a, 0x09, 0x44, + 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, + 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, + 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x42, 0x8d, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -895,60 +1075,63 @@ func file_envoy_config_listener_v3_listener_proto_rawDescGZIP() []byte { } var file_envoy_config_listener_v3_listener_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_listener_v3_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_config_listener_v3_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_envoy_config_listener_v3_listener_proto_goTypes = []interface{}{ (Listener_DrainType)(0), // 0: envoy.config.listener.v3.Listener.DrainType (*ListenerCollection)(nil), // 1: envoy.config.listener.v3.ListenerCollection (*Listener)(nil), // 2: envoy.config.listener.v3.Listener (*Listener_DeprecatedV1)(nil), // 3: envoy.config.listener.v3.Listener.DeprecatedV1 (*Listener_ConnectionBalanceConfig)(nil), // 4: envoy.config.listener.v3.Listener.ConnectionBalanceConfig - (*Listener_ConnectionBalanceConfig_ExactBalance)(nil), // 5: envoy.config.listener.v3.Listener.ConnectionBalanceConfig.ExactBalance - (*v3.CollectionEntry)(nil), // 6: xds.core.v3.CollectionEntry - (*v31.Address)(nil), // 7: envoy.config.core.v3.Address - (*FilterChain)(nil), // 8: envoy.config.listener.v3.FilterChain - (*wrappers.BoolValue)(nil), // 9: google.protobuf.BoolValue - (*wrappers.UInt32Value)(nil), // 10: google.protobuf.UInt32Value - (*v31.Metadata)(nil), // 11: envoy.config.core.v3.Metadata - (*ListenerFilter)(nil), // 12: envoy.config.listener.v3.ListenerFilter - (*duration.Duration)(nil), // 13: google.protobuf.Duration - (*v31.SocketOption)(nil), // 14: envoy.config.core.v3.SocketOption - (v31.TrafficDirection)(0), // 15: envoy.config.core.v3.TrafficDirection - (*UdpListenerConfig)(nil), // 16: envoy.config.listener.v3.UdpListenerConfig - (*ApiListener)(nil), // 17: envoy.config.listener.v3.ApiListener - (*v32.AccessLog)(nil), // 18: envoy.config.accesslog.v3.AccessLog - (*v31.TypedExtensionConfig)(nil), // 19: envoy.config.core.v3.TypedExtensionConfig + (*Listener_InternalListenerConfig)(nil), // 5: envoy.config.listener.v3.Listener.InternalListenerConfig + (*Listener_ConnectionBalanceConfig_ExactBalance)(nil), // 6: envoy.config.listener.v3.Listener.ConnectionBalanceConfig.ExactBalance + (*v3.CollectionEntry)(nil), // 7: xds.core.v3.CollectionEntry + (*v31.Address)(nil), // 8: envoy.config.core.v3.Address + (*FilterChain)(nil), // 9: envoy.config.listener.v3.FilterChain + (*v32.Matcher)(nil), // 10: xds.type.matcher.v3.Matcher + (*wrappers.BoolValue)(nil), // 11: google.protobuf.BoolValue + (*wrappers.UInt32Value)(nil), // 12: google.protobuf.UInt32Value + (*v31.Metadata)(nil), // 13: envoy.config.core.v3.Metadata + (*ListenerFilter)(nil), // 14: envoy.config.listener.v3.ListenerFilter + (*duration.Duration)(nil), // 15: google.protobuf.Duration + (*v31.SocketOption)(nil), // 16: envoy.config.core.v3.SocketOption + (v31.TrafficDirection)(0), // 17: envoy.config.core.v3.TrafficDirection + (*UdpListenerConfig)(nil), // 18: envoy.config.listener.v3.UdpListenerConfig + (*ApiListener)(nil), // 19: envoy.config.listener.v3.ApiListener + (*v33.AccessLog)(nil), // 20: envoy.config.accesslog.v3.AccessLog } var file_envoy_config_listener_v3_listener_proto_depIdxs = []int32{ - 6, // 0: envoy.config.listener.v3.ListenerCollection.entries:type_name -> xds.core.v3.CollectionEntry - 7, // 1: envoy.config.listener.v3.Listener.address:type_name -> envoy.config.core.v3.Address - 8, // 2: envoy.config.listener.v3.Listener.filter_chains:type_name -> envoy.config.listener.v3.FilterChain - 9, // 3: envoy.config.listener.v3.Listener.use_original_dst:type_name -> google.protobuf.BoolValue - 8, // 4: envoy.config.listener.v3.Listener.default_filter_chain:type_name -> envoy.config.listener.v3.FilterChain - 10, // 5: envoy.config.listener.v3.Listener.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 11, // 6: envoy.config.listener.v3.Listener.metadata:type_name -> envoy.config.core.v3.Metadata - 3, // 7: envoy.config.listener.v3.Listener.deprecated_v1:type_name -> envoy.config.listener.v3.Listener.DeprecatedV1 - 0, // 8: envoy.config.listener.v3.Listener.drain_type:type_name -> envoy.config.listener.v3.Listener.DrainType - 12, // 9: envoy.config.listener.v3.Listener.listener_filters:type_name -> envoy.config.listener.v3.ListenerFilter - 13, // 10: envoy.config.listener.v3.Listener.listener_filters_timeout:type_name -> google.protobuf.Duration - 9, // 11: envoy.config.listener.v3.Listener.transparent:type_name -> google.protobuf.BoolValue - 9, // 12: envoy.config.listener.v3.Listener.freebind:type_name -> google.protobuf.BoolValue - 14, // 13: envoy.config.listener.v3.Listener.socket_options:type_name -> envoy.config.core.v3.SocketOption - 10, // 14: envoy.config.listener.v3.Listener.tcp_fast_open_queue_length:type_name -> google.protobuf.UInt32Value - 15, // 15: envoy.config.listener.v3.Listener.traffic_direction:type_name -> envoy.config.core.v3.TrafficDirection - 16, // 16: envoy.config.listener.v3.Listener.udp_listener_config:type_name -> envoy.config.listener.v3.UdpListenerConfig - 17, // 17: envoy.config.listener.v3.Listener.api_listener:type_name -> envoy.config.listener.v3.ApiListener - 4, // 18: envoy.config.listener.v3.Listener.connection_balance_config:type_name -> envoy.config.listener.v3.Listener.ConnectionBalanceConfig - 18, // 19: envoy.config.listener.v3.Listener.access_log:type_name -> envoy.config.accesslog.v3.AccessLog - 19, // 20: envoy.config.listener.v3.Listener.udp_writer_config:type_name -> envoy.config.core.v3.TypedExtensionConfig - 10, // 21: envoy.config.listener.v3.Listener.tcp_backlog_size:type_name -> google.protobuf.UInt32Value - 9, // 22: envoy.config.listener.v3.Listener.bind_to_port:type_name -> google.protobuf.BoolValue - 9, // 23: envoy.config.listener.v3.Listener.DeprecatedV1.bind_to_port:type_name -> google.protobuf.BoolValue - 5, // 24: envoy.config.listener.v3.Listener.ConnectionBalanceConfig.exact_balance:type_name -> envoy.config.listener.v3.Listener.ConnectionBalanceConfig.ExactBalance - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 7, // 0: envoy.config.listener.v3.ListenerCollection.entries:type_name -> xds.core.v3.CollectionEntry + 8, // 1: envoy.config.listener.v3.Listener.address:type_name -> envoy.config.core.v3.Address + 9, // 2: envoy.config.listener.v3.Listener.filter_chains:type_name -> envoy.config.listener.v3.FilterChain + 10, // 3: envoy.config.listener.v3.Listener.filter_chain_matcher:type_name -> xds.type.matcher.v3.Matcher + 11, // 4: envoy.config.listener.v3.Listener.use_original_dst:type_name -> google.protobuf.BoolValue + 9, // 5: envoy.config.listener.v3.Listener.default_filter_chain:type_name -> envoy.config.listener.v3.FilterChain + 12, // 6: envoy.config.listener.v3.Listener.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value + 13, // 7: envoy.config.listener.v3.Listener.metadata:type_name -> envoy.config.core.v3.Metadata + 3, // 8: envoy.config.listener.v3.Listener.deprecated_v1:type_name -> envoy.config.listener.v3.Listener.DeprecatedV1 + 0, // 9: envoy.config.listener.v3.Listener.drain_type:type_name -> envoy.config.listener.v3.Listener.DrainType + 14, // 10: envoy.config.listener.v3.Listener.listener_filters:type_name -> envoy.config.listener.v3.ListenerFilter + 15, // 11: envoy.config.listener.v3.Listener.listener_filters_timeout:type_name -> google.protobuf.Duration + 11, // 12: envoy.config.listener.v3.Listener.transparent:type_name -> google.protobuf.BoolValue + 11, // 13: envoy.config.listener.v3.Listener.freebind:type_name -> google.protobuf.BoolValue + 16, // 14: envoy.config.listener.v3.Listener.socket_options:type_name -> envoy.config.core.v3.SocketOption + 12, // 15: envoy.config.listener.v3.Listener.tcp_fast_open_queue_length:type_name -> google.protobuf.UInt32Value + 17, // 16: envoy.config.listener.v3.Listener.traffic_direction:type_name -> envoy.config.core.v3.TrafficDirection + 18, // 17: envoy.config.listener.v3.Listener.udp_listener_config:type_name -> envoy.config.listener.v3.UdpListenerConfig + 19, // 18: envoy.config.listener.v3.Listener.api_listener:type_name -> envoy.config.listener.v3.ApiListener + 4, // 19: envoy.config.listener.v3.Listener.connection_balance_config:type_name -> envoy.config.listener.v3.Listener.ConnectionBalanceConfig + 11, // 20: envoy.config.listener.v3.Listener.enable_reuse_port:type_name -> google.protobuf.BoolValue + 20, // 21: envoy.config.listener.v3.Listener.access_log:type_name -> envoy.config.accesslog.v3.AccessLog + 12, // 22: envoy.config.listener.v3.Listener.tcp_backlog_size:type_name -> google.protobuf.UInt32Value + 11, // 23: envoy.config.listener.v3.Listener.bind_to_port:type_name -> google.protobuf.BoolValue + 5, // 24: envoy.config.listener.v3.Listener.internal_listener:type_name -> envoy.config.listener.v3.Listener.InternalListenerConfig + 11, // 25: envoy.config.listener.v3.Listener.DeprecatedV1.bind_to_port:type_name -> google.protobuf.BoolValue + 6, // 26: envoy.config.listener.v3.Listener.ConnectionBalanceConfig.exact_balance:type_name -> envoy.config.listener.v3.Listener.ConnectionBalanceConfig.ExactBalance + 27, // [27:27] is the sub-list for method output_type + 27, // [27:27] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_envoy_config_listener_v3_listener_proto_init() } @@ -1009,6 +1192,18 @@ func file_envoy_config_listener_v3_listener_proto_init() { } } file_envoy_config_listener_v3_listener_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Listener_InternalListenerConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_listener_v3_listener_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Listener_ConnectionBalanceConfig_ExactBalance); i { case 0: return &v.state @@ -1021,6 +1216,9 @@ func file_envoy_config_listener_v3_listener_proto_init() { } } } + file_envoy_config_listener_v3_listener_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Listener_InternalListener)(nil), + } file_envoy_config_listener_v3_listener_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Listener_ConnectionBalanceConfig_ExactBalance_)(nil), } @@ -1030,7 +1228,7 @@ func file_envoy_config_listener_v3_listener_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_listener_v3_listener_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/listener/v3/listener.pb.validate.go b/pkg/api/envoy/config/listener/v3/listener.pb.validate.go index 000b13a4f6..dee86b9f64 100644 --- a/pkg/api/envoy/config/listener/v3/listener.pb.validate.go +++ b/pkg/api/envoy/config/listener/v3/listener.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/listener/v3/listener.proto -package envoy_config_listener_v3 +package listenerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,23 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.TrafficDirection(0) ) // Validate checks the field values on ListenerCollection with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ListenerCollection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerCollection with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListenerCollectionMultiError, or nil if none found. +func (m *ListenerCollection) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerCollection) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetEntries() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerCollectionValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerCollectionValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerCollectionValidationError{ field: fmt.Sprintf("Entries[%v]", idx), @@ -60,9 +95,30 @@ func (m *ListenerCollection) Validate() error { } + if len(errors) > 0 { + return ListenerCollectionMultiError(errors) + } + return nil } +// ListenerCollectionMultiError is an error wrapping multiple validation errors +// returned by ListenerCollection.ValidateAll() if the designated constraints +// aren't met. +type ListenerCollectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerCollectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerCollectionMultiError) AllErrors() []error { return m } + // ListenerCollectionValidationError is the validation error returned by // ListenerCollection.Validate if the designated constraints aren't met. type ListenerCollectionValidationError struct { @@ -120,22 +176,60 @@ var _ interface { } = ListenerCollectionValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Listener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listener with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenerMultiError, or nil +// if none found. +func (m *Listener) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name if m.GetAddress() == nil { - return ListenerValidationError{ + err := ListenerValidationError{ field: "Address", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Address", @@ -145,10 +239,31 @@ func (m *Listener) Validate() error { } } + // no validation rules for StatPrefix + for idx, item := range m.GetFilterChains() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("FilterChains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("FilterChains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("FilterChains[%v]", idx), @@ -160,7 +275,55 @@ func (m *Listener) Validate() error { } - if v, ok := interface{}(m.GetUseOriginalDst()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterChainMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "FilterChainMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "FilterChainMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterChainMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "FilterChainMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUseOriginalDst()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UseOriginalDst", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UseOriginalDst", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseOriginalDst()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "UseOriginalDst", @@ -170,7 +333,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetDefaultFilterChain()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultFilterChain()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "DefaultFilterChain", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "DefaultFilterChain", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultFilterChain()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "DefaultFilterChain", @@ -180,7 +362,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerConnectionBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "PerConnectionBufferLimitBytes", @@ -190,7 +391,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Metadata", @@ -200,7 +420,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDeprecatedV1()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "DeprecatedV1", @@ -215,7 +454,26 @@ func (m *Listener) Validate() error { for idx, item := range m.GetListenerFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("ListenerFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("ListenerFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("ListenerFilters[%v]", idx), @@ -227,7 +485,26 @@ func (m *Listener) Validate() error { } - if v, ok := interface{}(m.GetListenerFiltersTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListenerFiltersTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ListenerFiltersTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ListenerFiltersTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListenerFiltersTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "ListenerFiltersTimeout", @@ -239,7 +516,26 @@ func (m *Listener) Validate() error { // no validation rules for ContinueOnListenerFiltersTimeout - if v, ok := interface{}(m.GetTransparent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransparent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Transparent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Transparent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransparent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Transparent", @@ -249,7 +545,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFreebind()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "Freebind", @@ -262,7 +577,26 @@ func (m *Listener) Validate() error { for idx, item := range m.GetSocketOptions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), @@ -274,7 +608,26 @@ func (m *Listener) Validate() error { } - if v, ok := interface{}(m.GetTcpFastOpenQueueLength()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTcpFastOpenQueueLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "TcpFastOpenQueueLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "TcpFastOpenQueueLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpFastOpenQueueLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "TcpFastOpenQueueLength", @@ -286,7 +639,26 @@ func (m *Listener) Validate() error { // no validation rules for TrafficDirection - if v, ok := interface{}(m.GetUdpListenerConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUdpListenerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UdpListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "UdpListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUdpListenerConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "UdpListenerConfig", @@ -296,7 +668,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetApiListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "ApiListener", @@ -306,7 +697,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetConnectionBalanceConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectionBalanceConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ConnectionBalanceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "ConnectionBalanceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionBalanceConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "ConnectionBalanceConfig", @@ -318,10 +728,58 @@ func (m *Listener) Validate() error { // no validation rules for ReusePort + if all { + switch v := interface{}(m.GetEnableReusePort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "EnableReusePort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "EnableReusePort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnableReusePort()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "EnableReusePort", + reason: "embedded message failed validation", + cause: err, + } + } + } + for idx, item := range m.GetAccessLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: fmt.Sprintf("AccessLog[%v]", idx), @@ -333,17 +791,26 @@ func (m *Listener) Validate() error { } - if v, ok := interface{}(m.GetUdpWriterConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "UdpWriterConfig", - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(m.GetTcpBacklogSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "TcpBacklogSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "TcpBacklogSize", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - if v, ok := interface{}(m.GetTcpBacklogSize()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTcpBacklogSize()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "TcpBacklogSize", @@ -353,7 +820,26 @@ func (m *Listener) Validate() error { } } - if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBindToPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "BindToPort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "BindToPort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerValidationError{ field: "BindToPort", @@ -363,9 +849,68 @@ func (m *Listener) Validate() error { } } + // no validation rules for EnableMptcp + + // no validation rules for IgnoreGlobalConnLimit + + switch m.ListenerSpecifier.(type) { + + case *Listener_InternalListener: + + if all { + switch v := interface{}(m.GetInternalListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "InternalListener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerValidationError{ + field: "InternalListener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInternalListener()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "InternalListener", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListenerMultiError(errors) + } + return nil } +// ListenerMultiError is an error wrapping multiple validation errors returned +// by Listener.ValidateAll() if the designated constraints aren't met. +type ListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerMultiError) AllErrors() []error { return m } + // ListenerValidationError is the validation error returned by // Listener.Validate if the designated constraints aren't met. type ListenerValidationError struct { @@ -422,13 +967,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Listener_DeprecatedV1) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listener_DeprecatedV1 with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Listener_DeprecatedV1MultiError, or nil if none found. +func (m *Listener_DeprecatedV1) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener_DeprecatedV1) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetBindToPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Listener_DeprecatedV1ValidationError{ + field: "BindToPort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Listener_DeprecatedV1ValidationError{ + field: "BindToPort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Listener_DeprecatedV1ValidationError{ field: "BindToPort", @@ -438,9 +1016,30 @@ func (m *Listener_DeprecatedV1) Validate() error { } } + if len(errors) > 0 { + return Listener_DeprecatedV1MultiError(errors) + } + return nil } +// Listener_DeprecatedV1MultiError is an error wrapping multiple validation +// errors returned by Listener_DeprecatedV1.ValidateAll() if the designated +// constraints aren't met. +type Listener_DeprecatedV1MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Listener_DeprecatedV1MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Listener_DeprecatedV1MultiError) AllErrors() []error { return m } + // Listener_DeprecatedV1ValidationError is the validation error returned by // Listener_DeprecatedV1.Validate if the designated constraints aren't met. type Listener_DeprecatedV1ValidationError struct { @@ -499,17 +1098,51 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Listener_ConnectionBalanceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listener_ConnectionBalanceConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// Listener_ConnectionBalanceConfigMultiError, or nil if none found. +func (m *Listener_ConnectionBalanceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener_ConnectionBalanceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.BalanceType.(type) { case *Listener_ConnectionBalanceConfig_ExactBalance_: - if v, ok := interface{}(m.GetExactBalance()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExactBalance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Listener_ConnectionBalanceConfigValidationError{ + field: "ExactBalance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Listener_ConnectionBalanceConfigValidationError{ + field: "ExactBalance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExactBalance()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Listener_ConnectionBalanceConfigValidationError{ field: "ExactBalance", @@ -520,16 +1153,42 @@ func (m *Listener_ConnectionBalanceConfig) Validate() error { } default: - return Listener_ConnectionBalanceConfigValidationError{ + err := Listener_ConnectionBalanceConfigValidationError{ field: "BalanceType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return Listener_ConnectionBalanceConfigMultiError(errors) } return nil } +// Listener_ConnectionBalanceConfigMultiError is an error wrapping multiple +// validation errors returned by +// Listener_ConnectionBalanceConfig.ValidateAll() if the designated +// constraints aren't met. +type Listener_ConnectionBalanceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Listener_ConnectionBalanceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Listener_ConnectionBalanceConfigMultiError) AllErrors() []error { return m } + // Listener_ConnectionBalanceConfigValidationError is the validation error // returned by Listener_ConnectionBalanceConfig.Validate if the designated // constraints aren't met. @@ -587,17 +1246,158 @@ var _ interface { ErrorName() string } = Listener_ConnectionBalanceConfigValidationError{} +// Validate checks the field values on Listener_InternalListenerConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Listener_InternalListenerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listener_InternalListenerConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// Listener_InternalListenerConfigMultiError, or nil if none found. +func (m *Listener_InternalListenerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener_InternalListenerConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return Listener_InternalListenerConfigMultiError(errors) + } + + return nil +} + +// Listener_InternalListenerConfigMultiError is an error wrapping multiple +// validation errors returned by Listener_InternalListenerConfig.ValidateAll() +// if the designated constraints aren't met. +type Listener_InternalListenerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Listener_InternalListenerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Listener_InternalListenerConfigMultiError) AllErrors() []error { return m } + +// Listener_InternalListenerConfigValidationError is the validation error +// returned by Listener_InternalListenerConfig.Validate if the designated +// constraints aren't met. +type Listener_InternalListenerConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Listener_InternalListenerConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Listener_InternalListenerConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Listener_InternalListenerConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Listener_InternalListenerConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Listener_InternalListenerConfigValidationError) ErrorName() string { + return "Listener_InternalListenerConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Listener_InternalListenerConfigValidationError) Error() string { + 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_InternalListenerConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Listener_InternalListenerConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Listener_InternalListenerConfigValidationError{} + // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Listener_ConnectionBalanceConfig_ExactBalance) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Listener_ConnectionBalanceConfig_ExactBalance with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// Listener_ConnectionBalanceConfig_ExactBalanceMultiError, or nil if none found. +func (m *Listener_ConnectionBalanceConfig_ExactBalance) ValidateAll() error { + return m.validate(true) +} + +func (m *Listener_ConnectionBalanceConfig_ExactBalance) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Listener_ConnectionBalanceConfig_ExactBalanceMultiError(errors) + } + return nil } +// Listener_ConnectionBalanceConfig_ExactBalanceMultiError is an error wrapping +// multiple validation errors returned by +// Listener_ConnectionBalanceConfig_ExactBalance.ValidateAll() if the +// designated constraints aren't met. +type Listener_ConnectionBalanceConfig_ExactBalanceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Listener_ConnectionBalanceConfig_ExactBalanceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Listener_ConnectionBalanceConfig_ExactBalanceMultiError) AllErrors() []error { return m } + // Listener_ConnectionBalanceConfig_ExactBalanceValidationError is the // validation error returned by // Listener_ConnectionBalanceConfig_ExactBalance.Validate if the designated diff --git a/pkg/api/envoy/config/listener/v3/listener_components.pb.go b/pkg/api/envoy/config/listener/v3/listener_components.pb.go index f91a06d85b..10b1cba72d 100644 --- a/pkg/api/envoy/config/listener/v3/listener_components.pb.go +++ b/pkg/api/envoy/config/listener/v3/listener_components.pb.go @@ -1,21 +1,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/listener/v3/listener_components.proto -package envoy_config_listener_v3 +package listenerv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" - v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -30,10 +29,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FilterChainMatch_ConnectionSourceType int32 const ( @@ -86,20 +81,17 @@ func (FilterChainMatch_ConnectionSourceType) EnumDescriptor() ([]byte, []int) { return file_envoy_config_listener_v3_listener_components_proto_rawDescGZIP(), []int{1, 0} } +// [#next-free-field: 6] type Filter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. + // The name of the filter configuration. 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 assignable to ConfigType: // *Filter_TypedConfig - // *Filter_HiddenEnvoyDeprecatedConfig + // *Filter_ConfigDiscovery ConfigType isFilter_ConfigType `protobuf_oneof:"config_type"` } @@ -156,10 +148,9 @@ func (x *Filter) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *Filter) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*Filter_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig +func (x *Filter) GetConfigDiscovery() *v3.ExtensionConfigSource { + if x, ok := x.GetConfigType().(*Filter_ConfigDiscovery); ok { + return x.ConfigDiscovery } return nil } @@ -169,17 +160,23 @@ type isFilter_ConfigType interface { } type Filter_TypedConfig struct { + // Filter specific configuration which depends on the filter being + // instantiated. See the supported filters for further documentation. + // [#extension-category: envoy.filters.network] TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type Filter_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` +type Filter_ConfigDiscovery struct { + // Configuration source specifier for an extension configuration discovery + // service. In case of a failure and without the default configuration, the + // listener closes the connections. + // [#not-implemented-hide:] + ConfigDiscovery *v3.ExtensionConfigSource `protobuf:"bytes,5,opt,name=config_discovery,json=configDiscovery,proto3,oneof"` } func (*Filter_TypedConfig) isFilter_ConfigType() {} -func (*Filter_HiddenEnvoyDeprecatedConfig) isFilter_ConfigType() {} +func (*Filter_ConfigDiscovery) isFilter_ConfigType() {} // Specifies the match criteria for selecting a specific filter chain for a // listener. @@ -195,9 +192,12 @@ func (*Filter_HiddenEnvoyDeprecatedConfig) isFilter_ConfigType() {} // 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). -// 7. Source IP address. -// 8. Source port. +// 6. Directly connected source IP address (this will only be different from the source IP address +// when using a listener filter that overrides the source address, such as the :ref:`Proxy Protocol +// listener filter `). +// 7. Source type (e.g. any, local or external network). +// 8. Source IP address. +// 9. Source port. // // 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 @@ -221,7 +221,7 @@ func (*Filter_HiddenEnvoyDeprecatedConfig) isFilter_ConfigType() {} // 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] -// [#next-free-field: 13] +// [#next-free-field: 14] type FilterChainMatch struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -239,6 +239,10 @@ type FilterChainMatch struct { AddressSuffix string `protobuf:"bytes,4,opt,name=address_suffix,json=addressSuffix,proto3" json:"address_suffix,omitempty"` // [#not-implemented-hide:] SuffixLen *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=suffix_len,json=suffixLen,proto3" json:"suffix_len,omitempty"` + // The criteria is satisfied if the directly connected 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 directly connected source IP address is ignored. + DirectSourcePrefixRanges []*v3.CidrRange `protobuf:"bytes,13,rep,name=direct_source_prefix_ranges,json=directSourcePrefixRanges,proto3" json:"direct_source_prefix_ranges,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.config.listener.v3.FilterChainMatch_ConnectionSourceType" json:"source_type,omitempty"` // The criteria is satisfied if the source IP address of the downstream @@ -356,6 +360,13 @@ func (x *FilterChainMatch) GetSuffixLen() *wrappers.UInt32Value { return nil } +func (x *FilterChainMatch) GetDirectSourcePrefixRanges() []*v3.CidrRange { + if x != nil { + return x.DirectSourcePrefixRanges + } + return nil +} + func (x *FilterChainMatch) GetSourceType() FilterChainMatch_ConnectionSourceType { if x != nil { return x.SourceType @@ -429,25 +440,25 @@ type FilterChain struct { // [#not-implemented-hide:] filter chain metadata. Metadata *v3.Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` // Optional custom transport socket implementation to use for downstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`DownstreamTlsContext ` in the `typed_config`. + // To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and + // :ref:`DownstreamTlsContext ` in the `typed_config`. // If no transport socket configuration is specified, new connections // will be set up with plaintext. + // [#extension-category: envoy.transport_sockets.downstream] TransportSocket *v3.TransportSocket `protobuf:"bytes,6,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` // If present and nonzero, the amount of time to allow incoming connections to complete any // transport socket negotiations. If this expires before the transport reports connection // establishment, the connection is summarily closed. TransportSocketConnectTimeout *duration.Duration `protobuf:"bytes,9,opt,name=transport_socket_connect_timeout,json=transportSocketConnectTimeout,proto3" json:"transport_socket_connect_timeout,omitempty"` - // [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - // name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - // chain is to be dynamically updated or removed via FCDS a unique name must be provided. + // The unique name (or empty) by which this filter chain is known. + // Note: :ref:`filter_chain_matcher + // ` + // requires that filter chains are uniquely named within a listener. Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` // [#not-implemented-hide:] The configuration to specify whether the filter chain will be built on-demand. // If this field is not empty, the filter chain will be built on-demand. // Otherwise, the filter chain will be built normally and block listener warming. OnDemandConfiguration *FilterChain_OnDemandConfiguration `protobuf:"bytes,8,opt,name=on_demand_configuration,json=onDemandConfiguration,proto3" json:"on_demand_configuration,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedTlsContext *v31.DownstreamTlsContext `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_tls_context,json=hiddenEnvoyDeprecatedTlsContext,proto3" json:"hidden_envoy_deprecated_tls_context,omitempty"` } func (x *FilterChain) Reset() { @@ -539,14 +550,6 @@ func (x *FilterChain) GetOnDemandConfiguration() *FilterChain_OnDemandConfigurat return nil } -// Deprecated: Do not use. -func (x *FilterChain) GetHiddenEnvoyDeprecatedTlsContext() *v31.DownstreamTlsContext { - if x != nil { - return x.HiddenEnvoyDeprecatedTlsContext - } - return nil -} - // Listener filter chain match configuration. This is a recursive structure which allows complex // nested match configurations to be built using various logical operators. // @@ -568,7 +571,7 @@ func (x *FilterChain) GetHiddenEnvoyDeprecatedTlsContext() *v31.DownstreamTlsCon // rules: // - destination_port_range: // start: 3306 -// end: 3306 +// end: 3307 // - destination_port_range: // start: 15000 // end: 15001 @@ -655,7 +658,7 @@ func (x *ListenerFilterChainMatchPredicate) GetAnyMatch() bool { return false } -func (x *ListenerFilterChainMatchPredicate) GetDestinationPortRange() *v32.Int32Range { +func (x *ListenerFilterChainMatchPredicate) GetDestinationPortRange() *v31.Int32Range { if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_DestinationPortRange); ok { return x.DestinationPortRange } @@ -691,7 +694,7 @@ type ListenerFilterChainMatchPredicate_AnyMatch struct { type ListenerFilterChainMatchPredicate_DestinationPortRange struct { // Match destination port. Particularly, the match evaluation must use the recovered local port if // the owning listener filter is after :ref:`an original_dst listener filter `. - DestinationPortRange *v32.Int32Range `protobuf:"bytes,5,opt,name=destination_port_range,json=destinationPortRange,proto3,oneof"` + DestinationPortRange *v31.Int32Range `protobuf:"bytes,5,opt,name=destination_port_range,json=destinationPortRange,proto3,oneof"` } func (*ListenerFilterChainMatchPredicate_OrMatch) isListenerFilterChainMatchPredicate_Rule() {} @@ -705,23 +708,20 @@ func (*ListenerFilterChainMatchPredicate_AnyMatch) isListenerFilterChainMatchPre func (*ListenerFilterChainMatchPredicate_DestinationPortRange) isListenerFilterChainMatchPredicate_Rule() { } +// [#next-free-field: 6] type ListenerFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. + // The name of the filter configuration. 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 assignable to ConfigType: // *ListenerFilter_TypedConfig - // *ListenerFilter_HiddenEnvoyDeprecatedConfig + // *ListenerFilter_ConfigDiscovery ConfigType isListenerFilter_ConfigType `protobuf_oneof:"config_type"` // Optional match predicate used to disable the filter. The filter is enabled when this field is empty. - // See :ref:`ListenerFilterChainMatchPredicate ` + // See :ref:`ListenerFilterChainMatchPredicate ` // for further examples. FilterDisabled *ListenerFilterChainMatchPredicate `protobuf:"bytes,4,opt,name=filter_disabled,json=filterDisabled,proto3" json:"filter_disabled,omitempty"` } @@ -779,10 +779,9 @@ func (x *ListenerFilter) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *ListenerFilter) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*ListenerFilter_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig +func (x *ListenerFilter) GetConfigDiscovery() *v3.ExtensionConfigSource { + if x, ok := x.GetConfigType().(*ListenerFilter_ConfigDiscovery); ok { + return x.ConfigDiscovery } return nil } @@ -799,17 +798,23 @@ type isListenerFilter_ConfigType interface { } type ListenerFilter_TypedConfig struct { + // Filter specific configuration which depends on the filter being + // instantiated. See the supported filters for further documentation. + // [#extension-category: envoy.filters.listener,envoy.filters.udp_listener] TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type ListenerFilter_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` +type ListenerFilter_ConfigDiscovery struct { + // Configuration source specifier for an extension configuration discovery + // service. In case of a failure and without the default configuration, the + // listener closes the connections. + // [#not-implemented-hide:] + ConfigDiscovery *v3.ExtensionConfigSource `protobuf:"bytes,5,opt,name=config_discovery,json=configDiscovery,proto3,oneof"` } func (*ListenerFilter_TypedConfig) isListenerFilter_ConfigType() {} -func (*ListenerFilter_HiddenEnvoyDeprecatedConfig) isListenerFilter_ConfigType() {} +func (*ListenerFilter_ConfigDiscovery) isListenerFilter_ConfigType() {} // The configuration for on-demand filter chain. If this field is not empty in FilterChain message, // a filter chain will be built on-demand. @@ -930,138 +935,138 @@ var file_envoy_config_listener_v3_listener_components_proto_rawDesc = []byte{ 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, - 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, - 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x23, - 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x8a, 0x06, 0x0a, 0x10, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x54, 0x0a, - 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0xff, 0xff, 0x03, - 0x28, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x72, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, - 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x09, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x6a, 0x0a, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x02, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, + 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xea, 0x06, 0x0a, 0x10, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x54, + 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0xff, 0xff, + 0x03, 0x28, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x72, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x5e, + 0x0a, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x18, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x6a, + 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x51, 0x0a, 0x14, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, + 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0d, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x2a, 0x06, 0x18, + 0xff, 0xff, 0x03, 0x28, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, + 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0a, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0x46, 0x0a, 0x14, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x41, + 0x4d, 0x45, 0x5f, 0x49, 0x50, 0x5f, 0x4f, 0x52, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, + 0x4b, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, + 0x02, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x93, 0x06, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x58, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x51, 0x0a, 0x14, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0c, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0d, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x2a, 0x06, 0x18, 0xff, - 0xff, 0x03, 0x28, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0x46, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x41, 0x4d, - 0x45, 0x5f, 0x49, 0x50, 0x5f, 0x4f, 0x52, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, - 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x02, - 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4a, - 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x81, 0x07, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x58, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x10, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x10, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x3a, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0f, 0x75, - 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x50, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x62, 0x0a, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x73, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, - 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x91, - 0x01, 0x0a, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x1a, 0x5b, 0x0a, 0x15, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, + 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x0f, + 0x75, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0d, + 0x75, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3a, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x10, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x62, 0x0a, 0x20, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x1d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xd2, + 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x73, 0x0a, + 0x17, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6f, 0x6e, 0x44, + 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x5b, 0x0a, 0x15, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, @@ -1069,80 +1074,86 @@ var file_envoy_config_listener_v3_listener_components_proto_rawDesc = []byte{ 0x0e, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xc2, 0x05, 0x0a, 0x21, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, - 0x61, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x63, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, + 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, + 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xc2, 0x05, 0x0a, + 0x21, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, - 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5a, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, - 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x51, 0x0a, 0x16, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0xb0, - 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x12, 0x5b, 0x0a, 0x05, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x02, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, - 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, - 0x74, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x74, 0x65, 0x12, 0x61, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xee, - 0x02, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, - 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, - 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x63, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, + 0x52, 0x08, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5a, 0x0a, 0x09, 0x6e, 0x6f, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, + 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x51, + 0x0a, 0x16, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x1a, 0xb0, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x12, 0x5b, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, + 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, + 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x74, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0xf2, 0x02, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, + 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x10, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x64, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x2b, 0x9a, 0xc5, + 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x97, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, - 0x4b, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x33, 0x42, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1169,38 +1180,37 @@ var file_envoy_config_listener_v3_listener_components_proto_goTypes = []interfac (*FilterChain_OnDemandConfiguration)(nil), // 6: envoy.config.listener.v3.FilterChain.OnDemandConfiguration (*ListenerFilterChainMatchPredicate_MatchSet)(nil), // 7: envoy.config.listener.v3.ListenerFilterChainMatchPredicate.MatchSet (*any.Any)(nil), // 8: google.protobuf.Any - (*_struct.Struct)(nil), // 9: google.protobuf.Struct + (*v3.ExtensionConfigSource)(nil), // 9: envoy.config.core.v3.ExtensionConfigSource (*wrappers.UInt32Value)(nil), // 10: google.protobuf.UInt32Value (*v3.CidrRange)(nil), // 11: envoy.config.core.v3.CidrRange (*wrappers.BoolValue)(nil), // 12: google.protobuf.BoolValue (*v3.Metadata)(nil), // 13: envoy.config.core.v3.Metadata (*v3.TransportSocket)(nil), // 14: envoy.config.core.v3.TransportSocket (*duration.Duration)(nil), // 15: google.protobuf.Duration - (*v31.DownstreamTlsContext)(nil), // 16: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext - (*v32.Int32Range)(nil), // 17: envoy.type.v3.Int32Range + (*v31.Int32Range)(nil), // 16: envoy.type.v3.Int32Range } var file_envoy_config_listener_v3_listener_components_proto_depIdxs = []int32{ 8, // 0: envoy.config.listener.v3.Filter.typed_config:type_name -> google.protobuf.Any - 9, // 1: envoy.config.listener.v3.Filter.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct + 9, // 1: envoy.config.listener.v3.Filter.config_discovery:type_name -> envoy.config.core.v3.ExtensionConfigSource 10, // 2: envoy.config.listener.v3.FilterChainMatch.destination_port:type_name -> google.protobuf.UInt32Value 11, // 3: envoy.config.listener.v3.FilterChainMatch.prefix_ranges:type_name -> envoy.config.core.v3.CidrRange 10, // 4: envoy.config.listener.v3.FilterChainMatch.suffix_len:type_name -> google.protobuf.UInt32Value - 0, // 5: envoy.config.listener.v3.FilterChainMatch.source_type:type_name -> envoy.config.listener.v3.FilterChainMatch.ConnectionSourceType - 11, // 6: envoy.config.listener.v3.FilterChainMatch.source_prefix_ranges:type_name -> envoy.config.core.v3.CidrRange - 2, // 7: envoy.config.listener.v3.FilterChain.filter_chain_match:type_name -> envoy.config.listener.v3.FilterChainMatch - 1, // 8: envoy.config.listener.v3.FilterChain.filters:type_name -> envoy.config.listener.v3.Filter - 12, // 9: envoy.config.listener.v3.FilterChain.use_proxy_proto:type_name -> google.protobuf.BoolValue - 13, // 10: envoy.config.listener.v3.FilterChain.metadata:type_name -> envoy.config.core.v3.Metadata - 14, // 11: envoy.config.listener.v3.FilterChain.transport_socket:type_name -> envoy.config.core.v3.TransportSocket - 15, // 12: envoy.config.listener.v3.FilterChain.transport_socket_connect_timeout:type_name -> google.protobuf.Duration - 6, // 13: envoy.config.listener.v3.FilterChain.on_demand_configuration:type_name -> envoy.config.listener.v3.FilterChain.OnDemandConfiguration - 16, // 14: envoy.config.listener.v3.FilterChain.hidden_envoy_deprecated_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + 11, // 5: envoy.config.listener.v3.FilterChainMatch.direct_source_prefix_ranges:type_name -> envoy.config.core.v3.CidrRange + 0, // 6: envoy.config.listener.v3.FilterChainMatch.source_type:type_name -> envoy.config.listener.v3.FilterChainMatch.ConnectionSourceType + 11, // 7: envoy.config.listener.v3.FilterChainMatch.source_prefix_ranges:type_name -> envoy.config.core.v3.CidrRange + 2, // 8: envoy.config.listener.v3.FilterChain.filter_chain_match:type_name -> envoy.config.listener.v3.FilterChainMatch + 1, // 9: envoy.config.listener.v3.FilterChain.filters:type_name -> envoy.config.listener.v3.Filter + 12, // 10: envoy.config.listener.v3.FilterChain.use_proxy_proto:type_name -> google.protobuf.BoolValue + 13, // 11: envoy.config.listener.v3.FilterChain.metadata:type_name -> envoy.config.core.v3.Metadata + 14, // 12: envoy.config.listener.v3.FilterChain.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 15, // 13: envoy.config.listener.v3.FilterChain.transport_socket_connect_timeout:type_name -> google.protobuf.Duration + 6, // 14: envoy.config.listener.v3.FilterChain.on_demand_configuration:type_name -> envoy.config.listener.v3.FilterChain.OnDemandConfiguration 7, // 15: envoy.config.listener.v3.ListenerFilterChainMatchPredicate.or_match:type_name -> envoy.config.listener.v3.ListenerFilterChainMatchPredicate.MatchSet 7, // 16: envoy.config.listener.v3.ListenerFilterChainMatchPredicate.and_match:type_name -> envoy.config.listener.v3.ListenerFilterChainMatchPredicate.MatchSet 4, // 17: envoy.config.listener.v3.ListenerFilterChainMatchPredicate.not_match:type_name -> envoy.config.listener.v3.ListenerFilterChainMatchPredicate - 17, // 18: envoy.config.listener.v3.ListenerFilterChainMatchPredicate.destination_port_range:type_name -> envoy.type.v3.Int32Range + 16, // 18: envoy.config.listener.v3.ListenerFilterChainMatchPredicate.destination_port_range:type_name -> envoy.type.v3.Int32Range 8, // 19: envoy.config.listener.v3.ListenerFilter.typed_config:type_name -> google.protobuf.Any - 9, // 20: envoy.config.listener.v3.ListenerFilter.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct + 9, // 20: envoy.config.listener.v3.ListenerFilter.config_discovery:type_name -> envoy.config.core.v3.ExtensionConfigSource 4, // 21: envoy.config.listener.v3.ListenerFilter.filter_disabled:type_name -> envoy.config.listener.v3.ListenerFilterChainMatchPredicate 15, // 22: envoy.config.listener.v3.FilterChain.OnDemandConfiguration.rebuild_timeout:type_name -> google.protobuf.Duration 4, // 23: envoy.config.listener.v3.ListenerFilterChainMatchPredicate.MatchSet.rules:type_name -> envoy.config.listener.v3.ListenerFilterChainMatchPredicate @@ -1304,7 +1314,7 @@ func file_envoy_config_listener_v3_listener_components_proto_init() { } file_envoy_config_listener_v3_listener_components_proto_msgTypes[0].OneofWrappers = []interface{}{ (*Filter_TypedConfig)(nil), - (*Filter_HiddenEnvoyDeprecatedConfig)(nil), + (*Filter_ConfigDiscovery)(nil), } file_envoy_config_listener_v3_listener_components_proto_msgTypes[3].OneofWrappers = []interface{}{ (*ListenerFilterChainMatchPredicate_OrMatch)(nil), @@ -1315,7 +1325,7 @@ func file_envoy_config_listener_v3_listener_components_proto_init() { } file_envoy_config_listener_v3_listener_components_proto_msgTypes[4].OneofWrappers = []interface{}{ (*ListenerFilter_TypedConfig)(nil), - (*ListenerFilter_HiddenEnvoyDeprecatedConfig)(nil), + (*ListenerFilter_ConfigDiscovery)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/api/envoy/config/listener/v3/listener_components.pb.validate.go b/pkg/api/envoy/config/listener/v3/listener_components.pb.validate.go index 539e01e50e..535d04e819 100644 --- a/pkg/api/envoy/config/listener/v3/listener_components.pb.validate.go +++ b/pkg/api/envoy/config/listener/v3/listener_components.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/listener/v3/listener_components.proto -package envoy_config_listener_v3 +package listenerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Filter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Filter with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in FilterMultiError, or nil if none found. +func (m *Filter) ValidateAll() error { + return m.validate(true) +} + +func (m *Filter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return FilterValidationError{ + err := FilterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *Filter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "TypedConfig", @@ -61,12 +100,31 @@ func (m *Filter) Validate() error { } } - case *Filter_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + case *Filter_ConfigDiscovery: + + if all { + switch v := interface{}(m.GetConfigDiscovery()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterValidationError{ + field: "ConfigDiscovery", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterValidationError{ + field: "ConfigDiscovery", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigDiscovery()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "ConfigDiscovery", reason: "embedded message failed validation", cause: err, } @@ -75,9 +133,29 @@ func (m *Filter) Validate() error { } + if len(errors) > 0 { + return FilterMultiError(errors) + } + return nil } +// FilterMultiError is an error wrapping multiple validation errors returned by +// Filter.ValidateAll() if the designated constraints aren't met. +type FilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterMultiError) AllErrors() []error { return m } + // FilterValidationError is the validation error returned by Filter.Validate if // the designated constraints aren't met. type FilterValidationError struct { @@ -133,20 +211,38 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *FilterChainMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterChainMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FilterChainMatchMultiError, or nil if none found. +func (m *FilterChainMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterChainMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetDestinationPort(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 65535 { - return FilterChainMatchValidationError{ + err := FilterChainMatchValidationError{ field: "DestinationPort", reason: "value must be inside range [1, 65535]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -154,7 +250,26 @@ func (m *FilterChainMatch) Validate() error { for idx, item := range m.GetPrefixRanges() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("PrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("PrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("PrefixRanges[%v]", idx), @@ -168,7 +283,26 @@ func (m *FilterChainMatch) Validate() error { // no validation rules for AddressSuffix - if v, ok := interface{}(m.GetSuffixLen()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSuffixLen()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: "SuffixLen", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: "SuffixLen", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuffixLen()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: "SuffixLen", @@ -178,17 +312,74 @@ func (m *FilterChainMatch) Validate() error { } } + for idx, item := range m.GetDirectSourcePrefixRanges() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("DirectSourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("DirectSourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainMatchValidationError{ + field: fmt.Sprintf("DirectSourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if _, ok := FilterChainMatch_ConnectionSourceType_name[int32(m.GetSourceType())]; !ok { - return FilterChainMatchValidationError{ + err := FilterChainMatchValidationError{ field: "SourceType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetSourcePrefixRanges() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainMatchValidationError{ + field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), @@ -204,19 +395,44 @@ func (m *FilterChainMatch) Validate() error { _, _ = idx, item if val := item; val < 1 || val > 65535 { - return FilterChainMatchValidationError{ + err := FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePorts[%v]", idx), reason: "value must be inside range [1, 65535]", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for TransportProtocol + if len(errors) > 0 { + return FilterChainMatchMultiError(errors) + } + return nil } +// FilterChainMatchMultiError is an error wrapping multiple validation errors +// returned by FilterChainMatch.ValidateAll() if the designated constraints +// aren't met. +type FilterChainMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterChainMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterChainMatchMultiError) AllErrors() []error { return m } + // FilterChainMatchValidationError is the validation error returned by // FilterChainMatch.Validate if the designated constraints aren't met. type FilterChainMatchValidationError struct { @@ -272,14 +488,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterChain) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterChain with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterChainMultiError, or +// nil if none found. +func (m *FilterChain) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterChain) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetFilterChainMatch()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetFilterChainMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "FilterChainMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "FilterChainMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterChainMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "FilterChainMatch", @@ -292,7 +541,26 @@ func (m *FilterChain) Validate() error { for idx, item := range m.GetFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: fmt.Sprintf("Filters[%v]", idx), @@ -304,7 +572,26 @@ func (m *FilterChain) Validate() error { } - if v, ok := interface{}(m.GetUseProxyProto()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseProxyProto()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "UseProxyProto", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "UseProxyProto", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseProxyProto()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "UseProxyProto", @@ -314,7 +601,26 @@ func (m *FilterChain) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "Metadata", @@ -324,7 +630,26 @@ func (m *FilterChain) Validate() error { } } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TransportSocket", @@ -334,7 +659,26 @@ func (m *FilterChain) Validate() error { } } - if v, ok := interface{}(m.GetTransportSocketConnectTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocketConnectTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TransportSocketConnectTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "TransportSocketConnectTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocketConnectTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TransportSocketConnectTimeout", @@ -346,7 +690,26 @@ func (m *FilterChain) Validate() error { // no validation rules for Name - if v, ok := interface{}(m.GetOnDemandConfiguration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOnDemandConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "OnDemandConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChainValidationError{ + field: "OnDemandConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnDemandConfiguration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "OnDemandConfiguration", @@ -356,19 +719,29 @@ func (m *FilterChain) Validate() error { } } - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "HiddenEnvoyDeprecatedTlsContext", - reason: "embedded message failed validation", - cause: err, - } - } + if len(errors) > 0 { + return FilterChainMultiError(errors) } return nil } +// FilterChainMultiError is an error wrapping multiple validation errors +// returned by FilterChain.ValidateAll() if the designated constraints aren't met. +type FilterChainMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterChainMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterChainMultiError) AllErrors() []error { return m } + // FilterChainValidationError is the validation error returned by // FilterChain.Validate if the designated constraints aren't met. type FilterChainValidationError struct { @@ -425,17 +798,51 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *ListenerFilterChainMatchPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerFilterChainMatchPredicate +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ListenerFilterChainMatchPredicateMultiError, or nil if none found. +func (m *ListenerFilterChainMatchPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerFilterChainMatchPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *ListenerFilterChainMatchPredicate_OrMatch: - if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "OrMatch", @@ -447,7 +854,26 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { case *ListenerFilterChainMatchPredicate_AndMatch: - if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "AndMatch", @@ -459,7 +885,26 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { case *ListenerFilterChainMatchPredicate_NotMatch: - if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "NotMatch", @@ -472,15 +917,38 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { case *ListenerFilterChainMatchPredicate_AnyMatch: if m.GetAnyMatch() != true { - return ListenerFilterChainMatchPredicateValidationError{ + err := ListenerFilterChainMatchPredicateValidationError{ field: "AnyMatch", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *ListenerFilterChainMatchPredicate_DestinationPortRange: - if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestinationPortRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicateValidationError{ field: "DestinationPortRange", @@ -491,16 +959,42 @@ func (m *ListenerFilterChainMatchPredicate) Validate() error { } default: - return ListenerFilterChainMatchPredicateValidationError{ + err := ListenerFilterChainMatchPredicateValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ListenerFilterChainMatchPredicateMultiError(errors) } return nil } +// ListenerFilterChainMatchPredicateMultiError is an error wrapping multiple +// validation errors returned by +// ListenerFilterChainMatchPredicate.ValidateAll() if the designated +// constraints aren't met. +type ListenerFilterChainMatchPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerFilterChainMatchPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerFilterChainMatchPredicateMultiError) AllErrors() []error { return m } + // ListenerFilterChainMatchPredicateValidationError is the validation error // returned by ListenerFilterChainMatchPredicate.Validate if the designated // constraints aren't met. @@ -559,21 +1053,58 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListenerFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListenerFilterMultiError, +// or nil if none found. +func (m *ListenerFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return ListenerFilterValidationError{ + err := ListenerFilterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFilterDisabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterDisabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "FilterDisabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "FilterDisabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterDisabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "FilterDisabled", @@ -587,7 +1118,26 @@ func (m *ListenerFilter) Validate() error { case *ListenerFilter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "TypedConfig", @@ -597,12 +1147,31 @@ func (m *ListenerFilter) Validate() error { } } - case *ListenerFilter_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + case *ListenerFilter_ConfigDiscovery: + + if all { + switch v := interface{}(m.GetConfigDiscovery()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "ConfigDiscovery", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterValidationError{ + field: "ConfigDiscovery", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigDiscovery()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "ConfigDiscovery", reason: "embedded message failed validation", cause: err, } @@ -611,9 +1180,30 @@ func (m *ListenerFilter) Validate() error { } + if len(errors) > 0 { + return ListenerFilterMultiError(errors) + } + return nil } +// ListenerFilterMultiError is an error wrapping multiple validation errors +// returned by ListenerFilter.ValidateAll() if the designated constraints +// aren't met. +type ListenerFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerFilterMultiError) AllErrors() []error { return m } + // ListenerFilterValidationError is the validation error returned by // ListenerFilter.Validate if the designated constraints aren't met. type ListenerFilterValidationError struct { @@ -670,13 +1260,47 @@ var _ interface { // Validate checks the field values on FilterChain_OnDemandConfiguration with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *FilterChain_OnDemandConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterChain_OnDemandConfiguration +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// FilterChain_OnDemandConfigurationMultiError, or nil if none found. +func (m *FilterChain_OnDemandConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterChain_OnDemandConfiguration) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRebuildTimeout()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRebuildTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterChain_OnDemandConfigurationValidationError{ + field: "RebuildTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterChain_OnDemandConfigurationValidationError{ + field: "RebuildTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRebuildTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChain_OnDemandConfigurationValidationError{ field: "RebuildTimeout", @@ -686,9 +1310,31 @@ func (m *FilterChain_OnDemandConfiguration) Validate() error { } } + if len(errors) > 0 { + return FilterChain_OnDemandConfigurationMultiError(errors) + } + return nil } +// FilterChain_OnDemandConfigurationMultiError is an error wrapping multiple +// validation errors returned by +// FilterChain_OnDemandConfiguration.ValidateAll() if the designated +// constraints aren't met. +type FilterChain_OnDemandConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterChain_OnDemandConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterChain_OnDemandConfigurationMultiError) AllErrors() []error { return m } + // FilterChain_OnDemandConfigurationValidationError is the validation error // returned by FilterChain_OnDemandConfiguration.Validate if the designated // constraints aren't met. @@ -748,23 +1394,62 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListenerFilterChainMatchPredicate_MatchSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ListenerFilterChainMatchPredicate_MatchSet with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ListenerFilterChainMatchPredicate_MatchSetMultiError, or nil if none found. +func (m *ListenerFilterChainMatchPredicate_MatchSet) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerFilterChainMatchPredicate_MatchSet) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRules()) < 2 { - return ListenerFilterChainMatchPredicate_MatchSetValidationError{ + err := ListenerFilterChainMatchPredicate_MatchSetValidationError{ field: "Rules", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerFilterChainMatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterChainMatchPredicate_MatchSetValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -776,9 +1461,31 @@ func (m *ListenerFilterChainMatchPredicate_MatchSet) Validate() error { } + if len(errors) > 0 { + return ListenerFilterChainMatchPredicate_MatchSetMultiError(errors) + } + return nil } +// ListenerFilterChainMatchPredicate_MatchSetMultiError is an error wrapping +// multiple validation errors returned by +// ListenerFilterChainMatchPredicate_MatchSet.ValidateAll() if the designated +// constraints aren't met. +type ListenerFilterChainMatchPredicate_MatchSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerFilterChainMatchPredicate_MatchSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerFilterChainMatchPredicate_MatchSetMultiError) AllErrors() []error { return m } + // ListenerFilterChainMatchPredicate_MatchSetValidationError is the validation // error returned by ListenerFilterChainMatchPredicate_MatchSet.Validate if // the designated constraints aren't met. diff --git a/pkg/api/envoy/config/listener/v3/quic_config.pb.go b/pkg/api/envoy/config/listener/v3/quic_config.pb.go index 46345d8172..d67a801431 100644 --- a/pkg/api/envoy/config/listener/v3/quic_config.pb.go +++ b/pkg/api/envoy/config/listener/v3/quic_config.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/listener/v3/quic_config.proto -package envoy_config_listener_v3 +package listenerv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" + _ "github.com/envoyproxy/protoc-gen-validate/validate" duration "github.com/golang/protobuf/ptypes/duration" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,29 +25,42 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration specific to the QUIC protocol. -// Next id: 5 +// Configuration specific to the UDP QUIC listener. +// [#next-free-field: 8] type QuicProtocolOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Maximum number of streams that the client can negotiate per connection. 100 - // if not specified. - MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` + QuicProtocolOptions *v3.QuicProtocolOptions `protobuf:"bytes,1,opt,name=quic_protocol_options,json=quicProtocolOptions,proto3" json:"quic_protocol_options,omitempty"` // Maximum number of milliseconds that connection will be alive when there is - // no network activity. 300000ms if not specified. + // no network activity. + // + // If it is less than 1ms, Envoy will use 1ms. 300000ms if not specified. IdleTimeout *duration.Duration `protobuf:"bytes,2,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` // Connection timeout in milliseconds before the crypto handshake is finished. - // 20000ms if not specified. + // + // If it is less than 5000ms, Envoy will use 5000ms. 20000ms if not specified. CryptoHandshakeTimeout *duration.Duration `protobuf:"bytes,3,opt,name=crypto_handshake_timeout,json=cryptoHandshakeTimeout,proto3" json:"crypto_handshake_timeout,omitempty"` // Runtime flag that controls whether the listener is enabled or not. If not specified, defaults // to enabled. Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,4,opt,name=enabled,proto3" json:"enabled,omitempty"` + // A multiplier to number of connections which is used to determine how many packets to read per + // event loop. A reasonable number should allow the listener to process enough payload but not + // starve TCP and other UDP sockets and also prevent long event loop duration. + // The default value is 32. This means if there are N QUIC connections, the total number of + // packets to read in each read event will be 32 * N. + // The actual number of packets to read in total by the UDP listener is also + // bound by 6000, regardless of this field or how many connections there are. + PacketsToReadToConnectionCountRatio *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=packets_to_read_to_connection_count_ratio,json=packetsToReadToConnectionCountRatio,proto3" json:"packets_to_read_to_connection_count_ratio,omitempty"` + // Configure which implementation of `quic::QuicCryptoClientStreamBase` to be used for this listener. + // If not specified the :ref:`QUICHE default one configured by ` will be used. + // [#extension-category: envoy.quic.server.crypto_stream] + CryptoStreamConfig *v3.TypedExtensionConfig `protobuf:"bytes,6,opt,name=crypto_stream_config,json=cryptoStreamConfig,proto3" json:"crypto_stream_config,omitempty"` + // Configure which implementation of `quic::ProofSource` to be used for this listener. + // If not specified the :ref:`default one configured by ` will be used. + // [#extension-category: envoy.quic.proof_source] + ProofSourceConfig *v3.TypedExtensionConfig `protobuf:"bytes,7,opt,name=proof_source_config,json=proofSourceConfig,proto3" json:"proof_source_config,omitempty"` } func (x *QuicProtocolOptions) Reset() { @@ -82,9 +95,9 @@ func (*QuicProtocolOptions) Descriptor() ([]byte, []int) { return file_envoy_config_listener_v3_quic_config_proto_rawDescGZIP(), []int{0} } -func (x *QuicProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value { +func (x *QuicProtocolOptions) GetQuicProtocolOptions() *v3.QuicProtocolOptions { if x != nil { - return x.MaxConcurrentStreams + return x.QuicProtocolOptions } return nil } @@ -110,6 +123,27 @@ func (x *QuicProtocolOptions) GetEnabled() *v3.RuntimeFeatureFlag { return nil } +func (x *QuicProtocolOptions) GetPacketsToReadToConnectionCountRatio() *wrappers.UInt32Value { + if x != nil { + return x.PacketsToReadToConnectionCountRatio + } + return nil +} + +func (x *QuicProtocolOptions) GetCryptoStreamConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.CryptoStreamConfig + } + return nil +} + +func (x *QuicProtocolOptions) GetProofSourceConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.ProofSourceConfig + } + return nil +} + var File_envoy_config_listener_v3_quic_config_proto protoreflect.FileDescriptor var file_envoy_config_listener_v3_quic_config_proto_rawDesc = []byte{ @@ -119,43 +153,74 @@ var file_envoy_config_listener_v3_quic_config_proto_rawDesc = []byte{ 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x02, 0x0a, 0x13, 0x51, 0x75, - 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x52, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x14, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x18, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x68, 0x61, - 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x16, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, - 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x30, 0x9a, 0xc5, - 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x43, - 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x51, 0x75, 0x69, 0x63, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x05, + 0x0a, 0x13, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x15, 0x71, 0x75, 0x69, 0x63, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x69, 0x63, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x13, 0x71, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x53, 0x0a, 0x18, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x16, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, + 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x7d, 0x0a, 0x29, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, + 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x23, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x6f, + 0x52, 0x65, 0x61, 0x64, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x5c, 0x0a, 0x14, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x8f, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x0f, 0x51, 0x75, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -172,21 +237,26 @@ func file_envoy_config_listener_v3_quic_config_proto_rawDescGZIP() []byte { var file_envoy_config_listener_v3_quic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_envoy_config_listener_v3_quic_config_proto_goTypes = []interface{}{ - (*QuicProtocolOptions)(nil), // 0: envoy.config.listener.v3.QuicProtocolOptions - (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 2: google.protobuf.Duration - (*v3.RuntimeFeatureFlag)(nil), // 3: envoy.config.core.v3.RuntimeFeatureFlag + (*QuicProtocolOptions)(nil), // 0: envoy.config.listener.v3.QuicProtocolOptions + (*v3.QuicProtocolOptions)(nil), // 1: envoy.config.core.v3.QuicProtocolOptions + (*duration.Duration)(nil), // 2: google.protobuf.Duration + (*v3.RuntimeFeatureFlag)(nil), // 3: envoy.config.core.v3.RuntimeFeatureFlag + (*wrappers.UInt32Value)(nil), // 4: google.protobuf.UInt32Value + (*v3.TypedExtensionConfig)(nil), // 5: envoy.config.core.v3.TypedExtensionConfig } var file_envoy_config_listener_v3_quic_config_proto_depIdxs = []int32{ - 1, // 0: envoy.config.listener.v3.QuicProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value + 1, // 0: envoy.config.listener.v3.QuicProtocolOptions.quic_protocol_options:type_name -> envoy.config.core.v3.QuicProtocolOptions 2, // 1: envoy.config.listener.v3.QuicProtocolOptions.idle_timeout:type_name -> google.protobuf.Duration 2, // 2: envoy.config.listener.v3.QuicProtocolOptions.crypto_handshake_timeout:type_name -> google.protobuf.Duration 3, // 3: envoy.config.listener.v3.QuicProtocolOptions.enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 4, // 4: envoy.config.listener.v3.QuicProtocolOptions.packets_to_read_to_connection_count_ratio:type_name -> google.protobuf.UInt32Value + 5, // 5: envoy.config.listener.v3.QuicProtocolOptions.crypto_stream_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 5, // 6: envoy.config.listener.v3.QuicProtocolOptions.proof_source_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_envoy_config_listener_v3_quic_config_proto_init() } diff --git a/pkg/api/envoy/config/listener/v3/quic_config.pb.validate.go b/pkg/api/envoy/config/listener/v3/quic_config.pb.validate.go index 0b57b5dfd1..4eb1a95fa7 100644 --- a/pkg/api/envoy/config/listener/v3/quic_config.pb.validate.go +++ b/pkg/api/envoy/config/listener/v3/quic_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/listener/v3/quic_config.proto -package envoy_config_listener_v3 +package listenerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,81 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *QuicProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QuicProtocolOptionsMultiError, or nil if none found. +func (m *QuicProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxConcurrentStreams()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetQuicProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "QuicProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "QuicProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuicProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", + field: "QuicProtocolOptions", reason: "embedded message failed validation", cause: err, } } } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicProtocolOptionsValidationError{ field: "IdleTimeout", @@ -61,7 +115,26 @@ func (m *QuicProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetCryptoHandshakeTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCryptoHandshakeTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "CryptoHandshakeTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "CryptoHandshakeTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCryptoHandshakeTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicProtocolOptionsValidationError{ field: "CryptoHandshakeTimeout", @@ -71,7 +144,26 @@ func (m *QuicProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicProtocolOptionsValidationError{ field: "Enabled", @@ -81,9 +173,103 @@ func (m *QuicProtocolOptions) Validate() error { } } + if wrapper := m.GetPacketsToReadToConnectionCountRatio(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := QuicProtocolOptionsValidationError{ + field: "PacketsToReadToConnectionCountRatio", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetCryptoStreamConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "CryptoStreamConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "CryptoStreamConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCryptoStreamConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicProtocolOptionsValidationError{ + field: "CryptoStreamConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetProofSourceConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "ProofSourceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicProtocolOptionsValidationError{ + field: "ProofSourceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProofSourceConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicProtocolOptionsValidationError{ + field: "ProofSourceConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return QuicProtocolOptionsMultiError(errors) + } + return nil } +// QuicProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by QuicProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type QuicProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicProtocolOptionsMultiError) AllErrors() []error { return m } + // QuicProtocolOptionsValidationError is the validation error returned by // QuicProtocolOptions.Validate if the designated constraints aren't met. type QuicProtocolOptionsValidationError struct { diff --git a/pkg/api/envoy/config/listener/v3/udp_default_writer_config.pb.go b/pkg/api/envoy/config/listener/v3/udp_default_writer_config.pb.go deleted file mode 100644 index 1d9128c942..0000000000 --- a/pkg/api/envoy/config/listener/v3/udp_default_writer_config.pb.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v3/udp_default_writer_config.proto - -package envoy_config_listener_v3 - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] -// Configuration specific to the Udp Default Writer. -type UdpDefaultWriterOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UdpDefaultWriterOptions) Reset() { - *x = UdpDefaultWriterOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v3_udp_default_writer_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UdpDefaultWriterOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UdpDefaultWriterOptions) ProtoMessage() {} - -func (x *UdpDefaultWriterOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v3_udp_default_writer_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UdpDefaultWriterOptions.ProtoReflect.Descriptor instead. -func (*UdpDefaultWriterOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_config_listener_v3_udp_default_writer_config_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x64, 0x70, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x42, 0x4f, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1b, 0x55, 0x64, 0x70, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescOnce sync.Once - file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescData = file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDesc -) - -func file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescData) - }) - return file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDescData -} - -var file_envoy_config_listener_v3_udp_default_writer_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_listener_v3_udp_default_writer_config_proto_goTypes = []interface{}{ - (*UdpDefaultWriterOptions)(nil), // 0: envoy.config.listener.v3.UdpDefaultWriterOptions -} -var file_envoy_config_listener_v3_udp_default_writer_config_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v3_udp_default_writer_config_proto_init() } -func file_envoy_config_listener_v3_udp_default_writer_config_proto_init() { - if File_envoy_config_listener_v3_udp_default_writer_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v3_udp_default_writer_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UdpDefaultWriterOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v3_udp_default_writer_config_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v3_udp_default_writer_config_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v3_udp_default_writer_config_proto_msgTypes, - }.Build() - File_envoy_config_listener_v3_udp_default_writer_config_proto = out.File - file_envoy_config_listener_v3_udp_default_writer_config_proto_rawDesc = nil - file_envoy_config_listener_v3_udp_default_writer_config_proto_goTypes = nil - file_envoy_config_listener_v3_udp_default_writer_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v3/udp_default_writer_config.pb.validate.go b/pkg/api/envoy/config/listener/v3/udp_default_writer_config.pb.validate.go deleted file mode 100644 index 9b1533c7a9..0000000000 --- a/pkg/api/envoy/config/listener/v3/udp_default_writer_config.pb.validate.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v3/udp_default_writer_config.proto - -package envoy_config_listener_v3 - -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{} -) - -// Validate checks the field values on UdpDefaultWriterOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UdpDefaultWriterOptions) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// UdpDefaultWriterOptionsValidationError is the validation error returned by -// UdpDefaultWriterOptions.Validate if the designated constraints aren't met. -type UdpDefaultWriterOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UdpDefaultWriterOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UdpDefaultWriterOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UdpDefaultWriterOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UdpDefaultWriterOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UdpDefaultWriterOptionsValidationError) ErrorName() string { - return "UdpDefaultWriterOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e UdpDefaultWriterOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUdpDefaultWriterOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UdpDefaultWriterOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UdpDefaultWriterOptionsValidationError{} diff --git a/pkg/api/envoy/config/listener/v3/udp_gso_batch_writer_config.pb.go b/pkg/api/envoy/config/listener/v3/udp_gso_batch_writer_config.pb.go deleted file mode 100644 index bfe2160d57..0000000000 --- a/pkg/api/envoy/config/listener/v3/udp_gso_batch_writer_config.pb.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v3/udp_gso_batch_writer_config.proto - -package envoy_config_listener_v3 - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] -// Configuration specific to the Udp Gso Batch Writer. -type UdpGsoBatchWriterOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UdpGsoBatchWriterOptions) Reset() { - *x = UdpGsoBatchWriterOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UdpGsoBatchWriterOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UdpGsoBatchWriterOptions) ProtoMessage() {} - -func (x *UdpGsoBatchWriterOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UdpGsoBatchWriterOptions.ProtoReflect.Descriptor instead. -func (*UdpGsoBatchWriterOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_config_listener_v3_udp_gso_batch_writer_config_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x67, - 0x73, 0x6f, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x64, 0x70, 0x47, - 0x73, 0x6f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x50, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1c, - 0x55, 0x64, 0x70, 0x47, 0x73, 0x6f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescOnce sync.Once - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescData = file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDesc -) - -func file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescData) - }) - return file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDescData -} - -var file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_goTypes = []interface{}{ - (*UdpGsoBatchWriterOptions)(nil), // 0: envoy.config.listener.v3.UdpGsoBatchWriterOptions -} -var file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_init() } -func file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_init() { - if File_envoy_config_listener_v3_udp_gso_batch_writer_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UdpGsoBatchWriterOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_msgTypes, - }.Build() - File_envoy_config_listener_v3_udp_gso_batch_writer_config_proto = out.File - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_rawDesc = nil - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_goTypes = nil - file_envoy_config_listener_v3_udp_gso_batch_writer_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v3/udp_gso_batch_writer_config.pb.validate.go b/pkg/api/envoy/config/listener/v3/udp_gso_batch_writer_config.pb.validate.go deleted file mode 100644 index c2d67ac990..0000000000 --- a/pkg/api/envoy/config/listener/v3/udp_gso_batch_writer_config.pb.validate.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v3/udp_gso_batch_writer_config.proto - -package envoy_config_listener_v3 - -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{} -) - -// Validate checks the field values on UdpGsoBatchWriterOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UdpGsoBatchWriterOptions) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// UdpGsoBatchWriterOptionsValidationError is the validation error returned by -// UdpGsoBatchWriterOptions.Validate if the designated constraints aren't met. -type UdpGsoBatchWriterOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UdpGsoBatchWriterOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UdpGsoBatchWriterOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UdpGsoBatchWriterOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UdpGsoBatchWriterOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UdpGsoBatchWriterOptionsValidationError) ErrorName() string { - return "UdpGsoBatchWriterOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e UdpGsoBatchWriterOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUdpGsoBatchWriterOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UdpGsoBatchWriterOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UdpGsoBatchWriterOptionsValidationError{} diff --git a/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.go b/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.go index 0fe578e7e2..10abcfd374 100644 --- a/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.go +++ b/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/listener/v3/udp_listener_config.proto -package envoy_config_listener_v3 +package listenerv3 import ( - _ "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" + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,26 +22,20 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - +// [#next-free-field: 8] type UdpListenerConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Used to look up UDP listener factory, matches "raw_udp_listener" or - // "quic_listener" to create a specific udp listener. - // If not specified, treat as "raw_udp_listener". - UdpListenerName string `protobuf:"bytes,1,opt,name=udp_listener_name,json=udpListenerName,proto3" json:"udp_listener_name,omitempty"` - // Used to create a specific listener factory. To some factory, e.g. - // "raw_udp_listener", config is not needed. - // - // Types that are assignable to ConfigType: - // *UdpListenerConfig_TypedConfig - // *UdpListenerConfig_HiddenEnvoyDeprecatedConfig - ConfigType isUdpListenerConfig_ConfigType `protobuf_oneof:"config_type"` + // UDP socket configuration for the listener. The default for + // :ref:`prefer_gro ` is false for + // listener sockets. If receiving a large amount of datagrams from a small number of sources, it + // may be worthwhile to enable this option after performance testing. + DownstreamSocketConfig *v3.UdpSocketConfig `protobuf:"bytes,5,opt,name=downstream_socket_config,json=downstreamSocketConfig,proto3" json:"downstream_socket_config,omitempty"` + // Configuration for QUIC protocol. If empty, QUIC will not be enabled on this listener. Set + // to the default object to enable QUIC without modifying any additional options. + QuicOptions *QuicProtocolOptions `protobuf:"bytes,7,opt,name=quic_options,json=quicOptions,proto3" json:"quic_options,omitempty"` } func (x *UdpListenerConfig) Reset() { @@ -78,52 +70,20 @@ func (*UdpListenerConfig) Descriptor() ([]byte, []int) { return file_envoy_config_listener_v3_udp_listener_config_proto_rawDescGZIP(), []int{0} } -func (x *UdpListenerConfig) GetUdpListenerName() string { +func (x *UdpListenerConfig) GetDownstreamSocketConfig() *v3.UdpSocketConfig { if x != nil { - return x.UdpListenerName - } - return "" -} - -func (m *UdpListenerConfig) GetConfigType() isUdpListenerConfig_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *UdpListenerConfig) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*UdpListenerConfig_TypedConfig); ok { - return x.TypedConfig + return x.DownstreamSocketConfig } return nil } -// Deprecated: Do not use. -func (x *UdpListenerConfig) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*UdpListenerConfig_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig +func (x *UdpListenerConfig) GetQuicOptions() *QuicProtocolOptions { + if x != nil { + return x.QuicOptions } return nil } -type isUdpListenerConfig_ConfigType interface { - isUdpListenerConfig_ConfigType() -} - -type UdpListenerConfig_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -type UdpListenerConfig_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - -func (*UdpListenerConfig_TypedConfig) isUdpListenerConfig_ConfigType() {} - -func (*UdpListenerConfig_HiddenEnvoyDeprecatedConfig) isUdpListenerConfig_ConfigType() {} - type ActiveRawUdpListenerConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -169,44 +129,51 @@ var file_envoy_config_listener_v3_udp_listener_config_proto_rawDesc = []byte{ 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x19, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x02, 0x0a, 0x11, 0x55, 0x64, - 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x2a, 0x0a, 0x11, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x64, 0x70, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, - 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x55, 0x0a, 0x1a, 0x41, 0x63, 0x74, + 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x2c, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x02, 0x0a, 0x11, 0x55, + 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x5f, 0x0a, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, 0x70, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x50, 0x0a, 0x0c, 0x71, 0x75, 0x69, 0x63, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x71, 0x75, 0x69, 0x63, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, + 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x06, 0x10, + 0x07, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x55, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x42, 0x4a, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x55, 0x64, 0x70, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x96, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x55, 0x64, 0x70, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -225,12 +192,12 @@ var file_envoy_config_listener_v3_udp_listener_config_proto_msgTypes = make([]pr var file_envoy_config_listener_v3_udp_listener_config_proto_goTypes = []interface{}{ (*UdpListenerConfig)(nil), // 0: envoy.config.listener.v3.UdpListenerConfig (*ActiveRawUdpListenerConfig)(nil), // 1: envoy.config.listener.v3.ActiveRawUdpListenerConfig - (*any.Any)(nil), // 2: google.protobuf.Any - (*_struct.Struct)(nil), // 3: google.protobuf.Struct + (*v3.UdpSocketConfig)(nil), // 2: envoy.config.core.v3.UdpSocketConfig + (*QuicProtocolOptions)(nil), // 3: envoy.config.listener.v3.QuicProtocolOptions } var file_envoy_config_listener_v3_udp_listener_config_proto_depIdxs = []int32{ - 2, // 0: envoy.config.listener.v3.UdpListenerConfig.typed_config:type_name -> google.protobuf.Any - 3, // 1: envoy.config.listener.v3.UdpListenerConfig.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct + 2, // 0: envoy.config.listener.v3.UdpListenerConfig.downstream_socket_config:type_name -> envoy.config.core.v3.UdpSocketConfig + 3, // 1: envoy.config.listener.v3.UdpListenerConfig.quic_options:type_name -> envoy.config.listener.v3.QuicProtocolOptions 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -243,6 +210,7 @@ func file_envoy_config_listener_v3_udp_listener_config_proto_init() { if File_envoy_config_listener_v3_udp_listener_config_proto != nil { return } + file_envoy_config_listener_v3_quic_config_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_config_listener_v3_udp_listener_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UdpListenerConfig); i { @@ -269,10 +237,6 @@ func file_envoy_config_listener_v3_udp_listener_config_proto_init() { } } } - file_envoy_config_listener_v3_udp_listener_config_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*UdpListenerConfig_TypedConfig)(nil), - (*UdpListenerConfig_HiddenEnvoyDeprecatedConfig)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.validate.go b/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.validate.go index b848eb0fde..d1364616d0 100644 --- a/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.validate.go +++ b/pkg/api/envoy/config/listener/v3/udp_listener_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/listener/v3/udp_listener_config.proto -package envoy_config_listener_v3 +package listenerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,50 +31,114 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *UdpListenerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpListenerConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UdpListenerConfigMultiError, or nil if none found. +func (m *UdpListenerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpListenerConfig) validate(all bool) error { if m == nil { return nil } - // no validation rules for UdpListenerName - - switch m.ConfigType.(type) { + var errors []error - case *UdpListenerConfig_TypedConfig: - - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpListenerConfigValidationError{ + field: "DownstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return UdpListenerConfigValidationError{ - field: "TypedConfig", + errors = append(errors, UdpListenerConfigValidationError{ + field: "DownstreamSocketConfig", reason: "embedded message failed validation", cause: err, - } + }) } } + } else if v, ok := interface{}(m.GetDownstreamSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpListenerConfigValidationError{ + field: "DownstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } - case *UdpListenerConfig_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetQuicOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpListenerConfigValidationError{ + field: "QuicOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return UdpListenerConfigValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + errors = append(errors, UdpListenerConfigValidationError{ + field: "QuicOptions", reason: "embedded message failed validation", cause: err, - } + }) + } + } + } else if v, ok := interface{}(m.GetQuicOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpListenerConfigValidationError{ + field: "QuicOptions", + reason: "embedded message failed validation", + cause: err, } } + } + if len(errors) > 0 { + return UdpListenerConfigMultiError(errors) } return nil } +// UdpListenerConfigMultiError is an error wrapping multiple validation errors +// returned by UdpListenerConfig.ValidateAll() if the designated constraints +// aren't met. +type UdpListenerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpListenerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpListenerConfigMultiError) AllErrors() []error { return m } + // UdpListenerConfigValidationError is the validation error returned by // UdpListenerConfig.Validate if the designated constraints aren't met. type UdpListenerConfigValidationError struct { @@ -132,15 +197,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ActiveRawUdpListenerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActiveRawUdpListenerConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ActiveRawUdpListenerConfigMultiError, or nil if none found. +func (m *ActiveRawUdpListenerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ActiveRawUdpListenerConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return ActiveRawUdpListenerConfigMultiError(errors) + } + return nil } +// ActiveRawUdpListenerConfigMultiError is an error wrapping multiple +// validation errors returned by ActiveRawUdpListenerConfig.ValidateAll() if +// the designated constraints aren't met. +type ActiveRawUdpListenerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActiveRawUdpListenerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActiveRawUdpListenerConfigMultiError) AllErrors() []error { return m } + // ActiveRawUdpListenerConfigValidationError is the validation error returned // by ActiveRawUdpListenerConfig.Validate if the designated constraints aren't met. type ActiveRawUdpListenerConfigValidationError struct { diff --git a/pkg/api/envoy/config/listener/v4alpha/api_listener.pb.go b/pkg/api/envoy/config/listener/v4alpha/api_listener.pb.go deleted file mode 100644 index 7e347e2591..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/api_listener.pb.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v4alpha/api_listener.proto - -package envoy_config_listener_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Describes a type of API listener, which is used in non-proxy clients. The type of API -// exposed to the non-proxy application depends on the type of API listener. -type ApiListener struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type in this field determines the type of API listener. At present, the following - // types are supported: - // envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) - // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the - // specific config message for each type of API listener. We could not do this in v2 because - // it would have caused circular dependencies for go protos: lds.proto depends on this file, - // and http_connection_manager.proto depends on rds.proto, which is in the same directory as - // lds.proto, so lds.proto cannot depend on this file.] - ApiListener *any.Any `protobuf:"bytes,1,opt,name=api_listener,json=apiListener,proto3" json:"api_listener,omitempty"` -} - -func (x *ApiListener) Reset() { - *x = ApiListener{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_api_listener_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApiListener) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApiListener) ProtoMessage() {} - -func (x *ApiListener) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_api_listener_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApiListener.ProtoReflect.Descriptor instead. -func (*ApiListener) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_api_listener_proto_rawDescGZIP(), []int{0} -} - -func (x *ApiListener) GetApiListener() *any.Any { - if x != nil { - return x.ApiListener - } - return nil -} - -var File_envoy_config_listener_v4alpha_api_listener_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v4alpha_api_listener_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, - 0x0a, 0x0b, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, - 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x70, 0x69, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x42, 0x49, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x10, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v4alpha_api_listener_proto_rawDescOnce sync.Once - file_envoy_config_listener_v4alpha_api_listener_proto_rawDescData = file_envoy_config_listener_v4alpha_api_listener_proto_rawDesc -) - -func file_envoy_config_listener_v4alpha_api_listener_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v4alpha_api_listener_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v4alpha_api_listener_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v4alpha_api_listener_proto_rawDescData) - }) - return file_envoy_config_listener_v4alpha_api_listener_proto_rawDescData -} - -var file_envoy_config_listener_v4alpha_api_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_listener_v4alpha_api_listener_proto_goTypes = []interface{}{ - (*ApiListener)(nil), // 0: envoy.config.listener.v4alpha.ApiListener - (*any.Any)(nil), // 1: google.protobuf.Any -} -var file_envoy_config_listener_v4alpha_api_listener_proto_depIdxs = []int32{ - 1, // 0: envoy.config.listener.v4alpha.ApiListener.api_listener:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v4alpha_api_listener_proto_init() } -func file_envoy_config_listener_v4alpha_api_listener_proto_init() { - if File_envoy_config_listener_v4alpha_api_listener_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v4alpha_api_listener_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApiListener); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v4alpha_api_listener_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v4alpha_api_listener_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v4alpha_api_listener_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v4alpha_api_listener_proto_msgTypes, - }.Build() - File_envoy_config_listener_v4alpha_api_listener_proto = out.File - file_envoy_config_listener_v4alpha_api_listener_proto_rawDesc = nil - file_envoy_config_listener_v4alpha_api_listener_proto_goTypes = nil - file_envoy_config_listener_v4alpha_api_listener_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v4alpha/listener.pb.go b/pkg/api/envoy/config/listener/v4alpha/listener.pb.go deleted file mode 100644 index 31cf0d2aa1..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/listener.pb.go +++ /dev/null @@ -1,1064 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v4alpha/listener.proto - -package envoy_config_listener_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/cncf/udpa/go/xds/core/v3" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type 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 -) - -// Enum value maps for Listener_DrainType. -var ( - Listener_DrainType_name = map[int32]string{ - 0: "DEFAULT", - 1: "MODIFY_ONLY", - } - Listener_DrainType_value = map[string]int32{ - "DEFAULT": 0, - "MODIFY_ONLY": 1, - } -) - -func (x Listener_DrainType) Enum() *Listener_DrainType { - p := new(Listener_DrainType) - *p = x - return p -} - -func (x Listener_DrainType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Listener_DrainType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_listener_v4alpha_listener_proto_enumTypes[0].Descriptor() -} - -func (Listener_DrainType) Type() protoreflect.EnumType { - return &file_envoy_config_listener_v4alpha_listener_proto_enumTypes[0] -} - -func (x Listener_DrainType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Listener_DrainType.Descriptor instead. -func (Listener_DrainType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_proto_rawDescGZIP(), []int{1, 0} -} - -// Listener list collections. Entries are *Listener* resources or references. -// [#not-implemented-hide:] -type ListenerCollection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Entries []*v3.CollectionEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` -} - -func (x *ListenerCollection) Reset() { - *x = ListenerCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerCollection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerCollection) ProtoMessage() {} - -func (x *ListenerCollection) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerCollection.ProtoReflect.Descriptor instead. -func (*ListenerCollection) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_proto_rawDescGZIP(), []int{0} -} - -func (x *ListenerCollection) GetEntries() []*v3.CollectionEntry { - if x != nil { - return x.Entries - } - return nil -} - -// [#next-free-field: 27] -type Listener struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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. - 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 *v4alpha.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // 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 []*FilterChain `protobuf:"bytes,3,rep,name=filter_chains,json=filterChains,proto3" json:"filter_chains,omitempty"` - // 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. - UseOriginalDst *wrappers.BoolValue `protobuf:"bytes,4,opt,name=use_original_dst,json=useOriginalDst,proto3" json:"use_original_dst,omitempty"` - // The default filter chain if none of the filter chain matches. If no default filter chain is supplied, - // the connection will be closed. The filter chain match is ignored in this field. - DefaultFilterChain *FilterChain `protobuf:"bytes,25,opt,name=default_filter_chain,json=defaultFilterChain,proto3" json:"default_filter_chain,omitempty"` - // Soft limit on size of the listener’s new connection read and write buffers. - // If unspecified, an implementation defined default is applied (1MiB). - PerConnectionBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes,proto3" json:"per_connection_buffer_limit_bytes,omitempty"` - // Listener metadata. - Metadata *v4alpha.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` - // [#not-implemented-hide:] - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedDeprecatedV1 *Listener_DeprecatedV1 `protobuf:"bytes,7,opt,name=hidden_envoy_deprecated_deprecated_v1,json=hiddenEnvoyDeprecatedDeprecatedV1,proto3" json:"hidden_envoy_deprecated_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.config.listener.v4alpha.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. - // UDP Listener filters can be specified when the protocol in the listener socket address in - // :ref:`protocol ` is :ref:`UDP - // `. - // UDP listeners currently support a single filter. - ListenerFilters []*ListenerFilter `protobuf:"bytes,9,rep,name=listener_filters,json=listenerFilters,proto3" json:"listener_filters,omitempty"` - // 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 unless - // `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the - // timeout. If not specified, a default timeout of 15s is used. - ListenerFiltersTimeout *duration.Duration `protobuf:"bytes,15,opt,name=listener_filters_timeout,json=listenerFiltersTimeout,proto3" json:"listener_filters_timeout,omitempty"` - // Whether a connection should be created when listener filters timeout. Default is false. - // - // .. attention:: - // - // Some listener filters, such as :ref:`Proxy Protocol filter - // `, should not be used with this option. It will cause - // unexpected behavior when a connection is created. - ContinueOnListenerFiltersTimeout bool `protobuf:"varint,17,opt,name=continue_on_listener_filters_timeout,json=continueOnListenerFiltersTimeout,proto3" json:"continue_on_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 *wrappers.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 *wrappers.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 []*v4alpha.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 *wrappers.UInt32Value `protobuf:"bytes,12,opt,name=tcp_fast_open_queue_length,json=tcpFastOpenQueueLength,proto3" json:"tcp_fast_open_queue_length,omitempty"` - // Specifies the intended direction of the traffic relative to the local Envoy. - TrafficDirection v4alpha.TrafficDirection `protobuf:"varint,16,opt,name=traffic_direction,json=trafficDirection,proto3,enum=envoy.config.core.v4alpha.TrafficDirection" json:"traffic_direction,omitempty"` - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // listener to create, i.e. :ref:`udp_listener_name - // ` = "raw_udp_listener" for - // creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". - UdpListenerConfig *UdpListenerConfig `protobuf:"bytes,18,opt,name=udp_listener_config,json=udpListenerConfig,proto3" json:"udp_listener_config,omitempty"` - // Used to represent an API listener, which is used in non-proxy clients. The type of API - // exposed to the non-proxy application depends on the type of API listener. - // When this field is set, no other field except for :ref:`name` - // should be set. - // - // .. note:: - // - // Currently only one ApiListener can be installed; and it can only be done via bootstrap config, - // not LDS. - // - // [#next-major-version: In the v3 API, instead of this messy approach where the socket - // listener fields are directly in the top-level Listener message and the API listener types - // are in the ApiListener message, the socket listener messages should be in their own message, - // and the top-level Listener should essentially be a oneof that selects between the - // socket listener and the various types of API listener. That way, a given Listener message - // can structurally only contain the fields of the relevant type.] - ApiListener *ApiListener `protobuf:"bytes,19,opt,name=api_listener,json=apiListener,proto3" json:"api_listener,omitempty"` - // The listener's connection balancer configuration, currently only applicable to TCP listeners. - // If no configuration is specified, Envoy will not attempt to balance active connections between - // worker threads. - ConnectionBalanceConfig *Listener_ConnectionBalanceConfig `protobuf:"bytes,20,opt,name=connection_balance_config,json=connectionBalanceConfig,proto3" json:"connection_balance_config,omitempty"` - // When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and - // create one socket for each worker thread. This makes inbound connections - // distribute among worker threads roughly evenly in cases where there are a high number - // of connections. When this flag is set to false, all worker threads share one socket. - // - // Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart - // (see `3rd paragraph in 'soreuseport' commit message - // `_). - // This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket - // `_. - ReusePort bool `protobuf:"varint,21,opt,name=reuse_port,json=reusePort,proto3" json:"reuse_port,omitempty"` - // Configuration for :ref:`access logs ` - // emitted by this listener. - AccessLog []*v4alpha1.AccessLog `protobuf:"bytes,22,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // writer to create, i.e. :ref:`name ` - // = "udp_default_writer" for creating a udp writer with writing in passthrough mode, - // = "udp_gso_batch_writer" for creating a udp writer with writing in batch mode. - // If not present, treat it as "udp_default_writer". - // [#not-implemented-hide:] - UdpWriterConfig *v4alpha.TypedExtensionConfig `protobuf:"bytes,23,opt,name=udp_writer_config,json=udpWriterConfig,proto3" json:"udp_writer_config,omitempty"` - // The maximum length a tcp listener's pending connections queue can grow to. If no value is - // provided net.core.somaxconn will be used on Linux and 128 otherwise. - TcpBacklogSize *wrappers.UInt32Value `protobuf:"bytes,24,opt,name=tcp_backlog_size,json=tcpBacklogSize,proto3" json:"tcp_backlog_size,omitempty"` - // Whether the listener should bind to the port. A listener that doesn't - // bind can only receive connections redirected from other listeners that set - // :ref:`use_original_dst ` - // to true. Default is true. - BindToPort *wrappers.BoolValue `protobuf:"bytes,26,opt,name=bind_to_port,json=bindToPort,proto3" json:"bind_to_port,omitempty"` -} - -func (x *Listener) Reset() { - *x = Listener{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener) ProtoMessage() {} - -func (x *Listener) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener.ProtoReflect.Descriptor instead. -func (*Listener) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_proto_rawDescGZIP(), []int{1} -} - -func (x *Listener) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Listener) GetAddress() *v4alpha.Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *Listener) GetFilterChains() []*FilterChain { - if x != nil { - return x.FilterChains - } - return nil -} - -func (x *Listener) GetUseOriginalDst() *wrappers.BoolValue { - if x != nil { - return x.UseOriginalDst - } - return nil -} - -func (x *Listener) GetDefaultFilterChain() *FilterChain { - if x != nil { - return x.DefaultFilterChain - } - return nil -} - -func (x *Listener) GetPerConnectionBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerConnectionBufferLimitBytes - } - return nil -} - -func (x *Listener) GetMetadata() *v4alpha.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// Deprecated: Do not use. -func (x *Listener) GetHiddenEnvoyDeprecatedDeprecatedV1() *Listener_DeprecatedV1 { - if x != nil { - return x.HiddenEnvoyDeprecatedDeprecatedV1 - } - return nil -} - -func (x *Listener) GetDrainType() Listener_DrainType { - if x != nil { - return x.DrainType - } - return Listener_DEFAULT -} - -func (x *Listener) GetListenerFilters() []*ListenerFilter { - if x != nil { - return x.ListenerFilters - } - return nil -} - -func (x *Listener) GetListenerFiltersTimeout() *duration.Duration { - if x != nil { - return x.ListenerFiltersTimeout - } - return nil -} - -func (x *Listener) GetContinueOnListenerFiltersTimeout() bool { - if x != nil { - return x.ContinueOnListenerFiltersTimeout - } - return false -} - -func (x *Listener) GetTransparent() *wrappers.BoolValue { - if x != nil { - return x.Transparent - } - return nil -} - -func (x *Listener) GetFreebind() *wrappers.BoolValue { - if x != nil { - return x.Freebind - } - return nil -} - -func (x *Listener) GetSocketOptions() []*v4alpha.SocketOption { - if x != nil { - return x.SocketOptions - } - return nil -} - -func (x *Listener) GetTcpFastOpenQueueLength() *wrappers.UInt32Value { - if x != nil { - return x.TcpFastOpenQueueLength - } - return nil -} - -func (x *Listener) GetTrafficDirection() v4alpha.TrafficDirection { - if x != nil { - return x.TrafficDirection - } - return v4alpha.TrafficDirection_UNSPECIFIED -} - -func (x *Listener) GetUdpListenerConfig() *UdpListenerConfig { - if x != nil { - return x.UdpListenerConfig - } - return nil -} - -func (x *Listener) GetApiListener() *ApiListener { - if x != nil { - return x.ApiListener - } - return nil -} - -func (x *Listener) GetConnectionBalanceConfig() *Listener_ConnectionBalanceConfig { - if x != nil { - return x.ConnectionBalanceConfig - } - return nil -} - -func (x *Listener) GetReusePort() bool { - if x != nil { - return x.ReusePort - } - return false -} - -func (x *Listener) GetAccessLog() []*v4alpha1.AccessLog { - if x != nil { - return x.AccessLog - } - return nil -} - -func (x *Listener) GetUdpWriterConfig() *v4alpha.TypedExtensionConfig { - if x != nil { - return x.UdpWriterConfig - } - return nil -} - -func (x *Listener) GetTcpBacklogSize() *wrappers.UInt32Value { - if x != nil { - return x.TcpBacklogSize - } - return nil -} - -func (x *Listener) GetBindToPort() *wrappers.BoolValue { - if x != nil { - return x.BindToPort - } - return nil -} - -// [#not-implemented-hide:] -type Listener_DeprecatedV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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. - // - // This is deprecated. Use :ref:`Listener.bind_to_port - // ` - BindToPort *wrappers.BoolValue `protobuf:"bytes,1,opt,name=bind_to_port,json=bindToPort,proto3" json:"bind_to_port,omitempty"` -} - -func (x *Listener_DeprecatedV1) Reset() { - *x = Listener_DeprecatedV1{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener_DeprecatedV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener_DeprecatedV1) ProtoMessage() {} - -func (x *Listener_DeprecatedV1) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener_DeprecatedV1.ProtoReflect.Descriptor instead. -func (*Listener_DeprecatedV1) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *Listener_DeprecatedV1) GetBindToPort() *wrappers.BoolValue { - if x != nil { - return x.BindToPort - } - return nil -} - -// Configuration for listener connection balancing. -type Listener_ConnectionBalanceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to BalanceType: - // *Listener_ConnectionBalanceConfig_ExactBalance_ - BalanceType isListener_ConnectionBalanceConfig_BalanceType `protobuf_oneof:"balance_type"` -} - -func (x *Listener_ConnectionBalanceConfig) Reset() { - *x = Listener_ConnectionBalanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener_ConnectionBalanceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener_ConnectionBalanceConfig) ProtoMessage() {} - -func (x *Listener_ConnectionBalanceConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener_ConnectionBalanceConfig.ProtoReflect.Descriptor instead. -func (*Listener_ConnectionBalanceConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_proto_rawDescGZIP(), []int{1, 1} -} - -func (m *Listener_ConnectionBalanceConfig) GetBalanceType() isListener_ConnectionBalanceConfig_BalanceType { - if m != nil { - return m.BalanceType - } - return nil -} - -func (x *Listener_ConnectionBalanceConfig) GetExactBalance() *Listener_ConnectionBalanceConfig_ExactBalance { - if x, ok := x.GetBalanceType().(*Listener_ConnectionBalanceConfig_ExactBalance_); ok { - return x.ExactBalance - } - return nil -} - -type isListener_ConnectionBalanceConfig_BalanceType interface { - isListener_ConnectionBalanceConfig_BalanceType() -} - -type Listener_ConnectionBalanceConfig_ExactBalance_ struct { - // If specified, the listener will use the exact connection balancer. - ExactBalance *Listener_ConnectionBalanceConfig_ExactBalance `protobuf:"bytes,1,opt,name=exact_balance,json=exactBalance,proto3,oneof"` -} - -func (*Listener_ConnectionBalanceConfig_ExactBalance_) isListener_ConnectionBalanceConfig_BalanceType() { -} - -// A connection balancer implementation that does exact balancing. This means that a lock is -// held during balancing so that connection counts are nearly exactly balanced between worker -// threads. This is "nearly" exact in the sense that a connection might close in parallel thus -// making the counts incorrect, but this should be rectified on the next accept. This balancer -// sacrifices accept throughput for accuracy and should be used when there are a small number of -// connections that rarely cycle (e.g., service mesh gRPC egress). -type Listener_ConnectionBalanceConfig_ExactBalance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Listener_ConnectionBalanceConfig_ExactBalance) Reset() { - *x = Listener_ConnectionBalanceConfig_ExactBalance{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener_ConnectionBalanceConfig_ExactBalance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener_ConnectionBalanceConfig_ExactBalance) ProtoMessage() {} - -func (x *Listener_ConnectionBalanceConfig_ExactBalance) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener_ConnectionBalanceConfig_ExactBalance.ProtoReflect.Descriptor instead. -func (*Listener_ConnectionBalanceConfig_ExactBalance) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_proto_rawDescGZIP(), []int{1, 1, 0} -} - -var File_envoy_config_listener_v4alpha_listener_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v4alpha_listener_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x36, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x87, 0x14, 0x0a, 0x08, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x4f, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x75, 0x73, 0x65, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x14, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x6f, 0x0a, 0x21, 0x70, 0x65, 0x72, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x1d, 0x70, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x8a, 0x01, 0x0a, 0x25, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x76, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, - 0x31, 0x42, 0x02, 0x18, 0x01, 0x52, 0x21, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x50, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x69, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x09, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x10, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x18, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x24, 0x63, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x65, 0x4f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, - 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, - 0x4e, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x58, 0x0a, 0x1a, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x16, 0x74, 0x63, 0x70, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x51, 0x75, - 0x65, 0x75, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x58, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x13, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x11, 0x75, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4d, 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x0b, 0x61, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x12, 0x48, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x16, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, - 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x5b, 0x0a, 0x11, 0x75, 0x64, - 0x70, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x75, 0x64, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x62, - 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0e, 0x74, 0x63, 0x70, 0x42, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x3c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, 0x50, 0x6f, 0x72, 0x74, 0x1a, 0x83, 0x01, - 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x3c, - 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, 0x50, 0x6f, 0x72, 0x74, 0x3a, 0x35, 0x9a, 0xc5, - 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x56, 0x31, 0x1a, 0xc4, 0x02, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x73, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x5d, 0x0a, 0x0c, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x13, 0x0a, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x29, 0x0a, 0x09, 0x44, 0x72, - 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, - 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x4f, - 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4a, - 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x42, 0x46, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v4alpha_listener_proto_rawDescOnce sync.Once - file_envoy_config_listener_v4alpha_listener_proto_rawDescData = file_envoy_config_listener_v4alpha_listener_proto_rawDesc -) - -func file_envoy_config_listener_v4alpha_listener_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v4alpha_listener_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v4alpha_listener_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v4alpha_listener_proto_rawDescData) - }) - return file_envoy_config_listener_v4alpha_listener_proto_rawDescData -} - -var file_envoy_config_listener_v4alpha_listener_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_listener_v4alpha_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_config_listener_v4alpha_listener_proto_goTypes = []interface{}{ - (Listener_DrainType)(0), // 0: envoy.config.listener.v4alpha.Listener.DrainType - (*ListenerCollection)(nil), // 1: envoy.config.listener.v4alpha.ListenerCollection - (*Listener)(nil), // 2: envoy.config.listener.v4alpha.Listener - (*Listener_DeprecatedV1)(nil), // 3: envoy.config.listener.v4alpha.Listener.DeprecatedV1 - (*Listener_ConnectionBalanceConfig)(nil), // 4: envoy.config.listener.v4alpha.Listener.ConnectionBalanceConfig - (*Listener_ConnectionBalanceConfig_ExactBalance)(nil), // 5: envoy.config.listener.v4alpha.Listener.ConnectionBalanceConfig.ExactBalance - (*v3.CollectionEntry)(nil), // 6: xds.core.v3.CollectionEntry - (*v4alpha.Address)(nil), // 7: envoy.config.core.v4alpha.Address - (*FilterChain)(nil), // 8: envoy.config.listener.v4alpha.FilterChain - (*wrappers.BoolValue)(nil), // 9: google.protobuf.BoolValue - (*wrappers.UInt32Value)(nil), // 10: google.protobuf.UInt32Value - (*v4alpha.Metadata)(nil), // 11: envoy.config.core.v4alpha.Metadata - (*ListenerFilter)(nil), // 12: envoy.config.listener.v4alpha.ListenerFilter - (*duration.Duration)(nil), // 13: google.protobuf.Duration - (*v4alpha.SocketOption)(nil), // 14: envoy.config.core.v4alpha.SocketOption - (v4alpha.TrafficDirection)(0), // 15: envoy.config.core.v4alpha.TrafficDirection - (*UdpListenerConfig)(nil), // 16: envoy.config.listener.v4alpha.UdpListenerConfig - (*ApiListener)(nil), // 17: envoy.config.listener.v4alpha.ApiListener - (*v4alpha1.AccessLog)(nil), // 18: envoy.config.accesslog.v4alpha.AccessLog - (*v4alpha.TypedExtensionConfig)(nil), // 19: envoy.config.core.v4alpha.TypedExtensionConfig -} -var file_envoy_config_listener_v4alpha_listener_proto_depIdxs = []int32{ - 6, // 0: envoy.config.listener.v4alpha.ListenerCollection.entries:type_name -> xds.core.v3.CollectionEntry - 7, // 1: envoy.config.listener.v4alpha.Listener.address:type_name -> envoy.config.core.v4alpha.Address - 8, // 2: envoy.config.listener.v4alpha.Listener.filter_chains:type_name -> envoy.config.listener.v4alpha.FilterChain - 9, // 3: envoy.config.listener.v4alpha.Listener.use_original_dst:type_name -> google.protobuf.BoolValue - 8, // 4: envoy.config.listener.v4alpha.Listener.default_filter_chain:type_name -> envoy.config.listener.v4alpha.FilterChain - 10, // 5: envoy.config.listener.v4alpha.Listener.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 11, // 6: envoy.config.listener.v4alpha.Listener.metadata:type_name -> envoy.config.core.v4alpha.Metadata - 3, // 7: envoy.config.listener.v4alpha.Listener.hidden_envoy_deprecated_deprecated_v1:type_name -> envoy.config.listener.v4alpha.Listener.DeprecatedV1 - 0, // 8: envoy.config.listener.v4alpha.Listener.drain_type:type_name -> envoy.config.listener.v4alpha.Listener.DrainType - 12, // 9: envoy.config.listener.v4alpha.Listener.listener_filters:type_name -> envoy.config.listener.v4alpha.ListenerFilter - 13, // 10: envoy.config.listener.v4alpha.Listener.listener_filters_timeout:type_name -> google.protobuf.Duration - 9, // 11: envoy.config.listener.v4alpha.Listener.transparent:type_name -> google.protobuf.BoolValue - 9, // 12: envoy.config.listener.v4alpha.Listener.freebind:type_name -> google.protobuf.BoolValue - 14, // 13: envoy.config.listener.v4alpha.Listener.socket_options:type_name -> envoy.config.core.v4alpha.SocketOption - 10, // 14: envoy.config.listener.v4alpha.Listener.tcp_fast_open_queue_length:type_name -> google.protobuf.UInt32Value - 15, // 15: envoy.config.listener.v4alpha.Listener.traffic_direction:type_name -> envoy.config.core.v4alpha.TrafficDirection - 16, // 16: envoy.config.listener.v4alpha.Listener.udp_listener_config:type_name -> envoy.config.listener.v4alpha.UdpListenerConfig - 17, // 17: envoy.config.listener.v4alpha.Listener.api_listener:type_name -> envoy.config.listener.v4alpha.ApiListener - 4, // 18: envoy.config.listener.v4alpha.Listener.connection_balance_config:type_name -> envoy.config.listener.v4alpha.Listener.ConnectionBalanceConfig - 18, // 19: envoy.config.listener.v4alpha.Listener.access_log:type_name -> envoy.config.accesslog.v4alpha.AccessLog - 19, // 20: envoy.config.listener.v4alpha.Listener.udp_writer_config:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 10, // 21: envoy.config.listener.v4alpha.Listener.tcp_backlog_size:type_name -> google.protobuf.UInt32Value - 9, // 22: envoy.config.listener.v4alpha.Listener.bind_to_port:type_name -> google.protobuf.BoolValue - 9, // 23: envoy.config.listener.v4alpha.Listener.DeprecatedV1.bind_to_port:type_name -> google.protobuf.BoolValue - 5, // 24: envoy.config.listener.v4alpha.Listener.ConnectionBalanceConfig.exact_balance:type_name -> envoy.config.listener.v4alpha.Listener.ConnectionBalanceConfig.ExactBalance - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v4alpha_listener_proto_init() } -func file_envoy_config_listener_v4alpha_listener_proto_init() { - if File_envoy_config_listener_v4alpha_listener_proto != nil { - return - } - file_envoy_config_listener_v4alpha_api_listener_proto_init() - file_envoy_config_listener_v4alpha_listener_components_proto_init() - file_envoy_config_listener_v4alpha_udp_listener_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v4alpha_listener_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener_DeprecatedV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener_ConnectionBalanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener_ConnectionBalanceConfig_ExactBalance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_listener_v4alpha_listener_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Listener_ConnectionBalanceConfig_ExactBalance_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v4alpha_listener_proto_rawDesc, - NumEnums: 1, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v4alpha_listener_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v4alpha_listener_proto_depIdxs, - EnumInfos: file_envoy_config_listener_v4alpha_listener_proto_enumTypes, - MessageInfos: file_envoy_config_listener_v4alpha_listener_proto_msgTypes, - }.Build() - File_envoy_config_listener_v4alpha_listener_proto = out.File - file_envoy_config_listener_v4alpha_listener_proto_rawDesc = nil - file_envoy_config_listener_v4alpha_listener_proto_goTypes = nil - file_envoy_config_listener_v4alpha_listener_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v4alpha/listener.pb.validate.go b/pkg/api/envoy/config/listener/v4alpha/listener.pb.validate.go deleted file mode 100644 index a29dcf4863..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/listener.pb.validate.go +++ /dev/null @@ -1,659 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v4alpha/listener.proto - -package envoy_config_listener_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.TrafficDirection(0) -) - -// Validate checks the field values on ListenerCollection with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ListenerCollection) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetEntries() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerCollectionValidationError{ - field: fmt.Sprintf("Entries[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ListenerCollectionValidationError is the validation error returned by -// ListenerCollection.Validate if the designated constraints aren't met. -type ListenerCollectionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenerCollectionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenerCollectionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenerCollectionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenerCollectionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenerCollectionValidationError) ErrorName() string { - return "ListenerCollectionValidationError" -} - -// Error satisfies the builtin error interface -func (e ListenerCollectionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenerCollection.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenerCollectionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenerCollectionValidationError{} - -// 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.GetDefaultFilterChain()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "DefaultFilterChain", - 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.GetHiddenEnvoyDeprecatedDeprecatedV1()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "HiddenEnvoyDeprecatedDeprecatedV1", - 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, - } - } - } - - } - - if v, ok := interface{}(m.GetUdpWriterConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "UdpWriterConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTcpBacklogSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "TcpBacklogSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "BindToPort", - 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/pkg/api/envoy/config/listener/v4alpha/listener_components.pb.go b/pkg/api/envoy/config/listener/v4alpha/listener_components.pb.go deleted file mode 100644 index 13b6523dfc..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/listener_components.pb.go +++ /dev/null @@ -1,1280 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v4alpha/listener_components.proto - -package envoy_config_listener_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - _ "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type FilterChainMatch_ConnectionSourceType int32 - -const ( - // Any connection source matches. - FilterChainMatch_ANY FilterChainMatch_ConnectionSourceType = 0 - // Match a connection originating from the same host. - FilterChainMatch_SAME_IP_OR_LOOPBACK FilterChainMatch_ConnectionSourceType = 1 - // Match a connection originating from a different host. - FilterChainMatch_EXTERNAL FilterChainMatch_ConnectionSourceType = 2 -) - -// Enum value maps for FilterChainMatch_ConnectionSourceType. -var ( - FilterChainMatch_ConnectionSourceType_name = map[int32]string{ - 0: "ANY", - 1: "SAME_IP_OR_LOOPBACK", - 2: "EXTERNAL", - } - FilterChainMatch_ConnectionSourceType_value = map[string]int32{ - "ANY": 0, - "SAME_IP_OR_LOOPBACK": 1, - "EXTERNAL": 2, - } -) - -func (x FilterChainMatch_ConnectionSourceType) Enum() *FilterChainMatch_ConnectionSourceType { - p := new(FilterChainMatch_ConnectionSourceType) - *p = x - return p -} - -func (x FilterChainMatch_ConnectionSourceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FilterChainMatch_ConnectionSourceType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_listener_v4alpha_listener_components_proto_enumTypes[0].Descriptor() -} - -func (FilterChainMatch_ConnectionSourceType) Type() protoreflect.EnumType { - return &file_envoy_config_listener_v4alpha_listener_components_proto_enumTypes[0] -} - -func (x FilterChainMatch_ConnectionSourceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FilterChainMatch_ConnectionSourceType.Descriptor instead. -func (FilterChainMatch_ConnectionSourceType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{1, 0} -} - -type Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - 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 assignable to ConfigType: - // *Filter_TypedConfig - ConfigType isFilter_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *Filter) Reset() { - *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Filter) ProtoMessage() {} - -func (x *Filter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Filter.ProtoReflect.Descriptor instead. -func (*Filter) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{0} -} - -func (x *Filter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *Filter) GetConfigType() isFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *Filter) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*Filter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isFilter_ConfigType interface { - isFilter_ConfigType() -} - -type Filter_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*Filter_TypedConfig) isFilter_ConfigType() {} - -// 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). -// 7. Source IP address. -// 8. Source port. -// -// 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). -// -// A different way to reason about the filter chain matches: -// Suppose there exists N filter chains. Prune the filter chain set using the above 8 steps. -// In each step, filter chains which most specifically matches the attributes continue to the next step. -// The listener guarantees at most 1 filter chain is left after all of the steps. -// -// Example: -// -// For destination port, filter chains specifying the destination port of incoming traffic are the -// most specific match. If none of the filter chains specifies the exact destination port, the filter -// chains which do not specify ports are the most specific match. Filter chains specifying the -// wrong port can never be the most specific match. -// -// [#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] -// [#next-free-field: 13] -type FilterChainMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional destination port to consider when use_original_dst is set on the - // listener in determining a filter chain match. - DestinationPort *wrappers.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 []*v4alpha.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 *wrappers.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.config.listener.v4alpha.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. - SourcePrefixRanges []*v4alpha.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. - SourcePorts []uint32 `protobuf:"varint,7,rep,packed,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.filters.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.filters.listener.tls_inspector - // `, - // * ``h2`` - set by :ref:`envoy.filters.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"` -} - -func (x *FilterChainMatch) Reset() { - *x = FilterChainMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterChainMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterChainMatch) ProtoMessage() {} - -func (x *FilterChainMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterChainMatch.ProtoReflect.Descriptor instead. -func (*FilterChainMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{1} -} - -func (x *FilterChainMatch) GetDestinationPort() *wrappers.UInt32Value { - if x != nil { - return x.DestinationPort - } - return nil -} - -func (x *FilterChainMatch) GetPrefixRanges() []*v4alpha.CidrRange { - if x != nil { - return x.PrefixRanges - } - return nil -} - -func (x *FilterChainMatch) GetAddressSuffix() string { - if x != nil { - return x.AddressSuffix - } - return "" -} - -func (x *FilterChainMatch) GetSuffixLen() *wrappers.UInt32Value { - if x != nil { - return x.SuffixLen - } - return nil -} - -func (x *FilterChainMatch) GetSourceType() FilterChainMatch_ConnectionSourceType { - if x != nil { - return x.SourceType - } - return FilterChainMatch_ANY -} - -func (x *FilterChainMatch) GetSourcePrefixRanges() []*v4alpha.CidrRange { - if x != nil { - return x.SourcePrefixRanges - } - return nil -} - -func (x *FilterChainMatch) GetSourcePorts() []uint32 { - if x != nil { - return x.SourcePorts - } - return nil -} - -func (x *FilterChainMatch) GetServerNames() []string { - if x != nil { - return x.ServerNames - } - return nil -} - -func (x *FilterChainMatch) GetTransportProtocol() string { - if x != nil { - return x.TransportProtocol - } - return "" -} - -func (x *FilterChainMatch) GetApplicationProtocols() []string { - if x != nil { - return x.ApplicationProtocols - } - return nil -} - -// A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and -// various other parameters. -// [#next-free-field: 10] -type FilterChain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` - // 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,omitempty"` - // 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. - // - // This field is deprecated. Add a - // :ref:`PROXY protocol listener filter ` - // explicitly instead. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedUseProxyProto *wrappers.BoolValue `protobuf:"bytes,4,opt,name=hidden_envoy_deprecated_use_proxy_proto,json=hiddenEnvoyDeprecatedUseProxyProto,proto3" json:"hidden_envoy_deprecated_use_proxy_proto,omitempty"` - // [#not-implemented-hide:] filter chain metadata. - Metadata *v4alpha.Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Optional custom transport socket implementation to use for downstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`DownstreamTlsContext ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - TransportSocket *v4alpha.TransportSocket `protobuf:"bytes,6,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` - // If present and nonzero, the amount of time to allow incoming connections to complete any - // transport socket negotiations. If this expires before the transport reports connection - // establishment, the connection is summarily closed. - TransportSocketConnectTimeout *duration.Duration `protobuf:"bytes,9,opt,name=transport_socket_connect_timeout,json=transportSocketConnectTimeout,proto3" json:"transport_socket_connect_timeout,omitempty"` - // [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - // name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - // chain is to be dynamically updated or removed via FCDS a unique name must be provided. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - // [#not-implemented-hide:] The configuration to specify whether the filter chain will be built on-demand. - // If this field is not empty, the filter chain will be built on-demand. - // Otherwise, the filter chain will be built normally and block listener warming. - OnDemandConfiguration *FilterChain_OnDemandConfiguration `protobuf:"bytes,8,opt,name=on_demand_configuration,json=onDemandConfiguration,proto3" json:"on_demand_configuration,omitempty"` -} - -func (x *FilterChain) Reset() { - *x = FilterChain{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterChain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterChain) ProtoMessage() {} - -func (x *FilterChain) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterChain.ProtoReflect.Descriptor instead. -func (*FilterChain) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{2} -} - -func (x *FilterChain) GetFilterChainMatch() *FilterChainMatch { - if x != nil { - return x.FilterChainMatch - } - return nil -} - -func (x *FilterChain) GetFilters() []*Filter { - if x != nil { - return x.Filters - } - return nil -} - -// Deprecated: Do not use. -func (x *FilterChain) GetHiddenEnvoyDeprecatedUseProxyProto() *wrappers.BoolValue { - if x != nil { - return x.HiddenEnvoyDeprecatedUseProxyProto - } - return nil -} - -func (x *FilterChain) GetMetadata() *v4alpha.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *FilterChain) GetTransportSocket() *v4alpha.TransportSocket { - if x != nil { - return x.TransportSocket - } - return nil -} - -func (x *FilterChain) GetTransportSocketConnectTimeout() *duration.Duration { - if x != nil { - return x.TransportSocketConnectTimeout - } - return nil -} - -func (x *FilterChain) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *FilterChain) GetOnDemandConfiguration() *FilterChain_OnDemandConfiguration { - if x != nil { - return x.OnDemandConfiguration - } - return nil -} - -// Listener filter chain match configuration. This is a recursive structure which allows complex -// nested match configurations to be built using various logical operators. -// -// Examples: -// -// * Matches if the destination port is 3306. -// -// .. code-block:: yaml -// -// destination_port_range: -// start: 3306 -// end: 3307 -// -// * Matches if the destination port is 3306 or 15000. -// -// .. code-block:: yaml -// -// or_match: -// rules: -// - destination_port_range: -// start: 3306 -// end: 3306 -// - destination_port_range: -// start: 15000 -// end: 15001 -// -// [#next-free-field: 6] -type ListenerFilterChainMatchPredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *ListenerFilterChainMatchPredicate_OrMatch - // *ListenerFilterChainMatchPredicate_AndMatch - // *ListenerFilterChainMatchPredicate_NotMatch - // *ListenerFilterChainMatchPredicate_AnyMatch - // *ListenerFilterChainMatchPredicate_DestinationPortRange - Rule isListenerFilterChainMatchPredicate_Rule `protobuf_oneof:"rule"` -} - -func (x *ListenerFilterChainMatchPredicate) Reset() { - *x = ListenerFilterChainMatchPredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerFilterChainMatchPredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerFilterChainMatchPredicate) ProtoMessage() {} - -func (x *ListenerFilterChainMatchPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerFilterChainMatchPredicate.ProtoReflect.Descriptor instead. -func (*ListenerFilterChainMatchPredicate) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{3} -} - -func (m *ListenerFilterChainMatchPredicate) GetRule() isListenerFilterChainMatchPredicate_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetOrMatch() *ListenerFilterChainMatchPredicate_MatchSet { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_OrMatch); ok { - return x.OrMatch - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetAndMatch() *ListenerFilterChainMatchPredicate_MatchSet { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_AndMatch); ok { - return x.AndMatch - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetNotMatch() *ListenerFilterChainMatchPredicate { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_NotMatch); ok { - return x.NotMatch - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetAnyMatch() bool { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_AnyMatch); ok { - return x.AnyMatch - } - return false -} - -func (x *ListenerFilterChainMatchPredicate) GetDestinationPortRange() *v3.Int32Range { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_DestinationPortRange); ok { - return x.DestinationPortRange - } - return nil -} - -type isListenerFilterChainMatchPredicate_Rule interface { - isListenerFilterChainMatchPredicate_Rule() -} - -type ListenerFilterChainMatchPredicate_OrMatch struct { - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - OrMatch *ListenerFilterChainMatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_AndMatch struct { - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - AndMatch *ListenerFilterChainMatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_NotMatch struct { - // A negation match. The match configuration will match if the negated match condition matches. - NotMatch *ListenerFilterChainMatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_AnyMatch struct { - // The match configuration will always match. - AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_DestinationPortRange struct { - // Match destination port. Particularly, the match evaluation must use the recovered local port if - // the owning listener filter is after :ref:`an original_dst listener filter `. - DestinationPortRange *v3.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() { -} - -type ListenerFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - 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 assignable to ConfigType: - // *ListenerFilter_TypedConfig - ConfigType isListenerFilter_ConfigType `protobuf_oneof:"config_type"` - // Optional match predicate used to disable the filter. The filter is enabled when this field is empty. - // See :ref:`ListenerFilterChainMatchPredicate ` - // for further examples. - FilterDisabled *ListenerFilterChainMatchPredicate `protobuf:"bytes,4,opt,name=filter_disabled,json=filterDisabled,proto3" json:"filter_disabled,omitempty"` -} - -func (x *ListenerFilter) Reset() { - *x = ListenerFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerFilter) ProtoMessage() {} - -func (x *ListenerFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerFilter.ProtoReflect.Descriptor instead. -func (*ListenerFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{4} -} - -func (x *ListenerFilter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *ListenerFilter) GetConfigType() isListenerFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *ListenerFilter) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*ListenerFilter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -func (x *ListenerFilter) GetFilterDisabled() *ListenerFilterChainMatchPredicate { - if x != nil { - return x.FilterDisabled - } - return nil -} - -type isListenerFilter_ConfigType interface { - isListenerFilter_ConfigType() -} - -type ListenerFilter_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*ListenerFilter_TypedConfig) isListenerFilter_ConfigType() {} - -// The configuration for on-demand filter chain. If this field is not empty in FilterChain message, -// a filter chain will be built on-demand. -// On-demand filter chains help speedup the warming up of listeners since the building and initialization of -// an on-demand filter chain will be postponed to the arrival of new connection requests that require this filter chain. -// Filter chains that are not often used can be set as on-demand. -type FilterChain_OnDemandConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The timeout to wait for filter chain placeholders to complete rebuilding. - // 1. If this field is set to 0, timeout is disabled. - // 2. If not specified, a default timeout of 15s is used. - // Rebuilding will wait until dependencies are ready, have failed, or this timeout is reached. - // Upon failure or timeout, all connections related to this filter chain will be closed. - // Rebuilding will start again on the next new connection. - RebuildTimeout *duration.Duration `protobuf:"bytes,1,opt,name=rebuild_timeout,json=rebuildTimeout,proto3" json:"rebuild_timeout,omitempty"` -} - -func (x *FilterChain_OnDemandConfiguration) Reset() { - *x = FilterChain_OnDemandConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterChain_OnDemandConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterChain_OnDemandConfiguration) ProtoMessage() {} - -func (x *FilterChain_OnDemandConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterChain_OnDemandConfiguration.ProtoReflect.Descriptor instead. -func (*FilterChain_OnDemandConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *FilterChain_OnDemandConfiguration) GetRebuildTimeout() *duration.Duration { - if x != nil { - return x.RebuildTimeout - } - return nil -} - -// A set of match configurations used for logical operations. -type ListenerFilterChainMatchPredicate_MatchSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of rules that make up the set. - Rules []*ListenerFilterChainMatchPredicate `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) Reset() { - *x = ListenerFilterChainMatchPredicate_MatchSet{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerFilterChainMatchPredicate_MatchSet) ProtoMessage() {} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerFilterChainMatchPredicate_MatchSet.ProtoReflect.Descriptor instead. -func (*ListenerFilterChainMatchPredicate_MatchSet) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) GetRules() []*ListenerFilterChainMatchPredicate { - if x != nil { - return x.Rules - } - return nil -} - -var File_envoy_config_listener_v4alpha_listener_components_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v4alpha_listener_components_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, - 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9c, 0x06, 0x0a, 0x10, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x54, 0x0a, 0x10, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0xff, 0xff, 0x03, 0x28, 0x01, 0x52, 0x0f, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, - 0x49, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, - 0x78, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x6f, - 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x56, 0x0a, 0x14, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x10, 0xfa, - 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x2a, 0x06, 0x18, 0xff, 0xff, 0x03, 0x28, 0x01, 0x52, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x2d, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x33, - 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x22, 0x46, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, - 0x4e, 0x59, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x41, 0x4d, 0x45, 0x5f, 0x49, 0x50, 0x5f, - 0x4f, 0x52, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x0c, 0x0a, - 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x02, 0x3a, 0x30, 0x9a, 0xc5, 0x88, - 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x04, 0x08, - 0x01, 0x10, 0x02, 0x22, 0x8d, 0x07, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x12, 0x5d, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x3f, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x73, 0x0a, 0x27, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, - 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x55, 0x0a, 0x10, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, - 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x62, 0x0a, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x78, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, 0x64, - 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6f, 0x6e, 0x44, - 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x9e, 0x01, 0x0a, 0x15, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x0f, - 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0e, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x6e, - 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x22, 0xdc, 0x05, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x66, 0x0a, 0x08, 0x6f, 0x72, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x68, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, - 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5f, 0x0a, 0x09, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, - 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x51, 0x0a, 0x16, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, - 0x00, 0x52, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0xb8, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x53, 0x65, 0x74, 0x12, 0x60, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, - 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x65, 0x74, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x22, 0xa0, 0x02, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, - 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x69, 0x0a, - 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, - 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x50, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v4alpha_listener_components_proto_rawDescOnce sync.Once - file_envoy_config_listener_v4alpha_listener_components_proto_rawDescData = file_envoy_config_listener_v4alpha_listener_components_proto_rawDesc -) - -func file_envoy_config_listener_v4alpha_listener_components_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v4alpha_listener_components_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v4alpha_listener_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v4alpha_listener_components_proto_rawDescData) - }) - return file_envoy_config_listener_v4alpha_listener_components_proto_rawDescData -} - -var file_envoy_config_listener_v4alpha_listener_components_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_config_listener_v4alpha_listener_components_proto_goTypes = []interface{}{ - (FilterChainMatch_ConnectionSourceType)(0), // 0: envoy.config.listener.v4alpha.FilterChainMatch.ConnectionSourceType - (*Filter)(nil), // 1: envoy.config.listener.v4alpha.Filter - (*FilterChainMatch)(nil), // 2: envoy.config.listener.v4alpha.FilterChainMatch - (*FilterChain)(nil), // 3: envoy.config.listener.v4alpha.FilterChain - (*ListenerFilterChainMatchPredicate)(nil), // 4: envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate - (*ListenerFilter)(nil), // 5: envoy.config.listener.v4alpha.ListenerFilter - (*FilterChain_OnDemandConfiguration)(nil), // 6: envoy.config.listener.v4alpha.FilterChain.OnDemandConfiguration - (*ListenerFilterChainMatchPredicate_MatchSet)(nil), // 7: envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.MatchSet - (*any.Any)(nil), // 8: google.protobuf.Any - (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value - (*v4alpha.CidrRange)(nil), // 10: envoy.config.core.v4alpha.CidrRange - (*wrappers.BoolValue)(nil), // 11: google.protobuf.BoolValue - (*v4alpha.Metadata)(nil), // 12: envoy.config.core.v4alpha.Metadata - (*v4alpha.TransportSocket)(nil), // 13: envoy.config.core.v4alpha.TransportSocket - (*duration.Duration)(nil), // 14: google.protobuf.Duration - (*v3.Int32Range)(nil), // 15: envoy.type.v3.Int32Range -} -var file_envoy_config_listener_v4alpha_listener_components_proto_depIdxs = []int32{ - 8, // 0: envoy.config.listener.v4alpha.Filter.typed_config:type_name -> google.protobuf.Any - 9, // 1: envoy.config.listener.v4alpha.FilterChainMatch.destination_port:type_name -> google.protobuf.UInt32Value - 10, // 2: envoy.config.listener.v4alpha.FilterChainMatch.prefix_ranges:type_name -> envoy.config.core.v4alpha.CidrRange - 9, // 3: envoy.config.listener.v4alpha.FilterChainMatch.suffix_len:type_name -> google.protobuf.UInt32Value - 0, // 4: envoy.config.listener.v4alpha.FilterChainMatch.source_type:type_name -> envoy.config.listener.v4alpha.FilterChainMatch.ConnectionSourceType - 10, // 5: envoy.config.listener.v4alpha.FilterChainMatch.source_prefix_ranges:type_name -> envoy.config.core.v4alpha.CidrRange - 2, // 6: envoy.config.listener.v4alpha.FilterChain.filter_chain_match:type_name -> envoy.config.listener.v4alpha.FilterChainMatch - 1, // 7: envoy.config.listener.v4alpha.FilterChain.filters:type_name -> envoy.config.listener.v4alpha.Filter - 11, // 8: envoy.config.listener.v4alpha.FilterChain.hidden_envoy_deprecated_use_proxy_proto:type_name -> google.protobuf.BoolValue - 12, // 9: envoy.config.listener.v4alpha.FilterChain.metadata:type_name -> envoy.config.core.v4alpha.Metadata - 13, // 10: envoy.config.listener.v4alpha.FilterChain.transport_socket:type_name -> envoy.config.core.v4alpha.TransportSocket - 14, // 11: envoy.config.listener.v4alpha.FilterChain.transport_socket_connect_timeout:type_name -> google.protobuf.Duration - 6, // 12: envoy.config.listener.v4alpha.FilterChain.on_demand_configuration:type_name -> envoy.config.listener.v4alpha.FilterChain.OnDemandConfiguration - 7, // 13: envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.or_match:type_name -> envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.MatchSet - 7, // 14: envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.and_match:type_name -> envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.MatchSet - 4, // 15: envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.not_match:type_name -> envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate - 15, // 16: envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.destination_port_range:type_name -> envoy.type.v3.Int32Range - 8, // 17: envoy.config.listener.v4alpha.ListenerFilter.typed_config:type_name -> google.protobuf.Any - 4, // 18: envoy.config.listener.v4alpha.ListenerFilter.filter_disabled:type_name -> envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate - 14, // 19: envoy.config.listener.v4alpha.FilterChain.OnDemandConfiguration.rebuild_timeout:type_name -> google.protobuf.Duration - 4, // 20: envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate.MatchSet.rules:type_name -> envoy.config.listener.v4alpha.ListenerFilterChainMatchPredicate - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v4alpha_listener_components_proto_init() } -func file_envoy_config_listener_v4alpha_listener_components_proto_init() { - if File_envoy_config_listener_v4alpha_listener_components_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterChainMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerFilterChainMatchPredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterChain_OnDemandConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerFilterChainMatchPredicate_MatchSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Filter_TypedConfig)(nil), - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*ListenerFilterChainMatchPredicate_OrMatch)(nil), - (*ListenerFilterChainMatchPredicate_AndMatch)(nil), - (*ListenerFilterChainMatchPredicate_NotMatch)(nil), - (*ListenerFilterChainMatchPredicate_AnyMatch)(nil), - (*ListenerFilterChainMatchPredicate_DestinationPortRange)(nil), - } - file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*ListenerFilter_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v4alpha_listener_components_proto_rawDesc, - NumEnums: 1, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v4alpha_listener_components_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v4alpha_listener_components_proto_depIdxs, - EnumInfos: file_envoy_config_listener_v4alpha_listener_components_proto_enumTypes, - MessageInfos: file_envoy_config_listener_v4alpha_listener_components_proto_msgTypes, - }.Build() - File_envoy_config_listener_v4alpha_listener_components_proto = out.File - file_envoy_config_listener_v4alpha_listener_components_proto_rawDesc = nil - file_envoy_config_listener_v4alpha_listener_components_proto_goTypes = nil - file_envoy_config_listener_v4alpha_listener_components_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v4alpha/listener_components.pb.validate.go b/pkg/api/envoy/config/listener/v4alpha/listener_components.pb.validate.go deleted file mode 100644 index 14ac871e47..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/listener_components.pb.validate.go +++ /dev/null @@ -1,803 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v4alpha/listener_components.proto - -package envoy_config_listener_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetName()) < 1 { - return FilterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - 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, - } - } - } - - 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.GetHiddenEnvoyDeprecatedUseProxyProto()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "HiddenEnvoyDeprecatedUseProxyProto", - 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, - } - } - } - - if v, ok := interface{}(m.GetTransportSocketConnectTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "TransportSocketConnectTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Name - - if v, ok := interface{}(m.GetOnDemandConfiguration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "OnDemandConfiguration", - 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 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 utf8.RuneCountInString(m.GetName()) < 1 { - return ListenerFilterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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_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 FilterChain_OnDemandConfiguration with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *FilterChain_OnDemandConfiguration) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetRebuildTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChain_OnDemandConfigurationValidationError{ - field: "RebuildTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// FilterChain_OnDemandConfigurationValidationError is the validation error -// returned by FilterChain_OnDemandConfiguration.Validate if the designated -// constraints aren't met. -type FilterChain_OnDemandConfigurationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterChain_OnDemandConfigurationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterChain_OnDemandConfigurationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterChain_OnDemandConfigurationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterChain_OnDemandConfigurationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterChain_OnDemandConfigurationValidationError) ErrorName() string { - return "FilterChain_OnDemandConfigurationValidationError" -} - -// Error satisfies the builtin error interface -func (e FilterChain_OnDemandConfigurationValidationError) Error() string { - 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_OnDemandConfiguration.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterChain_OnDemandConfigurationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterChain_OnDemandConfigurationValidationError{} - -// 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/pkg/api/envoy/config/listener/v4alpha/quic_config.pb.go b/pkg/api/envoy/config/listener/v4alpha/quic_config.pb.go deleted file mode 100644 index 3cfb553a21..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/quic_config.pb.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v4alpha/quic_config.proto - -package envoy_config_listener_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration specific to the QUIC protocol. -// Next id: 5 -type QuicProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum number of streams that the client can negotiate per connection. 100 - // if not specified. - MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` - // Maximum number of milliseconds that connection will be alive when there is - // no network activity. 300000ms if not specified. - IdleTimeout *duration.Duration `protobuf:"bytes,2,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` - // Connection timeout in milliseconds before the crypto handshake is finished. - // 20000ms if not specified. - CryptoHandshakeTimeout *duration.Duration `protobuf:"bytes,3,opt,name=crypto_handshake_timeout,json=cryptoHandshakeTimeout,proto3" json:"crypto_handshake_timeout,omitempty"` - // Runtime flag that controls whether the listener is enabled or not. If not specified, defaults - // to enabled. - Enabled *v4alpha.RuntimeFeatureFlag `protobuf:"bytes,4,opt,name=enabled,proto3" json:"enabled,omitempty"` -} - -func (x *QuicProtocolOptions) Reset() { - *x = QuicProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_quic_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuicProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuicProtocolOptions) ProtoMessage() {} - -func (x *QuicProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_quic_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuicProtocolOptions.ProtoReflect.Descriptor instead. -func (*QuicProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_quic_config_proto_rawDescGZIP(), []int{0} -} - -func (x *QuicProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value { - if x != nil { - return x.MaxConcurrentStreams - } - return nil -} - -func (x *QuicProtocolOptions) GetIdleTimeout() *duration.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *QuicProtocolOptions) GetCryptoHandshakeTimeout() *duration.Duration { - if x != nil { - return x.CryptoHandshakeTimeout - } - return nil -} - -func (x *QuicProtocolOptions) GetEnabled() *v4alpha.RuntimeFeatureFlag { - if x != nil { - return x.Enabled - } - return nil -} - -var File_envoy_config_listener_v4alpha_quic_config_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v4alpha_quic_config_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x71, 0x75, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x02, 0x0a, 0x13, 0x51, 0x75, 0x69, - 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x52, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, - 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x53, 0x0a, 0x18, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x68, 0x61, 0x6e, - 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x16, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x47, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x48, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0f, 0x51, 0x75, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v4alpha_quic_config_proto_rawDescOnce sync.Once - file_envoy_config_listener_v4alpha_quic_config_proto_rawDescData = file_envoy_config_listener_v4alpha_quic_config_proto_rawDesc -) - -func file_envoy_config_listener_v4alpha_quic_config_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v4alpha_quic_config_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v4alpha_quic_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v4alpha_quic_config_proto_rawDescData) - }) - return file_envoy_config_listener_v4alpha_quic_config_proto_rawDescData -} - -var file_envoy_config_listener_v4alpha_quic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_listener_v4alpha_quic_config_proto_goTypes = []interface{}{ - (*QuicProtocolOptions)(nil), // 0: envoy.config.listener.v4alpha.QuicProtocolOptions - (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 2: google.protobuf.Duration - (*v4alpha.RuntimeFeatureFlag)(nil), // 3: envoy.config.core.v4alpha.RuntimeFeatureFlag -} -var file_envoy_config_listener_v4alpha_quic_config_proto_depIdxs = []int32{ - 1, // 0: envoy.config.listener.v4alpha.QuicProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value - 2, // 1: envoy.config.listener.v4alpha.QuicProtocolOptions.idle_timeout:type_name -> google.protobuf.Duration - 2, // 2: envoy.config.listener.v4alpha.QuicProtocolOptions.crypto_handshake_timeout:type_name -> google.protobuf.Duration - 3, // 3: envoy.config.listener.v4alpha.QuicProtocolOptions.enabled:type_name -> envoy.config.core.v4alpha.RuntimeFeatureFlag - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v4alpha_quic_config_proto_init() } -func file_envoy_config_listener_v4alpha_quic_config_proto_init() { - if File_envoy_config_listener_v4alpha_quic_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v4alpha_quic_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuicProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v4alpha_quic_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v4alpha_quic_config_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v4alpha_quic_config_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v4alpha_quic_config_proto_msgTypes, - }.Build() - File_envoy_config_listener_v4alpha_quic_config_proto = out.File - file_envoy_config_listener_v4alpha_quic_config_proto_rawDesc = nil - file_envoy_config_listener_v4alpha_quic_config_proto_goTypes = nil - file_envoy_config_listener_v4alpha_quic_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v4alpha/quic_config.pb.validate.go b/pkg/api/envoy/config/listener/v4alpha/quic_config.pb.validate.go deleted file mode 100644 index 2e65469327..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/quic_config.pb.validate.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v4alpha/quic_config.proto - -package envoy_config_listener_v4alpha - -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{} -) - -// 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, - } - } - } - - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QuicProtocolOptionsValidationError{ - field: "Enabled", - 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/pkg/api/envoy/config/listener/v4alpha/udp_default_writer_config.pb.go b/pkg/api/envoy/config/listener/v4alpha/udp_default_writer_config.pb.go deleted file mode 100644 index 6572cb528d..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/udp_default_writer_config.pb.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v4alpha/udp_default_writer_config.proto - -package envoy_config_listener_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] -// Configuration specific to the Udp Default Writer. -type UdpDefaultWriterOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UdpDefaultWriterOptions) Reset() { - *x = UdpDefaultWriterOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UdpDefaultWriterOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UdpDefaultWriterOptions) ProtoMessage() {} - -func (x *UdpDefaultWriterOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UdpDefaultWriterOptions.ProtoReflect.Descriptor instead. -func (*UdpDefaultWriterOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_config_listener_v4alpha_udp_default_writer_config_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDesc = []byte{ - 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x75, 0x64, 0x70, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x52, 0x0a, 0x17, 0x55, 0x64, 0x70, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x37, 0x9a, 0xc5, 0x88, - 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, 0x70, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x54, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x1b, 0x55, 0x64, 0x70, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescOnce sync.Once - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescData = file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDesc -) - -func file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescData) - }) - return file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDescData -} - -var file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_goTypes = []interface{}{ - (*UdpDefaultWriterOptions)(nil), // 0: envoy.config.listener.v4alpha.UdpDefaultWriterOptions -} -var file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_init() } -func file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_init() { - if File_envoy_config_listener_v4alpha_udp_default_writer_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UdpDefaultWriterOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_msgTypes, - }.Build() - File_envoy_config_listener_v4alpha_udp_default_writer_config_proto = out.File - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_rawDesc = nil - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_goTypes = nil - file_envoy_config_listener_v4alpha_udp_default_writer_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v4alpha/udp_default_writer_config.pb.validate.go b/pkg/api/envoy/config/listener/v4alpha/udp_default_writer_config.pb.validate.go deleted file mode 100644 index a70073e59d..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/udp_default_writer_config.pb.validate.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v4alpha/udp_default_writer_config.proto - -package envoy_config_listener_v4alpha - -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{} -) - -// Validate checks the field values on UdpDefaultWriterOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UdpDefaultWriterOptions) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// UdpDefaultWriterOptionsValidationError is the validation error returned by -// UdpDefaultWriterOptions.Validate if the designated constraints aren't met. -type UdpDefaultWriterOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UdpDefaultWriterOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UdpDefaultWriterOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UdpDefaultWriterOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UdpDefaultWriterOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UdpDefaultWriterOptionsValidationError) ErrorName() string { - return "UdpDefaultWriterOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e UdpDefaultWriterOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUdpDefaultWriterOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UdpDefaultWriterOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UdpDefaultWriterOptionsValidationError{} diff --git a/pkg/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.pb.go b/pkg/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.pb.go deleted file mode 100644 index bf214e011c..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.pb.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v4alpha/udp_gso_batch_writer_config.proto - -package envoy_config_listener_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] -// Configuration specific to the Udp Gso Batch Writer. -type UdpGsoBatchWriterOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UdpGsoBatchWriterOptions) Reset() { - *x = UdpGsoBatchWriterOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UdpGsoBatchWriterOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UdpGsoBatchWriterOptions) ProtoMessage() {} - -func (x *UdpGsoBatchWriterOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UdpGsoBatchWriterOptions.ProtoReflect.Descriptor instead. -func (*UdpGsoBatchWriterOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDesc = []byte{ - 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x75, 0x64, 0x70, 0x5f, 0x67, 0x73, 0x6f, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x54, 0x0a, 0x18, 0x55, 0x64, 0x70, 0x47, 0x73, 0x6f, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x38, - 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x55, 0x64, 0x70, 0x47, 0x73, 0x6f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x55, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x1c, 0x55, 0x64, 0x70, 0x47, 0x73, 0x6f, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescOnce sync.Once - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescData = file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDesc -) - -func file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescData) - }) - return file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDescData -} - -var file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_goTypes = []interface{}{ - (*UdpGsoBatchWriterOptions)(nil), // 0: envoy.config.listener.v4alpha.UdpGsoBatchWriterOptions -} -var file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_init() } -func file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_init() { - if File_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UdpGsoBatchWriterOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_msgTypes, - }.Build() - File_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto = out.File - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_rawDesc = nil - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_goTypes = nil - file_envoy_config_listener_v4alpha_udp_gso_batch_writer_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.pb.validate.go b/pkg/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.pb.validate.go deleted file mode 100644 index ad494e0e1b..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/udp_gso_batch_writer_config.pb.validate.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v4alpha/udp_gso_batch_writer_config.proto - -package envoy_config_listener_v4alpha - -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{} -) - -// Validate checks the field values on UdpGsoBatchWriterOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UdpGsoBatchWriterOptions) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// UdpGsoBatchWriterOptionsValidationError is the validation error returned by -// UdpGsoBatchWriterOptions.Validate if the designated constraints aren't met. -type UdpGsoBatchWriterOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UdpGsoBatchWriterOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UdpGsoBatchWriterOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UdpGsoBatchWriterOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UdpGsoBatchWriterOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UdpGsoBatchWriterOptionsValidationError) ErrorName() string { - return "UdpGsoBatchWriterOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e UdpGsoBatchWriterOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUdpGsoBatchWriterOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UdpGsoBatchWriterOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UdpGsoBatchWriterOptionsValidationError{} diff --git a/pkg/api/envoy/config/listener/v4alpha/udp_listener_config.pb.go b/pkg/api/envoy/config/listener/v4alpha/udp_listener_config.pb.go deleted file mode 100644 index be2ea44c15..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/udp_listener_config.pb.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/listener/v4alpha/udp_listener_config.proto - -package envoy_config_listener_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - _ "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type UdpListenerConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Used to look up UDP listener factory, matches "raw_udp_listener" or - // "quic_listener" to create a specific udp listener. - // If not specified, treat as "raw_udp_listener". - UdpListenerName string `protobuf:"bytes,1,opt,name=udp_listener_name,json=udpListenerName,proto3" json:"udp_listener_name,omitempty"` - // Used to create a specific listener factory. To some factory, e.g. - // "raw_udp_listener", config is not needed. - // - // Types that are assignable to ConfigType: - // *UdpListenerConfig_TypedConfig - ConfigType isUdpListenerConfig_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *UdpListenerConfig) Reset() { - *x = UdpListenerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UdpListenerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UdpListenerConfig) ProtoMessage() {} - -func (x *UdpListenerConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UdpListenerConfig.ProtoReflect.Descriptor instead. -func (*UdpListenerConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescGZIP(), []int{0} -} - -func (x *UdpListenerConfig) GetUdpListenerName() string { - if x != nil { - return x.UdpListenerName - } - return "" -} - -func (m *UdpListenerConfig) GetConfigType() isUdpListenerConfig_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *UdpListenerConfig) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*UdpListenerConfig_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isUdpListenerConfig_ConfigType interface { - isUdpListenerConfig_ConfigType() -} - -type UdpListenerConfig_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*UdpListenerConfig_TypedConfig) isUdpListenerConfig_ConfigType() {} - -type ActiveRawUdpListenerConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ActiveRawUdpListenerConfig) Reset() { - *x = ActiveRawUdpListenerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ActiveRawUdpListenerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActiveRawUdpListenerConfig) ProtoMessage() {} - -func (x *ActiveRawUdpListenerConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActiveRawUdpListenerConfig.ProtoReflect.Descriptor instead. -func (*ActiveRawUdpListenerConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescGZIP(), []int{1} -} - -var File_envoy_config_listener_v4alpha_udp_listener_config_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x11, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x64, 0x70, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x58, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x77, 0x55, 0x64, 0x70, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3a, - 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4f, 0x0a, 0x2b, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x16, 0x55, 0x64, 0x70, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescOnce sync.Once - file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescData = file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDesc -) - -func file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescData) - }) - return file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDescData -} - -var file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_listener_v4alpha_udp_listener_config_proto_goTypes = []interface{}{ - (*UdpListenerConfig)(nil), // 0: envoy.config.listener.v4alpha.UdpListenerConfig - (*ActiveRawUdpListenerConfig)(nil), // 1: envoy.config.listener.v4alpha.ActiveRawUdpListenerConfig - (*any.Any)(nil), // 2: google.protobuf.Any -} -var file_envoy_config_listener_v4alpha_udp_listener_config_proto_depIdxs = []int32{ - 2, // 0: envoy.config.listener.v4alpha.UdpListenerConfig.typed_config:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v4alpha_udp_listener_config_proto_init() } -func file_envoy_config_listener_v4alpha_udp_listener_config_proto_init() { - if File_envoy_config_listener_v4alpha_udp_listener_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UdpListenerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActiveRawUdpListenerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*UdpListenerConfig_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v4alpha_udp_listener_config_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v4alpha_udp_listener_config_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v4alpha_udp_listener_config_proto_msgTypes, - }.Build() - File_envoy_config_listener_v4alpha_udp_listener_config_proto = out.File - file_envoy_config_listener_v4alpha_udp_listener_config_proto_rawDesc = nil - file_envoy_config_listener_v4alpha_udp_listener_config_proto_goTypes = nil - file_envoy_config_listener_v4alpha_udp_listener_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/listener/v4alpha/udp_listener_config.pb.validate.go b/pkg/api/envoy/config/listener/v4alpha/udp_listener_config.pb.validate.go deleted file mode 100644 index c27fdcfee9..0000000000 --- a/pkg/api/envoy/config/listener/v4alpha/udp_listener_config.pb.validate.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v4alpha/udp_listener_config.proto - -package envoy_config_listener_v4alpha - -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{} -) - -// 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_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/pkg/api/envoy/config/metrics/v2/metrics_service.pb.go b/pkg/api/envoy/config/metrics/v2/metrics_service.pb.go index 550fe549f8..89407379a6 100644 --- a/pkg/api/envoy/config/metrics/v2/metrics_service.pb.go +++ b/pkg/api/envoy/config/metrics/v2/metrics_service.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/metrics/v2/metrics_service.proto -package envoy_config_metrics_v2 +package metricsv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Metrics Service is configured as a built-in *envoy.stat_sinks.metrics_service* :ref:`StatsSink // `. This opaque configuration will be used to create // Metrics Service. @@ -99,12 +94,17 @@ var file_envoy_config_metrics_v2_metrics_service_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, - 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x46, 0x0a, 0x25, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x2e, 0x76, 0x32, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x90, 0x01, 0x0a, 0x25, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/metrics/v2/metrics_service.pb.validate.go b/pkg/api/envoy/config/metrics/v2/metrics_service.pb.validate.go index a6144aa940..8bafa73ceb 100644 --- a/pkg/api/envoy/config/metrics/v2/metrics_service.pb.validate.go +++ b/pkg/api/envoy/config/metrics/v2/metrics_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/metrics/v2/metrics_service.proto -package envoy_config_metrics_v2 +package metricsv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MetricsServiceConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetricsServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetricsServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetricsServiceConfigMultiError, or nil if none found. +func (m *MetricsServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *MetricsServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetGrpcService() == nil { - return MetricsServiceConfigValidationError{ + err := MetricsServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetricsServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetricsServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetricsServiceConfigValidationError{ field: "GrpcService", @@ -58,9 +97,30 @@ func (m *MetricsServiceConfig) Validate() error { } } + if len(errors) > 0 { + return MetricsServiceConfigMultiError(errors) + } + return nil } +// MetricsServiceConfigMultiError is an error wrapping multiple validation +// errors returned by MetricsServiceConfig.ValidateAll() if the designated +// constraints aren't met. +type MetricsServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetricsServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetricsServiceConfigMultiError) AllErrors() []error { return m } + // MetricsServiceConfigValidationError is the validation error returned by // MetricsServiceConfig.Validate if the designated constraints aren't met. type MetricsServiceConfigValidationError struct { diff --git a/pkg/api/envoy/config/metrics/v2/stats.pb.go b/pkg/api/envoy/config/metrics/v2/stats.pb.go index 7e9f5ebb11..ab333546a2 100644 --- a/pkg/api/envoy/config/metrics/v2/stats.pb.go +++ b/pkg/api/envoy/config/metrics/v2/stats.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/metrics/v2/stats.proto -package envoy_config_metrics_v2 +package metricsv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "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" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for pluggable stats sinks. type StatsSink struct { state protoimpl.MessageState @@ -848,11 +843,16 @@ var file_envoy_config_metrics_v2_stats_proto_rawDesc = []byte{ 0x03, 0x22, 0x2e, 0x0a, 0x0b, 0x48, 0x79, 0x73, 0x74, 0x72, 0x69, 0x78, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x42, 0x3d, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x42, 0x87, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/metrics/v2/stats.pb.validate.go b/pkg/api/envoy/config/metrics/v2/stats.pb.validate.go index 3b477bdb50..3502c0e552 100644 --- a/pkg/api/envoy/config/metrics/v2/stats.pb.validate.go +++ b/pkg/api/envoy/config/metrics/v2/stats.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/metrics/v2/stats.proto -package envoy_config_metrics_v2 +package metricsv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,58 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StatsSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsSinkMultiError, or nil +// if none found. +func (m *StatsSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.ConfigType.(type) { case *StatsSink_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsSinkValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsSinkValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsSinkValidationError{ field: "Config", @@ -58,7 +94,26 @@ func (m *StatsSink) Validate() error { case *StatsSink_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsSinkValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsSinkValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsSinkValidationError{ field: "TypedConfig", @@ -70,9 +125,29 @@ func (m *StatsSink) Validate() error { } + if len(errors) > 0 { + return StatsSinkMultiError(errors) + } + return nil } +// StatsSinkMultiError is an error wrapping multiple validation errors returned +// by StatsSink.ValidateAll() if the designated constraints aren't met. +type StatsSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsSinkMultiError) AllErrors() []error { return m } + // StatsSinkValidationError is the validation error returned by // StatsSink.Validate if the designated constraints aren't met. type StatsSinkValidationError struct { @@ -128,17 +203,50 @@ var _ interface { } = StatsSinkValidationError{} // Validate checks the field values on StatsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsConfigMultiError, or +// nil if none found. +func (m *StatsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStatsTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: fmt.Sprintf("StatsTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: fmt.Sprintf("StatsTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field: fmt.Sprintf("StatsTags[%v]", idx), @@ -150,7 +258,26 @@ func (m *StatsConfig) Validate() error { } - if v, ok := interface{}(m.GetUseAllDefaultTags()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseAllDefaultTags()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "UseAllDefaultTags", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "UseAllDefaultTags", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseAllDefaultTags()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field: "UseAllDefaultTags", @@ -160,7 +287,26 @@ func (m *StatsConfig) Validate() error { } } - if v, ok := interface{}(m.GetStatsMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "StatsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "StatsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field: "StatsMatcher", @@ -170,9 +316,29 @@ func (m *StatsConfig) Validate() error { } } + if len(errors) > 0 { + return StatsConfigMultiError(errors) + } + return nil } +// StatsConfigMultiError is an error wrapping multiple validation errors +// returned by StatsConfig.ValidateAll() if the designated constraints aren't met. +type StatsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsConfigMultiError) AllErrors() []error { return m } + // StatsConfigValidationError is the validation error returned by // StatsConfig.Validate if the designated constraints aren't met. type StatsConfigValidationError struct { @@ -228,13 +394,27 @@ var _ interface { } = StatsConfigValidationError{} // Validate checks the field values on StatsMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsMatcherMultiError, or +// nil if none found. +func (m *StatsMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.StatsMatcher.(type) { case *StatsMatcher_RejectAll: @@ -242,7 +422,26 @@ func (m *StatsMatcher) Validate() error { case *StatsMatcher_ExclusionList: - if v, ok := interface{}(m.GetExclusionList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExclusionList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "ExclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "ExclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExclusionList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsMatcherValidationError{ field: "ExclusionList", @@ -254,7 +453,26 @@ func (m *StatsMatcher) Validate() error { case *StatsMatcher_InclusionList: - if v, ok := interface{}(m.GetInclusionList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInclusionList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "InclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "InclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInclusionList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsMatcherValidationError{ field: "InclusionList", @@ -265,16 +483,40 @@ func (m *StatsMatcher) Validate() error { } default: - return StatsMatcherValidationError{ + err := StatsMatcherValidationError{ field: "StatsMatcher", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return StatsMatcherMultiError(errors) } return nil } +// StatsMatcherMultiError is an error wrapping multiple validation errors +// returned by StatsMatcher.ValidateAll() if the designated constraints aren't met. +type StatsMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsMatcherMultiError) AllErrors() []error { return m } + // StatsMatcherValidationError is the validation error returned by // StatsMatcher.Validate if the designated constraints aren't met. type StatsMatcherValidationError struct { @@ -330,13 +572,27 @@ var _ interface { } = StatsMatcherValidationError{} // Validate checks the field values on TagSpecifier with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TagSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TagSpecifier with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TagSpecifierMultiError, or +// nil if none found. +func (m *TagSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *TagSpecifier) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TagName switch m.TagValue.(type) { @@ -344,10 +600,14 @@ func (m *TagSpecifier) Validate() error { case *TagSpecifier_Regex: if len(m.GetRegex()) > 1024 { - return TagSpecifierValidationError{ + err := TagSpecifierValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *TagSpecifier_FixedValue: @@ -355,9 +615,29 @@ func (m *TagSpecifier) Validate() error { } + if len(errors) > 0 { + return TagSpecifierMultiError(errors) + } + return nil } +// TagSpecifierMultiError is an error wrapping multiple validation errors +// returned by TagSpecifier.ValidateAll() if the designated constraints aren't met. +type TagSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TagSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TagSpecifierMultiError) AllErrors() []error { return m } + // TagSpecifierValidationError is the validation error returned by // TagSpecifier.Validate if the designated constraints aren't met. type TagSpecifierValidationError struct { @@ -413,19 +693,53 @@ var _ interface { } = TagSpecifierValidationError{} // Validate checks the field values on StatsdSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsdSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsdSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsdSinkMultiError, or +// nil if none found. +func (m *StatsdSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsdSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Prefix switch m.StatsdSpecifier.(type) { case *StatsdSink_Address: - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsdSinkValidationError{ field: "Address", @@ -439,16 +753,40 @@ func (m *StatsdSink) Validate() error { // no validation rules for TcpClusterName default: - return StatsdSinkValidationError{ + err := StatsdSinkValidationError{ field: "StatsdSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return StatsdSinkMultiError(errors) + } + return nil } +// StatsdSinkMultiError is an error wrapping multiple validation errors +// returned by StatsdSink.ValidateAll() if the designated constraints aren't met. +type StatsdSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsdSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsdSinkMultiError) AllErrors() []error { return m } + // StatsdSinkValidationError is the validation error returned by // StatsdSink.Validate if the designated constraints aren't met. type StatsdSinkValidationError struct { @@ -504,20 +842,53 @@ var _ interface { } = StatsdSinkValidationError{} // Validate checks the field values on DogStatsdSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DogStatsdSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DogStatsdSink with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DogStatsdSinkMultiError, or +// nil if none found. +func (m *DogStatsdSink) ValidateAll() error { + return m.validate(true) +} + +func (m *DogStatsdSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Prefix switch m.DogStatsdSpecifier.(type) { case *DogStatsdSink_Address: - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DogStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DogStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DogStatsdSinkValidationError{ field: "Address", @@ -528,16 +899,41 @@ func (m *DogStatsdSink) Validate() error { } default: - return DogStatsdSinkValidationError{ + err := DogStatsdSinkValidationError{ field: "DogStatsdSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return DogStatsdSinkMultiError(errors) + } + return nil } +// DogStatsdSinkMultiError is an error wrapping multiple validation errors +// returned by DogStatsdSink.ValidateAll() if the designated constraints +// aren't met. +type DogStatsdSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DogStatsdSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DogStatsdSinkMultiError) AllErrors() []error { return m } + // DogStatsdSinkValidationError is the validation error returned by // DogStatsdSink.Validate if the designated constraints aren't met. type DogStatsdSinkValidationError struct { @@ -593,18 +989,52 @@ var _ interface { } = DogStatsdSinkValidationError{} // Validate checks the field values on HystrixSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HystrixSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HystrixSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HystrixSinkMultiError, or +// nil if none found. +func (m *HystrixSink) ValidateAll() error { + return m.validate(true) +} + +func (m *HystrixSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for NumBuckets + if len(errors) > 0 { + return HystrixSinkMultiError(errors) + } + return nil } +// HystrixSinkMultiError is an error wrapping multiple validation errors +// returned by HystrixSink.ValidateAll() if the designated constraints aren't met. +type HystrixSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HystrixSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HystrixSinkMultiError) AllErrors() []error { return m } + // HystrixSinkValidationError is the validation error returned by // HystrixSink.Validate if the designated constraints aren't met. type HystrixSinkValidationError struct { diff --git a/pkg/api/envoy/config/metrics/v3/metrics_service.pb.go b/pkg/api/envoy/config/metrics/v3/metrics_service.pb.go index c379cad20e..5570de21ab 100644 --- a/pkg/api/envoy/config/metrics/v3/metrics_service.pb.go +++ b/pkg/api/envoy/config/metrics/v3/metrics_service.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/metrics/v3/metrics_service.proto -package envoy_config_metrics_v3 +package metricsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,13 +24,20 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Metrics Service is configured as a built-in *envoy.stat_sinks.metrics_service* :ref:`StatsSink -// `. This opaque configuration will be used to create +// `. This opaque configuration will be used to create // Metrics Service. +// +// Example: +// +// .. code-block:: yaml +// +// stats_sinks: +// - name: envoy.stat_sinks.metrics_service +// typed_config: +// "@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig +// transport_api_version: V3 +// // [#extension: envoy.stat_sinks.metrics_service] type MetricsServiceConfig struct { state protoimpl.MessageState @@ -46,8 +52,12 @@ type MetricsServiceConfig struct { // If true, counters are reported as the delta between flushing intervals. Otherwise, the current // counter value is reported. Defaults to false. // Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the - // sink will take updates from the :ref:`MetricsResponse `. + // sink will take updates from the :ref:`MetricsResponse `. ReportCountersAsDeltas *wrappers.BoolValue `protobuf:"bytes,2,opt,name=report_counters_as_deltas,json=reportCountersAsDeltas,proto3" json:"report_counters_as_deltas,omitempty"` + // If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService, + // and the tag extracted name will be used instead of the full name, which may contain values used by the tag + // extractor or additional tags added during stats creation. + EmitTagsAsLabels bool `protobuf:"varint,4,opt,name=emit_tags_as_labels,json=emitTagsAsLabels,proto3" json:"emit_tags_as_labels,omitempty"` } func (x *MetricsServiceConfig) Reset() { @@ -93,7 +103,7 @@ func (x *MetricsServiceConfig) GetTransportApiVersion() v3.ApiVersion { if x != nil { return x.TransportApiVersion } - return v3.ApiVersion_AUTO + return v3.ApiVersion(0) } func (x *MetricsServiceConfig) GetReportCountersAsDeltas() *wrappers.BoolValue { @@ -103,6 +113,13 @@ func (x *MetricsServiceConfig) GetReportCountersAsDeltas() *wrappers.BoolValue { return nil } +func (x *MetricsServiceConfig) GetEmitTagsAsLabels() bool { + if x != nil { + return x.EmitTagsAsLabels + } + return false +} + var File_envoy_config_metrics_v3_metrics_service_proto protoreflect.FileDescriptor var file_envoy_config_metrics_v3_metrics_service_proto_rawDesc = []byte{ @@ -123,7 +140,7 @@ var file_envoy_config_metrics_v3_metrics_service_proto_rawDesc = []byte{ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x02, 0x0a, 0x14, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x03, 0x0a, 0x14, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, @@ -141,15 +158,23 @@ var file_envoy_config_metrics_v3_metrics_service_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x41, 0x73, - 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x46, 0x0a, 0x25, 0x69, + 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x6d, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x41, 0x73, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x90, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/metrics/v3/metrics_service.pb.validate.go b/pkg/api/envoy/config/metrics/v3/metrics_service.pb.validate.go index c2069fc3ce..59b45a585d 100644 --- a/pkg/api/envoy/config/metrics/v3/metrics_service.pb.validate.go +++ b/pkg/api/envoy/config/metrics/v3/metrics_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/metrics/v3/metrics_service.proto -package envoy_config_metrics_v3 +package metricsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,27 +33,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.ApiVersion(0) ) // Validate checks the field values on MetricsServiceConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetricsServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetricsServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetricsServiceConfigMultiError, or nil if none found. +func (m *MetricsServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *MetricsServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetGrpcService() == nil { - return MetricsServiceConfigValidationError{ + err := MetricsServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetricsServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetricsServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetricsServiceConfigValidationError{ field: "GrpcService", @@ -63,13 +102,36 @@ func (m *MetricsServiceConfig) Validate() error { } if _, ok := v3.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return MetricsServiceConfigValidationError{ + err := MetricsServiceConfigValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetReportCountersAsDeltas()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetReportCountersAsDeltas()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetricsServiceConfigValidationError{ + field: "ReportCountersAsDeltas", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetricsServiceConfigValidationError{ + field: "ReportCountersAsDeltas", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetReportCountersAsDeltas()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetricsServiceConfigValidationError{ field: "ReportCountersAsDeltas", @@ -79,9 +141,32 @@ func (m *MetricsServiceConfig) Validate() error { } } + // no validation rules for EmitTagsAsLabels + + if len(errors) > 0 { + return MetricsServiceConfigMultiError(errors) + } + return nil } +// MetricsServiceConfigMultiError is an error wrapping multiple validation +// errors returned by MetricsServiceConfig.ValidateAll() if the designated +// constraints aren't met. +type MetricsServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetricsServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetricsServiceConfigMultiError) AllErrors() []error { return m } + // MetricsServiceConfigValidationError is the validation error returned by // MetricsServiceConfig.Validate if the designated constraints aren't met. type MetricsServiceConfigValidationError struct { diff --git a/pkg/api/envoy/config/metrics/v3/stats.pb.go b/pkg/api/envoy/config/metrics/v3/stats.pb.go index f541ecaca6..91aa7e540f 100644 --- a/pkg/api/envoy/config/metrics/v3/stats.pb.go +++ b/pkg/api/envoy/config/metrics/v3/stats.pb.go @@ -1,19 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/metrics/v3/stats.proto -package envoy_config_metrics_v3 +package metricsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -28,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for pluggable stats sinks. type StatsSink struct { state protoimpl.MessageState @@ -39,21 +33,16 @@ type StatsSink struct { unknownFields protoimpl.UnknownFields // The name of the stats sink to instantiate. The name must match a supported - // stats sink. The built-in stats sinks are: - // - // * :ref:`envoy.stat_sinks.statsd ` - // * :ref:`envoy.stat_sinks.dog_statsd ` - // * :ref:`envoy.stat_sinks.metrics_service ` - // * :ref:`envoy.stat_sinks.hystrix ` - // + // stats sink. + // See the :ref:`extensions listed in typed_config below ` for the default list of available stats sink. // Sinks optionally support tagged/multiple dimensional metrics. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Stats sink specific configuration which depends on the sink being instantiated. See - // :ref:`StatsdSink ` for an example. + // :ref:`StatsdSink ` for an example. + // [#extension-category: envoy.stats_sinks] // // Types that are assignable to ConfigType: // *StatsSink_TypedConfig - // *StatsSink_HiddenEnvoyDeprecatedConfig ConfigType isStatsSink_ConfigType `protobuf_oneof:"config_type"` } @@ -110,14 +99,6 @@ func (x *StatsSink) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *StatsSink) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*StatsSink_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isStatsSink_ConfigType interface { isStatsSink_ConfigType() } @@ -126,15 +107,8 @@ type StatsSink_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type StatsSink_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*StatsSink_TypedConfig) isStatsSink_ConfigType() {} -func (*StatsSink_HiddenEnvoyDeprecatedConfig) isStatsSink_ConfigType() {} - // Statistics configuration such as tagging. type StatsConfig struct { state protoimpl.MessageState @@ -143,12 +117,12 @@ type StatsConfig struct { // Each stat name is iteratively processed through these tag specifiers. // When a tag is matched, the first capture group is removed from the name so - // later :ref:`TagSpecifiers ` cannot match that + // later :ref:`TagSpecifiers ` cannot match that // same portion of the match. StatsTags []*TagSpecifier `protobuf:"bytes,1,rep,name=stats_tags,json=statsTags,proto3" json:"stats_tags,omitempty"` // Use all default tag regexes specified in Envoy. These can be combined with // custom tags specified in :ref:`stats_tags - // `. They will be processed before + // `. They will be processed before // the custom tags. // // .. note:: @@ -374,9 +348,9 @@ type TagSpecifier struct { // sink. Envoy has a set of default names and regexes to extract dynamic // portions of existing stats, which can be found in :repo:`well_known_names.h // ` in the Envoy repository. If a :ref:`tag_name - // ` is provided in the config and - // neither :ref:`regex ` or - // :ref:`fixed_value ` were specified, + // ` is provided in the config and + // neither :ref:`regex ` or + // :ref:`fixed_value ` were specified, // Envoy will attempt to find that name in its set of defaults and use the accompanying regex. // // .. note:: @@ -706,7 +680,7 @@ func (*StatsdSink_TcpClusterName) isStatsdSink_StatsdSpecifier() {} // Stats configuration proto schema for built-in *envoy.stat_sinks.dog_statsd* sink. // The sink emits stats with `DogStatsD `_ // compatible tags. Tags are configurable via :ref:`StatsConfig -// `. +// `. // [#extension: envoy.stat_sinks.dog_statsd] type DogStatsdSink struct { state protoimpl.MessageState @@ -717,7 +691,7 @@ type DogStatsdSink struct { // *DogStatsdSink_Address DogStatsdSpecifier isDogStatsdSink_DogStatsdSpecifier `protobuf_oneof:"dog_statsd_specifier"` // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field - // ` for more details. + // ` for more details. Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` // Optional max datagram size to use when sending UDP messages. By default Envoy // will emit one metric per datagram. By specifying a max-size larger than a single @@ -881,134 +855,132 @@ var file_envoy_config_metrics_v3_stats_proto_rawDesc = []byte{ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x09, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x28, 0x9a, 0xc5, 0x88, - 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x22, 0x86, 0x03, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, 0x54, 0x61, 0x67, 0x73, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x73, - 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x75, 0x73, 0x65, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x6c, 0x0a, 0x19, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x17, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, + 0x09, 0x53, 0x74, 0x61, 0x74, 0x73, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, + 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, + 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x53, + 0x69, 0x6e, 0x6b, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0x86, 0x03, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x44, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x54, 0x61, 0x67, 0x73, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x6c, + 0x6c, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x11, 0x75, 0x73, 0x65, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, + 0x61, 0x67, 0x73, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x6c, 0x0a, 0x19, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x17, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x2a, 0x9a, + 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x98, 0x02, 0x0a, 0x0c, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0a, 0x72, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x09, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x51, 0x0a, 0x0e, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x51, + 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, - 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x98, 0x02, - 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1f, - 0x0a, 0x0a, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x6c, 0x12, - 0x51, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x51, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, - 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, + 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, + 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x22, 0xa8, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x67, + 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xa8, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x67, - 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0x48, 0x00, 0x52, - 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x53, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x44, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x31, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x92, 0x01, 0x11, 0x08, 0x01, - 0x18, 0x01, 0x22, 0x0b, 0x12, 0x09, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, - 0x74, 0x63, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, - 0x6b, 0x42, 0x17, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x8f, 0x02, 0x0a, 0x0d, 0x44, - 0x6f, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x39, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x5a, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x50, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, - 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x67, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x1b, 0x0a, 0x14, 0x64, 0x6f, 0x67, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x5a, 0x0a, 0x0b, - 0x48, 0x79, 0x73, 0x74, 0x72, 0x69, 0x78, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, - 0x75, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x2a, 0x9a, 0xc5, - 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x79, 0x73, - 0x74, 0x72, 0x69, 0x78, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x3d, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, - 0x33, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x92, 0x01, 0x0a, 0x17, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x44, 0x0a, 0x05, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x31, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x92, 0x01, 0x11, 0x08, 0x01, 0x18, 0x01, 0x22, 0x0b, + 0x12, 0x09, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, + 0x69, 0x6e, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, + 0x0a, 0x10, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x17, 0x0a, + 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x8f, 0x02, 0x0a, 0x0d, 0x44, 0x6f, 0x67, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x5a, 0x0a, 0x16, 0x6d, + 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, + 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x1b, 0x0a, 0x14, 0x64, 0x6f, 0x67, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x5a, 0x0a, 0x0b, 0x48, 0x79, 0x73, 0x74, + 0x72, 0x69, 0x78, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x75, + 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x79, 0x73, 0x74, 0x72, 0x69, 0x78, + 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x87, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0a, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1034,31 +1006,29 @@ var file_envoy_config_metrics_v3_stats_proto_goTypes = []interface{}{ (*DogStatsdSink)(nil), // 6: envoy.config.metrics.v3.DogStatsdSink (*HystrixSink)(nil), // 7: envoy.config.metrics.v3.HystrixSink (*any.Any)(nil), // 8: google.protobuf.Any - (*_struct.Struct)(nil), // 9: google.protobuf.Struct - (*wrappers.BoolValue)(nil), // 10: google.protobuf.BoolValue - (*v3.ListStringMatcher)(nil), // 11: envoy.type.matcher.v3.ListStringMatcher - (*v3.StringMatcher)(nil), // 12: envoy.type.matcher.v3.StringMatcher - (*v31.Address)(nil), // 13: envoy.config.core.v3.Address - (*wrappers.UInt64Value)(nil), // 14: google.protobuf.UInt64Value + (*wrappers.BoolValue)(nil), // 9: google.protobuf.BoolValue + (*v3.ListStringMatcher)(nil), // 10: envoy.type.matcher.v3.ListStringMatcher + (*v3.StringMatcher)(nil), // 11: envoy.type.matcher.v3.StringMatcher + (*v31.Address)(nil), // 12: envoy.config.core.v3.Address + (*wrappers.UInt64Value)(nil), // 13: google.protobuf.UInt64Value } var file_envoy_config_metrics_v3_stats_proto_depIdxs = []int32{ 8, // 0: envoy.config.metrics.v3.StatsSink.typed_config:type_name -> google.protobuf.Any - 9, // 1: envoy.config.metrics.v3.StatsSink.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 3, // 2: envoy.config.metrics.v3.StatsConfig.stats_tags:type_name -> envoy.config.metrics.v3.TagSpecifier - 10, // 3: envoy.config.metrics.v3.StatsConfig.use_all_default_tags:type_name -> google.protobuf.BoolValue - 2, // 4: envoy.config.metrics.v3.StatsConfig.stats_matcher:type_name -> envoy.config.metrics.v3.StatsMatcher - 4, // 5: envoy.config.metrics.v3.StatsConfig.histogram_bucket_settings:type_name -> envoy.config.metrics.v3.HistogramBucketSettings - 11, // 6: envoy.config.metrics.v3.StatsMatcher.exclusion_list:type_name -> envoy.type.matcher.v3.ListStringMatcher - 11, // 7: envoy.config.metrics.v3.StatsMatcher.inclusion_list:type_name -> envoy.type.matcher.v3.ListStringMatcher - 12, // 8: envoy.config.metrics.v3.HistogramBucketSettings.match:type_name -> envoy.type.matcher.v3.StringMatcher - 13, // 9: envoy.config.metrics.v3.StatsdSink.address:type_name -> envoy.config.core.v3.Address - 13, // 10: envoy.config.metrics.v3.DogStatsdSink.address:type_name -> envoy.config.core.v3.Address - 14, // 11: envoy.config.metrics.v3.DogStatsdSink.max_bytes_per_datagram:type_name -> google.protobuf.UInt64Value - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 3, // 1: envoy.config.metrics.v3.StatsConfig.stats_tags:type_name -> envoy.config.metrics.v3.TagSpecifier + 9, // 2: envoy.config.metrics.v3.StatsConfig.use_all_default_tags:type_name -> google.protobuf.BoolValue + 2, // 3: envoy.config.metrics.v3.StatsConfig.stats_matcher:type_name -> envoy.config.metrics.v3.StatsMatcher + 4, // 4: envoy.config.metrics.v3.StatsConfig.histogram_bucket_settings:type_name -> envoy.config.metrics.v3.HistogramBucketSettings + 10, // 5: envoy.config.metrics.v3.StatsMatcher.exclusion_list:type_name -> envoy.type.matcher.v3.ListStringMatcher + 10, // 6: envoy.config.metrics.v3.StatsMatcher.inclusion_list:type_name -> envoy.type.matcher.v3.ListStringMatcher + 11, // 7: envoy.config.metrics.v3.HistogramBucketSettings.match:type_name -> envoy.type.matcher.v3.StringMatcher + 12, // 8: envoy.config.metrics.v3.StatsdSink.address:type_name -> envoy.config.core.v3.Address + 12, // 9: envoy.config.metrics.v3.DogStatsdSink.address:type_name -> envoy.config.core.v3.Address + 13, // 10: envoy.config.metrics.v3.DogStatsdSink.max_bytes_per_datagram:type_name -> google.protobuf.UInt64Value + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_envoy_config_metrics_v3_stats_proto_init() } @@ -1166,7 +1136,6 @@ func file_envoy_config_metrics_v3_stats_proto_init() { } file_envoy_config_metrics_v3_stats_proto_msgTypes[0].OneofWrappers = []interface{}{ (*StatsSink_TypedConfig)(nil), - (*StatsSink_HiddenEnvoyDeprecatedConfig)(nil), } file_envoy_config_metrics_v3_stats_proto_msgTypes[2].OneofWrappers = []interface{}{ (*StatsMatcher_RejectAll)(nil), diff --git a/pkg/api/envoy/config/metrics/v3/stats.pb.validate.go b/pkg/api/envoy/config/metrics/v3/stats.pb.validate.go index e600f83a4d..94ddc9b15c 100644 --- a/pkg/api/envoy/config/metrics/v3/stats.pb.validate.go +++ b/pkg/api/envoy/config/metrics/v3/stats.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/metrics/v3/stats.proto -package envoy_config_metrics_v3 +package metricsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,38 +31,61 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StatsSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsSinkMultiError, or nil +// if none found. +func (m *StatsSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.ConfigType.(type) { case *StatsSink_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsSinkValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsSinkValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsSinkValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *StatsSink_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsSinkValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -70,9 +94,29 @@ func (m *StatsSink) Validate() error { } + if len(errors) > 0 { + return StatsSinkMultiError(errors) + } + return nil } +// StatsSinkMultiError is an error wrapping multiple validation errors returned +// by StatsSink.ValidateAll() if the designated constraints aren't met. +type StatsSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsSinkMultiError) AllErrors() []error { return m } + // StatsSinkValidationError is the validation error returned by // StatsSink.Validate if the designated constraints aren't met. type StatsSinkValidationError struct { @@ -128,17 +172,50 @@ var _ interface { } = StatsSinkValidationError{} // Validate checks the field values on StatsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsConfigMultiError, or +// nil if none found. +func (m *StatsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetStatsTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: fmt.Sprintf("StatsTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: fmt.Sprintf("StatsTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field: fmt.Sprintf("StatsTags[%v]", idx), @@ -150,7 +227,26 @@ func (m *StatsConfig) Validate() error { } - if v, ok := interface{}(m.GetUseAllDefaultTags()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseAllDefaultTags()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "UseAllDefaultTags", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "UseAllDefaultTags", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseAllDefaultTags()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field: "UseAllDefaultTags", @@ -160,7 +256,26 @@ func (m *StatsConfig) Validate() error { } } - if v, ok := interface{}(m.GetStatsMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "StatsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: "StatsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field: "StatsMatcher", @@ -173,7 +288,26 @@ func (m *StatsConfig) Validate() error { for idx, item := range m.GetHistogramBucketSettings() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: fmt.Sprintf("HistogramBucketSettings[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsConfigValidationError{ + field: fmt.Sprintf("HistogramBucketSettings[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsConfigValidationError{ field: fmt.Sprintf("HistogramBucketSettings[%v]", idx), @@ -185,9 +319,29 @@ func (m *StatsConfig) Validate() error { } + if len(errors) > 0 { + return StatsConfigMultiError(errors) + } + return nil } +// StatsConfigMultiError is an error wrapping multiple validation errors +// returned by StatsConfig.ValidateAll() if the designated constraints aren't met. +type StatsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsConfigMultiError) AllErrors() []error { return m } + // StatsConfigValidationError is the validation error returned by // StatsConfig.Validate if the designated constraints aren't met. type StatsConfigValidationError struct { @@ -243,13 +397,27 @@ var _ interface { } = StatsConfigValidationError{} // Validate checks the field values on StatsMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsMatcherMultiError, or +// nil if none found. +func (m *StatsMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.StatsMatcher.(type) { case *StatsMatcher_RejectAll: @@ -257,7 +425,26 @@ func (m *StatsMatcher) Validate() error { case *StatsMatcher_ExclusionList: - if v, ok := interface{}(m.GetExclusionList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExclusionList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "ExclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "ExclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExclusionList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsMatcherValidationError{ field: "ExclusionList", @@ -269,7 +456,26 @@ func (m *StatsMatcher) Validate() error { case *StatsMatcher_InclusionList: - if v, ok := interface{}(m.GetInclusionList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInclusionList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "InclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsMatcherValidationError{ + field: "InclusionList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInclusionList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsMatcherValidationError{ field: "InclusionList", @@ -280,16 +486,40 @@ func (m *StatsMatcher) Validate() error { } default: - return StatsMatcherValidationError{ + err := StatsMatcherValidationError{ field: "StatsMatcher", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return StatsMatcherMultiError(errors) } return nil } +// StatsMatcherMultiError is an error wrapping multiple validation errors +// returned by StatsMatcher.ValidateAll() if the designated constraints aren't met. +type StatsMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsMatcherMultiError) AllErrors() []error { return m } + // StatsMatcherValidationError is the validation error returned by // StatsMatcher.Validate if the designated constraints aren't met. type StatsMatcherValidationError struct { @@ -345,13 +575,27 @@ var _ interface { } = StatsMatcherValidationError{} // Validate checks the field values on TagSpecifier with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TagSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TagSpecifier with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TagSpecifierMultiError, or +// nil if none found. +func (m *TagSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *TagSpecifier) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TagName switch m.TagValue.(type) { @@ -359,10 +603,14 @@ func (m *TagSpecifier) Validate() error { case *TagSpecifier_Regex: if len(m.GetRegex()) > 1024 { - return TagSpecifierValidationError{ + err := TagSpecifierValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *TagSpecifier_FixedValue: @@ -370,9 +618,29 @@ func (m *TagSpecifier) Validate() error { } + if len(errors) > 0 { + return TagSpecifierMultiError(errors) + } + return nil } +// TagSpecifierMultiError is an error wrapping multiple validation errors +// returned by TagSpecifier.ValidateAll() if the designated constraints aren't met. +type TagSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TagSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TagSpecifierMultiError) AllErrors() []error { return m } + // TagSpecifierValidationError is the validation error returned by // TagSpecifier.Validate if the designated constraints aren't met. type TagSpecifierValidationError struct { @@ -429,20 +697,57 @@ var _ interface { // Validate checks the field values on HistogramBucketSettings with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HistogramBucketSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HistogramBucketSettings with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HistogramBucketSettingsMultiError, or nil if none found. +func (m *HistogramBucketSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *HistogramBucketSettings) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatch() == nil { - return HistogramBucketSettingsValidationError{ + err := HistogramBucketSettingsValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HistogramBucketSettingsValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HistogramBucketSettingsValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HistogramBucketSettingsValidationError{ field: "Match", @@ -453,10 +758,14 @@ func (m *HistogramBucketSettings) Validate() error { } if len(m.GetBuckets()) < 1 { - return HistogramBucketSettingsValidationError{ + err := HistogramBucketSettingsValidationError{ field: "Buckets", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } _HistogramBucketSettings_Buckets_Unique := make(map[float64]struct{}, len(m.GetBuckets())) @@ -465,26 +774,55 @@ func (m *HistogramBucketSettings) Validate() error { _, _ = idx, item if _, exists := _HistogramBucketSettings_Buckets_Unique[item]; exists { - return HistogramBucketSettingsValidationError{ + err := HistogramBucketSettingsValidationError{ field: fmt.Sprintf("Buckets[%v]", idx), reason: "repeated value must contain unique items", } + if !all { + return err + } + errors = append(errors, err) } else { _HistogramBucketSettings_Buckets_Unique[item] = struct{}{} } if item <= 0 { - return HistogramBucketSettingsValidationError{ + err := HistogramBucketSettingsValidationError{ field: fmt.Sprintf("Buckets[%v]", idx), reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return HistogramBucketSettingsMultiError(errors) + } + return nil } +// HistogramBucketSettingsMultiError is an error wrapping multiple validation +// errors returned by HistogramBucketSettings.ValidateAll() if the designated +// constraints aren't met. +type HistogramBucketSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HistogramBucketSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HistogramBucketSettingsMultiError) AllErrors() []error { return m } + // HistogramBucketSettingsValidationError is the validation error returned by // HistogramBucketSettings.Validate if the designated constraints aren't met. type HistogramBucketSettingsValidationError struct { @@ -542,19 +880,53 @@ var _ interface { } = HistogramBucketSettingsValidationError{} // Validate checks the field values on StatsdSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StatsdSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatsdSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StatsdSinkMultiError, or +// nil if none found. +func (m *StatsdSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StatsdSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Prefix switch m.StatsdSpecifier.(type) { case *StatsdSink_Address: - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StatsdSinkValidationError{ field: "Address", @@ -568,16 +940,40 @@ func (m *StatsdSink) Validate() error { // no validation rules for TcpClusterName default: - return StatsdSinkValidationError{ + err := StatsdSinkValidationError{ field: "StatsdSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return StatsdSinkMultiError(errors) } return nil } +// StatsdSinkMultiError is an error wrapping multiple validation errors +// returned by StatsdSink.ValidateAll() if the designated constraints aren't met. +type StatsdSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatsdSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatsdSinkMultiError) AllErrors() []error { return m } + // StatsdSinkValidationError is the validation error returned by // StatsdSink.Validate if the designated constraints aren't met. type StatsdSinkValidationError struct { @@ -633,22 +1029,40 @@ var _ interface { } = StatsdSinkValidationError{} // Validate checks the field values on DogStatsdSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DogStatsdSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DogStatsdSink with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DogStatsdSinkMultiError, or +// nil if none found. +func (m *DogStatsdSink) ValidateAll() error { + return m.validate(true) +} + +func (m *DogStatsdSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Prefix if wrapper := m.GetMaxBytesPerDatagram(); wrapper != nil { if wrapper.GetValue() <= 0 { - return DogStatsdSinkValidationError{ + err := DogStatsdSinkValidationError{ field: "MaxBytesPerDatagram", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } @@ -657,7 +1071,26 @@ func (m *DogStatsdSink) Validate() error { case *DogStatsdSink_Address: - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DogStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DogStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DogStatsdSinkValidationError{ field: "Address", @@ -668,16 +1101,41 @@ func (m *DogStatsdSink) Validate() error { } default: - return DogStatsdSinkValidationError{ + err := DogStatsdSinkValidationError{ field: "DogStatsdSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return DogStatsdSinkMultiError(errors) + } + return nil } +// DogStatsdSinkMultiError is an error wrapping multiple validation errors +// returned by DogStatsdSink.ValidateAll() if the designated constraints +// aren't met. +type DogStatsdSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DogStatsdSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DogStatsdSinkMultiError) AllErrors() []error { return m } + // DogStatsdSinkValidationError is the validation error returned by // DogStatsdSink.Validate if the designated constraints aren't met. type DogStatsdSinkValidationError struct { @@ -733,18 +1191,52 @@ var _ interface { } = DogStatsdSinkValidationError{} // Validate checks the field values on HystrixSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HystrixSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HystrixSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HystrixSinkMultiError, or +// nil if none found. +func (m *HystrixSink) ValidateAll() error { + return m.validate(true) +} + +func (m *HystrixSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for NumBuckets + if len(errors) > 0 { + return HystrixSinkMultiError(errors) + } + return nil } +// HystrixSinkMultiError is an error wrapping multiple validation errors +// returned by HystrixSink.ValidateAll() if the designated constraints aren't met. +type HystrixSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HystrixSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HystrixSinkMultiError) AllErrors() []error { return m } + // HystrixSinkValidationError is the validation error returned by // HystrixSink.Validate if the designated constraints aren't met. type HystrixSinkValidationError struct { diff --git a/pkg/api/envoy/config/metrics/v4alpha/metrics_service.pb.go b/pkg/api/envoy/config/metrics/v4alpha/metrics_service.pb.go deleted file mode 100644 index 170d347395..0000000000 --- a/pkg/api/envoy/config/metrics/v4alpha/metrics_service.pb.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/metrics/v4alpha/metrics_service.proto - -package envoy_config_metrics_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Metrics Service is configured as a built-in *envoy.stat_sinks.metrics_service* :ref:`StatsSink -// `. This opaque configuration will be used to create -// Metrics Service. -// [#extension: envoy.stat_sinks.metrics_service] -type MetricsServiceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The upstream gRPC cluster that hosts the metrics service. - GrpcService *v4alpha.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` - // API version for metric service transport protocol. This describes the metric service gRPC - // endpoint and version of messages used on the wire. - TransportApiVersion v4alpha.ApiVersion `protobuf:"varint,3,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"transport_api_version,omitempty"` - // If true, counters are reported as the delta between flushing intervals. Otherwise, the current - // counter value is reported. Defaults to false. - // Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the - // sink will take updates from the :ref:`MetricsResponse `. - ReportCountersAsDeltas *wrappers.BoolValue `protobuf:"bytes,2,opt,name=report_counters_as_deltas,json=reportCountersAsDeltas,proto3" json:"report_counters_as_deltas,omitempty"` -} - -func (x *MetricsServiceConfig) Reset() { - *x = MetricsServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_metrics_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetricsServiceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetricsServiceConfig) ProtoMessage() {} - -func (x *MetricsServiceConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_metrics_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetricsServiceConfig.ProtoReflect.Descriptor instead. -func (*MetricsServiceConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescGZIP(), []int{0} -} - -func (x *MetricsServiceConfig) GetGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -func (x *MetricsServiceConfig) GetTransportApiVersion() v4alpha.ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return v4alpha.ApiVersion_hidden_envoy_deprecated_AUTO -} - -func (x *MetricsServiceConfig) GetReportCountersAsDeltas() *wrappers.BoolValue { - if x != nil { - return x.ReportCountersAsDeltas - } - return nil -} - -var File_envoy_config_metrics_v4alpha_metrics_service_proto protoreflect.FileDescriptor - -var file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a, 0x14, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, - 0x19, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, - 0x5f, 0x61, 0x73, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x41, 0x73, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4b, 0x0a, 0x2a, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescOnce sync.Once - file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescData = file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDesc -) - -func file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescGZIP() []byte { - file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescOnce.Do(func() { - file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescData) - }) - return file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDescData -} - -var file_envoy_config_metrics_v4alpha_metrics_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_metrics_v4alpha_metrics_service_proto_goTypes = []interface{}{ - (*MetricsServiceConfig)(nil), // 0: envoy.config.metrics.v4alpha.MetricsServiceConfig - (*v4alpha.GrpcService)(nil), // 1: envoy.config.core.v4alpha.GrpcService - (v4alpha.ApiVersion)(0), // 2: envoy.config.core.v4alpha.ApiVersion - (*wrappers.BoolValue)(nil), // 3: google.protobuf.BoolValue -} -var file_envoy_config_metrics_v4alpha_metrics_service_proto_depIdxs = []int32{ - 1, // 0: envoy.config.metrics.v4alpha.MetricsServiceConfig.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 2, // 1: envoy.config.metrics.v4alpha.MetricsServiceConfig.transport_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 3, // 2: envoy.config.metrics.v4alpha.MetricsServiceConfig.report_counters_as_deltas:type_name -> google.protobuf.BoolValue - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_config_metrics_v4alpha_metrics_service_proto_init() } -func file_envoy_config_metrics_v4alpha_metrics_service_proto_init() { - if File_envoy_config_metrics_v4alpha_metrics_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_metrics_v4alpha_metrics_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetricsServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_metrics_v4alpha_metrics_service_proto_goTypes, - DependencyIndexes: file_envoy_config_metrics_v4alpha_metrics_service_proto_depIdxs, - MessageInfos: file_envoy_config_metrics_v4alpha_metrics_service_proto_msgTypes, - }.Build() - File_envoy_config_metrics_v4alpha_metrics_service_proto = out.File - file_envoy_config_metrics_v4alpha_metrics_service_proto_rawDesc = nil - file_envoy_config_metrics_v4alpha_metrics_service_proto_goTypes = nil - file_envoy_config_metrics_v4alpha_metrics_service_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/metrics/v4alpha/metrics_service.pb.validate.go b/pkg/api/envoy/config/metrics/v4alpha/metrics_service.pb.validate.go deleted file mode 100644 index 6405457395..0000000000 --- a/pkg/api/envoy/config/metrics/v4alpha/metrics_service.pb.validate.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/metrics/v4alpha/metrics_service.proto - -package envoy_config_metrics_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.ApiVersion(0) -) - -// Validate checks the field values on MetricsServiceConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *MetricsServiceConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetGrpcService() == nil { - return MetricsServiceConfigValidationError{ - field: "GrpcService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetricsServiceConfigValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := v4alpha.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return MetricsServiceConfigValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - } - - if v, ok := interface{}(m.GetReportCountersAsDeltas()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetricsServiceConfigValidationError{ - field: "ReportCountersAsDeltas", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// MetricsServiceConfigValidationError is the validation error returned by -// MetricsServiceConfig.Validate if the designated constraints aren't met. -type MetricsServiceConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetricsServiceConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetricsServiceConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetricsServiceConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetricsServiceConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetricsServiceConfigValidationError) ErrorName() string { - return "MetricsServiceConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e MetricsServiceConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetricsServiceConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetricsServiceConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetricsServiceConfigValidationError{} diff --git a/pkg/api/envoy/config/metrics/v4alpha/stats.pb.go b/pkg/api/envoy/config/metrics/v4alpha/stats.pb.go deleted file mode 100644 index 842d54903f..0000000000 --- a/pkg/api/envoy/config/metrics/v4alpha/stats.pb.go +++ /dev/null @@ -1,1189 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/metrics/v4alpha/stats.proto - -package envoy_config_metrics_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "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/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for pluggable stats sinks. -type StatsSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the stats sink to instantiate. The name must match a supported - // stats sink. The built-in stats sinks are: - // - // * :ref:`envoy.stat_sinks.statsd ` - // * :ref:`envoy.stat_sinks.dog_statsd ` - // * :ref:`envoy.stat_sinks.metrics_service ` - // * :ref:`envoy.stat_sinks.hystrix ` - // - // Sinks optionally support tagged/multiple dimensional metrics. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Stats sink specific configuration which depends on the sink being instantiated. See - // :ref:`StatsdSink ` for an example. - // - // Types that are assignable to ConfigType: - // *StatsSink_TypedConfig - ConfigType isStatsSink_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *StatsSink) Reset() { - *x = StatsSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatsSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatsSink) ProtoMessage() {} - -func (x *StatsSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatsSink.ProtoReflect.Descriptor instead. -func (*StatsSink) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{0} -} - -func (x *StatsSink) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *StatsSink) GetConfigType() isStatsSink_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *StatsSink) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*StatsSink_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isStatsSink_ConfigType interface { - isStatsSink_ConfigType() -} - -type StatsSink_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*StatsSink_TypedConfig) isStatsSink_ConfigType() {} - -// Statistics configuration such as tagging. -type StatsConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Each stat name is iteratively processed through these tag specifiers. - // When a tag is matched, the first capture group is removed from the name so - // later :ref:`TagSpecifiers ` cannot match that - // same portion of the match. - StatsTags []*TagSpecifier `protobuf:"bytes,1,rep,name=stats_tags,json=statsTags,proto3" json:"stats_tags,omitempty"` - // Use all default tag regexes specified in Envoy. These can be combined with - // custom tags specified in :ref:`stats_tags - // `. They will be processed before - // the custom tags. - // - // .. note:: - // - // If any default tags are specified twice, the config will be considered - // invalid. - // - // See :repo:`well_known_names.h ` for a list of the - // default tags in Envoy. - // - // If not provided, the value is assumed to be true. - UseAllDefaultTags *wrappers.BoolValue `protobuf:"bytes,2,opt,name=use_all_default_tags,json=useAllDefaultTags,proto3" json:"use_all_default_tags,omitempty"` - // Inclusion/exclusion matcher for stat name creation. If not provided, all stats are instantiated - // as normal. Preventing the instantiation of certain families of stats can improve memory - // performance for Envoys running especially large configs. - // - // .. warning:: - // Excluding stats may affect Envoy's behavior in undocumented ways. See - // `issue #8771 `_ for more information. - // If any unexpected behavior changes are observed, please open a new issue immediately. - StatsMatcher *StatsMatcher `protobuf:"bytes,3,opt,name=stats_matcher,json=statsMatcher,proto3" json:"stats_matcher,omitempty"` - // Defines rules for setting the histogram buckets. Rules are evaluated in order, and the first - // match is applied. If no match is found (or if no rules are set), the following default buckets - // are used: - // - // .. code-block:: json - // - // [ - // 0.5, - // 1, - // 5, - // 10, - // 25, - // 50, - // 100, - // 250, - // 500, - // 1000, - // 2500, - // 5000, - // 10000, - // 30000, - // 60000, - // 300000, - // 600000, - // 1800000, - // 3600000 - // ] - HistogramBucketSettings []*HistogramBucketSettings `protobuf:"bytes,4,rep,name=histogram_bucket_settings,json=histogramBucketSettings,proto3" json:"histogram_bucket_settings,omitempty"` -} - -func (x *StatsConfig) Reset() { - *x = StatsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatsConfig) ProtoMessage() {} - -func (x *StatsConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatsConfig.ProtoReflect.Descriptor instead. -func (*StatsConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{1} -} - -func (x *StatsConfig) GetStatsTags() []*TagSpecifier { - if x != nil { - return x.StatsTags - } - return nil -} - -func (x *StatsConfig) GetUseAllDefaultTags() *wrappers.BoolValue { - if x != nil { - return x.UseAllDefaultTags - } - return nil -} - -func (x *StatsConfig) GetStatsMatcher() *StatsMatcher { - if x != nil { - return x.StatsMatcher - } - return nil -} - -func (x *StatsConfig) GetHistogramBucketSettings() []*HistogramBucketSettings { - if x != nil { - return x.HistogramBucketSettings - } - return nil -} - -// Configuration for disabling stat instantiation. -type StatsMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to StatsMatcher: - // *StatsMatcher_RejectAll - // *StatsMatcher_ExclusionList - // *StatsMatcher_InclusionList - StatsMatcher isStatsMatcher_StatsMatcher `protobuf_oneof:"stats_matcher"` -} - -func (x *StatsMatcher) Reset() { - *x = StatsMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatsMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatsMatcher) ProtoMessage() {} - -func (x *StatsMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatsMatcher.ProtoReflect.Descriptor instead. -func (*StatsMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{2} -} - -func (m *StatsMatcher) GetStatsMatcher() isStatsMatcher_StatsMatcher { - if m != nil { - return m.StatsMatcher - } - return nil -} - -func (x *StatsMatcher) GetRejectAll() bool { - if x, ok := x.GetStatsMatcher().(*StatsMatcher_RejectAll); ok { - return x.RejectAll - } - return false -} - -func (x *StatsMatcher) GetExclusionList() *v4alpha.ListStringMatcher { - if x, ok := x.GetStatsMatcher().(*StatsMatcher_ExclusionList); ok { - return x.ExclusionList - } - return nil -} - -func (x *StatsMatcher) GetInclusionList() *v4alpha.ListStringMatcher { - if x, ok := x.GetStatsMatcher().(*StatsMatcher_InclusionList); ok { - return x.InclusionList - } - return nil -} - -type isStatsMatcher_StatsMatcher interface { - isStatsMatcher_StatsMatcher() -} - -type StatsMatcher_RejectAll struct { - // If `reject_all` is true, then all stats are disabled. If `reject_all` is false, then all - // stats are enabled. - RejectAll bool `protobuf:"varint,1,opt,name=reject_all,json=rejectAll,proto3,oneof"` -} - -type StatsMatcher_ExclusionList struct { - // Exclusive match. All stats are enabled except for those matching one of the supplied - // StringMatcher protos. - ExclusionList *v4alpha.ListStringMatcher `protobuf:"bytes,2,opt,name=exclusion_list,json=exclusionList,proto3,oneof"` -} - -type StatsMatcher_InclusionList struct { - // Inclusive match. No stats are enabled except for those matching one of the supplied - // StringMatcher protos. - InclusionList *v4alpha.ListStringMatcher `protobuf:"bytes,3,opt,name=inclusion_list,json=inclusionList,proto3,oneof"` -} - -func (*StatsMatcher_RejectAll) isStatsMatcher_StatsMatcher() {} - -func (*StatsMatcher_ExclusionList) isStatsMatcher_StatsMatcher() {} - -func (*StatsMatcher_InclusionList) isStatsMatcher_StatsMatcher() {} - -// Designates a tag name and value pair. The value may be either a fixed value -// or a regex providing the value via capture groups. The specified tag will be -// unconditionally set if a fixed value, otherwise it will only be set if one -// or more capture groups in the regex match. -type TagSpecifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Attaches an identifier to the tag values to identify the tag being in the - // sink. Envoy has a set of default names and regexes to extract dynamic - // portions of existing stats, which can be found in :repo:`well_known_names.h - // ` in the Envoy repository. If a :ref:`tag_name - // ` is provided in the config and - // neither :ref:`regex ` or - // :ref:`fixed_value ` were specified, - // Envoy will attempt to find that name in its set of defaults and use the accompanying regex. - // - // .. note:: - // - // It is invalid to specify the same tag name twice in a config. - TagName string `protobuf:"bytes,1,opt,name=tag_name,json=tagName,proto3" json:"tag_name,omitempty"` - // Types that are assignable to TagValue: - // *TagSpecifier_Regex - // *TagSpecifier_FixedValue - TagValue isTagSpecifier_TagValue `protobuf_oneof:"tag_value"` -} - -func (x *TagSpecifier) Reset() { - *x = TagSpecifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TagSpecifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TagSpecifier) ProtoMessage() {} - -func (x *TagSpecifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TagSpecifier.ProtoReflect.Descriptor instead. -func (*TagSpecifier) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{3} -} - -func (x *TagSpecifier) GetTagName() string { - if x != nil { - return x.TagName - } - return "" -} - -func (m *TagSpecifier) GetTagValue() isTagSpecifier_TagValue { - if m != nil { - return m.TagValue - } - return nil -} - -func (x *TagSpecifier) GetRegex() string { - if x, ok := x.GetTagValue().(*TagSpecifier_Regex); ok { - return x.Regex - } - return "" -} - -func (x *TagSpecifier) GetFixedValue() string { - if x, ok := x.GetTagValue().(*TagSpecifier_FixedValue); ok { - return x.FixedValue - } - return "" -} - -type isTagSpecifier_TagValue interface { - isTagSpecifier_TagValue() -} - -type TagSpecifier_Regex struct { - // Designates a tag to strip from the tag extracted name and provide as a named - // tag value for all statistics. This will only occur if any part of the name - // matches the regex provided with one or more capture groups. - // - // The first capture group identifies the portion of the name to remove. The - // second capture group (which will normally be nested inside the first) will - // designate the value of the tag for the statistic. If no second capture - // group is provided, the first will also be used to set the value of the tag. - // All other capture groups will be ignored. - // - // Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and - // one tag specifier: - // - // .. code-block:: json - // - // { - // "tag_name": "envoy.cluster_name", - // "regex": "^cluster\\.((.+?)\\.)" - // } - // - // Note that the regex will remove ``foo_cluster.`` making the tag extracted - // name ``cluster.upstream_rq_timeout`` and the tag value for - // ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no - // ``.`` character because of the second capture group). - // - // Example 2. a stat name - // ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two - // tag specifiers: - // - // .. code-block:: json - // - // [ - // { - // "tag_name": "envoy.http_user_agent", - // "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" - // }, - // { - // "tag_name": "envoy.http_conn_manager_prefix", - // "regex": "^http\\.((.*?)\\.)" - // } - // ] - // - // The two regexes of the specifiers will be processed in the definition order. - // - // The first regex will remove ``ios.``, leaving the tag extracted name - // ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag - // ``envoy.http_user_agent`` will be added with tag value ``ios``. - // - // The second regex will remove ``connection_manager_1.`` from the tag - // extracted name produced by the first regex - // ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving - // ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag - // ``envoy.http_conn_manager_prefix`` will be added with the tag value - // ``connection_manager_1``. - Regex string `protobuf:"bytes,2,opt,name=regex,proto3,oneof"` -} - -type TagSpecifier_FixedValue struct { - // Specifies a fixed tag value for the ``tag_name``. - FixedValue string `protobuf:"bytes,3,opt,name=fixed_value,json=fixedValue,proto3,oneof"` -} - -func (*TagSpecifier_Regex) isTagSpecifier_TagValue() {} - -func (*TagSpecifier_FixedValue) isTagSpecifier_TagValue() {} - -// Specifies a matcher for stats and the buckets that matching stats should use. -type HistogramBucketSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The stats that this rule applies to. The match is applied to the original stat name - // before tag-extraction, for example `cluster.exampleclustername.upstream_cx_length_ms`. - Match *v4alpha.StringMatcher `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Each value is the upper bound of a bucket. Each bucket must be greater than 0 and unique. - // The order of the buckets does not matter. - Buckets []float64 `protobuf:"fixed64,2,rep,packed,name=buckets,proto3" json:"buckets,omitempty"` -} - -func (x *HistogramBucketSettings) Reset() { - *x = HistogramBucketSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HistogramBucketSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HistogramBucketSettings) ProtoMessage() {} - -func (x *HistogramBucketSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HistogramBucketSettings.ProtoReflect.Descriptor instead. -func (*HistogramBucketSettings) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{4} -} - -func (x *HistogramBucketSettings) GetMatch() *v4alpha.StringMatcher { - if x != nil { - return x.Match - } - return nil -} - -func (x *HistogramBucketSettings) GetBuckets() []float64 { - if x != nil { - return x.Buckets - } - return nil -} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.statsd* sink. This sink does not support -// tagged metrics. -// [#extension: envoy.stat_sinks.statsd] -type StatsdSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to StatsdSpecifier: - // *StatsdSink_Address - // *StatsdSink_TcpClusterName - StatsdSpecifier isStatsdSink_StatsdSpecifier `protobuf_oneof:"statsd_specifier"` - // Optional custom prefix for StatsdSink. If - // specified, this will override the default prefix. - // For example: - // - // .. code-block:: json - // - // { - // "prefix" : "envoy-prod" - // } - // - // will change emitted stats to - // - // .. code-block:: cpp - // - // envoy-prod.test_counter:1|c - // envoy-prod.test_timer:5|ms - // - // Note that the default prefix, "envoy", will be used if a prefix is not - // specified. - // - // Stats with default prefix: - // - // .. code-block:: cpp - // - // envoy.test_counter:1|c - // envoy.test_timer:5|ms - Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` -} - -func (x *StatsdSink) Reset() { - *x = StatsdSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatsdSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatsdSink) ProtoMessage() {} - -func (x *StatsdSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatsdSink.ProtoReflect.Descriptor instead. -func (*StatsdSink) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{5} -} - -func (m *StatsdSink) GetStatsdSpecifier() isStatsdSink_StatsdSpecifier { - if m != nil { - return m.StatsdSpecifier - } - return nil -} - -func (x *StatsdSink) GetAddress() *v4alpha1.Address { - if x, ok := x.GetStatsdSpecifier().(*StatsdSink_Address); ok { - return x.Address - } - return nil -} - -func (x *StatsdSink) GetTcpClusterName() string { - if x, ok := x.GetStatsdSpecifier().(*StatsdSink_TcpClusterName); ok { - return x.TcpClusterName - } - return "" -} - -func (x *StatsdSink) GetPrefix() string { - if x != nil { - return x.Prefix - } - return "" -} - -type isStatsdSink_StatsdSpecifier interface { - isStatsdSink_StatsdSpecifier() -} - -type StatsdSink_Address struct { - // The UDP address of a running `statsd `_ - // compliant listener. If specified, statistics will be flushed to this - // address. - Address *v4alpha1.Address `protobuf:"bytes,1,opt,name=address,proto3,oneof"` -} - -type StatsdSink_TcpClusterName struct { - // The name of a cluster that is running a TCP `statsd - // `_ compliant listener. If specified, - // Envoy will connect to this cluster to flush statistics. - TcpClusterName string `protobuf:"bytes,2,opt,name=tcp_cluster_name,json=tcpClusterName,proto3,oneof"` -} - -func (*StatsdSink_Address) isStatsdSink_StatsdSpecifier() {} - -func (*StatsdSink_TcpClusterName) isStatsdSink_StatsdSpecifier() {} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.dog_statsd* sink. -// The sink emits stats with `DogStatsD `_ -// compatible tags. Tags are configurable via :ref:`StatsConfig -// `. -// [#extension: envoy.stat_sinks.dog_statsd] -type DogStatsdSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to DogStatsdSpecifier: - // *DogStatsdSink_Address - DogStatsdSpecifier isDogStatsdSink_DogStatsdSpecifier `protobuf_oneof:"dog_statsd_specifier"` - // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field - // ` for more details. - Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` - // Optional max datagram size to use when sending UDP messages. By default Envoy - // will emit one metric per datagram. By specifying a max-size larger than a single - // metric, Envoy will emit multiple, new-line separated metrics. The max datagram - // size should not exceed your network's MTU. - // - // Note that this value may not be respected if smaller than a single metric. - MaxBytesPerDatagram *wrappers.UInt64Value `protobuf:"bytes,4,opt,name=max_bytes_per_datagram,json=maxBytesPerDatagram,proto3" json:"max_bytes_per_datagram,omitempty"` -} - -func (x *DogStatsdSink) Reset() { - *x = DogStatsdSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DogStatsdSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DogStatsdSink) ProtoMessage() {} - -func (x *DogStatsdSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DogStatsdSink.ProtoReflect.Descriptor instead. -func (*DogStatsdSink) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{6} -} - -func (m *DogStatsdSink) GetDogStatsdSpecifier() isDogStatsdSink_DogStatsdSpecifier { - if m != nil { - return m.DogStatsdSpecifier - } - return nil -} - -func (x *DogStatsdSink) GetAddress() *v4alpha1.Address { - if x, ok := x.GetDogStatsdSpecifier().(*DogStatsdSink_Address); ok { - return x.Address - } - return nil -} - -func (x *DogStatsdSink) GetPrefix() string { - if x != nil { - return x.Prefix - } - return "" -} - -func (x *DogStatsdSink) GetMaxBytesPerDatagram() *wrappers.UInt64Value { - if x != nil { - return x.MaxBytesPerDatagram - } - return nil -} - -type isDogStatsdSink_DogStatsdSpecifier interface { - isDogStatsdSink_DogStatsdSpecifier() -} - -type DogStatsdSink_Address struct { - // The UDP address of a running DogStatsD compliant listener. If specified, - // statistics will be flushed to this address. - Address *v4alpha1.Address `protobuf:"bytes,1,opt,name=address,proto3,oneof"` -} - -func (*DogStatsdSink_Address) isDogStatsdSink_DogStatsdSpecifier() {} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.hystrix* sink. -// The sink emits stats in `text/event-stream -// `_ -// formatted stream for use by `Hystrix dashboard -// `_. -// -// Note that only a single HystrixSink should be configured. -// -// Streaming is started through an admin endpoint :http:get:`/hystrix_event_stream`. -// [#extension: envoy.stat_sinks.hystrix] -type HystrixSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of buckets the rolling statistical window is divided into. - // - // Each time the sink is flushed, all relevant Envoy statistics are sampled and - // added to the rolling window (removing the oldest samples in the window - // in the process). The sink then outputs the aggregate statistics across the - // current rolling window to the event stream(s). - // - // rolling_window(ms) = stats_flush_interval(ms) * num_of_buckets - // - // More detailed explanation can be found in `Hystrix wiki - // `_. - NumBuckets int64 `protobuf:"varint,1,opt,name=num_buckets,json=numBuckets,proto3" json:"num_buckets,omitempty"` -} - -func (x *HystrixSink) Reset() { - *x = HystrixSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HystrixSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HystrixSink) ProtoMessage() {} - -func (x *HystrixSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HystrixSink.ProtoReflect.Descriptor instead. -func (*HystrixSink) Descriptor() ([]byte, []int) { - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP(), []int{7} -} - -func (x *HystrixSink) GetNumBuckets() int64 { - if x != nil { - return x.NumBuckets - } - return 0 -} - -var File_envoy_config_metrics_v4alpha_stats_proto protoreflect.FileDescriptor - -var file_envoy_config_metrics_v4alpha_stats_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, - 0x01, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x73, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x28, 0x9a, 0xc5, 0x88, - 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0x95, 0x03, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, 0x54, 0x61, 0x67, 0x73, 0x12, 0x4b, 0x0a, - 0x14, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x75, 0x73, 0x65, 0x41, 0x6c, 0x6c, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0d, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x71, 0x0a, 0x19, 0x68, - 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x17, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x2a, - 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa2, 0x02, 0x0a, 0x0c, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0a, 0x72, - 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x00, 0x52, 0x09, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x56, 0x0a, 0x0e, - 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x56, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x2b, 0x9a, 0xc5, - 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, - 0xa8, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, - 0x03, 0x28, 0x80, 0x08, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x21, 0x0a, - 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x0b, 0x0a, - 0x09, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x17, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x31, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x92, 0x01, 0x11, 0x08, 0x01, 0x18, 0x01, 0x22, 0x0b, - 0x12, 0x09, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xd4, 0x01, 0x0a, - 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x3e, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, - 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, - 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x17, 0x0a, 0x10, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0x94, 0x02, 0x0a, 0x0d, 0x44, 0x6f, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x3e, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x5a, 0x0a, - 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x32, 0x02, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x67, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x1b, 0x0a, 0x14, 0x64, 0x6f, 0x67, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x5a, 0x0a, 0x0b, 0x48, 0x79, - 0x73, 0x74, 0x72, 0x69, 0x78, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, - 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x6e, 0x75, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, - 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x79, 0x73, 0x74, 0x72, - 0x69, 0x78, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x42, 0x0a, 0x2a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_config_metrics_v4alpha_stats_proto_rawDescOnce sync.Once - file_envoy_config_metrics_v4alpha_stats_proto_rawDescData = file_envoy_config_metrics_v4alpha_stats_proto_rawDesc -) - -func file_envoy_config_metrics_v4alpha_stats_proto_rawDescGZIP() []byte { - file_envoy_config_metrics_v4alpha_stats_proto_rawDescOnce.Do(func() { - file_envoy_config_metrics_v4alpha_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_metrics_v4alpha_stats_proto_rawDescData) - }) - return file_envoy_config_metrics_v4alpha_stats_proto_rawDescData -} - -var file_envoy_config_metrics_v4alpha_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_envoy_config_metrics_v4alpha_stats_proto_goTypes = []interface{}{ - (*StatsSink)(nil), // 0: envoy.config.metrics.v4alpha.StatsSink - (*StatsConfig)(nil), // 1: envoy.config.metrics.v4alpha.StatsConfig - (*StatsMatcher)(nil), // 2: envoy.config.metrics.v4alpha.StatsMatcher - (*TagSpecifier)(nil), // 3: envoy.config.metrics.v4alpha.TagSpecifier - (*HistogramBucketSettings)(nil), // 4: envoy.config.metrics.v4alpha.HistogramBucketSettings - (*StatsdSink)(nil), // 5: envoy.config.metrics.v4alpha.StatsdSink - (*DogStatsdSink)(nil), // 6: envoy.config.metrics.v4alpha.DogStatsdSink - (*HystrixSink)(nil), // 7: envoy.config.metrics.v4alpha.HystrixSink - (*any.Any)(nil), // 8: google.protobuf.Any - (*wrappers.BoolValue)(nil), // 9: google.protobuf.BoolValue - (*v4alpha.ListStringMatcher)(nil), // 10: envoy.type.matcher.v4alpha.ListStringMatcher - (*v4alpha.StringMatcher)(nil), // 11: envoy.type.matcher.v4alpha.StringMatcher - (*v4alpha1.Address)(nil), // 12: envoy.config.core.v4alpha.Address - (*wrappers.UInt64Value)(nil), // 13: google.protobuf.UInt64Value -} -var file_envoy_config_metrics_v4alpha_stats_proto_depIdxs = []int32{ - 8, // 0: envoy.config.metrics.v4alpha.StatsSink.typed_config:type_name -> google.protobuf.Any - 3, // 1: envoy.config.metrics.v4alpha.StatsConfig.stats_tags:type_name -> envoy.config.metrics.v4alpha.TagSpecifier - 9, // 2: envoy.config.metrics.v4alpha.StatsConfig.use_all_default_tags:type_name -> google.protobuf.BoolValue - 2, // 3: envoy.config.metrics.v4alpha.StatsConfig.stats_matcher:type_name -> envoy.config.metrics.v4alpha.StatsMatcher - 4, // 4: envoy.config.metrics.v4alpha.StatsConfig.histogram_bucket_settings:type_name -> envoy.config.metrics.v4alpha.HistogramBucketSettings - 10, // 5: envoy.config.metrics.v4alpha.StatsMatcher.exclusion_list:type_name -> envoy.type.matcher.v4alpha.ListStringMatcher - 10, // 6: envoy.config.metrics.v4alpha.StatsMatcher.inclusion_list:type_name -> envoy.type.matcher.v4alpha.ListStringMatcher - 11, // 7: envoy.config.metrics.v4alpha.HistogramBucketSettings.match:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 12, // 8: envoy.config.metrics.v4alpha.StatsdSink.address:type_name -> envoy.config.core.v4alpha.Address - 12, // 9: envoy.config.metrics.v4alpha.DogStatsdSink.address:type_name -> envoy.config.core.v4alpha.Address - 13, // 10: envoy.config.metrics.v4alpha.DogStatsdSink.max_bytes_per_datagram:type_name -> google.protobuf.UInt64Value - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_envoy_config_metrics_v4alpha_stats_proto_init() } -func file_envoy_config_metrics_v4alpha_stats_proto_init() { - if File_envoy_config_metrics_v4alpha_stats_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatsSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatsMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TagSpecifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistogramBucketSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatsdSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DogStatsdSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HystrixSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*StatsSink_TypedConfig)(nil), - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*StatsMatcher_RejectAll)(nil), - (*StatsMatcher_ExclusionList)(nil), - (*StatsMatcher_InclusionList)(nil), - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*TagSpecifier_Regex)(nil), - (*TagSpecifier_FixedValue)(nil), - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*StatsdSink_Address)(nil), - (*StatsdSink_TcpClusterName)(nil), - } - file_envoy_config_metrics_v4alpha_stats_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*DogStatsdSink_Address)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_metrics_v4alpha_stats_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_metrics_v4alpha_stats_proto_goTypes, - DependencyIndexes: file_envoy_config_metrics_v4alpha_stats_proto_depIdxs, - MessageInfos: file_envoy_config_metrics_v4alpha_stats_proto_msgTypes, - }.Build() - File_envoy_config_metrics_v4alpha_stats_proto = out.File - file_envoy_config_metrics_v4alpha_stats_proto_rawDesc = nil - file_envoy_config_metrics_v4alpha_stats_proto_goTypes = nil - file_envoy_config_metrics_v4alpha_stats_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/metrics/v4alpha/stats.pb.validate.go b/pkg/api/envoy/config/metrics/v4alpha/stats.pb.validate.go deleted file mode 100644 index 901d12b8a6..0000000000 --- a/pkg/api/envoy/config/metrics/v4alpha/stats.pb.validate.go +++ /dev/null @@ -1,788 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/metrics/v4alpha/stats.proto - -package envoy_config_metrics_v4alpha - -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{} -) - -// Validate checks the field values on StatsSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *StatsSink) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - switch m.ConfigType.(type) { - - case *StatsSink_TypedConfig: - - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsSinkValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// StatsSinkValidationError is the validation error returned by -// StatsSink.Validate if the designated constraints aren't met. -type StatsSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatsSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatsSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatsSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatsSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatsSinkValidationError) ErrorName() string { return "StatsSinkValidationError" } - -// Error satisfies the builtin error interface -func (e StatsSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatsSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatsSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatsSinkValidationError{} - -// Validate checks the field values on StatsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *StatsConfig) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetStatsTags() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsConfigValidationError{ - field: fmt.Sprintf("StatsTags[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetUseAllDefaultTags()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsConfigValidationError{ - field: "UseAllDefaultTags", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetStatsMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsConfigValidationError{ - field: "StatsMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHistogramBucketSettings() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsConfigValidationError{ - field: fmt.Sprintf("HistogramBucketSettings[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// StatsConfigValidationError is the validation error returned by -// StatsConfig.Validate if the designated constraints aren't met. -type StatsConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatsConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatsConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatsConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatsConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatsConfigValidationError) ErrorName() string { return "StatsConfigValidationError" } - -// Error satisfies the builtin error interface -func (e StatsConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatsConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatsConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatsConfigValidationError{} - -// Validate checks the field values on StatsMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *StatsMatcher) Validate() error { - if m == nil { - return nil - } - - switch m.StatsMatcher.(type) { - - case *StatsMatcher_RejectAll: - // no validation rules for RejectAll - - case *StatsMatcher_ExclusionList: - - if v, ok := interface{}(m.GetExclusionList()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsMatcherValidationError{ - field: "ExclusionList", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *StatsMatcher_InclusionList: - - if v, ok := interface{}(m.GetInclusionList()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsMatcherValidationError{ - field: "InclusionList", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return StatsMatcherValidationError{ - field: "StatsMatcher", - reason: "value is required", - } - - } - - return nil -} - -// StatsMatcherValidationError is the validation error returned by -// StatsMatcher.Validate if the designated constraints aren't met. -type StatsMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatsMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatsMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatsMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatsMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatsMatcherValidationError) ErrorName() string { return "StatsMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e StatsMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatsMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatsMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatsMatcherValidationError{} - -// Validate checks the field values on TagSpecifier with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *TagSpecifier) Validate() error { - if m == nil { - return nil - } - - // no validation rules for TagName - - switch m.TagValue.(type) { - - case *TagSpecifier_Regex: - - if len(m.GetRegex()) > 1024 { - return TagSpecifierValidationError{ - field: "Regex", - reason: "value length must be at most 1024 bytes", - } - } - - case *TagSpecifier_FixedValue: - // no validation rules for FixedValue - - } - - return nil -} - -// TagSpecifierValidationError is the validation error returned by -// TagSpecifier.Validate if the designated constraints aren't met. -type TagSpecifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TagSpecifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TagSpecifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TagSpecifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TagSpecifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TagSpecifierValidationError) ErrorName() string { return "TagSpecifierValidationError" } - -// Error satisfies the builtin error interface -func (e TagSpecifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTagSpecifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TagSpecifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TagSpecifierValidationError{} - -// Validate checks the field values on HistogramBucketSettings with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HistogramBucketSettings) Validate() error { - if m == nil { - return nil - } - - if m.GetMatch() == nil { - return HistogramBucketSettingsValidationError{ - field: "Match", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HistogramBucketSettingsValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetBuckets()) < 1 { - return HistogramBucketSettingsValidationError{ - field: "Buckets", - reason: "value must contain at least 1 item(s)", - } - } - - _HistogramBucketSettings_Buckets_Unique := make(map[float64]struct{}, len(m.GetBuckets())) - - for idx, item := range m.GetBuckets() { - _, _ = idx, item - - if _, exists := _HistogramBucketSettings_Buckets_Unique[item]; exists { - return HistogramBucketSettingsValidationError{ - field: fmt.Sprintf("Buckets[%v]", idx), - reason: "repeated value must contain unique items", - } - } else { - _HistogramBucketSettings_Buckets_Unique[item] = struct{}{} - } - - if item <= 0 { - return HistogramBucketSettingsValidationError{ - field: fmt.Sprintf("Buckets[%v]", idx), - reason: "value must be greater than 0", - } - } - - } - - return nil -} - -// HistogramBucketSettingsValidationError is the validation error returned by -// HistogramBucketSettings.Validate if the designated constraints aren't met. -type HistogramBucketSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HistogramBucketSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HistogramBucketSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HistogramBucketSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HistogramBucketSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HistogramBucketSettingsValidationError) ErrorName() string { - return "HistogramBucketSettingsValidationError" -} - -// Error satisfies the builtin error interface -func (e HistogramBucketSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHistogramBucketSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HistogramBucketSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HistogramBucketSettingsValidationError{} - -// Validate checks the field values on StatsdSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *StatsdSink) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Prefix - - switch m.StatsdSpecifier.(type) { - - case *StatsdSink_Address: - - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatsdSinkValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *StatsdSink_TcpClusterName: - // no validation rules for TcpClusterName - - default: - return StatsdSinkValidationError{ - field: "StatsdSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// StatsdSinkValidationError is the validation error returned by -// StatsdSink.Validate if the designated constraints aren't met. -type StatsdSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatsdSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatsdSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatsdSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatsdSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatsdSinkValidationError) ErrorName() string { return "StatsdSinkValidationError" } - -// Error satisfies the builtin error interface -func (e StatsdSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatsdSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatsdSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatsdSinkValidationError{} - -// Validate checks the field values on DogStatsdSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *DogStatsdSink) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Prefix - - if wrapper := m.GetMaxBytesPerDatagram(); wrapper != nil { - - if wrapper.GetValue() <= 0 { - return DogStatsdSinkValidationError{ - field: "MaxBytesPerDatagram", - reason: "value must be greater than 0", - } - } - - } - - switch m.DogStatsdSpecifier.(type) { - - case *DogStatsdSink_Address: - - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DogStatsdSinkValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return DogStatsdSinkValidationError{ - field: "DogStatsdSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// DogStatsdSinkValidationError is the validation error returned by -// DogStatsdSink.Validate if the designated constraints aren't met. -type DogStatsdSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DogStatsdSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DogStatsdSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DogStatsdSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DogStatsdSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DogStatsdSinkValidationError) ErrorName() string { return "DogStatsdSinkValidationError" } - -// Error satisfies the builtin error interface -func (e DogStatsdSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDogStatsdSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DogStatsdSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DogStatsdSinkValidationError{} - -// Validate checks the field values on HystrixSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HystrixSink) Validate() error { - if m == nil { - return nil - } - - // no validation rules for NumBuckets - - return nil -} - -// HystrixSinkValidationError is the validation error returned by -// HystrixSink.Validate if the designated constraints aren't met. -type HystrixSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HystrixSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HystrixSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HystrixSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HystrixSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HystrixSinkValidationError) ErrorName() string { return "HystrixSinkValidationError" } - -// Error satisfies the builtin error interface -func (e HystrixSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHystrixSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HystrixSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HystrixSinkValidationError{} diff --git a/pkg/api/envoy/config/overload/v2alpha/overload.pb.go b/pkg/api/envoy/config/overload/v2alpha/overload.pb.go index 6cca81ed7e..64282c3bd4 100644 --- a/pkg/api/envoy/config/overload/v2alpha/overload.pb.go +++ b/pkg/api/envoy/config/overload/v2alpha/overload.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/overload/v2alpha/overload.proto -package envoy_config_overload_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "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" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ResourceMonitor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -445,12 +440,17 @@ var file_envoy_config_overload_v2alpha_overload_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x46, 0x0a, 0x2b, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, - 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x4f, 0x76, 0x65, 0x72, 0x6c, - 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x8c, 0x01, 0x0a, 0x2b, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, + 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x4f, 0x76, 0x65, 0x72, + 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/overload/v2alpha/overload.pb.validate.go b/pkg/api/envoy/config/overload/v2alpha/overload.pb.validate.go index e8dc0e7cc0..6ebe0d71e3 100644 --- a/pkg/api/envoy/config/overload/v2alpha/overload.pb.validate.go +++ b/pkg/api/envoy/config/overload/v2alpha/overload.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/overload/v2alpha/overload.proto -package envoy_config_overload_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ResourceMonitor with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ResourceMonitor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResourceMonitor with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResourceMonitorMultiError, or nil if none found. +func (m *ResourceMonitor) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceMonitor) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return ResourceMonitorValidationError{ + err := ResourceMonitorValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *ResourceMonitor_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceMonitorValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceMonitorValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResourceMonitorValidationError{ field: "Config", @@ -64,7 +103,26 @@ func (m *ResourceMonitor) Validate() error { case *ResourceMonitor_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceMonitorValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceMonitorValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResourceMonitorValidationError{ field: "TypedConfig", @@ -76,9 +134,30 @@ func (m *ResourceMonitor) Validate() error { } + if len(errors) > 0 { + return ResourceMonitorMultiError(errors) + } + return nil } +// ResourceMonitorMultiError is an error wrapping multiple validation errors +// returned by ResourceMonitor.ValidateAll() if the designated constraints +// aren't met. +type ResourceMonitorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceMonitorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceMonitorMultiError) AllErrors() []error { return m } + // ResourceMonitorValidationError is the validation error returned by // ResourceMonitor.Validate if the designated constraints aren't met. type ResourceMonitorValidationError struct { @@ -134,23 +213,62 @@ var _ interface { } = ResourceMonitorValidationError{} // Validate checks the field values on ThresholdTrigger with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ThresholdTrigger) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThresholdTrigger with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ThresholdTriggerMultiError, or nil if none found. +func (m *ThresholdTrigger) ValidateAll() error { + return m.validate(true) +} + +func (m *ThresholdTrigger) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetValue(); val < 0 || val > 1 { - return ThresholdTriggerValidationError{ + err := ThresholdTriggerValidationError{ field: "Value", reason: "value must be inside range [0, 1]", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ThresholdTriggerMultiError(errors) } return nil } +// ThresholdTriggerMultiError is an error wrapping multiple validation errors +// returned by ThresholdTrigger.ValidateAll() if the designated constraints +// aren't met. +type ThresholdTriggerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThresholdTriggerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThresholdTriggerMultiError) AllErrors() []error { return m } + // ThresholdTriggerValidationError is the validation error returned by // ThresholdTrigger.Validate if the designated constraints aren't met. type ThresholdTriggerValidationError struct { @@ -206,24 +324,61 @@ var _ interface { } = ThresholdTriggerValidationError{} // Validate checks the field values on Trigger with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Trigger) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Trigger with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TriggerMultiError, or nil if none found. +func (m *Trigger) ValidateAll() error { + return m.validate(true) +} + +func (m *Trigger) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return TriggerValidationError{ + err := TriggerValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.TriggerOneof.(type) { case *Trigger_Threshold: - if v, ok := interface{}(m.GetThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TriggerValidationError{ + field: "Threshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TriggerValidationError{ + field: "Threshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TriggerValidationError{ field: "Threshold", @@ -234,16 +389,40 @@ func (m *Trigger) Validate() error { } default: - return TriggerValidationError{ + err := TriggerValidationError{ field: "TriggerOneof", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return TriggerMultiError(errors) + } + return nil } +// TriggerMultiError is an error wrapping multiple validation errors returned +// by Trigger.ValidateAll() if the designated constraints aren't met. +type TriggerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TriggerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TriggerMultiError) AllErrors() []error { return m } + // TriggerValidationError is the validation error returned by Trigger.Validate // if the designated constraints aren't met. type TriggerValidationError struct { @@ -299,31 +478,72 @@ var _ interface { } = TriggerValidationError{} // Validate checks the field values on OverloadAction with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OverloadAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OverloadAction with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OverloadActionMultiError, +// or nil if none found. +func (m *OverloadAction) ValidateAll() error { + return m.validate(true) +} + +func (m *OverloadAction) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return OverloadActionValidationError{ + err := OverloadActionValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetTriggers()) < 1 { - return OverloadActionValidationError{ + err := OverloadActionValidationError{ field: "Triggers", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetTriggers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadActionValidationError{ + field: fmt.Sprintf("Triggers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadActionValidationError{ + field: fmt.Sprintf("Triggers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadActionValidationError{ field: fmt.Sprintf("Triggers[%v]", idx), @@ -335,9 +555,30 @@ func (m *OverloadAction) Validate() error { } + if len(errors) > 0 { + return OverloadActionMultiError(errors) + } + return nil } +// OverloadActionMultiError is an error wrapping multiple validation errors +// returned by OverloadAction.ValidateAll() if the designated constraints +// aren't met. +type OverloadActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OverloadActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OverloadActionMultiError) AllErrors() []error { return m } + // OverloadActionValidationError is the validation error returned by // OverloadAction.Validate if the designated constraints aren't met. type OverloadActionValidationError struct { @@ -393,14 +634,47 @@ var _ interface { } = OverloadActionValidationError{} // Validate checks the field values on OverloadManager with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *OverloadManager) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OverloadManager with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OverloadManagerMultiError, or nil if none found. +func (m *OverloadManager) ValidateAll() error { + return m.validate(true) +} + +func (m *OverloadManager) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRefreshInterval()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRefreshInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: "RefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: "RefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRefreshInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadManagerValidationError{ field: "RefreshInterval", @@ -411,16 +685,39 @@ func (m *OverloadManager) Validate() error { } if len(m.GetResourceMonitors()) < 1 { - return OverloadManagerValidationError{ + err := OverloadManagerValidationError{ field: "ResourceMonitors", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResourceMonitors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("ResourceMonitors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("ResourceMonitors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadManagerValidationError{ field: fmt.Sprintf("ResourceMonitors[%v]", idx), @@ -435,7 +732,26 @@ func (m *OverloadManager) Validate() error { for idx, item := range m.GetActions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadManagerValidationError{ field: fmt.Sprintf("Actions[%v]", idx), @@ -447,9 +763,30 @@ func (m *OverloadManager) Validate() error { } + if len(errors) > 0 { + return OverloadManagerMultiError(errors) + } + return nil } +// OverloadManagerMultiError is an error wrapping multiple validation errors +// returned by OverloadManager.ValidateAll() if the designated constraints +// aren't met. +type OverloadManagerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OverloadManagerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OverloadManagerMultiError) AllErrors() []error { return m } + // OverloadManagerValidationError is the validation error returned by // OverloadManager.Validate if the designated constraints aren't met. type OverloadManagerValidationError struct { diff --git a/pkg/api/envoy/config/overload/v3/overload.pb.go b/pkg/api/envoy/config/overload/v3/overload.pb.go index 11acd929b1..729ed4b93c 100644 --- a/pkg/api/envoy/config/overload/v3/overload.pb.go +++ b/pkg/api/envoy/config/overload/v3/overload.pb.go @@ -1,19 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/overload/v3/overload.proto -package envoy_config_overload_v3 +package overloadv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -27,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ScaleTimersOverloadActionConfig_TimerType int32 const ( @@ -45,6 +39,11 @@ const ( // :ref:`HttpConnectionManager.stream_idle_timeout // ` ScaleTimersOverloadActionConfig_HTTP_DOWNSTREAM_STREAM_IDLE ScaleTimersOverloadActionConfig_TimerType = 2 + // Adjusts the timer for how long downstream clients have to finish transport-level negotiations + // before the connection is closed. + // This affects the value of + // :ref:`FilterChain.transport_socket_connect_timeout `. + ScaleTimersOverloadActionConfig_TRANSPORT_SOCKET_CONNECT ScaleTimersOverloadActionConfig_TimerType = 3 ) // Enum value maps for ScaleTimersOverloadActionConfig_TimerType. @@ -53,11 +52,13 @@ var ( 0: "UNSPECIFIED", 1: "HTTP_DOWNSTREAM_CONNECTION_IDLE", 2: "HTTP_DOWNSTREAM_STREAM_IDLE", + 3: "TRANSPORT_SOCKET_CONNECT", } ScaleTimersOverloadActionConfig_TimerType_value = map[string]int32{ "UNSPECIFIED": 0, "HTTP_DOWNSTREAM_CONNECTION_IDLE": 1, "HTTP_DOWNSTREAM_STREAM_IDLE": 2, + "TRANSPORT_SOCKET_CONNECT": 3, } ) @@ -94,18 +95,14 @@ type ResourceMonitor struct { unknownFields protoimpl.UnknownFields // The name of the resource monitor to instantiate. Must match a registered - // resource monitor type. The built-in resource monitors are: - // - // * :ref:`envoy.resource_monitors.fixed_heap - // ` - // * :ref:`envoy.resource_monitors.injected_resource - // ` + // resource monitor type. + // See the :ref:`extensions listed in typed_config below ` for the default list of available resource monitor. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Configuration for the resource monitor being instantiated. + // [#extension-category: envoy.resource_monitors] // // Types that are assignable to ConfigType: // *ResourceMonitor_TypedConfig - // *ResourceMonitor_HiddenEnvoyDeprecatedConfig ConfigType isResourceMonitor_ConfigType `protobuf_oneof:"config_type"` } @@ -162,14 +159,6 @@ func (x *ResourceMonitor) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *ResourceMonitor) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*ResourceMonitor_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isResourceMonitor_ConfigType interface { isResourceMonitor_ConfigType() } @@ -178,15 +167,8 @@ type ResourceMonitor_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type ResourceMonitor_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*ResourceMonitor_TypedConfig) isResourceMonitor_ConfigType() {} -func (*ResourceMonitor_HiddenEnvoyDeprecatedConfig) isResourceMonitor_ConfigType() {} - type ThresholdTrigger struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -505,6 +487,69 @@ func (x *OverloadAction) GetTypedConfig() *any.Any { return nil } +// Configuration for which accounts the WatermarkBuffer Factories should +// track. +type BufferFactoryConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum power of two at which Envoy starts tracking an account. + // + // Envoy has 8 power of two buckets starting with the provided exponent below. + // Concretely the 1st bucket contains accounts for streams that use + // [2^minimum_account_to_track_power_of_two, + // 2^(minimum_account_to_track_power_of_two + 1)) bytes. + // With the 8th bucket tracking accounts + // >= 128 * 2^minimum_account_to_track_power_of_two. + // + // The maximum value is 56, since we're using uint64_t for bytes counting, + // and that's the last value that would use the 8 buckets. In practice, + // we don't expect the proxy to be holding 2^56 bytes. + // + // If omitted, Envoy should not do any tracking. + MinimumAccountToTrackPowerOfTwo uint32 `protobuf:"varint,1,opt,name=minimum_account_to_track_power_of_two,json=minimumAccountToTrackPowerOfTwo,proto3" json:"minimum_account_to_track_power_of_two,omitempty"` +} + +func (x *BufferFactoryConfig) Reset() { + *x = BufferFactoryConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferFactoryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferFactoryConfig) ProtoMessage() {} + +func (x *BufferFactoryConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferFactoryConfig.ProtoReflect.Descriptor instead. +func (*BufferFactoryConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_overload_v3_overload_proto_rawDescGZIP(), []int{6} +} + +func (x *BufferFactoryConfig) GetMinimumAccountToTrackPowerOfTwo() uint32 { + if x != nil { + return x.MinimumAccountToTrackPowerOfTwo + } + return 0 +} + type OverloadManager struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -516,12 +561,14 @@ type OverloadManager struct { ResourceMonitors []*ResourceMonitor `protobuf:"bytes,2,rep,name=resource_monitors,json=resourceMonitors,proto3" json:"resource_monitors,omitempty"` // The set of overload actions. Actions []*OverloadAction `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` + // Configuration for buffer factory. + BufferFactoryConfig *BufferFactoryConfig `protobuf:"bytes,4,opt,name=buffer_factory_config,json=bufferFactoryConfig,proto3" json:"buffer_factory_config,omitempty"` } func (x *OverloadManager) Reset() { *x = OverloadManager{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[6] + mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -534,7 +581,7 @@ func (x *OverloadManager) String() string { func (*OverloadManager) ProtoMessage() {} func (x *OverloadManager) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[6] + mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -547,7 +594,7 @@ func (x *OverloadManager) ProtoReflect() protoreflect.Message { // Deprecated: Use OverloadManager.ProtoReflect.Descriptor instead. func (*OverloadManager) Descriptor() ([]byte, []int) { - return file_envoy_config_overload_v3_overload_proto_rawDescGZIP(), []int{6} + return file_envoy_config_overload_v3_overload_proto_rawDescGZIP(), []int{7} } func (x *OverloadManager) GetRefreshInterval() *duration.Duration { @@ -571,6 +618,13 @@ func (x *OverloadManager) GetActions() []*OverloadAction { return nil } +func (x *OverloadManager) GetBufferFactoryConfig() *BufferFactoryConfig { + if x != nil { + return x.BufferFactoryConfig + } + return nil +} + type ScaleTimersOverloadActionConfig_ScaleTimer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -587,7 +641,7 @@ type ScaleTimersOverloadActionConfig_ScaleTimer struct { func (x *ScaleTimersOverloadActionConfig_ScaleTimer) Reset() { *x = ScaleTimersOverloadActionConfig_ScaleTimer{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[7] + mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -600,7 +654,7 @@ func (x *ScaleTimersOverloadActionConfig_ScaleTimer) String() string { func (*ScaleTimersOverloadActionConfig_ScaleTimer) ProtoMessage() {} func (x *ScaleTimersOverloadActionConfig_ScaleTimer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[7] + mi := &file_envoy_config_overload_v3_overload_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -676,137 +730,150 @@ var file_envoy_config_overload_v3_overload_proto_rawDesc = []byte{ 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, - 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, - 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x78, 0x0a, 0x10, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x2d, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, - 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x35, 0x9a, 0xc5, - 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x0d, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x11, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, - 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, - 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x10, 0x73, 0x63, 0x61, 0x6c, 0x69, - 0x6e, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4a, 0x0a, 0x14, 0x73, - 0x61, 0x74, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, - 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x52, 0x13, 0x73, 0x61, 0x74, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xf9, 0x01, 0x0a, 0x07, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x4a, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x41, 0x0a, 0x06, - 0x73, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, - 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x3a, - 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x14, 0x0a, - 0x0d, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0x88, 0x04, 0x0a, 0x1f, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x72, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7e, 0x0a, 0x13, 0x74, 0x69, 0x6d, 0x65, 0x72, - 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, - 0x53, 0x63, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x6c, - 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x53, 0x63, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x53, 0x63, 0x61, 0x6c, 0x65, - 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x80, 0x02, 0x0a, 0x0a, 0x53, 0x63, 0x61, 0x6c, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x4f, 0x76, 0x65, 0x72, - 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, - 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x3c, 0x0a, - 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x0a, 0x6d, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x6d, - 0x69, 0x6e, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x53, 0x63, 0x61, - 0x6c, 0x65, 0x42, 0x16, 0x0a, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, - 0x64, 0x6a, 0x75, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x62, 0x0a, 0x09, 0x54, 0x69, - 0x6d, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x48, 0x54, 0x54, 0x50, - 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, - 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, - 0x1b, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, - 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x02, 0x22, 0xe4, - 0x01, 0x0a, 0x0e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, - 0x0a, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x74, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb3, 0x02, 0x0a, 0x0f, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, - 0x61, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x10, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x60, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, - 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, - 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0x42, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x76, - 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, + 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x78, 0x0a, 0x10, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, + 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, + 0xa1, 0x01, 0x0a, 0x0d, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x12, 0x44, 0x0a, 0x11, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, + 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x10, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4a, 0x0a, 0x14, 0x73, 0x61, 0x74, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x13, + 0x73, 0x61, 0x74, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x22, 0xf9, 0x01, 0x0a, 0x07, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x09, + 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, + 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x63, 0x61, 0x6c, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x64, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, + 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, + 0xa7, 0x04, 0x0a, 0x1f, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x4f, + 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x7e, 0x0a, 0x13, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x61, + 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x61, 0x6c, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x63, 0x61, 0x6c, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x1a, 0x80, 0x02, 0x0a, 0x0a, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x72, 0x12, 0x65, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x61, + 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, + 0x20, 0x00, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x69, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x73, + 0x63, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x42, 0x16, + 0x0a, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, + 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x80, 0x01, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x44, 0x4f, + 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x48, 0x54, + 0x54, 0x50, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x53, 0x54, + 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x53, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x03, 0x22, 0xe4, 0x01, 0x0a, 0x0e, 0x4f, 0x76, + 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x08, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x9a, 0xc5, 0x88, + 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x70, 0x0a, 0x13, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x25, 0x6d, 0x69, 0x6e, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x74, 0x72, + 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x77, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x38, 0x28, + 0x0a, 0x52, 0x1f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4f, 0x66, 0x54, + 0x77, 0x6f, 0x22, 0x96, 0x03, 0x0a, 0x0f, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x60, 0x0a, 0x11, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, + 0x6f, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x10, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x42, + 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, + 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, + 0x6f, 0x61, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x61, 0x0a, 0x15, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x13, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x76, 0x65, 0x72, - 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x42, 0x41, 0x0a, 0x26, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, - 0x61, 0x64, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x42, 0x8d, 0x01, 0x0a, 0x26, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x76, 0x65, + 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, + 0x64, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -822,7 +889,7 @@ func file_envoy_config_overload_v3_overload_proto_rawDescGZIP() []byte { } var file_envoy_config_overload_v3_overload_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_overload_v3_overload_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_envoy_config_overload_v3_overload_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_envoy_config_overload_v3_overload_proto_goTypes = []interface{}{ (ScaleTimersOverloadActionConfig_TimerType)(0), // 0: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.TimerType (*ResourceMonitor)(nil), // 1: envoy.config.overload.v3.ResourceMonitor @@ -831,24 +898,24 @@ var file_envoy_config_overload_v3_overload_proto_goTypes = []interface{}{ (*Trigger)(nil), // 4: envoy.config.overload.v3.Trigger (*ScaleTimersOverloadActionConfig)(nil), // 5: envoy.config.overload.v3.ScaleTimersOverloadActionConfig (*OverloadAction)(nil), // 6: envoy.config.overload.v3.OverloadAction - (*OverloadManager)(nil), // 7: envoy.config.overload.v3.OverloadManager - (*ScaleTimersOverloadActionConfig_ScaleTimer)(nil), // 8: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer - (*any.Any)(nil), // 9: google.protobuf.Any - (*_struct.Struct)(nil), // 10: google.protobuf.Struct + (*BufferFactoryConfig)(nil), // 7: envoy.config.overload.v3.BufferFactoryConfig + (*OverloadManager)(nil), // 8: envoy.config.overload.v3.OverloadManager + (*ScaleTimersOverloadActionConfig_ScaleTimer)(nil), // 9: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer + (*any.Any)(nil), // 10: google.protobuf.Any (*duration.Duration)(nil), // 11: google.protobuf.Duration (*v3.Percent)(nil), // 12: envoy.type.v3.Percent } var file_envoy_config_overload_v3_overload_proto_depIdxs = []int32{ - 9, // 0: envoy.config.overload.v3.ResourceMonitor.typed_config:type_name -> google.protobuf.Any - 10, // 1: envoy.config.overload.v3.ResourceMonitor.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 2, // 2: envoy.config.overload.v3.Trigger.threshold:type_name -> envoy.config.overload.v3.ThresholdTrigger - 3, // 3: envoy.config.overload.v3.Trigger.scaled:type_name -> envoy.config.overload.v3.ScaledTrigger - 8, // 4: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.timer_scale_factors:type_name -> envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer - 4, // 5: envoy.config.overload.v3.OverloadAction.triggers:type_name -> envoy.config.overload.v3.Trigger - 9, // 6: envoy.config.overload.v3.OverloadAction.typed_config:type_name -> google.protobuf.Any - 11, // 7: envoy.config.overload.v3.OverloadManager.refresh_interval:type_name -> google.protobuf.Duration - 1, // 8: envoy.config.overload.v3.OverloadManager.resource_monitors:type_name -> envoy.config.overload.v3.ResourceMonitor - 6, // 9: envoy.config.overload.v3.OverloadManager.actions:type_name -> envoy.config.overload.v3.OverloadAction + 10, // 0: envoy.config.overload.v3.ResourceMonitor.typed_config:type_name -> google.protobuf.Any + 2, // 1: envoy.config.overload.v3.Trigger.threshold:type_name -> envoy.config.overload.v3.ThresholdTrigger + 3, // 2: envoy.config.overload.v3.Trigger.scaled:type_name -> envoy.config.overload.v3.ScaledTrigger + 9, // 3: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.timer_scale_factors:type_name -> envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer + 4, // 4: envoy.config.overload.v3.OverloadAction.triggers:type_name -> envoy.config.overload.v3.Trigger + 10, // 5: envoy.config.overload.v3.OverloadAction.typed_config:type_name -> google.protobuf.Any + 11, // 6: envoy.config.overload.v3.OverloadManager.refresh_interval:type_name -> google.protobuf.Duration + 1, // 7: envoy.config.overload.v3.OverloadManager.resource_monitors:type_name -> envoy.config.overload.v3.ResourceMonitor + 6, // 8: envoy.config.overload.v3.OverloadManager.actions:type_name -> envoy.config.overload.v3.OverloadAction + 7, // 9: envoy.config.overload.v3.OverloadManager.buffer_factory_config:type_name -> envoy.config.overload.v3.BufferFactoryConfig 0, // 10: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer.timer:type_name -> envoy.config.overload.v3.ScaleTimersOverloadActionConfig.TimerType 11, // 11: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer.min_timeout:type_name -> google.protobuf.Duration 12, // 12: envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer.min_scale:type_name -> envoy.type.v3.Percent @@ -938,7 +1005,7 @@ func file_envoy_config_overload_v3_overload_proto_init() { } } file_envoy_config_overload_v3_overload_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OverloadManager); i { + switch v := v.(*BufferFactoryConfig); i { case 0: return &v.state case 1: @@ -950,6 +1017,18 @@ func file_envoy_config_overload_v3_overload_proto_init() { } } file_envoy_config_overload_v3_overload_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OverloadManager); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_overload_v3_overload_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ScaleTimersOverloadActionConfig_ScaleTimer); i { case 0: return &v.state @@ -964,13 +1043,12 @@ func file_envoy_config_overload_v3_overload_proto_init() { } file_envoy_config_overload_v3_overload_proto_msgTypes[0].OneofWrappers = []interface{}{ (*ResourceMonitor_TypedConfig)(nil), - (*ResourceMonitor_HiddenEnvoyDeprecatedConfig)(nil), } file_envoy_config_overload_v3_overload_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Trigger_Threshold)(nil), (*Trigger_Scaled)(nil), } - file_envoy_config_overload_v3_overload_proto_msgTypes[7].OneofWrappers = []interface{}{ + file_envoy_config_overload_v3_overload_proto_msgTypes[8].OneofWrappers = []interface{}{ (*ScaleTimersOverloadActionConfig_ScaleTimer_MinTimeout)(nil), (*ScaleTimersOverloadActionConfig_ScaleTimer_MinScale)(nil), } @@ -980,7 +1058,7 @@ func file_envoy_config_overload_v3_overload_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_overload_v3_overload_proto_rawDesc, NumEnums: 1, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/overload/v3/overload.pb.validate.go b/pkg/api/envoy/config/overload/v3/overload.pb.validate.go index f9d62d2941..c351a2ae08 100644 --- a/pkg/api/envoy/config/overload/v3/overload.pb.validate.go +++ b/pkg/api/envoy/config/overload/v3/overload.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/overload/v3/overload.proto -package envoy_config_overload_v3 +package overloadv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,44 +31,70 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ResourceMonitor with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ResourceMonitor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResourceMonitor with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResourceMonitorMultiError, or nil if none found. +func (m *ResourceMonitor) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceMonitor) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return ResourceMonitorValidationError{ + err := ResourceMonitorValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *ResourceMonitor_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceMonitorValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceMonitorValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceMonitorValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *ResourceMonitor_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResourceMonitorValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -76,9 +103,30 @@ func (m *ResourceMonitor) Validate() error { } + if len(errors) > 0 { + return ResourceMonitorMultiError(errors) + } + return nil } +// ResourceMonitorMultiError is an error wrapping multiple validation errors +// returned by ResourceMonitor.ValidateAll() if the designated constraints +// aren't met. +type ResourceMonitorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceMonitorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceMonitorMultiError) AllErrors() []error { return m } + // ResourceMonitorValidationError is the validation error returned by // ResourceMonitor.Validate if the designated constraints aren't met. type ResourceMonitorValidationError struct { @@ -134,23 +182,62 @@ var _ interface { } = ResourceMonitorValidationError{} // Validate checks the field values on ThresholdTrigger with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ThresholdTrigger) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThresholdTrigger with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ThresholdTriggerMultiError, or nil if none found. +func (m *ThresholdTrigger) ValidateAll() error { + return m.validate(true) +} + +func (m *ThresholdTrigger) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetValue(); val < 0 || val > 1 { - return ThresholdTriggerValidationError{ + err := ThresholdTriggerValidationError{ field: "Value", reason: "value must be inside range [0, 1]", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ThresholdTriggerMultiError(errors) } return nil } +// ThresholdTriggerMultiError is an error wrapping multiple validation errors +// returned by ThresholdTrigger.ValidateAll() if the designated constraints +// aren't met. +type ThresholdTriggerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThresholdTriggerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThresholdTriggerMultiError) AllErrors() []error { return m } + // ThresholdTriggerValidationError is the validation error returned by // ThresholdTrigger.Validate if the designated constraints aren't met. type ThresholdTriggerValidationError struct { @@ -206,30 +293,73 @@ var _ interface { } = ThresholdTriggerValidationError{} // Validate checks the field values on ScaledTrigger with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScaledTrigger) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScaledTrigger with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ScaledTriggerMultiError, or +// nil if none found. +func (m *ScaledTrigger) ValidateAll() error { + return m.validate(true) +} + +func (m *ScaledTrigger) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetScalingThreshold(); val < 0 || val > 1 { - return ScaledTriggerValidationError{ + err := ScaledTriggerValidationError{ field: "ScalingThreshold", reason: "value must be inside range [0, 1]", } + if !all { + return err + } + errors = append(errors, err) } if val := m.GetSaturationThreshold(); val < 0 || val > 1 { - return ScaledTriggerValidationError{ + err := ScaledTriggerValidationError{ field: "SaturationThreshold", reason: "value must be inside range [0, 1]", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ScaledTriggerMultiError(errors) } return nil } +// ScaledTriggerMultiError is an error wrapping multiple validation errors +// returned by ScaledTrigger.ValidateAll() if the designated constraints +// aren't met. +type ScaledTriggerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScaledTriggerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScaledTriggerMultiError) AllErrors() []error { return m } + // ScaledTriggerValidationError is the validation error returned by // ScaledTrigger.Validate if the designated constraints aren't met. type ScaledTriggerValidationError struct { @@ -285,24 +415,61 @@ var _ interface { } = ScaledTriggerValidationError{} // Validate checks the field values on Trigger with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Trigger) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Trigger with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TriggerMultiError, or nil if none found. +func (m *Trigger) ValidateAll() error { + return m.validate(true) +} + +func (m *Trigger) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return TriggerValidationError{ + err := TriggerValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.TriggerOneof.(type) { case *Trigger_Threshold: - if v, ok := interface{}(m.GetThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TriggerValidationError{ + field: "Threshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TriggerValidationError{ + field: "Threshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TriggerValidationError{ field: "Threshold", @@ -314,7 +481,26 @@ func (m *Trigger) Validate() error { case *Trigger_Scaled: - if v, ok := interface{}(m.GetScaled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScaled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TriggerValidationError{ + field: "Scaled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TriggerValidationError{ + field: "Scaled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScaled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TriggerValidationError{ field: "Scaled", @@ -325,16 +511,40 @@ func (m *Trigger) Validate() error { } default: - return TriggerValidationError{ + err := TriggerValidationError{ field: "TriggerOneof", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return TriggerMultiError(errors) } return nil } +// TriggerMultiError is an error wrapping multiple validation errors returned +// by Trigger.ValidateAll() if the designated constraints aren't met. +type TriggerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TriggerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TriggerMultiError) AllErrors() []error { return m } + // TriggerValidationError is the validation error returned by Trigger.Validate // if the designated constraints aren't met. type TriggerValidationError struct { @@ -391,23 +601,60 @@ var _ interface { // Validate checks the field values on ScaleTimersOverloadActionConfig with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScaleTimersOverloadActionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScaleTimersOverloadActionConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ScaleTimersOverloadActionConfigMultiError, or nil if none found. +func (m *ScaleTimersOverloadActionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ScaleTimersOverloadActionConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetTimerScaleFactors()) < 1 { - return ScaleTimersOverloadActionConfigValidationError{ + err := ScaleTimersOverloadActionConfigValidationError{ field: "TimerScaleFactors", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetTimerScaleFactors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScaleTimersOverloadActionConfigValidationError{ + field: fmt.Sprintf("TimerScaleFactors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScaleTimersOverloadActionConfigValidationError{ + field: fmt.Sprintf("TimerScaleFactors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScaleTimersOverloadActionConfigValidationError{ field: fmt.Sprintf("TimerScaleFactors[%v]", idx), @@ -419,9 +666,30 @@ func (m *ScaleTimersOverloadActionConfig) Validate() error { } + if len(errors) > 0 { + return ScaleTimersOverloadActionConfigMultiError(errors) + } + return nil } +// ScaleTimersOverloadActionConfigMultiError is an error wrapping multiple +// validation errors returned by ScaleTimersOverloadActionConfig.ValidateAll() +// if the designated constraints aren't met. +type ScaleTimersOverloadActionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScaleTimersOverloadActionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScaleTimersOverloadActionConfigMultiError) AllErrors() []error { return m } + // ScaleTimersOverloadActionConfigValidationError is the validation error // returned by ScaleTimersOverloadActionConfig.Validate if the designated // constraints aren't met. @@ -480,31 +748,72 @@ var _ interface { } = ScaleTimersOverloadActionConfigValidationError{} // Validate checks the field values on OverloadAction with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OverloadAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OverloadAction with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OverloadActionMultiError, +// or nil if none found. +func (m *OverloadAction) ValidateAll() error { + return m.validate(true) +} + +func (m *OverloadAction) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return OverloadActionValidationError{ + err := OverloadActionValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetTriggers()) < 1 { - return OverloadActionValidationError{ + err := OverloadActionValidationError{ field: "Triggers", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetTriggers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadActionValidationError{ + field: fmt.Sprintf("Triggers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadActionValidationError{ + field: fmt.Sprintf("Triggers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadActionValidationError{ field: fmt.Sprintf("Triggers[%v]", idx), @@ -516,7 +825,26 @@ func (m *OverloadAction) Validate() error { } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadActionValidationError{ field: "TypedConfig", @@ -526,9 +854,30 @@ func (m *OverloadAction) Validate() error { } } + if len(errors) > 0 { + return OverloadActionMultiError(errors) + } + return nil } +// OverloadActionMultiError is an error wrapping multiple validation errors +// returned by OverloadAction.ValidateAll() if the designated constraints +// aren't met. +type OverloadActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OverloadActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OverloadActionMultiError) AllErrors() []error { return m } + // OverloadActionValidationError is the validation error returned by // OverloadAction.Validate if the designated constraints aren't met. type OverloadActionValidationError struct { @@ -583,15 +932,161 @@ var _ interface { ErrorName() string } = OverloadActionValidationError{} +// Validate checks the field values on BufferFactoryConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *BufferFactoryConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferFactoryConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BufferFactoryConfigMultiError, or nil if none found. +func (m *BufferFactoryConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferFactoryConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if val := m.GetMinimumAccountToTrackPowerOfTwo(); val < 10 || val > 56 { + err := BufferFactoryConfigValidationError{ + field: "MinimumAccountToTrackPowerOfTwo", + reason: "value must be inside range [10, 56]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return BufferFactoryConfigMultiError(errors) + } + + return nil +} + +// BufferFactoryConfigMultiError is an error wrapping multiple validation +// errors returned by BufferFactoryConfig.ValidateAll() if the designated +// constraints aren't met. +type BufferFactoryConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferFactoryConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferFactoryConfigMultiError) AllErrors() []error { return m } + +// BufferFactoryConfigValidationError is the validation error returned by +// BufferFactoryConfig.Validate if the designated constraints aren't met. +type BufferFactoryConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferFactoryConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferFactoryConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferFactoryConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferFactoryConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferFactoryConfigValidationError) ErrorName() string { + return "BufferFactoryConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferFactoryConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBufferFactoryConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferFactoryConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferFactoryConfigValidationError{} + // Validate checks the field values on OverloadManager with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *OverloadManager) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OverloadManager with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OverloadManagerMultiError, or nil if none found. +func (m *OverloadManager) ValidateAll() error { + return m.validate(true) +} + +func (m *OverloadManager) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRefreshInterval()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRefreshInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: "RefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: "RefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRefreshInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadManagerValidationError{ field: "RefreshInterval", @@ -602,16 +1097,39 @@ func (m *OverloadManager) Validate() error { } if len(m.GetResourceMonitors()) < 1 { - return OverloadManagerValidationError{ + err := OverloadManagerValidationError{ field: "ResourceMonitors", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResourceMonitors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("ResourceMonitors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("ResourceMonitors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadManagerValidationError{ field: fmt.Sprintf("ResourceMonitors[%v]", idx), @@ -626,7 +1144,26 @@ func (m *OverloadManager) Validate() error { for idx, item := range m.GetActions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OverloadManagerValidationError{ field: fmt.Sprintf("Actions[%v]", idx), @@ -638,9 +1175,59 @@ func (m *OverloadManager) Validate() error { } + if all { + switch v := interface{}(m.GetBufferFactoryConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: "BufferFactoryConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OverloadManagerValidationError{ + field: "BufferFactoryConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferFactoryConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OverloadManagerValidationError{ + field: "BufferFactoryConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OverloadManagerMultiError(errors) + } + return nil } +// OverloadManagerMultiError is an error wrapping multiple validation errors +// returned by OverloadManager.ValidateAll() if the designated constraints +// aren't met. +type OverloadManagerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OverloadManagerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OverloadManagerMultiError) AllErrors() []error { return m } + // OverloadManagerValidationError is the validation error returned by // OverloadManager.Validate if the designated constraints aren't met. type OverloadManagerValidationError struct { @@ -697,31 +1284,74 @@ var _ interface { // Validate checks the field values on // ScaleTimersOverloadActionConfig_ScaleTimer with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScaleTimersOverloadActionConfig_ScaleTimer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScaleTimersOverloadActionConfig_ScaleTimer with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ScaleTimersOverloadActionConfig_ScaleTimerMultiError, or nil if none found. +func (m *ScaleTimersOverloadActionConfig_ScaleTimer) ValidateAll() error { + return m.validate(true) +} + +func (m *ScaleTimersOverloadActionConfig_ScaleTimer) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := _ScaleTimersOverloadActionConfig_ScaleTimer_Timer_NotInLookup[m.GetTimer()]; ok { - return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ + err := ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ field: "Timer", reason: "value must not be in list [0]", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ScaleTimersOverloadActionConfig_TimerType_name[int32(m.GetTimer())]; !ok { - return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ + err := ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ field: "Timer", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.OverloadAdjust.(type) { case *ScaleTimersOverloadActionConfig_ScaleTimer_MinTimeout: - if v, ok := interface{}(m.GetMinTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ + field: "MinTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ + field: "MinTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ field: "MinTimeout", @@ -733,7 +1363,26 @@ func (m *ScaleTimersOverloadActionConfig_ScaleTimer) Validate() error { case *ScaleTimersOverloadActionConfig_ScaleTimer_MinScale: - if v, ok := interface{}(m.GetMinScale()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinScale()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ + field: "MinScale", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ + field: "MinScale", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinScale()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ field: "MinScale", @@ -744,16 +1393,42 @@ func (m *ScaleTimersOverloadActionConfig_ScaleTimer) Validate() error { } default: - return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ + err := ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ field: "OverloadAdjust", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ScaleTimersOverloadActionConfig_ScaleTimerMultiError(errors) + } + return nil } +// ScaleTimersOverloadActionConfig_ScaleTimerMultiError is an error wrapping +// multiple validation errors returned by +// ScaleTimersOverloadActionConfig_ScaleTimer.ValidateAll() if the designated +// constraints aren't met. +type ScaleTimersOverloadActionConfig_ScaleTimerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScaleTimersOverloadActionConfig_ScaleTimerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScaleTimersOverloadActionConfig_ScaleTimerMultiError) AllErrors() []error { return m } + // ScaleTimersOverloadActionConfig_ScaleTimerValidationError is the validation // error returned by ScaleTimersOverloadActionConfig_ScaleTimer.Validate if // the designated constraints aren't met. diff --git a/pkg/api/envoy/config/ratelimit/v2/rls.pb.go b/pkg/api/envoy/config/ratelimit/v2/rls.pb.go index 674dd35dff..ca612e3c4d 100644 --- a/pkg/api/envoy/config/ratelimit/v2/rls.pb.go +++ b/pkg/api/envoy/config/ratelimit/v2/rls.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/ratelimit/v2/rls.proto -package envoy_config_ratelimit_v2 +package ratelimitv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,12 +23,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Rate limit :ref:`configuration overview `. -// [#next-free-field: 6] type RateLimitServiceConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -39,11 +33,6 @@ type RateLimitServiceConfig struct { // will connect to this cluster when it needs to make rate limit service // requests. GrpcService *core.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` - // API version for rate limit transport protocol. If `transport_api_version` is set to `V2`, then - // this will instead select the alpha version of the V2 API; `pb.lyft.ratelimit.RateLimitService` - // rather than the final V2 API `envoy.service.ratelimit.v2.RateLimitService`. This setting has - // no affect if `transport_api_version` is set to `V3`. - UseAlpha bool `protobuf:"varint,5,opt,name=use_alpha,json=useAlpha,proto3" json:"use_alpha,omitempty"` } func (x *RateLimitServiceConfig) Reset() { @@ -85,13 +74,6 @@ func (x *RateLimitServiceConfig) GetGrpcService() *core.GrpcService { return nil } -func (x *RateLimitServiceConfig) GetUseAlpha() bool { - if x != nil { - return x.UseAlpha - } - return false -} - var File_envoy_config_ratelimit_v2_rls_proto protoreflect.FileDescriptor var file_envoy_config_ratelimit_v2_rls_proto_rawDesc = []byte{ @@ -104,21 +86,24 @@ var file_envoy_config_ratelimit_v2_rls_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, - 0x01, 0x0a, 0x16, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x0c, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x73, 0x65, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x42, - 0x3d, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, - 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x71, + 0x0a, 0x16, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, + 0x04, 0x42, 0x8b, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x52, + 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/ratelimit/v2/rls.pb.validate.go b/pkg/api/envoy/config/ratelimit/v2/rls.pb.validate.go index 24c572da6c..dffbdc5473 100644 --- a/pkg/api/envoy/config/ratelimit/v2/rls.pb.validate.go +++ b/pkg/api/envoy/config/ratelimit/v2/rls.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/ratelimit/v2/rls.proto -package envoy_config_ratelimit_v2 +package ratelimitv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RateLimitServiceConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitServiceConfigMultiError, or nil if none found. +func (m *RateLimitServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetGrpcService() == nil { - return RateLimitServiceConfigValidationError{ + err := RateLimitServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitServiceConfigValidationError{ field: "GrpcService", @@ -58,11 +97,30 @@ func (m *RateLimitServiceConfig) Validate() error { } } - // no validation rules for UseAlpha + if len(errors) > 0 { + return RateLimitServiceConfigMultiError(errors) + } return nil } +// RateLimitServiceConfigMultiError is an error wrapping multiple validation +// errors returned by RateLimitServiceConfig.ValidateAll() if the designated +// constraints aren't met. +type RateLimitServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitServiceConfigMultiError) AllErrors() []error { return m } + // RateLimitServiceConfigValidationError is the validation error returned by // RateLimitServiceConfig.Validate if the designated constraints aren't met. type RateLimitServiceConfigValidationError struct { diff --git a/pkg/api/envoy/config/ratelimit/v3/rls.pb.go b/pkg/api/envoy/config/ratelimit/v3/rls.pb.go index d349a4b5d2..962ca264ff 100644 --- a/pkg/api/envoy/config/ratelimit/v3/rls.pb.go +++ b/pkg/api/envoy/config/ratelimit/v3/rls.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/ratelimit/v3/rls.proto -package envoy_config_ratelimit_v3 +package ratelimitv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,12 +23,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Rate limit :ref:`configuration overview `. -// [#next-free-field: 6] type RateLimitServiceConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -40,14 +34,8 @@ type RateLimitServiceConfig struct { // requests. GrpcService *v3.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` // API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and - // version of messages used on the wire. If set to `V2`, then the `use_alpha` option will instead - // select the old alpha protocol. + // version of messages used on the wire. TransportApiVersion v3.ApiVersion `protobuf:"varint,4,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v3.ApiVersion" json:"transport_api_version,omitempty"` - // API version for rate limit transport protocol. If `transport_api_version` is set to `V2`, then - // this will instead select the alpha version of the V2 API; `pb.lyft.ratelimit.RateLimitService` - // rather than the final V2 API `envoy.service.ratelimit.v2.RateLimitService`. This setting has - // no affect if `transport_api_version` is set to `V3`. - UseAlpha bool `protobuf:"varint,5,opt,name=use_alpha,json=useAlpha,proto3" json:"use_alpha,omitempty"` } func (x *RateLimitServiceConfig) Reset() { @@ -93,14 +81,7 @@ func (x *RateLimitServiceConfig) GetTransportApiVersion() v3.ApiVersion { if x != nil { return x.TransportApiVersion } - return v3.ApiVersion_AUTO -} - -func (x *RateLimitServiceConfig) GetUseAlpha() bool { - if x != nil { - return x.UseAlpha - } - return false + return v3.ApiVersion(0) } var File_envoy_config_ratelimit_v3_rls_proto protoreflect.FileDescriptor @@ -120,7 +101,7 @@ var file_envoy_config_ratelimit_v3_rls_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x16, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, @@ -133,18 +114,21 @@ var file_envoy_config_ratelimit_v3_rls_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, - 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, - 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, - 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x42, 0x3d, 0x0a, 0x27, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x42, 0x8b, + 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/ratelimit/v3/rls.pb.validate.go b/pkg/api/envoy/config/ratelimit/v3/rls.pb.validate.go index e06077a8a5..b9377c337d 100644 --- a/pkg/api/envoy/config/ratelimit/v3/rls.pb.validate.go +++ b/pkg/api/envoy/config/ratelimit/v3/rls.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/ratelimit/v3/rls.proto -package envoy_config_ratelimit_v3 +package ratelimitv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,27 +33,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.ApiVersion(0) ) // Validate checks the field values on RateLimitServiceConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitServiceConfigMultiError, or nil if none found. +func (m *RateLimitServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetGrpcService() == nil { - return RateLimitServiceConfigValidationError{ + err := RateLimitServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitServiceConfigValidationError{ field: "GrpcService", @@ -63,17 +102,40 @@ func (m *RateLimitServiceConfig) Validate() error { } if _, ok := v3.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return RateLimitServiceConfigValidationError{ + err := RateLimitServiceConfigValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - // no validation rules for UseAlpha + if len(errors) > 0 { + return RateLimitServiceConfigMultiError(errors) + } return nil } +// RateLimitServiceConfigMultiError is an error wrapping multiple validation +// errors returned by RateLimitServiceConfig.ValidateAll() if the designated +// constraints aren't met. +type RateLimitServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitServiceConfigMultiError) AllErrors() []error { return m } + // RateLimitServiceConfigValidationError is the validation error returned by // RateLimitServiceConfig.Validate if the designated constraints aren't met. type RateLimitServiceConfigValidationError struct { diff --git a/pkg/api/envoy/config/ratelimit/v4alpha/rls.pb.go b/pkg/api/envoy/config/ratelimit/v4alpha/rls.pb.go deleted file mode 100644 index 53fde95c56..0000000000 --- a/pkg/api/envoy/config/ratelimit/v4alpha/rls.pb.go +++ /dev/null @@ -1,217 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/ratelimit/v4alpha/rls.proto - -package envoy_config_ratelimit_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Rate limit :ref:`configuration overview `. -// [#next-free-field: 6] -type RateLimitServiceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the gRPC service that hosts the rate limit service. The client - // will connect to this cluster when it needs to make rate limit service - // requests. - GrpcService *v4alpha.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` - // API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and - // version of messages used on the wire. If set to `V2`, then the `use_alpha` option will instead - // select the old alpha protocol. - TransportApiVersion v4alpha.ApiVersion `protobuf:"varint,4,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"transport_api_version,omitempty"` - // API version for rate limit transport protocol. If `transport_api_version` is set to `V2`, then - // this will instead select the alpha version of the V2 API; `pb.lyft.ratelimit.RateLimitService` - // rather than the final V2 API `envoy.service.ratelimit.v2.RateLimitService`. This setting has - // no affect if `transport_api_version` is set to `V3`. - UseAlpha bool `protobuf:"varint,5,opt,name=use_alpha,json=useAlpha,proto3" json:"use_alpha,omitempty"` -} - -func (x *RateLimitServiceConfig) Reset() { - *x = RateLimitServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_ratelimit_v4alpha_rls_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitServiceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitServiceConfig) ProtoMessage() {} - -func (x *RateLimitServiceConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_ratelimit_v4alpha_rls_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimitServiceConfig.ProtoReflect.Descriptor instead. -func (*RateLimitServiceConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescGZIP(), []int{0} -} - -func (x *RateLimitServiceConfig) GetGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -func (x *RateLimitServiceConfig) GetTransportApiVersion() v4alpha.ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return v4alpha.ApiVersion_hidden_envoy_deprecated_AUTO -} - -func (x *RateLimitServiceConfig) GetUseAlpha() bool { - if x != nil { - return x.UseAlpha - } - return false -} - -var File_envoy_config_ratelimit_v4alpha_rls_proto protoreflect.FileDescriptor - -var file_envoy_config_ratelimit_v4alpha_rls_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xb4, 0x02, 0x0a, 0x16, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, - 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, - 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x73, 0x65, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, - 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x42, 0x42, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescOnce sync.Once - file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescData = file_envoy_config_ratelimit_v4alpha_rls_proto_rawDesc -) - -func file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescGZIP() []byte { - file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescOnce.Do(func() { - file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescData) - }) - return file_envoy_config_ratelimit_v4alpha_rls_proto_rawDescData -} - -var file_envoy_config_ratelimit_v4alpha_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_ratelimit_v4alpha_rls_proto_goTypes = []interface{}{ - (*RateLimitServiceConfig)(nil), // 0: envoy.config.ratelimit.v4alpha.RateLimitServiceConfig - (*v4alpha.GrpcService)(nil), // 1: envoy.config.core.v4alpha.GrpcService - (v4alpha.ApiVersion)(0), // 2: envoy.config.core.v4alpha.ApiVersion -} -var file_envoy_config_ratelimit_v4alpha_rls_proto_depIdxs = []int32{ - 1, // 0: envoy.config.ratelimit.v4alpha.RateLimitServiceConfig.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 2, // 1: envoy.config.ratelimit.v4alpha.RateLimitServiceConfig.transport_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_ratelimit_v4alpha_rls_proto_init() } -func file_envoy_config_ratelimit_v4alpha_rls_proto_init() { - if File_envoy_config_ratelimit_v4alpha_rls_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_ratelimit_v4alpha_rls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_ratelimit_v4alpha_rls_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_ratelimit_v4alpha_rls_proto_goTypes, - DependencyIndexes: file_envoy_config_ratelimit_v4alpha_rls_proto_depIdxs, - MessageInfos: file_envoy_config_ratelimit_v4alpha_rls_proto_msgTypes, - }.Build() - File_envoy_config_ratelimit_v4alpha_rls_proto = out.File - file_envoy_config_ratelimit_v4alpha_rls_proto_rawDesc = nil - file_envoy_config_ratelimit_v4alpha_rls_proto_goTypes = nil - file_envoy_config_ratelimit_v4alpha_rls_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/ratelimit/v4alpha/rls.pb.validate.go b/pkg/api/envoy/config/ratelimit/v4alpha/rls.pb.validate.go deleted file mode 100644 index 958859a8c7..0000000000 --- a/pkg/api/envoy/config/ratelimit/v4alpha/rls.pb.validate.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/ratelimit/v4alpha/rls.proto - -package envoy_config_ratelimit_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.ApiVersion(0) -) - -// Validate checks the field values on RateLimitServiceConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RateLimitServiceConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetGrpcService() == nil { - return RateLimitServiceConfigValidationError{ - field: "GrpcService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitServiceConfigValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := v4alpha.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return RateLimitServiceConfigValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - } - - // no validation rules for UseAlpha - - return nil -} - -// RateLimitServiceConfigValidationError is the validation error returned by -// RateLimitServiceConfig.Validate if the designated constraints aren't met. -type RateLimitServiceConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitServiceConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitServiceConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitServiceConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitServiceConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitServiceConfigValidationError) ErrorName() string { - return "RateLimitServiceConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitServiceConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitServiceConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitServiceConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitServiceConfigValidationError{} diff --git a/pkg/api/envoy/config/rbac/v2/rbac.pb.go b/pkg/api/envoy/config/rbac/v2/rbac.pb.go index c8aa9cea03..9fbc2b4eb8 100644 --- a/pkg/api/envoy/config/rbac/v2/rbac.pb.go +++ b/pkg/api/envoy/config/rbac/v2/rbac.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/rbac/v2/rbac.proto -package envoy_config_rbac_v2 +package rbacv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Should we do safe-list or block-list style access control? type RBAC_Action int32 @@ -1023,11 +1018,15 @@ var file_envoy_config_rbac_v2_rbac_proto_rawDesc = []byte{ 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x11, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x42, 0x39, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x42, 0x01, 0x42, 0x7d, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, + 0x76, 0x32, 0x3b, 0x72, 0x62, 0x61, 0x63, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/rbac/v2/rbac.pb.validate.go b/pkg/api/envoy/config/rbac/v2/rbac.pb.validate.go index e10b48c858..ea6a6c33c5 100644 --- a/pkg/api/envoy/config/rbac/v2/rbac.pb.validate.go +++ b/pkg/api/envoy/config/rbac/v2/rbac.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/rbac/v2/rbac.proto -package envoy_config_rbac_v2 +package rbacv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,38 +31,102 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { if m == nil { return nil } - // no validation rules for Action - - for key, val := range m.GetPolicies() { - _ = val + var errors []error - // no validation rules for Policies[key] + // no validation rules for Action - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACValidationError{ - field: fmt.Sprintf("Policies[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetPolicies())) + i := 0 + for key := range m.GetPolicies() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetPolicies()[key] + _ = val + + // no validation rules for Policies[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return RBACMultiError(errors) } return nil } +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + // RBACValidationError is the validation error returned by RBAC.Validate if the // designated constraints aren't met. type RBACValidationError struct { @@ -117,23 +182,60 @@ var _ interface { } = RBACValidationError{} // Validate checks the field values on Policy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Policy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Policy with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in PolicyMultiError, or nil if none found. +func (m *Policy) ValidateAll() error { + return m.validate(true) +} + +func (m *Policy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPermissions()) < 1 { - return PolicyValidationError{ + err := PolicyValidationError{ field: "Permissions", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPermissions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Permissions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Permissions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PolicyValidationError{ field: fmt.Sprintf("Permissions[%v]", idx), @@ -146,16 +248,39 @@ func (m *Policy) Validate() error { } if len(m.GetPrincipals()) < 1 { - return PolicyValidationError{ + err := PolicyValidationError{ field: "Principals", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPrincipals() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Principals[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Principals[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PolicyValidationError{ field: fmt.Sprintf("Principals[%v]", idx), @@ -167,7 +292,26 @@ func (m *Policy) Validate() error { } - if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCondition()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "Condition", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "Condition", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PolicyValidationError{ field: "Condition", @@ -177,9 +321,29 @@ func (m *Policy) Validate() error { } } + if len(errors) > 0 { + return PolicyMultiError(errors) + } + return nil } +// PolicyMultiError is an error wrapping multiple validation errors returned by +// Policy.ValidateAll() if the designated constraints aren't met. +type PolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PolicyMultiError) AllErrors() []error { return m } + // PolicyValidationError is the validation error returned by Policy.Validate if // the designated constraints aren't met. type PolicyValidationError struct { @@ -235,17 +399,51 @@ var _ interface { } = PolicyValidationError{} // Validate checks the field values on Permission with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Permission) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Permission with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PermissionMultiError, or +// nil if none found. +func (m *Permission) ValidateAll() error { + return m.validate(true) +} + +func (m *Permission) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *Permission_AndRules: - if v, ok := interface{}(m.GetAndRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "AndRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "AndRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "AndRules", @@ -257,7 +455,26 @@ func (m *Permission) Validate() error { case *Permission_OrRules: - if v, ok := interface{}(m.GetOrRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "OrRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "OrRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "OrRules", @@ -270,15 +487,38 @@ func (m *Permission) Validate() error { case *Permission_Any: if m.GetAny() != true { - return PermissionValidationError{ + err := PermissionValidationError{ field: "Any", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *Permission_Header: - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "Header", @@ -290,7 +530,26 @@ func (m *Permission) Validate() error { case *Permission_UrlPath: - if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUrlPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "UrlPath", @@ -302,7 +561,26 @@ func (m *Permission) Validate() error { case *Permission_DestinationIp: - if v, ok := interface{}(m.GetDestinationIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestinationIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "DestinationIp", @@ -315,15 +593,38 @@ func (m *Permission) Validate() error { case *Permission_DestinationPort: if m.GetDestinationPort() > 65535 { - return PermissionValidationError{ + err := PermissionValidationError{ field: "DestinationPort", reason: "value must be less than or equal to 65535", } + if !all { + return err + } + errors = append(errors, err) } case *Permission_Metadata: - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "Metadata", @@ -335,7 +636,26 @@ func (m *Permission) Validate() error { case *Permission_NotRule: - if v, ok := interface{}(m.GetNotRule()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotRule()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "NotRule", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "NotRule", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotRule()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "NotRule", @@ -347,7 +667,26 @@ func (m *Permission) Validate() error { case *Permission_RequestedServerName: - if v, ok := interface{}(m.GetRequestedServerName()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestedServerName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "RequestedServerName", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "RequestedServerName", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestedServerName()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "RequestedServerName", @@ -358,16 +697,40 @@ func (m *Permission) Validate() error { } default: - return PermissionValidationError{ + err := PermissionValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return PermissionMultiError(errors) } return nil } +// PermissionMultiError is an error wrapping multiple validation errors +// returned by Permission.ValidateAll() if the designated constraints aren't met. +type PermissionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PermissionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PermissionMultiError) AllErrors() []error { return m } + // PermissionValidationError is the validation error returned by // Permission.Validate if the designated constraints aren't met. type PermissionValidationError struct { @@ -423,17 +786,51 @@ var _ interface { } = PermissionValidationError{} // Validate checks the field values on Principal with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Principal) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PrincipalMultiError, or nil +// if none found. +func (m *Principal) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Identifier.(type) { case *Principal_AndIds: - if v, ok := interface{}(m.GetAndIds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndIds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "AndIds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "AndIds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndIds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "AndIds", @@ -445,7 +842,26 @@ func (m *Principal) Validate() error { case *Principal_OrIds: - if v, ok := interface{}(m.GetOrIds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrIds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "OrIds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "OrIds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrIds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "OrIds", @@ -458,15 +874,38 @@ func (m *Principal) Validate() error { case *Principal_Any: if m.GetAny() != true { - return PrincipalValidationError{ + err := PrincipalValidationError{ field: "Any", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *Principal_Authenticated_: - if v, ok := interface{}(m.GetAuthenticated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAuthenticated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Authenticated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Authenticated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthenticated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "Authenticated", @@ -478,7 +917,26 @@ func (m *Principal) Validate() error { case *Principal_SourceIp: - if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "SourceIp", @@ -490,7 +948,26 @@ func (m *Principal) Validate() error { case *Principal_DirectRemoteIp: - if v, ok := interface{}(m.GetDirectRemoteIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDirectRemoteIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "DirectRemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "DirectRemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDirectRemoteIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "DirectRemoteIp", @@ -502,7 +979,26 @@ func (m *Principal) Validate() error { case *Principal_RemoteIp: - if v, ok := interface{}(m.GetRemoteIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "RemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "RemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "RemoteIp", @@ -514,7 +1010,26 @@ func (m *Principal) Validate() error { case *Principal_Header: - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "Header", @@ -526,7 +1041,26 @@ func (m *Principal) Validate() error { case *Principal_UrlPath: - if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUrlPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "UrlPath", @@ -538,7 +1072,26 @@ func (m *Principal) Validate() error { case *Principal_Metadata: - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "Metadata", @@ -550,7 +1103,26 @@ func (m *Principal) Validate() error { case *Principal_NotId: - if v, ok := interface{}(m.GetNotId()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "NotId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "NotId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "NotId", @@ -561,16 +1133,40 @@ func (m *Principal) Validate() error { } default: - return PrincipalValidationError{ + err := PrincipalValidationError{ field: "Identifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return PrincipalMultiError(errors) + } + return nil } +// PrincipalMultiError is an error wrapping multiple validation errors returned +// by Principal.ValidateAll() if the designated constraints aren't met. +type PrincipalMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PrincipalMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PrincipalMultiError) AllErrors() []error { return m } + // PrincipalValidationError is the validation error returned by // Principal.Validate if the designated constraints aren't met. type PrincipalValidationError struct { @@ -626,24 +1222,61 @@ var _ interface { } = PrincipalValidationError{} // Validate checks the field values on Permission_Set with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Permission_Set) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Permission_Set with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Permission_SetMultiError, +// or nil if none found. +func (m *Permission_Set) ValidateAll() error { + return m.validate(true) +} + +func (m *Permission_Set) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRules()) < 1 { - return Permission_SetValidationError{ + err := Permission_SetValidationError{ field: "Rules", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Permission_SetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Permission_SetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Permission_SetValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -655,9 +1288,30 @@ func (m *Permission_Set) Validate() error { } + if len(errors) > 0 { + return Permission_SetMultiError(errors) + } + return nil } +// Permission_SetMultiError is an error wrapping multiple validation errors +// returned by Permission_Set.ValidateAll() if the designated constraints +// aren't met. +type Permission_SetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Permission_SetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Permission_SetMultiError) AllErrors() []error { return m } + // Permission_SetValidationError is the validation error returned by // Permission_Set.Validate if the designated constraints aren't met. type Permission_SetValidationError struct { @@ -713,24 +1367,61 @@ var _ interface { } = Permission_SetValidationError{} // Validate checks the field values on Principal_Set with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Principal_Set) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal_Set with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Principal_SetMultiError, or +// nil if none found. +func (m *Principal_Set) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal_Set) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetIds()) < 1 { - return Principal_SetValidationError{ + err := Principal_SetValidationError{ field: "Ids", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetIds() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Principal_SetValidationError{ + field: fmt.Sprintf("Ids[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Principal_SetValidationError{ + field: fmt.Sprintf("Ids[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Principal_SetValidationError{ field: fmt.Sprintf("Ids[%v]", idx), @@ -742,9 +1433,30 @@ func (m *Principal_Set) Validate() error { } + if len(errors) > 0 { + return Principal_SetMultiError(errors) + } + return nil } +// Principal_SetMultiError is an error wrapping multiple validation errors +// returned by Principal_Set.ValidateAll() if the designated constraints +// aren't met. +type Principal_SetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Principal_SetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Principal_SetMultiError) AllErrors() []error { return m } + // Principal_SetValidationError is the validation error returned by // Principal_Set.Validate if the designated constraints aren't met. type Principal_SetValidationError struct { @@ -801,13 +1513,46 @@ var _ interface { // Validate checks the field values on Principal_Authenticated with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Principal_Authenticated) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal_Authenticated with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Principal_AuthenticatedMultiError, or nil if none found. +func (m *Principal_Authenticated) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal_Authenticated) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPrincipalName()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPrincipalName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Principal_AuthenticatedValidationError{ + field: "PrincipalName", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Principal_AuthenticatedValidationError{ + field: "PrincipalName", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrincipalName()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Principal_AuthenticatedValidationError{ field: "PrincipalName", @@ -817,9 +1562,30 @@ func (m *Principal_Authenticated) Validate() error { } } + if len(errors) > 0 { + return Principal_AuthenticatedMultiError(errors) + } + return nil } +// Principal_AuthenticatedMultiError is an error wrapping multiple validation +// errors returned by Principal_Authenticated.ValidateAll() if the designated +// constraints aren't met. +type Principal_AuthenticatedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Principal_AuthenticatedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Principal_AuthenticatedMultiError) AllErrors() []error { return m } + // Principal_AuthenticatedValidationError is the validation error returned by // Principal_Authenticated.Validate if the designated constraints aren't met. type Principal_AuthenticatedValidationError struct { diff --git a/pkg/api/envoy/config/rbac/v3/rbac.pb.go b/pkg/api/envoy/config/rbac/v3/rbac.pb.go index 82609b2e0a..d017520253 100644 --- a/pkg/api/envoy/config/rbac/v3/rbac.pb.go +++ b/pkg/api/envoy/config/rbac/v3/rbac.pb.go @@ -1,18 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/rbac/v3/rbac.proto -package envoy_config_rbac_v3 +package rbacv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" + v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Should we do safe-list or block-list style access control? type RBAC_Action int32 @@ -88,9 +85,9 @@ func (RBAC_Action) EnumDescriptor() ([]byte, []int) { } // Role Based Access Control (RBAC) provides service-level and method-level access control for a -// service. RBAC policies are additive. The policies are examined in order. Requests are allowed -// or denied based on the `action` and whether a matching policy is found. For instance, if the -// action is ALLOW and a matching policy is found the request should be allowed. +// service. Requests are allowed or denied based on the `action` and whether a matching policy is +// found. For instance, if the action is ALLOW and a matching policy is found the request should be +// allowed. // // RBAC can also be used to make access logging decisions by communicating with access loggers // through dynamic metadata. When the action is LOG and at least one policy matches, the @@ -123,7 +120,10 @@ func (RBAC_Action) EnumDescriptor() ([]byte, []int) { // permissions: // - and_rules: // rules: -// - header: { name: ":method", exact_match: "GET" } +// - header: +// name: ":method" +// string_match: +// exact: "GET" // - url_path: // path: { prefix: "/products" } // - or_rules: @@ -154,6 +154,7 @@ type RBAC struct { // Action RBAC_Action `protobuf:"varint,1,opt,name=action,proto3,enum=envoy.config.rbac.v3.RBAC_Action" json:"action,omitempty"` // Maps from policy name to policy. A match occurs when at least one policy matches the request. + // The policies are evaluated in lexicographic order of the policy name. Policies map[string]*Policy `protobuf:"bytes,2,rep,name=policies,proto3" json:"policies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } @@ -293,7 +294,7 @@ func (x *Policy) GetCheckedCondition() *v1alpha1.CheckedExpr { } // Permission defines an action (or actions) that a principal can take. -// [#next-free-field: 11] +// [#next-free-field: 13] type Permission struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -307,9 +308,11 @@ type Permission struct { // *Permission_UrlPath // *Permission_DestinationIp // *Permission_DestinationPort + // *Permission_DestinationPortRange // *Permission_Metadata // *Permission_NotRule // *Permission_RequestedServerName + // *Permission_Matcher Rule isPermission_Rule `protobuf_oneof:"rule"` } @@ -401,6 +404,13 @@ func (x *Permission) GetDestinationPort() uint32 { return 0 } +func (x *Permission) GetDestinationPortRange() *v33.Int32Range { + if x, ok := x.GetRule().(*Permission_DestinationPortRange); ok { + return x.DestinationPortRange + } + return nil +} + func (x *Permission) GetMetadata() *v31.MetadataMatcher { if x, ok := x.GetRule().(*Permission_Metadata); ok { return x.Metadata @@ -422,6 +432,13 @@ func (x *Permission) GetRequestedServerName() *v31.StringMatcher { return nil } +func (x *Permission) GetMatcher() *v32.TypedExtensionConfig { + if x, ok := x.GetRule().(*Permission_Matcher); ok { + return x.Matcher + } + return nil +} + type isPermission_Rule interface { isPermission_Rule() } @@ -464,6 +481,11 @@ type Permission_DestinationPort struct { DestinationPort uint32 `protobuf:"varint,6,opt,name=destination_port,json=destinationPort,proto3,oneof"` } +type Permission_DestinationPortRange struct { + // A port number range that describes a range of destination ports connecting to. + DestinationPortRange *v33.Int32Range `protobuf:"bytes,11,opt,name=destination_port_range,json=destinationPortRange,proto3,oneof"` +} + type Permission_Metadata struct { // Metadata that describes additional information about the action. Metadata *v31.MetadataMatcher `protobuf:"bytes,7,opt,name=metadata,proto3,oneof"` @@ -488,7 +510,7 @@ type Permission_RequestedServerName struct { // * If the :ref:`TLS Inspector ` // filter is not added, and if a `FilterChainMatch` is not defined for // the :ref:`server name - // `, + // `, // a TLS connection's requested SNI server name will be treated as if it // wasn't present. // @@ -500,6 +522,12 @@ type Permission_RequestedServerName struct { RequestedServerName *v31.StringMatcher `protobuf:"bytes,9,opt,name=requested_server_name,json=requestedServerName,proto3,oneof"` } +type Permission_Matcher struct { + // Extension for configuring custom matchers for RBAC. + // [#extension-category: envoy.rbac.matchers] + Matcher *v32.TypedExtensionConfig `protobuf:"bytes,12,opt,name=matcher,proto3,oneof"` +} + func (*Permission_AndRules) isPermission_Rule() {} func (*Permission_OrRules) isPermission_Rule() {} @@ -514,12 +542,16 @@ func (*Permission_DestinationIp) isPermission_Rule() {} func (*Permission_DestinationPort) isPermission_Rule() {} +func (*Permission_DestinationPortRange) isPermission_Rule() {} + func (*Permission_Metadata) isPermission_Rule() {} func (*Permission_NotRule) isPermission_Rule() {} func (*Permission_RequestedServerName) isPermission_Rule() {} +func (*Permission_Matcher) isPermission_Rule() {} + // Principal defines an identity or a group of identities for a downstream // subject. // [#next-free-field: 12] @@ -697,7 +729,7 @@ type Principal_SourceIp struct { type Principal_DirectRemoteIp struct { // A CIDR block that describes the downstream remote/origin address. // Note: This is always the physical peer even if the - // :ref:`remote_ip ` is + // :ref:`remote_ip ` is // inferred from for example the x-forwarder-for header, proxy protocol, // etc. DirectRemoteIp *v32.CidrRange `protobuf:"bytes,10,opt,name=direct_remote_ip,json=directRemoteIp,proto3,oneof"` @@ -707,7 +739,7 @@ type Principal_RemoteIp struct { // A CIDR block that describes the downstream remote/origin address. // Note: This may not be the physical peer and could be different from the // :ref:`direct_remote_ip - // `. E.g, if the + // `. E.g, if the // remote ip is inferred from for example the x-forwarder-for header, proxy // protocol, etc. RemoteIp *v32.CidrRange `protobuf:"bytes,11,opt,name=remote_ip,json=remoteIp,proto3,oneof"` @@ -917,196 +949,217 @@ var file_envoy_config_rbac_v3_rbac_proto_rawDesc = []byte{ 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, - 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xb6, 0x02, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x43, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x42, 0x41, 0x43, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, - 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x1a, 0x59, 0x0a, 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x26, - 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, - 0x57, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x4c, 0x4f, 0x47, 0x10, 0x02, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x22, 0x93, 0x03, 0x0a, 0x06, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x4c, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, - 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x5a, 0x0a, 0x09, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x42, - 0x1c, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x09, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x1c, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x16, 0x12, 0x14, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, - 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xbf, - 0x06, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, - 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, - 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, - 0x6e, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, - 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0d, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x12, 0x36, 0x0a, - 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, - 0xff, 0x03, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x08, 0x6e, - 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, + 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x43, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, + 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, + 0x43, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x59, 0x0a, 0x0d, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x26, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, + 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, + 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x47, 0x10, 0x02, 0x3a, 0x20, 0x9a, 0xc5, + 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x22, 0x93, + 0x03, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4c, 0x0a, 0x0b, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, + 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, + 0x69, 0x70, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x73, 0x12, 0x5a, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x45, 0x78, 0x70, 0x72, 0x42, 0x1c, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, + 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, + 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, + 0x42, 0x1c, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x10, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x22, 0xda, 0x07, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, + 0x61, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, + 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, + 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x61, + 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, + 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x0e, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x70, 0x12, 0x36, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x51, 0x0a, 0x16, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x52, + 0x75, 0x6c, 0x65, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x46, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x73, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x40, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, - 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x73, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x40, 0x0a, - 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, - 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x3a, 0x26, 0x9a, 0xc5, 0x88, - 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0x92, 0x08, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x3e, - 0x0a, 0x07, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x3a, 0x26, 0x9a, 0xc5, + 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0x9b, 0x08, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, + 0x3e, 0x0a, 0x07, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, + 0x3c, 0x0a, 0x06, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, 0x3c, - 0x0a, 0x06, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, - 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, - 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x03, - 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, - 0x08, 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x48, - 0x00, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x42, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x70, 0x12, 0x4b, 0x0a, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, - 0x00, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, - 0x70, 0x12, 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x0b, + 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, + 0x03, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, + 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, + 0x61, 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x48, 0x00, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x4b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, - 0x70, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x05, 0x6e, 0x6f, 0x74, - 0x49, 0x64, 0x1a, 0x6d, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x03, 0x69, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x03, 0x69, 0x64, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x53, 0x65, - 0x74, 0x1a, 0x97, 0x01, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x4b, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, + 0x2e, 0x30, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x4b, + 0x0a, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, + 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x12, 0x3e, 0x0a, 0x09, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, + 0x00, 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x12, 0x3e, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x75, + 0x72, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x44, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x38, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, + 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x64, 0x1a, 0x6d, 0x0a, 0x03, + 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x69, 0x64, 0x73, + 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x3a, 0x25, 0x9a, 0xc5, 0x88, - 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, - 0x61, 0x6c, 0x42, 0x11, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x39, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, - 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x1a, 0x97, 0x01, 0x0a, 0x0d, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x4b, 0x0a, + 0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x70, 0x72, 0x69, + 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, + 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x42, 0x11, 0x0a, 0x0a, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, + 0x7d, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, + 0x61, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x3b, + 0x72, 0x62, 0x61, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1124,22 +1177,24 @@ func file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP() []byte { var file_envoy_config_rbac_v3_rbac_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_envoy_config_rbac_v3_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_envoy_config_rbac_v3_rbac_proto_goTypes = []interface{}{ - (RBAC_Action)(0), // 0: envoy.config.rbac.v3.RBAC.Action - (*RBAC)(nil), // 1: envoy.config.rbac.v3.RBAC - (*Policy)(nil), // 2: envoy.config.rbac.v3.Policy - (*Permission)(nil), // 3: envoy.config.rbac.v3.Permission - (*Principal)(nil), // 4: envoy.config.rbac.v3.Principal - nil, // 5: envoy.config.rbac.v3.RBAC.PoliciesEntry - (*Permission_Set)(nil), // 6: envoy.config.rbac.v3.Permission.Set - (*Principal_Set)(nil), // 7: envoy.config.rbac.v3.Principal.Set - (*Principal_Authenticated)(nil), // 8: envoy.config.rbac.v3.Principal.Authenticated - (*v1alpha1.Expr)(nil), // 9: google.api.expr.v1alpha1.Expr - (*v1alpha1.CheckedExpr)(nil), // 10: google.api.expr.v1alpha1.CheckedExpr - (*v3.HeaderMatcher)(nil), // 11: envoy.config.route.v3.HeaderMatcher - (*v31.PathMatcher)(nil), // 12: envoy.type.matcher.v3.PathMatcher - (*v32.CidrRange)(nil), // 13: envoy.config.core.v3.CidrRange - (*v31.MetadataMatcher)(nil), // 14: envoy.type.matcher.v3.MetadataMatcher - (*v31.StringMatcher)(nil), // 15: envoy.type.matcher.v3.StringMatcher + (RBAC_Action)(0), // 0: envoy.config.rbac.v3.RBAC.Action + (*RBAC)(nil), // 1: envoy.config.rbac.v3.RBAC + (*Policy)(nil), // 2: envoy.config.rbac.v3.Policy + (*Permission)(nil), // 3: envoy.config.rbac.v3.Permission + (*Principal)(nil), // 4: envoy.config.rbac.v3.Principal + nil, // 5: envoy.config.rbac.v3.RBAC.PoliciesEntry + (*Permission_Set)(nil), // 6: envoy.config.rbac.v3.Permission.Set + (*Principal_Set)(nil), // 7: envoy.config.rbac.v3.Principal.Set + (*Principal_Authenticated)(nil), // 8: envoy.config.rbac.v3.Principal.Authenticated + (*v1alpha1.Expr)(nil), // 9: google.api.expr.v1alpha1.Expr + (*v1alpha1.CheckedExpr)(nil), // 10: google.api.expr.v1alpha1.CheckedExpr + (*v3.HeaderMatcher)(nil), // 11: envoy.config.route.v3.HeaderMatcher + (*v31.PathMatcher)(nil), // 12: envoy.type.matcher.v3.PathMatcher + (*v32.CidrRange)(nil), // 13: envoy.config.core.v3.CidrRange + (*v33.Int32Range)(nil), // 14: envoy.type.v3.Int32Range + (*v31.MetadataMatcher)(nil), // 15: envoy.type.matcher.v3.MetadataMatcher + (*v31.StringMatcher)(nil), // 16: envoy.type.matcher.v3.StringMatcher + (*v32.TypedExtensionConfig)(nil), // 17: envoy.config.core.v3.TypedExtensionConfig } var file_envoy_config_rbac_v3_rbac_proto_depIdxs = []int32{ 0, // 0: envoy.config.rbac.v3.RBAC.action:type_name -> envoy.config.rbac.v3.RBAC.Action @@ -1153,28 +1208,30 @@ var file_envoy_config_rbac_v3_rbac_proto_depIdxs = []int32{ 11, // 8: envoy.config.rbac.v3.Permission.header:type_name -> envoy.config.route.v3.HeaderMatcher 12, // 9: envoy.config.rbac.v3.Permission.url_path:type_name -> envoy.type.matcher.v3.PathMatcher 13, // 10: envoy.config.rbac.v3.Permission.destination_ip:type_name -> envoy.config.core.v3.CidrRange - 14, // 11: envoy.config.rbac.v3.Permission.metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher - 3, // 12: envoy.config.rbac.v3.Permission.not_rule:type_name -> envoy.config.rbac.v3.Permission - 15, // 13: envoy.config.rbac.v3.Permission.requested_server_name:type_name -> envoy.type.matcher.v3.StringMatcher - 7, // 14: envoy.config.rbac.v3.Principal.and_ids:type_name -> envoy.config.rbac.v3.Principal.Set - 7, // 15: envoy.config.rbac.v3.Principal.or_ids:type_name -> envoy.config.rbac.v3.Principal.Set - 8, // 16: envoy.config.rbac.v3.Principal.authenticated:type_name -> envoy.config.rbac.v3.Principal.Authenticated - 13, // 17: envoy.config.rbac.v3.Principal.source_ip:type_name -> envoy.config.core.v3.CidrRange - 13, // 18: envoy.config.rbac.v3.Principal.direct_remote_ip:type_name -> envoy.config.core.v3.CidrRange - 13, // 19: envoy.config.rbac.v3.Principal.remote_ip:type_name -> envoy.config.core.v3.CidrRange - 11, // 20: envoy.config.rbac.v3.Principal.header:type_name -> envoy.config.route.v3.HeaderMatcher - 12, // 21: envoy.config.rbac.v3.Principal.url_path:type_name -> envoy.type.matcher.v3.PathMatcher - 14, // 22: envoy.config.rbac.v3.Principal.metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher - 4, // 23: envoy.config.rbac.v3.Principal.not_id:type_name -> envoy.config.rbac.v3.Principal - 2, // 24: envoy.config.rbac.v3.RBAC.PoliciesEntry.value:type_name -> envoy.config.rbac.v3.Policy - 3, // 25: envoy.config.rbac.v3.Permission.Set.rules:type_name -> envoy.config.rbac.v3.Permission - 4, // 26: envoy.config.rbac.v3.Principal.Set.ids:type_name -> envoy.config.rbac.v3.Principal - 15, // 27: envoy.config.rbac.v3.Principal.Authenticated.principal_name:type_name -> envoy.type.matcher.v3.StringMatcher - 28, // [28:28] is the sub-list for method output_type - 28, // [28:28] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 14, // 11: envoy.config.rbac.v3.Permission.destination_port_range:type_name -> envoy.type.v3.Int32Range + 15, // 12: envoy.config.rbac.v3.Permission.metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher + 3, // 13: envoy.config.rbac.v3.Permission.not_rule:type_name -> envoy.config.rbac.v3.Permission + 16, // 14: envoy.config.rbac.v3.Permission.requested_server_name:type_name -> envoy.type.matcher.v3.StringMatcher + 17, // 15: envoy.config.rbac.v3.Permission.matcher:type_name -> envoy.config.core.v3.TypedExtensionConfig + 7, // 16: envoy.config.rbac.v3.Principal.and_ids:type_name -> envoy.config.rbac.v3.Principal.Set + 7, // 17: envoy.config.rbac.v3.Principal.or_ids:type_name -> envoy.config.rbac.v3.Principal.Set + 8, // 18: envoy.config.rbac.v3.Principal.authenticated:type_name -> envoy.config.rbac.v3.Principal.Authenticated + 13, // 19: envoy.config.rbac.v3.Principal.source_ip:type_name -> envoy.config.core.v3.CidrRange + 13, // 20: envoy.config.rbac.v3.Principal.direct_remote_ip:type_name -> envoy.config.core.v3.CidrRange + 13, // 21: envoy.config.rbac.v3.Principal.remote_ip:type_name -> envoy.config.core.v3.CidrRange + 11, // 22: envoy.config.rbac.v3.Principal.header:type_name -> envoy.config.route.v3.HeaderMatcher + 12, // 23: envoy.config.rbac.v3.Principal.url_path:type_name -> envoy.type.matcher.v3.PathMatcher + 15, // 24: envoy.config.rbac.v3.Principal.metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher + 4, // 25: envoy.config.rbac.v3.Principal.not_id:type_name -> envoy.config.rbac.v3.Principal + 2, // 26: envoy.config.rbac.v3.RBAC.PoliciesEntry.value:type_name -> envoy.config.rbac.v3.Policy + 3, // 27: envoy.config.rbac.v3.Permission.Set.rules:type_name -> envoy.config.rbac.v3.Permission + 4, // 28: envoy.config.rbac.v3.Principal.Set.ids:type_name -> envoy.config.rbac.v3.Principal + 16, // 29: envoy.config.rbac.v3.Principal.Authenticated.principal_name:type_name -> envoy.type.matcher.v3.StringMatcher + 30, // [30:30] is the sub-list for method output_type + 30, // [30:30] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name } func init() { file_envoy_config_rbac_v3_rbac_proto_init() } @@ -1276,9 +1333,11 @@ func file_envoy_config_rbac_v3_rbac_proto_init() { (*Permission_UrlPath)(nil), (*Permission_DestinationIp)(nil), (*Permission_DestinationPort)(nil), + (*Permission_DestinationPortRange)(nil), (*Permission_Metadata)(nil), (*Permission_NotRule)(nil), (*Permission_RequestedServerName)(nil), + (*Permission_Matcher)(nil), } file_envoy_config_rbac_v3_rbac_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Principal_AndIds)(nil), diff --git a/pkg/api/envoy/config/rbac/v3/rbac.pb.validate.go b/pkg/api/envoy/config/rbac/v3/rbac.pb.validate.go index 82e256bd5e..7e9bf262db 100644 --- a/pkg/api/envoy/config/rbac/v3/rbac.pb.validate.go +++ b/pkg/api/envoy/config/rbac/v3/rbac.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/rbac/v3/rbac.proto -package envoy_config_rbac_v3 +package rbacv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,43 +31,111 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := RBAC_Action_name[int32(m.GetAction())]; !ok { - return RBACValidationError{ + err := RBACValidationError{ field: "Action", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - for key, val := range m.GetPolicies() { - _ = val - - // no validation rules for Policies[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACValidationError{ - field: fmt.Sprintf("Policies[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetPolicies())) + i := 0 + for key := range m.GetPolicies() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetPolicies()[key] + _ = val + + // no validation rules for Policies[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return RBACMultiError(errors) } return nil } +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + // RBACValidationError is the validation error returned by RBAC.Validate if the // designated constraints aren't met. type RBACValidationError struct { @@ -122,23 +191,60 @@ var _ interface { } = RBACValidationError{} // Validate checks the field values on Policy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Policy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Policy with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in PolicyMultiError, or nil if none found. +func (m *Policy) ValidateAll() error { + return m.validate(true) +} + +func (m *Policy) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPermissions()) < 1 { - return PolicyValidationError{ + err := PolicyValidationError{ field: "Permissions", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPermissions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Permissions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Permissions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PolicyValidationError{ field: fmt.Sprintf("Permissions[%v]", idx), @@ -151,16 +257,39 @@ func (m *Policy) Validate() error { } if len(m.GetPrincipals()) < 1 { - return PolicyValidationError{ + err := PolicyValidationError{ field: "Principals", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPrincipals() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Principals[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Principals[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PolicyValidationError{ field: fmt.Sprintf("Principals[%v]", idx), @@ -172,7 +301,26 @@ func (m *Policy) Validate() error { } - if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCondition()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "Condition", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "Condition", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PolicyValidationError{ field: "Condition", @@ -182,7 +330,26 @@ func (m *Policy) Validate() error { } } - if v, ok := interface{}(m.GetCheckedCondition()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCheckedCondition()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "CheckedCondition", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "CheckedCondition", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCheckedCondition()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PolicyValidationError{ field: "CheckedCondition", @@ -192,9 +359,29 @@ func (m *Policy) Validate() error { } } + if len(errors) > 0 { + return PolicyMultiError(errors) + } + return nil } +// PolicyMultiError is an error wrapping multiple validation errors returned by +// Policy.ValidateAll() if the designated constraints aren't met. +type PolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PolicyMultiError) AllErrors() []error { return m } + // PolicyValidationError is the validation error returned by Policy.Validate if // the designated constraints aren't met. type PolicyValidationError struct { @@ -250,17 +437,51 @@ var _ interface { } = PolicyValidationError{} // Validate checks the field values on Permission with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Permission) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Permission with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PermissionMultiError, or +// nil if none found. +func (m *Permission) ValidateAll() error { + return m.validate(true) +} + +func (m *Permission) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *Permission_AndRules: - if v, ok := interface{}(m.GetAndRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "AndRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "AndRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "AndRules", @@ -272,7 +493,26 @@ func (m *Permission) Validate() error { case *Permission_OrRules: - if v, ok := interface{}(m.GetOrRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "OrRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "OrRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "OrRules", @@ -285,15 +525,38 @@ func (m *Permission) Validate() error { case *Permission_Any: if m.GetAny() != true { - return PermissionValidationError{ + err := PermissionValidationError{ field: "Any", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *Permission_Header: - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "Header", @@ -305,7 +568,26 @@ func (m *Permission) Validate() error { case *Permission_UrlPath: - if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUrlPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "UrlPath", @@ -317,7 +599,26 @@ func (m *Permission) Validate() error { case *Permission_DestinationIp: - if v, ok := interface{}(m.GetDestinationIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestinationIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "DestinationIp", @@ -330,15 +631,69 @@ func (m *Permission) Validate() error { case *Permission_DestinationPort: if m.GetDestinationPort() > 65535 { - return PermissionValidationError{ + err := PermissionValidationError{ field: "DestinationPort", reason: "value must be less than or equal to 65535", } + if !all { + return err + } + errors = append(errors, err) + } + + case *Permission_DestinationPortRange: + + if all { + switch v := interface{}(m.GetDestinationPortRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + } + } } case *Permission_Metadata: - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "Metadata", @@ -350,7 +705,26 @@ func (m *Permission) Validate() error { case *Permission_NotRule: - if v, ok := interface{}(m.GetNotRule()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotRule()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "NotRule", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "NotRule", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotRule()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "NotRule", @@ -362,7 +736,26 @@ func (m *Permission) Validate() error { case *Permission_RequestedServerName: - if v, ok := interface{}(m.GetRequestedServerName()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestedServerName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "RequestedServerName", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "RequestedServerName", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestedServerName()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionValidationError{ field: "RequestedServerName", @@ -372,17 +765,72 @@ func (m *Permission) Validate() error { } } + case *Permission_Matcher: + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: - return PermissionValidationError{ + err := PermissionValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return PermissionMultiError(errors) + } + return nil } +// PermissionMultiError is an error wrapping multiple validation errors +// returned by Permission.ValidateAll() if the designated constraints aren't met. +type PermissionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PermissionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PermissionMultiError) AllErrors() []error { return m } + // PermissionValidationError is the validation error returned by // Permission.Validate if the designated constraints aren't met. type PermissionValidationError struct { @@ -438,17 +886,51 @@ var _ interface { } = PermissionValidationError{} // Validate checks the field values on Principal with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Principal) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PrincipalMultiError, or nil +// if none found. +func (m *Principal) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Identifier.(type) { case *Principal_AndIds: - if v, ok := interface{}(m.GetAndIds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndIds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "AndIds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "AndIds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndIds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "AndIds", @@ -460,7 +942,26 @@ func (m *Principal) Validate() error { case *Principal_OrIds: - if v, ok := interface{}(m.GetOrIds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrIds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "OrIds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "OrIds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrIds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "OrIds", @@ -473,15 +974,38 @@ func (m *Principal) Validate() error { case *Principal_Any: if m.GetAny() != true { - return PrincipalValidationError{ + err := PrincipalValidationError{ field: "Any", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *Principal_Authenticated_: - if v, ok := interface{}(m.GetAuthenticated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAuthenticated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Authenticated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Authenticated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthenticated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "Authenticated", @@ -493,7 +1017,26 @@ func (m *Principal) Validate() error { case *Principal_SourceIp: - if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "SourceIp", @@ -505,7 +1048,26 @@ func (m *Principal) Validate() error { case *Principal_DirectRemoteIp: - if v, ok := interface{}(m.GetDirectRemoteIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDirectRemoteIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "DirectRemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "DirectRemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDirectRemoteIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "DirectRemoteIp", @@ -517,7 +1079,26 @@ func (m *Principal) Validate() error { case *Principal_RemoteIp: - if v, ok := interface{}(m.GetRemoteIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "RemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "RemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "RemoteIp", @@ -529,7 +1110,26 @@ func (m *Principal) Validate() error { case *Principal_Header: - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "Header", @@ -541,7 +1141,26 @@ func (m *Principal) Validate() error { case *Principal_UrlPath: - if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUrlPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "UrlPath", @@ -553,7 +1172,26 @@ func (m *Principal) Validate() error { case *Principal_Metadata: - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "Metadata", @@ -565,7 +1203,26 @@ func (m *Principal) Validate() error { case *Principal_NotId: - if v, ok := interface{}(m.GetNotId()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "NotId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "NotId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrincipalValidationError{ field: "NotId", @@ -576,16 +1233,40 @@ func (m *Principal) Validate() error { } default: - return PrincipalValidationError{ + err := PrincipalValidationError{ field: "Identifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return PrincipalMultiError(errors) + } + return nil } +// PrincipalMultiError is an error wrapping multiple validation errors returned +// by Principal.ValidateAll() if the designated constraints aren't met. +type PrincipalMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PrincipalMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PrincipalMultiError) AllErrors() []error { return m } + // PrincipalValidationError is the validation error returned by // Principal.Validate if the designated constraints aren't met. type PrincipalValidationError struct { @@ -641,24 +1322,61 @@ var _ interface { } = PrincipalValidationError{} // Validate checks the field values on Permission_Set with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Permission_Set) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Permission_Set with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Permission_SetMultiError, +// or nil if none found. +func (m *Permission_Set) ValidateAll() error { + return m.validate(true) +} + +func (m *Permission_Set) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRules()) < 1 { - return Permission_SetValidationError{ + err := Permission_SetValidationError{ field: "Rules", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Permission_SetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Permission_SetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Permission_SetValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -670,9 +1388,30 @@ func (m *Permission_Set) Validate() error { } + if len(errors) > 0 { + return Permission_SetMultiError(errors) + } + return nil } +// Permission_SetMultiError is an error wrapping multiple validation errors +// returned by Permission_Set.ValidateAll() if the designated constraints +// aren't met. +type Permission_SetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Permission_SetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Permission_SetMultiError) AllErrors() []error { return m } + // Permission_SetValidationError is the validation error returned by // Permission_Set.Validate if the designated constraints aren't met. type Permission_SetValidationError struct { @@ -728,24 +1467,61 @@ var _ interface { } = Permission_SetValidationError{} // Validate checks the field values on Principal_Set with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Principal_Set) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal_Set with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Principal_SetMultiError, or +// nil if none found. +func (m *Principal_Set) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal_Set) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetIds()) < 1 { - return Principal_SetValidationError{ + err := Principal_SetValidationError{ field: "Ids", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetIds() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Principal_SetValidationError{ + field: fmt.Sprintf("Ids[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Principal_SetValidationError{ + field: fmt.Sprintf("Ids[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Principal_SetValidationError{ field: fmt.Sprintf("Ids[%v]", idx), @@ -757,9 +1533,30 @@ func (m *Principal_Set) Validate() error { } + if len(errors) > 0 { + return Principal_SetMultiError(errors) + } + return nil } +// Principal_SetMultiError is an error wrapping multiple validation errors +// returned by Principal_Set.ValidateAll() if the designated constraints +// aren't met. +type Principal_SetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Principal_SetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Principal_SetMultiError) AllErrors() []error { return m } + // Principal_SetValidationError is the validation error returned by // Principal_Set.Validate if the designated constraints aren't met. type Principal_SetValidationError struct { @@ -816,13 +1613,46 @@ var _ interface { // Validate checks the field values on Principal_Authenticated with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Principal_Authenticated) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal_Authenticated with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Principal_AuthenticatedMultiError, or nil if none found. +func (m *Principal_Authenticated) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal_Authenticated) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPrincipalName()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPrincipalName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Principal_AuthenticatedValidationError{ + field: "PrincipalName", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Principal_AuthenticatedValidationError{ + field: "PrincipalName", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrincipalName()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Principal_AuthenticatedValidationError{ field: "PrincipalName", @@ -832,9 +1662,30 @@ func (m *Principal_Authenticated) Validate() error { } } + if len(errors) > 0 { + return Principal_AuthenticatedMultiError(errors) + } + return nil } +// Principal_AuthenticatedMultiError is an error wrapping multiple validation +// errors returned by Principal_Authenticated.ValidateAll() if the designated +// constraints aren't met. +type Principal_AuthenticatedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Principal_AuthenticatedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Principal_AuthenticatedMultiError) AllErrors() []error { return m } + // Principal_AuthenticatedValidationError is the validation error returned by // Principal_Authenticated.Validate if the designated constraints aren't met. type Principal_AuthenticatedValidationError struct { diff --git a/pkg/api/envoy/config/rbac/v4alpha/rbac.pb.go b/pkg/api/envoy/config/rbac/v4alpha/rbac.pb.go deleted file mode 100644 index 136805e9bf..0000000000 --- a/pkg/api/envoy/config/rbac/v4alpha/rbac.pb.go +++ /dev/null @@ -1,1353 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/rbac/v4alpha/rbac.proto - -package envoy_config_rbac_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Should we do safe-list or block-list style access control? -type RBAC_Action int32 - -const ( - // The policies grant access to principals. The rest are denied. This is safe-list style - // access control. This is the default type. - RBAC_ALLOW RBAC_Action = 0 - // The policies deny access to principals. The rest are allowed. This is block-list style - // access control. - RBAC_DENY RBAC_Action = 1 - // The policies set the `access_log_hint` dynamic metadata key based on if requests match. - // All requests are allowed. - RBAC_LOG RBAC_Action = 2 -) - -// Enum value maps for RBAC_Action. -var ( - RBAC_Action_name = map[int32]string{ - 0: "ALLOW", - 1: "DENY", - 2: "LOG", - } - RBAC_Action_value = map[string]int32{ - "ALLOW": 0, - "DENY": 1, - "LOG": 2, - } -) - -func (x RBAC_Action) Enum() *RBAC_Action { - p := new(RBAC_Action) - *p = x - return p -} - -func (x RBAC_Action) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RBAC_Action) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_rbac_v4alpha_rbac_proto_enumTypes[0].Descriptor() -} - -func (RBAC_Action) Type() protoreflect.EnumType { - return &file_envoy_config_rbac_v4alpha_rbac_proto_enumTypes[0] -} - -func (x RBAC_Action) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RBAC_Action.Descriptor instead. -func (RBAC_Action) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{0, 0} -} - -// Role Based Access Control (RBAC) provides service-level and method-level access control for a -// service. RBAC policies are additive. The policies are examined in order. Requests are allowed -// or denied based on the `action` and whether a matching policy is found. For instance, if the -// action is ALLOW and a matching policy is found the request should be allowed. -// -// RBAC can also be used to make access logging decisions by communicating with access loggers -// through dynamic metadata. When the action is LOG and at least one policy matches, the -// `access_log_hint` value in the shared key namespace 'envoy.common' is set to `true` indicating -// the request should be logged. -// -// Here is an example of RBAC configuration. It has two policies: -// -// * Service account "cluster.local/ns/default/sa/admin" has full access to the service, and so -// does "cluster.local/ns/default/sa/superuser". -// -// * Any user can read ("GET") the service at paths with prefix "/products", so long as the -// destination port is either 80 or 443. -// -// .. code-block:: yaml -// -// action: ALLOW -// policies: -// "service-admin": -// permissions: -// - any: true -// principals: -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/admin" -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/superuser" -// "product-viewer": -// permissions: -// - and_rules: -// rules: -// - header: { name: ":method", exact_match: "GET" } -// - url_path: -// path: { prefix: "/products" } -// - or_rules: -// rules: -// - destination_port: 80 -// - destination_port: 443 -// principals: -// - any: true -// -type RBAC struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The action to take if a policy matches. Every action either allows or denies a request, - // and can also carry out action-specific operations. - // - // Actions: - // - // * ALLOW: Allows the request if and only if there is a policy that matches - // the request. - // * DENY: Allows the request if and only if there are no policies that - // match the request. - // * LOG: Allows all requests. If at least one policy matches, the dynamic - // metadata key `access_log_hint` is set to the value `true` under the shared - // key namespace 'envoy.common'. If no policies match, it is set to `false`. - // Other actions do not modify this key. - // - Action RBAC_Action `protobuf:"varint,1,opt,name=action,proto3,enum=envoy.config.rbac.v4alpha.RBAC_Action" json:"action,omitempty"` - // Maps from policy name to policy. A match occurs when at least one policy matches the request. - Policies map[string]*Policy `protobuf:"bytes,2,rep,name=policies,proto3" json:"policies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *RBAC) Reset() { - *x = RBAC{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RBAC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RBAC) ProtoMessage() {} - -func (x *RBAC) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RBAC.ProtoReflect.Descriptor instead. -func (*RBAC) Descriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{0} -} - -func (x *RBAC) GetAction() RBAC_Action { - if x != nil { - return x.Action - } - return RBAC_ALLOW -} - -func (x *RBAC) GetPolicies() map[string]*Policy { - if x != nil { - return x.Policies - } - return nil -} - -// Policy specifies a role and the principals that are assigned/denied the role. -// A policy matches if and only if at least one of its permissions match the -// action taking place AND at least one of its principals match the downstream -// AND the condition is true if specified. -type Policy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The set of permissions that define a role. Each permission is - // matched with OR semantics. To match all actions for this policy, a single - // Permission with the `any` field set to true should be used. - Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` - // Required. The set of principals that are assigned/denied the role based on - // “action”. Each principal is matched with OR semantics. To match all - // downstreams for this policy, a single Principal with the `any` field set to - // true should be used. - Principals []*Principal `protobuf:"bytes,2,rep,name=principals,proto3" json:"principals,omitempty"` - // Types that are assignable to ExpressionSpecifier: - // *Policy_Condition - // *Policy_CheckedCondition - ExpressionSpecifier isPolicy_ExpressionSpecifier `protobuf_oneof:"expression_specifier"` -} - -func (x *Policy) Reset() { - *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Policy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Policy) ProtoMessage() {} - -func (x *Policy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Policy.ProtoReflect.Descriptor instead. -func (*Policy) Descriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{1} -} - -func (x *Policy) GetPermissions() []*Permission { - if x != nil { - return x.Permissions - } - return nil -} - -func (x *Policy) GetPrincipals() []*Principal { - if x != nil { - return x.Principals - } - return nil -} - -func (m *Policy) GetExpressionSpecifier() isPolicy_ExpressionSpecifier { - if m != nil { - return m.ExpressionSpecifier - } - return nil -} - -func (x *Policy) GetCondition() *v1alpha1.Expr { - if x, ok := x.GetExpressionSpecifier().(*Policy_Condition); ok { - return x.Condition - } - return nil -} - -func (x *Policy) GetCheckedCondition() *v1alpha1.CheckedExpr { - if x, ok := x.GetExpressionSpecifier().(*Policy_CheckedCondition); ok { - return x.CheckedCondition - } - return nil -} - -type isPolicy_ExpressionSpecifier interface { - isPolicy_ExpressionSpecifier() -} - -type Policy_Condition struct { - // An optional symbolic expression specifying an access control - // :ref:`condition `. The condition is combined - // with the permissions and the principals as a clause with AND semantics. - // Only be used when checked_condition is not used. - Condition *v1alpha1.Expr `protobuf:"bytes,3,opt,name=condition,proto3,oneof"` -} - -type Policy_CheckedCondition struct { - // [#not-implemented-hide:] - // An optional symbolic expression that has been successfully type checked. - // Only be used when condition is not used. - CheckedCondition *v1alpha1.CheckedExpr `protobuf:"bytes,4,opt,name=checked_condition,json=checkedCondition,proto3,oneof"` -} - -func (*Policy_Condition) isPolicy_ExpressionSpecifier() {} - -func (*Policy_CheckedCondition) isPolicy_ExpressionSpecifier() {} - -// Permission defines an action (or actions) that a principal can take. -// [#next-free-field: 11] -type Permission struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *Permission_AndRules - // *Permission_OrRules - // *Permission_Any - // *Permission_Header - // *Permission_UrlPath - // *Permission_DestinationIp - // *Permission_DestinationPort - // *Permission_Metadata - // *Permission_NotRule - // *Permission_RequestedServerName - Rule isPermission_Rule `protobuf_oneof:"rule"` -} - -func (x *Permission) Reset() { - *x = Permission{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Permission) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Permission) ProtoMessage() {} - -func (x *Permission) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Permission.ProtoReflect.Descriptor instead. -func (*Permission) Descriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{2} -} - -func (m *Permission) GetRule() isPermission_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *Permission) GetAndRules() *Permission_Set { - if x, ok := x.GetRule().(*Permission_AndRules); ok { - return x.AndRules - } - return nil -} - -func (x *Permission) GetOrRules() *Permission_Set { - if x, ok := x.GetRule().(*Permission_OrRules); ok { - return x.OrRules - } - return nil -} - -func (x *Permission) GetAny() bool { - if x, ok := x.GetRule().(*Permission_Any); ok { - return x.Any - } - return false -} - -func (x *Permission) GetHeader() *v4alpha.HeaderMatcher { - if x, ok := x.GetRule().(*Permission_Header); ok { - return x.Header - } - return nil -} - -func (x *Permission) GetUrlPath() *v4alpha1.PathMatcher { - if x, ok := x.GetRule().(*Permission_UrlPath); ok { - return x.UrlPath - } - return nil -} - -func (x *Permission) GetDestinationIp() *v4alpha2.CidrRange { - if x, ok := x.GetRule().(*Permission_DestinationIp); ok { - return x.DestinationIp - } - return nil -} - -func (x *Permission) GetDestinationPort() uint32 { - if x, ok := x.GetRule().(*Permission_DestinationPort); ok { - return x.DestinationPort - } - return 0 -} - -func (x *Permission) GetMetadata() *v4alpha1.MetadataMatcher { - if x, ok := x.GetRule().(*Permission_Metadata); ok { - return x.Metadata - } - return nil -} - -func (x *Permission) GetNotRule() *Permission { - if x, ok := x.GetRule().(*Permission_NotRule); ok { - return x.NotRule - } - return nil -} - -func (x *Permission) GetRequestedServerName() *v4alpha1.StringMatcher { - if x, ok := x.GetRule().(*Permission_RequestedServerName); ok { - return x.RequestedServerName - } - return nil -} - -type isPermission_Rule interface { - isPermission_Rule() -} - -type Permission_AndRules struct { - // A set of rules that all must match in order to define the action. - AndRules *Permission_Set `protobuf:"bytes,1,opt,name=and_rules,json=andRules,proto3,oneof"` -} - -type Permission_OrRules struct { - // A set of rules where at least one must match in order to define the action. - OrRules *Permission_Set `protobuf:"bytes,2,opt,name=or_rules,json=orRules,proto3,oneof"` -} - -type Permission_Any struct { - // When any is set, it matches any action. - Any bool `protobuf:"varint,3,opt,name=any,proto3,oneof"` -} - -type Permission_Header struct { - // A header (or pseudo-header such as :path or :method) on the incoming HTTP request. Only - // available for HTTP request. - // Note: the pseudo-header :path includes the query and fragment string. Use the `url_path` - // field if you want to match the URL path without the query and fragment string. - Header *v4alpha.HeaderMatcher `protobuf:"bytes,4,opt,name=header,proto3,oneof"` -} - -type Permission_UrlPath struct { - // A URL path on the incoming HTTP request. Only available for HTTP. - UrlPath *v4alpha1.PathMatcher `protobuf:"bytes,10,opt,name=url_path,json=urlPath,proto3,oneof"` -} - -type Permission_DestinationIp struct { - // A CIDR block that describes the destination IP. - DestinationIp *v4alpha2.CidrRange `protobuf:"bytes,5,opt,name=destination_ip,json=destinationIp,proto3,oneof"` -} - -type Permission_DestinationPort struct { - // A port number that describes the destination port connecting to. - DestinationPort uint32 `protobuf:"varint,6,opt,name=destination_port,json=destinationPort,proto3,oneof"` -} - -type Permission_Metadata struct { - // Metadata that describes additional information about the action. - Metadata *v4alpha1.MetadataMatcher `protobuf:"bytes,7,opt,name=metadata,proto3,oneof"` -} - -type Permission_NotRule struct { - // Negates matching the provided permission. For instance, if the value of - // `not_rule` would match, this permission would not match. Conversely, if - // the value of `not_rule` would not match, this permission would match. - NotRule *Permission `protobuf:"bytes,8,opt,name=not_rule,json=notRule,proto3,oneof"` -} - -type Permission_RequestedServerName struct { - // The request server from the client's connection request. This is - // typically TLS SNI. - // - // .. attention:: - // - // The behavior of this field may be affected by how Envoy is configured - // as explained below. - // - // * If the :ref:`TLS Inspector ` - // filter is not added, and if a `FilterChainMatch` is not defined for - // the :ref:`server name - // `, - // a TLS connection's requested SNI server name will be treated as if it - // wasn't present. - // - // * A :ref:`listener filter ` may - // overwrite a connection's requested server name within Envoy. - // - // Please refer to :ref:`this FAQ entry ` to learn to - // setup SNI. - RequestedServerName *v4alpha1.StringMatcher `protobuf:"bytes,9,opt,name=requested_server_name,json=requestedServerName,proto3,oneof"` -} - -func (*Permission_AndRules) isPermission_Rule() {} - -func (*Permission_OrRules) isPermission_Rule() {} - -func (*Permission_Any) isPermission_Rule() {} - -func (*Permission_Header) isPermission_Rule() {} - -func (*Permission_UrlPath) isPermission_Rule() {} - -func (*Permission_DestinationIp) isPermission_Rule() {} - -func (*Permission_DestinationPort) isPermission_Rule() {} - -func (*Permission_Metadata) isPermission_Rule() {} - -func (*Permission_NotRule) isPermission_Rule() {} - -func (*Permission_RequestedServerName) isPermission_Rule() {} - -// Principal defines an identity or a group of identities for a downstream -// subject. -// [#next-free-field: 12] -type Principal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Identifier: - // *Principal_AndIds - // *Principal_OrIds - // *Principal_Any - // *Principal_Authenticated_ - // *Principal_HiddenEnvoyDeprecatedSourceIp - // *Principal_DirectRemoteIp - // *Principal_RemoteIp - // *Principal_Header - // *Principal_UrlPath - // *Principal_Metadata - // *Principal_NotId - Identifier isPrincipal_Identifier `protobuf_oneof:"identifier"` -} - -func (x *Principal) Reset() { - *x = Principal{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Principal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Principal) ProtoMessage() {} - -func (x *Principal) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Principal.ProtoReflect.Descriptor instead. -func (*Principal) Descriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{3} -} - -func (m *Principal) GetIdentifier() isPrincipal_Identifier { - if m != nil { - return m.Identifier - } - return nil -} - -func (x *Principal) GetAndIds() *Principal_Set { - if x, ok := x.GetIdentifier().(*Principal_AndIds); ok { - return x.AndIds - } - return nil -} - -func (x *Principal) GetOrIds() *Principal_Set { - if x, ok := x.GetIdentifier().(*Principal_OrIds); ok { - return x.OrIds - } - return nil -} - -func (x *Principal) GetAny() bool { - if x, ok := x.GetIdentifier().(*Principal_Any); ok { - return x.Any - } - return false -} - -func (x *Principal) GetAuthenticated() *Principal_Authenticated { - if x, ok := x.GetIdentifier().(*Principal_Authenticated_); ok { - return x.Authenticated - } - return nil -} - -// Deprecated: Do not use. -func (x *Principal) GetHiddenEnvoyDeprecatedSourceIp() *v4alpha2.CidrRange { - if x, ok := x.GetIdentifier().(*Principal_HiddenEnvoyDeprecatedSourceIp); ok { - return x.HiddenEnvoyDeprecatedSourceIp - } - return nil -} - -func (x *Principal) GetDirectRemoteIp() *v4alpha2.CidrRange { - if x, ok := x.GetIdentifier().(*Principal_DirectRemoteIp); ok { - return x.DirectRemoteIp - } - return nil -} - -func (x *Principal) GetRemoteIp() *v4alpha2.CidrRange { - if x, ok := x.GetIdentifier().(*Principal_RemoteIp); ok { - return x.RemoteIp - } - return nil -} - -func (x *Principal) GetHeader() *v4alpha.HeaderMatcher { - if x, ok := x.GetIdentifier().(*Principal_Header); ok { - return x.Header - } - return nil -} - -func (x *Principal) GetUrlPath() *v4alpha1.PathMatcher { - if x, ok := x.GetIdentifier().(*Principal_UrlPath); ok { - return x.UrlPath - } - return nil -} - -func (x *Principal) GetMetadata() *v4alpha1.MetadataMatcher { - if x, ok := x.GetIdentifier().(*Principal_Metadata); ok { - return x.Metadata - } - return nil -} - -func (x *Principal) GetNotId() *Principal { - if x, ok := x.GetIdentifier().(*Principal_NotId); ok { - return x.NotId - } - return nil -} - -type isPrincipal_Identifier interface { - isPrincipal_Identifier() -} - -type Principal_AndIds struct { - // A set of identifiers that all must match in order to define the - // downstream. - AndIds *Principal_Set `protobuf:"bytes,1,opt,name=and_ids,json=andIds,proto3,oneof"` -} - -type Principal_OrIds struct { - // A set of identifiers at least one must match in order to define the - // downstream. - OrIds *Principal_Set `protobuf:"bytes,2,opt,name=or_ids,json=orIds,proto3,oneof"` -} - -type Principal_Any struct { - // When any is set, it matches any downstream. - Any bool `protobuf:"varint,3,opt,name=any,proto3,oneof"` -} - -type Principal_Authenticated_ struct { - // Authenticated attributes that identify the downstream. - Authenticated *Principal_Authenticated `protobuf:"bytes,4,opt,name=authenticated,proto3,oneof"` -} - -type Principal_HiddenEnvoyDeprecatedSourceIp struct { - // A CIDR block that describes the downstream IP. - // This address will honor proxy protocol, but will not honor XFF. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedSourceIp *v4alpha2.CidrRange `protobuf:"bytes,5,opt,name=hidden_envoy_deprecated_source_ip,json=hiddenEnvoyDeprecatedSourceIp,proto3,oneof"` -} - -type Principal_DirectRemoteIp struct { - // A CIDR block that describes the downstream remote/origin address. - // Note: This is always the physical peer even if the - // :ref:`remote_ip ` is - // inferred from for example the x-forwarder-for header, proxy protocol, - // etc. - DirectRemoteIp *v4alpha2.CidrRange `protobuf:"bytes,10,opt,name=direct_remote_ip,json=directRemoteIp,proto3,oneof"` -} - -type Principal_RemoteIp struct { - // A CIDR block that describes the downstream remote/origin address. - // Note: This may not be the physical peer and could be different from the - // :ref:`direct_remote_ip - // `. E.g, if the - // remote ip is inferred from for example the x-forwarder-for header, proxy - // protocol, etc. - RemoteIp *v4alpha2.CidrRange `protobuf:"bytes,11,opt,name=remote_ip,json=remoteIp,proto3,oneof"` -} - -type Principal_Header struct { - // A header (or pseudo-header such as :path or :method) on the incoming HTTP - // request. Only available for HTTP request. Note: the pseudo-header :path - // includes the query and fragment string. Use the `url_path` field if you - // want to match the URL path without the query and fragment string. - Header *v4alpha.HeaderMatcher `protobuf:"bytes,6,opt,name=header,proto3,oneof"` -} - -type Principal_UrlPath struct { - // A URL path on the incoming HTTP request. Only available for HTTP. - UrlPath *v4alpha1.PathMatcher `protobuf:"bytes,9,opt,name=url_path,json=urlPath,proto3,oneof"` -} - -type Principal_Metadata struct { - // Metadata that describes additional information about the principal. - Metadata *v4alpha1.MetadataMatcher `protobuf:"bytes,7,opt,name=metadata,proto3,oneof"` -} - -type Principal_NotId struct { - // Negates matching the provided principal. For instance, if the value of - // `not_id` would match, this principal would not match. Conversely, if the - // value of `not_id` would not match, this principal would match. - NotId *Principal `protobuf:"bytes,8,opt,name=not_id,json=notId,proto3,oneof"` -} - -func (*Principal_AndIds) isPrincipal_Identifier() {} - -func (*Principal_OrIds) isPrincipal_Identifier() {} - -func (*Principal_Any) isPrincipal_Identifier() {} - -func (*Principal_Authenticated_) isPrincipal_Identifier() {} - -func (*Principal_HiddenEnvoyDeprecatedSourceIp) isPrincipal_Identifier() {} - -func (*Principal_DirectRemoteIp) isPrincipal_Identifier() {} - -func (*Principal_RemoteIp) isPrincipal_Identifier() {} - -func (*Principal_Header) isPrincipal_Identifier() {} - -func (*Principal_UrlPath) isPrincipal_Identifier() {} - -func (*Principal_Metadata) isPrincipal_Identifier() {} - -func (*Principal_NotId) isPrincipal_Identifier() {} - -// Used in the `and_rules` and `or_rules` fields in the `rule` oneof. Depending on the context, -// each are applied with the associated behavior. -type Permission_Set struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rules []*Permission `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *Permission_Set) Reset() { - *x = Permission_Set{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Permission_Set) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Permission_Set) ProtoMessage() {} - -func (x *Permission_Set) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Permission_Set.ProtoReflect.Descriptor instead. -func (*Permission_Set) Descriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *Permission_Set) GetRules() []*Permission { - if x != nil { - return x.Rules - } - return nil -} - -// Used in the `and_ids` and `or_ids` fields in the `identifier` oneof. -// Depending on the context, each are applied with the associated behavior. -type Principal_Set struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ids []*Principal `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` -} - -func (x *Principal_Set) Reset() { - *x = Principal_Set{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Principal_Set) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Principal_Set) ProtoMessage() {} - -func (x *Principal_Set) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Principal_Set.ProtoReflect.Descriptor instead. -func (*Principal_Set) Descriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *Principal_Set) GetIds() []*Principal { - if x != nil { - return x.Ids - } - return nil -} - -// Authentication attributes for a downstream. -type Principal_Authenticated struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the principal. If set, The URI SAN or DNS SAN in that order - // is used from the certificate, otherwise the subject field is used. If - // unset, it applies to any user that is authenticated. - PrincipalName *v4alpha1.StringMatcher `protobuf:"bytes,2,opt,name=principal_name,json=principalName,proto3" json:"principal_name,omitempty"` -} - -func (x *Principal_Authenticated) Reset() { - *x = Principal_Authenticated{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Principal_Authenticated) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Principal_Authenticated) ProtoMessage() {} - -func (x *Principal_Authenticated) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Principal_Authenticated.ProtoReflect.Descriptor instead. -func (*Principal_Authenticated) Descriptor() ([]byte, []int) { - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{3, 1} -} - -func (x *Principal_Authenticated) GetPrincipalName() *v4alpha1.StringMatcher { - if x != nil { - return x.PrincipalName - } - return nil -} - -var File_envoy_config_rbac_v4alpha_rbac_proto protoreflect.FileDescriptor - -var file_envoy_config_rbac_v4alpha_rbac_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x62, 0x61, 0x63, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, - 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, - 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc5, 0x02, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x48, 0x0a, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, - 0x1a, 0x5e, 0x0a, 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x26, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, - 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x01, 0x12, - 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x47, 0x10, 0x02, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, - 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, - 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x22, 0xfd, 0x02, 0x0a, 0x06, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x51, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, - 0x61, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x09, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x10, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x22, - 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x42, 0x16, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xec, 0x06, 0x0a, 0x0a, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x09, 0x61, 0x6e, 0x64, - 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x52, 0x75, - 0x6c, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, - 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x61, - 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, - 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, - 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x61, 0x74, - 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x4d, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x70, 0x12, 0x36, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x49, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6c, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, - 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x5f, 0x0a, 0x15, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x78, 0x0a, 0x03, 0x53, 0x65, - 0x74, 0x12, 0x45, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, - 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, - 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x53, 0x65, 0x74, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, - 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x04, - 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xfb, 0x08, 0x0a, 0x09, 0x50, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x43, 0x0a, 0x07, 0x61, 0x6e, 0x64, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x53, - 0x65, 0x74, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x06, - 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, - 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x72, 0x49, 0x64, 0x73, 0x12, - 0x1b, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x5a, 0x0a, 0x0d, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x74, 0x0a, 0x21, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, - 0x1d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x50, - 0x0a, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, - 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, - 0x52, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, - 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x49, 0x70, 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x75, 0x72, - 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x49, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x6e, - 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x48, 0x00, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x64, 0x1a, 0x72, 0x0a, 0x03, 0x53, 0x65, - 0x74, 0x12, 0x40, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, - 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, - 0x69, 0x64, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x1a, 0x9c, - 0x01, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x50, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x3a, 0x25, 0x9a, - 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x42, 0x11, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3e, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_rbac_v4alpha_rbac_proto_rawDescOnce sync.Once - file_envoy_config_rbac_v4alpha_rbac_proto_rawDescData = file_envoy_config_rbac_v4alpha_rbac_proto_rawDesc -) - -func file_envoy_config_rbac_v4alpha_rbac_proto_rawDescGZIP() []byte { - file_envoy_config_rbac_v4alpha_rbac_proto_rawDescOnce.Do(func() { - file_envoy_config_rbac_v4alpha_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_rbac_v4alpha_rbac_proto_rawDescData) - }) - return file_envoy_config_rbac_v4alpha_rbac_proto_rawDescData -} - -var file_envoy_config_rbac_v4alpha_rbac_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_envoy_config_rbac_v4alpha_rbac_proto_goTypes = []interface{}{ - (RBAC_Action)(0), // 0: envoy.config.rbac.v4alpha.RBAC.Action - (*RBAC)(nil), // 1: envoy.config.rbac.v4alpha.RBAC - (*Policy)(nil), // 2: envoy.config.rbac.v4alpha.Policy - (*Permission)(nil), // 3: envoy.config.rbac.v4alpha.Permission - (*Principal)(nil), // 4: envoy.config.rbac.v4alpha.Principal - nil, // 5: envoy.config.rbac.v4alpha.RBAC.PoliciesEntry - (*Permission_Set)(nil), // 6: envoy.config.rbac.v4alpha.Permission.Set - (*Principal_Set)(nil), // 7: envoy.config.rbac.v4alpha.Principal.Set - (*Principal_Authenticated)(nil), // 8: envoy.config.rbac.v4alpha.Principal.Authenticated - (*v1alpha1.Expr)(nil), // 9: google.api.expr.v1alpha1.Expr - (*v1alpha1.CheckedExpr)(nil), // 10: google.api.expr.v1alpha1.CheckedExpr - (*v4alpha.HeaderMatcher)(nil), // 11: envoy.config.route.v4alpha.HeaderMatcher - (*v4alpha1.PathMatcher)(nil), // 12: envoy.type.matcher.v4alpha.PathMatcher - (*v4alpha2.CidrRange)(nil), // 13: envoy.config.core.v4alpha.CidrRange - (*v4alpha1.MetadataMatcher)(nil), // 14: envoy.type.matcher.v4alpha.MetadataMatcher - (*v4alpha1.StringMatcher)(nil), // 15: envoy.type.matcher.v4alpha.StringMatcher -} -var file_envoy_config_rbac_v4alpha_rbac_proto_depIdxs = []int32{ - 0, // 0: envoy.config.rbac.v4alpha.RBAC.action:type_name -> envoy.config.rbac.v4alpha.RBAC.Action - 5, // 1: envoy.config.rbac.v4alpha.RBAC.policies:type_name -> envoy.config.rbac.v4alpha.RBAC.PoliciesEntry - 3, // 2: envoy.config.rbac.v4alpha.Policy.permissions:type_name -> envoy.config.rbac.v4alpha.Permission - 4, // 3: envoy.config.rbac.v4alpha.Policy.principals:type_name -> envoy.config.rbac.v4alpha.Principal - 9, // 4: envoy.config.rbac.v4alpha.Policy.condition:type_name -> google.api.expr.v1alpha1.Expr - 10, // 5: envoy.config.rbac.v4alpha.Policy.checked_condition:type_name -> google.api.expr.v1alpha1.CheckedExpr - 6, // 6: envoy.config.rbac.v4alpha.Permission.and_rules:type_name -> envoy.config.rbac.v4alpha.Permission.Set - 6, // 7: envoy.config.rbac.v4alpha.Permission.or_rules:type_name -> envoy.config.rbac.v4alpha.Permission.Set - 11, // 8: envoy.config.rbac.v4alpha.Permission.header:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 12, // 9: envoy.config.rbac.v4alpha.Permission.url_path:type_name -> envoy.type.matcher.v4alpha.PathMatcher - 13, // 10: envoy.config.rbac.v4alpha.Permission.destination_ip:type_name -> envoy.config.core.v4alpha.CidrRange - 14, // 11: envoy.config.rbac.v4alpha.Permission.metadata:type_name -> envoy.type.matcher.v4alpha.MetadataMatcher - 3, // 12: envoy.config.rbac.v4alpha.Permission.not_rule:type_name -> envoy.config.rbac.v4alpha.Permission - 15, // 13: envoy.config.rbac.v4alpha.Permission.requested_server_name:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 7, // 14: envoy.config.rbac.v4alpha.Principal.and_ids:type_name -> envoy.config.rbac.v4alpha.Principal.Set - 7, // 15: envoy.config.rbac.v4alpha.Principal.or_ids:type_name -> envoy.config.rbac.v4alpha.Principal.Set - 8, // 16: envoy.config.rbac.v4alpha.Principal.authenticated:type_name -> envoy.config.rbac.v4alpha.Principal.Authenticated - 13, // 17: envoy.config.rbac.v4alpha.Principal.hidden_envoy_deprecated_source_ip:type_name -> envoy.config.core.v4alpha.CidrRange - 13, // 18: envoy.config.rbac.v4alpha.Principal.direct_remote_ip:type_name -> envoy.config.core.v4alpha.CidrRange - 13, // 19: envoy.config.rbac.v4alpha.Principal.remote_ip:type_name -> envoy.config.core.v4alpha.CidrRange - 11, // 20: envoy.config.rbac.v4alpha.Principal.header:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 12, // 21: envoy.config.rbac.v4alpha.Principal.url_path:type_name -> envoy.type.matcher.v4alpha.PathMatcher - 14, // 22: envoy.config.rbac.v4alpha.Principal.metadata:type_name -> envoy.type.matcher.v4alpha.MetadataMatcher - 4, // 23: envoy.config.rbac.v4alpha.Principal.not_id:type_name -> envoy.config.rbac.v4alpha.Principal - 2, // 24: envoy.config.rbac.v4alpha.RBAC.PoliciesEntry.value:type_name -> envoy.config.rbac.v4alpha.Policy - 3, // 25: envoy.config.rbac.v4alpha.Permission.Set.rules:type_name -> envoy.config.rbac.v4alpha.Permission - 4, // 26: envoy.config.rbac.v4alpha.Principal.Set.ids:type_name -> envoy.config.rbac.v4alpha.Principal - 15, // 27: envoy.config.rbac.v4alpha.Principal.Authenticated.principal_name:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 28, // [28:28] is the sub-list for method output_type - 28, // [28:28] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name -} - -func init() { file_envoy_config_rbac_v4alpha_rbac_proto_init() } -func file_envoy_config_rbac_v4alpha_rbac_proto_init() { - if File_envoy_config_rbac_v4alpha_rbac_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RBAC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Permission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Principal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Permission_Set); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Principal_Set); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Principal_Authenticated); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Policy_Condition)(nil), - (*Policy_CheckedCondition)(nil), - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Permission_AndRules)(nil), - (*Permission_OrRules)(nil), - (*Permission_Any)(nil), - (*Permission_Header)(nil), - (*Permission_UrlPath)(nil), - (*Permission_DestinationIp)(nil), - (*Permission_DestinationPort)(nil), - (*Permission_Metadata)(nil), - (*Permission_NotRule)(nil), - (*Permission_RequestedServerName)(nil), - } - file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Principal_AndIds)(nil), - (*Principal_OrIds)(nil), - (*Principal_Any)(nil), - (*Principal_Authenticated_)(nil), - (*Principal_HiddenEnvoyDeprecatedSourceIp)(nil), - (*Principal_DirectRemoteIp)(nil), - (*Principal_RemoteIp)(nil), - (*Principal_Header)(nil), - (*Principal_UrlPath)(nil), - (*Principal_Metadata)(nil), - (*Principal_NotId)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_rbac_v4alpha_rbac_proto_rawDesc, - NumEnums: 1, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_rbac_v4alpha_rbac_proto_goTypes, - DependencyIndexes: file_envoy_config_rbac_v4alpha_rbac_proto_depIdxs, - EnumInfos: file_envoy_config_rbac_v4alpha_rbac_proto_enumTypes, - MessageInfos: file_envoy_config_rbac_v4alpha_rbac_proto_msgTypes, - }.Build() - File_envoy_config_rbac_v4alpha_rbac_proto = out.File - file_envoy_config_rbac_v4alpha_rbac_proto_rawDesc = nil - file_envoy_config_rbac_v4alpha_rbac_proto_goTypes = nil - file_envoy_config_rbac_v4alpha_rbac_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/rbac/v4alpha/rbac.pb.validate.go b/pkg/api/envoy/config/rbac/v4alpha/rbac.pb.validate.go deleted file mode 100644 index d28164e0b0..0000000000 --- a/pkg/api/envoy/config/rbac/v4alpha/rbac.pb.validate.go +++ /dev/null @@ -1,900 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/rbac/v4alpha/rbac.proto - -package envoy_config_rbac_v4alpha - -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{} -) - -// Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *RBAC) Validate() error { - if m == nil { - return nil - } - - if _, ok := RBAC_Action_name[int32(m.GetAction())]; !ok { - return RBACValidationError{ - field: "Action", - reason: "value must be one of the defined enum values", - } - } - - for key, val := range m.GetPolicies() { - _ = val - - // no validation rules for Policies[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACValidationError{ - field: fmt.Sprintf("Policies[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// RBACValidationError is the validation error returned by RBAC.Validate if the -// designated constraints aren't met. -type RBACValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RBACValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RBACValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RBACValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RBACValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RBACValidationError) ErrorName() string { return "RBACValidationError" } - -// Error satisfies the builtin error interface -func (e RBACValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRBAC.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RBACValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RBACValidationError{} - -// Validate checks the field values on Policy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Policy) Validate() error { - if m == nil { - return nil - } - - if len(m.GetPermissions()) < 1 { - return PolicyValidationError{ - field: "Permissions", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetPermissions() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PolicyValidationError{ - field: fmt.Sprintf("Permissions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetPrincipals()) < 1 { - return PolicyValidationError{ - field: "Principals", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetPrincipals() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PolicyValidationError{ - field: fmt.Sprintf("Principals[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - switch m.ExpressionSpecifier.(type) { - - case *Policy_Condition: - - if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PolicyValidationError{ - field: "Condition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Policy_CheckedCondition: - - if v, ok := interface{}(m.GetCheckedCondition()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PolicyValidationError{ - field: "CheckedCondition", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// PolicyValidationError is the validation error returned by Policy.Validate if -// the designated constraints aren't met. -type PolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PolicyValidationError) ErrorName() string { return "PolicyValidationError" } - -// Error satisfies the builtin error interface -func (e 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 %sPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PolicyValidationError{} - -// Validate checks the field values on Permission with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Permission) Validate() error { - if m == nil { - return nil - } - - switch m.Rule.(type) { - - case *Permission_AndRules: - - if v, ok := interface{}(m.GetAndRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "AndRules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Permission_OrRules: - - if v, ok := interface{}(m.GetOrRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "OrRules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Permission_Any: - - if m.GetAny() != true { - return PermissionValidationError{ - field: "Any", - reason: "value must equal true", - } - } - - case *Permission_Header: - - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Permission_UrlPath: - - if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "UrlPath", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Permission_DestinationIp: - - if v, ok := interface{}(m.GetDestinationIp()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "DestinationIp", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Permission_DestinationPort: - - if m.GetDestinationPort() > 65535 { - return PermissionValidationError{ - field: "DestinationPort", - reason: "value must be less than or equal to 65535", - } - } - - case *Permission_Metadata: - - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Permission_NotRule: - - if v, ok := interface{}(m.GetNotRule()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "NotRule", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Permission_RequestedServerName: - - if v, ok := interface{}(m.GetRequestedServerName()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionValidationError{ - field: "RequestedServerName", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return PermissionValidationError{ - field: "Rule", - reason: "value is required", - } - - } - - return nil -} - -// PermissionValidationError is the validation error returned by -// Permission.Validate if the designated constraints aren't met. -type PermissionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PermissionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PermissionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PermissionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PermissionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PermissionValidationError) ErrorName() string { return "PermissionValidationError" } - -// Error satisfies the builtin error interface -func (e PermissionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPermission.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PermissionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PermissionValidationError{} - -// Validate checks the field values on Principal with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Principal) Validate() error { - if m == nil { - return nil - } - - switch m.Identifier.(type) { - - case *Principal_AndIds: - - if v, ok := interface{}(m.GetAndIds()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "AndIds", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_OrIds: - - if v, ok := interface{}(m.GetOrIds()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "OrIds", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_Any: - - if m.GetAny() != true { - return PrincipalValidationError{ - field: "Any", - reason: "value must equal true", - } - } - - case *Principal_Authenticated_: - - if v, ok := interface{}(m.GetAuthenticated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "Authenticated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_HiddenEnvoyDeprecatedSourceIp: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedSourceIp()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "HiddenEnvoyDeprecatedSourceIp", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_DirectRemoteIp: - - if v, ok := interface{}(m.GetDirectRemoteIp()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "DirectRemoteIp", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_RemoteIp: - - if v, ok := interface{}(m.GetRemoteIp()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "RemoteIp", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_Header: - - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_UrlPath: - - if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "UrlPath", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_Metadata: - - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Principal_NotId: - - if v, ok := interface{}(m.GetNotId()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrincipalValidationError{ - field: "NotId", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return PrincipalValidationError{ - field: "Identifier", - reason: "value is required", - } - - } - - return nil -} - -// PrincipalValidationError is the validation error returned by -// Principal.Validate if the designated constraints aren't met. -type PrincipalValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PrincipalValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PrincipalValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PrincipalValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PrincipalValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PrincipalValidationError) ErrorName() string { return "PrincipalValidationError" } - -// Error satisfies the builtin error interface -func (e PrincipalValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPrincipal.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PrincipalValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PrincipalValidationError{} - -// Validate checks the field values on Permission_Set with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *Permission_Set) Validate() error { - if m == nil { - return nil - } - - if len(m.GetRules()) < 1 { - return Permission_SetValidationError{ - field: "Rules", - reason: "value must contain at least 1 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 Permission_SetValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// Permission_SetValidationError is the validation error returned by -// Permission_Set.Validate if the designated constraints aren't met. -type Permission_SetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Permission_SetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Permission_SetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Permission_SetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Permission_SetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Permission_SetValidationError) ErrorName() string { return "Permission_SetValidationError" } - -// Error satisfies the builtin error interface -func (e Permission_SetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPermission_Set.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Permission_SetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Permission_SetValidationError{} - -// Validate checks the field values on Principal_Set with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *Principal_Set) Validate() error { - if m == nil { - return nil - } - - if len(m.GetIds()) < 1 { - return Principal_SetValidationError{ - field: "Ids", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetIds() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Principal_SetValidationError{ - field: fmt.Sprintf("Ids[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// Principal_SetValidationError is the validation error returned by -// Principal_Set.Validate if the designated constraints aren't met. -type Principal_SetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Principal_SetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Principal_SetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Principal_SetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Principal_SetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Principal_SetValidationError) ErrorName() string { return "Principal_SetValidationError" } - -// Error satisfies the builtin error interface -func (e Principal_SetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPrincipal_Set.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Principal_SetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Principal_SetValidationError{} - -// Validate checks the field values on Principal_Authenticated with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Principal_Authenticated) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetPrincipalName()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Principal_AuthenticatedValidationError{ - field: "PrincipalName", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// Principal_AuthenticatedValidationError is the validation error returned by -// Principal_Authenticated.Validate if the designated constraints aren't met. -type Principal_AuthenticatedValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Principal_AuthenticatedValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Principal_AuthenticatedValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Principal_AuthenticatedValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Principal_AuthenticatedValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Principal_AuthenticatedValidationError) ErrorName() string { - return "Principal_AuthenticatedValidationError" -} - -// Error satisfies the builtin error interface -func (e Principal_AuthenticatedValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPrincipal_Authenticated.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Principal_AuthenticatedValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Principal_AuthenticatedValidationError{} diff --git a/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.go b/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.go index 2e58e74c16..2a57b6c498 100644 --- a/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.go +++ b/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto -package envoy_config_resource_monitor_fixed_heap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The fixed heap resource monitor reports the Envoy process memory pressure, computed as a // fraction of currently reserved heap memory divided by a statically configured maximum // specified in the FixedHeapConfig. @@ -95,13 +90,19 @@ var file_envoy_config_resource_monitor_fixed_heap_v2alpha_fixed_heap_proto_rawDe 0x12, 0x36, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x48, 0x65, 0x61, 0x70, 0x53, - 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x5a, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, - 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x48, 0x65, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0xb3, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, + 0x65, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x46, 0x69, 0x78, + 0x65, 0x64, 0x48, 0x65, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x2f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2f, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.validate.go b/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.validate.go index 3d36bdc71a..42b41ea9a8 100644 --- a/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.validate.go +++ b/pkg/api/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto -package envoy_config_resource_monitor_fixed_heap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FixedHeapConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *FixedHeapConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FixedHeapConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FixedHeapConfigMultiError, or nil if none found. +func (m *FixedHeapConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FixedHeapConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMaxHeapSizeBytes() <= 0 { - return FixedHeapConfigValidationError{ + err := FixedHeapConfigValidationError{ field: "MaxHeapSizeBytes", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FixedHeapConfigMultiError(errors) } return nil } +// FixedHeapConfigMultiError is an error wrapping multiple validation errors +// returned by FixedHeapConfig.ValidateAll() if the designated constraints +// aren't met. +type FixedHeapConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FixedHeapConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FixedHeapConfigMultiError) AllErrors() []error { return m } + // FixedHeapConfigValidationError is the validation error returned by // FixedHeapConfig.Validate if the designated constraints aren't met. type FixedHeapConfigValidationError struct { diff --git a/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.go b/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.go index bcada4c6c1..dd02c79d8e 100644 --- a/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.go +++ b/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto -package envoy_config_resource_monitor_injected_resource_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The injected resource monitor allows injecting a synthetic resource pressure into Envoy // via a text file, which must contain a floating-point number in the range [0..1] representing // the resource pressure and be updated atomically by a symbolic link swap. @@ -97,14 +92,20 @@ var file_envoy_config_resource_monitor_injected_resource_v2alpha_injected_resour 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, - 0x65, 0x42, 0x68, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x49, 0x6e, 0x6a, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x42, 0xc8, 0x01, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, + 0x72, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x49, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.validate.go b/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.validate.go index e099f64d68..9943175a50 100644 --- a/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.validate.go +++ b/pkg/api/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto -package envoy_config_resource_monitor_injected_resource_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on InjectedResourceConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *InjectedResourceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InjectedResourceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// InjectedResourceConfigMultiError, or nil if none found. +func (m *InjectedResourceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *InjectedResourceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFilename()) < 1 { - return InjectedResourceConfigValidationError{ + err := InjectedResourceConfigValidationError{ field: "Filename", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return InjectedResourceConfigMultiError(errors) } return nil } +// InjectedResourceConfigMultiError is an error wrapping multiple validation +// errors returned by InjectedResourceConfig.ValidateAll() if the designated +// constraints aren't met. +type InjectedResourceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InjectedResourceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InjectedResourceConfigMultiError) AllErrors() []error { return m } + // InjectedResourceConfigValidationError is the validation error returned by // InjectedResourceConfig.Validate if the designated constraints aren't met. type InjectedResourceConfigValidationError struct { diff --git a/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.go b/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.go index 27ca69045a..e474d60cbd 100644 --- a/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.go +++ b/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto -package envoy_config_retry_omit_canary_hosts_v2 +package omit_canary_hostsv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OmitCanaryHostsPredicate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -73,17 +68,29 @@ var file_envoy_config_retry_omit_canary_hosts_v2_omit_canary_hosts_proto_rawDesc 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, - 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x4f, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x57, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, - 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x14, - 0x4f, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0xf3, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, + 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, + 0x14, 0x4f, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x62, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, + 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x32, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x6f, + 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.validate.go b/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.validate.go index d3df0872d9..46f2ae9e2c 100644 --- a/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.validate.go +++ b/pkg/api/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto -package envoy_config_retry_omit_canary_hosts_v2 +package omit_canary_hostsv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OmitCanaryHostsPredicate with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OmitCanaryHostsPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OmitCanaryHostsPredicate with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OmitCanaryHostsPredicateMultiError, or nil if none found. +func (m *OmitCanaryHostsPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *OmitCanaryHostsPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return OmitCanaryHostsPredicateMultiError(errors) + } + return nil } +// OmitCanaryHostsPredicateMultiError is an error wrapping multiple validation +// errors returned by OmitCanaryHostsPredicate.ValidateAll() if the designated +// constraints aren't met. +type OmitCanaryHostsPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OmitCanaryHostsPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OmitCanaryHostsPredicateMultiError) AllErrors() []error { return m } + // OmitCanaryHostsPredicateValidationError is the validation error returned by // OmitCanaryHostsPredicate.Validate if the designated constraints aren't met. type OmitCanaryHostsPredicateValidationError struct { diff --git a/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.go b/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.go index 421fb9ec31..a86a38662e 100644 --- a/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.go +++ b/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto -package envoy_config_retry_omit_host_metadata_v2 +package omit_host_metadatav2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A retry host predicate that can be used to reject a host based on // predefined metadata match criteria. // [#extension: envoy.retry_host_predicates.omit_host_metadata] @@ -103,17 +98,23 @@ var file_envoy_config_retry_omit_host_metadata_v2_omit_host_metadata_config_prot 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x98, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0xfe, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x1b, 0x4f, 0x6d, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x33, 0x12, - 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x6f, 0x6d, 0x69, - 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, + 0x65, 0x74, 0x72, 0x79, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x3b, 0x6f, 0x6d, 0x69, 0x74, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xf2, + 0x98, 0xfe, 0x8f, 0x05, 0x33, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, + 0x73, 0x74, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.validate.go b/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.validate.go index 7d3230611c..9bcbdb1d0a 100644 --- a/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.validate.go +++ b/pkg/api/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto -package envoy_config_retry_omit_host_metadata_v2 +package omit_host_metadatav2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OmitHostMetadataConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OmitHostMetadataConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OmitHostMetadataConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OmitHostMetadataConfigMultiError, or nil if none found. +func (m *OmitHostMetadataConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OmitHostMetadataConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OmitHostMetadataConfigValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OmitHostMetadataConfigValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OmitHostMetadataConfigValidationError{ field: "MetadataMatch", @@ -51,9 +86,30 @@ func (m *OmitHostMetadataConfig) Validate() error { } } + if len(errors) > 0 { + return OmitHostMetadataConfigMultiError(errors) + } + return nil } +// OmitHostMetadataConfigMultiError is an error wrapping multiple validation +// errors returned by OmitHostMetadataConfig.ValidateAll() if the designated +// constraints aren't met. +type OmitHostMetadataConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OmitHostMetadataConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OmitHostMetadataConfigMultiError) AllErrors() []error { return m } + // OmitHostMetadataConfigValidationError is the validation error returned by // OmitHostMetadataConfig.Validate if the designated constraints aren't met. type OmitHostMetadataConfigValidationError struct { diff --git a/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.go b/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.go index f1f1e1efd9..c4ee89a63c 100644 --- a/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.go +++ b/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/retry/previous_hosts/v2/previous_hosts.proto -package envoy_config_retry_previous_hosts_v2 +package previous_hostsv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type PreviousHostsPredicate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -73,16 +68,27 @@ var file_envoy_config_retry_previous_hosts_v2_previous_hosts_proto_rawDesc = []b 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, - 0x32, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x32, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x6f, 0x73, 0x74, - 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x52, 0x0a, 0x32, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, - 0x42, 0x12, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0xe5, 0x01, 0x0a, 0x32, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, + 0x32, 0x42, 0x12, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2f, 0x12, 0x2d, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.validate.go b/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.validate.go index 719bbd4e84..d50e8bd6ce 100644 --- a/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.validate.go +++ b/pkg/api/envoy/config/retry/previous_hosts/v2/previous_hosts.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/retry/previous_hosts/v2/previous_hosts.proto -package envoy_config_retry_previous_hosts_v2 +package previous_hostsv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on PreviousHostsPredicate with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *PreviousHostsPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousHostsPredicate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PreviousHostsPredicateMultiError, or nil if none found. +func (m *PreviousHostsPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousHostsPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return PreviousHostsPredicateMultiError(errors) + } + return nil } +// PreviousHostsPredicateMultiError is an error wrapping multiple validation +// errors returned by PreviousHostsPredicate.ValidateAll() if the designated +// constraints aren't met. +type PreviousHostsPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousHostsPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousHostsPredicateMultiError) AllErrors() []error { return m } + // PreviousHostsPredicateValidationError is the validation error returned by // PreviousHostsPredicate.Validate if the designated constraints aren't met. type PreviousHostsPredicateValidationError struct { diff --git a/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go b/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go index 77205ced7c..08fea82269 100644 --- a/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go +++ b/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/retry/previous_priorities/previous_priorities_config.proto -package envoy_config_retry_previous_priorities +package previous_priorities import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A retry host selector that attempts to spread retries between priorities, even if certain // priorities would not normally be attempted due to higher priorities being available. // @@ -120,7 +115,9 @@ var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x18, 0x50, 0x72, 0x65, @@ -128,14 +125,22 @@ var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x20, 0x00, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x5f, 0x0a, 0x34, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x42, 0x1d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0xec, 0x01, 0x0a, 0x34, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x42, 0x1d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x38, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, + 0x2e, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.validate.go b/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.validate.go index 0ec027f00b..f360c64f33 100644 --- a/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.validate.go +++ b/pkg/api/envoy/config/retry/previous_priorities/previous_priorities_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/retry/previous_priorities/previous_priorities_config.proto -package envoy_config_retry_previous_priorities +package previous_priorities import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on PreviousPrioritiesConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *PreviousPrioritiesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousPrioritiesConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PreviousPrioritiesConfigMultiError, or nil if none found. +func (m *PreviousPrioritiesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousPrioritiesConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetUpdateFrequency() <= 0 { - return PreviousPrioritiesConfigValidationError{ + err := PreviousPrioritiesConfigValidationError{ field: "UpdateFrequency", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PreviousPrioritiesConfigMultiError(errors) } return nil } +// PreviousPrioritiesConfigMultiError is an error wrapping multiple validation +// errors returned by PreviousPrioritiesConfig.ValidateAll() if the designated +// constraints aren't met. +type PreviousPrioritiesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousPrioritiesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousPrioritiesConfigMultiError) AllErrors() []error { return m } + // PreviousPrioritiesConfigValidationError is the validation error returned by // PreviousPrioritiesConfig.Validate if the designated constraints aren't met. type PreviousPrioritiesConfigValidationError struct { diff --git a/pkg/api/envoy/config/route/v3/route.pb.go b/pkg/api/envoy/config/route/v3/route.pb.go index 3be4209489..b1ea083524 100644 --- a/pkg/api/envoy/config/route/v3/route.pb.go +++ b/pkg/api/envoy/config/route/v3/route.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/route/v3/route.proto -package envoy_config_route_v3 +package routev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,11 +24,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 11] +// [#next-free-field: 14] type RouteConfiguration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -37,8 +32,8 @@ type RouteConfiguration struct { // The name of the route configuration. For example, it might match // :ref:`route_config_name - // ` in - // :ref:`envoy_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`. + // ` in + // :ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // An array of virtual hosts that make up the route table. VirtualHosts []*VirtualHost `protobuf:"bytes,2,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts,omitempty"` @@ -56,8 +51,8 @@ type RouteConfiguration struct { 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_config.route.v3.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v3.RouteAction`. For more information, including details on + // after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or + // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` @@ -66,8 +61,8 @@ type RouteConfiguration struct { 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_config.route.v3.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v3.RouteAction`. For more information, including details on + // applied after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or + // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. RequestHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` @@ -92,13 +87,33 @@ type RouteConfiguration struct { // route table will load and the router filter will return a 404 if the route // is selected at runtime. This setting defaults to true if the route table // is statically defined via the :ref:`route_config - // ` + // ` // option. This setting default to false if the route table is loaded dynamically via the // :ref:`rds - // ` + // ` // option. Users may wish to override the default behavior in certain cases (for example when // using CDS with a static route table). ValidateClusters *wrappers.BoolValue `protobuf:"bytes,7,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"` + // The maximum bytes of the response :ref:`direct response body + // ` size. If not specified the default + // is 4096. + // + // .. warning:: + // + // Envoy currently holds the content of :ref:`direct response body + // ` in memory. Be careful setting + // this to be larger than the default 4KB, since the allocated memory for direct response body + // is not subject to data plane buffering controls. + // + MaxDirectResponseBodySizeBytes *wrappers.UInt32Value `protobuf:"bytes,11,opt,name=max_direct_response_body_size_bytes,json=maxDirectResponseBodySizeBytes,proto3" json:"max_direct_response_body_size_bytes,omitempty"` + // [#not-implemented-hide:] + // A list of plugins and their configurations which may be used by a + // :ref:`envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin` + // within the route. All *extension.name* fields in this list must be unique. + ClusterSpecifierPlugins []*ClusterSpecifierPlugin `protobuf:"bytes,12,rep,name=cluster_specifier_plugins,json=clusterSpecifierPlugins,proto3" json:"cluster_specifier_plugins,omitempty"` + // Specify a set of default request mirroring policies which apply to all routes under its virtual hosts. + // Note that policies are not merged, the most specific non-empty one becomes the mirror policies. + RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,13,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` } func (x *RouteConfiguration) Reset() { @@ -203,6 +218,89 @@ func (x *RouteConfiguration) GetValidateClusters() *wrappers.BoolValue { return nil } +func (x *RouteConfiguration) GetMaxDirectResponseBodySizeBytes() *wrappers.UInt32Value { + if x != nil { + return x.MaxDirectResponseBodySizeBytes + } + return nil +} + +func (x *RouteConfiguration) GetClusterSpecifierPlugins() []*ClusterSpecifierPlugin { + if x != nil { + return x.ClusterSpecifierPlugins + } + return nil +} + +func (x *RouteConfiguration) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { + if x != nil { + return x.RequestMirrorPolicies + } + return nil +} + +// Configuration for a cluster specifier plugin. +type ClusterSpecifierPlugin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the plugin and its opaque configuration. + Extension *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=extension,proto3" json:"extension,omitempty"` + // If is_optional is not set and the plugin defined by this message is not + // a supported type, the containing resource is NACKed. If is_optional is + // set, the resource would not be NACKed for this reason. In this case, + // routes referencing this plugin's name would not be treated as an illegal + // configuration, but would result in a failure if the route is selected. + IsOptional bool `protobuf:"varint,2,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` +} + +func (x *ClusterSpecifierPlugin) Reset() { + *x = ClusterSpecifierPlugin{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_route_v3_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterSpecifierPlugin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterSpecifierPlugin) ProtoMessage() {} + +func (x *ClusterSpecifierPlugin) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_route_v3_route_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterSpecifierPlugin.ProtoReflect.Descriptor instead. +func (*ClusterSpecifierPlugin) Descriptor() ([]byte, []int) { + return file_envoy_config_route_v3_route_proto_rawDescGZIP(), []int{1} +} + +func (x *ClusterSpecifierPlugin) GetExtension() *v3.TypedExtensionConfig { + if x != nil { + return x.Extension + } + return nil +} + +func (x *ClusterSpecifierPlugin) GetIsOptional() bool { + if x != nil { + return x.IsOptional + } + return false +} + type Vhds struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -215,7 +313,7 @@ type Vhds struct { func (x *Vhds) Reset() { *x = Vhds{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_proto_msgTypes[1] + mi := &file_envoy_config_route_v3_route_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -228,7 +326,7 @@ func (x *Vhds) String() string { func (*Vhds) ProtoMessage() {} func (x *Vhds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_proto_msgTypes[1] + mi := &file_envoy_config_route_v3_route_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -241,7 +339,7 @@ func (x *Vhds) ProtoReflect() protoreflect.Message { // Deprecated: Use Vhds.ProtoReflect.Descriptor instead. func (*Vhds) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_proto_rawDescGZIP(), []int{1} + return file_envoy_config_route_v3_route_proto_rawDescGZIP(), []int{2} } func (x *Vhds) GetConfigSource() *v3.ConfigSource { @@ -262,79 +360,114 @@ var file_envoy_config_route_v3_route_proto_rawDesc = []byte{ 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, - 0x06, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x76, 0x69, 0x72, - 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, - 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, - 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x76, 0x68, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x68, 0x64, 0x73, 0x52, 0x04, 0x76, - 0x68, 0x64, 0x73, 0x12, 0x44, 0x0a, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, - 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4f, 0x6e, - 0x6c, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x17, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, - 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, - 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x6d, 0x6f, 0x73, - 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x77, 0x69, 0x6e, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x6d, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x73, 0x0a, 0x04, 0x56, 0x68, 0x64, 0x73, - 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x3a, 0x18, 0x9a, 0xc5, 0x88, 0x1e, 0x13, 0x0a, 0x11, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x68, 0x64, 0x73, 0x42, 0x3b, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x08, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x47, 0x0a, 0x0d, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x76, 0x68, 0x64, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, + 0x68, 0x64, 0x73, 0x52, 0x04, 0x76, 0x68, 0x64, 0x73, 0x12, 0x44, 0x0a, 0x15, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, + 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x4f, 0x6e, 0x6c, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x69, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, + 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x1a, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, + 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, + 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, + 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, + 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, + 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, + 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, + 0x4c, 0x0a, 0x23, 0x6d, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5f, 0x77, 0x69, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x6d, 0x6f, + 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x6e, 0x73, 0x12, 0x47, 0x0a, + 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x23, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, + 0x64, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x1e, 0x6d, 0x61, 0x78, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x69, 0x0a, 0x19, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x0c, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x52, 0x17, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x6e, 0x0a, 0x17, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x26, 0x9a, 0xc5, + 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, + 0x48, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x69, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x73, 0x0a, 0x04, 0x56, 0x68, + 0x64, 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x18, 0x9a, 0xc5, 0x88, 0x1e, 0x13, 0x0a, 0x11, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x68, 0x64, 0x73, 0x42, + 0x81, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -349,27 +482,35 @@ func file_envoy_config_route_v3_route_proto_rawDescGZIP() []byte { return file_envoy_config_route_v3_route_proto_rawDescData } -var file_envoy_config_route_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_config_route_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_envoy_config_route_v3_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.config.route.v3.RouteConfiguration - (*Vhds)(nil), // 1: envoy.config.route.v3.Vhds - (*VirtualHost)(nil), // 2: envoy.config.route.v3.VirtualHost - (*v3.HeaderValueOption)(nil), // 3: envoy.config.core.v3.HeaderValueOption - (*wrappers.BoolValue)(nil), // 4: google.protobuf.BoolValue - (*v3.ConfigSource)(nil), // 5: envoy.config.core.v3.ConfigSource + (*RouteConfiguration)(nil), // 0: envoy.config.route.v3.RouteConfiguration + (*ClusterSpecifierPlugin)(nil), // 1: envoy.config.route.v3.ClusterSpecifierPlugin + (*Vhds)(nil), // 2: envoy.config.route.v3.Vhds + (*VirtualHost)(nil), // 3: envoy.config.route.v3.VirtualHost + (*v3.HeaderValueOption)(nil), // 4: envoy.config.core.v3.HeaderValueOption + (*wrappers.BoolValue)(nil), // 5: google.protobuf.BoolValue + (*wrappers.UInt32Value)(nil), // 6: google.protobuf.UInt32Value + (*RouteAction_RequestMirrorPolicy)(nil), // 7: envoy.config.route.v3.RouteAction.RequestMirrorPolicy + (*v3.TypedExtensionConfig)(nil), // 8: envoy.config.core.v3.TypedExtensionConfig + (*v3.ConfigSource)(nil), // 9: envoy.config.core.v3.ConfigSource } var file_envoy_config_route_v3_route_proto_depIdxs = []int32{ - 2, // 0: envoy.config.route.v3.RouteConfiguration.virtual_hosts:type_name -> envoy.config.route.v3.VirtualHost - 1, // 1: envoy.config.route.v3.RouteConfiguration.vhds:type_name -> envoy.config.route.v3.Vhds - 3, // 2: envoy.config.route.v3.RouteConfiguration.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 3, // 3: envoy.config.route.v3.RouteConfiguration.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 4, // 4: envoy.config.route.v3.RouteConfiguration.validate_clusters:type_name -> google.protobuf.BoolValue - 5, // 5: envoy.config.route.v3.Vhds.config_source:type_name -> envoy.config.core.v3.ConfigSource - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 3, // 0: envoy.config.route.v3.RouteConfiguration.virtual_hosts:type_name -> envoy.config.route.v3.VirtualHost + 2, // 1: envoy.config.route.v3.RouteConfiguration.vhds:type_name -> envoy.config.route.v3.Vhds + 4, // 2: envoy.config.route.v3.RouteConfiguration.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 4, // 3: envoy.config.route.v3.RouteConfiguration.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 5, // 4: envoy.config.route.v3.RouteConfiguration.validate_clusters:type_name -> google.protobuf.BoolValue + 6, // 5: envoy.config.route.v3.RouteConfiguration.max_direct_response_body_size_bytes:type_name -> google.protobuf.UInt32Value + 1, // 6: envoy.config.route.v3.RouteConfiguration.cluster_specifier_plugins:type_name -> envoy.config.route.v3.ClusterSpecifierPlugin + 7, // 7: envoy.config.route.v3.RouteConfiguration.request_mirror_policies:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy + 8, // 8: envoy.config.route.v3.ClusterSpecifierPlugin.extension:type_name -> envoy.config.core.v3.TypedExtensionConfig + 9, // 9: envoy.config.route.v3.Vhds.config_source:type_name -> envoy.config.core.v3.ConfigSource + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_envoy_config_route_v3_route_proto_init() } @@ -392,6 +533,18 @@ func file_envoy_config_route_v3_route_proto_init() { } } file_envoy_config_route_v3_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterSpecifierPlugin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_route_v3_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Vhds); i { case 0: return &v.state @@ -410,7 +563,7 @@ func file_envoy_config_route_v3_route_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_route_v3_route_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/route/v3/route.pb.validate.go b/pkg/api/envoy/config/route/v3/route.pb.validate.go index 0f1014016d..759d17e9a8 100644 --- a/pkg/api/envoy/config/route/v3/route.pb.validate.go +++ b/pkg/api/envoy/config/route/v3/route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/route/v3/route.proto -package envoy_config_route_v3 +package routev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name for idx, item := range m.GetVirtualHosts() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("VirtualHosts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("VirtualHosts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("VirtualHosts[%v]", idx), @@ -58,7 +93,26 @@ func (m *RouteConfiguration) Validate() error { } - if v, ok := interface{}(m.GetVhds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetVhds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Vhds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Vhds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVhds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "Vhds", @@ -72,25 +126,52 @@ func (m *RouteConfiguration) Validate() error { _, _ = idx, item if !_RouteConfiguration_InternalOnlyHeaders_Pattern.MatchString(item) { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: fmt.Sprintf("InternalOnlyHeaders[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetResponseHeadersToAdd()) > 1000 { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -106,25 +187,52 @@ func (m *RouteConfiguration) Validate() error { _, _ = idx, item if !_RouteConfiguration_ResponseHeadersToRemove_Pattern.MatchString(item) { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetRequestHeadersToAdd()) > 1000 { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -140,17 +248,40 @@ func (m *RouteConfiguration) Validate() error { _, _ = idx, item if !_RouteConfiguration_RequestHeadersToRemove_Pattern.MatchString(item) { - return RouteConfigurationValidationError{ + err := RouteConfigurationValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for MostSpecificHeaderMutationsWins - if v, ok := interface{}(m.GetValidateClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidateClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "ValidateClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "ValidateClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidateClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "ValidateClusters", @@ -160,9 +291,127 @@ func (m *RouteConfiguration) Validate() error { } } + if all { + switch v := interface{}(m.GetMaxDirectResponseBodySizeBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "MaxDirectResponseBodySizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "MaxDirectResponseBodySizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxDirectResponseBodySizeBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteConfigurationValidationError{ + field: "MaxDirectResponseBodySizeBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetClusterSpecifierPlugins() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("ClusterSpecifierPlugins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("ClusterSpecifierPlugins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteConfigurationValidationError{ + field: fmt.Sprintf("ClusterSpecifierPlugins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetRequestMirrorPolicies() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil } +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + // RouteConfigurationValidationError is the validation error returned by // RouteConfiguration.Validate if the designated constraints aren't met. type RouteConfigurationValidationError struct { @@ -225,21 +474,191 @@ var _RouteConfiguration_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[ var _RouteConfiguration_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") +// Validate checks the field values on ClusterSpecifierPlugin with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ClusterSpecifierPlugin) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterSpecifierPlugin with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterSpecifierPluginMultiError, or nil if none found. +func (m *ClusterSpecifierPlugin) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterSpecifierPlugin) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetExtension()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterSpecifierPluginValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterSpecifierPluginValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterSpecifierPluginValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for IsOptional + + if len(errors) > 0 { + return ClusterSpecifierPluginMultiError(errors) + } + + return nil +} + +// ClusterSpecifierPluginMultiError is an error wrapping multiple validation +// errors returned by ClusterSpecifierPlugin.ValidateAll() if the designated +// constraints aren't met. +type ClusterSpecifierPluginMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterSpecifierPluginMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterSpecifierPluginMultiError) AllErrors() []error { return m } + +// ClusterSpecifierPluginValidationError is the validation error returned by +// ClusterSpecifierPlugin.Validate if the designated constraints aren't met. +type ClusterSpecifierPluginValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterSpecifierPluginValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterSpecifierPluginValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterSpecifierPluginValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterSpecifierPluginValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterSpecifierPluginValidationError) ErrorName() string { + return "ClusterSpecifierPluginValidationError" +} + +// Error satisfies the builtin error interface +func (e ClusterSpecifierPluginValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sClusterSpecifierPlugin.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterSpecifierPluginValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterSpecifierPluginValidationError{} + // Validate checks the field values on Vhds with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Vhds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Vhds with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in VhdsMultiError, or nil if none found. +func (m *Vhds) ValidateAll() error { + return m.validate(true) +} + +func (m *Vhds) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetConfigSource() == nil { - return VhdsValidationError{ + err := VhdsValidationError{ field: "ConfigSource", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VhdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VhdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VhdsValidationError{ field: "ConfigSource", @@ -249,9 +668,29 @@ func (m *Vhds) Validate() error { } } + if len(errors) > 0 { + return VhdsMultiError(errors) + } + return nil } +// VhdsMultiError is an error wrapping multiple validation errors returned by +// Vhds.ValidateAll() if the designated constraints aren't met. +type VhdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VhdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VhdsMultiError) AllErrors() []error { return m } + // VhdsValidationError is the validation error returned by Vhds.Validate if the // designated constraints aren't met. type VhdsValidationError struct { diff --git a/pkg/api/envoy/config/route/v3/route_components.pb.go b/pkg/api/envoy/config/route/v3/route_components.pb.go index 40c7475c09..9ccba0b8c0 100644 --- a/pkg/api/envoy/config/route/v3/route_components.pb.go +++ b/pkg/api/envoy/config/route/v3/route_components.pb.go @@ -1,24 +1,24 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/route/v3/route_components.proto -package envoy_config_route_v3 +package routev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/type/matcher/v3" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" - v34 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/metadata/v3" - v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/tracing/v3" - v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" + v35 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/metadata/v3" + v34 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/tracing/v3" + v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -33,10 +33,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type VirtualHost_TlsRequirementType int32 const ( @@ -300,7 +296,7 @@ type RateLimit_Action_MetaData_Source int32 const ( // Query :ref:`dynamic metadata ` RateLimit_Action_MetaData_DYNAMIC RateLimit_Action_MetaData_Source = 0 - // Query :ref:`route entry metadata ` + // Query :ref:`route entry metadata ` RateLimit_Action_MetaData_ROUTE_ENTRY RateLimit_Action_MetaData_Source = 1 ) @@ -340,7 +336,7 @@ func (x RateLimit_Action_MetaData_Source) Number() protoreflect.EnumNumber { // Deprecated: Use RateLimit_Action_MetaData_Source.Descriptor instead. func (RateLimit_Action_MetaData_Source) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 7, 0} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 7, 0} } // The top level element in the routing configuration is a virtual host. Each virtual host has @@ -348,7 +344,7 @@ func (RateLimit_Action_MetaData_Source) EnumDescriptor() ([]byte, []int) { // host header. This allows a single listener to service multiple top level domain path trees. Once // a virtual host is selected based on the domain, the routes are processed in order to see which // upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 21] +// [#next-free-field: 23] type VirtualHost struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -378,7 +374,12 @@ type VirtualHost struct { Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` // The list of routes that will be matched, in order, for incoming requests. // The first route that matches will be used. + // Only one of this and `matcher` can be specified. Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` + // [#next-major-version: This should be included in a oneof with routes wrapped in a message.] + // The match tree to use when resolving route actions for incoming requests. Only one of this and `routes` + // can be specified. + Matcher *v3.Matcher `protobuf:"bytes,21,opt,name=matcher,proto3" json:"matcher,omitempty"` // Specifies the type of TLS enforcement the virtual host expects. If this option is not // specified, there is no TLS requirement for the virtual host. RequireTls VirtualHost_TlsRequirementType `protobuf:"varint,4,opt,name=require_tls,json=requireTls,proto3,enum=envoy.config.route.v3.VirtualHost_TlsRequirementType" json:"require_tls,omitempty"` @@ -390,21 +391,21 @@ type VirtualHost struct { 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_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including + // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the + // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on :ref:`custom request headers // `. - RequestHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,7,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + RequestHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,7,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` // Specifies a list of HTTP headers that should be removed from each request // handled by this virtual host. RequestHeadersToRemove []string `protobuf:"bytes,13,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` // Specifies a list of HTTP headers that should be added to each response // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_api_msg_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including + // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the + // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on :ref:`custom request headers // `. - ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` // Specifies a list of HTTP headers that should be removed from each response // handled by this virtual host. ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` @@ -415,6 +416,9 @@ type VirtualHost struct { // *envoy.filters.http.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. + // [#comment: An entry's value may be wrapped in a + // :ref:`FilterConfig` + // message to specify additional options.] 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"` // Decides whether the :ref:`x-envoy-attempt-count // ` header should be included @@ -423,7 +427,7 @@ type VirtualHost struct { // 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. + // ` flag. // // [#next-major-version: rename to include_attempt_count_in_request.] IncludeRequestAttemptCount bool `protobuf:"varint,14,opt,name=include_request_attempt_count,json=includeRequestAttemptCount,proto3" json:"include_request_attempt_count,omitempty"` @@ -434,7 +438,7 @@ type VirtualHost struct { // will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. // This header is unaffected by the // :ref:`suppress_envoy_headers - // ` flag. + // ` flag. IncludeAttemptCountInResponse bool `protobuf:"varint,19,opt,name=include_attempt_count_in_response,json=includeAttemptCountInResponse,proto3" json:"include_attempt_count_in_response,omitempty"` // Indicates the retry policy for all routes in this virtual host. Note that setting a // route level entry will take precedence over this config and it'll be treated @@ -443,7 +447,7 @@ type VirtualHost struct { // [#not-implemented-hide:] // Specifies the configuration for retry policy extension. Note that setting a route level entry // will take precedence over this config and it'll be treated independently (e.g.: values are not - // inherited). :ref:`Retry policy ` should not be + // inherited). :ref:`Retry policy ` should not be // set if this field is used. RetryPolicyTypedConfig *any.Any `protobuf:"bytes,20,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` // Indicates the hedge policy for all routes in this virtual host. Note that setting a @@ -454,8 +458,10 @@ type VirtualHost struct { // If set and a route-specific limit is not set, the bytes actually buffered will be the minimum // value of this and the listener per_connection_buffer_limit_bytes. PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,18,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedPerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,12,rep,name=hidden_envoy_deprecated_per_filter_config,json=hiddenEnvoyDeprecatedPerFilterConfig,proto3" json:"hidden_envoy_deprecated_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Specify a set of default request mirroring policies for every route under this virtual host. + // It takes precedence over the route config mirror policy entirely. + // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. + RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,22,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` } func (x *VirtualHost) Reset() { @@ -511,6 +517,13 @@ func (x *VirtualHost) GetRoutes() []*Route { return nil } +func (x *VirtualHost) GetMatcher() *v3.Matcher { + if x != nil { + return x.Matcher + } + return nil +} + func (x *VirtualHost) GetRequireTls() VirtualHost_TlsRequirementType { if x != nil { return x.RequireTls @@ -532,7 +545,7 @@ func (x *VirtualHost) GetRateLimits() []*RateLimit { return nil } -func (x *VirtualHost) GetRequestHeadersToAdd() []*v3.HeaderValueOption { +func (x *VirtualHost) GetRequestHeadersToAdd() []*v31.HeaderValueOption { if x != nil { return x.RequestHeadersToAdd } @@ -546,7 +559,7 @@ func (x *VirtualHost) GetRequestHeadersToRemove() []string { return nil } -func (x *VirtualHost) GetResponseHeadersToAdd() []*v3.HeaderValueOption { +func (x *VirtualHost) GetResponseHeadersToAdd() []*v31.HeaderValueOption { if x != nil { return x.ResponseHeadersToAdd } @@ -616,10 +629,9 @@ func (x *VirtualHost) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { return nil } -// Deprecated: Do not use. -func (x *VirtualHost) GetHiddenEnvoyDeprecatedPerFilterConfig() map[string]*_struct.Struct { +func (x *VirtualHost) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { if x != nil { - return x.HiddenEnvoyDeprecatedPerFilterConfig + return x.RequestMirrorPolicies } return nil } @@ -678,8 +690,8 @@ func (x *FilterAction) GetAction() *any.Any { // .. attention:: // // Envoy supports routing on HTTP method via :ref:`header matching -// `. -// [#next-free-field: 18] +// `. +// [#next-free-field: 19] type Route struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -694,13 +706,14 @@ type Route struct { // *Route_Redirect // *Route_DirectResponse // *Route_FilterAction + // *Route_NonForwardingAction Action isRoute_Action `protobuf_oneof:"action"` // The Metadata field can be used to provide additional information // about the route. It can be used for configuration, stats, and logging. // The metadata should go under the filter namespace that will need it. // For instance, if the metadata is intended for the Router filter, // the filter name should be specified as *envoy.filters.http.router*. - Metadata *v3.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata *v31.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` // Decorator for the matched route. Decorator *Decorator `protobuf:"bytes,5,opt,name=decorator,proto3" json:"decorator,omitempty"` // The typed_per_filter_config field can be used to provide route-specific @@ -708,24 +721,27 @@ type Route struct { // *envoy.filters.http.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. + // [#comment: An entry's value may be wrapped in a + // :ref:`FilterConfig` + // message to specify additional options.] 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"` // 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_config.route.v3.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on + // enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. - RequestHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,9,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + RequestHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,9,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` // Specifies a list of HTTP headers that should be removed from each request // matching this route. RequestHeadersToRemove []string `protobuf:"bytes,12,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` // Specifies a set of headers that will be added to responses to requests // matching this route. Headers specified at this level are applied before - // headers from the enclosing :ref:`envoy_api_msg_config.route.v3.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including + // headers from the enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on // :ref:`custom request headers `. - ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` // Specifies a list of HTTP headers that should be removed from each response // to requests matching this route. ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` @@ -736,8 +752,6 @@ type Route struct { // If set, the bytes actually buffered will be the minimum value of this and the // listener per_connection_buffer_limit_bytes. PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedPerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,8,rep,name=hidden_envoy_deprecated_per_filter_config,json=hiddenEnvoyDeprecatedPerFilterConfig,proto3" json:"hidden_envoy_deprecated_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *Route) Reset() { @@ -821,7 +835,14 @@ func (x *Route) GetFilterAction() *FilterAction { return nil } -func (x *Route) GetMetadata() *v3.Metadata { +func (x *Route) GetNonForwardingAction() *NonForwardingAction { + if x, ok := x.GetAction().(*Route_NonForwardingAction); ok { + return x.NonForwardingAction + } + return nil +} + +func (x *Route) GetMetadata() *v31.Metadata { if x != nil { return x.Metadata } @@ -842,7 +863,7 @@ func (x *Route) GetTypedPerFilterConfig() map[string]*any.Any { return nil } -func (x *Route) GetRequestHeadersToAdd() []*v3.HeaderValueOption { +func (x *Route) GetRequestHeadersToAdd() []*v31.HeaderValueOption { if x != nil { return x.RequestHeadersToAdd } @@ -856,7 +877,7 @@ func (x *Route) GetRequestHeadersToRemove() []string { return nil } -func (x *Route) GetResponseHeadersToAdd() []*v3.HeaderValueOption { +func (x *Route) GetResponseHeadersToAdd() []*v31.HeaderValueOption { if x != nil { return x.ResponseHeadersToAdd } @@ -884,14 +905,6 @@ func (x *Route) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { return nil } -// Deprecated: Do not use. -func (x *Route) GetHiddenEnvoyDeprecatedPerFilterConfig() map[string]*_struct.Struct { - if x != nil { - return x.HiddenEnvoyDeprecatedPerFilterConfig - } - return nil -} - type isRoute_Action interface { isRoute_Action() } @@ -913,13 +926,21 @@ type Route_DirectResponse struct { type Route_FilterAction struct { // [#not-implemented-hide:] - // If true, a filter will define the action (e.g., it could dynamically generate the - // RouteAction). + // A filter-defined action (e.g., it could dynamically generate the RouteAction). // [#comment: TODO(samflattery): Remove cleanup in route_fuzz_test.cc when // implemented] FilterAction *FilterAction `protobuf:"bytes,17,opt,name=filter_action,json=filterAction,proto3,oneof"` } +type Route_NonForwardingAction struct { + // [#not-implemented-hide:] + // An action used when the route will generate a response directly, + // without forwarding to an upstream host. This will be used in non-proxy + // xDS clients like the gRPC server. It could also be used in the future + // in Envoy for a filter that directly generates responses for requests. + NonForwardingAction *NonForwardingAction `protobuf:"bytes,18,opt,name=non_forwarding_action,json=nonForwardingAction,proto3,oneof"` +} + func (*Route_Route) isRoute_Action() {} func (*Route_Redirect) isRoute_Action() {} @@ -928,9 +949,11 @@ func (*Route_DirectResponse) isRoute_Action() {} func (*Route_FilterAction) isRoute_Action() {} -// Compared to the :ref:`cluster ` field that specifies a +func (*Route_NonForwardingAction) isRoute_Action() {} + +// Compared to the :ref:`cluster ` field that specifies a // single upstream cluster as the target of a request, the :ref:`weighted_clusters -// ` option allows for specification of +// ` 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. @@ -953,6 +976,9 @@ type WeightedCluster struct { // configuration file will be used as the default weight. See the :ref:`runtime documentation // ` for how key names map to the underlying implementation. RuntimeKeyPrefix string `protobuf:"bytes,2,opt,name=runtime_key_prefix,json=runtimeKeyPrefix,proto3" json:"runtime_key_prefix,omitempty"` + // Types that are assignable to RandomValueSpecifier: + // *WeightedCluster_HeaderName + RandomValueSpecifier isWeightedCluster_RandomValueSpecifier `protobuf_oneof:"random_value_specifier"` } func (x *WeightedCluster) Reset() { @@ -1008,7 +1034,36 @@ func (x *WeightedCluster) GetRuntimeKeyPrefix() string { return "" } -// [#next-free-field: 13] +func (m *WeightedCluster) GetRandomValueSpecifier() isWeightedCluster_RandomValueSpecifier { + if m != nil { + return m.RandomValueSpecifier + } + return nil +} + +func (x *WeightedCluster) GetHeaderName() string { + if x, ok := x.GetRandomValueSpecifier().(*WeightedCluster_HeaderName); ok { + return x.HeaderName + } + return "" +} + +type isWeightedCluster_RandomValueSpecifier interface { + isWeightedCluster_RandomValueSpecifier() +} + +type WeightedCluster_HeaderName struct { + // Specifies the header name that is used to look up the random value passed in the request header. + // This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic. + // If header is not present or invalid, Envoy will fall back to use the internally generated random value. + // This header is expected to be single-valued header as we only want to have one selected value throughout + // the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX. + HeaderName string `protobuf:"bytes,4,opt,name=header_name,json=headerName,proto3,oneof"` +} + +func (*WeightedCluster_HeaderName) isWeightedCluster_RandomValueSpecifier() {} + +// [#next-free-field: 15] type RouteMatch struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1019,10 +1074,10 @@ type RouteMatch struct { // *RouteMatch_Path // *RouteMatch_SafeRegex // *RouteMatch_ConnectMatcher_ - // *RouteMatch_HiddenEnvoyDeprecatedRegex + // *RouteMatch_PathSeparatedPrefix PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"` // Indicates that prefix/path matching should be case sensitive. The default - // is true. + // is true. Ignored for safe_regex matching. CaseSensitive *wrappers.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 @@ -1040,7 +1095,7 @@ type RouteMatch struct { // 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 *v3.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` + RuntimeFraction *v31.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` // Specifies a set of headers that the route should match on. The router will // check the request’s headers against all the specified headers in the route // config. A match will happen if all the headers in the route are present in @@ -1052,6 +1107,14 @@ type RouteMatch struct { // against all the specified query parameters. If the number of specified // query parameters is nonzero, they all must match the *path* header's // query string for a match to occur. + // + // .. note:: + // + // If query parameters are used to pass request message fields when + // `grpc_json_transcoder `_ + // is used, the transcoded message fields maybe different. The query parameters are + // url encoded, but the message fields are not. For example, if a query + // parameter is "foo%20bar", the message field will be "foo bar". QueryParameters []*QueryParameterMatcher `protobuf:"bytes,7,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"` // If specified, only gRPC requests will be matched. The router will check // that the content-type header has a application/grpc or one of the various @@ -1062,6 +1125,11 @@ type RouteMatch struct { // // [#next-major-version: unify with RBAC] TlsContext *RouteMatch_TlsContextMatchOptions `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` + // Specifies a set of dynamic metadata matchers on which the route should match. + // The router will check the dynamic metadata against all the specified dynamic metadata matchers. + // If the number of specified dynamic metadata matchers is nonzero, they all must match the + // dynamic metadata for a match to occur. + DynamicMetadata []*v32.MetadataMatcher `protobuf:"bytes,13,rep,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` } func (x *RouteMatch) Reset() { @@ -1117,7 +1185,7 @@ func (x *RouteMatch) GetPath() string { return "" } -func (x *RouteMatch) GetSafeRegex() *v31.RegexMatcher { +func (x *RouteMatch) GetSafeRegex() *v32.RegexMatcher { if x, ok := x.GetPathSpecifier().(*RouteMatch_SafeRegex); ok { return x.SafeRegex } @@ -1131,10 +1199,9 @@ func (x *RouteMatch) GetConnectMatcher() *RouteMatch_ConnectMatcher { return nil } -// Deprecated: Do not use. -func (x *RouteMatch) GetHiddenEnvoyDeprecatedRegex() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_HiddenEnvoyDeprecatedRegex); ok { - return x.HiddenEnvoyDeprecatedRegex +func (x *RouteMatch) GetPathSeparatedPrefix() string { + if x, ok := x.GetPathSpecifier().(*RouteMatch_PathSeparatedPrefix); ok { + return x.PathSeparatedPrefix } return "" } @@ -1146,7 +1213,7 @@ func (x *RouteMatch) GetCaseSensitive() *wrappers.BoolValue { return nil } -func (x *RouteMatch) GetRuntimeFraction() *v3.RuntimeFractionalPercent { +func (x *RouteMatch) GetRuntimeFraction() *v31.RuntimeFractionalPercent { if x != nil { return x.RuntimeFraction } @@ -1181,6 +1248,13 @@ func (x *RouteMatch) GetTlsContext() *RouteMatch_TlsContextMatchOptions { return nil } +func (x *RouteMatch) GetDynamicMetadata() []*v32.MetadataMatcher { + if x != nil { + return x.DynamicMetadata + } + return nil +} + type isRouteMatch_PathSpecifier interface { isRouteMatch_PathSpecifier() } @@ -1210,7 +1284,7 @@ type RouteMatch_SafeRegex struct { // path_specifier entirely and just rely on a set of header matchers which can already match // on :path, etc. The issue with that is it is unclear how to generically deal with query string // stripping. This needs more thought.] - SafeRegex *v31.RegexMatcher `protobuf:"bytes,10,opt,name=safe_regex,json=safeRegex,proto3,oneof"` + SafeRegex *v32.RegexMatcher `protobuf:"bytes,10,opt,name=safe_regex,json=safeRegex,proto3,oneof"` } type RouteMatch_ConnectMatcher_ struct { @@ -1222,13 +1296,21 @@ type RouteMatch_ConnectMatcher_ struct { // where Extended CONNECT requests may have a path, the path matchers will work if // there is a path present. // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. + // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] ConnectMatcher *RouteMatch_ConnectMatcher `protobuf:"bytes,12,opt,name=connect_matcher,json=connectMatcher,proto3,oneof"` } -type RouteMatch_HiddenEnvoyDeprecatedRegex struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRegex string `protobuf:"bytes,3,opt,name=hidden_envoy_deprecated_regex,json=hiddenEnvoyDeprecatedRegex,proto3,oneof"` +type RouteMatch_PathSeparatedPrefix struct { + // If specified, the route is a path-separated prefix rule meaning that the + // ``:path`` header (without the query string) must either exactly match the + // ``path_separated_prefix`` or have it as a prefix, followed by ``/`` + // + // For example, ``/api/dev`` would match + // ``/api/dev``, ``/api/dev/``, ``/api/dev/v1``, and ``/api/dev?param=true`` + // but would not match ``/api/developer`` + // + // Expect the value to not contain ``?`` or ``#`` and not to end in ``/`` + PathSeparatedPrefix string `protobuf:"bytes,14,opt,name=path_separated_prefix,json=pathSeparatedPrefix,proto3,oneof"` } func (*RouteMatch_Prefix) isRouteMatch_PathSpecifier() {} @@ -1239,7 +1321,7 @@ func (*RouteMatch_SafeRegex) isRouteMatch_PathSpecifier() {} func (*RouteMatch_ConnectMatcher_) isRouteMatch_PathSpecifier() {} -func (*RouteMatch_HiddenEnvoyDeprecatedRegex) isRouteMatch_PathSpecifier() {} +func (*RouteMatch_PathSeparatedPrefix) isRouteMatch_PathSpecifier() {} // [#next-free-field: 12] type CorsPolicy struct { @@ -1249,7 +1331,7 @@ type CorsPolicy struct { // Specifies string patterns that match allowed origins. An origin is allowed if any of the // string matchers match. - AllowOriginStringMatch []*v31.StringMatcher `protobuf:"bytes,11,rep,name=allow_origin_string_match,json=allowOriginStringMatch,proto3" json:"allow_origin_string_match,omitempty"` + AllowOriginStringMatch []*v32.StringMatcher `protobuf:"bytes,11,rep,name=allow_origin_string_match,json=allowOriginStringMatch,proto3" json:"allow_origin_string_match,omitempty"` // Specifies the content for the *access-control-allow-methods* header. AllowMethods string `protobuf:"bytes,2,opt,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"` // Specifies the content for the *access-control-allow-headers* header. @@ -1262,7 +1344,6 @@ type CorsPolicy struct { AllowCredentials *wrappers.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` // Types that are assignable to EnabledSpecifier: // *CorsPolicy_FilterEnabled - // *CorsPolicy_HiddenEnvoyDeprecatedEnabled EnabledSpecifier isCorsPolicy_EnabledSpecifier `protobuf_oneof:"enabled_specifier"` // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not // enforced. @@ -1270,14 +1351,10 @@ type CorsPolicy struct { // This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those // fields have to explicitly disable the filter in order for this setting to take effect. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate // and track the request's *Origin* to determine if it's valid but will not enforce any policies. - ShadowEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,10,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedAllowOrigin []string `protobuf:"bytes,1,rep,name=hidden_envoy_deprecated_allow_origin,json=hiddenEnvoyDeprecatedAllowOrigin,proto3" json:"hidden_envoy_deprecated_allow_origin,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedAllowOriginRegex []string `protobuf:"bytes,8,rep,name=hidden_envoy_deprecated_allow_origin_regex,json=hiddenEnvoyDeprecatedAllowOriginRegex,proto3" json:"hidden_envoy_deprecated_allow_origin_regex,omitempty"` + ShadowEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,10,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` } func (x *CorsPolicy) Reset() { @@ -1312,7 +1389,7 @@ func (*CorsPolicy) Descriptor() ([]byte, []int) { return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{5} } -func (x *CorsPolicy) GetAllowOriginStringMatch() []*v31.StringMatcher { +func (x *CorsPolicy) GetAllowOriginStringMatch() []*v32.StringMatcher { if x != nil { return x.AllowOriginStringMatch } @@ -1361,44 +1438,20 @@ func (m *CorsPolicy) GetEnabledSpecifier() isCorsPolicy_EnabledSpecifier { return nil } -func (x *CorsPolicy) GetFilterEnabled() *v3.RuntimeFractionalPercent { +func (x *CorsPolicy) GetFilterEnabled() *v31.RuntimeFractionalPercent { if x, ok := x.GetEnabledSpecifier().(*CorsPolicy_FilterEnabled); ok { return x.FilterEnabled } return nil } -// Deprecated: Do not use. -func (x *CorsPolicy) GetHiddenEnvoyDeprecatedEnabled() *wrappers.BoolValue { - if x, ok := x.GetEnabledSpecifier().(*CorsPolicy_HiddenEnvoyDeprecatedEnabled); ok { - return x.HiddenEnvoyDeprecatedEnabled - } - return nil -} - -func (x *CorsPolicy) GetShadowEnabled() *v3.RuntimeFractionalPercent { +func (x *CorsPolicy) GetShadowEnabled() *v31.RuntimeFractionalPercent { if x != nil { return x.ShadowEnabled } return nil } -// Deprecated: Do not use. -func (x *CorsPolicy) GetHiddenEnvoyDeprecatedAllowOrigin() []string { - if x != nil { - return x.HiddenEnvoyDeprecatedAllowOrigin - } - return nil -} - -// Deprecated: Do not use. -func (x *CorsPolicy) GetHiddenEnvoyDeprecatedAllowOriginRegex() []string { - if x != nil { - return x.HiddenEnvoyDeprecatedAllowOriginRegex - } - return nil -} - type isCorsPolicy_EnabledSpecifier interface { isCorsPolicy_EnabledSpecifier() } @@ -1409,21 +1462,14 @@ type CorsPolicy_FilterEnabled struct { // If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS // filter will be enabled for 100% of the requests. // - // If :ref:`runtime_key ` is + // If :ref:`runtime_key ` is // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - FilterEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3,oneof"` -} - -type CorsPolicy_HiddenEnvoyDeprecatedEnabled struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedEnabled *wrappers.BoolValue `protobuf:"bytes,7,opt,name=hidden_envoy_deprecated_enabled,json=hiddenEnvoyDeprecatedEnabled,proto3,oneof"` + FilterEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3,oneof"` } func (*CorsPolicy_FilterEnabled) isCorsPolicy_EnabledSpecifier() {} -func (*CorsPolicy_HiddenEnvoyDeprecatedEnabled) isCorsPolicy_EnabledSpecifier() {} - -// [#next-free-field: 37] +// [#next-free-field: 39] type RouteAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1433,6 +1479,7 @@ type RouteAction struct { // *RouteAction_Cluster // *RouteAction_ClusterHeader // *RouteAction_WeightedClusters + // *RouteAction_ClusterSpecifierPlugin 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. @@ -1440,9 +1487,9 @@ type RouteAction struct { // 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 + // `, metadata will be merged, with values // provided there taking precedence. The filter name should be specified as *envoy.lb*. - MetadataMatch *v3.Metadata `protobuf:"bytes,4,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` + MetadataMatch *v31.Metadata `protobuf:"bytes,4,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` // Indicates that during forwarding, the matched prefix (or path) should be // swapped with this value. This option allows application URLs to be rooted // at a different path from those exposed at the reverse proxy layer. The router filter will @@ -1450,16 +1497,16 @@ type RouteAction struct { // ` header. // // Only one of *prefix_rewrite* or - // :ref:`regex_rewrite ` + // :ref:`regex_rewrite ` // may be specified. // // .. attention:: // // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. + // :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: + // :ref:`Route `, as shown by the below config entries: // // .. code-block:: yaml // @@ -1484,7 +1531,7 @@ type RouteAction struct { // before the rewrite into the :ref:`x-envoy-original-path // ` header. // - // Only one of :ref:`prefix_rewrite ` + // Only one of :ref:`prefix_rewrite ` // or *regex_rewrite* may be specified. // // Examples using Google's `RE2 `_ engine: @@ -1503,13 +1550,21 @@ type RouteAction struct { // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to // ``/aaa/yyy/bbb``. - RegexRewrite *v31.RegexMatchAndSubstitute `protobuf:"bytes,32,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` + RegexRewrite *v32.RegexMatchAndSubstitute `protobuf:"bytes,32,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` // Types that are assignable to HostRewriteSpecifier: // *RouteAction_HostRewriteLiteral // *RouteAction_AutoHostRewrite // *RouteAction_HostRewriteHeader // *RouteAction_HostRewritePathRegex HostRewriteSpecifier isRouteAction_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"` + // If set, then a host rewrite action (one of + // :ref:`host_rewrite_literal `, + // :ref:`auto_host_rewrite `, + // :ref:`host_rewrite_header `, or + // :ref:`host_rewrite_path_regex `) + // causes the original value of the host header, if any, to be appended to the + // :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header. + AppendXForwardedHost bool `protobuf:"varint,38,opt,name=append_x_forwarded_host,json=appendXForwardedHost,proto3" json:"append_x_forwarded_host,omitempty"` // Specifies the upstream timeout for the route. If not specified, the default is 15s. This // spans between the point at which the entire downstream request (i.e. end-of-stream) has been // processed and when the upstream response has been completely processed. A value of 0 will @@ -1524,14 +1579,14 @@ type RouteAction struct { Timeout *duration.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` // Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, // although the connection manager wide :ref:`stream_idle_timeout - // ` + // ` // will still apply. A value of 0 will completely disable the route's idle timeout, even if a // connection manager stream idle timeout is configured. // // The idle timeout is distinct to :ref:`timeout - // `, which provides an upper bound + // `, which provides an upper bound // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount + // ` instead bounds the amount // of time the request's stream may be idle. // // After header decoding, the idle timeout will apply on downstream and @@ -1543,7 +1598,7 @@ type RouteAction struct { // // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. + // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. IdleTimeout *duration.Duration `protobuf:"bytes,24,opt,name=idle_timeout,json=idleTimeout,proto3" 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 @@ -1552,19 +1607,21 @@ type RouteAction struct { // [#not-implemented-hide:] // Specifies the configuration for retry policy extension. Note that if this is set, it'll take // precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, - // most internal one becomes the enforced policy). :ref:`Retry policy ` + // most internal one becomes the enforced policy). :ref:`Retry policy ` // should not be set if this field is used. RetryPolicyTypedConfig *any.Any `protobuf:"bytes,33,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` - // Indicates that the route has request mirroring policies. + // Specify a set of route request mirroring policies. + // It takes precedence over the virtual host and route config mirror policy entirely. + // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,30,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` // Optionally specifies the :ref:`routing priority `. - Priority v3.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.config.core.v3.RoutingPriority" json:"priority,omitempty"` + Priority v31.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.config.core.v3.RoutingPriority" json:"priority,omitempty"` // Specifies a set of rate limit configurations that could be applied to the // route. RateLimits []*RateLimit `protobuf:"bytes,13,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` // Specifies if the rate limit filter should include the virtual host rate // limits. By default, if the route configured rate limits, the virtual host - // :ref:`rate_limits ` are not applied to the + // :ref:`rate_limits ` are not applied to the // request. // // This field is deprecated. Please use :ref:`vh_rate_limits ` @@ -1586,15 +1643,15 @@ type RouteAction struct { 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"` - // Deprecated by :ref:`grpc_timeout_header_max ` + // Deprecated by :ref:`grpc_timeout_header_max ` // If present, and the request is a gRPC request, use the // `grpc-timeout header `_, // or its default value (infinity) instead of - // :ref:`timeout `, but limit the applied timeout + // :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. + // :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. // @@ -1609,7 +1666,7 @@ type RouteAction struct { // // Deprecated: Do not use. MaxGrpcTimeout *duration.Duration `protobuf:"bytes,23,opt,name=max_grpc_timeout,json=maxGrpcTimeout,proto3" json:"max_grpc_timeout,omitempty"` - // Deprecated by :ref:`grpc_timeout_header_offset `. + // Deprecated by :ref:`grpc_timeout_header_offset `. // If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting // the provided duration from the header. This is useful in allowing Envoy to set its global // timeout to be less than that of the deadline imposed by the calling client, which makes it more @@ -1624,21 +1681,21 @@ type RouteAction struct { // If present, Envoy will try to follow an upstream redirect response instead of proxying the // response back to the downstream. An upstream redirect response is defined // by :ref:`redirect_response_codes - // `. + // `. InternalRedirectPolicy *InternalRedirectPolicy `protobuf:"bytes,34,opt,name=internal_redirect_policy,json=internalRedirectPolicy,proto3" json:"internal_redirect_policy,omitempty"` // Deprecated: Do not use. InternalRedirectAction RouteAction_InternalRedirectAction `protobuf:"varint,26,opt,name=internal_redirect_action,json=internalRedirectAction,proto3,enum=envoy.config.route.v3.RouteAction_InternalRedirectAction" json:"internal_redirect_action,omitempty"` // An internal redirect is handled, iff the number of previous internal redirects that a // downstream request has encountered is lower than this value, and - // :ref:`internal_redirect_action ` + // :ref:`internal_redirect_action ` // is set to :ref:`HANDLE_INTERNAL_REDIRECT - // ` + // ` // In the case where a downstream request is bounced among multiple routes by internal redirect, // the first route that hits this threshold, or has - // :ref:`internal_redirect_action ` + // :ref:`internal_redirect_action ` // set to // :ref:`PASS_THROUGH_INTERNAL_REDIRECT - // ` + // ` // will pass the redirect back to downstream. // // If not specified, at most one redirect will be followed. @@ -1651,8 +1708,6 @@ type RouteAction struct { HedgePolicy *HedgePolicy `protobuf:"bytes,27,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` // Specifies the maximum stream duration for this route. MaxStreamDuration *RouteAction_MaxStreamDuration `protobuf:"bytes,36,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRequestMirrorPolicy *RouteAction_RequestMirrorPolicy `protobuf:"bytes,10,opt,name=hidden_envoy_deprecated_request_mirror_policy,json=hiddenEnvoyDeprecatedRequestMirrorPolicy,proto3" json:"hidden_envoy_deprecated_request_mirror_policy,omitempty"` } func (x *RouteAction) Reset() { @@ -1715,6 +1770,13 @@ func (x *RouteAction) GetWeightedClusters() *WeightedCluster { return nil } +func (x *RouteAction) GetClusterSpecifierPlugin() string { + if x, ok := x.GetClusterSpecifier().(*RouteAction_ClusterSpecifierPlugin); ok { + return x.ClusterSpecifierPlugin + } + return "" +} + func (x *RouteAction) GetClusterNotFoundResponseCode() RouteAction_ClusterNotFoundResponseCode { if x != nil { return x.ClusterNotFoundResponseCode @@ -1722,7 +1784,7 @@ func (x *RouteAction) GetClusterNotFoundResponseCode() RouteAction_ClusterNotFou return RouteAction_SERVICE_UNAVAILABLE } -func (x *RouteAction) GetMetadataMatch() *v3.Metadata { +func (x *RouteAction) GetMetadataMatch() *v31.Metadata { if x != nil { return x.MetadataMatch } @@ -1736,7 +1798,7 @@ func (x *RouteAction) GetPrefixRewrite() string { return "" } -func (x *RouteAction) GetRegexRewrite() *v31.RegexMatchAndSubstitute { +func (x *RouteAction) GetRegexRewrite() *v32.RegexMatchAndSubstitute { if x != nil { return x.RegexRewrite } @@ -1771,13 +1833,20 @@ func (x *RouteAction) GetHostRewriteHeader() string { return "" } -func (x *RouteAction) GetHostRewritePathRegex() *v31.RegexMatchAndSubstitute { +func (x *RouteAction) GetHostRewritePathRegex() *v32.RegexMatchAndSubstitute { if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewritePathRegex); ok { return x.HostRewritePathRegex } return nil } +func (x *RouteAction) GetAppendXForwardedHost() bool { + if x != nil { + return x.AppendXForwardedHost + } + return false +} + func (x *RouteAction) GetTimeout() *duration.Duration { if x != nil { return x.Timeout @@ -1813,11 +1882,11 @@ func (x *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPol return nil } -func (x *RouteAction) GetPriority() v3.RoutingPriority { +func (x *RouteAction) GetPriority() v31.RoutingPriority { if x != nil { return x.Priority } - return v3.RoutingPriority_DEFAULT + return v31.RoutingPriority(0) } func (x *RouteAction) GetRateLimits() []*RateLimit { @@ -1909,14 +1978,6 @@ func (x *RouteAction) GetMaxStreamDuration() *RouteAction_MaxStreamDuration { return nil } -// Deprecated: Do not use. -func (x *RouteAction) GetHiddenEnvoyDeprecatedRequestMirrorPolicy() *RouteAction_RequestMirrorPolicy { - if x != nil { - return x.HiddenEnvoyDeprecatedRequestMirrorPolicy - } - return nil -} - type isRouteAction_ClusterSpecifier interface { isRouteAction_ClusterSpecifier() } @@ -1953,19 +2014,34 @@ type RouteAction_WeightedClusters struct { WeightedClusters *WeightedCluster `protobuf:"bytes,3,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` } +type RouteAction_ClusterSpecifierPlugin struct { + // [#not-implemented-hide:] + // Name of the cluster specifier plugin to use to determine the cluster for + // requests on this route. The plugin name must be defined in the associated + // :ref:`envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins` + // in the + // :ref:`envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name` field. + ClusterSpecifierPlugin string `protobuf:"bytes,37,opt,name=cluster_specifier_plugin,json=clusterSpecifierPlugin,proto3,oneof"` +} + func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} +func (*RouteAction_ClusterSpecifierPlugin) isRouteAction_ClusterSpecifier() {} + type isRouteAction_HostRewriteSpecifier interface { isRouteAction_HostRewriteSpecifier() } type RouteAction_HostRewriteLiteral struct { // Indicates that during forwarding, the host header will be swapped with - // this value. + // this value. Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. HostRewriteLiteral string `protobuf:"bytes,6,opt,name=host_rewrite_literal,json=hostRewriteLiteral,proto3,oneof"` } @@ -1973,15 +2049,21 @@ type RouteAction_AutoHostRewrite struct { // Indicates that during forwarding, the host header will be swapped with // the hostname of the upstream host chosen by the cluster manager. This // option is applicable only when the destination cluster for a route is of - // type *strict_dns* or *logical_dns*. Setting this to true with other cluster - // types has no effect. + // type *strict_dns* or *logical_dns*. Setting this to true with other cluster types + // has no effect. Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. AutoHostRewrite *wrappers.BoolValue `protobuf:"bytes,7,opt,name=auto_host_rewrite,json=autoHostRewrite,proto3,oneof"` } type RouteAction_HostRewriteHeader struct { // Indicates that during forwarding, the host header will be swapped with the content of given // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. + // If header value is empty, host header is left intact. Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. // // .. attention:: // @@ -1998,6 +2080,10 @@ type RouteAction_HostRewritePathRegex struct { // Indicates that during forwarding, the host header will be swapped with // the result of the regex substitution executed on path value with query and fragment removed. // This is useful for transitioning variable content between path segment and subdomain. + // Using this option will append the + // :ref:`config_http_conn_man_headers_x-forwarded-host` header if + // :ref:`append_x_forwarded_host ` + // is set. // // For example with the following config: // @@ -2010,7 +2096,7 @@ type RouteAction_HostRewritePathRegex struct { // substitution: \1 // // Would rewrite the host header to `envoyproxy.io` given the path `/envoyproxy.io/some/path`. - HostRewritePathRegex *v31.RegexMatchAndSubstitute `protobuf:"bytes,35,opt,name=host_rewrite_path_regex,json=hostRewritePathRegex,proto3,oneof"` + HostRewritePathRegex *v32.RegexMatchAndSubstitute `protobuf:"bytes,35,opt,name=host_rewrite_path_regex,json=hostRewritePathRegex,proto3,oneof"` } func (*RouteAction_HostRewriteLiteral) isRouteAction_HostRewriteSpecifier() {} @@ -2022,7 +2108,7 @@ func (*RouteAction_HostRewriteHeader) isRouteAction_HostRewriteSpecifier() {} func (*RouteAction_HostRewritePathRegex) isRouteAction_HostRewriteSpecifier() {} // HTTP retry :ref:`architecture overview `. -// [#next-free-field: 12] +// [#next-free-field: 14] type RetryPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2036,18 +2122,38 @@ type RetryPolicy struct { // defaults to 1. These are the same conditions documented for // :ref:`config_http_filters_router_x-envoy-max-retries`. NumRetries *wrappers.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 + // Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This + // parameter is optional. The same conditions documented for // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. // // .. note:: // // If left unspecified, Envoy will use the global - // :ref:`route timeout ` for the request. + // :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 *duration.Duration `protobuf:"bytes,3,opt,name=per_try_timeout,json=perTryTimeout,proto3" json:"per_try_timeout,omitempty"` + // Specifies an upstream idle timeout per retry attempt (including the initial attempt). This + // parameter is optional and if absent there is no per try idle timeout. The semantics of the per + // try idle timeout are similar to the + // :ref:`route idle timeout ` and + // :ref:`stream idle timeout + // ` + // both enforced by the HTTP connection manager. The difference is that this idle timeout + // is enforced by the router for each individual attempt and thus after all previous filters have + // run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout + // is useful in cases in which total request timeout is bounded by a number of retries and a + // :ref:`per_try_timeout `, but + // there is a desire to ensure each try is making incremental progress. Note also that similar + // to :ref:`per_try_timeout `, + // this idle timeout does not start until after both the entire request has been received by the + // router *and* a connection pool connection has been obtained. Unlike + // :ref:`per_try_timeout `, + // the idle timer continues once the response starts streaming back to the downstream client. + // This ensures that response data continues to make progress without using one of the HTTP + // connection manager idle timeouts. + PerTryIdleTimeout *duration.Duration `protobuf:"bytes,13,opt,name=per_try_idle_timeout,json=perTryIdleTimeout,proto3" json:"per_try_idle_timeout,omitempty"` // Specifies an implementation of a RetryPriority which is used to determine the // distribution of load across priorities used for retries. Refer to // :ref:`retry plugin configuration ` for more details. @@ -2057,6 +2163,10 @@ type RetryPolicy struct { // Refer to :ref:`retry plugin configuration ` for more // details. RetryHostPredicate []*RetryPolicy_RetryHostPredicate `protobuf:"bytes,5,rep,name=retry_host_predicate,json=retryHostPredicate,proto3" json:"retry_host_predicate,omitempty"` + // Retry options predicates that will be applied prior to retrying a request. These predicates + // allow customizing request behavior between retries. + // [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions] + RetryOptionsPredicates []*v31.TypedExtensionConfig `protobuf:"bytes,12,rep,name=retry_options_predicates,json=retryOptionsPredicates,proto3" json:"retry_options_predicates,omitempty"` // The maximum number of times host selection will be reattempted before giving up, at which // point the host that was last selected will be routed to. If unspecified, this will default to // retrying once. @@ -2138,6 +2248,13 @@ func (x *RetryPolicy) GetPerTryTimeout() *duration.Duration { return nil } +func (x *RetryPolicy) GetPerTryIdleTimeout() *duration.Duration { + if x != nil { + return x.PerTryIdleTimeout + } + return nil +} + func (x *RetryPolicy) GetRetryPriority() *RetryPolicy_RetryPriority { if x != nil { return x.RetryPriority @@ -2152,6 +2269,13 @@ func (x *RetryPolicy) GetRetryHostPredicate() []*RetryPolicy_RetryHostPredicate return nil } +func (x *RetryPolicy) GetRetryOptionsPredicates() []*v31.TypedExtensionConfig { + if x != nil { + return x.RetryOptionsPredicates + } + return nil +} + func (x *RetryPolicy) GetHostSelectionRetryMaxAttempts() int64 { if x != nil { return x.HostSelectionRetryMaxAttempts @@ -2209,7 +2333,7 @@ type HedgePolicy struct { // on top of what is specified by initial_requests. // Defaults to 0. // [#not-implemented-hide:] - AdditionalRequestChance *v32.FractionalPercent `protobuf:"bytes,2,opt,name=additional_request_chance,json=additionalRequestChance,proto3" json:"additional_request_chance,omitempty"` + AdditionalRequestChance *v33.FractionalPercent `protobuf:"bytes,2,opt,name=additional_request_chance,json=additionalRequestChance,proto3" json:"additional_request_chance,omitempty"` // Indicates that a hedged request should be sent when the per-try timeout is hit. // This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight. // The first request to complete successfully will be the one returned to the caller. @@ -2219,7 +2343,7 @@ type HedgePolicy struct { // if there are no more retries left. // * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. // - // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least + // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least // one error code and specifies a maximum number of retries. // // Defaults to false. @@ -2265,7 +2389,7 @@ func (x *HedgePolicy) GetInitialRequests() *wrappers.UInt32Value { return nil } -func (x *HedgePolicy) GetAdditionalRequestChance() *v32.FractionalPercent { +func (x *HedgePolicy) GetAdditionalRequestChance() *v33.FractionalPercent { if x != nil { return x.AdditionalRequestChance } @@ -2400,7 +2524,7 @@ func (x *RedirectAction) GetPrefixRewrite() string { return "" } -func (x *RedirectAction) GetRegexRewrite() *v31.RegexMatchAndSubstitute { +func (x *RedirectAction) GetRegexRewrite() *v32.RegexMatchAndSubstitute { if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_RegexRewrite); ok { return x.RegexRewrite } @@ -2471,7 +2595,7 @@ type RedirectAction_PrefixRewrite struct { // .. attention:: // // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. + // :ref:`RouteAction's prefix_rewrite `. PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3,oneof"` } @@ -2499,7 +2623,7 @@ type RedirectAction_RegexRewrite struct { // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to // ``/aaa/yyy/bbb``. - RegexRewrite *v31.RegexMatchAndSubstitute `protobuf:"bytes,9,opt,name=regex_rewrite,json=regexRewrite,proto3,oneof"` + RegexRewrite *v32.RegexMatchAndSubstitute `protobuf:"bytes,9,opt,name=regex_rewrite,json=regexRewrite,proto3,oneof"` } func (*RedirectAction_PathRedirect) isRedirectAction_PathRewriteSpecifier() {} @@ -2521,9 +2645,9 @@ type DirectResponseAction struct { // .. note:: // // Headers can be specified using *response_headers_to_add* in the enclosing - // :ref:`envoy_api_msg_config.route.v3.Route`, :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` or - // :ref:`envoy_api_msg_config.route.v3.VirtualHost`. - Body *v3.DataSource `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` or + // :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`. + Body *v31.DataSource `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` } func (x *DirectResponseAction) Reset() { @@ -2565,13 +2689,52 @@ func (x *DirectResponseAction) GetStatus() uint32 { return 0 } -func (x *DirectResponseAction) GetBody() *v3.DataSource { +func (x *DirectResponseAction) GetBody() *v31.DataSource { if x != nil { return x.Body } return nil } +// [#not-implemented-hide:] +type NonForwardingAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NonForwardingAction) Reset() { + *x = NonForwardingAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NonForwardingAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NonForwardingAction) ProtoMessage() {} + +func (x *NonForwardingAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NonForwardingAction.ProtoReflect.Descriptor instead. +func (*NonForwardingAction) Descriptor() ([]byte, []int) { + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{11} +} + type Decorator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2593,7 +2756,7 @@ type Decorator struct { func (x *Decorator) Reset() { *x = Decorator{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[11] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2606,7 +2769,7 @@ func (x *Decorator) String() string { func (*Decorator) ProtoMessage() {} func (x *Decorator) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[11] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2619,7 +2782,7 @@ func (x *Decorator) ProtoReflect() protoreflect.Message { // Deprecated: Use Decorator.ProtoReflect.Descriptor instead. func (*Decorator) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{11} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{12} } func (x *Decorator) GetOperation() string { @@ -2647,13 +2810,13 @@ type Tracing struct { // 'tracing.client_sampling' in the :ref:`HTTP Connection Manager // `. // Default: 100% - ClientSampling *v32.FractionalPercent `protobuf:"bytes,1,opt,name=client_sampling,json=clientSampling,proto3" json:"client_sampling,omitempty"` + ClientSampling *v33.FractionalPercent `protobuf:"bytes,1,opt,name=client_sampling,json=clientSampling,proto3" json:"client_sampling,omitempty"` // Target percentage of requests managed by this HTTP connection manager that will be randomly // selected for trace generation, if not requested by the client or not forced. This field is // a direct analog for the runtime variable 'tracing.random_sampling' in the // :ref:`HTTP Connection Manager `. // Default: 100% - RandomSampling *v32.FractionalPercent `protobuf:"bytes,2,opt,name=random_sampling,json=randomSampling,proto3" json:"random_sampling,omitempty"` + RandomSampling *v33.FractionalPercent `protobuf:"bytes,2,opt,name=random_sampling,json=randomSampling,proto3" json:"random_sampling,omitempty"` // Target percentage of requests managed by this HTTP connection manager that will be traced // after all other sampling checks have been applied (client-directed, force tracing, random // sampling). This field functions as an upper limit on the total configured sampling rate. For @@ -2662,20 +2825,20 @@ type Tracing struct { // analog for the runtime variable 'tracing.global_enabled' in the // :ref:`HTTP Connection Manager `. // Default: 100% - OverallSampling *v32.FractionalPercent `protobuf:"bytes,3,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` + OverallSampling *v33.FractionalPercent `protobuf:"bytes,3,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` // A list of custom tags with unique tag name to create tags for the active span. // It will take effect after merging with the :ref:`corresponding configuration - // ` + // ` // configured in the HTTP connection manager. If two tags with the same name are configured // each in the HTTP connection manager and the route level, the one configured here takes // priority. - CustomTags []*v33.CustomTag `protobuf:"bytes,4,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` + CustomTags []*v34.CustomTag `protobuf:"bytes,4,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` } func (x *Tracing) Reset() { *x = Tracing{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[12] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2688,7 +2851,7 @@ func (x *Tracing) String() string { func (*Tracing) ProtoMessage() {} func (x *Tracing) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[12] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2701,31 +2864,31 @@ func (x *Tracing) ProtoReflect() protoreflect.Message { // Deprecated: Use Tracing.ProtoReflect.Descriptor instead. func (*Tracing) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{12} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{13} } -func (x *Tracing) GetClientSampling() *v32.FractionalPercent { +func (x *Tracing) GetClientSampling() *v33.FractionalPercent { if x != nil { return x.ClientSampling } return nil } -func (x *Tracing) GetRandomSampling() *v32.FractionalPercent { +func (x *Tracing) GetRandomSampling() *v33.FractionalPercent { if x != nil { return x.RandomSampling } return nil } -func (x *Tracing) GetOverallSampling() *v32.FractionalPercent { +func (x *Tracing) GetOverallSampling() *v33.FractionalPercent { if x != nil { return x.OverallSampling } return nil } -func (x *Tracing) GetCustomTags() []*v33.CustomTag { +func (x *Tracing) GetCustomTags() []*v34.CustomTag { if x != nil { return x.CustomTags } @@ -2762,16 +2925,12 @@ type VirtualCluster struct { // 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"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedPattern string `protobuf:"bytes,1,opt,name=hidden_envoy_deprecated_pattern,json=hiddenEnvoyDeprecatedPattern,proto3" json:"hidden_envoy_deprecated_pattern,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedMethod v3.RequestMethod `protobuf:"varint,3,opt,name=hidden_envoy_deprecated_method,json=hiddenEnvoyDeprecatedMethod,proto3,enum=envoy.config.core.v3.RequestMethod" json:"hidden_envoy_deprecated_method,omitempty"` } func (x *VirtualCluster) Reset() { *x = VirtualCluster{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[13] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2784,7 +2943,7 @@ func (x *VirtualCluster) String() string { func (*VirtualCluster) ProtoMessage() {} func (x *VirtualCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[13] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2797,7 +2956,7 @@ func (x *VirtualCluster) ProtoReflect() protoreflect.Message { // Deprecated: Use VirtualCluster.ProtoReflect.Descriptor instead. func (*VirtualCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{13} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14} } func (x *VirtualCluster) GetHeaders() []*HeaderMatcher { @@ -2814,23 +2973,8 @@ func (x *VirtualCluster) GetName() string { return "" } -// Deprecated: Do not use. -func (x *VirtualCluster) GetHiddenEnvoyDeprecatedPattern() string { - if x != nil { - return x.HiddenEnvoyDeprecatedPattern - } - return "" -} - -// Deprecated: Do not use. -func (x *VirtualCluster) GetHiddenEnvoyDeprecatedMethod() v3.RequestMethod { - if x != nil { - return x.HiddenEnvoyDeprecatedMethod - } - return v3.RequestMethod_METHOD_UNSPECIFIED -} - // Global rate limiting :ref:`architecture overview `. +// Also applies to Local rate limiting :ref:`using descriptors `. type RateLimit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2863,7 +3007,7 @@ type RateLimit struct { func (x *RateLimit) Reset() { *x = RateLimit{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[14] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2876,7 +3020,7 @@ func (x *RateLimit) String() string { func (*RateLimit) ProtoMessage() {} func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[14] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2889,7 +3033,7 @@ func (x *RateLimit) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. func (*RateLimit) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15} } func (x *RateLimit) GetStage() *wrappers.UInt32Value { @@ -2939,12 +3083,12 @@ func (x *RateLimit) GetLimit() *RateLimit_Override { // // .. 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 +// `. i.e, a request that has the :ref:`name +// ` header will match, regardless of the header's // value. // // [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// [#next-free-field: 13] +// [#next-free-field: 14] type HeaderMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2962,7 +3106,7 @@ type HeaderMatcher struct { // *HeaderMatcher_PrefixMatch // *HeaderMatcher_SuffixMatch // *HeaderMatcher_ContainsMatch - // *HeaderMatcher_HiddenEnvoyDeprecatedRegexMatch + // *HeaderMatcher_StringMatch HeaderMatchSpecifier isHeaderMatcher_HeaderMatchSpecifier `protobuf_oneof:"header_match_specifier"` // If specified, the match result will be inverted before checking. Defaults to false. // @@ -2976,7 +3120,7 @@ type HeaderMatcher struct { func (x *HeaderMatcher) Reset() { *x = HeaderMatcher{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[15] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2989,7 +3133,7 @@ func (x *HeaderMatcher) String() string { func (*HeaderMatcher) ProtoMessage() {} func (x *HeaderMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[15] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3002,7 +3146,7 @@ func (x *HeaderMatcher) ProtoReflect() protoreflect.Message { // Deprecated: Use HeaderMatcher.ProtoReflect.Descriptor instead. func (*HeaderMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{16} } func (x *HeaderMatcher) GetName() string { @@ -3019,6 +3163,7 @@ func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpe return nil } +// Deprecated: Do not use. func (x *HeaderMatcher) GetExactMatch() string { if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_ExactMatch); ok { return x.ExactMatch @@ -3026,14 +3171,15 @@ func (x *HeaderMatcher) GetExactMatch() string { return "" } -func (x *HeaderMatcher) GetSafeRegexMatch() *v31.RegexMatcher { +// Deprecated: Do not use. +func (x *HeaderMatcher) GetSafeRegexMatch() *v32.RegexMatcher { if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SafeRegexMatch); ok { return x.SafeRegexMatch } return nil } -func (x *HeaderMatcher) GetRangeMatch() *v32.Int64Range { +func (x *HeaderMatcher) GetRangeMatch() *v33.Int64Range { if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_RangeMatch); ok { return x.RangeMatch } @@ -3047,6 +3193,7 @@ func (x *HeaderMatcher) GetPresentMatch() bool { return false } +// Deprecated: Do not use. func (x *HeaderMatcher) GetPrefixMatch() string { if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_PrefixMatch); ok { return x.PrefixMatch @@ -3054,6 +3201,7 @@ func (x *HeaderMatcher) GetPrefixMatch() string { return "" } +// Deprecated: Do not use. func (x *HeaderMatcher) GetSuffixMatch() string { if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SuffixMatch); ok { return x.SuffixMatch @@ -3061,6 +3209,7 @@ func (x *HeaderMatcher) GetSuffixMatch() string { return "" } +// Deprecated: Do not use. func (x *HeaderMatcher) GetContainsMatch() string { if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_ContainsMatch); ok { return x.ContainsMatch @@ -3068,12 +3217,11 @@ func (x *HeaderMatcher) GetContainsMatch() string { return "" } -// Deprecated: Do not use. -func (x *HeaderMatcher) GetHiddenEnvoyDeprecatedRegexMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_HiddenEnvoyDeprecatedRegexMatch); ok { - return x.HiddenEnvoyDeprecatedRegexMatch +func (x *HeaderMatcher) GetStringMatch() *v32.StringMatcher { + if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_StringMatch); ok { + return x.StringMatch } - return "" + return nil } func (x *HeaderMatcher) GetInvertMatch() bool { @@ -3089,6 +3237,9 @@ type isHeaderMatcher_HeaderMatchSpecifier interface { type HeaderMatcher_ExactMatch struct { // If specified, header match will be performed based on the value of the header. + // This field is deprecated. Please use :ref:`string_match `. + // + // Deprecated: Do not use. ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"` } @@ -3096,7 +3247,10 @@ type HeaderMatcher_SafeRegexMatch struct { // If specified, this regex string is a regular expression rule which implies the entire request // header value must match the regex. The rule will not match if only a subsequence of the // request header value matches the regex. - SafeRegexMatch *v31.RegexMatcher `protobuf:"bytes,11,opt,name=safe_regex_match,json=safeRegexMatch,proto3,oneof"` + // This field is deprecated. Please use :ref:`string_match `. + // + // Deprecated: Do not use. + SafeRegexMatch *v32.RegexMatcher `protobuf:"bytes,11,opt,name=safe_regex_match,json=safeRegexMatch,proto3,oneof"` } type HeaderMatcher_RangeMatch struct { @@ -3111,32 +3265,38 @@ type HeaderMatcher_RangeMatch struct { // // * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, // "-1somestring" - RangeMatch *v32.Int64Range `protobuf:"bytes,6,opt,name=range_match,json=rangeMatch,proto3,oneof"` + RangeMatch *v33.Int64Range `protobuf:"bytes,6,opt,name=range_match,json=rangeMatch,proto3,oneof"` } type HeaderMatcher_PresentMatch struct { - // If specified, header match will be performed based on whether the header is in the - // request. + // If specified as true, header match will be performed based on whether the header is in the + // request. If specified as false, header match will be performed based on whether the header is absent. PresentMatch bool `protobuf:"varint,7,opt,name=present_match,json=presentMatch,proto3,oneof"` } type HeaderMatcher_PrefixMatch struct { // If specified, header match will be performed based on the prefix of the header value. // Note: empty prefix is not allowed, please use present_match instead. + // This field is deprecated. Please use :ref:`string_match `. // // Examples: // // * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. + // + // Deprecated: Do not use. PrefixMatch string `protobuf:"bytes,9,opt,name=prefix_match,json=prefixMatch,proto3,oneof"` } type HeaderMatcher_SuffixMatch struct { // If specified, header match will be performed based on the suffix of the header value. // Note: empty suffix is not allowed, please use present_match instead. + // This field is deprecated. Please use :ref:`string_match `. // // Examples: // // * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. + // + // Deprecated: Do not use. SuffixMatch string `protobuf:"bytes,10,opt,name=suffix_match,json=suffixMatch,proto3,oneof"` } @@ -3144,16 +3304,19 @@ type HeaderMatcher_ContainsMatch struct { // If specified, header match will be performed based on whether the header value contains // the given value or not. // Note: empty contains match is not allowed, please use present_match instead. + // This field is deprecated. Please use :ref:`string_match `. // // Examples: // // * The value *abcd* matches the value *xyzabcdpqr*, but not for *xyzbcdpqr*. + // + // Deprecated: Do not use. ContainsMatch string `protobuf:"bytes,12,opt,name=contains_match,json=containsMatch,proto3,oneof"` } -type HeaderMatcher_HiddenEnvoyDeprecatedRegexMatch struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRegexMatch string `protobuf:"bytes,5,opt,name=hidden_envoy_deprecated_regex_match,json=hiddenEnvoyDeprecatedRegexMatch,proto3,oneof"` +type HeaderMatcher_StringMatch struct { + // If specified, header match will be performed based on the string match of the header value. + StringMatch *v32.StringMatcher `protobuf:"bytes,13,opt,name=string_match,json=stringMatch,proto3,oneof"` } func (*HeaderMatcher_ExactMatch) isHeaderMatcher_HeaderMatchSpecifier() {} @@ -3170,7 +3333,7 @@ func (*HeaderMatcher_SuffixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} func (*HeaderMatcher_ContainsMatch) isHeaderMatcher_HeaderMatchSpecifier() {} -func (*HeaderMatcher_HiddenEnvoyDeprecatedRegexMatch) isHeaderMatcher_HeaderMatchSpecifier() {} +func (*HeaderMatcher_StringMatch) isHeaderMatcher_HeaderMatchSpecifier() {} // Query parameter matching treats the query string of a request's :path header // as an ampersand-separated list of keys and/or key=value elements. @@ -3187,16 +3350,12 @@ type QueryParameterMatcher struct { // *QueryParameterMatcher_StringMatch // *QueryParameterMatcher_PresentMatch QueryParameterMatchSpecifier isQueryParameterMatcher_QueryParameterMatchSpecifier `protobuf_oneof:"query_parameter_match_specifier"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedValue string `protobuf:"bytes,3,opt,name=hidden_envoy_deprecated_value,json=hiddenEnvoyDeprecatedValue,proto3" json:"hidden_envoy_deprecated_value,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRegex *wrappers.BoolValue `protobuf:"bytes,4,opt,name=hidden_envoy_deprecated_regex,json=hiddenEnvoyDeprecatedRegex,proto3" json:"hidden_envoy_deprecated_regex,omitempty"` } func (x *QueryParameterMatcher) Reset() { *x = QueryParameterMatcher{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[16] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3209,7 +3368,7 @@ func (x *QueryParameterMatcher) String() string { func (*QueryParameterMatcher) ProtoMessage() {} func (x *QueryParameterMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[16] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3222,7 +3381,7 @@ func (x *QueryParameterMatcher) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryParameterMatcher.ProtoReflect.Descriptor instead. func (*QueryParameterMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{16} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17} } func (x *QueryParameterMatcher) GetName() string { @@ -3239,7 +3398,7 @@ func (m *QueryParameterMatcher) GetQueryParameterMatchSpecifier() isQueryParamet return nil } -func (x *QueryParameterMatcher) GetStringMatch() *v31.StringMatcher { +func (x *QueryParameterMatcher) GetStringMatch() *v32.StringMatcher { if x, ok := x.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_StringMatch); ok { return x.StringMatch } @@ -3253,29 +3412,13 @@ func (x *QueryParameterMatcher) GetPresentMatch() bool { return false } -// Deprecated: Do not use. -func (x *QueryParameterMatcher) GetHiddenEnvoyDeprecatedValue() string { - if x != nil { - return x.HiddenEnvoyDeprecatedValue - } - return "" -} - -// Deprecated: Do not use. -func (x *QueryParameterMatcher) GetHiddenEnvoyDeprecatedRegex() *wrappers.BoolValue { - if x != nil { - return x.HiddenEnvoyDeprecatedRegex - } - return nil -} - type isQueryParameterMatcher_QueryParameterMatchSpecifier interface { isQueryParameterMatcher_QueryParameterMatchSpecifier() } type QueryParameterMatcher_StringMatch struct { // Specifies whether a query parameter value should match against a string. - StringMatch *v31.StringMatcher `protobuf:"bytes,5,opt,name=string_match,json=stringMatch,proto3,oneof"` + StringMatch *v32.StringMatcher `protobuf:"bytes,5,opt,name=string_match,json=stringMatch,proto3,oneof"` } type QueryParameterMatcher_PresentMatch struct { @@ -3297,7 +3440,7 @@ type InternalRedirectPolicy struct { // downstream request has encountered is lower than this value. // In the case where a downstream request is bounced among multiple routes by internal redirect, // the first route that hits this threshold, or does not set :ref:`internal_redirect_policy - // ` + // ` // will pass the redirect back to downstream. // // If not specified, at most one redirect will be followed. @@ -3309,7 +3452,8 @@ type InternalRedirectPolicy struct { // Specifies a list of predicates that are queried when an upstream response is deemed // to trigger an internal redirect by all other criteria. Any predicate in the list can reject // the redirect, causing the response to be proxied to downstream. - Predicates []*v3.TypedExtensionConfig `protobuf:"bytes,3,rep,name=predicates,proto3" json:"predicates,omitempty"` + // [#extension-category: envoy.internal_redirect_predicates] + Predicates []*v31.TypedExtensionConfig `protobuf:"bytes,3,rep,name=predicates,proto3" json:"predicates,omitempty"` // Allow internal redirect to follow a target URI with a different scheme than the value of // x-forwarded-proto. The default is false. AllowCrossSchemeRedirect bool `protobuf:"varint,4,opt,name=allow_cross_scheme_redirect,json=allowCrossSchemeRedirect,proto3" json:"allow_cross_scheme_redirect,omitempty"` @@ -3318,7 +3462,7 @@ type InternalRedirectPolicy struct { func (x *InternalRedirectPolicy) Reset() { *x = InternalRedirectPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[17] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3331,7 +3475,7 @@ func (x *InternalRedirectPolicy) String() string { func (*InternalRedirectPolicy) ProtoMessage() {} func (x *InternalRedirectPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[17] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3344,7 +3488,7 @@ func (x *InternalRedirectPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use InternalRedirectPolicy.ProtoReflect.Descriptor instead. func (*InternalRedirectPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{18} } func (x *InternalRedirectPolicy) GetMaxInternalRedirects() *wrappers.UInt32Value { @@ -3361,7 +3505,7 @@ func (x *InternalRedirectPolicy) GetRedirectResponseCodes() []uint32 { return nil } -func (x *InternalRedirectPolicy) GetPredicates() []*v3.TypedExtensionConfig { +func (x *InternalRedirectPolicy) GetPredicates() []*v31.TypedExtensionConfig { if x != nil { return x.Predicates } @@ -3375,56 +3519,144 @@ func (x *InternalRedirectPolicy) GetAllowCrossSchemeRedirect() bool { return false } -// [#next-free-field: 11] -type WeightedCluster_ClusterWeight struct { +// A simple wrapper for an HTTP filter config. This is intended to be used as a wrapper for the +// map value in +// :ref:`VirtualHost.typed_per_filter_config`, +// :ref:`Route.typed_per_filter_config`, +// or :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` +// to add additional flags to the filter. +// [#not-implemented-hide:] +type FilterConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 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 *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with - // values here taking precedence. The filter name should be specified as *envoy.lb*. - MetadataMatch *v3.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_config.route.v3.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v3.Route`, :ref:`envoy_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v3.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_config.route.v3.RouteAction`. - RequestHeadersToRemove []string `protobuf:"bytes,9,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a list of headers to be added to responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_config.route.v3.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v3.Route`, :ref:`envoy_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*v3.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_config.route.v3.RouteAction`. - ResponseHeadersToRemove []string `protobuf:"bytes,6,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // The per_filter_config field can be used to provide weighted cluster-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.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]*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"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedPerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,8,rep,name=hidden_envoy_deprecated_per_filter_config,json=hiddenEnvoyDeprecatedPerFilterConfig,proto3" json:"hidden_envoy_deprecated_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The filter config. + Config *any.Any `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // If true, the filter is optional, meaning that if the client does + // not support the specified filter, it may ignore the map entry rather + // than rejecting the config. + IsOptional bool `protobuf:"varint,2,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` +} + +func (x *FilterConfig) Reset() { + *x = FilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterConfig) ProtoMessage() {} + +func (x *FilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterConfig.ProtoReflect.Descriptor instead. +func (*FilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{19} +} + +func (x *FilterConfig) GetConfig() *any.Any { + if x != nil { + return x.Config + } + return nil +} + +func (x *FilterConfig) GetIsOptional() bool { + if x != nil { + return x.IsOptional + } + return false +} + +// [#next-free-field: 13] +type WeightedCluster_ClusterWeight struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Only one of *name* and *cluster_header* may be specified. + // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] + // Name of the upstream cluster. The cluster must exist in the + // :ref:`cluster manager configuration `. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Only one of *name* and *cluster_header* may be specified. + // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }] + // Envoy will determine the cluster to route to by reading the value of the + // HTTP header named by cluster_header from the request headers. If the + // header is not found or the referenced cluster does not exist, Envoy will + // return a 404 response. + // + // .. attention:: + // + // Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 + // *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + // + // .. note:: + // + // If the header appears multiple times only the first value is used. + ClusterHeader string `protobuf:"bytes,12,opt,name=cluster_header,json=clusterHeader,proto3" json:"cluster_header,omitempty"` + // 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 *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` + // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in + // the upstream cluster with metadata matching what is set in this field will be considered for + // load balancing. Note that this will be merged with what's provided in + // :ref:`RouteAction.metadata_match `, with + // values here taking precedence. The filter name should be specified as *envoy.lb*. + MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` + // Specifies a list of headers to be added to requests when this cluster is selected + // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. + // Headers specified at this level are applied before headers from the enclosing + // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on + // header value syntax, see the documentation on :ref:`custom request headers + // `. + RequestHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + // Specifies a list of HTTP headers that should be removed from each request when + // this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. + RequestHeadersToRemove []string `protobuf:"bytes,9,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` + // Specifies a list of headers to be added to responses when this cluster is selected + // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. + // Headers specified at this level are applied before headers from the enclosing + // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and + // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on + // header value syntax, see the documentation on :ref:`custom request headers + // `. + ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,5,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + // Specifies a list of headers to be removed from responses when this cluster is selected + // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. + ResponseHeadersToRemove []string `protobuf:"bytes,6,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` + // The per_filter_config field can be used to provide weighted cluster-specific + // configurations for filters. The key should match the filter name, such as + // *envoy.filters.http.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. + // [#comment: An entry's value may be wrapped in a + // :ref:`FilterConfig` + // message to specify additional options.] + 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"` + // Types that are assignable to HostRewriteSpecifier: + // *WeightedCluster_ClusterWeight_HostRewriteLiteral + HostRewriteSpecifier isWeightedCluster_ClusterWeight_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"` } func (x *WeightedCluster_ClusterWeight) Reset() { @@ -3466,6 +3698,13 @@ func (x *WeightedCluster_ClusterWeight) GetName() string { return "" } +func (x *WeightedCluster_ClusterWeight) GetClusterHeader() string { + if x != nil { + return x.ClusterHeader + } + return "" +} + func (x *WeightedCluster_ClusterWeight) GetWeight() *wrappers.UInt32Value { if x != nil { return x.Weight @@ -3473,14 +3712,14 @@ func (x *WeightedCluster_ClusterWeight) GetWeight() *wrappers.UInt32Value { return nil } -func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *v3.Metadata { +func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *v31.Metadata { if x != nil { return x.MetadataMatch } return nil } -func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToAdd() []*v3.HeaderValueOption { +func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToAdd() []*v31.HeaderValueOption { if x != nil { return x.RequestHeadersToAdd } @@ -3494,7 +3733,7 @@ func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToRemove() []string { return nil } -func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToAdd() []*v3.HeaderValueOption { +func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToAdd() []*v31.HeaderValueOption { if x != nil { return x.ResponseHeadersToAdd } @@ -3515,14 +3754,33 @@ func (x *WeightedCluster_ClusterWeight) GetTypedPerFilterConfig() map[string]*an return nil } -// Deprecated: Do not use. -func (x *WeightedCluster_ClusterWeight) GetHiddenEnvoyDeprecatedPerFilterConfig() map[string]*_struct.Struct { - if x != nil { - return x.HiddenEnvoyDeprecatedPerFilterConfig +func (m *WeightedCluster_ClusterWeight) GetHostRewriteSpecifier() isWeightedCluster_ClusterWeight_HostRewriteSpecifier { + if m != nil { + return m.HostRewriteSpecifier } return nil } +func (x *WeightedCluster_ClusterWeight) GetHostRewriteLiteral() string { + if x, ok := x.GetHostRewriteSpecifier().(*WeightedCluster_ClusterWeight_HostRewriteLiteral); ok { + return x.HostRewriteLiteral + } + return "" +} + +type isWeightedCluster_ClusterWeight_HostRewriteSpecifier interface { + isWeightedCluster_ClusterWeight_HostRewriteSpecifier() +} + +type WeightedCluster_ClusterWeight_HostRewriteLiteral struct { + // Indicates that during forwarding, the host header will be swapped with + // this value. + HostRewriteLiteral string `protobuf:"bytes,11,opt,name=host_rewrite_literal,json=hostRewriteLiteral,proto3,oneof"` +} + +func (*WeightedCluster_ClusterWeight_HostRewriteLiteral) isWeightedCluster_ClusterWeight_HostRewriteSpecifier() { +} + type RouteMatch_GrpcRouteMatchOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3532,7 +3790,7 @@ type RouteMatch_GrpcRouteMatchOptions struct { func (x *RouteMatch_GrpcRouteMatchOptions) Reset() { *x = RouteMatch_GrpcRouteMatchOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[25] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3545,7 +3803,7 @@ func (x *RouteMatch_GrpcRouteMatchOptions) String() string { func (*RouteMatch_GrpcRouteMatchOptions) ProtoMessage() {} func (x *RouteMatch_GrpcRouteMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[25] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3577,7 +3835,7 @@ type RouteMatch_TlsContextMatchOptions struct { func (x *RouteMatch_TlsContextMatchOptions) Reset() { *x = RouteMatch_TlsContextMatchOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[26] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3590,7 +3848,7 @@ func (x *RouteMatch_TlsContextMatchOptions) String() string { func (*RouteMatch_TlsContextMatchOptions) ProtoMessage() {} func (x *RouteMatch_TlsContextMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[26] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3630,7 +3888,7 @@ type RouteMatch_ConnectMatcher struct { func (x *RouteMatch_ConnectMatcher) Reset() { *x = RouteMatch_ConnectMatcher{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[27] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3643,7 +3901,7 @@ func (x *RouteMatch_ConnectMatcher) String() string { func (*RouteMatch_ConnectMatcher) ProtoMessage() {} func (x *RouteMatch_ConnectMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[27] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3686,17 +3944,15 @@ type RouteAction_RequestMirrorPolicy struct { // For some fraction N/D, a random number in the range [0,D) is selected. If the // number is <= the value of the numerator N, or if the key is not present, the default // value, the request will be mirrored. - RuntimeFraction *v3.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` + RuntimeFraction *v31.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` // Determines if the trace span should be sampled. Defaults to true. TraceSampled *wrappers.BoolValue `protobuf:"bytes,4,opt,name=trace_sampled,json=traceSampled,proto3" json:"trace_sampled,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRuntimeKey string `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_runtime_key,json=hiddenEnvoyDeprecatedRuntimeKey,proto3" json:"hidden_envoy_deprecated_runtime_key,omitempty"` } func (x *RouteAction_RequestMirrorPolicy) Reset() { *x = RouteAction_RequestMirrorPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[28] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3709,7 +3965,7 @@ func (x *RouteAction_RequestMirrorPolicy) String() string { func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} func (x *RouteAction_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[28] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3732,7 +3988,7 @@ func (x *RouteAction_RequestMirrorPolicy) GetCluster() string { return "" } -func (x *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *v3.RuntimeFractionalPercent { +func (x *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *v31.RuntimeFractionalPercent { if x != nil { return x.RuntimeFraction } @@ -3746,14 +4002,6 @@ func (x *RouteAction_RequestMirrorPolicy) GetTraceSampled() *wrappers.BoolValue return nil } -// Deprecated: Do not use. -func (x *RouteAction_RequestMirrorPolicy) GetHiddenEnvoyDeprecatedRuntimeKey() string { - if x != nil { - return x.HiddenEnvoyDeprecatedRuntimeKey - } - return "" -} - // Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer // `. // [#next-free-field: 7] @@ -3794,7 +4042,7 @@ type RouteAction_HashPolicy struct { func (x *RouteAction_HashPolicy) Reset() { *x = RouteAction_HashPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[29] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3807,7 +4055,7 @@ func (x *RouteAction_HashPolicy) String() string { func (*RouteAction_HashPolicy) ProtoMessage() {} func (x *RouteAction_HashPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[29] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3915,7 +4163,7 @@ func (*RouteAction_HashPolicy_FilterState_) isRouteAction_HashPolicy_PolicySpeci // This overrides any enabled/disabled upgrade filter chain specified in the // HttpConnectionManager // :ref:`upgrade_configs -// ` +// ` // but does not affect any custom filter chain specified there. type RouteAction_UpgradeConfig struct { state protoimpl.MessageState @@ -3931,14 +4179,14 @@ type RouteAction_UpgradeConfig struct { // Configuration for sending data upstream as a raw data payload. This is used for // CONNECT requests, when forwarding CONNECT payload as raw TCP. // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. + // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] ConnectConfig *RouteAction_UpgradeConfig_ConnectConfig `protobuf:"bytes,3,opt,name=connect_config,json=connectConfig,proto3" json:"connect_config,omitempty"` } func (x *RouteAction_UpgradeConfig) Reset() { *x = RouteAction_UpgradeConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[30] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3951,7 +4199,7 @@ func (x *RouteAction_UpgradeConfig) String() string { func (*RouteAction_UpgradeConfig) ProtoMessage() {} func (x *RouteAction_UpgradeConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[30] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3995,9 +4243,9 @@ type RouteAction_MaxStreamDuration struct { // Specifies the maximum duration allowed for streams on the route. If not specified, the value // from the :ref:`max_stream_duration - // ` field in + // ` field in // :ref:`HttpConnectionManager.common_http_protocol_options - // ` + // ` // is used. If this field is set explicitly to zero, any // HttpConnectionManager max_stream_duration timeout will be disabled for // this route. @@ -4019,7 +4267,7 @@ type RouteAction_MaxStreamDuration struct { func (x *RouteAction_MaxStreamDuration) Reset() { *x = RouteAction_MaxStreamDuration{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[31] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4032,7 +4280,7 @@ func (x *RouteAction_MaxStreamDuration) String() string { func (*RouteAction_MaxStreamDuration) ProtoMessage() {} func (x *RouteAction_MaxStreamDuration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[31] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4079,13 +4327,13 @@ type RouteAction_HashPolicy_Header struct { HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` // If specified, the request header value will be rewritten and used // to produce the hash key. - RegexRewrite *v31.RegexMatchAndSubstitute `protobuf:"bytes,2,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` + RegexRewrite *v32.RegexMatchAndSubstitute `protobuf:"bytes,2,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` } func (x *RouteAction_HashPolicy_Header) Reset() { *x = RouteAction_HashPolicy_Header{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[32] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4098,7 +4346,7 @@ func (x *RouteAction_HashPolicy_Header) String() string { func (*RouteAction_HashPolicy_Header) ProtoMessage() {} func (x *RouteAction_HashPolicy_Header) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[32] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4121,7 +4369,7 @@ func (x *RouteAction_HashPolicy_Header) GetHeaderName() string { return "" } -func (x *RouteAction_HashPolicy_Header) GetRegexRewrite() *v31.RegexMatchAndSubstitute { +func (x *RouteAction_HashPolicy_Header) GetRegexRewrite() *v32.RegexMatchAndSubstitute { if x != nil { return x.RegexRewrite } @@ -4163,7 +4411,7 @@ type RouteAction_HashPolicy_Cookie struct { func (x *RouteAction_HashPolicy_Cookie) Reset() { *x = RouteAction_HashPolicy_Cookie{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[33] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4176,7 +4424,7 @@ func (x *RouteAction_HashPolicy_Cookie) String() string { func (*RouteAction_HashPolicy_Cookie) ProtoMessage() {} func (x *RouteAction_HashPolicy_Cookie) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[33] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4225,7 +4473,7 @@ type RouteAction_HashPolicy_ConnectionProperties struct { func (x *RouteAction_HashPolicy_ConnectionProperties) Reset() { *x = RouteAction_HashPolicy_ConnectionProperties{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[34] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4238,7 +4486,7 @@ func (x *RouteAction_HashPolicy_ConnectionProperties) String() string { func (*RouteAction_HashPolicy_ConnectionProperties) ProtoMessage() {} func (x *RouteAction_HashPolicy_ConnectionProperties) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[34] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4275,7 +4523,7 @@ type RouteAction_HashPolicy_QueryParameter struct { func (x *RouteAction_HashPolicy_QueryParameter) Reset() { *x = RouteAction_HashPolicy_QueryParameter{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[35] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4288,7 +4536,7 @@ func (x *RouteAction_HashPolicy_QueryParameter) String() string { func (*RouteAction_HashPolicy_QueryParameter) ProtoMessage() {} func (x *RouteAction_HashPolicy_QueryParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[35] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4317,15 +4565,15 @@ type RouteAction_HashPolicy_FilterState struct { unknownFields protoimpl.UnknownFields // The name of the Object in the per-request filterState, which is an - // Envoy::Http::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Http::Hashable, no hash will be produced. + // Envoy::Hashable object. If there is no data associated with the key, + // or the stored object is not Envoy::Hashable, no hash will be produced. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } func (x *RouteAction_HashPolicy_FilterState) Reset() { *x = RouteAction_HashPolicy_FilterState{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[36] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4338,7 +4586,7 @@ func (x *RouteAction_HashPolicy_FilterState) String() string { func (*RouteAction_HashPolicy_FilterState) ProtoMessage() {} func (x *RouteAction_HashPolicy_FilterState) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[36] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4362,20 +4610,22 @@ func (x *RouteAction_HashPolicy_FilterState) GetKey() string { } // Configuration for sending data upstream as a raw data payload. This is used for -// CONNECT requests, when forwarding CONNECT payload as raw TCP. +// CONNECT or POST requests, when forwarding request payload as raw TCP. type RouteAction_UpgradeConfig_ConnectConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream. - ProxyProtocolConfig *v3.ProxyProtocolConfig `protobuf:"bytes,1,opt,name=proxy_protocol_config,json=proxyProtocolConfig,proto3" json:"proxy_protocol_config,omitempty"` + ProxyProtocolConfig *v31.ProxyProtocolConfig `protobuf:"bytes,1,opt,name=proxy_protocol_config,json=proxyProtocolConfig,proto3" json:"proxy_protocol_config,omitempty"` + // If set, the route will also allow forwarding POST payload as raw TCP. + AllowPost bool `protobuf:"varint,2,opt,name=allow_post,json=allowPost,proto3" json:"allow_post,omitempty"` } func (x *RouteAction_UpgradeConfig_ConnectConfig) Reset() { *x = RouteAction_UpgradeConfig_ConnectConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[37] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4388,7 +4638,7 @@ func (x *RouteAction_UpgradeConfig_ConnectConfig) String() string { func (*RouteAction_UpgradeConfig_ConnectConfig) ProtoMessage() {} func (x *RouteAction_UpgradeConfig_ConnectConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[37] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4404,29 +4654,37 @@ func (*RouteAction_UpgradeConfig_ConnectConfig) Descriptor() ([]byte, []int) { return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{6, 2, 0} } -func (x *RouteAction_UpgradeConfig_ConnectConfig) GetProxyProtocolConfig() *v3.ProxyProtocolConfig { +func (x *RouteAction_UpgradeConfig_ConnectConfig) GetProxyProtocolConfig() *v31.ProxyProtocolConfig { if x != nil { return x.ProxyProtocolConfig } return nil } +func (x *RouteAction_UpgradeConfig_ConnectConfig) GetAllowPost() bool { + if x != nil { + return x.AllowPost + } + return false +} + type RetryPolicy_RetryPriority struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // [#extension-category: envoy.retry_priorities] + // // Types that are assignable to ConfigType: // *RetryPolicy_RetryPriority_TypedConfig - // *RetryPolicy_RetryPriority_HiddenEnvoyDeprecatedConfig ConfigType isRetryPolicy_RetryPriority_ConfigType `protobuf_oneof:"config_type"` } func (x *RetryPolicy_RetryPriority) Reset() { *x = RetryPolicy_RetryPriority{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[38] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4439,7 +4697,7 @@ func (x *RetryPolicy_RetryPriority) String() string { func (*RetryPolicy_RetryPriority) ProtoMessage() {} func (x *RetryPolicy_RetryPriority) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[38] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4476,14 +4734,6 @@ func (x *RetryPolicy_RetryPriority) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *RetryPolicy_RetryPriority) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryPriority_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isRetryPolicy_RetryPriority_ConfigType interface { isRetryPolicy_RetryPriority_ConfigType() } @@ -4492,32 +4742,25 @@ type RetryPolicy_RetryPriority_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type RetryPolicy_RetryPriority_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*RetryPolicy_RetryPriority_TypedConfig) isRetryPolicy_RetryPriority_ConfigType() {} -func (*RetryPolicy_RetryPriority_HiddenEnvoyDeprecatedConfig) isRetryPolicy_RetryPriority_ConfigType() { -} - type RetryPolicy_RetryHostPredicate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // [#extension-category: envoy.retry_host_predicates] + // // Types that are assignable to ConfigType: // *RetryPolicy_RetryHostPredicate_TypedConfig - // *RetryPolicy_RetryHostPredicate_HiddenEnvoyDeprecatedConfig ConfigType isRetryPolicy_RetryHostPredicate_ConfigType `protobuf_oneof:"config_type"` } func (x *RetryPolicy_RetryHostPredicate) Reset() { *x = RetryPolicy_RetryHostPredicate{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[39] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4530,7 +4773,7 @@ func (x *RetryPolicy_RetryHostPredicate) String() string { func (*RetryPolicy_RetryHostPredicate) ProtoMessage() {} func (x *RetryPolicy_RetryHostPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[39] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4567,14 +4810,6 @@ func (x *RetryPolicy_RetryHostPredicate) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *RetryPolicy_RetryHostPredicate) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryHostPredicate_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isRetryPolicy_RetryHostPredicate_ConfigType interface { isRetryPolicy_RetryHostPredicate_ConfigType() } @@ -4583,16 +4818,8 @@ type RetryPolicy_RetryHostPredicate_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type RetryPolicy_RetryHostPredicate_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*RetryPolicy_RetryHostPredicate_TypedConfig) isRetryPolicy_RetryHostPredicate_ConfigType() {} -func (*RetryPolicy_RetryHostPredicate_HiddenEnvoyDeprecatedConfig) isRetryPolicy_RetryHostPredicate_ConfigType() { -} - type RetryPolicy_RetryBackOff struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4613,7 +4840,7 @@ type RetryPolicy_RetryBackOff struct { func (x *RetryPolicy_RetryBackOff) Reset() { *x = RetryPolicy_RetryBackOff{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[40] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4626,7 +4853,7 @@ func (x *RetryPolicy_RetryBackOff) String() string { func (*RetryPolicy_RetryBackOff) ProtoMessage() {} func (x *RetryPolicy_RetryBackOff) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[40] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4674,7 +4901,7 @@ type RetryPolicy_ResetHeader struct { func (x *RetryPolicy_ResetHeader) Reset() { *x = RetryPolicy_ResetHeader{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[41] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4687,7 +4914,7 @@ func (x *RetryPolicy_ResetHeader) String() string { func (*RetryPolicy_ResetHeader) ProtoMessage() {} func (x *RetryPolicy_ResetHeader) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[41] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4779,7 +5006,7 @@ type RetryPolicy_RateLimitedRetryBackOff struct { func (x *RetryPolicy_RateLimitedRetryBackOff) Reset() { *x = RetryPolicy_RateLimitedRetryBackOff{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[42] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4792,7 +5019,7 @@ func (x *RetryPolicy_RateLimitedRetryBackOff) String() string { func (*RetryPolicy_RateLimitedRetryBackOff) ProtoMessage() {} func (x *RetryPolicy_RateLimitedRetryBackOff) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[42] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4844,7 +5071,7 @@ type RateLimit_Action struct { func (x *RateLimit_Action) Reset() { *x = RateLimit_Action{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[43] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4857,7 +5084,7 @@ func (x *RateLimit_Action) String() string { func (*RateLimit_Action) ProtoMessage() {} func (x *RateLimit_Action) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[43] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4870,7 +5097,7 @@ func (x *RateLimit_Action) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Action.ProtoReflect.Descriptor instead. func (*RateLimit_Action) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0} } func (m *RateLimit_Action) GetActionSpecifier() isRateLimit_Action_ActionSpecifier { @@ -4937,7 +5164,7 @@ func (x *RateLimit_Action) GetMetadata() *RateLimit_Action_MetaData { return nil } -func (x *RateLimit_Action) GetExtension() *v3.TypedExtensionConfig { +func (x *RateLimit_Action) GetExtension() *v31.TypedExtensionConfig { if x, ok := x.GetActionSpecifier().(*RateLimit_Action_Extension); ok { return x.Extension } @@ -4982,7 +5209,7 @@ type RateLimit_Action_DynamicMetadata struct { // Rate limit on dynamic metadata. // // .. attention:: - // This field has been deprecated in favor of the :ref:`metadata ` field + // This field has been deprecated in favor of the :ref:`metadata ` field // // Deprecated: Do not use. DynamicMetadata *RateLimit_Action_DynamicMetaData `protobuf:"bytes,7,opt,name=dynamic_metadata,json=dynamicMetadata,proto3,oneof"` @@ -4995,7 +5222,8 @@ type RateLimit_Action_Metadata struct { type RateLimit_Action_Extension struct { // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. - Extension *v3.TypedExtensionConfig `protobuf:"bytes,9,opt,name=extension,proto3,oneof"` + // [#extension-category: envoy.rate_limit_descriptors] + Extension *v31.TypedExtensionConfig `protobuf:"bytes,9,opt,name=extension,proto3,oneof"` } func (*RateLimit_Action_SourceCluster_) isRateLimit_Action_ActionSpecifier() {} @@ -5029,7 +5257,7 @@ type RateLimit_Override struct { func (x *RateLimit_Override) Reset() { *x = RateLimit_Override{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[44] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5042,7 +5270,7 @@ func (x *RateLimit_Override) String() string { func (*RateLimit_Override) ProtoMessage() {} func (x *RateLimit_Override) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[44] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5055,7 +5283,7 @@ func (x *RateLimit_Override) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Override.ProtoReflect.Descriptor instead. func (*RateLimit_Override) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 1} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 1} } func (m *RateLimit_Override) GetOverrideSpecifier() isRateLimit_Override_OverrideSpecifier { @@ -5099,7 +5327,7 @@ type RateLimit_Action_SourceCluster struct { func (x *RateLimit_Action_SourceCluster) Reset() { *x = RateLimit_Action_SourceCluster{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[45] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5112,7 +5340,7 @@ func (x *RateLimit_Action_SourceCluster) String() string { func (*RateLimit_Action_SourceCluster) ProtoMessage() {} func (x *RateLimit_Action_SourceCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[45] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5125,7 +5353,7 @@ func (x *RateLimit_Action_SourceCluster) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Action_SourceCluster.ProtoReflect.Descriptor instead. func (*RateLimit_Action_SourceCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 0} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 0} } // The following descriptor entry is appended to the descriptor: @@ -5135,14 +5363,14 @@ func (*RateLimit_Action_SourceCluster) Descriptor() ([]byte, []int) { // ("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 ` +// the following :ref:`route table configuration ` // settings: // -// * :ref:`cluster ` indicates the upstream cluster +// * :ref:`cluster ` indicates the upstream cluster // to route to. -// * :ref:`weighted_clusters ` +// * :ref:`weighted_clusters ` // chooses a cluster randomly from a set of clusters with attributed weight. -// * :ref:`cluster_header ` indicates which +// * :ref:`cluster_header ` indicates which // header in the request contains the target cluster. type RateLimit_Action_DestinationCluster struct { state protoimpl.MessageState @@ -5153,7 +5381,7 @@ type RateLimit_Action_DestinationCluster struct { func (x *RateLimit_Action_DestinationCluster) Reset() { *x = RateLimit_Action_DestinationCluster{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[46] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5166,7 +5394,7 @@ func (x *RateLimit_Action_DestinationCluster) String() string { func (*RateLimit_Action_DestinationCluster) ProtoMessage() {} func (x *RateLimit_Action_DestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[46] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5179,7 +5407,7 @@ func (x *RateLimit_Action_DestinationCluster) ProtoReflect() protoreflect.Messag // Deprecated: Use RateLimit_Action_DestinationCluster.ProtoReflect.Descriptor instead. func (*RateLimit_Action_DestinationCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 1} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 1} } // The following descriptor entry is appended when a header contains a key that matches the @@ -5208,7 +5436,7 @@ type RateLimit_Action_RequestHeaders struct { func (x *RateLimit_Action_RequestHeaders) Reset() { *x = RateLimit_Action_RequestHeaders{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[47] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5221,7 +5449,7 @@ func (x *RateLimit_Action_RequestHeaders) String() string { func (*RateLimit_Action_RequestHeaders) ProtoMessage() {} func (x *RateLimit_Action_RequestHeaders) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[47] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5234,7 +5462,7 @@ func (x *RateLimit_Action_RequestHeaders) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Action_RequestHeaders.ProtoReflect.Descriptor instead. func (*RateLimit_Action_RequestHeaders) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 2} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 2} } func (x *RateLimit_Action_RequestHeaders) GetHeaderName() string { @@ -5273,7 +5501,7 @@ type RateLimit_Action_RemoteAddress struct { func (x *RateLimit_Action_RemoteAddress) Reset() { *x = RateLimit_Action_RemoteAddress{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[48] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5286,7 +5514,7 @@ func (x *RateLimit_Action_RemoteAddress) String() string { func (*RateLimit_Action_RemoteAddress) ProtoMessage() {} func (x *RateLimit_Action_RemoteAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[48] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5299,7 +5527,7 @@ func (x *RateLimit_Action_RemoteAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Action_RemoteAddress.ProtoReflect.Descriptor instead. func (*RateLimit_Action_RemoteAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 3} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 3} } // The following descriptor entry is appended to the descriptor: @@ -5322,7 +5550,7 @@ type RateLimit_Action_GenericKey struct { func (x *RateLimit_Action_GenericKey) Reset() { *x = RateLimit_Action_GenericKey{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[49] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5335,7 +5563,7 @@ func (x *RateLimit_Action_GenericKey) String() string { func (*RateLimit_Action_GenericKey) ProtoMessage() {} func (x *RateLimit_Action_GenericKey) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[49] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5348,7 +5576,7 @@ func (x *RateLimit_Action_GenericKey) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Action_GenericKey.ProtoReflect.Descriptor instead. func (*RateLimit_Action_GenericKey) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 4} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 4} } func (x *RateLimit_Action_GenericKey) GetDescriptorValue() string { @@ -5375,6 +5603,8 @@ type RateLimit_Action_HeaderValueMatch struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The key to use in the descriptor entry. Defaults to `header_match`. + DescriptorKey string `protobuf:"bytes,4,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` // The value to use in the descriptor entry. DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` // If set to true, the action will append a descriptor entry when the @@ -5393,7 +5623,7 @@ type RateLimit_Action_HeaderValueMatch struct { func (x *RateLimit_Action_HeaderValueMatch) Reset() { *x = RateLimit_Action_HeaderValueMatch{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[50] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5406,7 +5636,7 @@ func (x *RateLimit_Action_HeaderValueMatch) String() string { func (*RateLimit_Action_HeaderValueMatch) ProtoMessage() {} func (x *RateLimit_Action_HeaderValueMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[50] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5419,7 +5649,14 @@ func (x *RateLimit_Action_HeaderValueMatch) ProtoReflect() protoreflect.Message // Deprecated: Use RateLimit_Action_HeaderValueMatch.ProtoReflect.Descriptor instead. func (*RateLimit_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 5} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 5} +} + +func (x *RateLimit_Action_HeaderValueMatch) GetDescriptorKey() string { + if x != nil { + return x.DescriptorKey + } + return "" } func (x *RateLimit_Action_HeaderValueMatch) GetDescriptorValue() string { @@ -5451,7 +5688,7 @@ func (x *RateLimit_Action_HeaderValueMatch) GetHeaders() []*HeaderMatcher { // ("", "") // // .. attention:: -// This action has been deprecated in favor of the :ref:`metadata ` action +// This action has been deprecated in favor of the :ref:`metadata ` action type RateLimit_Action_DynamicMetaData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5461,7 +5698,7 @@ type RateLimit_Action_DynamicMetaData struct { DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` // Metadata struct that defines the key and path to retrieve the string value. A match will // only happen if the value in the dynamic metadata is of type string. - MetadataKey *v34.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` + MetadataKey *v35.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` // An optional value to use if *metadata_key* is empty. If not set and // no value is present under the metadata_key then no descriptor is generated. DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` @@ -5470,7 +5707,7 @@ type RateLimit_Action_DynamicMetaData struct { func (x *RateLimit_Action_DynamicMetaData) Reset() { *x = RateLimit_Action_DynamicMetaData{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[51] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5483,7 +5720,7 @@ func (x *RateLimit_Action_DynamicMetaData) String() string { func (*RateLimit_Action_DynamicMetaData) ProtoMessage() {} func (x *RateLimit_Action_DynamicMetaData) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[51] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5496,7 +5733,7 @@ func (x *RateLimit_Action_DynamicMetaData) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Action_DynamicMetaData.ProtoReflect.Descriptor instead. func (*RateLimit_Action_DynamicMetaData) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 6} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 6} } func (x *RateLimit_Action_DynamicMetaData) GetDescriptorKey() string { @@ -5506,7 +5743,7 @@ func (x *RateLimit_Action_DynamicMetaData) GetDescriptorKey() string { return "" } -func (x *RateLimit_Action_DynamicMetaData) GetMetadataKey() *v34.MetadataKey { +func (x *RateLimit_Action_DynamicMetaData) GetMetadataKey() *v35.MetadataKey { if x != nil { return x.MetadataKey } @@ -5534,7 +5771,7 @@ type RateLimit_Action_MetaData struct { DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` // Metadata struct that defines the key and path to retrieve the string value. A match will // only happen if the value in the metadata is of type string. - MetadataKey *v34.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` + MetadataKey *v35.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` // An optional value to use if *metadata_key* is empty. If not set and // no value is present under the metadata_key then no descriptor is generated. DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` @@ -5545,7 +5782,7 @@ type RateLimit_Action_MetaData struct { func (x *RateLimit_Action_MetaData) Reset() { *x = RateLimit_Action_MetaData{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[52] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5558,7 +5795,7 @@ func (x *RateLimit_Action_MetaData) String() string { func (*RateLimit_Action_MetaData) ProtoMessage() {} func (x *RateLimit_Action_MetaData) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[52] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5571,7 +5808,7 @@ func (x *RateLimit_Action_MetaData) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimit_Action_MetaData.ProtoReflect.Descriptor instead. func (*RateLimit_Action_MetaData) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 0, 7} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 0, 7} } func (x *RateLimit_Action_MetaData) GetDescriptorKey() string { @@ -5581,7 +5818,7 @@ func (x *RateLimit_Action_MetaData) GetDescriptorKey() string { return "" } -func (x *RateLimit_Action_MetaData) GetMetadataKey() *v34.MetadataKey { +func (x *RateLimit_Action_MetaData) GetMetadataKey() *v35.MetadataKey { if x != nil { return x.MetadataKey } @@ -5611,14 +5848,14 @@ type RateLimit_Override_DynamicMetadata struct { // Metadata struct that defines the key and path to retrieve the struct value. // The value must be a struct containing an integer "requests_per_unit" property // and a "unit" property with a value parseable to :ref:`RateLimitUnit - // enum ` - MetadataKey *v34.MetadataKey `protobuf:"bytes,1,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` + // enum ` + MetadataKey *v35.MetadataKey `protobuf:"bytes,1,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` } func (x *RateLimit_Override_DynamicMetadata) Reset() { *x = RateLimit_Override_DynamicMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[53] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5631,7 +5868,7 @@ func (x *RateLimit_Override_DynamicMetadata) String() string { func (*RateLimit_Override_DynamicMetadata) ProtoMessage() {} func (x *RateLimit_Override_DynamicMetadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[53] + mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5644,10 +5881,10 @@ func (x *RateLimit_Override_DynamicMetadata) ProtoReflect() protoreflect.Message // Deprecated: Use RateLimit_Override_DynamicMetadata.ProtoReflect.Descriptor instead. func (*RateLimit_Override_DynamicMetadata) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14, 1, 0} + return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15, 1, 0} } -func (x *RateLimit_Override_DynamicMetadata) GetMetadataKey() *v34.MetadataKey { +func (x *RateLimit_Override_DynamicMetadata) GetMetadataKey() *v35.MetadataKey { if x != nil { return x.MetadataKey } @@ -5668,1324 +5905,1300 @@ var file_envoy_config_route_v3_route_components_proto_rawDesc = []byte{ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, - 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, - 0x0e, 0x0a, 0x0b, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, - 0x0f, 0x92, 0x01, 0x0c, 0x08, 0x01, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, - 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, - 0x60, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, - 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x54, 0x6c, - 0x73, 0x12, 0x50, 0x0a, 0x10, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, - 0x4d, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0d, 0x20, 0x03, - 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, - 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, - 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, - 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4f, 0x0a, 0x1a, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, - 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x63, 0x6f, - 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, 0x63, 0x6f, 0x72, - 0x73, 0x12, 0x73, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0f, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x0e, 0x0a, 0x0b, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, + 0x08, 0x01, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x07, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, + 0x06, 0x02, 0x08, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x60, 0x0a, + 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x21, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x13, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x74, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x54, 0x6c, 0x73, 0x12, + 0x50, 0x0a, 0x10, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x19, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x68, - 0x65, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0xa9, 0x01, 0x0a, 0x29, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x48, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x70, 0x0a, 0x29, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, + 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, + 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, + 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, 0x0a, 0x17, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, + 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4f, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, + 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, + 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, + 0x73, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x21, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x74, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, + 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x68, 0x65, 0x64, + 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x16, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, 0x0a, 0x12, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, - 0x48, 0x6f, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x64, 0x0a, 0x0c, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, - 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xab, 0x0c, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, - 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x3a, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x43, 0x0a, - 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, - 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x6d, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, - 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x19, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, - 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, 0x0a, 0x17, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, - 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4f, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, - 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, - 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, - 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, - 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x29, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x70, 0x0a, 0x29, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, - 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x1f, 0x9a, 0xc5, 0x88, 0x1e, 0x1a, 0x0a, - 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x0d, 0x0a, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0x82, - 0x0b, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x48, - 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0xef, 0x08, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, + 0x48, 0x6f, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, + 0x52, 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x64, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x0b, 0x0a, 0x05, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3a, 0x0a, 0x05, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, + 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x60, 0x0a, 0x15, 0x6e, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x6e, 0x6f, + 0x6e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, - 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, - 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, - 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xbb, 0x01, 0x0a, 0x29, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x5e, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x6d, 0x0a, + 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x2e, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x70, 0x0a, 0x29, 0x48, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, - 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x16, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, + 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, + 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, + 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, + 0x4f, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, + 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x12, 0x38, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, + 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, + 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x19, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x1f, 0x9a, 0xc5, 0x88, + 0x1e, 0x1a, 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x0d, 0x0a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x06, 0x10, + 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe2, 0x0a, 0x0a, 0x0f, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x5a, + 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x21, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x92, 0x08, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x13, 0x12, 0x11, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, + 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x13, 0x12, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, + 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, + 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, + 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, + 0x64, 0x12, 0x4d, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, + 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x12, 0x85, 0x01, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, + 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, + 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, + 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x22, 0x95, 0x09, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x12, 0x5b, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, - 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x55, 0x0a, 0x1d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, - 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x1a, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, - 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, - 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x59, 0x0a, 0x10, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4b, 0x0a, - 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x59, 0x0a, 0x0b, 0x74, 0x6c, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x53, 0x0a, 0x15, 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x3a, - 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x07, 0x10, + 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, + 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, + 0xeb, 0x09, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, + 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x4e, + 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x5b, + 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x15, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xfa, 0x42, 0x12, 0x72, + 0x10, 0x32, 0x0e, 0x5e, 0x5b, 0x5e, 0x3f, 0x23, 0x5d, 0x2b, 0x5b, 0x5e, 0x3f, 0x23, 0x2f, 0x5d, + 0x24, 0x48, 0x00, 0x52, 0x13, 0x70, 0x61, 0x74, 0x68, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, + 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x63, 0x61, + 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x59, 0x0a, 0x10, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x4b, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x59, 0x0a, 0x0b, + 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x74, 0x6c, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x51, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0d, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x53, 0x0a, 0x15, 0x47, 0x72, + 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, + 0xc9, 0x01, 0x0a, 0x16, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3b, + 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xc9, 0x01, 0x0a, 0x16, 0x54, - 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x12, - 0x38, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x10, 0x0a, 0x0e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x3a, 0x24, 0x9a, + 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x15, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, + 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0xe8, 0x04, + 0x0a, 0x0a, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f, 0x0a, 0x19, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x23, 0x0a, + 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, + 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, - 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, - 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x15, - 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xe0, 0x06, 0x0a, 0x0a, - 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f, 0x0a, 0x19, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, - 0x78, 0x70, 0x6f, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, - 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x57, - 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x6d, 0x0a, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0x18, 0x01, - 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x1c, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0d, - 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x58, 0x0a, - 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, - 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x6a, 0x0a, 0x2a, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0f, 0x18, 0x01, 0xfa, - 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0x52, 0x25, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x67, 0x65, 0x78, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x43, - 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xee, - 0x27, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, - 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, - 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x11, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x1f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x0e, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, - 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x53, - 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, - 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, - 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, - 0x69, 0x74, 0x75, 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, - 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x01, 0x52, 0x0f, 0x61, - 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x3d, - 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, - 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x11, 0x68, 0x6f, 0x73, 0x74, - 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x67, 0x0a, - 0x17, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, - 0x52, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x50, 0x61, 0x74, - 0x68, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, - 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x65, 0x74, - 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x4f, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x21, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x6e, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, - 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x1e, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x12, 0x57, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, 0x73, 0x68, 0x61, + 0x64, 0x6f, 0x77, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x72, 0x73, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, + 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x52, 0x0c, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xe9, 0x27, 0x0a, 0x0b, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, + 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, + 0x01, 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x18, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x8e, 0x01, 0x0a, 0x1f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x12, 0x4b, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x41, - 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x73, 0x12, 0x53, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x68, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x35, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x72, - 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x0a, - 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x47, 0x72, 0x70, 0x63, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x13, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x1c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x11, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x12, 0x67, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x22, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x77, 0x0a, 0x18, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x1f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0c, 0x68, 0x65, - 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x64, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x9b, 0x01, 0x0a, 0x2d, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, - 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, + 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1b, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x32, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, + 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, + 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, + 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x14, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, + 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x61, 0x75, + 0x74, 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x48, 0x01, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x48, 0x01, + 0x52, 0x11, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x17, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x23, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, + 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, + 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, 0x52, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, + 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x78, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x26, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x61, + 0x70, 0x70, 0x65, 0x6e, 0x64, 0x58, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x48, + 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, + 0x19, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6e, + 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, + 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, - 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x28, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xe7, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x59, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0d, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x23, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, - 0xd2, 0x05, 0x01, 0x52, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, - 0x96, 0x0a, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4e, - 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4e, - 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, - 0x6f, 0x6b, 0x69, 0x65, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x79, - 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x0f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, - 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x1a, 0xc6, - 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, - 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, - 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x3a, 0x37, - 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x9f, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, - 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x1a, 0x7a, 0x0a, 0x14, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x45, - 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x4b, + 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x0b, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x5c, + 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x68, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, + 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4e, 0x0a, 0x0b, + 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x6e, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x66, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, - 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x30, 0x9a, - 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, - 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x83, 0x03, 0x0a, 0x0d, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x0c, 0x75, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, - 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x35, 0x0a, 0x04, + 0x63, 0x6f, 0x72, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, 0x63, + 0x6f, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x65, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, + 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x47, 0x72, 0x70, 0x63, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x56, 0x0a, 0x13, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x1c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x18, + 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x11, 0x67, 0x72, 0x70, 0x63, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x59, 0x0a, + 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x67, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x6e, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x15, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x88, - 0x02, 0x0a, 0x11, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, - 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x50, 0x0a, 0x17, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x67, 0x72, 0x70, - 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, - 0x78, 0x12, 0x56, 0x0a, 0x1a, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x17, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x45, 0x0a, 0x1b, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x52, 0x56, - 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, - 0x22, 0x5e, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x41, - 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, - 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x1c, - 0x0a, 0x18, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, - 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x1a, 0x02, 0x18, 0x01, - 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x0c, 0x10, - 0x0d, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, - 0x10, 0x10, 0x11, 0x4a, 0x04, 0x08, 0x16, 0x10, 0x17, 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x22, - 0xb9, 0x10, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x19, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, 0x52, 0x0a, 0x0b, 0x6e, 0x75, - 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x13, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x0d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x41, - 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, - 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x67, 0x0a, 0x14, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, - 0x12, 0x72, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, - 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, - 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x4d, 0x61, 0x78, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x34, 0x0a, - 0x16, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x14, 0x72, - 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, - 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, + 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x80, 0x01, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x16, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x1f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, + 0x14, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0c, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x0c, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x78, 0x0a, 0x1b, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, - 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x17, 0x72, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, - 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x51, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x10, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x60, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x64, 0x0a, 0x13, + 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, + 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x11, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0xa2, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, + 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0b, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x1a, 0x96, 0x0a, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x79, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x67, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x52, 0x17, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x8f, 0x02, 0x0a, 0x0d, 0x52, 0x65, - 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, + 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, + 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x0c, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x1a, 0xc6, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, + 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, + 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, + 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, + 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, + 0x9f, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x03, 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, + 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x1a, 0x7a, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, + 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x6e, 0x0a, + 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, + 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x66, 0x0a, + 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0d, 0x0a, 0x0b, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x99, 0x02, 0x0a, 0x12, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, + 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, + 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x1a, 0xa3, 0x03, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x30, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, + 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x65, 0x0a, 0x0e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x1a, 0x8d, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x6f, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x73, + 0x74, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x88, 0x02, 0x0a, 0x11, 0x4d, 0x61, 0x78, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x13, + 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x17, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, + 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x78, 0x12, 0x56, 0x0a, 0x1a, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x22, 0x45, 0x0a, 0x1b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, + 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x56, + 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, + 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x22, 0x5e, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, + 0x47, 0x48, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, + 0x52, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, + 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, + 0x43, 0x54, 0x10, 0x01, 0x1a, 0x02, 0x18, 0x01, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, + 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x4a, + 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, 0x04, 0x08, 0x16, 0x10, + 0x17, 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x52, 0x15, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x22, 0xbf, 0x10, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, + 0x52, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x13, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, + 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4a, 0x0a, 0x14, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x11, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x67, 0x0a, 0x14, 0x72, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, + 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x52, 0x12, 0x72, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x64, 0x0a, 0x18, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x21, 0x68, 0x6f, + 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4d, 0x61, 0x78, 0x41, 0x74, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, + 0x4f, 0x66, 0x66, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, + 0x66, 0x12, 0x78, 0x0a, 0x1b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, + 0x64, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, + 0x66, 0x66, 0x52, 0x17, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x51, 0x0a, 0x11, 0x72, + 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x10, 0x72, 0x65, + 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x60, + 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x1a, 0xb9, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, - 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x38, - 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xd6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, - 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x4a, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, - 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, + 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, + 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, + 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc3, 0x01, 0x0a, + 0x12, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x38, 0x9a, 0xc5, 0x88, + 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x1a, 0xd6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, + 0x4f, 0x66, 0x66, 0x12, 0x4a, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, - 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x32, 0x9a, 0xc5, - 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, - 0x1a, 0x88, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, - 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, - 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x1a, 0xc0, 0x01, 0x0a, 0x17, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x5d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x74, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, - 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x34, - 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x00, - 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x49, 0x58, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, - 0x4d, 0x50, 0x10, 0x01, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x9c, 0x02, 0x0a, 0x0b, - 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x10, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x0f, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x5c, 0x0a, - 0x19, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x17, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x68, - 0x65, 0x64, 0x67, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, - 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x50, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, - 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xe1, 0x05, 0x0a, 0x0e, 0x52, - 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, - 0x0e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x73, 0x52, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x12, 0x30, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, - 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, - 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x0c, - 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x0e, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, - 0x00, 0x48, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x12, 0x55, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, - 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x69, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x70, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x77, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, - 0x11, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, - 0x4c, 0x59, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x45, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, - 0x0a, 0x12, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, - 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, - 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x04, 0x3a, 0x28, - 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xa0, - 0x01, 0x0a, 0x14, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x10, 0xd8, - 0x04, 0x28, 0x64, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x25, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, - 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, - 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x6f, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xd2, 0x02, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x12, 0x49, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x0f, - 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, - 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, - 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, - 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x22, 0xe4, 0x02, 0x0a, 0x0e, 0x56, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x1f, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, - 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1c, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x12, 0x72, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, + 0x00, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, + 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x22, 0xa1, 0x16, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x4b, 0x0a, - 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, + 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x1a, 0x88, 0x01, 0x0a, 0x0b, + 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, + 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x56, + 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x1a, 0xc0, 0x01, 0x0a, 0x17, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, + 0x66, 0x66, 0x12, 0x5d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x8d, 0x12, 0x0a, 0x06, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, + 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, + 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x34, 0x0a, 0x11, 0x52, 0x65, 0x73, + 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x0b, + 0x0a, 0x07, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x55, + 0x4e, 0x49, 0x58, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x01, 0x3a, + 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x9c, 0x02, 0x0a, 0x0b, 0x48, 0x65, 0x64, 0x67, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x19, 0x61, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, + 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, 0x65, 0x64, 0x67, 0x65, 0x4f, + 0x6e, 0x50, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3a, 0x25, + 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xe1, 0x05, 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0e, 0x68, 0x74, 0x74, 0x70, + 0x73, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x73, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x0d, + 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, + 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x23, + 0x0a, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, + 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x52, + 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x0d, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x55, 0x0a, + 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, + 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, + 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x12, 0x69, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x70, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x22, 0x77, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x4f, 0x56, 0x45, + 0x44, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x4c, 0x59, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, + 0x45, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x45, 0x4d, + 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, + 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x52, + 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x04, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, + 0x18, 0x0a, 0x16, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x14, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x2e, 0x9a, + 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, + 0x13, 0x4e, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, + 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, + 0x61, 0x74, 0x65, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x44, + 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xd2, 0x02, 0x0a, 0x07, 0x54, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, + 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, + 0x49, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, + 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x10, 0x6f, 0x76, + 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, + 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x22, 0xb4, 0x01, + 0x0a, 0x0e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x28, 0x9a, + 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, + 0x03, 0x10, 0x04, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x52, 0x06, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x22, 0xd1, 0x16, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, + 0x12, 0x4b, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, + 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0xbd, + 0x12, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x0e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x13, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x0e, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x0b, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x12, 0x68, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x0b, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x68, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x6e, 0x0a, 0x10, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x18, 0x01, - 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, 0x0a, 0x09, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x49, 0x0a, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x1a, 0x53, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xd1, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, - 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6b, 0x69, 0x70, - 0x5f, 0x69, 0x66, 0x5f, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x3a, 0x39, - 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x49, 0x0a, 0x0d, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, - 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x77, 0x0a, 0x10, + 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x42, + 0x11, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0xb8, 0xee, 0xf2, 0xd2, + 0x05, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x1a, 0x49, 0x0a, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x53, 0x0a, 0x12, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x1a, 0xd1, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, + 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x69, 0x66, 0x5f, + 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, + 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, + 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x1a, 0x9e, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x3a, 0x35, - 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x1a, 0x8c, 0x02, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, - 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x48, 0x0a, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x1a, 0xb8, 0x01, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, - 0xb4, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x26, - 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x59, 0x4e, 0x41, - 0x4d, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x5f, 0x45, - 0x4e, 0x54, 0x52, 0x59, 0x10, 0x01, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x49, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x17, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf2, 0x01, 0x0a, 0x08, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, - 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x1a, 0x63, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x19, 0x0a, 0x12, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, - 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xed, 0x04, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x65, 0x78, - 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4f, 0x0a, + 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x1a, 0x9e, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, + 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, + 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x1a, 0xb3, 0x02, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, + 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x48, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, + 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xb8, 0x01, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, + 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x1a, 0xb4, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, + 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, + 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x22, 0x26, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, + 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54, + 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x01, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x17, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf2, + 0x01, 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x64, + 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x1a, 0x63, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, + 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x19, 0x0a, 0x12, 0x6f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, + 0xf8, 0x42, 0x01, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xa4, 0x05, 0x0a, 0x0d, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, + 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, + 0x0b, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, + 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5c, 0x0a, 0x10, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, - 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3c, - 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, - 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x30, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x60, 0x0a, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, - 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, - 0x48, 0x00, 0x52, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x65, 0x72, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, - 0x18, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, - 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xbd, 0x03, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x28, 0x80, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x53, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x61, 0x66, + 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3c, 0x0a, 0x0b, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x37, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0x18, 0x01, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x75, 0x66, + 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x12, 0x18, 0x01, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, + 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0x18, 0x01, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, + 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x49, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x1d, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1a, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x67, 0x0a, 0x1d, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0x18, 0x01, 0xb8, - 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x21, 0x0a, 0x1f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xb9, 0x02, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x52, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, - 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x17, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x05, 0x52, - 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, - 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, - 0x6f, 0x73, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x42, 0x45, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x27, 0x9a, + 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x05, + 0x10, 0x06, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, + 0xa1, 0x02, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, + 0x28, 0x80, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, + 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x21, 0x0a, 0x1f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, + 0x04, 0x08, 0x04, 0x10, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x72, 0x65, + 0x67, 0x65, 0x78, 0x22, 0xb9, 0x02, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x52, + 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x6d, 0x61, + 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x73, 0x12, 0x40, 0x0a, 0x17, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x05, 0x52, 0x15, 0x72, + 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, + 0x12, 0x3d, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x6f, 0x73, + 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x22, + 0x5d, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x2c, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, + 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x8b, + 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7001,245 +7214,240 @@ func file_envoy_config_route_v3_route_components_proto_rawDescGZIP() []byte { } var file_envoy_config_route_v3_route_components_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_envoy_config_route_v3_route_components_proto_msgTypes = make([]protoimpl.MessageInfo, 54) +var file_envoy_config_route_v3_route_components_proto_msgTypes = make([]protoimpl.MessageInfo, 53) var file_envoy_config_route_v3_route_components_proto_goTypes = []interface{}{ - (VirtualHost_TlsRequirementType)(0), // 0: envoy.config.route.v3.VirtualHost.TlsRequirementType - (RouteAction_ClusterNotFoundResponseCode)(0), // 1: envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode - (RouteAction_InternalRedirectAction)(0), // 2: envoy.config.route.v3.RouteAction.InternalRedirectAction - (RetryPolicy_ResetHeaderFormat)(0), // 3: envoy.config.route.v3.RetryPolicy.ResetHeaderFormat - (RedirectAction_RedirectResponseCode)(0), // 4: envoy.config.route.v3.RedirectAction.RedirectResponseCode - (RateLimit_Action_MetaData_Source)(0), // 5: envoy.config.route.v3.RateLimit.Action.MetaData.Source - (*VirtualHost)(nil), // 6: envoy.config.route.v3.VirtualHost - (*FilterAction)(nil), // 7: envoy.config.route.v3.FilterAction - (*Route)(nil), // 8: envoy.config.route.v3.Route - (*WeightedCluster)(nil), // 9: envoy.config.route.v3.WeightedCluster - (*RouteMatch)(nil), // 10: envoy.config.route.v3.RouteMatch - (*CorsPolicy)(nil), // 11: envoy.config.route.v3.CorsPolicy - (*RouteAction)(nil), // 12: envoy.config.route.v3.RouteAction - (*RetryPolicy)(nil), // 13: envoy.config.route.v3.RetryPolicy - (*HedgePolicy)(nil), // 14: envoy.config.route.v3.HedgePolicy - (*RedirectAction)(nil), // 15: envoy.config.route.v3.RedirectAction - (*DirectResponseAction)(nil), // 16: envoy.config.route.v3.DirectResponseAction - (*Decorator)(nil), // 17: envoy.config.route.v3.Decorator - (*Tracing)(nil), // 18: envoy.config.route.v3.Tracing - (*VirtualCluster)(nil), // 19: envoy.config.route.v3.VirtualCluster - (*RateLimit)(nil), // 20: envoy.config.route.v3.RateLimit - (*HeaderMatcher)(nil), // 21: envoy.config.route.v3.HeaderMatcher - (*QueryParameterMatcher)(nil), // 22: envoy.config.route.v3.QueryParameterMatcher - (*InternalRedirectPolicy)(nil), // 23: envoy.config.route.v3.InternalRedirectPolicy - nil, // 24: envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry - nil, // 25: envoy.config.route.v3.VirtualHost.HiddenEnvoyDeprecatedPerFilterConfigEntry - nil, // 26: envoy.config.route.v3.Route.TypedPerFilterConfigEntry - nil, // 27: envoy.config.route.v3.Route.HiddenEnvoyDeprecatedPerFilterConfigEntry - (*WeightedCluster_ClusterWeight)(nil), // 28: envoy.config.route.v3.WeightedCluster.ClusterWeight - nil, // 29: envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - nil, // 30: envoy.config.route.v3.WeightedCluster.ClusterWeight.HiddenEnvoyDeprecatedPerFilterConfigEntry - (*RouteMatch_GrpcRouteMatchOptions)(nil), // 31: envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions - (*RouteMatch_TlsContextMatchOptions)(nil), // 32: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions - (*RouteMatch_ConnectMatcher)(nil), // 33: envoy.config.route.v3.RouteMatch.ConnectMatcher - (*RouteAction_RequestMirrorPolicy)(nil), // 34: envoy.config.route.v3.RouteAction.RequestMirrorPolicy - (*RouteAction_HashPolicy)(nil), // 35: envoy.config.route.v3.RouteAction.HashPolicy - (*RouteAction_UpgradeConfig)(nil), // 36: envoy.config.route.v3.RouteAction.UpgradeConfig - (*RouteAction_MaxStreamDuration)(nil), // 37: envoy.config.route.v3.RouteAction.MaxStreamDuration - (*RouteAction_HashPolicy_Header)(nil), // 38: envoy.config.route.v3.RouteAction.HashPolicy.Header - (*RouteAction_HashPolicy_Cookie)(nil), // 39: envoy.config.route.v3.RouteAction.HashPolicy.Cookie - (*RouteAction_HashPolicy_ConnectionProperties)(nil), // 40: envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties - (*RouteAction_HashPolicy_QueryParameter)(nil), // 41: envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter - (*RouteAction_HashPolicy_FilterState)(nil), // 42: envoy.config.route.v3.RouteAction.HashPolicy.FilterState - (*RouteAction_UpgradeConfig_ConnectConfig)(nil), // 43: envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig - (*RetryPolicy_RetryPriority)(nil), // 44: envoy.config.route.v3.RetryPolicy.RetryPriority - (*RetryPolicy_RetryHostPredicate)(nil), // 45: envoy.config.route.v3.RetryPolicy.RetryHostPredicate - (*RetryPolicy_RetryBackOff)(nil), // 46: envoy.config.route.v3.RetryPolicy.RetryBackOff - (*RetryPolicy_ResetHeader)(nil), // 47: envoy.config.route.v3.RetryPolicy.ResetHeader - (*RetryPolicy_RateLimitedRetryBackOff)(nil), // 48: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff - (*RateLimit_Action)(nil), // 49: envoy.config.route.v3.RateLimit.Action - (*RateLimit_Override)(nil), // 50: envoy.config.route.v3.RateLimit.Override - (*RateLimit_Action_SourceCluster)(nil), // 51: envoy.config.route.v3.RateLimit.Action.SourceCluster - (*RateLimit_Action_DestinationCluster)(nil), // 52: envoy.config.route.v3.RateLimit.Action.DestinationCluster - (*RateLimit_Action_RequestHeaders)(nil), // 53: envoy.config.route.v3.RateLimit.Action.RequestHeaders - (*RateLimit_Action_RemoteAddress)(nil), // 54: envoy.config.route.v3.RateLimit.Action.RemoteAddress - (*RateLimit_Action_GenericKey)(nil), // 55: envoy.config.route.v3.RateLimit.Action.GenericKey - (*RateLimit_Action_HeaderValueMatch)(nil), // 56: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch - (*RateLimit_Action_DynamicMetaData)(nil), // 57: envoy.config.route.v3.RateLimit.Action.DynamicMetaData - (*RateLimit_Action_MetaData)(nil), // 58: envoy.config.route.v3.RateLimit.Action.MetaData - (*RateLimit_Override_DynamicMetadata)(nil), // 59: envoy.config.route.v3.RateLimit.Override.DynamicMetadata - (*v3.HeaderValueOption)(nil), // 60: envoy.config.core.v3.HeaderValueOption + (VirtualHost_TlsRequirementType)(0), // 0: envoy.config.route.v3.VirtualHost.TlsRequirementType + (RouteAction_ClusterNotFoundResponseCode)(0), // 1: envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode + (RouteAction_InternalRedirectAction)(0), // 2: envoy.config.route.v3.RouteAction.InternalRedirectAction + (RetryPolicy_ResetHeaderFormat)(0), // 3: envoy.config.route.v3.RetryPolicy.ResetHeaderFormat + (RedirectAction_RedirectResponseCode)(0), // 4: envoy.config.route.v3.RedirectAction.RedirectResponseCode + (RateLimit_Action_MetaData_Source)(0), // 5: envoy.config.route.v3.RateLimit.Action.MetaData.Source + (*VirtualHost)(nil), // 6: envoy.config.route.v3.VirtualHost + (*FilterAction)(nil), // 7: envoy.config.route.v3.FilterAction + (*Route)(nil), // 8: envoy.config.route.v3.Route + (*WeightedCluster)(nil), // 9: envoy.config.route.v3.WeightedCluster + (*RouteMatch)(nil), // 10: envoy.config.route.v3.RouteMatch + (*CorsPolicy)(nil), // 11: envoy.config.route.v3.CorsPolicy + (*RouteAction)(nil), // 12: envoy.config.route.v3.RouteAction + (*RetryPolicy)(nil), // 13: envoy.config.route.v3.RetryPolicy + (*HedgePolicy)(nil), // 14: envoy.config.route.v3.HedgePolicy + (*RedirectAction)(nil), // 15: envoy.config.route.v3.RedirectAction + (*DirectResponseAction)(nil), // 16: envoy.config.route.v3.DirectResponseAction + (*NonForwardingAction)(nil), // 17: envoy.config.route.v3.NonForwardingAction + (*Decorator)(nil), // 18: envoy.config.route.v3.Decorator + (*Tracing)(nil), // 19: envoy.config.route.v3.Tracing + (*VirtualCluster)(nil), // 20: envoy.config.route.v3.VirtualCluster + (*RateLimit)(nil), // 21: envoy.config.route.v3.RateLimit + (*HeaderMatcher)(nil), // 22: envoy.config.route.v3.HeaderMatcher + (*QueryParameterMatcher)(nil), // 23: envoy.config.route.v3.QueryParameterMatcher + (*InternalRedirectPolicy)(nil), // 24: envoy.config.route.v3.InternalRedirectPolicy + (*FilterConfig)(nil), // 25: envoy.config.route.v3.FilterConfig + nil, // 26: envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry + nil, // 27: envoy.config.route.v3.Route.TypedPerFilterConfigEntry + (*WeightedCluster_ClusterWeight)(nil), // 28: envoy.config.route.v3.WeightedCluster.ClusterWeight + nil, // 29: envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry + (*RouteMatch_GrpcRouteMatchOptions)(nil), // 30: envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions + (*RouteMatch_TlsContextMatchOptions)(nil), // 31: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions + (*RouteMatch_ConnectMatcher)(nil), // 32: envoy.config.route.v3.RouteMatch.ConnectMatcher + (*RouteAction_RequestMirrorPolicy)(nil), // 33: envoy.config.route.v3.RouteAction.RequestMirrorPolicy + (*RouteAction_HashPolicy)(nil), // 34: envoy.config.route.v3.RouteAction.HashPolicy + (*RouteAction_UpgradeConfig)(nil), // 35: envoy.config.route.v3.RouteAction.UpgradeConfig + (*RouteAction_MaxStreamDuration)(nil), // 36: envoy.config.route.v3.RouteAction.MaxStreamDuration + (*RouteAction_HashPolicy_Header)(nil), // 37: envoy.config.route.v3.RouteAction.HashPolicy.Header + (*RouteAction_HashPolicy_Cookie)(nil), // 38: envoy.config.route.v3.RouteAction.HashPolicy.Cookie + (*RouteAction_HashPolicy_ConnectionProperties)(nil), // 39: envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties + (*RouteAction_HashPolicy_QueryParameter)(nil), // 40: envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter + (*RouteAction_HashPolicy_FilterState)(nil), // 41: envoy.config.route.v3.RouteAction.HashPolicy.FilterState + (*RouteAction_UpgradeConfig_ConnectConfig)(nil), // 42: envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig + (*RetryPolicy_RetryPriority)(nil), // 43: envoy.config.route.v3.RetryPolicy.RetryPriority + (*RetryPolicy_RetryHostPredicate)(nil), // 44: envoy.config.route.v3.RetryPolicy.RetryHostPredicate + (*RetryPolicy_RetryBackOff)(nil), // 45: envoy.config.route.v3.RetryPolicy.RetryBackOff + (*RetryPolicy_ResetHeader)(nil), // 46: envoy.config.route.v3.RetryPolicy.ResetHeader + (*RetryPolicy_RateLimitedRetryBackOff)(nil), // 47: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff + (*RateLimit_Action)(nil), // 48: envoy.config.route.v3.RateLimit.Action + (*RateLimit_Override)(nil), // 49: envoy.config.route.v3.RateLimit.Override + (*RateLimit_Action_SourceCluster)(nil), // 50: envoy.config.route.v3.RateLimit.Action.SourceCluster + (*RateLimit_Action_DestinationCluster)(nil), // 51: envoy.config.route.v3.RateLimit.Action.DestinationCluster + (*RateLimit_Action_RequestHeaders)(nil), // 52: envoy.config.route.v3.RateLimit.Action.RequestHeaders + (*RateLimit_Action_RemoteAddress)(nil), // 53: envoy.config.route.v3.RateLimit.Action.RemoteAddress + (*RateLimit_Action_GenericKey)(nil), // 54: envoy.config.route.v3.RateLimit.Action.GenericKey + (*RateLimit_Action_HeaderValueMatch)(nil), // 55: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch + (*RateLimit_Action_DynamicMetaData)(nil), // 56: envoy.config.route.v3.RateLimit.Action.DynamicMetaData + (*RateLimit_Action_MetaData)(nil), // 57: envoy.config.route.v3.RateLimit.Action.MetaData + (*RateLimit_Override_DynamicMetadata)(nil), // 58: envoy.config.route.v3.RateLimit.Override.DynamicMetadata + (*v3.Matcher)(nil), // 59: xds.type.matcher.v3.Matcher + (*v31.HeaderValueOption)(nil), // 60: envoy.config.core.v3.HeaderValueOption (*any.Any)(nil), // 61: google.protobuf.Any (*wrappers.UInt32Value)(nil), // 62: google.protobuf.UInt32Value - (*v3.Metadata)(nil), // 63: envoy.config.core.v3.Metadata - (*v31.RegexMatcher)(nil), // 64: envoy.type.matcher.v3.RegexMatcher + (*v31.Metadata)(nil), // 63: envoy.config.core.v3.Metadata + (*v32.RegexMatcher)(nil), // 64: envoy.type.matcher.v3.RegexMatcher (*wrappers.BoolValue)(nil), // 65: google.protobuf.BoolValue - (*v3.RuntimeFractionalPercent)(nil), // 66: envoy.config.core.v3.RuntimeFractionalPercent - (*v31.StringMatcher)(nil), // 67: envoy.type.matcher.v3.StringMatcher - (*v31.RegexMatchAndSubstitute)(nil), // 68: envoy.type.matcher.v3.RegexMatchAndSubstitute - (*duration.Duration)(nil), // 69: google.protobuf.Duration - (v3.RoutingPriority)(0), // 70: envoy.config.core.v3.RoutingPriority - (*v32.FractionalPercent)(nil), // 71: envoy.type.v3.FractionalPercent - (*v3.DataSource)(nil), // 72: envoy.config.core.v3.DataSource - (*v33.CustomTag)(nil), // 73: envoy.type.tracing.v3.CustomTag - (v3.RequestMethod)(0), // 74: envoy.config.core.v3.RequestMethod - (*v32.Int64Range)(nil), // 75: envoy.type.v3.Int64Range - (*v3.TypedExtensionConfig)(nil), // 76: envoy.config.core.v3.TypedExtensionConfig - (*_struct.Struct)(nil), // 77: google.protobuf.Struct - (*v3.ProxyProtocolConfig)(nil), // 78: envoy.config.core.v3.ProxyProtocolConfig - (*v34.MetadataKey)(nil), // 79: envoy.type.metadata.v3.MetadataKey + (*v31.RuntimeFractionalPercent)(nil), // 66: envoy.config.core.v3.RuntimeFractionalPercent + (*v32.MetadataMatcher)(nil), // 67: envoy.type.matcher.v3.MetadataMatcher + (*v32.StringMatcher)(nil), // 68: envoy.type.matcher.v3.StringMatcher + (*v32.RegexMatchAndSubstitute)(nil), // 69: envoy.type.matcher.v3.RegexMatchAndSubstitute + (*duration.Duration)(nil), // 70: google.protobuf.Duration + (v31.RoutingPriority)(0), // 71: envoy.config.core.v3.RoutingPriority + (*v31.TypedExtensionConfig)(nil), // 72: envoy.config.core.v3.TypedExtensionConfig + (*v33.FractionalPercent)(nil), // 73: envoy.type.v3.FractionalPercent + (*v31.DataSource)(nil), // 74: envoy.config.core.v3.DataSource + (*v34.CustomTag)(nil), // 75: envoy.type.tracing.v3.CustomTag + (*v33.Int64Range)(nil), // 76: envoy.type.v3.Int64Range + (*v31.ProxyProtocolConfig)(nil), // 77: envoy.config.core.v3.ProxyProtocolConfig + (*v35.MetadataKey)(nil), // 78: envoy.type.metadata.v3.MetadataKey } var file_envoy_config_route_v3_route_components_proto_depIdxs = []int32{ 8, // 0: envoy.config.route.v3.VirtualHost.routes:type_name -> envoy.config.route.v3.Route - 0, // 1: envoy.config.route.v3.VirtualHost.require_tls:type_name -> envoy.config.route.v3.VirtualHost.TlsRequirementType - 19, // 2: envoy.config.route.v3.VirtualHost.virtual_clusters:type_name -> envoy.config.route.v3.VirtualCluster - 20, // 3: envoy.config.route.v3.VirtualHost.rate_limits:type_name -> envoy.config.route.v3.RateLimit - 60, // 4: envoy.config.route.v3.VirtualHost.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 60, // 5: envoy.config.route.v3.VirtualHost.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 11, // 6: envoy.config.route.v3.VirtualHost.cors:type_name -> envoy.config.route.v3.CorsPolicy - 24, // 7: envoy.config.route.v3.VirtualHost.typed_per_filter_config:type_name -> envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry - 13, // 8: envoy.config.route.v3.VirtualHost.retry_policy:type_name -> envoy.config.route.v3.RetryPolicy - 61, // 9: envoy.config.route.v3.VirtualHost.retry_policy_typed_config:type_name -> google.protobuf.Any - 14, // 10: envoy.config.route.v3.VirtualHost.hedge_policy:type_name -> envoy.config.route.v3.HedgePolicy - 62, // 11: envoy.config.route.v3.VirtualHost.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 25, // 12: envoy.config.route.v3.VirtualHost.hidden_envoy_deprecated_per_filter_config:type_name -> envoy.config.route.v3.VirtualHost.HiddenEnvoyDeprecatedPerFilterConfigEntry - 61, // 13: envoy.config.route.v3.FilterAction.action:type_name -> google.protobuf.Any - 10, // 14: envoy.config.route.v3.Route.match:type_name -> envoy.config.route.v3.RouteMatch - 12, // 15: envoy.config.route.v3.Route.route:type_name -> envoy.config.route.v3.RouteAction - 15, // 16: envoy.config.route.v3.Route.redirect:type_name -> envoy.config.route.v3.RedirectAction - 16, // 17: envoy.config.route.v3.Route.direct_response:type_name -> envoy.config.route.v3.DirectResponseAction - 7, // 18: envoy.config.route.v3.Route.filter_action:type_name -> envoy.config.route.v3.FilterAction - 63, // 19: envoy.config.route.v3.Route.metadata:type_name -> envoy.config.core.v3.Metadata - 17, // 20: envoy.config.route.v3.Route.decorator:type_name -> envoy.config.route.v3.Decorator - 26, // 21: envoy.config.route.v3.Route.typed_per_filter_config:type_name -> envoy.config.route.v3.Route.TypedPerFilterConfigEntry - 60, // 22: envoy.config.route.v3.Route.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 60, // 23: envoy.config.route.v3.Route.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 18, // 24: envoy.config.route.v3.Route.tracing:type_name -> envoy.config.route.v3.Tracing - 62, // 25: envoy.config.route.v3.Route.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 27, // 26: envoy.config.route.v3.Route.hidden_envoy_deprecated_per_filter_config:type_name -> envoy.config.route.v3.Route.HiddenEnvoyDeprecatedPerFilterConfigEntry - 28, // 27: envoy.config.route.v3.WeightedCluster.clusters:type_name -> envoy.config.route.v3.WeightedCluster.ClusterWeight - 62, // 28: envoy.config.route.v3.WeightedCluster.total_weight:type_name -> google.protobuf.UInt32Value - 64, // 29: envoy.config.route.v3.RouteMatch.safe_regex:type_name -> envoy.type.matcher.v3.RegexMatcher - 33, // 30: envoy.config.route.v3.RouteMatch.connect_matcher:type_name -> envoy.config.route.v3.RouteMatch.ConnectMatcher - 65, // 31: envoy.config.route.v3.RouteMatch.case_sensitive:type_name -> google.protobuf.BoolValue - 66, // 32: envoy.config.route.v3.RouteMatch.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 21, // 33: envoy.config.route.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 22, // 34: envoy.config.route.v3.RouteMatch.query_parameters:type_name -> envoy.config.route.v3.QueryParameterMatcher - 31, // 35: envoy.config.route.v3.RouteMatch.grpc:type_name -> envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions - 32, // 36: envoy.config.route.v3.RouteMatch.tls_context:type_name -> envoy.config.route.v3.RouteMatch.TlsContextMatchOptions - 67, // 37: envoy.config.route.v3.CorsPolicy.allow_origin_string_match:type_name -> envoy.type.matcher.v3.StringMatcher - 65, // 38: envoy.config.route.v3.CorsPolicy.allow_credentials:type_name -> google.protobuf.BoolValue - 66, // 39: envoy.config.route.v3.CorsPolicy.filter_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 65, // 40: envoy.config.route.v3.CorsPolicy.hidden_envoy_deprecated_enabled:type_name -> google.protobuf.BoolValue - 66, // 41: envoy.config.route.v3.CorsPolicy.shadow_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 9, // 42: envoy.config.route.v3.RouteAction.weighted_clusters:type_name -> envoy.config.route.v3.WeightedCluster - 1, // 43: envoy.config.route.v3.RouteAction.cluster_not_found_response_code:type_name -> envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode - 63, // 44: envoy.config.route.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata - 68, // 45: envoy.config.route.v3.RouteAction.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 65, // 46: envoy.config.route.v3.RouteAction.auto_host_rewrite:type_name -> google.protobuf.BoolValue - 68, // 47: envoy.config.route.v3.RouteAction.host_rewrite_path_regex:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 69, // 48: envoy.config.route.v3.RouteAction.timeout:type_name -> google.protobuf.Duration - 69, // 49: envoy.config.route.v3.RouteAction.idle_timeout:type_name -> google.protobuf.Duration - 13, // 50: envoy.config.route.v3.RouteAction.retry_policy:type_name -> envoy.config.route.v3.RetryPolicy - 61, // 51: envoy.config.route.v3.RouteAction.retry_policy_typed_config:type_name -> google.protobuf.Any - 34, // 52: envoy.config.route.v3.RouteAction.request_mirror_policies:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy - 70, // 53: envoy.config.route.v3.RouteAction.priority:type_name -> envoy.config.core.v3.RoutingPriority - 20, // 54: envoy.config.route.v3.RouteAction.rate_limits:type_name -> envoy.config.route.v3.RateLimit - 65, // 55: envoy.config.route.v3.RouteAction.include_vh_rate_limits:type_name -> google.protobuf.BoolValue - 35, // 56: envoy.config.route.v3.RouteAction.hash_policy:type_name -> envoy.config.route.v3.RouteAction.HashPolicy - 11, // 57: envoy.config.route.v3.RouteAction.cors:type_name -> envoy.config.route.v3.CorsPolicy - 69, // 58: envoy.config.route.v3.RouteAction.max_grpc_timeout:type_name -> google.protobuf.Duration - 69, // 59: envoy.config.route.v3.RouteAction.grpc_timeout_offset:type_name -> google.protobuf.Duration - 36, // 60: envoy.config.route.v3.RouteAction.upgrade_configs:type_name -> envoy.config.route.v3.RouteAction.UpgradeConfig - 23, // 61: envoy.config.route.v3.RouteAction.internal_redirect_policy:type_name -> envoy.config.route.v3.InternalRedirectPolicy - 2, // 62: envoy.config.route.v3.RouteAction.internal_redirect_action:type_name -> envoy.config.route.v3.RouteAction.InternalRedirectAction - 62, // 63: envoy.config.route.v3.RouteAction.max_internal_redirects:type_name -> google.protobuf.UInt32Value - 14, // 64: envoy.config.route.v3.RouteAction.hedge_policy:type_name -> envoy.config.route.v3.HedgePolicy - 37, // 65: envoy.config.route.v3.RouteAction.max_stream_duration:type_name -> envoy.config.route.v3.RouteAction.MaxStreamDuration - 34, // 66: envoy.config.route.v3.RouteAction.hidden_envoy_deprecated_request_mirror_policy:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy + 59, // 1: envoy.config.route.v3.VirtualHost.matcher:type_name -> xds.type.matcher.v3.Matcher + 0, // 2: envoy.config.route.v3.VirtualHost.require_tls:type_name -> envoy.config.route.v3.VirtualHost.TlsRequirementType + 20, // 3: envoy.config.route.v3.VirtualHost.virtual_clusters:type_name -> envoy.config.route.v3.VirtualCluster + 21, // 4: envoy.config.route.v3.VirtualHost.rate_limits:type_name -> envoy.config.route.v3.RateLimit + 60, // 5: envoy.config.route.v3.VirtualHost.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 60, // 6: envoy.config.route.v3.VirtualHost.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 11, // 7: envoy.config.route.v3.VirtualHost.cors:type_name -> envoy.config.route.v3.CorsPolicy + 26, // 8: envoy.config.route.v3.VirtualHost.typed_per_filter_config:type_name -> envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry + 13, // 9: envoy.config.route.v3.VirtualHost.retry_policy:type_name -> envoy.config.route.v3.RetryPolicy + 61, // 10: envoy.config.route.v3.VirtualHost.retry_policy_typed_config:type_name -> google.protobuf.Any + 14, // 11: envoy.config.route.v3.VirtualHost.hedge_policy:type_name -> envoy.config.route.v3.HedgePolicy + 62, // 12: envoy.config.route.v3.VirtualHost.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value + 33, // 13: envoy.config.route.v3.VirtualHost.request_mirror_policies:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy + 61, // 14: envoy.config.route.v3.FilterAction.action:type_name -> google.protobuf.Any + 10, // 15: envoy.config.route.v3.Route.match:type_name -> envoy.config.route.v3.RouteMatch + 12, // 16: envoy.config.route.v3.Route.route:type_name -> envoy.config.route.v3.RouteAction + 15, // 17: envoy.config.route.v3.Route.redirect:type_name -> envoy.config.route.v3.RedirectAction + 16, // 18: envoy.config.route.v3.Route.direct_response:type_name -> envoy.config.route.v3.DirectResponseAction + 7, // 19: envoy.config.route.v3.Route.filter_action:type_name -> envoy.config.route.v3.FilterAction + 17, // 20: envoy.config.route.v3.Route.non_forwarding_action:type_name -> envoy.config.route.v3.NonForwardingAction + 63, // 21: envoy.config.route.v3.Route.metadata:type_name -> envoy.config.core.v3.Metadata + 18, // 22: envoy.config.route.v3.Route.decorator:type_name -> envoy.config.route.v3.Decorator + 27, // 23: envoy.config.route.v3.Route.typed_per_filter_config:type_name -> envoy.config.route.v3.Route.TypedPerFilterConfigEntry + 60, // 24: envoy.config.route.v3.Route.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 60, // 25: envoy.config.route.v3.Route.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 19, // 26: envoy.config.route.v3.Route.tracing:type_name -> envoy.config.route.v3.Tracing + 62, // 27: envoy.config.route.v3.Route.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value + 28, // 28: envoy.config.route.v3.WeightedCluster.clusters:type_name -> envoy.config.route.v3.WeightedCluster.ClusterWeight + 62, // 29: envoy.config.route.v3.WeightedCluster.total_weight:type_name -> google.protobuf.UInt32Value + 64, // 30: envoy.config.route.v3.RouteMatch.safe_regex:type_name -> envoy.type.matcher.v3.RegexMatcher + 32, // 31: envoy.config.route.v3.RouteMatch.connect_matcher:type_name -> envoy.config.route.v3.RouteMatch.ConnectMatcher + 65, // 32: envoy.config.route.v3.RouteMatch.case_sensitive:type_name -> google.protobuf.BoolValue + 66, // 33: envoy.config.route.v3.RouteMatch.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 22, // 34: envoy.config.route.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 23, // 35: envoy.config.route.v3.RouteMatch.query_parameters:type_name -> envoy.config.route.v3.QueryParameterMatcher + 30, // 36: envoy.config.route.v3.RouteMatch.grpc:type_name -> envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions + 31, // 37: envoy.config.route.v3.RouteMatch.tls_context:type_name -> envoy.config.route.v3.RouteMatch.TlsContextMatchOptions + 67, // 38: envoy.config.route.v3.RouteMatch.dynamic_metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher + 68, // 39: envoy.config.route.v3.CorsPolicy.allow_origin_string_match:type_name -> envoy.type.matcher.v3.StringMatcher + 65, // 40: envoy.config.route.v3.CorsPolicy.allow_credentials:type_name -> google.protobuf.BoolValue + 66, // 41: envoy.config.route.v3.CorsPolicy.filter_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 66, // 42: envoy.config.route.v3.CorsPolicy.shadow_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 9, // 43: envoy.config.route.v3.RouteAction.weighted_clusters:type_name -> envoy.config.route.v3.WeightedCluster + 1, // 44: envoy.config.route.v3.RouteAction.cluster_not_found_response_code:type_name -> envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode + 63, // 45: envoy.config.route.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata + 69, // 46: envoy.config.route.v3.RouteAction.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute + 65, // 47: envoy.config.route.v3.RouteAction.auto_host_rewrite:type_name -> google.protobuf.BoolValue + 69, // 48: envoy.config.route.v3.RouteAction.host_rewrite_path_regex:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute + 70, // 49: envoy.config.route.v3.RouteAction.timeout:type_name -> google.protobuf.Duration + 70, // 50: envoy.config.route.v3.RouteAction.idle_timeout:type_name -> google.protobuf.Duration + 13, // 51: envoy.config.route.v3.RouteAction.retry_policy:type_name -> envoy.config.route.v3.RetryPolicy + 61, // 52: envoy.config.route.v3.RouteAction.retry_policy_typed_config:type_name -> google.protobuf.Any + 33, // 53: envoy.config.route.v3.RouteAction.request_mirror_policies:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy + 71, // 54: envoy.config.route.v3.RouteAction.priority:type_name -> envoy.config.core.v3.RoutingPriority + 21, // 55: envoy.config.route.v3.RouteAction.rate_limits:type_name -> envoy.config.route.v3.RateLimit + 65, // 56: envoy.config.route.v3.RouteAction.include_vh_rate_limits:type_name -> google.protobuf.BoolValue + 34, // 57: envoy.config.route.v3.RouteAction.hash_policy:type_name -> envoy.config.route.v3.RouteAction.HashPolicy + 11, // 58: envoy.config.route.v3.RouteAction.cors:type_name -> envoy.config.route.v3.CorsPolicy + 70, // 59: envoy.config.route.v3.RouteAction.max_grpc_timeout:type_name -> google.protobuf.Duration + 70, // 60: envoy.config.route.v3.RouteAction.grpc_timeout_offset:type_name -> google.protobuf.Duration + 35, // 61: envoy.config.route.v3.RouteAction.upgrade_configs:type_name -> envoy.config.route.v3.RouteAction.UpgradeConfig + 24, // 62: envoy.config.route.v3.RouteAction.internal_redirect_policy:type_name -> envoy.config.route.v3.InternalRedirectPolicy + 2, // 63: envoy.config.route.v3.RouteAction.internal_redirect_action:type_name -> envoy.config.route.v3.RouteAction.InternalRedirectAction + 62, // 64: envoy.config.route.v3.RouteAction.max_internal_redirects:type_name -> google.protobuf.UInt32Value + 14, // 65: envoy.config.route.v3.RouteAction.hedge_policy:type_name -> envoy.config.route.v3.HedgePolicy + 36, // 66: envoy.config.route.v3.RouteAction.max_stream_duration:type_name -> envoy.config.route.v3.RouteAction.MaxStreamDuration 62, // 67: envoy.config.route.v3.RetryPolicy.num_retries:type_name -> google.protobuf.UInt32Value - 69, // 68: envoy.config.route.v3.RetryPolicy.per_try_timeout:type_name -> google.protobuf.Duration - 44, // 69: envoy.config.route.v3.RetryPolicy.retry_priority:type_name -> envoy.config.route.v3.RetryPolicy.RetryPriority - 45, // 70: envoy.config.route.v3.RetryPolicy.retry_host_predicate:type_name -> envoy.config.route.v3.RetryPolicy.RetryHostPredicate - 46, // 71: envoy.config.route.v3.RetryPolicy.retry_back_off:type_name -> envoy.config.route.v3.RetryPolicy.RetryBackOff - 48, // 72: envoy.config.route.v3.RetryPolicy.rate_limited_retry_back_off:type_name -> envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff - 21, // 73: envoy.config.route.v3.RetryPolicy.retriable_headers:type_name -> envoy.config.route.v3.HeaderMatcher - 21, // 74: envoy.config.route.v3.RetryPolicy.retriable_request_headers:type_name -> envoy.config.route.v3.HeaderMatcher - 62, // 75: envoy.config.route.v3.HedgePolicy.initial_requests:type_name -> google.protobuf.UInt32Value - 71, // 76: envoy.config.route.v3.HedgePolicy.additional_request_chance:type_name -> envoy.type.v3.FractionalPercent - 68, // 77: envoy.config.route.v3.RedirectAction.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 4, // 78: envoy.config.route.v3.RedirectAction.response_code:type_name -> envoy.config.route.v3.RedirectAction.RedirectResponseCode - 72, // 79: envoy.config.route.v3.DirectResponseAction.body:type_name -> envoy.config.core.v3.DataSource - 65, // 80: envoy.config.route.v3.Decorator.propagate:type_name -> google.protobuf.BoolValue - 71, // 81: envoy.config.route.v3.Tracing.client_sampling:type_name -> envoy.type.v3.FractionalPercent - 71, // 82: envoy.config.route.v3.Tracing.random_sampling:type_name -> envoy.type.v3.FractionalPercent - 71, // 83: envoy.config.route.v3.Tracing.overall_sampling:type_name -> envoy.type.v3.FractionalPercent - 73, // 84: envoy.config.route.v3.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag - 21, // 85: envoy.config.route.v3.VirtualCluster.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 74, // 86: envoy.config.route.v3.VirtualCluster.hidden_envoy_deprecated_method:type_name -> envoy.config.core.v3.RequestMethod - 62, // 87: envoy.config.route.v3.RateLimit.stage:type_name -> google.protobuf.UInt32Value - 49, // 88: envoy.config.route.v3.RateLimit.actions:type_name -> envoy.config.route.v3.RateLimit.Action - 50, // 89: envoy.config.route.v3.RateLimit.limit:type_name -> envoy.config.route.v3.RateLimit.Override - 64, // 90: envoy.config.route.v3.HeaderMatcher.safe_regex_match:type_name -> envoy.type.matcher.v3.RegexMatcher - 75, // 91: envoy.config.route.v3.HeaderMatcher.range_match:type_name -> envoy.type.v3.Int64Range - 67, // 92: envoy.config.route.v3.QueryParameterMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher - 65, // 93: envoy.config.route.v3.QueryParameterMatcher.hidden_envoy_deprecated_regex:type_name -> google.protobuf.BoolValue - 62, // 94: envoy.config.route.v3.InternalRedirectPolicy.max_internal_redirects:type_name -> google.protobuf.UInt32Value - 76, // 95: envoy.config.route.v3.InternalRedirectPolicy.predicates:type_name -> envoy.config.core.v3.TypedExtensionConfig - 61, // 96: envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 77, // 97: envoy.config.route.v3.VirtualHost.HiddenEnvoyDeprecatedPerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 61, // 98: envoy.config.route.v3.Route.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 77, // 99: envoy.config.route.v3.Route.HiddenEnvoyDeprecatedPerFilterConfigEntry.value:type_name -> google.protobuf.Struct + 70, // 68: envoy.config.route.v3.RetryPolicy.per_try_timeout:type_name -> google.protobuf.Duration + 70, // 69: envoy.config.route.v3.RetryPolicy.per_try_idle_timeout:type_name -> google.protobuf.Duration + 43, // 70: envoy.config.route.v3.RetryPolicy.retry_priority:type_name -> envoy.config.route.v3.RetryPolicy.RetryPriority + 44, // 71: envoy.config.route.v3.RetryPolicy.retry_host_predicate:type_name -> envoy.config.route.v3.RetryPolicy.RetryHostPredicate + 72, // 72: envoy.config.route.v3.RetryPolicy.retry_options_predicates:type_name -> envoy.config.core.v3.TypedExtensionConfig + 45, // 73: envoy.config.route.v3.RetryPolicy.retry_back_off:type_name -> envoy.config.route.v3.RetryPolicy.RetryBackOff + 47, // 74: envoy.config.route.v3.RetryPolicy.rate_limited_retry_back_off:type_name -> envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff + 22, // 75: envoy.config.route.v3.RetryPolicy.retriable_headers:type_name -> envoy.config.route.v3.HeaderMatcher + 22, // 76: envoy.config.route.v3.RetryPolicy.retriable_request_headers:type_name -> envoy.config.route.v3.HeaderMatcher + 62, // 77: envoy.config.route.v3.HedgePolicy.initial_requests:type_name -> google.protobuf.UInt32Value + 73, // 78: envoy.config.route.v3.HedgePolicy.additional_request_chance:type_name -> envoy.type.v3.FractionalPercent + 69, // 79: envoy.config.route.v3.RedirectAction.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute + 4, // 80: envoy.config.route.v3.RedirectAction.response_code:type_name -> envoy.config.route.v3.RedirectAction.RedirectResponseCode + 74, // 81: envoy.config.route.v3.DirectResponseAction.body:type_name -> envoy.config.core.v3.DataSource + 65, // 82: envoy.config.route.v3.Decorator.propagate:type_name -> google.protobuf.BoolValue + 73, // 83: envoy.config.route.v3.Tracing.client_sampling:type_name -> envoy.type.v3.FractionalPercent + 73, // 84: envoy.config.route.v3.Tracing.random_sampling:type_name -> envoy.type.v3.FractionalPercent + 73, // 85: envoy.config.route.v3.Tracing.overall_sampling:type_name -> envoy.type.v3.FractionalPercent + 75, // 86: envoy.config.route.v3.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag + 22, // 87: envoy.config.route.v3.VirtualCluster.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 62, // 88: envoy.config.route.v3.RateLimit.stage:type_name -> google.protobuf.UInt32Value + 48, // 89: envoy.config.route.v3.RateLimit.actions:type_name -> envoy.config.route.v3.RateLimit.Action + 49, // 90: envoy.config.route.v3.RateLimit.limit:type_name -> envoy.config.route.v3.RateLimit.Override + 64, // 91: envoy.config.route.v3.HeaderMatcher.safe_regex_match:type_name -> envoy.type.matcher.v3.RegexMatcher + 76, // 92: envoy.config.route.v3.HeaderMatcher.range_match:type_name -> envoy.type.v3.Int64Range + 68, // 93: envoy.config.route.v3.HeaderMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher + 68, // 94: envoy.config.route.v3.QueryParameterMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher + 62, // 95: envoy.config.route.v3.InternalRedirectPolicy.max_internal_redirects:type_name -> google.protobuf.UInt32Value + 72, // 96: envoy.config.route.v3.InternalRedirectPolicy.predicates:type_name -> envoy.config.core.v3.TypedExtensionConfig + 61, // 97: envoy.config.route.v3.FilterConfig.config:type_name -> google.protobuf.Any + 61, // 98: envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any + 61, // 99: envoy.config.route.v3.Route.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any 62, // 100: envoy.config.route.v3.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value 63, // 101: envoy.config.route.v3.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v3.Metadata 60, // 102: envoy.config.route.v3.WeightedCluster.ClusterWeight.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption 60, // 103: envoy.config.route.v3.WeightedCluster.ClusterWeight.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption 29, // 104: envoy.config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config:type_name -> envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - 30, // 105: envoy.config.route.v3.WeightedCluster.ClusterWeight.hidden_envoy_deprecated_per_filter_config:type_name -> envoy.config.route.v3.WeightedCluster.ClusterWeight.HiddenEnvoyDeprecatedPerFilterConfigEntry - 61, // 106: envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 77, // 107: envoy.config.route.v3.WeightedCluster.ClusterWeight.HiddenEnvoyDeprecatedPerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 65, // 108: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions.presented:type_name -> google.protobuf.BoolValue - 65, // 109: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions.validated:type_name -> google.protobuf.BoolValue - 66, // 110: envoy.config.route.v3.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 65, // 111: envoy.config.route.v3.RouteAction.RequestMirrorPolicy.trace_sampled:type_name -> google.protobuf.BoolValue - 38, // 112: envoy.config.route.v3.RouteAction.HashPolicy.header:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.Header - 39, // 113: envoy.config.route.v3.RouteAction.HashPolicy.cookie:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.Cookie - 40, // 114: envoy.config.route.v3.RouteAction.HashPolicy.connection_properties:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties - 41, // 115: envoy.config.route.v3.RouteAction.HashPolicy.query_parameter:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter - 42, // 116: envoy.config.route.v3.RouteAction.HashPolicy.filter_state:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.FilterState - 65, // 117: envoy.config.route.v3.RouteAction.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 43, // 118: envoy.config.route.v3.RouteAction.UpgradeConfig.connect_config:type_name -> envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig - 69, // 119: envoy.config.route.v3.RouteAction.MaxStreamDuration.max_stream_duration:type_name -> google.protobuf.Duration - 69, // 120: envoy.config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max:type_name -> google.protobuf.Duration - 69, // 121: envoy.config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset:type_name -> google.protobuf.Duration - 68, // 122: envoy.config.route.v3.RouteAction.HashPolicy.Header.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 69, // 123: envoy.config.route.v3.RouteAction.HashPolicy.Cookie.ttl:type_name -> google.protobuf.Duration - 78, // 124: envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.proxy_protocol_config:type_name -> envoy.config.core.v3.ProxyProtocolConfig - 61, // 125: envoy.config.route.v3.RetryPolicy.RetryPriority.typed_config:type_name -> google.protobuf.Any - 77, // 126: envoy.config.route.v3.RetryPolicy.RetryPriority.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 61, // 127: envoy.config.route.v3.RetryPolicy.RetryHostPredicate.typed_config:type_name -> google.protobuf.Any - 77, // 128: envoy.config.route.v3.RetryPolicy.RetryHostPredicate.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 69, // 129: envoy.config.route.v3.RetryPolicy.RetryBackOff.base_interval:type_name -> google.protobuf.Duration - 69, // 130: envoy.config.route.v3.RetryPolicy.RetryBackOff.max_interval:type_name -> google.protobuf.Duration - 3, // 131: envoy.config.route.v3.RetryPolicy.ResetHeader.format:type_name -> envoy.config.route.v3.RetryPolicy.ResetHeaderFormat - 47, // 132: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff.reset_headers:type_name -> envoy.config.route.v3.RetryPolicy.ResetHeader - 69, // 133: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff.max_interval:type_name -> google.protobuf.Duration - 51, // 134: envoy.config.route.v3.RateLimit.Action.source_cluster:type_name -> envoy.config.route.v3.RateLimit.Action.SourceCluster - 52, // 135: envoy.config.route.v3.RateLimit.Action.destination_cluster:type_name -> envoy.config.route.v3.RateLimit.Action.DestinationCluster - 53, // 136: envoy.config.route.v3.RateLimit.Action.request_headers:type_name -> envoy.config.route.v3.RateLimit.Action.RequestHeaders - 54, // 137: envoy.config.route.v3.RateLimit.Action.remote_address:type_name -> envoy.config.route.v3.RateLimit.Action.RemoteAddress - 55, // 138: envoy.config.route.v3.RateLimit.Action.generic_key:type_name -> envoy.config.route.v3.RateLimit.Action.GenericKey - 56, // 139: envoy.config.route.v3.RateLimit.Action.header_value_match:type_name -> envoy.config.route.v3.RateLimit.Action.HeaderValueMatch - 57, // 140: envoy.config.route.v3.RateLimit.Action.dynamic_metadata:type_name -> envoy.config.route.v3.RateLimit.Action.DynamicMetaData - 58, // 141: envoy.config.route.v3.RateLimit.Action.metadata:type_name -> envoy.config.route.v3.RateLimit.Action.MetaData - 76, // 142: envoy.config.route.v3.RateLimit.Action.extension:type_name -> envoy.config.core.v3.TypedExtensionConfig - 59, // 143: envoy.config.route.v3.RateLimit.Override.dynamic_metadata:type_name -> envoy.config.route.v3.RateLimit.Override.DynamicMetadata - 65, // 144: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch.expect_match:type_name -> google.protobuf.BoolValue - 21, // 145: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 79, // 146: envoy.config.route.v3.RateLimit.Action.DynamicMetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 79, // 147: envoy.config.route.v3.RateLimit.Action.MetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 5, // 148: envoy.config.route.v3.RateLimit.Action.MetaData.source:type_name -> envoy.config.route.v3.RateLimit.Action.MetaData.Source - 79, // 149: envoy.config.route.v3.RateLimit.Override.DynamicMetadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 150, // [150:150] is the sub-list for method output_type - 150, // [150:150] is the sub-list for method input_type - 150, // [150:150] is the sub-list for extension type_name - 150, // [150:150] is the sub-list for extension extendee - 0, // [0:150] is the sub-list for field type_name + 61, // 105: envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any + 65, // 106: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions.presented:type_name -> google.protobuf.BoolValue + 65, // 107: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions.validated:type_name -> google.protobuf.BoolValue + 66, // 108: envoy.config.route.v3.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 65, // 109: envoy.config.route.v3.RouteAction.RequestMirrorPolicy.trace_sampled:type_name -> google.protobuf.BoolValue + 37, // 110: envoy.config.route.v3.RouteAction.HashPolicy.header:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.Header + 38, // 111: envoy.config.route.v3.RouteAction.HashPolicy.cookie:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.Cookie + 39, // 112: envoy.config.route.v3.RouteAction.HashPolicy.connection_properties:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties + 40, // 113: envoy.config.route.v3.RouteAction.HashPolicy.query_parameter:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter + 41, // 114: envoy.config.route.v3.RouteAction.HashPolicy.filter_state:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.FilterState + 65, // 115: envoy.config.route.v3.RouteAction.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue + 42, // 116: envoy.config.route.v3.RouteAction.UpgradeConfig.connect_config:type_name -> envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig + 70, // 117: envoy.config.route.v3.RouteAction.MaxStreamDuration.max_stream_duration:type_name -> google.protobuf.Duration + 70, // 118: envoy.config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max:type_name -> google.protobuf.Duration + 70, // 119: envoy.config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset:type_name -> google.protobuf.Duration + 69, // 120: envoy.config.route.v3.RouteAction.HashPolicy.Header.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute + 70, // 121: envoy.config.route.v3.RouteAction.HashPolicy.Cookie.ttl:type_name -> google.protobuf.Duration + 77, // 122: envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.proxy_protocol_config:type_name -> envoy.config.core.v3.ProxyProtocolConfig + 61, // 123: envoy.config.route.v3.RetryPolicy.RetryPriority.typed_config:type_name -> google.protobuf.Any + 61, // 124: envoy.config.route.v3.RetryPolicy.RetryHostPredicate.typed_config:type_name -> google.protobuf.Any + 70, // 125: envoy.config.route.v3.RetryPolicy.RetryBackOff.base_interval:type_name -> google.protobuf.Duration + 70, // 126: envoy.config.route.v3.RetryPolicy.RetryBackOff.max_interval:type_name -> google.protobuf.Duration + 3, // 127: envoy.config.route.v3.RetryPolicy.ResetHeader.format:type_name -> envoy.config.route.v3.RetryPolicy.ResetHeaderFormat + 46, // 128: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff.reset_headers:type_name -> envoy.config.route.v3.RetryPolicy.ResetHeader + 70, // 129: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff.max_interval:type_name -> google.protobuf.Duration + 50, // 130: envoy.config.route.v3.RateLimit.Action.source_cluster:type_name -> envoy.config.route.v3.RateLimit.Action.SourceCluster + 51, // 131: envoy.config.route.v3.RateLimit.Action.destination_cluster:type_name -> envoy.config.route.v3.RateLimit.Action.DestinationCluster + 52, // 132: envoy.config.route.v3.RateLimit.Action.request_headers:type_name -> envoy.config.route.v3.RateLimit.Action.RequestHeaders + 53, // 133: envoy.config.route.v3.RateLimit.Action.remote_address:type_name -> envoy.config.route.v3.RateLimit.Action.RemoteAddress + 54, // 134: envoy.config.route.v3.RateLimit.Action.generic_key:type_name -> envoy.config.route.v3.RateLimit.Action.GenericKey + 55, // 135: envoy.config.route.v3.RateLimit.Action.header_value_match:type_name -> envoy.config.route.v3.RateLimit.Action.HeaderValueMatch + 56, // 136: envoy.config.route.v3.RateLimit.Action.dynamic_metadata:type_name -> envoy.config.route.v3.RateLimit.Action.DynamicMetaData + 57, // 137: envoy.config.route.v3.RateLimit.Action.metadata:type_name -> envoy.config.route.v3.RateLimit.Action.MetaData + 72, // 138: envoy.config.route.v3.RateLimit.Action.extension:type_name -> envoy.config.core.v3.TypedExtensionConfig + 58, // 139: envoy.config.route.v3.RateLimit.Override.dynamic_metadata:type_name -> envoy.config.route.v3.RateLimit.Override.DynamicMetadata + 65, // 140: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch.expect_match:type_name -> google.protobuf.BoolValue + 22, // 141: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 78, // 142: envoy.config.route.v3.RateLimit.Action.DynamicMetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey + 78, // 143: envoy.config.route.v3.RateLimit.Action.MetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey + 5, // 144: envoy.config.route.v3.RateLimit.Action.MetaData.source:type_name -> envoy.config.route.v3.RateLimit.Action.MetaData.Source + 78, // 145: envoy.config.route.v3.RateLimit.Override.DynamicMetadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey + 146, // [146:146] is the sub-list for method output_type + 146, // [146:146] is the sub-list for method input_type + 146, // [146:146] is the sub-list for extension type_name + 146, // [146:146] is the sub-list for extension extendee + 0, // [0:146] is the sub-list for field type_name } func init() { file_envoy_config_route_v3_route_components_proto_init() } @@ -7381,7 +7589,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { } } file_envoy_config_route_v3_route_components_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decorator); i { + switch v := v.(*NonForwardingAction); i { case 0: return &v.state case 1: @@ -7393,7 +7601,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { } } file_envoy_config_route_v3_route_components_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tracing); i { + switch v := v.(*Decorator); i { case 0: return &v.state case 1: @@ -7405,7 +7613,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { } } file_envoy_config_route_v3_route_components_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualCluster); i { + switch v := v.(*Tracing); i { case 0: return &v.state case 1: @@ -7417,7 +7625,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { } } file_envoy_config_route_v3_route_components_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { + switch v := v.(*VirtualCluster); i { case 0: return &v.state case 1: @@ -7429,7 +7637,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { } } file_envoy_config_route_v3_route_components_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMatcher); i { + switch v := v.(*RateLimit); i { case 0: return &v.state case 1: @@ -7441,7 +7649,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { } } file_envoy_config_route_v3_route_components_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParameterMatcher); i { + switch v := v.(*HeaderMatcher); i { case 0: return &v.state case 1: @@ -7453,6 +7661,18 @@ func file_envoy_config_route_v3_route_components_proto_init() { } } file_envoy_config_route_v3_route_components_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParameterMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_route_v3_route_components_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InternalRedirectPolicy); i { case 0: return &v.state @@ -7464,6 +7684,18 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } + file_envoy_config_route_v3_route_components_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_envoy_config_route_v3_route_components_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WeightedCluster_ClusterWeight); i { case 0: @@ -7476,7 +7708,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteMatch_GrpcRouteMatchOptions); i { case 0: return &v.state @@ -7488,7 +7720,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteMatch_TlsContextMatchOptions); i { case 0: return &v.state @@ -7500,7 +7732,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteMatch_ConnectMatcher); i { case 0: return &v.state @@ -7512,7 +7744,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_RequestMirrorPolicy); i { case 0: return &v.state @@ -7524,7 +7756,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_HashPolicy); i { case 0: return &v.state @@ -7536,7 +7768,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_UpgradeConfig); i { case 0: return &v.state @@ -7548,7 +7780,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_MaxStreamDuration); i { case 0: return &v.state @@ -7560,7 +7792,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_HashPolicy_Header); i { case 0: return &v.state @@ -7572,7 +7804,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_HashPolicy_Cookie); i { case 0: return &v.state @@ -7584,7 +7816,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_HashPolicy_ConnectionProperties); i { case 0: return &v.state @@ -7596,7 +7828,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_HashPolicy_QueryParameter); i { case 0: return &v.state @@ -7608,7 +7840,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_HashPolicy_FilterState); i { case 0: return &v.state @@ -7620,7 +7852,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouteAction_UpgradeConfig_ConnectConfig); i { case 0: return &v.state @@ -7632,7 +7864,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryPolicy_RetryPriority); i { case 0: return &v.state @@ -7644,7 +7876,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryPolicy_RetryHostPredicate); i { case 0: return &v.state @@ -7656,7 +7888,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryPolicy_RetryBackOff); i { case 0: return &v.state @@ -7668,7 +7900,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryPolicy_ResetHeader); i { case 0: return &v.state @@ -7680,7 +7912,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryPolicy_RateLimitedRetryBackOff); i { case 0: return &v.state @@ -7692,7 +7924,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action); i { case 0: return &v.state @@ -7704,7 +7936,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Override); i { case 0: return &v.state @@ -7716,7 +7948,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_SourceCluster); i { case 0: return &v.state @@ -7728,7 +7960,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_DestinationCluster); i { case 0: return &v.state @@ -7740,7 +7972,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_RequestHeaders); i { case 0: return &v.state @@ -7752,7 +7984,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_RemoteAddress); i { case 0: return &v.state @@ -7764,7 +7996,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_GenericKey); i { case 0: return &v.state @@ -7776,7 +8008,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_HeaderValueMatch); i { case 0: return &v.state @@ -7788,7 +8020,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_DynamicMetaData); i { case 0: return &v.state @@ -7800,7 +8032,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Action_MetaData); i { case 0: return &v.state @@ -7812,7 +8044,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { return nil } } - file_envoy_config_route_v3_route_components_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + file_envoy_config_route_v3_route_components_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimit_Override_DynamicMetadata); i { case 0: return &v.state @@ -7830,22 +8062,26 @@ func file_envoy_config_route_v3_route_components_proto_init() { (*Route_Redirect)(nil), (*Route_DirectResponse)(nil), (*Route_FilterAction)(nil), + (*Route_NonForwardingAction)(nil), + } + file_envoy_config_route_v3_route_components_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*WeightedCluster_HeaderName)(nil), } file_envoy_config_route_v3_route_components_proto_msgTypes[4].OneofWrappers = []interface{}{ (*RouteMatch_Prefix)(nil), (*RouteMatch_Path)(nil), (*RouteMatch_SafeRegex)(nil), (*RouteMatch_ConnectMatcher_)(nil), - (*RouteMatch_HiddenEnvoyDeprecatedRegex)(nil), + (*RouteMatch_PathSeparatedPrefix)(nil), } file_envoy_config_route_v3_route_components_proto_msgTypes[5].OneofWrappers = []interface{}{ (*CorsPolicy_FilterEnabled)(nil), - (*CorsPolicy_HiddenEnvoyDeprecatedEnabled)(nil), } file_envoy_config_route_v3_route_components_proto_msgTypes[6].OneofWrappers = []interface{}{ (*RouteAction_Cluster)(nil), (*RouteAction_ClusterHeader)(nil), (*RouteAction_WeightedClusters)(nil), + (*RouteAction_ClusterSpecifierPlugin)(nil), (*RouteAction_HostRewriteLiteral)(nil), (*RouteAction_AutoHostRewrite)(nil), (*RouteAction_HostRewriteHeader)(nil), @@ -7858,7 +8094,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { (*RedirectAction_PrefixRewrite)(nil), (*RedirectAction_RegexRewrite)(nil), } - file_envoy_config_route_v3_route_components_proto_msgTypes[15].OneofWrappers = []interface{}{ + file_envoy_config_route_v3_route_components_proto_msgTypes[16].OneofWrappers = []interface{}{ (*HeaderMatcher_ExactMatch)(nil), (*HeaderMatcher_SafeRegexMatch)(nil), (*HeaderMatcher_RangeMatch)(nil), @@ -7866,28 +8102,29 @@ func file_envoy_config_route_v3_route_components_proto_init() { (*HeaderMatcher_PrefixMatch)(nil), (*HeaderMatcher_SuffixMatch)(nil), (*HeaderMatcher_ContainsMatch)(nil), - (*HeaderMatcher_HiddenEnvoyDeprecatedRegexMatch)(nil), + (*HeaderMatcher_StringMatch)(nil), } - file_envoy_config_route_v3_route_components_proto_msgTypes[16].OneofWrappers = []interface{}{ + file_envoy_config_route_v3_route_components_proto_msgTypes[17].OneofWrappers = []interface{}{ (*QueryParameterMatcher_StringMatch)(nil), (*QueryParameterMatcher_PresentMatch)(nil), } - file_envoy_config_route_v3_route_components_proto_msgTypes[29].OneofWrappers = []interface{}{ + file_envoy_config_route_v3_route_components_proto_msgTypes[22].OneofWrappers = []interface{}{ + (*WeightedCluster_ClusterWeight_HostRewriteLiteral)(nil), + } + file_envoy_config_route_v3_route_components_proto_msgTypes[28].OneofWrappers = []interface{}{ (*RouteAction_HashPolicy_Header_)(nil), (*RouteAction_HashPolicy_Cookie_)(nil), (*RouteAction_HashPolicy_ConnectionProperties_)(nil), (*RouteAction_HashPolicy_QueryParameter_)(nil), (*RouteAction_HashPolicy_FilterState_)(nil), } - file_envoy_config_route_v3_route_components_proto_msgTypes[38].OneofWrappers = []interface{}{ + file_envoy_config_route_v3_route_components_proto_msgTypes[37].OneofWrappers = []interface{}{ (*RetryPolicy_RetryPriority_TypedConfig)(nil), - (*RetryPolicy_RetryPriority_HiddenEnvoyDeprecatedConfig)(nil), } - file_envoy_config_route_v3_route_components_proto_msgTypes[39].OneofWrappers = []interface{}{ + file_envoy_config_route_v3_route_components_proto_msgTypes[38].OneofWrappers = []interface{}{ (*RetryPolicy_RetryHostPredicate_TypedConfig)(nil), - (*RetryPolicy_RetryHostPredicate_HiddenEnvoyDeprecatedConfig)(nil), } - file_envoy_config_route_v3_route_components_proto_msgTypes[43].OneofWrappers = []interface{}{ + file_envoy_config_route_v3_route_components_proto_msgTypes[42].OneofWrappers = []interface{}{ (*RateLimit_Action_SourceCluster_)(nil), (*RateLimit_Action_DestinationCluster_)(nil), (*RateLimit_Action_RequestHeaders_)(nil), @@ -7898,7 +8135,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { (*RateLimit_Action_Metadata)(nil), (*RateLimit_Action_Extension)(nil), } - file_envoy_config_route_v3_route_components_proto_msgTypes[44].OneofWrappers = []interface{}{ + file_envoy_config_route_v3_route_components_proto_msgTypes[43].OneofWrappers = []interface{}{ (*RateLimit_Override_DynamicMetadata_)(nil), } type x struct{} @@ -7907,7 +8144,7 @@ func file_envoy_config_route_v3_route_components_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_route_v3_route_components_proto_rawDesc, NumEnums: 6, - NumMessages: 54, + NumMessages: 53, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/route/v3/route_components.pb.validate.go b/pkg/api/envoy/config/route/v3/route_components.pb.validate.go index dccde26d69..0172b8ef13 100644 --- a/pkg/api/envoy/config/route/v3/route_components.pb.validate.go +++ b/pkg/api/envoy/config/route/v3/route_components.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/route/v3/route_components.proto -package envoy_config_route_v3 +package routev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,43 +33,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.RoutingPriority(0) - - _ = v3.RequestMethod(0) ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *VirtualHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on VirtualHost with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in VirtualHostMultiError, or +// nil if none found. +func (m *VirtualHost) ValidateAll() error { + return m.validate(true) +} + +func (m *VirtualHost) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetDomains()) < 1 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "Domains", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetDomains() { _, _ = idx, item if !_VirtualHost_Domains_Pattern.MatchString(item) { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: fmt.Sprintf("Domains[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } @@ -76,7 +102,26 @@ func (m *VirtualHost) Validate() error { for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -88,17 +133,69 @@ func (m *VirtualHost) Validate() error { } + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VirtualHostValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + if _, ok := VirtualHost_TlsRequirementType_name[int32(m.GetRequireTls())]; !ok { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "RequireTls", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetVirtualClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("VirtualClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("VirtualClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("VirtualClusters[%v]", idx), @@ -113,7 +210,26 @@ func (m *VirtualHost) Validate() error { for idx, item := range m.GetRateLimits() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("RateLimits[%v]", idx), @@ -126,16 +242,39 @@ func (m *VirtualHost) Validate() error { } if len(m.GetRequestHeadersToAdd()) > 1000 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -151,32 +290,63 @@ func (m *VirtualHost) Validate() error { _, _ = idx, item if utf8.RuneCountInString(item) < 1 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_VirtualHost_RequestHeadersToRemove_Pattern.MatchString(item) { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetResponseHeadersToAdd()) > 1000 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -192,22 +362,49 @@ func (m *VirtualHost) Validate() error { _, _ = idx, item if utf8.RuneCountInString(item) < 1 { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_VirtualHost_ResponseHeadersToRemove_Pattern.MatchString(item) { - return VirtualHostValidationError{ + err := VirtualHostValidationError{ field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCors()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "Cors", @@ -217,28 +414,76 @@ func (m *VirtualHost) Validate() error { } } - 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, + { + sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) + i := 0 + for key := range m.GetTypedPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedPerFilterConfig()[key] + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VirtualHostValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } - } + } } // no validation rules for IncludeRequestAttemptCount // no validation rules for IncludeAttemptCountInResponse - if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "RetryPolicy", @@ -248,7 +493,26 @@ func (m *VirtualHost) Validate() error { } } - if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "RetryPolicyTypedConfig", @@ -258,7 +522,26 @@ func (m *VirtualHost) Validate() error { } } - if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHedgePolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "HedgePolicy", @@ -268,7 +551,26 @@ func (m *VirtualHost) Validate() error { } } - if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ field: "PerRequestBufferLimitBytes", @@ -278,15 +580,32 @@ func (m *VirtualHost) Validate() error { } } - for key, val := range m.GetHiddenEnvoyDeprecatedPerFilterConfig() { - _ = val - - // no validation rules for HiddenEnvoyDeprecatedPerFilterConfig[key] + for idx, item := range m.GetRequestMirrorPolicies() { + _, _ = idx, item - if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualHostValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualHostValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedPerFilterConfig[%v]", key), + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), reason: "embedded message failed validation", cause: err, } @@ -295,9 +614,29 @@ func (m *VirtualHost) Validate() error { } + if len(errors) > 0 { + return VirtualHostMultiError(errors) + } + return nil } +// VirtualHostMultiError is an error wrapping multiple validation errors +// returned by VirtualHost.ValidateAll() if the designated constraints aren't met. +type VirtualHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VirtualHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VirtualHostMultiError) AllErrors() []error { return m } + // VirtualHostValidationError is the validation error returned by // VirtualHost.Validate if the designated constraints aren't met. type VirtualHostValidationError struct { @@ -359,14 +698,47 @@ var _VirtualHost_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\ var _VirtualHost_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") // Validate checks the field values on FilterAction with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterAction with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterActionMultiError, or +// nil if none found. +func (m *FilterAction) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterAction) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterActionValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterActionValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterActionValidationError{ field: "Action", @@ -376,9 +748,29 @@ func (m *FilterAction) Validate() error { } } + if len(errors) > 0 { + return FilterActionMultiError(errors) + } + return nil } +// FilterActionMultiError is an error wrapping multiple validation errors +// returned by FilterAction.ValidateAll() if the designated constraints aren't met. +type FilterActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterActionMultiError) AllErrors() []error { return m } + // FilterActionValidationError is the validation error returned by // FilterAction.Validate if the designated constraints aren't met. type FilterActionValidationError struct { @@ -434,22 +826,59 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name if m.GetMatch() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Match", @@ -459,7 +888,26 @@ func (m *Route) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Metadata", @@ -469,7 +917,26 @@ func (m *Route) Validate() error { } } - if v, ok := interface{}(m.GetDecorator()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDecorator()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Decorator", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Decorator", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDecorator()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Decorator", @@ -479,34 +946,86 @@ func (m *Route) Validate() error { } } - 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, + { + sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) + i := 0 + for key := range m.GetTypedPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedPerFilterConfig()[key] + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } - } + } } if len(m.GetRequestHeadersToAdd()) > 1000 { - return RouteValidationError{ + err := RouteValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -522,32 +1041,63 @@ func (m *Route) Validate() error { _, _ = idx, item if utf8.RuneCountInString(item) < 1 { - return RouteValidationError{ + err := RouteValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_Route_RequestHeadersToRemove_Pattern.MatchString(item) { - return RouteValidationError{ + err := RouteValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetResponseHeadersToAdd()) > 1000 { - return RouteValidationError{ + err := RouteValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -563,22 +1113,49 @@ func (m *Route) Validate() error { _, _ = idx, item if utf8.RuneCountInString(item) < 1 { - return RouteValidationError{ + err := RouteValidationError{ field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_Route_ResponseHeadersToRemove_Pattern.MatchString(item) { - return RouteValidationError{ + err := RouteValidationError{ field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTracing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Tracing", @@ -588,7 +1165,26 @@ func (m *Route) Validate() error { } } - if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "PerRequestBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "PerRequestBufferLimitBytes", @@ -598,28 +1194,30 @@ func (m *Route) Validate() error { } } - for key, val := range m.GetHiddenEnvoyDeprecatedPerFilterConfig() { - _ = val - - // no validation rules for HiddenEnvoyDeprecatedPerFilterConfig[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedPerFilterConfig[%v]", key), - 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 all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Route", @@ -631,7 +1229,26 @@ func (m *Route) Validate() error { case *Route_Redirect: - if v, ok := interface{}(m.GetRedirect()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRedirect()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Redirect", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Redirect", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirect()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Redirect", @@ -643,7 +1260,26 @@ func (m *Route) Validate() error { case *Route_DirectResponse: - if v, ok := interface{}(m.GetDirectResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDirectResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "DirectResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "DirectResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDirectResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "DirectResponse", @@ -655,7 +1291,26 @@ func (m *Route) Validate() error { case *Route_FilterAction: - if v, ok := interface{}(m.GetFilterAction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "FilterAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "FilterAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterAction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "FilterAction", @@ -665,17 +1320,72 @@ func (m *Route) Validate() error { } } + case *Route_NonForwardingAction: + + if all { + switch v := interface{}(m.GetNonForwardingAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "NonForwardingAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "NonForwardingAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNonForwardingAction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: "NonForwardingAction", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: - return RouteValidationError{ + err := RouteValidationError{ field: "Action", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteMultiError(errors) } return nil } +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + // RouteValidationError is the validation error returned by Route.Validate if // the designated constraints aren't met. type RouteValidationError struct { @@ -735,24 +1445,61 @@ var _Route_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") var _Route_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") // Validate checks the field values on WeightedCluster with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster) Validate() error { - if m == nil { - return nil - } + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// WeightedClusterMultiError, or nil if none found. +func (m *WeightedCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error if len(m.GetClusters()) < 1 { - return WeightedClusterValidationError{ + err := WeightedClusterValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -767,19 +1514,51 @@ func (m *WeightedCluster) Validate() error { if wrapper := m.GetTotalWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return WeightedClusterValidationError{ + err := WeightedClusterValidationError{ field: "TotalWeight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for RuntimeKeyPrefix + switch m.RandomValueSpecifier.(type) { + + case *WeightedCluster_HeaderName: + // no validation rules for HeaderName + + } + + if len(errors) > 0 { + return WeightedClusterMultiError(errors) + } + return nil } +// WeightedClusterMultiError is an error wrapping multiple validation errors +// returned by WeightedCluster.ValidateAll() if the designated constraints +// aren't met. +type WeightedClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedClusterMultiError) AllErrors() []error { return m } + // WeightedClusterValidationError is the validation error returned by // WeightedCluster.Validate if the designated constraints aren't met. type WeightedClusterValidationError struct { @@ -835,13 +1614,47 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCaseSensitive()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCaseSensitive()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "CaseSensitive", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "CaseSensitive", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCaseSensitive()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "CaseSensitive", @@ -851,7 +1664,26 @@ func (m *RouteMatch) Validate() error { } } - if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "RuntimeFraction", @@ -864,7 +1696,26 @@ func (m *RouteMatch) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -879,7 +1730,26 @@ func (m *RouteMatch) Validate() error { for idx, item := range m.GetQueryParameters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("QueryParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("QueryParameters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("QueryParameters[%v]", idx), @@ -891,7 +1761,26 @@ func (m *RouteMatch) Validate() error { } - if v, ok := interface{}(m.GetGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Grpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Grpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "Grpc", @@ -901,7 +1790,26 @@ func (m *RouteMatch) Validate() error { } } - if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "TlsContext", @@ -911,6 +1819,40 @@ func (m *RouteMatch) Validate() error { } } + for idx, item := range m.GetDynamicMetadata() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("DynamicMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("DynamicMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteMatchValidationError{ + field: fmt.Sprintf("DynamicMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + switch m.PathSpecifier.(type) { case *RouteMatch_Prefix: @@ -922,13 +1864,36 @@ func (m *RouteMatch) Validate() error { case *RouteMatch_SafeRegex: if m.GetSafeRegex() == nil { - return RouteMatchValidationError{ + err := RouteMatchValidationError{ field: "SafeRegex", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSafeRegex()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "SafeRegex", @@ -940,7 +1905,26 @@ func (m *RouteMatch) Validate() error { case *RouteMatch_ConnectMatcher_: - if v, ok := interface{}(m.GetConnectMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "ConnectMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "ConnectMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "ConnectMatcher", @@ -950,26 +1934,54 @@ func (m *RouteMatch) Validate() error { } } - case *RouteMatch_HiddenEnvoyDeprecatedRegex: + case *RouteMatch_PathSeparatedPrefix: - if len(m.GetHiddenEnvoyDeprecatedRegex()) > 1024 { - return RouteMatchValidationError{ - field: "HiddenEnvoyDeprecatedRegex", - reason: "value length must be at most 1024 bytes", + if !_RouteMatch_PathSeparatedPrefix_Pattern.MatchString(m.GetPathSeparatedPrefix()) { + err := RouteMatchValidationError{ + field: "PathSeparatedPrefix", + reason: "value does not match regex pattern \"^[^?#]+[^?#/]$\"", + } + if !all { + return err } + errors = append(errors, err) } default: - return RouteMatchValidationError{ + err := RouteMatchValidationError{ field: "PathSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteMatchMultiError(errors) } return nil } +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + // RouteMatchValidationError is the validation error returned by // RouteMatch.Validate if the designated constraints aren't met. type RouteMatchValidationError struct { @@ -1024,17 +2036,53 @@ var _ interface { ErrorName() string } = RouteMatchValidationError{} +var _RouteMatch_PathSeparatedPrefix_Pattern = regexp.MustCompile("^[^?#]+[^?#/]$") + // Validate checks the field values on CorsPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CorsPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CorsPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CorsPolicyMultiError, or +// nil if none found. +func (m *CorsPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *CorsPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetAllowOriginStringMatch() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), @@ -1054,7 +2102,26 @@ func (m *CorsPolicy) Validate() error { // no validation rules for MaxAge - if v, ok := interface{}(m.GetAllowCredentials()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "AllowCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "AllowCredentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowCredentials()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "AllowCredentials", @@ -1064,7 +2131,26 @@ func (m *CorsPolicy) Validate() error { } } - if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "ShadowEnabled", @@ -1074,38 +2160,33 @@ func (m *CorsPolicy) Validate() error { } } - for idx, item := range m.GetHiddenEnvoyDeprecatedAllowOriginRegex() { - _, _ = idx, item - - if len(item) > 1024 { - return CorsPolicyValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedAllowOriginRegex[%v]", idx), - reason: "value length must be at most 1024 bytes", - } - } - - } - switch m.EnabledSpecifier.(type) { 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, + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CorsPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *CorsPolicy_HiddenEnvoyDeprecatedEnabled: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedEnabled()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ - field: "HiddenEnvoyDeprecatedEnabled", + field: "FilterEnabled", reason: "embedded message failed validation", cause: err, } @@ -1114,9 +2195,29 @@ func (m *CorsPolicy) Validate() error { } + if len(errors) > 0 { + return CorsPolicyMultiError(errors) + } + return nil } +// CorsPolicyMultiError is an error wrapping multiple validation errors +// returned by CorsPolicy.ValidateAll() if the designated constraints aren't met. +type CorsPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CorsPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CorsPolicyMultiError) AllErrors() []error { return m } + // CorsPolicyValidationError is the validation error returned by // CorsPolicy.Validate if the designated constraints aren't met. type CorsPolicyValidationError struct { @@ -1172,21 +2273,58 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := RouteAction_ClusterNotFoundResponseCode_name[int32(m.GetClusterNotFoundResponseCode())]; !ok { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterNotFoundResponseCode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MetadataMatch", @@ -1197,13 +2335,36 @@ func (m *RouteAction) Validate() error { } if !_RouteAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "PrefixRewrite", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRegexRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "RegexRewrite", @@ -1213,7 +2374,28 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + // no validation rules for AppendXForwardedHost + + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "Timeout", @@ -1223,7 +2405,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "IdleTimeout", @@ -1233,7 +2434,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "RetryPolicy", @@ -1243,7 +2463,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "RetryPolicyTypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "RetryPolicyTypedConfig", @@ -1256,7 +2495,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetRequestMirrorPolicies() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), @@ -1269,16 +2527,39 @@ func (m *RouteAction) Validate() error { } if _, ok := v3.RoutingPriority_name[int32(m.GetPriority())]; !ok { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "Priority", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRateLimits() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("RateLimits[%v]", idx), @@ -1290,7 +2571,26 @@ func (m *RouteAction) Validate() error { } - if v, ok := interface{}(m.GetIncludeVhRateLimits()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIncludeVhRateLimits()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IncludeVhRateLimits", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "IncludeVhRateLimits", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIncludeVhRateLimits()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "IncludeVhRateLimits", @@ -1303,7 +2603,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetHashPolicy() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("HashPolicy[%v]", idx), @@ -1315,7 +2634,26 @@ func (m *RouteAction) Validate() error { } - if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCors()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "Cors", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "Cors", @@ -1325,7 +2663,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetMaxGrpcTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxGrpcTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxGrpcTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxGrpcTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxGrpcTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MaxGrpcTimeout", @@ -1335,7 +2692,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetGrpcTimeoutOffset()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcTimeoutOffset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "GrpcTimeoutOffset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "GrpcTimeoutOffset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcTimeoutOffset()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "GrpcTimeoutOffset", @@ -1348,7 +2724,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetUpgradeConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("UpgradeConfigs[%v]", idx), @@ -1360,7 +2755,26 @@ func (m *RouteAction) Validate() error { } - if v, ok := interface{}(m.GetInternalRedirectPolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInternalRedirectPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "InternalRedirectPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "InternalRedirectPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInternalRedirectPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "InternalRedirectPolicy", @@ -1372,7 +2786,26 @@ func (m *RouteAction) Validate() error { // no validation rules for InternalRedirectAction - if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxInternalRedirects()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxInternalRedirects", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxInternalRedirects", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MaxInternalRedirects", @@ -1382,7 +2815,26 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHedgePolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "HedgePolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "HedgePolicy", @@ -1392,20 +2844,29 @@ func (m *RouteAction) Validate() error { } } - if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(m.GetMaxStreamDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedRequestMirrorPolicy()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ - field: "HiddenEnvoyDeprecatedRequestMirrorPolicy", + field: "MaxStreamDuration", reason: "embedded message failed validation", cause: err, } @@ -1417,31 +2878,62 @@ func (m *RouteAction) Validate() error { case *RouteAction_Cluster: if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "Cluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_ClusterHeader: if utf8.RuneCountInString(m.GetClusterHeader()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterHeader", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterHeader", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "WeightedClusters", @@ -1451,11 +2943,18 @@ func (m *RouteAction) Validate() error { } } + case *RouteAction_ClusterSpecifierPlugin: + // no validation rules for ClusterSpecifierPlugin + default: - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } @@ -1464,15 +2963,38 @@ func (m *RouteAction) Validate() error { case *RouteAction_HostRewriteLiteral: if !_RouteAction_HostRewriteLiteral_Pattern.MatchString(m.GetHostRewriteLiteral()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "HostRewriteLiteral", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_AutoHostRewrite: - if v, ok := interface{}(m.GetAutoHostRewrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAutoHostRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "AutoHostRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "AutoHostRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAutoHostRewrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "AutoHostRewrite", @@ -1485,15 +3007,38 @@ func (m *RouteAction) Validate() error { case *RouteAction_HostRewriteHeader: if !_RouteAction_HostRewriteHeader_Pattern.MatchString(m.GetHostRewriteHeader()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "HostRewriteHeader", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_HostRewritePathRegex: - if v, ok := interface{}(m.GetHostRewritePathRegex()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHostRewritePathRegex()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "HostRewritePathRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "HostRewritePathRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHostRewritePathRegex()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "HostRewritePathRegex", @@ -1505,9 +3050,29 @@ func (m *RouteAction) Validate() error { } + if len(errors) > 0 { + return RouteActionMultiError(errors) + } + return nil } +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + // RouteActionValidationError is the validation error returned by // RouteAction.Validate if the designated constraints aren't met. type RouteActionValidationError struct { @@ -1571,16 +3136,49 @@ var _RouteAction_HostRewriteLiteral_Pattern = regexp.MustCompile("^[^\x00\n\r]*$ var _RouteAction_HostRewriteHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") // Validate checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RetryPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RetryPolicyMultiError, or +// nil if none found. +func (m *RetryPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for RetryOn - if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNumRetries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "NumRetries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "NumRetries", @@ -1590,7 +3188,26 @@ func (m *RetryPolicy) Validate() error { } } - if v, ok := interface{}(m.GetPerTryTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerTryTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "PerTryTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "PerTryTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerTryTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "PerTryTimeout", @@ -1600,7 +3217,55 @@ func (m *RetryPolicy) Validate() error { } } - if v, ok := interface{}(m.GetRetryPriority()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPerTryIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "PerTryIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "PerTryIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPerTryIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RetryPolicyValidationError{ + field: "PerTryIdleTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRetryPriority()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryPriority", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryPriority", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPriority()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryPriority", @@ -1613,7 +3278,26 @@ func (m *RetryPolicy) Validate() error { for idx, item := range m.GetRetryHostPredicate() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetryHostPredicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetryHostPredicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetryHostPredicate[%v]", idx), @@ -1625,9 +3309,62 @@ func (m *RetryPolicy) Validate() error { } + for idx, item := range m.GetRetryOptionsPredicates() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetryOptionsPredicates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetryOptionsPredicates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RetryPolicyValidationError{ + field: fmt.Sprintf("RetryOptionsPredicates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + // no validation rules for HostSelectionRetryMaxAttempts - if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRetryBackOff()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryBackOff", @@ -1637,7 +3374,26 @@ func (m *RetryPolicy) Validate() error { } } - if v, ok := interface{}(m.GetRateLimitedRetryBackOff()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitedRetryBackOff()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RateLimitedRetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: "RateLimitedRetryBackOff", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitedRetryBackOff()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RateLimitedRetryBackOff", @@ -1650,7 +3406,26 @@ func (m *RetryPolicy) Validate() error { for idx, item := range m.GetRetriableHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetriableHeaders[%v]", idx), @@ -1665,7 +3440,26 @@ func (m *RetryPolicy) Validate() error { for idx, item := range m.GetRetriableRequestHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicyValidationError{ + field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), @@ -1677,9 +3471,29 @@ func (m *RetryPolicy) Validate() error { } + if len(errors) > 0 { + return RetryPolicyMultiError(errors) + } + return nil } +// RetryPolicyMultiError is an error wrapping multiple validation errors +// returned by RetryPolicy.ValidateAll() if the designated constraints aren't met. +type RetryPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicyMultiError) AllErrors() []error { return m } + // RetryPolicyValidationError is the validation error returned by // RetryPolicy.Validate if the designated constraints aren't met. type RetryPolicyValidationError struct { @@ -1735,25 +3549,62 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HedgePolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HedgePolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HedgePolicyMultiError, or +// nil if none found. +func (m *HedgePolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *HedgePolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetInitialRequests(); wrapper != nil { if wrapper.GetValue() < 1 { - return HedgePolicyValidationError{ + err := HedgePolicyValidationError{ field: "InitialRequests", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetAdditionalRequestChance()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdditionalRequestChance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HedgePolicyValidationError{ + field: "AdditionalRequestChance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HedgePolicyValidationError{ + field: "AdditionalRequestChance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdditionalRequestChance()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HedgePolicyValidationError{ field: "AdditionalRequestChance", @@ -1765,9 +3616,29 @@ func (m *HedgePolicy) Validate() error { // no validation rules for HedgeOnPerTryTimeout + if len(errors) > 0 { + return HedgePolicyMultiError(errors) + } + return nil } +// HedgePolicyMultiError is an error wrapping multiple validation errors +// returned by HedgePolicy.ValidateAll() if the designated constraints aren't met. +type HedgePolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HedgePolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HedgePolicyMultiError) AllErrors() []error { return m } + // HedgePolicyValidationError is the validation error returned by // HedgePolicy.Validate if the designated constraints aren't met. type HedgePolicyValidationError struct { @@ -1823,27 +3694,49 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RedirectAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedirectAction with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RedirectActionMultiError, +// or nil if none found. +func (m *RedirectAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RedirectAction) validate(all bool) error { if m == nil { return nil } + var errors []error + if !_RedirectAction_HostRedirect_Pattern.MatchString(m.GetHostRedirect()) { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "HostRedirect", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for PortRedirect if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "ResponseCode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for StripQuery @@ -1863,24 +3756,51 @@ func (m *RedirectAction) Validate() error { case *RedirectAction_PathRedirect: if !_RedirectAction_PathRedirect_Pattern.MatchString(m.GetPathRedirect()) { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "PathRedirect", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RedirectAction_PrefixRewrite: if !_RedirectAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - return RedirectActionValidationError{ + err := RedirectActionValidationError{ field: "PrefixRewrite", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } case *RedirectAction_RegexRewrite: - if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRegexRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedirectActionValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedirectActionValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedirectActionValidationError{ field: "RegexRewrite", @@ -1892,9 +3812,30 @@ func (m *RedirectAction) Validate() error { } + if len(errors) > 0 { + return RedirectActionMultiError(errors) + } + return nil } +// RedirectActionMultiError is an error wrapping multiple validation errors +// returned by RedirectAction.ValidateAll() if the designated constraints +// aren't met. +type RedirectActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedirectActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedirectActionMultiError) AllErrors() []error { return m } + // RedirectActionValidationError is the validation error returned by // RedirectAction.Validate if the designated constraints aren't met. type RedirectActionValidationError struct { @@ -1957,20 +3898,57 @@ 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DirectResponseAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DirectResponseAction with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DirectResponseActionMultiError, or nil if none found. +func (m *DirectResponseAction) ValidateAll() error { + return m.validate(true) +} + +func (m *DirectResponseAction) validate(all bool) error { if m == nil { return nil } - if val := m.GetStatus(); val < 100 || val >= 600 { - return DirectResponseActionValidationError{ + var errors []error + + if val := m.GetStatus(); val < 200 || val >= 600 { + err := DirectResponseActionValidationError{ field: "Status", - reason: "value must be inside range [100, 600)", + reason: "value must be inside range [200, 600)", + } + if !all { + return err } + errors = append(errors, err) } - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DirectResponseActionValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DirectResponseActionValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DirectResponseActionValidationError{ field: "Body", @@ -1980,9 +3958,30 @@ func (m *DirectResponseAction) Validate() error { } } + if len(errors) > 0 { + return DirectResponseActionMultiError(errors) + } + return nil } +// DirectResponseActionMultiError is an error wrapping multiple validation +// errors returned by DirectResponseAction.ValidateAll() if the designated +// constraints aren't met. +type DirectResponseActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DirectResponseActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DirectResponseActionMultiError) AllErrors() []error { return m } + // DirectResponseActionValidationError is the validation error returned by // DirectResponseAction.Validate if the designated constraints aren't met. type DirectResponseActionValidationError struct { @@ -2039,21 +4038,161 @@ var _ interface { ErrorName() string } = DirectResponseActionValidationError{} +// Validate checks the field values on NonForwardingAction with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *NonForwardingAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NonForwardingAction with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// NonForwardingActionMultiError, or nil if none found. +func (m *NonForwardingAction) ValidateAll() error { + return m.validate(true) +} + +func (m *NonForwardingAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return NonForwardingActionMultiError(errors) + } + + return nil +} + +// NonForwardingActionMultiError is an error wrapping multiple validation +// errors returned by NonForwardingAction.ValidateAll() if the designated +// constraints aren't met. +type NonForwardingActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NonForwardingActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NonForwardingActionMultiError) AllErrors() []error { return m } + +// NonForwardingActionValidationError is the validation error returned by +// NonForwardingAction.Validate if the designated constraints aren't met. +type NonForwardingActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e NonForwardingActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e NonForwardingActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e NonForwardingActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e NonForwardingActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e NonForwardingActionValidationError) ErrorName() string { + return "NonForwardingActionValidationError" +} + +// Error satisfies the builtin error interface +func (e NonForwardingActionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sNonForwardingAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = NonForwardingActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = NonForwardingActionValidationError{} + // Validate checks the field values on Decorator with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Decorator) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decorator with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DecoratorMultiError, or nil +// if none found. +func (m *Decorator) ValidateAll() error { + return m.validate(true) +} + +func (m *Decorator) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetOperation()) < 1 { - return DecoratorValidationError{ + err := DecoratorValidationError{ field: "Operation", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPropagate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPropagate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecoratorValidationError{ + field: "Propagate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecoratorValidationError{ + field: "Propagate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPropagate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DecoratorValidationError{ field: "Propagate", @@ -2063,9 +4202,29 @@ func (m *Decorator) Validate() error { } } + if len(errors) > 0 { + return DecoratorMultiError(errors) + } + return nil } +// DecoratorMultiError is an error wrapping multiple validation errors returned +// by Decorator.ValidateAll() if the designated constraints aren't met. +type DecoratorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DecoratorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DecoratorMultiError) AllErrors() []error { return m } + // DecoratorValidationError is the validation error returned by // Decorator.Validate if the designated constraints aren't met. type DecoratorValidationError struct { @@ -2121,13 +4280,46 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Tracing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tracing with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TracingMultiError, or nil if none found. +func (m *Tracing) ValidateAll() error { + return m.validate(true) +} + +func (m *Tracing) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetClientSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "ClientSampling", @@ -2137,7 +4329,26 @@ func (m *Tracing) Validate() error { } } - if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRandomSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "RandomSampling", @@ -2147,7 +4358,26 @@ func (m *Tracing) Validate() error { } } - if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOverallSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "OverallSampling", @@ -2160,7 +4390,26 @@ func (m *Tracing) Validate() error { for idx, item := range m.GetCustomTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: fmt.Sprintf("CustomTags[%v]", idx), @@ -2172,9 +4421,29 @@ func (m *Tracing) Validate() error { } + if len(errors) > 0 { + return TracingMultiError(errors) + } + return nil } +// TracingMultiError is an error wrapping multiple validation errors returned +// by Tracing.ValidateAll() if the designated constraints aren't met. +type TracingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TracingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TracingMultiError) AllErrors() []error { return m } + // TracingValidationError is the validation error returned by Tracing.Validate // if the designated constraints aren't met. type TracingValidationError struct { @@ -2230,17 +4499,50 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *VirtualCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on VirtualCluster with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in VirtualClusterMultiError, +// or nil if none found. +func (m *VirtualCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *VirtualCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VirtualClusterValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VirtualClusterValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VirtualClusterValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -2253,24 +4555,40 @@ func (m *VirtualCluster) Validate() error { } if utf8.RuneCountInString(m.GetName()) < 1 { - return VirtualClusterValidationError{ + err := VirtualClusterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } - } - - if len(m.GetHiddenEnvoyDeprecatedPattern()) > 1024 { - return VirtualClusterValidationError{ - field: "HiddenEnvoyDeprecatedPattern", - reason: "value length must be at most 1024 bytes", + if !all { + return err } + errors = append(errors, err) } - // no validation rules for HiddenEnvoyDeprecatedMethod + if len(errors) > 0 { + return VirtualClusterMultiError(errors) + } return nil } +// VirtualClusterMultiError is an error wrapping multiple validation errors +// returned by VirtualCluster.ValidateAll() if the designated constraints +// aren't met. +type VirtualClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VirtualClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VirtualClusterMultiError) AllErrors() []error { return m } + // VirtualClusterValidationError is the validation error returned by // VirtualCluster.Validate if the designated constraints aren't met. type VirtualClusterValidationError struct { @@ -2326,19 +4644,38 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetStage(); wrapper != nil { if wrapper.GetValue() > 10 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Stage", reason: "value must be less than or equal to 10", } + if !all { + return err + } + errors = append(errors, err) } } @@ -2346,16 +4683,39 @@ func (m *RateLimit) Validate() error { // no validation rules for DisableKey if len(m.GetActions()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Actions", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetActions() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: fmt.Sprintf("Actions[%v]", idx), @@ -2367,7 +4727,26 @@ func (m *RateLimit) Validate() error { } - if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Limit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Limit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "Limit", @@ -2377,9 +4756,29 @@ func (m *RateLimit) Validate() error { } } + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { @@ -2435,25 +4834,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HeaderMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderMatcherMultiError, or +// nil if none found. +func (m *HeaderMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_HeaderMatcher_Name_Pattern.MatchString(m.GetName()) { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "Name", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for InvertMatch @@ -2465,7 +4886,26 @@ func (m *HeaderMatcher) Validate() error { case *HeaderMatcher_SafeRegexMatch: - if v, ok := interface{}(m.GetSafeRegexMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSafeRegexMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "SafeRegexMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "SafeRegexMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSafeRegexMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMatcherValidationError{ field: "SafeRegexMatch", @@ -2477,7 +4917,26 @@ func (m *HeaderMatcher) Validate() error { case *HeaderMatcher_RangeMatch: - if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRangeMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMatcherValidationError{ field: "RangeMatch", @@ -2493,44 +4952,99 @@ func (m *HeaderMatcher) Validate() error { case *HeaderMatcher_PrefixMatch: if utf8.RuneCountInString(m.GetPrefixMatch()) < 1 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "PrefixMatch", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *HeaderMatcher_SuffixMatch: if utf8.RuneCountInString(m.GetSuffixMatch()) < 1 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "SuffixMatch", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *HeaderMatcher_ContainsMatch: if utf8.RuneCountInString(m.GetContainsMatch()) < 1 { - return HeaderMatcherValidationError{ + err := HeaderMatcherValidationError{ field: "ContainsMatch", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - case *HeaderMatcher_HiddenEnvoyDeprecatedRegexMatch: + case *HeaderMatcher_StringMatch: - if len(m.GetHiddenEnvoyDeprecatedRegexMatch()) > 1024 { - return HeaderMatcherValidationError{ - field: "HiddenEnvoyDeprecatedRegexMatch", - reason: "value length must be at most 1024 bytes", + if all { + switch v := interface{}(m.GetStringMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + } } } } + if len(errors) > 0 { + return HeaderMatcherMultiError(errors) + } + return nil } +// HeaderMatcherMultiError is an error wrapping multiple validation errors +// returned by HeaderMatcher.ValidateAll() if the designated constraints +// aren't met. +type HeaderMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMatcherMultiError) AllErrors() []error { return m } + // HeaderMatcherValidationError is the validation error returned by // HeaderMatcher.Validate if the designated constraints aren't met. type HeaderMatcherValidationError struct { @@ -2589,36 +5103,46 @@ 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *QueryParameterMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QueryParameterMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QueryParameterMatcherMultiError, or nil if none found. +func (m *QueryParameterMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *QueryParameterMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return QueryParameterMatcherValidationError{ + err := QueryParameterMatcherValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetName()) > 1024 { - return QueryParameterMatcherValidationError{ + err := QueryParameterMatcherValidationError{ field: "Name", reason: "value length must be at most 1024 bytes", } - } - - // no validation rules for HiddenEnvoyDeprecatedValue - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QueryParameterMatcherValidationError{ - field: "HiddenEnvoyDeprecatedRegex", - reason: "embedded message failed validation", - cause: err, - } + if !all { + return err } + errors = append(errors, err) } switch m.QueryParameterMatchSpecifier.(type) { @@ -2626,13 +5150,36 @@ func (m *QueryParameterMatcher) Validate() error { case *QueryParameterMatcher_StringMatch: if m.GetStringMatch() == nil { - return QueryParameterMatcherValidationError{ + err := QueryParameterMatcherValidationError{ field: "StringMatch", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStringMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QueryParameterMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QueryParameterMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryParameterMatcherValidationError{ field: "StringMatch", @@ -2647,9 +5194,30 @@ func (m *QueryParameterMatcher) Validate() error { } + if len(errors) > 0 { + return QueryParameterMatcherMultiError(errors) + } + return nil } +// QueryParameterMatcherMultiError is an error wrapping multiple validation +// errors returned by QueryParameterMatcher.ValidateAll() if the designated +// constraints aren't met. +type QueryParameterMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QueryParameterMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QueryParameterMatcherMultiError) AllErrors() []error { return m } + // QueryParameterMatcherValidationError is the validation error returned by // QueryParameterMatcher.Validate if the designated constraints aren't met. type QueryParameterMatcherValidationError struct { @@ -2708,13 +5276,46 @@ var _ interface { // Validate checks the field values on InternalRedirectPolicy with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *InternalRedirectPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InternalRedirectPolicy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// InternalRedirectPolicyMultiError, or nil if none found. +func (m *InternalRedirectPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *InternalRedirectPolicy) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxInternalRedirects()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InternalRedirectPolicyValidationError{ + field: "MaxInternalRedirects", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InternalRedirectPolicyValidationError{ + field: "MaxInternalRedirects", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return InternalRedirectPolicyValidationError{ field: "MaxInternalRedirects", @@ -2725,35 +5326,211 @@ func (m *InternalRedirectPolicy) Validate() error { } if len(m.GetRedirectResponseCodes()) > 5 { - return InternalRedirectPolicyValidationError{ + err := InternalRedirectPolicyValidationError{ field: "RedirectResponseCodes", reason: "value must contain no more than 5 item(s)", } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPredicates() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InternalRedirectPolicyValidationError{ + field: fmt.Sprintf("Predicates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InternalRedirectPolicyValidationError{ + field: fmt.Sprintf("Predicates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InternalRedirectPolicyValidationError{ + field: fmt.Sprintf("Predicates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for AllowCrossSchemeRedirect + + if len(errors) > 0 { + return InternalRedirectPolicyMultiError(errors) + } + + return nil +} + +// InternalRedirectPolicyMultiError is an error wrapping multiple validation +// errors returned by InternalRedirectPolicy.ValidateAll() if the designated +// constraints aren't met. +type InternalRedirectPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InternalRedirectPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InternalRedirectPolicyMultiError) AllErrors() []error { return m } + +// InternalRedirectPolicyValidationError is the validation error returned by +// InternalRedirectPolicy.Validate if the designated constraints aren't met. +type InternalRedirectPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InternalRedirectPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InternalRedirectPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InternalRedirectPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InternalRedirectPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InternalRedirectPolicyValidationError) ErrorName() string { + return "InternalRedirectPolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e InternalRedirectPolicyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInternalRedirectPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InternalRedirectPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InternalRedirectPolicyValidationError{} + +// Validate checks the field values on FilterConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { + if m == nil { + return nil } - for idx, item := range m.GetPredicates() { - _, _ = idx, item + var errors []error - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return InternalRedirectPolicyValidationError{ - field: fmt.Sprintf("Predicates[%v]", idx), + errors = append(errors, FilterConfigValidationError{ + field: "Config", reason: "embedded message failed validation", cause: err, - } + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, } } - } - // no validation rules for AllowCrossSchemeRedirect + // no validation rules for IsOptional + + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } return nil } -// InternalRedirectPolicyValidationError is the validation error returned by -// InternalRedirectPolicy.Validate if the designated constraints aren't met. -type InternalRedirectPolicyValidationError struct { +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + +// FilterConfigValidationError is the validation error returned by +// FilterConfig.Validate if the designated constraints aren't met. +type FilterConfigValidationError struct { field string reason string cause error @@ -2761,24 +5538,22 @@ type InternalRedirectPolicyValidationError struct { } // Field function returns field value. -func (e InternalRedirectPolicyValidationError) Field() string { return e.field } +func (e FilterConfigValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e InternalRedirectPolicyValidationError) Reason() string { return e.reason } +func (e FilterConfigValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e InternalRedirectPolicyValidationError) Cause() error { return e.cause } +func (e FilterConfigValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e InternalRedirectPolicyValidationError) Key() bool { return e.key } +func (e FilterConfigValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e InternalRedirectPolicyValidationError) ErrorName() string { - return "InternalRedirectPolicyValidationError" -} +func (e FilterConfigValidationError) ErrorName() string { return "FilterConfigValidationError" } // Error satisfies the builtin error interface -func (e InternalRedirectPolicyValidationError) Error() string { +func (e FilterConfigValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2790,14 +5565,14 @@ func (e InternalRedirectPolicyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sInternalRedirectPolicy.%s: %s%s", + "invalid %sFilterConfig.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = InternalRedirectPolicyValidationError{} +var _ error = FilterConfigValidationError{} var _ interface { Field() string @@ -2805,24 +5580,63 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = InternalRedirectPolicyValidationError{} +} = FilterConfigValidationError{} // Validate checks the field values on WeightedCluster_ClusterWeight with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster_ClusterWeight) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster_ClusterWeight with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// WeightedCluster_ClusterWeightMultiError, or nil if none found. +func (m *WeightedCluster_ClusterWeight) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster_ClusterWeight) validate(all bool) error { if m == nil { return nil } - if utf8.RuneCountInString(m.GetName()) < 1 { - return WeightedCluster_ClusterWeightValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", + var errors []error + + // no validation rules for Name + + if !_WeightedCluster_ClusterWeight_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { + err := WeightedCluster_ClusterWeightValidationError{ + field: "ClusterHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err } + errors = append(errors, err) } - if v, ok := interface{}(m.GetWeight()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeight()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "Weight", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "Weight", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeight()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: "Weight", @@ -2832,7 +5646,26 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: "MetadataMatch", @@ -2843,16 +5676,39 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } if len(m.GetRequestHeadersToAdd()) > 1000 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -2868,25 +5724,52 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { _, _ = idx, item if !_WeightedCluster_ClusterWeight_RequestHeadersToRemove_Pattern.MatchString(item) { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetResponseHeadersToAdd()) > 1000 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -2902,51 +5785,105 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { _, _ = idx, item if !_WeightedCluster_ClusterWeight_ResponseHeadersToRemove_Pattern.MatchString(item) { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } - } + if !all { + return err + } + errors = append(errors, err) + } + + } + + { + sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) + i := 0 + for key := range m.GetTypedPerFilterConfig() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetTypedPerFilterConfig()[key] + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + } } - for key, val := range m.GetTypedPerFilterConfig() { - _ = val + switch m.HostRewriteSpecifier.(type) { - // no validation rules for TypedPerFilterConfig[key] + case *WeightedCluster_ClusterWeight_HostRewriteLiteral: - 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, - } + if !_WeightedCluster_ClusterWeight_HostRewriteLiteral_Pattern.MatchString(m.GetHostRewriteLiteral()) { + err := WeightedCluster_ClusterWeightValidationError{ + field: "HostRewriteLiteral", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } } - for key, val := range m.GetHiddenEnvoyDeprecatedPerFilterConfig() { - _ = val + if len(errors) > 0 { + return WeightedCluster_ClusterWeightMultiError(errors) + } - // no validation rules for HiddenEnvoyDeprecatedPerFilterConfig[key] + return nil +} - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } +// WeightedCluster_ClusterWeightMultiError is an error wrapping multiple +// validation errors returned by WeightedCluster_ClusterWeight.ValidateAll() +// if the designated constraints aren't met. +type WeightedCluster_ClusterWeightMultiError []error +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedCluster_ClusterWeightMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) } - - return nil + return strings.Join(msgs, "; ") } +// AllErrors returns a list of validation violation errors. +func (m WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } + // WeightedCluster_ClusterWeightValidationError is the validation error // returned by WeightedCluster_ClusterWeight.Validate if the designated // constraints aren't met. @@ -3004,21 +5941,62 @@ var _ interface { ErrorName() string } = WeightedCluster_ClusterWeightValidationError{} +var _WeightedCluster_ClusterWeight_ClusterHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + var _WeightedCluster_ClusterWeight_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") var _WeightedCluster_ClusterWeight_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") +var _WeightedCluster_ClusterWeight_HostRewriteLiteral_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + // Validate checks the field values on RouteMatch_GrpcRouteMatchOptions with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RouteMatch_GrpcRouteMatchOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch_GrpcRouteMatchOptions with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteMatch_GrpcRouteMatchOptionsMultiError, or nil if none found. +func (m *RouteMatch_GrpcRouteMatchOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch_GrpcRouteMatchOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RouteMatch_GrpcRouteMatchOptionsMultiError(errors) + } + return nil } +// RouteMatch_GrpcRouteMatchOptionsMultiError is an error wrapping multiple +// validation errors returned by +// RouteMatch_GrpcRouteMatchOptions.ValidateAll() if the designated +// constraints aren't met. +type RouteMatch_GrpcRouteMatchOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatch_GrpcRouteMatchOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatch_GrpcRouteMatchOptionsMultiError) AllErrors() []error { return m } + // RouteMatch_GrpcRouteMatchOptionsValidationError is the validation error // returned by RouteMatch_GrpcRouteMatchOptions.Validate if the designated // constraints aren't met. @@ -3078,13 +6056,47 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RouteMatch_TlsContextMatchOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch_TlsContextMatchOptions +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RouteMatch_TlsContextMatchOptionsMultiError, or nil if none found. +func (m *RouteMatch_TlsContextMatchOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch_TlsContextMatchOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPresented()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPresented()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Presented", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Presented", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPresented()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatch_TlsContextMatchOptionsValidationError{ field: "Presented", @@ -3094,7 +6106,26 @@ func (m *RouteMatch_TlsContextMatchOptions) Validate() error { } } - if v, ok := interface{}(m.GetValidated()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Validated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ + field: "Validated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidated()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatch_TlsContextMatchOptionsValidationError{ field: "Validated", @@ -3104,9 +6135,31 @@ func (m *RouteMatch_TlsContextMatchOptions) Validate() error { } } + if len(errors) > 0 { + return RouteMatch_TlsContextMatchOptionsMultiError(errors) + } + return nil } +// RouteMatch_TlsContextMatchOptionsMultiError is an error wrapping multiple +// validation errors returned by +// RouteMatch_TlsContextMatchOptions.ValidateAll() if the designated +// constraints aren't met. +type RouteMatch_TlsContextMatchOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatch_TlsContextMatchOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatch_TlsContextMatchOptionsMultiError) AllErrors() []error { return m } + // RouteMatch_TlsContextMatchOptionsValidationError is the validation error // returned by RouteMatch_TlsContextMatchOptions.Validate if the designated // constraints aren't met. @@ -3166,15 +6219,50 @@ var _ interface { // Validate checks the field values on RouteMatch_ConnectMatcher with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteMatch_ConnectMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch_ConnectMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteMatch_ConnectMatcherMultiError, or nil if none found. +func (m *RouteMatch_ConnectMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch_ConnectMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RouteMatch_ConnectMatcherMultiError(errors) + } + return nil } +// RouteMatch_ConnectMatcherMultiError is an error wrapping multiple validation +// errors returned by RouteMatch_ConnectMatcher.ValidateAll() if the +// designated constraints aren't met. +type RouteMatch_ConnectMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatch_ConnectMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatch_ConnectMatcherMultiError) AllErrors() []error { return m } + // RouteMatch_ConnectMatcherValidationError is the validation error returned by // RouteMatch_ConnectMatcher.Validate if the designated constraints aren't met. type RouteMatch_ConnectMatcherValidationError struct { @@ -3233,20 +6321,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_RequestMirrorPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_RequestMirrorPolicy with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_RequestMirrorPolicyMultiError, or nil if none found. +func (m *RouteAction_RequestMirrorPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_RequestMirrorPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteAction_RequestMirrorPolicyValidationError{ + err := RouteAction_RequestMirrorPolicyValidationError{ field: "Cluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_RequestMirrorPolicyValidationError{ field: "RuntimeFraction", @@ -3256,7 +6381,26 @@ func (m *RouteAction_RequestMirrorPolicy) Validate() error { } } - if v, ok := interface{}(m.GetTraceSampled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTraceSampled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "TraceSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "TraceSampled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTraceSampled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_RequestMirrorPolicyValidationError{ field: "TraceSampled", @@ -3266,11 +6410,30 @@ func (m *RouteAction_RequestMirrorPolicy) Validate() error { } } - // no validation rules for HiddenEnvoyDeprecatedRuntimeKey + if len(errors) > 0 { + return RouteAction_RequestMirrorPolicyMultiError(errors) + } return nil } +// RouteAction_RequestMirrorPolicyMultiError is an error wrapping multiple +// validation errors returned by RouteAction_RequestMirrorPolicy.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_RequestMirrorPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_RequestMirrorPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_RequestMirrorPolicyMultiError) AllErrors() []error { return m } + // RouteAction_RequestMirrorPolicyValidationError is the validation error // returned by RouteAction_RequestMirrorPolicy.Validate if the designated // constraints aren't met. @@ -3330,19 +6493,52 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicyMultiError, or nil if none found. +func (m *RouteAction_HashPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Terminal switch m.PolicySpecifier.(type) { case *RouteAction_HashPolicy_Header_: - if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Header", @@ -3354,7 +6550,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_Cookie_: - if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCookie()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Cookie", @@ -3366,7 +6581,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_ConnectionProperties_: - if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectionProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "ConnectionProperties", @@ -3378,7 +6612,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_QueryParameter_: - if v, ok := interface{}(m.GetQueryParameter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetQueryParameter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "QueryParameter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "QueryParameter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQueryParameter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "QueryParameter", @@ -3390,7 +6643,26 @@ func (m *RouteAction_HashPolicy) Validate() error { case *RouteAction_HashPolicy_FilterState_: - if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "FilterState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicyValidationError{ + field: "FilterState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "FilterState", @@ -3401,16 +6673,41 @@ func (m *RouteAction_HashPolicy) Validate() error { } default: - return RouteAction_HashPolicyValidationError{ + err := RouteAction_HashPolicyValidationError{ field: "PolicySpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteAction_HashPolicyMultiError(errors) } return nil } +// RouteAction_HashPolicyMultiError is an error wrapping multiple validation +// errors returned by RouteAction_HashPolicy.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicyMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicyValidationError is the validation error returned by // RouteAction_HashPolicy.Validate if the designated constraints aren't met. type RouteAction_HashPolicyValidationError struct { @@ -3469,27 +6766,68 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_UpgradeConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_UpgradeConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteAction_UpgradeConfigMultiError, or nil if none found. +func (m *RouteAction_UpgradeConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_UpgradeConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetUpgradeType()) < 1 { - return RouteAction_UpgradeConfigValidationError{ + err := RouteAction_UpgradeConfigValidationError{ field: "UpgradeType", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_RouteAction_UpgradeConfig_UpgradeType_Pattern.MatchString(m.GetUpgradeType()) { - return RouteAction_UpgradeConfigValidationError{ + err := RouteAction_UpgradeConfigValidationError{ field: "UpgradeType", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_UpgradeConfigValidationError{ field: "Enabled", @@ -3499,7 +6837,26 @@ func (m *RouteAction_UpgradeConfig) Validate() error { } } - if v, ok := interface{}(m.GetConnectConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_UpgradeConfigValidationError{ + field: "ConnectConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_UpgradeConfigValidationError{ + field: "ConnectConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_UpgradeConfigValidationError{ field: "ConnectConfig", @@ -3509,9 +6866,30 @@ func (m *RouteAction_UpgradeConfig) Validate() error { } } + if len(errors) > 0 { + return RouteAction_UpgradeConfigMultiError(errors) + } + return nil } +// RouteAction_UpgradeConfigMultiError is an error wrapping multiple validation +// errors returned by RouteAction_UpgradeConfig.ValidateAll() if the +// designated constraints aren't met. +type RouteAction_UpgradeConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_UpgradeConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_UpgradeConfigMultiError) AllErrors() []error { return m } + // RouteAction_UpgradeConfigValidationError is the validation error returned by // RouteAction_UpgradeConfig.Validate if the designated constraints aren't met. type RouteAction_UpgradeConfigValidationError struct { @@ -3572,13 +6950,46 @@ var _RouteAction_UpgradeConfig_UpgradeType_Pattern = regexp.MustCompile("^[^\x00 // Validate checks the field values on RouteAction_MaxStreamDuration with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_MaxStreamDuration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_MaxStreamDuration with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_MaxStreamDurationMultiError, or nil if none found. +func (m *RouteAction_MaxStreamDuration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_MaxStreamDuration) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxStreamDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_MaxStreamDurationValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_MaxStreamDurationValidationError{ + field: "MaxStreamDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_MaxStreamDurationValidationError{ field: "MaxStreamDuration", @@ -3588,7 +6999,26 @@ func (m *RouteAction_MaxStreamDuration) Validate() error { } } - if v, ok := interface{}(m.GetGrpcTimeoutHeaderMax()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcTimeoutHeaderMax()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_MaxStreamDurationValidationError{ + field: "GrpcTimeoutHeaderMax", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_MaxStreamDurationValidationError{ + field: "GrpcTimeoutHeaderMax", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcTimeoutHeaderMax()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_MaxStreamDurationValidationError{ field: "GrpcTimeoutHeaderMax", @@ -3598,7 +7028,26 @@ func (m *RouteAction_MaxStreamDuration) Validate() error { } } - if v, ok := interface{}(m.GetGrpcTimeoutHeaderOffset()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcTimeoutHeaderOffset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_MaxStreamDurationValidationError{ + field: "GrpcTimeoutHeaderOffset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_MaxStreamDurationValidationError{ + field: "GrpcTimeoutHeaderOffset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcTimeoutHeaderOffset()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_MaxStreamDurationValidationError{ field: "GrpcTimeoutHeaderOffset", @@ -3608,9 +7057,30 @@ func (m *RouteAction_MaxStreamDuration) Validate() error { } } + if len(errors) > 0 { + return RouteAction_MaxStreamDurationMultiError(errors) + } + return nil } +// RouteAction_MaxStreamDurationMultiError is an error wrapping multiple +// validation errors returned by RouteAction_MaxStreamDuration.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_MaxStreamDurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_MaxStreamDurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_MaxStreamDurationMultiError) AllErrors() []error { return m } + // RouteAction_MaxStreamDurationValidationError is the validation error // returned by RouteAction_MaxStreamDuration.Validate if the designated // constraints aren't met. @@ -3670,27 +7140,68 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy_Header) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_Header with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_HeaderMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_Header) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_Header) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetHeaderName()) < 1 { - return RouteAction_HashPolicy_HeaderValidationError{ + err := RouteAction_HashPolicy_HeaderValidationError{ field: "HeaderName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_RouteAction_HashPolicy_Header_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - return RouteAction_HashPolicy_HeaderValidationError{ + err := RouteAction_HashPolicy_HeaderValidationError{ field: "HeaderName", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRegexRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicy_HeaderValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicy_HeaderValidationError{ + field: "RegexRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicy_HeaderValidationError{ field: "RegexRewrite", @@ -3700,9 +7211,30 @@ func (m *RouteAction_HashPolicy_Header) Validate() error { } } + if len(errors) > 0 { + return RouteAction_HashPolicy_HeaderMultiError(errors) + } + return nil } +// RouteAction_HashPolicy_HeaderMultiError is an error wrapping multiple +// validation errors returned by RouteAction_HashPolicy_Header.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_HashPolicy_HeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_HeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_HeaderMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_HeaderValidationError is the validation error // returned by RouteAction_HashPolicy_Header.Validate if the designated // constraints aren't met. @@ -3764,20 +7296,57 @@ var _RouteAction_HashPolicy_Header_HeaderName_Pattern = regexp.MustCompile("^[^\ // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy_Cookie) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_Cookie with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_CookieMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_Cookie) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_Cookie) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return RouteAction_HashPolicy_CookieValidationError{ + err := RouteAction_HashPolicy_CookieValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTtl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ + field: "Ttl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ + field: "Ttl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicy_CookieValidationError{ field: "Ttl", @@ -3789,9 +7358,30 @@ func (m *RouteAction_HashPolicy_Cookie) Validate() error { // no validation rules for Path + if len(errors) > 0 { + return RouteAction_HashPolicy_CookieMultiError(errors) + } + return nil } +// RouteAction_HashPolicy_CookieMultiError is an error wrapping multiple +// validation errors returned by RouteAction_HashPolicy_Cookie.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_HashPolicy_CookieMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_CookieMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_CookieMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_CookieValidationError is the validation error // returned by RouteAction_HashPolicy_Cookie.Validate if the designated // constraints aren't met. @@ -3851,17 +7441,55 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction_HashPolicy_ConnectionProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RouteAction_HashPolicy_ConnectionProperties with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// RouteAction_HashPolicy_ConnectionPropertiesMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_ConnectionProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_ConnectionProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SourceIp + if len(errors) > 0 { + return RouteAction_HashPolicy_ConnectionPropertiesMultiError(errors) + } + return nil } +// RouteAction_HashPolicy_ConnectionPropertiesMultiError is an error wrapping +// multiple validation errors returned by +// RouteAction_HashPolicy_ConnectionProperties.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicy_ConnectionPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_ConnectionPropertiesValidationError is the validation // error returned by RouteAction_HashPolicy_ConnectionProperties.Validate if // the designated constraints aren't met. @@ -3921,22 +7549,63 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *RouteAction_HashPolicy_QueryParameter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_QueryParameter +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_QueryParameterMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_QueryParameter) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_QueryParameter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return RouteAction_HashPolicy_QueryParameterValidationError{ + err := RouteAction_HashPolicy_QueryParameterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RouteAction_HashPolicy_QueryParameterMultiError(errors) } return nil } +// RouteAction_HashPolicy_QueryParameterMultiError is an error wrapping +// multiple validation errors returned by +// RouteAction_HashPolicy_QueryParameter.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicy_QueryParameterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_QueryParameterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_QueryParameterMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_QueryParameterValidationError is the validation error // returned by RouteAction_HashPolicy_QueryParameter.Validate if the // designated constraints aren't met. @@ -3996,22 +7665,63 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RouteAction_HashPolicy_FilterState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_HashPolicy_FilterState +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RouteAction_HashPolicy_FilterStateMultiError, or nil if none found. +func (m *RouteAction_HashPolicy_FilterState) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_HashPolicy_FilterState) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetKey()) < 1 { - return RouteAction_HashPolicy_FilterStateValidationError{ + err := RouteAction_HashPolicy_FilterStateValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RouteAction_HashPolicy_FilterStateMultiError(errors) } return nil } +// RouteAction_HashPolicy_FilterStateMultiError is an error wrapping multiple +// validation errors returned by +// RouteAction_HashPolicy_FilterState.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_HashPolicy_FilterStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_HashPolicy_FilterStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_HashPolicy_FilterStateMultiError) AllErrors() []error { return m } + // RouteAction_HashPolicy_FilterStateValidationError is the validation error // returned by RouteAction_HashPolicy_FilterState.Validate if the designated // constraints aren't met. @@ -4071,13 +7781,48 @@ var _ interface { // Validate checks the field values on RouteAction_UpgradeConfig_ConnectConfig // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *RouteAction_UpgradeConfig_ConnectConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RouteAction_UpgradeConfig_ConnectConfig with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// RouteAction_UpgradeConfig_ConnectConfigMultiError, or nil if none found. +func (m *RouteAction_UpgradeConfig_ConnectConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_UpgradeConfig_ConnectConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetProxyProtocolConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetProxyProtocolConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_UpgradeConfig_ConnectConfigValidationError{ + field: "ProxyProtocolConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_UpgradeConfig_ConnectConfigValidationError{ + field: "ProxyProtocolConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProxyProtocolConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_UpgradeConfig_ConnectConfigValidationError{ field: "ProxyProtocolConfig", @@ -4087,9 +7832,33 @@ func (m *RouteAction_UpgradeConfig_ConnectConfig) Validate() error { } } + // no validation rules for AllowPost + + if len(errors) > 0 { + return RouteAction_UpgradeConfig_ConnectConfigMultiError(errors) + } + return nil } +// RouteAction_UpgradeConfig_ConnectConfigMultiError is an error wrapping +// multiple validation errors returned by +// RouteAction_UpgradeConfig_ConnectConfig.ValidateAll() if the designated +// constraints aren't met. +type RouteAction_UpgradeConfig_ConnectConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_UpgradeConfig_ConnectConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_UpgradeConfig_ConnectConfigMultiError) AllErrors() []error { return m } + // RouteAction_UpgradeConfig_ConnectConfigValidationError is the validation // error returned by RouteAction_UpgradeConfig_ConnectConfig.Validate if the // designated constraints aren't met. @@ -4149,39 +7918,64 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RetryPolicy_RetryPriority) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_RetryPriority with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RetryPolicy_RetryPriorityMultiError, or nil if none found. +func (m *RetryPolicy_RetryPriority) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_RetryPriority) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return RetryPolicy_RetryPriorityValidationError{ + err := RetryPolicy_RetryPriorityValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicy_RetryPriorityValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicy_RetryPriorityValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *RetryPolicy_RetryPriority_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryPriorityValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -4190,9 +7984,30 @@ func (m *RetryPolicy_RetryPriority) Validate() error { } + if len(errors) > 0 { + return RetryPolicy_RetryPriorityMultiError(errors) + } + return nil } +// RetryPolicy_RetryPriorityMultiError is an error wrapping multiple validation +// errors returned by RetryPolicy_RetryPriority.ValidateAll() if the +// designated constraints aren't met. +type RetryPolicy_RetryPriorityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_RetryPriorityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_RetryPriorityMultiError) AllErrors() []error { return m } + // RetryPolicy_RetryPriorityValidationError is the validation error returned by // RetryPolicy_RetryPriority.Validate if the designated constraints aren't met. type RetryPolicy_RetryPriorityValidationError struct { @@ -4251,39 +8066,64 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RetryPolicy_RetryHostPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_RetryHostPredicate with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RetryPolicy_RetryHostPredicateMultiError, or nil if none found. +func (m *RetryPolicy_RetryHostPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_RetryHostPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return RetryPolicy_RetryHostPredicateValidationError{ + err := RetryPolicy_RetryHostPredicateValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *RetryPolicy_RetryHostPredicate_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryHostPredicateValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -4292,9 +8132,30 @@ func (m *RetryPolicy_RetryHostPredicate) Validate() error { } + if len(errors) > 0 { + return RetryPolicy_RetryHostPredicateMultiError(errors) + } + return nil } +// RetryPolicy_RetryHostPredicateMultiError is an error wrapping multiple +// validation errors returned by RetryPolicy_RetryHostPredicate.ValidateAll() +// if the designated constraints aren't met. +type RetryPolicy_RetryHostPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_RetryHostPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_RetryHostPredicateMultiError) AllErrors() []error { return m } + // RetryPolicy_RetryHostPredicateValidationError is the validation error // returned by RetryPolicy_RetryHostPredicate.Validate if the designated // constraints aren't met. @@ -4354,64 +8215,121 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RetryPolicy_RetryBackOff) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_RetryBackOff with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RetryPolicy_RetryBackOffMultiError, or nil if none found. +func (m *RetryPolicy_RetryBackOff) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_RetryBackOff) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetBaseInterval() == nil { - return RetryPolicy_RetryBackOffValidationError{ + err := RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetBaseInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RetryPolicy_RetryBackOffValidationError{ + err = RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + 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 dur <= gt { + err := RetryPolicy_RetryBackOffValidationError{ + field: "BaseInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RetryPolicy_RetryBackOffValidationError{ + err = RetryPolicy_RetryBackOffValidationError{ field: "MaxInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return RetryPolicy_RetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := RetryPolicy_RetryBackOffValidationError{ + field: "MaxInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return RetryPolicy_RetryBackOffMultiError(errors) } return nil } +// RetryPolicy_RetryBackOffMultiError is an error wrapping multiple validation +// errors returned by RetryPolicy_RetryBackOff.ValidateAll() if the designated +// constraints aren't met. +type RetryPolicy_RetryBackOffMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_RetryBackOffMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_RetryBackOffMultiError) AllErrors() []error { return m } + // RetryPolicy_RetryBackOffValidationError is the validation error returned by // RetryPolicy_RetryBackOff.Validate if the designated constraints aren't met. type RetryPolicy_RetryBackOffValidationError struct { @@ -4470,36 +8388,83 @@ var _ interface { // Validate checks the field values on RetryPolicy_ResetHeader with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RetryPolicy_ResetHeader) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_ResetHeader with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RetryPolicy_ResetHeaderMultiError, or nil if none found. +func (m *RetryPolicy_ResetHeader) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_ResetHeader) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return RetryPolicy_ResetHeaderValidationError{ + err := RetryPolicy_ResetHeaderValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_RetryPolicy_ResetHeader_Name_Pattern.MatchString(m.GetName()) { - return RetryPolicy_ResetHeaderValidationError{ + err := RetryPolicy_ResetHeaderValidationError{ field: "Name", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := RetryPolicy_ResetHeaderFormat_name[int32(m.GetFormat())]; !ok { - return RetryPolicy_ResetHeaderValidationError{ + err := RetryPolicy_ResetHeaderValidationError{ field: "Format", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RetryPolicy_ResetHeaderMultiError(errors) } return nil } +// RetryPolicy_ResetHeaderMultiError is an error wrapping multiple validation +// errors returned by RetryPolicy_ResetHeader.ValidateAll() if the designated +// constraints aren't met. +type RetryPolicy_ResetHeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_ResetHeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_ResetHeaderMultiError) AllErrors() []error { return m } + // RetryPolicy_ResetHeaderValidationError is the validation error returned by // RetryPolicy_ResetHeader.Validate if the designated constraints aren't met. type RetryPolicy_ResetHeaderValidationError struct { @@ -4558,25 +8523,63 @@ var _ interface { var _RetryPolicy_ResetHeader_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") -// Validate checks the field values on RetryPolicy_RateLimitedRetryBackOff with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RetryPolicy_RateLimitedRetryBackOff) Validate() error { +// Validate checks the field values on RetryPolicy_RateLimitedRetryBackOff with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *RetryPolicy_RateLimitedRetryBackOff) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RetryPolicy_RateLimitedRetryBackOff +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RetryPolicy_RateLimitedRetryBackOffMultiError, or nil if none found. +func (m *RetryPolicy_RateLimitedRetryBackOff) ValidateAll() error { + return m.validate(true) +} + +func (m *RetryPolicy_RateLimitedRetryBackOff) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetResetHeaders()) < 1 { - return RetryPolicy_RateLimitedRetryBackOffValidationError{ + err := RetryPolicy_RateLimitedRetryBackOffValidationError{ field: "ResetHeaders", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RetryPolicy_RateLimitedRetryBackOffValidationError{ + field: fmt.Sprintf("ResetHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RetryPolicy_RateLimitedRetryBackOffValidationError{ + field: fmt.Sprintf("ResetHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RateLimitedRetryBackOffValidationError{ field: fmt.Sprintf("ResetHeaders[%v]", idx), @@ -4589,29 +8592,60 @@ func (m *RetryPolicy_RateLimitedRetryBackOff) Validate() error { } if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RetryPolicy_RateLimitedRetryBackOffValidationError{ + err = RetryPolicy_RateLimitedRetryBackOffValidationError{ field: "MaxInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := RetryPolicy_RateLimitedRetryBackOffValidationError{ + field: "MaxInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return RetryPolicy_RateLimitedRetryBackOffMultiError(errors) } return nil } +// RetryPolicy_RateLimitedRetryBackOffMultiError is an error wrapping multiple +// validation errors returned by +// RetryPolicy_RateLimitedRetryBackOff.ValidateAll() if the designated +// constraints aren't met. +type RetryPolicy_RateLimitedRetryBackOffMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RetryPolicy_RateLimitedRetryBackOffMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RetryPolicy_RateLimitedRetryBackOffMultiError) AllErrors() []error { return m } + // RetryPolicy_RateLimitedRetryBackOffValidationError is the validation error // returned by RetryPolicy_RateLimitedRetryBackOff.Validate if the designated // constraints aren't met. @@ -4670,18 +8704,51 @@ var _ interface { } = RetryPolicy_RateLimitedRetryBackOffValidationError{} // Validate checks the field values on RateLimit_Action with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimit_ActionMultiError, or nil if none found. +func (m *RateLimit_Action) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ActionSpecifier.(type) { case *RateLimit_Action_SourceCluster_: - if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "SourceCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "SourceCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "SourceCluster", @@ -4693,7 +8760,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_DestinationCluster_: - if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestinationCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "DestinationCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "DestinationCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "DestinationCluster", @@ -4705,7 +8791,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_RequestHeaders_: - if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RequestHeaders", @@ -4717,7 +8822,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_RemoteAddress_: - if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RemoteAddress", @@ -4729,7 +8853,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_GenericKey_: - if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGenericKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "GenericKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "GenericKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "GenericKey", @@ -4741,7 +8884,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_HeaderValueMatch_: - if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderValueMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "HeaderValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "HeaderValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "HeaderValueMatch", @@ -4753,7 +8915,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_DynamicMetadata: - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "DynamicMetadata", @@ -4765,7 +8946,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_Metadata: - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "Metadata", @@ -4777,7 +8977,26 @@ func (m *RateLimit_Action) Validate() error { case *RateLimit_Action_Extension: - if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExtension()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_ActionValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "Extension", @@ -4788,16 +9007,41 @@ func (m *RateLimit_Action) Validate() error { } default: - return RateLimit_ActionValidationError{ + err := RateLimit_ActionValidationError{ field: "ActionSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RateLimit_ActionMultiError(errors) } return nil } +// RateLimit_ActionMultiError is an error wrapping multiple validation errors +// returned by RateLimit_Action.ValidateAll() if the designated constraints +// aren't met. +type RateLimit_ActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_ActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_ActionMultiError) AllErrors() []error { return m } + // RateLimit_ActionValidationError is the validation error returned by // RateLimit_Action.Validate if the designated constraints aren't met. type RateLimit_ActionValidationError struct { @@ -4854,17 +9098,50 @@ var _ interface { // Validate checks the field values on RateLimit_Override with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Override) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Override with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimit_OverrideMultiError, or nil if none found. +func (m *RateLimit_Override) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Override) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.OverrideSpecifier.(type) { case *RateLimit_Override_DynamicMetadata_: - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_OverrideValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_OverrideValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_OverrideValidationError{ field: "DynamicMetadata", @@ -4875,16 +9152,41 @@ func (m *RateLimit_Override) Validate() error { } default: - return RateLimit_OverrideValidationError{ + err := RateLimit_OverrideValidationError{ field: "OverrideSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RateLimit_OverrideMultiError(errors) } return nil } +// RateLimit_OverrideMultiError is an error wrapping multiple validation errors +// returned by RateLimit_Override.ValidateAll() if the designated constraints +// aren't met. +type RateLimit_OverrideMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_OverrideMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_OverrideMultiError) AllErrors() []error { return m } + // RateLimit_OverrideValidationError is the validation error returned by // RateLimit_Override.Validate if the designated constraints aren't met. type RateLimit_OverrideValidationError struct { @@ -4943,15 +9245,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_SourceCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_SourceCluster with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_SourceClusterMultiError, or nil if none found. +func (m *RateLimit_Action_SourceCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_SourceCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RateLimit_Action_SourceClusterMultiError(errors) + } + return nil } +// RateLimit_Action_SourceClusterMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_SourceCluster.ValidateAll() +// if the designated constraints aren't met. +type RateLimit_Action_SourceClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_SourceClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_SourceClusterMultiError) AllErrors() []error { return m } + // RateLimit_Action_SourceClusterValidationError is the validation error // returned by RateLimit_Action_SourceCluster.Validate if the designated // constraints aren't met. @@ -5011,15 +9348,52 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimit_Action_DestinationCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_DestinationCluster +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_DestinationClusterMultiError, or nil if none found. +func (m *RateLimit_Action_DestinationCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_DestinationCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RateLimit_Action_DestinationClusterMultiError(errors) + } + return nil } +// RateLimit_Action_DestinationClusterMultiError is an error wrapping multiple +// validation errors returned by +// RateLimit_Action_DestinationCluster.ValidateAll() if the designated +// constraints aren't met. +type RateLimit_Action_DestinationClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_DestinationClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_DestinationClusterMultiError) AllErrors() []error { return m } + // RateLimit_Action_DestinationClusterValidationError is the validation error // returned by RateLimit_Action_DestinationCluster.Validate if the designated // constraints aren't met. @@ -5079,38 +9453,85 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_RequestHeaders) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_RequestHeaders with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_RequestHeadersMultiError, or nil if none found. +func (m *RateLimit_Action_RequestHeaders) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_RequestHeaders) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetHeaderName()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ + err := RateLimit_Action_RequestHeadersValidationError{ field: "HeaderName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_RateLimit_Action_RequestHeaders_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - return RateLimit_Action_RequestHeadersValidationError{ + err := RateLimit_Action_RequestHeadersValidationError{ field: "HeaderName", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ + err := RateLimit_Action_RequestHeadersValidationError{ field: "DescriptorKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for SkipIfAbsent + if len(errors) > 0 { + return RateLimit_Action_RequestHeadersMultiError(errors) + } + return nil } +// RateLimit_Action_RequestHeadersMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_RequestHeaders.ValidateAll() +// if the designated constraints aren't met. +type RateLimit_Action_RequestHeadersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_RequestHeadersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_RequestHeadersMultiError) AllErrors() []error { return m } + // RateLimit_Action_RequestHeadersValidationError is the validation error // returned by RateLimit_Action_RequestHeaders.Validate if the designated // constraints aren't met. @@ -5172,15 +9593,50 @@ var _RateLimit_Action_RequestHeaders_HeaderName_Pattern = regexp.MustCompile("^[ // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_RemoteAddress) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_RemoteAddress with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_RemoteAddressMultiError, or nil if none found. +func (m *RateLimit_Action_RemoteAddress) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_RemoteAddress) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RateLimit_Action_RemoteAddressMultiError(errors) + } + return nil } +// RateLimit_Action_RemoteAddressMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_RemoteAddress.ValidateAll() +// if the designated constraints aren't met. +type RateLimit_Action_RemoteAddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_RemoteAddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_RemoteAddressMultiError) AllErrors() []error { return m } + // RateLimit_Action_RemoteAddressValidationError is the validation error // returned by RateLimit_Action_RemoteAddress.Validate if the designated // constraints aren't met. @@ -5240,24 +9696,63 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_GenericKey) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_GenericKey with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimit_Action_GenericKeyMultiError, or nil if none found. +func (m *RateLimit_Action_GenericKey) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_GenericKey) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_GenericKeyValidationError{ + err := RateLimit_Action_GenericKeyValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DescriptorKey + if len(errors) > 0 { + return RateLimit_Action_GenericKeyMultiError(errors) + } + return nil } +// RateLimit_Action_GenericKeyMultiError is an error wrapping multiple +// validation errors returned by RateLimit_Action_GenericKey.ValidateAll() if +// the designated constraints aren't met. +type RateLimit_Action_GenericKeyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_GenericKeyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_GenericKeyMultiError) AllErrors() []error { return m } + // RateLimit_Action_GenericKeyValidationError is the validation error returned // by RateLimit_Action_GenericKey.Validate if the designated constraints // aren't met. @@ -5317,20 +9812,60 @@ var _ interface { // 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. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimit_Action_HeaderValueMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_HeaderValueMatch +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_HeaderValueMatchMultiError, or nil if none found. +func (m *RateLimit_Action_HeaderValueMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_HeaderValueMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + + // no validation rules for DescriptorKey + if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_HeaderValueMatchValidationError{ + err := RateLimit_Action_HeaderValueMatchValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetExpectMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExpectMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: "ExpectMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: "ExpectMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpectMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: "ExpectMatch", @@ -5341,16 +9876,39 @@ func (m *RateLimit_Action_HeaderValueMatch) Validate() error { } if len(m.GetHeaders()) < 1 { - return RateLimit_Action_HeaderValueMatchValidationError{ + err := RateLimit_Action_HeaderValueMatchValidationError{ field: "Headers", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -5362,9 +9920,31 @@ func (m *RateLimit_Action_HeaderValueMatch) Validate() error { } + if len(errors) > 0 { + return RateLimit_Action_HeaderValueMatchMultiError(errors) + } + return nil } +// RateLimit_Action_HeaderValueMatchMultiError is an error wrapping multiple +// validation errors returned by +// RateLimit_Action_HeaderValueMatch.ValidateAll() if the designated +// constraints aren't met. +type RateLimit_Action_HeaderValueMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_HeaderValueMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_HeaderValueMatchMultiError) AllErrors() []error { return m } + // RateLimit_Action_HeaderValueMatchValidationError is the validation error // returned by RateLimit_Action_HeaderValueMatch.Validate if the designated // constraints aren't met. @@ -5424,27 +10004,69 @@ var _ interface { // Validate checks the field values on RateLimit_Action_DynamicMetaData with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimit_Action_DynamicMetaData) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_DynamicMetaData with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimit_Action_DynamicMetaDataMultiError, or nil if none found. +func (m *RateLimit_Action_DynamicMetaData) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_DynamicMetaData) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_DynamicMetaDataValidationError{ + err := RateLimit_Action_DynamicMetaDataValidationError{ field: "DescriptorKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetMetadataKey() == nil { - return RateLimit_Action_DynamicMetaDataValidationError{ + err := RateLimit_Action_DynamicMetaDataValidationError{ field: "MetadataKey", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_Action_DynamicMetaDataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_Action_DynamicMetaDataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_DynamicMetaDataValidationError{ field: "MetadataKey", @@ -5456,9 +10078,31 @@ func (m *RateLimit_Action_DynamicMetaData) Validate() error { // no validation rules for DefaultValue + if len(errors) > 0 { + return RateLimit_Action_DynamicMetaDataMultiError(errors) + } + return nil } +// RateLimit_Action_DynamicMetaDataMultiError is an error wrapping multiple +// validation errors returned by +// RateLimit_Action_DynamicMetaData.ValidateAll() if the designated +// constraints aren't met. +type RateLimit_Action_DynamicMetaDataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_DynamicMetaDataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_DynamicMetaDataMultiError) AllErrors() []error { return m } + // RateLimit_Action_DynamicMetaDataValidationError is the validation error // returned by RateLimit_Action_DynamicMetaData.Validate if the designated // constraints aren't met. @@ -5518,27 +10162,68 @@ var _ interface { // Validate checks the field values on RateLimit_Action_MetaData with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimit_Action_MetaData) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Action_MetaData with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimit_Action_MetaDataMultiError, or nil if none found. +func (m *RateLimit_Action_MetaData) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Action_MetaData) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_MetaDataValidationError{ + err := RateLimit_Action_MetaDataValidationError{ field: "DescriptorKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetMetadataKey() == nil { - return RateLimit_Action_MetaDataValidationError{ + err := RateLimit_Action_MetaDataValidationError{ field: "MetadataKey", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_Action_MetaDataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_Action_MetaDataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_MetaDataValidationError{ field: "MetadataKey", @@ -5551,15 +10236,40 @@ func (m *RateLimit_Action_MetaData) Validate() error { // no validation rules for DefaultValue if _, ok := RateLimit_Action_MetaData_Source_name[int32(m.GetSource())]; !ok { - return RateLimit_Action_MetaDataValidationError{ + err := RateLimit_Action_MetaDataValidationError{ field: "Source", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RateLimit_Action_MetaDataMultiError(errors) } return nil } +// RateLimit_Action_MetaDataMultiError is an error wrapping multiple validation +// errors returned by RateLimit_Action_MetaData.ValidateAll() if the +// designated constraints aren't met. +type RateLimit_Action_MetaDataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Action_MetaDataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Action_MetaDataMultiError) AllErrors() []error { return m } + // RateLimit_Action_MetaDataValidationError is the validation error returned by // RateLimit_Action_MetaData.Validate if the designated constraints aren't met. type RateLimit_Action_MetaDataValidationError struct { @@ -5618,20 +10328,58 @@ var _ interface { // Validate checks the field values on RateLimit_Override_DynamicMetadata with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimit_Override_DynamicMetadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit_Override_DynamicMetadata +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimit_Override_DynamicMetadataMultiError, or nil if none found. +func (m *RateLimit_Override_DynamicMetadata) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit_Override_DynamicMetadata) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMetadataKey() == nil { - return RateLimit_Override_DynamicMetadataValidationError{ + err := RateLimit_Override_DynamicMetadataValidationError{ field: "MetadataKey", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimit_Override_DynamicMetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimit_Override_DynamicMetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Override_DynamicMetadataValidationError{ field: "MetadataKey", @@ -5641,9 +10389,31 @@ func (m *RateLimit_Override_DynamicMetadata) Validate() error { } } + if len(errors) > 0 { + return RateLimit_Override_DynamicMetadataMultiError(errors) + } + return nil } +// RateLimit_Override_DynamicMetadataMultiError is an error wrapping multiple +// validation errors returned by +// RateLimit_Override_DynamicMetadata.ValidateAll() if the designated +// constraints aren't met. +type RateLimit_Override_DynamicMetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimit_Override_DynamicMetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimit_Override_DynamicMetadataMultiError) AllErrors() []error { return m } + // RateLimit_Override_DynamicMetadataValidationError is the validation error // returned by RateLimit_Override_DynamicMetadata.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/config/route/v3/scoped_route.pb.go b/pkg/api/envoy/config/route/v3/scoped_route.pb.go index df66202df7..2bbac3790b 100644 --- a/pkg/api/envoy/config/route/v3/scoped_route.pb.go +++ b/pkg/api/envoy/config/route/v3/scoped_route.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/route/v3/scoped_route.proto -package envoy_config_route_v3 +package routev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,18 +22,17 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` (identified by its resource name). +// :ref:`Key` to a +// :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. +// The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically +// via RDS (:ref:`route_configuration_name`) +// or specified inline (:ref:`route_configuration`). // // The HTTP connection manager builds up a table consisting of these Key to // RouteConfiguration mappings, and looks up the RouteConfiguration to use per // request according to the algorithm specified in the -// :ref:`scope_key_builder` +// :ref:`scope_key_builder` // assigned to the HttpConnectionManager. // // For example, with the following configurations (in YAML): @@ -56,7 +54,7 @@ const _ = proto.ProtoPackageIsVersion4 // key: vip // // ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` +// :ref:`scoped_route_configurations_list` // or obtained dynamically via SRDS): // // .. code:: @@ -86,6 +84,7 @@ const _ = proto.ProtoPackageIsVersion4 // would result in the routing table defined by the `route-config1` // RouteConfiguration being assigned to the HTTP request/stream. // +// [#next-free-field: 6] type ScopedRouteConfiguration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -95,10 +94,12 @@ type ScopedRouteConfiguration struct { OnDemand bool `protobuf:"varint,4,opt,name=on_demand,json=onDemand,proto3" json:"on_demand,omitempty"` // The name assigned to the routing scope. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The resource name to use for a :ref:`envoy_api_msg_service.discovery.v3.DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` associated + // The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an + // RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated // with this scope. RouteConfigurationName string `protobuf:"bytes,2,opt,name=route_configuration_name,json=routeConfigurationName,proto3" json:"route_configuration_name,omitempty"` + // The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope. + RouteConfiguration *RouteConfiguration `protobuf:"bytes,5,opt,name=route_configuration,json=routeConfiguration,proto3" json:"route_configuration,omitempty"` // The key to match against. Key *ScopedRouteConfiguration_Key `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` } @@ -156,6 +157,13 @@ func (x *ScopedRouteConfiguration) GetRouteConfigurationName() string { return "" } +func (x *ScopedRouteConfiguration) GetRouteConfiguration() *RouteConfiguration { + if x != nil { + return x.RouteConfiguration + } + return nil +} + func (x *ScopedRouteConfiguration) GetKey() *ScopedRouteConfiguration_Key { if x != nil { return x.Key @@ -164,7 +172,7 @@ func (x *ScopedRouteConfiguration) GetKey() *ScopedRouteConfiguration_Key { } // Specifies a key which is matched against the output of the -// :ref:`scope_key_builder` +// :ref:`scope_key_builder` // specified in the HttpConnectionManager. The matching is done per HTTP // request and is dependent on the order of the fragments contained in the // Key. @@ -175,7 +183,7 @@ type ScopedRouteConfiguration_Key struct { // The ordered set of fragments to match against. The order must match the // fragments in the corresponding - // :ref:`scope_key_builder`. + // :ref:`scope_key_builder`. Fragments []*ScopedRouteConfiguration_Key_Fragment `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` } @@ -293,52 +301,68 @@ var file_envoy_config_route_v3_scoped_route_proto_rawDesc = []byte{ 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x04, 0x0a, - 0x18, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, - 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x6e, - 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x16, + 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xaa, 0x05, 0x0a, 0x18, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0e, + 0x12, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x92, 0x02, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, - 0x64, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x66, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x73, 0x0a, 0x08, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, - 0x65, 0x79, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, - 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x3a, 0x2c, 0x9a, 0xc5, - 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0e, 0x12, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x92, 0x02, 0x0a, 0x03, 0x4b, 0x65, + 0x79, 0x12, 0x64, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x66, 0x72, + 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x73, 0x0a, 0x08, 0x46, 0x72, 0x61, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4b, 0x65, 0x79, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, + 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x30, 0x9a, 0xc5, + 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x41, 0x0a, 0x23, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x42, 0x10, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x3a, 0x2c, + 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x87, 0x01, 0x0a, + 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -358,15 +382,17 @@ var file_envoy_config_route_v3_scoped_route_proto_goTypes = []interface{}{ (*ScopedRouteConfiguration)(nil), // 0: envoy.config.route.v3.ScopedRouteConfiguration (*ScopedRouteConfiguration_Key)(nil), // 1: envoy.config.route.v3.ScopedRouteConfiguration.Key (*ScopedRouteConfiguration_Key_Fragment)(nil), // 2: envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment + (*RouteConfiguration)(nil), // 3: envoy.config.route.v3.RouteConfiguration } var file_envoy_config_route_v3_scoped_route_proto_depIdxs = []int32{ - 1, // 0: envoy.config.route.v3.ScopedRouteConfiguration.key:type_name -> envoy.config.route.v3.ScopedRouteConfiguration.Key - 2, // 1: envoy.config.route.v3.ScopedRouteConfiguration.Key.fragments:type_name -> envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 0: envoy.config.route.v3.ScopedRouteConfiguration.route_configuration:type_name -> envoy.config.route.v3.RouteConfiguration + 1, // 1: envoy.config.route.v3.ScopedRouteConfiguration.key:type_name -> envoy.config.route.v3.ScopedRouteConfiguration.Key + 2, // 2: envoy.config.route.v3.ScopedRouteConfiguration.Key.fragments:type_name -> envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_envoy_config_route_v3_scoped_route_proto_init() } @@ -374,6 +400,7 @@ func file_envoy_config_route_v3_scoped_route_proto_init() { if File_envoy_config_route_v3_scoped_route_proto != nil { return } + file_envoy_config_route_v3_route_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_config_route_v3_scoped_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ScopedRouteConfiguration); i { diff --git a/pkg/api/envoy/config/route/v3/scoped_route.pb.validate.go b/pkg/api/envoy/config/route/v3/scoped_route.pb.validate.go index bee73ca915..e2d46c2ffb 100644 --- a/pkg/api/envoy/config/route/v3/scoped_route.pb.validate.go +++ b/pkg/api/envoy/config/route/v3/scoped_route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/route/v3/scoped_route.proto -package envoy_config_route_v3 +package routev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,41 +31,107 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ScopedRouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfiguration with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRouteConfigurationMultiError, or nil if none found. +func (m *ScopedRouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for OnDemand if utf8.RuneCountInString(m.GetName()) < 1 { - return ScopedRouteConfigurationValidationError{ + err := ScopedRouteConfigurationValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if utf8.RuneCountInString(m.GetRouteConfigurationName()) < 1 { - return ScopedRouteConfigurationValidationError{ - field: "RouteConfigurationName", - reason: "value length must be at least 1 runes", + // no validation rules for RouteConfigurationName + + if all { + switch v := interface{}(m.GetRouteConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRouteConfigurationValidationError{ + field: "RouteConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRouteConfigurationValidationError{ + field: "RouteConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfiguration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRouteConfigurationValidationError{ + field: "RouteConfiguration", + reason: "embedded message failed validation", + cause: err, + } } } if m.GetKey() == nil { - return ScopedRouteConfigurationValidationError{ + err := ScopedRouteConfigurationValidationError{ field: "Key", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRouteConfigurationValidationError{ + field: "Key", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRouteConfigurationValidationError{ + field: "Key", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRouteConfigurationValidationError{ field: "Key", @@ -74,9 +141,30 @@ func (m *ScopedRouteConfiguration) Validate() error { } } + if len(errors) > 0 { + return ScopedRouteConfigurationMultiError(errors) + } + return nil } +// ScopedRouteConfigurationMultiError is an error wrapping multiple validation +// errors returned by ScopedRouteConfiguration.ValidateAll() if the designated +// constraints aren't met. +type ScopedRouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfigurationMultiError) AllErrors() []error { return m } + // ScopedRouteConfigurationValidationError is the validation error returned by // ScopedRouteConfiguration.Validate if the designated constraints aren't met. type ScopedRouteConfigurationValidationError struct { @@ -135,23 +223,60 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRouteConfiguration_Key) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfiguration_Key with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRouteConfiguration_KeyMultiError, or nil if none found. +func (m *ScopedRouteConfiguration_Key) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfiguration_Key) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFragments()) < 1 { - return ScopedRouteConfiguration_KeyValidationError{ + err := ScopedRouteConfiguration_KeyValidationError{ field: "Fragments", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFragments() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRouteConfiguration_KeyValidationError{ field: fmt.Sprintf("Fragments[%v]", idx), @@ -163,9 +288,30 @@ func (m *ScopedRouteConfiguration_Key) Validate() error { } + if len(errors) > 0 { + return ScopedRouteConfiguration_KeyMultiError(errors) + } + return nil } +// ScopedRouteConfiguration_KeyMultiError is an error wrapping multiple +// validation errors returned by ScopedRouteConfiguration_Key.ValidateAll() if +// the designated constraints aren't met. +type ScopedRouteConfiguration_KeyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfiguration_KeyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfiguration_KeyMultiError) AllErrors() []error { return m } + // ScopedRouteConfiguration_KeyValidationError is the validation error returned // by ScopedRouteConfiguration_Key.Validate if the designated constraints // aren't met. @@ -225,28 +371,69 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *ScopedRouteConfiguration_Key_Fragment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfiguration_Key_Fragment +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ScopedRouteConfiguration_Key_FragmentMultiError, or nil if none found. +func (m *ScopedRouteConfiguration_Key_Fragment) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfiguration_Key_Fragment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Type.(type) { case *ScopedRouteConfiguration_Key_Fragment_StringKey: // no validation rules for StringKey default: - return ScopedRouteConfiguration_Key_FragmentValidationError{ + err := ScopedRouteConfiguration_Key_FragmentValidationError{ field: "Type", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ScopedRouteConfiguration_Key_FragmentMultiError(errors) } return nil } +// ScopedRouteConfiguration_Key_FragmentMultiError is an error wrapping +// multiple validation errors returned by +// ScopedRouteConfiguration_Key_Fragment.ValidateAll() if the designated +// constraints aren't met. +type ScopedRouteConfiguration_Key_FragmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfiguration_Key_FragmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfiguration_Key_FragmentMultiError) AllErrors() []error { return m } + // ScopedRouteConfiguration_Key_FragmentValidationError is the validation error // returned by ScopedRouteConfiguration_Key_Fragment.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/route/v4alpha/route.pb.go b/pkg/api/envoy/config/route/v4alpha/route.pb.go deleted file mode 100644 index 1b5702da4d..0000000000 --- a/pkg/api/envoy/config/route/v4alpha/route.pb.go +++ /dev/null @@ -1,429 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/route/v4alpha/route.proto - -package envoy_config_route_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 11] -type RouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the route configuration. For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_api_msg_extensions.filters.network.http_connection_manager.v4alpha.Rds`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An array of virtual hosts that make up the route table. - VirtualHosts []*VirtualHost `protobuf:"bytes,2,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts,omitempty"` - // An array of virtual hosts will be dynamically loaded via the VHDS API. - // Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used - // for a base routing table or for infrequently changing virtual hosts. *vhds* is used for - // on-demand discovery of virtual hosts. The contents of these two fields will be merged to - // generate a routing table for a given RouteConfiguration, with *vhds* derived configuration - // taking precedence. - Vhds *Vhds `protobuf:"bytes,9,opt,name=vhds,proto3" json:"vhds,omitempty"` - // Optionally specifies a list of HTTP headers that the connection manager - // will consider to be internal only. If they are found on external requests they will be cleaned - // prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information. - InternalOnlyHeaders []string `protobuf:"bytes,3,rep,name=internal_only_headers,json=internalOnlyHeaders,proto3" json:"internal_only_headers,omitempty"` - // Specifies a list of HTTP headers that should be added to each response that - // the connection manager encodes. Headers specified at this level are applied - // after headers from any enclosed :ref:`envoy_api_msg_config.route.v4alpha.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v4alpha.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*v4alpha.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_config.route.v4alpha.VirtualHost` or - // :ref:`envoy_api_msg_config.route.v4alpha.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v4alpha.HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request - // routed by the HTTP connection manager. - RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // By default, headers that should be added/removed are evaluated from most to least specific: - // - // * route level - // * virtual host level - // * connection manager level - // - // To allow setting overrides at the route or virtual host level, this order can be reversed - // by setting this option to true. Defaults to false. - // - // [#next-major-version: In the v3 API, this will default to true.] - MostSpecificHeaderMutationsWins bool `protobuf:"varint,10,opt,name=most_specific_header_mutations_wins,json=mostSpecificHeaderMutationsWins,proto3" json:"most_specific_header_mutations_wins,omitempty"` - // An optional boolean that specifies whether the clusters that the route - // table refers to will be validated by the cluster manager. If set to true - // and a route refers to a non-existent cluster, the route table will not - // load. If set to false and a route refers to a non-existent cluster, the - // route table will load and the router filter will return a 404 if the route - // is selected at runtime. This setting defaults to true if the route table - // is statically defined via the :ref:`route_config - // ` - // option. This setting default to false if the route table is loaded dynamically via the - // :ref:`rds - // ` - // option. Users may wish to override the default behavior in certain cases (for example when - // using CDS with a static route table). - ValidateClusters *wrappers.BoolValue `protobuf:"bytes,7,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"` -} - -func (x *RouteConfiguration) Reset() { - *x = RouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteConfiguration) ProtoMessage() {} - -func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. -func (*RouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteConfiguration) GetVirtualHosts() []*VirtualHost { - if x != nil { - return x.VirtualHosts - } - return nil -} - -func (x *RouteConfiguration) GetVhds() *Vhds { - if x != nil { - return x.Vhds - } - return nil -} - -func (x *RouteConfiguration) GetInternalOnlyHeaders() []string { - if x != nil { - return x.InternalOnlyHeaders - } - return nil -} - -func (x *RouteConfiguration) GetResponseHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *RouteConfiguration) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *RouteConfiguration) GetRequestHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *RouteConfiguration) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *RouteConfiguration) GetMostSpecificHeaderMutationsWins() bool { - if x != nil { - return x.MostSpecificHeaderMutationsWins - } - return false -} - -func (x *RouteConfiguration) GetValidateClusters() *wrappers.BoolValue { - if x != nil { - return x.ValidateClusters - } - return nil -} - -type Vhds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration source specifier for VHDS. - ConfigSource *v4alpha.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` -} - -func (x *Vhds) Reset() { - *x = Vhds{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Vhds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Vhds) ProtoMessage() {} - -func (x *Vhds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Vhds.ProtoReflect.Descriptor instead. -func (*Vhds) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_proto_rawDescGZIP(), []int{1} -} - -func (x *Vhds) GetConfigSource() *v4alpha.ConfigSource { - if x != nil { - return x.ConfigSource - } - return nil -} - -var File_envoy_config_route_v4alpha_route_proto protoreflect.FileDescriptor - -var file_envoy_config_route_v4alpha_route_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x06, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, - 0x73, 0x74, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x12, 0x34, 0x0a, 0x04, 0x76, 0x68, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x56, 0x68, 0x64, 0x73, - 0x52, 0x04, 0x76, 0x68, 0x64, 0x73, 0x12, 0x44, 0x0a, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, - 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x4f, 0x6e, 0x6c, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x6e, 0x0a, 0x17, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x1a, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, - 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x6c, 0x0a, 0x16, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, - 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, - 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x6d, 0x6f, 0x73, 0x74, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x77, 0x69, 0x6e, 0x73, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x1f, 0x6d, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x57, 0x69, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x2f, 0x9a, - 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x81, - 0x01, 0x0a, 0x04, 0x56, 0x68, 0x64, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, - 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x68, - 0x64, 0x73, 0x42, 0x40, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_route_v4alpha_route_proto_rawDescOnce sync.Once - file_envoy_config_route_v4alpha_route_proto_rawDescData = file_envoy_config_route_v4alpha_route_proto_rawDesc -) - -func file_envoy_config_route_v4alpha_route_proto_rawDescGZIP() []byte { - file_envoy_config_route_v4alpha_route_proto_rawDescOnce.Do(func() { - file_envoy_config_route_v4alpha_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_route_v4alpha_route_proto_rawDescData) - }) - return file_envoy_config_route_v4alpha_route_proto_rawDescData -} - -var file_envoy_config_route_v4alpha_route_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_route_v4alpha_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.config.route.v4alpha.RouteConfiguration - (*Vhds)(nil), // 1: envoy.config.route.v4alpha.Vhds - (*VirtualHost)(nil), // 2: envoy.config.route.v4alpha.VirtualHost - (*v4alpha.HeaderValueOption)(nil), // 3: envoy.config.core.v4alpha.HeaderValueOption - (*wrappers.BoolValue)(nil), // 4: google.protobuf.BoolValue - (*v4alpha.ConfigSource)(nil), // 5: envoy.config.core.v4alpha.ConfigSource -} -var file_envoy_config_route_v4alpha_route_proto_depIdxs = []int32{ - 2, // 0: envoy.config.route.v4alpha.RouteConfiguration.virtual_hosts:type_name -> envoy.config.route.v4alpha.VirtualHost - 1, // 1: envoy.config.route.v4alpha.RouteConfiguration.vhds:type_name -> envoy.config.route.v4alpha.Vhds - 3, // 2: envoy.config.route.v4alpha.RouteConfiguration.response_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 3, // 3: envoy.config.route.v4alpha.RouteConfiguration.request_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 4, // 4: envoy.config.route.v4alpha.RouteConfiguration.validate_clusters:type_name -> google.protobuf.BoolValue - 5, // 5: envoy.config.route.v4alpha.Vhds.config_source:type_name -> envoy.config.core.v4alpha.ConfigSource - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_config_route_v4alpha_route_proto_init() } -func file_envoy_config_route_v4alpha_route_proto_init() { - if File_envoy_config_route_v4alpha_route_proto != nil { - return - } - file_envoy_config_route_v4alpha_route_components_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_route_v4alpha_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vhds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_route_v4alpha_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_route_v4alpha_route_proto_goTypes, - DependencyIndexes: file_envoy_config_route_v4alpha_route_proto_depIdxs, - MessageInfos: file_envoy_config_route_v4alpha_route_proto_msgTypes, - }.Build() - File_envoy_config_route_v4alpha_route_proto = out.File - file_envoy_config_route_v4alpha_route_proto_rawDesc = nil - file_envoy_config_route_v4alpha_route_proto_goTypes = nil - file_envoy_config_route_v4alpha_route_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/route/v4alpha/route.pb.validate.go b/pkg/api/envoy/config/route/v4alpha/route.pb.validate.go deleted file mode 100644 index d435758c8b..0000000000 --- a/pkg/api/envoy/config/route/v4alpha/route.pb.validate.go +++ /dev/null @@ -1,307 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/route/v4alpha/route.proto - -package envoy_config_route_v4alpha - -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{} -) - -// 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/pkg/api/envoy/config/route/v4alpha/route_components.pb.go b/pkg/api/envoy/config/route/v4alpha/route_components.pb.go deleted file mode 100644 index 051c3091ec..0000000000 --- a/pkg/api/envoy/config/route/v4alpha/route_components.pb.go +++ /dev/null @@ -1,7680 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/route/v4alpha/route_components.proto - -package envoy_config_route_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/metadata/v3" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/tracing/v3" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - _ "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type VirtualHost_TlsRequirementType int32 - -const ( - // No TLS requirement for the virtual host. - VirtualHost_NONE VirtualHost_TlsRequirementType = 0 - // External requests must use TLS. If a request is external and it is not - // using TLS, a 301 redirect will be sent telling the client to use HTTPS. - VirtualHost_EXTERNAL_ONLY VirtualHost_TlsRequirementType = 1 - // All requests must use TLS. If a request is not using TLS, a 301 redirect - // will be sent telling the client to use HTTPS. - VirtualHost_ALL VirtualHost_TlsRequirementType = 2 -) - -// Enum value maps for VirtualHost_TlsRequirementType. -var ( - VirtualHost_TlsRequirementType_name = map[int32]string{ - 0: "NONE", - 1: "EXTERNAL_ONLY", - 2: "ALL", - } - VirtualHost_TlsRequirementType_value = map[string]int32{ - "NONE": 0, - "EXTERNAL_ONLY": 1, - "ALL": 2, - } -) - -func (x VirtualHost_TlsRequirementType) Enum() *VirtualHost_TlsRequirementType { - p := new(VirtualHost_TlsRequirementType) - *p = x - return p -} - -func (x VirtualHost_TlsRequirementType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VirtualHost_TlsRequirementType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v4alpha_route_components_proto_enumTypes[0].Descriptor() -} - -func (VirtualHost_TlsRequirementType) Type() protoreflect.EnumType { - return &file_envoy_config_route_v4alpha_route_components_proto_enumTypes[0] -} - -func (x VirtualHost_TlsRequirementType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VirtualHost_TlsRequirementType.Descriptor instead. -func (VirtualHost_TlsRequirementType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{0, 0} -} - -type RouteAction_ClusterNotFoundResponseCode int32 - -const ( - // HTTP status code - 503 Service Unavailable. - RouteAction_SERVICE_UNAVAILABLE RouteAction_ClusterNotFoundResponseCode = 0 - // HTTP status code - 404 Not Found. - RouteAction_NOT_FOUND RouteAction_ClusterNotFoundResponseCode = 1 -) - -// Enum value maps for RouteAction_ClusterNotFoundResponseCode. -var ( - RouteAction_ClusterNotFoundResponseCode_name = map[int32]string{ - 0: "SERVICE_UNAVAILABLE", - 1: "NOT_FOUND", - } - RouteAction_ClusterNotFoundResponseCode_value = map[string]int32{ - "SERVICE_UNAVAILABLE": 0, - "NOT_FOUND": 1, - } -) - -func (x RouteAction_ClusterNotFoundResponseCode) Enum() *RouteAction_ClusterNotFoundResponseCode { - p := new(RouteAction_ClusterNotFoundResponseCode) - *p = x - return p -} - -func (x RouteAction_ClusterNotFoundResponseCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RouteAction_ClusterNotFoundResponseCode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v4alpha_route_components_proto_enumTypes[1].Descriptor() -} - -func (RouteAction_ClusterNotFoundResponseCode) Type() protoreflect.EnumType { - return &file_envoy_config_route_v4alpha_route_components_proto_enumTypes[1] -} - -func (x RouteAction_ClusterNotFoundResponseCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RouteAction_ClusterNotFoundResponseCode.Descriptor instead. -func (RouteAction_ClusterNotFoundResponseCode) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 0} -} - -// Configures :ref:`internal redirect ` behavior. -// [#next-major-version: remove this definition - it's defined in the InternalRedirectPolicy message.] -// -// Deprecated: Do not use. -type RouteAction_InternalRedirectAction int32 - -const ( - RouteAction_PASS_THROUGH_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 0 - RouteAction_HANDLE_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 1 -) - -// Enum value maps for RouteAction_InternalRedirectAction. -var ( - RouteAction_InternalRedirectAction_name = map[int32]string{ - 0: "PASS_THROUGH_INTERNAL_REDIRECT", - 1: "HANDLE_INTERNAL_REDIRECT", - } - RouteAction_InternalRedirectAction_value = map[string]int32{ - "PASS_THROUGH_INTERNAL_REDIRECT": 0, - "HANDLE_INTERNAL_REDIRECT": 1, - } -) - -func (x RouteAction_InternalRedirectAction) Enum() *RouteAction_InternalRedirectAction { - p := new(RouteAction_InternalRedirectAction) - *p = x - return p -} - -func (x RouteAction_InternalRedirectAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RouteAction_InternalRedirectAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v4alpha_route_components_proto_enumTypes[2].Descriptor() -} - -func (RouteAction_InternalRedirectAction) Type() protoreflect.EnumType { - return &file_envoy_config_route_v4alpha_route_components_proto_enumTypes[2] -} - -func (x RouteAction_InternalRedirectAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RouteAction_InternalRedirectAction.Descriptor instead. -func (RouteAction_InternalRedirectAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 1} -} - -type RetryPolicy_ResetHeaderFormat int32 - -const ( - RetryPolicy_SECONDS RetryPolicy_ResetHeaderFormat = 0 - RetryPolicy_UNIX_TIMESTAMP RetryPolicy_ResetHeaderFormat = 1 -) - -// Enum value maps for RetryPolicy_ResetHeaderFormat. -var ( - RetryPolicy_ResetHeaderFormat_name = map[int32]string{ - 0: "SECONDS", - 1: "UNIX_TIMESTAMP", - } - RetryPolicy_ResetHeaderFormat_value = map[string]int32{ - "SECONDS": 0, - "UNIX_TIMESTAMP": 1, - } -) - -func (x RetryPolicy_ResetHeaderFormat) Enum() *RetryPolicy_ResetHeaderFormat { - p := new(RetryPolicy_ResetHeaderFormat) - *p = x - return p -} - -func (x RetryPolicy_ResetHeaderFormat) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RetryPolicy_ResetHeaderFormat) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v4alpha_route_components_proto_enumTypes[3].Descriptor() -} - -func (RetryPolicy_ResetHeaderFormat) Type() protoreflect.EnumType { - return &file_envoy_config_route_v4alpha_route_components_proto_enumTypes[3] -} - -func (x RetryPolicy_ResetHeaderFormat) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RetryPolicy_ResetHeaderFormat.Descriptor instead. -func (RetryPolicy_ResetHeaderFormat) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{7, 0} -} - -type RedirectAction_RedirectResponseCode int32 - -const ( - // Moved Permanently HTTP Status Code - 301. - RedirectAction_MOVED_PERMANENTLY RedirectAction_RedirectResponseCode = 0 - // Found HTTP Status Code - 302. - RedirectAction_FOUND RedirectAction_RedirectResponseCode = 1 - // See Other HTTP Status Code - 303. - RedirectAction_SEE_OTHER RedirectAction_RedirectResponseCode = 2 - // Temporary Redirect HTTP Status Code - 307. - RedirectAction_TEMPORARY_REDIRECT RedirectAction_RedirectResponseCode = 3 - // Permanent Redirect HTTP Status Code - 308. - RedirectAction_PERMANENT_REDIRECT RedirectAction_RedirectResponseCode = 4 -) - -// Enum value maps for RedirectAction_RedirectResponseCode. -var ( - RedirectAction_RedirectResponseCode_name = map[int32]string{ - 0: "MOVED_PERMANENTLY", - 1: "FOUND", - 2: "SEE_OTHER", - 3: "TEMPORARY_REDIRECT", - 4: "PERMANENT_REDIRECT", - } - RedirectAction_RedirectResponseCode_value = map[string]int32{ - "MOVED_PERMANENTLY": 0, - "FOUND": 1, - "SEE_OTHER": 2, - "TEMPORARY_REDIRECT": 3, - "PERMANENT_REDIRECT": 4, - } -) - -func (x RedirectAction_RedirectResponseCode) Enum() *RedirectAction_RedirectResponseCode { - p := new(RedirectAction_RedirectResponseCode) - *p = x - return p -} - -func (x RedirectAction_RedirectResponseCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RedirectAction_RedirectResponseCode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v4alpha_route_components_proto_enumTypes[4].Descriptor() -} - -func (RedirectAction_RedirectResponseCode) Type() protoreflect.EnumType { - return &file_envoy_config_route_v4alpha_route_components_proto_enumTypes[4] -} - -func (x RedirectAction_RedirectResponseCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RedirectAction_RedirectResponseCode.Descriptor instead. -func (RedirectAction_RedirectResponseCode) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{9, 0} -} - -type RateLimit_Action_MetaData_Source int32 - -const ( - // Query :ref:`dynamic metadata ` - RateLimit_Action_MetaData_DYNAMIC RateLimit_Action_MetaData_Source = 0 - // Query :ref:`route entry metadata ` - RateLimit_Action_MetaData_ROUTE_ENTRY RateLimit_Action_MetaData_Source = 1 -) - -// Enum value maps for RateLimit_Action_MetaData_Source. -var ( - RateLimit_Action_MetaData_Source_name = map[int32]string{ - 0: "DYNAMIC", - 1: "ROUTE_ENTRY", - } - RateLimit_Action_MetaData_Source_value = map[string]int32{ - "DYNAMIC": 0, - "ROUTE_ENTRY": 1, - } -) - -func (x RateLimit_Action_MetaData_Source) Enum() *RateLimit_Action_MetaData_Source { - p := new(RateLimit_Action_MetaData_Source) - *p = x - return p -} - -func (x RateLimit_Action_MetaData_Source) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RateLimit_Action_MetaData_Source) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v4alpha_route_components_proto_enumTypes[5].Descriptor() -} - -func (RateLimit_Action_MetaData_Source) Type() protoreflect.EnumType { - return &file_envoy_config_route_v4alpha_route_components_proto_enumTypes[5] -} - -func (x RateLimit_Action_MetaData_Source) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RateLimit_Action_MetaData_Source.Descriptor instead. -func (RateLimit_Action_MetaData_Source) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 7, 0} -} - -// The top level element in the routing configuration is a virtual host. Each virtual host has -// a logical name as well as a set of domains that get routed to it based on the incoming request's -// host header. This allows a single listener to service multiple top level domain path trees. Once -// a virtual host is selected based on the domain, the routes are processed in order to see which -// upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 21] -type VirtualHost struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The logical name of the virtual host. This is used when emitting certain - // statistics but is not relevant for routing. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A list of domains (host/authority header) that will be matched to this - // virtual host. Wildcard hosts are supported in the suffix or prefix form. - // - // Domain search order: - // 1. Exact domain names: ``www.foo.com``. - // 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``. - // 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``. - // 4. Special wildcard ``*`` matching any domain. - // - // .. note:: - // - // The wildcard will not match the empty string. - // e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. - // The longest wildcards match first. - // Only a single virtual host in the entire route configuration can match on ``*``. A domain - // must be unique across all virtual hosts or the config will fail to load. - // - // Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. - Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` - // The list of routes that will be matched, in order, for incoming requests. - // The first route that matches will be used. - Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` - // Specifies the type of TLS enforcement the virtual host expects. If this option is not - // specified, there is no TLS requirement for the virtual host. - RequireTls VirtualHost_TlsRequirementType `protobuf:"varint,4,opt,name=require_tls,json=requireTls,proto3,enum=envoy.config.route.v4alpha.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_config.route.v4alpha.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v4alpha.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_config.route.v4alpha.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*v4alpha.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.filters.http.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]*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"` - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the upstream request. Setting this option will cause it to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the upstream - // will see the attempt count as perceived by the second Envoy. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - // - // [#next-major-version: rename to include_attempt_count_in_request.] - IncludeRequestAttemptCount bool `protobuf:"varint,14,opt,name=include_request_attempt_count,json=includeRequestAttemptCount,proto3" json:"include_request_attempt_count,omitempty"` - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the downstream response. Setting this option will cause the router to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the downstream - // will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - IncludeAttemptCountInResponse bool `protobuf:"varint,19,opt,name=include_attempt_count_in_response,json=includeAttemptCountInResponse,proto3" json:"include_attempt_count_in_response,omitempty"` - // Indicates the retry policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - RetryPolicy *RetryPolicy `protobuf:"bytes,16,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that setting a route level entry - // will take precedence over this config and it'll be treated independently (e.g.: values are not - // inherited). :ref:`Retry policy ` should not be - // set if this field is used. - RetryPolicyTypedConfig *any.Any `protobuf:"bytes,20,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` - // Indicates the hedge policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - HedgePolicy *HedgePolicy `protobuf:"bytes,17,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` - // The maximum bytes which will be buffered for retries and shadowing. - // If set and a route-specific limit is not set, the bytes actually buffered will be the minimum - // value of this and the listener per_connection_buffer_limit_bytes. - PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,18,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` -} - -func (x *VirtualHost) Reset() { - *x = VirtualHost{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VirtualHost) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualHost) ProtoMessage() {} - -func (x *VirtualHost) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualHost.ProtoReflect.Descriptor instead. -func (*VirtualHost) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{0} -} - -func (x *VirtualHost) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *VirtualHost) GetDomains() []string { - if x != nil { - return x.Domains - } - return nil -} - -func (x *VirtualHost) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -func (x *VirtualHost) GetRequireTls() VirtualHost_TlsRequirementType { - if x != nil { - return x.RequireTls - } - return VirtualHost_NONE -} - -func (x *VirtualHost) GetVirtualClusters() []*VirtualCluster { - if x != nil { - return x.VirtualClusters - } - return nil -} - -func (x *VirtualHost) GetRateLimits() []*RateLimit { - if x != nil { - return x.RateLimits - } - return nil -} - -func (x *VirtualHost) GetRequestHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *VirtualHost) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *VirtualHost) GetResponseHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *VirtualHost) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *VirtualHost) GetCors() *CorsPolicy { - if x != nil { - return x.Cors - } - return nil -} - -func (x *VirtualHost) GetTypedPerFilterConfig() map[string]*any.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -func (x *VirtualHost) GetIncludeRequestAttemptCount() bool { - if x != nil { - return x.IncludeRequestAttemptCount - } - return false -} - -func (x *VirtualHost) GetIncludeAttemptCountInResponse() bool { - if x != nil { - return x.IncludeAttemptCountInResponse - } - return false -} - -func (x *VirtualHost) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -func (x *VirtualHost) GetRetryPolicyTypedConfig() *any.Any { - if x != nil { - return x.RetryPolicyTypedConfig - } - return nil -} - -func (x *VirtualHost) GetHedgePolicy() *HedgePolicy { - if x != nil { - return x.HedgePolicy - } - return nil -} - -func (x *VirtualHost) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerRequestBufferLimitBytes - } - return nil -} - -// A filter-defined action type. -type FilterAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Action *any.Any `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` -} - -func (x *FilterAction) Reset() { - *x = FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterAction) ProtoMessage() {} - -func (x *FilterAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterAction.ProtoReflect.Descriptor instead. -func (*FilterAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{1} -} - -func (x *FilterAction) GetAction() *any.Any { - if x != nil { - return x.Action - } - return nil -} - -// A route is both a specification of how to match a request as well as an indication of what to do -// next (e.g., redirect, forward, rewrite, etc.). -// -// .. attention:: -// -// Envoy supports routing on HTTP method via :ref:`header matching -// `. -// [#next-free-field: 18] -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name for the route. - Name string `protobuf:"bytes,14,opt,name=name,proto3" json:"name,omitempty"` - // Route matching parameters. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Types that are assignable to Action: - // *Route_Route - // *Route_Redirect - // *Route_DirectResponse - // *Route_FilterAction - Action isRoute_Action `protobuf_oneof:"action"` - // The Metadata field can be used to provide additional information - // about the route. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as *envoy.filters.http.router*. - Metadata *v4alpha.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 typed_per_filter_config field can be used to provide route-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.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]*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"` - // 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_config.route.v4alpha.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v4alpha.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_config.route.v4alpha.VirtualHost` and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on - // :ref:`custom request headers `. - ResponseHeadersToAdd []*v4alpha.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each response - // to requests matching this route. - ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // Presence of the object defines whether the connection manager's tracing configuration - // is overridden by this route specific instance. - Tracing *Tracing `protobuf:"bytes,15,opt,name=tracing,proto3" json:"tracing,omitempty"` - // The maximum bytes which will be buffered for retries and shadowing. - // If set, the bytes actually buffered will be the minimum value of this and the - // listener per_connection_buffer_limit_bytes. - PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{2} -} - -func (x *Route) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Route) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (m *Route) GetAction() isRoute_Action { - if m != nil { - return m.Action - } - return nil -} - -func (x *Route) GetRoute() *RouteAction { - if x, ok := x.GetAction().(*Route_Route); ok { - return x.Route - } - return nil -} - -func (x *Route) GetRedirect() *RedirectAction { - if x, ok := x.GetAction().(*Route_Redirect); ok { - return x.Redirect - } - return nil -} - -func (x *Route) GetDirectResponse() *DirectResponseAction { - if x, ok := x.GetAction().(*Route_DirectResponse); ok { - return x.DirectResponse - } - return nil -} - -func (x *Route) GetFilterAction() *FilterAction { - if x, ok := x.GetAction().(*Route_FilterAction); ok { - return x.FilterAction - } - return nil -} - -func (x *Route) GetMetadata() *v4alpha.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Route) GetDecorator() *Decorator { - if x != nil { - return x.Decorator - } - return nil -} - -func (x *Route) GetTypedPerFilterConfig() map[string]*any.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -func (x *Route) GetRequestHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *Route) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *Route) GetResponseHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *Route) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *Route) GetTracing() *Tracing { - if x != nil { - return x.Tracing - } - return nil -} - -func (x *Route) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerRequestBufferLimitBytes - } - return nil -} - -type isRoute_Action interface { - isRoute_Action() -} - -type Route_Route struct { - // Route request to some upstream cluster. - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3,oneof"` -} - -type Route_Redirect struct { - // Return a redirect. - Redirect *RedirectAction `protobuf:"bytes,3,opt,name=redirect,proto3,oneof"` -} - -type Route_DirectResponse struct { - // Return an arbitrary HTTP response directly, without proxying. - DirectResponse *DirectResponseAction `protobuf:"bytes,7,opt,name=direct_response,json=directResponse,proto3,oneof"` -} - -type Route_FilterAction struct { - // [#not-implemented-hide:] - // If true, a filter will define the action (e.g., it could dynamically generate the - // RouteAction). - // [#comment: TODO(samflattery): Remove cleanup in route_fuzz_test.cc when - // implemented] - FilterAction *FilterAction `protobuf:"bytes,17,opt,name=filter_action,json=filterAction,proto3,oneof"` -} - -func (*Route_Route) isRoute_Action() {} - -func (*Route_Redirect) isRoute_Action() {} - -func (*Route_DirectResponse) isRoute_Action() {} - -func (*Route_FilterAction) isRoute_Action() {} - -// Compared to the :ref:`cluster ` field that specifies a -// single upstream cluster as the target of a request, the :ref:`weighted_clusters -// ` option allows for specification of -// multiple upstream clusters along with weights that indicate the percentage of -// traffic to be forwarded to each cluster. The router selects an upstream cluster based on the -// weights. -type WeightedCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies one or more upstream clusters associated with the route. - Clusters []*WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` - // Specifies the total weight across all clusters. The sum of all cluster weights must equal this - // value, which must be greater than 0. Defaults to 100. - TotalWeight *wrappers.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"` -} - -func (x *WeightedCluster) Reset() { - *x = WeightedCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster) ProtoMessage() {} - -func (x *WeightedCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster.ProtoReflect.Descriptor instead. -func (*WeightedCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{3} -} - -func (x *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { - if x != nil { - return x.Clusters - } - return nil -} - -func (x *WeightedCluster) GetTotalWeight() *wrappers.UInt32Value { - if x != nil { - return x.TotalWeight - } - return nil -} - -func (x *WeightedCluster) GetRuntimeKeyPrefix() string { - if x != nil { - return x.RuntimeKeyPrefix - } - return "" -} - -// [#next-free-field: 13] -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PathSpecifier: - // *RouteMatch_Prefix - // *RouteMatch_Path - // *RouteMatch_SafeRegex - // *RouteMatch_ConnectMatcher_ - PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"` - // Indicates that prefix/path matching should be case sensitive. The default - // is true. - CaseSensitive *wrappers.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 *v4alpha.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"` - // If specified, the client tls context will be matched against the defined - // match options. - // - // [#next-major-version: unify with RBAC] - TlsContext *RouteMatch_TlsContextMatchOptions `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{4} -} - -func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier { - if m != nil { - return m.PathSpecifier - } - return nil -} - -func (x *RouteMatch) GetPrefix() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *RouteMatch) GetPath() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_Path); ok { - return x.Path - } - return "" -} - -func (x *RouteMatch) GetSafeRegex() *v4alpha1.RegexMatcher { - if x, ok := x.GetPathSpecifier().(*RouteMatch_SafeRegex); ok { - return x.SafeRegex - } - return nil -} - -func (x *RouteMatch) GetConnectMatcher() *RouteMatch_ConnectMatcher { - if x, ok := x.GetPathSpecifier().(*RouteMatch_ConnectMatcher_); ok { - return x.ConnectMatcher - } - return nil -} - -func (x *RouteMatch) GetCaseSensitive() *wrappers.BoolValue { - if x != nil { - return x.CaseSensitive - } - return nil -} - -func (x *RouteMatch) GetRuntimeFraction() *v4alpha.RuntimeFractionalPercent { - if x != nil { - return x.RuntimeFraction - } - return nil -} - -func (x *RouteMatch) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *RouteMatch) GetQueryParameters() []*QueryParameterMatcher { - if x != nil { - return x.QueryParameters - } - return nil -} - -func (x *RouteMatch) GetGrpc() *RouteMatch_GrpcRouteMatchOptions { - if x != nil { - return x.Grpc - } - return nil -} - -func (x *RouteMatch) GetTlsContext() *RouteMatch_TlsContextMatchOptions { - if x != nil { - return x.TlsContext - } - return nil -} - -type isRouteMatch_PathSpecifier interface { - isRouteMatch_PathSpecifier() -} - -type RouteMatch_Prefix struct { - // If specified, the route is a prefix rule meaning that the prefix must - // match the beginning of the *:path* header. - Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof"` -} - -type RouteMatch_Path struct { - // If specified, the route is an exact path rule meaning that the path must - // exactly match the *:path* header once the query string is removed. - Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"` -} - -type RouteMatch_SafeRegex struct { - // If specified, the route is a regular expression rule meaning that the - // regex must match the *:path* header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the *:path* header matches the regex. - // - // [#next-major-version: In the v3 API we should redo how path specification works such - // that we utilize StringMatcher, and additionally have consistent options around whether we - // strip query strings, do a case sensitive match, etc. In the interim it will be too disruptive - // to deprecate the existing options. We should even consider whether we want to do away with - // path_specifier entirely and just rely on a set of header matchers which can already match - // on :path, etc. The issue with that is it is unclear how to generically deal with query string - // stripping. This needs more thought.] - SafeRegex *v4alpha1.RegexMatcher `protobuf:"bytes,10,opt,name=safe_regex,json=safeRegex,proto3,oneof"` -} - -type RouteMatch_ConnectMatcher_ struct { - // If this is used as the matcher, the matcher will only match CONNECT requests. - // Note that this will not match HTTP/2 upgrade-style CONNECT requests - // (WebSocket and the like) as they are normalized in Envoy as HTTP/1.1 style - // upgrades. - // This is the only way to match CONNECT requests for HTTP/1.1. For HTTP/2, - // where Extended CONNECT requests may have a path, the path matchers will work if - // there is a path present. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. - ConnectMatcher *RouteMatch_ConnectMatcher `protobuf:"bytes,12,opt,name=connect_matcher,json=connectMatcher,proto3,oneof"` -} - -func (*RouteMatch_Prefix) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_Path) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_SafeRegex) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_ConnectMatcher_) isRouteMatch_PathSpecifier() {} - -// [#next-free-field: 12] -type CorsPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies string patterns that match allowed origins. An origin is allowed if any of the - // string matchers match. - AllowOriginStringMatch []*v4alpha1.StringMatcher `protobuf:"bytes,11,rep,name=allow_origin_string_match,json=allowOriginStringMatch,proto3" json:"allow_origin_string_match,omitempty"` - // Specifies the content for the *access-control-allow-methods* header. - AllowMethods string `protobuf:"bytes,2,opt,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"` - // Specifies the content for the *access-control-allow-headers* header. - AllowHeaders string `protobuf:"bytes,3,opt,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"` - // Specifies the content for the *access-control-expose-headers* header. - ExposeHeaders string `protobuf:"bytes,4,opt,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"` - // Specifies the content for the *access-control-max-age* header. - MaxAge string `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` - // Specifies whether the resource allows credentials. - AllowCredentials *wrappers.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` - // Types that are assignable to EnabledSpecifier: - // *CorsPolicy_FilterEnabled - EnabledSpecifier isCorsPolicy_EnabledSpecifier `protobuf_oneof:"enabled_specifier"` - // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not - // enforced. - // - // This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those - // fields have to explicitly disable the filter in order for this setting to take effect. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's *Origin* to determine if it's valid but will not enforce any policies. - ShadowEnabled *v4alpha.RuntimeFractionalPercent `protobuf:"bytes,10,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` -} - -func (x *CorsPolicy) Reset() { - *x = CorsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CorsPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CorsPolicy) ProtoMessage() {} - -func (x *CorsPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CorsPolicy.ProtoReflect.Descriptor instead. -func (*CorsPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{5} -} - -func (x *CorsPolicy) GetAllowOriginStringMatch() []*v4alpha1.StringMatcher { - if x != nil { - return x.AllowOriginStringMatch - } - return nil -} - -func (x *CorsPolicy) GetAllowMethods() string { - if x != nil { - return x.AllowMethods - } - return "" -} - -func (x *CorsPolicy) GetAllowHeaders() string { - if x != nil { - return x.AllowHeaders - } - return "" -} - -func (x *CorsPolicy) GetExposeHeaders() string { - if x != nil { - return x.ExposeHeaders - } - return "" -} - -func (x *CorsPolicy) GetMaxAge() string { - if x != nil { - return x.MaxAge - } - return "" -} - -func (x *CorsPolicy) GetAllowCredentials() *wrappers.BoolValue { - if x != nil { - return x.AllowCredentials - } - return nil -} - -func (m *CorsPolicy) GetEnabledSpecifier() isCorsPolicy_EnabledSpecifier { - if m != nil { - return m.EnabledSpecifier - } - return nil -} - -func (x *CorsPolicy) GetFilterEnabled() *v4alpha.RuntimeFractionalPercent { - if x, ok := x.GetEnabledSpecifier().(*CorsPolicy_FilterEnabled); ok { - return x.FilterEnabled - } - return nil -} - -func (x *CorsPolicy) GetShadowEnabled() *v4alpha.RuntimeFractionalPercent { - if x != nil { - return x.ShadowEnabled - } - return nil -} - -type isCorsPolicy_EnabledSpecifier interface { - isCorsPolicy_EnabledSpecifier() -} - -type CorsPolicy_FilterEnabled struct { - // Specifies the % of requests for which the CORS filter is enabled. - // - // If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS - // filter will be enabled for 100% of the requests. - // - // If :ref:`runtime_key ` is - // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - FilterEnabled *v4alpha.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3,oneof"` -} - -func (*CorsPolicy_FilterEnabled) isCorsPolicy_EnabledSpecifier() {} - -// [#next-free-field: 37] -type RouteAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable 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.config.route.v4alpha.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 *v4alpha.Metadata `protobuf:"bytes,4,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` - // Indicates that during forwarding, the matched prefix (or path) should be - // swapped with this value. This option allows application URLs to be rooted - // at a different path from those exposed at the reverse proxy layer. The router filter will - // place the original path before rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of *prefix_rewrite* or - // :ref:`regex_rewrite ` - // may be specified. - // - // .. attention:: - // - // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. - // Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - // rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single - // :ref:`Route `, as shown by the below config entries: - // - // .. code-block:: yaml - // - // - match: - // prefix: "/prefix/" - // route: - // prefix_rewrite: "/" - // - match: - // prefix: "/prefix" - // route: - // prefix_rewrite: "/" - // - // Having above entries in the config, requests to */prefix* will be stripped to */*, while - // requests to */prefix/etc* will be stripped to */etc*. - PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3" json:"prefix_rewrite,omitempty"` - // Indicates that during forwarding, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. The router filter will place the original path as it was - // before the rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`prefix_rewrite ` - // or *regex_rewrite* may be specified. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - RegexRewrite *v4alpha1.RegexMatchAndSubstitute `protobuf:"bytes,32,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` - // Types that are assignable to HostRewriteSpecifier: - // *RouteAction_HostRewriteLiteral - // *RouteAction_AutoHostRewrite - // *RouteAction_HostRewriteHeader - // *RouteAction_HostRewritePathRegex - 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. A value of 0 will - // disable the route's timeout. - // - // .. note:: - // - // This timeout includes all retries. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - Timeout *duration.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` - // Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, - // although the connection manager wide :ref:`stream_idle_timeout - // ` - // will still apply. A value of 0 will completely disable the route's idle timeout, even if a - // connection manager stream idle timeout is configured. - // - // The idle timeout is distinct to :ref:`timeout - // `, which provides an upper bound - // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount - // of time the request's stream may be idle. - // - // After header decoding, the idle timeout will apply on downstream and - // upstream request events. Each time an encode/decode event for headers or - // data is processed for the stream, the timer will be reset. If the timeout - // fires, the stream is terminated with a 408 Request Timeout error code if no - // upstream response header has been received, otherwise a stream reset - // occurs. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. - IdleTimeout *duration.Duration `protobuf:"bytes,24,opt,name=idle_timeout,json=idleTimeout,proto3" 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"` - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that if this is set, it'll take - // precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, - // most internal one becomes the enforced policy). :ref:`Retry policy ` - // should not be set if this field is used. - RetryPolicyTypedConfig *any.Any `protobuf:"bytes,33,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` - // Indicates that the route has request mirroring policies. - RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,30,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` - // Optionally specifies the :ref:`routing priority `. - Priority v4alpha.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.config.core.v4alpha.RoutingPriority" json:"priority,omitempty"` - // Specifies a set of rate limit configurations that could be applied to the - // route. - RateLimits []*RateLimit `protobuf:"bytes,13,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` - // Specifies if the rate limit filter should include the virtual host rate - // limits. By default, if the route configured rate limits, the virtual host - // :ref:`rate_limits ` are not applied to the - // request. - // - // This field is deprecated. Please use :ref:`vh_rate_limits ` - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedIncludeVhRateLimits *wrappers.BoolValue `protobuf:"bytes,14,opt,name=hidden_envoy_deprecated_include_vh_rate_limits,json=hiddenEnvoyDeprecatedIncludeVhRateLimits,proto3" json:"hidden_envoy_deprecated_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"` - // Deprecated by :ref:`grpc_timeout_header_max ` - // If present, and the request is a gRPC request, use the - // `grpc-timeout header `_, - // or its default value (infinity) instead of - // :ref:`timeout `, but limit the applied timeout - // to the maximum value specified here. If configured as 0, the maximum allowed timeout for - // gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used - // and gRPC requests time out like any other requests using - // :ref:`timeout ` or its default. - // This can be used to prevent unexpected upstream request timeouts due to potentially long - // time gaps between gRPC request and response in gRPC streaming mode. - // - // .. note:: - // - // If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes - // precedence over `grpc-timeout header `_, when - // both are present. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedMaxGrpcTimeout *duration.Duration `protobuf:"bytes,23,opt,name=hidden_envoy_deprecated_max_grpc_timeout,json=hiddenEnvoyDeprecatedMaxGrpcTimeout,proto3" json:"hidden_envoy_deprecated_max_grpc_timeout,omitempty"` - // Deprecated by :ref:`grpc_timeout_header_offset `. - // If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting - // the provided duration from the header. This is useful in allowing Envoy to set its global - // timeout to be less than that of the deadline imposed by the calling client, which makes it more - // likely that Envoy will handle the timeout instead of having the call canceled by the client. - // The offset will only be applied if the provided grpc_timeout is greater than the offset. This - // ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning - // infinity). - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedGrpcTimeoutOffset *duration.Duration `protobuf:"bytes,28,opt,name=hidden_envoy_deprecated_grpc_timeout_offset,json=hiddenEnvoyDeprecatedGrpcTimeoutOffset,proto3" json:"hidden_envoy_deprecated_grpc_timeout_offset,omitempty"` - UpgradeConfigs []*RouteAction_UpgradeConfig `protobuf:"bytes,25,rep,name=upgrade_configs,json=upgradeConfigs,proto3" json:"upgrade_configs,omitempty"` - // If present, Envoy will try to follow an upstream redirect response instead of proxying the - // response back to the downstream. An upstream redirect response is defined - // by :ref:`redirect_response_codes - // `. - InternalRedirectPolicy *InternalRedirectPolicy `protobuf:"bytes,34,opt,name=internal_redirect_policy,json=internalRedirectPolicy,proto3" json:"internal_redirect_policy,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedInternalRedirectAction RouteAction_InternalRedirectAction `protobuf:"varint,26,opt,name=hidden_envoy_deprecated_internal_redirect_action,json=hiddenEnvoyDeprecatedInternalRedirectAction,proto3,enum=envoy.config.route.v4alpha.RouteAction_InternalRedirectAction" json:"hidden_envoy_deprecated_internal_redirect_action,omitempty"` - // An internal redirect is handled, iff the number of previous internal redirects that a - // downstream request has encountered is lower than this value, and - // :ref:`internal_redirect_action ` - // is set to :ref:`HANDLE_INTERNAL_REDIRECT - // ` - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or has - // :ref:`internal_redirect_action ` - // set to - // :ref:`PASS_THROUGH_INTERNAL_REDIRECT - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedMaxInternalRedirects *wrappers.UInt32Value `protobuf:"bytes,31,opt,name=hidden_envoy_deprecated_max_internal_redirects,json=hiddenEnvoyDeprecatedMaxInternalRedirects,proto3" json:"hidden_envoy_deprecated_max_internal_redirects,omitempty"` - // Indicates that the route has a hedge policy. Note that if this is set, - // it'll take precedence over the virtual host level hedge policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - HedgePolicy *HedgePolicy `protobuf:"bytes,27,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` - // Specifies the maximum stream duration for this route. - MaxStreamDuration *RouteAction_MaxStreamDuration `protobuf:"bytes,36,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` -} - -func (x *RouteAction) Reset() { - *x = RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction) ProtoMessage() {} - -func (x *RouteAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. -func (*RouteAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6} -} - -func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { - if m != nil { - return m.ClusterSpecifier - } - return nil -} - -func (x *RouteAction) GetCluster() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *RouteAction) GetClusterHeader() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_ClusterHeader); ok { - return x.ClusterHeader - } - return "" -} - -func (x *RouteAction) GetWeightedClusters() *WeightedCluster { - if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -func (x *RouteAction) GetClusterNotFoundResponseCode() RouteAction_ClusterNotFoundResponseCode { - if x != nil { - return x.ClusterNotFoundResponseCode - } - return RouteAction_SERVICE_UNAVAILABLE -} - -func (x *RouteAction) GetMetadataMatch() *v4alpha.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *RouteAction) GetPrefixRewrite() string { - if x != nil { - return x.PrefixRewrite - } - return "" -} - -func (x *RouteAction) GetRegexRewrite() *v4alpha1.RegexMatchAndSubstitute { - if x != nil { - return x.RegexRewrite - } - return nil -} - -func (m *RouteAction) GetHostRewriteSpecifier() isRouteAction_HostRewriteSpecifier { - if m != nil { - return m.HostRewriteSpecifier - } - return nil -} - -func (x *RouteAction) GetHostRewriteLiteral() string { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewriteLiteral); ok { - return x.HostRewriteLiteral - } - return "" -} - -func (x *RouteAction) GetAutoHostRewrite() *wrappers.BoolValue { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_AutoHostRewrite); ok { - return x.AutoHostRewrite - } - return nil -} - -func (x *RouteAction) GetHostRewriteHeader() string { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewriteHeader); ok { - return x.HostRewriteHeader - } - return "" -} - -func (x *RouteAction) GetHostRewritePathRegex() *v4alpha1.RegexMatchAndSubstitute { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewritePathRegex); ok { - return x.HostRewritePathRegex - } - return nil -} - -func (x *RouteAction) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *RouteAction) GetIdleTimeout() *duration.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *RouteAction) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -func (x *RouteAction) GetRetryPolicyTypedConfig() *any.Any { - if x != nil { - return x.RetryPolicyTypedConfig - } - return nil -} - -func (x *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { - if x != nil { - return x.RequestMirrorPolicies - } - return nil -} - -func (x *RouteAction) GetPriority() v4alpha.RoutingPriority { - if x != nil { - return x.Priority - } - return v4alpha.RoutingPriority_DEFAULT -} - -func (x *RouteAction) GetRateLimits() []*RateLimit { - if x != nil { - return x.RateLimits - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetHiddenEnvoyDeprecatedIncludeVhRateLimits() *wrappers.BoolValue { - if x != nil { - return x.HiddenEnvoyDeprecatedIncludeVhRateLimits - } - return nil -} - -func (x *RouteAction) GetHashPolicy() []*RouteAction_HashPolicy { - if x != nil { - return x.HashPolicy - } - return nil -} - -func (x *RouteAction) GetCors() *CorsPolicy { - if x != nil { - return x.Cors - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetHiddenEnvoyDeprecatedMaxGrpcTimeout() *duration.Duration { - if x != nil { - return x.HiddenEnvoyDeprecatedMaxGrpcTimeout - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetHiddenEnvoyDeprecatedGrpcTimeoutOffset() *duration.Duration { - if x != nil { - return x.HiddenEnvoyDeprecatedGrpcTimeoutOffset - } - return nil -} - -func (x *RouteAction) GetUpgradeConfigs() []*RouteAction_UpgradeConfig { - if x != nil { - return x.UpgradeConfigs - } - return nil -} - -func (x *RouteAction) GetInternalRedirectPolicy() *InternalRedirectPolicy { - if x != nil { - return x.InternalRedirectPolicy - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetHiddenEnvoyDeprecatedInternalRedirectAction() RouteAction_InternalRedirectAction { - if x != nil { - return x.HiddenEnvoyDeprecatedInternalRedirectAction - } - return RouteAction_PASS_THROUGH_INTERNAL_REDIRECT -} - -// Deprecated: Do not use. -func (x *RouteAction) GetHiddenEnvoyDeprecatedMaxInternalRedirects() *wrappers.UInt32Value { - if x != nil { - return x.HiddenEnvoyDeprecatedMaxInternalRedirects - } - return nil -} - -func (x *RouteAction) GetHedgePolicy() *HedgePolicy { - if x != nil { - return x.HedgePolicy - } - return nil -} - -func (x *RouteAction) GetMaxStreamDuration() *RouteAction_MaxStreamDuration { - if x != nil { - return x.MaxStreamDuration - } - return nil -} - -type isRouteAction_ClusterSpecifier interface { - isRouteAction_ClusterSpecifier() -} - -type RouteAction_Cluster struct { - // Indicates the upstream cluster to which the request should be routed - // to. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` -} - -type RouteAction_ClusterHeader struct { - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - // *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - ClusterHeader string `protobuf:"bytes,2,opt,name=cluster_header,json=clusterHeader,proto3,oneof"` -} - -type RouteAction_WeightedClusters struct { - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. See - // :ref:`traffic splitting ` - // for additional documentation. - WeightedClusters *WeightedCluster `protobuf:"bytes,3,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} - -func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} - -type isRouteAction_HostRewriteSpecifier interface { - isRouteAction_HostRewriteSpecifier() -} - -type RouteAction_HostRewriteLiteral struct { - // Indicates that during forwarding, the host header will be swapped with - // this value. - HostRewriteLiteral string `protobuf:"bytes,6,opt,name=host_rewrite_literal,json=hostRewriteLiteral,proto3,oneof"` -} - -type RouteAction_AutoHostRewrite struct { - // Indicates that during forwarding, the host header will be swapped with - // the hostname of the upstream host chosen by the cluster manager. This - // option is applicable only when the destination cluster for a route is of - // type *strict_dns* or *logical_dns*. Setting this to true with other cluster - // types has no effect. - AutoHostRewrite *wrappers.BoolValue `protobuf:"bytes,7,opt,name=auto_host_rewrite,json=autoHostRewrite,proto3,oneof"` -} - -type RouteAction_HostRewriteHeader struct { - // Indicates that during forwarding, the host header will be swapped with the content of given - // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. - // - // .. attention:: - // - // Pay attention to the potential security implications of using this option. Provided header - // must come from trusted source. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - HostRewriteHeader string `protobuf:"bytes,29,opt,name=host_rewrite_header,json=hostRewriteHeader,proto3,oneof"` -} - -type RouteAction_HostRewritePathRegex struct { - // Indicates that during forwarding, the host header will be swapped with - // the result of the regex substitution executed on path value with query and fragment removed. - // This is useful for transitioning variable content between path segment and subdomain. - // - // For example with the following config: - // - // .. code-block:: yaml - // - // host_rewrite_path_regex: - // pattern: - // google_re2: {} - // regex: "^/(.+)/.+$" - // substitution: \1 - // - // Would rewrite the host header to `envoyproxy.io` given the path `/envoyproxy.io/some/path`. - HostRewritePathRegex *v4alpha1.RegexMatchAndSubstitute `protobuf:"bytes,35,opt,name=host_rewrite_path_regex,json=hostRewritePathRegex,proto3,oneof"` -} - -func (*RouteAction_HostRewriteLiteral) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_AutoHostRewrite) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_HostRewriteHeader) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_HostRewritePathRegex) isRouteAction_HostRewriteSpecifier() {} - -// HTTP retry :ref:`architecture overview `. -// [#next-free-field: 12] -type RetryPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the conditions under which retry takes place. These are the same - // conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and - // :ref:`config_http_filters_router_x-envoy-retry-grpc-on`. - RetryOn string `protobuf:"bytes,1,opt,name=retry_on,json=retryOn,proto3" json:"retry_on,omitempty"` - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. These are the same conditions documented for - // :ref:`config_http_filters_router_x-envoy-max-retries`. - MaxRetries *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_retries,json=maxRetries,proto3" json:"max_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 *duration.Duration `protobuf:"bytes,3,opt,name=per_try_timeout,json=perTryTimeout,proto3" 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 exponential retry back off. This parameter is optional, in which case the - // default base interval is 25 milliseconds or, if set, the current value of the - // `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times - // the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` - // describes Envoy's back-off algorithm. - RetryBackOff *RetryPolicy_RetryBackOff `protobuf:"bytes,8,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` - // Specifies parameters that control a retry back-off strategy that is used - // when the request is rate limited by the upstream server. The server may - // return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to - // provide feedback to the client on how long to wait before retrying. If - // configured, this back-off strategy will be used instead of the - // default exponential back off strategy (configured using `retry_back_off`) - // whenever a response includes the matching headers. - RateLimitedRetryBackOff *RetryPolicy_RateLimitedRetryBackOff `protobuf:"bytes,11,opt,name=rate_limited_retry_back_off,json=rateLimitedRetryBackOff,proto3" json:"rate_limited_retry_back_off,omitempty"` - // HTTP response headers that trigger a retry if present in the response. A retry will be - // triggered if any of the header matches match the upstream response headers. - // The field is only consulted if 'retriable-headers' retry policy is active. - RetriableHeaders []*HeaderMatcher `protobuf:"bytes,9,rep,name=retriable_headers,json=retriableHeaders,proto3" json:"retriable_headers,omitempty"` - // HTTP headers which must be present in the request for retries to be attempted. - RetriableRequestHeaders []*HeaderMatcher `protobuf:"bytes,10,rep,name=retriable_request_headers,json=retriableRequestHeaders,proto3" json:"retriable_request_headers,omitempty"` -} - -func (x *RetryPolicy) Reset() { - *x = RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy) ProtoMessage() {} - -func (x *RetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead. -func (*RetryPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{7} -} - -func (x *RetryPolicy) GetRetryOn() string { - if x != nil { - return x.RetryOn - } - return "" -} - -func (x *RetryPolicy) GetMaxRetries() *wrappers.UInt32Value { - if x != nil { - return x.MaxRetries - } - return nil -} - -func (x *RetryPolicy) GetPerTryTimeout() *duration.Duration { - if x != nil { - return x.PerTryTimeout - } - return nil -} - -func (x *RetryPolicy) GetRetryPriority() *RetryPolicy_RetryPriority { - if x != nil { - return x.RetryPriority - } - return nil -} - -func (x *RetryPolicy) GetRetryHostPredicate() []*RetryPolicy_RetryHostPredicate { - if x != nil { - return x.RetryHostPredicate - } - return nil -} - -func (x *RetryPolicy) GetHostSelectionRetryMaxAttempts() int64 { - if x != nil { - return x.HostSelectionRetryMaxAttempts - } - return 0 -} - -func (x *RetryPolicy) GetRetriableStatusCodes() []uint32 { - if x != nil { - return x.RetriableStatusCodes - } - return nil -} - -func (x *RetryPolicy) GetRetryBackOff() *RetryPolicy_RetryBackOff { - if x != nil { - return x.RetryBackOff - } - return nil -} - -func (x *RetryPolicy) GetRateLimitedRetryBackOff() *RetryPolicy_RateLimitedRetryBackOff { - if x != nil { - return x.RateLimitedRetryBackOff - } - return nil -} - -func (x *RetryPolicy) GetRetriableHeaders() []*HeaderMatcher { - if x != nil { - return x.RetriableHeaders - } - return nil -} - -func (x *RetryPolicy) GetRetriableRequestHeaders() []*HeaderMatcher { - if x != nil { - return x.RetriableRequestHeaders - } - return nil -} - -// HTTP request hedging :ref:`architecture overview `. -type HedgePolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the number of initial requests that should be sent upstream. - // Must be at least 1. - // Defaults to 1. - // [#not-implemented-hide:] - InitialRequests *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=initial_requests,json=initialRequests,proto3" json:"initial_requests,omitempty"` - // Specifies a probability that an additional upstream request should be sent - // on top of what is specified by initial_requests. - // Defaults to 0. - // [#not-implemented-hide:] - AdditionalRequestChance *v3.FractionalPercent `protobuf:"bytes,2,opt,name=additional_request_chance,json=additionalRequestChance,proto3" json:"additional_request_chance,omitempty"` - // Indicates that a hedged request should be sent when the per-try timeout is hit. - // This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight. - // The first request to complete successfully will be the one returned to the caller. - // - // * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client. - // * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client - // if there are no more retries left. - // * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. - // - // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least - // one error code and specifies a maximum number of retries. - // - // Defaults to false. - HedgeOnPerTryTimeout bool `protobuf:"varint,3,opt,name=hedge_on_per_try_timeout,json=hedgeOnPerTryTimeout,proto3" json:"hedge_on_per_try_timeout,omitempty"` -} - -func (x *HedgePolicy) Reset() { - *x = HedgePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HedgePolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HedgePolicy) ProtoMessage() {} - -func (x *HedgePolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HedgePolicy.ProtoReflect.Descriptor instead. -func (*HedgePolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{8} -} - -func (x *HedgePolicy) GetInitialRequests() *wrappers.UInt32Value { - if x != nil { - return x.InitialRequests - } - return nil -} - -func (x *HedgePolicy) GetAdditionalRequestChance() *v3.FractionalPercent { - if x != nil { - return x.AdditionalRequestChance - } - return nil -} - -func (x *HedgePolicy) GetHedgeOnPerTryTimeout() bool { - if x != nil { - return x.HedgeOnPerTryTimeout - } - return false -} - -// [#next-free-field: 10] -type RedirectAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // When the scheme redirection take place, the following rules apply: - // 1. If the source URI scheme is `http` and the port is explicitly - // set to `:80`, the port will be removed after the redirection - // 2. If the source URI scheme is `https` and the port is explicitly - // set to `:443`, the port will be removed after the redirection - // - // Types that are assignable to SchemeRewriteSpecifier: - // *RedirectAction_HttpsRedirect - // *RedirectAction_SchemeRedirect - SchemeRewriteSpecifier isRedirectAction_SchemeRewriteSpecifier `protobuf_oneof:"scheme_rewrite_specifier"` - // The host portion of the URL will be swapped with this value. - HostRedirect string `protobuf:"bytes,1,opt,name=host_redirect,json=hostRedirect,proto3" json:"host_redirect,omitempty"` - // The port value of the URL will be swapped with this value. - PortRedirect uint32 `protobuf:"varint,8,opt,name=port_redirect,json=portRedirect,proto3" json:"port_redirect,omitempty"` - // Types that are assignable to PathRewriteSpecifier: - // *RedirectAction_PathRedirect - // *RedirectAction_PrefixRewrite - // *RedirectAction_RegexRewrite - PathRewriteSpecifier isRedirectAction_PathRewriteSpecifier `protobuf_oneof:"path_rewrite_specifier"` - // The HTTP status code to use in the redirect response. The default response - // code is MOVED_PERMANENTLY (301). - ResponseCode RedirectAction_RedirectResponseCode `protobuf:"varint,3,opt,name=response_code,json=responseCode,proto3,enum=envoy.config.route.v4alpha.RedirectAction_RedirectResponseCode" json:"response_code,omitempty"` - // Indicates that during redirection, the query portion of the URL will - // be removed. Default value is false. - StripQuery bool `protobuf:"varint,6,opt,name=strip_query,json=stripQuery,proto3" json:"strip_query,omitempty"` -} - -func (x *RedirectAction) Reset() { - *x = RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedirectAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedirectAction) ProtoMessage() {} - -func (x *RedirectAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedirectAction.ProtoReflect.Descriptor instead. -func (*RedirectAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{9} -} - -func (m *RedirectAction) GetSchemeRewriteSpecifier() isRedirectAction_SchemeRewriteSpecifier { - if m != nil { - return m.SchemeRewriteSpecifier - } - return nil -} - -func (x *RedirectAction) GetHttpsRedirect() bool { - if x, ok := x.GetSchemeRewriteSpecifier().(*RedirectAction_HttpsRedirect); ok { - return x.HttpsRedirect - } - return false -} - -func (x *RedirectAction) GetSchemeRedirect() string { - if x, ok := x.GetSchemeRewriteSpecifier().(*RedirectAction_SchemeRedirect); ok { - return x.SchemeRedirect - } - return "" -} - -func (x *RedirectAction) GetHostRedirect() string { - if x != nil { - return x.HostRedirect - } - return "" -} - -func (x *RedirectAction) GetPortRedirect() uint32 { - if x != nil { - return x.PortRedirect - } - return 0 -} - -func (m *RedirectAction) GetPathRewriteSpecifier() isRedirectAction_PathRewriteSpecifier { - if m != nil { - return m.PathRewriteSpecifier - } - return nil -} - -func (x *RedirectAction) GetPathRedirect() string { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_PathRedirect); ok { - return x.PathRedirect - } - return "" -} - -func (x *RedirectAction) GetPrefixRewrite() string { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_PrefixRewrite); ok { - return x.PrefixRewrite - } - return "" -} - -func (x *RedirectAction) GetRegexRewrite() *v4alpha1.RegexMatchAndSubstitute { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_RegexRewrite); ok { - return x.RegexRewrite - } - return nil -} - -func (x *RedirectAction) GetResponseCode() RedirectAction_RedirectResponseCode { - if x != nil { - return x.ResponseCode - } - return RedirectAction_MOVED_PERMANENTLY -} - -func (x *RedirectAction) GetStripQuery() bool { - if x != nil { - return x.StripQuery - } - return false -} - -type isRedirectAction_SchemeRewriteSpecifier interface { - isRedirectAction_SchemeRewriteSpecifier() -} - -type RedirectAction_HttpsRedirect struct { - // The scheme portion of the URL will be swapped with "https". - HttpsRedirect bool `protobuf:"varint,4,opt,name=https_redirect,json=httpsRedirect,proto3,oneof"` -} - -type RedirectAction_SchemeRedirect struct { - // The scheme portion of the URL will be swapped with this value. - SchemeRedirect string `protobuf:"bytes,7,opt,name=scheme_redirect,json=schemeRedirect,proto3,oneof"` -} - -func (*RedirectAction_HttpsRedirect) isRedirectAction_SchemeRewriteSpecifier() {} - -func (*RedirectAction_SchemeRedirect) isRedirectAction_SchemeRewriteSpecifier() {} - -type isRedirectAction_PathRewriteSpecifier interface { - isRedirectAction_PathRewriteSpecifier() -} - -type RedirectAction_PathRedirect struct { - // The path portion of the URL will be swapped with this value. - // Please note that query string in path_redirect will override the - // request's query string and will not be stripped. - // - // For example, let's say we have the following routes: - // - // - match: { path: "/old-path-1" } - // redirect: { path_redirect: "/new-path-1" } - // - match: { path: "/old-path-2" } - // redirect: { path_redirect: "/new-path-2", strip-query: "true" } - // - match: { path: "/old-path-3" } - // redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } - // - // 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" - // 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" - // 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1" - PathRedirect string `protobuf:"bytes,2,opt,name=path_redirect,json=pathRedirect,proto3,oneof"` -} - -type RedirectAction_PrefixRewrite struct { - // Indicates that during redirection, the matched prefix (or path) - // should be swapped with this value. This option allows redirect URLs be dynamically created - // based on the request. - // - // .. attention:: - // - // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. - PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3,oneof"` -} - -type RedirectAction_RegexRewrite struct { - // Indicates that during redirect, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - RegexRewrite *v4alpha1.RegexMatchAndSubstitute `protobuf:"bytes,9,opt,name=regex_rewrite,json=regexRewrite,proto3,oneof"` -} - -func (*RedirectAction_PathRedirect) isRedirectAction_PathRewriteSpecifier() {} - -func (*RedirectAction_PrefixRewrite) isRedirectAction_PathRewriteSpecifier() {} - -func (*RedirectAction_RegexRewrite) isRedirectAction_PathRewriteSpecifier() {} - -type DirectResponseAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the HTTP response status to be returned. - Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` - // Specifies the content of the response body. If this setting is omitted, - // no body is included in the generated response. - // - // .. note:: - // - // Headers can be specified using *response_headers_to_add* in the enclosing - // :ref:`envoy_api_msg_config.route.v4alpha.Route`, :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` or - // :ref:`envoy_api_msg_config.route.v4alpha.VirtualHost`. - Body *v4alpha.DataSource `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *DirectResponseAction) Reset() { - *x = DirectResponseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DirectResponseAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DirectResponseAction) ProtoMessage() {} - -func (x *DirectResponseAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DirectResponseAction.ProtoReflect.Descriptor instead. -func (*DirectResponseAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{10} -} - -func (x *DirectResponseAction) GetStatus() uint32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *DirectResponseAction) GetBody() *v4alpha.DataSource { - if x != nil { - return x.Body - } - return nil -} - -type Decorator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The operation name associated with the request matched to this route. If tracing is - // enabled, this information will be used as the span name reported for this request. - // - // .. note:: - // - // For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden - // by the :ref:`x-envoy-decorator-operation - // ` header. - Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` - // Whether the decorated details should be propagated to the other party. The default is true. - Propagate *wrappers.BoolValue `protobuf:"bytes,2,opt,name=propagate,proto3" json:"propagate,omitempty"` -} - -func (x *Decorator) Reset() { - *x = Decorator{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decorator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decorator) ProtoMessage() {} - -func (x *Decorator) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decorator.ProtoReflect.Descriptor instead. -func (*Decorator) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{11} -} - -func (x *Decorator) GetOperation() string { - if x != nil { - return x.Operation - } - return "" -} - -func (x *Decorator) GetPropagate() *wrappers.BoolValue { - if x != nil { - return x.Propagate - } - return nil -} - -type Tracing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_sampling' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - ClientSampling *v3.FractionalPercent `protobuf:"bytes,1,opt,name=client_sampling,json=clientSampling,proto3" json:"client_sampling,omitempty"` - // Target percentage of requests managed by this HTTP connection manager that will be randomly - // selected for trace generation, if not requested by the client or not forced. This field is - // a direct analog for the runtime variable 'tracing.random_sampling' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - RandomSampling *v3.FractionalPercent `protobuf:"bytes,2,opt,name=random_sampling,json=randomSampling,proto3" json:"random_sampling,omitempty"` - // Target percentage of requests managed by this HTTP connection manager that will be traced - // after all other sampling checks have been applied (client-directed, force tracing, random - // sampling). This field functions as an upper limit on the total configured sampling rate. For - // instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% - // of client requests with the appropriate headers to be force traced. This field is a direct - // analog for the runtime variable 'tracing.global_enabled' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - OverallSampling *v3.FractionalPercent `protobuf:"bytes,3,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` - // A list of custom tags with unique tag name to create tags for the active span. - // It will take effect after merging with the :ref:`corresponding configuration - // ` - // configured in the HTTP connection manager. If two tags with the same name are configured - // each in the HTTP connection manager and the route level, the one configured here takes - // priority. - CustomTags []*v31.CustomTag `protobuf:"bytes,4,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` -} - -func (x *Tracing) Reset() { - *x = Tracing{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tracing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tracing) ProtoMessage() {} - -func (x *Tracing) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tracing.ProtoReflect.Descriptor instead. -func (*Tracing) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{12} -} - -func (x *Tracing) GetClientSampling() *v3.FractionalPercent { - if x != nil { - return x.ClientSampling - } - return nil -} - -func (x *Tracing) GetRandomSampling() *v3.FractionalPercent { - if x != nil { - return x.RandomSampling - } - return nil -} - -func (x *Tracing) GetOverallSampling() *v3.FractionalPercent { - if x != nil { - return x.OverallSampling - } - return nil -} - -func (x *Tracing) GetCustomTags() []*v31.CustomTag { - if x != nil { - return x.CustomTags - } - return nil -} - -// A virtual cluster is a way of specifying a regex matching rule against -// certain important endpoints such that statistics are generated explicitly for -// the matched requests. The reason this is useful is that when doing -// prefix/path matching Envoy does not always know what the application -// considers to be an endpoint. Thus, it’s impossible for Envoy to generically -// emit per endpoint statistics. However, often systems have highly critical -// endpoints that they wish to get “perfect” statistics on. Virtual cluster -// statistics are perfect in the sense that they are emitted on the downstream -// side such that they include network level failures. -// -// Documentation for :ref:`virtual cluster statistics `. -// -// .. note:: -// -// Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for -// every application endpoint. This is both not easily maintainable and as well the matching and -// statistics output are not free. -type VirtualCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies a list of header matchers to use for matching requests. Each specified header must - // match. The pseudo-headers `:path` and `:method` can be used to match the request path and - // method, respectively. - Headers []*HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` - // Specifies the name of the virtual cluster. The virtual cluster name as well - // as the virtual host name are used when emitting statistics. The statistics are emitted by the - // router filter and are documented :ref:`here `. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *VirtualCluster) Reset() { - *x = VirtualCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VirtualCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualCluster) ProtoMessage() {} - -func (x *VirtualCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualCluster.ProtoReflect.Descriptor instead. -func (*VirtualCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{13} -} - -func (x *VirtualCluster) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *VirtualCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Global rate limiting :ref:`architecture overview `. -type RateLimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Refers to the stage set in the filter. The rate limit configuration only - // applies to filters with the same stage number. The default stage number is - // 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - Stage *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=stage,proto3" json:"stage,omitempty"` - // The key to be set in runtime to disable this rate limit configuration. - DisableKey string `protobuf:"bytes,2,opt,name=disable_key,json=disableKey,proto3" json:"disable_key,omitempty"` - // A list of actions that are to be applied for this rate limit configuration. - // Order matters as the actions are processed sequentially and the descriptor - // is composed by appending descriptor entries in that sequence. If an action - // cannot append a descriptor entry, no descriptor is generated for the - // configuration. See :ref:`composing actions - // ` for additional documentation. - Actions []*RateLimit_Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` - // An optional limit override to be appended to the descriptor produced by this - // rate limit configuration. If the override value is invalid or cannot be resolved - // from metadata, no override is provided. See :ref:`rate limit override - // ` for more information. - Limit *RateLimit_Override `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit,omitempty"` -} - -func (x *RateLimit) Reset() { - *x = RateLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit) ProtoMessage() {} - -func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. -func (*RateLimit) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14} -} - -func (x *RateLimit) GetStage() *wrappers.UInt32Value { - if x != nil { - return x.Stage - } - return nil -} - -func (x *RateLimit) GetDisableKey() string { - if x != nil { - return x.DisableKey - } - return "" -} - -func (x *RateLimit) GetActions() []*RateLimit_Action { - if x != nil { - return x.Actions - } - return nil -} - -func (x *RateLimit) GetLimit() *RateLimit_Override { - if x != nil { - return x.Limit - } - return nil -} - -// .. attention:: -// -// Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* -// header. Thus, if attempting to match on *Host*, match on *:authority* instead. -// -// .. attention:: -// -// To route on HTTP method, use the special HTTP/2 *:method* header. This works for both -// HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., -// -// .. code-block:: json -// -// { -// "name": ":method", -// "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. -// -// [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// [#next-free-field: 13] -type HeaderMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the name of the header in the request. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Specifies how the header match will be performed to route the request. - // - // Types that are assignable to HeaderMatchSpecifier: - // *HeaderMatcher_ExactMatch - // *HeaderMatcher_SafeRegexMatch - // *HeaderMatcher_RangeMatch - // *HeaderMatcher_PresentMatch - // *HeaderMatcher_PrefixMatch - // *HeaderMatcher_SuffixMatch - // *HeaderMatcher_ContainsMatch - 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"` -} - -func (x *HeaderMatcher) Reset() { - *x = HeaderMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMatcher) ProtoMessage() {} - -func (x *HeaderMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMatcher.ProtoReflect.Descriptor instead. -func (*HeaderMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{15} -} - -func (x *HeaderMatcher) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier { - if m != nil { - return m.HeaderMatchSpecifier - } - return nil -} - -func (x *HeaderMatcher) GetExactMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_ExactMatch); ok { - return x.ExactMatch - } - return "" -} - -func (x *HeaderMatcher) GetSafeRegexMatch() *v4alpha1.RegexMatcher { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SafeRegexMatch); ok { - return x.SafeRegexMatch - } - return nil -} - -func (x *HeaderMatcher) GetRangeMatch() *v3.Int64Range { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_RangeMatch); ok { - return x.RangeMatch - } - return nil -} - -func (x *HeaderMatcher) GetPresentMatch() bool { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -func (x *HeaderMatcher) GetPrefixMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_PrefixMatch); ok { - return x.PrefixMatch - } - return "" -} - -func (x *HeaderMatcher) GetSuffixMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SuffixMatch); ok { - return x.SuffixMatch - } - return "" -} - -func (x *HeaderMatcher) GetContainsMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_ContainsMatch); ok { - return x.ContainsMatch - } - return "" -} - -func (x *HeaderMatcher) GetInvertMatch() bool { - if x != nil { - return x.InvertMatch - } - return false -} - -type isHeaderMatcher_HeaderMatchSpecifier interface { - isHeaderMatcher_HeaderMatchSpecifier() -} - -type HeaderMatcher_ExactMatch struct { - // If specified, header match will be performed based on the value of the header. - ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"` -} - -type HeaderMatcher_SafeRegexMatch struct { - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. - SafeRegexMatch *v4alpha1.RegexMatcher `protobuf:"bytes,11,opt,name=safe_regex_match,json=safeRegexMatch,proto3,oneof"` -} - -type HeaderMatcher_RangeMatch struct { - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting of - // an optional plus or minus sign followed by a sequence of digits. The rule will not match if - // the header value does not represent an integer. Match will fail for empty values, floating - // point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, - // "-1somestring" - RangeMatch *v3.Int64Range `protobuf:"bytes,6,opt,name=range_match,json=rangeMatch,proto3,oneof"` -} - -type HeaderMatcher_PresentMatch struct { - // If specified, header match will be performed based on whether the header is in the - // request. - PresentMatch bool `protobuf:"varint,7,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -type HeaderMatcher_PrefixMatch struct { - // If specified, header match will be performed based on the prefix of the header value. - // Note: empty prefix is not allowed, please use present_match instead. - // - // Examples: - // - // * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. - PrefixMatch string `protobuf:"bytes,9,opt,name=prefix_match,json=prefixMatch,proto3,oneof"` -} - -type HeaderMatcher_SuffixMatch struct { - // If specified, header match will be performed based on the suffix of the header value. - // Note: empty suffix is not allowed, please use present_match instead. - // - // Examples: - // - // * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. - SuffixMatch string `protobuf:"bytes,10,opt,name=suffix_match,json=suffixMatch,proto3,oneof"` -} - -type HeaderMatcher_ContainsMatch struct { - // If specified, header match will be performed based on whether the header value contains - // the given value or not. - // Note: empty contains match is not allowed, please use present_match instead. - // - // Examples: - // - // * The value *abcd* matches the value *xyzabcdpqr*, but not for *xyzbcdpqr*. - ContainsMatch string `protobuf:"bytes,12,opt,name=contains_match,json=containsMatch,proto3,oneof"` -} - -func (*HeaderMatcher_ExactMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_SafeRegexMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_RangeMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_PresentMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_PrefixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_SuffixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_ContainsMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -// Query parameter matching treats the query string of a request's :path header -// as an ampersand-separated list of keys and/or key=value elements. -// [#next-free-field: 7] -type QueryParameterMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the name of a key that must be present in the requested - // *path*'s query string. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to QueryParameterMatchSpecifier: - // *QueryParameterMatcher_StringMatch - // *QueryParameterMatcher_PresentMatch - QueryParameterMatchSpecifier isQueryParameterMatcher_QueryParameterMatchSpecifier `protobuf_oneof:"query_parameter_match_specifier"` -} - -func (x *QueryParameterMatcher) Reset() { - *x = QueryParameterMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParameterMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParameterMatcher) ProtoMessage() {} - -func (x *QueryParameterMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryParameterMatcher.ProtoReflect.Descriptor instead. -func (*QueryParameterMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryParameterMatcher) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *QueryParameterMatcher) GetQueryParameterMatchSpecifier() isQueryParameterMatcher_QueryParameterMatchSpecifier { - if m != nil { - return m.QueryParameterMatchSpecifier - } - return nil -} - -func (x *QueryParameterMatcher) GetStringMatch() *v4alpha1.StringMatcher { - if x, ok := x.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_StringMatch); ok { - return x.StringMatch - } - return nil -} - -func (x *QueryParameterMatcher) GetPresentMatch() bool { - if x, ok := x.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -type isQueryParameterMatcher_QueryParameterMatchSpecifier interface { - isQueryParameterMatcher_QueryParameterMatchSpecifier() -} - -type QueryParameterMatcher_StringMatch struct { - // Specifies whether a query parameter value should match against a string. - StringMatch *v4alpha1.StringMatcher `protobuf:"bytes,5,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -type QueryParameterMatcher_PresentMatch struct { - // Specifies whether a query parameter should be present. - PresentMatch bool `protobuf:"varint,6,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -func (*QueryParameterMatcher_StringMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} - -func (*QueryParameterMatcher_PresentMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} - -// HTTP Internal Redirect :ref:`architecture overview `. -type InternalRedirectPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An internal redirect is not handled, unless the number of previous internal redirects that a - // downstream request has encountered is lower than this value. - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or does not set :ref:`internal_redirect_policy - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - MaxInternalRedirects *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_internal_redirects,json=maxInternalRedirects,proto3" json:"max_internal_redirects,omitempty"` - // Defines what upstream response codes are allowed to trigger internal redirect. If unspecified, - // only 302 will be treated as internal redirect. - // Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored. - RedirectResponseCodes []uint32 `protobuf:"varint,2,rep,packed,name=redirect_response_codes,json=redirectResponseCodes,proto3" json:"redirect_response_codes,omitempty"` - // Specifies a list of predicates that are queried when an upstream response is deemed - // to trigger an internal redirect by all other criteria. Any predicate in the list can reject - // the redirect, causing the response to be proxied to downstream. - Predicates []*v4alpha.TypedExtensionConfig `protobuf:"bytes,3,rep,name=predicates,proto3" json:"predicates,omitempty"` - // Allow internal redirect to follow a target URI with a different scheme than the value of - // x-forwarded-proto. The default is false. - AllowCrossSchemeRedirect bool `protobuf:"varint,4,opt,name=allow_cross_scheme_redirect,json=allowCrossSchemeRedirect,proto3" json:"allow_cross_scheme_redirect,omitempty"` -} - -func (x *InternalRedirectPolicy) Reset() { - *x = InternalRedirectPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InternalRedirectPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InternalRedirectPolicy) ProtoMessage() {} - -func (x *InternalRedirectPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InternalRedirectPolicy.ProtoReflect.Descriptor instead. -func (*InternalRedirectPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{17} -} - -func (x *InternalRedirectPolicy) GetMaxInternalRedirects() *wrappers.UInt32Value { - if x != nil { - return x.MaxInternalRedirects - } - return nil -} - -func (x *InternalRedirectPolicy) GetRedirectResponseCodes() []uint32 { - if x != nil { - return x.RedirectResponseCodes - } - return nil -} - -func (x *InternalRedirectPolicy) GetPredicates() []*v4alpha.TypedExtensionConfig { - if x != nil { - return x.Predicates - } - return nil -} - -func (x *InternalRedirectPolicy) GetAllowCrossSchemeRedirect() bool { - if x != nil { - return x.AllowCrossSchemeRedirect - } - return false -} - -// [#next-free-field: 11] -type WeightedCluster_ClusterWeight struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with - // values here taking precedence. The filter name should be specified as *envoy.lb*. - MetadataMatch *v4alpha.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_config.route.v4alpha.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v4alpha.Route`, :ref:`envoy_api_msg_config.route.v4alpha.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v4alpha.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_config.route.v4alpha.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_config.route.v4alpha.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_config.route.v4alpha.Route`, :ref:`envoy_api_msg_config.route.v4alpha.VirtualHost`, and - // :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*v4alpha.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_config.route.v4alpha.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.filters.http.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]*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"` -} - -func (x *WeightedCluster_ClusterWeight) Reset() { - *x = WeightedCluster_ClusterWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster_ClusterWeight) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster_ClusterWeight) ProtoMessage() {} - -func (x *WeightedCluster_ClusterWeight) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster_ClusterWeight.ProtoReflect.Descriptor instead. -func (*WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *WeightedCluster_ClusterWeight) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WeightedCluster_ClusterWeight) GetWeight() *wrappers.UInt32Value { - if x != nil { - return x.Weight - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *v4alpha.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetTypedPerFilterConfig() map[string]*any.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -type RouteMatch_GrpcRouteMatchOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RouteMatch_GrpcRouteMatchOptions) Reset() { - *x = RouteMatch_GrpcRouteMatchOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_GrpcRouteMatchOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_GrpcRouteMatchOptions) ProtoMessage() {} - -func (x *RouteMatch_GrpcRouteMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_GrpcRouteMatchOptions.ProtoReflect.Descriptor instead. -func (*RouteMatch_GrpcRouteMatchOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{4, 0} -} - -type RouteMatch_TlsContextMatchOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If specified, the route will match against whether or not a certificate is presented. - // If not specified, certificate presentation status (true or false) will not be considered when route matching. - Presented *wrappers.BoolValue `protobuf:"bytes,1,opt,name=presented,proto3" json:"presented,omitempty"` - // If specified, the route will match against whether or not a certificate is validated. - // If not specified, certificate validation status (true or false) will not be considered when route matching. - Validated *wrappers.BoolValue `protobuf:"bytes,2,opt,name=validated,proto3" json:"validated,omitempty"` -} - -func (x *RouteMatch_TlsContextMatchOptions) Reset() { - *x = RouteMatch_TlsContextMatchOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_TlsContextMatchOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_TlsContextMatchOptions) ProtoMessage() {} - -func (x *RouteMatch_TlsContextMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_TlsContextMatchOptions.ProtoReflect.Descriptor instead. -func (*RouteMatch_TlsContextMatchOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{4, 1} -} - -func (x *RouteMatch_TlsContextMatchOptions) GetPresented() *wrappers.BoolValue { - if x != nil { - return x.Presented - } - return nil -} - -func (x *RouteMatch_TlsContextMatchOptions) GetValidated() *wrappers.BoolValue { - if x != nil { - return x.Validated - } - return nil -} - -// An extensible message for matching CONNECT requests. -type RouteMatch_ConnectMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RouteMatch_ConnectMatcher) Reset() { - *x = RouteMatch_ConnectMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_ConnectMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_ConnectMatcher) ProtoMessage() {} - -func (x *RouteMatch_ConnectMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_ConnectMatcher.ProtoReflect.Descriptor instead. -func (*RouteMatch_ConnectMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{4, 2} -} - -// The router is capable of shadowing traffic from one cluster to another. The current -// implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to -// respond before returning the response from the primary cluster. All normal statistics are -// collected for the shadow cluster making this feature useful for testing. -// -// During shadowing, the host/authority header is altered such that *-shadow* is appended. This is -// useful for logging. For example, *cluster1* becomes *cluster1-shadow*. -// -// .. note:: -// -// Shadowing will not be triggered if the primary cluster does not exist. -type RouteAction_RequestMirrorPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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, this field takes precedence over the `runtime_key` field and requests must also - // fall under the percentage of matches indicated by this field. - // - // For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the request will be mirrored. - RuntimeFraction *v4alpha.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` - // Determines if the trace span should be sampled. Defaults to true. - TraceSampled *wrappers.BoolValue `protobuf:"bytes,4,opt,name=trace_sampled,json=traceSampled,proto3" json:"trace_sampled,omitempty"` -} - -func (x *RouteAction_RequestMirrorPolicy) Reset() { - *x = RouteAction_RequestMirrorPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_RequestMirrorPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} - -func (x *RouteAction_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_RequestMirrorPolicy.ProtoReflect.Descriptor instead. -func (*RouteAction_RequestMirrorPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *RouteAction_RequestMirrorPolicy) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *v4alpha.RuntimeFractionalPercent { - if x != nil { - return x.RuntimeFraction - } - return nil -} - -func (x *RouteAction_RequestMirrorPolicy) GetTraceSampled() *wrappers.BoolValue { - if x != nil { - return x.TraceSampled - } - return nil -} - -// Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer -// `. -// [#next-free-field: 7] -type RouteAction_HashPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PolicySpecifier: - // *RouteAction_HashPolicy_Header_ - // *RouteAction_HashPolicy_Cookie_ - // *RouteAction_HashPolicy_ConnectionProperties_ - // *RouteAction_HashPolicy_QueryParameter_ - // *RouteAction_HashPolicy_FilterState_ - PolicySpecifier isRouteAction_HashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` - // The flag that short-circuits the hash computing. This field provides a - // 'fallback' style of configuration: "if a terminal policy doesn't work, - // fallback to rest of the policy list", it saves time when the terminal - // policy works. - // - // If true, and there is already a hash computed, ignore rest of the - // list of hash polices. - // For example, if the following hash methods are configured: - // - // ========= ======== - // specifier terminal - // ========= ======== - // Header A true - // Header B false - // Header C false - // ========= ======== - // - // The generateHash process ends if policy "header A" generates a hash, as - // it's a terminal policy. - Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *RouteAction_HashPolicy) Reset() { - *x = RouteAction_HashPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy) ProtoMessage() {} - -func (x *RouteAction_HashPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 1} -} - -func (m *RouteAction_HashPolicy) GetPolicySpecifier() isRouteAction_HashPolicy_PolicySpecifier { - if m != nil { - return m.PolicySpecifier - } - return nil -} - -func (x *RouteAction_HashPolicy) GetHeader() *RouteAction_HashPolicy_Header { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_Header_); ok { - return x.Header - } - return nil -} - -func (x *RouteAction_HashPolicy) GetCookie() *RouteAction_HashPolicy_Cookie { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_Cookie_); ok { - return x.Cookie - } - return nil -} - -func (x *RouteAction_HashPolicy) GetConnectionProperties() *RouteAction_HashPolicy_ConnectionProperties { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_ConnectionProperties_); ok { - return x.ConnectionProperties - } - return nil -} - -func (x *RouteAction_HashPolicy) GetQueryParameter() *RouteAction_HashPolicy_QueryParameter { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_QueryParameter_); ok { - return x.QueryParameter - } - return nil -} - -func (x *RouteAction_HashPolicy) GetFilterState() *RouteAction_HashPolicy_FilterState { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_FilterState_); ok { - return x.FilterState - } - return nil -} - -func (x *RouteAction_HashPolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -type isRouteAction_HashPolicy_PolicySpecifier interface { - isRouteAction_HashPolicy_PolicySpecifier() -} - -type RouteAction_HashPolicy_Header_ struct { - // Header hash policy. - Header *RouteAction_HashPolicy_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` -} - -type RouteAction_HashPolicy_Cookie_ struct { - // Cookie hash policy. - Cookie *RouteAction_HashPolicy_Cookie `protobuf:"bytes,2,opt,name=cookie,proto3,oneof"` -} - -type RouteAction_HashPolicy_ConnectionProperties_ struct { - // Connection properties hash policy. - ConnectionProperties *RouteAction_HashPolicy_ConnectionProperties `protobuf:"bytes,3,opt,name=connection_properties,json=connectionProperties,proto3,oneof"` -} - -type RouteAction_HashPolicy_QueryParameter_ struct { - // Query parameter hash policy. - QueryParameter *RouteAction_HashPolicy_QueryParameter `protobuf:"bytes,5,opt,name=query_parameter,json=queryParameter,proto3,oneof"` -} - -type RouteAction_HashPolicy_FilterState_ struct { - // Filter state hash policy. - FilterState *RouteAction_HashPolicy_FilterState `protobuf:"bytes,6,opt,name=filter_state,json=filterState,proto3,oneof"` -} - -func (*RouteAction_HashPolicy_Header_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_Cookie_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_ConnectionProperties_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_QueryParameter_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_FilterState_) isRouteAction_HashPolicy_PolicySpecifier() {} - -// Allows enabling and disabling upgrades on a per-route basis. -// This overrides any enabled/disabled upgrade filter chain specified in the -// HttpConnectionManager -// :ref:`upgrade_configs -// ` -// but does not affect any custom filter chain specified there. -type RouteAction_UpgradeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The case-insensitive name of this upgrade, e.g. "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] will be proxied upstream. - UpgradeType string `protobuf:"bytes,1,opt,name=upgrade_type,json=upgradeType,proto3" json:"upgrade_type,omitempty"` - // Determines if upgrades are available on this route. Defaults to true. - Enabled *wrappers.BoolValue `protobuf:"bytes,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Configuration for sending data upstream as a raw data payload. This is used for - // CONNECT requests, when forwarding CONNECT payload as raw TCP. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment:TODO(htuch): Replace the above comment with an alpha tag. - ConnectConfig *RouteAction_UpgradeConfig_ConnectConfig `protobuf:"bytes,3,opt,name=connect_config,json=connectConfig,proto3" json:"connect_config,omitempty"` -} - -func (x *RouteAction_UpgradeConfig) Reset() { - *x = RouteAction_UpgradeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_UpgradeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_UpgradeConfig) ProtoMessage() {} - -func (x *RouteAction_UpgradeConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_UpgradeConfig.ProtoReflect.Descriptor instead. -func (*RouteAction_UpgradeConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 2} -} - -func (x *RouteAction_UpgradeConfig) GetUpgradeType() string { - if x != nil { - return x.UpgradeType - } - return "" -} - -func (x *RouteAction_UpgradeConfig) GetEnabled() *wrappers.BoolValue { - if x != nil { - return x.Enabled - } - return nil -} - -func (x *RouteAction_UpgradeConfig) GetConnectConfig() *RouteAction_UpgradeConfig_ConnectConfig { - if x != nil { - return x.ConnectConfig - } - return nil -} - -type RouteAction_MaxStreamDuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the maximum duration allowed for streams on the route. If not specified, the value - // from the :ref:`max_stream_duration - // ` field in - // :ref:`HttpConnectionManager.common_http_protocol_options - // ` - // is used. If this field is set explicitly to zero, any - // HttpConnectionManager max_stream_duration timeout will be disabled for - // this route. - MaxStreamDuration *duration.Duration `protobuf:"bytes,1,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` - // If present, and the request contains a `grpc-timeout header - // `_, use that value as the - // *max_stream_duration*, but limit the applied timeout to the maximum value specified here. - // If set to 0, the `grpc-timeout` header is used without modification. - GrpcTimeoutHeaderMax *duration.Duration `protobuf:"bytes,2,opt,name=grpc_timeout_header_max,json=grpcTimeoutHeaderMax,proto3" json:"grpc_timeout_header_max,omitempty"` - // If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by - // subtracting the provided duration from the header. This is useful for allowing Envoy to set - // its global timeout to be less than that of the deadline imposed by the calling client, which - // makes it more likely that Envoy will handle the timeout instead of having the call canceled - // by the client. If, after applying the offset, the resulting timeout is zero or negative, - // the stream will timeout immediately. - GrpcTimeoutHeaderOffset *duration.Duration `protobuf:"bytes,3,opt,name=grpc_timeout_header_offset,json=grpcTimeoutHeaderOffset,proto3" json:"grpc_timeout_header_offset,omitempty"` -} - -func (x *RouteAction_MaxStreamDuration) Reset() { - *x = RouteAction_MaxStreamDuration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_MaxStreamDuration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_MaxStreamDuration) ProtoMessage() {} - -func (x *RouteAction_MaxStreamDuration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_MaxStreamDuration.ProtoReflect.Descriptor instead. -func (*RouteAction_MaxStreamDuration) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 3} -} - -func (x *RouteAction_MaxStreamDuration) GetMaxStreamDuration() *duration.Duration { - if x != nil { - return x.MaxStreamDuration - } - return nil -} - -func (x *RouteAction_MaxStreamDuration) GetGrpcTimeoutHeaderMax() *duration.Duration { - if x != nil { - return x.GrpcTimeoutHeaderMax - } - return nil -} - -func (x *RouteAction_MaxStreamDuration) GetGrpcTimeoutHeaderOffset() *duration.Duration { - if x != nil { - return x.GrpcTimeoutHeaderOffset - } - return nil -} - -type RouteAction_HashPolicy_Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the request header that will be used to obtain the hash - // key. If the request header is not present, no hash will be produced. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` - // If specified, the request header value will be rewritten and used - // to produce the hash key. - RegexRewrite *v4alpha1.RegexMatchAndSubstitute `protobuf:"bytes,2,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` -} - -func (x *RouteAction_HashPolicy_Header) Reset() { - *x = RouteAction_HashPolicy_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_Header) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_Header) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_Header.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_Header) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 1, 0} -} - -func (x *RouteAction_HashPolicy_Header) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -func (x *RouteAction_HashPolicy_Header) GetRegexRewrite() *v4alpha1.RegexMatchAndSubstitute { - if x != nil { - return x.RegexRewrite - } - return nil -} - -// Envoy supports two types of cookie affinity: -// -// 1. Passive. Envoy takes a cookie that's present in the cookies header and -// hashes on its value. -// -// 2. Generated. Envoy generates and sets a cookie with an expiration (TTL) -// on the first request from the client in its response to the client, -// based on the endpoint the request gets sent to. The client then -// presents this on the next and all subsequent requests. The hash of -// this is sufficient to ensure these requests get sent to the same -// endpoint. The cookie is generated by hashing the source and -// destination ports and addresses so that multiple independent HTTP2 -// streams on the same connection will independently receive the same -// cookie, even if they arrive at the Envoy simultaneously. -type RouteAction_HashPolicy_Cookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the cookie that will be used to obtain the hash key. If the - // cookie is not present and ttl below is not set, no hash will be - // produced. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // If specified, a cookie with the TTL will be generated if the cookie is - // not present. If the TTL is present and zero, the generated cookie will - // be a session cookie. - Ttl *duration.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` - // The name of the path for the cookie. If no path is specified here, no path - // will be set for the cookie. - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *RouteAction_HashPolicy_Cookie) Reset() { - *x = RouteAction_HashPolicy_Cookie{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_Cookie) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_Cookie) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_Cookie) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_Cookie.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_Cookie) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 1, 1} -} - -func (x *RouteAction_HashPolicy_Cookie) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteAction_HashPolicy_Cookie) GetTtl() *duration.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *RouteAction_HashPolicy_Cookie) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type RouteAction_HashPolicy_ConnectionProperties struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Hash on source IP address. - SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) Reset() { - *x = RouteAction_HashPolicy_ConnectionProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_ConnectionProperties) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_ConnectionProperties) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_ConnectionProperties.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_ConnectionProperties) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 1, 2} -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) GetSourceIp() bool { - if x != nil { - return x.SourceIp - } - return false -} - -type RouteAction_HashPolicy_QueryParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the URL query parameter that will be used to obtain the hash - // key. If the parameter is not present, no hash will be produced. Query - // parameter names are case-sensitive. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *RouteAction_HashPolicy_QueryParameter) Reset() { - *x = RouteAction_HashPolicy_QueryParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_QueryParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_QueryParameter) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_QueryParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_QueryParameter.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_QueryParameter) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 1, 3} -} - -func (x *RouteAction_HashPolicy_QueryParameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type RouteAction_HashPolicy_FilterState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the Object in the per-request filterState, which is an - // Envoy::Http::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Http::Hashable, no hash will be produced. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *RouteAction_HashPolicy_FilterState) Reset() { - *x = RouteAction_HashPolicy_FilterState{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_FilterState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_FilterState) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_FilterState) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_FilterState.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_FilterState) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 1, 4} -} - -func (x *RouteAction_HashPolicy_FilterState) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -// Configuration for sending data upstream as a raw data payload. This is used for -// CONNECT requests, when forwarding CONNECT payload as raw TCP. -type RouteAction_UpgradeConfig_ConnectConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream. - ProxyProtocolConfig *v4alpha.ProxyProtocolConfig `protobuf:"bytes,1,opt,name=proxy_protocol_config,json=proxyProtocolConfig,proto3" json:"proxy_protocol_config,omitempty"` -} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) Reset() { - *x = RouteAction_UpgradeConfig_ConnectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_UpgradeConfig_ConnectConfig) ProtoMessage() {} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_UpgradeConfig_ConnectConfig.ProtoReflect.Descriptor instead. -func (*RouteAction_UpgradeConfig_ConnectConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{6, 2, 0} -} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) GetProxyProtocolConfig() *v4alpha.ProxyProtocolConfig { - if x != nil { - return x.ProxyProtocolConfig - } - return nil -} - -type RetryPolicy_RetryPriority struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to ConfigType: - // *RetryPolicy_RetryPriority_TypedConfig - ConfigType isRetryPolicy_RetryPriority_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *RetryPolicy_RetryPriority) Reset() { - *x = RetryPolicy_RetryPriority{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryPriority) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryPriority) ProtoMessage() {} - -func (x *RetryPolicy_RetryPriority) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryPriority.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryPriority) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *RetryPolicy_RetryPriority) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *RetryPolicy_RetryPriority) GetConfigType() isRetryPolicy_RetryPriority_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *RetryPolicy_RetryPriority) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryPriority_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isRetryPolicy_RetryPriority_ConfigType interface { - isRetryPolicy_RetryPriority_ConfigType() -} - -type RetryPolicy_RetryPriority_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryPriority_TypedConfig) isRetryPolicy_RetryPriority_ConfigType() {} - -type RetryPolicy_RetryHostPredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to ConfigType: - // *RetryPolicy_RetryHostPredicate_TypedConfig - ConfigType isRetryPolicy_RetryHostPredicate_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *RetryPolicy_RetryHostPredicate) Reset() { - *x = RetryPolicy_RetryHostPredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryHostPredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryHostPredicate) ProtoMessage() {} - -func (x *RetryPolicy_RetryHostPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryHostPredicate.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryHostPredicate) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{7, 1} -} - -func (x *RetryPolicy_RetryHostPredicate) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *RetryPolicy_RetryHostPredicate) GetConfigType() isRetryPolicy_RetryHostPredicate_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *RetryPolicy_RetryHostPredicate) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryHostPredicate_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isRetryPolicy_RetryHostPredicate_ConfigType interface { - isRetryPolicy_RetryHostPredicate_ConfigType() -} - -type RetryPolicy_RetryHostPredicate_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryHostPredicate_TypedConfig) isRetryPolicy_RetryHostPredicate_ConfigType() {} - -type RetryPolicy_RetryBackOff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the base interval between retries. This parameter is required and must be greater - // than zero. Values less than 1 ms are rounded up to 1 ms. - // See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's - // back-off algorithm. - BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` - // Specifies the maximum interval between retries. This parameter is optional, but must be - // greater than or equal to the `base_interval` if set. The default is 10 times the - // `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion - // of Envoy's back-off algorithm. - MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *RetryPolicy_RetryBackOff) Reset() { - *x = RetryPolicy_RetryBackOff{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryBackOff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryBackOff) ProtoMessage() {} - -func (x *RetryPolicy_RetryBackOff) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryBackOff.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryBackOff) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{7, 2} -} - -func (x *RetryPolicy_RetryBackOff) GetBaseInterval() *duration.Duration { - if x != nil { - return x.BaseInterval - } - return nil -} - -func (x *RetryPolicy_RetryBackOff) GetMaxInterval() *duration.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -type RetryPolicy_ResetHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the reset header. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The format of the reset header. - Format RetryPolicy_ResetHeaderFormat `protobuf:"varint,2,opt,name=format,proto3,enum=envoy.config.route.v4alpha.RetryPolicy_ResetHeaderFormat" json:"format,omitempty"` -} - -func (x *RetryPolicy_ResetHeader) Reset() { - *x = RetryPolicy_ResetHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_ResetHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_ResetHeader) ProtoMessage() {} - -func (x *RetryPolicy_ResetHeader) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_ResetHeader.ProtoReflect.Descriptor instead. -func (*RetryPolicy_ResetHeader) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{7, 3} -} - -func (x *RetryPolicy_ResetHeader) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RetryPolicy_ResetHeader) GetFormat() RetryPolicy_ResetHeaderFormat { - if x != nil { - return x.Format - } - return RetryPolicy_SECONDS -} - -// A retry back-off strategy that applies when the upstream server rate limits -// the request. -// -// Given this configuration: -// -// .. code-block:: yaml -// -// rate_limited_retry_back_off: -// reset_headers: -// - name: Retry-After -// format: SECONDS -// - name: X-RateLimit-Reset -// format: UNIX_TIMESTAMP -// max_interval: "300s" -// -// The following algorithm will apply: -// -// 1. If the response contains the header ``Retry-After`` its value must be on -// the form ``120`` (an integer that represents the number of seconds to -// wait before retrying). If so, this value is used as the back-off interval. -// 2. Otherwise, if the response contains the header ``X-RateLimit-Reset`` its -// value must be on the form ``1595320702`` (an integer that represents the -// point in time at which to retry, as a Unix timestamp in seconds). If so, -// the current time is subtracted from this value and the result is used as -// the back-off interval. -// 3. Otherwise, Envoy will use the default -// :ref:`exponential back-off ` -// strategy. -// -// No matter which format is used, if the resulting back-off interval exceeds -// ``max_interval`` it is discarded and the next header in ``reset_headers`` -// is tried. If a request timeout is configured for the route it will further -// limit how long the request will be allowed to run. -// -// To prevent many clients retrying at the same point in time jitter is added -// to the back-off interval, so the resulting interval is decided by taking: -// ``random(interval, interval * 1.5)``. -// -// .. attention:: -// -// Configuring ``rate_limited_retry_back_off`` will not by itself cause a request -// to be retried. You will still need to configure the right retry policy to match -// the responses from the upstream server. -type RetryPolicy_RateLimitedRetryBackOff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) - // to match against the response. Headers are tried in order, and matched case - // insensitive. The first header to be parsed successfully is used. If no headers - // match the default exponential back-off is used instead. - ResetHeaders []*RetryPolicy_ResetHeader `protobuf:"bytes,1,rep,name=reset_headers,json=resetHeaders,proto3" json:"reset_headers,omitempty"` - // Specifies the maximum back off interval that Envoy will allow. If a reset - // header contains an interval longer than this then it will be discarded and - // the next header will be tried. Defaults to 300 seconds. - MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) Reset() { - *x = RetryPolicy_RateLimitedRetryBackOff{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RateLimitedRetryBackOff) ProtoMessage() {} - -func (x *RetryPolicy_RateLimitedRetryBackOff) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RateLimitedRetryBackOff.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RateLimitedRetryBackOff) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{7, 4} -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) GetResetHeaders() []*RetryPolicy_ResetHeader { - if x != nil { - return x.ResetHeaders - } - return nil -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) GetMaxInterval() *duration.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -// [#next-free-field: 10] -type RateLimit_Action struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ActionSpecifier: - // *RateLimit_Action_SourceCluster_ - // *RateLimit_Action_DestinationCluster_ - // *RateLimit_Action_RequestHeaders_ - // *RateLimit_Action_RemoteAddress_ - // *RateLimit_Action_GenericKey_ - // *RateLimit_Action_HeaderValueMatch_ - // *RateLimit_Action_HiddenEnvoyDeprecatedDynamicMetadata - // *RateLimit_Action_Metadata - // *RateLimit_Action_Extension - ActionSpecifier isRateLimit_Action_ActionSpecifier `protobuf_oneof:"action_specifier"` -} - -func (x *RateLimit_Action) Reset() { - *x = RateLimit_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action) ProtoMessage() {} - -func (x *RateLimit_Action) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action.ProtoReflect.Descriptor instead. -func (*RateLimit_Action) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0} -} - -func (m *RateLimit_Action) GetActionSpecifier() isRateLimit_Action_ActionSpecifier { - if m != nil { - return m.ActionSpecifier - } - return nil -} - -func (x *RateLimit_Action) GetSourceCluster() *RateLimit_Action_SourceCluster { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_SourceCluster_); ok { - return x.SourceCluster - } - return nil -} - -func (x *RateLimit_Action) GetDestinationCluster() *RateLimit_Action_DestinationCluster { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_DestinationCluster_); ok { - return x.DestinationCluster - } - return nil -} - -func (x *RateLimit_Action) GetRequestHeaders() *RateLimit_Action_RequestHeaders { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_RequestHeaders_); ok { - return x.RequestHeaders - } - return nil -} - -func (x *RateLimit_Action) GetRemoteAddress() *RateLimit_Action_RemoteAddress { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_RemoteAddress_); ok { - return x.RemoteAddress - } - return nil -} - -func (x *RateLimit_Action) GetGenericKey() *RateLimit_Action_GenericKey { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_GenericKey_); ok { - return x.GenericKey - } - return nil -} - -func (x *RateLimit_Action) GetHeaderValueMatch() *RateLimit_Action_HeaderValueMatch { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_HeaderValueMatch_); ok { - return x.HeaderValueMatch - } - return nil -} - -// Deprecated: Do not use. -func (x *RateLimit_Action) GetHiddenEnvoyDeprecatedDynamicMetadata() *RateLimit_Action_DynamicMetaData { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_HiddenEnvoyDeprecatedDynamicMetadata); ok { - return x.HiddenEnvoyDeprecatedDynamicMetadata - } - return nil -} - -func (x *RateLimit_Action) GetMetadata() *RateLimit_Action_MetaData { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_Metadata); ok { - return x.Metadata - } - return nil -} - -func (x *RateLimit_Action) GetExtension() *v4alpha.TypedExtensionConfig { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_Extension); ok { - return x.Extension - } - return nil -} - -type isRateLimit_Action_ActionSpecifier interface { - isRateLimit_Action_ActionSpecifier() -} - -type RateLimit_Action_SourceCluster_ struct { - // Rate limit on source cluster. - SourceCluster *RateLimit_Action_SourceCluster `protobuf:"bytes,1,opt,name=source_cluster,json=sourceCluster,proto3,oneof"` -} - -type RateLimit_Action_DestinationCluster_ struct { - // Rate limit on destination cluster. - DestinationCluster *RateLimit_Action_DestinationCluster `protobuf:"bytes,2,opt,name=destination_cluster,json=destinationCluster,proto3,oneof"` -} - -type RateLimit_Action_RequestHeaders_ struct { - // Rate limit on request headers. - RequestHeaders *RateLimit_Action_RequestHeaders `protobuf:"bytes,3,opt,name=request_headers,json=requestHeaders,proto3,oneof"` -} - -type RateLimit_Action_RemoteAddress_ struct { - // Rate limit on remote address. - RemoteAddress *RateLimit_Action_RemoteAddress `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3,oneof"` -} - -type RateLimit_Action_GenericKey_ struct { - // Rate limit on a generic key. - GenericKey *RateLimit_Action_GenericKey `protobuf:"bytes,5,opt,name=generic_key,json=genericKey,proto3,oneof"` -} - -type RateLimit_Action_HeaderValueMatch_ struct { - // Rate limit on the existence of request headers. - HeaderValueMatch *RateLimit_Action_HeaderValueMatch `protobuf:"bytes,6,opt,name=header_value_match,json=headerValueMatch,proto3,oneof"` -} - -type RateLimit_Action_HiddenEnvoyDeprecatedDynamicMetadata struct { - // Rate limit on dynamic metadata. - // - // .. attention:: - // This field has been deprecated in favor of the :ref:`metadata ` field - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedDynamicMetadata *RateLimit_Action_DynamicMetaData `protobuf:"bytes,7,opt,name=hidden_envoy_deprecated_dynamic_metadata,json=hiddenEnvoyDeprecatedDynamicMetadata,proto3,oneof"` -} - -type RateLimit_Action_Metadata struct { - // Rate limit on metadata. - Metadata *RateLimit_Action_MetaData `protobuf:"bytes,8,opt,name=metadata,proto3,oneof"` -} - -type RateLimit_Action_Extension struct { - // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. - Extension *v4alpha.TypedExtensionConfig `protobuf:"bytes,9,opt,name=extension,proto3,oneof"` -} - -func (*RateLimit_Action_SourceCluster_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_DestinationCluster_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_RequestHeaders_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_RemoteAddress_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_GenericKey_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_HeaderValueMatch_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_HiddenEnvoyDeprecatedDynamicMetadata) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_Metadata) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_Extension) isRateLimit_Action_ActionSpecifier() {} - -type RateLimit_Override struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to OverrideSpecifier: - // *RateLimit_Override_DynamicMetadata_ - OverrideSpecifier isRateLimit_Override_OverrideSpecifier `protobuf_oneof:"override_specifier"` -} - -func (x *RateLimit_Override) Reset() { - *x = RateLimit_Override{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Override) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Override) ProtoMessage() {} - -func (x *RateLimit_Override) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Override.ProtoReflect.Descriptor instead. -func (*RateLimit_Override) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 1} -} - -func (m *RateLimit_Override) GetOverrideSpecifier() isRateLimit_Override_OverrideSpecifier { - if m != nil { - return m.OverrideSpecifier - } - return nil -} - -func (x *RateLimit_Override) GetDynamicMetadata() *RateLimit_Override_DynamicMetadata { - if x, ok := x.GetOverrideSpecifier().(*RateLimit_Override_DynamicMetadata_); ok { - return x.DynamicMetadata - } - return nil -} - -type isRateLimit_Override_OverrideSpecifier interface { - isRateLimit_Override_OverrideSpecifier() -} - -type RateLimit_Override_DynamicMetadata_ struct { - // Limit override from dynamic metadata. - DynamicMetadata *RateLimit_Override_DynamicMetadata `protobuf:"bytes,1,opt,name=dynamic_metadata,json=dynamicMetadata,proto3,oneof"` -} - -func (*RateLimit_Override_DynamicMetadata_) isRateLimit_Override_OverrideSpecifier() {} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("source_cluster", "") -// -// is derived from the :option:`--service-cluster` option. -type RateLimit_Action_SourceCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_SourceCluster) Reset() { - *x = RateLimit_Action_SourceCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_SourceCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_SourceCluster) ProtoMessage() {} - -func (x *RateLimit_Action_SourceCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_SourceCluster.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_SourceCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 0} -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("destination_cluster", "") -// -// Once a request matches against a route table rule, a routed cluster is determined by one of -// the following :ref:`route table configuration ` -// settings: -// -// * :ref:`cluster ` indicates the upstream cluster -// to route to. -// * :ref:`weighted_clusters ` -// chooses a cluster randomly from a set of clusters with attributed weight. -// * :ref:`cluster_header ` indicates which -// header in the request contains the target cluster. -type RateLimit_Action_DestinationCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_DestinationCluster) Reset() { - *x = RateLimit_Action_DestinationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_DestinationCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_DestinationCluster) ProtoMessage() {} - -func (x *RateLimit_Action_DestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_DestinationCluster.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_DestinationCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 1} -} - -// The following descriptor entry is appended when a header contains a key that matches the -// *header_name*: -// -// .. code-block:: cpp -// -// ("", "") -type RateLimit_Action_RequestHeaders struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The header name to be queried from the request headers. The header’s - // value is used to populate the value of the descriptor entry for the - // descriptor_key. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // If set to true, Envoy skips the descriptor while calling rate limiting service - // when header is not present in the request. By default it skips calling the - // rate limiting service if this header is not present in the request. - SkipIfAbsent bool `protobuf:"varint,3,opt,name=skip_if_absent,json=skipIfAbsent,proto3" json:"skip_if_absent,omitempty"` -} - -func (x *RateLimit_Action_RequestHeaders) Reset() { - *x = RateLimit_Action_RequestHeaders{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_RequestHeaders) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_RequestHeaders) ProtoMessage() {} - -func (x *RateLimit_Action_RequestHeaders) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_RequestHeaders.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_RequestHeaders) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 2} -} - -func (x *RateLimit_Action_RequestHeaders) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -func (x *RateLimit_Action_RequestHeaders) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_RequestHeaders) GetSkipIfAbsent() bool { - if x != nil { - return x.SkipIfAbsent - } - return false -} - -// The following descriptor entry is appended to the descriptor and is populated using the -// trusted address from :ref:`x-forwarded-for `: -// -// .. code-block:: cpp -// -// ("remote_address", "") -type RateLimit_Action_RemoteAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_RemoteAddress) Reset() { - *x = RateLimit_Action_RemoteAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_RemoteAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_RemoteAddress) ProtoMessage() {} - -func (x *RateLimit_Action_RemoteAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_RemoteAddress.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_RemoteAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 3} -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("generic_key", "") -type RateLimit_Action_GenericKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - // An optional key to use in the descriptor entry. If not set it defaults - // to 'generic_key' as the descriptor key. - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` -} - -func (x *RateLimit_Action_GenericKey) Reset() { - *x = RateLimit_Action_GenericKey{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_GenericKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_GenericKey) ProtoMessage() {} - -func (x *RateLimit_Action_GenericKey) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_GenericKey.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_GenericKey) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 4} -} - -func (x *RateLimit_Action_GenericKey) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimit_Action_GenericKey) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("header_match", "") -type RateLimit_Action_HeaderValueMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The 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 *wrappers.BoolValue `protobuf:"bytes,2,opt,name=expect_match,json=expectMatch,proto3" json:"expect_match,omitempty"` - // Specifies a set of headers that the rate limit action should match - // on. The action will check the request’s headers against all the - // specified headers in the config. A match will happen if all the - // headers in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - Headers []*HeaderMatcher `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RateLimit_Action_HeaderValueMatch) Reset() { - *x = RateLimit_Action_HeaderValueMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_HeaderValueMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_HeaderValueMatch) ProtoMessage() {} - -func (x *RateLimit_Action_HeaderValueMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_HeaderValueMatch.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 5} -} - -func (x *RateLimit_Action_HeaderValueMatch) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimit_Action_HeaderValueMatch) GetExpectMatch() *wrappers.BoolValue { - if x != nil { - return x.ExpectMatch - } - return nil -} - -func (x *RateLimit_Action_HeaderValueMatch) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -// The following descriptor entry is appended when the -// :ref:`dynamic metadata ` contains a key value: -// -// .. code-block:: cpp -// -// ("", "") -// -// .. attention:: -// This action has been deprecated in favor of the :ref:`metadata ` action -type RateLimit_Action_DynamicMetaData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the dynamic metadata is of type string. - MetadataKey *v32.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` - // An optional value to use if *metadata_key* is empty. If not set and - // no value is present under the metadata_key then no descriptor is generated. - DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *RateLimit_Action_DynamicMetaData) Reset() { - *x = RateLimit_Action_DynamicMetaData{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_DynamicMetaData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_DynamicMetaData) ProtoMessage() {} - -func (x *RateLimit_Action_DynamicMetaData) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_DynamicMetaData.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_DynamicMetaData) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 6} -} - -func (x *RateLimit_Action_DynamicMetaData) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_DynamicMetaData) GetMetadataKey() *v32.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -func (x *RateLimit_Action_DynamicMetaData) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -// The following descriptor entry is appended when the metadata contains a key value: -// -// .. code-block:: cpp -// -// ("", "") -type RateLimit_Action_MetaData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the metadata is of type string. - MetadataKey *v32.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` - // An optional value to use if *metadata_key* is empty. If not set and - // no value is present under the metadata_key then no descriptor is generated. - DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Source of metadata - Source RateLimit_Action_MetaData_Source `protobuf:"varint,4,opt,name=source,proto3,enum=envoy.config.route.v4alpha.RateLimit_Action_MetaData_Source" json:"source,omitempty"` -} - -func (x *RateLimit_Action_MetaData) Reset() { - *x = RateLimit_Action_MetaData{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_MetaData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_MetaData) ProtoMessage() {} - -func (x *RateLimit_Action_MetaData) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_MetaData.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_MetaData) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 0, 7} -} - -func (x *RateLimit_Action_MetaData) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_MetaData) GetMetadataKey() *v32.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -func (x *RateLimit_Action_MetaData) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -func (x *RateLimit_Action_MetaData) GetSource() RateLimit_Action_MetaData_Source { - if x != nil { - return x.Source - } - return RateLimit_Action_MetaData_DYNAMIC -} - -// Fetches the override from the dynamic metadata. -type RateLimit_Override_DynamicMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Metadata struct that defines the key and path to retrieve the struct value. - // The value must be a struct containing an integer "requests_per_unit" property - // and a "unit" property with a value parseable to :ref:`RateLimitUnit - // enum ` - MetadataKey *v32.MetadataKey `protobuf:"bytes,1,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` -} - -func (x *RateLimit_Override_DynamicMetadata) Reset() { - *x = RateLimit_Override_DynamicMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Override_DynamicMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Override_DynamicMetadata) ProtoMessage() {} - -func (x *RateLimit_Override_DynamicMetadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_route_components_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Override_DynamicMetadata.ProtoReflect.Descriptor instead. -func (*RateLimit_Override_DynamicMetadata) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP(), []int{14, 1, 0} -} - -func (x *RateLimit_Override_DynamicMetadata) GetMetadataKey() *v32.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -var File_envoy_config_route_v4alpha_route_components_proto protoreflect.FileDescriptor - -var file_envoy_config_route_v4alpha_route_components_proto_rawDesc = []byte{ - 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, - 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x89, 0x0d, 0x0a, 0x0b, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, - 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, - 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x08, 0x01, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, - 0xc8, 0x01, 0x00, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x06, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, - 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, - 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x54, 0x6c, 0x73, 0x12, 0x55, - 0x0a, 0x10, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x6c, 0x0a, - 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x19, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, - 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, - 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x6e, 0x0a, 0x17, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, - 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4f, 0x0a, 0x1a, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, - 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, - 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x63, - 0x6f, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x78, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, - 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x21, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, - 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x19, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x68, - 0x65, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, - 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, 0x0a, 0x12, 0x54, 0x6c, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, - 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x58, 0x54, 0x45, - 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, - 0x4c, 0x4c, 0x10, 0x02, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x4a, 0x04, - 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x52, 0x11, 0x70, 0x65, 0x72, 0x5f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x67, 0x0a, - 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x29, 0x9a, 0xc5, 0x88, - 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe6, 0x0a, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3f, 0x0a, 0x05, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, - 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x72, - 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x5b, 0x0a, 0x0f, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x72, 0x0a, 0x17, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x6c, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, - 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, - 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, - 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x6e, 0x0a, 0x17, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4f, 0x0a, 0x1a, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, - 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x3d, 0x0a, - 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x60, 0x0a, 0x1e, - 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x75, - 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x5d, - 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x22, 0x9a, - 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x42, 0x0d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x11, 0x70, 0x65, - 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0x8a, 0x09, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, - 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2c, - 0x0a, 0x12, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0xef, 0x06, 0x0a, - 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x4a, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x6c, 0x0a, - 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, - 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, - 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x6e, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, - 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, - 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, - 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x4a, - 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x11, 0x70, 0x65, 0x72, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2c, - 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0xaf, 0x09, 0x0a, - 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x0a, 0x73, - 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x12, 0x60, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x5e, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5c, 0x0a, 0x10, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x5e, 0x0a, 0x0b, 0x74, 0x6c, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, - 0x74, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x56, 0x0a, 0x15, 0x47, 0x72, - 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x1a, 0xcc, 0x01, 0x0a, 0x16, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, - 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, - 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x48, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x3a, 0x27, 0x9a, 0xc5, 0x88, - 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x15, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x05, 0x10, - 0x06, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0xfa, - 0x04, 0x0a, 0x0a, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x64, 0x0a, - 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x47, 0x0a, - 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x5c, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5a, 0x0a, 0x0e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, - 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, - 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xa7, 0x2a, 0x0a, 0x0b, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x36, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, - 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x1f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, - 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x72, 0x65, - 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, - 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, - 0x01, 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x69, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x01, 0x52, 0x0f, - 0x61, 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, - 0x3d, 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, - 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x11, 0x68, 0x6f, 0x73, - 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x6c, - 0x0a, 0x17, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, - 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, 0x52, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x33, 0x0a, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x4a, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, - 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x19, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x12, 0x50, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, - 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x2e, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x76, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x53, - 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0f, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, - 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x3a, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, - 0x74, 0x0a, 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x61, 0x78, 0x47, 0x72, 0x70, 0x63, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x7a, 0x0a, 0x2b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x26, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x47, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x5e, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x12, 0x6c, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x22, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0xa9, 0x01, 0x0a, 0x30, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x2b, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x83, 0x01, 0x0a, 0x2e, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x29, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x61, 0x78, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x69, 0x0a, - 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xaa, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x64, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x1a, 0xc6, 0x0a, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x53, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, - 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x06, 0x63, 0x6f, 0x6f, - 0x6b, 0x69, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, - 0x6f, 0x6b, 0x69, 0x65, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x7e, - 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x6c, - 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x0c, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x1a, 0xce, 0x01, - 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, - 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, - 0x74, 0x75, 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, - 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0xa2, - 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, - 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6f, - 0x6b, 0x69, 0x65, 0x1a, 0x7d, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, - 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x69, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, - 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xd7, - 0x03, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x30, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, - 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xb9, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, - 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc4, 0x02, 0x0a, 0x11, 0x4d, 0x61, 0x78, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, - 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x17, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x78, 0x12, 0x56, 0x0a, 0x1a, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x67, 0x72, 0x70, 0x63, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, - 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x45, 0x0a, 0x1b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, - 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, - 0x0a, 0x13, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, - 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, - 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x22, 0x5e, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, - 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, - 0x43, 0x54, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x49, - 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, - 0x10, 0x01, 0x1a, 0x02, 0x18, 0x01, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, - 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, 0x04, 0x08, 0x16, - 0x10, 0x17, 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x52, 0x15, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xa4, 0x10, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, - 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x41, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x5c, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x52, 0x0d, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, - 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, - 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x12, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x48, - 0x0a, 0x21, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, - 0x70, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x68, 0x6f, 0x73, 0x74, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4d, 0x61, 0x78, - 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x5a, - 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x0c, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x7d, 0x0a, 0x1b, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, - 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, - 0x52, 0x17, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x56, 0x0a, 0x11, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, - 0x10, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x65, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0a, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, - 0x17, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0xbc, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x74, 0x72, - 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0xd9, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, - 0x66, 0x12, 0x4a, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, - 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x46, 0x0a, - 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x1a, 0xc3, 0x01, 0x0a, - 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, - 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x5b, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3a, 0x34, 0x9a, 0xc5, - 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x1a, 0x87, 0x02, 0x0a, 0x17, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x62, - 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, - 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, - 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x22, 0x34, 0x0a, 0x11, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x00, 0x12, 0x12, - 0x0a, 0x0e, 0x55, 0x4e, 0x49, 0x58, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, - 0x10, 0x01, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x9f, 0x02, 0x0a, - 0x0b, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x10, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x0f, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x5c, - 0x0a, 0x19, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x52, 0x17, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x18, - 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, - 0x68, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x50, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xee, - 0x05, 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x27, 0x0a, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x74, 0x74, - 0x70, 0x73, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, - 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x52, - 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x0d, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, - 0x48, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x12, 0x34, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, - 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x5a, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, - 0x74, 0x65, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x12, 0x6e, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x70, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x22, 0x77, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, - 0x4f, 0x56, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x4c, 0x59, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, - 0x09, 0x53, 0x45, 0x45, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, - 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, - 0x43, 0x54, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, - 0x54, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x04, 0x3a, 0x2b, 0x9a, 0xc5, - 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, - 0xa8, 0x01, 0x0a, 0x14, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x10, - 0xd8, 0x04, 0x28, 0x64, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x09, 0x44, - 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, - 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x22, 0xd5, 0x02, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, - 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, - 0x69, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, - 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, - 0x61, 0x67, 0x73, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x22, 0xbc, 0x01, 0x0a, 0x0e, 0x56, 0x69, - 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x07, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x2b, - 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, - 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, - 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x97, 0x19, 0x0a, 0x09, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0xfe, 0x13, 0x0a, - 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x13, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x66, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x63, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5a, 0x0a, - 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x6d, 0x0a, 0x12, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0xa0, 0x01, 0x0a, 0x28, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, - 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x53, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x4f, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x1a, 0x4c, 0x0a, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, - 0x56, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xd4, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6b, - 0x69, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, 0x65, 0x6e, 0x74, - 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x4c, - 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0xa1, 0x01, 0x0a, - 0x0a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x1a, 0x94, 0x02, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x65, 0x78, 0x70, - 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x70, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4d, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xf7, 0x01, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, - 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, - 0x61, 0x1a, 0xf1, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, - 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, - 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5e, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x26, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, - 0x52, 0x4f, 0x55, 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x01, 0x3a, 0x36, 0x9a, - 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x17, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xea, 0x02, - 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x6b, 0x0a, 0x10, 0x64, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xa4, 0x01, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0c, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x3a, 0x3f, 0x9a, - 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2f, - 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x42, - 0x19, 0x0a, 0x12, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, - 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x22, 0xa6, 0x04, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x65, 0x78, 0x61, 0x63, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, - 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x54, 0x0a, 0x10, 0x73, 0x61, - 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x0e, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x48, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, - 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x30, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x65, 0x72, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x52, 0x0b, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xa9, 0x02, 0x0a, 0x15, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x28, 0x80, 0x08, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x21, 0x0a, 0x1f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, - 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0xf3, 0x02, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x52, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x14, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x17, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, - 0x05, 0x52, 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x70, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, - 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, - 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x4a, 0x0a, - 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_config_route_v4alpha_route_components_proto_rawDescOnce sync.Once - file_envoy_config_route_v4alpha_route_components_proto_rawDescData = file_envoy_config_route_v4alpha_route_components_proto_rawDesc -) - -func file_envoy_config_route_v4alpha_route_components_proto_rawDescGZIP() []byte { - file_envoy_config_route_v4alpha_route_components_proto_rawDescOnce.Do(func() { - file_envoy_config_route_v4alpha_route_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_route_v4alpha_route_components_proto_rawDescData) - }) - return file_envoy_config_route_v4alpha_route_components_proto_rawDescData -} - -var file_envoy_config_route_v4alpha_route_components_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_envoy_config_route_v4alpha_route_components_proto_msgTypes = make([]protoimpl.MessageInfo, 51) -var file_envoy_config_route_v4alpha_route_components_proto_goTypes = []interface{}{ - (VirtualHost_TlsRequirementType)(0), // 0: envoy.config.route.v4alpha.VirtualHost.TlsRequirementType - (RouteAction_ClusterNotFoundResponseCode)(0), // 1: envoy.config.route.v4alpha.RouteAction.ClusterNotFoundResponseCode - (RouteAction_InternalRedirectAction)(0), // 2: envoy.config.route.v4alpha.RouteAction.InternalRedirectAction - (RetryPolicy_ResetHeaderFormat)(0), // 3: envoy.config.route.v4alpha.RetryPolicy.ResetHeaderFormat - (RedirectAction_RedirectResponseCode)(0), // 4: envoy.config.route.v4alpha.RedirectAction.RedirectResponseCode - (RateLimit_Action_MetaData_Source)(0), // 5: envoy.config.route.v4alpha.RateLimit.Action.MetaData.Source - (*VirtualHost)(nil), // 6: envoy.config.route.v4alpha.VirtualHost - (*FilterAction)(nil), // 7: envoy.config.route.v4alpha.FilterAction - (*Route)(nil), // 8: envoy.config.route.v4alpha.Route - (*WeightedCluster)(nil), // 9: envoy.config.route.v4alpha.WeightedCluster - (*RouteMatch)(nil), // 10: envoy.config.route.v4alpha.RouteMatch - (*CorsPolicy)(nil), // 11: envoy.config.route.v4alpha.CorsPolicy - (*RouteAction)(nil), // 12: envoy.config.route.v4alpha.RouteAction - (*RetryPolicy)(nil), // 13: envoy.config.route.v4alpha.RetryPolicy - (*HedgePolicy)(nil), // 14: envoy.config.route.v4alpha.HedgePolicy - (*RedirectAction)(nil), // 15: envoy.config.route.v4alpha.RedirectAction - (*DirectResponseAction)(nil), // 16: envoy.config.route.v4alpha.DirectResponseAction - (*Decorator)(nil), // 17: envoy.config.route.v4alpha.Decorator - (*Tracing)(nil), // 18: envoy.config.route.v4alpha.Tracing - (*VirtualCluster)(nil), // 19: envoy.config.route.v4alpha.VirtualCluster - (*RateLimit)(nil), // 20: envoy.config.route.v4alpha.RateLimit - (*HeaderMatcher)(nil), // 21: envoy.config.route.v4alpha.HeaderMatcher - (*QueryParameterMatcher)(nil), // 22: envoy.config.route.v4alpha.QueryParameterMatcher - (*InternalRedirectPolicy)(nil), // 23: envoy.config.route.v4alpha.InternalRedirectPolicy - nil, // 24: envoy.config.route.v4alpha.VirtualHost.TypedPerFilterConfigEntry - nil, // 25: envoy.config.route.v4alpha.Route.TypedPerFilterConfigEntry - (*WeightedCluster_ClusterWeight)(nil), // 26: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight - nil, // 27: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - (*RouteMatch_GrpcRouteMatchOptions)(nil), // 28: envoy.config.route.v4alpha.RouteMatch.GrpcRouteMatchOptions - (*RouteMatch_TlsContextMatchOptions)(nil), // 29: envoy.config.route.v4alpha.RouteMatch.TlsContextMatchOptions - (*RouteMatch_ConnectMatcher)(nil), // 30: envoy.config.route.v4alpha.RouteMatch.ConnectMatcher - (*RouteAction_RequestMirrorPolicy)(nil), // 31: envoy.config.route.v4alpha.RouteAction.RequestMirrorPolicy - (*RouteAction_HashPolicy)(nil), // 32: envoy.config.route.v4alpha.RouteAction.HashPolicy - (*RouteAction_UpgradeConfig)(nil), // 33: envoy.config.route.v4alpha.RouteAction.UpgradeConfig - (*RouteAction_MaxStreamDuration)(nil), // 34: envoy.config.route.v4alpha.RouteAction.MaxStreamDuration - (*RouteAction_HashPolicy_Header)(nil), // 35: envoy.config.route.v4alpha.RouteAction.HashPolicy.Header - (*RouteAction_HashPolicy_Cookie)(nil), // 36: envoy.config.route.v4alpha.RouteAction.HashPolicy.Cookie - (*RouteAction_HashPolicy_ConnectionProperties)(nil), // 37: envoy.config.route.v4alpha.RouteAction.HashPolicy.ConnectionProperties - (*RouteAction_HashPolicy_QueryParameter)(nil), // 38: envoy.config.route.v4alpha.RouteAction.HashPolicy.QueryParameter - (*RouteAction_HashPolicy_FilterState)(nil), // 39: envoy.config.route.v4alpha.RouteAction.HashPolicy.FilterState - (*RouteAction_UpgradeConfig_ConnectConfig)(nil), // 40: envoy.config.route.v4alpha.RouteAction.UpgradeConfig.ConnectConfig - (*RetryPolicy_RetryPriority)(nil), // 41: envoy.config.route.v4alpha.RetryPolicy.RetryPriority - (*RetryPolicy_RetryHostPredicate)(nil), // 42: envoy.config.route.v4alpha.RetryPolicy.RetryHostPredicate - (*RetryPolicy_RetryBackOff)(nil), // 43: envoy.config.route.v4alpha.RetryPolicy.RetryBackOff - (*RetryPolicy_ResetHeader)(nil), // 44: envoy.config.route.v4alpha.RetryPolicy.ResetHeader - (*RetryPolicy_RateLimitedRetryBackOff)(nil), // 45: envoy.config.route.v4alpha.RetryPolicy.RateLimitedRetryBackOff - (*RateLimit_Action)(nil), // 46: envoy.config.route.v4alpha.RateLimit.Action - (*RateLimit_Override)(nil), // 47: envoy.config.route.v4alpha.RateLimit.Override - (*RateLimit_Action_SourceCluster)(nil), // 48: envoy.config.route.v4alpha.RateLimit.Action.SourceCluster - (*RateLimit_Action_DestinationCluster)(nil), // 49: envoy.config.route.v4alpha.RateLimit.Action.DestinationCluster - (*RateLimit_Action_RequestHeaders)(nil), // 50: envoy.config.route.v4alpha.RateLimit.Action.RequestHeaders - (*RateLimit_Action_RemoteAddress)(nil), // 51: envoy.config.route.v4alpha.RateLimit.Action.RemoteAddress - (*RateLimit_Action_GenericKey)(nil), // 52: envoy.config.route.v4alpha.RateLimit.Action.GenericKey - (*RateLimit_Action_HeaderValueMatch)(nil), // 53: envoy.config.route.v4alpha.RateLimit.Action.HeaderValueMatch - (*RateLimit_Action_DynamicMetaData)(nil), // 54: envoy.config.route.v4alpha.RateLimit.Action.DynamicMetaData - (*RateLimit_Action_MetaData)(nil), // 55: envoy.config.route.v4alpha.RateLimit.Action.MetaData - (*RateLimit_Override_DynamicMetadata)(nil), // 56: envoy.config.route.v4alpha.RateLimit.Override.DynamicMetadata - (*v4alpha.HeaderValueOption)(nil), // 57: envoy.config.core.v4alpha.HeaderValueOption - (*any.Any)(nil), // 58: google.protobuf.Any - (*wrappers.UInt32Value)(nil), // 59: google.protobuf.UInt32Value - (*v4alpha.Metadata)(nil), // 60: envoy.config.core.v4alpha.Metadata - (*v4alpha1.RegexMatcher)(nil), // 61: envoy.type.matcher.v4alpha.RegexMatcher - (*wrappers.BoolValue)(nil), // 62: google.protobuf.BoolValue - (*v4alpha.RuntimeFractionalPercent)(nil), // 63: envoy.config.core.v4alpha.RuntimeFractionalPercent - (*v4alpha1.StringMatcher)(nil), // 64: envoy.type.matcher.v4alpha.StringMatcher - (*v4alpha1.RegexMatchAndSubstitute)(nil), // 65: envoy.type.matcher.v4alpha.RegexMatchAndSubstitute - (*duration.Duration)(nil), // 66: google.protobuf.Duration - (v4alpha.RoutingPriority)(0), // 67: envoy.config.core.v4alpha.RoutingPriority - (*v3.FractionalPercent)(nil), // 68: envoy.type.v3.FractionalPercent - (*v4alpha.DataSource)(nil), // 69: envoy.config.core.v4alpha.DataSource - (*v31.CustomTag)(nil), // 70: envoy.type.tracing.v3.CustomTag - (*v3.Int64Range)(nil), // 71: envoy.type.v3.Int64Range - (*v4alpha.TypedExtensionConfig)(nil), // 72: envoy.config.core.v4alpha.TypedExtensionConfig - (*v4alpha.ProxyProtocolConfig)(nil), // 73: envoy.config.core.v4alpha.ProxyProtocolConfig - (*v32.MetadataKey)(nil), // 74: envoy.type.metadata.v3.MetadataKey -} -var file_envoy_config_route_v4alpha_route_components_proto_depIdxs = []int32{ - 8, // 0: envoy.config.route.v4alpha.VirtualHost.routes:type_name -> envoy.config.route.v4alpha.Route - 0, // 1: envoy.config.route.v4alpha.VirtualHost.require_tls:type_name -> envoy.config.route.v4alpha.VirtualHost.TlsRequirementType - 19, // 2: envoy.config.route.v4alpha.VirtualHost.virtual_clusters:type_name -> envoy.config.route.v4alpha.VirtualCluster - 20, // 3: envoy.config.route.v4alpha.VirtualHost.rate_limits:type_name -> envoy.config.route.v4alpha.RateLimit - 57, // 4: envoy.config.route.v4alpha.VirtualHost.request_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 57, // 5: envoy.config.route.v4alpha.VirtualHost.response_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 11, // 6: envoy.config.route.v4alpha.VirtualHost.cors:type_name -> envoy.config.route.v4alpha.CorsPolicy - 24, // 7: envoy.config.route.v4alpha.VirtualHost.typed_per_filter_config:type_name -> envoy.config.route.v4alpha.VirtualHost.TypedPerFilterConfigEntry - 13, // 8: envoy.config.route.v4alpha.VirtualHost.retry_policy:type_name -> envoy.config.route.v4alpha.RetryPolicy - 58, // 9: envoy.config.route.v4alpha.VirtualHost.retry_policy_typed_config:type_name -> google.protobuf.Any - 14, // 10: envoy.config.route.v4alpha.VirtualHost.hedge_policy:type_name -> envoy.config.route.v4alpha.HedgePolicy - 59, // 11: envoy.config.route.v4alpha.VirtualHost.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 58, // 12: envoy.config.route.v4alpha.FilterAction.action:type_name -> google.protobuf.Any - 10, // 13: envoy.config.route.v4alpha.Route.match:type_name -> envoy.config.route.v4alpha.RouteMatch - 12, // 14: envoy.config.route.v4alpha.Route.route:type_name -> envoy.config.route.v4alpha.RouteAction - 15, // 15: envoy.config.route.v4alpha.Route.redirect:type_name -> envoy.config.route.v4alpha.RedirectAction - 16, // 16: envoy.config.route.v4alpha.Route.direct_response:type_name -> envoy.config.route.v4alpha.DirectResponseAction - 7, // 17: envoy.config.route.v4alpha.Route.filter_action:type_name -> envoy.config.route.v4alpha.FilterAction - 60, // 18: envoy.config.route.v4alpha.Route.metadata:type_name -> envoy.config.core.v4alpha.Metadata - 17, // 19: envoy.config.route.v4alpha.Route.decorator:type_name -> envoy.config.route.v4alpha.Decorator - 25, // 20: envoy.config.route.v4alpha.Route.typed_per_filter_config:type_name -> envoy.config.route.v4alpha.Route.TypedPerFilterConfigEntry - 57, // 21: envoy.config.route.v4alpha.Route.request_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 57, // 22: envoy.config.route.v4alpha.Route.response_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 18, // 23: envoy.config.route.v4alpha.Route.tracing:type_name -> envoy.config.route.v4alpha.Tracing - 59, // 24: envoy.config.route.v4alpha.Route.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 26, // 25: envoy.config.route.v4alpha.WeightedCluster.clusters:type_name -> envoy.config.route.v4alpha.WeightedCluster.ClusterWeight - 59, // 26: envoy.config.route.v4alpha.WeightedCluster.total_weight:type_name -> google.protobuf.UInt32Value - 61, // 27: envoy.config.route.v4alpha.RouteMatch.safe_regex:type_name -> envoy.type.matcher.v4alpha.RegexMatcher - 30, // 28: envoy.config.route.v4alpha.RouteMatch.connect_matcher:type_name -> envoy.config.route.v4alpha.RouteMatch.ConnectMatcher - 62, // 29: envoy.config.route.v4alpha.RouteMatch.case_sensitive:type_name -> google.protobuf.BoolValue - 63, // 30: envoy.config.route.v4alpha.RouteMatch.runtime_fraction:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 21, // 31: envoy.config.route.v4alpha.RouteMatch.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 22, // 32: envoy.config.route.v4alpha.RouteMatch.query_parameters:type_name -> envoy.config.route.v4alpha.QueryParameterMatcher - 28, // 33: envoy.config.route.v4alpha.RouteMatch.grpc:type_name -> envoy.config.route.v4alpha.RouteMatch.GrpcRouteMatchOptions - 29, // 34: envoy.config.route.v4alpha.RouteMatch.tls_context:type_name -> envoy.config.route.v4alpha.RouteMatch.TlsContextMatchOptions - 64, // 35: envoy.config.route.v4alpha.CorsPolicy.allow_origin_string_match:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 62, // 36: envoy.config.route.v4alpha.CorsPolicy.allow_credentials:type_name -> google.protobuf.BoolValue - 63, // 37: envoy.config.route.v4alpha.CorsPolicy.filter_enabled:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 63, // 38: envoy.config.route.v4alpha.CorsPolicy.shadow_enabled:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 9, // 39: envoy.config.route.v4alpha.RouteAction.weighted_clusters:type_name -> envoy.config.route.v4alpha.WeightedCluster - 1, // 40: envoy.config.route.v4alpha.RouteAction.cluster_not_found_response_code:type_name -> envoy.config.route.v4alpha.RouteAction.ClusterNotFoundResponseCode - 60, // 41: envoy.config.route.v4alpha.RouteAction.metadata_match:type_name -> envoy.config.core.v4alpha.Metadata - 65, // 42: envoy.config.route.v4alpha.RouteAction.regex_rewrite:type_name -> envoy.type.matcher.v4alpha.RegexMatchAndSubstitute - 62, // 43: envoy.config.route.v4alpha.RouteAction.auto_host_rewrite:type_name -> google.protobuf.BoolValue - 65, // 44: envoy.config.route.v4alpha.RouteAction.host_rewrite_path_regex:type_name -> envoy.type.matcher.v4alpha.RegexMatchAndSubstitute - 66, // 45: envoy.config.route.v4alpha.RouteAction.timeout:type_name -> google.protobuf.Duration - 66, // 46: envoy.config.route.v4alpha.RouteAction.idle_timeout:type_name -> google.protobuf.Duration - 13, // 47: envoy.config.route.v4alpha.RouteAction.retry_policy:type_name -> envoy.config.route.v4alpha.RetryPolicy - 58, // 48: envoy.config.route.v4alpha.RouteAction.retry_policy_typed_config:type_name -> google.protobuf.Any - 31, // 49: envoy.config.route.v4alpha.RouteAction.request_mirror_policies:type_name -> envoy.config.route.v4alpha.RouteAction.RequestMirrorPolicy - 67, // 50: envoy.config.route.v4alpha.RouteAction.priority:type_name -> envoy.config.core.v4alpha.RoutingPriority - 20, // 51: envoy.config.route.v4alpha.RouteAction.rate_limits:type_name -> envoy.config.route.v4alpha.RateLimit - 62, // 52: envoy.config.route.v4alpha.RouteAction.hidden_envoy_deprecated_include_vh_rate_limits:type_name -> google.protobuf.BoolValue - 32, // 53: envoy.config.route.v4alpha.RouteAction.hash_policy:type_name -> envoy.config.route.v4alpha.RouteAction.HashPolicy - 11, // 54: envoy.config.route.v4alpha.RouteAction.cors:type_name -> envoy.config.route.v4alpha.CorsPolicy - 66, // 55: envoy.config.route.v4alpha.RouteAction.hidden_envoy_deprecated_max_grpc_timeout:type_name -> google.protobuf.Duration - 66, // 56: envoy.config.route.v4alpha.RouteAction.hidden_envoy_deprecated_grpc_timeout_offset:type_name -> google.protobuf.Duration - 33, // 57: envoy.config.route.v4alpha.RouteAction.upgrade_configs:type_name -> envoy.config.route.v4alpha.RouteAction.UpgradeConfig - 23, // 58: envoy.config.route.v4alpha.RouteAction.internal_redirect_policy:type_name -> envoy.config.route.v4alpha.InternalRedirectPolicy - 2, // 59: envoy.config.route.v4alpha.RouteAction.hidden_envoy_deprecated_internal_redirect_action:type_name -> envoy.config.route.v4alpha.RouteAction.InternalRedirectAction - 59, // 60: envoy.config.route.v4alpha.RouteAction.hidden_envoy_deprecated_max_internal_redirects:type_name -> google.protobuf.UInt32Value - 14, // 61: envoy.config.route.v4alpha.RouteAction.hedge_policy:type_name -> envoy.config.route.v4alpha.HedgePolicy - 34, // 62: envoy.config.route.v4alpha.RouteAction.max_stream_duration:type_name -> envoy.config.route.v4alpha.RouteAction.MaxStreamDuration - 59, // 63: envoy.config.route.v4alpha.RetryPolicy.max_retries:type_name -> google.protobuf.UInt32Value - 66, // 64: envoy.config.route.v4alpha.RetryPolicy.per_try_timeout:type_name -> google.protobuf.Duration - 41, // 65: envoy.config.route.v4alpha.RetryPolicy.retry_priority:type_name -> envoy.config.route.v4alpha.RetryPolicy.RetryPriority - 42, // 66: envoy.config.route.v4alpha.RetryPolicy.retry_host_predicate:type_name -> envoy.config.route.v4alpha.RetryPolicy.RetryHostPredicate - 43, // 67: envoy.config.route.v4alpha.RetryPolicy.retry_back_off:type_name -> envoy.config.route.v4alpha.RetryPolicy.RetryBackOff - 45, // 68: envoy.config.route.v4alpha.RetryPolicy.rate_limited_retry_back_off:type_name -> envoy.config.route.v4alpha.RetryPolicy.RateLimitedRetryBackOff - 21, // 69: envoy.config.route.v4alpha.RetryPolicy.retriable_headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 21, // 70: envoy.config.route.v4alpha.RetryPolicy.retriable_request_headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 59, // 71: envoy.config.route.v4alpha.HedgePolicy.initial_requests:type_name -> google.protobuf.UInt32Value - 68, // 72: envoy.config.route.v4alpha.HedgePolicy.additional_request_chance:type_name -> envoy.type.v3.FractionalPercent - 65, // 73: envoy.config.route.v4alpha.RedirectAction.regex_rewrite:type_name -> envoy.type.matcher.v4alpha.RegexMatchAndSubstitute - 4, // 74: envoy.config.route.v4alpha.RedirectAction.response_code:type_name -> envoy.config.route.v4alpha.RedirectAction.RedirectResponseCode - 69, // 75: envoy.config.route.v4alpha.DirectResponseAction.body:type_name -> envoy.config.core.v4alpha.DataSource - 62, // 76: envoy.config.route.v4alpha.Decorator.propagate:type_name -> google.protobuf.BoolValue - 68, // 77: envoy.config.route.v4alpha.Tracing.client_sampling:type_name -> envoy.type.v3.FractionalPercent - 68, // 78: envoy.config.route.v4alpha.Tracing.random_sampling:type_name -> envoy.type.v3.FractionalPercent - 68, // 79: envoy.config.route.v4alpha.Tracing.overall_sampling:type_name -> envoy.type.v3.FractionalPercent - 70, // 80: envoy.config.route.v4alpha.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag - 21, // 81: envoy.config.route.v4alpha.VirtualCluster.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 59, // 82: envoy.config.route.v4alpha.RateLimit.stage:type_name -> google.protobuf.UInt32Value - 46, // 83: envoy.config.route.v4alpha.RateLimit.actions:type_name -> envoy.config.route.v4alpha.RateLimit.Action - 47, // 84: envoy.config.route.v4alpha.RateLimit.limit:type_name -> envoy.config.route.v4alpha.RateLimit.Override - 61, // 85: envoy.config.route.v4alpha.HeaderMatcher.safe_regex_match:type_name -> envoy.type.matcher.v4alpha.RegexMatcher - 71, // 86: envoy.config.route.v4alpha.HeaderMatcher.range_match:type_name -> envoy.type.v3.Int64Range - 64, // 87: envoy.config.route.v4alpha.QueryParameterMatcher.string_match:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 59, // 88: envoy.config.route.v4alpha.InternalRedirectPolicy.max_internal_redirects:type_name -> google.protobuf.UInt32Value - 72, // 89: envoy.config.route.v4alpha.InternalRedirectPolicy.predicates:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 58, // 90: envoy.config.route.v4alpha.VirtualHost.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 58, // 91: envoy.config.route.v4alpha.Route.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 59, // 92: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value - 60, // 93: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v4alpha.Metadata - 57, // 94: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.request_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 57, // 95: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.response_headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 27, // 96: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.typed_per_filter_config:type_name -> envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - 58, // 97: envoy.config.route.v4alpha.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 62, // 98: envoy.config.route.v4alpha.RouteMatch.TlsContextMatchOptions.presented:type_name -> google.protobuf.BoolValue - 62, // 99: envoy.config.route.v4alpha.RouteMatch.TlsContextMatchOptions.validated:type_name -> google.protobuf.BoolValue - 63, // 100: envoy.config.route.v4alpha.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 62, // 101: envoy.config.route.v4alpha.RouteAction.RequestMirrorPolicy.trace_sampled:type_name -> google.protobuf.BoolValue - 35, // 102: envoy.config.route.v4alpha.RouteAction.HashPolicy.header:type_name -> envoy.config.route.v4alpha.RouteAction.HashPolicy.Header - 36, // 103: envoy.config.route.v4alpha.RouteAction.HashPolicy.cookie:type_name -> envoy.config.route.v4alpha.RouteAction.HashPolicy.Cookie - 37, // 104: envoy.config.route.v4alpha.RouteAction.HashPolicy.connection_properties:type_name -> envoy.config.route.v4alpha.RouteAction.HashPolicy.ConnectionProperties - 38, // 105: envoy.config.route.v4alpha.RouteAction.HashPolicy.query_parameter:type_name -> envoy.config.route.v4alpha.RouteAction.HashPolicy.QueryParameter - 39, // 106: envoy.config.route.v4alpha.RouteAction.HashPolicy.filter_state:type_name -> envoy.config.route.v4alpha.RouteAction.HashPolicy.FilterState - 62, // 107: envoy.config.route.v4alpha.RouteAction.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 40, // 108: envoy.config.route.v4alpha.RouteAction.UpgradeConfig.connect_config:type_name -> envoy.config.route.v4alpha.RouteAction.UpgradeConfig.ConnectConfig - 66, // 109: envoy.config.route.v4alpha.RouteAction.MaxStreamDuration.max_stream_duration:type_name -> google.protobuf.Duration - 66, // 110: envoy.config.route.v4alpha.RouteAction.MaxStreamDuration.grpc_timeout_header_max:type_name -> google.protobuf.Duration - 66, // 111: envoy.config.route.v4alpha.RouteAction.MaxStreamDuration.grpc_timeout_header_offset:type_name -> google.protobuf.Duration - 65, // 112: envoy.config.route.v4alpha.RouteAction.HashPolicy.Header.regex_rewrite:type_name -> envoy.type.matcher.v4alpha.RegexMatchAndSubstitute - 66, // 113: envoy.config.route.v4alpha.RouteAction.HashPolicy.Cookie.ttl:type_name -> google.protobuf.Duration - 73, // 114: envoy.config.route.v4alpha.RouteAction.UpgradeConfig.ConnectConfig.proxy_protocol_config:type_name -> envoy.config.core.v4alpha.ProxyProtocolConfig - 58, // 115: envoy.config.route.v4alpha.RetryPolicy.RetryPriority.typed_config:type_name -> google.protobuf.Any - 58, // 116: envoy.config.route.v4alpha.RetryPolicy.RetryHostPredicate.typed_config:type_name -> google.protobuf.Any - 66, // 117: envoy.config.route.v4alpha.RetryPolicy.RetryBackOff.base_interval:type_name -> google.protobuf.Duration - 66, // 118: envoy.config.route.v4alpha.RetryPolicy.RetryBackOff.max_interval:type_name -> google.protobuf.Duration - 3, // 119: envoy.config.route.v4alpha.RetryPolicy.ResetHeader.format:type_name -> envoy.config.route.v4alpha.RetryPolicy.ResetHeaderFormat - 44, // 120: envoy.config.route.v4alpha.RetryPolicy.RateLimitedRetryBackOff.reset_headers:type_name -> envoy.config.route.v4alpha.RetryPolicy.ResetHeader - 66, // 121: envoy.config.route.v4alpha.RetryPolicy.RateLimitedRetryBackOff.max_interval:type_name -> google.protobuf.Duration - 48, // 122: envoy.config.route.v4alpha.RateLimit.Action.source_cluster:type_name -> envoy.config.route.v4alpha.RateLimit.Action.SourceCluster - 49, // 123: envoy.config.route.v4alpha.RateLimit.Action.destination_cluster:type_name -> envoy.config.route.v4alpha.RateLimit.Action.DestinationCluster - 50, // 124: envoy.config.route.v4alpha.RateLimit.Action.request_headers:type_name -> envoy.config.route.v4alpha.RateLimit.Action.RequestHeaders - 51, // 125: envoy.config.route.v4alpha.RateLimit.Action.remote_address:type_name -> envoy.config.route.v4alpha.RateLimit.Action.RemoteAddress - 52, // 126: envoy.config.route.v4alpha.RateLimit.Action.generic_key:type_name -> envoy.config.route.v4alpha.RateLimit.Action.GenericKey - 53, // 127: envoy.config.route.v4alpha.RateLimit.Action.header_value_match:type_name -> envoy.config.route.v4alpha.RateLimit.Action.HeaderValueMatch - 54, // 128: envoy.config.route.v4alpha.RateLimit.Action.hidden_envoy_deprecated_dynamic_metadata:type_name -> envoy.config.route.v4alpha.RateLimit.Action.DynamicMetaData - 55, // 129: envoy.config.route.v4alpha.RateLimit.Action.metadata:type_name -> envoy.config.route.v4alpha.RateLimit.Action.MetaData - 72, // 130: envoy.config.route.v4alpha.RateLimit.Action.extension:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 56, // 131: envoy.config.route.v4alpha.RateLimit.Override.dynamic_metadata:type_name -> envoy.config.route.v4alpha.RateLimit.Override.DynamicMetadata - 62, // 132: envoy.config.route.v4alpha.RateLimit.Action.HeaderValueMatch.expect_match:type_name -> google.protobuf.BoolValue - 21, // 133: envoy.config.route.v4alpha.RateLimit.Action.HeaderValueMatch.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 74, // 134: envoy.config.route.v4alpha.RateLimit.Action.DynamicMetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 74, // 135: envoy.config.route.v4alpha.RateLimit.Action.MetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 5, // 136: envoy.config.route.v4alpha.RateLimit.Action.MetaData.source:type_name -> envoy.config.route.v4alpha.RateLimit.Action.MetaData.Source - 74, // 137: envoy.config.route.v4alpha.RateLimit.Override.DynamicMetadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 138, // [138:138] is the sub-list for method output_type - 138, // [138:138] is the sub-list for method input_type - 138, // [138:138] is the sub-list for extension type_name - 138, // [138:138] is the sub-list for extension extendee - 0, // [0:138] is the sub-list for field type_name -} - -func init() { file_envoy_config_route_v4alpha_route_components_proto_init() } -func file_envoy_config_route_v4alpha_route_components_proto_init() { - if File_envoy_config_route_v4alpha_route_components_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualHost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CorsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HedgePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DirectResponseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decorator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tracing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParameterMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InternalRedirectPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster_ClusterWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_GrpcRouteMatchOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_TlsContextMatchOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_ConnectMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_RequestMirrorPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_UpgradeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_MaxStreamDuration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_Cookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_ConnectionProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_QueryParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_FilterState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_UpgradeConfig_ConnectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryPriority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryHostPredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryBackOff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_ResetHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RateLimitedRetryBackOff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Override); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_SourceCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_DestinationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_RequestHeaders); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_RemoteAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_GenericKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_HeaderValueMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_DynamicMetaData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_MetaData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Override_DynamicMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Route_Route)(nil), - (*Route_Redirect)(nil), - (*Route_DirectResponse)(nil), - (*Route_FilterAction)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*RouteMatch_Prefix)(nil), - (*RouteMatch_Path)(nil), - (*RouteMatch_SafeRegex)(nil), - (*RouteMatch_ConnectMatcher_)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*CorsPolicy_FilterEnabled)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*RouteAction_Cluster)(nil), - (*RouteAction_ClusterHeader)(nil), - (*RouteAction_WeightedClusters)(nil), - (*RouteAction_HostRewriteLiteral)(nil), - (*RouteAction_AutoHostRewrite)(nil), - (*RouteAction_HostRewriteHeader)(nil), - (*RouteAction_HostRewritePathRegex)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[9].OneofWrappers = []interface{}{ - (*RedirectAction_HttpsRedirect)(nil), - (*RedirectAction_SchemeRedirect)(nil), - (*RedirectAction_PathRedirect)(nil), - (*RedirectAction_PrefixRewrite)(nil), - (*RedirectAction_RegexRewrite)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[15].OneofWrappers = []interface{}{ - (*HeaderMatcher_ExactMatch)(nil), - (*HeaderMatcher_SafeRegexMatch)(nil), - (*HeaderMatcher_RangeMatch)(nil), - (*HeaderMatcher_PresentMatch)(nil), - (*HeaderMatcher_PrefixMatch)(nil), - (*HeaderMatcher_SuffixMatch)(nil), - (*HeaderMatcher_ContainsMatch)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[16].OneofWrappers = []interface{}{ - (*QueryParameterMatcher_StringMatch)(nil), - (*QueryParameterMatcher_PresentMatch)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[26].OneofWrappers = []interface{}{ - (*RouteAction_HashPolicy_Header_)(nil), - (*RouteAction_HashPolicy_Cookie_)(nil), - (*RouteAction_HashPolicy_ConnectionProperties_)(nil), - (*RouteAction_HashPolicy_QueryParameter_)(nil), - (*RouteAction_HashPolicy_FilterState_)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[35].OneofWrappers = []interface{}{ - (*RetryPolicy_RetryPriority_TypedConfig)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[36].OneofWrappers = []interface{}{ - (*RetryPolicy_RetryHostPredicate_TypedConfig)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[40].OneofWrappers = []interface{}{ - (*RateLimit_Action_SourceCluster_)(nil), - (*RateLimit_Action_DestinationCluster_)(nil), - (*RateLimit_Action_RequestHeaders_)(nil), - (*RateLimit_Action_RemoteAddress_)(nil), - (*RateLimit_Action_GenericKey_)(nil), - (*RateLimit_Action_HeaderValueMatch_)(nil), - (*RateLimit_Action_HiddenEnvoyDeprecatedDynamicMetadata)(nil), - (*RateLimit_Action_Metadata)(nil), - (*RateLimit_Action_Extension)(nil), - } - file_envoy_config_route_v4alpha_route_components_proto_msgTypes[41].OneofWrappers = []interface{}{ - (*RateLimit_Override_DynamicMetadata_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_route_v4alpha_route_components_proto_rawDesc, - NumEnums: 6, - NumMessages: 51, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_route_v4alpha_route_components_proto_goTypes, - DependencyIndexes: file_envoy_config_route_v4alpha_route_components_proto_depIdxs, - EnumInfos: file_envoy_config_route_v4alpha_route_components_proto_enumTypes, - MessageInfos: file_envoy_config_route_v4alpha_route_components_proto_msgTypes, - }.Build() - File_envoy_config_route_v4alpha_route_components_proto = out.File - file_envoy_config_route_v4alpha_route_components_proto_rawDesc = nil - file_envoy_config_route_v4alpha_route_components_proto_goTypes = nil - file_envoy_config_route_v4alpha_route_components_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/route/v4alpha/route_components.pb.validate.go b/pkg/api/envoy/config/route/v4alpha/route_components.pb.validate.go deleted file mode 100644 index 6201398503..0000000000 --- a/pkg/api/envoy/config/route/v4alpha/route_components.pb.validate.go +++ /dev/null @@ -1,5550 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/route/v4alpha/route_components.proto - -package envoy_config_route_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.RoutingPriority(0) -) - -// Validate checks the field values on VirtualHost with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *VirtualHost) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return VirtualHostValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - return VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - } - - if !_VirtualHost_RequestHeadersToRemove_Pattern.MatchString(item) { - return VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - 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, - } - } - } - - } - - for idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - return VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - } - - if !_VirtualHost_ResponseHeadersToRemove_Pattern.MatchString(item) { - return VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - 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.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]*$") - -var _VirtualHost_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _VirtualHost_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on FilterAction with the rules defined in -// the proto definition for this message. If any rules are violated, 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.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, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - return RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - } - - if !_Route_RequestHeadersToRemove_Pattern.MatchString(item) { - return RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - 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, - } - } - } - - } - - for idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - return RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - } - - if !_Route_ResponseHeadersToRemove_Pattern.MatchString(item) { - return RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - 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{} - -var _Route_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _Route_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on WeightedCluster with the rules defined -// in the proto definition for this message. If any rules are violated, 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_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, - } - } - } - - case *RouteMatch_ConnectMatcher_: - - if v, ok := interface{}(m.GetConnectMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "ConnectMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - 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.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_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, - } - } - } - - 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 := v4alpha.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.GetHiddenEnvoyDeprecatedIncludeVhRateLimits()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HiddenEnvoyDeprecatedIncludeVhRateLimits", - 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.GetHiddenEnvoyDeprecatedMaxGrpcTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HiddenEnvoyDeprecatedMaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedGrpcTimeoutOffset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HiddenEnvoyDeprecatedGrpcTimeoutOffset", - 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, - } - } - } - - } - - if v, ok := interface{}(m.GetInternalRedirectPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "InternalRedirectPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for HiddenEnvoyDeprecatedInternalRedirectAction - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedMaxInternalRedirects()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HiddenEnvoyDeprecatedMaxInternalRedirects", - 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, - } - } - } - - if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.ClusterSpecifier.(type) { - - case *RouteAction_Cluster: - - if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteActionValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - } - - case *RouteAction_ClusterHeader: - - if utf8.RuneCountInString(m.GetClusterHeader()) < 1 { - return RouteActionValidationError{ - field: "ClusterHeader", - reason: "value length must be at least 1 runes", - } - } - - 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_HostRewriteLiteral: - - if !_RouteAction_HostRewriteLiteral_Pattern.MatchString(m.GetHostRewriteLiteral()) { - return RouteActionValidationError{ - field: "HostRewriteLiteral", - 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_HostRewriteHeader: - - if !_RouteAction_HostRewriteHeader_Pattern.MatchString(m.GetHostRewriteHeader()) { - return RouteActionValidationError{ - field: "HostRewriteHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - case *RouteAction_HostRewritePathRegex: - - if v, ok := interface{}(m.GetHostRewritePathRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HostRewritePathRegex", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - 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_HostRewriteLiteral_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_HostRewriteHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RetryPolicy) Validate() error { - if m == nil { - return nil - } - - // no validation rules for RetryOn - - if v, ok := interface{}(m.GetMaxRetries()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "MaxRetries", - 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, - } - } - } - - if v, ok := interface{}(m.GetRateLimitedRetryBackOff()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RateLimitedRetryBackOff", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRetriableHeaders() { - _, _ = idx, item - - if 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]*$\"", - } - } - - case *RedirectAction_RegexRewrite: - - if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RedirectActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - 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 utf8.RuneCountInString(m.GetOperation()) < 1 { - return DecoratorValidationError{ - field: "Operation", - reason: "value length must be at least 1 runes", - } - } - - 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 - } - - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return VirtualClusterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - } - - if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "Limit", - reason: "embedded message failed validation", - cause: err, - } - } - } - - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return HeaderMatcherValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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_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 utf8.RuneCountInString(m.GetPrefixMatch()) < 1 { - return HeaderMatcherValidationError{ - field: "PrefixMatch", - reason: "value length must be at least 1 runes", - } - } - - case *HeaderMatcher_SuffixMatch: - - if utf8.RuneCountInString(m.GetSuffixMatch()) < 1 { - return HeaderMatcherValidationError{ - field: "SuffixMatch", - reason: "value length must be at least 1 runes", - } - } - - case *HeaderMatcher_ContainsMatch: - - if utf8.RuneCountInString(m.GetContainsMatch()) < 1 { - return HeaderMatcherValidationError{ - field: "ContainsMatch", - reason: "value length must be at least 1 runes", - } - } - - } - - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return QueryParameterMatcherValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if len(m.GetName()) > 1024 { - return QueryParameterMatcherValidationError{ - field: "Name", - reason: "value length must be at most 1024 bytes", - } - } - - 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 InternalRedirectPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *InternalRedirectPolicy) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return InternalRedirectPolicyValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetRedirectResponseCodes()) > 5 { - return InternalRedirectPolicyValidationError{ - field: "RedirectResponseCodes", - reason: "value must contain no more than 5 item(s)", - } - } - - for idx, item := range m.GetPredicates() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return InternalRedirectPolicyValidationError{ - field: fmt.Sprintf("Predicates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for AllowCrossSchemeRedirect - - return nil -} - -// InternalRedirectPolicyValidationError is the validation error returned by -// InternalRedirectPolicy.Validate if the designated constraints aren't met. -type InternalRedirectPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e InternalRedirectPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e InternalRedirectPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e InternalRedirectPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e InternalRedirectPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e InternalRedirectPolicyValidationError) ErrorName() string { - return "InternalRedirectPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e InternalRedirectPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInternalRedirectPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = InternalRedirectPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = InternalRedirectPolicyValidationError{} - -// Validate checks the field values on 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 utf8.RuneCountInString(m.GetName()) < 1 { - return WeightedCluster_ClusterWeightValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if !_WeightedCluster_ClusterWeight_RequestHeadersToRemove_Pattern.MatchString(item) { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - 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 idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if !_WeightedCluster_ClusterWeight_ResponseHeadersToRemove_Pattern.MatchString(item) { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - 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{} - -var _WeightedCluster_ClusterWeight_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _WeightedCluster_ClusterWeight_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteMatch_GrpcRouteMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, 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 RouteMatch_ConnectMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RouteMatch_ConnectMatcher) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// RouteMatch_ConnectMatcherValidationError is the validation error returned by -// RouteMatch_ConnectMatcher.Validate if the designated constraints aren't met. -type RouteMatch_ConnectMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatch_ConnectMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatch_ConnectMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatch_ConnectMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatch_ConnectMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatch_ConnectMatcherValidationError) ErrorName() string { - return "RouteMatch_ConnectMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteMatch_ConnectMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch_ConnectMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatch_ConnectMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatch_ConnectMatcherValidationError{} - -// Validate checks the field values on RouteAction_RequestMirrorPolicy with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RouteAction_RequestMirrorPolicy) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteAction_RequestMirrorPolicyValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - } - - 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 utf8.RuneCountInString(m.GetUpgradeType()) < 1 { - return RouteAction_UpgradeConfigValidationError{ - field: "UpgradeType", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - if v, ok := interface{}(m.GetConnectConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_UpgradeConfigValidationError{ - field: "ConnectConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - 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_MaxStreamDuration with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RouteAction_MaxStreamDuration) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_MaxStreamDurationValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetGrpcTimeoutHeaderMax()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderMax", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetGrpcTimeoutHeaderOffset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderOffset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RouteAction_MaxStreamDurationValidationError is the validation error -// returned by RouteAction_MaxStreamDuration.Validate if the designated -// constraints aren't met. -type RouteAction_MaxStreamDurationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_MaxStreamDurationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_MaxStreamDurationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_MaxStreamDurationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_MaxStreamDurationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_MaxStreamDurationValidationError) ErrorName() string { - return "RouteAction_MaxStreamDurationValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_MaxStreamDurationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_MaxStreamDuration.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_MaxStreamDurationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_MaxStreamDurationValidationError{} - -// Validate checks the field values on RouteAction_HashPolicy_Header with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RouteAction_HashPolicy_Header) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetHeaderName()) < 1 { - return RouteAction_HashPolicy_HeaderValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 runes", - } - } - - 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]*$\"", - } - } - - if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicy_HeaderValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return RouteAction_HashPolicy_CookieValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return RouteAction_HashPolicy_QueryParameterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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 utf8.RuneCountInString(m.GetKey()) < 1 { - return RouteAction_HashPolicy_FilterStateValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - } - - 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 RouteAction_UpgradeConfig_ConnectConfig -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *RouteAction_UpgradeConfig_ConnectConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetProxyProtocolConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_UpgradeConfig_ConnectConfigValidationError{ - field: "ProxyProtocolConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RouteAction_UpgradeConfig_ConnectConfigValidationError is the validation -// error returned by RouteAction_UpgradeConfig_ConnectConfig.Validate if the -// designated constraints aren't met. -type RouteAction_UpgradeConfig_ConnectConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) ErrorName() string { - return "RouteAction_UpgradeConfig_ConnectConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_UpgradeConfig_ConnectConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_UpgradeConfig_ConnectConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_UpgradeConfig_ConnectConfigValidationError{} - -// Validate checks the field values on RetryPolicy_RetryPriority with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RetryPolicy_RetryPriority) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return RetryPolicy_RetryPriorityValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return RetryPolicy_RetryHostPredicateValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - 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 RetryPolicy_ResetHeader with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RetryPolicy_ResetHeader) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return RetryPolicy_ResetHeaderValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if !_RetryPolicy_ResetHeader_Name_Pattern.MatchString(m.GetName()) { - return RetryPolicy_ResetHeaderValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - if _, ok := RetryPolicy_ResetHeaderFormat_name[int32(m.GetFormat())]; !ok { - return RetryPolicy_ResetHeaderValidationError{ - field: "Format", - reason: "value must be one of the defined enum values", - } - } - - return nil -} - -// RetryPolicy_ResetHeaderValidationError is the validation error returned by -// RetryPolicy_ResetHeader.Validate if the designated constraints aren't met. -type RetryPolicy_ResetHeaderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_ResetHeaderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_ResetHeaderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_ResetHeaderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_ResetHeaderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_ResetHeaderValidationError) ErrorName() string { - return "RetryPolicy_ResetHeaderValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_ResetHeaderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_ResetHeader.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_ResetHeaderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_ResetHeaderValidationError{} - -var _RetryPolicy_ResetHeader_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RetryPolicy_RateLimitedRetryBackOff with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RetryPolicy_RateLimitedRetryBackOff) Validate() error { - if m == nil { - return nil - } - - if len(m.GetResetHeaders()) < 1 { - return RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: "ResetHeaders", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetResetHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: fmt.Sprintf("ResetHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if d := m.GetMaxInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return RetryPolicy_RateLimitedRetryBackOffValidationError{ - 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_RateLimitedRetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", - } - } - - } - - return nil -} - -// RetryPolicy_RateLimitedRetryBackOffValidationError is the validation error -// returned by RetryPolicy_RateLimitedRetryBackOff.Validate if the designated -// constraints aren't met. -type RetryPolicy_RateLimitedRetryBackOffValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) ErrorName() string { - return "RetryPolicy_RateLimitedRetryBackOffValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RateLimitedRetryBackOff.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RateLimitedRetryBackOffValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RateLimitedRetryBackOffValidationError{} - -// Validate checks the field values on RateLimit_Action with the rules defined -// in the proto definition for this message. If any rules are violated, 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, - } - } - } - - case *RateLimit_Action_HiddenEnvoyDeprecatedDynamicMetadata: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "HiddenEnvoyDeprecatedDynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_Metadata: - - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_Extension: - - if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - } - } - } - - 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_Override with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RateLimit_Override) Validate() error { - if m == nil { - return nil - } - - switch m.OverrideSpecifier.(type) { - - case *RateLimit_Override_DynamicMetadata_: - - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_OverrideValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return RateLimit_OverrideValidationError{ - field: "OverrideSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// RateLimit_OverrideValidationError is the validation error returned by -// RateLimit_Override.Validate if the designated constraints aren't met. -type RateLimit_OverrideValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_OverrideValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_OverrideValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_OverrideValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_OverrideValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_OverrideValidationError) ErrorName() string { - return "RateLimit_OverrideValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_OverrideValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Override.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_OverrideValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_OverrideValidationError{} - -// Validate checks the field values on RateLimit_Action_SourceCluster with the -// rules defined in the proto definition for this message. If any rules are -// violated, 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 utf8.RuneCountInString(m.GetHeaderName()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 runes", - } - } - - 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 utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - } - - // no validation rules for SkipIfAbsent - - 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 utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_GenericKeyValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 runes", - } - } - - // no validation rules for DescriptorKey - - 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 utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_HeaderValueMatchValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 runes", - } - } - - 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{} - -// Validate checks the field values on RateLimit_Action_DynamicMetaData with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RateLimit_Action_DynamicMetaData) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_DynamicMetaDataValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - } - - if m.GetMetadataKey() == nil { - return RateLimit_Action_DynamicMetaDataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_DynamicMetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultValue - - return nil -} - -// RateLimit_Action_DynamicMetaDataValidationError is the validation error -// returned by RateLimit_Action_DynamicMetaData.Validate if the designated -// constraints aren't met. -type RateLimit_Action_DynamicMetaDataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_DynamicMetaDataValidationError) ErrorName() string { - return "RateLimit_Action_DynamicMetaDataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_DynamicMetaDataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_DynamicMetaData.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_DynamicMetaDataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_DynamicMetaDataValidationError{} - -// Validate checks the field values on RateLimit_Action_MetaData with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RateLimit_Action_MetaData) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_MetaDataValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - } - - if m.GetMetadataKey() == nil { - return RateLimit_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultValue - - if _, ok := RateLimit_Action_MetaData_Source_name[int32(m.GetSource())]; !ok { - return RateLimit_Action_MetaDataValidationError{ - field: "Source", - reason: "value must be one of the defined enum values", - } - } - - return nil -} - -// RateLimit_Action_MetaDataValidationError is the validation error returned by -// RateLimit_Action_MetaData.Validate if the designated constraints aren't met. -type RateLimit_Action_MetaDataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_MetaDataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_MetaDataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_MetaDataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_MetaDataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_MetaDataValidationError) ErrorName() string { - return "RateLimit_Action_MetaDataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_MetaDataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_MetaData.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_MetaDataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_MetaDataValidationError{} - -// Validate checks the field values on RateLimit_Override_DynamicMetadata with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RateLimit_Override_DynamicMetadata) Validate() error { - if m == nil { - return nil - } - - if m.GetMetadataKey() == nil { - return RateLimit_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RateLimit_Override_DynamicMetadataValidationError is the validation error -// returned by RateLimit_Override_DynamicMetadata.Validate if the designated -// constraints aren't met. -type RateLimit_Override_DynamicMetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Override_DynamicMetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Override_DynamicMetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Override_DynamicMetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Override_DynamicMetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Override_DynamicMetadataValidationError) ErrorName() string { - return "RateLimit_Override_DynamicMetadataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Override_DynamicMetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Override_DynamicMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Override_DynamicMetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Override_DynamicMetadataValidationError{} diff --git a/pkg/api/envoy/config/route/v4alpha/scoped_route.pb.go b/pkg/api/envoy/config/route/v4alpha/scoped_route.pb.go deleted file mode 100644 index c31090ad6d..0000000000 --- a/pkg/api/envoy/config/route/v4alpha/scoped_route.pb.go +++ /dev/null @@ -1,439 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/route/v4alpha/scoped_route.proto - -package envoy_config_route_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` (identified by its resource name). -// -// The HTTP connection manager builds up a table consisting of these Key to -// RouteConfiguration mappings, and looks up the RouteConfiguration to use per -// request according to the algorithm specified in the -// :ref:`scope_key_builder` -// assigned to the HttpConnectionManager. -// -// For example, with the following configurations (in YAML): -// -// HttpConnectionManager config: -// -// .. code:: -// -// ... -// scoped_routes: -// name: foo-scoped-routes -// scope_key_builder: -// fragments: -// - header_value_extractor: -// name: X-Route-Selector -// element_separator: , -// element: -// separator: = -// key: vip -// -// ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` -// or obtained dynamically via SRDS): -// -// .. code:: -// -// (1) -// name: route-scope1 -// route_configuration_name: route-config1 -// key: -// fragments: -// - string_key: 172.10.10.20 -// -// (2) -// name: route-scope2 -// route_configuration_name: route-config2 -// key: -// fragments: -// - string_key: 172.20.20.30 -// -// A request from a client such as: -// -// .. code:: -// -// GET / HTTP/1.1 -// Host: foo.com -// X-Route-Selector: vip=172.10.10.20 -// -// would result in the routing table defined by the `route-config1` -// RouteConfiguration being assigned to the HTTP request/stream. -// -type ScopedRouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether the RouteConfiguration should be loaded on demand. - OnDemand bool `protobuf:"varint,4,opt,name=on_demand,json=onDemand,proto3" json:"on_demand,omitempty"` - // The name assigned to the routing scope. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The resource name to use for a :ref:`envoy_api_msg_service.discovery.v4alpha.DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` associated - // with this scope. - RouteConfigurationName string `protobuf:"bytes,2,opt,name=route_configuration_name,json=routeConfigurationName,proto3" json:"route_configuration_name,omitempty"` - // The key to match against. - Key *ScopedRouteConfiguration_Key `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *ScopedRouteConfiguration) Reset() { - *x = ScopedRouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration) ProtoMessage() {} - -func (x *ScopedRouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_scoped_route_proto_rawDescGZIP(), []int{0} -} - -func (x *ScopedRouteConfiguration) GetOnDemand() bool { - if x != nil { - return x.OnDemand - } - return false -} - -func (x *ScopedRouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScopedRouteConfiguration) GetRouteConfigurationName() string { - if x != nil { - return x.RouteConfigurationName - } - return "" -} - -func (x *ScopedRouteConfiguration) GetKey() *ScopedRouteConfiguration_Key { - if x != nil { - return x.Key - } - return nil -} - -// Specifies a key which is matched against the output of the -// :ref:`scope_key_builder` -// specified in the HttpConnectionManager. The matching is done per HTTP -// request and is dependent on the order of the fragments contained in the -// Key. -type ScopedRouteConfiguration_Key struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The ordered set of fragments to match against. The order must match the - // fragments in the corresponding - // :ref:`scope_key_builder`. - Fragments []*ScopedRouteConfiguration_Key_Fragment `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` -} - -func (x *ScopedRouteConfiguration_Key) Reset() { - *x = ScopedRouteConfiguration_Key{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration_Key) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration_Key) ProtoMessage() {} - -func (x *ScopedRouteConfiguration_Key) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration_Key.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration_Key) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_scoped_route_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *ScopedRouteConfiguration_Key) GetFragments() []*ScopedRouteConfiguration_Key_Fragment { - if x != nil { - return x.Fragments - } - return nil -} - -type ScopedRouteConfiguration_Key_Fragment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // *ScopedRouteConfiguration_Key_Fragment_StringKey - Type isScopedRouteConfiguration_Key_Fragment_Type `protobuf_oneof:"type"` -} - -func (x *ScopedRouteConfiguration_Key_Fragment) Reset() { - *x = ScopedRouteConfiguration_Key_Fragment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration_Key_Fragment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration_Key_Fragment) ProtoMessage() {} - -func (x *ScopedRouteConfiguration_Key_Fragment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration_Key_Fragment.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration_Key_Fragment) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v4alpha_scoped_route_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (m *ScopedRouteConfiguration_Key_Fragment) GetType() isScopedRouteConfiguration_Key_Fragment_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *ScopedRouteConfiguration_Key_Fragment) GetStringKey() string { - if x, ok := x.GetType().(*ScopedRouteConfiguration_Key_Fragment_StringKey); ok { - return x.StringKey - } - return "" -} - -type isScopedRouteConfiguration_Key_Fragment_Type interface { - isScopedRouteConfiguration_Key_Fragment_Type() -} - -type ScopedRouteConfiguration_Key_Fragment_StringKey struct { - // A string to match against. - StringKey string `protobuf:"bytes,1,opt,name=string_key,json=stringKey,proto3,oneof"` -} - -func (*ScopedRouteConfiguration_Key_Fragment_StringKey) isScopedRouteConfiguration_Key_Fragment_Type() { -} - -var File_envoy_config_route_v4alpha_scoped_route_proto protoreflect.FileDescriptor - -var file_envoy_config_route_v4alpha_scoped_route_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x04, 0x0a, 0x18, 0x53, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, - 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, - 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x54, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0xa9, 0x02, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x69, - 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, - 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x7c, 0x0a, 0x08, 0x46, 0x72, 0x61, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, - 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, - 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x46, 0x0a, 0x28, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x10, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_route_v4alpha_scoped_route_proto_rawDescOnce sync.Once - file_envoy_config_route_v4alpha_scoped_route_proto_rawDescData = file_envoy_config_route_v4alpha_scoped_route_proto_rawDesc -) - -func file_envoy_config_route_v4alpha_scoped_route_proto_rawDescGZIP() []byte { - file_envoy_config_route_v4alpha_scoped_route_proto_rawDescOnce.Do(func() { - file_envoy_config_route_v4alpha_scoped_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_route_v4alpha_scoped_route_proto_rawDescData) - }) - return file_envoy_config_route_v4alpha_scoped_route_proto_rawDescData -} - -var file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_config_route_v4alpha_scoped_route_proto_goTypes = []interface{}{ - (*ScopedRouteConfiguration)(nil), // 0: envoy.config.route.v4alpha.ScopedRouteConfiguration - (*ScopedRouteConfiguration_Key)(nil), // 1: envoy.config.route.v4alpha.ScopedRouteConfiguration.Key - (*ScopedRouteConfiguration_Key_Fragment)(nil), // 2: envoy.config.route.v4alpha.ScopedRouteConfiguration.Key.Fragment -} -var file_envoy_config_route_v4alpha_scoped_route_proto_depIdxs = []int32{ - 1, // 0: envoy.config.route.v4alpha.ScopedRouteConfiguration.key:type_name -> envoy.config.route.v4alpha.ScopedRouteConfiguration.Key - 2, // 1: envoy.config.route.v4alpha.ScopedRouteConfiguration.Key.fragments:type_name -> envoy.config.route.v4alpha.ScopedRouteConfiguration.Key.Fragment - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_route_v4alpha_scoped_route_proto_init() } -func file_envoy_config_route_v4alpha_scoped_route_proto_init() { - if File_envoy_config_route_v4alpha_scoped_route_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration_Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration_Key_Fragment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*ScopedRouteConfiguration_Key_Fragment_StringKey)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_route_v4alpha_scoped_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_route_v4alpha_scoped_route_proto_goTypes, - DependencyIndexes: file_envoy_config_route_v4alpha_scoped_route_proto_depIdxs, - MessageInfos: file_envoy_config_route_v4alpha_scoped_route_proto_msgTypes, - }.Build() - File_envoy_config_route_v4alpha_scoped_route_proto = out.File - file_envoy_config_route_v4alpha_scoped_route_proto_rawDesc = nil - file_envoy_config_route_v4alpha_scoped_route_proto_goTypes = nil - file_envoy_config_route_v4alpha_scoped_route_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/route/v4alpha/scoped_route.pb.validate.go b/pkg/api/envoy/config/route/v4alpha/scoped_route.pb.validate.go deleted file mode 100644 index 452e7eafc3..0000000000 --- a/pkg/api/envoy/config/route/v4alpha/scoped_route.pb.validate.go +++ /dev/null @@ -1,305 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/route/v4alpha/scoped_route.proto - -package envoy_config_route_v4alpha - -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{} -) - -// 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 - } - - // no validation rules for OnDemand - - if utf8.RuneCountInString(m.GetName()) < 1 { - return ScopedRouteConfigurationValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetRouteConfigurationName()) < 1 { - return ScopedRouteConfigurationValidationError{ - field: "RouteConfigurationName", - reason: "value length must be at least 1 runes", - } - } - - 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/pkg/api/envoy/config/tap/v3/common.pb.go b/pkg/api/envoy/config/tap/v3/common.pb.go index 965ebb47c4..e867afd6ed 100644 --- a/pkg/api/envoy/config/tap/v3/common.pb.go +++ b/pkg/api/envoy/config/tap/v3/common.pb.go @@ -1,18 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/tap/v3/common.proto -package envoy_config_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/matcher/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,26 +28,22 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Output format. All output is in the form of one or more :ref:`TraceWrapper -// ` messages. This enumeration indicates +// ` messages. This enumeration indicates // how those messages are written. Note that not all sinks support all output formats. See // individual sink documentation for more information. type OutputSink_Format int32 const ( - // Each message will be written as JSON. Any :ref:`body ` + // Each message will be written as JSON. Any :ref:`body ` // data will be present in the :ref:`as_bytes - // ` field. This means that body data will be + // ` field. This means that body data will be // base64 encoded as per the `proto3 JSON mappings // `_. OutputSink_JSON_BODY_AS_BYTES OutputSink_Format = 0 - // Each message will be written as JSON. Any :ref:`body ` + // Each message will be written as JSON. Any :ref:`body ` // data will be present in the :ref:`as_string - // ` field. This means that body data will be + // ` field. This means that body data will be // string encoded as per the `proto3 JSON mappings // `_. This format type is // useful when it is known that that body is human readable (e.g., JSON over HTTP) and the @@ -120,17 +117,17 @@ type TapConfig struct { // The match configuration. If the configuration matches the data source being tapped, a tap will // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. + // Exactly one of :ref:`match ` and + // :ref:`match_config ` must be set. If both + // are set, the :ref:`match ` will be used. // // Deprecated: Do not use. MatchConfig *MatchPredicate `protobuf:"bytes,1,opt,name=match_config,json=matchConfig,proto3" json:"match_config,omitempty"` // The match configuration. If the configuration matches the data source being tapped, a tap will // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. + // Exactly one of :ref:`match ` and + // :ref:`match_config ` must be set. If both + // are set, the :ref:`match ` will be used. Match *v3.MatchPredicate `protobuf:"bytes,4,opt,name=match,proto3" json:"match,omitempty"` // The tap output configuration. If a match configuration matches a data source being tapped, // a tap will occur and the data will be written to the configured output. @@ -142,7 +139,7 @@ type TapConfig struct { // .. note:: // // This field defaults to 100/:ref:`HUNDRED - // `. + // `. TapEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=tap_enabled,json=tapEnabled,proto3" json:"tap_enabled,omitempty"` } @@ -541,17 +538,17 @@ type OutputConfig struct { Sinks []*OutputSink `protobuf:"bytes,1,rep,name=sinks,proto3" json:"sinks,omitempty"` // For buffered tapping, the maximum amount of received body that will be buffered prior to // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the + // ` field will be set. If not specified, the // default is 1KiB. MaxBufferedRxBytes *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_buffered_rx_bytes,json=maxBufferedRxBytes,proto3" json:"max_buffered_rx_bytes,omitempty"` // For buffered tapping, the maximum amount of transmitted body that will be buffered prior to // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the + // ` field will be set. If not specified, the // default is 1KiB. MaxBufferedTxBytes *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=max_buffered_tx_bytes,json=maxBufferedTxBytes,proto3" json:"max_buffered_tx_bytes,omitempty"` // Indicates whether taps produce a single buffered message per tap, or multiple streamed // messages per tap in the emitted :ref:`TraceWrapper - // ` messages. Note that streamed tapping does not + // ` messages. Note that streamed tapping does not // mean that no buffering takes place. Buffering may be required if data is processed before a // match can be determined. See the HTTP tap filter :ref:`streaming // ` documentation for more information. @@ -619,6 +616,7 @@ func (x *OutputConfig) GetStreaming() bool { } // Tap output sink configuration. +// [#next-free-field: 6] type OutputSink struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -630,6 +628,7 @@ type OutputSink struct { // *OutputSink_StreamingAdmin // *OutputSink_FilePerTap // *OutputSink_StreamingGrpc + // *OutputSink_BufferedAdmin OutputSinkType isOutputSink_OutputSinkType `protobuf_oneof:"output_sink_type"` } @@ -700,6 +699,13 @@ func (x *OutputSink) GetStreamingGrpc() *StreamingGrpcSink { return nil } +func (x *OutputSink) GetBufferedAdmin() *BufferedAdminSink { + if x, ok := x.GetOutputSinkType().(*OutputSink_BufferedAdmin); ok { + return x.BufferedAdmin + } + return nil +} + type isOutputSink_OutputSinkType interface { isOutputSink_OutputSinkType() } @@ -728,12 +734,26 @@ type OutputSink_StreamingGrpc struct { StreamingGrpc *StreamingGrpcSink `protobuf:"bytes,4,opt,name=streaming_grpc,json=streamingGrpc,proto3,oneof"` } +type OutputSink_BufferedAdmin struct { + // Tap output will be buffered in a single block before flushing to the :http:post:`/tap` admin endpoint + // + // .. attention:: + // + // It is only allowed to specify the buffered admin output sink if the tap is being + // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has + // been configured to receive tap configuration from some other source (e.g., static + // file, XDS, etc.) configuring the buffered admin output type will fail. + BufferedAdmin *BufferedAdminSink `protobuf:"bytes,5,opt,name=buffered_admin,json=bufferedAdmin,proto3,oneof"` +} + func (*OutputSink_StreamingAdmin) isOutputSink_OutputSinkType() {} func (*OutputSink_FilePerTap) isOutputSink_OutputSinkType() {} func (*OutputSink_StreamingGrpc) isOutputSink_OutputSinkType() {} +func (*OutputSink_BufferedAdmin) isOutputSink_OutputSinkType() {} + // Streaming admin sink configuration. type StreamingAdminSink struct { state protoimpl.MessageState @@ -773,6 +793,72 @@ func (*StreamingAdminSink) Descriptor() ([]byte, []int) { return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{6} } +// BufferedAdminSink configures a tap output to collect traces without returning them until +// one of multiple criteria are satisfied. +// Similar to StreamingAdminSink, it is only allowed to specify the buffered admin output +// sink if the tap is being configured from the `/tap` admin endpoint. +type BufferedAdminSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Stop collecting traces when the specified number are collected. + // If other criteria for ending collection are reached first, this value will not be used. + MaxTraces uint64 `protobuf:"varint,1,opt,name=max_traces,json=maxTraces,proto3" json:"max_traces,omitempty"` + // Acts as a fallback to prevent the client from waiting for long periods of time. + // After timeout has occurred, a buffer flush will be triggered, returning the traces buffered so far. + // This may result in returning fewer traces than were requested, and in the case that no traces are + // buffered during this time, no traces will be returned. + // Specifying 0 for the timeout value (or not specifying a value at all) indicates an infinite timeout. + Timeout *duration.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (x *BufferedAdminSink) Reset() { + *x = BufferedAdminSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferedAdminSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferedAdminSink) ProtoMessage() {} + +func (x *BufferedAdminSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferedAdminSink.ProtoReflect.Descriptor instead. +func (*BufferedAdminSink) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{7} +} + +func (x *BufferedAdminSink) GetMaxTraces() uint64 { + if x != nil { + return x.MaxTraces + } + return 0 +} + +func (x *BufferedAdminSink) GetTimeout() *duration.Duration { + if x != nil { + return x.Timeout + } + return nil +} + // The file per tap sink outputs a discrete file for every tapped stream. type FilePerTapSink struct { state protoimpl.MessageState @@ -788,7 +874,7 @@ type FilePerTapSink struct { func (x *FilePerTapSink) Reset() { *x = FilePerTapSink{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[7] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -801,7 +887,7 @@ func (x *FilePerTapSink) String() string { func (*FilePerTapSink) ProtoMessage() {} func (x *FilePerTapSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[7] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -814,7 +900,7 @@ func (x *FilePerTapSink) ProtoReflect() protoreflect.Message { // Deprecated: Use FilePerTapSink.ProtoReflect.Descriptor instead. func (*FilePerTapSink) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{7} + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{8} } func (x *FilePerTapSink) GetPathPrefix() string { @@ -840,7 +926,7 @@ type StreamingGrpcSink struct { func (x *StreamingGrpcSink) Reset() { *x = StreamingGrpcSink{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[8] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -853,7 +939,7 @@ func (x *StreamingGrpcSink) String() string { func (*StreamingGrpcSink) ProtoMessage() {} func (x *StreamingGrpcSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[8] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,7 +952,7 @@ func (x *StreamingGrpcSink) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamingGrpcSink.ProtoReflect.Descriptor instead. func (*StreamingGrpcSink) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{8} + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{9} } func (x *StreamingGrpcSink) GetTapId() string { @@ -896,7 +982,7 @@ type MatchPredicate_MatchSet struct { func (x *MatchPredicate_MatchSet) Reset() { *x = MatchPredicate_MatchSet{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[9] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -909,7 +995,7 @@ func (x *MatchPredicate_MatchSet) String() string { func (*MatchPredicate_MatchSet) ProtoMessage() {} func (x *MatchPredicate_MatchSet) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[9] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -946,7 +1032,7 @@ type HttpGenericBodyMatch_GenericTextMatch struct { func (x *HttpGenericBodyMatch_GenericTextMatch) Reset() { *x = HttpGenericBodyMatch_GenericTextMatch{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[10] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -959,7 +1045,7 @@ func (x *HttpGenericBodyMatch_GenericTextMatch) String() string { func (*HttpGenericBodyMatch_GenericTextMatch) ProtoMessage() {} func (x *HttpGenericBodyMatch_GenericTextMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v3_common_proto_msgTypes[10] + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1033,213 +1119,235 @@ var file_envoy_config_tap_v3_common_proto_rawDesc = []byte{ 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xec, 0x02, 0x0a, 0x09, 0x54, 0x61, 0x70, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x44, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x61, - 0x70, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x02, + 0x0a, 0x09, 0x54, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, + 0x33, 0x2e, 0x30, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x44, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0a, 0x74, 0x61, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, - 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, - 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe6, 0x08, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x6f, 0x72, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x42, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, - 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x64, - 0x0a, 0x1a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, 0x74, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x66, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x66, 0x0a, 0x1b, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x68, 0x0a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x61, 0x70, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x74, + 0x61, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe6, 0x08, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x48, 0x00, 0x52, 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x71, - 0x0a, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x42, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, + 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x64, 0x0a, 0x1a, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x66, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x73, 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, - 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, - 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x89, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x53, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x02, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, - 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x65, 0x74, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0x85, 0x01, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x96, 0x02, 0x0a, 0x14, 0x48, 0x74, 0x74, - 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x60, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x73, 0x1a, 0x7b, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, - 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x7a, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x22, 0xc0, 0x02, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, + 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x66, 0x0a, 0x1b, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x68, 0x0a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, + 0x00, 0x52, 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x71, 0x0a, 0x1f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x48, 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x73, 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x1a, 0x89, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, + 0x74, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, + 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, + 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x85, + 0x01, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x96, 0x02, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x60, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x73, 0x1a, 0x7b, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, + 0xc0, 0x02, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x41, 0x0a, 0x05, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, + 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x10, 0x01, 0x52, 0x05, 0x73, 0x69, + 0x6e, 0x6b, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x65, 0x64, 0x5f, 0x72, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x12, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x52, 0x78, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x78, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0xdb, 0x04, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, + 0x6b, 0x12, 0x48, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, - 0x6e, 0x6b, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x10, 0x01, 0x52, 0x05, - 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x52, - 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, - 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, - 0x54, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8a, 0x04, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, - 0x69, 0x6e, 0x6b, 0x12, 0x48, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x53, 0x69, 0x6e, 0x6b, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x52, 0x0a, - 0x0f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x48, - 0x00, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x12, 0x47, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x61, - 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, - 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0a, - 0x66, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x12, 0x4f, 0x0a, 0x0e, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, - 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x22, 0x7e, 0x0a, 0x06, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, - 0x44, 0x59, 0x5f, 0x41, 0x53, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x00, 0x12, 0x17, 0x0a, - 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x44, 0x59, 0x5f, 0x41, 0x53, 0x5f, 0x53, 0x54, - 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, - 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x54, - 0x4f, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, - 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x50, - 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x04, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, - 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x17, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, - 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x22, 0x6b, 0x0a, 0x0e, - 0x46, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x28, - 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x61, - 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, - 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x50, - 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x22, 0xae, 0x01, 0x0a, 0x11, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x12, - 0x15, 0x0a, 0x06, 0x74, 0x61, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x61, 0x70, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, + 0x6e, 0x6b, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x52, 0x0a, 0x0f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, + 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, + 0x47, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, + 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x12, 0x4f, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, + 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x12, 0x4f, 0x0a, 0x0e, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x7e, 0x0a, 0x06, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x44, + 0x59, 0x5f, 0x41, 0x53, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, + 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x44, 0x59, 0x5f, 0x41, 0x53, 0x5f, 0x53, 0x54, 0x52, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x42, + 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x44, + 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, + 0x4f, 0x54, 0x4f, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x04, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, + 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x17, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x22, 0x49, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, - 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x3a, 0x0a, 0x21, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, - 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x11, 0x42, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, + 0x12, 0x26, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6d, + 0x61, 0x78, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x6b, 0x0a, + 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x12, + 0x28, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, + 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, + 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x22, 0xae, 0x01, 0x0a, 0x11, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, + 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x70, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x7c, 0x0a, 0x21, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, + 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1255,7 +1363,7 @@ func file_envoy_config_tap_v3_common_proto_rawDescGZIP() []byte { } var file_envoy_config_tap_v3_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_tap_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_envoy_config_tap_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_envoy_config_tap_v3_common_proto_goTypes = []interface{}{ (OutputSink_Format)(0), // 0: envoy.config.tap.v3.OutputSink.Format (*TapConfig)(nil), // 1: envoy.config.tap.v3.TapConfig @@ -1265,23 +1373,25 @@ var file_envoy_config_tap_v3_common_proto_goTypes = []interface{}{ (*OutputConfig)(nil), // 5: envoy.config.tap.v3.OutputConfig (*OutputSink)(nil), // 6: envoy.config.tap.v3.OutputSink (*StreamingAdminSink)(nil), // 7: envoy.config.tap.v3.StreamingAdminSink - (*FilePerTapSink)(nil), // 8: envoy.config.tap.v3.FilePerTapSink - (*StreamingGrpcSink)(nil), // 9: envoy.config.tap.v3.StreamingGrpcSink - (*MatchPredicate_MatchSet)(nil), // 10: envoy.config.tap.v3.MatchPredicate.MatchSet - (*HttpGenericBodyMatch_GenericTextMatch)(nil), // 11: envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch - (*v3.MatchPredicate)(nil), // 12: envoy.config.common.matcher.v3.MatchPredicate - (*v31.RuntimeFractionalPercent)(nil), // 13: envoy.config.core.v3.RuntimeFractionalPercent - (*v32.HeaderMatcher)(nil), // 14: envoy.config.route.v3.HeaderMatcher - (*wrappers.UInt32Value)(nil), // 15: google.protobuf.UInt32Value - (*v31.GrpcService)(nil), // 16: envoy.config.core.v3.GrpcService + (*BufferedAdminSink)(nil), // 8: envoy.config.tap.v3.BufferedAdminSink + (*FilePerTapSink)(nil), // 9: envoy.config.tap.v3.FilePerTapSink + (*StreamingGrpcSink)(nil), // 10: envoy.config.tap.v3.StreamingGrpcSink + (*MatchPredicate_MatchSet)(nil), // 11: envoy.config.tap.v3.MatchPredicate.MatchSet + (*HttpGenericBodyMatch_GenericTextMatch)(nil), // 12: envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch + (*v3.MatchPredicate)(nil), // 13: envoy.config.common.matcher.v3.MatchPredicate + (*v31.RuntimeFractionalPercent)(nil), // 14: envoy.config.core.v3.RuntimeFractionalPercent + (*v32.HeaderMatcher)(nil), // 15: envoy.config.route.v3.HeaderMatcher + (*wrappers.UInt32Value)(nil), // 16: google.protobuf.UInt32Value + (*duration.Duration)(nil), // 17: google.protobuf.Duration + (*v31.GrpcService)(nil), // 18: envoy.config.core.v3.GrpcService } var file_envoy_config_tap_v3_common_proto_depIdxs = []int32{ 2, // 0: envoy.config.tap.v3.TapConfig.match_config:type_name -> envoy.config.tap.v3.MatchPredicate - 12, // 1: envoy.config.tap.v3.TapConfig.match:type_name -> envoy.config.common.matcher.v3.MatchPredicate + 13, // 1: envoy.config.tap.v3.TapConfig.match:type_name -> envoy.config.common.matcher.v3.MatchPredicate 5, // 2: envoy.config.tap.v3.TapConfig.output_config:type_name -> envoy.config.tap.v3.OutputConfig - 13, // 3: envoy.config.tap.v3.TapConfig.tap_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 10, // 4: envoy.config.tap.v3.MatchPredicate.or_match:type_name -> envoy.config.tap.v3.MatchPredicate.MatchSet - 10, // 5: envoy.config.tap.v3.MatchPredicate.and_match:type_name -> envoy.config.tap.v3.MatchPredicate.MatchSet + 14, // 3: envoy.config.tap.v3.TapConfig.tap_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 11, // 4: envoy.config.tap.v3.MatchPredicate.or_match:type_name -> envoy.config.tap.v3.MatchPredicate.MatchSet + 11, // 5: envoy.config.tap.v3.MatchPredicate.and_match:type_name -> envoy.config.tap.v3.MatchPredicate.MatchSet 2, // 6: envoy.config.tap.v3.MatchPredicate.not_match:type_name -> envoy.config.tap.v3.MatchPredicate 3, // 7: envoy.config.tap.v3.MatchPredicate.http_request_headers_match:type_name -> envoy.config.tap.v3.HttpHeadersMatch 3, // 8: envoy.config.tap.v3.MatchPredicate.http_request_trailers_match:type_name -> envoy.config.tap.v3.HttpHeadersMatch @@ -1289,22 +1399,24 @@ var file_envoy_config_tap_v3_common_proto_depIdxs = []int32{ 3, // 10: envoy.config.tap.v3.MatchPredicate.http_response_trailers_match:type_name -> envoy.config.tap.v3.HttpHeadersMatch 4, // 11: envoy.config.tap.v3.MatchPredicate.http_request_generic_body_match:type_name -> envoy.config.tap.v3.HttpGenericBodyMatch 4, // 12: envoy.config.tap.v3.MatchPredicate.http_response_generic_body_match:type_name -> envoy.config.tap.v3.HttpGenericBodyMatch - 14, // 13: envoy.config.tap.v3.HttpHeadersMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 11, // 14: envoy.config.tap.v3.HttpGenericBodyMatch.patterns:type_name -> envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch + 15, // 13: envoy.config.tap.v3.HttpHeadersMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 12, // 14: envoy.config.tap.v3.HttpGenericBodyMatch.patterns:type_name -> envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch 6, // 15: envoy.config.tap.v3.OutputConfig.sinks:type_name -> envoy.config.tap.v3.OutputSink - 15, // 16: envoy.config.tap.v3.OutputConfig.max_buffered_rx_bytes:type_name -> google.protobuf.UInt32Value - 15, // 17: envoy.config.tap.v3.OutputConfig.max_buffered_tx_bytes:type_name -> google.protobuf.UInt32Value + 16, // 16: envoy.config.tap.v3.OutputConfig.max_buffered_rx_bytes:type_name -> google.protobuf.UInt32Value + 16, // 17: envoy.config.tap.v3.OutputConfig.max_buffered_tx_bytes:type_name -> google.protobuf.UInt32Value 0, // 18: envoy.config.tap.v3.OutputSink.format:type_name -> envoy.config.tap.v3.OutputSink.Format 7, // 19: envoy.config.tap.v3.OutputSink.streaming_admin:type_name -> envoy.config.tap.v3.StreamingAdminSink - 8, // 20: envoy.config.tap.v3.OutputSink.file_per_tap:type_name -> envoy.config.tap.v3.FilePerTapSink - 9, // 21: envoy.config.tap.v3.OutputSink.streaming_grpc:type_name -> envoy.config.tap.v3.StreamingGrpcSink - 16, // 22: envoy.config.tap.v3.StreamingGrpcSink.grpc_service:type_name -> envoy.config.core.v3.GrpcService - 2, // 23: envoy.config.tap.v3.MatchPredicate.MatchSet.rules:type_name -> envoy.config.tap.v3.MatchPredicate - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 9, // 20: envoy.config.tap.v3.OutputSink.file_per_tap:type_name -> envoy.config.tap.v3.FilePerTapSink + 10, // 21: envoy.config.tap.v3.OutputSink.streaming_grpc:type_name -> envoy.config.tap.v3.StreamingGrpcSink + 8, // 22: envoy.config.tap.v3.OutputSink.buffered_admin:type_name -> envoy.config.tap.v3.BufferedAdminSink + 17, // 23: envoy.config.tap.v3.BufferedAdminSink.timeout:type_name -> google.protobuf.Duration + 18, // 24: envoy.config.tap.v3.StreamingGrpcSink.grpc_service:type_name -> envoy.config.core.v3.GrpcService + 2, // 25: envoy.config.tap.v3.MatchPredicate.MatchSet.rules:type_name -> envoy.config.tap.v3.MatchPredicate + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_envoy_config_tap_v3_common_proto_init() } @@ -1398,7 +1510,7 @@ func file_envoy_config_tap_v3_common_proto_init() { } } file_envoy_config_tap_v3_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilePerTapSink); i { + switch v := v.(*BufferedAdminSink); i { case 0: return &v.state case 1: @@ -1410,7 +1522,7 @@ func file_envoy_config_tap_v3_common_proto_init() { } } file_envoy_config_tap_v3_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamingGrpcSink); i { + switch v := v.(*FilePerTapSink); i { case 0: return &v.state case 1: @@ -1422,7 +1534,7 @@ func file_envoy_config_tap_v3_common_proto_init() { } } file_envoy_config_tap_v3_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchPredicate_MatchSet); i { + switch v := v.(*StreamingGrpcSink); i { case 0: return &v.state case 1: @@ -1434,6 +1546,18 @@ func file_envoy_config_tap_v3_common_proto_init() { } } file_envoy_config_tap_v3_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchPredicate_MatchSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HttpGenericBodyMatch_GenericTextMatch); i { case 0: return &v.state @@ -1462,8 +1586,9 @@ func file_envoy_config_tap_v3_common_proto_init() { (*OutputSink_StreamingAdmin)(nil), (*OutputSink_FilePerTap)(nil), (*OutputSink_StreamingGrpc)(nil), + (*OutputSink_BufferedAdmin)(nil), } - file_envoy_config_tap_v3_common_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_envoy_config_tap_v3_common_proto_msgTypes[11].OneofWrappers = []interface{}{ (*HttpGenericBodyMatch_GenericTextMatch_StringMatch)(nil), (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch)(nil), } @@ -1473,7 +1598,7 @@ func file_envoy_config_tap_v3_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_tap_v3_common_proto_rawDesc, NumEnums: 1, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/config/tap/v3/common.pb.validate.go b/pkg/api/envoy/config/tap/v3/common.pb.validate.go index 2b83091595..978e2ec31e 100644 --- a/pkg/api/envoy/config/tap/v3/common.pb.validate.go +++ b/pkg/api/envoy/config/tap/v3/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/tap/v3/common.proto -package envoy_config_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TapConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TapConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TapConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TapConfigMultiError, or nil +// if none found. +func (m *TapConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TapConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMatchConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMatchConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "MatchConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "MatchConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatchConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapConfigValidationError{ field: "MatchConfig", @@ -50,7 +86,26 @@ func (m *TapConfig) Validate() error { } } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapConfigValidationError{ field: "Match", @@ -61,13 +116,36 @@ func (m *TapConfig) Validate() error { } if m.GetOutputConfig() == nil { - return TapConfigValidationError{ + err := TapConfigValidationError{ field: "OutputConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetOutputConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOutputConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "OutputConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "OutputConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOutputConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapConfigValidationError{ field: "OutputConfig", @@ -77,7 +155,26 @@ func (m *TapConfig) Validate() error { } } - if v, ok := interface{}(m.GetTapEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTapEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "TapEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "TapEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTapEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapConfigValidationError{ field: "TapEnabled", @@ -87,9 +184,29 @@ func (m *TapConfig) Validate() error { } } + if len(errors) > 0 { + return TapConfigMultiError(errors) + } + return nil } +// TapConfigMultiError is an error wrapping multiple validation errors returned +// by TapConfig.ValidateAll() if the designated constraints aren't met. +type TapConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapConfigMultiError) AllErrors() []error { return m } + // TapConfigValidationError is the validation error returned by // TapConfig.Validate if the designated constraints aren't met. type TapConfigValidationError struct { @@ -145,18 +262,51 @@ var _ interface { } = TapConfigValidationError{} // Validate checks the field values on MatchPredicate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MatchPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MatchPredicateMultiError, +// or nil if none found. +func (m *MatchPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *MatchPredicate_OrMatch: - if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "OrMatch", @@ -168,7 +318,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_AndMatch: - if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "AndMatch", @@ -180,7 +349,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_NotMatch: - if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "NotMatch", @@ -193,15 +381,38 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_AnyMatch: if m.GetAnyMatch() != true { - return MatchPredicateValidationError{ + err := MatchPredicateValidationError{ field: "AnyMatch", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *MatchPredicate_HttpRequestHeadersMatch: - if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestHeadersMatch", @@ -213,7 +424,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpRequestTrailersMatch: - if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestTrailersMatch", @@ -225,7 +455,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseHeadersMatch: - if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseHeadersMatch", @@ -237,7 +486,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseTrailersMatch: - if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseTrailersMatch", @@ -249,7 +517,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpRequestGenericBodyMatch: - if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestGenericBodyMatch", @@ -261,7 +548,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseGenericBodyMatch: - if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseGenericBodyMatch", @@ -272,16 +578,41 @@ func (m *MatchPredicate) Validate() error { } default: - return MatchPredicateValidationError{ + err := MatchPredicateValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return MatchPredicateMultiError(errors) + } + return nil } +// MatchPredicateMultiError is an error wrapping multiple validation errors +// returned by MatchPredicate.ValidateAll() if the designated constraints +// aren't met. +type MatchPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicateMultiError) AllErrors() []error { return m } + // MatchPredicateValidationError is the validation error returned by // MatchPredicate.Validate if the designated constraints aren't met. type MatchPredicateValidationError struct { @@ -337,17 +668,50 @@ var _ interface { } = MatchPredicateValidationError{} // Validate checks the field values on HttpHeadersMatch with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HttpHeadersMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpHeadersMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpHeadersMatchMultiError, or nil if none found. +func (m *HttpHeadersMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpHeadersMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpHeadersMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -359,9 +723,30 @@ func (m *HttpHeadersMatch) Validate() error { } + if len(errors) > 0 { + return HttpHeadersMatchMultiError(errors) + } + return nil } +// HttpHeadersMatchMultiError is an error wrapping multiple validation errors +// returned by HttpHeadersMatch.ValidateAll() if the designated constraints +// aren't met. +type HttpHeadersMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpHeadersMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpHeadersMatchMultiError) AllErrors() []error { return m } + // HttpHeadersMatchValidationError is the validation error returned by // HttpHeadersMatch.Validate if the designated constraints aren't met. type HttpHeadersMatchValidationError struct { @@ -418,25 +803,62 @@ var _ interface { // Validate checks the field values on HttpGenericBodyMatch with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpGenericBodyMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpGenericBodyMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for BytesLimit if len(m.GetPatterns()) < 1 { - return HttpGenericBodyMatchValidationError{ + err := HttpGenericBodyMatchValidationError{ field: "Patterns", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPatterns() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpGenericBodyMatchValidationError{ field: fmt.Sprintf("Patterns[%v]", idx), @@ -448,9 +870,30 @@ func (m *HttpGenericBodyMatch) Validate() error { } + if len(errors) > 0 { + return HttpGenericBodyMatchMultiError(errors) + } + return nil } +// HttpGenericBodyMatchMultiError is an error wrapping multiple validation +// errors returned by HttpGenericBodyMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatchMultiError) AllErrors() []error { return m } + // HttpGenericBodyMatchValidationError is the validation error returned by // HttpGenericBodyMatch.Validate if the designated constraints aren't met. type HttpGenericBodyMatchValidationError struct { @@ -508,24 +951,61 @@ var _ interface { } = HttpGenericBodyMatchValidationError{} // Validate checks the field values on OutputConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OutputConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutputConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OutputConfigMultiError, or +// nil if none found. +func (m *OutputConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OutputConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetSinks()) != 1 { - return OutputConfigValidationError{ + err := OutputConfigValidationError{ field: "Sinks", reason: "value must contain exactly 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetSinks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: fmt.Sprintf("Sinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: fmt.Sprintf("Sinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputConfigValidationError{ field: fmt.Sprintf("Sinks[%v]", idx), @@ -537,7 +1017,26 @@ func (m *OutputConfig) Validate() error { } - if v, ok := interface{}(m.GetMaxBufferedRxBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxBufferedRxBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedRxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedRxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxBufferedRxBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputConfigValidationError{ field: "MaxBufferedRxBytes", @@ -547,7 +1046,26 @@ func (m *OutputConfig) Validate() error { } } - if v, ok := interface{}(m.GetMaxBufferedTxBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxBufferedTxBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedTxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedTxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxBufferedTxBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputConfigValidationError{ field: "MaxBufferedTxBytes", @@ -559,9 +1077,29 @@ func (m *OutputConfig) Validate() error { // no validation rules for Streaming + if len(errors) > 0 { + return OutputConfigMultiError(errors) + } + return nil } +// OutputConfigMultiError is an error wrapping multiple validation errors +// returned by OutputConfig.ValidateAll() if the designated constraints aren't met. +type OutputConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutputConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutputConfigMultiError) AllErrors() []error { return m } + // OutputConfigValidationError is the validation error returned by // OutputConfig.Validate if the designated constraints aren't met. type OutputConfigValidationError struct { @@ -617,24 +1155,62 @@ var _ interface { } = OutputConfigValidationError{} // Validate checks the field values on OutputSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OutputSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutputSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OutputSinkMultiError, or +// nil if none found. +func (m *OutputSink) ValidateAll() error { + return m.validate(true) +} + +func (m *OutputSink) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := OutputSink_Format_name[int32(m.GetFormat())]; !ok { - return OutputSinkValidationError{ + err := OutputSinkValidationError{ field: "Format", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.OutputSinkType.(type) { case *OutputSink_StreamingAdmin: - if v, ok := interface{}(m.GetStreamingAdmin()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStreamingAdmin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamingAdmin()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputSinkValidationError{ field: "StreamingAdmin", @@ -646,7 +1222,26 @@ func (m *OutputSink) Validate() error { case *OutputSink_FilePerTap: - if v, ok := interface{}(m.GetFilePerTap()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilePerTap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "FilePerTap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "FilePerTap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilePerTap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputSinkValidationError{ field: "FilePerTap", @@ -658,7 +1253,26 @@ func (m *OutputSink) Validate() error { case *OutputSink_StreamingGrpc: - if v, ok := interface{}(m.GetStreamingGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStreamingGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamingGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputSinkValidationError{ field: "StreamingGrpc", @@ -668,17 +1282,72 @@ func (m *OutputSink) Validate() error { } } + case *OutputSink_BufferedAdmin: + + if all { + switch v := interface{}(m.GetBufferedAdmin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "BufferedAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "BufferedAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferedAdmin()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutputSinkValidationError{ + field: "BufferedAdmin", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: - return OutputSinkValidationError{ + err := OutputSinkValidationError{ field: "OutputSinkType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return OutputSinkMultiError(errors) + } + return nil } +// OutputSinkMultiError is an error wrapping multiple validation errors +// returned by OutputSink.ValidateAll() if the designated constraints aren't met. +type OutputSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutputSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutputSinkMultiError) AllErrors() []error { return m } + // OutputSinkValidationError is the validation error returned by // OutputSink.Validate if the designated constraints aren't met. type OutputSinkValidationError struct { @@ -735,15 +1404,50 @@ var _ interface { // Validate checks the field values on StreamingAdminSink with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamingAdminSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamingAdminSink with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamingAdminSinkMultiError, or nil if none found. +func (m *StreamingAdminSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamingAdminSink) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamingAdminSinkMultiError(errors) + } + return nil } +// StreamingAdminSinkMultiError is an error wrapping multiple validation errors +// returned by StreamingAdminSink.ValidateAll() if the designated constraints +// aren't met. +type StreamingAdminSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamingAdminSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamingAdminSinkMultiError) AllErrors() []error { return m } + // StreamingAdminSinkValidationError is the validation error returned by // StreamingAdminSink.Validate if the designated constraints aren't met. type StreamingAdminSinkValidationError struct { @@ -800,24 +1504,205 @@ var _ interface { ErrorName() string } = StreamingAdminSinkValidationError{} +// Validate checks the field values on BufferedAdminSink with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *BufferedAdminSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferedAdminSink with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BufferedAdminSinkMultiError, or nil if none found. +func (m *BufferedAdminSink) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferedAdminSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMaxTraces() <= 0 { + err := BufferedAdminSinkValidationError{ + field: "MaxTraces", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferedAdminSinkValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferedAdminSinkValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferedAdminSinkValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return BufferedAdminSinkMultiError(errors) + } + + return nil +} + +// BufferedAdminSinkMultiError is an error wrapping multiple validation errors +// returned by BufferedAdminSink.ValidateAll() if the designated constraints +// aren't met. +type BufferedAdminSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferedAdminSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferedAdminSinkMultiError) AllErrors() []error { return m } + +// BufferedAdminSinkValidationError is the validation error returned by +// BufferedAdminSink.Validate if the designated constraints aren't met. +type BufferedAdminSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferedAdminSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferedAdminSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferedAdminSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferedAdminSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferedAdminSinkValidationError) ErrorName() string { + return "BufferedAdminSinkValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferedAdminSinkValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBufferedAdminSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferedAdminSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferedAdminSinkValidationError{} + // Validate checks the field values on FilePerTapSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilePerTapSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilePerTapSink with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilePerTapSinkMultiError, +// or nil if none found. +func (m *FilePerTapSink) ValidateAll() error { + return m.validate(true) +} + +func (m *FilePerTapSink) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetPathPrefix()) < 1 { - return FilePerTapSinkValidationError{ + err := FilePerTapSinkValidationError{ field: "PathPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FilePerTapSinkMultiError(errors) } return nil } +// FilePerTapSinkMultiError is an error wrapping multiple validation errors +// returned by FilePerTapSink.ValidateAll() if the designated constraints +// aren't met. +type FilePerTapSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilePerTapSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilePerTapSinkMultiError) AllErrors() []error { return m } + // FilePerTapSinkValidationError is the validation error returned by // FilePerTapSink.Validate if the designated constraints aren't met. type FilePerTapSinkValidationError struct { @@ -873,23 +1758,60 @@ var _ interface { } = FilePerTapSinkValidationError{} // Validate checks the field values on StreamingGrpcSink with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *StreamingGrpcSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamingGrpcSink with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamingGrpcSinkMultiError, or nil if none found. +func (m *StreamingGrpcSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamingGrpcSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TapId if m.GetGrpcService() == nil { - return StreamingGrpcSinkValidationError{ + err := StreamingGrpcSinkValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamingGrpcSinkValidationError{ field: "GrpcService", @@ -899,9 +1821,30 @@ func (m *StreamingGrpcSink) Validate() error { } } + if len(errors) > 0 { + return StreamingGrpcSinkMultiError(errors) + } + return nil } +// StreamingGrpcSinkMultiError is an error wrapping multiple validation errors +// returned by StreamingGrpcSink.ValidateAll() if the designated constraints +// aren't met. +type StreamingGrpcSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamingGrpcSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamingGrpcSinkMultiError) AllErrors() []error { return m } + // StreamingGrpcSinkValidationError is the validation error returned by // StreamingGrpcSink.Validate if the designated constraints aren't met. type StreamingGrpcSinkValidationError struct { @@ -960,23 +1903,60 @@ var _ interface { // Validate checks the field values on MatchPredicate_MatchSet with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MatchPredicate_MatchSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate_MatchSet with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MatchPredicate_MatchSetMultiError, or nil if none found. +func (m *MatchPredicate_MatchSet) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate_MatchSet) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRules()) < 2 { - return MatchPredicate_MatchSetValidationError{ + err := MatchPredicate_MatchSetValidationError{ field: "Rules", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicate_MatchSetValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -988,9 +1968,30 @@ func (m *MatchPredicate_MatchSet) Validate() error { } + if len(errors) > 0 { + return MatchPredicate_MatchSetMultiError(errors) + } + return nil } +// MatchPredicate_MatchSetMultiError is an error wrapping multiple validation +// errors returned by MatchPredicate_MatchSet.ValidateAll() if the designated +// constraints aren't met. +type MatchPredicate_MatchSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicate_MatchSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicate_MatchSetMultiError) AllErrors() []error { return m } + // MatchPredicate_MatchSetValidationError is the validation error returned by // MatchPredicate_MatchSet.Validate if the designated constraints aren't met. type MatchPredicate_MatchSetValidationError struct { @@ -1049,43 +2050,92 @@ var _ interface { // Validate checks the field values on HttpGenericBodyMatch_GenericTextMatch // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *HttpGenericBodyMatch_GenericTextMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch_GenericTextMatch +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// HttpGenericBodyMatch_GenericTextMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch_GenericTextMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch_GenericTextMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *HttpGenericBodyMatch_GenericTextMatch_StringMatch: if utf8.RuneCountInString(m.GetStringMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ field: "StringMatch", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch: if len(m.GetBinaryMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ field: "BinaryMatch", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } default: - return HttpGenericBodyMatch_GenericTextMatchValidationError{ + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HttpGenericBodyMatch_GenericTextMatchMultiError(errors) } return nil } +// HttpGenericBodyMatch_GenericTextMatchMultiError is an error wrapping +// multiple validation errors returned by +// HttpGenericBodyMatch_GenericTextMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatch_GenericTextMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) AllErrors() []error { return m } + // HttpGenericBodyMatch_GenericTextMatchValidationError is the validation error // returned by HttpGenericBodyMatch_GenericTextMatch.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/config/tap/v4alpha/common.pb.go b/pkg/api/envoy/config/tap/v4alpha/common.pb.go deleted file mode 100644 index 9aa281b3dc..0000000000 --- a/pkg/api/envoy/config/tap/v4alpha/common.pb.go +++ /dev/null @@ -1,1505 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/tap/v4alpha/common.proto - -package envoy_config_tap_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/matcher/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Output format. All output is in the form of one or more :ref:`TraceWrapper -// ` messages. This enumeration indicates -// how those messages are written. Note that not all sinks support all output formats. See -// individual sink documentation for more information. -type OutputSink_Format int32 - -const ( - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_bytes - // ` field. This means that body data will be - // base64 encoded as per the `proto3 JSON mappings - // `_. - OutputSink_JSON_BODY_AS_BYTES OutputSink_Format = 0 - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_string - // ` field. This means that body data will be - // string encoded as per the `proto3 JSON mappings - // `_. This format type is - // useful when it is known that that body is human readable (e.g., JSON over HTTP) and the - // user wishes to view it directly without being forced to base64 decode the body. - OutputSink_JSON_BODY_AS_STRING OutputSink_Format = 1 - // Binary proto format. Note that binary proto is not self-delimiting. If a sink writes - // multiple binary messages without any length information the data stream will not be - // useful. However, for certain sinks that are self-delimiting (e.g., one message per file) - // this output format makes consumption simpler. - OutputSink_PROTO_BINARY OutputSink_Format = 2 - // Messages are written as a sequence tuples, where each tuple is the message length encoded - // as a `protobuf 32-bit varint - // `_ - // followed by the binary message. The messages can be read back using the language specific - // protobuf coded stream implementation to obtain the message length and the message. - OutputSink_PROTO_BINARY_LENGTH_DELIMITED OutputSink_Format = 3 - // Text proto format. - OutputSink_PROTO_TEXT OutputSink_Format = 4 -) - -// Enum value maps for OutputSink_Format. -var ( - OutputSink_Format_name = map[int32]string{ - 0: "JSON_BODY_AS_BYTES", - 1: "JSON_BODY_AS_STRING", - 2: "PROTO_BINARY", - 3: "PROTO_BINARY_LENGTH_DELIMITED", - 4: "PROTO_TEXT", - } - OutputSink_Format_value = map[string]int32{ - "JSON_BODY_AS_BYTES": 0, - "JSON_BODY_AS_STRING": 1, - "PROTO_BINARY": 2, - "PROTO_BINARY_LENGTH_DELIMITED": 3, - "PROTO_TEXT": 4, - } -) - -func (x OutputSink_Format) Enum() *OutputSink_Format { - p := new(OutputSink_Format) - *p = x - return p -} - -func (x OutputSink_Format) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (OutputSink_Format) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_tap_v4alpha_common_proto_enumTypes[0].Descriptor() -} - -func (OutputSink_Format) Type() protoreflect.EnumType { - return &file_envoy_config_tap_v4alpha_common_proto_enumTypes[0] -} - -func (x OutputSink_Format) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OutputSink_Format.Descriptor instead. -func (OutputSink_Format) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{5, 0} -} - -// Tap configuration. -type TapConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The match configuration. If the configuration matches the data source being tapped, a tap will - // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedMatchConfig *MatchPredicate `protobuf:"bytes,1,opt,name=hidden_envoy_deprecated_match_config,json=hiddenEnvoyDeprecatedMatchConfig,proto3" json:"hidden_envoy_deprecated_match_config,omitempty"` - // The match configuration. If the configuration matches the data source being tapped, a tap will - // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. - Match *v4alpha.MatchPredicate `protobuf:"bytes,4,opt,name=match,proto3" json:"match,omitempty"` - // The tap output configuration. If a match configuration matches a data source being tapped, - // a tap will occur and the data will be written to the configured output. - OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` - // [#not-implemented-hide:] Specify if Tap matching is enabled. The % of requests\connections for - // which the tap matching is enabled. When not enabled, the request\connection will not be - // recorded. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - TapEnabled *v4alpha1.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=tap_enabled,json=tapEnabled,proto3" json:"tap_enabled,omitempty"` -} - -func (x *TapConfig) Reset() { - *x = TapConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TapConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TapConfig) ProtoMessage() {} - -func (x *TapConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TapConfig.ProtoReflect.Descriptor instead. -func (*TapConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{0} -} - -// Deprecated: Do not use. -func (x *TapConfig) GetHiddenEnvoyDeprecatedMatchConfig() *MatchPredicate { - if x != nil { - return x.HiddenEnvoyDeprecatedMatchConfig - } - return nil -} - -func (x *TapConfig) GetMatch() *v4alpha.MatchPredicate { - if x != nil { - return x.Match - } - return nil -} - -func (x *TapConfig) GetOutputConfig() *OutputConfig { - if x != nil { - return x.OutputConfig - } - return nil -} - -func (x *TapConfig) GetTapEnabled() *v4alpha1.RuntimeFractionalPercent { - if x != nil { - return x.TapEnabled - } - return nil -} - -// Tap match configuration. This is a recursive structure which allows complex nested match -// configurations to be built using various logical operators. -// [#next-free-field: 11] -type MatchPredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *MatchPredicate_OrMatch - // *MatchPredicate_AndMatch - // *MatchPredicate_NotMatch - // *MatchPredicate_AnyMatch - // *MatchPredicate_HttpRequestHeadersMatch - // *MatchPredicate_HttpRequestTrailersMatch - // *MatchPredicate_HttpResponseHeadersMatch - // *MatchPredicate_HttpResponseTrailersMatch - // *MatchPredicate_HttpRequestGenericBodyMatch - // *MatchPredicate_HttpResponseGenericBodyMatch - Rule isMatchPredicate_Rule `protobuf_oneof:"rule"` -} - -func (x *MatchPredicate) Reset() { - *x = MatchPredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MatchPredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MatchPredicate) ProtoMessage() {} - -func (x *MatchPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MatchPredicate.ProtoReflect.Descriptor instead. -func (*MatchPredicate) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{1} -} - -func (m *MatchPredicate) GetRule() isMatchPredicate_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *MatchPredicate) GetOrMatch() *MatchPredicate_MatchSet { - if x, ok := x.GetRule().(*MatchPredicate_OrMatch); ok { - return x.OrMatch - } - return nil -} - -func (x *MatchPredicate) GetAndMatch() *MatchPredicate_MatchSet { - if x, ok := x.GetRule().(*MatchPredicate_AndMatch); ok { - return x.AndMatch - } - return nil -} - -func (x *MatchPredicate) GetNotMatch() *MatchPredicate { - if x, ok := x.GetRule().(*MatchPredicate_NotMatch); ok { - return x.NotMatch - } - return nil -} - -func (x *MatchPredicate) GetAnyMatch() bool { - if x, ok := x.GetRule().(*MatchPredicate_AnyMatch); ok { - return x.AnyMatch - } - return false -} - -func (x *MatchPredicate) GetHttpRequestHeadersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpRequestHeadersMatch); ok { - return x.HttpRequestHeadersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpRequestTrailersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpRequestTrailersMatch); ok { - return x.HttpRequestTrailersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpResponseHeadersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpResponseHeadersMatch); ok { - return x.HttpResponseHeadersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpResponseTrailersMatch() *HttpHeadersMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpResponseTrailersMatch); ok { - return x.HttpResponseTrailersMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpRequestGenericBodyMatch() *HttpGenericBodyMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpRequestGenericBodyMatch); ok { - return x.HttpRequestGenericBodyMatch - } - return nil -} - -func (x *MatchPredicate) GetHttpResponseGenericBodyMatch() *HttpGenericBodyMatch { - if x, ok := x.GetRule().(*MatchPredicate_HttpResponseGenericBodyMatch); ok { - return x.HttpResponseGenericBodyMatch - } - return nil -} - -type isMatchPredicate_Rule interface { - isMatchPredicate_Rule() -} - -type MatchPredicate_OrMatch struct { - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - OrMatch *MatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"` -} - -type MatchPredicate_AndMatch struct { - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - AndMatch *MatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"` -} - -type MatchPredicate_NotMatch struct { - // A negation match. The match configuration will match if the negated match condition matches. - NotMatch *MatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"` -} - -type MatchPredicate_AnyMatch struct { - // The match configuration will always match. - AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"` -} - -type MatchPredicate_HttpRequestHeadersMatch struct { - // HTTP request headers match configuration. - HttpRequestHeadersMatch *HttpHeadersMatch `protobuf:"bytes,5,opt,name=http_request_headers_match,json=httpRequestHeadersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpRequestTrailersMatch struct { - // HTTP request trailers match configuration. - HttpRequestTrailersMatch *HttpHeadersMatch `protobuf:"bytes,6,opt,name=http_request_trailers_match,json=httpRequestTrailersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpResponseHeadersMatch struct { - // HTTP response headers match configuration. - HttpResponseHeadersMatch *HttpHeadersMatch `protobuf:"bytes,7,opt,name=http_response_headers_match,json=httpResponseHeadersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpResponseTrailersMatch struct { - // HTTP response trailers match configuration. - HttpResponseTrailersMatch *HttpHeadersMatch `protobuf:"bytes,8,opt,name=http_response_trailers_match,json=httpResponseTrailersMatch,proto3,oneof"` -} - -type MatchPredicate_HttpRequestGenericBodyMatch struct { - // HTTP request generic body match configuration. - HttpRequestGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,9,opt,name=http_request_generic_body_match,json=httpRequestGenericBodyMatch,proto3,oneof"` -} - -type MatchPredicate_HttpResponseGenericBodyMatch struct { - // HTTP response generic body match configuration. - HttpResponseGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,10,opt,name=http_response_generic_body_match,json=httpResponseGenericBodyMatch,proto3,oneof"` -} - -func (*MatchPredicate_OrMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_AndMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_NotMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_AnyMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpRequestHeadersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpRequestTrailersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpResponseHeadersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpResponseTrailersMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpRequestGenericBodyMatch) isMatchPredicate_Rule() {} - -func (*MatchPredicate_HttpResponseGenericBodyMatch) isMatchPredicate_Rule() {} - -// HTTP headers match configuration. -type HttpHeadersMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // HTTP headers to match. - Headers []*v4alpha2.HeaderMatcher `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *HttpHeadersMatch) Reset() { - *x = HttpHeadersMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpHeadersMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpHeadersMatch) ProtoMessage() {} - -func (x *HttpHeadersMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpHeadersMatch.ProtoReflect.Descriptor instead. -func (*HttpHeadersMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{2} -} - -func (x *HttpHeadersMatch) GetHeaders() []*v4alpha2.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -// HTTP generic body match configuration. -// List of text strings and hex strings to be located in HTTP body. -// All specified strings must be found in the HTTP body for positive match. -// The search may be limited to specified number of bytes from the body start. -// -// .. attention:: -// -// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. -// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified -// to scan only part of the http body. -type HttpGenericBodyMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). - BytesLimit uint32 `protobuf:"varint,1,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"` - // List of patterns to match. - Patterns []*HttpGenericBodyMatch_GenericTextMatch `protobuf:"bytes,2,rep,name=patterns,proto3" json:"patterns,omitempty"` -} - -func (x *HttpGenericBodyMatch) Reset() { - *x = HttpGenericBodyMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpGenericBodyMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpGenericBodyMatch) ProtoMessage() {} - -func (x *HttpGenericBodyMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpGenericBodyMatch.ProtoReflect.Descriptor instead. -func (*HttpGenericBodyMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{3} -} - -func (x *HttpGenericBodyMatch) GetBytesLimit() uint32 { - if x != nil { - return x.BytesLimit - } - return 0 -} - -func (x *HttpGenericBodyMatch) GetPatterns() []*HttpGenericBodyMatch_GenericTextMatch { - if x != nil { - return x.Patterns - } - return nil -} - -// Tap output configuration. -type OutputConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Output sinks for tap data. Currently a single sink is allowed in the list. Once multiple - // sink types are supported this constraint will be relaxed. - Sinks []*OutputSink `protobuf:"bytes,1,rep,name=sinks,proto3" json:"sinks,omitempty"` - // For buffered tapping, the maximum amount of received body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - MaxBufferedRxBytes *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_buffered_rx_bytes,json=maxBufferedRxBytes,proto3" json:"max_buffered_rx_bytes,omitempty"` - // For buffered tapping, the maximum amount of transmitted body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - MaxBufferedTxBytes *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=max_buffered_tx_bytes,json=maxBufferedTxBytes,proto3" json:"max_buffered_tx_bytes,omitempty"` - // Indicates whether taps produce a single buffered message per tap, or multiple streamed - // messages per tap in the emitted :ref:`TraceWrapper - // ` messages. Note that streamed tapping does not - // mean that no buffering takes place. Buffering may be required if data is processed before a - // match can be determined. See the HTTP tap filter :ref:`streaming - // ` documentation for more information. - Streaming bool `protobuf:"varint,4,opt,name=streaming,proto3" json:"streaming,omitempty"` -} - -func (x *OutputConfig) Reset() { - *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutputConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutputConfig) ProtoMessage() {} - -func (x *OutputConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutputConfig.ProtoReflect.Descriptor instead. -func (*OutputConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{4} -} - -func (x *OutputConfig) GetSinks() []*OutputSink { - if x != nil { - return x.Sinks - } - return nil -} - -func (x *OutputConfig) GetMaxBufferedRxBytes() *wrappers.UInt32Value { - if x != nil { - return x.MaxBufferedRxBytes - } - return nil -} - -func (x *OutputConfig) GetMaxBufferedTxBytes() *wrappers.UInt32Value { - if x != nil { - return x.MaxBufferedTxBytes - } - return nil -} - -func (x *OutputConfig) GetStreaming() bool { - if x != nil { - return x.Streaming - } - return false -} - -// Tap output sink configuration. -type OutputSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Sink output format. - Format OutputSink_Format `protobuf:"varint,1,opt,name=format,proto3,enum=envoy.config.tap.v4alpha.OutputSink_Format" json:"format,omitempty"` - // Types that are assignable to OutputSinkType: - // *OutputSink_StreamingAdmin - // *OutputSink_FilePerTap - // *OutputSink_StreamingGrpc - OutputSinkType isOutputSink_OutputSinkType `protobuf_oneof:"output_sink_type"` -} - -func (x *OutputSink) Reset() { - *x = OutputSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutputSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutputSink) ProtoMessage() {} - -func (x *OutputSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutputSink.ProtoReflect.Descriptor instead. -func (*OutputSink) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{5} -} - -func (x *OutputSink) GetFormat() OutputSink_Format { - if x != nil { - return x.Format - } - return OutputSink_JSON_BODY_AS_BYTES -} - -func (m *OutputSink) GetOutputSinkType() isOutputSink_OutputSinkType { - if m != nil { - return m.OutputSinkType - } - return nil -} - -func (x *OutputSink) GetStreamingAdmin() *StreamingAdminSink { - if x, ok := x.GetOutputSinkType().(*OutputSink_StreamingAdmin); ok { - return x.StreamingAdmin - } - return nil -} - -func (x *OutputSink) GetFilePerTap() *FilePerTapSink { - if x, ok := x.GetOutputSinkType().(*OutputSink_FilePerTap); ok { - return x.FilePerTap - } - return nil -} - -func (x *OutputSink) GetStreamingGrpc() *StreamingGrpcSink { - if x, ok := x.GetOutputSinkType().(*OutputSink_StreamingGrpc); ok { - return x.StreamingGrpc - } - return nil -} - -type isOutputSink_OutputSinkType interface { - isOutputSink_OutputSinkType() -} - -type OutputSink_StreamingAdmin struct { - // Tap output will be streamed out the :http:post:`/tap` admin endpoint. - // - // .. attention:: - // - // It is only allowed to specify the streaming admin output sink if the tap is being - // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has - // been configured to receive tap configuration from some other source (e.g., static - // file, XDS, etc.) configuring the streaming admin output type will fail. - StreamingAdmin *StreamingAdminSink `protobuf:"bytes,2,opt,name=streaming_admin,json=streamingAdmin,proto3,oneof"` -} - -type OutputSink_FilePerTap struct { - // Tap output will be written to a file per tap sink. - FilePerTap *FilePerTapSink `protobuf:"bytes,3,opt,name=file_per_tap,json=filePerTap,proto3,oneof"` -} - -type OutputSink_StreamingGrpc struct { - // [#not-implemented-hide:] - // GrpcService to stream data to. The format argument must be PROTO_BINARY. - // [#comment: TODO(samflattery): remove cleanup in uber_per_filter.cc once implemented] - StreamingGrpc *StreamingGrpcSink `protobuf:"bytes,4,opt,name=streaming_grpc,json=streamingGrpc,proto3,oneof"` -} - -func (*OutputSink_StreamingAdmin) isOutputSink_OutputSinkType() {} - -func (*OutputSink_FilePerTap) isOutputSink_OutputSinkType() {} - -func (*OutputSink_StreamingGrpc) isOutputSink_OutputSinkType() {} - -// Streaming admin sink configuration. -type StreamingAdminSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StreamingAdminSink) Reset() { - *x = StreamingAdminSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamingAdminSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamingAdminSink) ProtoMessage() {} - -func (x *StreamingAdminSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamingAdminSink.ProtoReflect.Descriptor instead. -func (*StreamingAdminSink) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{6} -} - -// The file per tap sink outputs a discrete file for every tapped stream. -type FilePerTapSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path prefix. The output file will be of the form _.pb, where is an - // identifier distinguishing the recorded trace for stream instances (the Envoy - // connection ID, HTTP stream ID, etc.). - PathPrefix string `protobuf:"bytes,1,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` -} - -func (x *FilePerTapSink) Reset() { - *x = FilePerTapSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilePerTapSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilePerTapSink) ProtoMessage() {} - -func (x *FilePerTapSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilePerTapSink.ProtoReflect.Descriptor instead. -func (*FilePerTapSink) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{7} -} - -func (x *FilePerTapSink) GetPathPrefix() string { - if x != nil { - return x.PathPrefix - } - return "" -} - -// [#not-implemented-hide:] Streaming gRPC sink configuration sends the taps to an external gRPC -// server. -type StreamingGrpcSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Opaque identifier, that will be sent back to the streaming grpc server. - TapId string `protobuf:"bytes,1,opt,name=tap_id,json=tapId,proto3" json:"tap_id,omitempty"` - // The gRPC server that hosts the Tap Sink Service. - GrpcService *v4alpha1.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` -} - -func (x *StreamingGrpcSink) Reset() { - *x = StreamingGrpcSink{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamingGrpcSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamingGrpcSink) ProtoMessage() {} - -func (x *StreamingGrpcSink) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamingGrpcSink.ProtoReflect.Descriptor instead. -func (*StreamingGrpcSink) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{8} -} - -func (x *StreamingGrpcSink) GetTapId() string { - if x != nil { - return x.TapId - } - return "" -} - -func (x *StreamingGrpcSink) GetGrpcService() *v4alpha1.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -// A set of match configurations used for logical operations. -type MatchPredicate_MatchSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of rules that make up the set. - Rules []*MatchPredicate `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *MatchPredicate_MatchSet) Reset() { - *x = MatchPredicate_MatchSet{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MatchPredicate_MatchSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MatchPredicate_MatchSet) ProtoMessage() {} - -func (x *MatchPredicate_MatchSet) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MatchPredicate_MatchSet.ProtoReflect.Descriptor instead. -func (*MatchPredicate_MatchSet) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *MatchPredicate_MatchSet) GetRules() []*MatchPredicate { - if x != nil { - return x.Rules - } - return nil -} - -type HttpGenericBodyMatch_GenericTextMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *HttpGenericBodyMatch_GenericTextMatch_StringMatch - // *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch - Rule isHttpGenericBodyMatch_GenericTextMatch_Rule `protobuf_oneof:"rule"` -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) Reset() { - *x = HttpGenericBodyMatch_GenericTextMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpGenericBodyMatch_GenericTextMatch) ProtoMessage() {} - -func (x *HttpGenericBodyMatch_GenericTextMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_tap_v4alpha_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpGenericBodyMatch_GenericTextMatch.ProtoReflect.Descriptor instead. -func (*HttpGenericBodyMatch_GenericTextMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP(), []int{3, 0} -} - -func (m *HttpGenericBodyMatch_GenericTextMatch) GetRule() isHttpGenericBodyMatch_GenericTextMatch_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) GetStringMatch() string { - if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_StringMatch); ok { - return x.StringMatch - } - return "" -} - -func (x *HttpGenericBodyMatch_GenericTextMatch) GetBinaryMatch() []byte { - if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch); ok { - return x.BinaryMatch - } - return nil -} - -type isHttpGenericBodyMatch_GenericTextMatch_Rule interface { - isHttpGenericBodyMatch_GenericTextMatch_Rule() -} - -type HttpGenericBodyMatch_GenericTextMatch_StringMatch struct { - // Text string to be located in HTTP body. - StringMatch string `protobuf:"bytes,1,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -type HttpGenericBodyMatch_GenericTextMatch_BinaryMatch struct { - // Sequence of bytes to be located in HTTP body. - BinaryMatch []byte `protobuf:"bytes,2,opt,name=binary_match,json=binaryMatch,proto3,oneof"` -} - -func (*HttpGenericBodyMatch_GenericTextMatch_StringMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { -} - -func (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { -} - -var File_envoy_config_tap_v4alpha_common_proto protoreflect.FileDescriptor - -var file_envoy_config_tap_v4alpha_common_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, - 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x03, 0x0a, 0x09, 0x54, 0x61, 0x70, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7c, 0x0a, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x49, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x55, 0x0a, - 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x54, 0x0a, 0x0b, 0x74, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, - 0x74, 0x61, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, - 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x8c, 0x09, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x47, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, - 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, - 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x69, 0x0a, 0x1a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x6b, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x6b, - 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, - 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x6d, 0x0a, 0x1c, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, - 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x76, 0x0a, 0x1f, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x78, 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1c, - 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x88, 0x01, 0x0a, - 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x12, 0x48, 0x0a, 0x05, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x72, 0x75, - 0x6c, 0x65, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, - 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, - 0x84, 0x01, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x8f, 0x03, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x65, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x1a, 0xbd, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x62, 0x69, - 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, - 0x61, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, - 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, - 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, - 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xbf, 0x02, 0x0a, 0x0c, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x05, 0x73, 0x69, 0x6e, - 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x10, 0x01, 0x52, 0x05, 0x73, 0x69, 0x6e, 0x6b, - 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, - 0x64, 0x5f, 0x72, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, - 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x52, 0x78, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, - 0x65, 0x64, 0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x12, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x78, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, - 0x67, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x98, 0x04, 0x0a, 0x0a, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x4d, 0x0a, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, 0x2e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x57, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x48, - 0x00, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x12, 0x4c, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x61, - 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, - 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x12, - 0x54, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x70, - 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, - 0x67, 0x47, 0x72, 0x70, 0x63, 0x22, 0x7e, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, - 0x16, 0x0a, 0x12, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x44, 0x59, 0x5f, 0x41, 0x53, 0x5f, - 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, - 0x42, 0x4f, 0x44, 0x59, 0x5f, 0x41, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, - 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, - 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x42, 0x49, 0x4e, 0x41, - 0x52, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, - 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x54, - 0x45, 0x58, 0x54, 0x10, 0x04, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, - 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x17, 0x0a, 0x10, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x43, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, - 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, - 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, - 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x22, 0x65, 0x0a, 0x0e, 0x46, 0x69, - 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x28, 0x0a, 0x0b, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x74, 0x68, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, - 0x6b, 0x22, 0xad, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x70, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x70, 0x49, 0x64, 0x12, 0x53, - 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, - 0x6b, 0x42, 0x3f, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_tap_v4alpha_common_proto_rawDescOnce sync.Once - file_envoy_config_tap_v4alpha_common_proto_rawDescData = file_envoy_config_tap_v4alpha_common_proto_rawDesc -) - -func file_envoy_config_tap_v4alpha_common_proto_rawDescGZIP() []byte { - file_envoy_config_tap_v4alpha_common_proto_rawDescOnce.Do(func() { - file_envoy_config_tap_v4alpha_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_tap_v4alpha_common_proto_rawDescData) - }) - return file_envoy_config_tap_v4alpha_common_proto_rawDescData -} - -var file_envoy_config_tap_v4alpha_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_tap_v4alpha_common_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_envoy_config_tap_v4alpha_common_proto_goTypes = []interface{}{ - (OutputSink_Format)(0), // 0: envoy.config.tap.v4alpha.OutputSink.Format - (*TapConfig)(nil), // 1: envoy.config.tap.v4alpha.TapConfig - (*MatchPredicate)(nil), // 2: envoy.config.tap.v4alpha.MatchPredicate - (*HttpHeadersMatch)(nil), // 3: envoy.config.tap.v4alpha.HttpHeadersMatch - (*HttpGenericBodyMatch)(nil), // 4: envoy.config.tap.v4alpha.HttpGenericBodyMatch - (*OutputConfig)(nil), // 5: envoy.config.tap.v4alpha.OutputConfig - (*OutputSink)(nil), // 6: envoy.config.tap.v4alpha.OutputSink - (*StreamingAdminSink)(nil), // 7: envoy.config.tap.v4alpha.StreamingAdminSink - (*FilePerTapSink)(nil), // 8: envoy.config.tap.v4alpha.FilePerTapSink - (*StreamingGrpcSink)(nil), // 9: envoy.config.tap.v4alpha.StreamingGrpcSink - (*MatchPredicate_MatchSet)(nil), // 10: envoy.config.tap.v4alpha.MatchPredicate.MatchSet - (*HttpGenericBodyMatch_GenericTextMatch)(nil), // 11: envoy.config.tap.v4alpha.HttpGenericBodyMatch.GenericTextMatch - (*v4alpha.MatchPredicate)(nil), // 12: envoy.config.common.matcher.v4alpha.MatchPredicate - (*v4alpha1.RuntimeFractionalPercent)(nil), // 13: envoy.config.core.v4alpha.RuntimeFractionalPercent - (*v4alpha2.HeaderMatcher)(nil), // 14: envoy.config.route.v4alpha.HeaderMatcher - (*wrappers.UInt32Value)(nil), // 15: google.protobuf.UInt32Value - (*v4alpha1.GrpcService)(nil), // 16: envoy.config.core.v4alpha.GrpcService -} -var file_envoy_config_tap_v4alpha_common_proto_depIdxs = []int32{ - 2, // 0: envoy.config.tap.v4alpha.TapConfig.hidden_envoy_deprecated_match_config:type_name -> envoy.config.tap.v4alpha.MatchPredicate - 12, // 1: envoy.config.tap.v4alpha.TapConfig.match:type_name -> envoy.config.common.matcher.v4alpha.MatchPredicate - 5, // 2: envoy.config.tap.v4alpha.TapConfig.output_config:type_name -> envoy.config.tap.v4alpha.OutputConfig - 13, // 3: envoy.config.tap.v4alpha.TapConfig.tap_enabled:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 10, // 4: envoy.config.tap.v4alpha.MatchPredicate.or_match:type_name -> envoy.config.tap.v4alpha.MatchPredicate.MatchSet - 10, // 5: envoy.config.tap.v4alpha.MatchPredicate.and_match:type_name -> envoy.config.tap.v4alpha.MatchPredicate.MatchSet - 2, // 6: envoy.config.tap.v4alpha.MatchPredicate.not_match:type_name -> envoy.config.tap.v4alpha.MatchPredicate - 3, // 7: envoy.config.tap.v4alpha.MatchPredicate.http_request_headers_match:type_name -> envoy.config.tap.v4alpha.HttpHeadersMatch - 3, // 8: envoy.config.tap.v4alpha.MatchPredicate.http_request_trailers_match:type_name -> envoy.config.tap.v4alpha.HttpHeadersMatch - 3, // 9: envoy.config.tap.v4alpha.MatchPredicate.http_response_headers_match:type_name -> envoy.config.tap.v4alpha.HttpHeadersMatch - 3, // 10: envoy.config.tap.v4alpha.MatchPredicate.http_response_trailers_match:type_name -> envoy.config.tap.v4alpha.HttpHeadersMatch - 4, // 11: envoy.config.tap.v4alpha.MatchPredicate.http_request_generic_body_match:type_name -> envoy.config.tap.v4alpha.HttpGenericBodyMatch - 4, // 12: envoy.config.tap.v4alpha.MatchPredicate.http_response_generic_body_match:type_name -> envoy.config.tap.v4alpha.HttpGenericBodyMatch - 14, // 13: envoy.config.tap.v4alpha.HttpHeadersMatch.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 11, // 14: envoy.config.tap.v4alpha.HttpGenericBodyMatch.patterns:type_name -> envoy.config.tap.v4alpha.HttpGenericBodyMatch.GenericTextMatch - 6, // 15: envoy.config.tap.v4alpha.OutputConfig.sinks:type_name -> envoy.config.tap.v4alpha.OutputSink - 15, // 16: envoy.config.tap.v4alpha.OutputConfig.max_buffered_rx_bytes:type_name -> google.protobuf.UInt32Value - 15, // 17: envoy.config.tap.v4alpha.OutputConfig.max_buffered_tx_bytes:type_name -> google.protobuf.UInt32Value - 0, // 18: envoy.config.tap.v4alpha.OutputSink.format:type_name -> envoy.config.tap.v4alpha.OutputSink.Format - 7, // 19: envoy.config.tap.v4alpha.OutputSink.streaming_admin:type_name -> envoy.config.tap.v4alpha.StreamingAdminSink - 8, // 20: envoy.config.tap.v4alpha.OutputSink.file_per_tap:type_name -> envoy.config.tap.v4alpha.FilePerTapSink - 9, // 21: envoy.config.tap.v4alpha.OutputSink.streaming_grpc:type_name -> envoy.config.tap.v4alpha.StreamingGrpcSink - 16, // 22: envoy.config.tap.v4alpha.StreamingGrpcSink.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 2, // 23: envoy.config.tap.v4alpha.MatchPredicate.MatchSet.rules:type_name -> envoy.config.tap.v4alpha.MatchPredicate - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name -} - -func init() { file_envoy_config_tap_v4alpha_common_proto_init() } -func file_envoy_config_tap_v4alpha_common_proto_init() { - if File_envoy_config_tap_v4alpha_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_tap_v4alpha_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TapConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchPredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpHeadersMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpGenericBodyMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutputSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamingAdminSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilePerTapSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamingGrpcSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchPredicate_MatchSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpGenericBodyMatch_GenericTextMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*MatchPredicate_OrMatch)(nil), - (*MatchPredicate_AndMatch)(nil), - (*MatchPredicate_NotMatch)(nil), - (*MatchPredicate_AnyMatch)(nil), - (*MatchPredicate_HttpRequestHeadersMatch)(nil), - (*MatchPredicate_HttpRequestTrailersMatch)(nil), - (*MatchPredicate_HttpResponseHeadersMatch)(nil), - (*MatchPredicate_HttpResponseTrailersMatch)(nil), - (*MatchPredicate_HttpRequestGenericBodyMatch)(nil), - (*MatchPredicate_HttpResponseGenericBodyMatch)(nil), - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*OutputSink_StreamingAdmin)(nil), - (*OutputSink_FilePerTap)(nil), - (*OutputSink_StreamingGrpc)(nil), - } - file_envoy_config_tap_v4alpha_common_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*HttpGenericBodyMatch_GenericTextMatch_StringMatch)(nil), - (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_tap_v4alpha_common_proto_rawDesc, - NumEnums: 1, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_tap_v4alpha_common_proto_goTypes, - DependencyIndexes: file_envoy_config_tap_v4alpha_common_proto_depIdxs, - EnumInfos: file_envoy_config_tap_v4alpha_common_proto_enumTypes, - MessageInfos: file_envoy_config_tap_v4alpha_common_proto_msgTypes, - }.Build() - File_envoy_config_tap_v4alpha_common_proto = out.File - file_envoy_config_tap_v4alpha_common_proto_rawDesc = nil - file_envoy_config_tap_v4alpha_common_proto_goTypes = nil - file_envoy_config_tap_v4alpha_common_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/tap/v4alpha/common.pb.validate.go b/pkg/api/envoy/config/tap/v4alpha/common.pb.validate.go deleted file mode 100644 index 50726334ab..0000000000 --- a/pkg/api/envoy/config/tap/v4alpha/common.pb.validate.go +++ /dev/null @@ -1,1144 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/tap/v4alpha/common.proto - -package envoy_config_tap_v4alpha - -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{} -) - -// Validate checks the field values on TapConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *TapConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedMatchConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapConfigValidationError{ - field: "HiddenEnvoyDeprecatedMatchConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapConfigValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetOutputConfig() == nil { - return TapConfigValidationError{ - field: "OutputConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetOutputConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapConfigValidationError{ - field: "OutputConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTapEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapConfigValidationError{ - field: "TapEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// TapConfigValidationError is the validation error returned by -// TapConfig.Validate if the designated constraints aren't met. -type TapConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TapConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TapConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TapConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TapConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TapConfigValidationError) ErrorName() string { return "TapConfigValidationError" } - -// Error satisfies the builtin error interface -func (e TapConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTapConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TapConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TapConfigValidationError{} - -// Validate checks the field values on MatchPredicate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *MatchPredicate) Validate() error { - if m == nil { - return nil - } - - switch m.Rule.(type) { - - case *MatchPredicate_OrMatch: - - if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "OrMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_AndMatch: - - if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "AndMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_NotMatch: - - if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "NotMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_AnyMatch: - - if m.GetAnyMatch() != true { - return MatchPredicateValidationError{ - field: "AnyMatch", - reason: "value must equal true", - } - } - - case *MatchPredicate_HttpRequestHeadersMatch: - - if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpRequestHeadersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpRequestTrailersMatch: - - if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpRequestTrailersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpResponseHeadersMatch: - - if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpResponseHeadersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpResponseTrailersMatch: - - if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpResponseTrailersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpRequestGenericBodyMatch: - - if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpRequestGenericBodyMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpResponseGenericBodyMatch: - - if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpResponseGenericBodyMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return MatchPredicateValidationError{ - field: "Rule", - reason: "value is required", - } - - } - - return nil -} - -// MatchPredicateValidationError is the validation error returned by -// MatchPredicate.Validate if the designated constraints aren't met. -type MatchPredicateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MatchPredicateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MatchPredicateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MatchPredicateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MatchPredicateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MatchPredicateValidationError) ErrorName() string { return "MatchPredicateValidationError" } - -// Error satisfies the builtin error interface -func (e MatchPredicateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatchPredicate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MatchPredicateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MatchPredicateValidationError{} - -// Validate checks the field values on HttpHeadersMatch with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *HttpHeadersMatch) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpHeadersMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// HttpHeadersMatchValidationError is the validation error returned by -// HttpHeadersMatch.Validate if the designated constraints aren't met. -type HttpHeadersMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpHeadersMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpHeadersMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpHeadersMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpHeadersMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpHeadersMatchValidationError) ErrorName() string { return "HttpHeadersMatchValidationError" } - -// Error satisfies the builtin error interface -func (e HttpHeadersMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpHeadersMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpHeadersMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpHeadersMatchValidationError{} - -// Validate checks the field values on HttpGenericBodyMatch with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HttpGenericBodyMatch) Validate() error { - if m == nil { - return nil - } - - // no validation rules for BytesLimit - - if len(m.GetPatterns()) < 1 { - return HttpGenericBodyMatchValidationError{ - 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 HttpGenericBodyMatchValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// HttpGenericBodyMatchValidationError is the validation error returned by -// HttpGenericBodyMatch.Validate if the designated constraints aren't met. -type HttpGenericBodyMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpGenericBodyMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpGenericBodyMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpGenericBodyMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpGenericBodyMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpGenericBodyMatchValidationError) ErrorName() string { - return "HttpGenericBodyMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpGenericBodyMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpGenericBodyMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpGenericBodyMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpGenericBodyMatchValidationError{} - -// Validate checks the field values on OutputConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *OutputConfig) Validate() error { - if m == nil { - return nil - } - - if len(m.GetSinks()) != 1 { - return OutputConfigValidationError{ - field: "Sinks", - reason: "value must contain exactly 1 item(s)", - } - } - - for idx, item := range m.GetSinks() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutputConfigValidationError{ - field: fmt.Sprintf("Sinks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetMaxBufferedRxBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutputConfigValidationError{ - field: "MaxBufferedRxBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetMaxBufferedTxBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutputConfigValidationError{ - field: "MaxBufferedTxBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Streaming - - return nil -} - -// OutputConfigValidationError is the validation error returned by -// OutputConfig.Validate if the designated constraints aren't met. -type OutputConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OutputConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OutputConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OutputConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OutputConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OutputConfigValidationError) ErrorName() string { return "OutputConfigValidationError" } - -// Error satisfies the builtin error interface -func (e OutputConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOutputConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OutputConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OutputConfigValidationError{} - -// Validate checks the field values on OutputSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *OutputSink) Validate() error { - if m == nil { - return nil - } - - if _, ok := OutputSink_Format_name[int32(m.GetFormat())]; !ok { - return OutputSinkValidationError{ - field: "Format", - reason: "value must be one of the defined enum values", - } - } - - switch m.OutputSinkType.(type) { - - case *OutputSink_StreamingAdmin: - - if v, ok := interface{}(m.GetStreamingAdmin()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutputSinkValidationError{ - field: "StreamingAdmin", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *OutputSink_FilePerTap: - - if v, ok := interface{}(m.GetFilePerTap()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutputSinkValidationError{ - field: "FilePerTap", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *OutputSink_StreamingGrpc: - - if v, ok := interface{}(m.GetStreamingGrpc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutputSinkValidationError{ - field: "StreamingGrpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return OutputSinkValidationError{ - field: "OutputSinkType", - reason: "value is required", - } - - } - - return nil -} - -// OutputSinkValidationError is the validation error returned by -// OutputSink.Validate if the designated constraints aren't met. -type OutputSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OutputSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OutputSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OutputSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OutputSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OutputSinkValidationError) ErrorName() string { return "OutputSinkValidationError" } - -// Error satisfies the builtin error interface -func (e OutputSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOutputSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OutputSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OutputSinkValidationError{} - -// Validate checks the field values on StreamingAdminSink with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamingAdminSink) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// StreamingAdminSinkValidationError is the validation error returned by -// StreamingAdminSink.Validate if the designated constraints aren't met. -type StreamingAdminSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamingAdminSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamingAdminSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamingAdminSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamingAdminSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamingAdminSinkValidationError) ErrorName() string { - return "StreamingAdminSinkValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamingAdminSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamingAdminSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamingAdminSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamingAdminSinkValidationError{} - -// Validate checks the field values on FilePerTapSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *FilePerTapSink) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetPathPrefix()) < 1 { - return FilePerTapSinkValidationError{ - field: "PathPrefix", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// FilePerTapSinkValidationError is the validation error returned by -// FilePerTapSink.Validate if the designated constraints aren't met. -type FilePerTapSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilePerTapSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilePerTapSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilePerTapSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilePerTapSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilePerTapSinkValidationError) ErrorName() string { return "FilePerTapSinkValidationError" } - -// Error satisfies the builtin error interface -func (e FilePerTapSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilePerTapSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilePerTapSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilePerTapSinkValidationError{} - -// Validate checks the field values on StreamingGrpcSink with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *StreamingGrpcSink) Validate() error { - if m == nil { - return nil - } - - // no validation rules for TapId - - if m.GetGrpcService() == nil { - return StreamingGrpcSinkValidationError{ - field: "GrpcService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamingGrpcSinkValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// StreamingGrpcSinkValidationError is the validation error returned by -// StreamingGrpcSink.Validate if the designated constraints aren't met. -type StreamingGrpcSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamingGrpcSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamingGrpcSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamingGrpcSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamingGrpcSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamingGrpcSinkValidationError) ErrorName() string { - return "StreamingGrpcSinkValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamingGrpcSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamingGrpcSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamingGrpcSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamingGrpcSinkValidationError{} - -// Validate checks the field values on MatchPredicate_MatchSet with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *MatchPredicate_MatchSet) Validate() error { - if m == nil { - return nil - } - - if len(m.GetRules()) < 2 { - return MatchPredicate_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 MatchPredicate_MatchSetValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// MatchPredicate_MatchSetValidationError is the validation error returned by -// MatchPredicate_MatchSet.Validate if the designated constraints aren't met. -type MatchPredicate_MatchSetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MatchPredicate_MatchSetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MatchPredicate_MatchSetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MatchPredicate_MatchSetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MatchPredicate_MatchSetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MatchPredicate_MatchSetValidationError) ErrorName() string { - return "MatchPredicate_MatchSetValidationError" -} - -// Error satisfies the builtin error interface -func (e MatchPredicate_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 %sMatchPredicate_MatchSet.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MatchPredicate_MatchSetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MatchPredicate_MatchSetValidationError{} - -// Validate checks the field values on HttpGenericBodyMatch_GenericTextMatch -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *HttpGenericBodyMatch_GenericTextMatch) Validate() error { - if m == nil { - return nil - } - - switch m.Rule.(type) { - - case *HttpGenericBodyMatch_GenericTextMatch_StringMatch: - - if utf8.RuneCountInString(m.GetStringMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ - field: "StringMatch", - reason: "value length must be at least 1 runes", - } - } - - case *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch: - - if len(m.GetBinaryMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ - field: "BinaryMatch", - reason: "value length must be at least 1 bytes", - } - } - - default: - return HttpGenericBodyMatch_GenericTextMatchValidationError{ - field: "Rule", - reason: "value is required", - } - - } - - return nil -} - -// HttpGenericBodyMatch_GenericTextMatchValidationError is the validation error -// returned by HttpGenericBodyMatch_GenericTextMatch.Validate if the -// designated constraints aren't met. -type HttpGenericBodyMatch_GenericTextMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) ErrorName() string { - return "HttpGenericBodyMatch_GenericTextMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpGenericBodyMatch_GenericTextMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpGenericBodyMatch_GenericTextMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpGenericBodyMatch_GenericTextMatchValidationError{} diff --git a/pkg/api/envoy/config/trace/v2/datadog.pb.go b/pkg/api/envoy/config/trace/v2/datadog.pb.go index 3c11d2f9be..1f1bd929bc 100644 --- a/pkg/api/envoy/config/trace/v2/datadog.pb.go +++ b/pkg/api/envoy/config/trace/v2/datadog.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/datadog.proto -package envoy_config_trace_v2 +package tracev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the Datadog tracer. // [#extension: envoy.tracers.datadog] type DatadogConfig struct { @@ -103,11 +98,16 @@ var file_envoy_config_trace_v2_datadog_proto_rawDesc = []byte{ 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x3d, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, - 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x83, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, + 0x0c, 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2/datadog.pb.validate.go b/pkg/api/envoy/config/trace/v2/datadog.pb.validate.go index b65212039f..1475c527dc 100644 --- a/pkg/api/envoy/config/trace/v2/datadog.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/datadog.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/datadog.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DatadogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DatadogConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DatadogConfigMultiError, or +// nil if none found. +func (m *DatadogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DatadogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCollectorCluster()) < 1 { - return DatadogConfigValidationError{ + err := DatadogConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetServiceName()) < 1 { - return DatadogConfigValidationError{ + err := DatadogConfigValidationError{ field: "ServiceName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return DatadogConfigMultiError(errors) } return nil } +// DatadogConfigMultiError is an error wrapping multiple validation errors +// returned by DatadogConfig.ValidateAll() if the designated constraints +// aren't met. +type DatadogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DatadogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DatadogConfigMultiError) AllErrors() []error { return m } + // DatadogConfigValidationError is the validation error returned by // DatadogConfig.Validate if the designated constraints aren't met. type DatadogConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.go b/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.go index 84a0f14855..b32848c97a 100644 --- a/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.go +++ b/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/dynamic_ot.proto -package envoy_config_trace_v2 +package tracev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // DynamicOtConfig is used to dynamically load a tracer from a shared library // that implements the `OpenTracing dynamic loading API // `_. @@ -109,12 +104,16 @@ var file_envoy_config_trace_v2_dynamic_ot_proto_rawDesc = []byte{ 0x20, 0x01, 0x52, 0x07, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x3f, 0x0a, 0x23, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4f, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x85, 0x01, 0x0a, + 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4f, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.validate.go b/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.validate.go index ccb57171a9..5643e65fc7 100644 --- a/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/dynamic_ot.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/dynamic_ot.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *DynamicOtConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DynamicOtConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DynamicOtConfigMultiError, or nil if none found. +func (m *DynamicOtConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DynamicOtConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetLibrary()) < 1 { - return DynamicOtConfigValidationError{ + err := DynamicOtConfigValidationError{ field: "Library", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DynamicOtConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DynamicOtConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DynamicOtConfigValidationError{ field: "Config", @@ -58,9 +97,30 @@ func (m *DynamicOtConfig) Validate() error { } } + if len(errors) > 0 { + return DynamicOtConfigMultiError(errors) + } + return nil } +// DynamicOtConfigMultiError is an error wrapping multiple validation errors +// returned by DynamicOtConfig.ValidateAll() if the designated constraints +// aren't met. +type DynamicOtConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DynamicOtConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DynamicOtConfigMultiError) AllErrors() []error { return m } + // DynamicOtConfigValidationError is the validation error returned by // DynamicOtConfig.Validate if the designated constraints aren't met. type DynamicOtConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v2/http_tracer.pb.go b/pkg/api/envoy/config/trace/v2/http_tracer.pb.go index d3bf97d485..731a99f0e1 100644 --- a/pkg/api/envoy/config/trace/v2/http_tracer.pb.go +++ b/pkg/api/envoy/config/trace/v2/http_tracer.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/http_tracer.proto -package envoy_config_trace_v2 +package tracev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The tracing configuration specifies settings for an HTTP tracer provider used by Envoy. // // Envoy may support other tracers in the future, but right now the HTTP tracer is the only one @@ -229,12 +224,16 @@ var file_envoy_config_trace_v2_http_tracer_proto_rawDesc = []byte{ 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, - 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x40, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x63, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x86, 0x01, + 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x32, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2/http_tracer.pb.validate.go b/pkg/api/envoy/config/trace/v2/http_tracer.pb.validate.go index ca4afef870..688652fc41 100644 --- a/pkg/api/envoy/config/trace/v2/http_tracer.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/http_tracer.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/http_tracer.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Tracing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tracing with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TracingMultiError, or nil if none found. +func (m *Tracing) ValidateAll() error { + return m.validate(true) +} + +func (m *Tracing) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "Http", @@ -50,9 +85,29 @@ func (m *Tracing) Validate() error { } } + if len(errors) > 0 { + return TracingMultiError(errors) + } + return nil } +// TracingMultiError is an error wrapping multiple validation errors returned +// by Tracing.ValidateAll() if the designated constraints aren't met. +type TracingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TracingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TracingMultiError) AllErrors() []error { return m } + // TracingValidationError is the validation error returned by Tracing.Validate // if the designated constraints aren't met. type TracingValidationError struct { @@ -108,25 +163,62 @@ var _ interface { } = TracingValidationError{} // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Tracing_Http) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tracing_Http with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Tracing_HttpMultiError, or +// nil if none found. +func (m *Tracing_Http) ValidateAll() error { + return m.validate(true) +} + +func (m *Tracing_Http) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return Tracing_HttpValidationError{ + err := Tracing_HttpValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *Tracing_Http_Config: - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Tracing_HttpValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Tracing_HttpValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Tracing_HttpValidationError{ field: "Config", @@ -138,7 +230,26 @@ func (m *Tracing_Http) Validate() error { case *Tracing_Http_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Tracing_HttpValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Tracing_HttpValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Tracing_HttpValidationError{ field: "TypedConfig", @@ -150,9 +261,29 @@ func (m *Tracing_Http) Validate() error { } + if len(errors) > 0 { + return Tracing_HttpMultiError(errors) + } + return nil } +// Tracing_HttpMultiError is an error wrapping multiple validation errors +// returned by Tracing_Http.ValidateAll() if the designated constraints aren't met. +type Tracing_HttpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Tracing_HttpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Tracing_HttpMultiError) AllErrors() []error { return m } + // Tracing_HttpValidationError is the validation error returned by // Tracing_Http.Validate if the designated constraints aren't met. type Tracing_HttpValidationError struct { diff --git a/pkg/api/envoy/config/trace/v2/lightstep.pb.go b/pkg/api/envoy/config/trace/v2/lightstep.pb.go index f9c078df9f..c86e40ff39 100644 --- a/pkg/api/envoy/config/trace/v2/lightstep.pb.go +++ b/pkg/api/envoy/config/trace/v2/lightstep.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/lightstep.proto -package envoy_config_trace_v2 +package tracev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Available propagation modes type LightstepConfig_PropagationMode int32 @@ -183,11 +178,16 @@ var file_envoy_config_trace_v2_lightstep_proto_rawDesc = []byte{ 0x45, 0x4e, 0x56, 0x4f, 0x59, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x53, 0x54, 0x45, 0x50, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x42, 0x33, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, - 0x03, 0x42, 0x3f, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, - 0x74, 0x65, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x42, 0x85, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x74, 0x65, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, + 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2/lightstep.pb.validate.go b/pkg/api/envoy/config/trace/v2/lightstep.pb.validate.go index 655639b409..e2efec6759 100644 --- a/pkg/api/envoy/config/trace/v2/lightstep.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/lightstep.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/lightstep.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,46 +31,94 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LightstepConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LightstepConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LightstepConfigMultiError, or nil if none found. +func (m *LightstepConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *LightstepConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCollectorCluster()) < 1 { - return LightstepConfigValidationError{ + err := LightstepConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetAccessTokenFile()) < 1 { - return LightstepConfigValidationError{ + err := LightstepConfigValidationError{ field: "AccessTokenFile", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPropagationModes() { _, _ = idx, item if _, ok := LightstepConfig_PropagationMode_name[int32(item)]; !ok { - return LightstepConfigValidationError{ + err := LightstepConfigValidationError{ field: fmt.Sprintf("PropagationModes[%v]", idx), reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return LightstepConfigMultiError(errors) + } + return nil } +// LightstepConfigMultiError is an error wrapping multiple validation errors +// returned by LightstepConfig.ValidateAll() if the designated constraints +// aren't met. +type LightstepConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LightstepConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LightstepConfigMultiError) AllErrors() []error { return m } + // LightstepConfigValidationError is the validation error returned by // LightstepConfig.Validate if the designated constraints aren't met. type LightstepConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v2/opencensus.pb.go b/pkg/api/envoy/config/trace/v2/opencensus.pb.go index d4531f39c5..0861ff1669 100644 --- a/pkg/api/envoy/config/trace/v2/opencensus.pb.go +++ b/pkg/api/envoy/config/trace/v2/opencensus.pb.go @@ -1,17 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/opencensus.proto -package envoy_config_trace_v2 +package tracev2 import ( v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OpenCensusConfig_TraceContext int32 const ( @@ -275,75 +269,78 @@ var file_envoy_config_trace_v2_opencensus_proto_rawDesc = []byte{ 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x07, 0x0a, 0x10, - 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x73, - 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, - 0x64, 0x6f, 0x75, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, - 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, - 0x69, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, - 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x58, 0x0a, 0x18, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x70, 0x63, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x16, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, 0x70, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, - 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x38, 0x0a, - 0x18, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x16, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x63, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x50, 0x0a, 0x14, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x12, - 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x6a, - 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x60, 0x0a, 0x0c, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, - 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, - 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x5f, - 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, - 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, - 0x58, 0x54, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x42, 0x33, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x07, - 0x10, 0x08, 0x42, 0x40, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x63, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x22, 0xe4, 0x07, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x1a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x45, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x58, 0x0a, 0x18, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x16, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, + 0x17, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x7a, 0x69, 0x70, 0x6b, 0x69, + 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x38, 0x0a, 0x18, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, + 0x0a, 0x0f, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x14, 0x6f, 0x63, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x12, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47, 0x72, + 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x16, 0x69, 0x6e, 0x63, + 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, + 0x14, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x6a, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x6f, 0x75, 0x74, + 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x22, 0x60, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, + 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x49, 0x4e, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x43, + 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x42, + 0x33, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x42, 0x86, 0x01, 0x0a, 0x23, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x32, 0x42, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, + 0x76, 0x32, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2/opencensus.pb.validate.go b/pkg/api/envoy/config/trace/v2/opencensus.pb.validate.go index cd11374efa..207947e225 100644 --- a/pkg/api/envoy/config/trace/v2/opencensus.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/opencensus.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/opencensus.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *OpenCensusConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OpenCensusConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OpenCensusConfigMultiError, or nil if none found. +func (m *OpenCensusConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OpenCensusConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTraceConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTraceConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "TraceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "TraceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTraceConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OpenCensusConfigValidationError{ field: "TraceConfig", @@ -59,7 +94,26 @@ func (m *OpenCensusConfig) Validate() error { // no validation rules for StackdriverAddress - if v, ok := interface{}(m.GetStackdriverGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStackdriverGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "StackdriverGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "StackdriverGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStackdriverGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OpenCensusConfigValidationError{ field: "StackdriverGrpcService", @@ -77,7 +131,26 @@ func (m *OpenCensusConfig) Validate() error { // no validation rules for OcagentAddress - if v, ok := interface{}(m.GetOcagentGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOcagentGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "OcagentGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "OcagentGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOcagentGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OpenCensusConfigValidationError{ field: "OcagentGrpcService", @@ -87,9 +160,30 @@ func (m *OpenCensusConfig) Validate() error { } } + if len(errors) > 0 { + return OpenCensusConfigMultiError(errors) + } + return nil } +// OpenCensusConfigMultiError is an error wrapping multiple validation errors +// returned by OpenCensusConfig.ValidateAll() if the designated constraints +// aren't met. +type OpenCensusConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OpenCensusConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OpenCensusConfigMultiError) AllErrors() []error { return m } + // OpenCensusConfigValidationError is the validation error returned by // OpenCensusConfig.Validate if the designated constraints aren't met. type OpenCensusConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v2/service.pb.go b/pkg/api/envoy/config/trace/v2/service.pb.go index 1ea204bfba..88b682c42b 100644 --- a/pkg/api/envoy/config/trace/v2/service.pb.go +++ b/pkg/api/envoy/config/trace/v2/service.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/service.proto -package envoy_config_trace_v2 +package tracev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration structure. type TraceServiceConfig struct { state protoimpl.MessageState @@ -95,12 +90,16 @@ var file_envoy_config_trace_v2_service_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x3d, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x83, 0x01, + 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2/service.pb.validate.go b/pkg/api/envoy/config/trace/v2/service.pb.validate.go index 2e7a2abde0..cf3bceb2ef 100644 --- a/pkg/api/envoy/config/trace/v2/service.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/service.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TraceServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TraceServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TraceServiceConfigMultiError, or nil if none found. +func (m *TraceServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TraceServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetGrpcService() == nil { - return TraceServiceConfigValidationError{ + err := TraceServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceServiceConfigValidationError{ field: "GrpcService", @@ -58,9 +97,30 @@ func (m *TraceServiceConfig) Validate() error { } } + if len(errors) > 0 { + return TraceServiceConfigMultiError(errors) + } + return nil } +// TraceServiceConfigMultiError is an error wrapping multiple validation errors +// returned by TraceServiceConfig.ValidateAll() if the designated constraints +// aren't met. +type TraceServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TraceServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TraceServiceConfigMultiError) AllErrors() []error { return m } + // TraceServiceConfigValidationError is the validation error returned by // TraceServiceConfig.Validate if the designated constraints aren't met. type TraceServiceConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v2/trace.pb.go b/pkg/api/envoy/config/trace/v2/trace.pb.go index 73b5738c10..32dee7d932 100644 --- a/pkg/api/envoy/config/trace/v2/trace.pb.go +++ b/pkg/api/envoy/config/trace/v2/trace.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/trace.proto -package envoy_config_trace_v2 +package tracev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,41 +19,39 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_config_trace_v2_trace_proto protoreflect.FileDescriptor var file_envoy_config_trace_v2_trace_proto_rawDesc = []byte{ 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, - 0x2f, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6f, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x7a, 0x69, 0x70, 0x6b, 0x69, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x33, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0a, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x50, 0x01, 0x50, 0x02, - 0x50, 0x03, 0x50, 0x04, 0x50, 0x05, 0x50, 0x06, 0x50, 0x07, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, + 0x32, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6f, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x7a, 0x69, 0x70, 0x6b, + 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x79, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, + 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x76, 0x32, 0x50, 0x00, 0x50, 0x01, 0x50, 0x02, 0x50, 0x03, 0x50, 0x04, 0x50, 0x05, 0x50, + 0x06, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_config_trace_v2_trace_proto_goTypes = []interface{}{} diff --git a/pkg/api/envoy/config/trace/v2/trace.pb.validate.go b/pkg/api/envoy/config/trace/v2/trace.pb.validate.go index 51cd516927..2503a45a4b 100644 --- a/pkg/api/envoy/config/trace/v2/trace.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/trace.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/trace.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/config/trace/v2/zipkin.pb.go b/pkg/api/envoy/config/trace/v2/zipkin.pb.go index 0b9918b13a..b0c1ad3496 100644 --- a/pkg/api/envoy/config/trace/v2/zipkin.pb.go +++ b/pkg/api/envoy/config/trace/v2/zipkin.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2/zipkin.proto -package envoy_config_trace_v2 +package tracev2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Available Zipkin collector endpoint versions. type ZipkinConfig_CollectorEndpointVersion int32 @@ -96,7 +91,7 @@ func (ZipkinConfig_CollectorEndpointVersion) EnumDescriptor() ([]byte, []int) { // Configuration for the Zipkin tracer. // [#extension: envoy.tracers.zipkin] -// [#next-free-field: 7] +// [#next-free-field: 6] type ZipkinConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -119,9 +114,6 @@ type ZipkinConfig struct { // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be // used. 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"` - // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors - // that require a specific hostname. Defaults to `collector_cluster` above. - CollectorHostname string `protobuf:"bytes,6,opt,name=collector_hostname,json=collectorHostname,proto3" json:"collector_hostname,omitempty"` } func (x *ZipkinConfig) Reset() { @@ -191,13 +183,6 @@ func (x *ZipkinConfig) GetCollectorEndpointVersion() ZipkinConfig_CollectorEndpo return ZipkinConfig_HTTP_JSON_V1 } -func (x *ZipkinConfig) GetCollectorHostname() string { - if x != nil { - return x.CollectorHostname - } - return "" -} - var File_envoy_config_trace_v2_zipkin_proto protoreflect.FileDescriptor var file_envoy_config_trace_v2_zipkin_proto_rawDesc = []byte{ @@ -212,7 +197,7 @@ var file_envoy_config_trace_v2_zipkin_proto_rawDesc = []byte{ 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x03, 0x0a, 0x0c, 0x5a, 0x69, 0x70, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03, 0x0a, 0x0c, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x10, 0x63, @@ -235,20 +220,22 @@ var file_envoy_config_trace_v2_zipkin_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6c, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5f, 0x0a, 0x18, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x0c, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, - 0x56, 0x31, 0x10, 0x00, 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, - 0x0a, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x08, 0x0a, - 0x04, 0x47, 0x52, 0x50, 0x43, 0x10, 0x03, 0x42, 0x3c, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0b, - 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x0a, 0x18, 0x43, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x0c, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, + 0x5f, 0x56, 0x31, 0x10, 0x00, 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, 0x12, + 0x0d, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, + 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x08, + 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x10, 0x03, 0x42, 0x82, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, + 0x42, 0x0b, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2/zipkin.pb.validate.go b/pkg/api/envoy/config/trace/v2/zipkin.pb.validate.go index 6de2c75d54..8e74f69191 100644 --- a/pkg/api/envoy/config/trace/v2/zipkin.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2/zipkin.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2/zipkin.proto -package envoy_config_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,76 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ZipkinConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ZipkinConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ZipkinConfigMultiError, or +// nil if none found. +func (m *ZipkinConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ZipkinConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetCollectorCluster()) < 1 { - return ZipkinConfigValidationError{ + err := ZipkinConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetCollectorEndpoint()) < 1 { - return ZipkinConfigValidationError{ + err := ZipkinConfigValidationError{ field: "CollectorEndpoint", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for TraceId_128Bit - if v, ok := interface{}(m.GetSharedSpanContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSharedSpanContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZipkinConfigValidationError{ + field: "SharedSpanContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZipkinConfigValidationError{ + field: "SharedSpanContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSharedSpanContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZipkinConfigValidationError{ field: "SharedSpanContext", @@ -69,11 +112,29 @@ func (m *ZipkinConfig) Validate() error { // no validation rules for CollectorEndpointVersion - // no validation rules for CollectorHostname + if len(errors) > 0 { + return ZipkinConfigMultiError(errors) + } return nil } +// ZipkinConfigMultiError is an error wrapping multiple validation errors +// returned by ZipkinConfig.ValidateAll() if the designated constraints aren't met. +type ZipkinConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZipkinConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZipkinConfigMultiError) AllErrors() []error { return m } + // ZipkinConfigValidationError is the validation error returned by // ZipkinConfig.Validate if the designated constraints aren't met. type ZipkinConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v2alpha/xray.pb.go b/pkg/api/envoy/config/trace/v2alpha/xray.pb.go index 4594e8c959..4f19f158a0 100644 --- a/pkg/api/envoy/config/trace/v2alpha/xray.pb.go +++ b/pkg/api/envoy/config/trace/v2alpha/xray.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v2alpha/xray.proto -package envoy_config_trace_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type XRayConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -126,11 +121,16 @@ var file_envoy_config_trace_v2alpha_xray_proto_rawDesc = []byte{ 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x14, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x4d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x42, 0x3f, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x09, 0x58, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x42, 0x82, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x42, 0x09, 0x58, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v2alpha/xray.pb.validate.go b/pkg/api/envoy/config/trace/v2alpha/xray.pb.validate.go index d64b2e6da4..85f6188fe8 100644 --- a/pkg/api/envoy/config/trace/v2alpha/xray.pb.validate.go +++ b/pkg/api/envoy/config/trace/v2alpha/xray.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v2alpha/xray.proto -package envoy_config_trace_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on XRayConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *XRayConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on XRayConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in XRayConfigMultiError, or +// nil if none found. +func (m *XRayConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *XRayConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDaemonEndpoint()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetDaemonEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "DaemonEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "DaemonEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDaemonEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return XRayConfigValidationError{ field: "DaemonEndpoint", @@ -51,13 +87,36 @@ func (m *XRayConfig) Validate() error { } if utf8.RuneCountInString(m.GetSegmentName()) < 1 { - return XRayConfigValidationError{ + err := XRayConfigValidationError{ field: "SegmentName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSamplingRuleManifest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSamplingRuleManifest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "SamplingRuleManifest", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "SamplingRuleManifest", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSamplingRuleManifest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return XRayConfigValidationError{ field: "SamplingRuleManifest", @@ -67,9 +126,29 @@ func (m *XRayConfig) Validate() error { } } + if len(errors) > 0 { + return XRayConfigMultiError(errors) + } + return nil } +// XRayConfigMultiError is an error wrapping multiple validation errors +// returned by XRayConfig.ValidateAll() if the designated constraints aren't met. +type XRayConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m XRayConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m XRayConfigMultiError) AllErrors() []error { return m } + // XRayConfigValidationError is the validation error returned by // XRayConfig.Validate if the designated constraints aren't met. type XRayConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/datadog.pb.go b/pkg/api/envoy/config/trace/v3/datadog.pb.go index 4b0919f7ce..da5480b045 100644 --- a/pkg/api/envoy/config/trace/v3/datadog.pb.go +++ b/pkg/api/envoy/config/trace/v3/datadog.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/datadog.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the Datadog tracer. // [#extension: envoy.tracers.datadog] type DatadogConfig struct { @@ -110,14 +105,19 @@ var file_envoy_config_trace_v3_datadog_proto_rawDesc = []byte{ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6d, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, - 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x2a, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xb3, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, + 0x0c, 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x76, 0x33, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2a, 0x12, 0x28, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x76, 0x34, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v3/datadog.pb.validate.go b/pkg/api/envoy/config/trace/v3/datadog.pb.validate.go index a7e9df20c5..0b54b35674 100644 --- a/pkg/api/envoy/config/trace/v3/datadog.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/datadog.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/datadog.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DatadogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DatadogConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DatadogConfigMultiError, or +// nil if none found. +func (m *DatadogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DatadogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCollectorCluster()) < 1 { - return DatadogConfigValidationError{ + err := DatadogConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetServiceName()) < 1 { - return DatadogConfigValidationError{ + err := DatadogConfigValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return DatadogConfigMultiError(errors) } return nil } +// DatadogConfigMultiError is an error wrapping multiple validation errors +// returned by DatadogConfig.ValidateAll() if the designated constraints +// aren't met. +type DatadogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DatadogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DatadogConfigMultiError) AllErrors() []error { return m } + // DatadogConfigValidationError is the validation error returned by // DatadogConfig.Validate if the designated constraints aren't met. type DatadogConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.go b/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.go index c37fb92996..f4f5e17577 100644 --- a/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.go +++ b/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/dynamic_ot.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // DynamicOtConfig is used to dynamically load a tracer from a shared library // that implements the `OpenTracing dynamic loading API // `_. @@ -116,15 +111,20 @@ var file_envoy_config_trace_v3_dynamic_ot_proto_rawDesc = []byte{ 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4f, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x72, - 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4f, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, - 0x6f, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4f, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xb8, + 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4f, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0xf2, 0x98, + 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x64, + 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6f, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.validate.go b/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.validate.go index b4e87baaea..fdd7dbf9b3 100644 --- a/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/dynamic_ot.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/dynamic_ot.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *DynamicOtConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DynamicOtConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DynamicOtConfigMultiError, or nil if none found. +func (m *DynamicOtConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DynamicOtConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetLibrary()) < 1 { - return DynamicOtConfigValidationError{ + err := DynamicOtConfigValidationError{ field: "Library", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DynamicOtConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DynamicOtConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DynamicOtConfigValidationError{ field: "Config", @@ -58,9 +97,30 @@ func (m *DynamicOtConfig) Validate() error { } } + if len(errors) > 0 { + return DynamicOtConfigMultiError(errors) + } + return nil } +// DynamicOtConfigMultiError is an error wrapping multiple validation errors +// returned by DynamicOtConfig.ValidateAll() if the designated constraints +// aren't met. +type DynamicOtConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DynamicOtConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DynamicOtConfigMultiError) AllErrors() []error { return m } + // DynamicOtConfigValidationError is the validation error returned by // DynamicOtConfig.Validate if the designated constraints aren't met. type DynamicOtConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/http_tracer.pb.go b/pkg/api/envoy/config/trace/v3/http_tracer.pb.go index f280c43caf..b95e311b9c 100644 --- a/pkg/api/envoy/config/trace/v3/http_tracer.pb.go +++ b/pkg/api/envoy/config/trace/v3/http_tracer.pb.go @@ -1,17 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/http_tracer.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The tracing configuration specifies settings for an HTTP tracer provider used by Envoy. // // Envoy may support other tracers in the future, but right now the HTTP tracer is the only one @@ -37,7 +31,7 @@ const _ = proto.ProtoPackageIsVersion4 // .. attention:: // // Use of this message type has been deprecated in favor of direct use of -// :ref:`Tracing.Http `. +// :ref:`Tracing.Http `. type Tracing struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -89,8 +83,8 @@ func (x *Tracing) GetHttp() *Tracing_Http { // Configuration for an HTTP tracer provider used by Envoy. // // The configuration is defined by the -// :ref:`HttpConnectionManager.Tracing ` -// :ref:`provider ` +// :ref:`HttpConnectionManager.Tracing ` +// :ref:`provider ` // field. type Tracing_Http struct { state protoimpl.MessageState @@ -98,28 +92,14 @@ type Tracing_Http struct { unknownFields protoimpl.UnknownFields // The name of the HTTP trace driver to instantiate. The name must match a - // supported HTTP trace driver. Built-in trace drivers: - // - // - *envoy.tracers.lightstep* - // - *envoy.tracers.zipkin* - // - *envoy.tracers.dynamic_ot* - // - *envoy.tracers.datadog* - // - *envoy.tracers.opencensus* - // - *envoy.tracers.xray* + // supported HTTP trace driver. + // See the :ref:`extensions listed in typed_config below ` for the default list of the HTTP trace driver. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Trace driver specific configuration which depends on the driver being instantiated. - // See the trace drivers for examples: - // - // - :ref:`LightstepConfig ` - // - :ref:`ZipkinConfig ` - // - :ref:`DynamicOtConfig ` - // - :ref:`DatadogConfig ` - // - :ref:`OpenCensusConfig ` - // - :ref:`AWS X-Ray ` + // Trace driver specific configuration which must be set according to the driver being instantiated. + // [#extension-category: envoy.tracers] // // Types that are assignable to ConfigType: // *Tracing_Http_TypedConfig - // *Tracing_Http_HiddenEnvoyDeprecatedConfig ConfigType isTracing_Http_ConfigType `protobuf_oneof:"config_type"` } @@ -176,14 +156,6 @@ func (x *Tracing_Http) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *Tracing_Http) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*Tracing_Http_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isTracing_Http_ConfigType interface { isTracing_Http_ConfigType() } @@ -192,15 +164,8 @@ type Tracing_Http_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type Tracing_Http_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*Tracing_Http_TypedConfig) isTracing_Http_ConfigType() {} -func (*Tracing_Http_HiddenEnvoyDeprecatedConfig) isTracing_Http_ConfigType() {} - var File_envoy_config_trace_v3_http_tracer_proto protoreflect.FileDescriptor var file_envoy_config_trace_v3_http_tracer_proto_rawDesc = []byte{ @@ -209,42 +174,39 @@ var file_envoy_config_trace_v3_http_tracer_proto_rawDesc = []byte{ 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x02, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, - 0x12, 0x37, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0xfc, 0x01, 0x0a, 0x04, 0x48, 0x74, - 0x74, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, - 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, - 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x29, - 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, - 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x40, - 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x02, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x12, 0x37, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0xa6, 0x01, 0x0a, 0x04, + 0x48, 0x74, 0x74, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, + 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x29, 0x9a, 0xc5, + 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x86, 0x01, 0x0a, 0x23, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, + 0x76, 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x63, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -261,20 +223,18 @@ func file_envoy_config_trace_v3_http_tracer_proto_rawDescGZIP() []byte { var file_envoy_config_trace_v3_http_tracer_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_envoy_config_trace_v3_http_tracer_proto_goTypes = []interface{}{ - (*Tracing)(nil), // 0: envoy.config.trace.v3.Tracing - (*Tracing_Http)(nil), // 1: envoy.config.trace.v3.Tracing.Http - (*any.Any)(nil), // 2: google.protobuf.Any - (*_struct.Struct)(nil), // 3: google.protobuf.Struct + (*Tracing)(nil), // 0: envoy.config.trace.v3.Tracing + (*Tracing_Http)(nil), // 1: envoy.config.trace.v3.Tracing.Http + (*any.Any)(nil), // 2: google.protobuf.Any } var file_envoy_config_trace_v3_http_tracer_proto_depIdxs = []int32{ 1, // 0: envoy.config.trace.v3.Tracing.http:type_name -> envoy.config.trace.v3.Tracing.Http 2, // 1: envoy.config.trace.v3.Tracing.Http.typed_config:type_name -> google.protobuf.Any - 3, // 2: envoy.config.trace.v3.Tracing.Http.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_envoy_config_trace_v3_http_tracer_proto_init() } @@ -310,7 +270,6 @@ func file_envoy_config_trace_v3_http_tracer_proto_init() { } file_envoy_config_trace_v3_http_tracer_proto_msgTypes[1].OneofWrappers = []interface{}{ (*Tracing_Http_TypedConfig)(nil), - (*Tracing_Http_HiddenEnvoyDeprecatedConfig)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/api/envoy/config/trace/v3/http_tracer.pb.validate.go b/pkg/api/envoy/config/trace/v3/http_tracer.pb.validate.go index 1ec3611c12..01ab45a2be 100644 --- a/pkg/api/envoy/config/trace/v3/http_tracer.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/http_tracer.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/http_tracer.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Tracing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tracing with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TracingMultiError, or nil if none found. +func (m *Tracing) ValidateAll() error { + return m.validate(true) +} + +func (m *Tracing) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TracingValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TracingValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "Http", @@ -50,9 +85,29 @@ func (m *Tracing) Validate() error { } } + if len(errors) > 0 { + return TracingMultiError(errors) + } + return nil } +// TracingMultiError is an error wrapping multiple validation errors returned +// by Tracing.ValidateAll() if the designated constraints aren't met. +type TracingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TracingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TracingMultiError) AllErrors() []error { return m } + // TracingValidationError is the validation error returned by Tracing.Validate // if the designated constraints aren't met. type TracingValidationError struct { @@ -108,40 +163,65 @@ var _ interface { } = TracingValidationError{} // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Tracing_Http) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tracing_Http with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Tracing_HttpMultiError, or +// nil if none found. +func (m *Tracing_Http) ValidateAll() error { + return m.validate(true) +} + +func (m *Tracing_Http) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return Tracing_HttpValidationError{ + err := Tracing_HttpValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Tracing_HttpValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Tracing_HttpValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *Tracing_Http_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Tracing_HttpValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -150,9 +230,29 @@ func (m *Tracing_Http) Validate() error { } + if len(errors) > 0 { + return Tracing_HttpMultiError(errors) + } + return nil } +// Tracing_HttpMultiError is an error wrapping multiple validation errors +// returned by Tracing_Http.ValidateAll() if the designated constraints aren't met. +type Tracing_HttpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Tracing_HttpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Tracing_HttpMultiError) AllErrors() []error { return m } + // Tracing_HttpValidationError is the validation error returned by // Tracing_Http.Validate if the designated constraints aren't met. type Tracing_HttpValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/lightstep.pb.go b/pkg/api/envoy/config/trace/v3/lightstep.pb.go index a00d7cf418..6e3c9e2116 100644 --- a/pkg/api/envoy/config/trace/v3/lightstep.pb.go +++ b/pkg/api/envoy/config/trace/v3/lightstep.pb.go @@ -1,15 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/lightstep.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Available propagation modes type LightstepConfig_PropagationMode int32 @@ -95,7 +92,11 @@ type LightstepConfig struct { CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` // File containing the access token to the `LightStep // `_ API. + // + // Deprecated: Do not use. AccessTokenFile string `protobuf:"bytes,2,opt,name=access_token_file,json=accessTokenFile,proto3" json:"access_token_file,omitempty"` + // Access token to the `LightStep `_ API. + AccessToken *v3.DataSource `protobuf:"bytes,4,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // Propagation modes to use by LightStep's tracer. PropagationModes []LightstepConfig_PropagationMode `protobuf:"varint,3,rep,packed,name=propagation_modes,json=propagationModes,proto3,enum=envoy.config.trace.v3.LightstepConfig_PropagationMode" json:"propagation_modes,omitempty"` } @@ -139,6 +140,7 @@ func (x *LightstepConfig) GetCollectorCluster() string { return "" } +// Deprecated: Do not use. func (x *LightstepConfig) GetAccessTokenFile() string { if x != nil { return x.AccessTokenFile @@ -146,6 +148,13 @@ func (x *LightstepConfig) GetAccessTokenFile() string { return "" } +func (x *LightstepConfig) GetAccessToken() *v3.DataSource { + if x != nil { + return x.AccessToken + } + return nil +} + func (x *LightstepConfig) GetPropagationModes() []LightstepConfig_PropagationMode { if x != nil { return x.PropagationModes @@ -159,45 +168,59 @@ var file_envoy_config_trace_v3_lightstep_proto_rawDesc = []byte{ 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1e, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x02, 0x0a, 0x0f, 0x4c, 0x69, - 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, - 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x72, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, - 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x67, 0x68, - 0x74, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, - 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x0d, 0xfa, 0x42, 0x0a, - 0x92, 0x01, 0x07, 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70, - 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x0f, - 0x50, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x09, 0x0a, 0x05, 0x45, 0x4e, 0x56, 0x4f, 0x59, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x49, - 0x47, 0x48, 0x54, 0x53, 0x54, 0x45, 0x50, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x42, 0x33, 0x10, - 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, - 0x58, 0x54, 0x10, 0x03, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x71, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xaf, 0x03, 0x0a, 0x0f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x11, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, + 0x30, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x69, + 0x6c, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x72, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x61, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x61, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x92, + 0x01, 0x07, 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x61, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x0f, 0x50, + 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, + 0x0a, 0x05, 0x45, 0x4e, 0x56, 0x4f, 0x59, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x49, 0x47, + 0x48, 0x54, 0x53, 0x54, 0x45, 0x50, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x42, 0x33, 0x10, 0x02, + 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, + 0x54, 0x10, 0x03, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0xb7, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, - 0x73, 0x74, 0x65, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, - 0x74, 0x73, 0x74, 0x65, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x65, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, + 0x33, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, + 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -217,14 +240,16 @@ var file_envoy_config_trace_v3_lightstep_proto_msgTypes = make([]protoimpl.Messa var file_envoy_config_trace_v3_lightstep_proto_goTypes = []interface{}{ (LightstepConfig_PropagationMode)(0), // 0: envoy.config.trace.v3.LightstepConfig.PropagationMode (*LightstepConfig)(nil), // 1: envoy.config.trace.v3.LightstepConfig + (*v3.DataSource)(nil), // 2: envoy.config.core.v3.DataSource } var file_envoy_config_trace_v3_lightstep_proto_depIdxs = []int32{ - 0, // 0: envoy.config.trace.v3.LightstepConfig.propagation_modes:type_name -> envoy.config.trace.v3.LightstepConfig.PropagationMode - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: envoy.config.trace.v3.LightstepConfig.access_token:type_name -> envoy.config.core.v3.DataSource + 0, // 1: envoy.config.trace.v3.LightstepConfig.propagation_modes:type_name -> envoy.config.trace.v3.LightstepConfig.PropagationMode + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_envoy_config_trace_v3_lightstep_proto_init() } diff --git a/pkg/api/envoy/config/trace/v3/lightstep.pb.validate.go b/pkg/api/envoy/config/trace/v3/lightstep.pb.validate.go index 422ef89f5c..e4602a3b87 100644 --- a/pkg/api/envoy/config/trace/v3/lightstep.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/lightstep.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/lightstep.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,71 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LightstepConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LightstepConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LightstepConfigMultiError, or nil if none found. +func (m *LightstepConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *LightstepConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCollectorCluster()) < 1 { - return LightstepConfigValidationError{ + err := LightstepConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if utf8.RuneCountInString(m.GetAccessTokenFile()) < 1 { - return LightstepConfigValidationError{ - field: "AccessTokenFile", - reason: "value length must be at least 1 runes", + // no validation rules for AccessTokenFile + + if all { + switch v := interface{}(m.GetAccessToken()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LightstepConfigValidationError{ + field: "AccessToken", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LightstepConfigValidationError{ + field: "AccessToken", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAccessToken()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LightstepConfigValidationError{ + field: "AccessToken", + reason: "embedded message failed validation", + cause: err, + } } } @@ -59,17 +103,42 @@ func (m *LightstepConfig) Validate() error { _, _ = idx, item if _, ok := LightstepConfig_PropagationMode_name[int32(item)]; !ok { - return LightstepConfigValidationError{ + err := LightstepConfigValidationError{ field: fmt.Sprintf("PropagationModes[%v]", idx), reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return LightstepConfigMultiError(errors) + } + return nil } +// LightstepConfigMultiError is an error wrapping multiple validation errors +// returned by LightstepConfig.ValidateAll() if the designated constraints +// aren't met. +type LightstepConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LightstepConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LightstepConfigMultiError) AllErrors() []error { return m } + // LightstepConfigValidationError is the validation error returned by // LightstepConfig.Validate if the designated constraints aren't met. type LightstepConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/opencensus.pb.go b/pkg/api/envoy/config/trace/v3/opencensus.pb.go index 0f18f09c91..1b7a281001 100644 --- a/pkg/api/envoy/config/trace/v3/opencensus.pb.go +++ b/pkg/api/envoy/config/trace/v3/opencensus.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/opencensus.proto -package envoy_config_trace_v3 +package tracev3 import ( v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OpenCensusConfig_TraceContext int32 const ( @@ -282,89 +277,95 @@ var file_envoy_config_trace_v3_opencensus_proto_rawDesc = []byte{ 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa1, 0x08, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, - 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x1a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, - 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x5b, 0x0a, 0x18, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x16, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, - 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x3a, 0x0a, 0x17, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x15, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0a, 0x7a, - 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x09, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x38, - 0x0a, 0x18, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x16, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x63, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x53, 0x0a, 0x14, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x12, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x69, 0x6e, - 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x6a, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, - 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x60, - 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x08, - 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x43, - 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x47, - 0x52, 0x50, 0x43, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x10, 0x02, 0x12, - 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, - 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x42, 0x33, 0x10, 0x04, - 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, - 0x04, 0x08, 0x07, 0x10, 0x08, 0x42, 0x73, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4f, 0x70, - 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x08, + 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, + 0x17, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, + 0x13, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5b, + 0x0a, 0x18, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x16, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x17, 0x7a, + 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x15, 0x7a, 0x69, 0x70, 0x6b, 0x69, + 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x2a, 0x0a, 0x0a, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, + 0x30, 0x52, 0x09, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x38, 0x0a, 0x18, + 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, + 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x53, 0x0a, 0x14, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x12, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6f, + 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x12, 0x6a, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x60, 0x0a, 0x0c, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x08, 0x0a, 0x04, + 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, + 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x52, 0x50, + 0x43, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, + 0x13, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, + 0x54, 0x45, 0x58, 0x54, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x42, 0x33, 0x10, 0x04, 0x3a, 0x2d, + 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, + 0x07, 0x10, 0x08, 0x42, 0xb9, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4f, 0x70, 0x65, + 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x76, 0x33, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, + 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v3/opencensus.pb.validate.go b/pkg/api/envoy/config/trace/v3/opencensus.pb.validate.go index a2ba682621..7b7a991133 100644 --- a/pkg/api/envoy/config/trace/v3/opencensus.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/opencensus.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/opencensus.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *OpenCensusConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OpenCensusConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OpenCensusConfigMultiError, or nil if none found. +func (m *OpenCensusConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OpenCensusConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTraceConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTraceConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "TraceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "TraceConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTraceConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OpenCensusConfigValidationError{ field: "TraceConfig", @@ -59,7 +94,26 @@ func (m *OpenCensusConfig) Validate() error { // no validation rules for StackdriverAddress - if v, ok := interface{}(m.GetStackdriverGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStackdriverGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "StackdriverGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "StackdriverGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStackdriverGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OpenCensusConfigValidationError{ field: "StackdriverGrpcService", @@ -77,7 +131,26 @@ func (m *OpenCensusConfig) Validate() error { // no validation rules for OcagentAddress - if v, ok := interface{}(m.GetOcagentGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOcagentGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "OcagentGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenCensusConfigValidationError{ + field: "OcagentGrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOcagentGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OpenCensusConfigValidationError{ field: "OcagentGrpcService", @@ -87,9 +160,30 @@ func (m *OpenCensusConfig) Validate() error { } } + if len(errors) > 0 { + return OpenCensusConfigMultiError(errors) + } + return nil } +// OpenCensusConfigMultiError is an error wrapping multiple validation errors +// returned by OpenCensusConfig.ValidateAll() if the designated constraints +// aren't met. +type OpenCensusConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OpenCensusConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OpenCensusConfigMultiError) AllErrors() []error { return m } + // OpenCensusConfigValidationError is the validation error returned by // OpenCensusConfig.Validate if the designated constraints aren't met. type OpenCensusConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/service.pb.go b/pkg/api/envoy/config/trace/v3/service.pb.go index 19de6182e7..1080e37c2d 100644 --- a/pkg/api/envoy/config/trace/v3/service.pb.go +++ b/pkg/api/envoy/config/trace/v3/service.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/service.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration structure. type TraceServiceConfig struct { state protoimpl.MessageState @@ -101,11 +96,16 @@ var file_envoy_config_trace_v3_service_proto_rawDesc = []byte{ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x3d, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, - 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x83, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, + 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v3/service.pb.validate.go b/pkg/api/envoy/config/trace/v3/service.pb.validate.go index 4c5128a98c..628a189dcd 100644 --- a/pkg/api/envoy/config/trace/v3/service.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/service.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TraceServiceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TraceServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TraceServiceConfigMultiError, or nil if none found. +func (m *TraceServiceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TraceServiceConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetGrpcService() == nil { - return TraceServiceConfigValidationError{ + err := TraceServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceServiceConfigValidationError{ field: "GrpcService", @@ -58,9 +97,30 @@ func (m *TraceServiceConfig) Validate() error { } } + if len(errors) > 0 { + return TraceServiceConfigMultiError(errors) + } + return nil } +// TraceServiceConfigMultiError is an error wrapping multiple validation errors +// returned by TraceServiceConfig.ValidateAll() if the designated constraints +// aren't met. +type TraceServiceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TraceServiceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TraceServiceConfigMultiError) AllErrors() []error { return m } + // TraceServiceConfigValidationError is the validation error returned by // TraceServiceConfig.Validate if the designated constraints aren't met. type TraceServiceConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/skywalking.pb.go b/pkg/api/envoy/config/trace/v3/skywalking.pb.go index 098ec9a9fe..40111aa470 100644 --- a/pkg/api/envoy/config/trace/v3/skywalking.pb.go +++ b/pkg/api/envoy/config/trace/v3/skywalking.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/skywalking.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the SkyWalking tracer. Please note that if SkyWalking tracer is used as the // provider of http tracer, then // :ref:`start_child_span ` @@ -218,44 +213,46 @@ var file_envoy_config_trace_v3_skywalking_proto_rawDesc = []byte{ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x53, 0x6b, 0x79, 0x57, 0x61, 0x6c, - 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe4, 0x01, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, - 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x0c, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x42, 0x0a, 0x0e, - 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x42, 0x19, 0x0a, 0x17, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x73, 0x0a, 0x23, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x0f, 0x53, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, 0x2b, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x10, 0x53, 0x6b, 0x79, 0x57, 0x61, 0x6c, 0x6b, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0xe4, 0x01, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x0d, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x42, 0x0a, 0x0e, 0x6d, 0x61, 0x78, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x19, 0x0a, + 0x17, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0xb9, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, + 0x42, 0x0f, 0x53, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, + 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2d, 0x12, + 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x6b, 0x79, 0x77, 0x61, 0x6c, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v3/skywalking.pb.validate.go b/pkg/api/envoy/config/trace/v3/skywalking.pb.validate.go index 1ad7697a17..de795fce6d 100644 --- a/pkg/api/envoy/config/trace/v3/skywalking.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/skywalking.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/skywalking.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SkyWalkingConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SkyWalkingConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SkyWalkingConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SkyWalkingConfigMultiError, or nil if none found. +func (m *SkyWalkingConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SkyWalkingConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetGrpcService() == nil { - return SkyWalkingConfigValidationError{ + err := SkyWalkingConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SkyWalkingConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SkyWalkingConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SkyWalkingConfigValidationError{ field: "GrpcService", @@ -58,7 +97,26 @@ func (m *SkyWalkingConfig) Validate() error { } } - if v, ok := interface{}(m.GetClientConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClientConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SkyWalkingConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SkyWalkingConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClientConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SkyWalkingConfigValidationError{ field: "ClientConfig", @@ -68,9 +126,30 @@ func (m *SkyWalkingConfig) Validate() error { } } + if len(errors) > 0 { + return SkyWalkingConfigMultiError(errors) + } + return nil } +// SkyWalkingConfigMultiError is an error wrapping multiple validation errors +// returned by SkyWalkingConfig.ValidateAll() if the designated constraints +// aren't met. +type SkyWalkingConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SkyWalkingConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SkyWalkingConfigMultiError) AllErrors() []error { return m } + // SkyWalkingConfigValidationError is the validation error returned by // SkyWalkingConfig.Validate if the designated constraints aren't met. type SkyWalkingConfigValidationError struct { @@ -126,18 +205,51 @@ var _ interface { } = SkyWalkingConfigValidationError{} // Validate checks the field values on ClientConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClientConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClientConfigMultiError, or +// nil if none found. +func (m *ClientConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ServiceName // no validation rules for InstanceName - if v, ok := interface{}(m.GetMaxCacheSize()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxCacheSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "MaxCacheSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "MaxCacheSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxCacheSize()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientConfigValidationError{ field: "MaxCacheSize", @@ -154,9 +266,29 @@ func (m *ClientConfig) Validate() error { } + if len(errors) > 0 { + return ClientConfigMultiError(errors) + } + return nil } +// ClientConfigMultiError is an error wrapping multiple validation errors +// returned by ClientConfig.ValidateAll() if the designated constraints aren't met. +type ClientConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientConfigMultiError) AllErrors() []error { return m } + // ClientConfigValidationError is the validation error returned by // ClientConfig.Validate if the designated constraints aren't met. type ClientConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/trace.pb.go b/pkg/api/envoy/config/trace/v3/trace.pb.go index 016af4f57e..2e1921c2c8 100644 --- a/pkg/api/envoy/config/trace/v3/trace.pb.go +++ b/pkg/api/envoy/config/trace/v3/trace.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/trace.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,41 +19,39 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_config_trace_v3_trace_proto protoreflect.FileDescriptor var file_envoy_config_trace_v3_trace_proto_rawDesc = []byte{ 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6f, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x7a, 0x69, 0x70, 0x6b, 0x69, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x33, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x50, 0x01, 0x50, 0x02, - 0x50, 0x03, 0x50, 0x04, 0x50, 0x05, 0x50, 0x06, 0x50, 0x07, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6f, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x7a, 0x69, 0x70, 0x6b, + 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x79, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, + 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x76, 0x33, 0x50, 0x00, 0x50, 0x01, 0x50, 0x02, 0x50, 0x03, 0x50, 0x04, 0x50, 0x05, 0x50, + 0x06, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_config_trace_v3_trace_proto_goTypes = []interface{}{} diff --git a/pkg/api/envoy/config/trace/v3/trace.pb.validate.go b/pkg/api/envoy/config/trace/v3/trace.pb.validate.go index f12dba065e..806c2c1ff9 100644 --- a/pkg/api/envoy/config/trace/v3/trace.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/trace.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/trace.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/config/trace/v3/xray.pb.go b/pkg/api/envoy/config/trace/v3/xray.pb.go index 6de28c6d6a..c1386e7dee 100644 --- a/pkg/api/envoy/config/trace/v3/xray.pb.go +++ b/pkg/api/envoy/config/trace/v3/xray.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/xray.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - +// [#extension: envoy.tracers.xray] type XRayConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -216,14 +212,18 @@ var file_envoy_config_trace_v3_xray_proto_rawDesc = []byte{ 0x03, 0x61, 0x77, 0x73, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x58, 0x52, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x67, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x58, 0x72, 0x61, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x27, 0x12, 0x25, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x42, 0xad, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x58, 0x72, 0x61, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0xf2, 0x98, 0xfe, + 0x8f, 0x05, 0x27, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x78, 0x72, + 0x61, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v3/xray.pb.validate.go b/pkg/api/envoy/config/trace/v3/xray.pb.validate.go index 6c3010247f..bf9abc48e2 100644 --- a/pkg/api/envoy/config/trace/v3/xray.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/xray.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/xray.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on XRayConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *XRayConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on XRayConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in XRayConfigMultiError, or +// nil if none found. +func (m *XRayConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *XRayConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDaemonEndpoint()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetDaemonEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "DaemonEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "DaemonEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDaemonEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return XRayConfigValidationError{ field: "DaemonEndpoint", @@ -51,13 +87,36 @@ func (m *XRayConfig) Validate() error { } if utf8.RuneCountInString(m.GetSegmentName()) < 1 { - return XRayConfigValidationError{ + err := XRayConfigValidationError{ field: "SegmentName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSamplingRuleManifest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSamplingRuleManifest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "SamplingRuleManifest", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "SamplingRuleManifest", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSamplingRuleManifest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return XRayConfigValidationError{ field: "SamplingRuleManifest", @@ -67,7 +126,26 @@ func (m *XRayConfig) Validate() error { } } - if v, ok := interface{}(m.GetSegmentFields()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSegmentFields()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "SegmentFields", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, XRayConfigValidationError{ + field: "SegmentFields", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSegmentFields()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return XRayConfigValidationError{ field: "SegmentFields", @@ -77,9 +155,29 @@ func (m *XRayConfig) Validate() error { } } + if len(errors) > 0 { + return XRayConfigMultiError(errors) + } + return nil } +// XRayConfigMultiError is an error wrapping multiple validation errors +// returned by XRayConfig.ValidateAll() if the designated constraints aren't met. +type XRayConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m XRayConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m XRayConfigMultiError) AllErrors() []error { return m } + // XRayConfigValidationError is the validation error returned by // XRayConfig.Validate if the designated constraints aren't met. type XRayConfigValidationError struct { @@ -136,15 +234,48 @@ var _ interface { // Validate checks the field values on XRayConfig_SegmentFields with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *XRayConfig_SegmentFields) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on XRayConfig_SegmentFields with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// XRayConfig_SegmentFieldsMultiError, or nil if none found. +func (m *XRayConfig_SegmentFields) ValidateAll() error { + return m.validate(true) +} + +func (m *XRayConfig_SegmentFields) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Origin - if v, ok := interface{}(m.GetAws()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAws()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, XRayConfig_SegmentFieldsValidationError{ + field: "Aws", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, XRayConfig_SegmentFieldsValidationError{ + field: "Aws", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAws()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return XRayConfig_SegmentFieldsValidationError{ field: "Aws", @@ -154,9 +285,30 @@ func (m *XRayConfig_SegmentFields) Validate() error { } } + if len(errors) > 0 { + return XRayConfig_SegmentFieldsMultiError(errors) + } + return nil } +// XRayConfig_SegmentFieldsMultiError is an error wrapping multiple validation +// errors returned by XRayConfig_SegmentFields.ValidateAll() if the designated +// constraints aren't met. +type XRayConfig_SegmentFieldsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m XRayConfig_SegmentFieldsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m XRayConfig_SegmentFieldsMultiError) AllErrors() []error { return m } + // XRayConfig_SegmentFieldsValidationError is the validation error returned by // XRayConfig_SegmentFields.Validate if the designated constraints aren't met. type XRayConfig_SegmentFieldsValidationError struct { diff --git a/pkg/api/envoy/config/trace/v3/zipkin.pb.go b/pkg/api/envoy/config/trace/v3/zipkin.pb.go index 9b73e14085..458578eb06 100644 --- a/pkg/api/envoy/config/trace/v3/zipkin.pb.go +++ b/pkg/api/envoy/config/trace/v3/zipkin.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/trace/v3/zipkin.proto -package envoy_config_trace_v3 +package tracev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Available Zipkin collector endpoint versions. type ZipkinConfig_CollectorEndpointVersion int32 @@ -42,7 +37,7 @@ const ( // since in Zipkin realm this v1 version is considered to be not preferable anymore.] // // Deprecated: Do not use. - ZipkinConfig_hidden_envoy_deprecated_HTTP_JSON_V1 ZipkinConfig_CollectorEndpointVersion = 0 + ZipkinConfig_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE ZipkinConfig_CollectorEndpointVersion = 0 // Zipkin API v2, JSON over HTTP. ZipkinConfig_HTTP_JSON ZipkinConfig_CollectorEndpointVersion = 1 // Zipkin API v2, protobuf over HTTP. @@ -54,16 +49,16 @@ const ( // Enum value maps for ZipkinConfig_CollectorEndpointVersion. var ( ZipkinConfig_CollectorEndpointVersion_name = map[int32]string{ - 0: "hidden_envoy_deprecated_HTTP_JSON_V1", + 0: "DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE", 1: "HTTP_JSON", 2: "HTTP_PROTO", 3: "GRPC", } ZipkinConfig_CollectorEndpointVersion_value = map[string]int32{ - "hidden_envoy_deprecated_HTTP_JSON_V1": 0, - "HTTP_JSON": 1, - "HTTP_PROTO": 2, - "GRPC": 3, + "DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE": 0, + "HTTP_JSON": 1, + "HTTP_PROTO": 2, + "GRPC": 3, } ) @@ -105,8 +100,7 @@ type ZipkinConfig struct { // The cluster manager cluster that hosts the Zipkin collectors. CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` // The API endpoint of the Zipkin service where the spans will be sent. When - // using a standard Zipkin installation, the API endpoint is typically - // /api/v1/spans, which is the default value. + // using a standard Zipkin installation. CollectorEndpoint string `protobuf:"bytes,2,opt,name=collector_endpoint,json=collectorEndpoint,proto3" json:"collector_endpoint,omitempty"` // Determines whether a 128bit trace id will be used when creating a new // trace instance. The default value is false, which will result in a 64 bit trace id being used. @@ -114,8 +108,7 @@ type ZipkinConfig struct { // Determines whether client and server spans will share the same span context. // The default value is true. SharedSpanContext *wrappers.BoolValue `protobuf:"bytes,4,opt,name=shared_span_context,json=sharedSpanContext,proto3" json:"shared_span_context,omitempty"` - // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be - // used. + // Determines the selected collector endpoint version. CollectorEndpointVersion ZipkinConfig_CollectorEndpointVersion `protobuf:"varint,5,opt,name=collector_endpoint_version,json=collectorEndpointVersion,proto3,enum=envoy.config.trace.v3.ZipkinConfig_CollectorEndpointVersion" json:"collector_endpoint_version,omitempty"` // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors // that require a specific hostname. Defaults to :ref:`collector_cluster ` above. @@ -186,7 +179,7 @@ func (x *ZipkinConfig) GetCollectorEndpointVersion() ZipkinConfig_CollectorEndpo if x != nil { return x.CollectorEndpointVersion } - return ZipkinConfig_hidden_envoy_deprecated_HTTP_JSON_V1 + return ZipkinConfig_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE } func (x *ZipkinConfig) GetCollectorHostname() string { @@ -214,7 +207,7 @@ var file_envoy_config_trace_v3_zipkin_proto_rawDesc = []byte{ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x04, 0x0a, 0x0c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x04, 0x0a, 0x0c, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, @@ -240,25 +233,29 @@ var file_envoy_config_trace_v3_zipkin_proto_rawDesc = []byte{ 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x77, 0x0a, 0x18, 0x43, 0x6f, 0x6c, + 0x72, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x18, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x56, 0x31, 0x10, 0x00, 0x1a, - 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x54, 0x54, - 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, - 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, - 0x10, 0x03, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6b, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x72, 0x73, 0x2e, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x25, 0x44, 0x45, 0x50, 0x52, 0x45, 0x43, 0x41, + 0x54, 0x45, 0x44, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, + 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, + 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x54, + 0x54, 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x54, 0x54, + 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x52, 0x50, + 0x43, 0x10, 0x03, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xb1, + 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0xf2, 0x98, 0xfe, 0x8f, 0x05, + 0x29, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x7a, 0x69, 0x70, 0x6b, + 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/trace/v3/zipkin.pb.validate.go b/pkg/api/envoy/config/trace/v3/zipkin.pb.validate.go index ac3b486dab..dac52cea8c 100644 --- a/pkg/api/envoy/config/trace/v3/zipkin.pb.validate.go +++ b/pkg/api/envoy/config/trace/v3/zipkin.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/trace/v3/zipkin.proto -package envoy_config_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,76 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ZipkinConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ZipkinConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ZipkinConfigMultiError, or +// nil if none found. +func (m *ZipkinConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ZipkinConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCollectorCluster()) < 1 { - return ZipkinConfigValidationError{ + err := ZipkinConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetCollectorEndpoint()) < 1 { - return ZipkinConfigValidationError{ + err := ZipkinConfigValidationError{ field: "CollectorEndpoint", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for TraceId_128Bit - if v, ok := interface{}(m.GetSharedSpanContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSharedSpanContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZipkinConfigValidationError{ + field: "SharedSpanContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZipkinConfigValidationError{ + field: "SharedSpanContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSharedSpanContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZipkinConfigValidationError{ field: "SharedSpanContext", @@ -71,9 +114,29 @@ func (m *ZipkinConfig) Validate() error { // no validation rules for CollectorHostname + if len(errors) > 0 { + return ZipkinConfigMultiError(errors) + } + return nil } +// ZipkinConfigMultiError is an error wrapping multiple validation errors +// returned by ZipkinConfig.ValidateAll() if the designated constraints aren't met. +type ZipkinConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZipkinConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZipkinConfigMultiError) AllErrors() []error { return m } + // ZipkinConfigValidationError is the validation error returned by // ZipkinConfig.Validate if the designated constraints aren't met. type ZipkinConfigValidationError struct { diff --git a/pkg/api/envoy/config/trace/v4alpha/http_tracer.pb.go b/pkg/api/envoy/config/trace/v4alpha/http_tracer.pb.go deleted file mode 100644 index a86f5d2c1b..0000000000 --- a/pkg/api/envoy/config/trace/v4alpha/http_tracer.pb.go +++ /dev/null @@ -1,310 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/trace/v4alpha/http_tracer.proto - -package envoy_config_trace_v4alpha - -import ( - _ "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" - _ "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy. -// -// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one -// supported. -// -// .. attention:: -// -// Use of this message type has been deprecated in favor of direct use of -// :ref:`Tracing.Http `. -type Tracing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Provides configuration for the HTTP tracer. - Http *Tracing_Http `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"` -} - -func (x *Tracing) Reset() { - *x = Tracing{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tracing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tracing) ProtoMessage() {} - -func (x *Tracing) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tracing.ProtoReflect.Descriptor instead. -func (*Tracing) Descriptor() ([]byte, []int) { - return file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescGZIP(), []int{0} -} - -func (x *Tracing) GetHttp() *Tracing_Http { - if x != nil { - return x.Http - } - return nil -} - -// Configuration for an HTTP tracer provider used by Envoy. -// -// The configuration is defined by the -// :ref:`HttpConnectionManager.Tracing ` -// :ref:`provider ` -// field. -type Tracing_Http struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the HTTP trace driver to instantiate. The name must match a - // supported HTTP trace driver. Built-in trace drivers: - // - // - *envoy.tracers.lightstep* - // - *envoy.tracers.zipkin* - // - *envoy.tracers.dynamic_ot* - // - *envoy.tracers.datadog* - // - *envoy.tracers.opencensus* - // - *envoy.tracers.xray* - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Trace driver specific configuration which depends on the driver being instantiated. - // See the trace drivers for examples: - // - // - :ref:`LightstepConfig ` - // - :ref:`ZipkinConfig ` - // - :ref:`DynamicOtConfig ` - // - :ref:`DatadogConfig ` - // - :ref:`OpenCensusConfig ` - // - :ref:`AWS X-Ray ` - // - // Types that are assignable to ConfigType: - // *Tracing_Http_TypedConfig - ConfigType isTracing_Http_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *Tracing_Http) Reset() { - *x = Tracing_Http{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tracing_Http) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tracing_Http) ProtoMessage() {} - -func (x *Tracing_Http) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tracing_Http.ProtoReflect.Descriptor instead. -func (*Tracing_Http) Descriptor() ([]byte, []int) { - return file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Tracing_Http) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *Tracing_Http) GetConfigType() isTracing_Http_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *Tracing_Http) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*Tracing_Http_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isTracing_Http_ConfigType interface { - isTracing_Http_ConfigType() -} - -type Tracing_Http_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*Tracing_Http_TypedConfig) isTracing_Http_ConfigType() {} - -var File_envoy_config_trace_v4alpha_http_tracer_proto protoreflect.FileDescriptor - -var file_envoy_config_trace_v4alpha_http_tracer_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, - 0x02, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x04, 0x68, 0x74, - 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0xa6, 0x01, 0x0a, 0x04, 0x48, 0x74, 0x74, - 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x45, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x63, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescOnce sync.Once - file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescData = file_envoy_config_trace_v4alpha_http_tracer_proto_rawDesc -) - -func file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescGZIP() []byte { - file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescOnce.Do(func() { - file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescData) - }) - return file_envoy_config_trace_v4alpha_http_tracer_proto_rawDescData -} - -var file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_trace_v4alpha_http_tracer_proto_goTypes = []interface{}{ - (*Tracing)(nil), // 0: envoy.config.trace.v4alpha.Tracing - (*Tracing_Http)(nil), // 1: envoy.config.trace.v4alpha.Tracing.Http - (*any.Any)(nil), // 2: google.protobuf.Any -} -var file_envoy_config_trace_v4alpha_http_tracer_proto_depIdxs = []int32{ - 1, // 0: envoy.config.trace.v4alpha.Tracing.http:type_name -> envoy.config.trace.v4alpha.Tracing.Http - 2, // 1: envoy.config.trace.v4alpha.Tracing.Http.typed_config:type_name -> google.protobuf.Any - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_trace_v4alpha_http_tracer_proto_init() } -func file_envoy_config_trace_v4alpha_http_tracer_proto_init() { - if File_envoy_config_trace_v4alpha_http_tracer_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tracing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tracing_Http); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Tracing_Http_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_trace_v4alpha_http_tracer_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_trace_v4alpha_http_tracer_proto_goTypes, - DependencyIndexes: file_envoy_config_trace_v4alpha_http_tracer_proto_depIdxs, - MessageInfos: file_envoy_config_trace_v4alpha_http_tracer_proto_msgTypes, - }.Build() - File_envoy_config_trace_v4alpha_http_tracer_proto = out.File - file_envoy_config_trace_v4alpha_http_tracer_proto_rawDesc = nil - file_envoy_config_trace_v4alpha_http_tracer_proto_goTypes = nil - file_envoy_config_trace_v4alpha_http_tracer_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/trace/v4alpha/http_tracer.pb.validate.go b/pkg/api/envoy/config/trace/v4alpha/http_tracer.pb.validate.go deleted file mode 100644 index 20d40394b3..0000000000 --- a/pkg/api/envoy/config/trace/v4alpha/http_tracer.pb.validate.go +++ /dev/null @@ -1,196 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/trace/v4alpha/http_tracer.proto - -package envoy_config_trace_v4alpha - -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{} -) - -// 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 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 utf8.RuneCountInString(m.GetName()) < 1 { - return Tracing_HttpValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - 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/pkg/api/envoy/config/trace/v4alpha/service.pb.go b/pkg/api/envoy/config/trace/v4alpha/service.pb.go deleted file mode 100644 index e1342b1a8c..0000000000 --- a/pkg/api/envoy/config/trace/v4alpha/service.pb.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/config/trace/v4alpha/service.proto - -package envoy_config_trace_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration structure. -type TraceServiceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The upstream gRPC cluster that hosts the metrics service. - GrpcService *v4alpha.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` -} - -func (x *TraceServiceConfig) Reset() { - *x = TraceServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_trace_v4alpha_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TraceServiceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TraceServiceConfig) ProtoMessage() {} - -func (x *TraceServiceConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_trace_v4alpha_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TraceServiceConfig.ProtoReflect.Descriptor instead. -func (*TraceServiceConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_trace_v4alpha_service_proto_rawDescGZIP(), []int{0} -} - -func (x *TraceServiceConfig) GetGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -var File_envoy_config_trace_v4alpha_service_proto protoreflect.FileDescriptor - -var file_envoy_config_trace_v4alpha_service_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x9a, 0x01, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, - 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, - 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x42, 0x0a, 0x28, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_trace_v4alpha_service_proto_rawDescOnce sync.Once - file_envoy_config_trace_v4alpha_service_proto_rawDescData = file_envoy_config_trace_v4alpha_service_proto_rawDesc -) - -func file_envoy_config_trace_v4alpha_service_proto_rawDescGZIP() []byte { - file_envoy_config_trace_v4alpha_service_proto_rawDescOnce.Do(func() { - file_envoy_config_trace_v4alpha_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_trace_v4alpha_service_proto_rawDescData) - }) - return file_envoy_config_trace_v4alpha_service_proto_rawDescData -} - -var file_envoy_config_trace_v4alpha_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_trace_v4alpha_service_proto_goTypes = []interface{}{ - (*TraceServiceConfig)(nil), // 0: envoy.config.trace.v4alpha.TraceServiceConfig - (*v4alpha.GrpcService)(nil), // 1: envoy.config.core.v4alpha.GrpcService -} -var file_envoy_config_trace_v4alpha_service_proto_depIdxs = []int32{ - 1, // 0: envoy.config.trace.v4alpha.TraceServiceConfig.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_trace_v4alpha_service_proto_init() } -func file_envoy_config_trace_v4alpha_service_proto_init() { - if File_envoy_config_trace_v4alpha_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_trace_v4alpha_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraceServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_trace_v4alpha_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_trace_v4alpha_service_proto_goTypes, - DependencyIndexes: file_envoy_config_trace_v4alpha_service_proto_depIdxs, - MessageInfos: file_envoy_config_trace_v4alpha_service_proto_msgTypes, - }.Build() - File_envoy_config_trace_v4alpha_service_proto = out.File - file_envoy_config_trace_v4alpha_service_proto_rawDesc = nil - file_envoy_config_trace_v4alpha_service_proto_goTypes = nil - file_envoy_config_trace_v4alpha_service_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/config/trace/v4alpha/service.pb.validate.go b/pkg/api/envoy/config/trace/v4alpha/service.pb.validate.go deleted file mode 100644 index 2a67861db7..0000000000 --- a/pkg/api/envoy/config/trace/v4alpha/service.pb.validate.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/trace/v4alpha/service.proto - -package envoy_config_trace_v4alpha - -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{} -) - -// 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{} diff --git a/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.go b/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.go index 0b5b5b3c25..bbdd39f29c 100644 --- a/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.go +++ b/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/transport_socket/alts/v2alpha/alts.proto -package envoy_config_transport_socket_alts_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for ALTS transport socket. This provides Google's ALTS protocol to Envoy. // https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security/ type Alts struct { @@ -110,15 +105,20 @@ var file_envoy_config_transport_socket_alts_v2alpha_alts_proto_rawDesc = []byte{ 0x65, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x70, 0x65, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, - 0x81, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0xd4, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x09, 0x41, 0x6c, - 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2c, 0x12, - 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2f, + 0x61, 0x6c, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x2c, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.validate.go b/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.validate.go index debfc5a7b0..80715ced23 100644 --- a/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.validate.go +++ b/pkg/api/envoy/config/transport_socket/alts/v2alpha/alts.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/transport_socket/alts/v2alpha/alts.proto -package envoy_config_transport_socket_alts_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Alts with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Alts) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Alts with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in AltsMultiError, or nil if none found. +func (m *Alts) ValidateAll() error { + return m.validate(true) +} + +func (m *Alts) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetHandshakerService()) < 1 { - return AltsValidationError{ + err := AltsValidationError{ field: "HandshakerService", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AltsMultiError(errors) } return nil } +// AltsMultiError is an error wrapping multiple validation errors returned by +// Alts.ValidateAll() if the designated constraints aren't met. +type AltsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AltsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AltsMultiError) AllErrors() []error { return m } + // AltsValidationError is the validation error returned by Alts.Validate if the // designated constraints aren't met. type AltsValidationError struct { diff --git a/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.go b/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.go index afcb99aabb..43a66b4ef7 100644 --- a/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.go +++ b/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto -package envoy_config_transport_socket_raw_buffer_v2 +package raw_bufferv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for raw buffer transport socket. type RawBuffer struct { state protoimpl.MessageState @@ -79,16 +74,22 @@ var file_envoy_config_transport_socket_raw_buffer_v2_raw_buffer_proto_rawDesc = 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, - 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x8d, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, + 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0xee, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x32, 0x12, 0x30, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x72, 0x61, + 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x61, 0x77, 0x5f, + 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x32, 0x12, 0x30, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.validate.go b/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.validate.go index d50e9ff0d8..8d5d7b7a19 100644 --- a/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.validate.go +++ b/pkg/api/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto -package envoy_config_transport_socket_raw_buffer_v2 +package raw_bufferv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RawBuffer with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RawBuffer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RawBuffer with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RawBufferMultiError, or nil +// if none found. +func (m *RawBuffer) ValidateAll() error { + return m.validate(true) +} + +func (m *RawBuffer) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RawBufferMultiError(errors) + } + return nil } +// RawBufferMultiError is an error wrapping multiple validation errors returned +// by RawBuffer.ValidateAll() if the designated constraints aren't met. +type RawBufferMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RawBufferMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RawBufferMultiError) AllErrors() []error { return m } + // RawBufferValidationError is the validation error returned by // RawBuffer.Validate if the designated constraints aren't met. type RawBufferValidationError struct { diff --git a/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.go b/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.go index 5f289dc664..ca6ced660e 100644 --- a/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.go +++ b/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/config/transport_socket/tap/v2alpha/tap.proto -package envoy_config_transport_socket_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/tap/v2alpha" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for tap transport socket. This wraps another transport socket, providing the // ability to interpose and record in plain text any traffic that is surfaced to Envoy. type Tap struct { @@ -119,16 +114,21 @@ var file_envoy_config_transport_socket_tap_v2alpha_tap_proto_rawDesc = []byte{ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x86, 0x01, 0x0a, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0xd8, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.validate.go b/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.validate.go index ee69c948d7..7c40dd9d41 100644 --- a/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.validate.go +++ b/pkg/api/envoy/config/transport_socket/tap/v2alpha/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/transport_socket/tap/v2alpha/tap.proto -package envoy_config_transport_socket_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Tap with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Tap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tap with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TapMultiError, or nil if none found. +func (m *Tap) ValidateAll() error { + return m.validate(true) +} + +func (m *Tap) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return TapValidationError{ + err := TapValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapValidationError{ field: "CommonConfig", @@ -58,13 +97,36 @@ func (m *Tap) Validate() error { } if m.GetTransportSocket() == nil { - return TapValidationError{ + err := TapValidationError{ field: "TransportSocket", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapValidationError{ field: "TransportSocket", @@ -74,9 +136,29 @@ func (m *Tap) Validate() error { } } + if len(errors) > 0 { + return TapMultiError(errors) + } + return nil } +// TapMultiError is an error wrapping multiple validation errors returned by +// Tap.ValidateAll() if the designated constraints aren't met. +type TapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapMultiError) AllErrors() []error { return m } + // TapValidationError is the validation error returned by Tap.Validate if the // designated constraints aren't met. type TapValidationError struct { diff --git a/pkg/api/envoy/data/accesslog/v2/accesslog.pb.go b/pkg/api/envoy/data/accesslog/v2/accesslog.pb.go index 5062f98e2f..745559203b 100644 --- a/pkg/api/envoy/data/accesslog/v2/accesslog.pb.go +++ b/pkg/api/envoy/data/accesslog/v2/accesslog.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/accesslog/v2/accesslog.proto -package envoy_data_accesslog_v2 +package accesslogv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "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" timestamp "github.com/golang/protobuf/ptypes/timestamp" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // HTTP version type HTTPAccessLogEntry_HTTPVersion int32 @@ -1040,7 +1035,7 @@ func (x *HTTPRequestProperties) GetRequestMethod() core.RequestMethod { if x != nil { return x.RequestMethod } - return core.RequestMethod_METHOD_UNSPECIFIED + return core.RequestMethod(0) } func (x *HTTPRequestProperties) GetScheme() string { @@ -1804,12 +1799,17 @@ var file_envoy_data_accesslog_v2_accesslog_proto_rawDesc = []byte{ 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x41, 0x0a, 0x25, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x8d, 0x01, 0x0a, 0x25, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/accesslog/v2/accesslog.pb.validate.go b/pkg/api/envoy/data/accesslog/v2/accesslog.pb.validate.go index 9b5a8ad97d..0d0ff4c3ae 100644 --- a/pkg/api/envoy/data/accesslog/v2/accesslog.pb.validate.go +++ b/pkg/api/envoy/data/accesslog/v2/accesslog.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/accesslog/v2/accesslog.proto -package envoy_data_accesslog_v2 +package accesslogv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ) @@ -32,20 +33,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = core.RequestMethod(0) ) // Validate checks the field values on TCPAccessLogEntry with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TCPAccessLogEntry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TCPAccessLogEntry with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TCPAccessLogEntryMultiError, or nil if none found. +func (m *TCPAccessLogEntry) ValidateAll() error { + return m.validate(true) +} + +func (m *TCPAccessLogEntry) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TCPAccessLogEntryValidationError{ field: "CommonProperties", @@ -55,7 +90,26 @@ func (m *TCPAccessLogEntry) Validate() error { } } - if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectionProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TCPAccessLogEntryValidationError{ field: "ConnectionProperties", @@ -65,9 +119,30 @@ func (m *TCPAccessLogEntry) Validate() error { } } + if len(errors) > 0 { + return TCPAccessLogEntryMultiError(errors) + } + return nil } +// TCPAccessLogEntryMultiError is an error wrapping multiple validation errors +// returned by TCPAccessLogEntry.ValidateAll() if the designated constraints +// aren't met. +type TCPAccessLogEntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TCPAccessLogEntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TCPAccessLogEntryMultiError) AllErrors() []error { return m } + // TCPAccessLogEntryValidationError is the validation error returned by // TCPAccessLogEntry.Validate if the designated constraints aren't met. type TCPAccessLogEntryValidationError struct { @@ -126,13 +201,46 @@ var _ interface { // Validate checks the field values on HTTPAccessLogEntry with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HTTPAccessLogEntry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPAccessLogEntry with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HTTPAccessLogEntryMultiError, or nil if none found. +func (m *HTTPAccessLogEntry) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPAccessLogEntry) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "CommonProperties", @@ -144,7 +252,26 @@ func (m *HTTPAccessLogEntry) Validate() error { // no validation rules for ProtocolVersion - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "Request", @@ -154,7 +281,26 @@ func (m *HTTPAccessLogEntry) Validate() error { } } - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "Response", @@ -164,9 +310,30 @@ func (m *HTTPAccessLogEntry) Validate() error { } } + if len(errors) > 0 { + return HTTPAccessLogEntryMultiError(errors) + } + return nil } +// HTTPAccessLogEntryMultiError is an error wrapping multiple validation errors +// returned by HTTPAccessLogEntry.ValidateAll() if the designated constraints +// aren't met. +type HTTPAccessLogEntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPAccessLogEntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPAccessLogEntryMultiError) AllErrors() []error { return m } + // HTTPAccessLogEntryValidationError is the validation error returned by // HTTPAccessLogEntry.Validate if the designated constraints aren't met. type HTTPAccessLogEntryValidationError struct { @@ -225,19 +392,54 @@ var _ interface { // Validate checks the field values on ConnectionProperties with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ConnectionProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConnectionProperties with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ConnectionPropertiesMultiError, or nil if none found. +func (m *ConnectionProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectionProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ReceivedBytes // no validation rules for SentBytes + if len(errors) > 0 { + return ConnectionPropertiesMultiError(errors) + } + return nil } +// ConnectionPropertiesMultiError is an error wrapping multiple validation +// errors returned by ConnectionProperties.ValidateAll() if the designated +// constraints aren't met. +type ConnectionPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectionPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectionPropertiesMultiError) AllErrors() []error { return m } + // ConnectionPropertiesValidationError is the validation error returned by // ConnectionProperties.Validate if the designated constraints aren't met. type ConnectionPropertiesValidationError struct { @@ -295,21 +497,58 @@ var _ interface { } = ConnectionPropertiesValidationError{} // Validate checks the field values on AccessLogCommon with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AccessLogCommon) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AccessLogCommon with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AccessLogCommonMultiError, or nil if none found. +func (m *AccessLogCommon) ValidateAll() error { + return m.validate(true) +} + +func (m *AccessLogCommon) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetSampleRate(); val <= 0 || val > 1 { - return AccessLogCommonValidationError{ + err := AccessLogCommonValidationError{ field: "SampleRate", reason: "value must be inside range (0, 1]", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDownstreamRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "DownstreamRemoteAddress", @@ -319,7 +558,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetDownstreamLocalAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "DownstreamLocalAddress", @@ -329,7 +587,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTlsProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TlsProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TlsProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TlsProperties", @@ -339,7 +616,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStartTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "StartTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "StartTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "StartTime", @@ -349,7 +645,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastRxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastRxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastRxByte", @@ -359,7 +674,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToFirstUpstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToFirstUpstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstUpstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToFirstUpstreamTxByte", @@ -369,7 +703,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastUpstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastUpstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastUpstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastUpstreamTxByte", @@ -379,7 +732,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToFirstUpstreamRxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToFirstUpstreamRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstUpstreamRxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToFirstUpstreamRxByte", @@ -389,7 +761,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastUpstreamRxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastUpstreamRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastUpstreamRxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastUpstreamRxByte", @@ -399,7 +790,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToFirstDownstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToFirstDownstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstDownstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToFirstDownstreamTxByte", @@ -409,7 +819,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastDownstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastDownstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastDownstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastDownstreamTxByte", @@ -419,7 +848,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "UpstreamRemoteAddress", @@ -429,7 +877,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamLocalAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "UpstreamLocalAddress", @@ -441,7 +908,26 @@ func (m *AccessLogCommon) Validate() error { // no validation rules for UpstreamCluster - if v, ok := interface{}(m.GetResponseFlags()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseFlags()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "ResponseFlags", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "ResponseFlags", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseFlags()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "ResponseFlags", @@ -451,7 +937,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "Metadata", @@ -465,7 +970,26 @@ func (m *AccessLogCommon) Validate() error { // no validation rules for RouteName - if v, ok := interface{}(m.GetDownstreamDirectRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamDirectRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamDirectRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamDirectRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamDirectRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "DownstreamDirectRemoteAddress", @@ -475,26 +999,76 @@ func (m *AccessLogCommon) Validate() error { } } - for key, val := range m.GetFilterStateObjects() { - _ = val - - // no validation rules for FilterStateObjects[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogCommonValidationError{ - field: fmt.Sprintf("FilterStateObjects[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetFilterStateObjects())) + i := 0 + for key := range m.GetFilterStateObjects() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetFilterStateObjects()[key] + _ = val + + // no validation rules for FilterStateObjects[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return AccessLogCommonMultiError(errors) } return nil } +// AccessLogCommonMultiError is an error wrapping multiple validation errors +// returned by AccessLogCommon.ValidateAll() if the designated constraints +// aren't met. +type AccessLogCommonMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AccessLogCommonMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AccessLogCommonMultiError) AllErrors() []error { return m } + // AccessLogCommonValidationError is the validation error returned by // AccessLogCommon.Validate if the designated constraints aren't met. type AccessLogCommonValidationError struct { @@ -550,13 +1124,27 @@ var _ interface { } = AccessLogCommonValidationError{} // Validate checks the field values on ResponseFlags with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ResponseFlags) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlags with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResponseFlagsMultiError, or +// nil if none found. +func (m *ResponseFlags) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlags) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for FailedLocalHealthcheck // no validation rules for NoHealthyUpstream @@ -581,7 +1169,26 @@ func (m *ResponseFlags) Validate() error { // no validation rules for RateLimited - if v, ok := interface{}(m.GetUnauthorizedDetails()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUnauthorizedDetails()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseFlagsValidationError{ + field: "UnauthorizedDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseFlagsValidationError{ + field: "UnauthorizedDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUnauthorizedDetails()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseFlagsValidationError{ field: "UnauthorizedDetails", @@ -603,9 +1210,30 @@ func (m *ResponseFlags) Validate() error { // no validation rules for DownstreamProtocolError + if len(errors) > 0 { + return ResponseFlagsMultiError(errors) + } + return nil } +// ResponseFlagsMultiError is an error wrapping multiple validation errors +// returned by ResponseFlags.ValidateAll() if the designated constraints +// aren't met. +type ResponseFlagsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlagsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlagsMultiError) AllErrors() []error { return m } + // ResponseFlagsValidationError is the validation error returned by // ResponseFlags.Validate if the designated constraints aren't met. type ResponseFlagsValidationError struct { @@ -661,16 +1289,49 @@ var _ interface { } = ResponseFlagsValidationError{} // Validate checks the field values on TLSProperties with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TLSProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TLSProperties with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TLSPropertiesMultiError, or +// nil if none found. +func (m *TLSProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TlsVersion - if v, ok := interface{}(m.GetTlsCipherSuite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsCipherSuite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "TlsCipherSuite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "TlsCipherSuite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCipherSuite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "TlsCipherSuite", @@ -682,7 +1343,26 @@ func (m *TLSProperties) Validate() error { // no validation rules for TlsSniHostname - if v, ok := interface{}(m.GetLocalCertificateProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalCertificateProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "LocalCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "LocalCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalCertificateProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "LocalCertificateProperties", @@ -692,7 +1372,26 @@ func (m *TLSProperties) Validate() error { } } - if v, ok := interface{}(m.GetPeerCertificateProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPeerCertificateProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "PeerCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "PeerCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPeerCertificateProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "PeerCertificateProperties", @@ -704,9 +1403,30 @@ func (m *TLSProperties) Validate() error { // no validation rules for TlsSessionId + if len(errors) > 0 { + return TLSPropertiesMultiError(errors) + } + return nil } +// TLSPropertiesMultiError is an error wrapping multiple validation errors +// returned by TLSProperties.ValidateAll() if the designated constraints +// aren't met. +type TLSPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSPropertiesMultiError) AllErrors() []error { return m } + // TLSPropertiesValidationError is the validation error returned by // TLSProperties.Validate if the designated constraints aren't met. type TLSPropertiesValidationError struct { @@ -763,24 +1483,61 @@ var _ interface { // Validate checks the field values on HTTPRequestProperties with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HTTPRequestProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPRequestProperties with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HTTPRequestPropertiesMultiError, or nil if none found. +func (m *HTTPRequestProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPRequestProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := core.RequestMethod_name[int32(m.GetRequestMethod())]; !ok { - return HTTPRequestPropertiesValidationError{ + err := HTTPRequestPropertiesValidationError{ field: "RequestMethod", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Scheme // no validation rules for Authority - if v, ok := interface{}(m.GetPort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPRequestPropertiesValidationError{ + field: "Port", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPRequestPropertiesValidationError{ + field: "Port", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPRequestPropertiesValidationError{ field: "Port", @@ -808,9 +1565,30 @@ func (m *HTTPRequestProperties) Validate() error { // no validation rules for RequestHeaders + if len(errors) > 0 { + return HTTPRequestPropertiesMultiError(errors) + } + return nil } +// HTTPRequestPropertiesMultiError is an error wrapping multiple validation +// errors returned by HTTPRequestProperties.ValidateAll() if the designated +// constraints aren't met. +type HTTPRequestPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPRequestPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPRequestPropertiesMultiError) AllErrors() []error { return m } + // HTTPRequestPropertiesValidationError is the validation error returned by // HTTPRequestProperties.Validate if the designated constraints aren't met. type HTTPRequestPropertiesValidationError struct { @@ -869,13 +1647,46 @@ var _ interface { // Validate checks the field values on HTTPResponseProperties with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HTTPResponseProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPResponseProperties with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HTTPResponsePropertiesMultiError, or nil if none found. +func (m *HTTPResponseProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPResponseProperties) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetResponseCode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetResponseCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPResponsePropertiesValidationError{ + field: "ResponseCode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPResponsePropertiesValidationError{ + field: "ResponseCode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseCode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPResponsePropertiesValidationError{ field: "ResponseCode", @@ -895,9 +1706,30 @@ func (m *HTTPResponseProperties) Validate() error { // no validation rules for ResponseCodeDetails + if len(errors) > 0 { + return HTTPResponsePropertiesMultiError(errors) + } + return nil } +// HTTPResponsePropertiesMultiError is an error wrapping multiple validation +// errors returned by HTTPResponseProperties.ValidateAll() if the designated +// constraints aren't met. +type HTTPResponsePropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPResponsePropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPResponsePropertiesMultiError) AllErrors() []error { return m } + // HTTPResponsePropertiesValidationError is the validation error returned by // HTTPResponseProperties.Validate if the designated constraints aren't met. type HTTPResponsePropertiesValidationError struct { @@ -956,17 +1788,52 @@ var _ interface { // Validate checks the field values on ResponseFlags_Unauthorized with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ResponseFlags_Unauthorized) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlags_Unauthorized with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResponseFlags_UnauthorizedMultiError, or nil if none found. +func (m *ResponseFlags_Unauthorized) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlags_Unauthorized) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Reason + if len(errors) > 0 { + return ResponseFlags_UnauthorizedMultiError(errors) + } + return nil } +// ResponseFlags_UnauthorizedMultiError is an error wrapping multiple +// validation errors returned by ResponseFlags_Unauthorized.ValidateAll() if +// the designated constraints aren't met. +type ResponseFlags_UnauthorizedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlags_UnauthorizedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlags_UnauthorizedMultiError) AllErrors() []error { return m } + // ResponseFlags_UnauthorizedValidationError is the validation error returned // by ResponseFlags_Unauthorized.Validate if the designated constraints aren't met. type ResponseFlags_UnauthorizedValidationError struct { @@ -1025,16 +1892,50 @@ var _ interface { // Validate checks the field values on TLSProperties_CertificateProperties with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *TLSProperties_CertificateProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TLSProperties_CertificateProperties +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// TLSProperties_CertificatePropertiesMultiError, or nil if none found. +func (m *TLSProperties_CertificateProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties_CertificateProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetSubjectAltName() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSProperties_CertificatePropertiesValidationError{ + field: fmt.Sprintf("SubjectAltName[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSProperties_CertificatePropertiesValidationError{ + field: fmt.Sprintf("SubjectAltName[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSProperties_CertificatePropertiesValidationError{ field: fmt.Sprintf("SubjectAltName[%v]", idx), @@ -1048,9 +1949,31 @@ func (m *TLSProperties_CertificateProperties) Validate() error { // no validation rules for Subject + if len(errors) > 0 { + return TLSProperties_CertificatePropertiesMultiError(errors) + } + return nil } +// TLSProperties_CertificatePropertiesMultiError is an error wrapping multiple +// validation errors returned by +// TLSProperties_CertificateProperties.ValidateAll() if the designated +// constraints aren't met. +type TLSProperties_CertificatePropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSProperties_CertificatePropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSProperties_CertificatePropertiesMultiError) AllErrors() []error { return m } + // TLSProperties_CertificatePropertiesValidationError is the validation error // returned by TLSProperties_CertificateProperties.Validate if the designated // constraints aren't met. @@ -1110,13 +2033,29 @@ var _ interface { // Validate checks the field values on // TLSProperties_CertificateProperties_SubjectAltName with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// TLSProperties_CertificateProperties_SubjectAltName with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// TLSProperties_CertificateProperties_SubjectAltNameMultiError, or nil if +// none found. +func (m *TLSProperties_CertificateProperties_SubjectAltName) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties_CertificateProperties_SubjectAltName) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.San.(type) { case *TLSProperties_CertificateProperties_SubjectAltName_Uri: @@ -1127,9 +2066,31 @@ func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { } + if len(errors) > 0 { + return TLSProperties_CertificateProperties_SubjectAltNameMultiError(errors) + } + return nil } +// TLSProperties_CertificateProperties_SubjectAltNameMultiError is an error +// wrapping multiple validation errors returned by +// TLSProperties_CertificateProperties_SubjectAltName.ValidateAll() if the +// designated constraints aren't met. +type TLSProperties_CertificateProperties_SubjectAltNameMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSProperties_CertificateProperties_SubjectAltNameMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSProperties_CertificateProperties_SubjectAltNameMultiError) AllErrors() []error { return m } + // TLSProperties_CertificateProperties_SubjectAltNameValidationError is the // validation error returned by // TLSProperties_CertificateProperties_SubjectAltName.Validate if the diff --git a/pkg/api/envoy/data/accesslog/v3/accesslog.pb.go b/pkg/api/envoy/data/accesslog/v3/accesslog.pb.go index f9f37f9385..9ab24515b7 100644 --- a/pkg/api/envoy/data/accesslog/v3/accesslog.pb.go +++ b/pkg/api/envoy/data/accesslog/v3/accesslog.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/accesslog/v3/accesslog.proto -package envoy_data_accesslog_v3 +package accesslogv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "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" timestamp "github.com/golang/protobuf/ptypes/timestamp" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // HTTP version type HTTPAccessLogEntry_HTTPVersion int32 @@ -381,7 +376,7 @@ func (x *ConnectionProperties) GetSentBytes() uint64 { } // Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 22] +// [#next-free-field: 23] type AccessLogCommon struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -466,6 +461,10 @@ type AccessLogCommon struct { // state serialized to any message other than `google.protobuf.Any` it will be packed into // `google.protobuf.Any`. FilterStateObjects map[string]*any.Any `protobuf:"bytes,21,rep,name=filter_state_objects,json=filterStateObjects,proto3" json:"filter_state_objects,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // A list of custom tags, which annotate logs with additional information. + // To configure this value, users should configure + // :ref:`custom_tags `. + CustomTags map[string]string `protobuf:"bytes,22,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *AccessLogCommon) Reset() { @@ -647,8 +646,15 @@ func (x *AccessLogCommon) GetFilterStateObjects() map[string]*any.Any { return nil } +func (x *AccessLogCommon) GetCustomTags() map[string]string { + if x != nil { + return x.CustomTags + } + return nil +} + // Flags indicating occurrences during request/response processing. -// [#next-free-field: 24] +// [#next-free-field: 28] type ResponseFlags struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -701,6 +707,14 @@ type ResponseFlags struct { NoFilterConfigFound bool `protobuf:"varint,22,opt,name=no_filter_config_found,json=noFilterConfigFound,proto3" json:"no_filter_config_found,omitempty"` // Indicates that request or connection exceeded the downstream connection duration. DurationTimeout bool `protobuf:"varint,23,opt,name=duration_timeout,json=durationTimeout,proto3" json:"duration_timeout,omitempty"` + // Indicates there was an HTTP protocol error in the upstream response. + UpstreamProtocolError bool `protobuf:"varint,24,opt,name=upstream_protocol_error,json=upstreamProtocolError,proto3" json:"upstream_protocol_error,omitempty"` + // Indicates no cluster was found for the request. + NoClusterFound bool `protobuf:"varint,25,opt,name=no_cluster_found,json=noClusterFound,proto3" json:"no_cluster_found,omitempty"` + // Indicates overload manager terminated the request. + OverloadManager bool `protobuf:"varint,26,opt,name=overload_manager,json=overloadManager,proto3" json:"overload_manager,omitempty"` + // Indicates a DNS resolution failed. + DnsResolutionFailure bool `protobuf:"varint,27,opt,name=dns_resolution_failure,json=dnsResolutionFailure,proto3" json:"dns_resolution_failure,omitempty"` } func (x *ResponseFlags) Reset() { @@ -896,6 +910,34 @@ func (x *ResponseFlags) GetDurationTimeout() bool { return false } +func (x *ResponseFlags) GetUpstreamProtocolError() bool { + if x != nil { + return x.UpstreamProtocolError + } + return false +} + +func (x *ResponseFlags) GetNoClusterFound() bool { + if x != nil { + return x.NoClusterFound + } + return false +} + +func (x *ResponseFlags) GetOverloadManager() bool { + if x != nil { + return x.OverloadManager + } + return false +} + +func (x *ResponseFlags) GetDnsResolutionFailure() bool { + if x != nil { + return x.DnsResolutionFailure + } + return false +} + // Properties of a negotiated TLS connection. // [#next-free-field: 7] type TLSProperties struct { @@ -1076,7 +1118,7 @@ func (x *HTTPRequestProperties) GetRequestMethod() v3.RequestMethod { if x != nil { return x.RequestMethod } - return v3.RequestMethod_METHOD_UNSPECIFIED + return v3.RequestMethod(0) } func (x *HTTPRequestProperties) GetScheme() string { @@ -1274,7 +1316,7 @@ type ResponseFlags_Unauthorized struct { func (x *ResponseFlags_Unauthorized) Reset() { *x = ResponseFlags_Unauthorized{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[9] + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1287,7 +1329,7 @@ func (x *ResponseFlags_Unauthorized) String() string { func (*ResponseFlags_Unauthorized) ProtoMessage() {} func (x *ResponseFlags_Unauthorized) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[9] + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1324,7 +1366,7 @@ type TLSProperties_CertificateProperties struct { func (x *TLSProperties_CertificateProperties) Reset() { *x = TLSProperties_CertificateProperties{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10] + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1337,7 +1379,7 @@ func (x *TLSProperties_CertificateProperties) String() string { func (*TLSProperties_CertificateProperties) ProtoMessage() {} func (x *TLSProperties_CertificateProperties) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10] + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1381,7 +1423,7 @@ type TLSProperties_CertificateProperties_SubjectAltName struct { func (x *TLSProperties_CertificateProperties_SubjectAltName) Reset() { *x = TLSProperties_CertificateProperties_SubjectAltName{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11] + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1394,7 +1436,7 @@ func (x *TLSProperties_CertificateProperties_SubjectAltName) String() string { func (*TLSProperties_CertificateProperties_SubjectAltName) ProtoMessage() {} func (x *TLSProperties_CertificateProperties_SubjectAltName) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11] + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1531,7 +1573,7 @@ var file_envoy_data_accesslog_v3_accesslog_proto_rawDesc = []byte{ 0x74, 0x65, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xbf, 0x0e, 0x0a, 0x0f, 0x41, 0x63, 0x63, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd9, 0x0f, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, @@ -1638,271 +1680,298 @@ var file_envoy_data_accesslog_v3_accesslog_proto_rawDesc = []byte{ 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x1a, 0x5b, 0x0a, - 0x17, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, - 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xa6, 0x0c, 0x0a, 0x0d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x18, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x11, 0x6e, 0x6f, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x55, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x38, 0x0a, 0x18, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x65, - 0x74, 0x12, 0x32, 0x0a, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x13, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x3e, 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x46, 0x0a, 0x1f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, - 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, - 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, - 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x6f, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x49, - 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, - 0x64, 0x12, 0x66, 0x0a, 0x14, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x64, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x64, 0x52, 0x13, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x72, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x21, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x64, - 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, - 0x0a, 0x1d, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, - 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x4e, 0x0a, 0x24, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x61, 0x78, - 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, - 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, - 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x66, 0x72, 0x6f, - 0x6d, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x72, - 0x6f, 0x6d, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, - 0x16, 0x6e, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6e, - 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x6f, 0x75, - 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0xd5, 0x01, - 0x0a, 0x0c, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x52, - 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x22, 0x36, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, - 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, - 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, - 0x61, 0x67, 0x73, 0x22, 0x84, 0x08, 0x0a, 0x0d, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x59, 0x0a, + 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x16, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x5b, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, + 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x74, - 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x6c, 0x73, - 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0e, 0x74, 0x6c, 0x73, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, - 0x65, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6e, 0x69, 0x5f, 0x68, 0x6f, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x6c, 0x73, - 0x53, 0x6e, 0x69, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x7e, 0x0a, 0x1c, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, - 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x1b, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, + 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xe9, 0x0d, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x6e, + 0x6f, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x12, 0x38, 0x0a, 0x18, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x16, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x72, + 0x65, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x75, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, + 0x3e, 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, + 0x46, 0x0a, 0x1f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x76, 0x65, 0x72, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x6f, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x5f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x12, 0x66, 0x0a, 0x14, 0x75, + 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x13, + 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x21, + 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x1d, 0x75, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x5f, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x1a, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x1d, 0x69, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1a, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x45, 0x6e, 0x76, 0x6f, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3a, + 0x0a, 0x19, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x17, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4e, 0x0a, 0x24, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x6f, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x6f, 0x75, 0x6e, + 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6e, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x10, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x6f, + 0x75, 0x6e, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x76, 0x65, + 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x1a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x1b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x1a, 0xd5, 0x01, 0x0a, 0x0c, 0x55, + 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x52, 0x0a, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, + 0x61, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, + 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, + 0x36, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, + 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x64, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, + 0x22, 0x84, 0x08, 0x0a, 0x0d, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, + 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x69, + 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, + 0x74, 0x6c, 0x73, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x12, 0x28, + 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6e, 0x69, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x6c, 0x73, 0x53, 0x6e, 0x69, + 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x7e, 0x0a, 0x1c, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x1a, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x1b, 0x70, 0x65, 0x65, 0x72, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x19, 0x70, 0x65, 0x65, + 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x74, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x1a, 0x81, 0x03, 0x0a, + 0x15, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x19, - 0x70, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x6c, 0x73, - 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x74, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x1a, - 0x81, 0x03, 0x0a, 0x15, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, - 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x92, 0x01, 0x0a, 0x0e, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, - 0x69, 0x12, 0x12, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x03, 0x64, 0x6e, 0x73, 0x3a, 0x51, 0x9a, 0xc5, 0x88, 0x1e, 0x4c, 0x0a, 0x4a, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x61, 0x6e, 0x3a, - 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, - 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x4c, - 0x53, 0x76, 0x31, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x31, - 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, - 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x3a, 0x2c, 0x9a, 0xc5, - 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x92, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x72, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x12, + 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x64, + 0x6e, 0x73, 0x3a, 0x51, 0x9a, 0xc5, 0x88, 0x1e, 0x4c, 0x0a, 0x4a, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x61, 0x6e, 0x3a, 0x42, 0x9a, 0xc5, + 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd3, 0x05, 0x0a, 0x15, 0x48, - 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x30, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x12, - 0x23, 0x0a, 0x0d, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, - 0x64, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, - 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, - 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x22, 0x9a, 0x05, 0x0a, 0x16, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, - 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x6f, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x72, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x22, 0x57, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, + 0x0a, 0x13, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x4c, 0x53, 0x76, 0x31, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x31, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, + 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, + 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd3, 0x05, 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x46, 0x6f, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, + 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x42, 0x0a, - 0x14, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x41, 0x0a, - 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9a, 0x05, + 0x0a, 0x16, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, + 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x6f, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x72, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x42, 0x0a, 0x14, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, + 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x8d, 0x01, 0x0a, 0x25, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1918,33 +1987,34 @@ func file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP() []byte { } var file_envoy_data_accesslog_v3_accesslog_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_envoy_data_accesslog_v3_accesslog_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_envoy_data_accesslog_v3_accesslog_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_envoy_data_accesslog_v3_accesslog_proto_goTypes = []interface{}{ - (HTTPAccessLogEntry_HTTPVersion)(0), // 0: envoy.data.accesslog.v3.HTTPAccessLogEntry.HTTPVersion - (ResponseFlags_Unauthorized_Reason)(0), // 1: envoy.data.accesslog.v3.ResponseFlags.Unauthorized.Reason - (TLSProperties_TLSVersion)(0), // 2: envoy.data.accesslog.v3.TLSProperties.TLSVersion - (*TCPAccessLogEntry)(nil), // 3: envoy.data.accesslog.v3.TCPAccessLogEntry - (*HTTPAccessLogEntry)(nil), // 4: envoy.data.accesslog.v3.HTTPAccessLogEntry - (*ConnectionProperties)(nil), // 5: envoy.data.accesslog.v3.ConnectionProperties - (*AccessLogCommon)(nil), // 6: envoy.data.accesslog.v3.AccessLogCommon - (*ResponseFlags)(nil), // 7: envoy.data.accesslog.v3.ResponseFlags - (*TLSProperties)(nil), // 8: envoy.data.accesslog.v3.TLSProperties - (*HTTPRequestProperties)(nil), // 9: envoy.data.accesslog.v3.HTTPRequestProperties - (*HTTPResponseProperties)(nil), // 10: envoy.data.accesslog.v3.HTTPResponseProperties - nil, // 11: envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry - (*ResponseFlags_Unauthorized)(nil), // 12: envoy.data.accesslog.v3.ResponseFlags.Unauthorized - (*TLSProperties_CertificateProperties)(nil), // 13: envoy.data.accesslog.v3.TLSProperties.CertificateProperties - (*TLSProperties_CertificateProperties_SubjectAltName)(nil), // 14: envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName - nil, // 15: envoy.data.accesslog.v3.HTTPRequestProperties.RequestHeadersEntry - nil, // 16: envoy.data.accesslog.v3.HTTPResponseProperties.ResponseHeadersEntry - nil, // 17: envoy.data.accesslog.v3.HTTPResponseProperties.ResponseTrailersEntry - (*v3.Address)(nil), // 18: envoy.config.core.v3.Address - (*timestamp.Timestamp)(nil), // 19: google.protobuf.Timestamp - (*duration.Duration)(nil), // 20: google.protobuf.Duration - (*v3.Metadata)(nil), // 21: envoy.config.core.v3.Metadata - (*wrappers.UInt32Value)(nil), // 22: google.protobuf.UInt32Value - (v3.RequestMethod)(0), // 23: envoy.config.core.v3.RequestMethod - (*any.Any)(nil), // 24: google.protobuf.Any + (HTTPAccessLogEntry_HTTPVersion)(0), // 0: envoy.data.accesslog.v3.HTTPAccessLogEntry.HTTPVersion + (ResponseFlags_Unauthorized_Reason)(0), // 1: envoy.data.accesslog.v3.ResponseFlags.Unauthorized.Reason + (TLSProperties_TLSVersion)(0), // 2: envoy.data.accesslog.v3.TLSProperties.TLSVersion + (*TCPAccessLogEntry)(nil), // 3: envoy.data.accesslog.v3.TCPAccessLogEntry + (*HTTPAccessLogEntry)(nil), // 4: envoy.data.accesslog.v3.HTTPAccessLogEntry + (*ConnectionProperties)(nil), // 5: envoy.data.accesslog.v3.ConnectionProperties + (*AccessLogCommon)(nil), // 6: envoy.data.accesslog.v3.AccessLogCommon + (*ResponseFlags)(nil), // 7: envoy.data.accesslog.v3.ResponseFlags + (*TLSProperties)(nil), // 8: envoy.data.accesslog.v3.TLSProperties + (*HTTPRequestProperties)(nil), // 9: envoy.data.accesslog.v3.HTTPRequestProperties + (*HTTPResponseProperties)(nil), // 10: envoy.data.accesslog.v3.HTTPResponseProperties + nil, // 11: envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry + nil, // 12: envoy.data.accesslog.v3.AccessLogCommon.CustomTagsEntry + (*ResponseFlags_Unauthorized)(nil), // 13: envoy.data.accesslog.v3.ResponseFlags.Unauthorized + (*TLSProperties_CertificateProperties)(nil), // 14: envoy.data.accesslog.v3.TLSProperties.CertificateProperties + (*TLSProperties_CertificateProperties_SubjectAltName)(nil), // 15: envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName + nil, // 16: envoy.data.accesslog.v3.HTTPRequestProperties.RequestHeadersEntry + nil, // 17: envoy.data.accesslog.v3.HTTPResponseProperties.ResponseHeadersEntry + nil, // 18: envoy.data.accesslog.v3.HTTPResponseProperties.ResponseTrailersEntry + (*v3.Address)(nil), // 19: envoy.config.core.v3.Address + (*timestamp.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*duration.Duration)(nil), // 21: google.protobuf.Duration + (*v3.Metadata)(nil), // 22: envoy.config.core.v3.Metadata + (*wrappers.UInt32Value)(nil), // 23: google.protobuf.UInt32Value + (v3.RequestMethod)(0), // 24: envoy.config.core.v3.RequestMethod + (*any.Any)(nil), // 25: google.protobuf.Any } var file_envoy_data_accesslog_v3_accesslog_proto_depIdxs = []int32{ 6, // 0: envoy.data.accesslog.v3.TCPAccessLogEntry.common_properties:type_name -> envoy.data.accesslog.v3.AccessLogCommon @@ -1953,42 +2023,43 @@ var file_envoy_data_accesslog_v3_accesslog_proto_depIdxs = []int32{ 0, // 3: envoy.data.accesslog.v3.HTTPAccessLogEntry.protocol_version:type_name -> envoy.data.accesslog.v3.HTTPAccessLogEntry.HTTPVersion 9, // 4: envoy.data.accesslog.v3.HTTPAccessLogEntry.request:type_name -> envoy.data.accesslog.v3.HTTPRequestProperties 10, // 5: envoy.data.accesslog.v3.HTTPAccessLogEntry.response:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties - 18, // 6: envoy.data.accesslog.v3.AccessLogCommon.downstream_remote_address:type_name -> envoy.config.core.v3.Address - 18, // 7: envoy.data.accesslog.v3.AccessLogCommon.downstream_local_address:type_name -> envoy.config.core.v3.Address + 19, // 6: envoy.data.accesslog.v3.AccessLogCommon.downstream_remote_address:type_name -> envoy.config.core.v3.Address + 19, // 7: envoy.data.accesslog.v3.AccessLogCommon.downstream_local_address:type_name -> envoy.config.core.v3.Address 8, // 8: envoy.data.accesslog.v3.AccessLogCommon.tls_properties:type_name -> envoy.data.accesslog.v3.TLSProperties - 19, // 9: envoy.data.accesslog.v3.AccessLogCommon.start_time:type_name -> google.protobuf.Timestamp - 20, // 10: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_rx_byte:type_name -> google.protobuf.Duration - 20, // 11: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_upstream_tx_byte:type_name -> google.protobuf.Duration - 20, // 12: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_upstream_tx_byte:type_name -> google.protobuf.Duration - 20, // 13: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_upstream_rx_byte:type_name -> google.protobuf.Duration - 20, // 14: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_upstream_rx_byte:type_name -> google.protobuf.Duration - 20, // 15: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_downstream_tx_byte:type_name -> google.protobuf.Duration - 20, // 16: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_downstream_tx_byte:type_name -> google.protobuf.Duration - 18, // 17: envoy.data.accesslog.v3.AccessLogCommon.upstream_remote_address:type_name -> envoy.config.core.v3.Address - 18, // 18: envoy.data.accesslog.v3.AccessLogCommon.upstream_local_address:type_name -> envoy.config.core.v3.Address + 20, // 9: envoy.data.accesslog.v3.AccessLogCommon.start_time:type_name -> google.protobuf.Timestamp + 21, // 10: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_rx_byte:type_name -> google.protobuf.Duration + 21, // 11: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_upstream_tx_byte:type_name -> google.protobuf.Duration + 21, // 12: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_upstream_tx_byte:type_name -> google.protobuf.Duration + 21, // 13: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_upstream_rx_byte:type_name -> google.protobuf.Duration + 21, // 14: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_upstream_rx_byte:type_name -> google.protobuf.Duration + 21, // 15: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_downstream_tx_byte:type_name -> google.protobuf.Duration + 21, // 16: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_downstream_tx_byte:type_name -> google.protobuf.Duration + 19, // 17: envoy.data.accesslog.v3.AccessLogCommon.upstream_remote_address:type_name -> envoy.config.core.v3.Address + 19, // 18: envoy.data.accesslog.v3.AccessLogCommon.upstream_local_address:type_name -> envoy.config.core.v3.Address 7, // 19: envoy.data.accesslog.v3.AccessLogCommon.response_flags:type_name -> envoy.data.accesslog.v3.ResponseFlags - 21, // 20: envoy.data.accesslog.v3.AccessLogCommon.metadata:type_name -> envoy.config.core.v3.Metadata - 18, // 21: envoy.data.accesslog.v3.AccessLogCommon.downstream_direct_remote_address:type_name -> envoy.config.core.v3.Address + 22, // 20: envoy.data.accesslog.v3.AccessLogCommon.metadata:type_name -> envoy.config.core.v3.Metadata + 19, // 21: envoy.data.accesslog.v3.AccessLogCommon.downstream_direct_remote_address:type_name -> envoy.config.core.v3.Address 11, // 22: envoy.data.accesslog.v3.AccessLogCommon.filter_state_objects:type_name -> envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry - 12, // 23: envoy.data.accesslog.v3.ResponseFlags.unauthorized_details:type_name -> envoy.data.accesslog.v3.ResponseFlags.Unauthorized - 2, // 24: envoy.data.accesslog.v3.TLSProperties.tls_version:type_name -> envoy.data.accesslog.v3.TLSProperties.TLSVersion - 22, // 25: envoy.data.accesslog.v3.TLSProperties.tls_cipher_suite:type_name -> google.protobuf.UInt32Value - 13, // 26: envoy.data.accesslog.v3.TLSProperties.local_certificate_properties:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties - 13, // 27: envoy.data.accesslog.v3.TLSProperties.peer_certificate_properties:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties - 23, // 28: envoy.data.accesslog.v3.HTTPRequestProperties.request_method:type_name -> envoy.config.core.v3.RequestMethod - 22, // 29: envoy.data.accesslog.v3.HTTPRequestProperties.port:type_name -> google.protobuf.UInt32Value - 15, // 30: envoy.data.accesslog.v3.HTTPRequestProperties.request_headers:type_name -> envoy.data.accesslog.v3.HTTPRequestProperties.RequestHeadersEntry - 22, // 31: envoy.data.accesslog.v3.HTTPResponseProperties.response_code:type_name -> google.protobuf.UInt32Value - 16, // 32: envoy.data.accesslog.v3.HTTPResponseProperties.response_headers:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties.ResponseHeadersEntry - 17, // 33: envoy.data.accesslog.v3.HTTPResponseProperties.response_trailers:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties.ResponseTrailersEntry - 24, // 34: envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry.value:type_name -> google.protobuf.Any - 1, // 35: envoy.data.accesslog.v3.ResponseFlags.Unauthorized.reason:type_name -> envoy.data.accesslog.v3.ResponseFlags.Unauthorized.Reason - 14, // 36: envoy.data.accesslog.v3.TLSProperties.CertificateProperties.subject_alt_name:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName - 37, // [37:37] is the sub-list for method output_type - 37, // [37:37] is the sub-list for method input_type - 37, // [37:37] is the sub-list for extension type_name - 37, // [37:37] is the sub-list for extension extendee - 0, // [0:37] is the sub-list for field type_name + 12, // 23: envoy.data.accesslog.v3.AccessLogCommon.custom_tags:type_name -> envoy.data.accesslog.v3.AccessLogCommon.CustomTagsEntry + 13, // 24: envoy.data.accesslog.v3.ResponseFlags.unauthorized_details:type_name -> envoy.data.accesslog.v3.ResponseFlags.Unauthorized + 2, // 25: envoy.data.accesslog.v3.TLSProperties.tls_version:type_name -> envoy.data.accesslog.v3.TLSProperties.TLSVersion + 23, // 26: envoy.data.accesslog.v3.TLSProperties.tls_cipher_suite:type_name -> google.protobuf.UInt32Value + 14, // 27: envoy.data.accesslog.v3.TLSProperties.local_certificate_properties:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties + 14, // 28: envoy.data.accesslog.v3.TLSProperties.peer_certificate_properties:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties + 24, // 29: envoy.data.accesslog.v3.HTTPRequestProperties.request_method:type_name -> envoy.config.core.v3.RequestMethod + 23, // 30: envoy.data.accesslog.v3.HTTPRequestProperties.port:type_name -> google.protobuf.UInt32Value + 16, // 31: envoy.data.accesslog.v3.HTTPRequestProperties.request_headers:type_name -> envoy.data.accesslog.v3.HTTPRequestProperties.RequestHeadersEntry + 23, // 32: envoy.data.accesslog.v3.HTTPResponseProperties.response_code:type_name -> google.protobuf.UInt32Value + 17, // 33: envoy.data.accesslog.v3.HTTPResponseProperties.response_headers:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties.ResponseHeadersEntry + 18, // 34: envoy.data.accesslog.v3.HTTPResponseProperties.response_trailers:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties.ResponseTrailersEntry + 25, // 35: envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry.value:type_name -> google.protobuf.Any + 1, // 36: envoy.data.accesslog.v3.ResponseFlags.Unauthorized.reason:type_name -> envoy.data.accesslog.v3.ResponseFlags.Unauthorized.Reason + 15, // 37: envoy.data.accesslog.v3.TLSProperties.CertificateProperties.subject_alt_name:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_envoy_data_accesslog_v3_accesslog_proto_init() } @@ -2093,7 +2164,7 @@ func file_envoy_data_accesslog_v3_accesslog_proto_init() { return nil } } - file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResponseFlags_Unauthorized); i { case 0: return &v.state @@ -2105,7 +2176,7 @@ func file_envoy_data_accesslog_v3_accesslog_proto_init() { return nil } } - file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TLSProperties_CertificateProperties); i { case 0: return &v.state @@ -2117,7 +2188,7 @@ func file_envoy_data_accesslog_v3_accesslog_proto_init() { return nil } } - file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TLSProperties_CertificateProperties_SubjectAltName); i { case 0: return &v.state @@ -2130,7 +2201,7 @@ func file_envoy_data_accesslog_v3_accesslog_proto_init() { } } } - file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11].OneofWrappers = []interface{}{ + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12].OneofWrappers = []interface{}{ (*TLSProperties_CertificateProperties_SubjectAltName_Uri)(nil), (*TLSProperties_CertificateProperties_SubjectAltName_Dns)(nil), } @@ -2140,7 +2211,7 @@ func file_envoy_data_accesslog_v3_accesslog_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_data_accesslog_v3_accesslog_proto_rawDesc, NumEnums: 3, - NumMessages: 15, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/data/accesslog/v3/accesslog.pb.validate.go b/pkg/api/envoy/data/accesslog/v3/accesslog.pb.validate.go index f1680bc996..2668149618 100644 --- a/pkg/api/envoy/data/accesslog/v3/accesslog.pb.validate.go +++ b/pkg/api/envoy/data/accesslog/v3/accesslog.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/accesslog/v3/accesslog.proto -package envoy_data_accesslog_v3 +package accesslogv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,20 +33,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.RequestMethod(0) ) // Validate checks the field values on TCPAccessLogEntry with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TCPAccessLogEntry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TCPAccessLogEntry with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TCPAccessLogEntryMultiError, or nil if none found. +func (m *TCPAccessLogEntry) ValidateAll() error { + return m.validate(true) +} + +func (m *TCPAccessLogEntry) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TCPAccessLogEntryValidationError{ field: "CommonProperties", @@ -55,7 +90,26 @@ func (m *TCPAccessLogEntry) Validate() error { } } - if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnectionProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TCPAccessLogEntryValidationError{ field: "ConnectionProperties", @@ -65,9 +119,30 @@ func (m *TCPAccessLogEntry) Validate() error { } } + if len(errors) > 0 { + return TCPAccessLogEntryMultiError(errors) + } + return nil } +// TCPAccessLogEntryMultiError is an error wrapping multiple validation errors +// returned by TCPAccessLogEntry.ValidateAll() if the designated constraints +// aren't met. +type TCPAccessLogEntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TCPAccessLogEntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TCPAccessLogEntryMultiError) AllErrors() []error { return m } + // TCPAccessLogEntryValidationError is the validation error returned by // TCPAccessLogEntry.Validate if the designated constraints aren't met. type TCPAccessLogEntryValidationError struct { @@ -126,13 +201,46 @@ var _ interface { // Validate checks the field values on HTTPAccessLogEntry with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HTTPAccessLogEntry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPAccessLogEntry with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HTTPAccessLogEntryMultiError, or nil if none found. +func (m *HTTPAccessLogEntry) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPAccessLogEntry) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "CommonProperties", @@ -144,7 +252,26 @@ func (m *HTTPAccessLogEntry) Validate() error { // no validation rules for ProtocolVersion - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "Request", @@ -154,7 +281,26 @@ func (m *HTTPAccessLogEntry) Validate() error { } } - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "Response", @@ -164,9 +310,30 @@ func (m *HTTPAccessLogEntry) Validate() error { } } + if len(errors) > 0 { + return HTTPAccessLogEntryMultiError(errors) + } + return nil } +// HTTPAccessLogEntryMultiError is an error wrapping multiple validation errors +// returned by HTTPAccessLogEntry.ValidateAll() if the designated constraints +// aren't met. +type HTTPAccessLogEntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPAccessLogEntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPAccessLogEntryMultiError) AllErrors() []error { return m } + // HTTPAccessLogEntryValidationError is the validation error returned by // HTTPAccessLogEntry.Validate if the designated constraints aren't met. type HTTPAccessLogEntryValidationError struct { @@ -225,19 +392,54 @@ var _ interface { // Validate checks the field values on ConnectionProperties with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ConnectionProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConnectionProperties with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ConnectionPropertiesMultiError, or nil if none found. +func (m *ConnectionProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectionProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ReceivedBytes // no validation rules for SentBytes + if len(errors) > 0 { + return ConnectionPropertiesMultiError(errors) + } + return nil } +// ConnectionPropertiesMultiError is an error wrapping multiple validation +// errors returned by ConnectionProperties.ValidateAll() if the designated +// constraints aren't met. +type ConnectionPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectionPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectionPropertiesMultiError) AllErrors() []error { return m } + // ConnectionPropertiesValidationError is the validation error returned by // ConnectionProperties.Validate if the designated constraints aren't met. type ConnectionPropertiesValidationError struct { @@ -295,21 +497,58 @@ var _ interface { } = ConnectionPropertiesValidationError{} // Validate checks the field values on AccessLogCommon with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AccessLogCommon) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AccessLogCommon with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AccessLogCommonMultiError, or nil if none found. +func (m *AccessLogCommon) ValidateAll() error { + return m.validate(true) +} + +func (m *AccessLogCommon) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetSampleRate(); val <= 0 || val > 1 { - return AccessLogCommonValidationError{ + err := AccessLogCommonValidationError{ field: "SampleRate", reason: "value must be inside range (0, 1]", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDownstreamRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "DownstreamRemoteAddress", @@ -319,7 +558,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetDownstreamLocalAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "DownstreamLocalAddress", @@ -329,7 +587,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTlsProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TlsProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TlsProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TlsProperties", @@ -339,7 +616,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStartTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "StartTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "StartTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "StartTime", @@ -349,7 +645,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastRxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastRxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastRxByte", @@ -359,7 +674,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToFirstUpstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToFirstUpstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstUpstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToFirstUpstreamTxByte", @@ -369,7 +703,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastUpstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastUpstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastUpstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastUpstreamTxByte", @@ -379,7 +732,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToFirstUpstreamRxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToFirstUpstreamRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstUpstreamRxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToFirstUpstreamRxByte", @@ -389,7 +761,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastUpstreamRxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastUpstreamRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastUpstreamRxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastUpstreamRxByte", @@ -399,7 +790,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToFirstDownstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToFirstDownstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstDownstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToFirstDownstreamTxByte", @@ -409,7 +819,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetTimeToLastDownstreamTxByte()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeToLastDownstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastDownstreamTxByte()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "TimeToLastDownstreamTxByte", @@ -419,7 +848,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "UpstreamRemoteAddress", @@ -429,7 +877,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamLocalAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "UpstreamLocalAddress", @@ -441,7 +908,26 @@ func (m *AccessLogCommon) Validate() error { // no validation rules for UpstreamCluster - if v, ok := interface{}(m.GetResponseFlags()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseFlags()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "ResponseFlags", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "ResponseFlags", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseFlags()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "ResponseFlags", @@ -451,7 +937,26 @@ func (m *AccessLogCommon) Validate() error { } } - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "Metadata", @@ -465,7 +970,26 @@ func (m *AccessLogCommon) Validate() error { // no validation rules for RouteName - if v, ok := interface{}(m.GetDownstreamDirectRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamDirectRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamDirectRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamDirectRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamDirectRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AccessLogCommonValidationError{ field: "DownstreamDirectRemoteAddress", @@ -475,26 +999,78 @@ func (m *AccessLogCommon) Validate() error { } } - for key, val := range m.GetFilterStateObjects() { - _ = val - - // no validation rules for FilterStateObjects[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogCommonValidationError{ - field: fmt.Sprintf("FilterStateObjects[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetFilterStateObjects())) + i := 0 + for key := range m.GetFilterStateObjects() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetFilterStateObjects()[key] + _ = val + + // no validation rules for FilterStateObjects[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + + // no validation rules for CustomTags + if len(errors) > 0 { + return AccessLogCommonMultiError(errors) } return nil } +// AccessLogCommonMultiError is an error wrapping multiple validation errors +// returned by AccessLogCommon.ValidateAll() if the designated constraints +// aren't met. +type AccessLogCommonMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AccessLogCommonMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AccessLogCommonMultiError) AllErrors() []error { return m } + // AccessLogCommonValidationError is the validation error returned by // AccessLogCommon.Validate if the designated constraints aren't met. type AccessLogCommonValidationError struct { @@ -550,13 +1126,27 @@ var _ interface { } = AccessLogCommonValidationError{} // Validate checks the field values on ResponseFlags with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ResponseFlags) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlags with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResponseFlagsMultiError, or +// nil if none found. +func (m *ResponseFlags) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlags) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for FailedLocalHealthcheck // no validation rules for NoHealthyUpstream @@ -581,7 +1171,26 @@ func (m *ResponseFlags) Validate() error { // no validation rules for RateLimited - if v, ok := interface{}(m.GetUnauthorizedDetails()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUnauthorizedDetails()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseFlagsValidationError{ + field: "UnauthorizedDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseFlagsValidationError{ + field: "UnauthorizedDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUnauthorizedDetails()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseFlagsValidationError{ field: "UnauthorizedDetails", @@ -611,9 +1220,38 @@ func (m *ResponseFlags) Validate() error { // no validation rules for DurationTimeout + // no validation rules for UpstreamProtocolError + + // no validation rules for NoClusterFound + + // no validation rules for OverloadManager + + // no validation rules for DnsResolutionFailure + + if len(errors) > 0 { + return ResponseFlagsMultiError(errors) + } + return nil } +// ResponseFlagsMultiError is an error wrapping multiple validation errors +// returned by ResponseFlags.ValidateAll() if the designated constraints +// aren't met. +type ResponseFlagsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlagsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlagsMultiError) AllErrors() []error { return m } + // ResponseFlagsValidationError is the validation error returned by // ResponseFlags.Validate if the designated constraints aren't met. type ResponseFlagsValidationError struct { @@ -669,16 +1307,49 @@ var _ interface { } = ResponseFlagsValidationError{} // Validate checks the field values on TLSProperties with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TLSProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TLSProperties with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TLSPropertiesMultiError, or +// nil if none found. +func (m *TLSProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TlsVersion - if v, ok := interface{}(m.GetTlsCipherSuite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsCipherSuite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "TlsCipherSuite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "TlsCipherSuite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCipherSuite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "TlsCipherSuite", @@ -690,7 +1361,26 @@ func (m *TLSProperties) Validate() error { // no validation rules for TlsSniHostname - if v, ok := interface{}(m.GetLocalCertificateProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalCertificateProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "LocalCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "LocalCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalCertificateProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "LocalCertificateProperties", @@ -700,7 +1390,26 @@ func (m *TLSProperties) Validate() error { } } - if v, ok := interface{}(m.GetPeerCertificateProperties()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPeerCertificateProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "PeerCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "PeerCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPeerCertificateProperties()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "PeerCertificateProperties", @@ -712,9 +1421,30 @@ func (m *TLSProperties) Validate() error { // no validation rules for TlsSessionId + if len(errors) > 0 { + return TLSPropertiesMultiError(errors) + } + return nil } +// TLSPropertiesMultiError is an error wrapping multiple validation errors +// returned by TLSProperties.ValidateAll() if the designated constraints +// aren't met. +type TLSPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSPropertiesMultiError) AllErrors() []error { return m } + // TLSPropertiesValidationError is the validation error returned by // TLSProperties.Validate if the designated constraints aren't met. type TLSPropertiesValidationError struct { @@ -771,24 +1501,61 @@ var _ interface { // Validate checks the field values on HTTPRequestProperties with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HTTPRequestProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPRequestProperties with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HTTPRequestPropertiesMultiError, or nil if none found. +func (m *HTTPRequestProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPRequestProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := v3.RequestMethod_name[int32(m.GetRequestMethod())]; !ok { - return HTTPRequestPropertiesValidationError{ + err := HTTPRequestPropertiesValidationError{ field: "RequestMethod", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Scheme // no validation rules for Authority - if v, ok := interface{}(m.GetPort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPRequestPropertiesValidationError{ + field: "Port", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPRequestPropertiesValidationError{ + field: "Port", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPRequestPropertiesValidationError{ field: "Port", @@ -816,9 +1583,30 @@ func (m *HTTPRequestProperties) Validate() error { // no validation rules for RequestHeaders + if len(errors) > 0 { + return HTTPRequestPropertiesMultiError(errors) + } + return nil } +// HTTPRequestPropertiesMultiError is an error wrapping multiple validation +// errors returned by HTTPRequestProperties.ValidateAll() if the designated +// constraints aren't met. +type HTTPRequestPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPRequestPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPRequestPropertiesMultiError) AllErrors() []error { return m } + // HTTPRequestPropertiesValidationError is the validation error returned by // HTTPRequestProperties.Validate if the designated constraints aren't met. type HTTPRequestPropertiesValidationError struct { @@ -877,13 +1665,46 @@ var _ interface { // Validate checks the field values on HTTPResponseProperties with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HTTPResponseProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPResponseProperties with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HTTPResponsePropertiesMultiError, or nil if none found. +func (m *HTTPResponseProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPResponseProperties) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetResponseCode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetResponseCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPResponsePropertiesValidationError{ + field: "ResponseCode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPResponsePropertiesValidationError{ + field: "ResponseCode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseCode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPResponsePropertiesValidationError{ field: "ResponseCode", @@ -903,9 +1724,30 @@ func (m *HTTPResponseProperties) Validate() error { // no validation rules for ResponseCodeDetails + if len(errors) > 0 { + return HTTPResponsePropertiesMultiError(errors) + } + return nil } +// HTTPResponsePropertiesMultiError is an error wrapping multiple validation +// errors returned by HTTPResponseProperties.ValidateAll() if the designated +// constraints aren't met. +type HTTPResponsePropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPResponsePropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPResponsePropertiesMultiError) AllErrors() []error { return m } + // HTTPResponsePropertiesValidationError is the validation error returned by // HTTPResponseProperties.Validate if the designated constraints aren't met. type HTTPResponsePropertiesValidationError struct { @@ -964,17 +1806,52 @@ var _ interface { // Validate checks the field values on ResponseFlags_Unauthorized with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ResponseFlags_Unauthorized) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlags_Unauthorized with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResponseFlags_UnauthorizedMultiError, or nil if none found. +func (m *ResponseFlags_Unauthorized) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlags_Unauthorized) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Reason + if len(errors) > 0 { + return ResponseFlags_UnauthorizedMultiError(errors) + } + return nil } +// ResponseFlags_UnauthorizedMultiError is an error wrapping multiple +// validation errors returned by ResponseFlags_Unauthorized.ValidateAll() if +// the designated constraints aren't met. +type ResponseFlags_UnauthorizedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlags_UnauthorizedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlags_UnauthorizedMultiError) AllErrors() []error { return m } + // ResponseFlags_UnauthorizedValidationError is the validation error returned // by ResponseFlags_Unauthorized.Validate if the designated constraints aren't met. type ResponseFlags_UnauthorizedValidationError struct { @@ -1033,16 +1910,50 @@ var _ interface { // Validate checks the field values on TLSProperties_CertificateProperties with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *TLSProperties_CertificateProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TLSProperties_CertificateProperties +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// TLSProperties_CertificatePropertiesMultiError, or nil if none found. +func (m *TLSProperties_CertificateProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties_CertificateProperties) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetSubjectAltName() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSProperties_CertificatePropertiesValidationError{ + field: fmt.Sprintf("SubjectAltName[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSProperties_CertificatePropertiesValidationError{ + field: fmt.Sprintf("SubjectAltName[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSProperties_CertificatePropertiesValidationError{ field: fmt.Sprintf("SubjectAltName[%v]", idx), @@ -1056,9 +1967,31 @@ func (m *TLSProperties_CertificateProperties) Validate() error { // no validation rules for Subject + if len(errors) > 0 { + return TLSProperties_CertificatePropertiesMultiError(errors) + } + return nil } +// TLSProperties_CertificatePropertiesMultiError is an error wrapping multiple +// validation errors returned by +// TLSProperties_CertificateProperties.ValidateAll() if the designated +// constraints aren't met. +type TLSProperties_CertificatePropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSProperties_CertificatePropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSProperties_CertificatePropertiesMultiError) AllErrors() []error { return m } + // TLSProperties_CertificatePropertiesValidationError is the validation error // returned by TLSProperties_CertificateProperties.Validate if the designated // constraints aren't met. @@ -1118,13 +2051,29 @@ var _ interface { // Validate checks the field values on // TLSProperties_CertificateProperties_SubjectAltName with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// TLSProperties_CertificateProperties_SubjectAltName with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// TLSProperties_CertificateProperties_SubjectAltNameMultiError, or nil if +// none found. +func (m *TLSProperties_CertificateProperties_SubjectAltName) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties_CertificateProperties_SubjectAltName) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.San.(type) { case *TLSProperties_CertificateProperties_SubjectAltName_Uri: @@ -1135,9 +2084,31 @@ func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { } + if len(errors) > 0 { + return TLSProperties_CertificateProperties_SubjectAltNameMultiError(errors) + } + return nil } +// TLSProperties_CertificateProperties_SubjectAltNameMultiError is an error +// wrapping multiple validation errors returned by +// TLSProperties_CertificateProperties_SubjectAltName.ValidateAll() if the +// designated constraints aren't met. +type TLSProperties_CertificateProperties_SubjectAltNameMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSProperties_CertificateProperties_SubjectAltNameMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSProperties_CertificateProperties_SubjectAltNameMultiError) AllErrors() []error { return m } + // TLSProperties_CertificateProperties_SubjectAltNameValidationError is the // validation error returned by // TLSProperties_CertificateProperties_SubjectAltName.Validate if the diff --git a/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.go b/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.go index 8cb3c36949..6e7e641db5 100644 --- a/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.go +++ b/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/cluster/v2alpha/outlier_detection_event.proto -package envoy_data_cluster_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Type of ejection that took place type OutlierEjectionType int32 @@ -602,14 +597,18 @@ var file_envoy_data_cluster_v2alpha_outlier_detection_event_proto_rawDesc = []by 0x47, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x10, 0x06, 0x2a, 0x20, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x45, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x01, 0x42, 0x6d, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x1a, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, - 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x10, 0x01, 0x42, 0xb0, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x42, 0x1a, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.validate.go b/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.validate.go index e72522e00a..645877b562 100644 --- a/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.validate.go +++ b/pkg/api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/cluster/v2alpha/outlier_detection_event.proto -package envoy_data_cluster_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OutlierDetectionEvent with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierDetectionEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierDetectionEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierDetectionEventMultiError, or nil if none found. +func (m *OutlierDetectionEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierDetectionEvent) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := OutlierEjectionType_name[int32(m.GetType())]; !ok { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "Type", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "Timestamp", @@ -58,7 +97,26 @@ func (m *OutlierDetectionEvent) Validate() error { } } - if v, ok := interface{}(m.GetSecsSinceLastAction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSecsSinceLastAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "SecsSinceLastAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "SecsSinceLastAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecsSinceLastAction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "SecsSinceLastAction", @@ -69,24 +127,36 @@ func (m *OutlierDetectionEvent) Validate() error { } if len(m.GetClusterName()) < 1 { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetUpstreamUrl()) < 1 { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "UpstreamUrl", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := Action_name[int32(m.GetAction())]; !ok { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "Action", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for NumEjections @@ -97,7 +167,26 @@ func (m *OutlierDetectionEvent) Validate() error { case *OutlierDetectionEvent_EjectSuccessRateEvent: - if v, ok := interface{}(m.GetEjectSuccessRateEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectSuccessRateEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectSuccessRateEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectSuccessRateEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectSuccessRateEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "EjectSuccessRateEvent", @@ -109,7 +198,26 @@ func (m *OutlierDetectionEvent) Validate() error { case *OutlierDetectionEvent_EjectConsecutiveEvent: - if v, ok := interface{}(m.GetEjectConsecutiveEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectConsecutiveEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectConsecutiveEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectConsecutiveEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectConsecutiveEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "EjectConsecutiveEvent", @@ -121,7 +229,26 @@ func (m *OutlierDetectionEvent) Validate() error { case *OutlierDetectionEvent_EjectFailurePercentageEvent: - if v, ok := interface{}(m.GetEjectFailurePercentageEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectFailurePercentageEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectFailurePercentageEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectFailurePercentageEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectFailurePercentageEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "EjectFailurePercentageEvent", @@ -132,16 +259,41 @@ func (m *OutlierDetectionEvent) Validate() error { } default: - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "Event", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return OutlierDetectionEventMultiError(errors) + } + return nil } +// OutlierDetectionEventMultiError is an error wrapping multiple validation +// errors returned by OutlierDetectionEvent.ValidateAll() if the designated +// constraints aren't met. +type OutlierDetectionEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierDetectionEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierDetectionEventMultiError) AllErrors() []error { return m } + // OutlierDetectionEventValidationError is the validation error returned by // OutlierDetectionEvent.Validate if the designated constraints aren't met. type OutlierDetectionEventValidationError struct { @@ -200,36 +352,83 @@ var _ interface { // Validate checks the field values on OutlierEjectSuccessRate with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierEjectSuccessRate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectSuccessRate with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierEjectSuccessRateMultiError, or nil if none found. +func (m *OutlierEjectSuccessRate) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectSuccessRate) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHostSuccessRate() > 100 { - return OutlierEjectSuccessRateValidationError{ + err := OutlierEjectSuccessRateValidationError{ field: "HostSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } if m.GetClusterAverageSuccessRate() > 100 { - return OutlierEjectSuccessRateValidationError{ + err := OutlierEjectSuccessRateValidationError{ field: "ClusterAverageSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } if m.GetClusterSuccessRateEjectionThreshold() > 100 { - return OutlierEjectSuccessRateValidationError{ + err := OutlierEjectSuccessRateValidationError{ field: "ClusterSuccessRateEjectionThreshold", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return OutlierEjectSuccessRateMultiError(errors) } return nil } +// OutlierEjectSuccessRateMultiError is an error wrapping multiple validation +// errors returned by OutlierEjectSuccessRate.ValidateAll() if the designated +// constraints aren't met. +type OutlierEjectSuccessRateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectSuccessRateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectSuccessRateMultiError) AllErrors() []error { return m } + // OutlierEjectSuccessRateValidationError is the validation error returned by // OutlierEjectSuccessRate.Validate if the designated constraints aren't met. type OutlierEjectSuccessRateValidationError struct { @@ -288,15 +487,50 @@ var _ interface { // Validate checks the field values on OutlierEjectConsecutive with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierEjectConsecutive) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectConsecutive with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierEjectConsecutiveMultiError, or nil if none found. +func (m *OutlierEjectConsecutive) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectConsecutive) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return OutlierEjectConsecutiveMultiError(errors) + } + return nil } +// OutlierEjectConsecutiveMultiError is an error wrapping multiple validation +// errors returned by OutlierEjectConsecutive.ValidateAll() if the designated +// constraints aren't met. +type OutlierEjectConsecutiveMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectConsecutiveMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectConsecutiveMultiError) AllErrors() []error { return m } + // OutlierEjectConsecutiveValidationError is the validation error returned by // OutlierEjectConsecutive.Validate if the designated constraints aren't met. type OutlierEjectConsecutiveValidationError struct { @@ -355,22 +589,61 @@ var _ interface { // Validate checks the field values on OutlierEjectFailurePercentage with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierEjectFailurePercentage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectFailurePercentage with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// OutlierEjectFailurePercentageMultiError, or nil if none found. +func (m *OutlierEjectFailurePercentage) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectFailurePercentage) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHostSuccessRate() > 100 { - return OutlierEjectFailurePercentageValidationError{ + err := OutlierEjectFailurePercentageValidationError{ field: "HostSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return OutlierEjectFailurePercentageMultiError(errors) } return nil } +// OutlierEjectFailurePercentageMultiError is an error wrapping multiple +// validation errors returned by OutlierEjectFailurePercentage.ValidateAll() +// if the designated constraints aren't met. +type OutlierEjectFailurePercentageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectFailurePercentageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectFailurePercentageMultiError) AllErrors() []error { return m } + // OutlierEjectFailurePercentageValidationError is the validation error // returned by OutlierEjectFailurePercentage.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.go b/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.go index 275aa8f7da..696ecb58be 100644 --- a/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.go +++ b/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/cluster/v3/outlier_detection_event.proto -package envoy_data_cluster_v3 +package clusterv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,17 +24,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Type of ejection that took place type OutlierEjectionType int32 const ( // In case upstream host returns certain number of consecutive 5xx. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all type of errors are treated as HTTP 5xx errors. // See :ref:`Cluster outlier detection ` documentation for // details. @@ -46,21 +41,21 @@ const ( // and selects hosts for which ratio of successful replies deviates from other hosts // in the cluster. // If - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is *false*, all errors (externally and locally generated) are used to calculate success rate // statistics. See :ref:`Cluster outlier detection ` // documentation for details. OutlierEjectionType_SUCCESS_RATE OutlierEjectionType = 2 // Consecutive local origin failures: Connection failures, resets, timeouts, etc // This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is set to *true*. // See :ref:`Cluster outlier detection ` documentation for OutlierEjectionType_CONSECUTIVE_LOCAL_ORIGIN_FAILURE OutlierEjectionType = 3 // Runs over aggregated success rate statistics for local origin failures // for all hosts in the cluster and selects hosts for which success rate deviates from other // hosts in the cluster. This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` + // :ref:`outlier_detection.split_external_local_origin_errors` // is set to *true*. // See :ref:`Cluster outlier detection ` documentation for OutlierEjectionType_SUCCESS_RATE_LOCAL_ORIGIN OutlierEjectionType = 4 @@ -182,7 +177,7 @@ type OutlierDetectionEvent struct { Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // The time in seconds since the last action (either an ejection or unejection) took place. SecsSinceLastAction *wrappers.UInt64Value `protobuf:"bytes,3,opt,name=secs_since_last_action,json=secsSinceLastAction,proto3" json:"secs_since_last_action,omitempty"` - // The :ref:`cluster ` that owns the ejected host. + // The :ref:`cluster ` that owns the ejected host. ClusterName string `protobuf:"bytes,4,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` // The URL of the ejected host. E.g., ``tcp://1.2.3.4:80``. UpstreamUrl string `protobuf:"bytes,5,opt,name=upstream_url,json=upstreamUrl,proto3" json:"upstream_url,omitempty"` @@ -615,12 +610,17 @@ var file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDesc = []byte{ 0x47, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x10, 0x06, 0x2a, 0x20, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x45, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x01, 0x42, 0x4b, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x4f, 0x75, 0x74, 0x6c, - 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x10, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x4f, 0x75, 0x74, + 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.validate.go b/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.validate.go index c88558a529..2442ecca0f 100644 --- a/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.validate.go +++ b/pkg/api/envoy/data/cluster/v3/outlier_detection_event.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/cluster/v3/outlier_detection_event.proto -package envoy_data_cluster_v3 +package clusterv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OutlierDetectionEvent with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierDetectionEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierDetectionEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierDetectionEventMultiError, or nil if none found. +func (m *OutlierDetectionEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierDetectionEvent) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := OutlierEjectionType_name[int32(m.GetType())]; !ok { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "Type", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "Timestamp", @@ -58,7 +97,26 @@ func (m *OutlierDetectionEvent) Validate() error { } } - if v, ok := interface{}(m.GetSecsSinceLastAction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSecsSinceLastAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "SecsSinceLastAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "SecsSinceLastAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecsSinceLastAction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "SecsSinceLastAction", @@ -69,24 +127,36 @@ func (m *OutlierDetectionEvent) Validate() error { } if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "ClusterName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetUpstreamUrl()) < 1 { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "UpstreamUrl", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := Action_name[int32(m.GetAction())]; !ok { - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "Action", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for NumEjections @@ -97,7 +167,26 @@ func (m *OutlierDetectionEvent) Validate() error { case *OutlierDetectionEvent_EjectSuccessRateEvent: - if v, ok := interface{}(m.GetEjectSuccessRateEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectSuccessRateEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectSuccessRateEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectSuccessRateEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectSuccessRateEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "EjectSuccessRateEvent", @@ -109,7 +198,26 @@ func (m *OutlierDetectionEvent) Validate() error { case *OutlierDetectionEvent_EjectConsecutiveEvent: - if v, ok := interface{}(m.GetEjectConsecutiveEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectConsecutiveEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectConsecutiveEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectConsecutiveEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectConsecutiveEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "EjectConsecutiveEvent", @@ -121,7 +229,26 @@ func (m *OutlierDetectionEvent) Validate() error { case *OutlierDetectionEvent_EjectFailurePercentageEvent: - if v, ok := interface{}(m.GetEjectFailurePercentageEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectFailurePercentageEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectFailurePercentageEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectFailurePercentageEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectFailurePercentageEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutlierDetectionEventValidationError{ field: "EjectFailurePercentageEvent", @@ -132,16 +259,41 @@ func (m *OutlierDetectionEvent) Validate() error { } default: - return OutlierDetectionEventValidationError{ + err := OutlierDetectionEventValidationError{ field: "Event", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return OutlierDetectionEventMultiError(errors) + } + return nil } +// OutlierDetectionEventMultiError is an error wrapping multiple validation +// errors returned by OutlierDetectionEvent.ValidateAll() if the designated +// constraints aren't met. +type OutlierDetectionEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierDetectionEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierDetectionEventMultiError) AllErrors() []error { return m } + // OutlierDetectionEventValidationError is the validation error returned by // OutlierDetectionEvent.Validate if the designated constraints aren't met. type OutlierDetectionEventValidationError struct { @@ -200,36 +352,83 @@ var _ interface { // Validate checks the field values on OutlierEjectSuccessRate with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierEjectSuccessRate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectSuccessRate with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierEjectSuccessRateMultiError, or nil if none found. +func (m *OutlierEjectSuccessRate) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectSuccessRate) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHostSuccessRate() > 100 { - return OutlierEjectSuccessRateValidationError{ + err := OutlierEjectSuccessRateValidationError{ field: "HostSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } if m.GetClusterAverageSuccessRate() > 100 { - return OutlierEjectSuccessRateValidationError{ + err := OutlierEjectSuccessRateValidationError{ field: "ClusterAverageSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) } if m.GetClusterSuccessRateEjectionThreshold() > 100 { - return OutlierEjectSuccessRateValidationError{ + err := OutlierEjectSuccessRateValidationError{ field: "ClusterSuccessRateEjectionThreshold", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return OutlierEjectSuccessRateMultiError(errors) } return nil } +// OutlierEjectSuccessRateMultiError is an error wrapping multiple validation +// errors returned by OutlierEjectSuccessRate.ValidateAll() if the designated +// constraints aren't met. +type OutlierEjectSuccessRateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectSuccessRateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectSuccessRateMultiError) AllErrors() []error { return m } + // OutlierEjectSuccessRateValidationError is the validation error returned by // OutlierEjectSuccessRate.Validate if the designated constraints aren't met. type OutlierEjectSuccessRateValidationError struct { @@ -288,15 +487,50 @@ var _ interface { // Validate checks the field values on OutlierEjectConsecutive with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierEjectConsecutive) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectConsecutive with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OutlierEjectConsecutiveMultiError, or nil if none found. +func (m *OutlierEjectConsecutive) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectConsecutive) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return OutlierEjectConsecutiveMultiError(errors) + } + return nil } +// OutlierEjectConsecutiveMultiError is an error wrapping multiple validation +// errors returned by OutlierEjectConsecutive.ValidateAll() if the designated +// constraints aren't met. +type OutlierEjectConsecutiveMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectConsecutiveMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectConsecutiveMultiError) AllErrors() []error { return m } + // OutlierEjectConsecutiveValidationError is the validation error returned by // OutlierEjectConsecutive.Validate if the designated constraints aren't met. type OutlierEjectConsecutiveValidationError struct { @@ -355,22 +589,61 @@ var _ interface { // Validate checks the field values on OutlierEjectFailurePercentage with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OutlierEjectFailurePercentage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectFailurePercentage with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// OutlierEjectFailurePercentageMultiError, or nil if none found. +func (m *OutlierEjectFailurePercentage) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectFailurePercentage) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetHostSuccessRate() > 100 { - return OutlierEjectFailurePercentageValidationError{ + err := OutlierEjectFailurePercentageValidationError{ field: "HostSuccessRate", reason: "value must be less than or equal to 100", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return OutlierEjectFailurePercentageMultiError(errors) } return nil } +// OutlierEjectFailurePercentageMultiError is an error wrapping multiple +// validation errors returned by OutlierEjectFailurePercentage.ValidateAll() +// if the designated constraints aren't met. +type OutlierEjectFailurePercentageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectFailurePercentageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectFailurePercentageMultiError) AllErrors() []error { return m } + // OutlierEjectFailurePercentageValidationError is the validation error // returned by OutlierEjectFailurePercentage.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.go b/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.go index bc3b7acd24..b564e5e533 100644 --- a/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.go +++ b/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/core/v2alpha/health_check_event.proto -package envoy_data_core_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HealthCheckFailureType int32 const ( @@ -618,12 +613,16 @@ var file_envoy_data_core_v2alpha_health_check_event_proto_rawDesc = []byte{ 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x10, 0x02, - 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x03, 0x42, 0x48, 0x0a, 0x25, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x03, 0x42, 0x88, 0x01, 0x0a, 0x25, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.validate.go b/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.validate.go index 41ede7dd5d..cfbc8348ef 100644 --- a/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.validate.go +++ b/pkg/api/envoy/data/core/v2alpha/health_check_event.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/core/v2alpha/health_check_event.proto -package envoy_data_core_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HealthCheckEvent with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HealthCheckEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckEventMultiError, or nil if none found. +func (m *HealthCheckEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckEvent) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HealthCheckerType_name[int32(m.GetHealthCheckerType())]; !ok { - return HealthCheckEventValidationError{ + err := HealthCheckEventValidationError{ field: "HealthCheckerType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "Host", @@ -59,13 +98,36 @@ func (m *HealthCheckEvent) Validate() error { } if len(m.GetClusterName()) < 1 { - return HealthCheckEventValidationError{ + err := HealthCheckEventValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "Timestamp", @@ -79,7 +141,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_EjectUnhealthyEvent: - if v, ok := interface{}(m.GetEjectUnhealthyEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectUnhealthyEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "EjectUnhealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "EjectUnhealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectUnhealthyEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "EjectUnhealthyEvent", @@ -91,7 +172,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_AddHealthyEvent: - if v, ok := interface{}(m.GetAddHealthyEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddHealthyEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "AddHealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "AddHealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddHealthyEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "AddHealthyEvent", @@ -103,7 +203,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_HealthCheckFailureEvent: - if v, ok := interface{}(m.GetHealthCheckFailureEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthCheckFailureEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "HealthCheckFailureEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "HealthCheckFailureEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckFailureEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "HealthCheckFailureEvent", @@ -115,7 +234,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_DegradedHealthyHost: - if v, ok := interface{}(m.GetDegradedHealthyHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDegradedHealthyHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "DegradedHealthyHost", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "DegradedHealthyHost", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDegradedHealthyHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "DegradedHealthyHost", @@ -127,7 +265,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_NoLongerDegradedHost: - if v, ok := interface{}(m.GetNoLongerDegradedHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNoLongerDegradedHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "NoLongerDegradedHost", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "NoLongerDegradedHost", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNoLongerDegradedHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "NoLongerDegradedHost", @@ -138,16 +295,41 @@ func (m *HealthCheckEvent) Validate() error { } default: - return HealthCheckEventValidationError{ + err := HealthCheckEventValidationError{ field: "Event", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return HealthCheckEventMultiError(errors) + } + return nil } +// HealthCheckEventMultiError is an error wrapping multiple validation errors +// returned by HealthCheckEvent.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckEventMultiError) AllErrors() []error { return m } + // HealthCheckEventValidationError is the validation error returned by // HealthCheckEvent.Validate if the designated constraints aren't met. type HealthCheckEventValidationError struct { @@ -204,22 +386,61 @@ var _ interface { // Validate checks the field values on HealthCheckEjectUnhealthy with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckEjectUnhealthy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckEjectUnhealthy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckEjectUnhealthyMultiError, or nil if none found. +func (m *HealthCheckEjectUnhealthy) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckEjectUnhealthy) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { - return HealthCheckEjectUnhealthyValidationError{ + err := HealthCheckEjectUnhealthyValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HealthCheckEjectUnhealthyMultiError(errors) } return nil } +// HealthCheckEjectUnhealthyMultiError is an error wrapping multiple validation +// errors returned by HealthCheckEjectUnhealthy.ValidateAll() if the +// designated constraints aren't met. +type HealthCheckEjectUnhealthyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckEjectUnhealthyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckEjectUnhealthyMultiError) AllErrors() []error { return m } + // HealthCheckEjectUnhealthyValidationError is the validation error returned by // HealthCheckEjectUnhealthy.Validate if the designated constraints aren't met. type HealthCheckEjectUnhealthyValidationError struct { @@ -278,17 +499,52 @@ var _ interface { // Validate checks the field values on HealthCheckAddHealthy with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckAddHealthy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckAddHealthy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckAddHealthyMultiError, or nil if none found. +func (m *HealthCheckAddHealthy) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckAddHealthy) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for FirstCheck + if len(errors) > 0 { + return HealthCheckAddHealthyMultiError(errors) + } + return nil } +// HealthCheckAddHealthyMultiError is an error wrapping multiple validation +// errors returned by HealthCheckAddHealthy.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckAddHealthyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckAddHealthyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckAddHealthyMultiError) AllErrors() []error { return m } + // HealthCheckAddHealthyValidationError is the validation error returned by // HealthCheckAddHealthy.Validate if the designated constraints aren't met. type HealthCheckAddHealthyValidationError struct { @@ -347,24 +603,63 @@ var _ interface { // Validate checks the field values on HealthCheckFailure with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckFailure) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckFailure with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckFailureMultiError, or nil if none found. +func (m *HealthCheckFailure) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckFailure) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { - return HealthCheckFailureValidationError{ + err := HealthCheckFailureValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for FirstCheck + if len(errors) > 0 { + return HealthCheckFailureMultiError(errors) + } + return nil } +// HealthCheckFailureMultiError is an error wrapping multiple validation errors +// returned by HealthCheckFailure.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckFailureMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckFailureMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckFailureMultiError) AllErrors() []error { return m } + // HealthCheckFailureValidationError is the validation error returned by // HealthCheckFailure.Validate if the designated constraints aren't met. type HealthCheckFailureValidationError struct { @@ -423,15 +718,50 @@ var _ interface { // Validate checks the field values on DegradedHealthyHost with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DegradedHealthyHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DegradedHealthyHost with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DegradedHealthyHostMultiError, or nil if none found. +func (m *DegradedHealthyHost) ValidateAll() error { + return m.validate(true) +} + +func (m *DegradedHealthyHost) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return DegradedHealthyHostMultiError(errors) + } + return nil } +// DegradedHealthyHostMultiError is an error wrapping multiple validation +// errors returned by DegradedHealthyHost.ValidateAll() if the designated +// constraints aren't met. +type DegradedHealthyHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DegradedHealthyHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DegradedHealthyHostMultiError) AllErrors() []error { return m } + // DegradedHealthyHostValidationError is the validation error returned by // DegradedHealthyHost.Validate if the designated constraints aren't met. type DegradedHealthyHostValidationError struct { @@ -490,15 +820,50 @@ var _ interface { // Validate checks the field values on NoLongerDegradedHost with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *NoLongerDegradedHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NoLongerDegradedHost with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// NoLongerDegradedHostMultiError, or nil if none found. +func (m *NoLongerDegradedHost) ValidateAll() error { + return m.validate(true) +} + +func (m *NoLongerDegradedHost) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return NoLongerDegradedHostMultiError(errors) + } + return nil } +// NoLongerDegradedHostMultiError is an error wrapping multiple validation +// errors returned by NoLongerDegradedHost.ValidateAll() if the designated +// constraints aren't met. +type NoLongerDegradedHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NoLongerDegradedHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NoLongerDegradedHostMultiError) AllErrors() []error { return m } + // NoLongerDegradedHostValidationError is the validation error returned by // NoLongerDegradedHost.Validate if the designated constraints aren't met. type NoLongerDegradedHostValidationError struct { diff --git a/pkg/api/envoy/data/core/v3/health_check_event.pb.go b/pkg/api/envoy/data/core/v3/health_check_event.pb.go index 0b7555e40f..9fbe880106 100644 --- a/pkg/api/envoy/data/core/v3/health_check_event.pb.go +++ b/pkg/api/envoy/data/core/v3/health_check_event.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/core/v3/health_check_event.proto -package envoy_data_core_v3 +package corev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,16 +24,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HealthCheckFailureType int32 const ( - HealthCheckFailureType_ACTIVE HealthCheckFailureType = 0 - HealthCheckFailureType_PASSIVE HealthCheckFailureType = 1 - HealthCheckFailureType_NETWORK HealthCheckFailureType = 2 + HealthCheckFailureType_ACTIVE HealthCheckFailureType = 0 + HealthCheckFailureType_PASSIVE HealthCheckFailureType = 1 + HealthCheckFailureType_NETWORK HealthCheckFailureType = 2 + HealthCheckFailureType_NETWORK_TIMEOUT HealthCheckFailureType = 3 ) // Enum value maps for HealthCheckFailureType. @@ -43,11 +39,13 @@ var ( 0: "ACTIVE", 1: "PASSIVE", 2: "NETWORK", + 3: "NETWORK_TIMEOUT", } HealthCheckFailureType_value = map[string]int32{ - "ACTIVE": 0, - "PASSIVE": 1, - "NETWORK": 2, + "ACTIVE": 0, + "PASSIVE": 1, + "NETWORK": 2, + "NETWORK_TIMEOUT": 3, } ) @@ -345,7 +343,7 @@ type HealthCheckAddHealthy struct { unknownFields protoimpl.UnknownFields // Whether this addition is the result of the first ever health check on a host, in which case - // the configured :ref:`healthy threshold ` + // the configured :ref:`healthy threshold ` // is bypassed and the host is immediately added. FirstCheck bool `protobuf:"varint,1,opt,name=first_check,json=firstCheck,proto3" json:"first_check,omitempty"` } @@ -630,19 +628,25 @@ var file_envoy_data_core_v3_health_check_event_proto_rawDesc = []byte{ 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, - 0x6f, 0x73, 0x74, 0x2a, 0x3e, 0x0a, 0x16, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x6f, 0x73, 0x74, 0x2a, 0x53, 0x0a, 0x16, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x53, 0x53, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, - 0x4b, 0x10, 0x02, 0x2a, 0x3b, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, - 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x03, - 0x42, 0x43, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x2a, 0x3b, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, + 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, + 0x44, 0x49, 0x53, 0x10, 0x03, 0x42, 0x85, 0x01, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, + 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/core/v3/health_check_event.pb.validate.go b/pkg/api/envoy/data/core/v3/health_check_event.pb.validate.go index da7d8edc1b..cfdc9a0f03 100644 --- a/pkg/api/envoy/data/core/v3/health_check_event.pb.validate.go +++ b/pkg/api/envoy/data/core/v3/health_check_event.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/core/v3/health_check_event.proto -package envoy_data_core_v3 +package corev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HealthCheckEvent with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HealthCheckEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckEventMultiError, or nil if none found. +func (m *HealthCheckEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckEvent) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HealthCheckerType_name[int32(m.GetHealthCheckerType())]; !ok { - return HealthCheckEventValidationError{ + err := HealthCheckEventValidationError{ field: "HealthCheckerType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "Host", @@ -59,13 +98,36 @@ func (m *HealthCheckEvent) Validate() error { } if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return HealthCheckEventValidationError{ + err := HealthCheckEventValidationError{ field: "ClusterName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "Timestamp", @@ -79,7 +141,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_EjectUnhealthyEvent: - if v, ok := interface{}(m.GetEjectUnhealthyEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEjectUnhealthyEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "EjectUnhealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "EjectUnhealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectUnhealthyEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "EjectUnhealthyEvent", @@ -91,7 +172,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_AddHealthyEvent: - if v, ok := interface{}(m.GetAddHealthyEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddHealthyEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "AddHealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "AddHealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddHealthyEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "AddHealthyEvent", @@ -103,7 +203,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_HealthCheckFailureEvent: - if v, ok := interface{}(m.GetHealthCheckFailureEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthCheckFailureEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "HealthCheckFailureEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "HealthCheckFailureEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckFailureEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "HealthCheckFailureEvent", @@ -115,7 +234,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_DegradedHealthyHost: - if v, ok := interface{}(m.GetDegradedHealthyHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDegradedHealthyHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "DegradedHealthyHost", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "DegradedHealthyHost", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDegradedHealthyHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "DegradedHealthyHost", @@ -127,7 +265,26 @@ func (m *HealthCheckEvent) Validate() error { case *HealthCheckEvent_NoLongerDegradedHost: - if v, ok := interface{}(m.GetNoLongerDegradedHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNoLongerDegradedHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "NoLongerDegradedHost", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "NoLongerDegradedHost", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNoLongerDegradedHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckEventValidationError{ field: "NoLongerDegradedHost", @@ -138,16 +295,41 @@ func (m *HealthCheckEvent) Validate() error { } default: - return HealthCheckEventValidationError{ + err := HealthCheckEventValidationError{ field: "Event", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return HealthCheckEventMultiError(errors) + } + return nil } +// HealthCheckEventMultiError is an error wrapping multiple validation errors +// returned by HealthCheckEvent.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckEventMultiError) AllErrors() []error { return m } + // HealthCheckEventValidationError is the validation error returned by // HealthCheckEvent.Validate if the designated constraints aren't met. type HealthCheckEventValidationError struct { @@ -204,22 +386,61 @@ var _ interface { // Validate checks the field values on HealthCheckEjectUnhealthy with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckEjectUnhealthy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckEjectUnhealthy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckEjectUnhealthyMultiError, or nil if none found. +func (m *HealthCheckEjectUnhealthy) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckEjectUnhealthy) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { - return HealthCheckEjectUnhealthyValidationError{ + err := HealthCheckEjectUnhealthyValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HealthCheckEjectUnhealthyMultiError(errors) } return nil } +// HealthCheckEjectUnhealthyMultiError is an error wrapping multiple validation +// errors returned by HealthCheckEjectUnhealthy.ValidateAll() if the +// designated constraints aren't met. +type HealthCheckEjectUnhealthyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckEjectUnhealthyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckEjectUnhealthyMultiError) AllErrors() []error { return m } + // HealthCheckEjectUnhealthyValidationError is the validation error returned by // HealthCheckEjectUnhealthy.Validate if the designated constraints aren't met. type HealthCheckEjectUnhealthyValidationError struct { @@ -278,17 +499,52 @@ var _ interface { // Validate checks the field values on HealthCheckAddHealthy with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckAddHealthy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckAddHealthy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckAddHealthyMultiError, or nil if none found. +func (m *HealthCheckAddHealthy) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckAddHealthy) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for FirstCheck + if len(errors) > 0 { + return HealthCheckAddHealthyMultiError(errors) + } + return nil } +// HealthCheckAddHealthyMultiError is an error wrapping multiple validation +// errors returned by HealthCheckAddHealthy.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckAddHealthyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckAddHealthyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckAddHealthyMultiError) AllErrors() []error { return m } + // HealthCheckAddHealthyValidationError is the validation error returned by // HealthCheckAddHealthy.Validate if the designated constraints aren't met. type HealthCheckAddHealthyValidationError struct { @@ -347,24 +603,63 @@ var _ interface { // Validate checks the field values on HealthCheckFailure with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckFailure) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckFailure with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckFailureMultiError, or nil if none found. +func (m *HealthCheckFailure) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckFailure) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { - return HealthCheckFailureValidationError{ + err := HealthCheckFailureValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for FirstCheck + if len(errors) > 0 { + return HealthCheckFailureMultiError(errors) + } + return nil } +// HealthCheckFailureMultiError is an error wrapping multiple validation errors +// returned by HealthCheckFailure.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckFailureMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckFailureMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckFailureMultiError) AllErrors() []error { return m } + // HealthCheckFailureValidationError is the validation error returned by // HealthCheckFailure.Validate if the designated constraints aren't met. type HealthCheckFailureValidationError struct { @@ -423,15 +718,50 @@ var _ interface { // Validate checks the field values on DegradedHealthyHost with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DegradedHealthyHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DegradedHealthyHost with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DegradedHealthyHostMultiError, or nil if none found. +func (m *DegradedHealthyHost) ValidateAll() error { + return m.validate(true) +} + +func (m *DegradedHealthyHost) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return DegradedHealthyHostMultiError(errors) + } + return nil } +// DegradedHealthyHostMultiError is an error wrapping multiple validation +// errors returned by DegradedHealthyHost.ValidateAll() if the designated +// constraints aren't met. +type DegradedHealthyHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DegradedHealthyHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DegradedHealthyHostMultiError) AllErrors() []error { return m } + // DegradedHealthyHostValidationError is the validation error returned by // DegradedHealthyHost.Validate if the designated constraints aren't met. type DegradedHealthyHostValidationError struct { @@ -490,15 +820,50 @@ var _ interface { // Validate checks the field values on NoLongerDegradedHost with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *NoLongerDegradedHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NoLongerDegradedHost with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// NoLongerDegradedHostMultiError, or nil if none found. +func (m *NoLongerDegradedHost) ValidateAll() error { + return m.validate(true) +} + +func (m *NoLongerDegradedHost) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return NoLongerDegradedHostMultiError(errors) + } + return nil } +// NoLongerDegradedHostMultiError is an error wrapping multiple validation +// errors returned by NoLongerDegradedHost.ValidateAll() if the designated +// constraints aren't met. +type NoLongerDegradedHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NoLongerDegradedHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NoLongerDegradedHostMultiError) AllErrors() []error { return m } + // NoLongerDegradedHostValidationError is the validation error returned by // NoLongerDegradedHost.Validate if the designated constraints aren't met. type NoLongerDegradedHostValidationError struct { diff --git a/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.go b/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.go index 156afb2f49..7c9b91c11d 100644 --- a/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.go +++ b/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/dns/v2alpha/dns_table.proto -package envoy_data_dns_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // This message contains the configuration for the DNS Filter if populated // from the control plane type DnsTable struct { @@ -344,11 +339,15 @@ var file_envoy_data_dns_v2alpha_dns_table_proto_rawDesc = []byte{ 0x73, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, - 0x02, 0x2a, 0x00, 0x52, 0x09, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x54, 0x74, 0x6c, 0x42, 0x47, - 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, + 0x02, 0x2a, 0x00, 0x52, 0x09, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x54, 0x74, 0x6c, 0x42, 0x86, + 0x01, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x2f, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.validate.go b/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.validate.go index f526ef1efa..3ca16ae593 100644 --- a/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.validate.go +++ b/pkg/api/envoy/data/dns/v2alpha/dns_table.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/dns/v2alpha/dns_table.proto -package envoy_data_dns_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on DnsTable with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DnsTable) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DnsTableMultiError, or nil +// if none found. +func (m *DnsTable) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ExternalRetryCount if len(m.GetVirtualDomains()) < 1 { - return DnsTableValidationError{ + err := DnsTableValidationError{ field: "VirtualDomains", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetVirtualDomains() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("VirtualDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("VirtualDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTableValidationError{ field: fmt.Sprintf("VirtualDomains[%v]", idx), @@ -67,7 +107,26 @@ func (m *DnsTable) Validate() error { for idx, item := range m.GetKnownSuffixes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("KnownSuffixes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("KnownSuffixes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTableValidationError{ field: fmt.Sprintf("KnownSuffixes[%v]", idx), @@ -79,9 +138,29 @@ func (m *DnsTable) Validate() error { } + if len(errors) > 0 { + return DnsTableMultiError(errors) + } + return nil } +// DnsTableMultiError is an error wrapping multiple validation errors returned +// by DnsTable.ValidateAll() if the designated constraints aren't met. +type DnsTableMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTableMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTableMultiError) AllErrors() []error { return m } + // DnsTableValidationError is the validation error returned by // DnsTable.Validate if the designated constraints aren't met. type DnsTableValidationError struct { @@ -138,34 +217,77 @@ var _ interface { // Validate checks the field values on DnsTable_AddressList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_AddressList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_AddressList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_AddressListMultiError, or nil if none found. +func (m *DnsTable_AddressList) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_AddressList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetAddress()) < 1 { - return DnsTable_AddressListValidationError{ + err := DnsTable_AddressListValidationError{ field: "Address", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetAddress() { _, _ = idx, item if utf8.RuneCountInString(item) < 3 { - return DnsTable_AddressListValidationError{ + err := DnsTable_AddressListValidationError{ field: fmt.Sprintf("Address[%v]", idx), reason: "value length must be at least 3 runes", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return DnsTable_AddressListMultiError(errors) + } + return nil } +// DnsTable_AddressListMultiError is an error wrapping multiple validation +// errors returned by DnsTable_AddressList.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_AddressListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_AddressListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_AddressListMultiError) AllErrors() []error { return m } + // DnsTable_AddressListValidationError is the validation error returned by // DnsTable_AddressList.Validate if the designated constraints aren't met. type DnsTable_AddressListValidationError struct { @@ -224,17 +346,50 @@ var _ interface { // Validate checks the field values on DnsTable_DnsEndpoint with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsEndpoint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsEndpoint with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsEndpointMultiError, or nil if none found. +func (m *DnsTable_DnsEndpoint) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsEndpoint) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.EndpointConfig.(type) { case *DnsTable_DnsEndpoint_AddressList: - if v, ok := interface{}(m.GetAddressList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddressList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "AddressList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "AddressList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddressList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsEndpointValidationError{ field: "AddressList", @@ -245,16 +400,41 @@ func (m *DnsTable_DnsEndpoint) Validate() error { } default: - return DnsTable_DnsEndpointValidationError{ + err := DnsTable_DnsEndpointValidationError{ field: "EndpointConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return DnsTable_DnsEndpointMultiError(errors) } return nil } +// DnsTable_DnsEndpointMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsEndpoint.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_DnsEndpointMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsEndpointMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsEndpointMultiError) AllErrors() []error { return m } + // DnsTable_DnsEndpointValidationError is the validation error returned by // DnsTable_DnsEndpoint.Validate if the designated constraints aren't met. type DnsTable_DnsEndpointValidationError struct { @@ -313,27 +493,68 @@ var _ interface { // Validate checks the field values on DnsTable_DnsVirtualDomain with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsVirtualDomain) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsVirtualDomain with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsVirtualDomainMultiError, or nil if none found. +func (m *DnsTable_DnsVirtualDomain) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsVirtualDomain) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 2 { - return DnsTable_DnsVirtualDomainValidationError{ + err := DnsTable_DnsVirtualDomainValidationError{ field: "Name", reason: "value length must be at least 2 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_DnsTable_DnsVirtualDomain_Name_Pattern.MatchString(m.GetName()) { - return DnsTable_DnsVirtualDomainValidationError{ + err := DnsTable_DnsVirtualDomainValidationError{ field: "Name", reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsVirtualDomainValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsVirtualDomainValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsVirtualDomainValidationError{ field: "Endpoint", @@ -344,29 +565,59 @@ func (m *DnsTable_DnsVirtualDomain) Validate() error { } if d := m.GetAnswerTtl(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DnsTable_DnsVirtualDomainValidationError{ + err = DnsTable_DnsVirtualDomainValidationError{ field: "AnswerTtl", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return DnsTable_DnsVirtualDomainValidationError{ - field: "AnswerTtl", - reason: "value must be greater than 0s", + if dur <= gt { + err := DnsTable_DnsVirtualDomainValidationError{ + field: "AnswerTtl", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return DnsTable_DnsVirtualDomainMultiError(errors) } return nil } +// DnsTable_DnsVirtualDomainMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsVirtualDomain.ValidateAll() if the +// designated constraints aren't met. +type DnsTable_DnsVirtualDomainMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsVirtualDomainMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsVirtualDomainMultiError) AllErrors() []error { return m } + // DnsTable_DnsVirtualDomainValidationError is the validation error returned by // DnsTable_DnsVirtualDomain.Validate if the designated constraints aren't met. type DnsTable_DnsVirtualDomainValidationError struct { diff --git a/pkg/api/envoy/data/dns/v3/dns_table.pb.go b/pkg/api/envoy/data/dns/v3/dns_table.pb.go index cb6fb836e4..8999cbe0cd 100644 --- a/pkg/api/envoy/data/dns/v3/dns_table.pb.go +++ b/pkg/api/envoy/data/dns/v3/dns_table.pb.go @@ -1,16 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/dns/v3/dns_table.proto -package envoy_data_dns_v3 +package dnsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // This message contains the configuration for the DNS Filter if populated // from the control plane type DnsTable struct { @@ -41,9 +37,15 @@ type DnsTable struct { // Fully qualified domain names for which Envoy will respond to DNS queries. By leaving this // list empty, Envoy will forward all queries to external resolvers VirtualDomains []*DnsTable_DnsVirtualDomain `protobuf:"bytes,2,rep,name=virtual_domains,json=virtualDomains,proto3" json:"virtual_domains,omitempty"` + // This field is deprecated and no longer used in Envoy. The filter's behavior has changed + // internally to use a different data structure allowing the filter to determine whether a + // query is for known domain without the use of this field. + // // This field serves to help Envoy determine whether it can authoritatively answer a query // for a name matching a suffix in this list. If the query name does not match a suffix in // this list, Envoy will forward the query to an upstream DNS server + // + // Deprecated: Do not use. KnownSuffixes []*v3.StringMatcher `protobuf:"bytes,3,rep,name=known_suffixes,json=knownSuffixes,proto3" json:"known_suffixes,omitempty"` } @@ -93,6 +95,7 @@ func (x *DnsTable) GetVirtualDomains() []*DnsTable_DnsVirtualDomain { return nil } +// Deprecated: Do not use. func (x *DnsTable) GetKnownSuffixes() []*v3.StringMatcher { if x != nil { return x.KnownSuffixes @@ -651,120 +654,127 @@ var file_envoy_data_dns_v3_dns_table_proto_rawDesc = []byte{ 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x0c, 0x0a, 0x08, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x03, 0x52, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x55, 0x0a, - 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x0e, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x75, - 0x66, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x52, 0x0d, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x65, - 0x73, 0x1a, 0x6b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x28, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x08, 0x01, 0x22, 0x04, 0x72, 0x02, 0x10, - 0x03, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, - 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, - 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x72, - 0x0a, 0x12, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x10, 0xff, 0x01, 0x48, 0x00, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, - 0x01, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x16, 0x0a, 0x0f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x1a, 0xed, 0x01, 0x0a, 0x10, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, - 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, - 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, - 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x06, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, - 0x04, 0x10, 0x80, 0x80, 0x04, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x14, 0x0a, 0x0d, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x1a, 0x92, 0x02, 0x0a, 0x0a, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x2d, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, - 0xc0, 0x01, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, - 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x37, 0x0a, 0x03, - 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, 0x08, 0x01, - 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x50, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x5e, 0x0a, 0x0e, 0x44, 0x6e, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x08, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x0c, 0x0a, 0x08, 0x44, + 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x03, 0x52, 0x12, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, - 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x9d, 0x02, 0x0a, 0x0b, 0x44, 0x6e, 0x73, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x0e, 0x76, 0x69, 0x72, 0x74, 0x75, + 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0d, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x65, 0x73, 0x1a, 0x6b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x08, 0x01, 0x22, 0x04, 0x72, + 0x02, 0x10, 0x03, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x32, 0x9a, 0xc5, + 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x1a, 0x72, 0x0a, 0x12, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x10, 0xff, 0x01, + 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, + 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x16, 0x0a, 0x0f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xed, 0x01, 0x0a, 0x10, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, + 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, + 0x80, 0x04, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, + 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x1d, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x14, + 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x92, 0x02, 0x0a, 0x0a, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, + 0x10, 0x01, 0xc0, 0x01, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x37, + 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, + 0x08, 0x01, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x50, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x5e, 0x0a, 0x0e, 0x44, 0x6e, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, + 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, + 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x9d, 0x02, 0x0a, 0x0b, 0x44, 0x6e, + 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0c, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, + 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x32, 0x9a, + 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x42, 0x16, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf6, 0x01, 0x0a, 0x10, 0x44, 0x6e, + 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1e, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x32, 0x9a, 0xc5, 0x88, - 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, - 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, - 0x16, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf6, 0x01, 0x0a, 0x10, 0x44, 0x6e, 0x73, 0x56, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, - 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x08, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x44, 0x0a, 0x0a, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x74, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, 0x08, 0x1e, 0x52, 0x09, 0x61, 0x6e, - 0x73, 0x77, 0x65, 0x72, 0x54, 0x74, 0x6c, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, - 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x3a, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x44, 0x6e, 0x73, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0a, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x74, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, 0x08, 0x1e, 0x52, 0x09, + 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x54, 0x74, 0x6c, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x7a, 0x0a, 0x1f, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x44, + 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x6e, 0x73, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/dns/v3/dns_table.pb.validate.go b/pkg/api/envoy/data/dns/v3/dns_table.pb.validate.go index b4ca30cf47..0f77c2dc04 100644 --- a/pkg/api/envoy/data/dns/v3/dns_table.pb.validate.go +++ b/pkg/api/envoy/data/dns/v3/dns_table.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/dns/v3/dns_table.proto -package envoy_data_dns_v3 +package dnsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on DnsTable with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DnsTable) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DnsTableMultiError, or nil +// if none found. +func (m *DnsTable) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetExternalRetryCount() > 3 { - return DnsTableValidationError{ + err := DnsTableValidationError{ field: "ExternalRetryCount", reason: "value must be less than or equal to 3", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetVirtualDomains() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("VirtualDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("VirtualDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTableValidationError{ field: fmt.Sprintf("VirtualDomains[%v]", idx), @@ -65,7 +105,26 @@ func (m *DnsTable) Validate() error { for idx, item := range m.GetKnownSuffixes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("KnownSuffixes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("KnownSuffixes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTableValidationError{ field: fmt.Sprintf("KnownSuffixes[%v]", idx), @@ -77,9 +136,29 @@ func (m *DnsTable) Validate() error { } + if len(errors) > 0 { + return DnsTableMultiError(errors) + } + return nil } +// DnsTableMultiError is an error wrapping multiple validation errors returned +// by DnsTable.ValidateAll() if the designated constraints aren't met. +type DnsTableMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTableMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTableMultiError) AllErrors() []error { return m } + // DnsTableValidationError is the validation error returned by // DnsTable.Validate if the designated constraints aren't met. type DnsTableValidationError struct { @@ -136,34 +215,77 @@ var _ interface { // Validate checks the field values on DnsTable_AddressList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_AddressList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_AddressList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_AddressListMultiError, or nil if none found. +func (m *DnsTable_AddressList) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_AddressList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetAddress()) < 1 { - return DnsTable_AddressListValidationError{ + err := DnsTable_AddressListValidationError{ field: "Address", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetAddress() { _, _ = idx, item if utf8.RuneCountInString(item) < 3 { - return DnsTable_AddressListValidationError{ + err := DnsTable_AddressListValidationError{ field: fmt.Sprintf("Address[%v]", idx), reason: "value length must be at least 3 runes", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return DnsTable_AddressListMultiError(errors) + } + return nil } +// DnsTable_AddressListMultiError is an error wrapping multiple validation +// errors returned by DnsTable_AddressList.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_AddressListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_AddressListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_AddressListMultiError) AllErrors() []error { return m } + // DnsTable_AddressListValidationError is the validation error returned by // DnsTable_AddressList.Validate if the designated constraints aren't met. type DnsTable_AddressListValidationError struct { @@ -222,50 +344,101 @@ var _ interface { // Validate checks the field values on DnsTable_DnsServiceProtocol with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsServiceProtocol) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsServiceProtocol with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsServiceProtocolMultiError, or nil if none found. +func (m *DnsTable_DnsServiceProtocol) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsServiceProtocol) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ProtocolConfig.(type) { case *DnsTable_DnsServiceProtocol_Number: if m.GetNumber() >= 255 { - return DnsTable_DnsServiceProtocolValidationError{ + err := DnsTable_DnsServiceProtocolValidationError{ field: "Number", reason: "value must be less than 255", } + if !all { + return err + } + errors = append(errors, err) } case *DnsTable_DnsServiceProtocol_Name: if utf8.RuneCountInString(m.GetName()) < 1 { - return DnsTable_DnsServiceProtocolValidationError{ + err := DnsTable_DnsServiceProtocolValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_DnsTable_DnsServiceProtocol_Name_Pattern.MatchString(m.GetName()) { - return DnsTable_DnsServiceProtocolValidationError{ + err := DnsTable_DnsServiceProtocolValidationError{ field: "Name", reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) } default: - return DnsTable_DnsServiceProtocolValidationError{ + err := DnsTable_DnsServiceProtocolValidationError{ field: "ProtocolConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return DnsTable_DnsServiceProtocolMultiError(errors) + } + return nil } +// DnsTable_DnsServiceProtocolMultiError is an error wrapping multiple +// validation errors returned by DnsTable_DnsServiceProtocol.ValidateAll() if +// the designated constraints aren't met. +type DnsTable_DnsServiceProtocolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceProtocolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceProtocolMultiError) AllErrors() []error { return m } + // DnsTable_DnsServiceProtocolValidationError is the validation error returned // by DnsTable_DnsServiceProtocol.Validate if the designated constraints // aren't met. @@ -327,31 +500,57 @@ var _DnsTable_DnsServiceProtocol_Name_Pattern = regexp.MustCompile("^:?[0-9a-zA- // Validate checks the field values on DnsTable_DnsServiceTarget with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsServiceTarget) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsServiceTarget with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsServiceTargetMultiError, or nil if none found. +func (m *DnsTable_DnsServiceTarget) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsServiceTarget) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetPriority() >= 65536 { - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "Priority", reason: "value must be less than 65536", } + if !all { + return err + } + errors = append(errors, err) } if m.GetWeight() >= 65536 { - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "Weight", reason: "value must be less than 65536", } + if !all { + return err + } + errors = append(errors, err) } if m.GetPort() >= 65536 { - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "Port", reason: "value must be less than 65536", } + if !all { + return err + } + errors = append(errors, err) } switch m.EndpointType.(type) { @@ -359,46 +558,87 @@ func (m *DnsTable_DnsServiceTarget) Validate() error { case *DnsTable_DnsServiceTarget_HostName: if utf8.RuneCountInString(m.GetHostName()) < 1 { - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "HostName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_DnsTable_DnsServiceTarget_HostName_Pattern.MatchString(m.GetHostName()) { - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "HostName", reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) } case *DnsTable_DnsServiceTarget_ClusterName: if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "ClusterName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_DnsTable_DnsServiceTarget_ClusterName_Pattern.MatchString(m.GetClusterName()) { - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "ClusterName", reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) } default: - return DnsTable_DnsServiceTargetValidationError{ + err := DnsTable_DnsServiceTargetValidationError{ field: "EndpointType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return DnsTable_DnsServiceTargetMultiError(errors) } return nil } +// DnsTable_DnsServiceTargetMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsServiceTarget.ValidateAll() if the +// designated constraints aren't met. +type DnsTable_DnsServiceTargetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceTargetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceTargetMultiError) AllErrors() []error { return m } + // DnsTable_DnsServiceTargetValidationError is the validation error returned by // DnsTable_DnsServiceTarget.Validate if the designated constraints aren't met. type DnsTable_DnsServiceTargetValidationError struct { @@ -461,27 +701,68 @@ var _DnsTable_DnsServiceTarget_ClusterName_Pattern = regexp.MustCompile("^:?[0-9 // Validate checks the field values on DnsTable_DnsService with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsService with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsServiceMultiError, or nil if none found. +func (m *DnsTable_DnsService) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsService) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetServiceName()) < 1 { - return DnsTable_DnsServiceValidationError{ + err := DnsTable_DnsServiceValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_DnsTable_DnsService_ServiceName_Pattern.MatchString(m.GetServiceName()) { - return DnsTable_DnsServiceValidationError{ + err := DnsTable_DnsServiceValidationError{ field: "ServiceName", reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetProtocol()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProtocol()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: "Protocol", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: "Protocol", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProtocol()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsServiceValidationError{ field: "Protocol", @@ -492,37 +773,69 @@ func (m *DnsTable_DnsService) Validate() error { } if d := m.GetTtl(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DnsTable_DnsServiceValidationError{ + err = DnsTable_DnsServiceValidationError{ field: "Ttl", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gte := time.Duration(1*time.Second + 0*time.Nanosecond) + gte := time.Duration(1*time.Second + 0*time.Nanosecond) - if dur < gte { - return DnsTable_DnsServiceValidationError{ - field: "Ttl", - reason: "value must be greater than or equal to 1s", + if dur < gte { + err := DnsTable_DnsServiceValidationError{ + field: "Ttl", + reason: "value must be greater than or equal to 1s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if len(m.GetTargets()) < 1 { - return DnsTable_DnsServiceValidationError{ + err := DnsTable_DnsServiceValidationError{ field: "Targets", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetTargets() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: fmt.Sprintf("Targets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: fmt.Sprintf("Targets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsServiceValidationError{ field: fmt.Sprintf("Targets[%v]", idx), @@ -534,9 +847,30 @@ func (m *DnsTable_DnsService) Validate() error { } + if len(errors) > 0 { + return DnsTable_DnsServiceMultiError(errors) + } + return nil } +// DnsTable_DnsServiceMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsService.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_DnsServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceMultiError) AllErrors() []error { return m } + // DnsTable_DnsServiceValidationError is the validation error returned by // DnsTable_DnsService.Validate if the designated constraints aren't met. type DnsTable_DnsServiceValidationError struct { @@ -597,23 +931,60 @@ var _DnsTable_DnsService_ServiceName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z // Validate checks the field values on DnsTable_DnsServiceList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsServiceList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsServiceList with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsServiceListMultiError, or nil if none found. +func (m *DnsTable_DnsServiceList) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsServiceList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetServices()) < 1 { - return DnsTable_DnsServiceListValidationError{ + err := DnsTable_DnsServiceListValidationError{ field: "Services", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetServices() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsServiceListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsServiceListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsServiceListValidationError{ field: fmt.Sprintf("Services[%v]", idx), @@ -625,9 +996,30 @@ func (m *DnsTable_DnsServiceList) Validate() error { } + if len(errors) > 0 { + return DnsTable_DnsServiceListMultiError(errors) + } + return nil } +// DnsTable_DnsServiceListMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsServiceList.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_DnsServiceListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceListMultiError) AllErrors() []error { return m } + // DnsTable_DnsServiceListValidationError is the validation error returned by // DnsTable_DnsServiceList.Validate if the designated constraints aren't met. type DnsTable_DnsServiceListValidationError struct { @@ -686,17 +1078,50 @@ var _ interface { // Validate checks the field values on DnsTable_DnsEndpoint with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsEndpoint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsEndpoint with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsEndpointMultiError, or nil if none found. +func (m *DnsTable_DnsEndpoint) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsEndpoint) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.EndpointConfig.(type) { case *DnsTable_DnsEndpoint_AddressList: - if v, ok := interface{}(m.GetAddressList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddressList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "AddressList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "AddressList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddressList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsEndpointValidationError{ field: "AddressList", @@ -711,7 +1136,26 @@ func (m *DnsTable_DnsEndpoint) Validate() error { case *DnsTable_DnsEndpoint_ServiceList: - if v, ok := interface{}(m.GetServiceList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetServiceList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "ServiceList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "ServiceList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServiceList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsEndpointValidationError{ field: "ServiceList", @@ -722,16 +1166,41 @@ func (m *DnsTable_DnsEndpoint) Validate() error { } default: - return DnsTable_DnsEndpointValidationError{ + err := DnsTable_DnsEndpointValidationError{ field: "EndpointConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return DnsTable_DnsEndpointMultiError(errors) + } + return nil } +// DnsTable_DnsEndpointMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsEndpoint.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_DnsEndpointMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsEndpointMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsEndpointMultiError) AllErrors() []error { return m } + // DnsTable_DnsEndpointValidationError is the validation error returned by // DnsTable_DnsEndpoint.Validate if the designated constraints aren't met. type DnsTable_DnsEndpointValidationError struct { @@ -790,27 +1259,68 @@ var _ interface { // Validate checks the field values on DnsTable_DnsVirtualDomain with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsTable_DnsVirtualDomain) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsVirtualDomain with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsTable_DnsVirtualDomainMultiError, or nil if none found. +func (m *DnsTable_DnsVirtualDomain) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsVirtualDomain) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return DnsTable_DnsVirtualDomainValidationError{ + err := DnsTable_DnsVirtualDomainValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_DnsTable_DnsVirtualDomain_Name_Pattern.MatchString(m.GetName()) { - return DnsTable_DnsVirtualDomainValidationError{ + err := DnsTable_DnsVirtualDomainValidationError{ field: "Name", reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsVirtualDomainValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsVirtualDomainValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsTable_DnsVirtualDomainValidationError{ field: "Endpoint", @@ -821,29 +1331,59 @@ func (m *DnsTable_DnsVirtualDomain) Validate() error { } if d := m.GetAnswerTtl(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DnsTable_DnsVirtualDomainValidationError{ + err = DnsTable_DnsVirtualDomainValidationError{ field: "AnswerTtl", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gte := time.Duration(30*time.Second + 0*time.Nanosecond) + gte := time.Duration(30*time.Second + 0*time.Nanosecond) - if dur < gte { - return DnsTable_DnsVirtualDomainValidationError{ - field: "AnswerTtl", - reason: "value must be greater than or equal to 30s", + if dur < gte { + err := DnsTable_DnsVirtualDomainValidationError{ + field: "AnswerTtl", + reason: "value must be greater than or equal to 30s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return DnsTable_DnsVirtualDomainMultiError(errors) } return nil } +// DnsTable_DnsVirtualDomainMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsVirtualDomain.ValidateAll() if the +// designated constraints aren't met. +type DnsTable_DnsVirtualDomainMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsVirtualDomainMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsVirtualDomainMultiError) AllErrors() []error { return m } + // DnsTable_DnsVirtualDomainValidationError is the validation error returned by // DnsTable_DnsVirtualDomain.Validate if the designated constraints aren't met. type DnsTable_DnsVirtualDomainValidationError struct { diff --git a/pkg/api/envoy/data/dns/v4alpha/dns_table.pb.go b/pkg/api/envoy/data/dns/v4alpha/dns_table.pb.go deleted file mode 100644 index c0499c3544..0000000000 --- a/pkg/api/envoy/data/dns/v4alpha/dns_table.pb.go +++ /dev/null @@ -1,962 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/data/dns/v4alpha/dns_table.proto - -package envoy_data_dns_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// This message contains the configuration for the DNS Filter if populated -// from the control plane -type DnsTable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Control how many times Envoy makes an attempt to forward a query to an external DNS server - ExternalRetryCount uint32 `protobuf:"varint,1,opt,name=external_retry_count,json=externalRetryCount,proto3" json:"external_retry_count,omitempty"` - // Fully qualified domain names for which Envoy will respond to DNS queries. By leaving this - // list empty, Envoy will forward all queries to external resolvers - VirtualDomains []*DnsTable_DnsVirtualDomain `protobuf:"bytes,2,rep,name=virtual_domains,json=virtualDomains,proto3" json:"virtual_domains,omitempty"` - // This field serves to help Envoy determine whether it can authoritatively answer a query - // for a name matching a suffix in this list. If the query name does not match a suffix in - // this list, Envoy will forward the query to an upstream DNS server - KnownSuffixes []*v4alpha.StringMatcher `protobuf:"bytes,3,rep,name=known_suffixes,json=knownSuffixes,proto3" json:"known_suffixes,omitempty"` -} - -func (x *DnsTable) Reset() { - *x = DnsTable{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable) ProtoMessage() {} - -func (x *DnsTable) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable.ProtoReflect.Descriptor instead. -func (*DnsTable) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0} -} - -func (x *DnsTable) GetExternalRetryCount() uint32 { - if x != nil { - return x.ExternalRetryCount - } - return 0 -} - -func (x *DnsTable) GetVirtualDomains() []*DnsTable_DnsVirtualDomain { - if x != nil { - return x.VirtualDomains - } - return nil -} - -func (x *DnsTable) GetKnownSuffixes() []*v4alpha.StringMatcher { - if x != nil { - return x.KnownSuffixes - } - return nil -} - -// This message contains a list of IP addresses returned for a query for a known name -type DnsTable_AddressList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field contains a well formed IP address that is returned in the answer for a - // name query. The address field can be an IPv4 or IPv6 address. Address family - // detection is done automatically when Envoy parses the string. Since this field is - // repeated, Envoy will return as many entries from this list in the DNS response while - // keeping the response under 512 bytes - Address []string `protobuf:"bytes,1,rep,name=address,proto3" json:"address,omitempty"` -} - -func (x *DnsTable_AddressList) Reset() { - *x = DnsTable_AddressList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable_AddressList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable_AddressList) ProtoMessage() {} - -func (x *DnsTable_AddressList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable_AddressList.ProtoReflect.Descriptor instead. -func (*DnsTable_AddressList) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *DnsTable_AddressList) GetAddress() []string { - if x != nil { - return x.Address - } - return nil -} - -// Specify the service protocol using a numeric or string value -type DnsTable_DnsServiceProtocol struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ProtocolConfig: - // *DnsTable_DnsServiceProtocol_Number - // *DnsTable_DnsServiceProtocol_Name - ProtocolConfig isDnsTable_DnsServiceProtocol_ProtocolConfig `protobuf_oneof:"protocol_config"` -} - -func (x *DnsTable_DnsServiceProtocol) Reset() { - *x = DnsTable_DnsServiceProtocol{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable_DnsServiceProtocol) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable_DnsServiceProtocol) ProtoMessage() {} - -func (x *DnsTable_DnsServiceProtocol) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable_DnsServiceProtocol.ProtoReflect.Descriptor instead. -func (*DnsTable_DnsServiceProtocol) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0, 1} -} - -func (m *DnsTable_DnsServiceProtocol) GetProtocolConfig() isDnsTable_DnsServiceProtocol_ProtocolConfig { - if m != nil { - return m.ProtocolConfig - } - return nil -} - -func (x *DnsTable_DnsServiceProtocol) GetNumber() uint32 { - if x, ok := x.GetProtocolConfig().(*DnsTable_DnsServiceProtocol_Number); ok { - return x.Number - } - return 0 -} - -func (x *DnsTable_DnsServiceProtocol) GetName() string { - if x, ok := x.GetProtocolConfig().(*DnsTable_DnsServiceProtocol_Name); ok { - return x.Name - } - return "" -} - -type isDnsTable_DnsServiceProtocol_ProtocolConfig interface { - isDnsTable_DnsServiceProtocol_ProtocolConfig() -} - -type DnsTable_DnsServiceProtocol_Number struct { - // Specify the protocol number for the service. Envoy will try to resolve the number to - // the protocol name. For example, 6 will resolve to "tcp". Refer to: - // https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml - // for protocol names and numbers - Number uint32 `protobuf:"varint,1,opt,name=number,proto3,oneof"` -} - -type DnsTable_DnsServiceProtocol_Name struct { - // Specify the protocol name for the service. - Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` -} - -func (*DnsTable_DnsServiceProtocol_Number) isDnsTable_DnsServiceProtocol_ProtocolConfig() {} - -func (*DnsTable_DnsServiceProtocol_Name) isDnsTable_DnsServiceProtocol_ProtocolConfig() {} - -// Specify the target for a given DNS service -// [#next-free-field: 6] -type DnsTable_DnsServiceTarget struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify the name of the endpoint for the Service. The name is a hostname or a cluster - // - // Types that are assignable to EndpointType: - // *DnsTable_DnsServiceTarget_HostName - // *DnsTable_DnsServiceTarget_ClusterName - EndpointType isDnsTable_DnsServiceTarget_EndpointType `protobuf_oneof:"endpoint_type"` - // The priority of the service record target - Priority uint32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` - // The weight of the service record target - Weight uint32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"` - // The port to which the service is bound. This value is optional if the target is a - // cluster. Setting port to zero in this case makes the filter use the port value - // from the cluster host - Port uint32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *DnsTable_DnsServiceTarget) Reset() { - *x = DnsTable_DnsServiceTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable_DnsServiceTarget) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable_DnsServiceTarget) ProtoMessage() {} - -func (x *DnsTable_DnsServiceTarget) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable_DnsServiceTarget.ProtoReflect.Descriptor instead. -func (*DnsTable_DnsServiceTarget) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0, 2} -} - -func (m *DnsTable_DnsServiceTarget) GetEndpointType() isDnsTable_DnsServiceTarget_EndpointType { - if m != nil { - return m.EndpointType - } - return nil -} - -func (x *DnsTable_DnsServiceTarget) GetHostName() string { - if x, ok := x.GetEndpointType().(*DnsTable_DnsServiceTarget_HostName); ok { - return x.HostName - } - return "" -} - -func (x *DnsTable_DnsServiceTarget) GetClusterName() string { - if x, ok := x.GetEndpointType().(*DnsTable_DnsServiceTarget_ClusterName); ok { - return x.ClusterName - } - return "" -} - -func (x *DnsTable_DnsServiceTarget) GetPriority() uint32 { - if x != nil { - return x.Priority - } - return 0 -} - -func (x *DnsTable_DnsServiceTarget) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *DnsTable_DnsServiceTarget) GetPort() uint32 { - if x != nil { - return x.Port - } - return 0 -} - -type isDnsTable_DnsServiceTarget_EndpointType interface { - isDnsTable_DnsServiceTarget_EndpointType() -} - -type DnsTable_DnsServiceTarget_HostName struct { - // Use a resolvable hostname as the endpoint for a service. - HostName string `protobuf:"bytes,1,opt,name=host_name,json=hostName,proto3,oneof"` -} - -type DnsTable_DnsServiceTarget_ClusterName struct { - // Use a cluster name as the endpoint for a service. - ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3,oneof"` -} - -func (*DnsTable_DnsServiceTarget_HostName) isDnsTable_DnsServiceTarget_EndpointType() {} - -func (*DnsTable_DnsServiceTarget_ClusterName) isDnsTable_DnsServiceTarget_EndpointType() {} - -// This message defines a service selection record returned for a service query in a domain -type DnsTable_DnsService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the service without the protocol or domain name - ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` - // The service protocol. This can be specified as a string or the numeric value of the protocol - Protocol *DnsTable_DnsServiceProtocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` - // The service entry time to live. This is independent from the DNS Answer record TTL - Ttl *duration.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"` - // The list of targets hosting the service - Targets []*DnsTable_DnsServiceTarget `protobuf:"bytes,4,rep,name=targets,proto3" json:"targets,omitempty"` -} - -func (x *DnsTable_DnsService) Reset() { - *x = DnsTable_DnsService{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable_DnsService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable_DnsService) ProtoMessage() {} - -func (x *DnsTable_DnsService) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable_DnsService.ProtoReflect.Descriptor instead. -func (*DnsTable_DnsService) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *DnsTable_DnsService) GetServiceName() string { - if x != nil { - return x.ServiceName - } - return "" -} - -func (x *DnsTable_DnsService) GetProtocol() *DnsTable_DnsServiceProtocol { - if x != nil { - return x.Protocol - } - return nil -} - -func (x *DnsTable_DnsService) GetTtl() *duration.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *DnsTable_DnsService) GetTargets() []*DnsTable_DnsServiceTarget { - if x != nil { - return x.Targets - } - return nil -} - -// Define a list of service records for a given service -type DnsTable_DnsServiceList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Services []*DnsTable_DnsService `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` -} - -func (x *DnsTable_DnsServiceList) Reset() { - *x = DnsTable_DnsServiceList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable_DnsServiceList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable_DnsServiceList) ProtoMessage() {} - -func (x *DnsTable_DnsServiceList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable_DnsServiceList.ProtoReflect.Descriptor instead. -func (*DnsTable_DnsServiceList) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0, 4} -} - -func (x *DnsTable_DnsServiceList) GetServices() []*DnsTable_DnsService { - if x != nil { - return x.Services - } - return nil -} - -type DnsTable_DnsEndpoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to EndpointConfig: - // *DnsTable_DnsEndpoint_AddressList - // *DnsTable_DnsEndpoint_ClusterName - // *DnsTable_DnsEndpoint_ServiceList - EndpointConfig isDnsTable_DnsEndpoint_EndpointConfig `protobuf_oneof:"endpoint_config"` -} - -func (x *DnsTable_DnsEndpoint) Reset() { - *x = DnsTable_DnsEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable_DnsEndpoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable_DnsEndpoint) ProtoMessage() {} - -func (x *DnsTable_DnsEndpoint) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable_DnsEndpoint.ProtoReflect.Descriptor instead. -func (*DnsTable_DnsEndpoint) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0, 5} -} - -func (m *DnsTable_DnsEndpoint) GetEndpointConfig() isDnsTable_DnsEndpoint_EndpointConfig { - if m != nil { - return m.EndpointConfig - } - return nil -} - -func (x *DnsTable_DnsEndpoint) GetAddressList() *DnsTable_AddressList { - if x, ok := x.GetEndpointConfig().(*DnsTable_DnsEndpoint_AddressList); ok { - return x.AddressList - } - return nil -} - -func (x *DnsTable_DnsEndpoint) GetClusterName() string { - if x, ok := x.GetEndpointConfig().(*DnsTable_DnsEndpoint_ClusterName); ok { - return x.ClusterName - } - return "" -} - -func (x *DnsTable_DnsEndpoint) GetServiceList() *DnsTable_DnsServiceList { - if x, ok := x.GetEndpointConfig().(*DnsTable_DnsEndpoint_ServiceList); ok { - return x.ServiceList - } - return nil -} - -type isDnsTable_DnsEndpoint_EndpointConfig interface { - isDnsTable_DnsEndpoint_EndpointConfig() -} - -type DnsTable_DnsEndpoint_AddressList struct { - // Define a list of addresses to return for the specified endpoint - AddressList *DnsTable_AddressList `protobuf:"bytes,1,opt,name=address_list,json=addressList,proto3,oneof"` -} - -type DnsTable_DnsEndpoint_ClusterName struct { - // Define a cluster whose addresses are returned for the specified endpoint - ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3,oneof"` -} - -type DnsTable_DnsEndpoint_ServiceList struct { - // Define a DNS Service List for the specified endpoint - ServiceList *DnsTable_DnsServiceList `protobuf:"bytes,3,opt,name=service_list,json=serviceList,proto3,oneof"` -} - -func (*DnsTable_DnsEndpoint_AddressList) isDnsTable_DnsEndpoint_EndpointConfig() {} - -func (*DnsTable_DnsEndpoint_ClusterName) isDnsTable_DnsEndpoint_EndpointConfig() {} - -func (*DnsTable_DnsEndpoint_ServiceList) isDnsTable_DnsEndpoint_EndpointConfig() {} - -type DnsTable_DnsVirtualDomain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A domain name for which Envoy will respond to query requests - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The configuration containing the method to determine the address of this endpoint - Endpoint *DnsTable_DnsEndpoint `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - // Sets the TTL in DNS answers from Envoy returned to the client. The default TTL is 300s - AnswerTtl *duration.Duration `protobuf:"bytes,3,opt,name=answer_ttl,json=answerTtl,proto3" json:"answer_ttl,omitempty"` -} - -func (x *DnsTable_DnsVirtualDomain) Reset() { - *x = DnsTable_DnsVirtualDomain{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsTable_DnsVirtualDomain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsTable_DnsVirtualDomain) ProtoMessage() {} - -func (x *DnsTable_DnsVirtualDomain) ProtoReflect() protoreflect.Message { - mi := &file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsTable_DnsVirtualDomain.ProtoReflect.Descriptor instead. -func (*DnsTable_DnsVirtualDomain) Descriptor() ([]byte, []int) { - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP(), []int{0, 6} -} - -func (x *DnsTable_DnsVirtualDomain) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DnsTable_DnsVirtualDomain) GetEndpoint() *DnsTable_DnsEndpoint { - if x != nil { - return x.Endpoint - } - return nil -} - -func (x *DnsTable_DnsVirtualDomain) GetAnswerTtl() *duration.Duration { - if x != nil { - return x.AnswerTtl - } - return nil -} - -var File_envoy_data_dns_v4alpha_dns_table_proto protoreflect.FileDescriptor - -var file_envoy_data_dns_v4alpha_dns_table_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x6e, 0x73, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x0e, 0x0a, 0x08, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x39, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x03, 0x52, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x0f, - 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, - 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x0e, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, - 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x0e, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x65, 0x73, 0x1a, 0x66, 0x0a, 0x0b, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, - 0x01, 0x08, 0x08, 0x01, 0x22, 0x04, 0x72, 0x02, 0x10, 0x03, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, - 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x1a, 0xa8, 0x01, 0x0a, 0x12, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, - 0x10, 0xff, 0x01, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, - 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, - 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x16, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xa1, 0x02, - 0x0a, 0x10, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, - 0x01, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, - 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x48, - 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, - 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, 0x52, 0x08, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, - 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, - 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x14, 0x0a, 0x0d, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x1a, 0xca, 0x02, 0x0a, 0x0a, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x2d, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, - 0x01, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x4f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, - 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x12, 0x37, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, - 0x32, 0x02, 0x08, 0x01, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x55, 0x0a, 0x07, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, - 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x95, - 0x01, 0x0a, 0x0e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x51, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0xa2, 0x02, 0x0a, 0x0b, 0x44, 0x6e, 0x73, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0c, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x54, - 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, - 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x42, 0x16, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf6, 0x01, 0x0a, 0x10, - 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x48, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0a, 0x61, 0x6e, - 0x73, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, - 0x04, 0x32, 0x02, 0x08, 0x1e, 0x52, 0x09, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x54, 0x74, 0x6c, - 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x3f, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x0d, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_data_dns_v4alpha_dns_table_proto_rawDescOnce sync.Once - file_envoy_data_dns_v4alpha_dns_table_proto_rawDescData = file_envoy_data_dns_v4alpha_dns_table_proto_rawDesc -) - -func file_envoy_data_dns_v4alpha_dns_table_proto_rawDescGZIP() []byte { - file_envoy_data_dns_v4alpha_dns_table_proto_rawDescOnce.Do(func() { - file_envoy_data_dns_v4alpha_dns_table_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_dns_v4alpha_dns_table_proto_rawDescData) - }) - return file_envoy_data_dns_v4alpha_dns_table_proto_rawDescData -} - -var file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_envoy_data_dns_v4alpha_dns_table_proto_goTypes = []interface{}{ - (*DnsTable)(nil), // 0: envoy.data.dns.v4alpha.DnsTable - (*DnsTable_AddressList)(nil), // 1: envoy.data.dns.v4alpha.DnsTable.AddressList - (*DnsTable_DnsServiceProtocol)(nil), // 2: envoy.data.dns.v4alpha.DnsTable.DnsServiceProtocol - (*DnsTable_DnsServiceTarget)(nil), // 3: envoy.data.dns.v4alpha.DnsTable.DnsServiceTarget - (*DnsTable_DnsService)(nil), // 4: envoy.data.dns.v4alpha.DnsTable.DnsService - (*DnsTable_DnsServiceList)(nil), // 5: envoy.data.dns.v4alpha.DnsTable.DnsServiceList - (*DnsTable_DnsEndpoint)(nil), // 6: envoy.data.dns.v4alpha.DnsTable.DnsEndpoint - (*DnsTable_DnsVirtualDomain)(nil), // 7: envoy.data.dns.v4alpha.DnsTable.DnsVirtualDomain - (*v4alpha.StringMatcher)(nil), // 8: envoy.type.matcher.v4alpha.StringMatcher - (*duration.Duration)(nil), // 9: google.protobuf.Duration -} -var file_envoy_data_dns_v4alpha_dns_table_proto_depIdxs = []int32{ - 7, // 0: envoy.data.dns.v4alpha.DnsTable.virtual_domains:type_name -> envoy.data.dns.v4alpha.DnsTable.DnsVirtualDomain - 8, // 1: envoy.data.dns.v4alpha.DnsTable.known_suffixes:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 2, // 2: envoy.data.dns.v4alpha.DnsTable.DnsService.protocol:type_name -> envoy.data.dns.v4alpha.DnsTable.DnsServiceProtocol - 9, // 3: envoy.data.dns.v4alpha.DnsTable.DnsService.ttl:type_name -> google.protobuf.Duration - 3, // 4: envoy.data.dns.v4alpha.DnsTable.DnsService.targets:type_name -> envoy.data.dns.v4alpha.DnsTable.DnsServiceTarget - 4, // 5: envoy.data.dns.v4alpha.DnsTable.DnsServiceList.services:type_name -> envoy.data.dns.v4alpha.DnsTable.DnsService - 1, // 6: envoy.data.dns.v4alpha.DnsTable.DnsEndpoint.address_list:type_name -> envoy.data.dns.v4alpha.DnsTable.AddressList - 5, // 7: envoy.data.dns.v4alpha.DnsTable.DnsEndpoint.service_list:type_name -> envoy.data.dns.v4alpha.DnsTable.DnsServiceList - 6, // 8: envoy.data.dns.v4alpha.DnsTable.DnsVirtualDomain.endpoint:type_name -> envoy.data.dns.v4alpha.DnsTable.DnsEndpoint - 9, // 9: envoy.data.dns.v4alpha.DnsTable.DnsVirtualDomain.answer_ttl:type_name -> google.protobuf.Duration - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_envoy_data_dns_v4alpha_dns_table_proto_init() } -func file_envoy_data_dns_v4alpha_dns_table_proto_init() { - if File_envoy_data_dns_v4alpha_dns_table_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable_AddressList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable_DnsServiceProtocol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable_DnsServiceTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable_DnsService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable_DnsServiceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable_DnsEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsTable_DnsVirtualDomain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*DnsTable_DnsServiceProtocol_Number)(nil), - (*DnsTable_DnsServiceProtocol_Name)(nil), - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*DnsTable_DnsServiceTarget_HostName)(nil), - (*DnsTable_DnsServiceTarget_ClusterName)(nil), - } - file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*DnsTable_DnsEndpoint_AddressList)(nil), - (*DnsTable_DnsEndpoint_ClusterName)(nil), - (*DnsTable_DnsEndpoint_ServiceList)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_data_dns_v4alpha_dns_table_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_data_dns_v4alpha_dns_table_proto_goTypes, - DependencyIndexes: file_envoy_data_dns_v4alpha_dns_table_proto_depIdxs, - MessageInfos: file_envoy_data_dns_v4alpha_dns_table_proto_msgTypes, - }.Build() - File_envoy_data_dns_v4alpha_dns_table_proto = out.File - file_envoy_data_dns_v4alpha_dns_table_proto_rawDesc = nil - file_envoy_data_dns_v4alpha_dns_table_proto_goTypes = nil - file_envoy_data_dns_v4alpha_dns_table_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/data/dns/v4alpha/dns_table.pb.validate.go b/pkg/api/envoy/data/dns/v4alpha/dns_table.pb.validate.go deleted file mode 100644 index 6b1384db2c..0000000000 --- a/pkg/api/envoy/data/dns/v4alpha/dns_table.pb.validate.go +++ /dev/null @@ -1,903 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/data/dns/v4alpha/dns_table.proto - -package envoy_data_dns_v4alpha - -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{} -) - -// Validate checks the field values on DnsTable with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *DnsTable) Validate() error { - if m == nil { - return nil - } - - if m.GetExternalRetryCount() > 3 { - return DnsTableValidationError{ - field: "ExternalRetryCount", - reason: "value must be less than or equal to 3", - } - } - - for idx, item := range m.GetVirtualDomains() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTableValidationError{ - field: fmt.Sprintf("VirtualDomains[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetKnownSuffixes() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTableValidationError{ - field: fmt.Sprintf("KnownSuffixes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// DnsTableValidationError is the validation error returned by -// DnsTable.Validate if the designated constraints aren't met. -type DnsTableValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTableValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTableValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTableValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTableValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTableValidationError) ErrorName() string { return "DnsTableValidationError" } - -// Error satisfies the builtin error interface -func (e DnsTableValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTableValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTableValidationError{} - -// Validate checks the field values on DnsTable_AddressList with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DnsTable_AddressList) Validate() error { - if m == nil { - return nil - } - - if len(m.GetAddress()) < 1 { - return DnsTable_AddressListValidationError{ - field: "Address", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetAddress() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 3 { - return DnsTable_AddressListValidationError{ - field: fmt.Sprintf("Address[%v]", idx), - reason: "value length must be at least 3 runes", - } - } - - } - - return nil -} - -// DnsTable_AddressListValidationError is the validation error returned by -// DnsTable_AddressList.Validate if the designated constraints aren't met. -type DnsTable_AddressListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTable_AddressListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTable_AddressListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTable_AddressListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTable_AddressListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTable_AddressListValidationError) ErrorName() string { - return "DnsTable_AddressListValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsTable_AddressListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable_AddressList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTable_AddressListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTable_AddressListValidationError{} - -// Validate checks the field values on DnsTable_DnsServiceProtocol with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DnsTable_DnsServiceProtocol) Validate() error { - if m == nil { - return nil - } - - switch m.ProtocolConfig.(type) { - - case *DnsTable_DnsServiceProtocol_Number: - - if m.GetNumber() >= 255 { - return DnsTable_DnsServiceProtocolValidationError{ - field: "Number", - reason: "value must be less than 255", - } - } - - case *DnsTable_DnsServiceProtocol_Name: - - if utf8.RuneCountInString(m.GetName()) < 1 { - return DnsTable_DnsServiceProtocolValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if !_DnsTable_DnsServiceProtocol_Name_Pattern.MatchString(m.GetName()) { - return DnsTable_DnsServiceProtocolValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", - } - } - - default: - return DnsTable_DnsServiceProtocolValidationError{ - field: "ProtocolConfig", - reason: "value is required", - } - - } - - return nil -} - -// DnsTable_DnsServiceProtocolValidationError is the validation error returned -// by DnsTable_DnsServiceProtocol.Validate if the designated constraints -// aren't met. -type DnsTable_DnsServiceProtocolValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTable_DnsServiceProtocolValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTable_DnsServiceProtocolValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTable_DnsServiceProtocolValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTable_DnsServiceProtocolValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTable_DnsServiceProtocolValidationError) ErrorName() string { - return "DnsTable_DnsServiceProtocolValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsTable_DnsServiceProtocolValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable_DnsServiceProtocol.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTable_DnsServiceProtocolValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTable_DnsServiceProtocolValidationError{} - -var _DnsTable_DnsServiceProtocol_Name_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") - -// Validate checks the field values on DnsTable_DnsServiceTarget with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DnsTable_DnsServiceTarget) Validate() error { - if m == nil { - return nil - } - - if m.GetPriority() >= 65536 { - return DnsTable_DnsServiceTargetValidationError{ - field: "Priority", - reason: "value must be less than 65536", - } - } - - if m.GetWeight() >= 65536 { - return DnsTable_DnsServiceTargetValidationError{ - field: "Weight", - reason: "value must be less than 65536", - } - } - - if m.GetPort() >= 65536 { - return DnsTable_DnsServiceTargetValidationError{ - field: "Port", - reason: "value must be less than 65536", - } - } - - switch m.EndpointType.(type) { - - case *DnsTable_DnsServiceTarget_HostName: - - if utf8.RuneCountInString(m.GetHostName()) < 1 { - return DnsTable_DnsServiceTargetValidationError{ - field: "HostName", - reason: "value length must be at least 1 runes", - } - } - - if !_DnsTable_DnsServiceTarget_HostName_Pattern.MatchString(m.GetHostName()) { - return DnsTable_DnsServiceTargetValidationError{ - field: "HostName", - reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", - } - } - - case *DnsTable_DnsServiceTarget_ClusterName: - - if utf8.RuneCountInString(m.GetClusterName()) < 1 { - return DnsTable_DnsServiceTargetValidationError{ - field: "ClusterName", - reason: "value length must be at least 1 runes", - } - } - - if !_DnsTable_DnsServiceTarget_ClusterName_Pattern.MatchString(m.GetClusterName()) { - return DnsTable_DnsServiceTargetValidationError{ - field: "ClusterName", - reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", - } - } - - default: - return DnsTable_DnsServiceTargetValidationError{ - field: "EndpointType", - reason: "value is required", - } - - } - - return nil -} - -// DnsTable_DnsServiceTargetValidationError is the validation error returned by -// DnsTable_DnsServiceTarget.Validate if the designated constraints aren't met. -type DnsTable_DnsServiceTargetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTable_DnsServiceTargetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTable_DnsServiceTargetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTable_DnsServiceTargetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTable_DnsServiceTargetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTable_DnsServiceTargetValidationError) ErrorName() string { - return "DnsTable_DnsServiceTargetValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsTable_DnsServiceTargetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable_DnsServiceTarget.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTable_DnsServiceTargetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTable_DnsServiceTargetValidationError{} - -var _DnsTable_DnsServiceTarget_HostName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") - -var _DnsTable_DnsServiceTarget_ClusterName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") - -// Validate checks the field values on DnsTable_DnsService with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DnsTable_DnsService) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetServiceName()) < 1 { - return DnsTable_DnsServiceValidationError{ - field: "ServiceName", - reason: "value length must be at least 1 runes", - } - } - - if !_DnsTable_DnsService_ServiceName_Pattern.MatchString(m.GetServiceName()) { - return DnsTable_DnsServiceValidationError{ - field: "ServiceName", - reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", - } - } - - if v, ok := interface{}(m.GetProtocol()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTable_DnsServiceValidationError{ - field: "Protocol", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetTtl(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return DnsTable_DnsServiceValidationError{ - field: "Ttl", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(1*time.Second + 0*time.Nanosecond) - - if dur < gte { - return DnsTable_DnsServiceValidationError{ - field: "Ttl", - reason: "value must be greater than or equal to 1s", - } - } - - } - - if len(m.GetTargets()) < 1 { - return DnsTable_DnsServiceValidationError{ - field: "Targets", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetTargets() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTable_DnsServiceValidationError{ - field: fmt.Sprintf("Targets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// DnsTable_DnsServiceValidationError is the validation error returned by -// DnsTable_DnsService.Validate if the designated constraints aren't met. -type DnsTable_DnsServiceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTable_DnsServiceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTable_DnsServiceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTable_DnsServiceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTable_DnsServiceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTable_DnsServiceValidationError) ErrorName() string { - return "DnsTable_DnsServiceValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsTable_DnsServiceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable_DnsService.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTable_DnsServiceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTable_DnsServiceValidationError{} - -var _DnsTable_DnsService_ServiceName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") - -// Validate checks the field values on DnsTable_DnsServiceList with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DnsTable_DnsServiceList) Validate() error { - if m == nil { - return nil - } - - if len(m.GetServices()) < 1 { - return DnsTable_DnsServiceListValidationError{ - field: "Services", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetServices() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTable_DnsServiceListValidationError{ - field: fmt.Sprintf("Services[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// DnsTable_DnsServiceListValidationError is the validation error returned by -// DnsTable_DnsServiceList.Validate if the designated constraints aren't met. -type DnsTable_DnsServiceListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTable_DnsServiceListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTable_DnsServiceListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTable_DnsServiceListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTable_DnsServiceListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTable_DnsServiceListValidationError) ErrorName() string { - return "DnsTable_DnsServiceListValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsTable_DnsServiceListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable_DnsServiceList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTable_DnsServiceListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTable_DnsServiceListValidationError{} - -// Validate checks the field values on DnsTable_DnsEndpoint with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DnsTable_DnsEndpoint) Validate() error { - if m == nil { - return nil - } - - switch m.EndpointConfig.(type) { - - case *DnsTable_DnsEndpoint_AddressList: - - if v, ok := interface{}(m.GetAddressList()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTable_DnsEndpointValidationError{ - field: "AddressList", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DnsTable_DnsEndpoint_ClusterName: - // no validation rules for ClusterName - - case *DnsTable_DnsEndpoint_ServiceList: - - if v, ok := interface{}(m.GetServiceList()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTable_DnsEndpointValidationError{ - field: "ServiceList", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return DnsTable_DnsEndpointValidationError{ - field: "EndpointConfig", - reason: "value is required", - } - - } - - return nil -} - -// DnsTable_DnsEndpointValidationError is the validation error returned by -// DnsTable_DnsEndpoint.Validate if the designated constraints aren't met. -type DnsTable_DnsEndpointValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTable_DnsEndpointValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTable_DnsEndpointValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTable_DnsEndpointValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTable_DnsEndpointValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTable_DnsEndpointValidationError) ErrorName() string { - return "DnsTable_DnsEndpointValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsTable_DnsEndpointValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable_DnsEndpoint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTable_DnsEndpointValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTable_DnsEndpointValidationError{} - -// Validate checks the field values on DnsTable_DnsVirtualDomain with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DnsTable_DnsVirtualDomain) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return DnsTable_DnsVirtualDomainValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if !_DnsTable_DnsVirtualDomain_Name_Pattern.MatchString(m.GetName()) { - return DnsTable_DnsVirtualDomainValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", - } - } - - if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsTable_DnsVirtualDomainValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetAnswerTtl(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return DnsTable_DnsVirtualDomainValidationError{ - field: "AnswerTtl", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(30*time.Second + 0*time.Nanosecond) - - if dur < gte { - return DnsTable_DnsVirtualDomainValidationError{ - field: "AnswerTtl", - reason: "value must be greater than or equal to 30s", - } - } - - } - - return nil -} - -// DnsTable_DnsVirtualDomainValidationError is the validation error returned by -// DnsTable_DnsVirtualDomain.Validate if the designated constraints aren't met. -type DnsTable_DnsVirtualDomainValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsTable_DnsVirtualDomainValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsTable_DnsVirtualDomainValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsTable_DnsVirtualDomainValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsTable_DnsVirtualDomainValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsTable_DnsVirtualDomainValidationError) ErrorName() string { - return "DnsTable_DnsVirtualDomainValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsTable_DnsVirtualDomainValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsTable_DnsVirtualDomain.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsTable_DnsVirtualDomainValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsTable_DnsVirtualDomainValidationError{} - -var _DnsTable_DnsVirtualDomain_Name_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") diff --git a/pkg/api/envoy/data/tap/v2alpha/common.pb.go b/pkg/api/envoy/data/tap/v2alpha/common.pb.go index c382be1117..1a767a7286 100644 --- a/pkg/api/envoy/data/tap/v2alpha/common.pb.go +++ b/pkg/api/envoy/data/tap/v2alpha/common.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v2alpha/common.proto -package envoy_data_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Wrapper for tapped body data. This includes HTTP request/response body, transport socket received // and transmitted data, etc. type Body struct { @@ -141,12 +136,16 @@ var file_envoy_data_tap_v2alpha_common_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x61, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x0b, - 0x0a, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x3d, 0x0a, 0x24, 0x69, + 0x0a, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x7c, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/data/tap/v2alpha/common.pb.validate.go b/pkg/api/envoy/data/tap/v2alpha/common.pb.validate.go index c2a6bf0a30..1812891b34 100644 --- a/pkg/api/envoy/data/tap/v2alpha/common.pb.validate.go +++ b/pkg/api/envoy/data/tap/v2alpha/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v2alpha/common.proto -package envoy_data_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,16 +31,31 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Body with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Body) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Body with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in BodyMultiError, or nil if none found. +func (m *Body) ValidateAll() error { + return m.validate(true) +} + +func (m *Body) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Truncated switch m.BodyType.(type) { @@ -52,9 +68,29 @@ func (m *Body) Validate() error { } + if len(errors) > 0 { + return BodyMultiError(errors) + } + return nil } +// BodyMultiError is an error wrapping multiple validation errors returned by +// Body.ValidateAll() if the designated constraints aren't met. +type BodyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BodyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BodyMultiError) AllErrors() []error { return m } + // BodyValidationError is the validation error returned by Body.Validate if the // designated constraints aren't met. type BodyValidationError struct { diff --git a/pkg/api/envoy/data/tap/v2alpha/http.pb.go b/pkg/api/envoy/data/tap/v2alpha/http.pb.go index 53f514efe3..e19eb64bf4 100644 --- a/pkg/api/envoy/data/tap/v2alpha/http.pb.go +++ b/pkg/api/envoy/data/tap/v2alpha/http.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v2alpha/http.proto -package envoy_data_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A fully buffered HTTP trace message. type HttpBufferedTrace struct { state protoimpl.MessageState @@ -374,11 +369,15 @@ var file_envoy_data_tap_v2alpha_http_proto_rawDesc = []byte{ 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x42, 0x3b, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x42, 0x7a, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x09, - 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, + 0x61, 0x70, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/tap/v2alpha/http.pb.validate.go b/pkg/api/envoy/data/tap/v2alpha/http.pb.validate.go index 5c8174ec3f..a82b3563a0 100644 --- a/pkg/api/envoy/data/tap/v2alpha/http.pb.validate.go +++ b/pkg/api/envoy/data/tap/v2alpha/http.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v2alpha/http.proto -package envoy_data_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpBufferedTrace with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HttpBufferedTrace) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBufferedTrace with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpBufferedTraceMultiError, or nil if none found. +func (m *HttpBufferedTrace) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBufferedTrace) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Request", @@ -51,7 +86,26 @@ func (m *HttpBufferedTrace) Validate() error { } } - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Response", @@ -61,9 +115,30 @@ func (m *HttpBufferedTrace) Validate() error { } } + if len(errors) > 0 { + return HttpBufferedTraceMultiError(errors) + } + return nil } +// HttpBufferedTraceMultiError is an error wrapping multiple validation errors +// returned by HttpBufferedTrace.ValidateAll() if the designated constraints +// aren't met. +type HttpBufferedTraceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBufferedTraceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBufferedTraceMultiError) AllErrors() []error { return m } + // HttpBufferedTraceValidationError is the validation error returned by // HttpBufferedTrace.Validate if the designated constraints aren't met. type HttpBufferedTraceValidationError struct { @@ -122,19 +197,52 @@ var _ interface { // Validate checks the field values on HttpStreamedTraceSegment with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpStreamedTraceSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpStreamedTraceSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpStreamedTraceSegmentMultiError, or nil if none found. +func (m *HttpStreamedTraceSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpStreamedTraceSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TraceId switch m.MessagePiece.(type) { case *HttpStreamedTraceSegment_RequestHeaders: - if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestHeaders", @@ -146,7 +254,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_RequestBodyChunk: - if v, ok := interface{}(m.GetRequestBodyChunk()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestBodyChunk()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestBodyChunk()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestBodyChunk", @@ -158,7 +285,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_RequestTrailers: - if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestTrailers", @@ -170,7 +316,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_ResponseHeaders: - if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseHeaders", @@ -182,7 +347,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_ResponseBodyChunk: - if v, ok := interface{}(m.GetResponseBodyChunk()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseBodyChunk()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseBodyChunk()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseBodyChunk", @@ -194,7 +378,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_ResponseTrailers: - if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseTrailers", @@ -206,9 +409,30 @@ func (m *HttpStreamedTraceSegment) Validate() error { } + if len(errors) > 0 { + return HttpStreamedTraceSegmentMultiError(errors) + } + return nil } +// HttpStreamedTraceSegmentMultiError is an error wrapping multiple validation +// errors returned by HttpStreamedTraceSegment.ValidateAll() if the designated +// constraints aren't met. +type HttpStreamedTraceSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpStreamedTraceSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpStreamedTraceSegmentMultiError) AllErrors() []error { return m } + // HttpStreamedTraceSegmentValidationError is the validation error returned by // HttpStreamedTraceSegment.Validate if the designated constraints aren't met. type HttpStreamedTraceSegmentValidationError struct { @@ -267,16 +491,49 @@ var _ interface { // Validate checks the field values on HttpBufferedTrace_Message with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpBufferedTrace_Message) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBufferedTrace_Message with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpBufferedTrace_MessageMultiError, or nil if none found. +func (m *HttpBufferedTrace_Message) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBufferedTrace_Message) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -288,7 +545,26 @@ func (m *HttpBufferedTrace_Message) Validate() error { } - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: "Body", @@ -301,7 +577,26 @@ func (m *HttpBufferedTrace_Message) Validate() error { for idx, item := range m.GetTrailers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Trailers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Trailers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Trailers[%v]", idx), @@ -313,9 +608,30 @@ func (m *HttpBufferedTrace_Message) Validate() error { } + if len(errors) > 0 { + return HttpBufferedTrace_MessageMultiError(errors) + } + return nil } +// HttpBufferedTrace_MessageMultiError is an error wrapping multiple validation +// errors returned by HttpBufferedTrace_Message.ValidateAll() if the +// designated constraints aren't met. +type HttpBufferedTrace_MessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBufferedTrace_MessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBufferedTrace_MessageMultiError) AllErrors() []error { return m } + // HttpBufferedTrace_MessageValidationError is the validation error returned by // HttpBufferedTrace_Message.Validate if the designated constraints aren't met. type HttpBufferedTrace_MessageValidationError struct { diff --git a/pkg/api/envoy/data/tap/v2alpha/transport.pb.go b/pkg/api/envoy/data/tap/v2alpha/transport.pb.go index 3447ab2ec2..196273c588 100644 --- a/pkg/api/envoy/data/tap/v2alpha/transport.pb.go +++ b/pkg/api/envoy/data/tap/v2alpha/transport.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v2alpha/transport.proto -package envoy_data_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Connection properties. type Connection struct { state protoimpl.MessageState @@ -601,12 +596,16 @@ var file_envoy_data_tap_v2alpha_transport_proto_rawDesc = []byte{ 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, - 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x42, 0x40, + 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x42, 0x7f, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/tap/v2alpha/transport.pb.validate.go b/pkg/api/envoy/data/tap/v2alpha/transport.pb.validate.go index cd28347048..6b8f32c05f 100644 --- a/pkg/api/envoy/data/tap/v2alpha/transport.pb.validate.go +++ b/pkg/api/envoy/data/tap/v2alpha/transport.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v2alpha/transport.proto -package envoy_data_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Connection with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Connection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Connection with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConnectionMultiError, or +// nil if none found. +func (m *Connection) ValidateAll() error { + return m.validate(true) +} + +func (m *Connection) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "LocalAddress", @@ -50,7 +86,26 @@ func (m *Connection) Validate() error { } } - if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "RemoteAddress", @@ -60,9 +115,29 @@ func (m *Connection) Validate() error { } } + if len(errors) > 0 { + return ConnectionMultiError(errors) + } + return nil } +// ConnectionMultiError is an error wrapping multiple validation errors +// returned by Connection.ValidateAll() if the designated constraints aren't met. +type ConnectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectionMultiError) AllErrors() []error { return m } + // ConnectionValidationError is the validation error returned by // Connection.Validate if the designated constraints aren't met. type ConnectionValidationError struct { @@ -118,14 +193,47 @@ var _ interface { } = ConnectionValidationError{} // Validate checks the field values on SocketEvent with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SocketEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SocketEventMultiError, or +// nil if none found. +func (m *SocketEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Timestamp", @@ -139,7 +247,26 @@ func (m *SocketEvent) Validate() error { case *SocketEvent_Read_: - if v, ok := interface{}(m.GetRead()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRead()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Read", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Read", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRead()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Read", @@ -151,7 +278,26 @@ func (m *SocketEvent) Validate() error { case *SocketEvent_Write_: - if v, ok := interface{}(m.GetWrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Write", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Write", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Write", @@ -163,7 +309,26 @@ func (m *SocketEvent) Validate() error { case *SocketEvent_Closed_: - if v, ok := interface{}(m.GetClosed()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClosed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Closed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Closed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClosed()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Closed", @@ -175,9 +340,29 @@ func (m *SocketEvent) Validate() error { } + if len(errors) > 0 { + return SocketEventMultiError(errors) + } + return nil } +// SocketEventMultiError is an error wrapping multiple validation errors +// returned by SocketEvent.ValidateAll() if the designated constraints aren't met. +type SocketEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEventMultiError) AllErrors() []error { return m } + // SocketEventValidationError is the validation error returned by // SocketEvent.Validate if the designated constraints aren't met. type SocketEventValidationError struct { @@ -234,15 +419,48 @@ var _ interface { // Validate checks the field values on SocketBufferedTrace with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SocketBufferedTrace) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketBufferedTrace with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketBufferedTraceMultiError, or nil if none found. +func (m *SocketBufferedTrace) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketBufferedTrace) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TraceId - if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: "Connection", @@ -255,7 +473,26 @@ func (m *SocketBufferedTrace) Validate() error { for idx, item := range m.GetEvents() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: fmt.Sprintf("Events[%v]", idx), @@ -271,9 +508,30 @@ func (m *SocketBufferedTrace) Validate() error { // no validation rules for WriteTruncated + if len(errors) > 0 { + return SocketBufferedTraceMultiError(errors) + } + return nil } +// SocketBufferedTraceMultiError is an error wrapping multiple validation +// errors returned by SocketBufferedTrace.ValidateAll() if the designated +// constraints aren't met. +type SocketBufferedTraceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketBufferedTraceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketBufferedTraceMultiError) AllErrors() []error { return m } + // SocketBufferedTraceValidationError is the validation error returned by // SocketBufferedTrace.Validate if the designated constraints aren't met. type SocketBufferedTraceValidationError struct { @@ -332,19 +590,52 @@ var _ interface { // Validate checks the field values on SocketStreamedTraceSegment with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SocketStreamedTraceSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketStreamedTraceSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketStreamedTraceSegmentMultiError, or nil if none found. +func (m *SocketStreamedTraceSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketStreamedTraceSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TraceId switch m.MessagePiece.(type) { case *SocketStreamedTraceSegment_Connection: - if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Connection", @@ -356,7 +647,26 @@ func (m *SocketStreamedTraceSegment) Validate() error { case *SocketStreamedTraceSegment_Event: - if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Event", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Event", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Event", @@ -368,9 +678,30 @@ func (m *SocketStreamedTraceSegment) Validate() error { } + if len(errors) > 0 { + return SocketStreamedTraceSegmentMultiError(errors) + } + return nil } +// SocketStreamedTraceSegmentMultiError is an error wrapping multiple +// validation errors returned by SocketStreamedTraceSegment.ValidateAll() if +// the designated constraints aren't met. +type SocketStreamedTraceSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketStreamedTraceSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketStreamedTraceSegmentMultiError) AllErrors() []error { return m } + // SocketStreamedTraceSegmentValidationError is the validation error returned // by SocketStreamedTraceSegment.Validate if the designated constraints aren't met. type SocketStreamedTraceSegmentValidationError struct { @@ -428,14 +759,47 @@ var _ interface { } = SocketStreamedTraceSegmentValidationError{} // Validate checks the field values on SocketEvent_Read with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SocketEvent_Read) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Read with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketEvent_ReadMultiError, or nil if none found. +func (m *SocketEvent_Read) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Read) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEvent_ReadValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEvent_ReadValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_ReadValidationError{ field: "Data", @@ -445,9 +809,30 @@ func (m *SocketEvent_Read) Validate() error { } } + if len(errors) > 0 { + return SocketEvent_ReadMultiError(errors) + } + return nil } +// SocketEvent_ReadMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Read.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_ReadMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_ReadMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_ReadMultiError) AllErrors() []error { return m } + // SocketEvent_ReadValidationError is the validation error returned by // SocketEvent_Read.Validate if the designated constraints aren't met. type SocketEvent_ReadValidationError struct { @@ -503,14 +888,47 @@ var _ interface { } = SocketEvent_ReadValidationError{} // Validate checks the field values on SocketEvent_Write with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SocketEvent_Write) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Write with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketEvent_WriteMultiError, or nil if none found. +func (m *SocketEvent_Write) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Write) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEvent_WriteValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEvent_WriteValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_WriteValidationError{ field: "Data", @@ -522,9 +940,30 @@ func (m *SocketEvent_Write) Validate() error { // no validation rules for EndStream + if len(errors) > 0 { + return SocketEvent_WriteMultiError(errors) + } + return nil } +// SocketEvent_WriteMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Write.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_WriteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_WriteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_WriteMultiError) AllErrors() []error { return m } + // SocketEvent_WriteValidationError is the validation error returned by // SocketEvent_Write.Validate if the designated constraints aren't met. type SocketEvent_WriteValidationError struct { @@ -583,15 +1022,50 @@ var _ interface { // Validate checks the field values on SocketEvent_Closed with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SocketEvent_Closed) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Closed with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketEvent_ClosedMultiError, or nil if none found. +func (m *SocketEvent_Closed) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Closed) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SocketEvent_ClosedMultiError(errors) + } + return nil } +// SocketEvent_ClosedMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Closed.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_ClosedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_ClosedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_ClosedMultiError) AllErrors() []error { return m } + // SocketEvent_ClosedValidationError is the validation error returned by // SocketEvent_Closed.Validate if the designated constraints aren't met. type SocketEvent_ClosedValidationError struct { diff --git a/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.go b/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.go index 16b2216da0..cab06d8274 100644 --- a/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.go +++ b/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v2alpha/wrapper.proto -package envoy_data_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Wrapper for all fully buffered and streamed tap traces that Envoy emits. This is required for // sending traces over gRPC APIs or more easily persisting binary messages to files. type TraceWrapper struct { @@ -184,12 +179,16 @@ var file_envoy_data_tap_v2alpha_wrapper_proto_rawDesc = []byte{ 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0c, - 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3e, 0x0a, 0x24, + 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x7d, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.validate.go b/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.validate.go index 029a7781e6..69af343802 100644 --- a/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.validate.go +++ b/pkg/api/envoy/data/tap/v2alpha/wrapper.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v2alpha/wrapper.proto -package envoy_data_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TraceWrapper with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TraceWrapper) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TraceWrapper with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TraceWrapperMultiError, or +// nil if none found. +func (m *TraceWrapper) ValidateAll() error { + return m.validate(true) +} + +func (m *TraceWrapper) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Trace.(type) { case *TraceWrapper_HttpBufferedTrace: - if v, ok := interface{}(m.GetHttpBufferedTrace()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpBufferedTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpBufferedTrace()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpBufferedTrace", @@ -57,7 +92,26 @@ func (m *TraceWrapper) Validate() error { case *TraceWrapper_HttpStreamedTraceSegment: - if v, ok := interface{}(m.GetHttpStreamedTraceSegment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpStreamedTraceSegment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpStreamedTraceSegment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpStreamedTraceSegment", @@ -69,7 +123,26 @@ func (m *TraceWrapper) Validate() error { case *TraceWrapper_SocketBufferedTrace: - if v, ok := interface{}(m.GetSocketBufferedTrace()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSocketBufferedTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketBufferedTrace()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketBufferedTrace", @@ -81,7 +154,26 @@ func (m *TraceWrapper) Validate() error { case *TraceWrapper_SocketStreamedTraceSegment: - if v, ok := interface{}(m.GetSocketStreamedTraceSegment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSocketStreamedTraceSegment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketStreamedTraceSegment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketStreamedTraceSegment", @@ -92,16 +184,40 @@ func (m *TraceWrapper) Validate() error { } default: - return TraceWrapperValidationError{ + err := TraceWrapperValidationError{ field: "Trace", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return TraceWrapperMultiError(errors) } return nil } +// TraceWrapperMultiError is an error wrapping multiple validation errors +// returned by TraceWrapper.ValidateAll() if the designated constraints aren't met. +type TraceWrapperMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TraceWrapperMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TraceWrapperMultiError) AllErrors() []error { return m } + // TraceWrapperValidationError is the validation error returned by // TraceWrapper.Validate if the designated constraints aren't met. type TraceWrapperValidationError struct { diff --git a/pkg/api/envoy/data/tap/v3/common.pb.go b/pkg/api/envoy/data/tap/v3/common.pb.go index 88bf8d2aa5..b30bef3e09 100644 --- a/pkg/api/envoy/data/tap/v3/common.pb.go +++ b/pkg/api/envoy/data/tap/v3/common.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v3/common.proto -package envoy_data_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Wrapper for tapped body data. This includes HTTP request/response body, transport socket received // and transmitted data, etc. type Body struct { @@ -39,9 +34,9 @@ type Body struct { BodyType isBody_BodyType `protobuf_oneof:"body_type"` // Specifies whether body data has been truncated to fit within the specified // :ref:`max_buffered_rx_bytes - // ` and + // ` and // :ref:`max_buffered_tx_bytes - // ` settings. + // ` settings. Truncated bool `protobuf:"varint,3,opt,name=truncated,proto3" json:"truncated,omitempty"` } @@ -117,7 +112,7 @@ type Body_AsBytes struct { type Body_AsString struct { // Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING - // ` sink + // ` sink // format type is selected. See the documentation for that option for why this is useful. AsString string `protobuf:"bytes,2,opt,name=as_string,json=asString,proto3,oneof"` } @@ -145,10 +140,14 @@ var file_envoy_data_tap_v3_common_proto_rawDesc = []byte{ 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x0b, 0x0a, 0x09, - 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x38, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, + 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x78, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, + 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/data/tap/v3/common.pb.validate.go b/pkg/api/envoy/data/tap/v3/common.pb.validate.go index 37e11c9134..5ed71c1878 100644 --- a/pkg/api/envoy/data/tap/v3/common.pb.validate.go +++ b/pkg/api/envoy/data/tap/v3/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v3/common.proto -package envoy_data_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,16 +31,31 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Body with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Body) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Body with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in BodyMultiError, or nil if none found. +func (m *Body) ValidateAll() error { + return m.validate(true) +} + +func (m *Body) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Truncated switch m.BodyType.(type) { @@ -52,9 +68,29 @@ func (m *Body) Validate() error { } + if len(errors) > 0 { + return BodyMultiError(errors) + } + return nil } +// BodyMultiError is an error wrapping multiple validation errors returned by +// Body.ValidateAll() if the designated constraints aren't met. +type BodyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BodyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BodyMultiError) AllErrors() []error { return m } + // BodyValidationError is the validation error returned by Body.Validate if the // designated constraints aren't met. type BodyValidationError struct { diff --git a/pkg/api/envoy/data/tap/v3/http.pb.go b/pkg/api/envoy/data/tap/v3/http.pb.go index 3b4e9a4e6c..1138ba3d7e 100644 --- a/pkg/api/envoy/data/tap/v3/http.pb.go +++ b/pkg/api/envoy/data/tap/v3/http.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v3/http.proto -package envoy_data_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A fully buffered HTTP trace message. type HttpBufferedTrace struct { state protoimpl.MessageState @@ -385,10 +380,14 @@ var file_envoy_data_tap_v3_http_proto_rawDesc = []byte{ 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x42, 0x36, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, + 0x67, 0x65, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x42, 0x76, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x48, 0x74, 0x74, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, + 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/data/tap/v3/http.pb.validate.go b/pkg/api/envoy/data/tap/v3/http.pb.validate.go index ea09bcc776..c4e64c5cdb 100644 --- a/pkg/api/envoy/data/tap/v3/http.pb.validate.go +++ b/pkg/api/envoy/data/tap/v3/http.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v3/http.proto -package envoy_data_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpBufferedTrace with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HttpBufferedTrace) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBufferedTrace with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpBufferedTraceMultiError, or nil if none found. +func (m *HttpBufferedTrace) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBufferedTrace) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Request", @@ -51,7 +86,26 @@ func (m *HttpBufferedTrace) Validate() error { } } - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Response", @@ -61,9 +115,30 @@ func (m *HttpBufferedTrace) Validate() error { } } + if len(errors) > 0 { + return HttpBufferedTraceMultiError(errors) + } + return nil } +// HttpBufferedTraceMultiError is an error wrapping multiple validation errors +// returned by HttpBufferedTrace.ValidateAll() if the designated constraints +// aren't met. +type HttpBufferedTraceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBufferedTraceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBufferedTraceMultiError) AllErrors() []error { return m } + // HttpBufferedTraceValidationError is the validation error returned by // HttpBufferedTrace.Validate if the designated constraints aren't met. type HttpBufferedTraceValidationError struct { @@ -122,19 +197,52 @@ var _ interface { // Validate checks the field values on HttpStreamedTraceSegment with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpStreamedTraceSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpStreamedTraceSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpStreamedTraceSegmentMultiError, or nil if none found. +func (m *HttpStreamedTraceSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpStreamedTraceSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TraceId switch m.MessagePiece.(type) { case *HttpStreamedTraceSegment_RequestHeaders: - if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestHeaders", @@ -146,7 +254,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_RequestBodyChunk: - if v, ok := interface{}(m.GetRequestBodyChunk()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestBodyChunk()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestBodyChunk()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestBodyChunk", @@ -158,7 +285,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_RequestTrailers: - if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestTrailers", @@ -170,7 +316,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_ResponseHeaders: - if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseHeaders", @@ -182,7 +347,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_ResponseBodyChunk: - if v, ok := interface{}(m.GetResponseBodyChunk()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseBodyChunk()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseBodyChunk()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseBodyChunk", @@ -194,7 +378,26 @@ func (m *HttpStreamedTraceSegment) Validate() error { case *HttpStreamedTraceSegment_ResponseTrailers: - if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseTrailers", @@ -206,9 +409,30 @@ func (m *HttpStreamedTraceSegment) Validate() error { } + if len(errors) > 0 { + return HttpStreamedTraceSegmentMultiError(errors) + } + return nil } +// HttpStreamedTraceSegmentMultiError is an error wrapping multiple validation +// errors returned by HttpStreamedTraceSegment.ValidateAll() if the designated +// constraints aren't met. +type HttpStreamedTraceSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpStreamedTraceSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpStreamedTraceSegmentMultiError) AllErrors() []error { return m } + // HttpStreamedTraceSegmentValidationError is the validation error returned by // HttpStreamedTraceSegment.Validate if the designated constraints aren't met. type HttpStreamedTraceSegmentValidationError struct { @@ -267,16 +491,49 @@ var _ interface { // Validate checks the field values on HttpBufferedTrace_Message with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpBufferedTrace_Message) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBufferedTrace_Message with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpBufferedTrace_MessageMultiError, or nil if none found. +func (m *HttpBufferedTrace_Message) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBufferedTrace_Message) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -288,7 +545,26 @@ func (m *HttpBufferedTrace_Message) Validate() error { } - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: "Body", @@ -301,7 +577,26 @@ func (m *HttpBufferedTrace_Message) Validate() error { for idx, item := range m.GetTrailers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Trailers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Trailers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Trailers[%v]", idx), @@ -313,9 +608,30 @@ func (m *HttpBufferedTrace_Message) Validate() error { } + if len(errors) > 0 { + return HttpBufferedTrace_MessageMultiError(errors) + } + return nil } +// HttpBufferedTrace_MessageMultiError is an error wrapping multiple validation +// errors returned by HttpBufferedTrace_Message.ValidateAll() if the +// designated constraints aren't met. +type HttpBufferedTrace_MessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBufferedTrace_MessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBufferedTrace_MessageMultiError) AllErrors() []error { return m } + // HttpBufferedTrace_MessageValidationError is the validation error returned by // HttpBufferedTrace_Message.Validate if the designated constraints aren't met. type HttpBufferedTrace_MessageValidationError struct { diff --git a/pkg/api/envoy/data/tap/v3/transport.pb.go b/pkg/api/envoy/data/tap/v3/transport.pb.go index 14ba13f36a..8dd10c9166 100644 --- a/pkg/api/envoy/data/tap/v3/transport.pb.go +++ b/pkg/api/envoy/data/tap/v3/transport.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v3/transport.proto -package envoy_data_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Connection properties. type Connection struct { state protoimpl.MessageState @@ -207,10 +202,10 @@ type SocketBufferedTrace struct { // Sequence of observed events. Events []*SocketEvent `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` // Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes - // ` setting. + // ` setting. ReadTruncated bool `protobuf:"varint,4,opt,name=read_truncated,json=readTruncated,proto3" json:"read_truncated,omitempty"` // Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes - // ` setting. + // ` setting. WriteTruncated bool `protobuf:"varint,5,opt,name=write_truncated,json=writeTruncated,proto3" json:"write_truncated,omitempty"` } @@ -622,10 +617,14 @@ var file_envoy_data_tap_v3_transport_proto_rawDesc = []byte{ 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, - 0x69, 0x65, 0x63, 0x65, 0x42, 0x3b, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x69, 0x65, 0x63, 0x65, 0x42, 0x7b, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/data/tap/v3/transport.pb.validate.go b/pkg/api/envoy/data/tap/v3/transport.pb.validate.go index 3047be5cfd..156a086e36 100644 --- a/pkg/api/envoy/data/tap/v3/transport.pb.validate.go +++ b/pkg/api/envoy/data/tap/v3/transport.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v3/transport.proto -package envoy_data_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Connection with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Connection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Connection with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConnectionMultiError, or +// nil if none found. +func (m *Connection) ValidateAll() error { + return m.validate(true) +} + +func (m *Connection) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "LocalAddress", @@ -50,7 +86,26 @@ func (m *Connection) Validate() error { } } - if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "RemoteAddress", @@ -60,9 +115,29 @@ func (m *Connection) Validate() error { } } + if len(errors) > 0 { + return ConnectionMultiError(errors) + } + return nil } +// ConnectionMultiError is an error wrapping multiple validation errors +// returned by Connection.ValidateAll() if the designated constraints aren't met. +type ConnectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectionMultiError) AllErrors() []error { return m } + // ConnectionValidationError is the validation error returned by // Connection.Validate if the designated constraints aren't met. type ConnectionValidationError struct { @@ -118,14 +193,47 @@ var _ interface { } = ConnectionValidationError{} // Validate checks the field values on SocketEvent with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SocketEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SocketEventMultiError, or +// nil if none found. +func (m *SocketEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Timestamp", @@ -139,7 +247,26 @@ func (m *SocketEvent) Validate() error { case *SocketEvent_Read_: - if v, ok := interface{}(m.GetRead()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRead()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Read", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Read", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRead()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Read", @@ -151,7 +278,26 @@ func (m *SocketEvent) Validate() error { case *SocketEvent_Write_: - if v, ok := interface{}(m.GetWrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Write", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Write", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Write", @@ -163,7 +309,26 @@ func (m *SocketEvent) Validate() error { case *SocketEvent_Closed_: - if v, ok := interface{}(m.GetClosed()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClosed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Closed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Closed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClosed()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Closed", @@ -175,9 +340,29 @@ func (m *SocketEvent) Validate() error { } + if len(errors) > 0 { + return SocketEventMultiError(errors) + } + return nil } +// SocketEventMultiError is an error wrapping multiple validation errors +// returned by SocketEvent.ValidateAll() if the designated constraints aren't met. +type SocketEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEventMultiError) AllErrors() []error { return m } + // SocketEventValidationError is the validation error returned by // SocketEvent.Validate if the designated constraints aren't met. type SocketEventValidationError struct { @@ -234,15 +419,48 @@ var _ interface { // Validate checks the field values on SocketBufferedTrace with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SocketBufferedTrace) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketBufferedTrace with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketBufferedTraceMultiError, or nil if none found. +func (m *SocketBufferedTrace) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketBufferedTrace) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TraceId - if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: "Connection", @@ -255,7 +473,26 @@ func (m *SocketBufferedTrace) Validate() error { for idx, item := range m.GetEvents() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: fmt.Sprintf("Events[%v]", idx), @@ -271,9 +508,30 @@ func (m *SocketBufferedTrace) Validate() error { // no validation rules for WriteTruncated + if len(errors) > 0 { + return SocketBufferedTraceMultiError(errors) + } + return nil } +// SocketBufferedTraceMultiError is an error wrapping multiple validation +// errors returned by SocketBufferedTrace.ValidateAll() if the designated +// constraints aren't met. +type SocketBufferedTraceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketBufferedTraceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketBufferedTraceMultiError) AllErrors() []error { return m } + // SocketBufferedTraceValidationError is the validation error returned by // SocketBufferedTrace.Validate if the designated constraints aren't met. type SocketBufferedTraceValidationError struct { @@ -332,19 +590,52 @@ var _ interface { // Validate checks the field values on SocketStreamedTraceSegment with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SocketStreamedTraceSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketStreamedTraceSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketStreamedTraceSegmentMultiError, or nil if none found. +func (m *SocketStreamedTraceSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketStreamedTraceSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TraceId switch m.MessagePiece.(type) { case *SocketStreamedTraceSegment_Connection: - if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Connection", @@ -356,7 +647,26 @@ func (m *SocketStreamedTraceSegment) Validate() error { case *SocketStreamedTraceSegment_Event: - if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Event", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Event", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Event", @@ -368,9 +678,30 @@ func (m *SocketStreamedTraceSegment) Validate() error { } + if len(errors) > 0 { + return SocketStreamedTraceSegmentMultiError(errors) + } + return nil } +// SocketStreamedTraceSegmentMultiError is an error wrapping multiple +// validation errors returned by SocketStreamedTraceSegment.ValidateAll() if +// the designated constraints aren't met. +type SocketStreamedTraceSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketStreamedTraceSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketStreamedTraceSegmentMultiError) AllErrors() []error { return m } + // SocketStreamedTraceSegmentValidationError is the validation error returned // by SocketStreamedTraceSegment.Validate if the designated constraints aren't met. type SocketStreamedTraceSegmentValidationError struct { @@ -428,14 +759,47 @@ var _ interface { } = SocketStreamedTraceSegmentValidationError{} // Validate checks the field values on SocketEvent_Read with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SocketEvent_Read) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Read with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketEvent_ReadMultiError, or nil if none found. +func (m *SocketEvent_Read) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Read) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEvent_ReadValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEvent_ReadValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_ReadValidationError{ field: "Data", @@ -445,9 +809,30 @@ func (m *SocketEvent_Read) Validate() error { } } + if len(errors) > 0 { + return SocketEvent_ReadMultiError(errors) + } + return nil } +// SocketEvent_ReadMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Read.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_ReadMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_ReadMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_ReadMultiError) AllErrors() []error { return m } + // SocketEvent_ReadValidationError is the validation error returned by // SocketEvent_Read.Validate if the designated constraints aren't met. type SocketEvent_ReadValidationError struct { @@ -503,14 +888,47 @@ var _ interface { } = SocketEvent_ReadValidationError{} // Validate checks the field values on SocketEvent_Write with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SocketEvent_Write) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Write with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketEvent_WriteMultiError, or nil if none found. +func (m *SocketEvent_Write) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Write) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEvent_WriteValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEvent_WriteValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_WriteValidationError{ field: "Data", @@ -522,9 +940,30 @@ func (m *SocketEvent_Write) Validate() error { // no validation rules for EndStream + if len(errors) > 0 { + return SocketEvent_WriteMultiError(errors) + } + return nil } +// SocketEvent_WriteMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Write.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_WriteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_WriteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_WriteMultiError) AllErrors() []error { return m } + // SocketEvent_WriteValidationError is the validation error returned by // SocketEvent_Write.Validate if the designated constraints aren't met. type SocketEvent_WriteValidationError struct { @@ -583,15 +1022,50 @@ var _ interface { // Validate checks the field values on SocketEvent_Closed with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SocketEvent_Closed) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Closed with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketEvent_ClosedMultiError, or nil if none found. +func (m *SocketEvent_Closed) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Closed) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SocketEvent_ClosedMultiError(errors) + } + return nil } +// SocketEvent_ClosedMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Closed.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_ClosedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_ClosedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_ClosedMultiError) AllErrors() []error { return m } + // SocketEvent_ClosedValidationError is the validation error returned by // SocketEvent_Closed.Validate if the designated constraints aren't met. type SocketEvent_ClosedValidationError struct { diff --git a/pkg/api/envoy/data/tap/v3/wrapper.pb.go b/pkg/api/envoy/data/tap/v3/wrapper.pb.go index 9bcd2d88bb..0021f844a3 100644 --- a/pkg/api/envoy/data/tap/v3/wrapper.pb.go +++ b/pkg/api/envoy/data/tap/v3/wrapper.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/data/tap/v3/wrapper.proto -package envoy_data_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Wrapper for all fully buffered and streamed tap traces that Envoy emits. This is required for // sending traces over gRPC APIs or more easily persisting binary messages to files. type TraceWrapper struct { @@ -187,10 +182,14 @@ var file_envoy_data_tap_v3_wrapper_proto_rawDesc = []byte{ 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x42, 0x39, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0xf8, 0x42, 0x01, 0x42, 0x79, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, + 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/data/tap/v3/wrapper.pb.validate.go b/pkg/api/envoy/data/tap/v3/wrapper.pb.validate.go index 4674d1c1c0..6a7652e35c 100644 --- a/pkg/api/envoy/data/tap/v3/wrapper.pb.validate.go +++ b/pkg/api/envoy/data/tap/v3/wrapper.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/data/tap/v3/wrapper.proto -package envoy_data_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TraceWrapper with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TraceWrapper) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TraceWrapper with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TraceWrapperMultiError, or +// nil if none found. +func (m *TraceWrapper) ValidateAll() error { + return m.validate(true) +} + +func (m *TraceWrapper) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Trace.(type) { case *TraceWrapper_HttpBufferedTrace: - if v, ok := interface{}(m.GetHttpBufferedTrace()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpBufferedTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpBufferedTrace()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpBufferedTrace", @@ -57,7 +92,26 @@ func (m *TraceWrapper) Validate() error { case *TraceWrapper_HttpStreamedTraceSegment: - if v, ok := interface{}(m.GetHttpStreamedTraceSegment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpStreamedTraceSegment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpStreamedTraceSegment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpStreamedTraceSegment", @@ -69,7 +123,26 @@ func (m *TraceWrapper) Validate() error { case *TraceWrapper_SocketBufferedTrace: - if v, ok := interface{}(m.GetSocketBufferedTrace()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSocketBufferedTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketBufferedTrace()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketBufferedTrace", @@ -81,7 +154,26 @@ func (m *TraceWrapper) Validate() error { case *TraceWrapper_SocketStreamedTraceSegment: - if v, ok := interface{}(m.GetSocketStreamedTraceSegment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSocketStreamedTraceSegment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketStreamedTraceSegment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketStreamedTraceSegment", @@ -92,16 +184,40 @@ func (m *TraceWrapper) Validate() error { } default: - return TraceWrapperValidationError{ + err := TraceWrapperValidationError{ field: "Trace", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return TraceWrapperMultiError(errors) } return nil } +// TraceWrapperMultiError is an error wrapping multiple validation errors +// returned by TraceWrapper.ValidateAll() if the designated constraints aren't met. +type TraceWrapperMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TraceWrapperMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TraceWrapperMultiError) AllErrors() []error { return m } + // TraceWrapperValidationError is the validation error returned by // TraceWrapper.Validate if the designated constraints aren't met. type TraceWrapperValidationError struct { diff --git a/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.go b/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.go index 1f86c41d00..3a2204ecbb 100644 --- a/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.go +++ b/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.go @@ -1,16 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/access_loggers/file/v3/file.proto -package envoy_extensions_access_loggers_file_v3 +package filev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,11 +25,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Custom configuration for an :ref:`AccessLog ` +// Custom configuration for an :ref:`AccessLog ` // that writes log entries directly to a file. Configures the built-in *envoy.access_loggers.file* // AccessLog. // [#next-free-field: 6] @@ -190,25 +186,29 @@ var file_envoy_extensions_access_loggers_file_v3_file_proto_rawDesc = []byte{ 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x02, - 0x0a, 0x0d, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, - 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, - 0x48, 0x00, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, - 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x49, 0x0a, 0x11, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, - 0x18, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x46, + 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x90, 0x03, 0x0a, 0x0d, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x25, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, + 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, + 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x52, 0x0a, 0x11, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, + 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x59, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, @@ -219,12 +219,18 @@ var file_envoy_extensions_access_loggers_file_v3_file_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x4c, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, - 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, - 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0xa3, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x42, + 0x09, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x69, 0x6c, + 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.validate.go index 7fc68c538c..f10da55b90 100644 --- a/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.validate.go +++ b/pkg/api/envoy/extensions/access_loggers/file/v3/file.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/access_loggers/file/v3/file.proto -package envoy_extensions_access_loggers_file_v3 +package filev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,41 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FileAccessLog with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FileAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileAccessLog with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FileAccessLogMultiError, or +// nil if none found. +func (m *FileAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *FileAccessLog) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetPath()) < 1 { - return FileAccessLogValidationError{ + err := FileAccessLogValidationError{ field: "Path", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.AccessLogFormat.(type) { @@ -55,7 +75,26 @@ func (m *FileAccessLog) Validate() error { case *FileAccessLog_JsonFormat: - if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetJsonFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileAccessLogValidationError{ field: "JsonFormat", @@ -67,7 +106,26 @@ func (m *FileAccessLog) Validate() error { case *FileAccessLog_TypedJsonFormat: - if v, ok := interface{}(m.GetTypedJsonFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedJsonFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "TypedJsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "TypedJsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedJsonFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileAccessLogValidationError{ field: "TypedJsonFormat", @@ -80,13 +138,36 @@ func (m *FileAccessLog) Validate() error { case *FileAccessLog_LogFormat: if m.GetLogFormat() == nil { - return FileAccessLogValidationError{ + err := FileAccessLogValidationError{ field: "LogFormat", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLogFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileAccessLogValidationError{ field: "LogFormat", @@ -98,9 +179,30 @@ func (m *FileAccessLog) Validate() error { } + if len(errors) > 0 { + return FileAccessLogMultiError(errors) + } + return nil } +// FileAccessLogMultiError is an error wrapping multiple validation errors +// returned by FileAccessLog.ValidateAll() if the designated constraints +// aren't met. +type FileAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileAccessLogMultiError) AllErrors() []error { return m } + // FileAccessLogValidationError is the validation error returned by // FileAccessLog.Validate if the designated constraints aren't met. type FileAccessLogValidationError struct { diff --git a/pkg/api/envoy/extensions/access_loggers/file/v4alpha/file.pb.go b/pkg/api/envoy/extensions/access_loggers/file/v4alpha/file.pb.go deleted file mode 100644 index fe41b90159..0000000000 --- a/pkg/api/envoy/extensions/access_loggers/file/v4alpha/file.pb.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/access_loggers/file/v4alpha/file.proto - -package envoy_extensions_access_loggers_file_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Custom configuration for an :ref:`AccessLog ` -// that writes log entries directly to a file. Configures the built-in *envoy.access_loggers.file* -// AccessLog. -// [#next-free-field: 6] -type FileAccessLog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A path to a local file to which to write the access log entries. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Types that are assignable to AccessLogFormat: - // *FileAccessLog_HiddenEnvoyDeprecatedFormat - // *FileAccessLog_HiddenEnvoyDeprecatedJsonFormat - // *FileAccessLog_HiddenEnvoyDeprecatedTypedJsonFormat - // *FileAccessLog_LogFormat - AccessLogFormat isFileAccessLog_AccessLogFormat `protobuf_oneof:"access_log_format"` -} - -func (x *FileAccessLog) Reset() { - *x = FileAccessLog{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_access_loggers_file_v4alpha_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileAccessLog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileAccessLog) ProtoMessage() {} - -func (x *FileAccessLog) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_access_loggers_file_v4alpha_file_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileAccessLog.ProtoReflect.Descriptor instead. -func (*FileAccessLog) Descriptor() ([]byte, []int) { - return file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescGZIP(), []int{0} -} - -func (x *FileAccessLog) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (m *FileAccessLog) GetAccessLogFormat() isFileAccessLog_AccessLogFormat { - if m != nil { - return m.AccessLogFormat - } - return nil -} - -// Deprecated: Do not use. -func (x *FileAccessLog) GetHiddenEnvoyDeprecatedFormat() string { - if x, ok := x.GetAccessLogFormat().(*FileAccessLog_HiddenEnvoyDeprecatedFormat); ok { - return x.HiddenEnvoyDeprecatedFormat - } - return "" -} - -// Deprecated: Do not use. -func (x *FileAccessLog) GetHiddenEnvoyDeprecatedJsonFormat() *_struct.Struct { - if x, ok := x.GetAccessLogFormat().(*FileAccessLog_HiddenEnvoyDeprecatedJsonFormat); ok { - return x.HiddenEnvoyDeprecatedJsonFormat - } - return nil -} - -// Deprecated: Do not use. -func (x *FileAccessLog) GetHiddenEnvoyDeprecatedTypedJsonFormat() *_struct.Struct { - if x, ok := x.GetAccessLogFormat().(*FileAccessLog_HiddenEnvoyDeprecatedTypedJsonFormat); ok { - return x.HiddenEnvoyDeprecatedTypedJsonFormat - } - return nil -} - -func (x *FileAccessLog) GetLogFormat() *v4alpha.SubstitutionFormatString { - if x, ok := x.GetAccessLogFormat().(*FileAccessLog_LogFormat); ok { - return x.LogFormat - } - return nil -} - -type isFileAccessLog_AccessLogFormat interface { - isFileAccessLog_AccessLogFormat() -} - -type FileAccessLog_HiddenEnvoyDeprecatedFormat struct { - // Access log :ref:`format string`. - // Envoy supports :ref:`custom access log formats ` as well as a - // :ref:`default format `. - // This field is deprecated. - // Please use :ref:`log_format `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedFormat string `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_format,json=hiddenEnvoyDeprecatedFormat,proto3,oneof"` -} - -type FileAccessLog_HiddenEnvoyDeprecatedJsonFormat struct { - // Access log :ref:`format dictionary`. All values - // are rendered as strings. - // This field is deprecated. - // Please use :ref:`log_format `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedJsonFormat *_struct.Struct `protobuf:"bytes,3,opt,name=hidden_envoy_deprecated_json_format,json=hiddenEnvoyDeprecatedJsonFormat,proto3,oneof"` -} - -type FileAccessLog_HiddenEnvoyDeprecatedTypedJsonFormat struct { - // Access log :ref:`format dictionary`. Values are - // rendered as strings, numbers, or boolean values as appropriate. Nested JSON objects may - // be produced by some command operators (e.g.FILTER_STATE or DYNAMIC_METADATA). See the - // documentation for a specific command operator for details. - // This field is deprecated. - // Please use :ref:`log_format `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedTypedJsonFormat *_struct.Struct `protobuf:"bytes,4,opt,name=hidden_envoy_deprecated_typed_json_format,json=hiddenEnvoyDeprecatedTypedJsonFormat,proto3,oneof"` -} - -type FileAccessLog_LogFormat struct { - // Configuration to form access log data and format. - // If not specified, use :ref:`default format `. - LogFormat *v4alpha.SubstitutionFormatString `protobuf:"bytes,5,opt,name=log_format,json=logFormat,proto3,oneof"` -} - -func (*FileAccessLog_HiddenEnvoyDeprecatedFormat) isFileAccessLog_AccessLogFormat() {} - -func (*FileAccessLog_HiddenEnvoyDeprecatedJsonFormat) isFileAccessLog_AccessLogFormat() {} - -func (*FileAccessLog_HiddenEnvoyDeprecatedTypedJsonFormat) isFileAccessLog_AccessLogFormat() {} - -func (*FileAccessLog_LogFormat) isFileAccessLog_AccessLogFormat() {} - -var File_envoy_extensions_access_loggers_file_v4alpha_file_proto protoreflect.FileDescriptor - -var file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x66, - 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x04, 0x0a, - 0x0d, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x1b, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x1e, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x6b, 0x0a, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, - 0x48, 0x00, 0x52, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x76, 0x0a, 0x29, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, - 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x5e, 0x0a, 0x0a, 0x6c, - 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, - 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, - 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x51, - 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x09, 0x46, 0x69, - 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescOnce sync.Once - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescData = file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDesc -) - -func file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescGZIP() []byte { - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescOnce.Do(func() { - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescData) - }) - return file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDescData -} - -var file_envoy_extensions_access_loggers_file_v4alpha_file_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_access_loggers_file_v4alpha_file_proto_goTypes = []interface{}{ - (*FileAccessLog)(nil), // 0: envoy.extensions.access_loggers.file.v4alpha.FileAccessLog - (*_struct.Struct)(nil), // 1: google.protobuf.Struct - (*v4alpha.SubstitutionFormatString)(nil), // 2: envoy.config.core.v4alpha.SubstitutionFormatString -} -var file_envoy_extensions_access_loggers_file_v4alpha_file_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.access_loggers.file.v4alpha.FileAccessLog.hidden_envoy_deprecated_json_format:type_name -> google.protobuf.Struct - 1, // 1: envoy.extensions.access_loggers.file.v4alpha.FileAccessLog.hidden_envoy_deprecated_typed_json_format:type_name -> google.protobuf.Struct - 2, // 2: envoy.extensions.access_loggers.file.v4alpha.FileAccessLog.log_format:type_name -> envoy.config.core.v4alpha.SubstitutionFormatString - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_access_loggers_file_v4alpha_file_proto_init() } -func file_envoy_extensions_access_loggers_file_v4alpha_file_proto_init() { - if File_envoy_extensions_access_loggers_file_v4alpha_file_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileAccessLog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*FileAccessLog_HiddenEnvoyDeprecatedFormat)(nil), - (*FileAccessLog_HiddenEnvoyDeprecatedJsonFormat)(nil), - (*FileAccessLog_HiddenEnvoyDeprecatedTypedJsonFormat)(nil), - (*FileAccessLog_LogFormat)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_access_loggers_file_v4alpha_file_proto_goTypes, - DependencyIndexes: file_envoy_extensions_access_loggers_file_v4alpha_file_proto_depIdxs, - MessageInfos: file_envoy_extensions_access_loggers_file_v4alpha_file_proto_msgTypes, - }.Build() - File_envoy_extensions_access_loggers_file_v4alpha_file_proto = out.File - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_rawDesc = nil - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_goTypes = nil - file_envoy_extensions_access_loggers_file_v4alpha_file_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/access_loggers/file/v4alpha/file.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/file/v4alpha/file.pb.validate.go deleted file mode 100644 index 0488dadbe2..0000000000 --- a/pkg/api/envoy/extensions/access_loggers/file/v4alpha/file.pb.validate.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/access_loggers/file/v4alpha/file.proto - -package envoy_extensions_access_loggers_file_v4alpha - -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{} -) - -// Validate checks the field values on FileAccessLog with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *FileAccessLog) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetPath()) < 1 { - return FileAccessLogValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - } - - switch m.AccessLogFormat.(type) { - - case *FileAccessLog_HiddenEnvoyDeprecatedFormat: - // no validation rules for HiddenEnvoyDeprecatedFormat - - case *FileAccessLog_HiddenEnvoyDeprecatedJsonFormat: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedJsonFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FileAccessLogValidationError{ - field: "HiddenEnvoyDeprecatedJsonFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *FileAccessLog_HiddenEnvoyDeprecatedTypedJsonFormat: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedTypedJsonFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FileAccessLogValidationError{ - field: "HiddenEnvoyDeprecatedTypedJsonFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *FileAccessLog_LogFormat: - - if m.GetLogFormat() == nil { - return FileAccessLogValidationError{ - field: "LogFormat", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FileAccessLogValidationError{ - field: "LogFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// FileAccessLogValidationError is the validation error returned by -// FileAccessLog.Validate if the designated constraints aren't met. -type FileAccessLogValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FileAccessLogValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FileAccessLogValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FileAccessLogValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FileAccessLogValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FileAccessLogValidationError) ErrorName() string { return "FileAccessLogValidationError" } - -// Error satisfies the builtin error interface -func (e FileAccessLogValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFileAccessLog.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FileAccessLogValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FileAccessLogValidationError{} diff --git a/pkg/api/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.go b/pkg/api/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.go new file mode 100644 index 0000000000..8f188602f3 --- /dev/null +++ b/pkg/api/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.go @@ -0,0 +1,170 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/filters/cel/v3/cel.proto + +package celv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ExpressionFilter is an access logging filter that evaluates configured +// symbolic Common Expression Language expressions to inform the decision +// to generate an access log. +type ExpressionFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Expression that, when evaluated, will be used to filter access logs. + // Expressions are based on the set of Envoy :ref:`attributes `. + // The provided expression must evaluate to true for logging (expression errors are considered false). + // Examples: + // - `response.code >= 400` + // - `(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')` + Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"` +} + +func (x *ExpressionFilter) Reset() { + *x = ExpressionFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExpressionFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExpressionFilter) ProtoMessage() {} + +func (x *ExpressionFilter) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExpressionFilter.ProtoReflect.Descriptor instead. +func (*ExpressionFilter) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescGZIP(), []int{0} +} + +func (x *ExpressionFilter) GetExpression() string { + if x != nil { + return x.Expression + } + return "" +} + +var File_envoy_extensions_access_loggers_filters_cel_v3_cel_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x65, 0x6c, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x10, 0x45, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xaf, 0x01, + 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x08, + 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, + 0x72, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x65, 0x6c, 0x2f, 0x76, + 0x33, 0x3b, 0x63, 0x65, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData = file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_goTypes = []interface{}{ + (*ExpressionFilter)(nil), // 0: envoy.extensions.access_loggers.filters.cel.v3.ExpressionFilter +} +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_init() } +func file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_init() { + if File_envoy_extensions_access_loggers_filters_cel_v3_cel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExpressionFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_filters_cel_v3_cel_proto = out.File + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc = nil + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_goTypes = nil + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.validate.go new file mode 100644 index 0000000000..36b6d46e8d --- /dev/null +++ b/pkg/api/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/filters/cel/v3/cel.proto + +package celv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ExpressionFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ExpressionFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExpressionFilter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExpressionFilterMultiError, or nil if none found. +func (m *ExpressionFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ExpressionFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Expression + + if len(errors) > 0 { + return ExpressionFilterMultiError(errors) + } + + return nil +} + +// ExpressionFilterMultiError is an error wrapping multiple validation errors +// returned by ExpressionFilter.ValidateAll() if the designated constraints +// aren't met. +type ExpressionFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExpressionFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExpressionFilterMultiError) AllErrors() []error { return m } + +// ExpressionFilterValidationError is the validation error returned by +// ExpressionFilter.Validate if the designated constraints aren't met. +type ExpressionFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExpressionFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExpressionFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExpressionFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExpressionFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExpressionFilterValidationError) ErrorName() string { return "ExpressionFilterValidationError" } + +// Error satisfies the builtin error interface +func (e ExpressionFilterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExpressionFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExpressionFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExpressionFilterValidationError{} diff --git a/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.go b/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.go index 82728ab5e0..5d58ae7dbb 100644 --- a/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.go +++ b/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.go @@ -1,16 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/access_loggers/grpc/v3/als.proto -package envoy_extensions_access_loggers_grpc_v3 +package grpcv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/tracing/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,14 +26,10 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the built-in *envoy.access_loggers.http_grpc* -// :ref:`AccessLog `. This configuration will +// :ref:`AccessLog `. This configuration will // populate :ref:`StreamAccessLogsMessage.http_logs -// `. +// `. // [#extension: envoy.access_loggers.http_grpc] type HttpGrpcAccessLogConfig struct { state protoimpl.MessageState @@ -42,13 +38,13 @@ type HttpGrpcAccessLogConfig struct { CommonConfig *CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. AdditionalRequestHeadersToLog []string `protobuf:"bytes,2,rep,name=additional_request_headers_to_log,json=additionalRequestHeadersToLog,proto3" json:"additional_request_headers_to_log,omitempty"` // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. AdditionalResponseHeadersToLog []string `protobuf:"bytes,3,rep,name=additional_response_headers_to_log,json=additionalResponseHeadersToLog,proto3" json:"additional_response_headers_to_log,omitempty"` // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. AdditionalResponseTrailersToLog []string `protobuf:"bytes,4,rep,name=additional_response_trailers_to_log,json=additionalResponseTrailersToLog,proto3" json:"additional_response_trailers_to_log,omitempty"` } @@ -163,14 +159,14 @@ func (x *TcpGrpcAccessLogConfig) GetCommonConfig() *CommonGrpcAccessLogConfig { } // Common configuration for gRPC access logs. -// [#next-free-field: 7] +// [#next-free-field: 9] type CommonGrpcAccessLogConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier - // `. This allows the + // `. This allows the // access log server to differentiate between different access logs coming from the same Envoy. LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` // The gRPC service for the access log service. @@ -187,9 +183,19 @@ type CommonGrpcAccessLogConfig struct { // to zero effectively disables the batching. Defaults to 16384. BufferSizeBytes *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=buffer_size_bytes,json=bufferSizeBytes,proto3" json:"buffer_size_bytes,omitempty"` // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. FilterStateObjectsToLog []string `protobuf:"bytes,5,rep,name=filter_state_objects_to_log,json=filterStateObjectsToLog,proto3" json:"filter_state_objects_to_log,omitempty"` + // Sets the retry policy when the establishment of a gRPC stream fails. + // If the stream succeeds once in establishing If the stream succeeds + // at least once in establishing itself, no retry will be performed + // no matter what gRPC status is received. Note that only + // :ref:`num_retries ` + // will be used in this configuration. This feature is used only when you are using + // :ref:`Envoy gRPC client `. + GrpcStreamRetryPolicy *v3.RetryPolicy `protobuf:"bytes,7,opt,name=grpc_stream_retry_policy,json=grpcStreamRetryPolicy,proto3" json:"grpc_stream_retry_policy,omitempty"` + // A list of custom tags with unique tag name to create tags for the logs. + CustomTags []*v31.CustomTag `protobuf:"bytes,8,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` } func (x *CommonGrpcAccessLogConfig) Reset() { @@ -242,7 +248,7 @@ func (x *CommonGrpcAccessLogConfig) GetTransportApiVersion() v3.ApiVersion { if x != nil { return x.TransportApiVersion } - return v3.ApiVersion_AUTO + return v3.ApiVersion(0) } func (x *CommonGrpcAccessLogConfig) GetBufferFlushInterval() *duration.Duration { @@ -266,6 +272,20 @@ func (x *CommonGrpcAccessLogConfig) GetFilterStateObjectsToLog() []string { return nil } +func (x *CommonGrpcAccessLogConfig) GetGrpcStreamRetryPolicy() *v3.RetryPolicy { + if x != nil { + return x.GrpcStreamRetryPolicy + } + return nil +} + +func (x *CommonGrpcAccessLogConfig) GetCustomTags() []*v31.CustomTag { + if x != nil { + return x.CustomTags + } + return nil +} + var File_envoy_extensions_access_loggers_grpc_v3_als_proto protoreflect.FileDescriptor var file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDesc = []byte{ @@ -274,99 +294,119 @@ var file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDesc = []byte{ 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, - 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, + 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x03, 0x0a, 0x17, 0x48, - 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x71, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, - 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x21, 0x61, 0x64, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x4c, 0x6f, 0x67, 0x12, 0x4a, 0x0a, 0x22, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x1e, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, - 0x4c, 0x0a, 0x23, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1f, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x3a, 0x38, 0x9a, - 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc4, 0x01, 0x0a, 0x16, 0x54, 0x63, 0x70, 0x47, - 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x71, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x63, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, - 0x04, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x08, - 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, - 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x57, 0x0a, 0x15, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, - 0x01, 0x02, 0x2a, 0x00, 0x52, 0x13, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x46, 0x6c, 0x75, 0x73, - 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x62, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, - 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x6f, 0x4c, 0x6f, - 0x67, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4b, 0x0a, - 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, + 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x03, 0x0a, 0x17, 0x48, 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, 0x63, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x71, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x48, 0x0a, 0x21, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x4a, 0x0a, 0x22, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, + 0x6f, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x4c, 0x0a, 0x23, 0x61, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, + 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, + 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0xc4, 0x01, 0x0a, 0x16, 0x54, 0x63, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x71, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, + 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, + 0x2e, 0x54, 0x63, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xab, 0x05, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, + 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x15, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x13, 0x62, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x1b, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x5a, 0x0a, 0x18, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x15, 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa2, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, + 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, + 0x65, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -391,6 +431,8 @@ var file_envoy_extensions_access_loggers_grpc_v3_als_proto_goTypes = []interface (v3.ApiVersion)(0), // 4: envoy.config.core.v3.ApiVersion (*duration.Duration)(nil), // 5: google.protobuf.Duration (*wrappers.UInt32Value)(nil), // 6: google.protobuf.UInt32Value + (*v3.RetryPolicy)(nil), // 7: envoy.config.core.v3.RetryPolicy + (*v31.CustomTag)(nil), // 8: envoy.type.tracing.v3.CustomTag } var file_envoy_extensions_access_loggers_grpc_v3_als_proto_depIdxs = []int32{ 2, // 0: envoy.extensions.access_loggers.grpc.v3.HttpGrpcAccessLogConfig.common_config:type_name -> envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig @@ -399,11 +441,13 @@ var file_envoy_extensions_access_loggers_grpc_v3_als_proto_depIdxs = []int32{ 4, // 3: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion 5, // 4: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.buffer_flush_interval:type_name -> google.protobuf.Duration 6, // 5: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.buffer_size_bytes:type_name -> google.protobuf.UInt32Value - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 7, // 6: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.grpc_stream_retry_policy:type_name -> envoy.config.core.v3.RetryPolicy + 8, // 7: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_envoy_extensions_access_loggers_grpc_v3_als_proto_init() } diff --git a/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.validate.go index 056f77e116..d18a2dba19 100644 --- a/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.validate.go +++ b/pkg/api/envoy/extensions/access_loggers/grpc/v3/als.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/access_loggers/grpc/v3/als.proto -package envoy_extensions_access_loggers_grpc_v3 +package grpcv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,27 +33,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.ApiVersion(0) ) // Validate checks the field values on HttpGrpcAccessLogConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGrpcAccessLogConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpGrpcAccessLogConfigMultiError, or nil if none found. +func (m *HttpGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGrpcAccessLogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return HttpGrpcAccessLogConfigValidationError{ + err := HttpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpGrpcAccessLogConfigValidationError{ field: "CommonConfig", @@ -62,9 +101,30 @@ func (m *HttpGrpcAccessLogConfig) Validate() error { } } + if len(errors) > 0 { + return HttpGrpcAccessLogConfigMultiError(errors) + } + return nil } +// HttpGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by HttpGrpcAccessLogConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + // HttpGrpcAccessLogConfigValidationError is the validation error returned by // HttpGrpcAccessLogConfig.Validate if the designated constraints aren't met. type HttpGrpcAccessLogConfigValidationError struct { @@ -123,20 +183,57 @@ var _ interface { // Validate checks the field values on TcpGrpcAccessLogConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpGrpcAccessLogConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpGrpcAccessLogConfigMultiError, or nil if none found. +func (m *TcpGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpGrpcAccessLogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return TcpGrpcAccessLogConfigValidationError{ + err := TcpGrpcAccessLogConfigValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpGrpcAccessLogConfigValidationError{ field: "CommonConfig", @@ -146,9 +243,30 @@ func (m *TcpGrpcAccessLogConfig) Validate() error { } } + if len(errors) > 0 { + return TcpGrpcAccessLogConfigMultiError(errors) + } + return nil } +// TcpGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by TcpGrpcAccessLogConfig.ValidateAll() if the designated +// constraints aren't met. +type TcpGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + // TcpGrpcAccessLogConfigValidationError is the validation error returned by // TcpGrpcAccessLogConfig.Validate if the designated constraints aren't met. type TcpGrpcAccessLogConfigValidationError struct { @@ -207,27 +325,68 @@ var _ interface { // Validate checks the field values on CommonGrpcAccessLogConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommonGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonGrpcAccessLogConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonGrpcAccessLogConfigMultiError, or nil if none found. +func (m *CommonGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonGrpcAccessLogConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetLogName()) < 1 { - return CommonGrpcAccessLogConfigValidationError{ + err := CommonGrpcAccessLogConfigValidationError{ field: "LogName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetGrpcService() == nil { - return CommonGrpcAccessLogConfigValidationError{ + err := CommonGrpcAccessLogConfigValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonGrpcAccessLogConfigValidationError{ field: "GrpcService", @@ -238,46 +397,162 @@ func (m *CommonGrpcAccessLogConfig) Validate() error { } if _, ok := v3.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return CommonGrpcAccessLogConfigValidationError{ + err := CommonGrpcAccessLogConfigValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetBufferFlushInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return CommonGrpcAccessLogConfigValidationError{ + err = CommonGrpcAccessLogConfigValidationError{ field: "BufferFlushInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := CommonGrpcAccessLogConfigValidationError{ + field: "BufferFlushInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + } + } - if dur <= gt { + if all { + switch v := interface{}(m.GetBufferSizeBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferSizeBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { return CommonGrpcAccessLogConfigValidationError{ - field: "BufferFlushInterval", - reason: "value must be greater than 0s", + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, } } - } - if v, ok := interface{}(m.GetBufferSizeBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcStreamRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcStreamRetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcStreamRetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcStreamRetryPolicy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonGrpcAccessLogConfigValidationError{ - field: "BufferSizeBytes", + field: "GrpcStreamRetryPolicy", reason: "embedded message failed validation", cause: err, } } } + for idx, item := range m.GetCustomTags() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonGrpcAccessLogConfigValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CommonGrpcAccessLogConfigMultiError(errors) + } + return nil } +// CommonGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by CommonGrpcAccessLogConfig.ValidateAll() if the +// designated constraints aren't met. +type CommonGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + // CommonGrpcAccessLogConfigValidationError is the validation error returned by // CommonGrpcAccessLogConfig.Validate if the designated constraints aren't met. type CommonGrpcAccessLogConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/access_loggers/grpc/v4alpha/als.pb.go b/pkg/api/envoy/extensions/access_loggers/grpc/v4alpha/als.pb.go deleted file mode 100644 index ccc767abe5..0000000000 --- a/pkg/api/envoy/extensions/access_loggers/grpc/v4alpha/als.pb.go +++ /dev/null @@ -1,475 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/access_loggers/grpc/v4alpha/als.proto - -package envoy_extensions_access_loggers_grpc_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for the built-in *envoy.access_loggers.http_grpc* -// :ref:`AccessLog `. This configuration will -// populate :ref:`StreamAccessLogsMessage.http_logs -// `. -// [#extension: envoy.access_loggers.http_grpc] -type HttpGrpcAccessLogConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommonConfig *CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` - // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. - AdditionalRequestHeadersToLog []string `protobuf:"bytes,2,rep,name=additional_request_headers_to_log,json=additionalRequestHeadersToLog,proto3" json:"additional_request_headers_to_log,omitempty"` - // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. - AdditionalResponseHeadersToLog []string `protobuf:"bytes,3,rep,name=additional_response_headers_to_log,json=additionalResponseHeadersToLog,proto3" json:"additional_response_headers_to_log,omitempty"` - // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. - AdditionalResponseTrailersToLog []string `protobuf:"bytes,4,rep,name=additional_response_trailers_to_log,json=additionalResponseTrailersToLog,proto3" json:"additional_response_trailers_to_log,omitempty"` -} - -func (x *HttpGrpcAccessLogConfig) Reset() { - *x = HttpGrpcAccessLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpGrpcAccessLogConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpGrpcAccessLogConfig) ProtoMessage() {} - -func (x *HttpGrpcAccessLogConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpGrpcAccessLogConfig.ProtoReflect.Descriptor instead. -func (*HttpGrpcAccessLogConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescGZIP(), []int{0} -} - -func (x *HttpGrpcAccessLogConfig) GetCommonConfig() *CommonGrpcAccessLogConfig { - if x != nil { - return x.CommonConfig - } - return nil -} - -func (x *HttpGrpcAccessLogConfig) GetAdditionalRequestHeadersToLog() []string { - if x != nil { - return x.AdditionalRequestHeadersToLog - } - return nil -} - -func (x *HttpGrpcAccessLogConfig) GetAdditionalResponseHeadersToLog() []string { - if x != nil { - return x.AdditionalResponseHeadersToLog - } - return nil -} - -func (x *HttpGrpcAccessLogConfig) GetAdditionalResponseTrailersToLog() []string { - if x != nil { - return x.AdditionalResponseTrailersToLog - } - return nil -} - -// Configuration for the built-in *envoy.access_loggers.tcp_grpc* type. This configuration will -// populate *StreamAccessLogsMessage.tcp_logs*. -// [#extension: envoy.access_loggers.tcp_grpc] -type TcpGrpcAccessLogConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommonConfig *CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` -} - -func (x *TcpGrpcAccessLogConfig) Reset() { - *x = TcpGrpcAccessLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpGrpcAccessLogConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpGrpcAccessLogConfig) ProtoMessage() {} - -func (x *TcpGrpcAccessLogConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpGrpcAccessLogConfig.ProtoReflect.Descriptor instead. -func (*TcpGrpcAccessLogConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescGZIP(), []int{1} -} - -func (x *TcpGrpcAccessLogConfig) GetCommonConfig() *CommonGrpcAccessLogConfig { - if x != nil { - return x.CommonConfig - } - return nil -} - -// Common configuration for gRPC access logs. -// [#next-free-field: 7] -type CommonGrpcAccessLogConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier - // `. This allows the - // access log server to differentiate between different access logs coming from the same Envoy. - LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` - // The gRPC service for the access log service. - GrpcService *v4alpha.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` - // API version for access logs service transport protocol. This describes the access logs service - // gRPC endpoint and version of messages used on the wire. - TransportApiVersion v4alpha.ApiVersion `protobuf:"varint,6,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"transport_api_version,omitempty"` - // Interval for flushing access logs to the gRPC stream. Logger will flush requests every time - // this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to - // 1 second. - BufferFlushInterval *duration.Duration `protobuf:"bytes,3,opt,name=buffer_flush_interval,json=bufferFlushInterval,proto3" json:"buffer_flush_interval,omitempty"` - // Soft size limit in bytes for access log entries buffer. Logger will buffer requests until - // this limit it hit, or every time flush interval is elapsed, whichever comes first. Setting it - // to zero effectively disables the batching. Defaults to 16384. - BufferSizeBytes *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=buffer_size_bytes,json=bufferSizeBytes,proto3" json:"buffer_size_bytes,omitempty"` - // Additional filter state objects to log in :ref:`filter_state_objects - // `. - // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. - FilterStateObjectsToLog []string `protobuf:"bytes,5,rep,name=filter_state_objects_to_log,json=filterStateObjectsToLog,proto3" json:"filter_state_objects_to_log,omitempty"` -} - -func (x *CommonGrpcAccessLogConfig) Reset() { - *x = CommonGrpcAccessLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonGrpcAccessLogConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonGrpcAccessLogConfig) ProtoMessage() {} - -func (x *CommonGrpcAccessLogConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonGrpcAccessLogConfig.ProtoReflect.Descriptor instead. -func (*CommonGrpcAccessLogConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescGZIP(), []int{2} -} - -func (x *CommonGrpcAccessLogConfig) GetLogName() string { - if x != nil { - return x.LogName - } - return "" -} - -func (x *CommonGrpcAccessLogConfig) GetGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -func (x *CommonGrpcAccessLogConfig) GetTransportApiVersion() v4alpha.ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return v4alpha.ApiVersion_hidden_envoy_deprecated_AUTO -} - -func (x *CommonGrpcAccessLogConfig) GetBufferFlushInterval() *duration.Duration { - if x != nil { - return x.BufferFlushInterval - } - return nil -} - -func (x *CommonGrpcAccessLogConfig) GetBufferSizeBytes() *wrappers.UInt32Value { - if x != nil { - return x.BufferSizeBytes - } - return nil -} - -func (x *CommonGrpcAccessLogConfig) GetFilterStateObjectsToLog() []string { - if x != nil { - return x.FilterStateObjectsToLog - } - return nil -} - -var File_envoy_extensions_access_loggers_grpc_v4alpha_als_proto protoreflect.FileDescriptor - -var file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDesc = []byte{ - 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, - 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, - 0x03, 0x0a, 0x17, 0x48, 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x76, 0x0a, 0x0d, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, - 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x48, 0x0a, 0x21, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x61, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x4a, 0x0a, 0x22, - 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, - 0x6f, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x4c, 0x0a, 0x23, 0x61, 0x64, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, - 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, - 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xd7, - 0x01, 0x0a, 0x16, 0x54, 0x63, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x76, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, - 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x63, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa4, 0x04, 0x0a, 0x19, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x63, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x15, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, - 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x13, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, - 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x48, 0x0a, - 0x11, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, - 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, - 0x50, 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x41, - 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescOnce sync.Once - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescData = file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDesc -) - -func file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescGZIP() []byte { - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescOnce.Do(func() { - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescData) - }) - return file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDescData -} - -var file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_goTypes = []interface{}{ - (*HttpGrpcAccessLogConfig)(nil), // 0: envoy.extensions.access_loggers.grpc.v4alpha.HttpGrpcAccessLogConfig - (*TcpGrpcAccessLogConfig)(nil), // 1: envoy.extensions.access_loggers.grpc.v4alpha.TcpGrpcAccessLogConfig - (*CommonGrpcAccessLogConfig)(nil), // 2: envoy.extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig - (*v4alpha.GrpcService)(nil), // 3: envoy.config.core.v4alpha.GrpcService - (v4alpha.ApiVersion)(0), // 4: envoy.config.core.v4alpha.ApiVersion - (*duration.Duration)(nil), // 5: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 6: google.protobuf.UInt32Value -} -var file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.access_loggers.grpc.v4alpha.HttpGrpcAccessLogConfig.common_config:type_name -> envoy.extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig - 2, // 1: envoy.extensions.access_loggers.grpc.v4alpha.TcpGrpcAccessLogConfig.common_config:type_name -> envoy.extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig - 3, // 2: envoy.extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 4, // 3: envoy.extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig.transport_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 5, // 4: envoy.extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig.buffer_flush_interval:type_name -> google.protobuf.Duration - 6, // 5: envoy.extensions.access_loggers.grpc.v4alpha.CommonGrpcAccessLogConfig.buffer_size_bytes:type_name -> google.protobuf.UInt32Value - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_init() } -func file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_init() { - if File_envoy_extensions_access_loggers_grpc_v4alpha_als_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpGrpcAccessLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpGrpcAccessLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonGrpcAccessLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_goTypes, - DependencyIndexes: file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_depIdxs, - MessageInfos: file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_msgTypes, - }.Build() - File_envoy_extensions_access_loggers_grpc_v4alpha_als_proto = out.File - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_rawDesc = nil - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_goTypes = nil - file_envoy_extensions_access_loggers_grpc_v4alpha_als_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/access_loggers/grpc/v4alpha/als.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/grpc/v4alpha/als.pb.validate.go deleted file mode 100644 index 14c1c834f0..0000000000 --- a/pkg/api/envoy/extensions/access_loggers/grpc/v4alpha/als.pb.validate.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/access_loggers/grpc/v4alpha/als.proto - -package envoy_extensions_access_loggers_grpc_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.ApiVersion(0) -) - -// Validate checks the field values on HttpGrpcAccessLogConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HttpGrpcAccessLogConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetCommonConfig() == nil { - return HttpGrpcAccessLogConfigValidationError{ - field: "CommonConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpGrpcAccessLogConfigValidationError{ - field: "CommonConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// HttpGrpcAccessLogConfigValidationError is the validation error returned by -// HttpGrpcAccessLogConfig.Validate if the designated constraints aren't met. -type HttpGrpcAccessLogConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpGrpcAccessLogConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpGrpcAccessLogConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpGrpcAccessLogConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpGrpcAccessLogConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpGrpcAccessLogConfigValidationError) ErrorName() string { - return "HttpGrpcAccessLogConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpGrpcAccessLogConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpGrpcAccessLogConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpGrpcAccessLogConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpGrpcAccessLogConfigValidationError{} - -// Validate checks the field values on TcpGrpcAccessLogConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *TcpGrpcAccessLogConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetCommonConfig() == nil { - return TcpGrpcAccessLogConfigValidationError{ - field: "CommonConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpGrpcAccessLogConfigValidationError{ - field: "CommonConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// TcpGrpcAccessLogConfigValidationError is the validation error returned by -// TcpGrpcAccessLogConfig.Validate if the designated constraints aren't met. -type TcpGrpcAccessLogConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpGrpcAccessLogConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpGrpcAccessLogConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpGrpcAccessLogConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpGrpcAccessLogConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpGrpcAccessLogConfigValidationError) ErrorName() string { - return "TcpGrpcAccessLogConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e TcpGrpcAccessLogConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTcpGrpcAccessLogConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpGrpcAccessLogConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpGrpcAccessLogConfigValidationError{} - -// Validate checks the field values on CommonGrpcAccessLogConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CommonGrpcAccessLogConfig) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetLogName()) < 1 { - return CommonGrpcAccessLogConfigValidationError{ - field: "LogName", - reason: "value length must be at least 1 runes", - } - } - - if m.GetGrpcService() == nil { - return CommonGrpcAccessLogConfigValidationError{ - field: "GrpcService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonGrpcAccessLogConfigValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := v4alpha.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return CommonGrpcAccessLogConfigValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - } - - if d := m.GetBufferFlushInterval(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return CommonGrpcAccessLogConfigValidationError{ - field: "BufferFlushInterval", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return CommonGrpcAccessLogConfigValidationError{ - field: "BufferFlushInterval", - reason: "value must be greater than 0s", - } - } - - } - - if v, ok := interface{}(m.GetBufferSizeBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonGrpcAccessLogConfigValidationError{ - field: "BufferSizeBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// CommonGrpcAccessLogConfigValidationError is the validation error returned by -// CommonGrpcAccessLogConfig.Validate if the designated constraints aren't met. -type CommonGrpcAccessLogConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonGrpcAccessLogConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommonGrpcAccessLogConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommonGrpcAccessLogConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommonGrpcAccessLogConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommonGrpcAccessLogConfigValidationError) ErrorName() string { - return "CommonGrpcAccessLogConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e CommonGrpcAccessLogConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonGrpcAccessLogConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonGrpcAccessLogConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonGrpcAccessLogConfigValidationError{} diff --git a/pkg/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.pb.go b/pkg/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.pb.go new file mode 100644 index 0000000000..6247e9944a --- /dev/null +++ b/pkg/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.pb.go @@ -0,0 +1,227 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto + +package open_telemetryv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/access_loggers/grpc/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "go.opentelemetry.io/proto/otlp/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the built-in *envoy.access_loggers.open_telemetry* +// :ref:`AccessLog `. This configuration will +// populate `opentelemetry.proto.collector.v1.logs.ExportLogsServiceRequest.resource_logs `_. +// OpenTelemetry `Resource `_ +// attributes are filled with Envoy node info. In addition, the request start time is set in the +// dedicated field. +// [#extension: envoy.access_loggers.open_telemetry] +// [#comment:TODO(itamarkam): allow configuration for resource attributes.] +type OpenTelemetryAccessLogConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [#comment:TODO(itamarkam): add 'filter_state_objects_to_log' to logs.] + CommonConfig *v3.CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` + // OpenTelemetry `LogResource `_ + // fields, following `Envoy access logging formatting `_. + // + // See 'body' in the LogResource proto for more details. + // Example: ``body { string_value: "%PROTOCOL%" }``. + Body *v1.AnyValue `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + // See 'attributes' in the LogResource proto for more details. + // Example: ``attributes { values { key: "user_agent" value { string_value: "%REQ(USER-AGENT)%" } } }``. + Attributes *v1.KeyValueList `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *OpenTelemetryAccessLogConfig) Reset() { + *x = OpenTelemetryAccessLogConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenTelemetryAccessLogConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenTelemetryAccessLogConfig) ProtoMessage() {} + +func (x *OpenTelemetryAccessLogConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenTelemetryAccessLogConfig.ProtoReflect.Descriptor instead. +func (*OpenTelemetryAccessLogConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescGZIP(), []int{0} +} + +func (x *OpenTelemetryAccessLogConfig) GetCommonConfig() *v3.CommonGrpcAccessLogConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +func (x *OpenTelemetryAccessLogConfig) GetBody() *v1.AnyValue { + if x != nil { + return x.Body + } + return nil +} + +func (x *OpenTelemetryAccessLogConfig) GetAttributes() *v1.KeyValueList { + if x != nil { + return x.Attributes + } + return nil +} + +var File_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x74, 0x65, 0x6c, + 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, + 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6f, 0x70, + 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x9b, 0x02, 0x0a, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x71, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, + 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x12, 0x4b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, + 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0xc8, + 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x33, 0x42, 0x10, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x5f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x33, + 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescData = file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_goTypes = []interface{}{ + (*OpenTelemetryAccessLogConfig)(nil), // 0: envoy.extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig + (*v3.CommonGrpcAccessLogConfig)(nil), // 1: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig + (*v1.AnyValue)(nil), // 2: opentelemetry.proto.common.v1.AnyValue + (*v1.KeyValueList)(nil), // 3: opentelemetry.proto.common.v1.KeyValueList +} +var file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig.common_config:type_name -> envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig + 2, // 1: envoy.extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig.body:type_name -> opentelemetry.proto.common.v1.AnyValue + 3, // 2: envoy.extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig.attributes:type_name -> opentelemetry.proto.common.v1.KeyValueList + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_init() } +func file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_init() { + if File_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenTelemetryAccessLogConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto = out.File + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_rawDesc = nil + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_goTypes = nil + file_envoy_extensions_access_loggers_open_telemetry_v3_logs_service_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.pb.validate.go new file mode 100644 index 0000000000..16d3c5e009 --- /dev/null +++ b/pkg/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.pb.validate.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto + +package open_telemetryv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OpenTelemetryAccessLogConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *OpenTelemetryAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OpenTelemetryAccessLogConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OpenTelemetryAccessLogConfigMultiError, or nil if none found. +func (m *OpenTelemetryAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OpenTelemetryAccessLogConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetCommonConfig() == nil { + err := OpenTelemetryAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenTelemetryAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenTelemetryAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OpenTelemetryAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenTelemetryAccessLogConfigValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenTelemetryAccessLogConfigValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OpenTelemetryAccessLogConfigValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAttributes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OpenTelemetryAccessLogConfigValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OpenTelemetryAccessLogConfigValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAttributes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OpenTelemetryAccessLogConfigValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OpenTelemetryAccessLogConfigMultiError(errors) + } + + return nil +} + +// OpenTelemetryAccessLogConfigMultiError is an error wrapping multiple +// validation errors returned by OpenTelemetryAccessLogConfig.ValidateAll() if +// the designated constraints aren't met. +type OpenTelemetryAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OpenTelemetryAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OpenTelemetryAccessLogConfigMultiError) AllErrors() []error { return m } + +// OpenTelemetryAccessLogConfigValidationError is the validation error returned +// by OpenTelemetryAccessLogConfig.Validate if the designated constraints +// aren't met. +type OpenTelemetryAccessLogConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OpenTelemetryAccessLogConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OpenTelemetryAccessLogConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OpenTelemetryAccessLogConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OpenTelemetryAccessLogConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OpenTelemetryAccessLogConfigValidationError) ErrorName() string { + return "OpenTelemetryAccessLogConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e OpenTelemetryAccessLogConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOpenTelemetryAccessLogConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OpenTelemetryAccessLogConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OpenTelemetryAccessLogConfigValidationError{} diff --git a/pkg/api/envoy/extensions/access_loggers/stream/v3/stream.pb.go b/pkg/api/envoy/extensions/access_loggers/stream/v3/stream.pb.go new file mode 100644 index 0000000000..0c38e5e117 --- /dev/null +++ b/pkg/api/envoy/extensions/access_loggers/stream/v3/stream.pb.go @@ -0,0 +1,295 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/stream/v3/stream.proto + +package streamv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Custom configuration for an :ref:`AccessLog ` +// that writes log entries directly to the operating system's standard output. +type StdoutAccessLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to AccessLogFormat: + // *StdoutAccessLog_LogFormat + AccessLogFormat isStdoutAccessLog_AccessLogFormat `protobuf_oneof:"access_log_format"` +} + +func (x *StdoutAccessLog) Reset() { + *x = StdoutAccessLog{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StdoutAccessLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StdoutAccessLog) ProtoMessage() {} + +func (x *StdoutAccessLog) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StdoutAccessLog.ProtoReflect.Descriptor instead. +func (*StdoutAccessLog) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescGZIP(), []int{0} +} + +func (m *StdoutAccessLog) GetAccessLogFormat() isStdoutAccessLog_AccessLogFormat { + if m != nil { + return m.AccessLogFormat + } + return nil +} + +func (x *StdoutAccessLog) GetLogFormat() *v3.SubstitutionFormatString { + if x, ok := x.GetAccessLogFormat().(*StdoutAccessLog_LogFormat); ok { + return x.LogFormat + } + return nil +} + +type isStdoutAccessLog_AccessLogFormat interface { + isStdoutAccessLog_AccessLogFormat() +} + +type StdoutAccessLog_LogFormat struct { + // Configuration to form access log data and format. + // If not specified, use :ref:`default format `. + LogFormat *v3.SubstitutionFormatString `protobuf:"bytes,1,opt,name=log_format,json=logFormat,proto3,oneof"` +} + +func (*StdoutAccessLog_LogFormat) isStdoutAccessLog_AccessLogFormat() {} + +// Custom configuration for an :ref:`AccessLog ` +// that writes log entries directly to the operating system's standard error. +type StderrAccessLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to AccessLogFormat: + // *StderrAccessLog_LogFormat + AccessLogFormat isStderrAccessLog_AccessLogFormat `protobuf_oneof:"access_log_format"` +} + +func (x *StderrAccessLog) Reset() { + *x = StderrAccessLog{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StderrAccessLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StderrAccessLog) ProtoMessage() {} + +func (x *StderrAccessLog) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StderrAccessLog.ProtoReflect.Descriptor instead. +func (*StderrAccessLog) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescGZIP(), []int{1} +} + +func (m *StderrAccessLog) GetAccessLogFormat() isStderrAccessLog_AccessLogFormat { + if m != nil { + return m.AccessLogFormat + } + return nil +} + +func (x *StderrAccessLog) GetLogFormat() *v3.SubstitutionFormatString { + if x, ok := x.GetAccessLogFormat().(*StderrAccessLog_LogFormat); ok { + return x.LogFormat + } + return nil +} + +type isStderrAccessLog_AccessLogFormat interface { + isStderrAccessLog_AccessLogFormat() +} + +type StderrAccessLog_LogFormat struct { + // Configuration to form access log data and format. + // If not specified, use :ref:`default format `. + LogFormat *v3.SubstitutionFormatString `protobuf:"bytes,1,opt,name=log_format,json=logFormat,proto3,oneof"` +} + +func (*StderrAccessLog_LogFormat) isStderrAccessLog_AccessLogFormat() {} + +var File_envoy_extensions_access_loggers_stream_v3_stream_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x33, 0x1a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, + 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x81, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x59, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x64, 0x65, 0x72, + 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x59, 0x0a, 0x0a, 0x6c, 0x6f, + 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0xab, 0x01, 0x0a, 0x37, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData = file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_goTypes = []interface{}{ + (*StdoutAccessLog)(nil), // 0: envoy.extensions.access_loggers.stream.v3.StdoutAccessLog + (*StderrAccessLog)(nil), // 1: envoy.extensions.access_loggers.stream.v3.StderrAccessLog + (*v3.SubstitutionFormatString)(nil), // 2: envoy.config.core.v3.SubstitutionFormatString +} +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.access_loggers.stream.v3.StdoutAccessLog.log_format:type_name -> envoy.config.core.v3.SubstitutionFormatString + 2, // 1: envoy.extensions.access_loggers.stream.v3.StderrAccessLog.log_format:type_name -> envoy.config.core.v3.SubstitutionFormatString + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_stream_v3_stream_proto_init() } +func file_envoy_extensions_access_loggers_stream_v3_stream_proto_init() { + if File_envoy_extensions_access_loggers_stream_v3_stream_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StdoutAccessLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StderrAccessLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*StdoutAccessLog_LogFormat)(nil), + } + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StderrAccessLog_LogFormat)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_stream_v3_stream_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_stream_v3_stream_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_stream_v3_stream_proto = out.File + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc = nil + file_envoy_extensions_access_loggers_stream_v3_stream_proto_goTypes = nil + file_envoy_extensions_access_loggers_stream_v3_stream_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/access_loggers/stream/v3/stream.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/stream/v3/stream.pb.validate.go new file mode 100644 index 0000000000..b4a7c16f39 --- /dev/null +++ b/pkg/api/envoy/extensions/access_loggers/stream/v3/stream.pb.validate.go @@ -0,0 +1,328 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/stream/v3/stream.proto + +package streamv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StdoutAccessLog with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *StdoutAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StdoutAccessLog with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StdoutAccessLogMultiError, or nil if none found. +func (m *StdoutAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *StdoutAccessLog) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.AccessLogFormat.(type) { + + case *StdoutAccessLog_LogFormat: + + if m.GetLogFormat() == nil { + err := StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetLogFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StdoutAccessLogMultiError(errors) + } + + return nil +} + +// StdoutAccessLogMultiError is an error wrapping multiple validation errors +// returned by StdoutAccessLog.ValidateAll() if the designated constraints +// aren't met. +type StdoutAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StdoutAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StdoutAccessLogMultiError) AllErrors() []error { return m } + +// StdoutAccessLogValidationError is the validation error returned by +// StdoutAccessLog.Validate if the designated constraints aren't met. +type StdoutAccessLogValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StdoutAccessLogValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StdoutAccessLogValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StdoutAccessLogValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StdoutAccessLogValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StdoutAccessLogValidationError) ErrorName() string { return "StdoutAccessLogValidationError" } + +// Error satisfies the builtin error interface +func (e StdoutAccessLogValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStdoutAccessLog.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StdoutAccessLogValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StdoutAccessLogValidationError{} + +// Validate checks the field values on StderrAccessLog with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *StderrAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StderrAccessLog with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StderrAccessLogMultiError, or nil if none found. +func (m *StderrAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *StderrAccessLog) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.AccessLogFormat.(type) { + + case *StderrAccessLog_LogFormat: + + if m.GetLogFormat() == nil { + err := StderrAccessLogValidationError{ + field: "LogFormat", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetLogFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StderrAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StderrAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StderrAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StderrAccessLogMultiError(errors) + } + + return nil +} + +// StderrAccessLogMultiError is an error wrapping multiple validation errors +// returned by StderrAccessLog.ValidateAll() if the designated constraints +// aren't met. +type StderrAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StderrAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StderrAccessLogMultiError) AllErrors() []error { return m } + +// StderrAccessLogValidationError is the validation error returned by +// StderrAccessLog.Validate if the designated constraints aren't met. +type StderrAccessLogValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StderrAccessLogValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StderrAccessLogValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StderrAccessLogValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StderrAccessLogValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StderrAccessLogValidationError) ErrorName() string { return "StderrAccessLogValidationError" } + +// Error satisfies the builtin error interface +func (e StderrAccessLogValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStderrAccessLog.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StderrAccessLogValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StderrAccessLogValidationError{} diff --git a/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.go b/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.go index 54119adeb3..184c996feb 100644 --- a/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.go +++ b/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/access_loggers/wasm/v3/wasm.proto -package envoy_extensions_access_loggers_wasm_v3 +package wasmv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/wasm/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,11 +22,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Custom configuration for an :ref:`AccessLog ` +// Custom configuration for an :ref:`AccessLog ` // that calls into a WASM VM. Configures the built-in *envoy.access_loggers.wasm* // AccessLog. type WasmAccessLog struct { @@ -90,19 +85,22 @@ var file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDesc = []byte{ 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x0d, 0x57, 0x61, 0x73, 0x6d, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4c, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, - 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, - 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x22, 0x4f, 0x0a, 0x0d, 0x57, 0x61, 0x73, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x6f, 0x67, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xa3, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, + 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.validate.go b/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.validate.go index 83eed8866b..2083b3e45a 100644 --- a/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.validate.go +++ b/pkg/api/envoy/extensions/access_loggers/wasm/v3/wasm.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/access_loggers/wasm/v3/wasm.proto -package envoy_extensions_access_loggers_wasm_v3 +package wasmv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on WasmAccessLog with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *WasmAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WasmAccessLog with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in WasmAccessLogMultiError, or +// nil if none found. +func (m *WasmAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *WasmAccessLog) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmAccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmAccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WasmAccessLogValidationError{ field: "Config", @@ -51,9 +86,30 @@ func (m *WasmAccessLog) Validate() error { } } + if len(errors) > 0 { + return WasmAccessLogMultiError(errors) + } + return nil } +// WasmAccessLogMultiError is an error wrapping multiple validation errors +// returned by WasmAccessLog.ValidateAll() if the designated constraints +// aren't met. +type WasmAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmAccessLogMultiError) AllErrors() []error { return m } + // WasmAccessLogValidationError is the validation error returned by // WasmAccessLog.Validate if the designated constraints aren't met. type WasmAccessLogValidationError struct { diff --git a/pkg/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.go b/pkg/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.go new file mode 100644 index 0000000000..362dac5487 --- /dev/null +++ b/pkg/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.go @@ -0,0 +1,157 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto + +package internal_listenerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for internal listener. +type InternalListener struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InternalListener) Reset() { + *x = InternalListener{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalListener) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalListener) ProtoMessage() {} + +func (x *InternalListener) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalListener.ProtoReflect.Descriptor instead. +func (*InternalListener) Descriptor() ([]byte, []int) { + return file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto protoreflect.FileDescriptor + +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0xd4, + 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x42, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, + 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescOnce sync.Once + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData = file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc +) + +func file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescGZIP() []byte { + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescOnce.Do(func() { + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData) + }) + return file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData +} + +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_goTypes = []interface{}{ + (*InternalListener)(nil), // 0: envoy.extensions.bootstrap.internal_listener.v3.InternalListener +} +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_init() } +func file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_init() { + if File_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InternalListener); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_goTypes, + DependencyIndexes: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_depIdxs, + MessageInfos: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes, + }.Build() + File_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto = out.File + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc = nil + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_goTypes = nil + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.validate.go b/pkg/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.validate.go new file mode 100644 index 0000000000..36f6c7503c --- /dev/null +++ b/pkg/api/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.validate.go @@ -0,0 +1,136 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto + +package internal_listenerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on InternalListener with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *InternalListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InternalListener with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// InternalListenerMultiError, or nil if none found. +func (m *InternalListener) ValidateAll() error { + return m.validate(true) +} + +func (m *InternalListener) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return InternalListenerMultiError(errors) + } + + return nil +} + +// InternalListenerMultiError is an error wrapping multiple validation errors +// returned by InternalListener.ValidateAll() if the designated constraints +// aren't met. +type InternalListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InternalListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InternalListenerMultiError) AllErrors() []error { return m } + +// InternalListenerValidationError is the validation error returned by +// InternalListener.Validate if the designated constraints aren't met. +type InternalListenerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InternalListenerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InternalListenerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InternalListenerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InternalListenerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InternalListenerValidationError) ErrorName() string { return "InternalListenerValidationError" } + +// Error satisfies the builtin error interface +func (e InternalListenerValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInternalListener.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InternalListenerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InternalListenerValidationError{} diff --git a/pkg/api/envoy/extensions/cache/simple_http_cache/v3/config.pb.go b/pkg/api/envoy/extensions/cache/simple_http_cache/v3/config.pb.go new file mode 100644 index 0000000000..b100eebdfe --- /dev/null +++ b/pkg/api/envoy/extensions/cache/simple_http_cache/v3/config.pb.go @@ -0,0 +1,152 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/cache/simple_http_cache/v3/config.proto + +package simple_http_cachev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#extension: envoy.cache.simple_http_cache] +type SimpleHttpCacheConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SimpleHttpCacheConfig) Reset() { + *x = SimpleHttpCacheConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SimpleHttpCacheConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimpleHttpCacheConfig) ProtoMessage() {} + +func (x *SimpleHttpCacheConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimpleHttpCacheConfig.ProtoReflect.Descriptor instead. +func (*SimpleHttpCacheConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_cache_simple_http_cache_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x48, 0x74, 0x74, 0x70, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0xba, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, + 0x3b, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData = file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc +) + +func file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData +} + +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_goTypes = []interface{}{ + (*SimpleHttpCacheConfig)(nil), // 0: envoy.extensions.cache.simple_http_cache.v3.SimpleHttpCacheConfig +} +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_cache_simple_http_cache_v3_config_proto_init() } +func file_envoy_extensions_cache_simple_http_cache_v3_config_proto_init() { + if File_envoy_extensions_cache_simple_http_cache_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimpleHttpCacheConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_cache_simple_http_cache_v3_config_proto = out.File + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc = nil + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_goTypes = nil + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/cache/simple_http_cache/v3/config.pb.validate.go b/pkg/api/envoy/extensions/cache/simple_http_cache/v3/config.pb.validate.go new file mode 100644 index 0000000000..99d196f775 --- /dev/null +++ b/pkg/api/envoy/extensions/cache/simple_http_cache/v3/config.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/cache/simple_http_cache/v3/config.proto + +package simple_http_cachev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SimpleHttpCacheConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SimpleHttpCacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SimpleHttpCacheConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SimpleHttpCacheConfigMultiError, or nil if none found. +func (m *SimpleHttpCacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SimpleHttpCacheConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SimpleHttpCacheConfigMultiError(errors) + } + + return nil +} + +// SimpleHttpCacheConfigMultiError is an error wrapping multiple validation +// errors returned by SimpleHttpCacheConfig.ValidateAll() if the designated +// constraints aren't met. +type SimpleHttpCacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SimpleHttpCacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SimpleHttpCacheConfigMultiError) AllErrors() []error { return m } + +// SimpleHttpCacheConfigValidationError is the validation error returned by +// SimpleHttpCacheConfig.Validate if the designated constraints aren't met. +type SimpleHttpCacheConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SimpleHttpCacheConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SimpleHttpCacheConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SimpleHttpCacheConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SimpleHttpCacheConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SimpleHttpCacheConfigValidationError) ErrorName() string { + return "SimpleHttpCacheConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e SimpleHttpCacheConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSimpleHttpCacheConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SimpleHttpCacheConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SimpleHttpCacheConfigValidationError{} diff --git a/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.go b/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.go index 3f19a5fe0d..fb5484f11f 100644 --- a/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.go +++ b/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/clusters/aggregate/v3/cluster.proto -package envoy_extensions_clusters_aggregate_v3 +package aggregatev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the aggregate cluster. See the :ref:`architecture overview // ` for more information. // [#extension: envoy.clusters.aggregate] @@ -100,13 +95,19 @@ var file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDesc = []byte{ 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4e, 0x0a, - 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa9, 0x01, + 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.validate.go b/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.validate.go index 619f0a9f6b..ce250b6c07 100644 --- a/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.validate.go +++ b/pkg/api/envoy/extensions/clusters/aggregate/v3/cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/clusters/aggregate/v3/cluster.proto -package envoy_extensions_clusters_aggregate_v3 +package aggregatev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClusterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterConfigMultiError, or +// nil if none found. +func (m *ClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusters()) < 1 { - return ClusterConfigValidationError{ + err := ClusterConfigValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ClusterConfigMultiError(errors) } return nil } +// ClusterConfigMultiError is an error wrapping multiple validation errors +// returned by ClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type ClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterConfigMultiError) AllErrors() []error { return m } + // ClusterConfigValidationError is the validation error returned by // ClusterConfig.Validate if the designated constraints aren't met. type ClusterConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.go b/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.go index 00b66ada78..d19d55cf22 100644 --- a/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.go +++ b/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto -package envoy_extensions_clusters_dynamic_forward_proxy_v3 +package dynamic_forward_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview // ` for more information. // [#extension: envoy.clusters.dynamic_forward_proxy] @@ -38,12 +33,33 @@ type ClusterConfig struct { // The DNS cache configuration that the cluster will attach to. Note this configuration must // match that of associated :ref:`dynamic forward proxy HTTP filter configuration - // `. + // `. DnsCacheConfig *v3.DnsCacheConfig `protobuf:"bytes,1,opt,name=dns_cache_config,json=dnsCacheConfig,proto3" json:"dns_cache_config,omitempty"` // If true allow the cluster configuration to disable the auto_sni and auto_san_validation options // in the :ref:`cluster's upstream_http_protocol_options - // ` + // ` AllowInsecureClusterOptions bool `protobuf:"varint,2,opt,name=allow_insecure_cluster_options,json=allowInsecureClusterOptions,proto3" json:"allow_insecure_cluster_options,omitempty"` + // [#not-implemented-hide:] + // If true allow HTTP/2 and HTTP/3 connections to be reused for requests to different + // origins than the connection was initially created for. This will only happen when the + // resolved address for the new connection matches the peer address of the connection and + // the TLS certificate is also valid for the new hostname. For example, if a connection + // has previously been established to foo.example.com at IP 1.2.3.4 with a certificate + // that is valid for `*.example.com`, then this connection could be used for requests to + // bar.example.com if that also resolved to 1.2.3.4. + // + // .. note:: + // By design, this feature will maximize reuse of connections. This means that instead + // opening a new connection when an existing connection reaches the maximum number of + // concurrent streams, requests will instead be sent to the existing connection. + // TODO(alyssawilk) implement request queueing in connections. + // + // .. note:: + // The coalesced connections might be to upstreams that would not be otherwise + // selected by Envoy. See the section `Connection Reuse in RFC 7540 + // `_ + // + AllowCoalescedConnections bool `protobuf:"varint,3,opt,name=allow_coalesced_connections,json=allowCoalescedConnections,proto3" json:"allow_coalesced_connections,omitempty"` } func (x *ClusterConfig) Reset() { @@ -92,6 +108,13 @@ func (x *ClusterConfig) GetAllowInsecureClusterOptions() bool { return false } +func (x *ClusterConfig) GetAllowCoalescedConnections() bool { + if x != nil { + return x.AllowCoalescedConnections + } + return false +} + var File_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto protoreflect.FileDescriptor var file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDesc = []byte{ @@ -112,7 +135,7 @@ var file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDes 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, @@ -125,17 +148,29 @@ var file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDes 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x3e, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x61, 0x6c, 0x65, 0x73, + 0x63, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x61, 0x6c, + 0x65, 0x73, 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x5a, 0x0a, 0x40, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xcd, 0x01, 0x0a, 0x40, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0c, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x71, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.validate.go b/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.validate.go index f3670917e3..132d2c7828 100644 --- a/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.validate.go +++ b/pkg/api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto -package envoy_extensions_clusters_dynamic_forward_proxy_v3 +package dynamic_forward_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClusterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClusterConfigMultiError, or +// nil if none found. +func (m *ClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDnsCacheConfig() == nil { - return ClusterConfigValidationError{ + err := ClusterConfigValidationError{ field: "DnsCacheConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterConfigValidationError{ field: "DnsCacheConfig", @@ -60,9 +99,32 @@ func (m *ClusterConfig) Validate() error { // no validation rules for AllowInsecureClusterOptions + // no validation rules for AllowCoalescedConnections + + if len(errors) > 0 { + return ClusterConfigMultiError(errors) + } + return nil } +// ClusterConfigMultiError is an error wrapping multiple validation errors +// returned by ClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type ClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterConfigMultiError) AllErrors() []error { return m } + // ClusterConfigValidationError is the validation error returned by // ClusterConfig.Validate if the designated constraints aren't met. type ClusterConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.go b/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.go index 88d07c7c97..bace4e83db 100644 --- a/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.go +++ b/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/clusters/redis/v3/redis_cluster.proto -package envoy_extensions_clusters_redis_v3 +package redisv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 7] type RedisClusterConfig struct { state protoimpl.MessageState @@ -183,13 +178,18 @@ var file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDesc = []byte 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x52, 0x65, 0x64, 0x69, - 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4f, - 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, - 0x76, 0x33, 0x42, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa2, + 0x01, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x2e, 0x76, 0x33, 0x42, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x65, 0x64, 0x69, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.go b/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.go index b935b6351e..e841f6a804 100644 --- a/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.go +++ b/pkg/api/envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/clusters/redis/v3/redis_cluster.proto -package envoy_extensions_clusters_redis_v3 +package redisv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,60 +31,112 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RedisClusterConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisClusterConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisClusterConfigMultiError, or nil if none found. +func (m *RedisClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisClusterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if d := m.GetClusterRefreshRate(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RedisClusterConfigValidationError{ + err = RedisClusterConfigValidationError{ field: "ClusterRefreshRate", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return RedisClusterConfigValidationError{ - field: "ClusterRefreshRate", - reason: "value must be greater than 0s", + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshRate", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetClusterRefreshTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return RedisClusterConfigValidationError{ + err = RedisClusterConfigValidationError{ field: "ClusterRefreshTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return RedisClusterConfigValidationError{ - field: "ClusterRefreshTimeout", - reason: "value must be greater than 0s", + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetRedirectRefreshInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRedirectRefreshInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisClusterConfigValidationError{ field: "RedirectRefreshInterval", @@ -93,7 +146,26 @@ func (m *RedisClusterConfig) Validate() error { } } - if v, ok := interface{}(m.GetRedirectRefreshThreshold()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRedirectRefreshThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshThreshold()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisClusterConfigValidationError{ field: "RedirectRefreshThreshold", @@ -107,9 +179,30 @@ func (m *RedisClusterConfig) Validate() error { // no validation rules for HostDegradedRefreshThreshold + if len(errors) > 0 { + return RedisClusterConfigMultiError(errors) + } + return nil } +// RedisClusterConfigMultiError is an error wrapping multiple validation errors +// returned by RedisClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type RedisClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisClusterConfigMultiError) AllErrors() []error { return m } + // RedisClusterConfigValidationError is the validation error returned by // RedisClusterConfig.Validate if the designated constraints aren't met. type RedisClusterConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.go b/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.go index 19b44804b2..4ed8581446 100644 --- a/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.go +++ b/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.go @@ -1,16 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto -package envoy_extensions_common_dynamic_forward_proxy_v3 +package dynamic_forward_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" + v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/key_value/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration of circuit breakers for resolver. type DnsCacheCircuitBreakers struct { state protoimpl.MessageState @@ -82,7 +80,7 @@ func (x *DnsCacheCircuitBreakers) GetMaxPendingRequests() *wrappers.UInt32Value // Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview // ` for more information. -// [#next-free-field: 9] +// [#next-free-field: 15] type DnsCacheConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -103,17 +101,17 @@ type DnsCacheConfig struct { // address and return the one that wins. This same method could potentially also be used for // QUIC to TCP fall back.] DnsLookupFamily v3.Cluster_DnsLookupFamily `protobuf:"varint,2,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.config.cluster.v3.Cluster_DnsLookupFamily" json:"dns_lookup_family,omitempty"` - // The DNS refresh rate for currently cached DNS hosts. If not specified defaults to 60s. - // - // .. note: - // - // The returned DNS TTL is not currently used to alter the refresh rate. This feature will be - // added in a future change. - // - // .. note: + // The DNS refresh rate for unresolved DNS hosts. If not specified defaults to 60s. // // The refresh rate is rounded to the closest millisecond, and must be at least 1ms. + // + // Once a host has been resolved, the refresh rate will be the DNS TTL, capped + // at a minimum of `dns_min_refresh_rate`. DnsRefreshRate *duration.Duration `protobuf:"bytes,3,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"` + // The minimum rate that DNS resolution will occur. Per `dns_refresh_rate`, once a host is + // resolved, the DNS TTL will be used, with a minimum set by `dns_min_refresh_rate`. + // `dns_min_refresh_rate` defaults to 5s and must also be >= 5s. + DnsMinRefreshRate *duration.Duration `protobuf:"bytes,14,opt,name=dns_min_refresh_rate,json=dnsMinRefreshRate,proto3" json:"dns_min_refresh_rate,omitempty"` // The TTL for hosts that are unused. Hosts that have not been used in the configured time // interval will be purged. If not specified defaults to 5m. // @@ -140,15 +138,44 @@ type DnsCacheConfig struct { // not specified, the failure refresh rate defaults to the dns_refresh_rate. DnsFailureRefreshRate *v3.Cluster_RefreshRate `protobuf:"bytes,6,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"` // The config of circuit breakers for resolver. It provides a configurable threshold. - // If `envoy.reloadable_features.enable_dns_cache_circuit_breakers` is enabled, - // envoy will use dns cache circuit breakers with default settings even if this value is not set. + // Envoy will use dns cache circuit breakers with default settings even if this value is not set. DnsCacheCircuitBreaker *DnsCacheCircuitBreakers `protobuf:"bytes,7,opt,name=dns_cache_circuit_breaker,json=dnsCacheCircuitBreaker,proto3" json:"dns_cache_circuit_breaker,omitempty"` - // [#next-major-version: Reconcile DNS options in a single message.] // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. + // This field is deprecated in favor of *dns_resolution_config* + // which aggregates all of the DNS resolver configuration in a single message. + // + // Deprecated: Do not use. UseTcpForDnsLookups bool `protobuf:"varint,8,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + // + // Deprecated: Do not use. + DnsResolutionConfig *v31.DnsResolutionConfig `protobuf:"bytes,9,opt,name=dns_resolution_config,json=dnsResolutionConfig,proto3" json:"dns_resolution_config,omitempty"` + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + TypedDnsResolverConfig *v31.TypedExtensionConfig `protobuf:"bytes,12,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"` + // Hostnames that should be preresolved into the cache upon creation. This might provide a + // performance improvement, in the form of cache hits, for hostnames that are going to be + // resolved during steady state and are known at config load time. + PreresolveHostnames []*v31.SocketAddress `protobuf:"bytes,10,rep,name=preresolve_hostnames,json=preresolveHostnames,proto3" json:"preresolve_hostnames,omitempty"` + // The timeout used for DNS queries. This timeout is independent of any timeout and retry policy + // used by the underlying DNS implementation (e.g., c-areas and Apple DNS) which are opaque. + // Setting this timeout will ensure that queries succeed or fail within the specified time frame + // and are then retried using the standard refresh rates. Defaults to 5s if not set. + DnsQueryTimeout *duration.Duration `protobuf:"bytes,11,opt,name=dns_query_timeout,json=dnsQueryTimeout,proto3" json:"dns_query_timeout,omitempty"` + // [#not-implemented-hide:] + // Configuration to flush the DNS cache to long term storage. + KeyValueConfig *v32.KeyValueStoreConfig `protobuf:"bytes,13,opt,name=key_value_config,json=keyValueConfig,proto3" json:"key_value_config,omitempty"` } func (x *DnsCacheConfig) Reset() { @@ -194,7 +221,7 @@ func (x *DnsCacheConfig) GetDnsLookupFamily() v3.Cluster_DnsLookupFamily { if x != nil { return x.DnsLookupFamily } - return v3.Cluster_AUTO + return v3.Cluster_DnsLookupFamily(0) } func (x *DnsCacheConfig) GetDnsRefreshRate() *duration.Duration { @@ -204,6 +231,13 @@ func (x *DnsCacheConfig) GetDnsRefreshRate() *duration.Duration { return nil } +func (x *DnsCacheConfig) GetDnsMinRefreshRate() *duration.Duration { + if x != nil { + return x.DnsMinRefreshRate + } + return nil +} + func (x *DnsCacheConfig) GetHostTtl() *duration.Duration { if x != nil { return x.HostTtl @@ -232,6 +266,7 @@ func (x *DnsCacheConfig) GetDnsCacheCircuitBreaker() *DnsCacheCircuitBreakers { return nil } +// Deprecated: Do not use. func (x *DnsCacheConfig) GetUseTcpForDnsLookups() bool { if x != nil { return x.UseTcpForDnsLookups @@ -239,6 +274,42 @@ func (x *DnsCacheConfig) GetUseTcpForDnsLookups() bool { return false } +// Deprecated: Do not use. +func (x *DnsCacheConfig) GetDnsResolutionConfig() *v31.DnsResolutionConfig { + if x != nil { + return x.DnsResolutionConfig + } + return nil +} + +func (x *DnsCacheConfig) GetTypedDnsResolverConfig() *v31.TypedExtensionConfig { + if x != nil { + return x.TypedDnsResolverConfig + } + return nil +} + +func (x *DnsCacheConfig) GetPreresolveHostnames() []*v31.SocketAddress { + if x != nil { + return x.PreresolveHostnames + } + return nil +} + +func (x *DnsCacheConfig) GetDnsQueryTimeout() *duration.Duration { + if x != nil { + return x.DnsQueryTimeout + } + return nil +} + +func (x *DnsCacheConfig) GetKeyValueConfig() *v32.KeyValueStoreConfig { + if x != nil { + return x.KeyValueConfig + } + return nil +} + var File_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto protoreflect.FileDescriptor var file_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto_rawDesc = []byte{ @@ -251,75 +322,131 @@ var file_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto_rawDes 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x17, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x17, 0x44, 0x6e, 0x73, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, + 0x6b, 0x65, 0x72, 0x73, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x22, 0x9b, 0x0a, 0x0a, 0x0e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x66, 0x0a, 0x11, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, + 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x6e, 0x73, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x51, 0x0a, 0x10, + 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, + 0x0e, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, + 0x56, 0x0a, 0x14, 0x64, 0x6e, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, + 0x32, 0x02, 0x08, 0x05, 0x52, 0x11, 0x64, 0x6e, 0x73, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5f, + 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x07, + 0x68, 0x6f, 0x73, 0x74, 0x54, 0x74, 0x6c, 0x12, 0x42, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, + 0x00, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x65, 0x0a, 0x18, 0x64, + 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x6e, 0x73, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, + 0x74, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x19, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x5f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0x73, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, - 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x73, 0x22, 0xd9, 0x05, 0x0a, 0x0e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x66, 0x0a, 0x11, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, - 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, - 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x51, 0x0a, 0x10, 0x64, 0x6e, 0x73, - 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, - 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0e, 0x64, 0x6e, - 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x08, - 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, - 0x02, 0x2a, 0x00, 0x52, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x54, 0x74, 0x6c, 0x12, 0x42, 0x0a, 0x09, - 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x12, 0x65, 0x0a, 0x18, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, - 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x19, 0x64, 0x6e, 0x73, 0x5f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, + 0x73, 0x52, 0x16, 0x64, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x69, 0x72, 0x63, 0x75, + 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x17, 0x75, 0x73, 0x65, + 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, + 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, + 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x6a, 0x0a, 0x15, + 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, + 0x33, 0x2e, 0x30, 0x52, 0x13, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x19, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x74, 0x79, 0x70, 0x65, 0x64, 0x44, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x56, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x13, 0x70, 0x72, 0x65, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x48, 0x6f, + 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x11, 0x64, 0x6e, 0x73, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0f, 0x64, 0x6e, 0x73, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x5f, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, - 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x16, 0x64, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x34, - 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, 0x6e, - 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, - 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x59, 0x0a, - 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, - 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, - 0x0d, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xca, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, + 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -336,26 +463,36 @@ func file_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto_rawDe var file_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto_goTypes = []interface{}{ - (*DnsCacheCircuitBreakers)(nil), // 0: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheCircuitBreakers - (*DnsCacheConfig)(nil), // 1: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig - (*wrappers.UInt32Value)(nil), // 2: google.protobuf.UInt32Value - (v3.Cluster_DnsLookupFamily)(0), // 3: envoy.config.cluster.v3.Cluster.DnsLookupFamily - (*duration.Duration)(nil), // 4: google.protobuf.Duration - (*v3.Cluster_RefreshRate)(nil), // 5: envoy.config.cluster.v3.Cluster.RefreshRate + (*DnsCacheCircuitBreakers)(nil), // 0: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheCircuitBreakers + (*DnsCacheConfig)(nil), // 1: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig + (*wrappers.UInt32Value)(nil), // 2: google.protobuf.UInt32Value + (v3.Cluster_DnsLookupFamily)(0), // 3: envoy.config.cluster.v3.Cluster.DnsLookupFamily + (*duration.Duration)(nil), // 4: google.protobuf.Duration + (*v3.Cluster_RefreshRate)(nil), // 5: envoy.config.cluster.v3.Cluster.RefreshRate + (*v31.DnsResolutionConfig)(nil), // 6: envoy.config.core.v3.DnsResolutionConfig + (*v31.TypedExtensionConfig)(nil), // 7: envoy.config.core.v3.TypedExtensionConfig + (*v31.SocketAddress)(nil), // 8: envoy.config.core.v3.SocketAddress + (*v32.KeyValueStoreConfig)(nil), // 9: envoy.config.common.key_value.v3.KeyValueStoreConfig } var file_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheCircuitBreakers.max_pending_requests:type_name -> google.protobuf.UInt32Value - 3, // 1: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_lookup_family:type_name -> envoy.config.cluster.v3.Cluster.DnsLookupFamily - 4, // 2: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_refresh_rate:type_name -> google.protobuf.Duration - 4, // 3: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.host_ttl:type_name -> google.protobuf.Duration - 2, // 4: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.max_hosts:type_name -> google.protobuf.UInt32Value - 5, // 5: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_failure_refresh_rate:type_name -> envoy.config.cluster.v3.Cluster.RefreshRate - 0, // 6: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_cache_circuit_breaker:type_name -> envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheCircuitBreakers - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 2, // 0: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheCircuitBreakers.max_pending_requests:type_name -> google.protobuf.UInt32Value + 3, // 1: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_lookup_family:type_name -> envoy.config.cluster.v3.Cluster.DnsLookupFamily + 4, // 2: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_refresh_rate:type_name -> google.protobuf.Duration + 4, // 3: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_min_refresh_rate:type_name -> google.protobuf.Duration + 4, // 4: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.host_ttl:type_name -> google.protobuf.Duration + 2, // 5: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.max_hosts:type_name -> google.protobuf.UInt32Value + 5, // 6: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_failure_refresh_rate:type_name -> envoy.config.cluster.v3.Cluster.RefreshRate + 0, // 7: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_cache_circuit_breaker:type_name -> envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheCircuitBreakers + 6, // 8: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_resolution_config:type_name -> envoy.config.core.v3.DnsResolutionConfig + 7, // 9: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.typed_dns_resolver_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 8, // 10: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.preresolve_hostnames:type_name -> envoy.config.core.v3.SocketAddress + 4, // 11: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_query_timeout:type_name -> google.protobuf.Duration + 9, // 12: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.key_value_config:type_name -> envoy.config.common.key_value.v3.KeyValueStoreConfig + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_envoy_extensions_common_dynamic_forward_proxy_v3_dns_cache_proto_init() } diff --git a/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.validate.go b/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.validate.go index 0c0395c0d9..1b66a56386 100644 --- a/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.validate.go +++ b/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto -package envoy_extensions_common_dynamic_forward_proxy_v3 +package dynamic_forward_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" ) @@ -32,20 +33,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.Cluster_DnsLookupFamily(0) ) // Validate checks the field values on DnsCacheCircuitBreakers with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DnsCacheCircuitBreakers) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsCacheCircuitBreakers with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsCacheCircuitBreakersMultiError, or nil if none found. +func (m *DnsCacheCircuitBreakers) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsCacheCircuitBreakers) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxPendingRequests()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheCircuitBreakersValidationError{ + field: "MaxPendingRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheCircuitBreakersValidationError{ + field: "MaxPendingRequests", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsCacheCircuitBreakersValidationError{ field: "MaxPendingRequests", @@ -55,9 +90,30 @@ func (m *DnsCacheCircuitBreakers) Validate() error { } } + if len(errors) > 0 { + return DnsCacheCircuitBreakersMultiError(errors) + } + return nil } +// DnsCacheCircuitBreakersMultiError is an error wrapping multiple validation +// errors returned by DnsCacheCircuitBreakers.ValidateAll() if the designated +// constraints aren't met. +type DnsCacheCircuitBreakersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsCacheCircuitBreakersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsCacheCircuitBreakersMultiError) AllErrors() []error { return m } + // DnsCacheCircuitBreakersValidationError is the validation error returned by // DnsCacheCircuitBreakers.Validate if the designated constraints aren't met. type DnsCacheCircuitBreakersValidationError struct { @@ -115,81 +171,174 @@ var _ interface { } = DnsCacheCircuitBreakersValidationError{} // Validate checks the field values on DnsCacheConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DnsCacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsCacheConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DnsCacheConfigMultiError, +// or nil if none found. +func (m *DnsCacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsCacheConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return DnsCacheConfigValidationError{ + err := DnsCacheConfigValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := v3.Cluster_DnsLookupFamily_name[int32(m.GetDnsLookupFamily())]; !ok { - return DnsCacheConfigValidationError{ + err := DnsCacheConfigValidationError{ field: "DnsLookupFamily", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetDnsRefreshRate(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DnsCacheConfigValidationError{ + err = DnsCacheConfigValidationError{ field: "DnsRefreshRate", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := DnsCacheConfigValidationError{ + field: "DnsRefreshRate", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + } + } - if dur < gte { - return DnsCacheConfigValidationError{ - field: "DnsRefreshRate", - reason: "value must be greater than or equal to 1ms", + if d := m.GetDnsMinRefreshRate(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsCacheConfigValidationError{ + field: "DnsMinRefreshRate", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(5*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := DnsCacheConfigValidationError{ + field: "DnsMinRefreshRate", + reason: "value must be greater than or equal to 5s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if d := m.GetHostTtl(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DnsCacheConfigValidationError{ + err = DnsCacheConfigValidationError{ field: "HostTtl", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return DnsCacheConfigValidationError{ - field: "HostTtl", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := DnsCacheConfigValidationError{ + field: "HostTtl", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if wrapper := m.GetMaxHosts(); wrapper != nil { if wrapper.GetValue() <= 0 { - return DnsCacheConfigValidationError{ + err := DnsCacheConfigValidationError{ field: "MaxHosts", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsFailureRefreshRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsCacheConfigValidationError{ field: "DnsFailureRefreshRate", @@ -199,7 +348,26 @@ func (m *DnsCacheConfig) Validate() error { } } - if v, ok := interface{}(m.GetDnsCacheCircuitBreaker()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsCacheCircuitBreaker()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsCacheCircuitBreaker", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsCacheCircuitBreaker", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsCacheCircuitBreaker()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DnsCacheConfigValidationError{ field: "DnsCacheCircuitBreaker", @@ -211,9 +379,181 @@ func (m *DnsCacheConfig) Validate() error { // no validation rules for UseTcpForDnsLookups + if all { + switch v := interface{}(m.GetDnsResolutionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolutionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsCacheConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTypedDnsResolverConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedDnsResolverConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsCacheConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetPreresolveHostnames() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: fmt.Sprintf("PreresolveHostnames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: fmt.Sprintf("PreresolveHostnames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsCacheConfigValidationError{ + field: fmt.Sprintf("PreresolveHostnames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if d := m.GetDnsQueryTimeout(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsCacheConfigValidationError{ + field: "DnsQueryTimeout", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := DnsCacheConfigValidationError{ + field: "DnsQueryTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetKeyValueConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "KeyValueConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsCacheConfigValidationError{ + field: "KeyValueConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeyValueConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsCacheConfigValidationError{ + field: "KeyValueConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DnsCacheConfigMultiError(errors) + } + return nil } +// DnsCacheConfigMultiError is an error wrapping multiple validation errors +// returned by DnsCacheConfig.ValidateAll() if the designated constraints +// aren't met. +type DnsCacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsCacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsCacheConfigMultiError) AllErrors() []error { return m } + // DnsCacheConfigValidationError is the validation error returned by // DnsCacheConfig.Validate if the designated constraints aren't met. type DnsCacheConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.go b/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.go index 56dd6d6069..16e45d3f70 100644 --- a/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.go +++ b/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.go @@ -1,17 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/common/matching/v3/extension_matcher.proto -package envoy_extensions_common_matching_v3 +package matchingv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v31 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/matcher/v3" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Wrapper around an existing extension that provides an associated matcher. This allows // decorating an existing extension with a matcher, which can be used to match against // relevant protocol data. @@ -37,10 +35,14 @@ type ExtensionWithMatcher struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The associated matcher. + // The associated matcher. This is deprecated in favor of xds_matcher. + // + // Deprecated: Do not use. Matcher *v3.Matcher `protobuf:"bytes,1,opt,name=matcher,proto3" json:"matcher,omitempty"` + // The associated matcher. + XdsMatcher *v31.Matcher `protobuf:"bytes,3,opt,name=xds_matcher,json=xdsMatcher,proto3" json:"xds_matcher,omitempty"` // The underlying extension config. - ExtensionConfig *v31.TypedExtensionConfig `protobuf:"bytes,2,opt,name=extension_config,json=extensionConfig,proto3" json:"extension_config,omitempty"` + ExtensionConfig *v32.TypedExtensionConfig `protobuf:"bytes,2,opt,name=extension_config,json=extensionConfig,proto3" json:"extension_config,omitempty"` } func (x *ExtensionWithMatcher) Reset() { @@ -75,6 +77,7 @@ func (*ExtensionWithMatcher) Descriptor() ([]byte, []int) { return file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescGZIP(), []int{0} } +// Deprecated: Do not use. func (x *ExtensionWithMatcher) GetMatcher() *v3.Matcher { if x != nil { return x.Matcher @@ -82,7 +85,14 @@ func (x *ExtensionWithMatcher) GetMatcher() *v3.Matcher { return nil } -func (x *ExtensionWithMatcher) GetExtensionConfig() *v31.TypedExtensionConfig { +func (x *ExtensionWithMatcher) GetXdsMatcher() *v31.Matcher { + if x != nil { + return x.XdsMatcher + } + return nil +} + +func (x *ExtensionWithMatcher) GetExtensionConfig() *v32.TypedExtensionConfig { if x != nil { return x.ExtensionConfig } @@ -103,31 +113,45 @@ var file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDesc = [ 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, - 0x01, 0x0a, 0x14, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x54, 0x0a, 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x02, 0x0a, 0x14, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x4e, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, + 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x3d, 0x0a, 0x0b, 0x78, 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x52, 0x0a, 0x78, 0x64, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x5f, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x42, 0xab, 0x01, 0x0a, 0x31, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, + 0x42, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -146,16 +170,18 @@ var file_envoy_extensions_common_matching_v3_extension_matcher_proto_msgTypes = var file_envoy_extensions_common_matching_v3_extension_matcher_proto_goTypes = []interface{}{ (*ExtensionWithMatcher)(nil), // 0: envoy.extensions.common.matching.v3.ExtensionWithMatcher (*v3.Matcher)(nil), // 1: envoy.config.common.matcher.v3.Matcher - (*v31.TypedExtensionConfig)(nil), // 2: envoy.config.core.v3.TypedExtensionConfig + (*v31.Matcher)(nil), // 2: xds.type.matcher.v3.Matcher + (*v32.TypedExtensionConfig)(nil), // 3: envoy.config.core.v3.TypedExtensionConfig } var file_envoy_extensions_common_matching_v3_extension_matcher_proto_depIdxs = []int32{ 1, // 0: envoy.extensions.common.matching.v3.ExtensionWithMatcher.matcher:type_name -> envoy.config.common.matcher.v3.Matcher - 2, // 1: envoy.extensions.common.matching.v3.ExtensionWithMatcher.extension_config:type_name -> envoy.config.core.v3.TypedExtensionConfig - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 1: envoy.extensions.common.matching.v3.ExtensionWithMatcher.xds_matcher:type_name -> xds.type.matcher.v3.Matcher + 3, // 2: envoy.extensions.common.matching.v3.ExtensionWithMatcher.extension_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_envoy_extensions_common_matching_v3_extension_matcher_proto_init() } diff --git a/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.validate.go b/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.validate.go index c163a78d5b..0ad19a7d66 100644 --- a/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.validate.go +++ b/pkg/api/envoy/extensions/common/matching/v3/extension_matcher.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/common/matching/v3/extension_matcher.proto -package envoy_extensions_common_matching_v3 +package matchingv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,84 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ExtensionWithMatcher with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ExtensionWithMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtensionWithMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtensionWithMatcherMultiError, or nil if none found. +func (m *ExtensionWithMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtensionWithMatcher) validate(all bool) error { if m == nil { return nil } - if m.GetMatcher() == nil { - return ExtensionWithMatcherValidationError{ - field: "Matcher", - reason: "value is required", + var errors []error + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtensionWithMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } } } - if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetXdsMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "XdsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "XdsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetXdsMatcher()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtensionWithMatcherValidationError{ - field: "Matcher", + field: "XdsMatcher", reason: "embedded message failed validation", cause: err, } @@ -59,13 +116,36 @@ func (m *ExtensionWithMatcher) Validate() error { } if m.GetExtensionConfig() == nil { - return ExtensionWithMatcherValidationError{ + err := ExtensionWithMatcherValidationError{ field: "ExtensionConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetExtensionConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExtensionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "ExtensionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "ExtensionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtensionConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtensionWithMatcherValidationError{ field: "ExtensionConfig", @@ -75,9 +155,30 @@ func (m *ExtensionWithMatcher) Validate() error { } } + if len(errors) > 0 { + return ExtensionWithMatcherMultiError(errors) + } + return nil } +// ExtensionWithMatcherMultiError is an error wrapping multiple validation +// errors returned by ExtensionWithMatcher.ValidateAll() if the designated +// constraints aren't met. +type ExtensionWithMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtensionWithMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtensionWithMatcherMultiError) AllErrors() []error { return m } + // ExtensionWithMatcherValidationError is the validation error returned by // ExtensionWithMatcher.Validate if the designated constraints aren't met. type ExtensionWithMatcherValidationError struct { diff --git a/pkg/api/envoy/extensions/common/matching/v4alpha/extension_matcher.pb.go b/pkg/api/envoy/extensions/common/matching/v4alpha/extension_matcher.pb.go deleted file mode 100644 index 4ea5fee52c..0000000000 --- a/pkg/api/envoy/extensions/common/matching/v4alpha/extension_matcher.pb.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/common/matching/v4alpha/extension_matcher.proto - -package envoy_extensions_common_matching_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/matcher/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Wrapper around an existing extension that provides an associated matcher. This allows -// decorating an existing extension with a matcher, which can be used to match against -// relevant protocol data. -type ExtensionWithMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The associated matcher. - Matcher *v4alpha.Matcher `protobuf:"bytes,1,opt,name=matcher,proto3" json:"matcher,omitempty"` - // The underlying extension config. - ExtensionConfig *v4alpha1.TypedExtensionConfig `protobuf:"bytes,2,opt,name=extension_config,json=extensionConfig,proto3" json:"extension_config,omitempty"` -} - -func (x *ExtensionWithMatcher) Reset() { - *x = ExtensionWithMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionWithMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionWithMatcher) ProtoMessage() {} - -func (x *ExtensionWithMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionWithMatcher.ProtoReflect.Descriptor instead. -func (*ExtensionWithMatcher) Descriptor() ([]byte, []int) { - return file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescGZIP(), []int{0} -} - -func (x *ExtensionWithMatcher) GetMatcher() *v4alpha.Matcher { - if x != nil { - return x.Matcher - } - return nil -} - -func (x *ExtensionWithMatcher) GetExtensionConfig() *v4alpha1.TypedExtensionConfig { - if x != nil { - return x.ExtensionConfig - } - return nil -} - -var File_envoy_extensions_common_matching_v4alpha_extension_matcher_proto protoreflect.FileDescriptor - -var file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDesc = []byte{ - 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x31, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x02, 0x0a, 0x14, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x50, - 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x64, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x59, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescOnce sync.Once - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescData = file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDesc -) - -func file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescGZIP() []byte { - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescOnce.Do(func() { - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescData) - }) - return file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDescData -} - -var file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_goTypes = []interface{}{ - (*ExtensionWithMatcher)(nil), // 0: envoy.extensions.common.matching.v4alpha.ExtensionWithMatcher - (*v4alpha.Matcher)(nil), // 1: envoy.config.common.matcher.v4alpha.Matcher - (*v4alpha1.TypedExtensionConfig)(nil), // 2: envoy.config.core.v4alpha.TypedExtensionConfig -} -var file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.common.matching.v4alpha.ExtensionWithMatcher.matcher:type_name -> envoy.config.common.matcher.v4alpha.Matcher - 2, // 1: envoy.extensions.common.matching.v4alpha.ExtensionWithMatcher.extension_config:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_init() } -func file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_init() { - if File_envoy_extensions_common_matching_v4alpha_extension_matcher_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionWithMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_goTypes, - DependencyIndexes: file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_depIdxs, - MessageInfos: file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_msgTypes, - }.Build() - File_envoy_extensions_common_matching_v4alpha_extension_matcher_proto = out.File - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_rawDesc = nil - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_goTypes = nil - file_envoy_extensions_common_matching_v4alpha_extension_matcher_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/common/matching/v4alpha/extension_matcher.pb.validate.go b/pkg/api/envoy/extensions/common/matching/v4alpha/extension_matcher.pb.validate.go deleted file mode 100644 index 8655466ea7..0000000000 --- a/pkg/api/envoy/extensions/common/matching/v4alpha/extension_matcher.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/common/matching/v4alpha/extension_matcher.proto - -package envoy_extensions_common_matching_v4alpha - -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{} -) - -// Validate checks the field values on ExtensionWithMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ExtensionWithMatcher) Validate() error { - if m == nil { - return nil - } - - if m.GetMatcher() == nil { - return ExtensionWithMatcherValidationError{ - field: "Matcher", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionWithMatcherValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetExtensionConfig() == nil { - return ExtensionWithMatcherValidationError{ - field: "ExtensionConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetExtensionConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionWithMatcherValidationError{ - field: "ExtensionConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ExtensionWithMatcherValidationError is the validation error returned by -// ExtensionWithMatcher.Validate if the designated constraints aren't met. -type ExtensionWithMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtensionWithMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtensionWithMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtensionWithMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtensionWithMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtensionWithMatcherValidationError) ErrorName() string { - return "ExtensionWithMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e ExtensionWithMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtensionWithMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtensionWithMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtensionWithMatcherValidationError{} diff --git a/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go b/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go index 187812ea56..a7372fddf2 100644 --- a/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go +++ b/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/common/ratelimit/v3/ratelimit.proto -package envoy_extensions_common_ratelimit_v3 +package ratelimitv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,9 +23,62 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// Defines the version of the standard to use for X-RateLimit headers. +type XRateLimitHeadersRFCVersion int32 + +const ( + // X-RateLimit headers disabled. + XRateLimitHeadersRFCVersion_OFF XRateLimitHeadersRFCVersion = 0 + // Use `draft RFC Version 03 `_ where 3 headers will be added: + // + // * ``X-RateLimit-Limit`` - indicates the request-quota associated to the + // client in the current time-window followed by the description of the + // quota policy. The value is returned by the maximum tokens of the token bucket. + // * ``X-RateLimit-Remaining`` - indicates the remaining requests in the + // current time-window. The value is returned by the remaining tokens in the token bucket. + // * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of + // the current time-window. The value is returned by the remaining fill interval of the token bucket. + XRateLimitHeadersRFCVersion_DRAFT_VERSION_03 XRateLimitHeadersRFCVersion = 1 +) + +// Enum value maps for XRateLimitHeadersRFCVersion. +var ( + XRateLimitHeadersRFCVersion_name = map[int32]string{ + 0: "OFF", + 1: "DRAFT_VERSION_03", + } + XRateLimitHeadersRFCVersion_value = map[string]int32{ + "OFF": 0, + "DRAFT_VERSION_03": 1, + } +) + +func (x XRateLimitHeadersRFCVersion) Enum() *XRateLimitHeadersRFCVersion { + p := new(XRateLimitHeadersRFCVersion) + *p = x + return p +} + +func (x XRateLimitHeadersRFCVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (XRateLimitHeadersRFCVersion) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_enumTypes[0].Descriptor() +} + +func (XRateLimitHeadersRFCVersion) Type() protoreflect.EnumType { + return &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_enumTypes[0] +} + +func (x XRateLimitHeadersRFCVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use XRateLimitHeadersRFCVersion.Descriptor instead. +func (XRateLimitHeadersRFCVersion) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescGZIP(), []int{0} +} // A RateLimitDescriptor is a list of hierarchical entries that are used by the service to // determine the final rate limit key and overall allowed limit. Here are some examples of how @@ -130,6 +182,63 @@ func (x *RateLimitDescriptor) GetLimit() *RateLimitDescriptor_RateLimitOverride return nil } +type LocalRateLimitDescriptor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Descriptor entries. + Entries []*RateLimitDescriptor_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + // Token Bucket algorithm for local ratelimiting. + TokenBucket *v3.TokenBucket `protobuf:"bytes,2,opt,name=token_bucket,json=tokenBucket,proto3" json:"token_bucket,omitempty"` +} + +func (x *LocalRateLimitDescriptor) Reset() { + *x = LocalRateLimitDescriptor{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocalRateLimitDescriptor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocalRateLimitDescriptor) ProtoMessage() {} + +func (x *LocalRateLimitDescriptor) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocalRateLimitDescriptor.ProtoReflect.Descriptor instead. +func (*LocalRateLimitDescriptor) Descriptor() ([]byte, []int) { + return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescGZIP(), []int{1} +} + +func (x *LocalRateLimitDescriptor) GetEntries() []*RateLimitDescriptor_Entry { + if x != nil { + return x.Entries + } + return nil +} + +func (x *LocalRateLimitDescriptor) GetTokenBucket() *v3.TokenBucket { + if x != nil { + return x.TokenBucket + } + return nil +} + type RateLimitDescriptor_Entry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -144,7 +253,7 @@ type RateLimitDescriptor_Entry struct { func (x *RateLimitDescriptor_Entry) Reset() { *x = RateLimitDescriptor_Entry{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1] + mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -157,7 +266,7 @@ func (x *RateLimitDescriptor_Entry) String() string { func (*RateLimitDescriptor_Entry) ProtoMessage() {} func (x *RateLimitDescriptor_Entry) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1] + mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -204,7 +313,7 @@ type RateLimitDescriptor_RateLimitOverride struct { func (x *RateLimitDescriptor_RateLimitOverride) Reset() { *x = RateLimitDescriptor_RateLimitOverride{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2] + mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -217,7 +326,7 @@ func (x *RateLimitDescriptor_RateLimitOverride) String() string { func (*RateLimitDescriptor_RateLimitOverride) ProtoMessage() {} func (x *RateLimitDescriptor_RateLimitOverride) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2] + mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -244,7 +353,7 @@ func (x *RateLimitDescriptor_RateLimitOverride) GetUnit() v3.RateLimitUnit { if x != nil { return x.Unit } - return v3.RateLimitUnit_UNKNOWN + return v3.RateLimitUnit(0) } var File_envoy_extensions_common_ratelimit_v3_ratelimit_proto protoreflect.FileDescriptor @@ -258,50 +367,75 @@ var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDesc = []byte{ 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x04, 0x0a, 0x13, + 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x04, + 0x0a, 0x13, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x63, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x05, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x7a, 0x0a, + 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x12, 0x63, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, - 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x7b, 0x0a, 0x11, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2a, + 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, + 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x75, 0x6e, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x22, 0xc8, 0x01, 0x0a, 0x18, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x63, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x7a, 0x0a, 0x05, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x37, - 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x7b, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x55, 0x6e, 0x69, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x75, 0x6e, 0x69, 0x74, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x42, 0x4e, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x2a, 0x3c, 0x0a, 0x1b, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x46, 0x46, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, + 0x44, 0x52, 0x41, 0x46, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x30, 0x33, + 0x10, 0x01, 0x42, 0xa7, 0x01, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -316,22 +450,28 @@ func file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescGZIP() []b return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescData } -var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_goTypes = []interface{}{ - (*RateLimitDescriptor)(nil), // 0: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor - (*RateLimitDescriptor_Entry)(nil), // 1: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry - (*RateLimitDescriptor_RateLimitOverride)(nil), // 2: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride - (v3.RateLimitUnit)(0), // 3: envoy.type.v3.RateLimitUnit + (XRateLimitHeadersRFCVersion)(0), // 0: envoy.extensions.common.ratelimit.v3.XRateLimitHeadersRFCVersion + (*RateLimitDescriptor)(nil), // 1: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor + (*LocalRateLimitDescriptor)(nil), // 2: envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor + (*RateLimitDescriptor_Entry)(nil), // 3: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry + (*RateLimitDescriptor_RateLimitOverride)(nil), // 4: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride + (*v3.TokenBucket)(nil), // 5: envoy.type.v3.TokenBucket + (v3.RateLimitUnit)(0), // 6: envoy.type.v3.RateLimitUnit } var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.entries:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry - 2, // 1: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.limit:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride - 3, // 2: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.unit:type_name -> envoy.type.v3.RateLimitUnit - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 0: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.entries:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry + 4, // 1: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.limit:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride + 3, // 2: envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.entries:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry + 5, // 3: envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.token_bucket:type_name -> envoy.type.v3.TokenBucket + 6, // 4: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.RateLimitOverride.unit:type_name -> envoy.type.v3.RateLimitUnit + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_init() } @@ -353,7 +493,7 @@ func file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_init() { } } file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitDescriptor_Entry); i { + switch v := v.(*LocalRateLimitDescriptor); i { case 0: return &v.state case 1: @@ -365,6 +505,18 @@ func file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_init() { } } file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitDescriptor_Entry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimitDescriptor_RateLimitOverride); i { case 0: return &v.state @@ -382,13 +534,14 @@ func file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, + NumEnums: 1, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_goTypes, DependencyIndexes: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_depIdxs, + EnumInfos: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_enumTypes, MessageInfos: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes, }.Build() File_envoy_extensions_common_ratelimit_v3_ratelimit_proto = out.File diff --git a/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.validate.go b/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.validate.go index f2138b1cfd..66679f816c 100644 --- a/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.validate.go +++ b/pkg/api/envoy/extensions/common/ratelimit/v3/ratelimit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/common/ratelimit/v3/ratelimit.proto -package envoy_extensions_common_ratelimit_v3 +package ratelimitv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" ) @@ -32,30 +33,68 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.RateLimitUnit(0) ) // Validate checks the field values on RateLimitDescriptor with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitDescriptor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitDescriptor with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitDescriptorMultiError, or nil if none found. +func (m *RateLimitDescriptor) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitDescriptor) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetEntries()) < 1 { - return RateLimitDescriptorValidationError{ + err := RateLimitDescriptorValidationError{ field: "Entries", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetEntries() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitDescriptorValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitDescriptorValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitDescriptorValidationError{ field: fmt.Sprintf("Entries[%v]", idx), @@ -67,7 +106,26 @@ func (m *RateLimitDescriptor) Validate() error { } - if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitDescriptorValidationError{ + field: "Limit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitDescriptorValidationError{ + field: "Limit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitDescriptorValidationError{ field: "Limit", @@ -77,9 +135,30 @@ func (m *RateLimitDescriptor) Validate() error { } } + if len(errors) > 0 { + return RateLimitDescriptorMultiError(errors) + } + return nil } +// RateLimitDescriptorMultiError is an error wrapping multiple validation +// errors returned by RateLimitDescriptor.ValidateAll() if the designated +// constraints aren't met. +type RateLimitDescriptorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitDescriptorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitDescriptorMultiError) AllErrors() []error { return m } + // RateLimitDescriptorValidationError is the validation error returned by // RateLimitDescriptor.Validate if the designated constraints aren't met. type RateLimitDescriptorValidationError struct { @@ -136,31 +215,261 @@ var _ interface { ErrorName() string } = RateLimitDescriptorValidationError{} +// Validate checks the field values on LocalRateLimitDescriptor with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *LocalRateLimitDescriptor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalRateLimitDescriptor with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LocalRateLimitDescriptorMultiError, or nil if none found. +func (m *LocalRateLimitDescriptor) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalRateLimitDescriptor) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetEntries()) < 1 { + err := LocalRateLimitDescriptorValidationError{ + field: "Entries", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetEntries() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitDescriptorValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitDescriptorValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalRateLimitDescriptorValidationError{ + field: fmt.Sprintf("Entries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.GetTokenBucket() == nil { + err := LocalRateLimitDescriptorValidationError{ + field: "TokenBucket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTokenBucket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitDescriptorValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitDescriptorValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalRateLimitDescriptorValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return LocalRateLimitDescriptorMultiError(errors) + } + + return nil +} + +// LocalRateLimitDescriptorMultiError is an error wrapping multiple validation +// errors returned by LocalRateLimitDescriptor.ValidateAll() if the designated +// constraints aren't met. +type LocalRateLimitDescriptorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalRateLimitDescriptorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalRateLimitDescriptorMultiError) AllErrors() []error { return m } + +// LocalRateLimitDescriptorValidationError is the validation error returned by +// LocalRateLimitDescriptor.Validate if the designated constraints aren't met. +type LocalRateLimitDescriptorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LocalRateLimitDescriptorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LocalRateLimitDescriptorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LocalRateLimitDescriptorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LocalRateLimitDescriptorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LocalRateLimitDescriptorValidationError) ErrorName() string { + return "LocalRateLimitDescriptorValidationError" +} + +// Error satisfies the builtin error interface +func (e LocalRateLimitDescriptorValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLocalRateLimitDescriptor.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LocalRateLimitDescriptorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LocalRateLimitDescriptorValidationError{} + // Validate checks the field values on RateLimitDescriptor_Entry with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitDescriptor_Entry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitDescriptor_Entry with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitDescriptor_EntryMultiError, or nil if none found. +func (m *RateLimitDescriptor_Entry) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitDescriptor_Entry) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetKey()) < 1 { - return RateLimitDescriptor_EntryValidationError{ + err := RateLimitDescriptor_EntryValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetValue()) < 1 { - return RateLimitDescriptor_EntryValidationError{ + err := RateLimitDescriptor_EntryValidationError{ field: "Value", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RateLimitDescriptor_EntryMultiError(errors) } return nil } +// RateLimitDescriptor_EntryMultiError is an error wrapping multiple validation +// errors returned by RateLimitDescriptor_Entry.ValidateAll() if the +// designated constraints aren't met. +type RateLimitDescriptor_EntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitDescriptor_EntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitDescriptor_EntryMultiError) AllErrors() []error { return m } + // RateLimitDescriptor_EntryValidationError is the validation error returned by // RateLimitDescriptor_Entry.Validate if the designated constraints aren't met. type RateLimitDescriptor_EntryValidationError struct { @@ -219,24 +528,65 @@ var _ interface { // Validate checks the field values on RateLimitDescriptor_RateLimitOverride // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *RateLimitDescriptor_RateLimitOverride) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitDescriptor_RateLimitOverride +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimitDescriptor_RateLimitOverrideMultiError, or nil if none found. +func (m *RateLimitDescriptor_RateLimitOverride) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitDescriptor_RateLimitOverride) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for RequestsPerUnit if _, ok := v3.RateLimitUnit_name[int32(m.GetUnit())]; !ok { - return RateLimitDescriptor_RateLimitOverrideValidationError{ + err := RateLimitDescriptor_RateLimitOverrideValidationError{ field: "Unit", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RateLimitDescriptor_RateLimitOverrideMultiError(errors) } return nil } +// RateLimitDescriptor_RateLimitOverrideMultiError is an error wrapping +// multiple validation errors returned by +// RateLimitDescriptor_RateLimitOverride.ValidateAll() if the designated +// constraints aren't met. +type RateLimitDescriptor_RateLimitOverrideMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitDescriptor_RateLimitOverrideMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitDescriptor_RateLimitOverrideMultiError) AllErrors() []error { return m } + // RateLimitDescriptor_RateLimitOverrideValidationError is the validation error // returned by RateLimitDescriptor_RateLimitOverride.Validate if the // designated constraints aren't met. diff --git a/pkg/api/envoy/extensions/common/tap/v3/common.pb.go b/pkg/api/envoy/extensions/common/tap/v3/common.pb.go index ff5c09758c..30ed1ddf2b 100644 --- a/pkg/api/envoy/extensions/common/tap/v3/common.pb.go +++ b/pkg/api/envoy/extensions/common/tap/v3/common.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/common/tap/v3/common.proto -package envoy_extensions_common_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/tap/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Common configuration for all tap extensions. type CommonExtensionConfig struct { state protoimpl.MessageState @@ -173,8 +168,6 @@ var file_envoy_extensions_common_tap_v3_common_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, @@ -203,12 +196,17 @@ var file_envoy_extensions_common_tap_v3_common_proto_rawDesc = []byte{ 0x69, 0x67, 0x49, 0x64, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x45, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x92, 0x01, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, + 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/common/tap/v3/common.pb.validate.go b/pkg/api/envoy/extensions/common/tap/v3/common.pb.validate.go index d466e81606..f63ab530d8 100644 --- a/pkg/api/envoy/extensions/common/tap/v3/common.pb.validate.go +++ b/pkg/api/envoy/extensions/common/tap/v3/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/common/tap/v3/common.proto -package envoy_extensions_common_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CommonExtensionConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommonExtensionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonExtensionConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonExtensionConfigMultiError, or nil if none found. +func (m *CommonExtensionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonExtensionConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ConfigType.(type) { case *CommonExtensionConfig_AdminConfig: - if v, ok := interface{}(m.GetAdminConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdminConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "AdminConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "AdminConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdminConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonExtensionConfigValidationError{ field: "AdminConfig", @@ -57,7 +92,26 @@ func (m *CommonExtensionConfig) Validate() error { case *CommonExtensionConfig_StaticConfig: - if v, ok := interface{}(m.GetStaticConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStaticConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "StaticConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "StaticConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStaticConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonExtensionConfigValidationError{ field: "StaticConfig", @@ -68,16 +122,41 @@ func (m *CommonExtensionConfig) Validate() error { } default: - return CommonExtensionConfigValidationError{ + err := CommonExtensionConfigValidationError{ field: "ConfigType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return CommonExtensionConfigMultiError(errors) + } + return nil } +// CommonExtensionConfigMultiError is an error wrapping multiple validation +// errors returned by CommonExtensionConfig.ValidateAll() if the designated +// constraints aren't met. +type CommonExtensionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonExtensionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonExtensionConfigMultiError) AllErrors() []error { return m } + // CommonExtensionConfigValidationError is the validation error returned by // CommonExtensionConfig.Validate if the designated constraints aren't met. type CommonExtensionConfigValidationError struct { @@ -135,23 +214,61 @@ var _ interface { } = CommonExtensionConfigValidationError{} // Validate checks the field values on AdminConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AdminConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdminConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AdminConfigMultiError, or +// nil if none found. +func (m *AdminConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AdminConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetConfigId()) < 1 { - return AdminConfigValidationError{ + err := AdminConfigValidationError{ field: "ConfigId", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AdminConfigMultiError(errors) } return nil } +// AdminConfigMultiError is an error wrapping multiple validation errors +// returned by AdminConfig.ValidateAll() if the designated constraints aren't met. +type AdminConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdminConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdminConfigMultiError) AllErrors() []error { return m } + // AdminConfigValidationError is the validation error returned by // AdminConfig.Validate if the designated constraints aren't met. type AdminConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/common/tap/v4alpha/common.pb.go b/pkg/api/envoy/extensions/common/tap/v4alpha/common.pb.go deleted file mode 100644 index f41891b500..0000000000 --- a/pkg/api/envoy/extensions/common/tap/v4alpha/common.pb.go +++ /dev/null @@ -1,295 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/common/tap/v4alpha/common.proto - -package envoy_extensions_common_tap_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/tap/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Common configuration for all tap extensions. -type CommonExtensionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ConfigType: - // *CommonExtensionConfig_AdminConfig - // *CommonExtensionConfig_StaticConfig - ConfigType isCommonExtensionConfig_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *CommonExtensionConfig) Reset() { - *x = CommonExtensionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonExtensionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonExtensionConfig) ProtoMessage() {} - -func (x *CommonExtensionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonExtensionConfig.ProtoReflect.Descriptor instead. -func (*CommonExtensionConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescGZIP(), []int{0} -} - -func (m *CommonExtensionConfig) GetConfigType() isCommonExtensionConfig_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *CommonExtensionConfig) GetAdminConfig() *AdminConfig { - if x, ok := x.GetConfigType().(*CommonExtensionConfig_AdminConfig); ok { - return x.AdminConfig - } - return nil -} - -func (x *CommonExtensionConfig) GetStaticConfig() *v4alpha.TapConfig { - if x, ok := x.GetConfigType().(*CommonExtensionConfig_StaticConfig); ok { - return x.StaticConfig - } - return nil -} - -type isCommonExtensionConfig_ConfigType interface { - isCommonExtensionConfig_ConfigType() -} - -type CommonExtensionConfig_AdminConfig struct { - // If specified, the tap filter will be configured via an admin handler. - AdminConfig *AdminConfig `protobuf:"bytes,1,opt,name=admin_config,json=adminConfig,proto3,oneof"` -} - -type CommonExtensionConfig_StaticConfig struct { - // If specified, the tap filter will be configured via a static configuration that cannot be - // changed. - StaticConfig *v4alpha.TapConfig `protobuf:"bytes,2,opt,name=static_config,json=staticConfig,proto3,oneof"` -} - -func (*CommonExtensionConfig_AdminConfig) isCommonExtensionConfig_ConfigType() {} - -func (*CommonExtensionConfig_StaticConfig) isCommonExtensionConfig_ConfigType() {} - -// Configuration for the admin handler. See :ref:`here ` for -// more information. -type AdminConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Opaque configuration ID. When requests are made to the admin handler, the passed opaque ID is - // matched to the configured filter opaque ID to determine which filter to configure. - ConfigId string `protobuf:"bytes,1,opt,name=config_id,json=configId,proto3" json:"config_id,omitempty"` -} - -func (x *AdminConfig) Reset() { - *x = AdminConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdminConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdminConfig) ProtoMessage() {} - -func (x *AdminConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdminConfig.ProtoReflect.Descriptor instead. -func (*AdminConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescGZIP(), []int{1} -} - -func (x *AdminConfig) GetConfigId() string { - if x != nil { - return x.ConfigId - } - return "" -} - -var File_envoy_extensions_common_tap_v4alpha_common_proto protoreflect.FileDescriptor - -var file_envoy_extensions_common_tap_v4alpha_common_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x02, 0x0a, 0x15, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x12, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x66, 0x0a, 0x0b, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x3a, 0x31, 0x9a, 0xc5, - 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, - 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, - 0x4a, 0x0a, 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescOnce sync.Once - file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescData = file_envoy_extensions_common_tap_v4alpha_common_proto_rawDesc -) - -func file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescGZIP() []byte { - file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescOnce.Do(func() { - file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescData) - }) - return file_envoy_extensions_common_tap_v4alpha_common_proto_rawDescData -} - -var file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_common_tap_v4alpha_common_proto_goTypes = []interface{}{ - (*CommonExtensionConfig)(nil), // 0: envoy.extensions.common.tap.v4alpha.CommonExtensionConfig - (*AdminConfig)(nil), // 1: envoy.extensions.common.tap.v4alpha.AdminConfig - (*v4alpha.TapConfig)(nil), // 2: envoy.config.tap.v4alpha.TapConfig -} -var file_envoy_extensions_common_tap_v4alpha_common_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.common.tap.v4alpha.CommonExtensionConfig.admin_config:type_name -> envoy.extensions.common.tap.v4alpha.AdminConfig - 2, // 1: envoy.extensions.common.tap.v4alpha.CommonExtensionConfig.static_config:type_name -> envoy.config.tap.v4alpha.TapConfig - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_common_tap_v4alpha_common_proto_init() } -func file_envoy_extensions_common_tap_v4alpha_common_proto_init() { - if File_envoy_extensions_common_tap_v4alpha_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonExtensionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdminConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*CommonExtensionConfig_AdminConfig)(nil), - (*CommonExtensionConfig_StaticConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_common_tap_v4alpha_common_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_common_tap_v4alpha_common_proto_goTypes, - DependencyIndexes: file_envoy_extensions_common_tap_v4alpha_common_proto_depIdxs, - MessageInfos: file_envoy_extensions_common_tap_v4alpha_common_proto_msgTypes, - }.Build() - File_envoy_extensions_common_tap_v4alpha_common_proto = out.File - file_envoy_extensions_common_tap_v4alpha_common_proto_rawDesc = nil - file_envoy_extensions_common_tap_v4alpha_common_proto_goTypes = nil - file_envoy_extensions_common_tap_v4alpha_common_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/common/tap/v4alpha/common.pb.validate.go b/pkg/api/envoy/extensions/common/tap/v4alpha/common.pb.validate.go deleted file mode 100644 index c17fa15591..0000000000 --- a/pkg/api/envoy/extensions/common/tap/v4alpha/common.pb.validate.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/common/tap/v4alpha/common.proto - -package envoy_extensions_common_tap_v4alpha - -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{} -) - -// Validate checks the field values on CommonExtensionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CommonExtensionConfig) Validate() error { - if m == nil { - return nil - } - - switch m.ConfigType.(type) { - - case *CommonExtensionConfig_AdminConfig: - - if v, ok := interface{}(m.GetAdminConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonExtensionConfigValidationError{ - field: "AdminConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CommonExtensionConfig_StaticConfig: - - if v, ok := interface{}(m.GetStaticConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonExtensionConfigValidationError{ - field: "StaticConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return CommonExtensionConfigValidationError{ - field: "ConfigType", - reason: "value is required", - } - - } - - return nil -} - -// CommonExtensionConfigValidationError is the validation error returned by -// CommonExtensionConfig.Validate if the designated constraints aren't met. -type CommonExtensionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonExtensionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommonExtensionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommonExtensionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommonExtensionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommonExtensionConfigValidationError) ErrorName() string { - return "CommonExtensionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e CommonExtensionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonExtensionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonExtensionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonExtensionConfigValidationError{} - -// Validate checks the field values on AdminConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *AdminConfig) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetConfigId()) < 1 { - return AdminConfigValidationError{ - field: "ConfigId", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// AdminConfigValidationError is the validation error returned by -// AdminConfig.Validate if the designated constraints aren't met. -type AdminConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdminConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdminConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AdminConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdminConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdminConfigValidationError) ErrorName() string { return "AdminConfigValidationError" } - -// Error satisfies the builtin error interface -func (e AdminConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdminConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdminConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdminConfigValidationError{} diff --git a/pkg/api/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.go b/pkg/api/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.go new file mode 100644 index 0000000000..a28b1bc4d9 --- /dev/null +++ b/pkg/api/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.go @@ -0,0 +1,318 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/compression/brotli/compressor/v3/brotli.proto + +package compressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Brotli_EncoderMode int32 + +const ( + Brotli_DEFAULT Brotli_EncoderMode = 0 + Brotli_GENERIC Brotli_EncoderMode = 1 + Brotli_TEXT Brotli_EncoderMode = 2 + Brotli_FONT Brotli_EncoderMode = 3 +) + +// Enum value maps for Brotli_EncoderMode. +var ( + Brotli_EncoderMode_name = map[int32]string{ + 0: "DEFAULT", + 1: "GENERIC", + 2: "TEXT", + 3: "FONT", + } + Brotli_EncoderMode_value = map[string]int32{ + "DEFAULT": 0, + "GENERIC": 1, + "TEXT": 2, + "FONT": 3, + } +) + +func (x Brotli_EncoderMode) Enum() *Brotli_EncoderMode { + p := new(Brotli_EncoderMode) + *p = x + return p +} + +func (x Brotli_EncoderMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Brotli_EncoderMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes[0].Descriptor() +} + +func (Brotli_EncoderMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes[0] +} + +func (x Brotli_EncoderMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Brotli_EncoderMode.Descriptor instead. +func (Brotli_EncoderMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescGZIP(), []int{0, 0} +} + +// [#next-free-field: 7] +type Brotli struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Value from 0 to 11 that controls the main compression speed-density lever. + // The higher quality, the slower compression. The default value is 3. + Quality *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=quality,proto3" json:"quality,omitempty"` + // A value used to tune encoder for specific input. For more information about modes, + // please refer to brotli manual: https://brotli.org/encode.html#aa6f + // This field will be set to "DEFAULT" if not specified. + EncoderMode Brotli_EncoderMode `protobuf:"varint,2,opt,name=encoder_mode,json=encoderMode,proto3,enum=envoy.extensions.compression.brotli.compressor.v3.Brotli_EncoderMode" json:"encoder_mode,omitempty"` + // Value from 10 to 24 that represents the base two logarithmic of the compressor's window size. + // Larger window results in better compression at the expense of memory usage. The default is 18. + // For more details about this parameter, please refer to brotli manual: + // https://brotli.org/encode.html#a9a8 + WindowBits *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"` + // Value from 16 to 24 that represents the base two logarithmic of the compressor's input block + // size. Larger input block results in better compression at the expense of memory usage. The + // default is 24. For more details about this parameter, please refer to brotli manual: + // https://brotli.org/encode.html#a9a8 + InputBlockBits *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=input_block_bits,json=inputBlockBits,proto3" json:"input_block_bits,omitempty"` + // Value for compressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` + // If true, disables "literal context modeling" format feature. + // This flag is a "decoding-speed vs compression ratio" trade-off. + DisableLiteralContextModeling bool `protobuf:"varint,6,opt,name=disable_literal_context_modeling,json=disableLiteralContextModeling,proto3" json:"disable_literal_context_modeling,omitempty"` +} + +func (x *Brotli) Reset() { + *x = Brotli{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Brotli) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Brotli) ProtoMessage() {} + +func (x *Brotli) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Brotli.ProtoReflect.Descriptor instead. +func (*Brotli) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescGZIP(), []int{0} +} + +func (x *Brotli) GetQuality() *wrappers.UInt32Value { + if x != nil { + return x.Quality + } + return nil +} + +func (x *Brotli) GetEncoderMode() Brotli_EncoderMode { + if x != nil { + return x.EncoderMode + } + return Brotli_DEFAULT +} + +func (x *Brotli) GetWindowBits() *wrappers.UInt32Value { + if x != nil { + return x.WindowBits + } + return nil +} + +func (x *Brotli) GetInputBlockBits() *wrappers.UInt32Value { + if x != nil { + return x.InputBlockBits + } + return nil +} + +func (x *Brotli) GetChunkSize() *wrappers.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +func (x *Brotli) GetDisableLiteralContextModeling() bool { + if x != nil { + return x.DisableLiteralContextModeling + } + return false +} + +var File_envoy_extensions_compression_brotli_compressor_v3_brotli_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc = []byte{ + 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x62, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x04, 0x0a, 0x06, + 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x12, 0x3f, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0b, 0x52, 0x07, + 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x72, 0x0a, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x72, 0x6f, + 0x74, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x18, 0x28, 0x0a, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, 0x51, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x18, 0x18, 0x28, 0x10, 0x52, 0x0e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x69, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, + 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, + 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, + 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x0b, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, + 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x45, 0x4e, 0x45, + 0x52, 0x49, 0x43, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x46, 0x4f, 0x4e, 0x54, 0x10, 0x03, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x42, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x65, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData = file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc +) + +func file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData) + }) + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData +} + +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_goTypes = []interface{}{ + (Brotli_EncoderMode)(0), // 0: envoy.extensions.compression.brotli.compressor.v3.Brotli.EncoderMode + (*Brotli)(nil), // 1: envoy.extensions.compression.brotli.compressor.v3.Brotli + (*wrappers.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.compression.brotli.compressor.v3.Brotli.quality:type_name -> google.protobuf.UInt32Value + 0, // 1: envoy.extensions.compression.brotli.compressor.v3.Brotli.encoder_mode:type_name -> envoy.extensions.compression.brotli.compressor.v3.Brotli.EncoderMode + 2, // 2: envoy.extensions.compression.brotli.compressor.v3.Brotli.window_bits:type_name -> google.protobuf.UInt32Value + 2, // 3: envoy.extensions.compression.brotli.compressor.v3.Brotli.input_block_bits:type_name -> google.protobuf.UInt32Value + 2, // 4: envoy.extensions.compression.brotli.compressor.v3.Brotli.chunk_size:type_name -> google.protobuf.UInt32Value + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_init() } +func file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_init() { + if File_envoy_extensions_compression_brotli_compressor_v3_brotli_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Brotli); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_depIdxs, + EnumInfos: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes, + MessageInfos: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_brotli_compressor_v3_brotli_proto = out.File + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc = nil + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_goTypes = nil + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.validate.go b/pkg/api/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.validate.go new file mode 100644 index 0000000000..e0133ccb39 --- /dev/null +++ b/pkg/api/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.validate.go @@ -0,0 +1,207 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/brotli/compressor/v3/brotli.proto + +package compressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Brotli with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Brotli) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Brotli with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in BrotliMultiError, or nil if none found. +func (m *Brotli) ValidateAll() error { + return m.validate(true) +} + +func (m *Brotli) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetQuality(); wrapper != nil { + + if wrapper.GetValue() > 11 { + err := BrotliValidationError{ + field: "Quality", + reason: "value must be less than or equal to 11", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if _, ok := Brotli_EncoderMode_name[int32(m.GetEncoderMode())]; !ok { + err := BrotliValidationError{ + field: "EncoderMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetWindowBits(); wrapper != nil { + + if val := wrapper.GetValue(); val < 10 || val > 24 { + err := BrotliValidationError{ + field: "WindowBits", + reason: "value must be inside range [10, 24]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetInputBlockBits(); wrapper != nil { + + if val := wrapper.GetValue(); val < 16 || val > 24 { + err := BrotliValidationError{ + field: "InputBlockBits", + reason: "value must be inside range [16, 24]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := BrotliValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + // no validation rules for DisableLiteralContextModeling + + if len(errors) > 0 { + return BrotliMultiError(errors) + } + + return nil +} + +// BrotliMultiError is an error wrapping multiple validation errors returned by +// Brotli.ValidateAll() if the designated constraints aren't met. +type BrotliMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BrotliMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BrotliMultiError) AllErrors() []error { return m } + +// BrotliValidationError is the validation error returned by Brotli.Validate if +// the designated constraints aren't met. +type BrotliValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BrotliValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BrotliValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BrotliValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BrotliValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BrotliValidationError) ErrorName() string { return "BrotliValidationError" } + +// Error satisfies the builtin error interface +func (e BrotliValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBrotli.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BrotliValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BrotliValidationError{} diff --git a/pkg/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.go b/pkg/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.go new file mode 100644 index 0000000000..2ab6559002 --- /dev/null +++ b/pkg/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.go @@ -0,0 +1,188 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/compression/brotli/decompressor/v3/brotli.proto + +package decompressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Brotli struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, disables "canny" ring buffer allocation strategy. + // Ring buffer is allocated according to window size, despite the real size of the content. + DisableRingBufferReallocation bool `protobuf:"varint,1,opt,name=disable_ring_buffer_reallocation,json=disableRingBufferReallocation,proto3" json:"disable_ring_buffer_reallocation,omitempty"` + // Value for decompressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Brotli) Reset() { + *x = Brotli{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Brotli) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Brotli) ProtoMessage() {} + +func (x *Brotli) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Brotli.ProtoReflect.Descriptor instead. +func (*Brotli) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescGZIP(), []int{0} +} + +func (x *Brotli) GetDisableRingBufferReallocation() bool { + if x != nil { + return x.DisableRingBufferReallocation + } + return false +} + +func (x *Brotli) GetChunkSize() *wrappers.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x62, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x9c, 0x01, 0x0a, 0x06, 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x5f, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x69, 0x6e, + 0x67, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, + 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0xc5, + 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x72, + 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData = file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc +) + +func file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData) + }) + return file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData +} + +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_goTypes = []interface{}{ + (*Brotli)(nil), // 0: envoy.extensions.compression.brotli.decompressor.v3.Brotli + (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.compression.brotli.decompressor.v3.Brotli.chunk_size:type_name -> google.protobuf.UInt32Value + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_init() } +func file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_init() { + if File_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Brotli); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_depIdxs, + MessageInfos: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto = out.File + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc = nil + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_goTypes = nil + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.validate.go b/pkg/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.validate.go new file mode 100644 index 0000000000..6849126c6a --- /dev/null +++ b/pkg/api/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.validate.go @@ -0,0 +1,151 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/brotli/decompressor/v3/brotli.proto + +package decompressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Brotli with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Brotli) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Brotli with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in BrotliMultiError, or nil if none found. +func (m *Brotli) ValidateAll() error { + return m.validate(true) +} + +func (m *Brotli) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for DisableRingBufferReallocation + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := BrotliValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return BrotliMultiError(errors) + } + + return nil +} + +// BrotliMultiError is an error wrapping multiple validation errors returned by +// Brotli.ValidateAll() if the designated constraints aren't met. +type BrotliMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BrotliMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BrotliMultiError) AllErrors() []error { return m } + +// BrotliValidationError is the validation error returned by Brotli.Validate if +// the designated constraints aren't met. +type BrotliValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BrotliValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BrotliValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BrotliValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BrotliValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BrotliValidationError) ErrorName() string { return "BrotliValidationError" } + +// Error satisfies the builtin error interface +func (e BrotliValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBrotli.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BrotliValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BrotliValidationError{} diff --git a/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.go b/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.go index ede321a060..e0f8feddca 100644 --- a/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.go +++ b/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/compression/gzip/compressor/v3/gzip.proto -package envoy_extensions_compression_gzip_compressor_v3 +package compressorv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // All the values of this enumeration translate directly to zlib's compression strategies. // For more information about each strategy, please refer to zlib manual. type Gzip_CompressionStrategy int32 @@ -276,74 +271,78 @@ var file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDesc = [] 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x07, 0x0a, 0x04, 0x47, 0x7a, 0x69, - 0x70, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x09, 0x28, 0x01, - 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x7d, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x07, 0x0a, 0x04, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x4a, + 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x09, 0x28, 0x01, 0x52, 0x0b, 0x6d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x7d, 0x0a, 0x11, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x86, 0x01, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x86, 0x01, 0x0a, - 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, - 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, - 0x62, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, - 0x0f, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, - 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, - 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x5f, 0x0a, 0x13, 0x43, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x54, 0x52, - 0x41, 0x54, 0x45, 0x47, 0x59, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, - 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x4c, 0x45, 0x10, 0x03, - 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x04, 0x22, 0xb6, 0x02, 0x0a, 0x10, - 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x12, 0x17, 0x0a, 0x13, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, - 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x45, 0x53, - 0x54, 0x5f, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, - 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x31, - 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, - 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, - 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, - 0x5f, 0x33, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x17, 0x0a, - 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, - 0x45, 0x4c, 0x5f, 0x35, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, - 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x36, 0x10, 0x06, 0x12, + 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x0f, 0x28, 0x09, + 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0a, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, + 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x5f, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x14, + 0x0a, 0x10, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, + 0x47, 0x59, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, 0x5f, 0x4f, 0x4e, + 0x4c, 0x59, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, + 0x05, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x04, 0x22, 0xb6, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, + 0x13, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x53, + 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, + 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, - 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x37, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, - 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x38, 0x10, - 0x08, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x39, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x45, - 0x53, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x09, - 0x1a, 0x02, 0x10, 0x01, 0x42, 0x54, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, + 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x33, 0x10, + 0x03, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, + 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, + 0x35, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x36, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, + 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, + 0x4c, 0x5f, 0x37, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x38, 0x10, 0x08, 0x12, 0x17, + 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, + 0x56, 0x45, 0x4c, 0x5f, 0x39, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x45, 0x53, 0x54, 0x5f, + 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x1a, 0x02, 0x10, + 0x01, 0x42, 0xb9, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.validate.go b/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.validate.go index 03a98d16e5..d11212807a 100644 --- a/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.validate.go +++ b/pkg/api/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/compression/gzip/compressor/v3/gzip.proto -package envoy_extensions_compression_gzip_compressor_v3 +package compressorv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,48 +31,79 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Gzip with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Gzip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in GzipMultiError, or nil if none found. +func (m *Gzip) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMemoryLevel(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 9 { - return GzipValidationError{ + err := GzipValidationError{ field: "MemoryLevel", reason: "value must be inside range [1, 9]", } + if !all { + return err + } + errors = append(errors, err) } } if _, ok := Gzip_CompressionLevel_name[int32(m.GetCompressionLevel())]; !ok { - return GzipValidationError{ + err := GzipValidationError{ field: "CompressionLevel", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := Gzip_CompressionStrategy_name[int32(m.GetCompressionStrategy())]; !ok { - return GzipValidationError{ + err := GzipValidationError{ field: "CompressionStrategy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetWindowBits(); wrapper != nil { if val := wrapper.GetValue(); val < 9 || val > 15 { - return GzipValidationError{ + err := GzipValidationError{ field: "WindowBits", reason: "value must be inside range [9, 15]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -79,17 +111,41 @@ func (m *Gzip) Validate() error { if wrapper := m.GetChunkSize(); wrapper != nil { if val := wrapper.GetValue(); val < 4096 || val > 65536 { - return GzipValidationError{ + err := GzipValidationError{ field: "ChunkSize", reason: "value must be inside range [4096, 65536]", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return GzipMultiError(errors) + } + return nil } +// GzipMultiError is an error wrapping multiple validation errors returned by +// Gzip.ValidateAll() if the designated constraints aren't met. +type GzipMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GzipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GzipMultiError) AllErrors() []error { return m } + // GzipValidationError is the validation error returned by Gzip.Validate if the // designated constraints aren't met. type GzipValidationError struct { diff --git a/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.go b/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.go index 9774d46e13..f91eef2835 100644 --- a/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.go +++ b/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/compression/gzip/decompressor/v3/gzip.proto -package envoy_extensions_compression_gzip_decompressor_v3 +package decompressorv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Gzip struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -102,30 +97,33 @@ var file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDesc = 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a, - 0x04, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, - 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, - 0x0f, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, - 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, - 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x56, 0x0a, 0x3f, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x64, 0x65, - 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, - 0x7a, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x04, 0x47, 0x7a, + 0x69, 0x70, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x0f, 0x28, 0x09, + 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0a, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, + 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x7a, + 0x69, 0x70, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, + 0x76, 0x33, 0x3b, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.validate.go b/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.validate.go index 9e5b9ad279..0b257997a2 100644 --- a/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.validate.go +++ b/pkg/api/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/compression/gzip/decompressor/v3/gzip.proto -package envoy_extensions_compression_gzip_decompressor_v3 +package decompressorv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,42 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Gzip with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Gzip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in GzipMultiError, or nil if none found. +func (m *Gzip) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetWindowBits(); wrapper != nil { if val := wrapper.GetValue(); val < 9 || val > 15 { - return GzipValidationError{ + err := GzipValidationError{ field: "WindowBits", reason: "value must be inside range [9, 15]", } + if !all { + return err + } + errors = append(errors, err) } } @@ -54,17 +74,41 @@ func (m *Gzip) Validate() error { if wrapper := m.GetChunkSize(); wrapper != nil { if val := wrapper.GetValue(); val < 4096 || val > 65536 { - return GzipValidationError{ + err := GzipValidationError{ field: "ChunkSize", reason: "value must be inside range [4096, 65536]", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return GzipMultiError(errors) + } + return nil } +// GzipMultiError is an error wrapping multiple validation errors returned by +// Gzip.ValidateAll() if the designated constraints aren't met. +type GzipMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GzipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GzipMultiError) AllErrors() []error { return m } + // GzipValidationError is the validation error returned by Gzip.Validate if the // designated constraints aren't met. type GzipValidationError struct { diff --git a/pkg/api/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.go b/pkg/api/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.go new file mode 100644 index 0000000000..ac8e66c5e4 --- /dev/null +++ b/pkg/api/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.go @@ -0,0 +1,329 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/compression/zstd/compressor/v3/zstd.proto + +package compressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Reference to http://facebook.github.io/zstd/zstd_manual.html +type Zstd_Strategy int32 + +const ( + Zstd_DEFAULT Zstd_Strategy = 0 + Zstd_FAST Zstd_Strategy = 1 + Zstd_DFAST Zstd_Strategy = 2 + Zstd_GREEDY Zstd_Strategy = 3 + Zstd_LAZY Zstd_Strategy = 4 + Zstd_LAZY2 Zstd_Strategy = 5 + Zstd_BTLAZY2 Zstd_Strategy = 6 + Zstd_BTOPT Zstd_Strategy = 7 + Zstd_BTULTRA Zstd_Strategy = 8 + Zstd_BTULTRA2 Zstd_Strategy = 9 +) + +// Enum value maps for Zstd_Strategy. +var ( + Zstd_Strategy_name = map[int32]string{ + 0: "DEFAULT", + 1: "FAST", + 2: "DFAST", + 3: "GREEDY", + 4: "LAZY", + 5: "LAZY2", + 6: "BTLAZY2", + 7: "BTOPT", + 8: "BTULTRA", + 9: "BTULTRA2", + } + Zstd_Strategy_value = map[string]int32{ + "DEFAULT": 0, + "FAST": 1, + "DFAST": 2, + "GREEDY": 3, + "LAZY": 4, + "LAZY2": 5, + "BTLAZY2": 6, + "BTOPT": 7, + "BTULTRA": 8, + "BTULTRA2": 9, + } +) + +func (x Zstd_Strategy) Enum() *Zstd_Strategy { + p := new(Zstd_Strategy) + *p = x + return p +} + +func (x Zstd_Strategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Zstd_Strategy) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes[0].Descriptor() +} + +func (Zstd_Strategy) Type() protoreflect.EnumType { + return &file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes[0] +} + +func (x Zstd_Strategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Zstd_Strategy.Descriptor instead. +func (Zstd_Strategy) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescGZIP(), []int{0, 0} +} + +// [#next-free-field: 6] +type Zstd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Set compression parameters according to pre-defined compression level table. + // Note that exact compression parameters are dynamically determined, + // depending on both compression level and source content size (when known). + // Value 0 means default, and default level is 3. + // Setting a level does not automatically set all other compression parameters + // to default. Setting this will however eventually dynamically impact the compression + // parameters which have not been manually set. The manually set + // ones will 'stick'. + CompressionLevel *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=compression_level,json=compressionLevel,proto3" json:"compression_level,omitempty"` + // A 32-bits checksum of content is written at end of frame. If not set, defaults to false. + EnableChecksum bool `protobuf:"varint,2,opt,name=enable_checksum,json=enableChecksum,proto3" json:"enable_checksum,omitempty"` + // The higher the value of selected strategy, the more complex it is, + // resulting in stronger and slower compression. + // Special: value 0 means "use default strategy". + Strategy Zstd_Strategy `protobuf:"varint,3,opt,name=strategy,proto3,enum=envoy.extensions.compression.zstd.compressor.v3.Zstd_Strategy" json:"strategy,omitempty"` + // A dictionary for compression. Zstd offers dictionary compression, which greatly improves + // efficiency on small files and messages. Each dictionary will be generated with a dictionary ID + // that can be used to search the same dictionary during decompression. + // Please refer to `zstd manual `_ + // to train a specific dictionary for compression. + Dictionary *v3.DataSource `protobuf:"bytes,4,opt,name=dictionary,proto3" json:"dictionary,omitempty"` + // Value for compressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Zstd) Reset() { + *x = Zstd{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Zstd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Zstd) ProtoMessage() {} + +func (x *Zstd) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Zstd.ProtoReflect.Descriptor instead. +func (*Zstd) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescGZIP(), []int{0} +} + +func (x *Zstd) GetCompressionLevel() *wrappers.UInt32Value { + if x != nil { + return x.CompressionLevel + } + return nil +} + +func (x *Zstd) GetEnableChecksum() bool { + if x != nil { + return x.EnableChecksum + } + return false +} + +func (x *Zstd) GetStrategy() Zstd_Strategy { + if x != nil { + return x.Strategy + } + return Zstd_DEFAULT +} + +func (x *Zstd) GetDictionary() *v3.DataSource { + if x != nil { + return x.Dictionary + } + return nil +} + +func (x *Zstd) GetChunkSize() *wrappers.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_zstd_compressor_v3_zstd_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, + 0x73, 0x74, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x03, 0x0a, 0x04, 0x5a, 0x73, 0x74, 0x64, 0x12, + 0x49, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x12, 0x64, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x5a, 0x73, 0x74, 0x64, 0x2e, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x64, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x0a, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x0a, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, + 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, + 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x53, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x46, + 0x41, 0x53, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x52, 0x45, 0x45, 0x44, 0x59, 0x10, + 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x41, 0x5a, 0x59, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4c, + 0x41, 0x5a, 0x59, 0x32, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x54, 0x4c, 0x41, 0x5a, 0x59, + 0x32, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x54, 0x4f, 0x50, 0x54, 0x10, 0x07, 0x12, 0x0b, + 0x0a, 0x07, 0x42, 0x54, 0x55, 0x4c, 0x54, 0x52, 0x41, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x42, + 0x54, 0x55, 0x4c, 0x54, 0x52, 0x41, 0x32, 0x10, 0x09, 0x42, 0xb9, 0x01, 0x0a, 0x3d, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x5a, 0x73, 0x74, + 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, 0x73, + 0x74, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData = file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc +) + +func file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData) + }) + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData +} + +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_goTypes = []interface{}{ + (Zstd_Strategy)(0), // 0: envoy.extensions.compression.zstd.compressor.v3.Zstd.Strategy + (*Zstd)(nil), // 1: envoy.extensions.compression.zstd.compressor.v3.Zstd + (*wrappers.UInt32Value)(nil), // 2: google.protobuf.UInt32Value + (*v3.DataSource)(nil), // 3: envoy.config.core.v3.DataSource +} +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.compression.zstd.compressor.v3.Zstd.compression_level:type_name -> google.protobuf.UInt32Value + 0, // 1: envoy.extensions.compression.zstd.compressor.v3.Zstd.strategy:type_name -> envoy.extensions.compression.zstd.compressor.v3.Zstd.Strategy + 3, // 2: envoy.extensions.compression.zstd.compressor.v3.Zstd.dictionary:type_name -> envoy.config.core.v3.DataSource + 2, // 3: envoy.extensions.compression.zstd.compressor.v3.Zstd.chunk_size:type_name -> google.protobuf.UInt32Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_init() } +func file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_init() { + if File_envoy_extensions_compression_zstd_compressor_v3_zstd_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Zstd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_depIdxs, + EnumInfos: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes, + MessageInfos: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_zstd_compressor_v3_zstd_proto = out.File + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc = nil + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_goTypes = nil + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.validate.go b/pkg/api/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.validate.go new file mode 100644 index 0000000000..4b542fb8c6 --- /dev/null +++ b/pkg/api/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.validate.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/zstd/compressor/v3/zstd.proto + +package compressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Zstd with the rules defined in the proto +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. +func (m *Zstd) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Zstd with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ZstdMultiError, or nil if none found. +func (m *Zstd) ValidateAll() error { + return m.validate(true) +} + +func (m *Zstd) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCompressionLevel()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "CompressionLevel", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "CompressionLevel", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompressionLevel()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ZstdValidationError{ + field: "CompressionLevel", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for EnableChecksum + + if _, ok := Zstd_Strategy_name[int32(m.GetStrategy())]; !ok { + err := ZstdValidationError{ + field: "Strategy", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDictionary()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "Dictionary", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "Dictionary", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDictionary()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ZstdValidationError{ + field: "Dictionary", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := ZstdValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return ZstdMultiError(errors) + } + + return nil +} + +// ZstdMultiError is an error wrapping multiple validation errors returned by +// Zstd.ValidateAll() if the designated constraints aren't met. +type ZstdMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZstdMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZstdMultiError) AllErrors() []error { return m } + +// ZstdValidationError is the validation error returned by Zstd.Validate if the +// designated constraints aren't met. +type ZstdValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ZstdValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ZstdValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ZstdValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ZstdValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ZstdValidationError) ErrorName() string { return "ZstdValidationError" } + +// Error satisfies the builtin error interface +func (e ZstdValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sZstd.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ZstdValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ZstdValidationError{} diff --git a/pkg/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.go b/pkg/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.go new file mode 100644 index 0000000000..6e340799f7 --- /dev/null +++ b/pkg/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/compression/zstd/decompressor/v3/zstd.proto + +package decompressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Zstd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Dictionaries for decompression. Zstd offers dictionary compression, which greatly improves + // efficiency on small files and messages. It is necessary to ensure that the dictionary used for + // decompression is the same as the compression dictionary. Multiple dictionaries can be set, and the + // dictionary will be automatically selected for decompression according to the dictionary ID in the + // source content. + // Please refer to `zstd manual `_ + // to train specific dictionaries for decompression. + Dictionaries []*v3.DataSource `protobuf:"bytes,1,rep,name=dictionaries,proto3" json:"dictionaries,omitempty"` + // Value for decompressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Zstd) Reset() { + *x = Zstd{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Zstd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Zstd) ProtoMessage() {} + +func (x *Zstd) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Zstd.ProtoReflect.Descriptor instead. +func (*Zstd) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescGZIP(), []int{0} +} + +func (x *Zstd) GetDictionaries() []*v3.DataSource { + if x != nil { + return x.Dictionaries + } + return nil +} + +func (x *Zstd) GetChunkSize() *wrappers.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, + 0x73, 0x74, 0x64, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2f, 0x76, 0x33, 0x2f, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, + 0x64, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, + 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x04, 0x5a, + 0x73, 0x74, 0x64, 0x12, 0x44, 0x0a, 0x0c, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0c, 0x64, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, + 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, + 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x53, 0x69, 0x7a, 0x65, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x5a, 0x73, 0x74, 0x64, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, 0x73, 0x74, 0x64, 0x2f, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData = file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc +) + +func file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData) + }) + return file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData +} + +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_goTypes = []interface{}{ + (*Zstd)(nil), // 0: envoy.extensions.compression.zstd.decompressor.v3.Zstd + (*v3.DataSource)(nil), // 1: envoy.config.core.v3.DataSource + (*wrappers.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.compression.zstd.decompressor.v3.Zstd.dictionaries:type_name -> envoy.config.core.v3.DataSource + 2, // 1: envoy.extensions.compression.zstd.decompressor.v3.Zstd.chunk_size:type_name -> google.protobuf.UInt32Value + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_init() } +func file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_init() { + if File_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Zstd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_depIdxs, + MessageInfos: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto = out.File + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc = nil + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_goTypes = nil + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.validate.go b/pkg/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.validate.go new file mode 100644 index 0000000000..dd5a7a5939 --- /dev/null +++ b/pkg/api/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.validate.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/zstd/decompressor/v3/zstd.proto + +package decompressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Zstd with the rules defined in the proto +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. +func (m *Zstd) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Zstd with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ZstdMultiError, or nil if none found. +func (m *Zstd) ValidateAll() error { + return m.validate(true) +} + +func (m *Zstd) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetDictionaries() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZstdValidationError{ + field: fmt.Sprintf("Dictionaries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZstdValidationError{ + field: fmt.Sprintf("Dictionaries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ZstdValidationError{ + field: fmt.Sprintf("Dictionaries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := ZstdValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return ZstdMultiError(errors) + } + + return nil +} + +// ZstdMultiError is an error wrapping multiple validation errors returned by +// Zstd.ValidateAll() if the designated constraints aren't met. +type ZstdMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZstdMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZstdMultiError) AllErrors() []error { return m } + +// ZstdValidationError is the validation error returned by Zstd.Validate if the +// designated constraints aren't met. +type ZstdValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ZstdValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ZstdValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ZstdValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ZstdValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ZstdValidationError) ErrorName() string { return "ZstdValidationError" } + +// Error satisfies the builtin error interface +func (e ZstdValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sZstd.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ZstdValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ZstdValidationError{} diff --git a/pkg/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.go b/pkg/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.go new file mode 100644 index 0000000000..c096f428e1 --- /dev/null +++ b/pkg/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.go @@ -0,0 +1,173 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto + +package minimum_clustersv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Validates a CDS config, and ensures that the number of clusters is above the +// set threshold. +type MinimumClustersValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimal clusters threshold. Any CDS config update leading to less than + // this number will be rejected. + // Default value is 0. + MinClustersNum uint32 `protobuf:"varint,1,opt,name=min_clusters_num,json=minClustersNum,proto3" json:"min_clusters_num,omitempty"` +} + +func (x *MinimumClustersValidator) Reset() { + *x = MinimumClustersValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MinimumClustersValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MinimumClustersValidator) ProtoMessage() {} + +func (x *MinimumClustersValidator) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MinimumClustersValidator.ProtoReflect.Descriptor instead. +func (*MinimumClustersValidator) Descriptor() ([]byte, []int) { + return file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescGZIP(), []int{0} +} + +func (x *MinimumClustersValidator) GetMinClustersNum() uint32 { + if x != nil { + return x.MinClustersNum + } + return 0 +} + +var File_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto protoreflect.FileDescriptor + +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc = []byte{ + 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x44, 0x0a, 0x18, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6d, 0x69, + 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x4e, 0x75, 0x6d, 0x42, 0xd8, 0x01, 0x0a, + 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x70, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x69, 0x6e, + 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescOnce sync.Once + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData = file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc +) + +func file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescGZIP() []byte { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescOnce.Do(func() { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData) + }) + return file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData +} + +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_goTypes = []interface{}{ + (*MinimumClustersValidator)(nil), // 0: envoy.extensions.config.validators.minimum_clusters.v3.MinimumClustersValidator +} +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_init() +} +func file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_init() { + if File_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MinimumClustersValidator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_goTypes, + DependencyIndexes: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_depIdxs, + MessageInfos: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes, + }.Build() + File_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto = out.File + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc = nil + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_goTypes = nil + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.validate.go b/pkg/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.validate.go new file mode 100644 index 0000000000..45e69589c2 --- /dev/null +++ b/pkg/api/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.validate.go @@ -0,0 +1,140 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto + +package minimum_clustersv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on MinimumClustersValidator with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *MinimumClustersValidator) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MinimumClustersValidator with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MinimumClustersValidatorMultiError, or nil if none found. +func (m *MinimumClustersValidator) ValidateAll() error { + return m.validate(true) +} + +func (m *MinimumClustersValidator) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MinClustersNum + + if len(errors) > 0 { + return MinimumClustersValidatorMultiError(errors) + } + + return nil +} + +// MinimumClustersValidatorMultiError is an error wrapping multiple validation +// errors returned by MinimumClustersValidator.ValidateAll() if the designated +// constraints aren't met. +type MinimumClustersValidatorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MinimumClustersValidatorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MinimumClustersValidatorMultiError) AllErrors() []error { return m } + +// MinimumClustersValidatorValidationError is the validation error returned by +// MinimumClustersValidator.Validate if the designated constraints aren't met. +type MinimumClustersValidatorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MinimumClustersValidatorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MinimumClustersValidatorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MinimumClustersValidatorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MinimumClustersValidatorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MinimumClustersValidatorValidationError) ErrorName() string { + return "MinimumClustersValidatorValidationError" +} + +// Error satisfies the builtin error interface +func (e MinimumClustersValidatorValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sMinimumClustersValidator.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MinimumClustersValidatorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MinimumClustersValidatorValidationError{} diff --git a/pkg/api/envoy/extensions/filters/common/dependency/v3/dependency.pb.go b/pkg/api/envoy/extensions/filters/common/dependency/v3/dependency.pb.go new file mode 100644 index 0000000000..13e5525dda --- /dev/null +++ b/pkg/api/envoy/extensions/filters/common/dependency/v3/dependency.pb.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/common/dependency/v3/dependency.proto + +package dependencyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Dependency_DependencyType int32 + +const ( + Dependency_HEADER Dependency_DependencyType = 0 + Dependency_FILTER_STATE_KEY Dependency_DependencyType = 1 + Dependency_DYNAMIC_METADATA Dependency_DependencyType = 2 +) + +// Enum value maps for Dependency_DependencyType. +var ( + Dependency_DependencyType_name = map[int32]string{ + 0: "HEADER", + 1: "FILTER_STATE_KEY", + 2: "DYNAMIC_METADATA", + } + Dependency_DependencyType_value = map[string]int32{ + "HEADER": 0, + "FILTER_STATE_KEY": 1, + "DYNAMIC_METADATA": 2, + } +) + +func (x Dependency_DependencyType) Enum() *Dependency_DependencyType { + p := new(Dependency_DependencyType) + *p = x + return p +} + +func (x Dependency_DependencyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dependency_DependencyType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes[0].Descriptor() +} + +func (Dependency_DependencyType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes[0] +} + +func (x Dependency_DependencyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dependency_DependencyType.Descriptor instead. +func (Dependency_DependencyType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{0, 0} +} + +// Dependency specification and string identifier. +type Dependency struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The kind of dependency. + Type Dependency_DependencyType `protobuf:"varint,1,opt,name=type,proto3,enum=envoy.extensions.filters.common.dependency.v3.Dependency_DependencyType" json:"type,omitempty"` + // The string identifier for the dependency. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Dependency) Reset() { + *x = Dependency{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dependency) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dependency) ProtoMessage() {} + +func (x *Dependency) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dependency.ProtoReflect.Descriptor instead. +func (*Dependency) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{0} +} + +func (x *Dependency) GetType() Dependency_DependencyType { + if x != nil { + return x.Type + } + return Dependency_HEADER +} + +func (x *Dependency) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Dependency specification for a filter. For a filter chain to be valid, any +// dependency that is required must be provided by an earlier filter. +type FilterDependencies struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of dependencies required on the decode path. + DecodeRequired []*Dependency `protobuf:"bytes,1,rep,name=decode_required,json=decodeRequired,proto3" json:"decode_required,omitempty"` + // A list of dependencies provided on the encode path. + DecodeProvided []*Dependency `protobuf:"bytes,2,rep,name=decode_provided,json=decodeProvided,proto3" json:"decode_provided,omitempty"` + // A list of dependencies required on the decode path. + EncodeRequired []*Dependency `protobuf:"bytes,3,rep,name=encode_required,json=encodeRequired,proto3" json:"encode_required,omitempty"` + // A list of dependencies provided on the encode path. + EncodeProvided []*Dependency `protobuf:"bytes,4,rep,name=encode_provided,json=encodeProvided,proto3" json:"encode_provided,omitempty"` +} + +func (x *FilterDependencies) Reset() { + *x = FilterDependencies{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterDependencies) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterDependencies) ProtoMessage() {} + +func (x *FilterDependencies) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterDependencies.ProtoReflect.Descriptor instead. +func (*FilterDependencies) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{1} +} + +func (x *FilterDependencies) GetDecodeRequired() []*Dependency { + if x != nil { + return x.DecodeRequired + } + return nil +} + +func (x *FilterDependencies) GetDecodeProvided() []*Dependency { + if x != nil { + return x.DecodeProvided + } + return nil +} + +func (x *FilterDependencies) GetEncodeRequired() []*Dependency { + if x != nil { + return x.EncodeRequired + } + return nil +} + +func (x *FilterDependencies) GetEncodeProvided() []*Dependency { + if x != nil { + return x.EncodeProvided + } + return nil +} + +// Matching requirements for a filter. For a match tree to be used with a filter, the match +// requirements must be satisfied. +// +// This protobuf is provided by the filter implementation as a way to communicate the matching +// requirements to the filter factories, allowing for config rejection if the requirements are +// not satisfied. +type MatchingRequirements struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DataInputAllowList *MatchingRequirements_DataInputAllowList `protobuf:"bytes,1,opt,name=data_input_allow_list,json=dataInputAllowList,proto3" json:"data_input_allow_list,omitempty"` +} + +func (x *MatchingRequirements) Reset() { + *x = MatchingRequirements{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchingRequirements) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchingRequirements) ProtoMessage() {} + +func (x *MatchingRequirements) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchingRequirements.ProtoReflect.Descriptor instead. +func (*MatchingRequirements) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{2} +} + +func (x *MatchingRequirements) GetDataInputAllowList() *MatchingRequirements_DataInputAllowList { + if x != nil { + return x.DataInputAllowList + } + return nil +} + +type MatchingRequirements_DataInputAllowList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An explicit list of data inputs that are allowed to be used with this filter. + TypeUrl []string `protobuf:"bytes,1,rep,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` +} + +func (x *MatchingRequirements_DataInputAllowList) Reset() { + *x = MatchingRequirements_DataInputAllowList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchingRequirements_DataInputAllowList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchingRequirements_DataInputAllowList) ProtoMessage() {} + +func (x *MatchingRequirements_DataInputAllowList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchingRequirements_DataInputAllowList.ProtoReflect.Descriptor instead. +func (*MatchingRequirements_DataInputAllowList) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *MatchingRequirements_DataInputAllowList) GetTypeUrl() []string { + if x != nil { + return x.TypeUrl + } + return nil +} + +var File_envoy_extensions_filters_common_dependency_v3_dependency_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc = []byte{ + 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2f, 0x76, 0x33, 0x2f, + 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x5c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x48, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x00, 0x12, + 0x14, 0x0a, 0x10, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x4b, 0x45, 0x59, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, + 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x10, 0x02, 0x22, 0xa4, 0x03, 0x0a, 0x12, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, + 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, + 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x0f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0e, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x62, + 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x15, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x12, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x2f, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x42, 0xbb, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x61, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2f, 0x76, + 0x33, 0x3b, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData = file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc +) + +func file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData) + }) + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData +} + +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_goTypes = []interface{}{ + (Dependency_DependencyType)(0), // 0: envoy.extensions.filters.common.dependency.v3.Dependency.DependencyType + (*Dependency)(nil), // 1: envoy.extensions.filters.common.dependency.v3.Dependency + (*FilterDependencies)(nil), // 2: envoy.extensions.filters.common.dependency.v3.FilterDependencies + (*MatchingRequirements)(nil), // 3: envoy.extensions.filters.common.dependency.v3.MatchingRequirements + (*MatchingRequirements_DataInputAllowList)(nil), // 4: envoy.extensions.filters.common.dependency.v3.MatchingRequirements.DataInputAllowList +} +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.common.dependency.v3.Dependency.type:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency.DependencyType + 1, // 1: envoy.extensions.filters.common.dependency.v3.FilterDependencies.decode_required:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 1, // 2: envoy.extensions.filters.common.dependency.v3.FilterDependencies.decode_provided:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 1, // 3: envoy.extensions.filters.common.dependency.v3.FilterDependencies.encode_required:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 1, // 4: envoy.extensions.filters.common.dependency.v3.FilterDependencies.encode_provided:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 4, // 5: envoy.extensions.filters.common.dependency.v3.MatchingRequirements.data_input_allow_list:type_name -> envoy.extensions.filters.common.dependency.v3.MatchingRequirements.DataInputAllowList + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_common_dependency_v3_dependency_proto_init() } +func file_envoy_extensions_filters_common_dependency_v3_dependency_proto_init() { + if File_envoy_extensions_filters_common_dependency_v3_dependency_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dependency); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterDependencies); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchingRequirements); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchingRequirements_DataInputAllowList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_common_dependency_v3_dependency_proto = out.File + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc = nil + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_goTypes = nil + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/common/dependency/v3/dependency.pb.validate.go b/pkg/api/envoy/extensions/filters/common/dependency/v3/dependency.pb.validate.go new file mode 100644 index 0000000000..dd4b8ae99e --- /dev/null +++ b/pkg/api/envoy/extensions/filters/common/dependency/v3/dependency.pb.validate.go @@ -0,0 +1,623 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/common/dependency/v3/dependency.proto + +package dependencyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Dependency with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Dependency) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Dependency with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DependencyMultiError, or +// nil if none found. +func (m *Dependency) ValidateAll() error { + return m.validate(true) +} + +func (m *Dependency) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Type + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := DependencyValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return DependencyMultiError(errors) + } + + return nil +} + +// DependencyMultiError is an error wrapping multiple validation errors +// returned by Dependency.ValidateAll() if the designated constraints aren't met. +type DependencyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DependencyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DependencyMultiError) AllErrors() []error { return m } + +// DependencyValidationError is the validation error returned by +// Dependency.Validate if the designated constraints aren't met. +type DependencyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DependencyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DependencyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DependencyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DependencyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DependencyValidationError) ErrorName() string { return "DependencyValidationError" } + +// Error satisfies the builtin error interface +func (e DependencyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDependency.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DependencyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DependencyValidationError{} + +// Validate checks the field values on FilterDependencies with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *FilterDependencies) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterDependencies with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FilterDependenciesMultiError, or nil if none found. +func (m *FilterDependencies) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterDependencies) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetDecodeRequired() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDecodeProvided() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetEncodeRequired() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetEncodeProvided() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return FilterDependenciesMultiError(errors) + } + + return nil +} + +// FilterDependenciesMultiError is an error wrapping multiple validation errors +// returned by FilterDependencies.ValidateAll() if the designated constraints +// aren't met. +type FilterDependenciesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterDependenciesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterDependenciesMultiError) AllErrors() []error { return m } + +// FilterDependenciesValidationError is the validation error returned by +// FilterDependencies.Validate if the designated constraints aren't met. +type FilterDependenciesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterDependenciesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterDependenciesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterDependenciesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterDependenciesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterDependenciesValidationError) ErrorName() string { + return "FilterDependenciesValidationError" +} + +// Error satisfies the builtin error interface +func (e FilterDependenciesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFilterDependencies.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterDependenciesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterDependenciesValidationError{} + +// Validate checks the field values on MatchingRequirements with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *MatchingRequirements) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchingRequirements with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MatchingRequirementsMultiError, or nil if none found. +func (m *MatchingRequirements) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchingRequirements) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetDataInputAllowList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchingRequirementsValidationError{ + field: "DataInputAllowList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchingRequirementsValidationError{ + field: "DataInputAllowList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDataInputAllowList()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchingRequirementsValidationError{ + field: "DataInputAllowList", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return MatchingRequirementsMultiError(errors) + } + + return nil +} + +// MatchingRequirementsMultiError is an error wrapping multiple validation +// errors returned by MatchingRequirements.ValidateAll() if the designated +// constraints aren't met. +type MatchingRequirementsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchingRequirementsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchingRequirementsMultiError) AllErrors() []error { return m } + +// MatchingRequirementsValidationError is the validation error returned by +// MatchingRequirements.Validate if the designated constraints aren't met. +type MatchingRequirementsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchingRequirementsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchingRequirementsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchingRequirementsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchingRequirementsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchingRequirementsValidationError) ErrorName() string { + return "MatchingRequirementsValidationError" +} + +// Error satisfies the builtin error interface +func (e MatchingRequirementsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sMatchingRequirements.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchingRequirementsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchingRequirementsValidationError{} + +// Validate checks the field values on MatchingRequirements_DataInputAllowList +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *MatchingRequirements_DataInputAllowList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// MatchingRequirements_DataInputAllowList with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// MatchingRequirements_DataInputAllowListMultiError, or nil if none found. +func (m *MatchingRequirements_DataInputAllowList) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchingRequirements_DataInputAllowList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return MatchingRequirements_DataInputAllowListMultiError(errors) + } + + return nil +} + +// MatchingRequirements_DataInputAllowListMultiError is an error wrapping +// multiple validation errors returned by +// MatchingRequirements_DataInputAllowList.ValidateAll() if the designated +// constraints aren't met. +type MatchingRequirements_DataInputAllowListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchingRequirements_DataInputAllowListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchingRequirements_DataInputAllowListMultiError) AllErrors() []error { return m } + +// MatchingRequirements_DataInputAllowListValidationError is the validation +// error returned by MatchingRequirements_DataInputAllowList.Validate if the +// designated constraints aren't met. +type MatchingRequirements_DataInputAllowListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchingRequirements_DataInputAllowListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchingRequirements_DataInputAllowListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchingRequirements_DataInputAllowListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchingRequirements_DataInputAllowListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchingRequirements_DataInputAllowListValidationError) ErrorName() string { + return "MatchingRequirements_DataInputAllowListValidationError" +} + +// Error satisfies the builtin error interface +func (e MatchingRequirements_DataInputAllowListValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sMatchingRequirements_DataInputAllowList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchingRequirements_DataInputAllowListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchingRequirements_DataInputAllowListValidationError{} diff --git a/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.go b/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.go index ebc6d6c9ef..6c8a109b75 100644 --- a/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.go +++ b/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.go @@ -1,17 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/common/fault/v3/fault.proto -package envoy_extensions_filters_common_fault_v3 +package faultv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FaultDelay_FaultDelayType int32 const ( @@ -75,7 +69,7 @@ func (FaultDelay_FaultDelayType) EnumDescriptor() ([]byte, []int) { } // Delay specification is used to inject latency into the -// HTTP/gRPC/Mongo/Redis operation or delay proxying of TCP connections. +// HTTP/Mongo operation. // [#next-free-field: 6] type FaultDelay struct { state protoimpl.MessageState @@ -88,8 +82,6 @@ type FaultDelay struct { FaultDelaySecifier isFaultDelay_FaultDelaySecifier `protobuf_oneof:"fault_delay_secifier"` // The percentage of operations/connections/requests on which the delay will be injected. Percentage *v3.FractionalPercent `protobuf:"bytes,4,opt,name=percentage,proto3" json:"percentage,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedType FaultDelay_FaultDelayType `protobuf:"varint,1,opt,name=hidden_envoy_deprecated_type,json=hiddenEnvoyDeprecatedType,proto3,enum=envoy.extensions.filters.common.fault.v3.FaultDelay_FaultDelayType" json:"hidden_envoy_deprecated_type,omitempty"` } func (x *FaultDelay) Reset() { @@ -152,14 +144,6 @@ func (x *FaultDelay) GetPercentage() *v3.FractionalPercent { return nil } -// Deprecated: Do not use. -func (x *FaultDelay) GetHiddenEnvoyDeprecatedType() FaultDelay_FaultDelayType { - if x != nil { - return x.HiddenEnvoyDeprecatedType - } - return FaultDelay_FIXED -} - type isFaultDelay_FaultDelaySecifier interface { isFaultDelay_FaultDelaySecifier() } @@ -167,10 +151,9 @@ type isFaultDelay_FaultDelaySecifier interface { type FaultDelay_FixedDelay struct { // Add a fixed delay before forwarding the operation upstream. See // https://developers.google.com/protocol-buffers/docs/proto3#json for - // the JSON/YAML Duration mapping. For HTTP/Mongo/Redis, the specified - // delay will be injected before a new request/operation. For TCP - // connections, the proxying of the connection upstream will be delayed - // for the specified period. This is required if type is FIXED. + // the JSON/YAML Duration mapping. For HTTP/Mongo, the specified + // delay will be injected before a new request/operation. + // This is required if type is FIXED. FixedDelay *duration.Duration `protobuf:"bytes,3,opt,name=fixed_delay,json=fixedDelay,proto3,oneof"` } @@ -418,92 +401,87 @@ var file_envoy_extensions_filters_common_fault_v3_fault_proto_rawDesc = []byte{ 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x04, - 0x0a, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x46, 0x0a, 0x0b, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x44, - 0x65, 0x6c, 0x61, 0x79, 0x12, 0x65, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x48, 0x00, 0x52, 0x0b, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x8e, 0x01, - 0x0a, 0x1c, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, - 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, - 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, - 0xd2, 0x05, 0x01, 0x52, 0x19, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x49, - 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x3a, 0x3a, 0x9a, - 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, - 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x22, 0x1b, 0x0a, 0x0e, 0x46, 0x61, 0x75, - 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x10, 0x00, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, - 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x1b, 0x0a, 0x14, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xb0, 0x04, 0x0a, 0x0e, 0x46, 0x61, - 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x66, 0x0a, 0x0b, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, - 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x69, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x48, 0x00, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x40, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, - 0x65, 0x1a, 0x73, 0x0a, 0x0a, 0x46, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x26, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6b, 0x62, 0x70, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x4b, 0x62, 0x70, 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x03, 0x0a, 0x0a, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, + 0x00, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, + 0x65, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, + 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x1a, 0x49, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, - 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x4d, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x11, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x4e, 0x0a, 0x36, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, + 0x6c, 0x61, 0x79, 0x22, 0x1b, 0x0a, 0x0e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x00, + 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x42, 0x1b, 0x0a, 0x14, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, + 0x73, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, + 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, + 0xb0, 0x04, 0x0a, 0x0e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x66, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, + 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x00, 0x52, 0x0a, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x69, 0x0a, 0x0c, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x1a, 0x73, 0x0a, 0x0a, 0x46, 0x69, 0x78, 0x65, 0x64, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6b, + 0x62, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, + 0x28, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x4b, 0x62, 0x70, 0x73, 0x3a, 0x3d, 0x9a, + 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, + 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x4d, 0x0a, 0x0b, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, + 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, + 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x32, 0x9a, 0xc5, 0x88, + 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, + 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, + 0x11, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x42, 0xa7, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x46, + 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -535,15 +513,14 @@ var file_envoy_extensions_filters_common_fault_v3_fault_proto_depIdxs = []int32{ 6, // 0: envoy.extensions.filters.common.fault.v3.FaultDelay.fixed_delay:type_name -> google.protobuf.Duration 3, // 1: envoy.extensions.filters.common.fault.v3.FaultDelay.header_delay:type_name -> envoy.extensions.filters.common.fault.v3.FaultDelay.HeaderDelay 7, // 2: envoy.extensions.filters.common.fault.v3.FaultDelay.percentage:type_name -> envoy.type.v3.FractionalPercent - 0, // 3: envoy.extensions.filters.common.fault.v3.FaultDelay.hidden_envoy_deprecated_type:type_name -> envoy.extensions.filters.common.fault.v3.FaultDelay.FaultDelayType - 4, // 4: envoy.extensions.filters.common.fault.v3.FaultRateLimit.fixed_limit:type_name -> envoy.extensions.filters.common.fault.v3.FaultRateLimit.FixedLimit - 5, // 5: envoy.extensions.filters.common.fault.v3.FaultRateLimit.header_limit:type_name -> envoy.extensions.filters.common.fault.v3.FaultRateLimit.HeaderLimit - 7, // 6: envoy.extensions.filters.common.fault.v3.FaultRateLimit.percentage:type_name -> envoy.type.v3.FractionalPercent - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 4, // 3: envoy.extensions.filters.common.fault.v3.FaultRateLimit.fixed_limit:type_name -> envoy.extensions.filters.common.fault.v3.FaultRateLimit.FixedLimit + 5, // 4: envoy.extensions.filters.common.fault.v3.FaultRateLimit.header_limit:type_name -> envoy.extensions.filters.common.fault.v3.FaultRateLimit.HeaderLimit + 7, // 5: envoy.extensions.filters.common.fault.v3.FaultRateLimit.percentage:type_name -> envoy.type.v3.FractionalPercent + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_common_fault_v3_fault_proto_init() } diff --git a/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.validate.go b/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.validate.go index 602a0e80b8..9579d32625 100644 --- a/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/common/fault/v3/fault.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/common/fault/v3/fault.proto -package envoy_extensions_filters_common_fault_v3 +package faultv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FaultDelay with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FaultDelay) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultDelay with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FaultDelayMultiError, or +// nil if none found. +func (m *FaultDelay) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultDelay) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "Percentage", @@ -50,36 +86,62 @@ func (m *FaultDelay) Validate() error { } } - // no validation rules for HiddenEnvoyDeprecatedType - switch m.FaultDelaySecifier.(type) { case *FaultDelay_FixedDelay: if d := m.GetFixedDelay(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return FaultDelayValidationError{ + err = FaultDelayValidationError{ field: "FixedDelay", reason: "value is not a valid duration", cause: err, } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return FaultDelayValidationError{ - field: "FixedDelay", - reason: "value must be greater than 0s", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := FaultDelayValidationError{ + field: "FixedDelay", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } case *FaultDelay_HeaderDelay_: - if v, ok := interface{}(m.GetHeaderDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "HeaderDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultDelayValidationError{ + field: "HeaderDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "HeaderDelay", @@ -90,16 +152,40 @@ func (m *FaultDelay) Validate() error { } default: - return FaultDelayValidationError{ + err := FaultDelayValidationError{ field: "FaultDelaySecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return FaultDelayMultiError(errors) } return nil } +// FaultDelayMultiError is an error wrapping multiple validation errors +// returned by FaultDelay.ValidateAll() if the designated constraints aren't met. +type FaultDelayMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultDelayMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultDelayMultiError) AllErrors() []error { return m } + // FaultDelayValidationError is the validation error returned by // FaultDelay.Validate if the designated constraints aren't met. type FaultDelayValidationError struct { @@ -155,14 +241,47 @@ var _ interface { } = FaultDelayValidationError{} // Validate checks the field values on FaultRateLimit with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FaultRateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultRateLimit with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FaultRateLimitMultiError, +// or nil if none found. +func (m *FaultRateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultRateLimit) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "Percentage", @@ -176,7 +295,26 @@ func (m *FaultRateLimit) Validate() error { case *FaultRateLimit_FixedLimit_: - if v, ok := interface{}(m.GetFixedLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFixedLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "FixedLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "FixedLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFixedLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "FixedLimit", @@ -188,7 +326,26 @@ func (m *FaultRateLimit) Validate() error { case *FaultRateLimit_HeaderLimit_: - if v, ok := interface{}(m.GetHeaderLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "HeaderLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultRateLimitValidationError{ + field: "HeaderLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "HeaderLimit", @@ -199,16 +356,41 @@ func (m *FaultRateLimit) Validate() error { } default: - return FaultRateLimitValidationError{ + err := FaultRateLimitValidationError{ field: "LimitType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return FaultRateLimitMultiError(errors) + } + return nil } +// FaultRateLimitMultiError is an error wrapping multiple validation errors +// returned by FaultRateLimit.ValidateAll() if the designated constraints +// aren't met. +type FaultRateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultRateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultRateLimitMultiError) AllErrors() []error { return m } + // FaultRateLimitValidationError is the validation error returned by // FaultRateLimit.Validate if the designated constraints aren't met. type FaultRateLimitValidationError struct { @@ -265,15 +447,50 @@ var _ interface { // Validate checks the field values on FaultDelay_HeaderDelay with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultDelay_HeaderDelay) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultDelay_HeaderDelay with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultDelay_HeaderDelayMultiError, or nil if none found. +func (m *FaultDelay_HeaderDelay) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultDelay_HeaderDelay) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return FaultDelay_HeaderDelayMultiError(errors) + } + return nil } +// FaultDelay_HeaderDelayMultiError is an error wrapping multiple validation +// errors returned by FaultDelay_HeaderDelay.ValidateAll() if the designated +// constraints aren't met. +type FaultDelay_HeaderDelayMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultDelay_HeaderDelayMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultDelay_HeaderDelayMultiError) AllErrors() []error { return m } + // FaultDelay_HeaderDelayValidationError is the validation error returned by // FaultDelay_HeaderDelay.Validate if the designated constraints aren't met. type FaultDelay_HeaderDelayValidationError struct { @@ -332,22 +549,61 @@ var _ interface { // Validate checks the field values on FaultRateLimit_FixedLimit with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultRateLimit_FixedLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultRateLimit_FixedLimit with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultRateLimit_FixedLimitMultiError, or nil if none found. +func (m *FaultRateLimit_FixedLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultRateLimit_FixedLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetLimitKbps() < 1 { - return FaultRateLimit_FixedLimitValidationError{ + err := FaultRateLimit_FixedLimitValidationError{ field: "LimitKbps", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FaultRateLimit_FixedLimitMultiError(errors) } return nil } +// FaultRateLimit_FixedLimitMultiError is an error wrapping multiple validation +// errors returned by FaultRateLimit_FixedLimit.ValidateAll() if the +// designated constraints aren't met. +type FaultRateLimit_FixedLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultRateLimit_FixedLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultRateLimit_FixedLimitMultiError) AllErrors() []error { return m } + // FaultRateLimit_FixedLimitValidationError is the validation error returned by // FaultRateLimit_FixedLimit.Validate if the designated constraints aren't met. type FaultRateLimit_FixedLimitValidationError struct { @@ -406,15 +662,50 @@ var _ interface { // Validate checks the field values on FaultRateLimit_HeaderLimit with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultRateLimit_HeaderLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultRateLimit_HeaderLimit with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultRateLimit_HeaderLimitMultiError, or nil if none found. +func (m *FaultRateLimit_HeaderLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultRateLimit_HeaderLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return FaultRateLimit_HeaderLimitMultiError(errors) + } + return nil } +// FaultRateLimit_HeaderLimitMultiError is an error wrapping multiple +// validation errors returned by FaultRateLimit_HeaderLimit.ValidateAll() if +// the designated constraints aren't met. +type FaultRateLimit_HeaderLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultRateLimit_HeaderLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultRateLimit_HeaderLimitMultiError) AllErrors() []error { return m } + // FaultRateLimit_HeaderLimitValidationError is the validation error returned // by FaultRateLimit_HeaderLimit.Validate if the designated constraints aren't met. type FaultRateLimit_HeaderLimitValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.go b/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.go index 856e1e2706..2942db382b 100644 --- a/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.go +++ b/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/common/matcher/action/v3/skip_action.proto -package envoy_extensions_filters_common_matcher_action_v3 +package actionv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,11 +21,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Indicates that the associated filter should be skipped. +// Configuration for the SkipFilter match action. When matching results in this action, the +// associated filter will be ignored for all filter callbacks (e.g. `encodeHeaders`, `encodeData`, +// etc. for HTTP filters) after the matcher arrives at the match, including the callback that +// caused the match result. For example, when used with a HTTP filter and the match result was +// resolved after receiving the HTTP response headers, the HTTP filter will *not* receive the +// response header callback. +// +// As a result, if this match action is resolved before the first filter callback (e.g. HTTP request +// headers), the filter will be completely skipped. type SkipFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -76,22 +78,22 @@ var file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_raw 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x0c, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x42, 0x5c, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x53, 0x6b, 0x69, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0c, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x70, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x53, 0x6b, 0x69, 0x70, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x61, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.validate.go b/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.validate.go index f19b86d068..8919f72a9e 100644 --- a/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/common/matcher/action/v3/skip_action.proto -package envoy_extensions_filters_common_matcher_action_v3 +package actionv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SkipFilter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SkipFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SkipFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SkipFilterMultiError, or +// nil if none found. +func (m *SkipFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *SkipFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SkipFilterMultiError(errors) + } + return nil } +// SkipFilterMultiError is an error wrapping multiple validation errors +// returned by SkipFilter.ValidateAll() if the designated constraints aren't met. +type SkipFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SkipFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SkipFilterMultiError) AllErrors() []error { return m } + // SkipFilterValidationError is the validation error returned by // SkipFilter.Validate if the designated constraints aren't met. type SkipFilterValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.go b/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.go index 974f603cea..8cdc867a57 100644 --- a/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.go +++ b/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto -package envoy_extensions_filters_http_adaptive_concurrency_v3 +package adaptive_concurrencyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration parameters for the gradient controller. type GradientControllerConfig struct { state protoimpl.MessageState @@ -463,14 +458,21 @@ var file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurre 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x24, 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x42, 0x69, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x18, 0x41, 0x64, 0x61, - 0x70, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0xf8, 0x42, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x18, 0x41, 0x64, + 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, + 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.validate.go b/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.validate.go index 1fca0ffa98..fcbdd3edb8 100644 --- a/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto -package envoy_extensions_filters_http_adaptive_concurrency_v3 +package adaptive_concurrencyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GradientControllerConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GradientControllerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GradientControllerConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GradientControllerConfigMultiError, or nil if none found. +func (m *GradientControllerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSampleAggregatePercentile()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSampleAggregatePercentile()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "SampleAggregatePercentile", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "SampleAggregatePercentile", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSampleAggregatePercentile()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfigValidationError{ field: "SampleAggregatePercentile", @@ -52,13 +87,36 @@ func (m *GradientControllerConfig) Validate() error { } if m.GetConcurrencyLimitParams() == nil { - return GradientControllerConfigValidationError{ + err := GradientControllerConfigValidationError{ field: "ConcurrencyLimitParams", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConcurrencyLimitParams()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConcurrencyLimitParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConcurrencyLimitParams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfigValidationError{ field: "ConcurrencyLimitParams", @@ -69,13 +127,36 @@ func (m *GradientControllerConfig) Validate() error { } if m.GetMinRttCalcParams() == nil { - return GradientControllerConfigValidationError{ + err := GradientControllerConfigValidationError{ field: "MinRttCalcParams", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMinRttCalcParams()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinRttCalcParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinRttCalcParams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfigValidationError{ field: "MinRttCalcParams", @@ -85,9 +166,30 @@ func (m *GradientControllerConfig) Validate() error { } } + if len(errors) > 0 { + return GradientControllerConfigMultiError(errors) + } + return nil } +// GradientControllerConfigMultiError is an error wrapping multiple validation +// errors returned by GradientControllerConfig.ValidateAll() if the designated +// constraints aren't met. +type GradientControllerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfigMultiError) AllErrors() []error { return m } + // GradientControllerConfigValidationError is the validation error returned by // GradientControllerConfig.Validate if the designated constraints aren't met. type GradientControllerConfigValidationError struct { @@ -146,13 +248,46 @@ var _ interface { // Validate checks the field values on AdaptiveConcurrency with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AdaptiveConcurrency) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdaptiveConcurrency with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AdaptiveConcurrencyMultiError, or nil if none found. +func (m *AdaptiveConcurrency) ValidateAll() error { + return m.validate(true) +} + +func (m *AdaptiveConcurrency) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdaptiveConcurrencyValidationError{ field: "Enabled", @@ -167,13 +302,36 @@ func (m *AdaptiveConcurrency) Validate() error { case *AdaptiveConcurrency_GradientControllerConfig: if m.GetGradientControllerConfig() == nil { - return AdaptiveConcurrencyValidationError{ + err := AdaptiveConcurrencyValidationError{ field: "GradientControllerConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGradientControllerConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGradientControllerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGradientControllerConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AdaptiveConcurrencyValidationError{ field: "GradientControllerConfig", @@ -184,16 +342,41 @@ func (m *AdaptiveConcurrency) Validate() error { } default: - return AdaptiveConcurrencyValidationError{ + err := AdaptiveConcurrencyValidationError{ field: "ConcurrencyControllerConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return AdaptiveConcurrencyMultiError(errors) } return nil } +// AdaptiveConcurrencyMultiError is an error wrapping multiple validation +// errors returned by AdaptiveConcurrency.ValidateAll() if the designated +// constraints aren't met. +type AdaptiveConcurrencyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdaptiveConcurrencyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdaptiveConcurrencyMultiError) AllErrors() []error { return m } + // AdaptiveConcurrencyValidationError is the validation error returned by // AdaptiveConcurrency.Validate if the designated constraints aren't met. type AdaptiveConcurrencyValidationError struct { @@ -253,54 +436,111 @@ var _ interface { // Validate checks the field values on // GradientControllerConfig_ConcurrencyLimitCalculationParams with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GradientControllerConfig_ConcurrencyLimitCalculationParams with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError, or +// nil if none found. +func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMaxConcurrencyLimit(); wrapper != nil { if wrapper.GetValue() <= 0 { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ field: "MaxConcurrencyLimit", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } if m.GetConcurrencyUpdateInterval() == nil { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ field: "ConcurrencyUpdateInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetConcurrencyUpdateInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + err = GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ field: "ConcurrencyUpdateInterval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gt := time.Duration(0*time.Second + 0*time.Nanosecond) + gt := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur <= gt { - return GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ - field: "ConcurrencyUpdateInterval", - reason: "value must be greater than 0s", + if dur <= gt { + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + field: "ConcurrencyUpdateInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError(errors) } return nil } +// GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError is an +// error wrapping multiple validation errors returned by +// GradientControllerConfig_ConcurrencyLimitCalculationParams.ValidateAll() if +// the designated constraints aren't met. +type GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError) AllErrors() []error { + return m +} + // GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError is // the validation error returned by // GradientControllerConfig_ConcurrencyLimitCalculationParams.Validate if the @@ -369,53 +609,105 @@ var _ interface { // Validate checks the field values on // GradientControllerConfig_MinimumRTTCalculationParams with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *GradientControllerConfig_MinimumRTTCalculationParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GradientControllerConfig_MinimumRTTCalculationParams with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// GradientControllerConfig_MinimumRTTCalculationParamsMultiError, or nil if +// none found. +func (m *GradientControllerConfig_MinimumRTTCalculationParams) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig_MinimumRTTCalculationParams) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetInterval() == nil { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Interval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err = GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Interval", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if dur < gte { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ - field: "Interval", - reason: "value must be greater than or equal to 1ms", + if dur < gte { + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Interval", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if wrapper := m.GetRequestCount(); wrapper != nil { if wrapper.GetValue() <= 0 { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "RequestCount", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetJitter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Jitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Jitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJitter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Jitter", @@ -428,15 +720,38 @@ func (m *GradientControllerConfig_MinimumRTTCalculationParams) Validate() error if wrapper := m.GetMinConcurrency(); wrapper != nil { if wrapper.GetValue() <= 0 { - return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "MinConcurrency", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBuffer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ field: "Buffer", @@ -446,9 +761,31 @@ func (m *GradientControllerConfig_MinimumRTTCalculationParams) Validate() error } } + if len(errors) > 0 { + return GradientControllerConfig_MinimumRTTCalculationParamsMultiError(errors) + } + return nil } +// GradientControllerConfig_MinimumRTTCalculationParamsMultiError is an error +// wrapping multiple validation errors returned by +// GradientControllerConfig_MinimumRTTCalculationParams.ValidateAll() if the +// designated constraints aren't met. +type GradientControllerConfig_MinimumRTTCalculationParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfig_MinimumRTTCalculationParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfig_MinimumRTTCalculationParamsMultiError) AllErrors() []error { return m } + // GradientControllerConfig_MinimumRTTCalculationParamsValidationError is the // validation error returned by // GradientControllerConfig_MinimumRTTCalculationParams.Validate if the diff --git a/pkg/api/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.go b/pkg/api/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.go new file mode 100644 index 0000000000..bee245ea0c --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.go @@ -0,0 +1,564 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/admission_control/v3/admission_control.proto + +package admission_controlv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#next-free-field: 8] +type AdmissionControl struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set to false, the admission control filter will operate as a pass-through filter. If the + // message is unspecified, the filter will be enabled. + Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Defines how a request is considered a success/failure. + // + // Types that are assignable to EvaluationCriteria: + // *AdmissionControl_SuccessCriteria_ + EvaluationCriteria isAdmissionControl_EvaluationCriteria `protobuf_oneof:"evaluation_criteria"` + // The sliding time window over which the success rate is calculated. The window is rounded to the + // nearest second. Defaults to 30s. + SamplingWindow *duration.Duration `protobuf:"bytes,3,opt,name=sampling_window,json=samplingWindow,proto3" json:"sampling_window,omitempty"` + // Rejection probability is defined by the formula:: + // + // max(0, (rq_count - rq_success_count / sr_threshold) / (rq_count + 1)) ^ (1 / aggression) + // + // The aggression dictates how heavily the admission controller will throttle requests upon SR + // dropping at or below the threshold. A value of 1 will result in a linear increase in + // rejection probability as SR drops. Any values less than 1.0, will be set to 1.0. If the + // message is unspecified, the aggression is 1.0. See `the admission control documentation + // `_ + // for a diagram illustrating this. + Aggression *v3.RuntimeDouble `protobuf:"bytes,4,opt,name=aggression,proto3" json:"aggression,omitempty"` + // Dictates the success rate at which the rejection probability is non-zero. As success rate drops + // below this threshold, rejection probability will increase. Any success rate above the threshold + // results in a rejection probability of 0. Defaults to 95%. + SrThreshold *v3.RuntimePercent `protobuf:"bytes,5,opt,name=sr_threshold,json=srThreshold,proto3" json:"sr_threshold,omitempty"` + // If the average RPS of the sampling window is below this threshold, the request + // will not be rejected, even if the success rate is lower than sr_threshold. + // Defaults to 0. + RpsThreshold *v3.RuntimeUInt32 `protobuf:"bytes,6,opt,name=rps_threshold,json=rpsThreshold,proto3" json:"rps_threshold,omitempty"` + // The probability of rejection will never exceed this value, even if the failure rate is rising. + // Defaults to 80%. + MaxRejectionProbability *v3.RuntimePercent `protobuf:"bytes,7,opt,name=max_rejection_probability,json=maxRejectionProbability,proto3" json:"max_rejection_probability,omitempty"` +} + +func (x *AdmissionControl) Reset() { + *x = AdmissionControl{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl) ProtoMessage() {} + +func (x *AdmissionControl) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl.ProtoReflect.Descriptor instead. +func (*AdmissionControl) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0} +} + +func (x *AdmissionControl) GetEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.Enabled + } + return nil +} + +func (m *AdmissionControl) GetEvaluationCriteria() isAdmissionControl_EvaluationCriteria { + if m != nil { + return m.EvaluationCriteria + } + return nil +} + +func (x *AdmissionControl) GetSuccessCriteria() *AdmissionControl_SuccessCriteria { + if x, ok := x.GetEvaluationCriteria().(*AdmissionControl_SuccessCriteria_); ok { + return x.SuccessCriteria + } + return nil +} + +func (x *AdmissionControl) GetSamplingWindow() *duration.Duration { + if x != nil { + return x.SamplingWindow + } + return nil +} + +func (x *AdmissionControl) GetAggression() *v3.RuntimeDouble { + if x != nil { + return x.Aggression + } + return nil +} + +func (x *AdmissionControl) GetSrThreshold() *v3.RuntimePercent { + if x != nil { + return x.SrThreshold + } + return nil +} + +func (x *AdmissionControl) GetRpsThreshold() *v3.RuntimeUInt32 { + if x != nil { + return x.RpsThreshold + } + return nil +} + +func (x *AdmissionControl) GetMaxRejectionProbability() *v3.RuntimePercent { + if x != nil { + return x.MaxRejectionProbability + } + return nil +} + +type isAdmissionControl_EvaluationCriteria interface { + isAdmissionControl_EvaluationCriteria() +} + +type AdmissionControl_SuccessCriteria_ struct { + SuccessCriteria *AdmissionControl_SuccessCriteria `protobuf:"bytes,2,opt,name=success_criteria,json=successCriteria,proto3,oneof"` +} + +func (*AdmissionControl_SuccessCriteria_) isAdmissionControl_EvaluationCriteria() {} + +// Default method of specifying what constitutes a successful request. All status codes that +// indicate a successful request must be explicitly specified if not relying on the default +// values. +type AdmissionControl_SuccessCriteria struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If HTTP criteria are unspecified, all HTTP status codes below 500 are treated as successful + // responses. + // + // .. note:: + // + // The default HTTP codes considered successful by the admission controller are done so due + // to the unlikelihood that sending fewer requests would change their behavior (for example: + // redirects, unauthorized access, or bad requests won't be alleviated by sending less + // traffic). + HttpCriteria *AdmissionControl_SuccessCriteria_HttpCriteria `protobuf:"bytes,1,opt,name=http_criteria,json=httpCriteria,proto3" json:"http_criteria,omitempty"` + // GRPC status codes to consider as request successes. If unspecified, defaults to: Ok, + // Cancelled, Unknown, InvalidArgument, NotFound, AlreadyExists, Unauthenticated, + // FailedPrecondition, OutOfRange, PermissionDenied, and Unimplemented. + // + // .. note:: + // + // The default gRPC codes that are considered successful by the admission controller are + // chosen because of the unlikelihood that sending fewer requests will change the behavior. + GrpcCriteria *AdmissionControl_SuccessCriteria_GrpcCriteria `protobuf:"bytes,2,opt,name=grpc_criteria,json=grpcCriteria,proto3" json:"grpc_criteria,omitempty"` +} + +func (x *AdmissionControl_SuccessCriteria) Reset() { + *x = AdmissionControl_SuccessCriteria{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl_SuccessCriteria) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl_SuccessCriteria) ProtoMessage() {} + +func (x *AdmissionControl_SuccessCriteria) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl_SuccessCriteria.ProtoReflect.Descriptor instead. +func (*AdmissionControl_SuccessCriteria) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AdmissionControl_SuccessCriteria) GetHttpCriteria() *AdmissionControl_SuccessCriteria_HttpCriteria { + if x != nil { + return x.HttpCriteria + } + return nil +} + +func (x *AdmissionControl_SuccessCriteria) GetGrpcCriteria() *AdmissionControl_SuccessCriteria_GrpcCriteria { + if x != nil { + return x.GrpcCriteria + } + return nil +} + +type AdmissionControl_SuccessCriteria_HttpCriteria struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status code ranges that constitute a successful request. Configurable codes are in the + // range [100, 600). + HttpSuccessStatus []*v31.Int32Range `protobuf:"bytes,1,rep,name=http_success_status,json=httpSuccessStatus,proto3" json:"http_success_status,omitempty"` +} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) Reset() { + *x = AdmissionControl_SuccessCriteria_HttpCriteria{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl_SuccessCriteria_HttpCriteria) ProtoMessage() {} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl_SuccessCriteria_HttpCriteria.ProtoReflect.Descriptor instead. +func (*AdmissionControl_SuccessCriteria_HttpCriteria) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0, 0, 0} +} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) GetHttpSuccessStatus() []*v31.Int32Range { + if x != nil { + return x.HttpSuccessStatus + } + return nil +} + +type AdmissionControl_SuccessCriteria_GrpcCriteria struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status codes that constitute a successful request. + // Mappings can be found at: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md. + GrpcSuccessStatus []uint32 `protobuf:"varint,1,rep,packed,name=grpc_success_status,json=grpcSuccessStatus,proto3" json:"grpc_success_status,omitempty"` +} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) Reset() { + *x = AdmissionControl_SuccessCriteria_GrpcCriteria{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl_SuccessCriteria_GrpcCriteria) ProtoMessage() {} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl_SuccessCriteria_GrpcCriteria.ProtoReflect.Descriptor instead. +func (*AdmissionControl_SuccessCriteria_GrpcCriteria) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0, 0, 1} +} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) GetGrpcSuccessStatus() []uint32 { + if x != nil { + return x.GrpcSuccessStatus + } + return nil +} + +var File_envoy_extensions_filters_http_admission_control_v3_admission_control_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc = []byte{ + 0x0a, 0x4a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x08, 0x0a, 0x10, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x81, 0x01, + 0x0a, 0x10, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x48, 0x00, + 0x52, 0x0f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x12, 0x42, 0x0a, 0x0f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x57, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x0a, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0c, 0x73, 0x72, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x73, 0x72, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x70, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, + 0x0c, 0x72, 0x70, 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x60, 0x0a, + 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x1a, + 0xd2, 0x03, 0x0a, 0x0f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x12, 0x86, 0x01, 0x0a, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x61, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, + 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x0c, + 0x68, 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x86, 0x01, 0x0a, + 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x61, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x43, + 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x43, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x1a, 0x63, 0x0a, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x53, 0x0a, 0x13, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x11, 0x68, 0x74, 0x74, 0x70, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x48, 0x0a, 0x0c, 0x47, 0x72, + 0x70, 0x63, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x38, 0x0a, 0x13, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x11, 0x67, 0x72, 0x70, 0x63, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x1a, 0x0a, 0x13, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x42, 0xd2, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData = file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc +) + +func file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData +} + +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_goTypes = []interface{}{ + (*AdmissionControl)(nil), // 0: envoy.extensions.filters.http.admission_control.v3.AdmissionControl + (*AdmissionControl_SuccessCriteria)(nil), // 1: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria + (*AdmissionControl_SuccessCriteria_HttpCriteria)(nil), // 2: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.HttpCriteria + (*AdmissionControl_SuccessCriteria_GrpcCriteria)(nil), // 3: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.GrpcCriteria + (*v3.RuntimeFeatureFlag)(nil), // 4: envoy.config.core.v3.RuntimeFeatureFlag + (*duration.Duration)(nil), // 5: google.protobuf.Duration + (*v3.RuntimeDouble)(nil), // 6: envoy.config.core.v3.RuntimeDouble + (*v3.RuntimePercent)(nil), // 7: envoy.config.core.v3.RuntimePercent + (*v3.RuntimeUInt32)(nil), // 8: envoy.config.core.v3.RuntimeUInt32 + (*v31.Int32Range)(nil), // 9: envoy.type.v3.Int32Range +} +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 1, // 1: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.success_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria + 5, // 2: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.sampling_window:type_name -> google.protobuf.Duration + 6, // 3: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.aggression:type_name -> envoy.config.core.v3.RuntimeDouble + 7, // 4: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.sr_threshold:type_name -> envoy.config.core.v3.RuntimePercent + 8, // 5: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.rps_threshold:type_name -> envoy.config.core.v3.RuntimeUInt32 + 7, // 6: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.max_rejection_probability:type_name -> envoy.config.core.v3.RuntimePercent + 2, // 7: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.http_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.HttpCriteria + 3, // 8: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.grpc_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.GrpcCriteria + 9, // 9: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.HttpCriteria.http_success_status:type_name -> envoy.type.v3.Int32Range + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_init() } +func file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_init() { + if File_envoy_extensions_filters_http_admission_control_v3_admission_control_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl_SuccessCriteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl_SuccessCriteria_HttpCriteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl_SuccessCriteria_GrpcCriteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AdmissionControl_SuccessCriteria_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_admission_control_v3_admission_control_proto = out.File + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc = nil + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_goTypes = nil + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.validate.go b/pkg/api/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.validate.go new file mode 100644 index 0000000000..0390743031 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.validate.go @@ -0,0 +1,792 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/admission_control/v3/admission_control.proto + +package admission_controlv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AdmissionControl with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *AdmissionControl) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdmissionControl with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AdmissionControlMultiError, or nil if none found. +func (m *AdmissionControl) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSamplingWindow()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SamplingWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SamplingWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSamplingWindow()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "SamplingWindow", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAggression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAggression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSrThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SrThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SrThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSrThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "SrThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRpsThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "RpsThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "RpsThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRpsThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "RpsThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxRejectionProbability()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "MaxRejectionProbability", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "MaxRejectionProbability", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRejectionProbability()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "MaxRejectionProbability", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.EvaluationCriteria.(type) { + + case *AdmissionControl_SuccessCriteria_: + + if all { + switch v := interface{}(m.GetSuccessCriteria()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SuccessCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SuccessCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessCriteria()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "SuccessCriteria", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := AdmissionControlValidationError{ + field: "EvaluationCriteria", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return AdmissionControlMultiError(errors) + } + + return nil +} + +// AdmissionControlMultiError is an error wrapping multiple validation errors +// returned by AdmissionControl.ValidateAll() if the designated constraints +// aren't met. +type AdmissionControlMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControlMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControlMultiError) AllErrors() []error { return m } + +// AdmissionControlValidationError is the validation error returned by +// AdmissionControl.Validate if the designated constraints aren't met. +type AdmissionControlValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControlValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControlValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AdmissionControlValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControlValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControlValidationError) ErrorName() string { return "AdmissionControlValidationError" } + +// Error satisfies the builtin error interface +func (e AdmissionControlValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAdmissionControl.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControlValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControlValidationError{} + +// Validate checks the field values on AdmissionControl_SuccessCriteria with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *AdmissionControl_SuccessCriteria) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdmissionControl_SuccessCriteria with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// AdmissionControl_SuccessCriteriaMultiError, or nil if none found. +func (m *AdmissionControl_SuccessCriteria) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl_SuccessCriteria) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHttpCriteria()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "HttpCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "HttpCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpCriteria()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControl_SuccessCriteriaValidationError{ + field: "HttpCriteria", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGrpcCriteria()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "GrpcCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "GrpcCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcCriteria()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControl_SuccessCriteriaValidationError{ + field: "GrpcCriteria", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AdmissionControl_SuccessCriteriaMultiError(errors) + } + + return nil +} + +// AdmissionControl_SuccessCriteriaMultiError is an error wrapping multiple +// validation errors returned by +// AdmissionControl_SuccessCriteria.ValidateAll() if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteriaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControl_SuccessCriteriaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControl_SuccessCriteriaMultiError) AllErrors() []error { return m } + +// AdmissionControl_SuccessCriteriaValidationError is the validation error +// returned by AdmissionControl_SuccessCriteria.Validate if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteriaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControl_SuccessCriteriaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControl_SuccessCriteriaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AdmissionControl_SuccessCriteriaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControl_SuccessCriteriaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControl_SuccessCriteriaValidationError) ErrorName() string { + return "AdmissionControl_SuccessCriteriaValidationError" +} + +// Error satisfies the builtin error interface +func (e AdmissionControl_SuccessCriteriaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAdmissionControl_SuccessCriteria.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControl_SuccessCriteriaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControl_SuccessCriteriaValidationError{} + +// Validate checks the field values on +// AdmissionControl_SuccessCriteria_HttpCriteria with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *AdmissionControl_SuccessCriteria_HttpCriteria) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// AdmissionControl_SuccessCriteria_HttpCriteria with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// AdmissionControl_SuccessCriteria_HttpCriteriaMultiError, or nil if none found. +func (m *AdmissionControl_SuccessCriteria_HttpCriteria) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl_SuccessCriteria_HttpCriteria) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetHttpSuccessStatus()) < 1 { + err := AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: "HttpSuccessStatus", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetHttpSuccessStatus() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: fmt.Sprintf("HttpSuccessStatus[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: fmt.Sprintf("HttpSuccessStatus[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: fmt.Sprintf("HttpSuccessStatus[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return AdmissionControl_SuccessCriteria_HttpCriteriaMultiError(errors) + } + + return nil +} + +// AdmissionControl_SuccessCriteria_HttpCriteriaMultiError is an error wrapping +// multiple validation errors returned by +// AdmissionControl_SuccessCriteria_HttpCriteria.ValidateAll() if the +// designated constraints aren't met. +type AdmissionControl_SuccessCriteria_HttpCriteriaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControl_SuccessCriteria_HttpCriteriaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControl_SuccessCriteria_HttpCriteriaMultiError) AllErrors() []error { return m } + +// AdmissionControl_SuccessCriteria_HttpCriteriaValidationError is the +// validation error returned by +// AdmissionControl_SuccessCriteria_HttpCriteria.Validate if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteria_HttpCriteriaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) ErrorName() string { + return "AdmissionControl_SuccessCriteria_HttpCriteriaValidationError" +} + +// Error satisfies the builtin error interface +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAdmissionControl_SuccessCriteria_HttpCriteria.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{} + +// Validate checks the field values on +// AdmissionControl_SuccessCriteria_GrpcCriteria with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *AdmissionControl_SuccessCriteria_GrpcCriteria) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// AdmissionControl_SuccessCriteria_GrpcCriteria with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError, or nil if none found. +func (m *AdmissionControl_SuccessCriteria_GrpcCriteria) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl_SuccessCriteria_GrpcCriteria) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetGrpcSuccessStatus()) < 1 { + err := AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{ + field: "GrpcSuccessStatus", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError(errors) + } + + return nil +} + +// AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError is an error wrapping +// multiple validation errors returned by +// AdmissionControl_SuccessCriteria_GrpcCriteria.ValidateAll() if the +// designated constraints aren't met. +type AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError) AllErrors() []error { return m } + +// AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError is the +// validation error returned by +// AdmissionControl_SuccessCriteria_GrpcCriteria.Validate if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) ErrorName() string { + return "AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError" +} + +// Error satisfies the builtin error interface +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAdmissionControl_SuccessCriteria_GrpcCriteria.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.pb.go b/pkg/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.pb.go deleted file mode 100644 index 2d775e33ee..0000000000 --- a/pkg/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.pb.go +++ /dev/null @@ -1,542 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/admission_control/v3alpha/admission_control.proto - -package envoy_extensions_filters_http_admission_control_v3alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - _ "github.com/golang/protobuf/ptypes/wrappers" - _ "google.golang.org/genproto/googleapis/api/annotations" - _ "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 6] -type AdmissionControl struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If set to false, the admission control filter will operate as a pass-through filter. If the - // message is unspecified, the filter will be enabled. - Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Defines how a request is considered a success/failure. - // - // Types that are assignable to EvaluationCriteria: - // *AdmissionControl_SuccessCriteria_ - EvaluationCriteria isAdmissionControl_EvaluationCriteria `protobuf_oneof:"evaluation_criteria"` - // The sliding time window over which the success rate is calculated. The window is rounded to the - // nearest second. Defaults to 30s. - SamplingWindow *duration.Duration `protobuf:"bytes,3,opt,name=sampling_window,json=samplingWindow,proto3" json:"sampling_window,omitempty"` - // Rejection probability is defined by the formula:: - // - // max(0, (rq_count - rq_success_count / sr_threshold) / (rq_count + 1)) ^ (1 / aggression) - // - // The aggression dictates how heavily the admission controller will throttle requests upon SR - // dropping at or below the threshold. A value of 1 will result in a linear increase in - // rejection probability as SR drops. Any values less than 1.0, will be set to 1.0. If the - // message is unspecified, the aggression is 1.0. See `the admission control documentation - // `_ - // for a diagram illustrating this. - Aggression *v3.RuntimeDouble `protobuf:"bytes,4,opt,name=aggression,proto3" json:"aggression,omitempty"` - // Dictates the success rate at which the rejection probability is non-zero. As success rate drops - // below this threshold, rejection probability will increase. Any success rate above the threshold - // results in a rejection probability of 0. Defaults to 95%. - SrThreshold *v3.RuntimePercent `protobuf:"bytes,5,opt,name=sr_threshold,json=srThreshold,proto3" json:"sr_threshold,omitempty"` -} - -func (x *AdmissionControl) Reset() { - *x = AdmissionControl{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdmissionControl) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdmissionControl) ProtoMessage() {} - -func (x *AdmissionControl) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdmissionControl.ProtoReflect.Descriptor instead. -func (*AdmissionControl) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescGZIP(), []int{0} -} - -func (x *AdmissionControl) GetEnabled() *v3.RuntimeFeatureFlag { - if x != nil { - return x.Enabled - } - return nil -} - -func (m *AdmissionControl) GetEvaluationCriteria() isAdmissionControl_EvaluationCriteria { - if m != nil { - return m.EvaluationCriteria - } - return nil -} - -func (x *AdmissionControl) GetSuccessCriteria() *AdmissionControl_SuccessCriteria { - if x, ok := x.GetEvaluationCriteria().(*AdmissionControl_SuccessCriteria_); ok { - return x.SuccessCriteria - } - return nil -} - -func (x *AdmissionControl) GetSamplingWindow() *duration.Duration { - if x != nil { - return x.SamplingWindow - } - return nil -} - -func (x *AdmissionControl) GetAggression() *v3.RuntimeDouble { - if x != nil { - return x.Aggression - } - return nil -} - -func (x *AdmissionControl) GetSrThreshold() *v3.RuntimePercent { - if x != nil { - return x.SrThreshold - } - return nil -} - -type isAdmissionControl_EvaluationCriteria interface { - isAdmissionControl_EvaluationCriteria() -} - -type AdmissionControl_SuccessCriteria_ struct { - SuccessCriteria *AdmissionControl_SuccessCriteria `protobuf:"bytes,2,opt,name=success_criteria,json=successCriteria,proto3,oneof"` -} - -func (*AdmissionControl_SuccessCriteria_) isAdmissionControl_EvaluationCriteria() {} - -// Default method of specifying what constitutes a successful request. All status codes that -// indicate a successful request must be explicitly specified if not relying on the default -// values. -type AdmissionControl_SuccessCriteria struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If HTTP criteria are unspecified, all HTTP status codes below 500 are treated as successful - // responses. - // - // .. note:: - // - // The default HTTP codes considered successful by the admission controller are done so due - // to the unlikelihood that sending fewer requests would change their behavior (for example: - // redirects, unauthorized access, or bad requests won't be alleviated by sending less - // traffic). - HttpCriteria *AdmissionControl_SuccessCriteria_HttpCriteria `protobuf:"bytes,1,opt,name=http_criteria,json=httpCriteria,proto3" json:"http_criteria,omitempty"` - // GRPC status codes to consider as request successes. If unspecified, defaults to: Ok, - // Cancelled, Unknown, InvalidArgument, NotFound, AlreadyExists, Unauthenticated, - // FailedPrecondition, OutOfRange, PermissionDenied, and Unimplemented. - // - // .. note:: - // - // The default gRPC codes that are considered successful by the admission controller are - // chosen because of the unlikelihood that sending fewer requests will change the behavior. - GrpcCriteria *AdmissionControl_SuccessCriteria_GrpcCriteria `protobuf:"bytes,2,opt,name=grpc_criteria,json=grpcCriteria,proto3" json:"grpc_criteria,omitempty"` -} - -func (x *AdmissionControl_SuccessCriteria) Reset() { - *x = AdmissionControl_SuccessCriteria{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdmissionControl_SuccessCriteria) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdmissionControl_SuccessCriteria) ProtoMessage() {} - -func (x *AdmissionControl_SuccessCriteria) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdmissionControl_SuccessCriteria.ProtoReflect.Descriptor instead. -func (*AdmissionControl_SuccessCriteria) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *AdmissionControl_SuccessCriteria) GetHttpCriteria() *AdmissionControl_SuccessCriteria_HttpCriteria { - if x != nil { - return x.HttpCriteria - } - return nil -} - -func (x *AdmissionControl_SuccessCriteria) GetGrpcCriteria() *AdmissionControl_SuccessCriteria_GrpcCriteria { - if x != nil { - return x.GrpcCriteria - } - return nil -} - -type AdmissionControl_SuccessCriteria_HttpCriteria struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status code ranges that constitute a successful request. Configurable codes are in the - // range [100, 600). - HttpSuccessStatus []*v31.Int32Range `protobuf:"bytes,1,rep,name=http_success_status,json=httpSuccessStatus,proto3" json:"http_success_status,omitempty"` -} - -func (x *AdmissionControl_SuccessCriteria_HttpCriteria) Reset() { - *x = AdmissionControl_SuccessCriteria_HttpCriteria{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdmissionControl_SuccessCriteria_HttpCriteria) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdmissionControl_SuccessCriteria_HttpCriteria) ProtoMessage() {} - -func (x *AdmissionControl_SuccessCriteria_HttpCriteria) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdmissionControl_SuccessCriteria_HttpCriteria.ProtoReflect.Descriptor instead. -func (*AdmissionControl_SuccessCriteria_HttpCriteria) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (x *AdmissionControl_SuccessCriteria_HttpCriteria) GetHttpSuccessStatus() []*v31.Int32Range { - if x != nil { - return x.HttpSuccessStatus - } - return nil -} - -type AdmissionControl_SuccessCriteria_GrpcCriteria struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status codes that constitute a successful request. - // Mappings can be found at: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md. - GrpcSuccessStatus []uint32 `protobuf:"varint,1,rep,packed,name=grpc_success_status,json=grpcSuccessStatus,proto3" json:"grpc_success_status,omitempty"` -} - -func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) Reset() { - *x = AdmissionControl_SuccessCriteria_GrpcCriteria{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdmissionControl_SuccessCriteria_GrpcCriteria) ProtoMessage() {} - -func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdmissionControl_SuccessCriteria_GrpcCriteria.ProtoReflect.Descriptor instead. -func (*AdmissionControl_SuccessCriteria_GrpcCriteria) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescGZIP(), []int{0, 0, 1} -} - -func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) GetGrpcSuccessStatus() []uint32 { - if x != nil { - return x.GrpcSuccessStatus - } - return nil -} - -var File_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDesc = []byte{ - 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x07, 0x0a, 0x10, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x86, - 0x01, 0x0a, 0x10, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, - 0x72, 0x69, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x59, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, - 0x65, 0x72, 0x69, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, - 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x42, 0x0a, 0x0f, 0x73, 0x61, 0x6d, 0x70, 0x6c, - 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x43, 0x0a, 0x0a, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x52, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x47, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x73, 0x72, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0xdc, 0x03, 0x0a, 0x0f, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x8b, 0x01, - 0x0a, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x66, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x0c, 0x68, - 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x8b, 0x01, 0x0a, 0x0d, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x66, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x0c, 0x67, 0x72, 0x70, - 0x63, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x1a, 0x63, 0x0a, 0x0c, 0x48, 0x74, 0x74, - 0x70, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x53, 0x0a, 0x13, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x11, 0x68, 0x74, 0x74, - 0x70, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x48, - 0x0a, 0x0c, 0x47, 0x72, 0x70, 0x63, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x38, - 0x0a, 0x13, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x11, 0x67, 0x72, 0x70, 0x63, 0x53, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x1a, 0x0a, 0x13, 0x65, 0x76, 0x61, 0x6c, - 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x42, 0x70, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x41, - 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescData = file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDesc -) - -func file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDescData -} - -var file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_goTypes = []interface{}{ - (*AdmissionControl)(nil), // 0: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl - (*AdmissionControl_SuccessCriteria)(nil), // 1: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria - (*AdmissionControl_SuccessCriteria_HttpCriteria)(nil), // 2: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria.HttpCriteria - (*AdmissionControl_SuccessCriteria_GrpcCriteria)(nil), // 3: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria.GrpcCriteria - (*v3.RuntimeFeatureFlag)(nil), // 4: envoy.config.core.v3.RuntimeFeatureFlag - (*duration.Duration)(nil), // 5: google.protobuf.Duration - (*v3.RuntimeDouble)(nil), // 6: envoy.config.core.v3.RuntimeDouble - (*v3.RuntimePercent)(nil), // 7: envoy.config.core.v3.RuntimePercent - (*v31.Int32Range)(nil), // 8: envoy.type.v3.Int32Range -} -var file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_depIdxs = []int32{ - 4, // 0: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag - 1, // 1: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.success_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria - 5, // 2: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.sampling_window:type_name -> google.protobuf.Duration - 6, // 3: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.aggression:type_name -> envoy.config.core.v3.RuntimeDouble - 7, // 4: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.sr_threshold:type_name -> envoy.config.core.v3.RuntimePercent - 2, // 5: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria.http_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria.HttpCriteria - 3, // 6: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria.grpc_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria.GrpcCriteria - 8, // 7: envoy.extensions.filters.http.admission_control.v3alpha.AdmissionControl.SuccessCriteria.HttpCriteria.http_success_status:type_name -> envoy.type.v3.Int32Range - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_init() -} -func file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_init() { - if File_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdmissionControl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdmissionControl_SuccessCriteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdmissionControl_SuccessCriteria_HttpCriteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdmissionControl_SuccessCriteria_GrpcCriteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*AdmissionControl_SuccessCriteria_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto = out.File - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_rawDesc = nil - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_goTypes = nil - file_envoy_extensions_filters_http_admission_control_v3alpha_admission_control_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.pb.validate.go b/pkg/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.pb.validate.go deleted file mode 100644 index 74dcc6075d..0000000000 --- a/pkg/api/envoy/extensions/filters/http/admission_control/v3alpha/admission_control.pb.validate.go +++ /dev/null @@ -1,420 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/admission_control/v3alpha/admission_control.proto - -package envoy_extensions_filters_http_admission_control_v3alpha - -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{} -) - -// Validate checks the field values on AdmissionControl with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *AdmissionControl) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControlValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetSamplingWindow()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControlValidationError{ - field: "SamplingWindow", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAggression()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControlValidationError{ - field: "Aggression", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetSrThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControlValidationError{ - field: "SrThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.EvaluationCriteria.(type) { - - case *AdmissionControl_SuccessCriteria_: - - if v, ok := interface{}(m.GetSuccessCriteria()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControlValidationError{ - field: "SuccessCriteria", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return AdmissionControlValidationError{ - field: "EvaluationCriteria", - reason: "value is required", - } - - } - - return nil -} - -// AdmissionControlValidationError is the validation error returned by -// AdmissionControl.Validate if the designated constraints aren't met. -type AdmissionControlValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdmissionControlValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdmissionControlValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AdmissionControlValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdmissionControlValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdmissionControlValidationError) ErrorName() string { return "AdmissionControlValidationError" } - -// Error satisfies the builtin error interface -func (e AdmissionControlValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdmissionControl.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdmissionControlValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdmissionControlValidationError{} - -// Validate checks the field values on AdmissionControl_SuccessCriteria with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *AdmissionControl_SuccessCriteria) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHttpCriteria()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControl_SuccessCriteriaValidationError{ - field: "HttpCriteria", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetGrpcCriteria()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControl_SuccessCriteriaValidationError{ - field: "GrpcCriteria", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// AdmissionControl_SuccessCriteriaValidationError is the validation error -// returned by AdmissionControl_SuccessCriteria.Validate if the designated -// constraints aren't met. -type AdmissionControl_SuccessCriteriaValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdmissionControl_SuccessCriteriaValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdmissionControl_SuccessCriteriaValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AdmissionControl_SuccessCriteriaValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdmissionControl_SuccessCriteriaValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdmissionControl_SuccessCriteriaValidationError) ErrorName() string { - return "AdmissionControl_SuccessCriteriaValidationError" -} - -// Error satisfies the builtin error interface -func (e AdmissionControl_SuccessCriteriaValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdmissionControl_SuccessCriteria.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdmissionControl_SuccessCriteriaValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdmissionControl_SuccessCriteriaValidationError{} - -// Validate checks the field values on -// AdmissionControl_SuccessCriteria_HttpCriteria with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *AdmissionControl_SuccessCriteria_HttpCriteria) Validate() error { - if m == nil { - return nil - } - - if len(m.GetHttpSuccessStatus()) < 1 { - return AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ - field: "HttpSuccessStatus", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetHttpSuccessStatus() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ - field: fmt.Sprintf("HttpSuccessStatus[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// AdmissionControl_SuccessCriteria_HttpCriteriaValidationError is the -// validation error returned by -// AdmissionControl_SuccessCriteria_HttpCriteria.Validate if the designated -// constraints aren't met. -type AdmissionControl_SuccessCriteria_HttpCriteriaValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) ErrorName() string { - return "AdmissionControl_SuccessCriteria_HttpCriteriaValidationError" -} - -// Error satisfies the builtin error interface -func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdmissionControl_SuccessCriteria_HttpCriteria.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{} - -// Validate checks the field values on -// AdmissionControl_SuccessCriteria_GrpcCriteria with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *AdmissionControl_SuccessCriteria_GrpcCriteria) Validate() error { - if m == nil { - return nil - } - - if len(m.GetGrpcSuccessStatus()) < 1 { - return AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{ - field: "GrpcSuccessStatus", - reason: "value must contain at least 1 item(s)", - } - } - - return nil -} - -// AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError is the -// validation error returned by -// AdmissionControl_SuccessCriteria_GrpcCriteria.Validate if the designated -// constraints aren't met. -type AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) ErrorName() string { - return "AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError" -} - -// Error satisfies the builtin error interface -func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdmissionControl_SuccessCriteria_GrpcCriteria.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.go b/pkg/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.go new file mode 100644 index 0000000000..a937541a13 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto + +package alternate_protocols_cachev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the alternate protocols cache HTTP filter. +// [#extension: envoy.filters.http.alternate_protocols_cache] +type FilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set, causes the use of the alternate protocols cache, which is responsible for + // parsing and caching HTTP Alt-Svc headers. This enables the use of HTTP/3 for upstream + // servers that advertise supporting it. + // TODO(RyanTheOptimist): Make this field required when HTTP/3 is enabled via auto_http. + AlternateProtocolsCacheOptions *v3.AlternateProtocolsCacheOptions `protobuf:"bytes,1,opt,name=alternate_protocols_cache_options,json=alternateProtocolsCacheOptions,proto3" json:"alternate_protocols_cache_options,omitempty"` +} + +func (x *FilterConfig) Reset() { + *x = FilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterConfig) ProtoMessage() {} + +func (x *FilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterConfig.ProtoReflect.Descriptor instead. +func (*FilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescGZIP(), []int{0} +} + +func (x *FilterConfig) GetAlternateProtocolsCacheOptions() *v3.AlternateProtocolsCacheOptions { + if x != nil { + return x.AlternateProtocolsCacheOptions + } + return nil +} + +var File_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc = []byte{ + 0x0a, 0x5a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x6c, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, + 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7f, 0x0a, + 0x21, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x1e, + 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xf1, + 0x01, 0x0a, 0x48, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, + 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x1c, 0x41, 0x6c, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x61, + 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData = file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc +) + +func file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData +} + +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_goTypes = []interface{}{ + (*FilterConfig)(nil), // 0: envoy.extensions.filters.http.alternate_protocols_cache.v3.FilterConfig + (*v3.AlternateProtocolsCacheOptions)(nil), // 1: envoy.config.core.v3.AlternateProtocolsCacheOptions +} +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.http.alternate_protocols_cache.v3.FilterConfig.alternate_protocols_cache_options:type_name -> envoy.config.core.v3.AlternateProtocolsCacheOptions + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_init() +} +func file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_init() { + if File_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto = out.File + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc = nil + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_goTypes = nil + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.validate.go b/pkg/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.validate.go new file mode 100644 index 0000000000..d7354e03f4 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.validate.go @@ -0,0 +1,164 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto + +package alternate_protocols_cachev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FilterConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAlternateProtocolsCacheOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAlternateProtocolsCacheOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + + return nil +} + +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + +// FilterConfigValidationError is the validation error returned by +// FilterConfig.Validate if the designated constraints aren't met. +type FilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterConfigValidationError) ErrorName() string { return "FilterConfigValidationError" } + +// Error satisfies the builtin error interface +func (e FilterConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterConfigValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.go b/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.go index 2dbae61f87..472b3c59a3 100644 --- a/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.go +++ b/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto -package envoy_extensions_filters_http_aws_lambda_v3 +package aws_lambdav3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Config_InvocationMode int32 const ( @@ -242,13 +237,19 @@ var file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDesc = 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0x55, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, - 0x33, 0x42, 0x0e, 0x41, 0x77, 0x73, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0xb6, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, + 0x76, 0x33, 0x42, 0x0e, 0x41, 0x77, 0x73, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, 0x77, 0x73, 0x5f, 0x6c, + 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, + 0x62, 0x64, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.validate.go b/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.validate.go index c4f3449249..45255b6963 100644 --- a/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto -package envoy_extensions_filters_http_aws_lambda_v3 +package aws_lambdav3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetArn()) < 1 { - return ConfigValidationError{ + err := ConfigValidationError{ field: "Arn", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for PayloadPassthrough if _, ok := Config_InvocationMode_name[int32(m.GetInvocationMode())]; !ok { - return ConfigValidationError{ + err := ConfigValidationError{ field: "InvocationMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ConfigMultiError(errors) } return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { @@ -114,14 +158,47 @@ var _ interface { } = ConfigValidationError{} // Validate checks the field values on PerRouteConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetInvokeConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetInvokeConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "InvokeConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "InvokeConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInvokeConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerRouteConfigValidationError{ field: "InvokeConfig", @@ -131,9 +208,30 @@ func (m *PerRouteConfig) Validate() error { } } + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil } +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + // PerRouteConfigValidationError is the validation error returned by // PerRouteConfig.Validate if the designated constraints aren't met. type PerRouteConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.go b/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.go index 88448f1a15..8fbe3a9a05 100644 --- a/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.go +++ b/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto -package envoy_extensions_filters_http_aws_request_signing_v3 +package aws_request_signingv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,11 +23,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Top level configuration for the AWS request signing filter. +// [#next-free-field: 6] type AwsRequestSigning struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -50,10 +47,24 @@ type AwsRequestSigning struct { // // Note: this rewrite affects both signing and host header forwarding. However, this // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the + // :ref:`HCM host rewrite ` given that the // value set here would be used for signing whereas the value set in the HCM would be used // for host header forwarding which is not the desired outcome. HostRewrite string `protobuf:"bytes,3,opt,name=host_rewrite,json=hostRewrite,proto3" json:"host_rewrite,omitempty"` + // Instead of buffering the request to calculate the payload hash, use the literal string ``UNSIGNED-PAYLOAD`` + // to calculate the payload hash. Not all services support this option. See the `S3 + // `_ policy for details. + UseUnsignedPayload bool `protobuf:"varint,4,opt,name=use_unsigned_payload,json=useUnsignedPayload,proto3" json:"use_unsigned_payload,omitempty"` + // A list of request header string matchers that will be excluded from signing. The excluded header can be matched by + // any patterns defined in the StringMatcher proto (e.g. exact string, prefix, regex, etc). + // + // Example: + // match_excluded_headers: + // - prefix: x-envoy + // - exact: foo + // - exact: bar + // When applied, all headers that start with "x-envoy" and headers "foo" and "bar" will not be signed. + MatchExcludedHeaders []*v3.StringMatcher `protobuf:"bytes,5,rep,name=match_excluded_headers,json=matchExcludedHeaders,proto3" json:"match_excluded_headers,omitempty"` } func (x *AwsRequestSigning) Reset() { @@ -109,6 +120,20 @@ func (x *AwsRequestSigning) GetHostRewrite() string { return "" } +func (x *AwsRequestSigning) GetUseUnsignedPayload() bool { + if x != nil { + return x.UseUnsignedPayload + } + return false +} + +func (x *AwsRequestSigning) GetMatchExcludedHeaders() []*v3.StringMatcher { + if x != nil { + return x.MatchExcludedHeaders + } + return nil +} + var File_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDesc = []byte{ @@ -120,33 +145,51 @@ var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signin 0x12, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xd2, 0x01, 0x0a, 0x11, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x6f, 0x73, 0x74, - 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x66, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x41, 0x77, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x02, 0x0a, 0x11, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x75, + 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x75, 0x73, 0x65, 0x55, 0x6e, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x5a, 0x0a, + 0x16, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x52, 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0xd9, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, + 0x16, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x71, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -164,13 +207,15 @@ func file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signi var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_goTypes = []interface{}{ (*AwsRequestSigning)(nil), // 0: envoy.extensions.filters.http.aws_request_signing.v3.AwsRequestSigning + (*v3.StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher } var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: envoy.extensions.filters.http.aws_request_signing.v3.AwsRequestSigning.match_excluded_headers:type_name -> envoy.type.matcher.v3.StringMatcher + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { diff --git a/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.validate.go b/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.validate.go index cd4e716798..b90776e4b2 100644 --- a/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto -package envoy_extensions_filters_http_aws_request_signing_v3 +package aws_request_signingv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,36 +31,116 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AwsRequestSigning with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AwsRequestSigning) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AwsRequestSigning with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AwsRequestSigningMultiError, or nil if none found. +func (m *AwsRequestSigning) ValidateAll() error { + return m.validate(true) +} + +func (m *AwsRequestSigning) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetServiceName()) < 1 { - return AwsRequestSigningValidationError{ + err := AwsRequestSigningValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetRegion()) < 1 { - return AwsRequestSigningValidationError{ + err := AwsRequestSigningValidationError{ field: "Region", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for HostRewrite + // no validation rules for UseUnsignedPayload + + for idx, item := range m.GetMatchExcludedHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AwsRequestSigningValidationError{ + field: fmt.Sprintf("MatchExcludedHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AwsRequestSigningValidationError{ + field: fmt.Sprintf("MatchExcludedHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AwsRequestSigningValidationError{ + field: fmt.Sprintf("MatchExcludedHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return AwsRequestSigningMultiError(errors) + } + return nil } +// AwsRequestSigningMultiError is an error wrapping multiple validation errors +// returned by AwsRequestSigning.ValidateAll() if the designated constraints +// aren't met. +type AwsRequestSigningMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AwsRequestSigningMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AwsRequestSigningMultiError) AllErrors() []error { return m } + // AwsRequestSigningValidationError is the validation error returned by // AwsRequestSigning.Validate if the designated constraints aren't met. type AwsRequestSigningValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.go b/pkg/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.go new file mode 100644 index 0000000000..01a62f564f --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.go @@ -0,0 +1,355 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto + +package bandwidth_limitv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines the mode for the bandwidth limit filter. +// Values represent bitmask. +type BandwidthLimit_EnableMode int32 + +const ( + // Filter is disabled. + BandwidthLimit_DISABLED BandwidthLimit_EnableMode = 0 + // Filter enabled only for incoming traffic. + BandwidthLimit_REQUEST BandwidthLimit_EnableMode = 1 + // Filter enabled only for outgoing traffic. + BandwidthLimit_RESPONSE BandwidthLimit_EnableMode = 2 + // Filter enabled for both incoming and outgoing traffic. + BandwidthLimit_REQUEST_AND_RESPONSE BandwidthLimit_EnableMode = 3 +) + +// Enum value maps for BandwidthLimit_EnableMode. +var ( + BandwidthLimit_EnableMode_name = map[int32]string{ + 0: "DISABLED", + 1: "REQUEST", + 2: "RESPONSE", + 3: "REQUEST_AND_RESPONSE", + } + BandwidthLimit_EnableMode_value = map[string]int32{ + "DISABLED": 0, + "REQUEST": 1, + "RESPONSE": 2, + "REQUEST_AND_RESPONSE": 3, + } +) + +func (x BandwidthLimit_EnableMode) Enum() *BandwidthLimit_EnableMode { + p := new(BandwidthLimit_EnableMode) + *p = x + return p +} + +func (x BandwidthLimit_EnableMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BandwidthLimit_EnableMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes[0].Descriptor() +} + +func (BandwidthLimit_EnableMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes[0] +} + +func (x BandwidthLimit_EnableMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BandwidthLimit_EnableMode.Descriptor instead. +func (BandwidthLimit_EnableMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescGZIP(), []int{0, 0} +} + +// [#next-free-field: 8] +type BandwidthLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The human readable prefix to use when emitting stats. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // The enable mode for the bandwidth limit filter. + // Default is Disabled. + EnableMode BandwidthLimit_EnableMode `protobuf:"varint,2,opt,name=enable_mode,json=enableMode,proto3,enum=envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit_EnableMode" json:"enable_mode,omitempty"` + // The limit supplied in KiB/s. + // + // .. note:: + // It's fine for the limit to be unset for the global configuration since the bandwidth limit + // can be applied at a the virtual host or route level. Thus, the limit must be set for the + // per route configuration otherwise the config will be rejected. + // + // .. note:: + // When using per route configuration, the limit becomes unique to that route. + // + LimitKbps *wrappers.UInt64Value `protobuf:"bytes,3,opt,name=limit_kbps,json=limitKbps,proto3" json:"limit_kbps,omitempty"` + // Optional Fill interval in milliseconds for the token refills. Defaults to 50ms. + // It must be at least 20ms to avoid too aggressive refills. + FillInterval *duration.Duration `protobuf:"bytes,4,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` + // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults + // to enabled. + RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"` + // Enable response trailers. + // + // .. note:: + // + // * If set true, the response trailers *bandwidth-request-delay-ms* and *bandwidth-response-delay-ms* will be added, prefixed by *response_trailer_prefix*. + // * bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer. + // * bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer. + // * If :ref:`enable_mode ` is DISABLED or REQUEST, the trailers will not be set. + // * If both the request and response delay time is 0, the trailers will not be set. + // + EnableResponseTrailers bool `protobuf:"varint,6,opt,name=enable_response_trailers,json=enableResponseTrailers,proto3" json:"enable_response_trailers,omitempty"` + // Optional The prefix for the response trailers. + ResponseTrailerPrefix string `protobuf:"bytes,7,opt,name=response_trailer_prefix,json=responseTrailerPrefix,proto3" json:"response_trailer_prefix,omitempty"` +} + +func (x *BandwidthLimit) Reset() { + *x = BandwidthLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BandwidthLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BandwidthLimit) ProtoMessage() {} + +func (x *BandwidthLimit) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BandwidthLimit.ProtoReflect.Descriptor instead. +func (*BandwidthLimit) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescGZIP(), []int{0} +} + +func (x *BandwidthLimit) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *BandwidthLimit) GetEnableMode() BandwidthLimit_EnableMode { + if x != nil { + return x.EnableMode + } + return BandwidthLimit_DISABLED +} + +func (x *BandwidthLimit) GetLimitKbps() *wrappers.UInt64Value { + if x != nil { + return x.LimitKbps + } + return nil +} + +func (x *BandwidthLimit) GetFillInterval() *duration.Duration { + if x != nil { + return x.FillInterval + } + return nil +} + +func (x *BandwidthLimit) GetRuntimeEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.RuntimeEnabled + } + return nil +} + +func (x *BandwidthLimit) GetEnableResponseTrailers() bool { + if x != nil { + return x.EnableResponseTrailers + } + return false +} + +func (x *BandwidthLimit) GetResponseTrailerPrefix() string { + if x != nil { + return x.ResponseTrailerPrefix + } + return "" +} + +var File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc = []byte{ + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, + 0x76, 0x33, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x04, 0x0a, 0x0e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x76, 0x0a, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5f, 0x6b, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, + 0x02, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x4b, 0x62, 0x70, 0x73, 0x12, 0x51, + 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x01, 0x32, 0x05, 0x10, 0x80, + 0xda, 0xc4, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x51, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x36, + 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x15, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x4f, 0x0a, 0x0a, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x02, 0x12, 0x18, 0x0a, + 0x14, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x53, + 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x03, 0x42, 0xca, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x42, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData = file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc +) + +func file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData +} + +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes = []interface{}{ + (BandwidthLimit_EnableMode)(0), // 0: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode + (*BandwidthLimit)(nil), // 1: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit + (*wrappers.UInt64Value)(nil), // 2: google.protobuf.UInt64Value + (*duration.Duration)(nil), // 3: google.protobuf.Duration + (*v3.RuntimeFeatureFlag)(nil), // 4: envoy.config.core.v3.RuntimeFeatureFlag +} +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.enable_mode:type_name -> envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode + 2, // 1: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.limit_kbps:type_name -> google.protobuf.UInt64Value + 3, // 2: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.fill_interval:type_name -> google.protobuf.Duration + 4, // 3: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.runtime_enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_init() } +func file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_init() { + if File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BandwidthLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto = out.File + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc = nil + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes = nil + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.validate.go new file mode 100644 index 0000000000..05a1c18880 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.validate.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto + +package bandwidth_limitv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on BandwidthLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BandwidthLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BandwidthLimit with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BandwidthLimitMultiError, +// or nil if none found. +func (m *BandwidthLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *BandwidthLimit) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := BandwidthLimitValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := BandwidthLimit_EnableMode_name[int32(m.GetEnableMode())]; !ok { + err := BandwidthLimitValidationError{ + field: "EnableMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetLimitKbps(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := BandwidthLimitValidationError{ + field: "LimitKbps", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if d := m.GetFillInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = BandwidthLimitValidationError{ + field: "FillInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + lte := time.Duration(1*time.Second + 0*time.Nanosecond) + gte := time.Duration(0*time.Second + 20000000*time.Nanosecond) + + if dur < gte || dur > lte { + err := BandwidthLimitValidationError{ + field: "FillInterval", + reason: "value must be inside range [20ms, 1s]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BandwidthLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BandwidthLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BandwidthLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for EnableResponseTrailers + + // no validation rules for ResponseTrailerPrefix + + if len(errors) > 0 { + return BandwidthLimitMultiError(errors) + } + + return nil +} + +// BandwidthLimitMultiError is an error wrapping multiple validation errors +// returned by BandwidthLimit.ValidateAll() if the designated constraints +// aren't met. +type BandwidthLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BandwidthLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BandwidthLimitMultiError) AllErrors() []error { return m } + +// BandwidthLimitValidationError is the validation error returned by +// BandwidthLimit.Validate if the designated constraints aren't met. +type BandwidthLimitValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BandwidthLimitValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BandwidthLimitValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BandwidthLimitValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BandwidthLimitValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BandwidthLimitValidationError) ErrorName() string { return "BandwidthLimitValidationError" } + +// Error satisfies the builtin error interface +func (e BandwidthLimitValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBandwidthLimit.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BandwidthLimitValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BandwidthLimitValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.go b/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.go index ff48667956..341e70d525 100644 --- a/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.go +++ b/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/buffer/v3/buffer.proto -package envoy_extensions_filters_http_buffer_v3 +package bufferv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Buffer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -199,12 +194,18 @@ var file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDesc = []byte{ 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x42, 0x4e, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x42, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x01, 0x42, 0xa7, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x42, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.validate.go b/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.validate.go index 02758f85e5..1784e607c1 100644 --- a/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/buffer/v3/buffer.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/buffer/v3/buffer.proto -package envoy_extensions_filters_http_buffer_v3 +package bufferv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Buffer with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Buffer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Buffer with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in BufferMultiError, or nil if none found. +func (m *Buffer) ValidateAll() error { + return m.validate(true) +} + +func (m *Buffer) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMaxRequestBytes(); wrapper != nil { if wrapper.GetValue() <= 0 { - return BufferValidationError{ + err := BufferValidationError{ field: "MaxRequestBytes", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } else { - return BufferValidationError{ + err := BufferValidationError{ field: "MaxRequestBytes", reason: "value is required and must not be nil.", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return BufferMultiError(errors) } return nil } +// BufferMultiError is an error wrapping multiple validation errors returned by +// Buffer.ValidateAll() if the designated constraints aren't met. +type BufferMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferMultiError) AllErrors() []error { return m } + // BufferValidationError is the validation error returned by Buffer.Validate if // the designated constraints aren't met. type BufferValidationError struct { @@ -114,34 +158,75 @@ var _ interface { } = BufferValidationError{} // Validate checks the field values on BufferPerRoute with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BufferPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferPerRoute with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BufferPerRouteMultiError, +// or nil if none found. +func (m *BufferPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Override.(type) { case *BufferPerRoute_Disabled: if m.GetDisabled() != true { - return BufferPerRouteValidationError{ + err := BufferPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *BufferPerRoute_Buffer: if m.GetBuffer() == nil { - return BufferPerRouteValidationError{ + err := BufferPerRouteValidationError{ field: "Buffer", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBuffer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferPerRouteValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferPerRouteValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BufferPerRouteValidationError{ field: "Buffer", @@ -152,16 +237,41 @@ func (m *BufferPerRoute) Validate() error { } default: - return BufferPerRouteValidationError{ + err := BufferPerRouteValidationError{ field: "Override", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return BufferPerRouteMultiError(errors) } return nil } +// BufferPerRouteMultiError is an error wrapping multiple validation errors +// returned by BufferPerRoute.ValidateAll() if the designated constraints +// aren't met. +type BufferPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferPerRouteMultiError) AllErrors() []error { return m } + // BufferPerRouteValidationError is the validation error returned by // BufferPerRoute.Validate if the designated constraints aren't met. type BufferPerRouteValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/cache/v3/cache.pb.go b/pkg/api/envoy/extensions/filters/http/cache/v3/cache.pb.go new file mode 100644 index 0000000000..151cbcf78c --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/cache/v3/cache.pb.go @@ -0,0 +1,371 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/cache/v3/cache.proto + +package cachev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + any "github.com/golang/protobuf/ptypes/any" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#extension: envoy.filters.http.cache] +type CacheConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Config specific to the cache storage implementation. + // [#extension-category: envoy.filters.http.cache] + TypedConfig *any.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + // List of matching rules that defines allowed *Vary* headers. + // + // The *vary* response header holds a list of header names that affect the + // contents of a response, as described by + // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. + // + // During insertion, *allowed_vary_headers* acts as a allowlist: if a + // response's *vary* header mentions any header names that aren't matched by any rules in + // *allowed_vary_headers*, that response will not be cached. + // + // During lookup, *allowed_vary_headers* controls what request headers will be + // sent to the cache storage implementation. + AllowedVaryHeaders []*v3.StringMatcher `protobuf:"bytes,2,rep,name=allowed_vary_headers,json=allowedVaryHeaders,proto3" json:"allowed_vary_headers,omitempty"` + // [#not-implemented-hide:] + // + // + // Modifies cache key creation by restricting which parts of the URL are included. + KeyCreatorParams *CacheConfig_KeyCreatorParams `protobuf:"bytes,3,opt,name=key_creator_params,json=keyCreatorParams,proto3" json:"key_creator_params,omitempty"` + // [#not-implemented-hide:] + // + // + // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache + // storage implementation may have its own limit beyond which it will reject insertions). + MaxBodyBytes uint32 `protobuf:"varint,4,opt,name=max_body_bytes,json=maxBodyBytes,proto3" json:"max_body_bytes,omitempty"` +} + +func (x *CacheConfig) Reset() { + *x = CacheConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheConfig) ProtoMessage() {} + +func (x *CacheConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheConfig.ProtoReflect.Descriptor instead. +func (*CacheConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescGZIP(), []int{0} +} + +func (x *CacheConfig) GetTypedConfig() *any.Any { + if x != nil { + return x.TypedConfig + } + return nil +} + +func (x *CacheConfig) GetAllowedVaryHeaders() []*v3.StringMatcher { + if x != nil { + return x.AllowedVaryHeaders + } + return nil +} + +func (x *CacheConfig) GetKeyCreatorParams() *CacheConfig_KeyCreatorParams { + if x != nil { + return x.KeyCreatorParams + } + return nil +} + +func (x *CacheConfig) GetMaxBodyBytes() uint32 { + if x != nil { + return x.MaxBodyBytes + } + return 0 +} + +// [#not-implemented-hide:] +// Modifies cache key creation by restricting which parts of the URL are included. +type CacheConfig_KeyCreatorParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, exclude the URL scheme from the cache key. Set to true if your origins always + // produce the same response for http and https requests. + ExcludeScheme bool `protobuf:"varint,1,opt,name=exclude_scheme,json=excludeScheme,proto3" json:"exclude_scheme,omitempty"` + // If true, exclude the host from the cache key. Set to true if your origins' responses don't + // ever depend on host. + ExcludeHost bool `protobuf:"varint,2,opt,name=exclude_host,json=excludeHost,proto3" json:"exclude_host,omitempty"` + // If *query_parameters_included* is nonempty, only query parameters matched + // by one or more of its matchers are included in the cache key. Any other + // query params will not affect cache lookup. + QueryParametersIncluded []*v31.QueryParameterMatcher `protobuf:"bytes,3,rep,name=query_parameters_included,json=queryParametersIncluded,proto3" json:"query_parameters_included,omitempty"` + // If *query_parameters_excluded* is nonempty, query parameters matched by one + // or more of its matchers are excluded from the cache key (even if also + // matched by *query_parameters_included*), and will not affect cache lookup. + QueryParametersExcluded []*v31.QueryParameterMatcher `protobuf:"bytes,4,rep,name=query_parameters_excluded,json=queryParametersExcluded,proto3" json:"query_parameters_excluded,omitempty"` +} + +func (x *CacheConfig_KeyCreatorParams) Reset() { + *x = CacheConfig_KeyCreatorParams{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheConfig_KeyCreatorParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheConfig_KeyCreatorParams) ProtoMessage() {} + +func (x *CacheConfig_KeyCreatorParams) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheConfig_KeyCreatorParams.ProtoReflect.Descriptor instead. +func (*CacheConfig_KeyCreatorParams) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *CacheConfig_KeyCreatorParams) GetExcludeScheme() bool { + if x != nil { + return x.ExcludeScheme + } + return false +} + +func (x *CacheConfig_KeyCreatorParams) GetExcludeHost() bool { + if x != nil { + return x.ExcludeHost + } + return false +} + +func (x *CacheConfig_KeyCreatorParams) GetQueryParametersIncluded() []*v31.QueryParameterMatcher { + if x != nil { + return x.QueryParametersIncluded + } + return nil +} + +func (x *CacheConfig_KeyCreatorParams) GetQueryParametersExcluded() []*v31.QueryParameterMatcher { + if x != nil { + return x.QueryParametersExcluded + } + return nil +} + +var File_envoy_extensions_filters_http_cache_v3_cache_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x2c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x05, 0x0a, 0x0b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x56, 0x61, 0x72, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x72, 0x0a, 0x12, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x10, 0x6b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, + 0x42, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0xfc, 0x02, 0x0a, 0x10, 0x4b, 0x65, + 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x12, 0x68, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x3a, 0x4a, 0x9a, 0xc5, + 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, + 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0xa3, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData = file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc +) + +func file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData +} + +var file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes = []interface{}{ + (*CacheConfig)(nil), // 0: envoy.extensions.filters.http.cache.v3.CacheConfig + (*CacheConfig_KeyCreatorParams)(nil), // 1: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams + (*any.Any)(nil), // 2: google.protobuf.Any + (*v3.StringMatcher)(nil), // 3: envoy.type.matcher.v3.StringMatcher + (*v31.QueryParameterMatcher)(nil), // 4: envoy.config.route.v3.QueryParameterMatcher +} +var file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.cache.v3.CacheConfig.typed_config:type_name -> google.protobuf.Any + 3, // 1: envoy.extensions.filters.http.cache.v3.CacheConfig.allowed_vary_headers:type_name -> envoy.type.matcher.v3.StringMatcher + 1, // 2: envoy.extensions.filters.http.cache.v3.CacheConfig.key_creator_params:type_name -> envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams + 4, // 3: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams.query_parameters_included:type_name -> envoy.config.route.v3.QueryParameterMatcher + 4, // 4: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams.query_parameters_excluded:type_name -> envoy.config.route.v3.QueryParameterMatcher + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_cache_v3_cache_proto_init() } +func file_envoy_extensions_filters_http_cache_v3_cache_proto_init() { + if File_envoy_extensions_filters_http_cache_v3_cache_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheConfig_KeyCreatorParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_cache_v3_cache_proto = out.File + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc = nil + file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes = nil + file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/cache/v3/cache.pb.validate.go b/pkg/api/envoy/extensions/filters/http/cache/v3/cache.pb.validate.go new file mode 100644 index 0000000000..2f5408e461 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/cache/v3/cache.pb.validate.go @@ -0,0 +1,390 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/cache/v3/cache.proto + +package cachev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CacheConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *CacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CacheConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CacheConfigMultiError, or +// nil if none found. +func (m *CacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CacheConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetTypedConfig() == nil { + err := CacheConfigValidationError{ + field: "TypedConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if a := m.GetTypedConfig(); a != nil { + + } + + for idx, item := range m.GetAllowedVaryHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetKeyCreatorParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeyCreatorParams()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for MaxBodyBytes + + if len(errors) > 0 { + return CacheConfigMultiError(errors) + } + + return nil +} + +// CacheConfigMultiError is an error wrapping multiple validation errors +// returned by CacheConfig.ValidateAll() if the designated constraints aren't met. +type CacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CacheConfigMultiError) AllErrors() []error { return m } + +// CacheConfigValidationError is the validation error returned by +// CacheConfig.Validate if the designated constraints aren't met. +type CacheConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CacheConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CacheConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CacheConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CacheConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CacheConfigValidationError) ErrorName() string { return "CacheConfigValidationError" } + +// Error satisfies the builtin error interface +func (e CacheConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCacheConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CacheConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CacheConfigValidationError{} + +// Validate checks the field values on CacheConfig_KeyCreatorParams with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CacheConfig_KeyCreatorParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CacheConfig_KeyCreatorParams with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CacheConfig_KeyCreatorParamsMultiError, or nil if none found. +func (m *CacheConfig_KeyCreatorParams) ValidateAll() error { + return m.validate(true) +} + +func (m *CacheConfig_KeyCreatorParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ExcludeScheme + + // no validation rules for ExcludeHost + + for idx, item := range m.GetQueryParametersIncluded() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetQueryParametersExcluded() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CacheConfig_KeyCreatorParamsMultiError(errors) + } + + return nil +} + +// CacheConfig_KeyCreatorParamsMultiError is an error wrapping multiple +// validation errors returned by CacheConfig_KeyCreatorParams.ValidateAll() if +// the designated constraints aren't met. +type CacheConfig_KeyCreatorParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CacheConfig_KeyCreatorParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CacheConfig_KeyCreatorParamsMultiError) AllErrors() []error { return m } + +// CacheConfig_KeyCreatorParamsValidationError is the validation error returned +// by CacheConfig_KeyCreatorParams.Validate if the designated constraints +// aren't met. +type CacheConfig_KeyCreatorParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CacheConfig_KeyCreatorParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CacheConfig_KeyCreatorParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CacheConfig_KeyCreatorParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CacheConfig_KeyCreatorParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CacheConfig_KeyCreatorParamsValidationError) ErrorName() string { + return "CacheConfig_KeyCreatorParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e CacheConfig_KeyCreatorParamsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCacheConfig_KeyCreatorParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CacheConfig_KeyCreatorParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CacheConfig_KeyCreatorParamsValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/cache/v3alpha/cache.pb.go b/pkg/api/envoy/extensions/filters/http/cache/v3alpha/cache.pb.go deleted file mode 100644 index e8c7693a02..0000000000 --- a/pkg/api/envoy/extensions/filters/http/cache/v3alpha/cache.pb.go +++ /dev/null @@ -1,370 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/cache/v3alpha/cache.proto - -package envoy_extensions_filters_http_cache_v3alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type CacheConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Config specific to the cache storage implementation. - TypedConfig *any.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` - // List of matching rules that defines allowed *Vary* headers. - // - // The *vary* response header holds a list of header names that affect the - // contents of a response, as described by - // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. - // - // During insertion, *allowed_vary_headers* acts as a allowlist: if a - // response's *vary* header mentions any header names that aren't matched by any rules in - // *allowed_vary_headers*, that response will not be cached. - // - // During lookup, *allowed_vary_headers* controls what request headers will be - // sent to the cache storage implementation. - AllowedVaryHeaders []*v3.StringMatcher `protobuf:"bytes,2,rep,name=allowed_vary_headers,json=allowedVaryHeaders,proto3" json:"allowed_vary_headers,omitempty"` - // [#not-implemented-hide:] - // - // - // Modifies cache key creation by restricting which parts of the URL are included. - KeyCreatorParams *CacheConfig_KeyCreatorParams `protobuf:"bytes,3,opt,name=key_creator_params,json=keyCreatorParams,proto3" json:"key_creator_params,omitempty"` - // [#not-implemented-hide:] - // - // - // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache - // storage implementation may have its own limit beyond which it will reject insertions). - MaxBodyBytes uint32 `protobuf:"varint,4,opt,name=max_body_bytes,json=maxBodyBytes,proto3" json:"max_body_bytes,omitempty"` -} - -func (x *CacheConfig) Reset() { - *x = CacheConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CacheConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CacheConfig) ProtoMessage() {} - -func (x *CacheConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CacheConfig.ProtoReflect.Descriptor instead. -func (*CacheConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescGZIP(), []int{0} -} - -func (x *CacheConfig) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -func (x *CacheConfig) GetAllowedVaryHeaders() []*v3.StringMatcher { - if x != nil { - return x.AllowedVaryHeaders - } - return nil -} - -func (x *CacheConfig) GetKeyCreatorParams() *CacheConfig_KeyCreatorParams { - if x != nil { - return x.KeyCreatorParams - } - return nil -} - -func (x *CacheConfig) GetMaxBodyBytes() uint32 { - if x != nil { - return x.MaxBodyBytes - } - return 0 -} - -// [#not-implemented-hide:] -// Modifies cache key creation by restricting which parts of the URL are included. -type CacheConfig_KeyCreatorParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If true, exclude the URL scheme from the cache key. Set to true if your origins always - // produce the same response for http and https requests. - ExcludeScheme bool `protobuf:"varint,1,opt,name=exclude_scheme,json=excludeScheme,proto3" json:"exclude_scheme,omitempty"` - // If true, exclude the host from the cache key. Set to true if your origins' responses don't - // ever depend on host. - ExcludeHost bool `protobuf:"varint,2,opt,name=exclude_host,json=excludeHost,proto3" json:"exclude_host,omitempty"` - // If *query_parameters_included* is nonempty, only query parameters matched - // by one or more of its matchers are included in the cache key. Any other - // query params will not affect cache lookup. - QueryParametersIncluded []*v31.QueryParameterMatcher `protobuf:"bytes,3,rep,name=query_parameters_included,json=queryParametersIncluded,proto3" json:"query_parameters_included,omitempty"` - // If *query_parameters_excluded* is nonempty, query parameters matched by one - // or more of its matchers are excluded from the cache key (even if also - // matched by *query_parameters_included*), and will not affect cache lookup. - QueryParametersExcluded []*v31.QueryParameterMatcher `protobuf:"bytes,4,rep,name=query_parameters_excluded,json=queryParametersExcluded,proto3" json:"query_parameters_excluded,omitempty"` -} - -func (x *CacheConfig_KeyCreatorParams) Reset() { - *x = CacheConfig_KeyCreatorParams{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CacheConfig_KeyCreatorParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CacheConfig_KeyCreatorParams) ProtoMessage() {} - -func (x *CacheConfig_KeyCreatorParams) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CacheConfig_KeyCreatorParams.ProtoReflect.Descriptor instead. -func (*CacheConfig_KeyCreatorParams) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *CacheConfig_KeyCreatorParams) GetExcludeScheme() bool { - if x != nil { - return x.ExcludeScheme - } - return false -} - -func (x *CacheConfig_KeyCreatorParams) GetExcludeHost() bool { - if x != nil { - return x.ExcludeHost - } - return false -} - -func (x *CacheConfig_KeyCreatorParams) GetQueryParametersIncluded() []*v31.QueryParameterMatcher { - if x != nil { - return x.QueryParametersIncluded - } - return nil -} - -func (x *CacheConfig_KeyCreatorParams) GetQueryParametersExcluded() []*v31.QueryParameterMatcher { - if x != nil { - return x.QueryParametersExcluded - } - return nil -} - -var File_envoy_extensions_filters_http_cache_v3alpha_cache_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, - 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, - 0x06, 0x0a, 0x0b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x56, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x72, - 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x56, 0x61, - 0x72, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x12, 0x6b, 0x65, 0x79, - 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x10, 0x6b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, - 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0xfc, 0x02, 0x0a, 0x10, 0x4b, 0x65, 0x79, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x64, 0x12, 0x68, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, - 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, - 0x68, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x59, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x0a, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescData = file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDesc -) - -func file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDescData -} - -var file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_goTypes = []interface{}{ - (*CacheConfig)(nil), // 0: envoy.extensions.filters.http.cache.v3alpha.CacheConfig - (*CacheConfig_KeyCreatorParams)(nil), // 1: envoy.extensions.filters.http.cache.v3alpha.CacheConfig.KeyCreatorParams - (*any.Any)(nil), // 2: google.protobuf.Any - (*v3.StringMatcher)(nil), // 3: envoy.type.matcher.v3.StringMatcher - (*v31.QueryParameterMatcher)(nil), // 4: envoy.config.route.v3.QueryParameterMatcher -} -var file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.filters.http.cache.v3alpha.CacheConfig.typed_config:type_name -> google.protobuf.Any - 3, // 1: envoy.extensions.filters.http.cache.v3alpha.CacheConfig.allowed_vary_headers:type_name -> envoy.type.matcher.v3.StringMatcher - 1, // 2: envoy.extensions.filters.http.cache.v3alpha.CacheConfig.key_creator_params:type_name -> envoy.extensions.filters.http.cache.v3alpha.CacheConfig.KeyCreatorParams - 4, // 3: envoy.extensions.filters.http.cache.v3alpha.CacheConfig.KeyCreatorParams.query_parameters_included:type_name -> envoy.config.route.v3.QueryParameterMatcher - 4, // 4: envoy.extensions.filters.http.cache.v3alpha.CacheConfig.KeyCreatorParams.query_parameters_excluded:type_name -> envoy.config.route.v3.QueryParameterMatcher - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_init() } -func file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_init() { - if File_envoy_extensions_filters_http_cache_v3alpha_cache_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CacheConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CacheConfig_KeyCreatorParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_cache_v3alpha_cache_proto = out.File - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_rawDesc = nil - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_goTypes = nil - file_envoy_extensions_filters_http_cache_v3alpha_cache_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/cache/v3alpha/cache.pb.validate.go b/pkg/api/envoy/extensions/filters/http/cache/v3alpha/cache.pb.validate.go deleted file mode 100644 index 535e864466..0000000000 --- a/pkg/api/envoy/extensions/filters/http/cache/v3alpha/cache.pb.validate.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/cache/v3alpha/cache.proto - -package envoy_extensions_filters_http_cache_v3alpha - -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{} -) - -// Validate checks the field values on CacheConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *CacheConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetTypedConfig() == nil { - return CacheConfigValidationError{ - field: "TypedConfig", - reason: "value is required", - } - } - - if a := m.GetTypedConfig(); a != nil { - - } - - for idx, item := range m.GetAllowedVaryHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfigValidationError{ - field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetKeyCreatorParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfigValidationError{ - field: "KeyCreatorParams", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for MaxBodyBytes - - return nil -} - -// CacheConfigValidationError is the validation error returned by -// CacheConfig.Validate if the designated constraints aren't met. -type CacheConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CacheConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CacheConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CacheConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CacheConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CacheConfigValidationError) ErrorName() string { return "CacheConfigValidationError" } - -// Error satisfies the builtin error interface -func (e CacheConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCacheConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CacheConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CacheConfigValidationError{} - -// Validate checks the field values on CacheConfig_KeyCreatorParams with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CacheConfig_KeyCreatorParams) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ExcludeScheme - - // no validation rules for ExcludeHost - - for idx, item := range m.GetQueryParametersIncluded() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfig_KeyCreatorParamsValidationError{ - field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetQueryParametersExcluded() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfig_KeyCreatorParamsValidationError{ - field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// CacheConfig_KeyCreatorParamsValidationError is the validation error returned -// by CacheConfig_KeyCreatorParams.Validate if the designated constraints -// aren't met. -type CacheConfig_KeyCreatorParamsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CacheConfig_KeyCreatorParamsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CacheConfig_KeyCreatorParamsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CacheConfig_KeyCreatorParamsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CacheConfig_KeyCreatorParamsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CacheConfig_KeyCreatorParamsValidationError) ErrorName() string { - return "CacheConfig_KeyCreatorParamsValidationError" -} - -// Error satisfies the builtin error interface -func (e CacheConfig_KeyCreatorParamsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCacheConfig_KeyCreatorParams.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CacheConfig_KeyCreatorParamsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CacheConfig_KeyCreatorParamsValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/cache/v4alpha/cache.pb.go b/pkg/api/envoy/extensions/filters/http/cache/v4alpha/cache.pb.go deleted file mode 100644 index 19f0d0193e..0000000000 --- a/pkg/api/envoy/extensions/filters/http/cache/v4alpha/cache.pb.go +++ /dev/null @@ -1,372 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/cache/v4alpha/cache.proto - -package envoy_extensions_filters_http_cache_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type CacheConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Config specific to the cache storage implementation. - TypedConfig *any.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` - // List of matching rules that defines allowed *Vary* headers. - // - // The *vary* response header holds a list of header names that affect the - // contents of a response, as described by - // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. - // - // During insertion, *allowed_vary_headers* acts as a allowlist: if a - // response's *vary* header mentions any header names that aren't matched by any rules in - // *allowed_vary_headers*, that response will not be cached. - // - // During lookup, *allowed_vary_headers* controls what request headers will be - // sent to the cache storage implementation. - AllowedVaryHeaders []*v4alpha.StringMatcher `protobuf:"bytes,2,rep,name=allowed_vary_headers,json=allowedVaryHeaders,proto3" json:"allowed_vary_headers,omitempty"` - // [#not-implemented-hide:] - // - // - // Modifies cache key creation by restricting which parts of the URL are included. - KeyCreatorParams *CacheConfig_KeyCreatorParams `protobuf:"bytes,3,opt,name=key_creator_params,json=keyCreatorParams,proto3" json:"key_creator_params,omitempty"` - // [#not-implemented-hide:] - // - // - // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache - // storage implementation may have its own limit beyond which it will reject insertions). - MaxBodyBytes uint32 `protobuf:"varint,4,opt,name=max_body_bytes,json=maxBodyBytes,proto3" json:"max_body_bytes,omitempty"` -} - -func (x *CacheConfig) Reset() { - *x = CacheConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CacheConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CacheConfig) ProtoMessage() {} - -func (x *CacheConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CacheConfig.ProtoReflect.Descriptor instead. -func (*CacheConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescGZIP(), []int{0} -} - -func (x *CacheConfig) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -func (x *CacheConfig) GetAllowedVaryHeaders() []*v4alpha.StringMatcher { - if x != nil { - return x.AllowedVaryHeaders - } - return nil -} - -func (x *CacheConfig) GetKeyCreatorParams() *CacheConfig_KeyCreatorParams { - if x != nil { - return x.KeyCreatorParams - } - return nil -} - -func (x *CacheConfig) GetMaxBodyBytes() uint32 { - if x != nil { - return x.MaxBodyBytes - } - return 0 -} - -// [#not-implemented-hide:] -// Modifies cache key creation by restricting which parts of the URL are included. -type CacheConfig_KeyCreatorParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If true, exclude the URL scheme from the cache key. Set to true if your origins always - // produce the same response for http and https requests. - ExcludeScheme bool `protobuf:"varint,1,opt,name=exclude_scheme,json=excludeScheme,proto3" json:"exclude_scheme,omitempty"` - // If true, exclude the host from the cache key. Set to true if your origins' responses don't - // ever depend on host. - ExcludeHost bool `protobuf:"varint,2,opt,name=exclude_host,json=excludeHost,proto3" json:"exclude_host,omitempty"` - // If *query_parameters_included* is nonempty, only query parameters matched - // by one or more of its matchers are included in the cache key. Any other - // query params will not affect cache lookup. - QueryParametersIncluded []*v4alpha1.QueryParameterMatcher `protobuf:"bytes,3,rep,name=query_parameters_included,json=queryParametersIncluded,proto3" json:"query_parameters_included,omitempty"` - // If *query_parameters_excluded* is nonempty, query parameters matched by one - // or more of its matchers are excluded from the cache key (even if also - // matched by *query_parameters_included*), and will not affect cache lookup. - QueryParametersExcluded []*v4alpha1.QueryParameterMatcher `protobuf:"bytes,4,rep,name=query_parameters_excluded,json=queryParametersExcluded,proto3" json:"query_parameters_excluded,omitempty"` -} - -func (x *CacheConfig_KeyCreatorParams) Reset() { - *x = CacheConfig_KeyCreatorParams{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CacheConfig_KeyCreatorParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CacheConfig_KeyCreatorParams) ProtoMessage() {} - -func (x *CacheConfig_KeyCreatorParams) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CacheConfig_KeyCreatorParams.ProtoReflect.Descriptor instead. -func (*CacheConfig_KeyCreatorParams) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *CacheConfig_KeyCreatorParams) GetExcludeScheme() bool { - if x != nil { - return x.ExcludeScheme - } - return false -} - -func (x *CacheConfig_KeyCreatorParams) GetExcludeHost() bool { - if x != nil { - return x.ExcludeHost - } - return false -} - -func (x *CacheConfig_KeyCreatorParams) GetQueryParametersIncluded() []*v4alpha1.QueryParameterMatcher { - if x != nil { - return x.QueryParametersIncluded - } - return nil -} - -func (x *CacheConfig_KeyCreatorParams) GetQueryParametersExcluded() []*v4alpha1.QueryParameterMatcher { - if x != nil { - return x.QueryParametersExcluded - } - return nil -} - -var File_envoy_extensions_filters_http_cache_v4alpha_cache_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x06, 0x0a, 0x0b, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x14, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x56, 0x61, 0x72, - 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x12, 0x6b, 0x65, 0x79, 0x5f, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, - 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x10, 0x6b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x6f, - 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x8b, 0x03, 0x0a, 0x10, 0x4b, 0x65, 0x79, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, - 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x6d, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x64, 0x12, 0x6d, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x64, 0x3a, 0x4f, 0x9a, 0xc5, 0x88, 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, - 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x59, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x0a, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescData = file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDesc -) - -func file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDescData -} - -var file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_goTypes = []interface{}{ - (*CacheConfig)(nil), // 0: envoy.extensions.filters.http.cache.v4alpha.CacheConfig - (*CacheConfig_KeyCreatorParams)(nil), // 1: envoy.extensions.filters.http.cache.v4alpha.CacheConfig.KeyCreatorParams - (*any.Any)(nil), // 2: google.protobuf.Any - (*v4alpha.StringMatcher)(nil), // 3: envoy.type.matcher.v4alpha.StringMatcher - (*v4alpha1.QueryParameterMatcher)(nil), // 4: envoy.config.route.v4alpha.QueryParameterMatcher -} -var file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.filters.http.cache.v4alpha.CacheConfig.typed_config:type_name -> google.protobuf.Any - 3, // 1: envoy.extensions.filters.http.cache.v4alpha.CacheConfig.allowed_vary_headers:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 1, // 2: envoy.extensions.filters.http.cache.v4alpha.CacheConfig.key_creator_params:type_name -> envoy.extensions.filters.http.cache.v4alpha.CacheConfig.KeyCreatorParams - 4, // 3: envoy.extensions.filters.http.cache.v4alpha.CacheConfig.KeyCreatorParams.query_parameters_included:type_name -> envoy.config.route.v4alpha.QueryParameterMatcher - 4, // 4: envoy.extensions.filters.http.cache.v4alpha.CacheConfig.KeyCreatorParams.query_parameters_excluded:type_name -> envoy.config.route.v4alpha.QueryParameterMatcher - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_init() } -func file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_init() { - if File_envoy_extensions_filters_http_cache_v4alpha_cache_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CacheConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CacheConfig_KeyCreatorParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_cache_v4alpha_cache_proto = out.File - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_rawDesc = nil - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_goTypes = nil - file_envoy_extensions_filters_http_cache_v4alpha_cache_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/cache/v4alpha/cache.pb.validate.go b/pkg/api/envoy/extensions/filters/http/cache/v4alpha/cache.pb.validate.go deleted file mode 100644 index 5fb7d967ea..0000000000 --- a/pkg/api/envoy/extensions/filters/http/cache/v4alpha/cache.pb.validate.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/cache/v4alpha/cache.proto - -package envoy_extensions_filters_http_cache_v4alpha - -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{} -) - -// Validate checks the field values on CacheConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *CacheConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetTypedConfig() == nil { - return CacheConfigValidationError{ - field: "TypedConfig", - reason: "value is required", - } - } - - if a := m.GetTypedConfig(); a != nil { - - } - - for idx, item := range m.GetAllowedVaryHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfigValidationError{ - field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetKeyCreatorParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfigValidationError{ - field: "KeyCreatorParams", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for MaxBodyBytes - - return nil -} - -// CacheConfigValidationError is the validation error returned by -// CacheConfig.Validate if the designated constraints aren't met. -type CacheConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CacheConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CacheConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CacheConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CacheConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CacheConfigValidationError) ErrorName() string { return "CacheConfigValidationError" } - -// Error satisfies the builtin error interface -func (e CacheConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCacheConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CacheConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CacheConfigValidationError{} - -// Validate checks the field values on CacheConfig_KeyCreatorParams with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CacheConfig_KeyCreatorParams) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ExcludeScheme - - // no validation rules for ExcludeHost - - for idx, item := range m.GetQueryParametersIncluded() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfig_KeyCreatorParamsValidationError{ - field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetQueryParametersExcluded() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CacheConfig_KeyCreatorParamsValidationError{ - field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// CacheConfig_KeyCreatorParamsValidationError is the validation error returned -// by CacheConfig_KeyCreatorParams.Validate if the designated constraints -// aren't met. -type CacheConfig_KeyCreatorParamsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CacheConfig_KeyCreatorParamsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CacheConfig_KeyCreatorParamsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CacheConfig_KeyCreatorParamsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CacheConfig_KeyCreatorParamsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CacheConfig_KeyCreatorParamsValidationError) ErrorName() string { - return "CacheConfig_KeyCreatorParamsValidationError" -} - -// Error satisfies the builtin error interface -func (e CacheConfig_KeyCreatorParamsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCacheConfig_KeyCreatorParams.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CacheConfig_KeyCreatorParamsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CacheConfig_KeyCreatorParamsValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.go b/pkg/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.go new file mode 100644 index 0000000000..c0bb90b4a6 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.go @@ -0,0 +1,189 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto + +package cdn_loopv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// CDN-Loop Header filter config. See the :ref:`configuration overview +// ` for more information. +type CdnLoopConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The CDN identifier to use for loop checks and to append to the + // CDN-Loop header. + // + // RFC 8586 calls this the cdn-id. The cdn-id can either be a + // pseudonym or hostname the CDN is in control of. + // + // cdn_id must not be empty. + CdnId string `protobuf:"bytes,1,opt,name=cdn_id,json=cdnId,proto3" json:"cdn_id,omitempty"` + // The maximum allowed count of cdn_id in the downstream CDN-Loop + // request header. + // + // The default of 0 means a request can transit the CdnLoopFilter + // once. A value of 1 means that a request can transit the + // CdnLoopFilter twice and so on. + MaxAllowedOccurrences uint32 `protobuf:"varint,2,opt,name=max_allowed_occurrences,json=maxAllowedOccurrences,proto3" json:"max_allowed_occurrences,omitempty"` +} + +func (x *CdnLoopConfig) Reset() { + *x = CdnLoopConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CdnLoopConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CdnLoopConfig) ProtoMessage() {} + +func (x *CdnLoopConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CdnLoopConfig.ProtoReflect.Descriptor instead. +func (*CdnLoopConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescGZIP(), []int{0} +} + +func (x *CdnLoopConfig) GetCdnId() string { + if x != nil { + return x.CdnId + } + return "" +} + +func (x *CdnLoopConfig) GetMaxAllowedOccurrences() uint32 { + if x != nil { + return x.MaxAllowedOccurrences + } + return 0 +} + +var File_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x64, 0x6e, 0x5f, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, + 0x0d, 0x43, 0x64, 0x6e, 0x4c, 0x6f, 0x6f, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, + 0x0a, 0x06, 0x63, 0x64, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x64, 0x6e, 0x49, 0x64, 0x12, 0x36, + 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6f, 0x63, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x15, 0x6d, 0x61, 0x78, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4f, 0x63, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0xae, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x76, 0x33, 0x42, 0x0c, 0x43, 0x64, 0x6e, 0x4c, 0x6f, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, + 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData = file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc +) + +func file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData +} + +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_goTypes = []interface{}{ + (*CdnLoopConfig)(nil), // 0: envoy.extensions.filters.http.cdn_loop.v3.CdnLoopConfig +} +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_init() } +func file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_init() { + if File_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CdnLoopConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto = out.File + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc = nil + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_goTypes = nil + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.pb.validate.go b/pkg/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.validate.go similarity index 60% rename from pkg/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.pb.validate.go rename to pkg/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.validate.go index 824769c845..4d96404c37 100644 --- a/pkg/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.proto +// source: envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto -package envoy_extensions_filters_http_cdn_loop_v3alpha +package cdn_loopv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,69 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CdnLoopConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CdnLoopConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CdnLoopConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CdnLoopConfigMultiError, or +// nil if none found. +func (m *CdnLoopConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CdnLoopConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCdnId()) < 1 { - return CdnLoopConfigValidationError{ + err := CdnLoopConfigValidationError{ field: "CdnId", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for MaxAllowedOccurrences + if len(errors) > 0 { + return CdnLoopConfigMultiError(errors) + } + return nil } +// CdnLoopConfigMultiError is an error wrapping multiple validation errors +// returned by CdnLoopConfig.ValidateAll() if the designated constraints +// aren't met. +type CdnLoopConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CdnLoopConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CdnLoopConfigMultiError) AllErrors() []error { return m } + // CdnLoopConfigValidationError is the validation error returned by // CdnLoopConfig.Validate if the designated constraints aren't met. type CdnLoopConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.pb.go b/pkg/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.pb.go deleted file mode 100644 index 78427c0738..0000000000 --- a/pkg/api/envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.pb.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/cdn_loop/v3alpha/cdn_loop.proto - -package envoy_extensions_filters_http_cdn_loop_v3alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// CDN-Loop Header filter config. See the :ref:`configuration overview -// ` for more information. -type CdnLoopConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The CDN identifier to use for loop checks and to append to the - // CDN-Loop header. - // - // RFC 8586 calls this the cdn-id. The cdn-id can either be a - // pseudonym or hostname the CDN is in control of. - // - // cdn_id must not be empty. - CdnId string `protobuf:"bytes,1,opt,name=cdn_id,json=cdnId,proto3" json:"cdn_id,omitempty"` - // The maximum allowed count of cdn_id in the downstream CDN-Loop - // request header. - // - // The default of 0 means a request can transit the CdnLoopFilter - // once. A value of 1 means that a request can transit the - // CdnLoopFilter twice and so on. - MaxAllowedOccurrences uint32 `protobuf:"varint,2,opt,name=max_allowed_occurrences,json=maxAllowedOccurrences,proto3" json:"max_allowed_occurrences,omitempty"` -} - -func (x *CdnLoopConfig) Reset() { - *x = CdnLoopConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CdnLoopConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CdnLoopConfig) ProtoMessage() {} - -func (x *CdnLoopConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CdnLoopConfig.ProtoReflect.Descriptor instead. -func (*CdnLoopConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescGZIP(), []int{0} -} - -func (x *CdnLoopConfig) GetCdnId() string { - if x != nil { - return x.CdnId - } - return "" -} - -func (x *CdnLoopConfig) GetMaxAllowedOccurrences() uint32 { - if x != nil { - return x.MaxAllowedOccurrences - } - return 0 -} - -var File_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDesc = []byte{ - 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, - 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x0d, 0x43, 0x64, - 0x6e, 0x4c, 0x6f, 0x6f, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x06, 0x63, - 0x64, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x64, 0x6e, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x6d, - 0x61, 0x78, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6f, 0x63, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6d, 0x61, - 0x78, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x42, 0x5e, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0c, 0x43, 0x64, 0x6e, 0x4c, 0x6f, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescData = file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDesc -) - -func file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDescData -} - -var file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_goTypes = []interface{}{ - (*CdnLoopConfig)(nil), // 0: envoy.extensions.filters.http.cdn_loop.v3alpha.CdnLoopConfig -} -var file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_init() } -func file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_init() { - if File_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CdnLoopConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto = out.File - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_rawDesc = nil - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_goTypes = nil - file_envoy_extensions_filters_http_cdn_loop_v3alpha_cdn_loop_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/composite/v3/composite.pb.go b/pkg/api/envoy/extensions/filters/http/composite/v3/composite.pb.go new file mode 100644 index 0000000000..ee90c19b7a --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/composite/v3/composite.pb.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/composite/v3/composite.proto + +package compositev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// :ref:`Composite filter ` config. The composite filter config +// allows delegating filter handling to another filter as determined by matching on the request +// headers. This makes it possible to use different filters or filter configurations based on the +// incoming request. +// +// This is intended to be used with +// :ref:`ExtensionWithMatcher ` +// where a match tree is specified that indicates (via +// :ref:`ExecuteFilterAction `) +// which filter configuration to create and delegate to. +type Composite struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Composite) Reset() { + *x = Composite{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Composite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Composite) ProtoMessage() {} + +func (x *Composite) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Composite.ProtoReflect.Descriptor instead. +func (*Composite) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescGZIP(), []int{0} +} + +// Composite match action (see :ref:`matching docs ` for more info on match actions). +// This specifies the filter configuration of the filter that the composite filter should delegate filter interactions to. +type ExecuteFilterAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypedConfig *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` +} + +func (x *ExecuteFilterAction) Reset() { + *x = ExecuteFilterAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteFilterAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteFilterAction) ProtoMessage() {} + +func (x *ExecuteFilterAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteFilterAction.ProtoReflect.Descriptor instead. +func (*ExecuteFilterAction) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescGZIP(), []int{1} +} + +func (x *ExecuteFilterAction) GetTypedConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.TypedConfig + } + return nil +} + +var File_envoy_extensions_filters_http_composite_v3_composite_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, + 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, + 0xe1, 0x06, 0x02, 0x08, 0x01, 0x22, 0x64, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x0c, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xb3, 0x01, 0x0a, 0x38, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData = file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc +) + +func file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData +} + +var file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_composite_v3_composite_proto_goTypes = []interface{}{ + (*Composite)(nil), // 0: envoy.extensions.filters.http.composite.v3.Composite + (*ExecuteFilterAction)(nil), // 1: envoy.extensions.filters.http.composite.v3.ExecuteFilterAction + (*v3.TypedExtensionConfig)(nil), // 2: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_http_composite_v3_composite_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.composite.v3.ExecuteFilterAction.typed_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_composite_v3_composite_proto_init() } +func file_envoy_extensions_filters_http_composite_v3_composite_proto_init() { + if File_envoy_extensions_filters_http_composite_v3_composite_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Composite); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecuteFilterAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_composite_v3_composite_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_composite_v3_composite_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_composite_v3_composite_proto = out.File + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc = nil + file_envoy_extensions_filters_http_composite_v3_composite_proto_goTypes = nil + file_envoy_extensions_filters_http_composite_v3_composite_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/composite/v3/composite.pb.validate.go b/pkg/api/envoy/extensions/filters/http/composite/v3/composite.pb.validate.go new file mode 100644 index 0000000000..a02a79bd6d --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/composite/v3/composite.pb.validate.go @@ -0,0 +1,266 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/composite/v3/composite.proto + +package compositev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Composite with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Composite) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Composite with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CompositeMultiError, or nil +// if none found. +func (m *Composite) ValidateAll() error { + return m.validate(true) +} + +func (m *Composite) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return CompositeMultiError(errors) + } + + return nil +} + +// CompositeMultiError is an error wrapping multiple validation errors returned +// by Composite.ValidateAll() if the designated constraints aren't met. +type CompositeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CompositeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CompositeMultiError) AllErrors() []error { return m } + +// CompositeValidationError is the validation error returned by +// Composite.Validate if the designated constraints aren't met. +type CompositeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CompositeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CompositeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CompositeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CompositeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CompositeValidationError) ErrorName() string { return "CompositeValidationError" } + +// Error satisfies the builtin error interface +func (e CompositeValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sComposite.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CompositeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CompositeValidationError{} + +// Validate checks the field values on ExecuteFilterAction with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExecuteFilterAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExecuteFilterAction with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExecuteFilterActionMultiError, or nil if none found. +func (m *ExecuteFilterAction) ValidateAll() error { + return m.validate(true) +} + +func (m *ExecuteFilterAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExecuteFilterActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExecuteFilterActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExecuteFilterActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExecuteFilterActionMultiError(errors) + } + + return nil +} + +// ExecuteFilterActionMultiError is an error wrapping multiple validation +// errors returned by ExecuteFilterAction.ValidateAll() if the designated +// constraints aren't met. +type ExecuteFilterActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExecuteFilterActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExecuteFilterActionMultiError) AllErrors() []error { return m } + +// ExecuteFilterActionValidationError is the validation error returned by +// ExecuteFilterAction.Validate if the designated constraints aren't met. +type ExecuteFilterActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExecuteFilterActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExecuteFilterActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExecuteFilterActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExecuteFilterActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExecuteFilterActionValidationError) ErrorName() string { + return "ExecuteFilterActionValidationError" +} + +// Error satisfies the builtin error interface +func (e ExecuteFilterActionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExecuteFilterAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExecuteFilterActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExecuteFilterActionValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.go b/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.go index 08f19c30e6..74072924af 100644 --- a/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.go +++ b/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/compressor/v3/compressor.proto -package envoy_extensions_filters_http_compressor_v3 +package compressorv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 9] type Compressor struct { state protoimpl.MessageState @@ -69,9 +64,9 @@ type Compressor struct { // Deprecated: Do not use. RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"` // A compressor library to use for compression. Currently only - // :ref:`envoy.compression.gzip.compressor` + // :ref:`envoy.compression.gzip.compressor` // is included in Envoy. - // This field is ignored if used in the context of the gzip http-filter, but is mandatory otherwise. + // [#extension-category: envoy.compression.compressor] CompressorLibrary *v3.TypedExtensionConfig `protobuf:"bytes,6,opt,name=compressor_library,json=compressorLibrary,proto3" json:"compressor_library,omitempty"` // Configuration for request compression. Compression is disabled by default if left empty. RequestDirectionConfig *Compressor_RequestDirectionConfig `protobuf:"bytes,7,opt,name=request_direction_config,json=requestDirectionConfig,proto3" json:"request_direction_config,omitempty"` @@ -391,108 +386,119 @@ var file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDesc = 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x0a, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x12, 0x25, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x74, 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x45, 0x0a, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x1a, 0x72, 0x65, 0x6d, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x9c, 0x0b, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x12, 0x50, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, + 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, + 0x6e, 0x5f, 0x65, 0x74, 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, + 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x1a, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, + 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0xca, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x4a, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x69, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x1a, 0x8c, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, + 0x85, 0x02, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x33, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x74, + 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, - 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x59, - 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x1a, 0xca, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x4a, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, - 0x8c, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x0d, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x85, - 0x02, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x0d, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x42, 0xb7, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, - 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x74, 0x61, - 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, - 0x42, 0x56, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x43, - 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, + 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.validate.go b/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.validate.go index d8cd8ee1dc..7a356d814e 100644 --- a/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/compressor/v3/compressor.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/compressor/v3/compressor.proto -package envoy_extensions_filters_http_compressor_v3 +package compressorv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Compressor with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Compressor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CompressorMultiError, or +// nil if none found. +func (m *Compressor) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetContentLength()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetContentLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetContentLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CompressorValidationError{ field: "ContentLength", @@ -54,7 +90,26 @@ func (m *Compressor) Validate() error { // no validation rules for RemoveAcceptEncodingHeader - if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CompressorValidationError{ field: "RuntimeEnabled", @@ -64,7 +119,37 @@ func (m *Compressor) Validate() error { } } - if v, ok := interface{}(m.GetCompressorLibrary()).(interface{ Validate() error }); ok { + if m.GetCompressorLibrary() == nil { + err := CompressorValidationError{ + field: "CompressorLibrary", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCompressorLibrary()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "CompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "CompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompressorLibrary()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CompressorValidationError{ field: "CompressorLibrary", @@ -74,7 +159,26 @@ func (m *Compressor) Validate() error { } } - if v, ok := interface{}(m.GetRequestDirectionConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestDirectionConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CompressorValidationError{ field: "RequestDirectionConfig", @@ -84,7 +188,26 @@ func (m *Compressor) Validate() error { } } - if v, ok := interface{}(m.GetResponseDirectionConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseDirectionConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CompressorValidationError{ field: "ResponseDirectionConfig", @@ -94,9 +217,29 @@ func (m *Compressor) Validate() error { } } + if len(errors) > 0 { + return CompressorMultiError(errors) + } + return nil } +// CompressorMultiError is an error wrapping multiple validation errors +// returned by Compressor.ValidateAll() if the designated constraints aren't met. +type CompressorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CompressorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CompressorMultiError) AllErrors() []error { return m } + // CompressorValidationError is the validation error returned by // Compressor.Validate if the designated constraints aren't met. type CompressorValidationError struct { @@ -153,13 +296,47 @@ var _ interface { // Validate checks the field values on Compressor_CommonDirectionConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Compressor_CommonDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor_CommonDirectionConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// Compressor_CommonDirectionConfigMultiError, or nil if none found. +func (m *Compressor_CommonDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor_CommonDirectionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Compressor_CommonDirectionConfigValidationError{ field: "Enabled", @@ -169,7 +346,26 @@ func (m *Compressor_CommonDirectionConfig) Validate() error { } } - if v, ok := interface{}(m.GetMinContentLength()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMinContentLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "MinContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "MinContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinContentLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Compressor_CommonDirectionConfigValidationError{ field: "MinContentLength", @@ -179,9 +375,31 @@ func (m *Compressor_CommonDirectionConfig) Validate() error { } } + if len(errors) > 0 { + return Compressor_CommonDirectionConfigMultiError(errors) + } + return nil } +// Compressor_CommonDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Compressor_CommonDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Compressor_CommonDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Compressor_CommonDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Compressor_CommonDirectionConfigMultiError) AllErrors() []error { return m } + // Compressor_CommonDirectionConfigValidationError is the validation error // returned by Compressor_CommonDirectionConfig.Validate if the designated // constraints aren't met. @@ -241,13 +459,47 @@ var _ interface { // Validate checks the field values on Compressor_RequestDirectionConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Compressor_RequestDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor_RequestDirectionConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Compressor_RequestDirectionConfigMultiError, or nil if none found. +func (m *Compressor_RequestDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor_RequestDirectionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Compressor_RequestDirectionConfigValidationError{ field: "CommonConfig", @@ -257,9 +509,31 @@ func (m *Compressor_RequestDirectionConfig) Validate() error { } } + if len(errors) > 0 { + return Compressor_RequestDirectionConfigMultiError(errors) + } + return nil } +// Compressor_RequestDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Compressor_RequestDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Compressor_RequestDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Compressor_RequestDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Compressor_RequestDirectionConfigMultiError) AllErrors() []error { return m } + // Compressor_RequestDirectionConfigValidationError is the validation error // returned by Compressor_RequestDirectionConfig.Validate if the designated // constraints aren't met. @@ -319,13 +593,47 @@ var _ interface { // Validate checks the field values on Compressor_ResponseDirectionConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Compressor_ResponseDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor_ResponseDirectionConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Compressor_ResponseDirectionConfigMultiError, or nil if none found. +func (m *Compressor_ResponseDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor_ResponseDirectionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Compressor_ResponseDirectionConfigValidationError{ field: "CommonConfig", @@ -339,9 +647,31 @@ func (m *Compressor_ResponseDirectionConfig) Validate() error { // no validation rules for RemoveAcceptEncodingHeader + if len(errors) > 0 { + return Compressor_ResponseDirectionConfigMultiError(errors) + } + return nil } +// Compressor_ResponseDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Compressor_ResponseDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Compressor_ResponseDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Compressor_ResponseDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Compressor_ResponseDirectionConfigMultiError) AllErrors() []error { return m } + // Compressor_ResponseDirectionConfigValidationError is the validation error // returned by Compressor_ResponseDirectionConfig.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.pb.go b/pkg/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.pb.go deleted file mode 100644 index 80daecd15f..0000000000 --- a/pkg/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.pb.go +++ /dev/null @@ -1,645 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/compressor/v4alpha/compressor.proto - -package envoy_extensions_filters_http_compressor_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 9] -type Compressor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum response length, in bytes, which will trigger compression. The default value is 30. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedContentLength *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=hidden_envoy_deprecated_content_length,json=hiddenEnvoyDeprecatedContentLength,proto3" json:"hidden_envoy_deprecated_content_length,omitempty"` - // Set of strings that allows specifying which mime-types yield compression; e.g., - // application/json, text/html, etc. When this field is not defined, compression will be applied - // to the following mime-types: "application/javascript", "application/json", - // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" - // and their synonyms. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedContentType []string `protobuf:"bytes,2,rep,name=hidden_envoy_deprecated_content_type,json=hiddenEnvoyDeprecatedContentType,proto3" json:"hidden_envoy_deprecated_content_type,omitempty"` - // If true, disables compression when the response contains an etag header. When it is false, the - // filter will preserve weak etags and remove the ones that require strong validation. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedDisableOnEtagHeader bool `protobuf:"varint,3,opt,name=hidden_envoy_deprecated_disable_on_etag_header,json=hiddenEnvoyDeprecatedDisableOnEtagHeader,proto3" json:"hidden_envoy_deprecated_disable_on_etag_header,omitempty"` - // If true, removes accept-encoding from the request headers before dispatching it to the upstream - // so that responses do not get compressed before reaching the filter. - // - // .. attention:: - // - // To avoid interfering with other compression filters in the same chain use this option in - // the filter closest to the upstream. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRemoveAcceptEncodingHeader bool `protobuf:"varint,4,opt,name=hidden_envoy_deprecated_remove_accept_encoding_header,json=hiddenEnvoyDeprecatedRemoveAcceptEncodingHeader,proto3" json:"hidden_envoy_deprecated_remove_accept_encoding_header,omitempty"` - // Runtime flag that controls whether the filter is enabled or not. If set to false, the - // filter will operate as a pass-through filter. If not specified, defaults to enabled. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRuntimeEnabled *v4alpha.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=hidden_envoy_deprecated_runtime_enabled,json=hiddenEnvoyDeprecatedRuntimeEnabled,proto3" json:"hidden_envoy_deprecated_runtime_enabled,omitempty"` - // A compressor library to use for compression. Currently only - // :ref:`envoy.compression.gzip.compressor` - // is included in Envoy. - // This field is ignored if used in the context of the gzip http-filter, but is mandatory otherwise. - CompressorLibrary *v4alpha.TypedExtensionConfig `protobuf:"bytes,6,opt,name=compressor_library,json=compressorLibrary,proto3" json:"compressor_library,omitempty"` - // Configuration for request compression. Compression is disabled by default if left empty. - RequestDirectionConfig *Compressor_RequestDirectionConfig `protobuf:"bytes,7,opt,name=request_direction_config,json=requestDirectionConfig,proto3" json:"request_direction_config,omitempty"` - // Configuration for response compression. Compression is enabled by default if left empty. - // - // .. attention:: - // - // If the field is not empty then the duplicate deprecated fields of the `Compressor` message, - // such as `content_length`, `content_type`, `disable_on_etag_header`, - // `remove_accept_encoding_header` and `runtime_enabled`, are ignored. - // - // Also all the statistics related to response compression will be rooted in - // `.compressor...response.*` - // instead of - // `.compressor...*`. - ResponseDirectionConfig *Compressor_ResponseDirectionConfig `protobuf:"bytes,8,opt,name=response_direction_config,json=responseDirectionConfig,proto3" json:"response_direction_config,omitempty"` -} - -func (x *Compressor) Reset() { - *x = Compressor{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Compressor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Compressor) ProtoMessage() {} - -func (x *Compressor) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Compressor.ProtoReflect.Descriptor instead. -func (*Compressor) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescGZIP(), []int{0} -} - -// Deprecated: Do not use. -func (x *Compressor) GetHiddenEnvoyDeprecatedContentLength() *wrappers.UInt32Value { - if x != nil { - return x.HiddenEnvoyDeprecatedContentLength - } - return nil -} - -// Deprecated: Do not use. -func (x *Compressor) GetHiddenEnvoyDeprecatedContentType() []string { - if x != nil { - return x.HiddenEnvoyDeprecatedContentType - } - return nil -} - -// Deprecated: Do not use. -func (x *Compressor) GetHiddenEnvoyDeprecatedDisableOnEtagHeader() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedDisableOnEtagHeader - } - return false -} - -// Deprecated: Do not use. -func (x *Compressor) GetHiddenEnvoyDeprecatedRemoveAcceptEncodingHeader() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedRemoveAcceptEncodingHeader - } - return false -} - -// Deprecated: Do not use. -func (x *Compressor) GetHiddenEnvoyDeprecatedRuntimeEnabled() *v4alpha.RuntimeFeatureFlag { - if x != nil { - return x.HiddenEnvoyDeprecatedRuntimeEnabled - } - return nil -} - -func (x *Compressor) GetCompressorLibrary() *v4alpha.TypedExtensionConfig { - if x != nil { - return x.CompressorLibrary - } - return nil -} - -func (x *Compressor) GetRequestDirectionConfig() *Compressor_RequestDirectionConfig { - if x != nil { - return x.RequestDirectionConfig - } - return nil -} - -func (x *Compressor) GetResponseDirectionConfig() *Compressor_ResponseDirectionConfig { - if x != nil { - return x.ResponseDirectionConfig - } - return nil -} - -type Compressor_CommonDirectionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Runtime flag that controls whether compression is enabled or not for the direction this - // common config is put in. If set to false, the filter will operate as a pass-through filter - // in the chosen direction. If the field is omitted, the filter will be enabled. - Enabled *v4alpha.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Minimum value of Content-Length header of request or response messages (depending on the direction - // this common config is put in), in bytes, which will trigger compression. The default value is 30. - MinContentLength *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=min_content_length,json=minContentLength,proto3" json:"min_content_length,omitempty"` - // Set of strings that allows specifying which mime-types yield compression; e.g., - // application/json, text/html, etc. When this field is not defined, compression will be applied - // to the following mime-types: "application/javascript", "application/json", - // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" - // and their synonyms. - ContentType []string `protobuf:"bytes,3,rep,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` -} - -func (x *Compressor_CommonDirectionConfig) Reset() { - *x = Compressor_CommonDirectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Compressor_CommonDirectionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Compressor_CommonDirectionConfig) ProtoMessage() {} - -func (x *Compressor_CommonDirectionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Compressor_CommonDirectionConfig.ProtoReflect.Descriptor instead. -func (*Compressor_CommonDirectionConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Compressor_CommonDirectionConfig) GetEnabled() *v4alpha.RuntimeFeatureFlag { - if x != nil { - return x.Enabled - } - return nil -} - -func (x *Compressor_CommonDirectionConfig) GetMinContentLength() *wrappers.UInt32Value { - if x != nil { - return x.MinContentLength - } - return nil -} - -func (x *Compressor_CommonDirectionConfig) GetContentType() []string { - if x != nil { - return x.ContentType - } - return nil -} - -// Configuration for filter behavior on the request direction. -type Compressor_RequestDirectionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommonConfig *Compressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` -} - -func (x *Compressor_RequestDirectionConfig) Reset() { - *x = Compressor_RequestDirectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Compressor_RequestDirectionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Compressor_RequestDirectionConfig) ProtoMessage() {} - -func (x *Compressor_RequestDirectionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Compressor_RequestDirectionConfig.ProtoReflect.Descriptor instead. -func (*Compressor_RequestDirectionConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Compressor_RequestDirectionConfig) GetCommonConfig() *Compressor_CommonDirectionConfig { - if x != nil { - return x.CommonConfig - } - return nil -} - -// Configuration for filter behavior on the response direction. -type Compressor_ResponseDirectionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommonConfig *Compressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` - // If true, disables compression when the response contains an etag header. When it is false, the - // filter will preserve weak etags and remove the ones that require strong validation. - DisableOnEtagHeader bool `protobuf:"varint,2,opt,name=disable_on_etag_header,json=disableOnEtagHeader,proto3" json:"disable_on_etag_header,omitempty"` - // If true, removes accept-encoding from the request headers before dispatching it to the upstream - // so that responses do not get compressed before reaching the filter. - // - // .. attention:: - // - // To avoid interfering with other compression filters in the same chain use this option in - // the filter closest to the upstream. - RemoveAcceptEncodingHeader bool `protobuf:"varint,3,opt,name=remove_accept_encoding_header,json=removeAcceptEncodingHeader,proto3" json:"remove_accept_encoding_header,omitempty"` -} - -func (x *Compressor_ResponseDirectionConfig) Reset() { - *x = Compressor_ResponseDirectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Compressor_ResponseDirectionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Compressor_ResponseDirectionConfig) ProtoMessage() {} - -func (x *Compressor_ResponseDirectionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Compressor_ResponseDirectionConfig.ProtoReflect.Descriptor instead. -func (*Compressor_ResponseDirectionConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *Compressor_ResponseDirectionConfig) GetCommonConfig() *Compressor_CommonDirectionConfig { - if x != nil { - return x.CommonConfig - } - return nil -} - -func (x *Compressor_ResponseDirectionConfig) GetDisableOnEtagHeader() bool { - if x != nil { - return x.DisableOnEtagHeader - } - return false -} - -func (x *Compressor_ResponseDirectionConfig) GetRemoveAcceptEncodingHeader() bool { - if x != nil { - return x.RemoveAcceptEncodingHeader - } - return false -} - -var File_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDesc = []byte{ - 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x0e, 0x0a, - 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x74, 0x0a, 0x26, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x52, 0x0a, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x64, 0x0a, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x74, 0x61, 0x67, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, - 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x35, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x2f, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x87, 0x01, 0x0a, 0x27, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5e, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x90, 0x01, 0x0a, 0x19, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xa4, 0x02, 0x0a, - 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x4a, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x53, - 0x9a, 0xc5, 0x88, 0x1e, 0x4e, 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x1a, 0xe7, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x77, - 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x54, 0x9a, 0xc5, 0x88, 0x1e, 0x4f, 0x0a, 0x4d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe1, 0x02, - 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x77, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, - 0x5f, 0x65, 0x74, 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, - 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x55, 0x9a, 0xc5, 0x88, 0x1e, - 0x50, 0x0a, 0x4e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, - 0x42, 0x5b, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescData = file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDesc -) - -func file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDescData -} - -var file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_goTypes = []interface{}{ - (*Compressor)(nil), // 0: envoy.extensions.filters.http.compressor.v4alpha.Compressor - (*Compressor_CommonDirectionConfig)(nil), // 1: envoy.extensions.filters.http.compressor.v4alpha.Compressor.CommonDirectionConfig - (*Compressor_RequestDirectionConfig)(nil), // 2: envoy.extensions.filters.http.compressor.v4alpha.Compressor.RequestDirectionConfig - (*Compressor_ResponseDirectionConfig)(nil), // 3: envoy.extensions.filters.http.compressor.v4alpha.Compressor.ResponseDirectionConfig - (*wrappers.UInt32Value)(nil), // 4: google.protobuf.UInt32Value - (*v4alpha.RuntimeFeatureFlag)(nil), // 5: envoy.config.core.v4alpha.RuntimeFeatureFlag - (*v4alpha.TypedExtensionConfig)(nil), // 6: envoy.config.core.v4alpha.TypedExtensionConfig -} -var file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_depIdxs = []int32{ - 4, // 0: envoy.extensions.filters.http.compressor.v4alpha.Compressor.hidden_envoy_deprecated_content_length:type_name -> google.protobuf.UInt32Value - 5, // 1: envoy.extensions.filters.http.compressor.v4alpha.Compressor.hidden_envoy_deprecated_runtime_enabled:type_name -> envoy.config.core.v4alpha.RuntimeFeatureFlag - 6, // 2: envoy.extensions.filters.http.compressor.v4alpha.Compressor.compressor_library:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 2, // 3: envoy.extensions.filters.http.compressor.v4alpha.Compressor.request_direction_config:type_name -> envoy.extensions.filters.http.compressor.v4alpha.Compressor.RequestDirectionConfig - 3, // 4: envoy.extensions.filters.http.compressor.v4alpha.Compressor.response_direction_config:type_name -> envoy.extensions.filters.http.compressor.v4alpha.Compressor.ResponseDirectionConfig - 5, // 5: envoy.extensions.filters.http.compressor.v4alpha.Compressor.CommonDirectionConfig.enabled:type_name -> envoy.config.core.v4alpha.RuntimeFeatureFlag - 4, // 6: envoy.extensions.filters.http.compressor.v4alpha.Compressor.CommonDirectionConfig.min_content_length:type_name -> google.protobuf.UInt32Value - 1, // 7: envoy.extensions.filters.http.compressor.v4alpha.Compressor.RequestDirectionConfig.common_config:type_name -> envoy.extensions.filters.http.compressor.v4alpha.Compressor.CommonDirectionConfig - 1, // 8: envoy.extensions.filters.http.compressor.v4alpha.Compressor.ResponseDirectionConfig.common_config:type_name -> envoy.extensions.filters.http.compressor.v4alpha.Compressor.CommonDirectionConfig - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_init() } -func file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_init() { - if File_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Compressor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Compressor_CommonDirectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Compressor_RequestDirectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Compressor_ResponseDirectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto = out.File - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_rawDesc = nil - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_goTypes = nil - file_envoy_extensions_filters_http_compressor_v4alpha_compressor_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.pb.validate.go b/pkg/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.pb.validate.go deleted file mode 100644 index 0a362b1551..0000000000 --- a/pkg/api/envoy/extensions/filters/http/compressor/v4alpha/compressor.pb.validate.go +++ /dev/null @@ -1,400 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/compressor/v4alpha/compressor.proto - -package envoy_extensions_filters_http_compressor_v4alpha - -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{} -) - -// Validate checks the field values on Compressor with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Compressor) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedContentLength()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CompressorValidationError{ - field: "HiddenEnvoyDeprecatedContentLength", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for HiddenEnvoyDeprecatedDisableOnEtagHeader - - // no validation rules for HiddenEnvoyDeprecatedRemoveAcceptEncodingHeader - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedRuntimeEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CompressorValidationError{ - field: "HiddenEnvoyDeprecatedRuntimeEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetCompressorLibrary()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CompressorValidationError{ - field: "CompressorLibrary", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetRequestDirectionConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CompressorValidationError{ - field: "RequestDirectionConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetResponseDirectionConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CompressorValidationError{ - field: "ResponseDirectionConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// CompressorValidationError is the validation error returned by -// Compressor.Validate if the designated constraints aren't met. -type CompressorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CompressorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CompressorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CompressorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CompressorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CompressorValidationError) ErrorName() string { return "CompressorValidationError" } - -// Error satisfies the builtin error interface -func (e CompressorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCompressor.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CompressorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CompressorValidationError{} - -// Validate checks the field values on Compressor_CommonDirectionConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *Compressor_CommonDirectionConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Compressor_CommonDirectionConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetMinContentLength()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Compressor_CommonDirectionConfigValidationError{ - field: "MinContentLength", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// Compressor_CommonDirectionConfigValidationError is the validation error -// returned by Compressor_CommonDirectionConfig.Validate if the designated -// constraints aren't met. -type Compressor_CommonDirectionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Compressor_CommonDirectionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Compressor_CommonDirectionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Compressor_CommonDirectionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Compressor_CommonDirectionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Compressor_CommonDirectionConfigValidationError) ErrorName() string { - return "Compressor_CommonDirectionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Compressor_CommonDirectionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCompressor_CommonDirectionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Compressor_CommonDirectionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Compressor_CommonDirectionConfigValidationError{} - -// Validate checks the field values on Compressor_RequestDirectionConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *Compressor_RequestDirectionConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Compressor_RequestDirectionConfigValidationError{ - field: "CommonConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// Compressor_RequestDirectionConfigValidationError is the validation error -// returned by Compressor_RequestDirectionConfig.Validate if the designated -// constraints aren't met. -type Compressor_RequestDirectionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Compressor_RequestDirectionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Compressor_RequestDirectionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Compressor_RequestDirectionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Compressor_RequestDirectionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Compressor_RequestDirectionConfigValidationError) ErrorName() string { - return "Compressor_RequestDirectionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Compressor_RequestDirectionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCompressor_RequestDirectionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Compressor_RequestDirectionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Compressor_RequestDirectionConfigValidationError{} - -// Validate checks the field values on Compressor_ResponseDirectionConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *Compressor_ResponseDirectionConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Compressor_ResponseDirectionConfigValidationError{ - field: "CommonConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DisableOnEtagHeader - - // no validation rules for RemoveAcceptEncodingHeader - - return nil -} - -// Compressor_ResponseDirectionConfigValidationError is the validation error -// returned by Compressor_ResponseDirectionConfig.Validate if the designated -// constraints aren't met. -type Compressor_ResponseDirectionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Compressor_ResponseDirectionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Compressor_ResponseDirectionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Compressor_ResponseDirectionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Compressor_ResponseDirectionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Compressor_ResponseDirectionConfigValidationError) ErrorName() string { - return "Compressor_ResponseDirectionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Compressor_ResponseDirectionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCompressor_ResponseDirectionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Compressor_ResponseDirectionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Compressor_ResponseDirectionConfigValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.go b/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.go index 1e59f326f4..3918cce494 100644 --- a/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.go +++ b/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/cors/v3/cors.proto -package envoy_extensions_filters_http_cors_v3 +package corsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Cors filter config. type Cors struct { state protoimpl.MessageState @@ -81,12 +76,17 @@ var file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDesc = []byte{ 0x6f, 0x72, 0x73, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x72, - 0x73, 0x42, 0x4a, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x42, 0x9f, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x43, 0x6f, 0x72, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x72, + 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.validate.go b/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.validate.go index 21e0b66fac..8f6c9c8fb6 100644 --- a/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/cors/v3/cors.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/cors/v3/cors.proto -package envoy_extensions_filters_http_cors_v3 +package corsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Cors with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Cors) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cors with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in CorsMultiError, or nil if none found. +func (m *Cors) ValidateAll() error { + return m.validate(true) +} + +func (m *Cors) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return CorsMultiError(errors) + } + return nil } +// CorsMultiError is an error wrapping multiple validation errors returned by +// Cors.ValidateAll() if the designated constraints aren't met. +type CorsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CorsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CorsMultiError) AllErrors() []error { return m } + // CorsValidationError is the validation error returned by Cors.Validate if the // designated constraints aren't met. type CorsValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.go b/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.go index 83b6d7299a..c4f99547ac 100644 --- a/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.go +++ b/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/csrf/v3/csrf.proto -package envoy_extensions_filters_http_csrf_v3 +package csrfv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // CSRF filter config. type CsrfPolicy struct { state protoimpl.MessageState @@ -37,19 +32,19 @@ type CsrfPolicy struct { // Specifies the % of requests for which the CSRF filter is enabled. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests to filter. // // .. note:: // // This field defaults to 100/:ref:`HUNDRED - // `. + // `. FilterEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,1,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"` // Specifies that CSRF policies will be evaluated and tracked, but not enforced. // // This is intended to be used when ``filter_enabled`` is off and will be ignored otherwise. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate // and track the request's *Origin* and *Destination* to determine if it's valid, but will not // enforce any policies. @@ -154,12 +149,18 @@ var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc = []byte{ 0x69, 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x73, 0x72, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x4a, 0x0a, 0x33, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x33, - 0x42, 0x09, 0x43, 0x73, 0x72, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x72, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x9f, 0x01, 0x0a, 0x33, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, + 0x33, 0x42, 0x09, 0x43, 0x73, 0x72, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x73, 0x72, 0x66, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x73, 0x72, + 0x66, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.validate.go b/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.validate.go index a8e5121a62..8fc910176e 100644 --- a/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/csrf/v3/csrf.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/csrf/v3/csrf.proto -package envoy_extensions_filters_http_csrf_v3 +package csrfv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CsrfPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CsrfPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CsrfPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CsrfPolicyMultiError, or +// nil if none found. +func (m *CsrfPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *CsrfPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetFilterEnabled() == nil { - return CsrfPolicyValidationError{ + err := CsrfPolicyValidationError{ field: "FilterEnabled", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "FilterEnabled", @@ -57,7 +97,26 @@ func (m *CsrfPolicy) Validate() error { } } - if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "ShadowEnabled", @@ -70,7 +129,26 @@ func (m *CsrfPolicy) Validate() error { for idx, item := range m.GetAdditionalOrigins() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: fmt.Sprintf("AdditionalOrigins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: fmt.Sprintf("AdditionalOrigins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: fmt.Sprintf("AdditionalOrigins[%v]", idx), @@ -82,9 +160,29 @@ func (m *CsrfPolicy) Validate() error { } + if len(errors) > 0 { + return CsrfPolicyMultiError(errors) + } + return nil } +// CsrfPolicyMultiError is an error wrapping multiple validation errors +// returned by CsrfPolicy.ValidateAll() if the designated constraints aren't met. +type CsrfPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CsrfPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CsrfPolicyMultiError) AllErrors() []error { return m } + // CsrfPolicyValidationError is the validation error returned by // CsrfPolicy.Validate if the designated constraints aren't met. type CsrfPolicyValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.pb.go b/pkg/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.pb.go deleted file mode 100644 index 96da5c514b..0000000000 --- a/pkg/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.pb.go +++ /dev/null @@ -1,234 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/csrf/v4alpha/csrf.proto - -package envoy_extensions_filters_http_csrf_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// CSRF filter config. -type CsrfPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the % of requests for which the CSRF filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - FilterEnabled *v4alpha.RuntimeFractionalPercent `protobuf:"bytes,1,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"` - // Specifies that CSRF policies will be evaluated and tracked, but not enforced. - // - // This is intended to be used when ``filter_enabled`` is off and will be ignored otherwise. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's *Origin* and *Destination* to determine if it's valid, but will not - // enforce any policies. - ShadowEnabled *v4alpha.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` - // Specifies additional source origins that will be allowed in addition to - // the destination origin. - // - // More information on how this can be configured via runtime can be found - // :ref:`here `. - AdditionalOrigins []*v4alpha1.StringMatcher `protobuf:"bytes,3,rep,name=additional_origins,json=additionalOrigins,proto3" json:"additional_origins,omitempty"` -} - -func (x *CsrfPolicy) Reset() { - *x = CsrfPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CsrfPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CsrfPolicy) ProtoMessage() {} - -func (x *CsrfPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CsrfPolicy.ProtoReflect.Descriptor instead. -func (*CsrfPolicy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescGZIP(), []int{0} -} - -func (x *CsrfPolicy) GetFilterEnabled() *v4alpha.RuntimeFractionalPercent { - if x != nil { - return x.FilterEnabled - } - return nil -} - -func (x *CsrfPolicy) GetShadowEnabled() *v4alpha.RuntimeFractionalPercent { - if x != nil { - return x.ShadowEnabled - } - return nil -} - -func (x *CsrfPolicy) GetAdditionalOrigins() []*v4alpha1.StringMatcher { - if x != nil { - return x.AdditionalOrigins - } - return nil -} - -var File_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDesc = []byte{ - 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x63, 0x73, 0x72, 0x66, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x73, 0x72, - 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x02, - 0x0a, 0x0a, 0x43, 0x73, 0x72, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x64, 0x0a, 0x0e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x5a, 0x0a, 0x0e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0d, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x58, - 0x0a, 0x12, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, - 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, - 0x73, 0x72, 0x66, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x73, 0x72, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x42, 0x4f, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x09, 0x43, - 0x73, 0x72, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescData = file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDesc -) - -func file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDescData -} - -var file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_goTypes = []interface{}{ - (*CsrfPolicy)(nil), // 0: envoy.extensions.filters.http.csrf.v4alpha.CsrfPolicy - (*v4alpha.RuntimeFractionalPercent)(nil), // 1: envoy.config.core.v4alpha.RuntimeFractionalPercent - (*v4alpha1.StringMatcher)(nil), // 2: envoy.type.matcher.v4alpha.StringMatcher -} -var file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.http.csrf.v4alpha.CsrfPolicy.filter_enabled:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 1, // 1: envoy.extensions.filters.http.csrf.v4alpha.CsrfPolicy.shadow_enabled:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 2, // 2: envoy.extensions.filters.http.csrf.v4alpha.CsrfPolicy.additional_origins:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_init() } -func file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_init() { - if File_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CsrfPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto = out.File - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_rawDesc = nil - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_goTypes = nil - file_envoy_extensions_filters_http_csrf_v4alpha_csrf_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.pb.validate.go b/pkg/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.pb.validate.go deleted file mode 100644 index a56a5702ab..0000000000 --- a/pkg/api/envoy/extensions/filters/http/csrf/v4alpha/csrf.pb.validate.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/csrf/v4alpha/csrf.proto - -package envoy_extensions_filters_http_csrf_v4alpha - -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{} -) - -// Validate checks the field values on CsrfPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *CsrfPolicy) Validate() error { - if m == nil { - return nil - } - - if m.GetFilterEnabled() == nil { - return CsrfPolicyValidationError{ - field: "FilterEnabled", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CsrfPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CsrfPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetAdditionalOrigins() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CsrfPolicyValidationError{ - field: fmt.Sprintf("AdditionalOrigins[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// CsrfPolicyValidationError is the validation error returned by -// CsrfPolicy.Validate if the designated constraints aren't met. -type CsrfPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CsrfPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CsrfPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CsrfPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CsrfPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CsrfPolicyValidationError) ErrorName() string { return "CsrfPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e CsrfPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCsrfPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CsrfPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CsrfPolicyValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.go b/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.go index 0bb727a1c0..8e1fca0450 100644 --- a/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.go +++ b/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.go @@ -1,17 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/decompressor/v3/decompressor.proto -package envoy_extensions_filters_http_decompressor_v3 +package decompressorv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,18 +24,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Decompressor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // A decompressor library to use for both request and response decompression. Currently only - // :ref:`envoy.compression.gzip.compressor` + // :ref:`envoy.compression.gzip.compressor` // is included in Envoy. + // [#extension-category: envoy.compression.decompressor] DecompressorLibrary *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=decompressor_library,json=decompressorLibrary,proto3" json:"decompressor_library,omitempty"` // Configuration for request decompression. Decompression is enabled by default if left empty. RequestDirectionConfig *Decompressor_RequestDirectionConfig `protobuf:"bytes,2,opt,name=request_direction_config,json=requestDirectionConfig,proto3" json:"request_direction_config,omitempty"` @@ -107,6 +102,8 @@ type Decompressor_CommonDirectionConfig struct { // Runtime flag that controls whether the filter is enabled for decompression or not. If set to false, the // filter will operate as a pass-through filter. If the message is unspecified, the filter will be enabled. Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // If set to true, will decompress response even if a *no-transform* cache control header is set. + IgnoreNoTransformHeader bool `protobuf:"varint,2,opt,name=ignore_no_transform_header,json=ignoreNoTransformHeader,proto3" json:"ignore_no_transform_header,omitempty"` } func (x *Decompressor_CommonDirectionConfig) Reset() { @@ -148,6 +145,13 @@ func (x *Decompressor_CommonDirectionConfig) GetEnabled() *v3.RuntimeFeatureFlag return nil } +func (x *Decompressor_CommonDirectionConfig) GetIgnoreNoTransformHeader() bool { + if x != nil { + return x.IgnoreNoTransformHeader + } + return false +} + // Configuration for filter behavior on the request direction. type Decompressor_RequestDirectionConfig struct { state protoimpl.MessageState @@ -268,50 +272,48 @@ var file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDes 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, - 0x06, 0x0a, 0x0c, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, - 0x67, 0x0a, 0x14, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, - 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x13, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x18, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8f, 0x01, 0x0a, 0x19, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x5b, 0x0a, 0x15, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0xe8, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xb2, 0x07, 0x0a, 0x0c, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x12, 0x67, 0x0a, 0x14, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x18, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8f, 0x01, 0x0a, 0x19, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x98, 0x01, 0x0a, 0x15, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4e, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0xe8, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x76, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, @@ -335,13 +337,19 @@ var file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDes 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x5a, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xbf, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.validate.go b/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.validate.go index 81d6b70dd2..2a9c6185ea 100644 --- a/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/decompressor/v3/decompressor.proto -package envoy_extensions_filters_http_decompressor_v3 +package decompressorv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Decompressor with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Decompressor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DecompressorMultiError, or +// nil if none found. +func (m *Decompressor) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDecompressorLibrary() == nil { - return DecompressorValidationError{ + err := DecompressorValidationError{ field: "DecompressorLibrary", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDecompressorLibrary()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDecompressorLibrary()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "DecompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "DecompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDecompressorLibrary()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DecompressorValidationError{ field: "DecompressorLibrary", @@ -58,7 +97,26 @@ func (m *Decompressor) Validate() error { } } - if v, ok := interface{}(m.GetRequestDirectionConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestDirectionConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DecompressorValidationError{ field: "RequestDirectionConfig", @@ -68,7 +126,26 @@ func (m *Decompressor) Validate() error { } } - if v, ok := interface{}(m.GetResponseDirectionConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseDirectionConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DecompressorValidationError{ field: "ResponseDirectionConfig", @@ -78,9 +155,29 @@ func (m *Decompressor) Validate() error { } } + if len(errors) > 0 { + return DecompressorMultiError(errors) + } + return nil } +// DecompressorMultiError is an error wrapping multiple validation errors +// returned by Decompressor.ValidateAll() if the designated constraints aren't met. +type DecompressorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DecompressorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DecompressorMultiError) AllErrors() []error { return m } + // DecompressorValidationError is the validation error returned by // Decompressor.Validate if the designated constraints aren't met. type DecompressorValidationError struct { @@ -137,13 +234,47 @@ var _ interface { // Validate checks the field values on Decompressor_CommonDirectionConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Decompressor_CommonDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor_CommonDirectionConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Decompressor_CommonDirectionConfigMultiError, or nil if none found. +func (m *Decompressor_CommonDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor_CommonDirectionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Decompressor_CommonDirectionConfigValidationError{ field: "Enabled", @@ -153,9 +284,33 @@ func (m *Decompressor_CommonDirectionConfig) Validate() error { } } + // no validation rules for IgnoreNoTransformHeader + + if len(errors) > 0 { + return Decompressor_CommonDirectionConfigMultiError(errors) + } + return nil } +// Decompressor_CommonDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Decompressor_CommonDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Decompressor_CommonDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Decompressor_CommonDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Decompressor_CommonDirectionConfigMultiError) AllErrors() []error { return m } + // Decompressor_CommonDirectionConfigValidationError is the validation error // returned by Decompressor_CommonDirectionConfig.Validate if the designated // constraints aren't met. @@ -215,13 +370,47 @@ var _ interface { // Validate checks the field values on Decompressor_RequestDirectionConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *Decompressor_RequestDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor_RequestDirectionConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Decompressor_RequestDirectionConfigMultiError, or nil if none found. +func (m *Decompressor_RequestDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor_RequestDirectionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Decompressor_RequestDirectionConfigValidationError{ field: "CommonConfig", @@ -231,7 +420,26 @@ func (m *Decompressor_RequestDirectionConfig) Validate() error { } } - if v, ok := interface{}(m.GetAdvertiseAcceptEncoding()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAdvertiseAcceptEncoding()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "AdvertiseAcceptEncoding", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "AdvertiseAcceptEncoding", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdvertiseAcceptEncoding()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Decompressor_RequestDirectionConfigValidationError{ field: "AdvertiseAcceptEncoding", @@ -241,9 +449,31 @@ func (m *Decompressor_RequestDirectionConfig) Validate() error { } } + if len(errors) > 0 { + return Decompressor_RequestDirectionConfigMultiError(errors) + } + return nil } +// Decompressor_RequestDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Decompressor_RequestDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Decompressor_RequestDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Decompressor_RequestDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Decompressor_RequestDirectionConfigMultiError) AllErrors() []error { return m } + // Decompressor_RequestDirectionConfigValidationError is the validation error // returned by Decompressor_RequestDirectionConfig.Validate if the designated // constraints aren't met. @@ -303,13 +533,47 @@ var _ interface { // Validate checks the field values on Decompressor_ResponseDirectionConfig // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *Decompressor_ResponseDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor_ResponseDirectionConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Decompressor_ResponseDirectionConfigMultiError, or nil if none found. +func (m *Decompressor_ResponseDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor_ResponseDirectionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Decompressor_ResponseDirectionConfigValidationError{ field: "CommonConfig", @@ -319,9 +583,31 @@ func (m *Decompressor_ResponseDirectionConfig) Validate() error { } } + if len(errors) > 0 { + return Decompressor_ResponseDirectionConfigMultiError(errors) + } + return nil } +// Decompressor_ResponseDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Decompressor_ResponseDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Decompressor_ResponseDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Decompressor_ResponseDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Decompressor_ResponseDirectionConfigMultiError) AllErrors() []error { return m } + // Decompressor_ResponseDirectionConfigValidationError is the validation error // returned by Decompressor_ResponseDirectionConfig.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.go b/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.go index ef9aa217cb..37ed988af7 100644 --- a/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto -package envoy_extensions_filters_http_dynamic_forward_proxy_v3 +package dynamic_forward_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the dynamic forward proxy HTTP filter. See the :ref:`architecture overview // ` for more information. // [#extension: envoy.filters.http.dynamic_forward_proxy] @@ -38,8 +33,13 @@ type FilterConfig struct { // The DNS cache configuration that the filter will attach to. Note this configuration must // match that of associated :ref:`dynamic forward proxy cluster configuration - // `. + // `. DnsCacheConfig *v3.DnsCacheConfig `protobuf:"bytes,1,opt,name=dns_cache_config,json=dnsCacheConfig,proto3" json:"dns_cache_config,omitempty"` + // When this flag is set, the filter will add the resolved upstream address in the filter + // state. The state should be saved with key + // `envoy.stream.upstream_address` (See + // :repo:`upstream_address.h`). + SaveUpstreamAddress bool `protobuf:"varint,2,opt,name=save_upstream_address,json=saveUpstreamAddress,proto3" json:"save_upstream_address,omitempty"` } func (x *FilterConfig) Reset() { @@ -81,6 +81,13 @@ func (x *FilterConfig) GetDnsCacheConfig() *v3.DnsCacheConfig { return nil } +func (x *FilterConfig) GetSaveUpstreamAddress() bool { + if x != nil { + return x.SaveUpstreamAddress + } + return false +} + // Per route Configuration for the dynamic forward proxy HTTP filter. type PerRouteConfig struct { state protoimpl.MessageState @@ -157,7 +164,7 @@ type PerRouteConfig_HostRewriteLiteral struct { // // Note: this rewrite affects both DNS lookup and host header forwarding. However, this // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the + // :ref:`HCM host rewrite ` given that the // value set here would be used for DNS lookups whereas the value set in the HCM would be used // for host header forwarding which is not the desired outcome. HostRewriteLiteral string `protobuf:"bytes,1,opt,name=host_rewrite_literal,json=hostRewriteLiteral,proto3,oneof"` @@ -170,7 +177,7 @@ type PerRouteConfig_HostRewriteHeader struct { // // Note: this rewrite affects both DNS lookup and host header forwarding. However, this // option shouldn't be used with - // :ref:`HCM host rewrite header ` + // :ref:`HCM host rewrite header ` // given that the value set here would be used for DNS lookups whereas the value set in the HCM // would be used for host header forwarding which is not the desired outcome. // @@ -205,7 +212,7 @@ var file_envoy_extensions_filters_http_dynamic_forward_proxy_v3_dynamic_forward_ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x0c, 0x46, 0x69, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, @@ -214,33 +221,43 @@ var file_envoy_extensions_filters_http_dynamic_forward_proxy_v3_dynamic_forward_ 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x64, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, + 0x12, 0x32, 0x0a, 0x15, 0x73, 0x61, 0x76, 0x65, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x73, 0x61, 0x76, 0x65, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0xde, 0x01, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, + 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x4c, 0x9a, 0xc5, 0x88, 0x1e, 0x47, + 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, 0x74, 0x5f, + 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x42, 0xe1, 0x01, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xde, 0x01, 0x0a, - 0x0e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x32, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, - 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x12, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x74, 0x65, - 0x72, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x11, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x4c, 0x9a, 0xc5, 0x88, 0x1e, 0x47, 0x0a, 0x45, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, - 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x6a, 0x0a, - 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, + 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x18, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x75, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x18, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x46, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.validate.go index c1e35a1ef3..1b75aad672 100644 --- a/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto -package envoy_extensions_filters_http_dynamic_forward_proxy_v3 +package dynamic_forward_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDnsCacheConfig() == nil { - return FilterConfigValidationError{ + err := FilterConfigValidationError{ field: "DnsCacheConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterConfigValidationError{ field: "DnsCacheConfig", @@ -58,9 +97,31 @@ func (m *FilterConfig) Validate() error { } } + // no validation rules for SaveUpstreamAddress + + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil } +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + // FilterConfigValidationError is the validation error returned by // FilterConfig.Validate if the designated constraints aren't met. type FilterConfigValidationError struct { @@ -116,13 +177,27 @@ var _ interface { } = FilterConfigValidationError{} // Validate checks the field values on PerRouteConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.HostRewriteSpecifier.(type) { case *PerRouteConfig_HostRewriteLiteral: @@ -133,9 +208,30 @@ func (m *PerRouteConfig) Validate() error { } + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil } +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + // PerRouteConfigValidationError is the validation error returned by // PerRouteConfig.Validate if the designated constraints aren't met. type PerRouteConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.go b/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.go index 457cf7b220..3bf5636fb5 100644 --- a/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.go +++ b/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/dynamo/v3/dynamo.proto -package envoy_extensions_filters_http_dynamo_v3 +package dynamov3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Dynamo filter config. type Dynamo struct { state protoimpl.MessageState @@ -81,13 +76,18 @@ var file_envoy_extensions_filters_http_dynamo_v3_dynamo_proto_rawDesc = []byte{ 0x6f, 0x22, 0x3a, 0x0a, 0x06, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x42, 0x4e, 0x0a, - 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x6f, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x42, 0xa7, 0x01, + 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x79, + 0x6e, 0x61, 0x6d, 0x6f, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x6f, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x6f, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.validate.go b/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.validate.go index d6ffacb479..a6dcbff033 100644 --- a/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/dynamo/v3/dynamo.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/dynamo/v3/dynamo.proto -package envoy_extensions_filters_http_dynamo_v3 +package dynamov3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Dynamo with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Dynamo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Dynamo with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in DynamoMultiError, or nil if none found. +func (m *Dynamo) ValidateAll() error { + return m.validate(true) +} + +func (m *Dynamo) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return DynamoMultiError(errors) + } + return nil } +// DynamoMultiError is an error wrapping multiple validation errors returned by +// Dynamo.ValidateAll() if the designated constraints aren't met. +type DynamoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DynamoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DynamoMultiError) AllErrors() []error { return m } + // DynamoValidationError is the validation error returned by Dynamo.Validate if // the designated constraints aren't met. type DynamoValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.go b/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.go index 50b9d98037..81ca1954c5 100644 --- a/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.go +++ b/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.go @@ -1,19 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto -package envoy_extensions_filters_http_ext_authz_v3 +package ext_authzv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -27,11 +25,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 15] +// [#next-free-field: 17] type ExtAuthz struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -78,10 +72,10 @@ type ExtAuthz struct { // filter and the authorization server. The default status is HTTP 403 Forbidden. StatusOnError *v31.HttpStatus `protobuf:"bytes,7,opt,name=status_on_error,json=statusOnError,proto3" json:"status_on_error,omitempty"` // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service as an opaque *protobuf::Struct*. + // ext_authz service. :ref:`filter_metadata ` is passed as an opaque *protobuf::Struct*. // // For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata - // ` is set, + // ` is set, // then the following will pass the jwt payload to the authorization server. // // .. code-block:: yaml @@ -90,9 +84,16 @@ type ExtAuthz struct { // - envoy.filters.http.jwt_authn // MetadataContextNamespaces []string `protobuf:"bytes,8,rep,name=metadata_context_namespaces,json=metadataContextNamespaces,proto3" json:"metadata_context_namespaces,omitempty"` + // Specifies a list of metadata namespaces whose values, if present, will be passed to the + // ext_authz service. :ref:`typed_filter_metadata ` is passed as an *protobuf::Any*. + // + // It works in a way similar to `metadata_context_namespaces` but allows envoy and external authz server to share the protobuf message definition + // in order to do a safe parsing. + // + TypedMetadataContextNamespaces []string `protobuf:"bytes,16,rep,name=typed_metadata_context_namespaces,json=typedMetadataContextNamespaces,proto3" json:"typed_metadata_context_namespaces,omitempty"` // Specifies if the filter is enabled. // - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to get the percentage of requests to filter. // // If this field is not specified, the filter will be enabled for all requests. @@ -101,7 +102,7 @@ type ExtAuthz struct { // If this field is not specified, the filter will be enabled for all requests. FilterEnabledMetadata *v32.MetadataMatcher `protobuf:"bytes,14,opt,name=filter_enabled_metadata,json=filterEnabledMetadata,proto3" json:"filter_enabled_metadata,omitempty"` // Specifies whether to deny the requests, when the filter is disabled. - // If :ref:`runtime_key ` is specified, + // If :ref:`runtime_key ` is specified, // Envoy will lookup the runtime key to determine whether to deny request for // filter protected path at filter disabling. If filter is disabled in // typed_per_filter_config for the path, requests will not be denied. @@ -111,7 +112,7 @@ type ExtAuthz struct { // Specifies if the peer certificate is sent to the external service. // // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. + // :ref:`certificate`. IncludePeerCertificate bool `protobuf:"varint,10,opt,name=include_peer_certificate,json=includePeerCertificate,proto3" json:"include_peer_certificate,omitempty"` // Optional additional prefix to use when emitting statistics. This allows to distinguish // emitted statistics between configured *ext_authz* filters in an HTTP filter chain. For example: @@ -129,8 +130,10 @@ type ExtAuthz struct { // stat_prefix: blocker # This emits ext_authz.blocker.ok, ext_authz.blocker.denied, etc. // StatPrefix string `protobuf:"bytes,13,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedUseAlpha bool `protobuf:"varint,4,opt,name=hidden_envoy_deprecated_use_alpha,json=hiddenEnvoyDeprecatedUseAlpha,proto3" json:"hidden_envoy_deprecated_use_alpha,omitempty"` + // Optional labels that will be passed to :ref:`labels` in + // :ref:`destination`. + // The labels will be read from :ref:`metadata` with the specified key. + BootstrapMetadataLabelsKey string `protobuf:"bytes,15,opt,name=bootstrap_metadata_labels_key,json=bootstrapMetadataLabelsKey,proto3" json:"bootstrap_metadata_labels_key,omitempty"` } func (x *ExtAuthz) Reset() { @@ -190,7 +193,7 @@ func (x *ExtAuthz) GetTransportApiVersion() v3.ApiVersion { if x != nil { return x.TransportApiVersion } - return v3.ApiVersion_AUTO + return v3.ApiVersion(0) } func (x *ExtAuthz) GetFailureModeAllow() bool { @@ -228,6 +231,13 @@ func (x *ExtAuthz) GetMetadataContextNamespaces() []string { return nil } +func (x *ExtAuthz) GetTypedMetadataContextNamespaces() []string { + if x != nil { + return x.TypedMetadataContextNamespaces + } + return nil +} + func (x *ExtAuthz) GetFilterEnabled() *v3.RuntimeFractionalPercent { if x != nil { return x.FilterEnabled @@ -263,12 +273,11 @@ func (x *ExtAuthz) GetStatPrefix() string { return "" } -// Deprecated: Do not use. -func (x *ExtAuthz) GetHiddenEnvoyDeprecatedUseAlpha() bool { +func (x *ExtAuthz) GetBootstrapMetadataLabelsKey() string { if x != nil { - return x.HiddenEnvoyDeprecatedUseAlpha + return x.BootstrapMetadataLabelsKey } - return false + return "" } type isExtAuthz_Services interface { @@ -298,7 +307,7 @@ type BufferSettings struct { // Sets the maximum size of a message body that the filter will hold in memory. Envoy will return // *HTTP 413* and will *not* initiate the authorization process when buffer reaches the number // set in this field. Note that this setting will have precedence over :ref:`failure_mode_allow - // `. + // `. MaxRequestBytes uint32 `protobuf:"varint,1,opt,name=max_request_bytes,json=maxRequestBytes,proto3" json:"max_request_bytes,omitempty"` // When this field is true, Envoy will buffer the message until *max_request_bytes* is reached. // The authorization request will be dispatched and no 413 HTTP error will be returned by the @@ -373,21 +382,24 @@ func (x *BufferSettings) GetPackAsBytes() bool { // // *On authorization request*, a list of allowed request headers may be supplied. See // :ref:`allowed_headers -// ` +// ` // for details. Additional headers metadata may be added to the authorization request. See // :ref:`headers_to_add -// ` for +// ` for // details. // // On authorization response status HTTP 200 OK, the filter will allow traffic to the upstream and // additional headers metadata may be added to the original client request. See // :ref:`allowed_upstream_headers -// ` +// ` +// for details. Additionally, the filter may add additional headers to the client's response. See +// :ref:`allowed_client_headers_on_success +// ` // for details. // // On other authorization response statuses, the filter will not allow traffic. Additional headers // metadata as well as body may be added to the client's response. See :ref:`allowed_client_headers -// ` +// ` // for details. // [#next-free-field: 9] type HttpService struct { @@ -470,18 +482,21 @@ type AuthorizationRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Authorization request will include the client request headers that have a correspondent match - // in the :ref:`list `. Note that in addition to the - // user's supplied matchers: + // Authorization request includes the client request headers that have a correspondent match + // in the :ref:`list `. + // + // .. note:: + // + // In addition to the the user's supplied matchers, ``Host``, ``Method``, ``Path``, + // ``Content-Length``, and ``Authorization`` are **automatically included** to the list. // - // 1. *Host*, *Method*, *Path* and *Content-Length* are automatically included to the list. + // .. note:: // - // 2. *Content-Length* will be set to 0 and the request to the authorization service will not have - // a message body. However, the authorization request can include the buffered client request body - // (controlled by :ref:`with_request_body - // ` setting), - // consequently the value of *Content-Length* of the authorization request reflects the size of - // its payload size. + // By default, ``Content-Length`` header is set to ``0`` and the request to the authorization + // service has no message body. However, the authorization request *may* include the buffered + // client request body (controlled by :ref:`with_request_body + // ` + // setting) hence the value of its ``Content-Length`` reflects the size of its payload size. // AllowedHeaders *v32.ListStringMatcher `protobuf:"bytes,1,opt,name=allowed_headers,json=allowedHeaders,proto3" json:"allowed_headers,omitempty"` // Sets a list of headers that will be included to the request to authorization service. Note that @@ -535,25 +550,39 @@ func (x *AuthorizationRequest) GetHeadersToAdd() []*v3.HeaderValue { return nil } +// [#next-free-field: 6] type AuthorizationResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // When this :ref:`list ` is set, authorization + // When this :ref:`list ` is set, authorization // response headers that have a correspondent match will be added to the original client request. // Note that coexistent headers will be overridden. AllowedUpstreamHeaders *v32.ListStringMatcher `protobuf:"bytes,1,opt,name=allowed_upstream_headers,json=allowedUpstreamHeaders,proto3" json:"allowed_upstream_headers,omitempty"` - // When this :ref:`list ` is set, authorization + // When this :ref:`list ` is set, authorization // response headers that have a correspondent match will be added to the client's response. Note // that coexistent headers will be appended. AllowedUpstreamHeadersToAppend *v32.ListStringMatcher `protobuf:"bytes,3,opt,name=allowed_upstream_headers_to_append,json=allowedUpstreamHeadersToAppend,proto3" json:"allowed_upstream_headers_to_append,omitempty"` - // When this :ref:`list `. is set, authorization + // When this :ref:`list `. is set, authorization // response headers that have a correspondent match will be added to the client's response. Note // that when this list is *not* set, all the authorization response headers, except *Authority // (Host)* will be in the response to the client. When a header is included in this list, *Path*, // *Status*, *Content-Length*, *WWWAuthenticate* and *Location* are automatically added. AllowedClientHeaders *v32.ListStringMatcher `protobuf:"bytes,2,opt,name=allowed_client_headers,json=allowedClientHeaders,proto3" json:"allowed_client_headers,omitempty"` + // When this :ref:`list `. is set, authorization + // response headers that have a correspondent match will be added to the client's response when + // the authorization response itself is successful, i.e. not failed or denied. When this list is + // *not* set, no additional headers will be added to the client's response on success. + AllowedClientHeadersOnSuccess *v32.ListStringMatcher `protobuf:"bytes,4,opt,name=allowed_client_headers_on_success,json=allowedClientHeadersOnSuccess,proto3" json:"allowed_client_headers_on_success,omitempty"` + // When this :ref:`list ` is set, authorization + // response headers that have a correspondent match will be emitted as dynamic metadata to be consumed + // by the next filter. This metadata lives in a namespace specified by the canonical name of extension filter + // that requires it: + // + // - :ref:`envoy.filters.http.ext_authz ` for HTTP filter. + // - :ref:`envoy.filters.network.ext_authz ` for network filter. + DynamicMetadataFromHeaders *v32.ListStringMatcher `protobuf:"bytes,5,opt,name=dynamic_metadata_from_headers,json=dynamicMetadataFromHeaders,proto3" json:"dynamic_metadata_from_headers,omitempty"` } func (x *AuthorizationResponse) Reset() { @@ -609,6 +638,20 @@ func (x *AuthorizationResponse) GetAllowedClientHeaders() *v32.ListStringMatcher return nil } +func (x *AuthorizationResponse) GetAllowedClientHeadersOnSuccess() *v32.ListStringMatcher { + if x != nil { + return x.AllowedClientHeadersOnSuccess + } + return nil +} + +func (x *AuthorizationResponse) GetDynamicMetadataFromHeaders() *v32.ListStringMatcher { + if x != nil { + return x.DynamicMetadataFromHeaders + } + return nil +} + // Extra settings on a per virtualhost/route/weighted-cluster level. type ExtAuthzPerRoute struct { state protoimpl.MessageState @@ -700,7 +743,7 @@ type CheckSettings struct { unknownFields protoimpl.UnknownFields // Context extensions to set on the CheckRequest's - // :ref:`AttributeContext.context_extensions` + // :ref:`AttributeContext.context_extensions` // // You can use this to provide extra context for the external authorization server on specific // virtual hosts/routes. For example, adding a context extension on the virtual host level can @@ -713,10 +756,10 @@ type CheckSettings struct { // .. note:: // // These settings are only applied to a filter configured with a - // :ref:`grpc_service`. + // :ref:`grpc_service`. ContextExtensions map[string]string `protobuf:"bytes,1,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"` // When set to true, disable the configured :ref:`with_request_body - // ` for a route. + // ` for a route. DisableRequestBodyBuffering bool `protobuf:"varint,2,opt,name=disable_request_body_buffering,json=disableRequestBodyBuffering,proto3" json:"disable_request_body_buffering,omitempty"` } @@ -791,209 +834,235 @@ var file_envoy_extensions_filters_http_ext_authz_v3_ext_authz_proto_rawDesc = [] 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x08, 0x0a, - 0x08, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x12, 0x46, 0x0a, 0x0c, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x48, 0x00, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x2c, 0x0a, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x66, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x66, 0x0a, - 0x11, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, 0x6e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x1b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x09, 0x0a, 0x08, 0x45, 0x78, + 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x12, 0x46, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5e, 0x0a, 0x17, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x52, 0x15, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0f, 0x64, - 0x65, 0x6e, 0x79, 0x5f, 0x61, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, + 0x00, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, + 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x0b, 0x68, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x15, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, + 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x66, 0x0a, 0x11, 0x77, 0x69, + 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, + 0x64, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, + 0x6c, 0x65, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x41, + 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, 0x6e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x3e, 0x0a, 0x1b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x49, 0x0a, 0x21, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, 0x74, 0x79, + 0x70, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0d, - 0x64, 0x65, 0x6e, 0x79, 0x41, 0x74, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x38, 0x0a, - 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x52, 0x0a, 0x21, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1d, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x35, 0x9a, 0xc5, - 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, - 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x41, 0x75, - 0x74, 0x68, 0x7a, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, - 0xda, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x33, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, - 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, - 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x41, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, - 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, - 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xaf, 0x03, 0x0a, - 0x0b, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, - 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, - 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x75, 0x0a, 0x15, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, + 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x5e, 0x0a, 0x17, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x15, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0f, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x61, 0x74, 0x5f, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6e, 0x79, 0x41, 0x74, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x41, 0x0a, 0x1d, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x4b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, + 0x32, 0x2e, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x52, 0x09, 0x75, 0x73, + 0x65, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x22, 0xda, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x33, 0x0a, 0x11, 0x6d, 0x61, + 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0f, + 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x32, 0x0a, 0x15, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, + 0x41, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, + 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x22, 0xaf, 0x03, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, + 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x75, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x14, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x78, 0x0a, 0x16, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x14, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x78, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x38, 0x9a, 0xc5, - 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, - 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0xf5, - 0x01, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x41, 0x64, 0x64, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, + 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4a, 0x04, + 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, + 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0xf5, 0x01, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x51, 0x0a, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, + 0x5f, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x3a, 0x41, 0x9a, 0xc5, 0x88, + 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xf6, + 0x04, 0x0a, 0x15, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x18, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x55, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x22, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x70, 0x70, 0x65, + 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x52, 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x70, 0x65, + 0x6e, 0x64, 0x12, 0x5e, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x14, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x72, 0x0a, 0x21, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x1d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x6b, 0x0a, 0x1d, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x1a, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x95, 0x03, 0x0a, 0x15, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x62, 0x0a, 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x22, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, - 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x1e, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x5e, 0x0a, 0x16, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, - 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, - 0x01, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x65, 0x72, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, - 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x6c, 0x0a, 0x0e, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, - 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x7a, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x6c, 0x0a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x48, 0x00, 0x52, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, + 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0xe0, 0x02, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, + 0x1e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x1a, 0x44, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, + 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, - 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xd7, 0x02, 0x0a, 0x0d, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x7f, 0x0a, 0x12, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, - 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x1b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x69, 0x6e, 0x67, - 0x1a, 0x44, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x42, 0x53, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x42, 0x0d, - 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x42, 0xb2, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, + 0x33, 0x42, 0x0d, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, + 0x68, 0x7a, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1045,13 +1114,15 @@ var file_envoy_extensions_filters_http_ext_authz_v3_ext_authz_proto_depIdxs = [] 15, // 13: envoy.extensions.filters.http.ext_authz.v3.AuthorizationResponse.allowed_upstream_headers:type_name -> envoy.type.matcher.v3.ListStringMatcher 15, // 14: envoy.extensions.filters.http.ext_authz.v3.AuthorizationResponse.allowed_upstream_headers_to_append:type_name -> envoy.type.matcher.v3.ListStringMatcher 15, // 15: envoy.extensions.filters.http.ext_authz.v3.AuthorizationResponse.allowed_client_headers:type_name -> envoy.type.matcher.v3.ListStringMatcher - 6, // 16: envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute.check_settings:type_name -> envoy.extensions.filters.http.ext_authz.v3.CheckSettings - 7, // 17: envoy.extensions.filters.http.ext_authz.v3.CheckSettings.context_extensions:type_name -> envoy.extensions.filters.http.ext_authz.v3.CheckSettings.ContextExtensionsEntry - 18, // [18:18] is the sub-list for method output_type - 18, // [18:18] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 15, // 16: envoy.extensions.filters.http.ext_authz.v3.AuthorizationResponse.allowed_client_headers_on_success:type_name -> envoy.type.matcher.v3.ListStringMatcher + 15, // 17: envoy.extensions.filters.http.ext_authz.v3.AuthorizationResponse.dynamic_metadata_from_headers:type_name -> envoy.type.matcher.v3.ListStringMatcher + 6, // 18: envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute.check_settings:type_name -> envoy.extensions.filters.http.ext_authz.v3.CheckSettings + 7, // 19: envoy.extensions.filters.http.ext_authz.v3.CheckSettings.context_extensions:type_name -> envoy.extensions.filters.http.ext_authz.v3.CheckSettings.ContextExtensionsEntry + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_http_ext_authz_v3_ext_authz_proto_init() } diff --git a/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.validate.go index 0d10beebde..4f71fe3816 100644 --- a/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto -package envoy_extensions_filters_http_ext_authz_v3 +package ext_authzv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,28 +33,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.ApiVersion(0) ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ExtAuthz) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtAuthz with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExtAuthzMultiError, or nil +// if none found. +func (m *ExtAuthz) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtAuthz) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := v3.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return ExtAuthzValidationError{ + err := ExtAuthzValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for FailureModeAllow - if v, ok := interface{}(m.GetWithRequestBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWithRequestBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "WithRequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "WithRequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWithRequestBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "WithRequestBody", @@ -65,7 +105,26 @@ func (m *ExtAuthz) Validate() error { // no validation rules for ClearRouteCache - if v, ok := interface{}(m.GetStatusOnError()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatusOnError()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "StatusOnError", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "StatusOnError", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatusOnError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "StatusOnError", @@ -75,7 +134,26 @@ func (m *ExtAuthz) Validate() error { } } - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "FilterEnabled", @@ -85,7 +163,26 @@ func (m *ExtAuthz) Validate() error { } } - if v, ok := interface{}(m.GetFilterEnabledMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabledMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabledMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabledMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabledMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "FilterEnabledMetadata", @@ -95,7 +192,26 @@ func (m *ExtAuthz) Validate() error { } } - if v, ok := interface{}(m.GetDenyAtDisable()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDenyAtDisable()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "DenyAtDisable", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "DenyAtDisable", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDenyAtDisable()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "DenyAtDisable", @@ -109,13 +225,32 @@ func (m *ExtAuthz) Validate() error { // no validation rules for StatPrefix - // no validation rules for HiddenEnvoyDeprecatedUseAlpha + // no validation rules for BootstrapMetadataLabelsKey switch m.Services.(type) { case *ExtAuthz_GrpcService: - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "GrpcService", @@ -127,7 +262,26 @@ func (m *ExtAuthz) Validate() error { case *ExtAuthz_HttpService: - if v, ok := interface{}(m.GetHttpService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "HttpService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "HttpService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "HttpService", @@ -139,9 +293,29 @@ func (m *ExtAuthz) Validate() error { } + if len(errors) > 0 { + return ExtAuthzMultiError(errors) + } + return nil } +// ExtAuthzMultiError is an error wrapping multiple validation errors returned +// by ExtAuthz.ValidateAll() if the designated constraints aren't met. +type ExtAuthzMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtAuthzMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtAuthzMultiError) AllErrors() []error { return m } + // ExtAuthzValidationError is the validation error returned by // ExtAuthz.Validate if the designated constraints aren't met. type ExtAuthzValidationError struct { @@ -197,27 +371,66 @@ var _ interface { } = ExtAuthzValidationError{} // Validate checks the field values on BufferSettings with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *BufferSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferSettings with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BufferSettingsMultiError, +// or nil if none found. +func (m *BufferSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferSettings) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMaxRequestBytes() <= 0 { - return BufferSettingsValidationError{ + err := BufferSettingsValidationError{ field: "MaxRequestBytes", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AllowPartialMessage // no validation rules for PackAsBytes + if len(errors) > 0 { + return BufferSettingsMultiError(errors) + } + return nil } +// BufferSettingsMultiError is an error wrapping multiple validation errors +// returned by BufferSettings.ValidateAll() if the designated constraints +// aren't met. +type BufferSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferSettingsMultiError) AllErrors() []error { return m } + // BufferSettingsValidationError is the validation error returned by // BufferSettings.Validate if the designated constraints aren't met. type BufferSettingsValidationError struct { @@ -273,14 +486,47 @@ var _ interface { } = BufferSettingsValidationError{} // Validate checks the field values on HttpService with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpService with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpServiceMultiError, or +// nil if none found. +func (m *HttpService) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpService) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetServerUri()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetServerUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "ServerUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "ServerUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServerUri()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "ServerUri", @@ -292,7 +538,26 @@ func (m *HttpService) Validate() error { // no validation rules for PathPrefix - if v, ok := interface{}(m.GetAuthorizationRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAuthorizationRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthorizationRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationRequest", @@ -302,7 +567,26 @@ func (m *HttpService) Validate() error { } } - if v, ok := interface{}(m.GetAuthorizationResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAuthorizationResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpServiceValidationError{ + field: "AuthorizationResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthorizationResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationResponse", @@ -312,9 +596,29 @@ func (m *HttpService) Validate() error { } } + if len(errors) > 0 { + return HttpServiceMultiError(errors) + } + return nil } +// HttpServiceMultiError is an error wrapping multiple validation errors +// returned by HttpService.ValidateAll() if the designated constraints aren't met. +type HttpServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpServiceMultiError) AllErrors() []error { return m } + // HttpServiceValidationError is the validation error returned by // HttpService.Validate if the designated constraints aren't met. type HttpServiceValidationError struct { @@ -371,13 +675,46 @@ var _ interface { // Validate checks the field values on AuthorizationRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AuthorizationRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AuthorizationRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AuthorizationRequestMultiError, or nil if none found. +func (m *AuthorizationRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AuthorizationRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAllowedHeaders()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAllowedHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: "AllowedHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: "AllowedHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationRequestValidationError{ field: "AllowedHeaders", @@ -390,7 +727,26 @@ func (m *AuthorizationRequest) Validate() error { for idx, item := range m.GetHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationRequestValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationRequestValidationError{ field: fmt.Sprintf("HeadersToAdd[%v]", idx), @@ -402,9 +758,30 @@ func (m *AuthorizationRequest) Validate() error { } + if len(errors) > 0 { + return AuthorizationRequestMultiError(errors) + } + return nil } +// AuthorizationRequestMultiError is an error wrapping multiple validation +// errors returned by AuthorizationRequest.ValidateAll() if the designated +// constraints aren't met. +type AuthorizationRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AuthorizationRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AuthorizationRequestMultiError) AllErrors() []error { return m } + // AuthorizationRequestValidationError is the validation error returned by // AuthorizationRequest.Validate if the designated constraints aren't met. type AuthorizationRequestValidationError struct { @@ -463,13 +840,46 @@ var _ interface { // Validate checks the field values on AuthorizationResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AuthorizationResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AuthorizationResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AuthorizationResponseMultiError, or nil if none found. +func (m *AuthorizationResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *AuthorizationResponse) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAllowedUpstreamHeaders()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAllowedUpstreamHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedUpstreamHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedUpstreamHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedUpstreamHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedUpstreamHeaders", @@ -479,7 +889,26 @@ func (m *AuthorizationResponse) Validate() error { } } - if v, ok := interface{}(m.GetAllowedUpstreamHeadersToAppend()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowedUpstreamHeadersToAppend()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedUpstreamHeadersToAppend", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedUpstreamHeadersToAppend", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedUpstreamHeadersToAppend()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedUpstreamHeadersToAppend", @@ -489,7 +918,26 @@ func (m *AuthorizationResponse) Validate() error { } } - if v, ok := interface{}(m.GetAllowedClientHeaders()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowedClientHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedClientHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedClientHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedClientHeaders()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedClientHeaders", @@ -499,9 +947,88 @@ func (m *AuthorizationResponse) Validate() error { } } + if all { + switch v := interface{}(m.GetAllowedClientHeadersOnSuccess()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedClientHeadersOnSuccess", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "AllowedClientHeadersOnSuccess", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowedClientHeadersOnSuccess()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AuthorizationResponseValidationError{ + field: "AllowedClientHeadersOnSuccess", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDynamicMetadataFromHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "DynamicMetadataFromHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationResponseValidationError{ + field: "DynamicMetadataFromHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadataFromHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AuthorizationResponseValidationError{ + field: "DynamicMetadataFromHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AuthorizationResponseMultiError(errors) + } + return nil } +// AuthorizationResponseMultiError is an error wrapping multiple validation +// errors returned by AuthorizationResponse.ValidateAll() if the designated +// constraints aren't met. +type AuthorizationResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AuthorizationResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AuthorizationResponseMultiError) AllErrors() []error { return m } + // AuthorizationResponseValidationError is the validation error returned by // AuthorizationResponse.Validate if the designated constraints aren't met. type AuthorizationResponseValidationError struct { @@ -559,34 +1086,75 @@ var _ interface { } = AuthorizationResponseValidationError{} // Validate checks the field values on ExtAuthzPerRoute with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ExtAuthzPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtAuthzPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtAuthzPerRouteMultiError, or nil if none found. +func (m *ExtAuthzPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtAuthzPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Override.(type) { case *ExtAuthzPerRoute_Disabled: if m.GetDisabled() != true { - return ExtAuthzPerRouteValidationError{ + err := ExtAuthzPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *ExtAuthzPerRoute_CheckSettings: if m.GetCheckSettings() == nil { - return ExtAuthzPerRouteValidationError{ + err := ExtAuthzPerRouteValidationError{ field: "CheckSettings", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCheckSettings()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCheckSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzPerRouteValidationError{ + field: "CheckSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzPerRouteValidationError{ + field: "CheckSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCheckSettings()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzPerRouteValidationError{ field: "CheckSettings", @@ -597,16 +1165,41 @@ func (m *ExtAuthzPerRoute) Validate() error { } default: - return ExtAuthzPerRouteValidationError{ + err := ExtAuthzPerRouteValidationError{ field: "Override", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ExtAuthzPerRouteMultiError(errors) } return nil } +// ExtAuthzPerRouteMultiError is an error wrapping multiple validation errors +// returned by ExtAuthzPerRoute.ValidateAll() if the designated constraints +// aren't met. +type ExtAuthzPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtAuthzPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtAuthzPerRouteMultiError) AllErrors() []error { return m } + // ExtAuthzPerRouteValidationError is the validation error returned by // ExtAuthzPerRoute.Validate if the designated constraints aren't met. type ExtAuthzPerRouteValidationError struct { @@ -662,20 +1255,55 @@ var _ interface { } = ExtAuthzPerRouteValidationError{} // Validate checks the field values on CheckSettings with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CheckSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckSettings with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckSettingsMultiError, or +// nil if none found. +func (m *CheckSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckSettings) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ContextExtensions // no validation rules for DisableRequestBodyBuffering + if len(errors) > 0 { + return CheckSettingsMultiError(errors) + } + return nil } +// CheckSettingsMultiError is an error wrapping multiple validation errors +// returned by CheckSettings.ValidateAll() if the designated constraints +// aren't met. +type CheckSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckSettingsMultiError) AllErrors() []error { return m } + // CheckSettingsValidationError is the validation error returned by // CheckSettings.Validate if the designated constraints aren't met. type CheckSettingsValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.pb.go b/pkg/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.pb.go deleted file mode 100644 index ebf8ed90d2..0000000000 --- a/pkg/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.pb.go +++ /dev/null @@ -1,1171 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.proto - -package envoy_extensions_filters_http_ext_authz_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 15] -type ExtAuthz struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // External authorization service configuration. - // - // Types that are assignable to Services: - // *ExtAuthz_GrpcService - // *ExtAuthz_HttpService - Services isExtAuthz_Services `protobuf_oneof:"services"` - // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and - // version of messages used on the wire. - TransportApiVersion v4alpha.ApiVersion `protobuf:"varint,12,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"transport_api_version,omitempty"` - // Changes filter's behaviour on errors: - // - // 1. When set to true, the filter will *accept* client request even if the communication with - // the authorization service has failed, or if the authorization service has returned a HTTP 5xx - // error. - // - // 2. When set to false, ext-authz will *reject* client requests and return a *Forbidden* - // response if the communication with the authorization service has failed, or if the - // authorization service has returned a HTTP 5xx error. - // - // Note that errors can be *always* tracked in the :ref:`stats - // `. - FailureModeAllow bool `protobuf:"varint,2,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"` - // Enables filter to buffer the client request body and send it within the authorization request. - // A ``x-envoy-auth-partial-body: false|true`` metadata header will be added to the authorization - // request message indicating if the body data is partial. - WithRequestBody *BufferSettings `protobuf:"bytes,5,opt,name=with_request_body,json=withRequestBody,proto3" json:"with_request_body,omitempty"` - // Clears route cache in order to allow the external authorization service to correctly affect - // routing decisions. Filter clears all cached routes when: - // - // 1. The field is set to *true*. - // - // 2. The status returned from the authorization service is a HTTP 200 or gRPC 0. - // - // 3. At least one *authorization response header* is added to the client request, or is used for - // altering another client request header. - // - ClearRouteCache bool `protobuf:"varint,6,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"` - // Sets the HTTP status that is returned to the client when there is a network error between the - // filter and the authorization server. The default status is HTTP 403 Forbidden. - StatusOnError *v3.HttpStatus `protobuf:"bytes,7,opt,name=status_on_error,json=statusOnError,proto3" json:"status_on_error,omitempty"` - // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service as an opaque *protobuf::Struct*. - // - // For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata - // ` is set, - // then the following will pass the jwt payload to the authorization server. - // - // .. code-block:: yaml - // - // metadata_context_namespaces: - // - envoy.filters.http.jwt_authn - // - MetadataContextNamespaces []string `protobuf:"bytes,8,rep,name=metadata_context_namespaces,json=metadataContextNamespaces,proto3" json:"metadata_context_namespaces,omitempty"` - // Specifies if the filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // If this field is not specified, the filter will be enabled for all requests. - FilterEnabled *v4alpha.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"` - // Specifies if the filter is enabled with metadata matcher. - // If this field is not specified, the filter will be enabled for all requests. - FilterEnabledMetadata *v4alpha1.MetadataMatcher `protobuf:"bytes,14,opt,name=filter_enabled_metadata,json=filterEnabledMetadata,proto3" json:"filter_enabled_metadata,omitempty"` - // Specifies whether to deny the requests, when the filter is disabled. - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to determine whether to deny request for - // filter protected path at filter disabling. If filter is disabled in - // typed_per_filter_config for the path, requests will not be denied. - // - // If this field is not specified, all requests will be allowed when disabled. - DenyAtDisable *v4alpha.RuntimeFeatureFlag `protobuf:"bytes,11,opt,name=deny_at_disable,json=denyAtDisable,proto3" json:"deny_at_disable,omitempty"` - // Specifies if the peer certificate is sent to the external service. - // - // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - IncludePeerCertificate bool `protobuf:"varint,10,opt,name=include_peer_certificate,json=includePeerCertificate,proto3" json:"include_peer_certificate,omitempty"` - // Optional additional prefix to use when emitting statistics. This allows to distinguish - // emitted statistics between configured *ext_authz* filters in an HTTP filter chain. For example: - // - // .. code-block:: yaml - // - // http_filters: - // - name: envoy.filters.http.ext_authz - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz - // stat_prefix: waf # This emits ext_authz.waf.ok, ext_authz.waf.denied, etc. - // - name: envoy.filters.http.ext_authz - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz - // stat_prefix: blocker # This emits ext_authz.blocker.ok, ext_authz.blocker.denied, etc. - // - StatPrefix string `protobuf:"bytes,13,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` -} - -func (x *ExtAuthz) Reset() { - *x = ExtAuthz{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtAuthz) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtAuthz) ProtoMessage() {} - -func (x *ExtAuthz) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtAuthz.ProtoReflect.Descriptor instead. -func (*ExtAuthz) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{0} -} - -func (m *ExtAuthz) GetServices() isExtAuthz_Services { - if m != nil { - return m.Services - } - return nil -} - -func (x *ExtAuthz) GetGrpcService() *v4alpha.GrpcService { - if x, ok := x.GetServices().(*ExtAuthz_GrpcService); ok { - return x.GrpcService - } - return nil -} - -func (x *ExtAuthz) GetHttpService() *HttpService { - if x, ok := x.GetServices().(*ExtAuthz_HttpService); ok { - return x.HttpService - } - return nil -} - -func (x *ExtAuthz) GetTransportApiVersion() v4alpha.ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return v4alpha.ApiVersion_hidden_envoy_deprecated_AUTO -} - -func (x *ExtAuthz) GetFailureModeAllow() bool { - if x != nil { - return x.FailureModeAllow - } - return false -} - -func (x *ExtAuthz) GetWithRequestBody() *BufferSettings { - if x != nil { - return x.WithRequestBody - } - return nil -} - -func (x *ExtAuthz) GetClearRouteCache() bool { - if x != nil { - return x.ClearRouteCache - } - return false -} - -func (x *ExtAuthz) GetStatusOnError() *v3.HttpStatus { - if x != nil { - return x.StatusOnError - } - return nil -} - -func (x *ExtAuthz) GetMetadataContextNamespaces() []string { - if x != nil { - return x.MetadataContextNamespaces - } - return nil -} - -func (x *ExtAuthz) GetFilterEnabled() *v4alpha.RuntimeFractionalPercent { - if x != nil { - return x.FilterEnabled - } - return nil -} - -func (x *ExtAuthz) GetFilterEnabledMetadata() *v4alpha1.MetadataMatcher { - if x != nil { - return x.FilterEnabledMetadata - } - return nil -} - -func (x *ExtAuthz) GetDenyAtDisable() *v4alpha.RuntimeFeatureFlag { - if x != nil { - return x.DenyAtDisable - } - return nil -} - -func (x *ExtAuthz) GetIncludePeerCertificate() bool { - if x != nil { - return x.IncludePeerCertificate - } - return false -} - -func (x *ExtAuthz) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -type isExtAuthz_Services interface { - isExtAuthz_Services() -} - -type ExtAuthz_GrpcService struct { - // gRPC service configuration (default timeout: 200ms). - GrpcService *v4alpha.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3,oneof"` -} - -type ExtAuthz_HttpService struct { - // HTTP service configuration (default timeout: 200ms). - HttpService *HttpService `protobuf:"bytes,3,opt,name=http_service,json=httpService,proto3,oneof"` -} - -func (*ExtAuthz_GrpcService) isExtAuthz_Services() {} - -func (*ExtAuthz_HttpService) isExtAuthz_Services() {} - -// Configuration for buffering the request data. -type BufferSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Sets the maximum size of a message body that the filter will hold in memory. Envoy will return - // *HTTP 413* and will *not* initiate the authorization process when buffer reaches the number - // set in this field. Note that this setting will have precedence over :ref:`failure_mode_allow - // `. - MaxRequestBytes uint32 `protobuf:"varint,1,opt,name=max_request_bytes,json=maxRequestBytes,proto3" json:"max_request_bytes,omitempty"` - // When this field is true, Envoy will buffer the message until *max_request_bytes* is reached. - // The authorization request will be dispatched and no 413 HTTP error will be returned by the - // filter. - AllowPartialMessage bool `protobuf:"varint,2,opt,name=allow_partial_message,json=allowPartialMessage,proto3" json:"allow_partial_message,omitempty"` - // If true, the body sent to the external authorization service is set with raw bytes, it sets - // the :ref:`raw_body` - // field of HTTP request attribute context. Otherwise, :ref:` - // body` will be filled - // with UTF-8 string request body. - PackAsBytes bool `protobuf:"varint,3,opt,name=pack_as_bytes,json=packAsBytes,proto3" json:"pack_as_bytes,omitempty"` -} - -func (x *BufferSettings) Reset() { - *x = BufferSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BufferSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BufferSettings) ProtoMessage() {} - -func (x *BufferSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BufferSettings.ProtoReflect.Descriptor instead. -func (*BufferSettings) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{1} -} - -func (x *BufferSettings) GetMaxRequestBytes() uint32 { - if x != nil { - return x.MaxRequestBytes - } - return 0 -} - -func (x *BufferSettings) GetAllowPartialMessage() bool { - if x != nil { - return x.AllowPartialMessage - } - return false -} - -func (x *BufferSettings) GetPackAsBytes() bool { - if x != nil { - return x.PackAsBytes - } - return false -} - -// HttpService is used for raw HTTP communication between the filter and the authorization service. -// When configured, the filter will parse the client request and use these attributes to call the -// authorization server. Depending on the response, the filter may reject or accept the client -// request. Note that in any of these events, metadata can be added, removed or overridden by the -// filter: -// -// *On authorization request*, a list of allowed request headers may be supplied. See -// :ref:`allowed_headers -// ` -// for details. Additional headers metadata may be added to the authorization request. See -// :ref:`headers_to_add -// ` for -// details. -// -// On authorization response status HTTP 200 OK, the filter will allow traffic to the upstream and -// additional headers metadata may be added to the original client request. See -// :ref:`allowed_upstream_headers -// ` -// for details. -// -// On other authorization response statuses, the filter will not allow traffic. Additional headers -// metadata as well as body may be added to the client's response. See :ref:`allowed_client_headers -// ` -// for details. -// [#next-free-field: 9] -type HttpService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Sets the HTTP server URI which the authorization requests must be sent to. - ServerUri *v4alpha.HttpUri `protobuf:"bytes,1,opt,name=server_uri,json=serverUri,proto3" json:"server_uri,omitempty"` - // Sets a prefix to the value of authorization request header *Path*. - PathPrefix string `protobuf:"bytes,2,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` - // Settings used for controlling authorization request metadata. - AuthorizationRequest *AuthorizationRequest `protobuf:"bytes,7,opt,name=authorization_request,json=authorizationRequest,proto3" json:"authorization_request,omitempty"` - // Settings used for controlling authorization response metadata. - AuthorizationResponse *AuthorizationResponse `protobuf:"bytes,8,opt,name=authorization_response,json=authorizationResponse,proto3" json:"authorization_response,omitempty"` -} - -func (x *HttpService) Reset() { - *x = HttpService{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpService) ProtoMessage() {} - -func (x *HttpService) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpService.ProtoReflect.Descriptor instead. -func (*HttpService) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{2} -} - -func (x *HttpService) GetServerUri() *v4alpha.HttpUri { - if x != nil { - return x.ServerUri - } - return nil -} - -func (x *HttpService) GetPathPrefix() string { - if x != nil { - return x.PathPrefix - } - return "" -} - -func (x *HttpService) GetAuthorizationRequest() *AuthorizationRequest { - if x != nil { - return x.AuthorizationRequest - } - return nil -} - -func (x *HttpService) GetAuthorizationResponse() *AuthorizationResponse { - if x != nil { - return x.AuthorizationResponse - } - return nil -} - -type AuthorizationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Authorization request will include the client request headers that have a correspondent match - // in the :ref:`list `. Note that in addition to the - // user's supplied matchers: - // - // 1. *Host*, *Method*, *Path* and *Content-Length* are automatically included to the list. - // - // 2. *Content-Length* will be set to 0 and the request to the authorization service will not have - // a message body. However, the authorization request can include the buffered client request body - // (controlled by :ref:`with_request_body - // ` setting), - // consequently the value of *Content-Length* of the authorization request reflects the size of - // its payload size. - // - AllowedHeaders *v4alpha1.ListStringMatcher `protobuf:"bytes,1,opt,name=allowed_headers,json=allowedHeaders,proto3" json:"allowed_headers,omitempty"` - // Sets a list of headers that will be included to the request to authorization service. Note that - // client request of the same key will be overridden. - HeadersToAdd []*v4alpha.HeaderValue `protobuf:"bytes,2,rep,name=headers_to_add,json=headersToAdd,proto3" json:"headers_to_add,omitempty"` -} - -func (x *AuthorizationRequest) Reset() { - *x = AuthorizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthorizationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthorizationRequest) ProtoMessage() {} - -func (x *AuthorizationRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthorizationRequest.ProtoReflect.Descriptor instead. -func (*AuthorizationRequest) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{3} -} - -func (x *AuthorizationRequest) GetAllowedHeaders() *v4alpha1.ListStringMatcher { - if x != nil { - return x.AllowedHeaders - } - return nil -} - -func (x *AuthorizationRequest) GetHeadersToAdd() []*v4alpha.HeaderValue { - if x != nil { - return x.HeadersToAdd - } - return nil -} - -type AuthorizationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // When this :ref:`list ` is set, authorization - // response headers that have a correspondent match will be added to the original client request. - // Note that coexistent headers will be overridden. - AllowedUpstreamHeaders *v4alpha1.ListStringMatcher `protobuf:"bytes,1,opt,name=allowed_upstream_headers,json=allowedUpstreamHeaders,proto3" json:"allowed_upstream_headers,omitempty"` - // When this :ref:`list ` is set, authorization - // response headers that have a correspondent match will be added to the client's response. Note - // that coexistent headers will be appended. - AllowedUpstreamHeadersToAppend *v4alpha1.ListStringMatcher `protobuf:"bytes,3,opt,name=allowed_upstream_headers_to_append,json=allowedUpstreamHeadersToAppend,proto3" json:"allowed_upstream_headers_to_append,omitempty"` - // When this :ref:`list `. is set, authorization - // response headers that have a correspondent match will be added to the client's response. Note - // that when this list is *not* set, all the authorization response headers, except *Authority - // (Host)* will be in the response to the client. When a header is included in this list, *Path*, - // *Status*, *Content-Length*, *WWWAuthenticate* and *Location* are automatically added. - AllowedClientHeaders *v4alpha1.ListStringMatcher `protobuf:"bytes,2,opt,name=allowed_client_headers,json=allowedClientHeaders,proto3" json:"allowed_client_headers,omitempty"` -} - -func (x *AuthorizationResponse) Reset() { - *x = AuthorizationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthorizationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthorizationResponse) ProtoMessage() {} - -func (x *AuthorizationResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthorizationResponse.ProtoReflect.Descriptor instead. -func (*AuthorizationResponse) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{4} -} - -func (x *AuthorizationResponse) GetAllowedUpstreamHeaders() *v4alpha1.ListStringMatcher { - if x != nil { - return x.AllowedUpstreamHeaders - } - return nil -} - -func (x *AuthorizationResponse) GetAllowedUpstreamHeadersToAppend() *v4alpha1.ListStringMatcher { - if x != nil { - return x.AllowedUpstreamHeadersToAppend - } - return nil -} - -func (x *AuthorizationResponse) GetAllowedClientHeaders() *v4alpha1.ListStringMatcher { - if x != nil { - return x.AllowedClientHeaders - } - return nil -} - -// Extra settings on a per virtualhost/route/weighted-cluster level. -type ExtAuthzPerRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Override: - // *ExtAuthzPerRoute_Disabled - // *ExtAuthzPerRoute_CheckSettings - Override isExtAuthzPerRoute_Override `protobuf_oneof:"override"` -} - -func (x *ExtAuthzPerRoute) Reset() { - *x = ExtAuthzPerRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtAuthzPerRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtAuthzPerRoute) ProtoMessage() {} - -func (x *ExtAuthzPerRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtAuthzPerRoute.ProtoReflect.Descriptor instead. -func (*ExtAuthzPerRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{5} -} - -func (m *ExtAuthzPerRoute) GetOverride() isExtAuthzPerRoute_Override { - if m != nil { - return m.Override - } - return nil -} - -func (x *ExtAuthzPerRoute) GetDisabled() bool { - if x, ok := x.GetOverride().(*ExtAuthzPerRoute_Disabled); ok { - return x.Disabled - } - return false -} - -func (x *ExtAuthzPerRoute) GetCheckSettings() *CheckSettings { - if x, ok := x.GetOverride().(*ExtAuthzPerRoute_CheckSettings); ok { - return x.CheckSettings - } - return nil -} - -type isExtAuthzPerRoute_Override interface { - isExtAuthzPerRoute_Override() -} - -type ExtAuthzPerRoute_Disabled struct { - // Disable the ext auth filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` -} - -type ExtAuthzPerRoute_CheckSettings struct { - // Check request settings for this route. - CheckSettings *CheckSettings `protobuf:"bytes,2,opt,name=check_settings,json=checkSettings,proto3,oneof"` -} - -func (*ExtAuthzPerRoute_Disabled) isExtAuthzPerRoute_Override() {} - -func (*ExtAuthzPerRoute_CheckSettings) isExtAuthzPerRoute_Override() {} - -// Extra settings for the check request. -type CheckSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Context extensions to set on the CheckRequest's - // :ref:`AttributeContext.context_extensions` - // - // You can use this to provide extra context for the external authorization server on specific - // virtual hosts/routes. For example, adding a context extension on the virtual host level can - // give the ext-authz server information on what virtual host is used without needing to parse the - // host header. If CheckSettings is specified in multiple per-filter-configs, they will be merged - // in order, and the result will be used. - // - // Merge semantics for this field are such that keys from more specific configs override. - // - // .. note:: - // - // These settings are only applied to a filter configured with a - // :ref:`grpc_service`. - ContextExtensions map[string]string `protobuf:"bytes,1,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"` - // When set to true, disable the configured :ref:`with_request_body - // ` for a route. - DisableRequestBodyBuffering bool `protobuf:"varint,2,opt,name=disable_request_body_buffering,json=disableRequestBodyBuffering,proto3" json:"disable_request_body_buffering,omitempty"` -} - -func (x *CheckSettings) Reset() { - *x = CheckSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckSettings) ProtoMessage() {} - -func (x *CheckSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckSettings.ProtoReflect.Descriptor instead. -func (*CheckSettings) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{6} -} - -func (x *CheckSettings) GetContextExtensions() map[string]string { - if x != nil { - return x.ContextExtensions - } - return nil -} - -func (x *CheckSettings) GetDisableRequestBodyBuffering() bool { - if x != nil { - return x.DisableRequestBodyBuffering - } - return false -} - -var File_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDesc = []byte{ - 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x08, 0x0a, 0x08, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x12, 0x4b, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, - 0x00, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, - 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x63, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, - 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x69, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x6b, 0x0a, 0x11, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, - 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6c, - 0x65, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x41, 0x0a, - 0x0f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x3e, 0x0a, 0x1b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x12, 0x5a, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x17, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x15, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x55, 0x0a, 0x0f, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x61, 0x74, 0x5f, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0d, 0x64, 0x65, 0x6e, 0x79, 0x41, - 0x74, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x42, - 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, - 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x22, 0xdf, 0x01, 0x0a, - 0x0e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x33, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, - 0x02, 0x20, 0x00, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, - 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, - 0x5f, 0x61, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x41, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x40, 0x9a, 0xc5, - 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, - 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xc3, - 0x03, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, - 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x72, - 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x7a, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x14, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7d, - 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, - 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x3d, 0x9a, - 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x03, - 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, - 0x08, 0x06, 0x10, 0x07, 0x22, 0x84, 0x02, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x56, 0x0a, - 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x41, 0x64, 0x64, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa9, 0x03, 0x0a, 0x15, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, - 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x55, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x79, - 0x0a, 0x22, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x54, 0x6f, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x63, 0x0a, 0x16, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x47, - 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, - 0x33, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x7a, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, - 0x68, 0x7a, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xe2, 0x02, 0x0a, 0x0d, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x84, 0x01, - 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x55, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, - 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, - 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x44, 0x0a, 0x16, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x42, 0x58, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x0d, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescData = file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDesc -) - -func file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDescData -} - -var file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_goTypes = []interface{}{ - (*ExtAuthz)(nil), // 0: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz - (*BufferSettings)(nil), // 1: envoy.extensions.filters.http.ext_authz.v4alpha.BufferSettings - (*HttpService)(nil), // 2: envoy.extensions.filters.http.ext_authz.v4alpha.HttpService - (*AuthorizationRequest)(nil), // 3: envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationRequest - (*AuthorizationResponse)(nil), // 4: envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationResponse - (*ExtAuthzPerRoute)(nil), // 5: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthzPerRoute - (*CheckSettings)(nil), // 6: envoy.extensions.filters.http.ext_authz.v4alpha.CheckSettings - nil, // 7: envoy.extensions.filters.http.ext_authz.v4alpha.CheckSettings.ContextExtensionsEntry - (*v4alpha.GrpcService)(nil), // 8: envoy.config.core.v4alpha.GrpcService - (v4alpha.ApiVersion)(0), // 9: envoy.config.core.v4alpha.ApiVersion - (*v3.HttpStatus)(nil), // 10: envoy.type.v3.HttpStatus - (*v4alpha.RuntimeFractionalPercent)(nil), // 11: envoy.config.core.v4alpha.RuntimeFractionalPercent - (*v4alpha1.MetadataMatcher)(nil), // 12: envoy.type.matcher.v4alpha.MetadataMatcher - (*v4alpha.RuntimeFeatureFlag)(nil), // 13: envoy.config.core.v4alpha.RuntimeFeatureFlag - (*v4alpha.HttpUri)(nil), // 14: envoy.config.core.v4alpha.HttpUri - (*v4alpha1.ListStringMatcher)(nil), // 15: envoy.type.matcher.v4alpha.ListStringMatcher - (*v4alpha.HeaderValue)(nil), // 16: envoy.config.core.v4alpha.HeaderValue -} -var file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_depIdxs = []int32{ - 8, // 0: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 2, // 1: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.http_service:type_name -> envoy.extensions.filters.http.ext_authz.v4alpha.HttpService - 9, // 2: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.transport_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 1, // 3: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.with_request_body:type_name -> envoy.extensions.filters.http.ext_authz.v4alpha.BufferSettings - 10, // 4: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.status_on_error:type_name -> envoy.type.v3.HttpStatus - 11, // 5: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.filter_enabled:type_name -> envoy.config.core.v4alpha.RuntimeFractionalPercent - 12, // 6: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.filter_enabled_metadata:type_name -> envoy.type.matcher.v4alpha.MetadataMatcher - 13, // 7: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthz.deny_at_disable:type_name -> envoy.config.core.v4alpha.RuntimeFeatureFlag - 14, // 8: envoy.extensions.filters.http.ext_authz.v4alpha.HttpService.server_uri:type_name -> envoy.config.core.v4alpha.HttpUri - 3, // 9: envoy.extensions.filters.http.ext_authz.v4alpha.HttpService.authorization_request:type_name -> envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationRequest - 4, // 10: envoy.extensions.filters.http.ext_authz.v4alpha.HttpService.authorization_response:type_name -> envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationResponse - 15, // 11: envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationRequest.allowed_headers:type_name -> envoy.type.matcher.v4alpha.ListStringMatcher - 16, // 12: envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationRequest.headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValue - 15, // 13: envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationResponse.allowed_upstream_headers:type_name -> envoy.type.matcher.v4alpha.ListStringMatcher - 15, // 14: envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationResponse.allowed_upstream_headers_to_append:type_name -> envoy.type.matcher.v4alpha.ListStringMatcher - 15, // 15: envoy.extensions.filters.http.ext_authz.v4alpha.AuthorizationResponse.allowed_client_headers:type_name -> envoy.type.matcher.v4alpha.ListStringMatcher - 6, // 16: envoy.extensions.filters.http.ext_authz.v4alpha.ExtAuthzPerRoute.check_settings:type_name -> envoy.extensions.filters.http.ext_authz.v4alpha.CheckSettings - 7, // 17: envoy.extensions.filters.http.ext_authz.v4alpha.CheckSettings.context_extensions:type_name -> envoy.extensions.filters.http.ext_authz.v4alpha.CheckSettings.ContextExtensionsEntry - 18, // [18:18] is the sub-list for method output_type - 18, // [18:18] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_init() } -func file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_init() { - if File_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtAuthz); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BufferSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtAuthzPerRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*ExtAuthz_GrpcService)(nil), - (*ExtAuthz_HttpService)(nil), - } - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*ExtAuthzPerRoute_Disabled)(nil), - (*ExtAuthzPerRoute_CheckSettings)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto = out.File - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_rawDesc = nil - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_goTypes = nil - file_envoy_extensions_filters_http_ext_authz_v4alpha_ext_authz_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.pb.validate.go deleted file mode 100644 index d3b06796ff..0000000000 --- a/pkg/api/envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.pb.validate.go +++ /dev/null @@ -1,729 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/ext_authz/v4alpha/ext_authz.proto - -package envoy_extensions_filters_http_ext_authz_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.ApiVersion(0) -) - -// 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 { - if m == nil { - return nil - } - - if _, ok := v4alpha.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return ExtAuthzValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - } - - // no validation rules for FailureModeAllow - - if v, ok := interface{}(m.GetWithRequestBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "WithRequestBody", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ClearRouteCache - - if v, ok := interface{}(m.GetStatusOnError()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "StatusOnError", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetFilterEnabledMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "FilterEnabledMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetDenyAtDisable()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "DenyAtDisable", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for IncludePeerCertificate - - // no validation rules for StatPrefix - - switch m.Services.(type) { - - case *ExtAuthz_GrpcService: - - 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, - } - } - } - - case *ExtAuthz_HttpService: - - if v, ok := interface{}(m.GetHttpService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "HttpService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ExtAuthzValidationError is the validation error returned by -// ExtAuthz.Validate if the designated constraints aren't met. -type ExtAuthzValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtAuthzValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtAuthzValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtAuthzValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtAuthzValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtAuthzValidationError) ErrorName() string { return "ExtAuthzValidationError" } - -// Error satisfies the builtin error interface -func (e ExtAuthzValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtAuthz.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtAuthzValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtAuthzValidationError{} - -// Validate checks the field values on BufferSettings with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *BufferSettings) Validate() error { - if m == nil { - return nil - } - - if m.GetMaxRequestBytes() <= 0 { - return BufferSettingsValidationError{ - field: "MaxRequestBytes", - reason: "value must be greater than 0", - } - } - - // no validation rules for AllowPartialMessage - - // no validation rules for PackAsBytes - - return nil -} - -// BufferSettingsValidationError is the validation error returned by -// BufferSettings.Validate if the designated constraints aren't met. -type BufferSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BufferSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BufferSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BufferSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BufferSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BufferSettingsValidationError) ErrorName() string { return "BufferSettingsValidationError" } - -// Error satisfies the builtin error interface -func (e BufferSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBufferSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BufferSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BufferSettingsValidationError{} - -// Validate checks the field values on HttpService with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HttpService) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetServerUri()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpServiceValidationError{ - field: "ServerUri", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for PathPrefix - - if v, ok := interface{}(m.GetAuthorizationRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpServiceValidationError{ - field: "AuthorizationRequest", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAuthorizationResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpServiceValidationError{ - field: "AuthorizationResponse", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// HttpServiceValidationError is the validation error returned by -// HttpService.Validate if the designated constraints aren't met. -type HttpServiceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpServiceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpServiceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpServiceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpServiceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpServiceValidationError) ErrorName() string { return "HttpServiceValidationError" } - -// Error satisfies the builtin error interface -func (e HttpServiceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpService.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpServiceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpServiceValidationError{} - -// Validate checks the field values on AuthorizationRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *AuthorizationRequest) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetAllowedHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AuthorizationRequestValidationError{ - field: "AllowedHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHeadersToAdd() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AuthorizationRequestValidationError{ - field: fmt.Sprintf("HeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// AuthorizationRequestValidationError is the validation error returned by -// AuthorizationRequest.Validate if the designated constraints aren't met. -type AuthorizationRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AuthorizationRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AuthorizationRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AuthorizationRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AuthorizationRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AuthorizationRequestValidationError) ErrorName() string { - return "AuthorizationRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e AuthorizationRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAuthorizationRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AuthorizationRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AuthorizationRequestValidationError{} - -// Validate checks the field values on AuthorizationResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *AuthorizationResponse) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetAllowedUpstreamHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AuthorizationResponseValidationError{ - field: "AllowedUpstreamHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAllowedUpstreamHeadersToAppend()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AuthorizationResponseValidationError{ - field: "AllowedUpstreamHeadersToAppend", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAllowedClientHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AuthorizationResponseValidationError{ - field: "AllowedClientHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// AuthorizationResponseValidationError is the validation error returned by -// AuthorizationResponse.Validate if the designated constraints aren't met. -type AuthorizationResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AuthorizationResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AuthorizationResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AuthorizationResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AuthorizationResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AuthorizationResponseValidationError) ErrorName() string { - return "AuthorizationResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e AuthorizationResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAuthorizationResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AuthorizationResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AuthorizationResponseValidationError{} - -// Validate checks the field values on ExtAuthzPerRoute with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ExtAuthzPerRoute) Validate() error { - if m == nil { - return nil - } - - switch m.Override.(type) { - - case *ExtAuthzPerRoute_Disabled: - - if m.GetDisabled() != true { - return ExtAuthzPerRouteValidationError{ - field: "Disabled", - reason: "value must equal true", - } - } - - case *ExtAuthzPerRoute_CheckSettings: - - if m.GetCheckSettings() == nil { - return ExtAuthzPerRouteValidationError{ - field: "CheckSettings", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetCheckSettings()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzPerRouteValidationError{ - field: "CheckSettings", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return ExtAuthzPerRouteValidationError{ - field: "Override", - reason: "value is required", - } - - } - - return nil -} - -// ExtAuthzPerRouteValidationError is the validation error returned by -// ExtAuthzPerRoute.Validate if the designated constraints aren't met. -type ExtAuthzPerRouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtAuthzPerRouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtAuthzPerRouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtAuthzPerRouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtAuthzPerRouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtAuthzPerRouteValidationError) ErrorName() string { return "ExtAuthzPerRouteValidationError" } - -// Error satisfies the builtin error interface -func (e ExtAuthzPerRouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtAuthzPerRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtAuthzPerRouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtAuthzPerRouteValidationError{} - -// Validate checks the field values on CheckSettings with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *CheckSettings) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ContextExtensions - - // no validation rules for DisableRequestBodyBuffering - - return nil -} - -// CheckSettingsValidationError is the validation error returned by -// CheckSettings.Validate if the designated constraints aren't met. -type CheckSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckSettingsValidationError) ErrorName() string { return "CheckSettingsValidationError" } - -// Error satisfies the builtin error interface -func (e CheckSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckSettingsValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.go b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.go new file mode 100644 index 0000000000..f7822c0e91 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.go @@ -0,0 +1,558 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto + +package ext_procv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/common/mutation_rules/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#next-free-field: 10] +type ExternalProcessor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration for the gRPC service that the filter will communicate with. + // The filter supports both the "Envoy" and "Google" gRPC clients. + GrpcService *v3.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` + // By default, if the gRPC stream cannot be established, or if it is closed + // prematurely with an error, the filter will fail. Specifically, if the + // response headers have not yet been delivered, then it will return a 500 + // error downstream. If they have been delivered, then instead the HTTP stream to the + // downstream client will be reset. + // With this parameter set to true, however, then if the gRPC stream is prematurely closed + // or could not be opened, processing continues without error. + FailureModeAllow bool `protobuf:"varint,2,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"` + // Specifies default options for how HTTP headers, trailers, and bodies are + // sent. See ProcessingMode for details. + ProcessingMode *ProcessingMode `protobuf:"bytes,3,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` + // [#not-implemented-hide:] + // If true, send each part of the HTTP request or response specified by ProcessingMode + // asynchronously -- in other words, send the message on the gRPC stream and then continue + // filter processing. If false, which is the default, suspend filter execution after + // each message is sent to the remote service and wait up to "message_timeout" + // for a reply. + AsyncMode bool `protobuf:"varint,4,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` + // [#not-implemented-hide:] + // Envoy provides a number of :ref:`attributes ` + // for expressive policies. Each attribute name provided in this field will be + // matched against that list and populated in the request_headers message. + // See the :ref:`attribute documentation ` + // for the list of supported attributes and their types. + RequestAttributes []string `protobuf:"bytes,5,rep,name=request_attributes,json=requestAttributes,proto3" json:"request_attributes,omitempty"` + // [#not-implemented-hide:] + // Envoy provides a number of :ref:`attributes ` + // for expressive policies. Each attribute name provided in this field will be + // matched against that list and populated in the response_headers message. + // See the :ref:`attribute documentation ` + // for the list of supported attributes and their types. + ResponseAttributes []string `protobuf:"bytes,6,rep,name=response_attributes,json=responseAttributes,proto3" json:"response_attributes,omitempty"` + // Specifies the timeout for each individual message sent on the stream and + // when the filter is running in synchronous mode. Whenever + // the proxy sends a message on the stream that requires a response, it will + // reset this timer, and will stop processing and return an error (subject + // to the processing mode) if the timer expires before a matching response. + // is received. There is no timeout when the filter is running in asynchronous + // mode. Default is 200 milliseconds. + MessageTimeout *duration.Duration `protobuf:"bytes,7,opt,name=message_timeout,json=messageTimeout,proto3" json:"message_timeout,omitempty"` + // Optional additional prefix to use when emitting statistics. This allows to distinguish + // emitted statistics between configured *ext_proc* filters in an HTTP filter chain. + StatPrefix string `protobuf:"bytes,8,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // Rules that determine what modifications an external processing server may + // make to message headers. If not set, all headers may be modified except + // for "host", ":authority", ":scheme", ":method", and headers that start + // with the header prefix set via + // :ref:`header_prefix ` + // (which is usually "x-envoy"). + MutationRules *v31.HeaderMutationRules `protobuf:"bytes,9,opt,name=mutation_rules,json=mutationRules,proto3" json:"mutation_rules,omitempty"` +} + +func (x *ExternalProcessor) Reset() { + *x = ExternalProcessor{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExternalProcessor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalProcessor) ProtoMessage() {} + +func (x *ExternalProcessor) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalProcessor.ProtoReflect.Descriptor instead. +func (*ExternalProcessor) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP(), []int{0} +} + +func (x *ExternalProcessor) GetGrpcService() *v3.GrpcService { + if x != nil { + return x.GrpcService + } + return nil +} + +func (x *ExternalProcessor) GetFailureModeAllow() bool { + if x != nil { + return x.FailureModeAllow + } + return false +} + +func (x *ExternalProcessor) GetProcessingMode() *ProcessingMode { + if x != nil { + return x.ProcessingMode + } + return nil +} + +func (x *ExternalProcessor) GetAsyncMode() bool { + if x != nil { + return x.AsyncMode + } + return false +} + +func (x *ExternalProcessor) GetRequestAttributes() []string { + if x != nil { + return x.RequestAttributes + } + return nil +} + +func (x *ExternalProcessor) GetResponseAttributes() []string { + if x != nil { + return x.ResponseAttributes + } + return nil +} + +func (x *ExternalProcessor) GetMessageTimeout() *duration.Duration { + if x != nil { + return x.MessageTimeout + } + return nil +} + +func (x *ExternalProcessor) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *ExternalProcessor) GetMutationRules() *v31.HeaderMutationRules { + if x != nil { + return x.MutationRules + } + return nil +} + +// Extra settings that may be added to per-route configuration for a +// virtual host or cluster. +type ExtProcPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Override: + // *ExtProcPerRoute_Disabled + // *ExtProcPerRoute_Overrides + Override isExtProcPerRoute_Override `protobuf_oneof:"override"` +} + +func (x *ExtProcPerRoute) Reset() { + *x = ExtProcPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtProcPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtProcPerRoute) ProtoMessage() {} + +func (x *ExtProcPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtProcPerRoute.ProtoReflect.Descriptor instead. +func (*ExtProcPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP(), []int{1} +} + +func (m *ExtProcPerRoute) GetOverride() isExtProcPerRoute_Override { + if m != nil { + return m.Override + } + return nil +} + +func (x *ExtProcPerRoute) GetDisabled() bool { + if x, ok := x.GetOverride().(*ExtProcPerRoute_Disabled); ok { + return x.Disabled + } + return false +} + +func (x *ExtProcPerRoute) GetOverrides() *ExtProcOverrides { + if x, ok := x.GetOverride().(*ExtProcPerRoute_Overrides); ok { + return x.Overrides + } + return nil +} + +type isExtProcPerRoute_Override interface { + isExtProcPerRoute_Override() +} + +type ExtProcPerRoute_Disabled struct { + // Disable the filter for this particular vhost or route. + // If disabled is specified in multiple per-filter-configs, the most specific one will be used. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` +} + +type ExtProcPerRoute_Overrides struct { + // Override aspects of the configuration for this route. A set of + // overrides in a more specific configuration will override a "disabled" + // flag set in a less-specific one. + Overrides *ExtProcOverrides `protobuf:"bytes,2,opt,name=overrides,proto3,oneof"` +} + +func (*ExtProcPerRoute_Disabled) isExtProcPerRoute_Override() {} + +func (*ExtProcPerRoute_Overrides) isExtProcPerRoute_Override() {} + +// Overrides that may be set on a per-route basis +type ExtProcOverrides struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Set a different processing mode for this route than the default. + ProcessingMode *ProcessingMode `protobuf:"bytes,1,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` + // [#not-implemented-hide:] + // Set a different asynchronous processing option than the default. + AsyncMode bool `protobuf:"varint,2,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` + // [#not-implemented-hide:] + // Set different optional attributes than the default setting of the + // ``request_attributes`` field. + RequestAttributes []string `protobuf:"bytes,3,rep,name=request_attributes,json=requestAttributes,proto3" json:"request_attributes,omitempty"` + // [#not-implemented-hide:] + // Set different optional properties than the default setting of the + // ``response_attributes`` field. + ResponseAttributes []string `protobuf:"bytes,4,rep,name=response_attributes,json=responseAttributes,proto3" json:"response_attributes,omitempty"` +} + +func (x *ExtProcOverrides) Reset() { + *x = ExtProcOverrides{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtProcOverrides) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtProcOverrides) ProtoMessage() {} + +func (x *ExtProcOverrides) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtProcOverrides.ProtoReflect.Descriptor instead. +func (*ExtProcOverrides) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP(), []int{2} +} + +func (x *ExtProcOverrides) GetProcessingMode() *ProcessingMode { + if x != nil { + return x.ProcessingMode + } + return nil +} + +func (x *ExtProcOverrides) GetAsyncMode() bool { + if x != nil { + return x.AsyncMode + } + return false +} + +func (x *ExtProcOverrides) GetRequestAttributes() []string { + if x != nil { + return x.RequestAttributes + } + return nil +} + +func (x *ExtProcOverrides) GetResponseAttributes() []string { + if x != nil { + return x.ResponseAttributes + } + return nil +} + +var File_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x04, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x0c, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x62, + 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, + 0x64, 0x65, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x61, 0x0a, 0x0e, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0d, 0x6d, 0x75, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x50, 0x72, 0x6f, 0x63, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, + 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5b, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x73, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x22, 0xf5, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0e, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0xb6, 0x01, 0x0a, 0x37, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, + 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData = file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc +) + +func file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData +} + +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_goTypes = []interface{}{ + (*ExternalProcessor)(nil), // 0: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor + (*ExtProcPerRoute)(nil), // 1: envoy.extensions.filters.http.ext_proc.v3.ExtProcPerRoute + (*ExtProcOverrides)(nil), // 2: envoy.extensions.filters.http.ext_proc.v3.ExtProcOverrides + (*v3.GrpcService)(nil), // 3: envoy.config.core.v3.GrpcService + (*ProcessingMode)(nil), // 4: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + (*duration.Duration)(nil), // 5: google.protobuf.Duration + (*v31.HeaderMutationRules)(nil), // 6: envoy.config.common.mutation_rules.v3.HeaderMutationRules +} +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.grpc_service:type_name -> envoy.config.core.v3.GrpcService + 4, // 1: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.processing_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + 5, // 2: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.message_timeout:type_name -> google.protobuf.Duration + 6, // 3: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.mutation_rules:type_name -> envoy.config.common.mutation_rules.v3.HeaderMutationRules + 2, // 4: envoy.extensions.filters.http.ext_proc.v3.ExtProcPerRoute.overrides:type_name -> envoy.extensions.filters.http.ext_proc.v3.ExtProcOverrides + 4, // 5: envoy.extensions.filters.http.ext_proc.v3.ExtProcOverrides.processing_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_init() } +func file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_init() { + if File_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto != nil { + return + } + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalProcessor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtProcPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtProcOverrides); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ExtProcPerRoute_Disabled)(nil), + (*ExtProcPerRoute_Overrides)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto = out.File + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc = nil + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_goTypes = nil + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.validate.go new file mode 100644 index 0000000000..8f18fb7b41 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.validate.go @@ -0,0 +1,549 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto + +package ext_procv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ExternalProcessor with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ExternalProcessor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExternalProcessor with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExternalProcessorMultiError, or nil if none found. +func (m *ExternalProcessor) ValidateAll() error { + return m.validate(true) +} + +func (m *ExternalProcessor) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for FailureModeAllow + + if all { + switch v := interface{}(m.GetProcessingMode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProcessingMode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for AsyncMode + + if all { + switch v := interface{}(m.GetMessageTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MessageTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MessageTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMessageTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "MessageTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for StatPrefix + + if all { + switch v := interface{}(m.GetMutationRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MutationRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MutationRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMutationRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "MutationRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExternalProcessorMultiError(errors) + } + + return nil +} + +// ExternalProcessorMultiError is an error wrapping multiple validation errors +// returned by ExternalProcessor.ValidateAll() if the designated constraints +// aren't met. +type ExternalProcessorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExternalProcessorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExternalProcessorMultiError) AllErrors() []error { return m } + +// ExternalProcessorValidationError is the validation error returned by +// ExternalProcessor.Validate if the designated constraints aren't met. +type ExternalProcessorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExternalProcessorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExternalProcessorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExternalProcessorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExternalProcessorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExternalProcessorValidationError) ErrorName() string { + return "ExternalProcessorValidationError" +} + +// Error satisfies the builtin error interface +func (e ExternalProcessorValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExternalProcessor.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExternalProcessorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExternalProcessorValidationError{} + +// Validate checks the field values on ExtProcPerRoute with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ExtProcPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtProcPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtProcPerRouteMultiError, or nil if none found. +func (m *ExtProcPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtProcPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Override.(type) { + + case *ExtProcPerRoute_Disabled: + + if m.GetDisabled() != true { + err := ExtProcPerRouteValidationError{ + field: "Disabled", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *ExtProcPerRoute_Overrides: + + if all { + switch v := interface{}(m.GetOverrides()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtProcPerRouteValidationError{ + field: "Overrides", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtProcPerRouteValidationError{ + field: "Overrides", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverrides()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtProcPerRouteValidationError{ + field: "Overrides", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ExtProcPerRouteValidationError{ + field: "Override", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ExtProcPerRouteMultiError(errors) + } + + return nil +} + +// ExtProcPerRouteMultiError is an error wrapping multiple validation errors +// returned by ExtProcPerRoute.ValidateAll() if the designated constraints +// aren't met. +type ExtProcPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtProcPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtProcPerRouteMultiError) AllErrors() []error { return m } + +// ExtProcPerRouteValidationError is the validation error returned by +// ExtProcPerRoute.Validate if the designated constraints aren't met. +type ExtProcPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExtProcPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExtProcPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExtProcPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExtProcPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExtProcPerRouteValidationError) ErrorName() string { return "ExtProcPerRouteValidationError" } + +// Error satisfies the builtin error interface +func (e ExtProcPerRouteValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExtProcPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExtProcPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExtProcPerRouteValidationError{} + +// Validate checks the field values on ExtProcOverrides with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ExtProcOverrides) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtProcOverrides with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExtProcOverridesMultiError, or nil if none found. +func (m *ExtProcOverrides) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtProcOverrides) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetProcessingMode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtProcOverridesValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtProcOverridesValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProcessingMode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtProcOverridesValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for AsyncMode + + if len(errors) > 0 { + return ExtProcOverridesMultiError(errors) + } + + return nil +} + +// ExtProcOverridesMultiError is an error wrapping multiple validation errors +// returned by ExtProcOverrides.ValidateAll() if the designated constraints +// aren't met. +type ExtProcOverridesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtProcOverridesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtProcOverridesMultiError) AllErrors() []error { return m } + +// ExtProcOverridesValidationError is the validation error returned by +// ExtProcOverrides.Validate if the designated constraints aren't met. +type ExtProcOverridesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExtProcOverridesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExtProcOverridesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExtProcOverridesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExtProcOverridesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExtProcOverridesValidationError) ErrorName() string { return "ExtProcOverridesValidationError" } + +// Error satisfies the builtin error interface +func (e ExtProcOverridesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExtProcOverrides.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExtProcOverridesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExtProcOverridesValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go new file mode 100644 index 0000000000..e09df2c9a0 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go @@ -0,0 +1,397 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto + +package ext_procv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Control how headers and trailers are handled +type ProcessingMode_HeaderSendMode int32 + +const ( + // The default HeaderSendMode depends on which part of the message is being + // processed. By default, request and response headers are sent, + // while trailers are skipped. + ProcessingMode_DEFAULT ProcessingMode_HeaderSendMode = 0 + // Send the header or trailer. + ProcessingMode_SEND ProcessingMode_HeaderSendMode = 1 + // Do not send the header or trailer. + ProcessingMode_SKIP ProcessingMode_HeaderSendMode = 2 +) + +// Enum value maps for ProcessingMode_HeaderSendMode. +var ( + ProcessingMode_HeaderSendMode_name = map[int32]string{ + 0: "DEFAULT", + 1: "SEND", + 2: "SKIP", + } + ProcessingMode_HeaderSendMode_value = map[string]int32{ + "DEFAULT": 0, + "SEND": 1, + "SKIP": 2, + } +) + +func (x ProcessingMode_HeaderSendMode) Enum() *ProcessingMode_HeaderSendMode { + p := new(ProcessingMode_HeaderSendMode) + *p = x + return p +} + +func (x ProcessingMode_HeaderSendMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProcessingMode_HeaderSendMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[0].Descriptor() +} + +func (ProcessingMode_HeaderSendMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[0] +} + +func (x ProcessingMode_HeaderSendMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProcessingMode_HeaderSendMode.Descriptor instead. +func (ProcessingMode_HeaderSendMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP(), []int{0, 0} +} + +// Control how the request and response bodies are handled +type ProcessingMode_BodySendMode int32 + +const ( + // Do not send the body at all. This is the default. + ProcessingMode_NONE ProcessingMode_BodySendMode = 0 + // Stream the body to the server in pieces as they arrive at the + // proxy. + ProcessingMode_STREAMED ProcessingMode_BodySendMode = 1 + // Buffer the message body in memory and send the entire body at once. + // If the body exceeds the configured buffer limit, then the + // downstream system will receive an error. + ProcessingMode_BUFFERED ProcessingMode_BodySendMode = 2 + // Buffer the message body in memory and send the entire body in one + // chunk. If the body exceeds the configured buffer limit, then the body contents + // up to the buffer limit will be sent. + ProcessingMode_BUFFERED_PARTIAL ProcessingMode_BodySendMode = 3 +) + +// Enum value maps for ProcessingMode_BodySendMode. +var ( + ProcessingMode_BodySendMode_name = map[int32]string{ + 0: "NONE", + 1: "STREAMED", + 2: "BUFFERED", + 3: "BUFFERED_PARTIAL", + } + ProcessingMode_BodySendMode_value = map[string]int32{ + "NONE": 0, + "STREAMED": 1, + "BUFFERED": 2, + "BUFFERED_PARTIAL": 3, + } +) + +func (x ProcessingMode_BodySendMode) Enum() *ProcessingMode_BodySendMode { + p := new(ProcessingMode_BodySendMode) + *p = x + return p +} + +func (x ProcessingMode_BodySendMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProcessingMode_BodySendMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[1].Descriptor() +} + +func (ProcessingMode_BodySendMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[1] +} + +func (x ProcessingMode_BodySendMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProcessingMode_BodySendMode.Descriptor instead. +func (ProcessingMode_BodySendMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP(), []int{0, 1} +} + +// [#next-free-field: 7] +type ProcessingMode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How to handle the request header. Default is "SEND". + RequestHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,1,opt,name=request_header_mode,json=requestHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"request_header_mode,omitempty"` + // How to handle the response header. Default is "SEND". + ResponseHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,2,opt,name=response_header_mode,json=responseHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"response_header_mode,omitempty"` + // How to handle the request body. Default is "NONE". + RequestBodyMode ProcessingMode_BodySendMode `protobuf:"varint,3,opt,name=request_body_mode,json=requestBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_BodySendMode" json:"request_body_mode,omitempty"` + // How do handle the response body. Default is "NONE". + ResponseBodyMode ProcessingMode_BodySendMode `protobuf:"varint,4,opt,name=response_body_mode,json=responseBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_BodySendMode" json:"response_body_mode,omitempty"` + // How to handle the request trailers. Default is "SKIP". + RequestTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,5,opt,name=request_trailer_mode,json=requestTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"request_trailer_mode,omitempty"` + // How to handle the response trailers. Default is "SKIP". + ResponseTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,6,opt,name=response_trailer_mode,json=responseTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"response_trailer_mode,omitempty"` +} + +func (x *ProcessingMode) Reset() { + *x = ProcessingMode{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProcessingMode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProcessingMode) ProtoMessage() {} + +func (x *ProcessingMode) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProcessingMode.ProtoReflect.Descriptor instead. +func (*ProcessingMode) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP(), []int{0} +} + +func (x *ProcessingMode) GetRequestHeaderMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.RequestHeaderMode + } + return ProcessingMode_DEFAULT +} + +func (x *ProcessingMode) GetResponseHeaderMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.ResponseHeaderMode + } + return ProcessingMode_DEFAULT +} + +func (x *ProcessingMode) GetRequestBodyMode() ProcessingMode_BodySendMode { + if x != nil { + return x.RequestBodyMode + } + return ProcessingMode_NONE +} + +func (x *ProcessingMode) GetResponseBodyMode() ProcessingMode_BodySendMode { + if x != nil { + return x.ResponseBodyMode + } + return ProcessingMode_NONE +} + +func (x *ProcessingMode) GetRequestTrailerMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.RequestTrailerMode + } + return ProcessingMode_DEFAULT +} + +func (x *ProcessingMode) GetResponseTrailerMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.ResponseTrailerMode + } + return ProcessingMode_DEFAULT +} + +var File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x07, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, + 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x84, 0x01, + 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, + 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x7c, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x53, + 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x7e, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, + 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x65, + 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x15, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x65, 0x22, 0x31, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, + 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, + 0x4b, 0x49, 0x50, 0x10, 0x02, 0x22, 0x4a, 0x0a, 0x0c, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x65, 0x6e, + 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, + 0x08, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x42, + 0x55, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x10, + 0x03, 0x42, 0xbd, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData = file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc +) + +func file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData +} + +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes = []interface{}{ + (ProcessingMode_HeaderSendMode)(0), // 0: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + (ProcessingMode_BodySendMode)(0), // 1: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode + (*ProcessingMode)(nil), // 2: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode +} +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 0, // 1: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 1, // 2: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode + 1, // 3: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode + 0, // 4: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 0, // 5: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_init() } +func file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_init() { + if File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProcessingMode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto = out.File + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc = nil + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes = nil + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.validate.go similarity index 61% rename from pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.pb.validate.go rename to pkg/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.validate.go index 0e1da98dab..78202c1080 100644 --- a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.proto +// source: envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto -package envoy_extensions_filters_http_ext_proc_v3alpha +package ext_procv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,62 +31,122 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ProcessingMode with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ProcessingMode) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProcessingMode with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ProcessingModeMultiError, +// or nil if none found. +func (m *ProcessingMode) ValidateAll() error { + return m.validate(true) +} + +func (m *ProcessingMode) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetRequestHeaderMode())]; !ok { - return ProcessingModeValidationError{ + err := ProcessingModeValidationError{ field: "RequestHeaderMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetResponseHeaderMode())]; !ok { - return ProcessingModeValidationError{ + err := ProcessingModeValidationError{ field: "ResponseHeaderMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProcessingMode_BodySendMode_name[int32(m.GetRequestBodyMode())]; !ok { - return ProcessingModeValidationError{ + err := ProcessingModeValidationError{ field: "RequestBodyMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProcessingMode_BodySendMode_name[int32(m.GetResponseBodyMode())]; !ok { - return ProcessingModeValidationError{ + err := ProcessingModeValidationError{ field: "ResponseBodyMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetRequestTrailerMode())]; !ok { - return ProcessingModeValidationError{ + err := ProcessingModeValidationError{ field: "RequestTrailerMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetResponseTrailerMode())]; !ok { - return ProcessingModeValidationError{ + err := ProcessingModeValidationError{ field: "ResponseTrailerMode", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ProcessingModeMultiError(errors) } return nil } +// ProcessingModeMultiError is an error wrapping multiple validation errors +// returned by ProcessingMode.ValidateAll() if the designated constraints +// aren't met. +type ProcessingModeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProcessingModeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProcessingModeMultiError) AllErrors() []error { return m } + // ProcessingModeValidationError is the validation error returned by // ProcessingMode.Validate if the designated constraints aren't met. type ProcessingModeValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.pb.go b/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.pb.go deleted file mode 100644 index 1c3f1615ef..0000000000 --- a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.pb.go +++ /dev/null @@ -1,527 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.proto - -package envoy_extensions_filters_http_ext_proc_v3alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 9] -type ExternalProcessor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration for the gRPC service that the filter will communicate with. - // The filter supports both the "Envoy" and "Google" gRPC clients. - GrpcService *v3.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` - // [#not-implemented-hide:] - // By default, if the gRPC stream cannot be established, or if it is closed - // prematurely with an error, the filter will fail. Specifically, if the - // response headers have not yet been delivered, then it will return a 500 - // error downstream. If they have been delivered, then instead the HTTP stream to the - // downstream client will be reset. - // With this parameter set to true, however, then if the gRPC stream is prematurely closed - // or could not be opened, processing continues without error. - FailureModeAllow bool `protobuf:"varint,2,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"` - // [#not-implemented-hide:] - // Specifies default options for how HTTP headers, trailers, and bodies are - // sent. See ProcessingMode for details. - ProcessingMode *ProcessingMode `protobuf:"bytes,3,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` - // [#not-implemented-hide:] - // If true, send each part of the HTTP request or response specified by ProcessingMode - // asynchronously -- in other words, send the message on the gRPC stream and then continue - // filter processing. If false, which is the default, suspend filter execution after - // each message is sent to the remote service and wait up to "message_timeout" - // for a reply. - AsyncMode bool `protobuf:"varint,4,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` - // [#not-implemented-hide:] - // Envoy provides a number of :ref:`attributes ` - // for expressive policies. Each attribute name provided in this field will be - // matched against that list and populated in the request_headers message. - // See the :ref:`attribute documentation ` - // for the list of supported attributes and their types. - RequestAttributes []string `protobuf:"bytes,5,rep,name=request_attributes,json=requestAttributes,proto3" json:"request_attributes,omitempty"` - // [#not-implemented-hide:] - // Envoy provides a number of :ref:`attributes ` - // for expressive policies. Each attribute name provided in this field will be - // matched against that list and populated in the response_headers message. - // See the :ref:`attribute documentation ` - // for the list of supported attributes and their types. - ResponseAttributes []string `protobuf:"bytes,6,rep,name=response_attributes,json=responseAttributes,proto3" json:"response_attributes,omitempty"` - // [#not-implemented-hide:] - // Specifies the timeout for each individual message sent on the stream and - // when the filter is running in synchronous mode. Whenever - // the proxy sends a message on the stream that requires a response, it will - // reset this timer, and will stop processing and return an error (subject - // to the processing mode) if the timer expires. There is no timeout when - // the filter is running in asynchronous mode. Default is 200 ms. - MessageTimeout *duration.Duration `protobuf:"bytes,7,opt,name=message_timeout,json=messageTimeout,proto3" json:"message_timeout,omitempty"` - // [#not-implemented-hide:] - // Optional additional prefix to use when emitting statistics. This allows to distinguish - // emitted statistics between configured *ext_proc* filters in an HTTP filter chain. - StatPrefix string `protobuf:"bytes,8,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` -} - -func (x *ExternalProcessor) Reset() { - *x = ExternalProcessor{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExternalProcessor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExternalProcessor) ProtoMessage() {} - -func (x *ExternalProcessor) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExternalProcessor.ProtoReflect.Descriptor instead. -func (*ExternalProcessor) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescGZIP(), []int{0} -} - -func (x *ExternalProcessor) GetGrpcService() *v3.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -func (x *ExternalProcessor) GetFailureModeAllow() bool { - if x != nil { - return x.FailureModeAllow - } - return false -} - -func (x *ExternalProcessor) GetProcessingMode() *ProcessingMode { - if x != nil { - return x.ProcessingMode - } - return nil -} - -func (x *ExternalProcessor) GetAsyncMode() bool { - if x != nil { - return x.AsyncMode - } - return false -} - -func (x *ExternalProcessor) GetRequestAttributes() []string { - if x != nil { - return x.RequestAttributes - } - return nil -} - -func (x *ExternalProcessor) GetResponseAttributes() []string { - if x != nil { - return x.ResponseAttributes - } - return nil -} - -func (x *ExternalProcessor) GetMessageTimeout() *duration.Duration { - if x != nil { - return x.MessageTimeout - } - return nil -} - -func (x *ExternalProcessor) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -// [#not-implemented-hide:] -// Extra settings that may be added to per-route configuration for a -// virtual host or cluster. -type ExtProcPerRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Override: - // *ExtProcPerRoute_Disabled - // *ExtProcPerRoute_Overrides - Override isExtProcPerRoute_Override `protobuf_oneof:"override"` -} - -func (x *ExtProcPerRoute) Reset() { - *x = ExtProcPerRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtProcPerRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtProcPerRoute) ProtoMessage() {} - -func (x *ExtProcPerRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtProcPerRoute.ProtoReflect.Descriptor instead. -func (*ExtProcPerRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescGZIP(), []int{1} -} - -func (m *ExtProcPerRoute) GetOverride() isExtProcPerRoute_Override { - if m != nil { - return m.Override - } - return nil -} - -func (x *ExtProcPerRoute) GetDisabled() bool { - if x, ok := x.GetOverride().(*ExtProcPerRoute_Disabled); ok { - return x.Disabled - } - return false -} - -func (x *ExtProcPerRoute) GetOverrides() *ExtProcOverrides { - if x, ok := x.GetOverride().(*ExtProcPerRoute_Overrides); ok { - return x.Overrides - } - return nil -} - -type isExtProcPerRoute_Override interface { - isExtProcPerRoute_Override() -} - -type ExtProcPerRoute_Disabled struct { - // Disable the filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` -} - -type ExtProcPerRoute_Overrides struct { - // Override aspects of the configuration for this route - Overrides *ExtProcOverrides `protobuf:"bytes,2,opt,name=overrides,proto3,oneof"` -} - -func (*ExtProcPerRoute_Disabled) isExtProcPerRoute_Override() {} - -func (*ExtProcPerRoute_Overrides) isExtProcPerRoute_Override() {} - -// [#not-implemented-hide:] -// Overrides that may be set on a per-route basis -type ExtProcOverrides struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Set a different processing mode for this route than the default. - ProcessingMode *ProcessingMode `protobuf:"bytes,1,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` - // Set a different asynchronous processing option than the default. - AsyncMode bool `protobuf:"varint,2,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` - // Set different optional properties than the default. - RequestProperties []string `protobuf:"bytes,3,rep,name=request_properties,json=requestProperties,proto3" json:"request_properties,omitempty"` - // Set different optional properties than the default. - ResponseProperties []string `protobuf:"bytes,4,rep,name=response_properties,json=responseProperties,proto3" json:"response_properties,omitempty"` -} - -func (x *ExtProcOverrides) Reset() { - *x = ExtProcOverrides{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtProcOverrides) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtProcOverrides) ProtoMessage() {} - -func (x *ExtProcOverrides) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtProcOverrides.ProtoReflect.Descriptor instead. -func (*ExtProcOverrides) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescGZIP(), []int{2} -} - -func (x *ExtProcOverrides) GetProcessingMode() *ProcessingMode { - if x != nil { - return x.ProcessingMode - } - return nil -} - -func (x *ExtProcOverrides) GetAsyncMode() bool { - if x != nil { - return x.AsyncMode - } - return false -} - -func (x *ExtProcOverrides) GetRequestProperties() []string { - if x != nil { - return x.RequestProperties - } - return nil -} - -func (x *ExtProcOverrides) GetResponseProperties() []string { - if x != nil { - return x.ResponseProperties - } - return nil -} - -var File_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDesc = []byte{ - 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, - 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, - 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x03, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x0c, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, - 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, - 0x12, 0x67, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x79, - 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, - 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xab, 0x01, - 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x25, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x60, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, - 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, - 0x50, 0x72, 0x6f, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x48, 0x00, 0x52, - 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xfa, 0x01, 0x0a, 0x10, - 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, - 0x12, 0x67, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x79, - 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, - 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x5e, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, - 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, - 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescData = file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDesc -) - -func file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDescData -} - -var file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_goTypes = []interface{}{ - (*ExternalProcessor)(nil), // 0: envoy.extensions.filters.http.ext_proc.v3alpha.ExternalProcessor - (*ExtProcPerRoute)(nil), // 1: envoy.extensions.filters.http.ext_proc.v3alpha.ExtProcPerRoute - (*ExtProcOverrides)(nil), // 2: envoy.extensions.filters.http.ext_proc.v3alpha.ExtProcOverrides - (*v3.GrpcService)(nil), // 3: envoy.config.core.v3.GrpcService - (*ProcessingMode)(nil), // 4: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode - (*duration.Duration)(nil), // 5: google.protobuf.Duration -} -var file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.filters.http.ext_proc.v3alpha.ExternalProcessor.grpc_service:type_name -> envoy.config.core.v3.GrpcService - 4, // 1: envoy.extensions.filters.http.ext_proc.v3alpha.ExternalProcessor.processing_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode - 5, // 2: envoy.extensions.filters.http.ext_proc.v3alpha.ExternalProcessor.message_timeout:type_name -> google.protobuf.Duration - 2, // 3: envoy.extensions.filters.http.ext_proc.v3alpha.ExtProcPerRoute.overrides:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ExtProcOverrides - 4, // 4: envoy.extensions.filters.http.ext_proc.v3alpha.ExtProcOverrides.processing_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_init() } -func file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_init() { - if File_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto != nil { - return - } - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalProcessor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtProcPerRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtProcOverrides); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ExtProcPerRoute_Disabled)(nil), - (*ExtProcPerRoute_Overrides)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto = out.File - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_rawDesc = nil - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_goTypes = nil - file_envoy_extensions_filters_http_ext_proc_v3alpha_ext_proc_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.pb.validate.go deleted file mode 100644 index b0eac6205d..0000000000 --- a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.pb.validate.go +++ /dev/null @@ -1,310 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/ext_proc/v3alpha/ext_proc.proto - -package envoy_extensions_filters_http_ext_proc_v3alpha - -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{} -) - -// Validate checks the field values on ExternalProcessor with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ExternalProcessor) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExternalProcessorValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for FailureModeAllow - - if v, ok := interface{}(m.GetProcessingMode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExternalProcessorValidationError{ - field: "ProcessingMode", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AsyncMode - - if v, ok := interface{}(m.GetMessageTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExternalProcessorValidationError{ - field: "MessageTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for StatPrefix - - return nil -} - -// ExternalProcessorValidationError is the validation error returned by -// ExternalProcessor.Validate if the designated constraints aren't met. -type ExternalProcessorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExternalProcessorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExternalProcessorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExternalProcessorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExternalProcessorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExternalProcessorValidationError) ErrorName() string { - return "ExternalProcessorValidationError" -} - -// Error satisfies the builtin error interface -func (e ExternalProcessorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExternalProcessor.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExternalProcessorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExternalProcessorValidationError{} - -// Validate checks the field values on ExtProcPerRoute with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ExtProcPerRoute) Validate() error { - if m == nil { - return nil - } - - switch m.Override.(type) { - - case *ExtProcPerRoute_Disabled: - - if m.GetDisabled() != true { - return ExtProcPerRouteValidationError{ - field: "Disabled", - reason: "value must equal true", - } - } - - case *ExtProcPerRoute_Overrides: - - if v, ok := interface{}(m.GetOverrides()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtProcPerRouteValidationError{ - field: "Overrides", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return ExtProcPerRouteValidationError{ - field: "Override", - reason: "value is required", - } - - } - - return nil -} - -// ExtProcPerRouteValidationError is the validation error returned by -// ExtProcPerRoute.Validate if the designated constraints aren't met. -type ExtProcPerRouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtProcPerRouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtProcPerRouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtProcPerRouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtProcPerRouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtProcPerRouteValidationError) ErrorName() string { return "ExtProcPerRouteValidationError" } - -// Error satisfies the builtin error interface -func (e ExtProcPerRouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtProcPerRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtProcPerRouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtProcPerRouteValidationError{} - -// Validate checks the field values on ExtProcOverrides with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ExtProcOverrides) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetProcessingMode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtProcOverridesValidationError{ - field: "ProcessingMode", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AsyncMode - - return nil -} - -// ExtProcOverridesValidationError is the validation error returned by -// ExtProcOverrides.Validate if the designated constraints aren't met. -type ExtProcOverridesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtProcOverridesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtProcOverridesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtProcOverridesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtProcOverridesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtProcOverridesValidationError) ErrorName() string { return "ExtProcOverridesValidationError" } - -// Error satisfies the builtin error interface -func (e ExtProcOverridesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtProcOverrides.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtProcOverridesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtProcOverridesValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.pb.go b/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.pb.go deleted file mode 100644 index 9f54fea9e5..0000000000 --- a/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.pb.go +++ /dev/null @@ -1,396 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/ext_proc/v3alpha/processing_mode.proto - -package envoy_extensions_filters_http_ext_proc_v3alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Control how headers and trailers are handled -type ProcessingMode_HeaderSendMode int32 - -const ( - // The default HeaderSendMode depends on which part of the message is being - // processed. By default, request and response headers are sent, - // while trailers are skipped. - ProcessingMode_DEFAULT ProcessingMode_HeaderSendMode = 0 - // Send the header or trailer. - ProcessingMode_SEND ProcessingMode_HeaderSendMode = 1 - // Do not send the header or trailer. - ProcessingMode_SKIP ProcessingMode_HeaderSendMode = 2 -) - -// Enum value maps for ProcessingMode_HeaderSendMode. -var ( - ProcessingMode_HeaderSendMode_name = map[int32]string{ - 0: "DEFAULT", - 1: "SEND", - 2: "SKIP", - } - ProcessingMode_HeaderSendMode_value = map[string]int32{ - "DEFAULT": 0, - "SEND": 1, - "SKIP": 2, - } -) - -func (x ProcessingMode_HeaderSendMode) Enum() *ProcessingMode_HeaderSendMode { - p := new(ProcessingMode_HeaderSendMode) - *p = x - return p -} - -func (x ProcessingMode_HeaderSendMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProcessingMode_HeaderSendMode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_enumTypes[0].Descriptor() -} - -func (ProcessingMode_HeaderSendMode) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_enumTypes[0] -} - -func (x ProcessingMode_HeaderSendMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProcessingMode_HeaderSendMode.Descriptor instead. -func (ProcessingMode_HeaderSendMode) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescGZIP(), []int{0, 0} -} - -// Control how the request and response bodies are handled -type ProcessingMode_BodySendMode int32 - -const ( - // Do not send the body at all. This is the default. - ProcessingMode_NONE ProcessingMode_BodySendMode = 0 - // Stream the body to the server in pieces as they arrive at the - // proxy. - ProcessingMode_STREAMED ProcessingMode_BodySendMode = 1 - // Buffer the message body in memory and send the entire body at once. - // If the body exceeds the configured buffer limit, then the - // downstream system will receive an error. - ProcessingMode_BUFFERED ProcessingMode_BodySendMode = 2 - // Buffer the message body in memory and send the entire body in one - // chunk. If the body exceeds the configured buffer limit, then the body contents - // up to the buffer limit will be sent. - ProcessingMode_BUFFERED_PARTIAL ProcessingMode_BodySendMode = 3 -) - -// Enum value maps for ProcessingMode_BodySendMode. -var ( - ProcessingMode_BodySendMode_name = map[int32]string{ - 0: "NONE", - 1: "STREAMED", - 2: "BUFFERED", - 3: "BUFFERED_PARTIAL", - } - ProcessingMode_BodySendMode_value = map[string]int32{ - "NONE": 0, - "STREAMED": 1, - "BUFFERED": 2, - "BUFFERED_PARTIAL": 3, - } -) - -func (x ProcessingMode_BodySendMode) Enum() *ProcessingMode_BodySendMode { - p := new(ProcessingMode_BodySendMode) - *p = x - return p -} - -func (x ProcessingMode_BodySendMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProcessingMode_BodySendMode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_enumTypes[1].Descriptor() -} - -func (ProcessingMode_BodySendMode) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_enumTypes[1] -} - -func (x ProcessingMode_BodySendMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProcessingMode_BodySendMode.Descriptor instead. -func (ProcessingMode_BodySendMode) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescGZIP(), []int{0, 1} -} - -// [#next-free-field: 7] -type ProcessingMode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // How to handle the request header. Default is "SEND". - RequestHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,1,opt,name=request_header_mode,json=requestHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode_HeaderSendMode" json:"request_header_mode,omitempty"` - // How to handle the response header. Default is "SEND". - ResponseHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,2,opt,name=response_header_mode,json=responseHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode_HeaderSendMode" json:"response_header_mode,omitempty"` - // How to handle the request body. Default is "NONE". - RequestBodyMode ProcessingMode_BodySendMode `protobuf:"varint,3,opt,name=request_body_mode,json=requestBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode_BodySendMode" json:"request_body_mode,omitempty"` - // How do handle the response body. Default is "NONE". - ResponseBodyMode ProcessingMode_BodySendMode `protobuf:"varint,4,opt,name=response_body_mode,json=responseBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode_BodySendMode" json:"response_body_mode,omitempty"` - // How to handle the request trailers. Default is "SKIP". - RequestTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,5,opt,name=request_trailer_mode,json=requestTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode_HeaderSendMode" json:"request_trailer_mode,omitempty"` - // How to handle the response trailers. Default is "SKIP". - ResponseTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,6,opt,name=response_trailer_mode,json=responseTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode_HeaderSendMode" json:"response_trailer_mode,omitempty"` -} - -func (x *ProcessingMode) Reset() { - *x = ProcessingMode{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProcessingMode) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProcessingMode) ProtoMessage() {} - -func (x *ProcessingMode) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProcessingMode.ProtoReflect.Descriptor instead. -func (*ProcessingMode) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescGZIP(), []int{0} -} - -func (x *ProcessingMode) GetRequestHeaderMode() ProcessingMode_HeaderSendMode { - if x != nil { - return x.RequestHeaderMode - } - return ProcessingMode_DEFAULT -} - -func (x *ProcessingMode) GetResponseHeaderMode() ProcessingMode_HeaderSendMode { - if x != nil { - return x.ResponseHeaderMode - } - return ProcessingMode_DEFAULT -} - -func (x *ProcessingMode) GetRequestBodyMode() ProcessingMode_BodySendMode { - if x != nil { - return x.RequestBodyMode - } - return ProcessingMode_NONE -} - -func (x *ProcessingMode) GetResponseBodyMode() ProcessingMode_BodySendMode { - if x != nil { - return x.ResponseBodyMode - } - return ProcessingMode_NONE -} - -func (x *ProcessingMode) GetRequestTrailerMode() ProcessingMode_HeaderSendMode { - if x != nil { - return x.RequestTrailerMode - } - return ProcessingMode_DEFAULT -} - -func (x *ProcessingMode) GetResponseTrailerMode() ProcessingMode_HeaderSendMode { - if x != nil { - return x.ResponseTrailerMode - } - return ProcessingMode_DEFAULT -} - -var File_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDesc = []byte{ - 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, - 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, - 0x07, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x87, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x14, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, - 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x12, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x65, 0x6e, - 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x89, 0x01, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, - 0x61, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x8b, 0x01, - 0x0a, 0x15, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, - 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4d, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x0e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, - 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, - 0x4e, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x4b, 0x49, 0x50, 0x10, 0x02, 0x22, 0x4a, - 0x0a, 0x0c, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x08, - 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x45, - 0x41, 0x4d, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, - 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x10, 0x03, 0x42, 0x65, 0x0a, 0x3c, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescData = file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDesc -) - -func file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDescData -} - -var file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_goTypes = []interface{}{ - (ProcessingMode_HeaderSendMode)(0), // 0: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.HeaderSendMode - (ProcessingMode_BodySendMode)(0), // 1: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.BodySendMode - (*ProcessingMode)(nil), // 2: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode -} -var file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_depIdxs = []int32{ - 0, // 0: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.request_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.HeaderSendMode - 0, // 1: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.response_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.HeaderSendMode - 1, // 2: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.request_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.BodySendMode - 1, // 3: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.response_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.BodySendMode - 0, // 4: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.request_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.HeaderSendMode - 0, // 5: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.response_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode.HeaderSendMode - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_init() } -func file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_init() { - if File_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessingMode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDesc, - NumEnums: 2, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto = out.File - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_rawDesc = nil - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_goTypes = nil - file_envoy_extensions_filters_http_ext_proc_v3alpha_processing_mode_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.go b/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.go index 8a3aec6a9a..9fa97ede9d 100644 --- a/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.go +++ b/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/fault/v3/fault.proto -package envoy_extensions_filters_http_fault_v3 +package faultv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/common/fault/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type FaultAbort struct { state protoimpl.MessageState @@ -139,7 +134,7 @@ func (*FaultAbort_GrpcStatus) isFaultAbort_ErrorType() {} func (*FaultAbort_HeaderAbort_) isFaultAbort_ErrorType() {} -// [#next-free-field: 15] +// [#next-free-field: 16] type HTTPFault struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -159,7 +154,7 @@ type HTTPFault struct { // injection filter can be applied selectively to requests that match a set of // headers specified in the fault filter config. The chances of actual fault // injection further depend on the value of the :ref:`percentage - // ` field. + // ` field. // The filter will check the request's headers against all the specified // headers in the filter config. A match will happen if all the headers in the // config are present in the request with the same values (or based on @@ -214,6 +209,11 @@ type HTTPFault struct { // The runtime key to override the :ref:`default ` // runtime. The default is: fault.http.abort.grpc_status AbortGrpcStatusRuntime string `protobuf:"bytes,14,opt,name=abort_grpc_status_runtime,json=abortGrpcStatusRuntime,proto3" json:"abort_grpc_status_runtime,omitempty"` + // To control whether stats storage is allocated dynamically for each downstream server. + // If set to true, "x-envoy-downstream-service-cluster" field of header will be ignored by this filter. + // If set to false, dynamic stats storage will be allocated for the downstream cluster name. + // Default value is false. + DisableDownstreamClusterStats bool `protobuf:"varint,15,opt,name=disable_downstream_cluster_stats,json=disableDownstreamClusterStats,proto3" json:"disable_downstream_cluster_stats,omitempty"` } func (x *HTTPFault) Reset() { @@ -346,6 +346,13 @@ func (x *HTTPFault) GetAbortGrpcStatusRuntime() string { return "" } +func (x *HTTPFault) GetDisableDownstreamClusterStats() bool { + if x != nil { + return x.DisableDownstreamClusterStats + } + return false +} + // Fault aborts are controlled via an HTTP header (if applicable). See the // :ref:`HTTP fault filter ` documentation for // more information. @@ -438,7 +445,7 @@ var file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDesc = []byte{ 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x42, 0x11, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, - 0xbc, 0x07, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, + 0x85, 0x08, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, @@ -494,16 +501,26 @@ var file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDesc = []byte{ 0x39, 0x0a, 0x19, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, - 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x4c, - 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x75, 0x73, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x6f, 0x77, + 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, + 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x42, 0xa3, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, + 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.validate.go b/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.validate.go index fb20ff2588..d212eeda0d 100644 --- a/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/fault/v3/fault.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/fault/v3/fault.proto -package envoy_extensions_filters_http_fault_v3 +package faultv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FaultAbort with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FaultAbort) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultAbort with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FaultAbortMultiError, or +// nil if none found. +func (m *FaultAbort) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultAbort) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultAbortValidationError{ field: "Percentage", @@ -55,10 +91,14 @@ func (m *FaultAbort) Validate() error { case *FaultAbort_HttpStatus: if val := m.GetHttpStatus(); val < 200 || val >= 600 { - return FaultAbortValidationError{ + err := FaultAbortValidationError{ field: "HttpStatus", reason: "value must be inside range [200, 600)", } + if !all { + return err + } + errors = append(errors, err) } case *FaultAbort_GrpcStatus: @@ -66,7 +106,26 @@ func (m *FaultAbort) Validate() error { case *FaultAbort_HeaderAbort_: - if v, ok := interface{}(m.GetHeaderAbort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderAbort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "HeaderAbort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "HeaderAbort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderAbort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultAbortValidationError{ field: "HeaderAbort", @@ -77,16 +136,40 @@ func (m *FaultAbort) Validate() error { } default: - return FaultAbortValidationError{ + err := FaultAbortValidationError{ field: "ErrorType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return FaultAbortMultiError(errors) + } + return nil } +// FaultAbortMultiError is an error wrapping multiple validation errors +// returned by FaultAbort.ValidateAll() if the designated constraints aren't met. +type FaultAbortMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultAbortMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultAbortMultiError) AllErrors() []error { return m } + // FaultAbortValidationError is the validation error returned by // FaultAbort.Validate if the designated constraints aren't met. type FaultAbortValidationError struct { @@ -142,13 +225,47 @@ var _ interface { } = FaultAbortValidationError{} // Validate checks the field values on HTTPFault with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HTTPFault) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPFault with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HTTPFaultMultiError, or nil +// if none found. +func (m *HTTPFault) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPFault) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "Delay", @@ -158,7 +275,26 @@ func (m *HTTPFault) Validate() error { } } - if v, ok := interface{}(m.GetAbort()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAbort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Abort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Abort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAbort()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "Abort", @@ -173,7 +309,26 @@ func (m *HTTPFault) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -185,7 +340,26 @@ func (m *HTTPFault) Validate() error { } - if v, ok := interface{}(m.GetMaxActiveFaults()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxActiveFaults()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "MaxActiveFaults", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "MaxActiveFaults", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxActiveFaults()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "MaxActiveFaults", @@ -195,7 +369,26 @@ func (m *HTTPFault) Validate() error { } } - if v, ok := interface{}(m.GetResponseRateLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseRateLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "ResponseRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "ResponseRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseRateLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "ResponseRateLimit", @@ -219,9 +412,31 @@ func (m *HTTPFault) Validate() error { // no validation rules for AbortGrpcStatusRuntime + // no validation rules for DisableDownstreamClusterStats + + if len(errors) > 0 { + return HTTPFaultMultiError(errors) + } + return nil } +// HTTPFaultMultiError is an error wrapping multiple validation errors returned +// by HTTPFault.ValidateAll() if the designated constraints aren't met. +type HTTPFaultMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPFaultMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPFaultMultiError) AllErrors() []error { return m } + // HTTPFaultValidationError is the validation error returned by // HTTPFault.Validate if the designated constraints aren't met. type HTTPFaultValidationError struct { @@ -278,15 +493,50 @@ var _ interface { // Validate checks the field values on FaultAbort_HeaderAbort with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FaultAbort_HeaderAbort) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultAbort_HeaderAbort with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FaultAbort_HeaderAbortMultiError, or nil if none found. +func (m *FaultAbort_HeaderAbort) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultAbort_HeaderAbort) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return FaultAbort_HeaderAbortMultiError(errors) + } + return nil } +// FaultAbort_HeaderAbortMultiError is an error wrapping multiple validation +// errors returned by FaultAbort_HeaderAbort.ValidateAll() if the designated +// constraints aren't met. +type FaultAbort_HeaderAbortMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultAbort_HeaderAbortMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultAbort_HeaderAbortMultiError) AllErrors() []error { return m } + // FaultAbort_HeaderAbortValidationError is the validation error returned by // FaultAbort_HeaderAbort.Validate if the designated constraints aren't met. type FaultAbort_HeaderAbortValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/fault/v4alpha/fault.pb.go b/pkg/api/envoy/extensions/filters/http/fault/v4alpha/fault.pb.go deleted file mode 100644 index df4a55aa16..0000000000 --- a/pkg/api/envoy/extensions/filters/http/fault/v4alpha/fault.pb.go +++ /dev/null @@ -1,616 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/fault/v4alpha/fault.proto - -package envoy_extensions_filters_http_fault_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/common/fault/v3" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 6] -type FaultAbort struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ErrorType: - // *FaultAbort_HttpStatus - // *FaultAbort_GrpcStatus - // *FaultAbort_HeaderAbort_ - ErrorType isFaultAbort_ErrorType `protobuf_oneof:"error_type"` - // The percentage of requests/operations/connections that will be aborted with the error code - // provided. - Percentage *v3.FractionalPercent `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` -} - -func (x *FaultAbort) Reset() { - *x = FaultAbort{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FaultAbort) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FaultAbort) ProtoMessage() {} - -func (x *FaultAbort) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FaultAbort.ProtoReflect.Descriptor instead. -func (*FaultAbort) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescGZIP(), []int{0} -} - -func (m *FaultAbort) GetErrorType() isFaultAbort_ErrorType { - if m != nil { - return m.ErrorType - } - return nil -} - -func (x *FaultAbort) GetHttpStatus() uint32 { - if x, ok := x.GetErrorType().(*FaultAbort_HttpStatus); ok { - return x.HttpStatus - } - return 0 -} - -func (x *FaultAbort) GetGrpcStatus() uint32 { - if x, ok := x.GetErrorType().(*FaultAbort_GrpcStatus); ok { - return x.GrpcStatus - } - return 0 -} - -func (x *FaultAbort) GetHeaderAbort() *FaultAbort_HeaderAbort { - if x, ok := x.GetErrorType().(*FaultAbort_HeaderAbort_); ok { - return x.HeaderAbort - } - return nil -} - -func (x *FaultAbort) GetPercentage() *v3.FractionalPercent { - if x != nil { - return x.Percentage - } - return nil -} - -type isFaultAbort_ErrorType interface { - isFaultAbort_ErrorType() -} - -type FaultAbort_HttpStatus struct { - // HTTP status code to use to abort the HTTP request. - HttpStatus uint32 `protobuf:"varint,2,opt,name=http_status,json=httpStatus,proto3,oneof"` -} - -type FaultAbort_GrpcStatus struct { - // gRPC status code to use to abort the gRPC request. - GrpcStatus uint32 `protobuf:"varint,5,opt,name=grpc_status,json=grpcStatus,proto3,oneof"` -} - -type FaultAbort_HeaderAbort_ struct { - // Fault aborts are controlled via an HTTP header (if applicable). - HeaderAbort *FaultAbort_HeaderAbort `protobuf:"bytes,4,opt,name=header_abort,json=headerAbort,proto3,oneof"` -} - -func (*FaultAbort_HttpStatus) isFaultAbort_ErrorType() {} - -func (*FaultAbort_GrpcStatus) isFaultAbort_ErrorType() {} - -func (*FaultAbort_HeaderAbort_) isFaultAbort_ErrorType() {} - -// [#next-free-field: 15] -type HTTPFault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If specified, the filter will inject delays based on the values in the - // object. - Delay *v31.FaultDelay `protobuf:"bytes,1,opt,name=delay,proto3" json:"delay,omitempty"` - // If specified, the filter will abort requests based on the values in - // the object. At least *abort* or *delay* must be specified. - Abort *FaultAbort `protobuf:"bytes,2,opt,name=abort,proto3" json:"abort,omitempty"` - // Specifies the name of the (destination) upstream cluster that the - // filter should match on. Fault injection will be restricted to requests - // bound to the specific upstream cluster. - UpstreamCluster string `protobuf:"bytes,3,opt,name=upstream_cluster,json=upstreamCluster,proto3" json:"upstream_cluster,omitempty"` - // Specifies a set of headers that the filter should match on. The fault - // injection filter can be applied selectively to requests that match a set of - // headers specified in the fault filter config. The chances of actual fault - // injection further depend on the value of the :ref:`percentage - // ` field. - // The filter will check the request's headers against all the specified - // headers in the filter 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 []*v4alpha.HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` - // Faults are injected for the specified list of downstream hosts. If this - // setting is not set, faults are injected for all downstream nodes. - // Downstream node name is taken from :ref:`the HTTP - // x-envoy-downstream-service-node - // ` header and compared - // against downstream_nodes list. - DownstreamNodes []string `protobuf:"bytes,5,rep,name=downstream_nodes,json=downstreamNodes,proto3" json:"downstream_nodes,omitempty"` - // The maximum number of faults that can be active at a single time via the configured fault - // filter. Note that because this setting can be overridden at the route level, it's possible - // for the number of active faults to be greater than this value (if injected via a different - // route). If not specified, defaults to unlimited. This setting can be overridden via - // `runtime ` and any faults that are not injected - // due to overflow will be indicated via the `faults_overflow - // ` stat. - // - // .. attention:: - // Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy - // limit. It's possible for the number of active faults to rise slightly above the configured - // amount due to the implementation details. - MaxActiveFaults *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=max_active_faults,json=maxActiveFaults,proto3" json:"max_active_faults,omitempty"` - // The response rate limit to be applied to the response body of the stream. When configured, - // the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent - // ` runtime key. - // - // .. attention:: - // This is a per-stream limit versus a connection level limit. This means that concurrent streams - // will each get an independent limit. - ResponseRateLimit *v31.FaultRateLimit `protobuf:"bytes,7,opt,name=response_rate_limit,json=responseRateLimit,proto3" json:"response_rate_limit,omitempty"` - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_delay_percent - DelayPercentRuntime string `protobuf:"bytes,8,opt,name=delay_percent_runtime,json=delayPercentRuntime,proto3" json:"delay_percent_runtime,omitempty"` - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.abort_percent - AbortPercentRuntime string `protobuf:"bytes,9,opt,name=abort_percent_runtime,json=abortPercentRuntime,proto3" json:"abort_percent_runtime,omitempty"` - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_duration_ms - DelayDurationRuntime string `protobuf:"bytes,10,opt,name=delay_duration_runtime,json=delayDurationRuntime,proto3" json:"delay_duration_runtime,omitempty"` - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.http_status - AbortHttpStatusRuntime string `protobuf:"bytes,11,opt,name=abort_http_status_runtime,json=abortHttpStatusRuntime,proto3" json:"abort_http_status_runtime,omitempty"` - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.max_active_faults - MaxActiveFaultsRuntime string `protobuf:"bytes,12,opt,name=max_active_faults_runtime,json=maxActiveFaultsRuntime,proto3" json:"max_active_faults_runtime,omitempty"` - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.rate_limit.response_percent - ResponseRateLimitPercentRuntime string `protobuf:"bytes,13,opt,name=response_rate_limit_percent_runtime,json=responseRateLimitPercentRuntime,proto3" json:"response_rate_limit_percent_runtime,omitempty"` - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.grpc_status - AbortGrpcStatusRuntime string `protobuf:"bytes,14,opt,name=abort_grpc_status_runtime,json=abortGrpcStatusRuntime,proto3" json:"abort_grpc_status_runtime,omitempty"` -} - -func (x *HTTPFault) Reset() { - *x = HTTPFault{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPFault) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPFault) ProtoMessage() {} - -func (x *HTTPFault) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HTTPFault.ProtoReflect.Descriptor instead. -func (*HTTPFault) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescGZIP(), []int{1} -} - -func (x *HTTPFault) GetDelay() *v31.FaultDelay { - if x != nil { - return x.Delay - } - return nil -} - -func (x *HTTPFault) GetAbort() *FaultAbort { - if x != nil { - return x.Abort - } - return nil -} - -func (x *HTTPFault) GetUpstreamCluster() string { - if x != nil { - return x.UpstreamCluster - } - return "" -} - -func (x *HTTPFault) GetHeaders() []*v4alpha.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *HTTPFault) GetDownstreamNodes() []string { - if x != nil { - return x.DownstreamNodes - } - return nil -} - -func (x *HTTPFault) GetMaxActiveFaults() *wrappers.UInt32Value { - if x != nil { - return x.MaxActiveFaults - } - return nil -} - -func (x *HTTPFault) GetResponseRateLimit() *v31.FaultRateLimit { - if x != nil { - return x.ResponseRateLimit - } - return nil -} - -func (x *HTTPFault) GetDelayPercentRuntime() string { - if x != nil { - return x.DelayPercentRuntime - } - return "" -} - -func (x *HTTPFault) GetAbortPercentRuntime() string { - if x != nil { - return x.AbortPercentRuntime - } - return "" -} - -func (x *HTTPFault) GetDelayDurationRuntime() string { - if x != nil { - return x.DelayDurationRuntime - } - return "" -} - -func (x *HTTPFault) GetAbortHttpStatusRuntime() string { - if x != nil { - return x.AbortHttpStatusRuntime - } - return "" -} - -func (x *HTTPFault) GetMaxActiveFaultsRuntime() string { - if x != nil { - return x.MaxActiveFaultsRuntime - } - return "" -} - -func (x *HTTPFault) GetResponseRateLimitPercentRuntime() string { - if x != nil { - return x.ResponseRateLimitPercentRuntime - } - return "" -} - -func (x *HTTPFault) GetAbortGrpcStatusRuntime() string { - if x != nil { - return x.AbortGrpcStatusRuntime - } - return "" -} - -// Fault aborts are controlled via an HTTP header (if applicable). See the -// :ref:`HTTP fault filter ` documentation for -// more information. -type FaultAbort_HeaderAbort struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *FaultAbort_HeaderAbort) Reset() { - *x = FaultAbort_HeaderAbort{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FaultAbort_HeaderAbort) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FaultAbort_HeaderAbort) ProtoMessage() {} - -func (x *FaultAbort_HeaderAbort) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FaultAbort_HeaderAbort.ProtoReflect.Descriptor instead. -func (*FaultAbort_HeaderAbort) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescGZIP(), []int{0, 0} -} - -var File_envoy_extensions_filters_http_fault_v4alpha_fault_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x2f, 0x76, 0x33, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x03, 0x0a, 0x0a, 0x46, 0x61, 0x75, 0x6c, - 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, - 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x67, - 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x68, 0x0a, 0x0c, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x5f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x61, - 0x75, 0x6c, 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, - 0x62, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x62, - 0x6f, 0x72, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x61, 0x67, 0x65, 0x1a, 0x53, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, - 0x62, 0x6f, 0x72, 0x74, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, - 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, - 0x62, 0x6f, 0x72, 0x74, 0x42, 0x11, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xcb, 0x07, - 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, 0x05, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, - 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x61, 0x62, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, - 0x05, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x43, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4e, 0x6f, 0x64, 0x65, - 0x73, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x13, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x52, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x62, 0x6f, - 0x72, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, - 0x16, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x48, 0x74, 0x74, - 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x39, - 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x73, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x61, 0x75, 0x6c, - 0x74, 0x73, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x61, 0x62, 0x6f, 0x72, 0x74, - 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x62, 0x6f, 0x72, - 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x51, 0x0a, 0x39, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescData = file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDesc -) - -func file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDescData -} - -var file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_goTypes = []interface{}{ - (*FaultAbort)(nil), // 0: envoy.extensions.filters.http.fault.v4alpha.FaultAbort - (*HTTPFault)(nil), // 1: envoy.extensions.filters.http.fault.v4alpha.HTTPFault - (*FaultAbort_HeaderAbort)(nil), // 2: envoy.extensions.filters.http.fault.v4alpha.FaultAbort.HeaderAbort - (*v3.FractionalPercent)(nil), // 3: envoy.type.v3.FractionalPercent - (*v31.FaultDelay)(nil), // 4: envoy.extensions.filters.common.fault.v3.FaultDelay - (*v4alpha.HeaderMatcher)(nil), // 5: envoy.config.route.v4alpha.HeaderMatcher - (*wrappers.UInt32Value)(nil), // 6: google.protobuf.UInt32Value - (*v31.FaultRateLimit)(nil), // 7: envoy.extensions.filters.common.fault.v3.FaultRateLimit -} -var file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.filters.http.fault.v4alpha.FaultAbort.header_abort:type_name -> envoy.extensions.filters.http.fault.v4alpha.FaultAbort.HeaderAbort - 3, // 1: envoy.extensions.filters.http.fault.v4alpha.FaultAbort.percentage:type_name -> envoy.type.v3.FractionalPercent - 4, // 2: envoy.extensions.filters.http.fault.v4alpha.HTTPFault.delay:type_name -> envoy.extensions.filters.common.fault.v3.FaultDelay - 0, // 3: envoy.extensions.filters.http.fault.v4alpha.HTTPFault.abort:type_name -> envoy.extensions.filters.http.fault.v4alpha.FaultAbort - 5, // 4: envoy.extensions.filters.http.fault.v4alpha.HTTPFault.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 6, // 5: envoy.extensions.filters.http.fault.v4alpha.HTTPFault.max_active_faults:type_name -> google.protobuf.UInt32Value - 7, // 6: envoy.extensions.filters.http.fault.v4alpha.HTTPFault.response_rate_limit:type_name -> envoy.extensions.filters.common.fault.v3.FaultRateLimit - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_init() } -func file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_init() { - if File_envoy_extensions_filters_http_fault_v4alpha_fault_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FaultAbort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPFault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FaultAbort_HeaderAbort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*FaultAbort_HttpStatus)(nil), - (*FaultAbort_GrpcStatus)(nil), - (*FaultAbort_HeaderAbort_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_fault_v4alpha_fault_proto = out.File - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_rawDesc = nil - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_goTypes = nil - file_envoy_extensions_filters_http_fault_v4alpha_fault_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/fault/v4alpha/fault.pb.validate.go b/pkg/api/envoy/extensions/filters/http/fault/v4alpha/fault.pb.validate.go deleted file mode 100644 index 1fbbc245de..0000000000 --- a/pkg/api/envoy/extensions/filters/http/fault/v4alpha/fault.pb.validate.go +++ /dev/null @@ -1,344 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/fault/v4alpha/fault.proto - -package envoy_extensions_filters_http_fault_v4alpha - -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{} -) - -// Validate checks the field values on FaultAbort with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *FaultAbort) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FaultAbortValidationError{ - field: "Percentage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.ErrorType.(type) { - - case *FaultAbort_HttpStatus: - - if val := m.GetHttpStatus(); val < 200 || val >= 600 { - return FaultAbortValidationError{ - field: "HttpStatus", - reason: "value must be inside range [200, 600)", - } - } - - case *FaultAbort_GrpcStatus: - // no validation rules for GrpcStatus - - case *FaultAbort_HeaderAbort_: - - if v, ok := interface{}(m.GetHeaderAbort()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FaultAbortValidationError{ - field: "HeaderAbort", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return FaultAbortValidationError{ - field: "ErrorType", - reason: "value is required", - } - - } - - return nil -} - -// FaultAbortValidationError is the validation error returned by -// FaultAbort.Validate if the designated constraints aren't met. -type FaultAbortValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FaultAbortValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FaultAbortValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FaultAbortValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FaultAbortValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FaultAbortValidationError) ErrorName() string { return "FaultAbortValidationError" } - -// Error satisfies the builtin error interface -func (e FaultAbortValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFaultAbort.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FaultAbortValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FaultAbortValidationError{} - -// Validate checks the field values on HTTPFault with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HTTPFault) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HTTPFaultValidationError{ - field: "Delay", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAbort()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HTTPFaultValidationError{ - field: "Abort", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for UpstreamCluster - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HTTPFaultValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetMaxActiveFaults()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HTTPFaultValidationError{ - field: "MaxActiveFaults", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetResponseRateLimit()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HTTPFaultValidationError{ - field: "ResponseRateLimit", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DelayPercentRuntime - - // no validation rules for AbortPercentRuntime - - // no validation rules for DelayDurationRuntime - - // no validation rules for AbortHttpStatusRuntime - - // no validation rules for MaxActiveFaultsRuntime - - // no validation rules for ResponseRateLimitPercentRuntime - - // no validation rules for AbortGrpcStatusRuntime - - return nil -} - -// HTTPFaultValidationError is the validation error returned by -// HTTPFault.Validate if the designated constraints aren't met. -type HTTPFaultValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HTTPFaultValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HTTPFaultValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HTTPFaultValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HTTPFaultValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HTTPFaultValidationError) ErrorName() string { return "HTTPFaultValidationError" } - -// Error satisfies the builtin error interface -func (e HTTPFaultValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHTTPFault.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HTTPFaultValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HTTPFaultValidationError{} - -// Validate checks the field values on FaultAbort_HeaderAbort with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *FaultAbort_HeaderAbort) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// FaultAbort_HeaderAbortValidationError is the validation error returned by -// FaultAbort_HeaderAbort.Validate if the designated constraints aren't met. -type FaultAbort_HeaderAbortValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FaultAbort_HeaderAbortValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FaultAbort_HeaderAbortValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FaultAbort_HeaderAbortValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FaultAbort_HeaderAbortValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FaultAbort_HeaderAbortValidationError) ErrorName() string { - return "FaultAbort_HeaderAbortValidationError" -} - -// Error satisfies the builtin error interface -func (e FaultAbort_HeaderAbortValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFaultAbort_HeaderAbort.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FaultAbort_HeaderAbortValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FaultAbort_HeaderAbortValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.go b/pkg/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.go new file mode 100644 index 0000000000..c1dd21f0da --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.go @@ -0,0 +1,269 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto + +package gcp_authnv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Filter configuration. +type GcpAuthnFilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP URI to fetch tokens from GCE Metadata Server(https://cloud.google.com/compute/docs/metadata/overview). + // The URL format is "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=[AUDIENCE]" + HttpUri *v3.HttpUri `protobuf:"bytes,1,opt,name=http_uri,json=httpUri,proto3" json:"http_uri,omitempty"` + // Retry policy for fetching tokens. + // This field is optional. If it is not configured, the filter will be fail-closed (i.e., reject the requests). + RetryPolicy *v3.RetryPolicy `protobuf:"bytes,2,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` +} + +func (x *GcpAuthnFilterConfig) Reset() { + *x = GcpAuthnFilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcpAuthnFilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcpAuthnFilterConfig) ProtoMessage() {} + +func (x *GcpAuthnFilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcpAuthnFilterConfig.ProtoReflect.Descriptor instead. +func (*GcpAuthnFilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescGZIP(), []int{0} +} + +func (x *GcpAuthnFilterConfig) GetHttpUri() *v3.HttpUri { + if x != nil { + return x.HttpUri + } + return nil +} + +func (x *GcpAuthnFilterConfig) GetRetryPolicy() *v3.RetryPolicy { + if x != nil { + return x.RetryPolicy + } + return nil +} + +type Audience struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The map of audience key to audience value. + // The key is defined as the contract with control plane in the configuration. It is fixed string "audience_key". + // The value is URL of the receiving service that performs token authentication. + AudienceMap map[string]string `protobuf:"bytes,1,rep,name=audience_map,json=audienceMap,proto3" json:"audience_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Audience) Reset() { + *x = Audience{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Audience) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Audience) ProtoMessage() {} + +func (x *Audience) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Audience.ProtoReflect.Descriptor instead. +func (*Audience) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescGZIP(), []int{1} +} + +func (x *Audience) GetAudienceMap() map[string]string { + if x != nil { + return x.AudienceMap + } + return nil +} + +var File_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x63, 0x70, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x63, 0x70, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x01, 0x0a, 0x14, 0x47, 0x63, 0x70, 0x41, 0x75, + 0x74, 0x68, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x42, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, + 0x55, 0x72, 0x69, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xb4, 0x01, 0x0a, 0x08, 0x41, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x63, 0x70, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x70, + 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0xb2, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x47, + 0x63, 0x70, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2f, 0x76, + 0x33, 0x3b, 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData = file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc +) + +func file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData +} + +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_goTypes = []interface{}{ + (*GcpAuthnFilterConfig)(nil), // 0: envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig + (*Audience)(nil), // 1: envoy.extensions.filters.http.gcp_authn.v3.Audience + nil, // 2: envoy.extensions.filters.http.gcp_authn.v3.Audience.AudienceMapEntry + (*v3.HttpUri)(nil), // 3: envoy.config.core.v3.HttpUri + (*v3.RetryPolicy)(nil), // 4: envoy.config.core.v3.RetryPolicy +} +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig.http_uri:type_name -> envoy.config.core.v3.HttpUri + 4, // 1: envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy + 2, // 2: envoy.extensions.filters.http.gcp_authn.v3.Audience.audience_map:type_name -> envoy.extensions.filters.http.gcp_authn.v3.Audience.AudienceMapEntry + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_init() } +func file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_init() { + if File_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcpAuthnFilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Audience); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto = out.File + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc = nil + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_goTypes = nil + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.validate.go b/pkg/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.validate.go new file mode 100644 index 0000000000..cf7a5843f7 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.validate.go @@ -0,0 +1,308 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto + +package gcp_authnv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GcpAuthnFilterConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GcpAuthnFilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GcpAuthnFilterConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GcpAuthnFilterConfigMultiError, or nil if none found. +func (m *GcpAuthnFilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *GcpAuthnFilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetHttpUri() == nil { + err := GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetHttpUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GcpAuthnFilterConfigValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GcpAuthnFilterConfigMultiError(errors) + } + + return nil +} + +// GcpAuthnFilterConfigMultiError is an error wrapping multiple validation +// errors returned by GcpAuthnFilterConfig.ValidateAll() if the designated +// constraints aren't met. +type GcpAuthnFilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GcpAuthnFilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GcpAuthnFilterConfigMultiError) AllErrors() []error { return m } + +// GcpAuthnFilterConfigValidationError is the validation error returned by +// GcpAuthnFilterConfig.Validate if the designated constraints aren't met. +type GcpAuthnFilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GcpAuthnFilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GcpAuthnFilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GcpAuthnFilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GcpAuthnFilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GcpAuthnFilterConfigValidationError) ErrorName() string { + return "GcpAuthnFilterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e GcpAuthnFilterConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGcpAuthnFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GcpAuthnFilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GcpAuthnFilterConfigValidationError{} + +// Validate checks the field values on Audience with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Audience) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Audience with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AudienceMultiError, or nil +// if none found. +func (m *Audience) ValidateAll() error { + return m.validate(true) +} + +func (m *Audience) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for AudienceMap + + if len(errors) > 0 { + return AudienceMultiError(errors) + } + + return nil +} + +// AudienceMultiError is an error wrapping multiple validation errors returned +// by Audience.ValidateAll() if the designated constraints aren't met. +type AudienceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AudienceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AudienceMultiError) AllErrors() []error { return m } + +// AudienceValidationError is the validation error returned by +// Audience.Validate if the designated constraints aren't met. +type AudienceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AudienceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AudienceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AudienceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AudienceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AudienceValidationError) ErrorName() string { return "AudienceValidationError" } + +// Error satisfies the builtin error interface +func (e AudienceValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAudience.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AudienceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AudienceValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.go b/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.go index a91f11cfc3..edb7abcba6 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto -package envoy_extensions_filters_http_grpc_http1_bridge_v3 +package grpc_http1_bridgev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,15 +21,18 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC HTTP/1.1 Bridge filter config. type Config struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // If true then requests with content type set to `application/x-protobuf` will be automatically converted to gRPC. + // This works by prepending the payload data with the gRPC header frame, as defined by the wiring format, and + // Content-Type will be updated accordingly before sending the request. + // For the requests that went through this upgrade the filter will also strip the frame before forwarding the + // response to the client. + UpgradeProtobufToGrpc bool `protobuf:"varint,1,opt,name=upgrade_protobuf_to_grpc,json=upgradeProtobufToGrpc,proto3" json:"upgrade_protobuf_to_grpc,omitempty"` } func (x *Config) Reset() { @@ -65,6 +67,13 @@ func (*Config) Descriptor() ([]byte, []int) { return file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescGZIP(), []int{0} } +func (x *Config) GetUpgradeProtobufToGrpc() bool { + if x != nil { + return x.UpgradeProtobufToGrpc + } + return false +} + var File_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDesc = []byte{ @@ -79,18 +88,28 @@ var file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDesc 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x59, - 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x37, 0x0a, 0x18, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x54, 0x6f, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, + 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xc8, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, + 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, + 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.validate.go b/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.validate.go index 9641bb625d..f68c16ae63 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto -package envoy_extensions_filters_http_grpc_http1_bridge_v3 +package grpc_http1_bridgev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } + var errors []error + + // no validation rules for UpgradeProtobufToGrpc + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.go b/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.go index 64d349708c..02f0297a1c 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto -package envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3 +package grpc_http1_reverse_bridgev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC reverse bridge filter configuration type FilterConfig struct { state protoimpl.MessageState @@ -39,8 +34,24 @@ type FilterConfig struct { // If true, Envoy will assume that the upstream doesn't understand gRPC frames and // strip the gRPC frame from the request, and add it back in to the response. This will // hide the gRPC semantics from the upstream, allowing it to receive and respond with a - // simple binary encoded protobuf. + // simple binary encoded protobuf. In order to calculate the `Content-Length` header value, Envoy + // will buffer the upstream response unless :ref:`response_size_header + // ` + // is set, in which case Envoy will use the value of an upstream header to calculate the content + // length. WithholdGrpcFrames bool `protobuf:"varint,2,opt,name=withhold_grpc_frames,json=withholdGrpcFrames,proto3" json:"withhold_grpc_frames,omitempty"` + // When :ref:`withhold_grpc_frames + // ` + // is true, this option controls how Envoy calculates the `Content-Length`. When + // *response_size_header* is empty, Envoy will buffer the upstream response to calculate its + // size. When *response_size_header* is set to a non-empty string, Envoy will stream the response + // to the downstream and it will use the value of the response header with this name to set the + // `Content-Length` header and gRPC frame size. If the header with this name is repeated, only + // the first value will be used. + // + // Envoy will treat the upstream response as an error if this option is specified and the header + // is missing or if the value does not match the actual response body size. + ResponseSizeHeader string `protobuf:"bytes,3,opt,name=response_size_header,json=responseSizeHeader,proto3" json:"response_size_header,omitempty"` } func (x *FilterConfig) Reset() { @@ -89,6 +100,13 @@ func (x *FilterConfig) GetWithholdGrpcFrames() bool { return false } +func (x *FilterConfig) GetResponseSizeHeader() string { + if x != nil { + return x.ResponseSizeHeader + } + return "" +} + // gRPC reverse bridge filter configuration per virtualhost/route/weighted-cluster level. type FilterConfigPerRoute struct { state protoimpl.MessageState @@ -156,34 +174,45 @@ var file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xbd, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x22, 0xef, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x77, 0x69, 0x74, 0x68, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x77, 0x69, 0x74, - 0x68, 0x68, 0x6f, 0x6c, 0x64, 0x47, 0x72, 0x70, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x3a, - 0x4f, 0x9a, 0xc5, 0x88, 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x68, 0x68, 0x6f, 0x6c, 0x64, 0x47, 0x72, 0x70, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x30, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x3a, 0x4f, 0x9a, 0xc5, 0x88, 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0x8b, 0x01, 0x0a, 0x14, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x57, 0x9a, 0xc5, 0x88, 0x1e, 0x52, 0x0a, 0x50, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, + 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x42, 0xe0, 0x01, 0x0a, 0x48, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x8b, 0x01, 0x0a, 0x14, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x57, 0x9a, 0xc5, 0x88, 0x1e, 0x52, 0x0a, 0x50, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, - 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x61, - 0x0a, 0x48, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, - 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x76, 0x33, 0x3b, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.validate.go b/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.validate.go index dd66b8bfc0..0fed099c8b 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto -package envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3 +package grpc_http1_reverse_bridgev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,70 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetContentType()) < 1 { - return FilterConfigValidationError{ + err := FilterConfigValidationError{ field: "ContentType", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for WithholdGrpcFrames + // no validation rules for ResponseSizeHeader + + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil } +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + // FilterConfigValidationError is the validation error returned by // FilterConfig.Validate if the designated constraints aren't met. type FilterConfigValidationError struct { @@ -109,17 +151,52 @@ var _ interface { // Validate checks the field values on FilterConfigPerRoute with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *FilterConfigPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfigPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FilterConfigPerRouteMultiError, or nil if none found. +func (m *FilterConfigPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfigPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Disabled + if len(errors) > 0 { + return FilterConfigPerRouteMultiError(errors) + } + return nil } +// FilterConfigPerRouteMultiError is an error wrapping multiple validation +// errors returned by FilterConfigPerRoute.ValidateAll() if the designated +// constraints aren't met. +type FilterConfigPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigPerRouteMultiError) AllErrors() []error { return m } + // FilterConfigPerRouteValidationError is the validation error returned by // FilterConfigPerRoute.Validate if the designated constraints aren't met. type FilterConfigPerRouteValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.go b/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.go index 4ecbe7141a..506899f17b 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto -package envoy_extensions_filters_http_grpc_json_transcoder_v3 +package grpc_json_transcoderv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type GrpcJsonTranscoder_UrlUnescapeSpec int32 const ( @@ -84,7 +79,15 @@ func (GrpcJsonTranscoder_UrlUnescapeSpec) EnumDescriptor() ([]byte, []int) { return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescGZIP(), []int{0, 0} } -// [#next-free-field: 11] +// [#next-free-field: 14] +// GrpcJsonTranscoder filter configuration. +// The filter itself can be used per route / per virtual host or on the general level. The most +// specific one is being used for a given route. If the list of services is empty - filter +// is considered to be disabled. +// Note that if specifying the filter per route, first the route is matched, and then transcoding +// filter is applied. It matters when specifying the route configuration and paths to match the +// request - for per-route grpc transcoder configs, the original path should be matched, while +// in other cases, the grpc-like path is expected (the one AFTER the filter is applied). type GrpcJsonTranscoder struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -99,6 +102,12 @@ type GrpcJsonTranscoder struct { // the transcoder will translate. If the service name doesn't exist in ``proto_descriptor``, // Envoy will fail at startup. The ``proto_descriptor`` may contain more services than // the service names specified here, but they won't be translated. + // + // By default, the filter will pass through requests that do not map to any specified services. + // If the list of services is empty, filter is considered disabled. + // However, this behavior changes if + // :ref:`reject_unknown_method ` + // is enabled. Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"` // Control options for response JSON. These options are passed directly to // `JsonPrintOptions `. + // In order to transcode the message, the ``google.rpc.RequestInfo`` type from + // the ``google/rpc/error_details.proto`` should be included in the configured + // :ref:`proto descriptor set `. ConvertGrpcStatus bool `protobuf:"varint,9,opt,name=convert_grpc_status,json=convertGrpcStatus,proto3" json:"convert_grpc_status,omitempty"` // URL unescaping policy. - // This spec is only applied when extracting variable with multiple segments. + // This spec is only applied when extracting variable with multiple segments in the URL path. // For example, in case of `/foo/{x=*}/bar/{y=prefix/*}/{z=**}` `x` variable is single segment and `y` and `z` are multiple segments. // For a path with `/foo/first/bar/prefix/second/third/fourth`, `x=first`, `y=prefix/second`, `z=third/fourth`. - // If this setting is not specified, the value defaults to :ref:`ALL_CHARACTERS_EXCEPT_RESERVED`. + // If this setting is not specified, the value defaults to :ref:`ALL_CHARACTERS_EXCEPT_RESERVED`. UrlUnescapeSpec GrpcJsonTranscoder_UrlUnescapeSpec `protobuf:"varint,10,opt,name=url_unescape_spec,json=urlUnescapeSpec,proto3,enum=envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder_UrlUnescapeSpec" json:"url_unescape_spec,omitempty"` + // If true, unescape '+' to space when extracting variables in query parameters. + // This is to support `HTML 2.0 `_ + QueryParamUnescapePlus bool `protobuf:"varint,12,opt,name=query_param_unescape_plus,json=queryParamUnescapePlus,proto3" json:"query_param_unescape_plus,omitempty"` + // If true, try to match the custom verb even if it is unregistered. By + // default, only match when it is registered. + // + // According to the http template `syntax `_, + // the custom verb is **":" LITERAL** at the end of http template. + // + // For a request with */foo/bar:baz* and *:baz* is not registered in any url_template, here is the behavior change + // - if the field is not set, *:baz* will not be treated as custom verb, so it will match **/foo/{x=*}**. + // - if the field is set, *:baz* is treated as custom verb, so it will NOT match **/foo/{x=*}** since the template doesn't use any custom verb. + MatchUnregisteredCustomVerb bool `protobuf:"varint,13,opt,name=match_unregistered_custom_verb,json=matchUnregisteredCustomVerb,proto3" json:"match_unregistered_custom_verb,omitempty"` + // Configure the behavior when handling requests that cannot be transcoded. + // + // By default, the transcoder will silently pass through HTTP requests that are malformed. + // This includes requests with unknown query parameters, unregister paths, etc. + // + // Set these options to enable strict HTTP request validation, resulting in the transcoder rejecting + // such requests with a ``HTTP 4xx``. See each individual option for more details on the validation. + // gRPC requests will still silently pass through without transcoding. + // + // The benefit is a proper error message to the downstream. + // If the upstream is a gRPC server, it cannot handle the passed-through HTTP requests and will reset + // the TCP connection. The downstream will then + // receive a ``HTTP 503 Service Unavailable`` due to the upstream connection reset. + // This incorrect error message may conflict with other Envoy components, such as retry policies. + RequestValidationOptions *GrpcJsonTranscoder_RequestValidationOptions `protobuf:"bytes,11,opt,name=request_validation_options,json=requestValidationOptions,proto3" json:"request_validation_options,omitempty"` } func (x *GrpcJsonTranscoder) Reset() { @@ -306,6 +343,27 @@ func (x *GrpcJsonTranscoder) GetUrlUnescapeSpec() GrpcJsonTranscoder_UrlUnescape return GrpcJsonTranscoder_ALL_CHARACTERS_EXCEPT_RESERVED } +func (x *GrpcJsonTranscoder) GetQueryParamUnescapePlus() bool { + if x != nil { + return x.QueryParamUnescapePlus + } + return false +} + +func (x *GrpcJsonTranscoder) GetMatchUnregisteredCustomVerb() bool { + if x != nil { + return x.MatchUnregisteredCustomVerb + } + return false +} + +func (x *GrpcJsonTranscoder) GetRequestValidationOptions() *GrpcJsonTranscoder_RequestValidationOptions { + if x != nil { + return x.RequestValidationOptions + } + return nil +} + type isGrpcJsonTranscoder_DescriptorSet interface { isGrpcJsonTranscoder_DescriptorSet() } @@ -411,6 +469,74 @@ func (x *GrpcJsonTranscoder_PrintOptions) GetPreserveProtoFieldNames() bool { return false } +type GrpcJsonTranscoder_RequestValidationOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // By default, a request that cannot be mapped to any specified gRPC + // :ref:`services ` + // will pass-through this filter. + // When set to true, the request will be rejected with a ``HTTP 404 Not Found``. + RejectUnknownMethod bool `protobuf:"varint,1,opt,name=reject_unknown_method,json=rejectUnknownMethod,proto3" json:"reject_unknown_method,omitempty"` + // By default, a request with query parameters that cannot be mapped to the gRPC request message + // will pass-through this filter. + // When set to true, the request will be rejected with a ``HTTP 400 Bad Request``. + // + // The fields + // :ref:`ignore_unknown_query_parameters ` + // and + // :ref:`ignored_query_parameters ` + // have priority over this strict validation behavior. + RejectUnknownQueryParameters bool `protobuf:"varint,2,opt,name=reject_unknown_query_parameters,json=rejectUnknownQueryParameters,proto3" json:"reject_unknown_query_parameters,omitempty"` +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) Reset() { + *x = GrpcJsonTranscoder_RequestValidationOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcJsonTranscoder_RequestValidationOptions) ProtoMessage() {} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcJsonTranscoder_RequestValidationOptions.ProtoReflect.Descriptor instead. +func (*GrpcJsonTranscoder_RequestValidationOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) GetRejectUnknownMethod() bool { + if x != nil { + return x.RejectUnknownMethod + } + return false +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) GetRejectUnknownQueryParameters() bool { + if x != nil { + return x.RejectUnknownQueryParameters + } + return false +} + var File_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDesc = []byte{ @@ -427,7 +553,7 @@ var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x09, 0x0a, 0x12, 0x47, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x0c, 0x0a, 0x12, 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x70, @@ -435,82 +561,117 @@ var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_ 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x62, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x42, - 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x7b, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6e, - 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x56, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, - 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, - 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x1f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, - 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x75, - 0x72, 0x6c, 0x5f, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x59, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x55, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x75, 0x72, 0x6c, - 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x53, 0x70, 0x65, 0x63, 0x1a, 0xc0, 0x02, 0x0a, - 0x0c, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x1d, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x70, - 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x61, 0x6c, 0x77, - 0x61, 0x79, 0x73, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x3a, 0x0a, 0x1a, 0x61, 0x6c, 0x77, 0x61, 0x79, - 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x5f, 0x61, 0x73, - 0x5f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x61, 0x6c, 0x77, - 0x61, 0x79, 0x73, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x41, 0x73, 0x49, - 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x7b, + 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, + 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x70, + 0x72, 0x69, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x19, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x18, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x75, + 0x74, 0x6f, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x1f, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x75, 0x72, 0x6c, 0x5f, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x59, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x55, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x75, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x39, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x5f, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x50, 0x6c, 0x75, 0x73, 0x12, 0x43, 0x0a, + 0x1e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x55, 0x6e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x56, 0x65, + 0x72, 0x62, 0x12, 0xa0, 0x01, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x62, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, + 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, - 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x6a, 0x0a, 0x0f, 0x55, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x4c, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, - 0x54, 0x45, 0x52, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x45, - 0x52, 0x56, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x4c, 0x4c, 0x5f, 0x43, 0x48, - 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x50, 0x54, 0x5f, - 0x53, 0x4c, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x4c, 0x5f, 0x43, - 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x53, 0x10, 0x02, 0x3a, 0x40, 0x9a, 0xc5, 0x88, - 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4a, - 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x42, 0x15, 0x0a, - 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x42, 0x60, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x18, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xc0, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x77, 0x68, + 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, + 0x61, 0x64, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x41, 0x0a, + 0x1d, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x72, + 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x50, 0x72, 0x69, 0x6e, + 0x74, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x12, 0x3a, 0x0a, 0x1a, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, + 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x50, 0x72, 0x69, 0x6e, + 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x17, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, + 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x22, 0x6a, 0x0a, 0x0f, 0x55, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x4c, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, + 0x43, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x52, 0x45, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x4c, 0x4c, 0x5f, 0x43, + 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x50, 0x54, + 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x4c, 0x5f, + 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x53, 0x10, 0x02, 0x3a, 0x40, 0x9a, 0xc5, + 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x42, 0x15, + 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xd5, 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x67, + 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -526,20 +687,22 @@ func file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto } var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_goTypes = []interface{}{ - (GrpcJsonTranscoder_UrlUnescapeSpec)(0), // 0: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.UrlUnescapeSpec - (*GrpcJsonTranscoder)(nil), // 1: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder - (*GrpcJsonTranscoder_PrintOptions)(nil), // 2: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.PrintOptions + (GrpcJsonTranscoder_UrlUnescapeSpec)(0), // 0: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.UrlUnescapeSpec + (*GrpcJsonTranscoder)(nil), // 1: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder + (*GrpcJsonTranscoder_PrintOptions)(nil), // 2: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.PrintOptions + (*GrpcJsonTranscoder_RequestValidationOptions)(nil), // 3: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.RequestValidationOptions } var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_depIdxs = []int32{ 2, // 0: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.print_options:type_name -> envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.PrintOptions 0, // 1: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.url_unescape_spec:type_name -> envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.UrlUnescapeSpec - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 2: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.request_validation_options:type_name -> envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.RequestValidationOptions + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_init() } @@ -572,6 +735,18 @@ func file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto return nil } } + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcJsonTranscoder_RequestValidationOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[0].OneofWrappers = []interface{}{ (*GrpcJsonTranscoder_ProtoDescriptor)(nil), @@ -583,7 +758,7 @@ func file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDesc, NumEnums: 1, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.validate.go b/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.validate.go index 384311c4ab..baefc2754b 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto -package envoy_extensions_filters_http_grpc_json_transcoder_v3 +package grpc_json_transcoderv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcJsonTranscoder with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcJsonTranscoder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcJsonTranscoder with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GrpcJsonTranscoderMultiError, or nil if none found. +func (m *GrpcJsonTranscoder) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder) validate(all bool) error { if m == nil { return nil } - if len(m.GetServices()) < 1 { - return GrpcJsonTranscoderValidationError{ - field: "Services", - reason: "value must contain at least 1 item(s)", + var errors []error + + if all { + switch v := interface{}(m.GetPrintOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "PrintOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "PrintOptions", + reason: "embedded message failed validation", + cause: err, + }) + } } - } - - if v, ok := interface{}(m.GetPrintOptions()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetPrintOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcJsonTranscoderValidationError{ field: "PrintOptions", @@ -67,10 +95,47 @@ func (m *GrpcJsonTranscoder) Validate() error { // no validation rules for ConvertGrpcStatus if _, ok := GrpcJsonTranscoder_UrlUnescapeSpec_name[int32(m.GetUrlUnescapeSpec())]; !ok { - return GrpcJsonTranscoderValidationError{ + err := GrpcJsonTranscoderValidationError{ field: "UrlUnescapeSpec", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for QueryParamUnescapePlus + + // no validation rules for MatchUnregisteredCustomVerb + + if all { + switch v := interface{}(m.GetRequestValidationOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "RequestValidationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "RequestValidationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestValidationOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GrpcJsonTranscoderValidationError{ + field: "RequestValidationOptions", + reason: "embedded message failed validation", + cause: err, + } + } } switch m.DescriptorSet.(type) { @@ -82,16 +147,41 @@ func (m *GrpcJsonTranscoder) Validate() error { // no validation rules for ProtoDescriptorBin default: - return GrpcJsonTranscoderValidationError{ + err := GrpcJsonTranscoderValidationError{ field: "DescriptorSet", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return GrpcJsonTranscoderMultiError(errors) + } + return nil } +// GrpcJsonTranscoderMultiError is an error wrapping multiple validation errors +// returned by GrpcJsonTranscoder.ValidateAll() if the designated constraints +// aren't met. +type GrpcJsonTranscoderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoderMultiError) AllErrors() []error { return m } + // GrpcJsonTranscoderValidationError is the validation error returned by // GrpcJsonTranscoder.Validate if the designated constraints aren't met. type GrpcJsonTranscoderValidationError struct { @@ -150,12 +240,26 @@ var _ interface { // Validate checks the field values on GrpcJsonTranscoder_PrintOptions with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GrpcJsonTranscoder_PrintOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcJsonTranscoder_PrintOptions with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// GrpcJsonTranscoder_PrintOptionsMultiError, or nil if none found. +func (m *GrpcJsonTranscoder_PrintOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder_PrintOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for AddWhitespace // no validation rules for AlwaysPrintPrimitiveFields @@ -164,9 +268,30 @@ func (m *GrpcJsonTranscoder_PrintOptions) Validate() error { // no validation rules for PreserveProtoFieldNames + if len(errors) > 0 { + return GrpcJsonTranscoder_PrintOptionsMultiError(errors) + } + return nil } +// GrpcJsonTranscoder_PrintOptionsMultiError is an error wrapping multiple +// validation errors returned by GrpcJsonTranscoder_PrintOptions.ValidateAll() +// if the designated constraints aren't met. +type GrpcJsonTranscoder_PrintOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoder_PrintOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoder_PrintOptionsMultiError) AllErrors() []error { return m } + // GrpcJsonTranscoder_PrintOptionsValidationError is the validation error // returned by GrpcJsonTranscoder_PrintOptions.Validate if the designated // constraints aren't met. @@ -223,3 +348,113 @@ var _ interface { Cause() error ErrorName() string } = GrpcJsonTranscoder_PrintOptionsValidationError{} + +// Validate checks the field values on +// GrpcJsonTranscoder_RequestValidationOptions with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *GrpcJsonTranscoder_RequestValidationOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcJsonTranscoder_RequestValidationOptions with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// GrpcJsonTranscoder_RequestValidationOptionsMultiError, or nil if none found. +func (m *GrpcJsonTranscoder_RequestValidationOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder_RequestValidationOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for RejectUnknownMethod + + // no validation rules for RejectUnknownQueryParameters + + if len(errors) > 0 { + return GrpcJsonTranscoder_RequestValidationOptionsMultiError(errors) + } + + return nil +} + +// GrpcJsonTranscoder_RequestValidationOptionsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcJsonTranscoder_RequestValidationOptions.ValidateAll() if the designated +// constraints aren't met. +type GrpcJsonTranscoder_RequestValidationOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoder_RequestValidationOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoder_RequestValidationOptionsMultiError) AllErrors() []error { return m } + +// GrpcJsonTranscoder_RequestValidationOptionsValidationError is the validation +// error returned by GrpcJsonTranscoder_RequestValidationOptions.Validate if +// the designated constraints aren't met. +type GrpcJsonTranscoder_RequestValidationOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) ErrorName() string { + return "GrpcJsonTranscoder_RequestValidationOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGrpcJsonTranscoder_RequestValidationOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcJsonTranscoder_RequestValidationOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcJsonTranscoder_RequestValidationOptionsValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.go b/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.go index 4fd07cd041..2ae1963fd6 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/grpc_stats/v3/config.proto -package envoy_extensions_filters_http_grpc_stats_v3 +package grpc_statsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC statistics filter configuration type FilterConfig struct { state protoimpl.MessageState @@ -44,9 +38,9 @@ type FilterConfig struct { PerMethodStatSpecifier isFilterConfig_PerMethodStatSpecifier `protobuf_oneof:"per_method_stat_specifier"` // If true, the filter will gather a histogram for the request time of the upstream. // It works with :ref:`stats_for_all_methods - // ` + // ` // and :ref:`individual_method_stats_allowlist - // ` the same way + // ` the same way // request_message_count and response_message_count works. EnableUpstreamStats bool `protobuf:"varint,4,opt,name=enable_upstream_stats,json=enableUpstreamStats,proto3" json:"enable_upstream_stats,omitempty"` } @@ -143,10 +137,8 @@ type FilterConfig_StatsForAllMethods struct { // // .. attention:: // If neither `individual_method_stats_allowlist` nor `stats_for_all_methods` is set, the - // behavior will default to `stats_for_all_methods=true`. This default value is deprecated, - // and in a future release, if neither field is set, it will default to - // `stats_for_all_methods=false` in order to be safe by default. This behavior can be - // controlled with runtime override + // behavior will default to `stats_for_all_methods=false`. This default value is changed due + // to the previous value being deprecated. This behavior can be changed with runtime override // `envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default`. StatsForAllMethods *wrappers.BoolValue `protobuf:"bytes,3,opt,name=stats_for_all_methods,json=statsForAllMethods,proto3,oneof"` } @@ -231,51 +223,56 @@ var file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDesc = []by 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x90, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, - 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x21, - 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x1e, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, - 0x4f, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x61, 0x6c, 0x6c, - 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x21, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, + 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1e, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, + 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, + 0x66, 0x6f, 0x72, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, + 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1b, 0x0a, 0x19, + 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xb9, 0x01, 0x0a, 0x0c, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, + 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1b, 0x0a, 0x19, 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x22, 0xb9, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x3f, 0x9a, - 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x52, - 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0xb3, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.validate.go b/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.validate.go index 4a133c0a30..9627c89fe7 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_stats/v3/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_stats/v3/config.proto -package envoy_extensions_filters_http_grpc_stats_v3 +package grpc_statsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for EmitFilterState // no validation rules for EnableUpstreamStats @@ -49,7 +65,26 @@ func (m *FilterConfig) Validate() error { case *FilterConfig_IndividualMethodStatsAllowlist: - if v, ok := interface{}(m.GetIndividualMethodStatsAllowlist()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIndividualMethodStatsAllowlist()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "IndividualMethodStatsAllowlist", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "IndividualMethodStatsAllowlist", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIndividualMethodStatsAllowlist()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterConfigValidationError{ field: "IndividualMethodStatsAllowlist", @@ -61,7 +96,26 @@ func (m *FilterConfig) Validate() error { case *FilterConfig_StatsForAllMethods: - if v, ok := interface{}(m.GetStatsForAllMethods()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatsForAllMethods()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "StatsForAllMethods", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "StatsForAllMethods", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsForAllMethods()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterConfigValidationError{ field: "StatsForAllMethods", @@ -73,9 +127,29 @@ func (m *FilterConfig) Validate() error { } + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil } +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + // FilterConfigValidationError is the validation error returned by // FilterConfig.Validate if the designated constraints aren't met. type FilterConfigValidationError struct { @@ -131,20 +205,54 @@ var _ interface { } = FilterConfigValidationError{} // Validate checks the field values on FilterObject with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterObject) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterObject with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterObjectMultiError, or +// nil if none found. +func (m *FilterObject) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterObject) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for RequestMessageCount // no validation rules for ResponseMessageCount + if len(errors) > 0 { + return FilterObjectMultiError(errors) + } + return nil } +// FilterObjectMultiError is an error wrapping multiple validation errors +// returned by FilterObject.ValidateAll() if the designated constraints aren't met. +type FilterObjectMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterObjectMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterObjectMultiError) AllErrors() []error { return m } + // FilterObjectValidationError is the validation error returned by // FilterObject.Validate if the designated constraints aren't met. type FilterObjectValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.go b/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.go index 1f9f1b2841..74ea6dcf64 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto -package envoy_extensions_filters_http_grpc_web_v3 +package grpc_webv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // gRPC Web filter config. type GrpcWeb struct { state protoimpl.MessageState @@ -82,13 +77,18 @@ var file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDesc = []by 0x65, 0x62, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x57, 0x65, 0x62, 0x42, 0x51, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2e, - 0x76, 0x33, 0x42, 0x0c, 0x47, 0x72, 0x70, 0x63, 0x57, 0x65, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x47, 0x72, 0x70, 0x63, 0x57, 0x65, 0x62, 0x42, 0xae, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, + 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x47, 0x72, 0x70, 0x63, 0x57, 0x65, 0x62, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, + 0x65, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.validate.go b/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.validate.go index f7fcabf44b..efbcdb5afd 100644 --- a/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto -package envoy_extensions_filters_http_grpc_web_v3 +package grpc_webv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GrpcWeb with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GrpcWeb) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcWeb with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in GrpcWebMultiError, or nil if none found. +func (m *GrpcWeb) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcWeb) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return GrpcWebMultiError(errors) + } + return nil } +// GrpcWebMultiError is an error wrapping multiple validation errors returned +// by GrpcWeb.ValidateAll() if the designated constraints aren't met. +type GrpcWebMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcWebMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcWebMultiError) AllErrors() []error { return m } + // GrpcWebValidationError is the validation error returned by GrpcWeb.Validate // if the designated constraints aren't met. type GrpcWebValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.go b/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.go index 0a14c74259..12a4247ea1 100644 --- a/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.go +++ b/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/gzip/v3/gzip.proto -package envoy_extensions_filters_http_gzip_v3 +package gzipv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/compressor/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Gzip_CompressionStrategy int32 const ( @@ -157,22 +152,13 @@ type Gzip struct { // which will produce a 4096 bytes window. For more details about this parameter, please refer to // zlib manual > deflateInit2. WindowBits *wrappers.UInt32Value `protobuf:"bytes,9,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"` - // Set of configuration parameters common for all compression filters. If this field is set then - // the fields `content_length`, `content_type`, `disable_on_etag_header` and - // `remove_accept_encoding_header` are ignored. + // Set of configuration parameters common for all compression filters. You can define + // `content_length`, `content_type` and other parameters in this field. Compressor *v3.Compressor `protobuf:"bytes,10,opt,name=compressor,proto3" json:"compressor,omitempty"` // Value for Zlib's next output buffer. If not set, defaults to 4096. // See https://www.zlib.net/manual.html for more details. Also see // https://github.com/envoyproxy/envoy/issues/8448 for context on this filter's performance. ChunkSize *wrappers.UInt32Value `protobuf:"bytes,11,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedContentLength *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_content_length,json=hiddenEnvoyDeprecatedContentLength,proto3" json:"hidden_envoy_deprecated_content_length,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedContentType []string `protobuf:"bytes,6,rep,name=hidden_envoy_deprecated_content_type,json=hiddenEnvoyDeprecatedContentType,proto3" json:"hidden_envoy_deprecated_content_type,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedDisableOnEtagHeader bool `protobuf:"varint,7,opt,name=hidden_envoy_deprecated_disable_on_etag_header,json=hiddenEnvoyDeprecatedDisableOnEtagHeader,proto3" json:"hidden_envoy_deprecated_disable_on_etag_header,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRemoveAcceptEncodingHeader bool `protobuf:"varint,8,opt,name=hidden_envoy_deprecated_remove_accept_encoding_header,json=hiddenEnvoyDeprecatedRemoveAcceptEncodingHeader,proto3" json:"hidden_envoy_deprecated_remove_accept_encoding_header,omitempty"` } func (x *Gzip) Reset() { @@ -249,38 +235,6 @@ func (x *Gzip) GetChunkSize() *wrappers.UInt32Value { return nil } -// Deprecated: Do not use. -func (x *Gzip) GetHiddenEnvoyDeprecatedContentLength() *wrappers.UInt32Value { - if x != nil { - return x.HiddenEnvoyDeprecatedContentLength - } - return nil -} - -// Deprecated: Do not use. -func (x *Gzip) GetHiddenEnvoyDeprecatedContentType() []string { - if x != nil { - return x.HiddenEnvoyDeprecatedContentType - } - return nil -} - -// Deprecated: Do not use. -func (x *Gzip) GetHiddenEnvoyDeprecatedDisableOnEtagHeader() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedDisableOnEtagHeader - } - return false -} - -// Deprecated: Do not use. -func (x *Gzip) GetHiddenEnvoyDeprecatedRemoveAcceptEncodingHeader() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedRemoveAcceptEncodingHeader - } - return false -} - type Gzip_CompressionLevel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -339,7 +293,7 @@ var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDesc = []byte{ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xcf, 0x09, 0x0a, 0x04, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, + 0x74, 0x6f, 0x22, 0x98, 0x07, 0x0a, 0x04, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, @@ -374,54 +328,40 @@ var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDesc = []byte{ 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, - 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x74, 0x0a, - 0x26, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x52, 0x0a, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x64, 0x0a, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x74, - 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x72, 0x0a, - 0x35, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, - 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x2f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x1a, 0x7b, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x28, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, - 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, - 0x53, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x02, 0x3a, - 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x46, - 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, - 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x07, 0x0a, - 0x03, 0x52, 0x4c, 0x45, 0x10, 0x03, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x7a, 0x69, 0x70, 0x42, 0x4a, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x7b, 0x0a, + 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x22, 0x28, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, + 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, 0x53, 0x54, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x02, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, + 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, + 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, + 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x4c, 0x45, + 0x10, 0x03, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x7a, 0x69, 0x70, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, + 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x6f, 0x6e, 0x5f, 0x65, 0x74, 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x1d, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x9f, 0x01, + 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, + 0x69, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2f, 0x76, 0x33, + 0x3b, 0x67, 0x7a, 0x69, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -453,12 +393,11 @@ var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_depIdxs = []int32{ 4, // 3: envoy.extensions.filters.http.gzip.v3.Gzip.window_bits:type_name -> google.protobuf.UInt32Value 5, // 4: envoy.extensions.filters.http.gzip.v3.Gzip.compressor:type_name -> envoy.extensions.filters.http.compressor.v3.Compressor 4, // 5: envoy.extensions.filters.http.gzip.v3.Gzip.chunk_size:type_name -> google.protobuf.UInt32Value - 4, // 6: envoy.extensions.filters.http.gzip.v3.Gzip.hidden_envoy_deprecated_content_length:type_name -> google.protobuf.UInt32Value - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_http_gzip_v3_gzip_proto_init() } diff --git a/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.validate.go b/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.validate.go index 1bb34db9d4..094ba665ee 100644 --- a/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/gzip/v3/gzip.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/gzip/v3/gzip.proto -package envoy_extensions_filters_http_gzip_v3 +package gzipv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,53 +31,103 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Gzip with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Gzip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in GzipMultiError, or nil if none found. +func (m *Gzip) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip) validate(all bool) error { if m == nil { return nil } + var errors []error + if wrapper := m.GetMemoryLevel(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 9 { - return GzipValidationError{ + err := GzipValidationError{ field: "MemoryLevel", reason: "value must be inside range [1, 9]", } + if !all { + return err + } + errors = append(errors, err) } } if _, ok := Gzip_CompressionLevel_Enum_name[int32(m.GetCompressionLevel())]; !ok { - return GzipValidationError{ + err := GzipValidationError{ field: "CompressionLevel", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := Gzip_CompressionStrategy_name[int32(m.GetCompressionStrategy())]; !ok { - return GzipValidationError{ + err := GzipValidationError{ field: "CompressionStrategy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetWindowBits(); wrapper != nil { if val := wrapper.GetValue(); val < 9 || val > 15 { - return GzipValidationError{ + err := GzipValidationError{ field: "WindowBits", reason: "value must be inside range [9, 15]", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetCompressor()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCompressor()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GzipValidationError{ + field: "Compressor", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GzipValidationError{ + field: "Compressor", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompressor()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GzipValidationError{ field: "Compressor", @@ -89,31 +140,41 @@ func (m *Gzip) Validate() error { if wrapper := m.GetChunkSize(); wrapper != nil { if val := wrapper.GetValue(); val < 4096 || val > 65536 { - return GzipValidationError{ + err := GzipValidationError{ field: "ChunkSize", reason: "value must be inside range [4096, 65536]", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedContentLength()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GzipValidationError{ - field: "HiddenEnvoyDeprecatedContentLength", - reason: "embedded message failed validation", - cause: err, - } - } + if len(errors) > 0 { + return GzipMultiError(errors) } - // no validation rules for HiddenEnvoyDeprecatedDisableOnEtagHeader + return nil +} - // no validation rules for HiddenEnvoyDeprecatedRemoveAcceptEncodingHeader +// GzipMultiError is an error wrapping multiple validation errors returned by +// Gzip.ValidateAll() if the designated constraints aren't met. +type GzipMultiError []error - return nil +// Error returns a concatenation of all the error messages it wraps. +func (m GzipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") } +// AllErrors returns a list of validation violation errors. +func (m GzipMultiError) AllErrors() []error { return m } + // GzipValidationError is the validation error returned by Gzip.Validate if the // designated constraints aren't met. type GzipValidationError struct { @@ -170,15 +231,50 @@ var _ interface { // Validate checks the field values on Gzip_CompressionLevel with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Gzip_CompressionLevel) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip_CompressionLevel with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Gzip_CompressionLevelMultiError, or nil if none found. +func (m *Gzip_CompressionLevel) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip_CompressionLevel) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return Gzip_CompressionLevelMultiError(errors) + } + return nil } +// Gzip_CompressionLevelMultiError is an error wrapping multiple validation +// errors returned by Gzip_CompressionLevel.ValidateAll() if the designated +// constraints aren't met. +type Gzip_CompressionLevelMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Gzip_CompressionLevelMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Gzip_CompressionLevelMultiError) AllErrors() []error { return m } + // Gzip_CompressionLevelValidationError is the validation error returned by // Gzip_CompressionLevel.Validate if the designated constraints aren't met. type Gzip_CompressionLevelValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.pb.go b/pkg/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.pb.go deleted file mode 100644 index 8ce1f7532b..0000000000 --- a/pkg/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.pb.go +++ /dev/null @@ -1,456 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/gzip/v4alpha/gzip.proto - -package envoy_extensions_filters_http_gzip_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/compressor/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Gzip_CompressionStrategy int32 - -const ( - Gzip_DEFAULT Gzip_CompressionStrategy = 0 - Gzip_FILTERED Gzip_CompressionStrategy = 1 - Gzip_HUFFMAN Gzip_CompressionStrategy = 2 - Gzip_RLE Gzip_CompressionStrategy = 3 -) - -// Enum value maps for Gzip_CompressionStrategy. -var ( - Gzip_CompressionStrategy_name = map[int32]string{ - 0: "DEFAULT", - 1: "FILTERED", - 2: "HUFFMAN", - 3: "RLE", - } - Gzip_CompressionStrategy_value = map[string]int32{ - "DEFAULT": 0, - "FILTERED": 1, - "HUFFMAN": 2, - "RLE": 3, - } -) - -func (x Gzip_CompressionStrategy) Enum() *Gzip_CompressionStrategy { - p := new(Gzip_CompressionStrategy) - *p = x - return p -} - -func (x Gzip_CompressionStrategy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Gzip_CompressionStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_enumTypes[0].Descriptor() -} - -func (Gzip_CompressionStrategy) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_enumTypes[0] -} - -func (x Gzip_CompressionStrategy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Gzip_CompressionStrategy.Descriptor instead. -func (Gzip_CompressionStrategy) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescGZIP(), []int{0, 0} -} - -type Gzip_CompressionLevel_Enum int32 - -const ( - Gzip_CompressionLevel_DEFAULT Gzip_CompressionLevel_Enum = 0 - Gzip_CompressionLevel_BEST Gzip_CompressionLevel_Enum = 1 - Gzip_CompressionLevel_SPEED Gzip_CompressionLevel_Enum = 2 -) - -// Enum value maps for Gzip_CompressionLevel_Enum. -var ( - Gzip_CompressionLevel_Enum_name = map[int32]string{ - 0: "DEFAULT", - 1: "BEST", - 2: "SPEED", - } - Gzip_CompressionLevel_Enum_value = map[string]int32{ - "DEFAULT": 0, - "BEST": 1, - "SPEED": 2, - } -) - -func (x Gzip_CompressionLevel_Enum) Enum() *Gzip_CompressionLevel_Enum { - p := new(Gzip_CompressionLevel_Enum) - *p = x - return p -} - -func (x Gzip_CompressionLevel_Enum) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Gzip_CompressionLevel_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_enumTypes[1].Descriptor() -} - -func (Gzip_CompressionLevel_Enum) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_enumTypes[1] -} - -func (x Gzip_CompressionLevel_Enum) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Gzip_CompressionLevel_Enum.Descriptor instead. -func (Gzip_CompressionLevel_Enum) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescGZIP(), []int{0, 0, 0} -} - -// [#next-free-field: 12] -type Gzip struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values - // use more memory, but are faster and produce better compression results. The default value is 5. - MemoryLevel *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=memory_level,json=memoryLevel,proto3" json:"memory_level,omitempty"` - // A value used for selecting the zlib compression level. This setting will affect speed and - // amount of compression applied to the content. "BEST" provides higher compression at the cost of - // higher latency, "SPEED" provides lower compression with minimum impact on response time. - // "DEFAULT" provides an optimal result between speed and compression. This field will be set to - // "DEFAULT" if not specified. - CompressionLevel Gzip_CompressionLevel_Enum `protobuf:"varint,3,opt,name=compression_level,json=compressionLevel,proto3,enum=envoy.extensions.filters.http.gzip.v4alpha.Gzip_CompressionLevel_Enum" json:"compression_level,omitempty"` - // A value used for selecting the zlib compression strategy which is directly related to the - // characteristics of the content. Most of the time "DEFAULT" will be the best choice, though - // there are situations which changing this parameter might produce better results. For example, - // run-length encoding (RLE) is typically used when the content is known for having sequences - // which same data occurs many consecutive times. For more information about each strategy, please - // refer to zlib manual. - CompressionStrategy Gzip_CompressionStrategy `protobuf:"varint,4,opt,name=compression_strategy,json=compressionStrategy,proto3,enum=envoy.extensions.filters.http.gzip.v4alpha.Gzip_CompressionStrategy" json:"compression_strategy,omitempty"` - // Value from 9 to 15 that represents the base two logarithmic of the compressor's window size. - // Larger window results in better compression at the expense of memory usage. The default is 12 - // which will produce a 4096 bytes window. For more details about this parameter, please refer to - // zlib manual > deflateInit2. - WindowBits *wrappers.UInt32Value `protobuf:"bytes,9,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"` - // Set of configuration parameters common for all compression filters. If this field is set then - // the fields `content_length`, `content_type`, `disable_on_etag_header` and - // `remove_accept_encoding_header` are ignored. - Compressor *v4alpha.Compressor `protobuf:"bytes,10,opt,name=compressor,proto3" json:"compressor,omitempty"` - // Value for Zlib's next output buffer. If not set, defaults to 4096. - // See https://www.zlib.net/manual.html for more details. Also see - // https://github.com/envoyproxy/envoy/issues/8448 for context on this filter's performance. - ChunkSize *wrappers.UInt32Value `protobuf:"bytes,11,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` -} - -func (x *Gzip) Reset() { - *x = Gzip{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Gzip) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Gzip) ProtoMessage() {} - -func (x *Gzip) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Gzip.ProtoReflect.Descriptor instead. -func (*Gzip) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescGZIP(), []int{0} -} - -func (x *Gzip) GetMemoryLevel() *wrappers.UInt32Value { - if x != nil { - return x.MemoryLevel - } - return nil -} - -func (x *Gzip) GetCompressionLevel() Gzip_CompressionLevel_Enum { - if x != nil { - return x.CompressionLevel - } - return Gzip_CompressionLevel_DEFAULT -} - -func (x *Gzip) GetCompressionStrategy() Gzip_CompressionStrategy { - if x != nil { - return x.CompressionStrategy - } - return Gzip_DEFAULT -} - -func (x *Gzip) GetWindowBits() *wrappers.UInt32Value { - if x != nil { - return x.WindowBits - } - return nil -} - -func (x *Gzip) GetCompressor() *v4alpha.Compressor { - if x != nil { - return x.Compressor - } - return nil -} - -func (x *Gzip) GetChunkSize() *wrappers.UInt32Value { - if x != nil { - return x.ChunkSize - } - return nil -} - -type Gzip_CompressionLevel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Gzip_CompressionLevel) Reset() { - *x = Gzip_CompressionLevel{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Gzip_CompressionLevel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Gzip_CompressionLevel) ProtoMessage() {} - -func (x *Gzip_CompressionLevel) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Gzip_CompressionLevel.ProtoReflect.Descriptor instead. -func (*Gzip_CompressionLevel) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescGZIP(), []int{0, 0} -} - -var File_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDesc = []byte{ - 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x67, 0x7a, 0x69, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x7a, 0x69, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, - 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xb3, 0x07, 0x0a, 0x04, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x09, 0x28, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x7d, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, - 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x2a, 0x04, 0x18, 0x0f, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, - 0x69, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x6f, 0x72, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, - 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x80, 0x01, 0x0a, - 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x22, 0x28, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, - 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, 0x53, 0x54, 0x10, 0x01, - 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x02, 0x3a, 0x42, 0x9a, 0xc5, 0x88, - 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, - 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, - 0x46, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, - 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x07, - 0x0a, 0x03, 0x52, 0x4c, 0x45, 0x10, 0x03, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, - 0x69, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, - 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, - 0x10, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x52, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x74, 0x61, - 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x4f, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescData = file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDesc -) - -func file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDescData -} - -var file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_goTypes = []interface{}{ - (Gzip_CompressionStrategy)(0), // 0: envoy.extensions.filters.http.gzip.v4alpha.Gzip.CompressionStrategy - (Gzip_CompressionLevel_Enum)(0), // 1: envoy.extensions.filters.http.gzip.v4alpha.Gzip.CompressionLevel.Enum - (*Gzip)(nil), // 2: envoy.extensions.filters.http.gzip.v4alpha.Gzip - (*Gzip_CompressionLevel)(nil), // 3: envoy.extensions.filters.http.gzip.v4alpha.Gzip.CompressionLevel - (*wrappers.UInt32Value)(nil), // 4: google.protobuf.UInt32Value - (*v4alpha.Compressor)(nil), // 5: envoy.extensions.filters.http.compressor.v4alpha.Compressor -} -var file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_depIdxs = []int32{ - 4, // 0: envoy.extensions.filters.http.gzip.v4alpha.Gzip.memory_level:type_name -> google.protobuf.UInt32Value - 1, // 1: envoy.extensions.filters.http.gzip.v4alpha.Gzip.compression_level:type_name -> envoy.extensions.filters.http.gzip.v4alpha.Gzip.CompressionLevel.Enum - 0, // 2: envoy.extensions.filters.http.gzip.v4alpha.Gzip.compression_strategy:type_name -> envoy.extensions.filters.http.gzip.v4alpha.Gzip.CompressionStrategy - 4, // 3: envoy.extensions.filters.http.gzip.v4alpha.Gzip.window_bits:type_name -> google.protobuf.UInt32Value - 5, // 4: envoy.extensions.filters.http.gzip.v4alpha.Gzip.compressor:type_name -> envoy.extensions.filters.http.compressor.v4alpha.Compressor - 4, // 5: envoy.extensions.filters.http.gzip.v4alpha.Gzip.chunk_size:type_name -> google.protobuf.UInt32Value - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_init() } -func file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_init() { - if File_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Gzip); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Gzip_CompressionLevel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto = out.File - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_rawDesc = nil - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_goTypes = nil - file_envoy_extensions_filters_http_gzip_v4alpha_gzip_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.pb.validate.go b/pkg/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.pb.validate.go deleted file mode 100644 index 98d3dba231..0000000000 --- a/pkg/api/envoy/extensions/filters/http/gzip/v4alpha/gzip.pb.validate.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/gzip/v4alpha/gzip.proto - -package envoy_extensions_filters_http_gzip_v4alpha - -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{} -) - -// Validate checks the field values on Gzip with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *Gzip) Validate() error { - if m == nil { - return nil - } - - if wrapper := m.GetMemoryLevel(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 9 { - return GzipValidationError{ - field: "MemoryLevel", - reason: "value must be inside range [1, 9]", - } - } - - } - - if _, ok := Gzip_CompressionLevel_Enum_name[int32(m.GetCompressionLevel())]; !ok { - return GzipValidationError{ - field: "CompressionLevel", - reason: "value must be one of the defined enum values", - } - } - - if _, ok := Gzip_CompressionStrategy_name[int32(m.GetCompressionStrategy())]; !ok { - return GzipValidationError{ - field: "CompressionStrategy", - reason: "value must be one of the defined enum values", - } - } - - if wrapper := m.GetWindowBits(); wrapper != nil { - - if val := wrapper.GetValue(); val < 9 || val > 15 { - return GzipValidationError{ - field: "WindowBits", - reason: "value must be inside range [9, 15]", - } - } - - } - - if v, ok := interface{}(m.GetCompressor()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GzipValidationError{ - field: "Compressor", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetChunkSize(); wrapper != nil { - - if val := wrapper.GetValue(); val < 4096 || val > 65536 { - return GzipValidationError{ - field: "ChunkSize", - reason: "value must be inside range [4096, 65536]", - } - } - - } - - return nil -} - -// GzipValidationError is the validation error returned by Gzip.Validate if the -// designated constraints aren't met. -type GzipValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GzipValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GzipValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GzipValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GzipValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GzipValidationError) ErrorName() string { return "GzipValidationError" } - -// Error satisfies the builtin error interface -func (e GzipValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGzip.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GzipValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GzipValidationError{} - -// Validate checks the field values on Gzip_CompressionLevel with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Gzip_CompressionLevel) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// Gzip_CompressionLevelValidationError is the validation error returned by -// Gzip_CompressionLevel.Validate if the designated constraints aren't met. -type Gzip_CompressionLevelValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Gzip_CompressionLevelValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Gzip_CompressionLevelValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Gzip_CompressionLevelValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Gzip_CompressionLevelValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Gzip_CompressionLevelValidationError) ErrorName() string { - return "Gzip_CompressionLevelValidationError" -} - -// Error satisfies the builtin error interface -func (e Gzip_CompressionLevelValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGzip_CompressionLevel.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Gzip_CompressionLevelValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Gzip_CompressionLevelValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.go b/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.go index 21be405443..afc73f3c82 100644 --- a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.go +++ b/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto -package envoy_extensions_filters_http_header_to_metadata_v3 +package header_to_metadatav3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Config_ValueType int32 const ( @@ -500,14 +495,21 @@ var file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0x64, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd5, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x6f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x3b, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.validate.go b/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.validate.go index ce8eed7b76..c48c368370 100644 --- a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto -package envoy_extensions_filters_http_header_to_metadata_v3 +package header_to_metadatav3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetRequestRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigValidationError{ field: fmt.Sprintf("RequestRules[%v]", idx), @@ -58,7 +93,26 @@ func (m *Config) Validate() error { for idx, item := range m.GetResponseRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("ResponseRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("ResponseRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigValidationError{ field: fmt.Sprintf("ResponseRules[%v]", idx), @@ -70,9 +124,29 @@ func (m *Config) Validate() error { } + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { @@ -129,24 +203,61 @@ var _ interface { // Validate checks the field values on Config_KeyValuePair with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Config_KeyValuePair) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config_KeyValuePair with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Config_KeyValuePairMultiError, or nil if none found. +func (m *Config_KeyValuePair) ValidateAll() error { + return m.validate(true) +} + +func (m *Config_KeyValuePair) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for MetadataNamespace if utf8.RuneCountInString(m.GetKey()) < 1 { - return Config_KeyValuePairValidationError{ + err := Config_KeyValuePairValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Value - if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRegexValueRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_KeyValuePairValidationError{ field: "RegexValueRewrite", @@ -157,17 +268,42 @@ func (m *Config_KeyValuePair) Validate() error { } if _, ok := Config_ValueType_name[int32(m.GetType())]; !ok { - return Config_KeyValuePairValidationError{ + err := Config_KeyValuePairValidationError{ field: "Type", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for Encode + if len(errors) > 0 { + return Config_KeyValuePairMultiError(errors) + } + return nil } +// Config_KeyValuePairMultiError is an error wrapping multiple validation +// errors returned by Config_KeyValuePair.ValidateAll() if the designated +// constraints aren't met. +type Config_KeyValuePairMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Config_KeyValuePairMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Config_KeyValuePairMultiError) AllErrors() []error { return m } + // Config_KeyValuePairValidationError is the validation error returned by // Config_KeyValuePair.Validate if the designated constraints aren't met. type Config_KeyValuePairValidationError struct { @@ -225,28 +361,69 @@ var _ interface { } = Config_KeyValuePairValidationError{} // Validate checks the field values on Config_Rule with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config_Rule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config_Rule with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Config_RuleMultiError, or +// nil if none found. +func (m *Config_Rule) ValidateAll() error { + return m.validate(true) +} + +func (m *Config_Rule) validate(all bool) error { if m == nil { return nil } + var errors []error + if !_Config_Rule_Header_Pattern.MatchString(m.GetHeader()) { - return Config_RuleValidationError{ + err := Config_RuleValidationError{ field: "Header", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if !_Config_Rule_Cookie_Pattern.MatchString(m.GetCookie()) { - return Config_RuleValidationError{ + err := Config_RuleValidationError{ field: "Cookie", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetOnHeaderPresent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOnHeaderPresent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnHeaderPresent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderPresent", @@ -256,7 +433,26 @@ func (m *Config_Rule) Validate() error { } } - if v, ok := interface{}(m.GetOnHeaderMissing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOnHeaderMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnHeaderMissing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderMissing", @@ -268,9 +464,29 @@ func (m *Config_Rule) Validate() error { // no validation rules for Remove + if len(errors) > 0 { + return Config_RuleMultiError(errors) + } + return nil } +// Config_RuleMultiError is an error wrapping multiple validation errors +// returned by Config_Rule.ValidateAll() if the designated constraints aren't met. +type Config_RuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Config_RuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Config_RuleMultiError) AllErrors() []error { return m } + // Config_RuleValidationError is the validation error returned by // Config_Rule.Validate if the designated constraints aren't met. type Config_RuleValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.pb.go b/pkg/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.pb.go deleted file mode 100644 index 4c5956fbb2..0000000000 --- a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.pb.go +++ /dev/null @@ -1,666 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.proto - -package envoy_extensions_filters_http_header_to_metadata_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Config_ValueType int32 - -const ( - Config_STRING Config_ValueType = 0 - Config_NUMBER Config_ValueType = 1 - // The value is a serialized `protobuf.Value - // `_. - Config_PROTOBUF_VALUE Config_ValueType = 2 -) - -// Enum value maps for Config_ValueType. -var ( - Config_ValueType_name = map[int32]string{ - 0: "STRING", - 1: "NUMBER", - 2: "PROTOBUF_VALUE", - } - Config_ValueType_value = map[string]int32{ - "STRING": 0, - "NUMBER": 1, - "PROTOBUF_VALUE": 2, - } -) - -func (x Config_ValueType) Enum() *Config_ValueType { - p := new(Config_ValueType) - *p = x - return p -} - -func (x Config_ValueType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Config_ValueType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_enumTypes[0].Descriptor() -} - -func (Config_ValueType) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_enumTypes[0] -} - -func (x Config_ValueType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Config_ValueType.Descriptor instead. -func (Config_ValueType) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} -} - -// ValueEncode defines the encoding algorithm. -type Config_ValueEncode int32 - -const ( - // The value is not encoded. - Config_NONE Config_ValueEncode = 0 - // The value is encoded in `Base64 `_. - // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the - // non-ASCII characters in the header. - Config_BASE64 Config_ValueEncode = 1 -) - -// Enum value maps for Config_ValueEncode. -var ( - Config_ValueEncode_name = map[int32]string{ - 0: "NONE", - 1: "BASE64", - } - Config_ValueEncode_value = map[string]int32{ - "NONE": 0, - "BASE64": 1, - } -) - -func (x Config_ValueEncode) Enum() *Config_ValueEncode { - p := new(Config_ValueEncode) - *p = x - return p -} - -func (x Config_ValueEncode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Config_ValueEncode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_enumTypes[1].Descriptor() -} - -func (Config_ValueEncode) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_enumTypes[1] -} - -func (x Config_ValueEncode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Config_ValueEncode.Descriptor instead. -func (Config_ValueEncode) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} -} - -type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of rules to apply to requests. - RequestRules []*Config_Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"` - // The list of rules to apply to responses. - ResponseRules []*Config_Rule `protobuf:"bytes,2,rep,name=response_rules,json=responseRules,proto3" json:"response_rules,omitempty"` -} - -func (x *Config) Reset() { - *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config) ProtoMessage() {} - -func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Config.ProtoReflect.Descriptor instead. -func (*Config) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescGZIP(), []int{0} -} - -func (x *Config) GetRequestRules() []*Config_Rule { - if x != nil { - return x.RequestRules - } - return nil -} - -func (x *Config) GetResponseRules() []*Config_Rule { - if x != nil { - return x.ResponseRules - } - return nil -} - -// [#next-free-field: 7] -type Config_KeyValuePair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The namespace — if this is empty, the filter's namespace will be used. - MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"` - // The key to use within the namespace. - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // Types that are assignable to ValueType: - // *Config_KeyValuePair_Value - // *Config_KeyValuePair_RegexValueRewrite - ValueType isConfig_KeyValuePair_ValueType `protobuf_oneof:"value_type"` - // The value's type — defaults to string. - Type Config_ValueType `protobuf:"varint,4,opt,name=type,proto3,enum=envoy.extensions.filters.http.header_to_metadata.v4alpha.Config_ValueType" json:"type,omitempty"` - // How is the value encoded, default is NONE (not encoded). - // The value will be decoded accordingly before storing to metadata. - Encode Config_ValueEncode `protobuf:"varint,5,opt,name=encode,proto3,enum=envoy.extensions.filters.http.header_to_metadata.v4alpha.Config_ValueEncode" json:"encode,omitempty"` -} - -func (x *Config_KeyValuePair) Reset() { - *x = Config_KeyValuePair{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Config_KeyValuePair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config_KeyValuePair) ProtoMessage() {} - -func (x *Config_KeyValuePair) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Config_KeyValuePair.ProtoReflect.Descriptor instead. -func (*Config_KeyValuePair) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Config_KeyValuePair) GetMetadataNamespace() string { - if x != nil { - return x.MetadataNamespace - } - return "" -} - -func (x *Config_KeyValuePair) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (m *Config_KeyValuePair) GetValueType() isConfig_KeyValuePair_ValueType { - if m != nil { - return m.ValueType - } - return nil -} - -func (x *Config_KeyValuePair) GetValue() string { - if x, ok := x.GetValueType().(*Config_KeyValuePair_Value); ok { - return x.Value - } - return "" -} - -func (x *Config_KeyValuePair) GetRegexValueRewrite() *v4alpha.RegexMatchAndSubstitute { - if x, ok := x.GetValueType().(*Config_KeyValuePair_RegexValueRewrite); ok { - return x.RegexValueRewrite - } - return nil -} - -func (x *Config_KeyValuePair) GetType() Config_ValueType { - if x != nil { - return x.Type - } - return Config_STRING -} - -func (x *Config_KeyValuePair) GetEncode() Config_ValueEncode { - if x != nil { - return x.Encode - } - return Config_NONE -} - -type isConfig_KeyValuePair_ValueType interface { - isConfig_KeyValuePair_ValueType() -} - -type Config_KeyValuePair_Value struct { - // The value to pair with the given key. - // - // When used for a - // :ref:`on_header_present ` - // case, if value is non-empty it'll be used instead of the header value. If both are empty, no metadata is added. - // - // When used for a :ref:`on_header_missing ` - // case, a non-empty value must be provided otherwise no metadata is added. - Value string `protobuf:"bytes,3,opt,name=value,proto3,oneof"` -} - -type Config_KeyValuePair_RegexValueRewrite struct { - // If present, the header's value will be matched and substituted with this. If there is no match or substitution, the header value - // is used as-is. - // - // This is only used for :ref:`on_header_present `. - // - // Note: if the `value` field is non-empty this field should be empty. - RegexValueRewrite *v4alpha.RegexMatchAndSubstitute `protobuf:"bytes,6,opt,name=regex_value_rewrite,json=regexValueRewrite,proto3,oneof"` -} - -func (*Config_KeyValuePair_Value) isConfig_KeyValuePair_ValueType() {} - -func (*Config_KeyValuePair_RegexValueRewrite) isConfig_KeyValuePair_ValueType() {} - -// A Rule defines what metadata to apply when a header is present or missing. -// [#next-free-field: 6] -type Config_Rule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to HeaderCookieSpecifier: - // *Config_Rule_Header - // *Config_Rule_Cookie - HeaderCookieSpecifier isConfig_Rule_HeaderCookieSpecifier `protobuf_oneof:"header_cookie_specifier"` - // If the header or cookie is present, apply this metadata KeyValuePair. - // - // If the value in the KeyValuePair is non-empty, it'll be used instead - // of the header or cookie value. - OnPresent *Config_KeyValuePair `protobuf:"bytes,2,opt,name=on_present,json=onPresent,proto3" json:"on_present,omitempty"` - // If the header or cookie is not present, apply this metadata KeyValuePair. - // - // The value in the KeyValuePair must be set, since it'll be used in lieu - // of the missing header or cookie value. - OnMissing *Config_KeyValuePair `protobuf:"bytes,3,opt,name=on_missing,json=onMissing,proto3" json:"on_missing,omitempty"` - // Whether or not to remove the header after a rule is applied. - // - // This prevents headers from leaking. - // This field is not supported in case of a cookie. - Remove bool `protobuf:"varint,4,opt,name=remove,proto3" json:"remove,omitempty"` -} - -func (x *Config_Rule) Reset() { - *x = Config_Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Config_Rule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config_Rule) ProtoMessage() {} - -func (x *Config_Rule) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Config_Rule.ProtoReflect.Descriptor instead. -func (*Config_Rule) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} -} - -func (m *Config_Rule) GetHeaderCookieSpecifier() isConfig_Rule_HeaderCookieSpecifier { - if m != nil { - return m.HeaderCookieSpecifier - } - return nil -} - -func (x *Config_Rule) GetHeader() string { - if x, ok := x.GetHeaderCookieSpecifier().(*Config_Rule_Header); ok { - return x.Header - } - return "" -} - -func (x *Config_Rule) GetCookie() string { - if x, ok := x.GetHeaderCookieSpecifier().(*Config_Rule_Cookie); ok { - return x.Cookie - } - return "" -} - -func (x *Config_Rule) GetOnPresent() *Config_KeyValuePair { - if x != nil { - return x.OnPresent - } - return nil -} - -func (x *Config_Rule) GetOnMissing() *Config_KeyValuePair { - if x != nil { - return x.OnMissing - } - return nil -} - -func (x *Config_Rule) GetRemove() bool { - if x != nil { - return x.Remove - } - return false -} - -type isConfig_Rule_HeaderCookieSpecifier interface { - isConfig_Rule_HeaderCookieSpecifier() -} - -type Config_Rule_Header struct { - // Specifies that a match will be performed on the value of a header or a cookie. - // - // The header to be extracted. - Header string `protobuf:"bytes,1,opt,name=header,proto3,oneof"` -} - -type Config_Rule_Cookie struct { - // The cookie to be extracted. - Cookie string `protobuf:"bytes,5,opt,name=cookie,proto3,oneof"` -} - -func (*Config_Rule_Header) isConfig_Rule_HeaderCookieSpecifier() {} - -func (*Config_Rule_Cookie) isConfig_Rule_HeaderCookieSpecifier() {} - -var File_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDesc = []byte{ - 0x0a, 0x51, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x26, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xb9, 0x0a, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6a, 0x0a, 0x0d, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x85, 0x04, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x65, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, - 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, - 0x67, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, - 0x68, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x64, 0x0a, 0x06, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x3a, - 0x4e, 0x9a, 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x42, - 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xab, 0x03, - 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, - 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, - 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, - 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, - 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x6c, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x09, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x6e, 0x74, 0x12, 0x6c, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x09, 0x6f, 0x6e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, - 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x42, 0x19, 0x0a, 0x17, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, - 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x37, 0x0a, 0x09, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, - 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, - 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x5f, 0x56, 0x41, 0x4c, - 0x55, 0x45, 0x10, 0x02, 0x22, 0x23, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x42, 0x41, 0x53, 0x45, 0x36, 0x34, 0x10, 0x01, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, - 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x69, 0x0a, 0x46, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescData = file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDesc -) - -func file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDescData -} - -var file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_goTypes = []interface{}{ - (Config_ValueType)(0), // 0: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.ValueType - (Config_ValueEncode)(0), // 1: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.ValueEncode - (*Config)(nil), // 2: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config - (*Config_KeyValuePair)(nil), // 3: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.KeyValuePair - (*Config_Rule)(nil), // 4: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.Rule - (*v4alpha.RegexMatchAndSubstitute)(nil), // 5: envoy.type.matcher.v4alpha.RegexMatchAndSubstitute -} -var file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_depIdxs = []int32{ - 4, // 0: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.request_rules:type_name -> envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.Rule - 4, // 1: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.response_rules:type_name -> envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.Rule - 5, // 2: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.KeyValuePair.regex_value_rewrite:type_name -> envoy.type.matcher.v4alpha.RegexMatchAndSubstitute - 0, // 3: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.KeyValuePair.type:type_name -> envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.ValueType - 1, // 4: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.KeyValuePair.encode:type_name -> envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.ValueEncode - 3, // 5: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.Rule.on_present:type_name -> envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.KeyValuePair - 3, // 6: envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.Rule.on_missing:type_name -> envoy.extensions.filters.http.header_to_metadata.v4alpha.Config.KeyValuePair - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_init() -} -func file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_init() { - if File_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config_KeyValuePair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config_Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Config_KeyValuePair_Value)(nil), - (*Config_KeyValuePair_RegexValueRewrite)(nil), - } - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Config_Rule_Header)(nil), - (*Config_Rule_Cookie)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDesc, - NumEnums: 2, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto = out.File - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_rawDesc = nil - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_goTypes = nil - file_envoy_extensions_filters_http_header_to_metadata_v4alpha_header_to_metadata_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.pb.validate.go b/pkg/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.pb.validate.go deleted file mode 100644 index 4cb71d8b89..0000000000 --- a/pkg/api/envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.pb.validate.go +++ /dev/null @@ -1,345 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/header_to_metadata/v4alpha/header_to_metadata.proto - -package envoy_extensions_filters_http_header_to_metadata_v4alpha - -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{} -) - -// Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Config) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetRequestRules() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigValidationError{ - field: fmt.Sprintf("RequestRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetResponseRules() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigValidationError{ - field: fmt.Sprintf("ResponseRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ConfigValidationError is the validation error returned by Config.Validate if -// the designated constraints aren't met. -type ConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } - -// Error satisfies the builtin error interface -func (e ConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ConfigValidationError{} - -// Validate checks the field values on Config_KeyValuePair with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Config_KeyValuePair) Validate() error { - if m == nil { - return nil - } - - // no validation rules for MetadataNamespace - - if utf8.RuneCountInString(m.GetKey()) < 1 { - return Config_KeyValuePairValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - } - - if _, ok := Config_ValueType_name[int32(m.GetType())]; !ok { - return Config_KeyValuePairValidationError{ - field: "Type", - reason: "value must be one of the defined enum values", - } - } - - // no validation rules for Encode - - switch m.ValueType.(type) { - - case *Config_KeyValuePair_Value: - // no validation rules for Value - - case *Config_KeyValuePair_RegexValueRewrite: - - if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Config_KeyValuePairValidationError{ - field: "RegexValueRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// Config_KeyValuePairValidationError is the validation error returned by -// Config_KeyValuePair.Validate if the designated constraints aren't met. -type Config_KeyValuePairValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Config_KeyValuePairValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Config_KeyValuePairValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Config_KeyValuePairValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Config_KeyValuePairValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Config_KeyValuePairValidationError) ErrorName() string { - return "Config_KeyValuePairValidationError" -} - -// Error satisfies the builtin error interface -func (e Config_KeyValuePairValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sConfig_KeyValuePair.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Config_KeyValuePairValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Config_KeyValuePairValidationError{} - -// Validate checks the field values on Config_Rule with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *Config_Rule) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetOnPresent()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Config_RuleValidationError{ - field: "OnPresent", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetOnMissing()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Config_RuleValidationError{ - field: "OnMissing", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Remove - - switch m.HeaderCookieSpecifier.(type) { - - case *Config_Rule_Header: - - if !_Config_Rule_Header_Pattern.MatchString(m.GetHeader()) { - return Config_RuleValidationError{ - field: "Header", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - case *Config_Rule_Cookie: - - if !_Config_Rule_Cookie_Pattern.MatchString(m.GetCookie()) { - return Config_RuleValidationError{ - field: "Cookie", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - } - - return nil -} - -// Config_RuleValidationError is the validation error returned by -// Config_Rule.Validate if the designated constraints aren't met. -type Config_RuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Config_RuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Config_RuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Config_RuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Config_RuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Config_RuleValidationError) ErrorName() string { return "Config_RuleValidationError" } - -// Error satisfies the builtin error interface -func (e Config_RuleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sConfig_Rule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Config_RuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Config_RuleValidationError{} - -var _Config_Rule_Header_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _Config_Rule_Cookie_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.go b/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.go index 14ec925934..0c6b6c96ca 100644 --- a/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.go +++ b/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/health_check/v3/health_check.proto -package envoy_extensions_filters_http_health_check_v3 +package health_checkv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type HealthCheck struct { state protoimpl.MessageState @@ -176,13 +171,19 @@ var file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDes 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, - 0x04, 0x08, 0x02, 0x10, 0x03, 0x42, 0x59, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x08, 0x02, 0x10, 0x03, 0x42, 0xbe, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x76, 0x33, 0x3b, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.validate.go b/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.validate.go index 808a3e17d7..b278aeb280 100644 --- a/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/health_check/v3/health_check.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/health_check/v3/health_check.proto -package envoy_extensions_filters_http_health_check_v3 +package health_checkv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HealthCheckMultiError, or +// nil if none found. +func (m *HealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetPassThroughMode() == nil { - return HealthCheckValidationError{ + err := HealthCheckValidationError{ field: "PassThroughMode", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPassThroughMode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPassThroughMode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "PassThroughMode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "PassThroughMode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPassThroughMode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "PassThroughMode", @@ -58,7 +97,26 @@ func (m *HealthCheck) Validate() error { } } - if v, ok := interface{}(m.GetCacheTime()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCacheTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CacheTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CacheTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: "CacheTime", @@ -68,27 +126,75 @@ func (m *HealthCheck) Validate() error { } } - for key, val := range m.GetClusterMinHealthyPercentages() { - _ = val + { + sorted_keys := make([]string, len(m.GetClusterMinHealthyPercentages())) + i := 0 + for key := range m.GetClusterMinHealthyPercentages() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetClusterMinHealthyPercentages()[key] + _ = val - // no validation rules for ClusterMinHealthyPercentages[key] + // no validation rules for ClusterMinHealthyPercentages[key] - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + 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 all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -100,9 +206,29 @@ func (m *HealthCheck) Validate() error { } + if len(errors) > 0 { + return HealthCheckMultiError(errors) + } + return nil } +// HealthCheckMultiError is an error wrapping multiple validation errors +// returned by HealthCheck.ValidateAll() if the designated constraints aren't met. +type HealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckMultiError) AllErrors() []error { return m } + // HealthCheckValidationError is the validation error returned by // HealthCheck.Validate if the designated constraints aren't met. type HealthCheckValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.pb.go b/pkg/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.pb.go deleted file mode 100644 index a2f4c55936..0000000000 --- a/pkg/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.pb.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/health_check/v4alpha/health_check.proto - -package envoy_extensions_filters_http_health_check_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 6] -type HealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies whether the filter operates in pass through mode or not. - PassThroughMode *wrappers.BoolValue `protobuf:"bytes,1,opt,name=pass_through_mode,json=passThroughMode,proto3" json:"pass_through_mode,omitempty"` - // If operating in pass through mode, the amount of time in milliseconds - // that the filter should cache the upstream response. - CacheTime *duration.Duration `protobuf:"bytes,3,opt,name=cache_time,json=cacheTime,proto3" json:"cache_time,omitempty"` - // If operating in non-pass-through mode, specifies a set of upstream cluster - // names and the minimum percentage of servers in each of those clusters that - // must be healthy or degraded in order for the filter to return a 200. - // - // .. note:: - // - // This value is interpreted as an integer by truncating, so 12.50% will be calculated - // as if it were 12%. - ClusterMinHealthyPercentages map[string]*v3.Percent `protobuf:"bytes,4,rep,name=cluster_min_healthy_percentages,json=clusterMinHealthyPercentages,proto3" json:"cluster_min_healthy_percentages,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Specifies a set of health check request headers to match on. The health check filter will - // check a request’s headers against all the specified headers. To specify the health check - // endpoint, set the ``:path`` header to match on. - Headers []*v4alpha.HeaderMatcher `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *HealthCheck) Reset() { - *x = HealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck) ProtoMessage() {} - -func (x *HealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescGZIP(), []int{0} -} - -func (x *HealthCheck) GetPassThroughMode() *wrappers.BoolValue { - if x != nil { - return x.PassThroughMode - } - return nil -} - -func (x *HealthCheck) GetCacheTime() *duration.Duration { - if x != nil { - return x.CacheTime - } - return nil -} - -func (x *HealthCheck) GetClusterMinHealthyPercentages() map[string]*v3.Percent { - if x != nil { - return x.ClusterMinHealthyPercentages - } - return nil -} - -func (x *HealthCheck) GetHeaders() []*v4alpha.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -var File_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDesc = []byte{ - 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x31, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x04, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x74, - 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x70, 0x61, 0x73, 0x73, 0x54, 0x68, 0x72, - 0x6f, 0x75, 0x67, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x63, 0x61, 0x63, 0x68, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x1f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6d, - 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x61, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x1c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x43, 0x0a, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x1a, 0x67, 0x0a, 0x21, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x69, 0x6e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x40, 0x9a, 0xc5, 0x88, - 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x04, 0x08, - 0x02, 0x10, 0x03, 0x42, 0x5e, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescData = file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDesc -) - -func file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDescData -} - -var file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_goTypes = []interface{}{ - (*HealthCheck)(nil), // 0: envoy.extensions.filters.http.health_check.v4alpha.HealthCheck - nil, // 1: envoy.extensions.filters.http.health_check.v4alpha.HealthCheck.ClusterMinHealthyPercentagesEntry - (*wrappers.BoolValue)(nil), // 2: google.protobuf.BoolValue - (*duration.Duration)(nil), // 3: google.protobuf.Duration - (*v4alpha.HeaderMatcher)(nil), // 4: envoy.config.route.v4alpha.HeaderMatcher - (*v3.Percent)(nil), // 5: envoy.type.v3.Percent -} -var file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.filters.http.health_check.v4alpha.HealthCheck.pass_through_mode:type_name -> google.protobuf.BoolValue - 3, // 1: envoy.extensions.filters.http.health_check.v4alpha.HealthCheck.cache_time:type_name -> google.protobuf.Duration - 1, // 2: envoy.extensions.filters.http.health_check.v4alpha.HealthCheck.cluster_min_healthy_percentages:type_name -> envoy.extensions.filters.http.health_check.v4alpha.HealthCheck.ClusterMinHealthyPercentagesEntry - 4, // 3: envoy.extensions.filters.http.health_check.v4alpha.HealthCheck.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 5, // 4: envoy.extensions.filters.http.health_check.v4alpha.HealthCheck.ClusterMinHealthyPercentagesEntry.value:type_name -> envoy.type.v3.Percent - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_init() } -func file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_init() { - if File_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto = out.File - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_rawDesc = nil - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_goTypes = nil - file_envoy_extensions_filters_http_health_check_v4alpha_health_check_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.pb.validate.go b/pkg/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.pb.validate.go deleted file mode 100644 index 9b20401d56..0000000000 --- a/pkg/api/envoy/extensions/filters/http/health_check/v4alpha/health_check.pb.validate.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/health_check/v4alpha/health_check.proto - -package envoy_extensions_filters_http_health_check_v4alpha - -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{} -) - -// 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. -func (m *HealthCheck) Validate() error { - if m == nil { - return nil - } - - if m.GetPassThroughMode() == nil { - return HealthCheckValidationError{ - field: "PassThroughMode", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetPassThroughMode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "PassThroughMode", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetCacheTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "CacheTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for key, val := range m.GetClusterMinHealthyPercentages() { - _ = val - - // no validation rules for ClusterMinHealthyPercentages[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), - 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 HealthCheckValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// HealthCheckValidationError is the validation error returned by -// HealthCheck.Validate if the designated constraints aren't met. -type HealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckValidationError) ErrorName() string { return "HealthCheckValidationError" } - -// Error satisfies the builtin error interface -func (e HealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.go b/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.go index d45259fa49..725d5c696d 100644 --- a/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.go +++ b/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto -package envoy_extensions_filters_http_ip_tagging_v3 +package ip_taggingv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The type of requests the filter should apply to. The supported types // are internal, external or both. The // :ref:`x-forwarded-for` header is @@ -252,13 +247,19 @@ var file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDesc = 0x10, 0x02, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x32, 0x2e, 0x49, 0x50, 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x55, 0x0a, 0x39, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, 0x61, - 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x49, 0x70, 0x54, 0x61, 0x67, 0x67, - 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x32, 0x2e, 0x49, 0x50, 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0xb6, 0x01, 0x0a, 0x39, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, + 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x49, 0x70, 0x54, 0x61, 0x67, + 0x67, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, + 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.validate.go index 1b959f9d83..b83b87a906 100644 --- a/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto -package envoy_extensions_filters_http_ip_tagging_v3 +package ip_taggingv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on IPTagging with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *IPTagging) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IPTagging with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in IPTaggingMultiError, or nil +// if none found. +func (m *IPTagging) ValidateAll() error { + return m.validate(true) +} + +func (m *IPTagging) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := IPTagging_RequestType_name[int32(m.GetRequestType())]; !ok { - return IPTaggingValidationError{ + err := IPTaggingValidationError{ field: "RequestType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetIpTags()) < 1 { - return IPTaggingValidationError{ + err := IPTaggingValidationError{ field: "IpTags", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetIpTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IPTaggingValidationError{ + field: fmt.Sprintf("IpTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IPTaggingValidationError{ + field: fmt.Sprintf("IpTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTaggingValidationError{ field: fmt.Sprintf("IpTags[%v]", idx), @@ -69,9 +113,29 @@ func (m *IPTagging) Validate() error { } + if len(errors) > 0 { + return IPTaggingMultiError(errors) + } + return nil } +// IPTaggingMultiError is an error wrapping multiple validation errors returned +// by IPTagging.ValidateAll() if the designated constraints aren't met. +type IPTaggingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IPTaggingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IPTaggingMultiError) AllErrors() []error { return m } + // IPTaggingValidationError is the validation error returned by // IPTagging.Validate if the designated constraints aren't met. type IPTaggingValidationError struct { @@ -127,19 +191,52 @@ var _ interface { } = IPTaggingValidationError{} // Validate checks the field values on IPTagging_IPTag with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *IPTagging_IPTag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IPTagging_IPTag with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// IPTagging_IPTagMultiError, or nil if none found. +func (m *IPTagging_IPTag) ValidateAll() error { + return m.validate(true) +} + +func (m *IPTagging_IPTag) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for IpTagName for idx, item := range m.GetIpList() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IPTagging_IPTagValidationError{ + field: fmt.Sprintf("IpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IPTagging_IPTagValidationError{ + field: fmt.Sprintf("IpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTagging_IPTagValidationError{ field: fmt.Sprintf("IpList[%v]", idx), @@ -151,9 +248,30 @@ func (m *IPTagging_IPTag) Validate() error { } + if len(errors) > 0 { + return IPTagging_IPTagMultiError(errors) + } + return nil } +// IPTagging_IPTagMultiError is an error wrapping multiple validation errors +// returned by IPTagging_IPTag.ValidateAll() if the designated constraints +// aren't met. +type IPTagging_IPTagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IPTagging_IPTagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IPTagging_IPTagMultiError) AllErrors() []error { return m } + // IPTagging_IPTagValidationError is the validation error returned by // IPTagging_IPTag.Validate if the designated constraints aren't met. type IPTagging_IPTagValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.go b/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.go index a617071fb7..278550978b 100644 --- a/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.go +++ b/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/jwt_authn/v3/config.proto -package envoy_extensions_filters_http_jwt_authn_v3 +package jwt_authnv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Please see following for JWT authentication flow: // // * `JSON Web Token (JWT) `_ @@ -61,7 +56,7 @@ const _ = proto.ProtoPackageIsVersion4 // cache_duration: // seconds: 300 // -// [#next-free-field: 11] +// [#next-free-field: 15] type JwtProvider struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -70,10 +65,8 @@ type JwtProvider struct { // Specify the `principal `_ that issued // the JWT, usually a URL or an email address. // - // It is optional. If specified, it has to match the *iss* field in JWT. - // - // If a JWT has *iss* field and this field is specified, they have to match, otherwise the - // JWT *iss* field is not checked. + // It is optional. If specified, it has to match the *iss* field in JWT, + // otherwise the JWT *iss* field is not checked. // // Note: *JwtRequirement* :ref:`allow_missing ` // and :ref:`allow_missing_or_failed ` @@ -110,6 +103,7 @@ type JwtProvider struct { JwksSourceSpecifier isJwtProvider_JwksSourceSpecifier `protobuf_oneof:"jwks_source_specifier"` // If false, the JWT is removed in the request after a success verification. If true, the JWT is // not removed in the request. Default value is false. + // caveat: only works for from_header & has no effect for JWTs extracted through from_params & from_cookies. Forward bool `protobuf:"varint,5,opt,name=forward,proto3" json:"forward,omitempty"` // Two fields below define where to extract the JWT from an HTTP request. // @@ -151,6 +145,18 @@ type JwtProvider struct { // /path?jwt_token= // FromParams []string `protobuf:"bytes,7,rep,name=from_params,json=fromParams,proto3" json:"from_params,omitempty"` + // JWT is sent in a cookie. `from_cookies` represents the cookie names to extract from. + // + // For example, if config is: + // + // .. code-block:: yaml + // + // from_cookies: + // - auth-token + // + // Then JWT will be extracted from `auth-token` cookie in the request. + // + FromCookies []string `protobuf:"bytes,13,rep,name=from_cookies,json=fromCookies,proto3" json:"from_cookies,omitempty"` // This field specifies the header name to forward a successfully verified JWT payload to the // backend. The forwarded data is:: // @@ -158,6 +164,14 @@ type JwtProvider struct { // // If it is not specified, the payload will not be forwarded. ForwardPayloadHeader string `protobuf:"bytes,8,opt,name=forward_payload_header,json=forwardPayloadHeader,proto3" json:"forward_payload_header,omitempty"` + // When :ref:`forward_payload_header ` + // is specified, the base64 encoded payload will be added to the headers. + // Normally JWT based64 encode doesn't add padding. If this field is true, + // the header will be padded. + // + // This field is only relevant if :ref:`forward_payload_header ` + // is specified. + PadForwardPayloadHeader bool `protobuf:"varint,11,opt,name=pad_forward_payload_header,json=padForwardPayloadHeader,proto3" json:"pad_forward_payload_header,omitempty"` // If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata // in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn** // The value is the *protobuf::Struct*. The value of this field will be the key for its *fields* @@ -175,9 +189,51 @@ type JwtProvider struct { // exp: 1501281058 // PayloadInMetadata string `protobuf:"bytes,9,opt,name=payload_in_metadata,json=payloadInMetadata,proto3" json:"payload_in_metadata,omitempty"` + // If not empty, similar to :ref:`payload_in_metadata `, + // a successfully verified JWT header will be written to :ref:`Dynamic State ` + // as an entry (``protobuf::Struct``) in **envoy.filters.http.jwt_authn** *namespace* with the + // value of this field as the key. + // + // For example, if ``header_in_metadata`` is *my_header*: + // + // .. code-block:: yaml + // + // envoy.filters.http.jwt_authn: + // my_header: + // alg: JWT + // kid: EF71iSaosbC5C4tC6Syq1Gm647M + // alg: PS256 + // + // When the metadata has **envoy.filters.http.jwt_authn** entry already (for example if + // :ref:`payload_in_metadata ` + // is not empty), it will be inserted as a new entry in the same *namespace* as shown below: + // + // .. code-block:: yaml + // + // envoy.filters.http.jwt_authn: + // my_payload: + // iss: https://example.com + // sub: test@example.com + // aud: https://example.com + // exp: 1501281058 + // my_header: + // alg: JWT + // kid: EF71iSaosbC5C4tC6Syq1Gm647M + // alg: PS256 + // + // .. warning:: + // Using the same key name for :ref:`header_in_metadata ` + // and :ref:`payload_in_metadata ` + // is not suggested due to potential override of existing entry, while it is not enforced during + // config validation. + // + HeaderInMetadata string `protobuf:"bytes,14,opt,name=header_in_metadata,json=headerInMetadata,proto3" json:"header_in_metadata,omitempty"` // Specify the clock skew in seconds when verifying JWT time constraint, // such as `exp`, and `nbf`. If not specified, default is 60 seconds. ClockSkewSeconds uint32 `protobuf:"varint,10,opt,name=clock_skew_seconds,json=clockSkewSeconds,proto3" json:"clock_skew_seconds,omitempty"` + // Enables JWT cache, its size is specified by *jwt_cache_size*. + // Only valid JWT tokens are cached. + JwtCacheConfig *JwtCacheConfig `protobuf:"bytes,12,opt,name=jwt_cache_config,json=jwtCacheConfig,proto3" json:"jwt_cache_config,omitempty"` } func (x *JwtProvider) Reset() { @@ -268,6 +324,13 @@ func (x *JwtProvider) GetFromParams() []string { return nil } +func (x *JwtProvider) GetFromCookies() []string { + if x != nil { + return x.FromCookies + } + return nil +} + func (x *JwtProvider) GetForwardPayloadHeader() string { if x != nil { return x.ForwardPayloadHeader @@ -275,6 +338,13 @@ func (x *JwtProvider) GetForwardPayloadHeader() string { return "" } +func (x *JwtProvider) GetPadForwardPayloadHeader() bool { + if x != nil { + return x.PadForwardPayloadHeader + } + return false +} + func (x *JwtProvider) GetPayloadInMetadata() string { if x != nil { return x.PayloadInMetadata @@ -282,6 +352,13 @@ func (x *JwtProvider) GetPayloadInMetadata() string { return "" } +func (x *JwtProvider) GetHeaderInMetadata() string { + if x != nil { + return x.HeaderInMetadata + } + return "" +} + func (x *JwtProvider) GetClockSkewSeconds() uint32 { if x != nil { return x.ClockSkewSeconds @@ -289,6 +366,13 @@ func (x *JwtProvider) GetClockSkewSeconds() uint32 { return 0 } +func (x *JwtProvider) GetJwtCacheConfig() *JwtCacheConfig { + if x != nil { + return x.JwtCacheConfig + } + return nil +} + type isJwtProvider_JwksSourceSpecifier interface { isJwtProvider_JwksSourceSpecifier() } @@ -337,6 +421,55 @@ func (*JwtProvider_RemoteJwks) isJwtProvider_JwksSourceSpecifier() {} func (*JwtProvider_LocalJwks) isJwtProvider_JwksSourceSpecifier() {} +// This message specifies JWT Cache configuration. +type JwtCacheConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unit is number of JWT tokens, default to 100. + JwtCacheSize uint32 `protobuf:"varint,1,opt,name=jwt_cache_size,json=jwtCacheSize,proto3" json:"jwt_cache_size,omitempty"` +} + +func (x *JwtCacheConfig) Reset() { + *x = JwtCacheConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtCacheConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtCacheConfig) ProtoMessage() {} + +func (x *JwtCacheConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtCacheConfig.ProtoReflect.Descriptor instead. +func (*JwtCacheConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{1} +} + +func (x *JwtCacheConfig) GetJwtCacheSize() uint32 { + if x != nil { + return x.JwtCacheSize + } + return 0 +} + // This message specifies how to fetch JWKS from remote and how to cache it. type RemoteJwks struct { state protoimpl.MessageState @@ -356,12 +489,58 @@ type RemoteJwks struct { // Duration after which the cached JWKS should be expired. If not specified, default cache // duration is 5 minutes. CacheDuration *duration.Duration `protobuf:"bytes,2,opt,name=cache_duration,json=cacheDuration,proto3" json:"cache_duration,omitempty"` + // Fetch Jwks asynchronously in the main thread before the listener is activated. + // Fetched Jwks can be used by all worker threads. + // + // If this feature is not enabled: + // + // * The Jwks is fetched on-demand when the requests come. During the fetching, first + // few requests are paused until the Jwks is fetched. + // * Each worker thread fetches its own Jwks since Jwks cache is per worker thread. + // + // If this feature is enabled: + // + // * Fetched Jwks is done in the main thread before the listener is activated. Its fetched + // Jwks can be used by all worker threads. Each worker thread doesn't need to fetch its own. + // * Jwks is ready when the requests come, not need to wait for the Jwks fetching. + // + AsyncFetch *JwksAsyncFetch `protobuf:"bytes,3,opt,name=async_fetch,json=asyncFetch,proto3" json:"async_fetch,omitempty"` + // Retry policy for fetching Jwks. optional. turned off by default. + // + // For example: + // + // .. code-block:: yaml + // + // retry_policy: + // retry_back_off: + // base_interval: 0.01s + // max_interval: 20s + // num_retries: 10 + // + // will yield a randomized truncated exponential backoff policy with an initial delay of 10ms + // 10 maximum attempts spaced at most 20s seconds. + // + // .. code-block:: yaml + // + // retry_policy: + // num_retries:1 + // + // uses the default :ref:`retry backoff strategy `. + // with the default base interval is 1000 milliseconds. and the default maximum interval of 10 times the base interval. + // + // if num_retries is omitted, the default is to allow only one retry. + // + // + // If enabled, the retry policy will apply to all Jwks fetching approaches, e.g. on demand or asynchronously in background. + // + // + RetryPolicy *v3.RetryPolicy `protobuf:"bytes,4,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` } func (x *RemoteJwks) Reset() { *x = RemoteJwks{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -374,7 +553,7 @@ func (x *RemoteJwks) String() string { func (*RemoteJwks) ProtoMessage() {} func (x *RemoteJwks) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -387,7 +566,7 @@ func (x *RemoteJwks) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoteJwks.ProtoReflect.Descriptor instead. func (*RemoteJwks) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{1} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{2} } func (x *RemoteJwks) GetHttpUri() *v3.HttpUri { @@ -404,6 +583,75 @@ func (x *RemoteJwks) GetCacheDuration() *duration.Duration { return nil } +func (x *RemoteJwks) GetAsyncFetch() *JwksAsyncFetch { + if x != nil { + return x.AsyncFetch + } + return nil +} + +func (x *RemoteJwks) GetRetryPolicy() *v3.RetryPolicy { + if x != nil { + return x.RetryPolicy + } + return nil +} + +// Fetch Jwks asynchronously in the main thread when the filter config is parsed. +// The listener is activated only after the Jwks is fetched. +// When the Jwks is expired in the cache, it is fetched again in the main thread. +// The fetched Jwks from the main thread can be used by all worker threads. +type JwksAsyncFetch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If false, the listener is activated after the initial fetch is completed. + // The initial fetch result can be either successful or failed. + // If true, it is activated without waiting for the initial fetch to complete. + // Default is false. + FastListener bool `protobuf:"varint,1,opt,name=fast_listener,json=fastListener,proto3" json:"fast_listener,omitempty"` +} + +func (x *JwksAsyncFetch) Reset() { + *x = JwksAsyncFetch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwksAsyncFetch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwksAsyncFetch) ProtoMessage() {} + +func (x *JwksAsyncFetch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwksAsyncFetch.ProtoReflect.Descriptor instead. +func (*JwksAsyncFetch) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{3} +} + +func (x *JwksAsyncFetch) GetFastListener() bool { + if x != nil { + return x.FastListener + } + return false +} + // This message specifies a header location to extract JWT token. type JwtHeader struct { state protoimpl.MessageState @@ -421,7 +669,7 @@ type JwtHeader struct { func (x *JwtHeader) Reset() { *x = JwtHeader{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -434,7 +682,7 @@ func (x *JwtHeader) String() string { func (*JwtHeader) ProtoMessage() {} func (x *JwtHeader) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -447,7 +695,7 @@ func (x *JwtHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use JwtHeader.ProtoReflect.Descriptor instead. func (*JwtHeader) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{2} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{4} } func (x *JwtHeader) GetName() string { @@ -479,7 +727,7 @@ type ProviderWithAudiences struct { func (x *ProviderWithAudiences) Reset() { *x = ProviderWithAudiences{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -492,7 +740,7 @@ func (x *ProviderWithAudiences) String() string { func (*ProviderWithAudiences) ProtoMessage() {} func (x *ProviderWithAudiences) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -505,7 +753,7 @@ func (x *ProviderWithAudiences) ProtoReflect() protoreflect.Message { // Deprecated: Use ProviderWithAudiences.ProtoReflect.Descriptor instead. func (*ProviderWithAudiences) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{3} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{5} } func (x *ProviderWithAudiences) GetProviderName() string { @@ -597,7 +845,7 @@ type JwtRequirement struct { func (x *JwtRequirement) Reset() { *x = JwtRequirement{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -610,7 +858,7 @@ func (x *JwtRequirement) String() string { func (*JwtRequirement) ProtoMessage() {} func (x *JwtRequirement) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -623,7 +871,7 @@ func (x *JwtRequirement) ProtoReflect() protoreflect.Message { // Deprecated: Use JwtRequirement.ProtoReflect.Descriptor instead. func (*JwtRequirement) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{4} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{6} } func (m *JwtRequirement) GetRequiresType() isJwtRequirement_RequiresType { @@ -743,7 +991,7 @@ type JwtRequirementOrList struct { func (x *JwtRequirementOrList) Reset() { *x = JwtRequirementOrList{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -756,7 +1004,7 @@ func (x *JwtRequirementOrList) String() string { func (*JwtRequirementOrList) ProtoMessage() {} func (x *JwtRequirementOrList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -769,7 +1017,7 @@ func (x *JwtRequirementOrList) ProtoReflect() protoreflect.Message { // Deprecated: Use JwtRequirementOrList.ProtoReflect.Descriptor instead. func (*JwtRequirementOrList) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{5} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{7} } func (x *JwtRequirementOrList) GetRequirements() []*JwtRequirement { @@ -793,7 +1041,7 @@ type JwtRequirementAndList struct { func (x *JwtRequirementAndList) Reset() { *x = JwtRequirementAndList{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -806,7 +1054,7 @@ func (x *JwtRequirementAndList) String() string { func (*JwtRequirementAndList) ProtoMessage() {} func (x *JwtRequirementAndList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -819,7 +1067,7 @@ func (x *JwtRequirementAndList) ProtoReflect() protoreflect.Message { // Deprecated: Use JwtRequirementAndList.ProtoReflect.Descriptor instead. func (*JwtRequirementAndList) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{6} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{8} } func (x *JwtRequirementAndList) GetRequirements() []*JwtRequirement { @@ -878,7 +1126,7 @@ type RequirementRule struct { func (x *RequirementRule) Reset() { *x = RequirementRule{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -891,7 +1139,7 @@ func (x *RequirementRule) String() string { func (*RequirementRule) ProtoMessage() {} func (x *RequirementRule) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -904,7 +1152,7 @@ func (x *RequirementRule) ProtoReflect() protoreflect.Message { // Deprecated: Use RequirementRule.ProtoReflect.Descriptor instead. func (*RequirementRule) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{7} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{9} } func (x *RequirementRule) GetMatch() *v31.RouteMatch { @@ -988,7 +1236,7 @@ type FilterStateRule struct { func (x *FilterStateRule) Reset() { *x = FilterStateRule{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1001,7 +1249,7 @@ func (x *FilterStateRule) String() string { func (*FilterStateRule) ProtoMessage() {} func (x *FilterStateRule) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1014,7 +1262,7 @@ func (x *FilterStateRule) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterStateRule.ProtoReflect.Descriptor instead. func (*FilterStateRule) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{8} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{10} } func (x *FilterStateRule) GetName() string { @@ -1148,7 +1396,7 @@ type JwtAuthentication struct { func (x *JwtAuthentication) Reset() { *x = JwtAuthentication{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1161,7 +1409,7 @@ func (x *JwtAuthentication) String() string { func (*JwtAuthentication) ProtoMessage() {} func (x *JwtAuthentication) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1174,7 +1422,7 @@ func (x *JwtAuthentication) ProtoReflect() protoreflect.Message { // Deprecated: Use JwtAuthentication.ProtoReflect.Descriptor instead. func (*JwtAuthentication) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{9} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{11} } func (x *JwtAuthentication) GetProviders() map[string]*JwtProvider { @@ -1227,7 +1475,7 @@ type PerRouteConfig struct { func (x *PerRouteConfig) Reset() { *x = PerRouteConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1240,7 +1488,7 @@ func (x *PerRouteConfig) String() string { func (*PerRouteConfig) ProtoMessage() {} func (x *PerRouteConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10] + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1253,7 +1501,7 @@ func (x *PerRouteConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use PerRouteConfig.ProtoReflect.Descriptor instead. func (*PerRouteConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{10} + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{12} } func (m *PerRouteConfig) GetRequirementSpecifier() isPerRouteConfig_RequirementSpecifier { @@ -1324,7 +1572,7 @@ var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDesc = []byt 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xf4, 0x04, 0x0a, 0x0b, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x6f, 0x22, 0xe8, 0x06, 0x0a, 0x0b, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, @@ -1347,226 +1595,264 @@ var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDesc = []byt 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x16, 0x66, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, - 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x14, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, + 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, + 0x16, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, + 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x14, 0x66, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x70, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, - 0x12, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x6b, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, 0x6c, 0x6f, 0x63, 0x6b, - 0x53, 0x6b, 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, - 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, - 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x1c, 0x0a, 0x15, 0x6a, 0x77, - 0x6b, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, 0x55, 0x72, - 0x69, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x49, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x63, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x6b, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x6b, + 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x64, 0x0a, 0x10, 0x6a, 0x77, 0x74, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0e, 0x6a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, + 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x1c, + 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x36, 0x0a, 0x0e, + 0x4a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, + 0x0a, 0x0e, 0x6a, 0x77, 0x74, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x22, 0xe9, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, + 0x77, 0x6b, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x55, 0x72, 0x69, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x12, 0x40, 0x0a, + 0x0e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x5b, 0x0a, 0x0b, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, 0x6b, - 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x4a, 0x77, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, - 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, - 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x33, 0x2e, 0x4a, 0x77, 0x6b, 0x73, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x52, 0x0a, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x0c, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, - 0xa3, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, - 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, - 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, - 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, - 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x0e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x79, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x6e, 0x64, 0x5f, - 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, - 0x65, 0x73, 0x48, 0x00, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x6e, - 0x64, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x0c, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x41, 0x6e, - 0x79, 0x12, 0x66, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6c, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x4f, 0x0a, 0x17, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x5f, 0x66, 0x61, - 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x48, 0x00, 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, - 0x6e, 0x67, 0x4f, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0d, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, - 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, - 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x01, 0x0a, - 0x14, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x02, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3a, - 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, 0x6b, 0x73, + 0x22, 0x35, 0x0a, 0x0e, 0x4a, 0x77, 0x6b, 0x73, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x66, 0x61, 0x73, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x4a, 0x77, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, + 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, + 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0b, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, + 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, + 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x0e, + 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, + 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x79, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x48, 0x00, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x12, 0x65, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x73, 0x41, 0x6e, 0x79, 0x12, 0x66, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x41, 0x6c, 0x6c, 0x12, + 0x4f, 0x0a, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x5f, 0x6f, 0x72, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x12, 0x3d, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, + 0x00, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x3a, + 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xca, 0x01, 0x0a, 0x15, 0x4a, 0x77, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x68, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x0c, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, - 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, - 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x22, 0xbb, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x58, 0x0a, 0x08, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, + 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x0c, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, + 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xca, 0x01, + 0x0a, 0x15, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, - 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x12, - 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x22, 0xd1, 0x02, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, - 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, - 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x1a, 0x77, 0x0a, 0x0d, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x22, 0xa8, 0x06, 0x0a, 0x11, 0x4a, 0x77, 0x74, 0x41, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6a, 0x0a, 0x09, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x12, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x75, 0x6c, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, - 0x5f, 0x63, 0x6f, 0x72, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x72, - 0x73, 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x7a, 0x0a, 0x0f, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, + 0x02, 0x08, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xbb, 0x02, 0x0a, 0x0f, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x41, + 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x58, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, - 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, - 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x75, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x10, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, + 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x75, 0x6c, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xd1, 0x02, 0x0a, 0x0f, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x08, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, + 0x1a, 0x77, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, + 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x22, 0xa8, 0x06, 0x0a, + 0x11, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x6a, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x51, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x69, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, + 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x72, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x62, 0x79, 0x70, + 0x61, 0x73, 0x73, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x7a, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x6d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7d, 0x0a, - 0x13, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x75, 0x0a, 0x0e, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x7d, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x08, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x1c, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xb0, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, - 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x43, 0x9a, 0xc5, - 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, - 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, - 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x10, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x42, 0x1c, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, - 0x51, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, - 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1581,56 +1867,62 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP() return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescData } -var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_goTypes = []interface{}{ (*JwtProvider)(nil), // 0: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider - (*RemoteJwks)(nil), // 1: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks - (*JwtHeader)(nil), // 2: envoy.extensions.filters.http.jwt_authn.v3.JwtHeader - (*ProviderWithAudiences)(nil), // 3: envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences - (*JwtRequirement)(nil), // 4: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement - (*JwtRequirementOrList)(nil), // 5: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList - (*JwtRequirementAndList)(nil), // 6: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList - (*RequirementRule)(nil), // 7: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule - (*FilterStateRule)(nil), // 8: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule - (*JwtAuthentication)(nil), // 9: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication - (*PerRouteConfig)(nil), // 10: envoy.extensions.filters.http.jwt_authn.v3.PerRouteConfig - nil, // 11: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry - nil, // 12: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry - nil, // 13: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry - (*v3.DataSource)(nil), // 14: envoy.config.core.v3.DataSource - (*v3.HttpUri)(nil), // 15: envoy.config.core.v3.HttpUri - (*duration.Duration)(nil), // 16: google.protobuf.Duration - (*emptypb.Empty)(nil), // 17: google.protobuf.Empty - (*v31.RouteMatch)(nil), // 18: envoy.config.route.v3.RouteMatch + (*JwtCacheConfig)(nil), // 1: envoy.extensions.filters.http.jwt_authn.v3.JwtCacheConfig + (*RemoteJwks)(nil), // 2: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks + (*JwksAsyncFetch)(nil), // 3: envoy.extensions.filters.http.jwt_authn.v3.JwksAsyncFetch + (*JwtHeader)(nil), // 4: envoy.extensions.filters.http.jwt_authn.v3.JwtHeader + (*ProviderWithAudiences)(nil), // 5: envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences + (*JwtRequirement)(nil), // 6: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + (*JwtRequirementOrList)(nil), // 7: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList + (*JwtRequirementAndList)(nil), // 8: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList + (*RequirementRule)(nil), // 9: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule + (*FilterStateRule)(nil), // 10: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule + (*JwtAuthentication)(nil), // 11: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication + (*PerRouteConfig)(nil), // 12: envoy.extensions.filters.http.jwt_authn.v3.PerRouteConfig + nil, // 13: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry + nil, // 14: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry + nil, // 15: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry + (*v3.DataSource)(nil), // 16: envoy.config.core.v3.DataSource + (*v3.HttpUri)(nil), // 17: envoy.config.core.v3.HttpUri + (*duration.Duration)(nil), // 18: google.protobuf.Duration + (*v3.RetryPolicy)(nil), // 19: envoy.config.core.v3.RetryPolicy + (*emptypb.Empty)(nil), // 20: google.protobuf.Empty + (*v31.RouteMatch)(nil), // 21: envoy.config.route.v3.RouteMatch } var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.remote_jwks:type_name -> envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks - 14, // 1: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.local_jwks:type_name -> envoy.config.core.v3.DataSource - 2, // 2: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.from_headers:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtHeader - 15, // 3: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.http_uri:type_name -> envoy.config.core.v3.HttpUri - 16, // 4: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.cache_duration:type_name -> google.protobuf.Duration - 3, // 5: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.provider_and_audiences:type_name -> envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences - 5, // 6: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.requires_any:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList - 6, // 7: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.requires_all:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList - 17, // 8: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing_or_failed:type_name -> google.protobuf.Empty - 17, // 9: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing:type_name -> google.protobuf.Empty - 4, // 10: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement - 4, // 11: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement - 18, // 12: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule.match:type_name -> envoy.config.route.v3.RouteMatch - 4, // 13: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement - 11, // 14: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry - 12, // 15: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.providers:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry - 7, // 16: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.rules:type_name -> envoy.extensions.filters.http.jwt_authn.v3.RequirementRule - 8, // 17: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.filter_state_rules:type_name -> envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule - 13, // 18: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.requirement_map:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry - 4, // 19: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement - 0, // 20: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtProvider - 4, // 21: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 2, // 0: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.remote_jwks:type_name -> envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks + 16, // 1: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.local_jwks:type_name -> envoy.config.core.v3.DataSource + 4, // 2: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.from_headers:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtHeader + 1, // 3: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.jwt_cache_config:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtCacheConfig + 17, // 4: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.http_uri:type_name -> envoy.config.core.v3.HttpUri + 18, // 5: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.cache_duration:type_name -> google.protobuf.Duration + 3, // 6: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.async_fetch:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwksAsyncFetch + 19, // 7: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy + 5, // 8: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.provider_and_audiences:type_name -> envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences + 7, // 9: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.requires_any:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList + 8, // 10: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.requires_all:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList + 20, // 11: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing_or_failed:type_name -> google.protobuf.Empty + 20, // 12: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing:type_name -> google.protobuf.Empty + 6, // 13: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 6, // 14: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 21, // 15: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule.match:type_name -> envoy.config.route.v3.RouteMatch + 6, // 16: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 13, // 17: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry + 14, // 18: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.providers:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry + 9, // 19: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.rules:type_name -> envoy.extensions.filters.http.jwt_authn.v3.RequirementRule + 10, // 20: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.filter_state_rules:type_name -> envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule + 15, // 21: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.requirement_map:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry + 6, // 22: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 0, // 23: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtProvider + 6, // 24: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() } @@ -1652,7 +1944,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoteJwks); i { + switch v := v.(*JwtCacheConfig); i { case 0: return &v.state case 1: @@ -1664,7 +1956,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtHeader); i { + switch v := v.(*RemoteJwks); i { case 0: return &v.state case 1: @@ -1676,7 +1968,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProviderWithAudiences); i { + switch v := v.(*JwksAsyncFetch); i { case 0: return &v.state case 1: @@ -1688,7 +1980,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtRequirement); i { + switch v := v.(*JwtHeader); i { case 0: return &v.state case 1: @@ -1700,7 +1992,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtRequirementOrList); i { + switch v := v.(*ProviderWithAudiences); i { case 0: return &v.state case 1: @@ -1712,7 +2004,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtRequirementAndList); i { + switch v := v.(*JwtRequirement); i { case 0: return &v.state case 1: @@ -1724,7 +2016,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequirementRule); i { + switch v := v.(*JwtRequirementOrList); i { case 0: return &v.state case 1: @@ -1736,7 +2028,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterStateRule); i { + switch v := v.(*JwtRequirementAndList); i { case 0: return &v.state case 1: @@ -1748,7 +2040,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtAuthentication); i { + switch v := v.(*RequirementRule); i { case 0: return &v.state case 1: @@ -1760,6 +2052,30 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { } } file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterStateRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtAuthentication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PerRouteConfig); i { case 0: return &v.state @@ -1776,7 +2092,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { (*JwtProvider_RemoteJwks)(nil), (*JwtProvider_LocalJwks)(nil), } - file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6].OneofWrappers = []interface{}{ (*JwtRequirement_ProviderName)(nil), (*JwtRequirement_ProviderAndAudiences)(nil), (*JwtRequirement_RequiresAny)(nil), @@ -1784,11 +2100,11 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { (*JwtRequirement_AllowMissingOrFailed)(nil), (*JwtRequirement_AllowMissing)(nil), } - file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7].OneofWrappers = []interface{}{ + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9].OneofWrappers = []interface{}{ (*RequirementRule_Requires)(nil), (*RequirementRule_RequirementName)(nil), } - file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12].OneofWrappers = []interface{}{ (*PerRouteConfig_Disabled)(nil), (*PerRouteConfig_RequirementName)(nil), } @@ -1798,7 +2114,7 @@ func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.validate.go b/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.validate.go index 0e5e87f400..5d21d6d44d 100644 --- a/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/jwt_authn/v3/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/jwt_authn/v3/config.proto -package envoy_extensions_filters_http_jwt_authn_v3 +package jwt_authnv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on JwtProvider with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *JwtProvider) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtProvider with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwtProviderMultiError, or +// nil if none found. +func (m *JwtProvider) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtProvider) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Issuer // no validation rules for Forward @@ -48,7 +64,26 @@ func (m *JwtProvider) Validate() error { for idx, item := range m.GetFromHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: fmt.Sprintf("FromHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: fmt.Sprintf("FromHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: fmt.Sprintf("FromHeaders[%v]", idx), @@ -61,21 +96,77 @@ func (m *JwtProvider) Validate() error { } if !_JwtProvider_ForwardPayloadHeader_Pattern.MatchString(m.GetForwardPayloadHeader()) { - return JwtProviderValidationError{ + err := JwtProviderValidationError{ field: "ForwardPayloadHeader", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } + // no validation rules for PadForwardPayloadHeader + // no validation rules for PayloadInMetadata + // no validation rules for HeaderInMetadata + // no validation rules for ClockSkewSeconds + if all { + switch v := interface{}(m.GetJwtCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "JwtCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "JwtCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJwtCacheConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtProviderValidationError{ + field: "JwtCacheConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + switch m.JwksSourceSpecifier.(type) { case *JwtProvider_RemoteJwks: - if v, ok := interface{}(m.GetRemoteJwks()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRemoteJwks()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "RemoteJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "RemoteJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteJwks()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: "RemoteJwks", @@ -87,7 +178,26 @@ func (m *JwtProvider) Validate() error { case *JwtProvider_LocalJwks: - if v, ok := interface{}(m.GetLocalJwks()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalJwks()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "LocalJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "LocalJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalJwks()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: "LocalJwks", @@ -98,16 +208,40 @@ func (m *JwtProvider) Validate() error { } default: - return JwtProviderValidationError{ + err := JwtProviderValidationError{ field: "JwksSourceSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return JwtProviderMultiError(errors) + } + return nil } +// JwtProviderMultiError is an error wrapping multiple validation errors +// returned by JwtProvider.ValidateAll() if the designated constraints aren't met. +type JwtProviderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtProviderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtProviderMultiError) AllErrors() []error { return m } + // JwtProviderValidationError is the validation error returned by // JwtProvider.Validate if the designated constraints aren't met. type JwtProviderValidationError struct { @@ -164,14 +298,150 @@ var _ interface { var _JwtProvider_ForwardPayloadHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") +// Validate checks the field values on JwtCacheConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *JwtCacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtCacheConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwtCacheConfigMultiError, +// or nil if none found. +func (m *JwtCacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtCacheConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for JwtCacheSize + + if len(errors) > 0 { + return JwtCacheConfigMultiError(errors) + } + + return nil +} + +// JwtCacheConfigMultiError is an error wrapping multiple validation errors +// returned by JwtCacheConfig.ValidateAll() if the designated constraints +// aren't met. +type JwtCacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtCacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtCacheConfigMultiError) AllErrors() []error { return m } + +// JwtCacheConfigValidationError is the validation error returned by +// JwtCacheConfig.Validate if the designated constraints aren't met. +type JwtCacheConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtCacheConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtCacheConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtCacheConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtCacheConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtCacheConfigValidationError) ErrorName() string { return "JwtCacheConfigValidationError" } + +// Error satisfies the builtin error interface +func (e JwtCacheConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sJwtCacheConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtCacheConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtCacheConfigValidationError{} + // Validate checks the field values on RemoteJwks with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RemoteJwks) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoteJwks with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RemoteJwksMultiError, or +// nil if none found. +func (m *RemoteJwks) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoteJwks) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttpUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "HttpUri", @@ -181,7 +451,26 @@ func (m *RemoteJwks) Validate() error { } } - if v, ok := interface{}(m.GetCacheDuration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCacheDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "CacheDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "CacheDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "CacheDuration", @@ -191,9 +480,87 @@ func (m *RemoteJwks) Validate() error { } } + if all { + switch v := interface{}(m.GetAsyncFetch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "AsyncFetch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "AsyncFetch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAsyncFetch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RemoteJwksValidationError{ + field: "AsyncFetch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RemoteJwksValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RemoteJwksMultiError(errors) + } + return nil } +// RemoteJwksMultiError is an error wrapping multiple validation errors +// returned by RemoteJwks.ValidateAll() if the designated constraints aren't met. +type RemoteJwksMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoteJwksMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoteJwksMultiError) AllErrors() []error { return m } + // RemoteJwksValidationError is the validation error returned by // RemoteJwks.Validate if the designated constraints aren't met. type RemoteJwksValidationError struct { @@ -248,37 +615,186 @@ var _ interface { ErrorName() string } = RemoteJwksValidationError{} +// Validate checks the field values on JwksAsyncFetch with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *JwksAsyncFetch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwksAsyncFetch with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwksAsyncFetchMultiError, +// or nil if none found. +func (m *JwksAsyncFetch) ValidateAll() error { + return m.validate(true) +} + +func (m *JwksAsyncFetch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FastListener + + if len(errors) > 0 { + return JwksAsyncFetchMultiError(errors) + } + + return nil +} + +// JwksAsyncFetchMultiError is an error wrapping multiple validation errors +// returned by JwksAsyncFetch.ValidateAll() if the designated constraints +// aren't met. +type JwksAsyncFetchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwksAsyncFetchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwksAsyncFetchMultiError) AllErrors() []error { return m } + +// JwksAsyncFetchValidationError is the validation error returned by +// JwksAsyncFetch.Validate if the designated constraints aren't met. +type JwksAsyncFetchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwksAsyncFetchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwksAsyncFetchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwksAsyncFetchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwksAsyncFetchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwksAsyncFetchValidationError) ErrorName() string { return "JwksAsyncFetchValidationError" } + +// Error satisfies the builtin error interface +func (e JwksAsyncFetchValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sJwksAsyncFetch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwksAsyncFetchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwksAsyncFetchValidationError{} + // Validate checks the field values on JwtHeader with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *JwtHeader) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtHeader with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwtHeaderMultiError, or nil +// if none found. +func (m *JwtHeader) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtHeader) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return JwtHeaderValidationError{ + err := JwtHeaderValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_JwtHeader_Name_Pattern.MatchString(m.GetName()) { - return JwtHeaderValidationError{ + err := JwtHeaderValidationError{ field: "Name", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if !_JwtHeader_ValuePrefix_Pattern.MatchString(m.GetValuePrefix()) { - return JwtHeaderValidationError{ + err := JwtHeaderValidationError{ field: "ValuePrefix", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return JwtHeaderMultiError(errors) } return nil } +// JwtHeaderMultiError is an error wrapping multiple validation errors returned +// by JwtHeader.ValidateAll() if the designated constraints aren't met. +type JwtHeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtHeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtHeaderMultiError) AllErrors() []error { return m } + // JwtHeaderValidationError is the validation error returned by // JwtHeader.Validate if the designated constraints aren't met. type JwtHeaderValidationError struct { @@ -339,17 +855,52 @@ var _JwtHeader_ValuePrefix_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") // Validate checks the field values on ProviderWithAudiences with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ProviderWithAudiences) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProviderWithAudiences with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProviderWithAudiencesMultiError, or nil if none found. +func (m *ProviderWithAudiences) ValidateAll() error { + return m.validate(true) +} + +func (m *ProviderWithAudiences) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ProviderName + if len(errors) > 0 { + return ProviderWithAudiencesMultiError(errors) + } + return nil } +// ProviderWithAudiencesMultiError is an error wrapping multiple validation +// errors returned by ProviderWithAudiences.ValidateAll() if the designated +// constraints aren't met. +type ProviderWithAudiencesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProviderWithAudiencesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProviderWithAudiencesMultiError) AllErrors() []error { return m } + // ProviderWithAudiencesValidationError is the validation error returned by // ProviderWithAudiences.Validate if the designated constraints aren't met. type ProviderWithAudiencesValidationError struct { @@ -407,13 +958,27 @@ var _ interface { } = ProviderWithAudiencesValidationError{} // Validate checks the field values on JwtRequirement with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *JwtRequirement) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirement with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JwtRequirementMultiError, +// or nil if none found. +func (m *JwtRequirement) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirement) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.RequiresType.(type) { case *JwtRequirement_ProviderName: @@ -421,7 +986,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_ProviderAndAudiences: - if v, ok := interface{}(m.GetProviderAndAudiences()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProviderAndAudiences()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "ProviderAndAudiences", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "ProviderAndAudiences", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProviderAndAudiences()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "ProviderAndAudiences", @@ -433,7 +1017,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_RequiresAny: - if v, ok := interface{}(m.GetRequiresAny()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequiresAny()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAny", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAny", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequiresAny()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAny", @@ -445,7 +1048,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_RequiresAll: - if v, ok := interface{}(m.GetRequiresAll()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequiresAll()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAll", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAll", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequiresAll()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAll", @@ -457,7 +1079,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_AllowMissingOrFailed: - if v, ok := interface{}(m.GetAllowMissingOrFailed()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowMissingOrFailed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissingOrFailed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissingOrFailed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowMissingOrFailed()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "AllowMissingOrFailed", @@ -469,7 +1110,26 @@ func (m *JwtRequirement) Validate() error { case *JwtRequirement_AllowMissing: - if v, ok := interface{}(m.GetAllowMissing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAllowMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowMissing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "AllowMissing", @@ -481,9 +1141,30 @@ func (m *JwtRequirement) Validate() error { } + if len(errors) > 0 { + return JwtRequirementMultiError(errors) + } + return nil } +// JwtRequirementMultiError is an error wrapping multiple validation errors +// returned by JwtRequirement.ValidateAll() if the designated constraints +// aren't met. +type JwtRequirementMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementMultiError) AllErrors() []error { return m } + // JwtRequirementValidationError is the validation error returned by // JwtRequirement.Validate if the designated constraints aren't met. type JwtRequirementValidationError struct { @@ -540,23 +1221,60 @@ var _ interface { // Validate checks the field values on JwtRequirementOrList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *JwtRequirementOrList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirementOrList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// JwtRequirementOrListMultiError, or nil if none found. +func (m *JwtRequirementOrList) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirementOrList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRequirements()) < 2 { - return JwtRequirementOrListValidationError{ + err := JwtRequirementOrListValidationError{ field: "Requirements", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequirements() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementOrListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementOrListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementOrListValidationError{ field: fmt.Sprintf("Requirements[%v]", idx), @@ -568,9 +1286,30 @@ func (m *JwtRequirementOrList) Validate() error { } + if len(errors) > 0 { + return JwtRequirementOrListMultiError(errors) + } + return nil } +// JwtRequirementOrListMultiError is an error wrapping multiple validation +// errors returned by JwtRequirementOrList.ValidateAll() if the designated +// constraints aren't met. +type JwtRequirementOrListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementOrListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementOrListMultiError) AllErrors() []error { return m } + // JwtRequirementOrListValidationError is the validation error returned by // JwtRequirementOrList.Validate if the designated constraints aren't met. type JwtRequirementOrListValidationError struct { @@ -629,23 +1368,60 @@ var _ interface { // Validate checks the field values on JwtRequirementAndList with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *JwtRequirementAndList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirementAndList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// JwtRequirementAndListMultiError, or nil if none found. +func (m *JwtRequirementAndList) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirementAndList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRequirements()) < 2 { - return JwtRequirementAndListValidationError{ + err := JwtRequirementAndListValidationError{ field: "Requirements", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequirements() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementAndListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementAndListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementAndListValidationError{ field: fmt.Sprintf("Requirements[%v]", idx), @@ -657,9 +1433,30 @@ func (m *JwtRequirementAndList) Validate() error { } + if len(errors) > 0 { + return JwtRequirementAndListMultiError(errors) + } + return nil } +// JwtRequirementAndListMultiError is an error wrapping multiple validation +// errors returned by JwtRequirementAndList.ValidateAll() if the designated +// constraints aren't met. +type JwtRequirementAndListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementAndListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementAndListMultiError) AllErrors() []error { return m } + // JwtRequirementAndListValidationError is the validation error returned by // JwtRequirementAndList.Validate if the designated constraints aren't met. type JwtRequirementAndListValidationError struct { @@ -717,21 +1514,58 @@ var _ interface { } = JwtRequirementAndListValidationError{} // Validate checks the field values on RequirementRule with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RequirementRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RequirementRule with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RequirementRuleMultiError, or nil if none found. +func (m *RequirementRule) ValidateAll() error { + return m.validate(true) +} + +func (m *RequirementRule) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatch() == nil { - return RequirementRuleValidationError{ + err := RequirementRuleValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Match", @@ -745,7 +1579,26 @@ func (m *RequirementRule) Validate() error { case *RequirementRule_Requires: - if v, ok := interface{}(m.GetRequires()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequires()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Requires", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Requires", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequires()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Requires", @@ -758,17 +1611,42 @@ func (m *RequirementRule) Validate() error { case *RequirementRule_RequirementName: if utf8.RuneCountInString(m.GetRequirementName()) < 1 { - return RequirementRuleValidationError{ + err := RequirementRuleValidationError{ field: "RequirementName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return RequirementRuleMultiError(errors) + } + return nil } +// RequirementRuleMultiError is an error wrapping multiple validation errors +// returned by RequirementRule.ValidateAll() if the designated constraints +// aren't met. +type RequirementRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RequirementRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RequirementRuleMultiError) AllErrors() []error { return m } + // RequirementRuleValidationError is the validation error returned by // RequirementRule.Validate if the designated constraints aren't met. type RequirementRuleValidationError struct { @@ -824,40 +1702,108 @@ var _ interface { } = RequirementRuleValidationError{} // Validate checks the field values on FilterStateRule with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *FilterStateRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterStateRule with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FilterStateRuleMultiError, or nil if none found. +func (m *FilterStateRule) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterStateRule) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return FilterStateRuleValidationError{ + err := FilterStateRuleValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - for key, val := range m.GetRequires() { - _ = val - - // no validation rules for Requires[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterStateRuleValidationError{ - field: fmt.Sprintf("Requires[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetRequires())) + i := 0 + for key := range m.GetRequires() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetRequires()[key] + _ = val + + // no validation rules for Requires[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return FilterStateRuleMultiError(errors) } return nil } +// FilterStateRuleMultiError is an error wrapping multiple validation errors +// returned by FilterStateRule.ValidateAll() if the designated constraints +// aren't met. +type FilterStateRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterStateRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterStateRuleMultiError) AllErrors() []error { return m } + // FilterStateRuleValidationError is the validation error returned by // FilterStateRule.Validate if the designated constraints aren't met. type FilterStateRuleValidationError struct { @@ -913,34 +1859,96 @@ var _ interface { } = FilterStateRuleValidationError{} // Validate checks the field values on JwtAuthentication with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *JwtAuthentication) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtAuthentication with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// JwtAuthenticationMultiError, or nil if none found. +func (m *JwtAuthentication) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtAuthentication) validate(all bool) error { if m == nil { return nil } - for key, val := range m.GetProviders() { - _ = val + var errors []error - // no validation rules for Providers[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtAuthenticationValidationError{ - field: fmt.Sprintf("Providers[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetProviders())) + i := 0 + for key := range m.GetProviders() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetProviders()[key] + _ = val + + // no validation rules for Providers[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } - } + } } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -952,7 +1960,26 @@ func (m *JwtAuthentication) Validate() error { } - if v, ok := interface{}(m.GetFilterStateRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterStateRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: "FilterStateRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: "FilterStateRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterStateRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: "FilterStateRules", @@ -964,26 +1991,76 @@ func (m *JwtAuthentication) Validate() error { // no validation rules for BypassCorsPreflight - for key, val := range m.GetRequirementMap() { - _ = val - - // no validation rules for RequirementMap[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtAuthenticationValidationError{ - field: fmt.Sprintf("RequirementMap[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetRequirementMap())) + i := 0 + for key := range m.GetRequirementMap() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetRequirementMap()[key] + _ = val + + // no validation rules for RequirementMap[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("RequirementMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("RequirementMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtAuthenticationValidationError{ + field: fmt.Sprintf("RequirementMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return JwtAuthenticationMultiError(errors) } return nil } +// JwtAuthenticationMultiError is an error wrapping multiple validation errors +// returned by JwtAuthentication.ValidateAll() if the designated constraints +// aren't met. +type JwtAuthenticationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtAuthenticationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtAuthenticationMultiError) AllErrors() []error { return m } + // JwtAuthenticationValidationError is the validation error returned by // JwtAuthentication.Validate if the designated constraints aren't met. type JwtAuthenticationValidationError struct { @@ -1041,44 +2118,91 @@ var _ interface { } = JwtAuthenticationValidationError{} // Validate checks the field values on PerRouteConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.RequirementSpecifier.(type) { case *PerRouteConfig_Disabled: if m.GetDisabled() != true { - return PerRouteConfigValidationError{ + err := PerRouteConfigValidationError{ field: "Disabled", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *PerRouteConfig_RequirementName: if utf8.RuneCountInString(m.GetRequirementName()) < 1 { - return PerRouteConfigValidationError{ + err := PerRouteConfigValidationError{ field: "RequirementName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } default: - return PerRouteConfigValidationError{ + err := PerRouteConfigValidationError{ field: "RequirementSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil } +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + // PerRouteConfigValidationError is the validation error returned by // PerRouteConfig.Validate if the designated constraints aren't met. type PerRouteConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.pb.go b/pkg/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.pb.go deleted file mode 100644 index 2bc850d109..0000000000 --- a/pkg/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.pb.go +++ /dev/null @@ -1,1825 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/jwt_authn/v4alpha/config.proto - -package envoy_extensions_filters_http_jwt_authn_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Please see following for JWT authentication flow: -// -// * `JSON Web Token (JWT) `_ -// * `The OAuth 2.0 Authorization Framework `_ -// * `OpenID Connect `_ -// -// A JwtProvider message specifies how a JSON Web Token (JWT) can be verified. It specifies: -// -// * issuer: the principal that issues the JWT. If specified, it has to match the *iss* field in JWT. -// * allowed audiences: the ones in the token have to be listed here. -// * how to fetch public key JWKS to verify the token signature. -// * how to extract JWT token in the request. -// * how to pass successfully verified token payload. -// -// Example: -// -// .. code-block:: yaml -// -// issuer: https://example.com -// audiences: -// - bookstore_android.apps.googleusercontent.com -// - bookstore_web.apps.googleusercontent.com -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// timeout: 1s -// cache_duration: -// seconds: 300 -// -// [#next-free-field: 11] -type JwtProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify the `principal `_ that issued - // the JWT, usually a URL or an email address. - // - // It is optional. If specified, it has to match the *iss* field in JWT. - // - // If a JWT has *iss* field and this field is specified, they have to match, otherwise the - // JWT *iss* field is not checked. - // - // Note: *JwtRequirement* :ref:`allow_missing ` - // and :ref:`allow_missing_or_failed ` - // are implemented differently than other *JwtRequirements*. Hence the usage of this field - // is different as follows if *allow_missing* or *allow_missing_or_failed* is used: - // - // * If a JWT has *iss* field, it needs to be specified by this field in one of *JwtProviders*. - // * If a JWT doesn't have *iss* field, one of *JwtProviders* should fill this field empty. - // * Multiple *JwtProviders* should not have same value in this field. - // - // Example: https://securetoken.google.com - // Example: 1234567-compute@developer.gserviceaccount.com - // - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - // The list of JWT `audiences `_ are - // allowed to access. A JWT containing any of these audiences will be accepted. If not specified, - // will not check audiences in the token. - // - // Example: - // - // .. code-block:: yaml - // - // audiences: - // - bookstore_android.apps.googleusercontent.com - // - bookstore_web.apps.googleusercontent.com - // - Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"` - // `JSON Web Key Set (JWKS) `_ is needed to - // validate signature of a JWT. This field specifies where to fetch JWKS. - // - // Types that are assignable to JwksSourceSpecifier: - // *JwtProvider_RemoteJwks - // *JwtProvider_LocalJwks - JwksSourceSpecifier isJwtProvider_JwksSourceSpecifier `protobuf_oneof:"jwks_source_specifier"` - // If false, the JWT is removed in the request after a success verification. If true, the JWT is - // not removed in the request. Default value is false. - Forward bool `protobuf:"varint,5,opt,name=forward,proto3" json:"forward,omitempty"` - // Two fields below define where to extract the JWT from an HTTP request. - // - // If no explicit location is specified, the following default locations are tried in order: - // - // 1. The Authorization header using the `Bearer schema - // `_. Example:: - // - // Authorization: Bearer . - // - // 2. `access_token `_ query parameter. - // - // Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations - // its provider specified or from the default locations. - // - // Specify the HTTP headers to extract JWT token. For examples, following config: - // - // .. code-block:: yaml - // - // from_headers: - // - name: x-goog-iap-jwt-assertion - // - // can be used to extract token from header:: - // - // ``x-goog-iap-jwt-assertion: ``. - // - FromHeaders []*JwtHeader `protobuf:"bytes,6,rep,name=from_headers,json=fromHeaders,proto3" json:"from_headers,omitempty"` - // JWT is sent in a query parameter. `jwt_params` represents the query parameter names. - // - // For example, if config is: - // - // .. code-block:: yaml - // - // from_params: - // - jwt_token - // - // The JWT format in query parameter is:: - // - // /path?jwt_token= - // - FromParams []string `protobuf:"bytes,7,rep,name=from_params,json=fromParams,proto3" json:"from_params,omitempty"` - // This field specifies the header name to forward a successfully verified JWT payload to the - // backend. The forwarded data is:: - // - // base64url_encoded(jwt_payload_in_JSON) - // - // If it is not specified, the payload will not be forwarded. - ForwardPayloadHeader string `protobuf:"bytes,8,opt,name=forward_payload_header,json=forwardPayloadHeader,proto3" json:"forward_payload_header,omitempty"` - // If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata - // in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn** - // The value is the *protobuf::Struct*. The value of this field will be the key for its *fields* - // and the value is the *protobuf::Struct* converted from JWT JSON payload. - // - // For example, if payload_in_metadata is *my_payload*: - // - // .. code-block:: yaml - // - // envoy.filters.http.jwt_authn: - // my_payload: - // iss: https://example.com - // sub: test@example.com - // aud: https://example.com - // exp: 1501281058 - // - PayloadInMetadata string `protobuf:"bytes,9,opt,name=payload_in_metadata,json=payloadInMetadata,proto3" json:"payload_in_metadata,omitempty"` - // Specify the clock skew in seconds when verifying JWT time constraint, - // such as `exp`, and `nbf`. If not specified, default is 60 seconds. - ClockSkewSeconds uint32 `protobuf:"varint,10,opt,name=clock_skew_seconds,json=clockSkewSeconds,proto3" json:"clock_skew_seconds,omitempty"` -} - -func (x *JwtProvider) Reset() { - *x = JwtProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JwtProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JwtProvider) ProtoMessage() {} - -func (x *JwtProvider) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JwtProvider.ProtoReflect.Descriptor instead. -func (*JwtProvider) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{0} -} - -func (x *JwtProvider) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *JwtProvider) GetAudiences() []string { - if x != nil { - return x.Audiences - } - return nil -} - -func (m *JwtProvider) GetJwksSourceSpecifier() isJwtProvider_JwksSourceSpecifier { - if m != nil { - return m.JwksSourceSpecifier - } - return nil -} - -func (x *JwtProvider) GetRemoteJwks() *RemoteJwks { - if x, ok := x.GetJwksSourceSpecifier().(*JwtProvider_RemoteJwks); ok { - return x.RemoteJwks - } - return nil -} - -func (x *JwtProvider) GetLocalJwks() *v4alpha.DataSource { - if x, ok := x.GetJwksSourceSpecifier().(*JwtProvider_LocalJwks); ok { - return x.LocalJwks - } - return nil -} - -func (x *JwtProvider) GetForward() bool { - if x != nil { - return x.Forward - } - return false -} - -func (x *JwtProvider) GetFromHeaders() []*JwtHeader { - if x != nil { - return x.FromHeaders - } - return nil -} - -func (x *JwtProvider) GetFromParams() []string { - if x != nil { - return x.FromParams - } - return nil -} - -func (x *JwtProvider) GetForwardPayloadHeader() string { - if x != nil { - return x.ForwardPayloadHeader - } - return "" -} - -func (x *JwtProvider) GetPayloadInMetadata() string { - if x != nil { - return x.PayloadInMetadata - } - return "" -} - -func (x *JwtProvider) GetClockSkewSeconds() uint32 { - if x != nil { - return x.ClockSkewSeconds - } - return 0 -} - -type isJwtProvider_JwksSourceSpecifier interface { - isJwtProvider_JwksSourceSpecifier() -} - -type JwtProvider_RemoteJwks struct { - // JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP - // URI and how the fetched JWKS should be cached. - // - // Example: - // - // .. code-block:: yaml - // - // remote_jwks: - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // timeout: 1s - // cache_duration: - // seconds: 300 - // - RemoteJwks *RemoteJwks `protobuf:"bytes,3,opt,name=remote_jwks,json=remoteJwks,proto3,oneof"` -} - -type JwtProvider_LocalJwks struct { - // JWKS is in local data source. It could be either in a local file or embedded in the - // inline_string. - // - // Example: local file - // - // .. code-block:: yaml - // - // local_jwks: - // filename: /etc/envoy/jwks/jwks1.txt - // - // Example: inline_string - // - // .. code-block:: yaml - // - // local_jwks: - // inline_string: ACADADADADA - // - LocalJwks *v4alpha.DataSource `protobuf:"bytes,4,opt,name=local_jwks,json=localJwks,proto3,oneof"` -} - -func (*JwtProvider_RemoteJwks) isJwtProvider_JwksSourceSpecifier() {} - -func (*JwtProvider_LocalJwks) isJwtProvider_JwksSourceSpecifier() {} - -// This message specifies how to fetch JWKS from remote and how to cache it. -type RemoteJwks struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The HTTP URI to fetch the JWKS. For example: - // - // .. code-block:: yaml - // - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // timeout: 1s - // - HttpUri *v4alpha.HttpUri `protobuf:"bytes,1,opt,name=http_uri,json=httpUri,proto3" json:"http_uri,omitempty"` - // Duration after which the cached JWKS should be expired. If not specified, default cache - // duration is 5 minutes. - CacheDuration *duration.Duration `protobuf:"bytes,2,opt,name=cache_duration,json=cacheDuration,proto3" json:"cache_duration,omitempty"` -} - -func (x *RemoteJwks) Reset() { - *x = RemoteJwks{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoteJwks) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoteJwks) ProtoMessage() {} - -func (x *RemoteJwks) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoteJwks.ProtoReflect.Descriptor instead. -func (*RemoteJwks) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{1} -} - -func (x *RemoteJwks) GetHttpUri() *v4alpha.HttpUri { - if x != nil { - return x.HttpUri - } - return nil -} - -func (x *RemoteJwks) GetCacheDuration() *duration.Duration { - if x != nil { - return x.CacheDuration - } - return nil -} - -// This message specifies a header location to extract JWT token. -type JwtHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The HTTP header name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The value prefix. The value format is "value_prefix" - // For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the - // end. - ValuePrefix string `protobuf:"bytes,2,opt,name=value_prefix,json=valuePrefix,proto3" json:"value_prefix,omitempty"` -} - -func (x *JwtHeader) Reset() { - *x = JwtHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JwtHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JwtHeader) ProtoMessage() {} - -func (x *JwtHeader) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JwtHeader.ProtoReflect.Descriptor instead. -func (*JwtHeader) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{2} -} - -func (x *JwtHeader) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *JwtHeader) GetValuePrefix() string { - if x != nil { - return x.ValuePrefix - } - return "" -} - -// Specify a required provider with audiences. -type ProviderWithAudiences struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify a required provider name. - ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"` - // This field overrides the one specified in the JwtProvider. - Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"` -} - -func (x *ProviderWithAudiences) Reset() { - *x = ProviderWithAudiences{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProviderWithAudiences) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProviderWithAudiences) ProtoMessage() {} - -func (x *ProviderWithAudiences) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProviderWithAudiences.ProtoReflect.Descriptor instead. -func (*ProviderWithAudiences) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{3} -} - -func (x *ProviderWithAudiences) GetProviderName() string { - if x != nil { - return x.ProviderName - } - return "" -} - -func (x *ProviderWithAudiences) GetAudiences() []string { - if x != nil { - return x.Audiences - } - return nil -} - -// This message specifies a Jwt requirement. An empty message means JWT verification is not -// required. Here are some config examples: -// -// .. code-block:: yaml -// -// # Example 1: not required with an empty message -// -// # Example 2: require A -// provider_name: provider-A -// -// # Example 3: require A or B -// requires_any: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 4: require A and B -// requires_all: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 5: require A and (B or C) -// requires_all: -// requirements: -// - provider_name: provider-A -// - requires_any: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 6: require A or (B and C) -// requires_any: -// requirements: -// - provider_name: provider-A -// - requires_all: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 7: A is optional (if token from A is provided, it must be valid, but also allows -// missing token.) -// requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// -// # Example 8: A is optional and B is required. -// requires_all: -// requirements: -// - requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// - provider_name: provider-B -// -// [#next-free-field: 7] -type JwtRequirement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to RequiresType: - // *JwtRequirement_ProviderName - // *JwtRequirement_ProviderAndAudiences - // *JwtRequirement_RequiresAny - // *JwtRequirement_RequiresAll - // *JwtRequirement_AllowMissingOrFailed - // *JwtRequirement_AllowMissing - RequiresType isJwtRequirement_RequiresType `protobuf_oneof:"requires_type"` -} - -func (x *JwtRequirement) Reset() { - *x = JwtRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JwtRequirement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JwtRequirement) ProtoMessage() {} - -func (x *JwtRequirement) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JwtRequirement.ProtoReflect.Descriptor instead. -func (*JwtRequirement) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{4} -} - -func (m *JwtRequirement) GetRequiresType() isJwtRequirement_RequiresType { - if m != nil { - return m.RequiresType - } - return nil -} - -func (x *JwtRequirement) GetProviderName() string { - if x, ok := x.GetRequiresType().(*JwtRequirement_ProviderName); ok { - return x.ProviderName - } - return "" -} - -func (x *JwtRequirement) GetProviderAndAudiences() *ProviderWithAudiences { - if x, ok := x.GetRequiresType().(*JwtRequirement_ProviderAndAudiences); ok { - return x.ProviderAndAudiences - } - return nil -} - -func (x *JwtRequirement) GetRequiresAny() *JwtRequirementOrList { - if x, ok := x.GetRequiresType().(*JwtRequirement_RequiresAny); ok { - return x.RequiresAny - } - return nil -} - -func (x *JwtRequirement) GetRequiresAll() *JwtRequirementAndList { - if x, ok := x.GetRequiresType().(*JwtRequirement_RequiresAll); ok { - return x.RequiresAll - } - return nil -} - -func (x *JwtRequirement) GetAllowMissingOrFailed() *emptypb.Empty { - if x, ok := x.GetRequiresType().(*JwtRequirement_AllowMissingOrFailed); ok { - return x.AllowMissingOrFailed - } - return nil -} - -func (x *JwtRequirement) GetAllowMissing() *emptypb.Empty { - if x, ok := x.GetRequiresType().(*JwtRequirement_AllowMissing); ok { - return x.AllowMissing - } - return nil -} - -type isJwtRequirement_RequiresType interface { - isJwtRequirement_RequiresType() -} - -type JwtRequirement_ProviderName struct { - // Specify a required provider name. - ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3,oneof"` -} - -type JwtRequirement_ProviderAndAudiences struct { - // Specify a required provider with audiences. - ProviderAndAudiences *ProviderWithAudiences `protobuf:"bytes,2,opt,name=provider_and_audiences,json=providerAndAudiences,proto3,oneof"` -} - -type JwtRequirement_RequiresAny struct { - // Specify list of JwtRequirement. Their results are OR-ed. - // If any one of them passes, the result is passed. - RequiresAny *JwtRequirementOrList `protobuf:"bytes,3,opt,name=requires_any,json=requiresAny,proto3,oneof"` -} - -type JwtRequirement_RequiresAll struct { - // Specify list of JwtRequirement. Their results are AND-ed. - // All of them must pass, if one of them fails or missing, it fails. - RequiresAll *JwtRequirementAndList `protobuf:"bytes,4,opt,name=requires_all,json=requiresAll,proto3,oneof"` -} - -type JwtRequirement_AllowMissingOrFailed struct { - // The requirement is always satisfied even if JWT is missing or the JWT - // verification fails. A typical usage is: this filter is used to only verify - // JWTs and pass the verified JWT payloads to another filter, the other filter - // will make decision. In this mode, all JWT tokens will be verified. - AllowMissingOrFailed *emptypb.Empty `protobuf:"bytes,5,opt,name=allow_missing_or_failed,json=allowMissingOrFailed,proto3,oneof"` -} - -type JwtRequirement_AllowMissing struct { - // The requirement is satisfied if JWT is missing, but failed if JWT is - // presented but invalid. Similar to allow_missing_or_failed, this is used - // to only verify JWTs and pass the verified payload to another filter. The - // different is this mode will reject requests with invalid tokens. - AllowMissing *emptypb.Empty `protobuf:"bytes,6,opt,name=allow_missing,json=allowMissing,proto3,oneof"` -} - -func (*JwtRequirement_ProviderName) isJwtRequirement_RequiresType() {} - -func (*JwtRequirement_ProviderAndAudiences) isJwtRequirement_RequiresType() {} - -func (*JwtRequirement_RequiresAny) isJwtRequirement_RequiresType() {} - -func (*JwtRequirement_RequiresAll) isJwtRequirement_RequiresType() {} - -func (*JwtRequirement_AllowMissingOrFailed) isJwtRequirement_RequiresType() {} - -func (*JwtRequirement_AllowMissing) isJwtRequirement_RequiresType() {} - -// This message specifies a list of RequiredProvider. -// Their results are OR-ed; if any one of them passes, the result is passed -type JwtRequirementOrList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify a list of JwtRequirement. - Requirements []*JwtRequirement `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` -} - -func (x *JwtRequirementOrList) Reset() { - *x = JwtRequirementOrList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JwtRequirementOrList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JwtRequirementOrList) ProtoMessage() {} - -func (x *JwtRequirementOrList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JwtRequirementOrList.ProtoReflect.Descriptor instead. -func (*JwtRequirementOrList) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{5} -} - -func (x *JwtRequirementOrList) GetRequirements() []*JwtRequirement { - if x != nil { - return x.Requirements - } - return nil -} - -// This message specifies a list of RequiredProvider. -// Their results are AND-ed; all of them must pass, if one of them fails or missing, it fails. -type JwtRequirementAndList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify a list of JwtRequirement. - Requirements []*JwtRequirement `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` -} - -func (x *JwtRequirementAndList) Reset() { - *x = JwtRequirementAndList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JwtRequirementAndList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JwtRequirementAndList) ProtoMessage() {} - -func (x *JwtRequirementAndList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JwtRequirementAndList.ProtoReflect.Descriptor instead. -func (*JwtRequirementAndList) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{6} -} - -func (x *JwtRequirementAndList) GetRequirements() []*JwtRequirement { - if x != nil { - return x.Requirements - } - return nil -} - -// This message specifies a Jwt requirement for a specific Route condition. -// Example 1: -// -// .. code-block:: yaml -// -// - match: -// prefix: /healthz -// -// In above example, "requires" field is empty for /healthz prefix match, -// it means that requests matching the path prefix don't require JWT authentication. -// -// Example 2: -// -// .. code-block:: yaml -// -// - match: -// prefix: / -// requires: { provider_name: provider-A } -// -// In above example, all requests matched the path prefix require jwt authentication -// from "provider-A". -type RequirementRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The route matching parameter. Only when the match is satisfied, the "requires" field will - // apply. - // - // For example: following match will match all requests. - // - // .. code-block:: yaml - // - // match: - // prefix: / - // - Match *v4alpha1.RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Specify a Jwt requirement. - // If not specified, Jwt verification is disabled. - // - // Types that are assignable to RequirementType: - // *RequirementRule_Requires - // *RequirementRule_RequirementName - RequirementType isRequirementRule_RequirementType `protobuf_oneof:"requirement_type"` -} - -func (x *RequirementRule) Reset() { - *x = RequirementRule{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequirementRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequirementRule) ProtoMessage() {} - -func (x *RequirementRule) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequirementRule.ProtoReflect.Descriptor instead. -func (*RequirementRule) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{7} -} - -func (x *RequirementRule) GetMatch() *v4alpha1.RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (m *RequirementRule) GetRequirementType() isRequirementRule_RequirementType { - if m != nil { - return m.RequirementType - } - return nil -} - -func (x *RequirementRule) GetRequires() *JwtRequirement { - if x, ok := x.GetRequirementType().(*RequirementRule_Requires); ok { - return x.Requires - } - return nil -} - -func (x *RequirementRule) GetRequirementName() string { - if x, ok := x.GetRequirementType().(*RequirementRule_RequirementName); ok { - return x.RequirementName - } - return "" -} - -type isRequirementRule_RequirementType interface { - isRequirementRule_RequirementType() -} - -type RequirementRule_Requires struct { - // Specify a Jwt requirement. Please see detail comment in message JwtRequirement. - Requires *JwtRequirement `protobuf:"bytes,2,opt,name=requires,proto3,oneof"` -} - -type RequirementRule_RequirementName struct { - // Use requirement_name to specify a Jwt requirement. - // This requirement_name MUST be specified at the - // :ref:`requirement_map ` - // in `JwtAuthentication`. - RequirementName string `protobuf:"bytes,3,opt,name=requirement_name,json=requirementName,proto3,oneof"` -} - -func (*RequirementRule_Requires) isRequirementRule_RequirementType() {} - -func (*RequirementRule_RequirementName) isRequirementRule_RequirementType() {} - -// This message specifies Jwt requirements based on stream_info.filterState. -// This FilterState should use `Router::StringAccessor` object to set a string value. -// Other HTTP filters can use it to specify Jwt requirements dynamically. -// -// Example: -// -// .. code-block:: yaml -// -// name: jwt_selector -// requires: -// issuer_1: -// provider_name: issuer1 -// issuer_2: -// provider_name: issuer2 -// -// If a filter set "jwt_selector" with "issuer_1" to FilterState for a request, -// jwt_authn filter will use JwtRequirement{"provider_name": "issuer1"} to verify. -type FilterStateRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The filter state name to retrieve the `Router::StringAccessor` object. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A map of string keys to requirements. The string key is the string value - // in the FilterState with the name specified in the *name* field above. - Requires map[string]*JwtRequirement `protobuf:"bytes,3,rep,name=requires,proto3" json:"requires,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *FilterStateRule) Reset() { - *x = FilterStateRule{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterStateRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterStateRule) ProtoMessage() {} - -func (x *FilterStateRule) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterStateRule.ProtoReflect.Descriptor instead. -func (*FilterStateRule) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{8} -} - -func (x *FilterStateRule) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *FilterStateRule) GetRequires() map[string]*JwtRequirement { - if x != nil { - return x.Requires - } - return nil -} - -// This is the Envoy HTTP filter config for JWT authentication. -// -// For example: -// -// .. code-block:: yaml -// -// providers: -// provider1: -// issuer: issuer1 -// audiences: -// - audience1 -// - audience2 -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// timeout: 1s -// provider2: -// issuer: issuer2 -// local_jwks: -// inline_string: jwks_string -// -// rules: -// # Not jwt verification is required for /health path -// - match: -// prefix: /health -// -// # Jwt verification for provider1 is required for path prefixed with "prefix" -// - match: -// prefix: /prefix -// requires: -// provider_name: provider1 -// -// # Jwt verification for either provider1 or provider2 is required for all other requests. -// - match: -// prefix: / -// requires: -// requires_any: -// requirements: -// - provider_name: provider1 -// - provider_name: provider2 -// -// [#next-free-field: 6] -type JwtAuthentication struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Map of provider names to JwtProviders. - // - // .. code-block:: yaml - // - // providers: - // provider1: - // issuer: issuer1 - // audiences: - // - audience1 - // - audience2 - // remote_jwks: - // http_uri: - // uri: https://example.com/.well-known/jwks.json - // cluster: example_jwks_cluster - // timeout: 1s - // provider2: - // issuer: provider2 - // local_jwks: - // inline_string: jwks_string - // - Providers map[string]*JwtProvider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Specifies requirements based on the route matches. The first matched requirement will be - // applied. If there are overlapped match conditions, please put the most specific match first. - // - // Examples - // - // .. code-block:: yaml - // - // rules: - // - match: - // prefix: /healthz - // - match: - // prefix: /baz - // requires: - // provider_name: provider1 - // - match: - // prefix: /foo - // requires: - // requires_any: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - match: - // prefix: /bar - // requires: - // requires_all: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - Rules []*RequirementRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` - // This message specifies Jwt requirements based on stream_info.filterState. - // Other HTTP filters can use it to specify Jwt requirements dynamically. - // The *rules* field above is checked first, if it could not find any matches, - // check this one. - FilterStateRules *FilterStateRule `protobuf:"bytes,3,opt,name=filter_state_rules,json=filterStateRules,proto3" json:"filter_state_rules,omitempty"` - // When set to true, bypass the `CORS preflight request - // `_ regardless of JWT - // requirements specified in the rules. - BypassCorsPreflight bool `protobuf:"varint,4,opt,name=bypass_cors_preflight,json=bypassCorsPreflight,proto3" json:"bypass_cors_preflight,omitempty"` - // A map of unique requirement_names to JwtRequirements. - // :ref:`requirement_name ` - // in `PerRouteConfig` uses this map to specify a JwtRequirement. - RequirementMap map[string]*JwtRequirement `protobuf:"bytes,5,rep,name=requirement_map,json=requirementMap,proto3" json:"requirement_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *JwtAuthentication) Reset() { - *x = JwtAuthentication{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JwtAuthentication) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JwtAuthentication) ProtoMessage() {} - -func (x *JwtAuthentication) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JwtAuthentication.ProtoReflect.Descriptor instead. -func (*JwtAuthentication) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{9} -} - -func (x *JwtAuthentication) GetProviders() map[string]*JwtProvider { - if x != nil { - return x.Providers - } - return nil -} - -func (x *JwtAuthentication) GetRules() []*RequirementRule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *JwtAuthentication) GetFilterStateRules() *FilterStateRule { - if x != nil { - return x.FilterStateRules - } - return nil -} - -func (x *JwtAuthentication) GetBypassCorsPreflight() bool { - if x != nil { - return x.BypassCorsPreflight - } - return false -} - -func (x *JwtAuthentication) GetRequirementMap() map[string]*JwtRequirement { - if x != nil { - return x.RequirementMap - } - return nil -} - -// Specify per-route config. -type PerRouteConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to RequirementSpecifier: - // *PerRouteConfig_Disabled - // *PerRouteConfig_RequirementName - RequirementSpecifier isPerRouteConfig_RequirementSpecifier `protobuf_oneof:"requirement_specifier"` -} - -func (x *PerRouteConfig) Reset() { - *x = PerRouteConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PerRouteConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PerRouteConfig) ProtoMessage() {} - -func (x *PerRouteConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PerRouteConfig.ProtoReflect.Descriptor instead. -func (*PerRouteConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP(), []int{10} -} - -func (m *PerRouteConfig) GetRequirementSpecifier() isPerRouteConfig_RequirementSpecifier { - if m != nil { - return m.RequirementSpecifier - } - return nil -} - -func (x *PerRouteConfig) GetDisabled() bool { - if x, ok := x.GetRequirementSpecifier().(*PerRouteConfig_Disabled); ok { - return x.Disabled - } - return false -} - -func (x *PerRouteConfig) GetRequirementName() string { - if x, ok := x.GetRequirementSpecifier().(*PerRouteConfig_RequirementName); ok { - return x.RequirementName - } - return "" -} - -type isPerRouteConfig_RequirementSpecifier interface { - isPerRouteConfig_RequirementSpecifier() -} - -type PerRouteConfig_Disabled struct { - // Disable Jwt Authentication for this route. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` -} - -type PerRouteConfig_RequirementName struct { - // Use requirement_name to specify a JwtRequirement. - // This requirement_name MUST be specified at the - // :ref:`requirement_map ` - // in `JwtAuthentication`. If no, the requests using this route will be rejected with 403. - RequirementName string `protobuf:"bytes,2,opt,name=requirement_name,json=requirementName,proto3,oneof"` -} - -func (*PerRouteConfig_Disabled) isPerRouteConfig_RequirementSpecifier() {} - -func (*PerRouteConfig_RequirementName) isPerRouteConfig_RequirementSpecifier() {} - -var File_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDesc = []byte{ - 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, - 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, - 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x05, 0x0a, 0x0b, 0x4a, - 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x5e, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, - 0x6b, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, 0x6b, 0x73, - 0x12, 0x46, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x77, 0x61, - 0x72, 0x64, 0x12, 0x5d, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x16, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, - 0x14, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x11, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, - 0x6b, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x10, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x6b, 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x42, 0x1c, 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0xcb, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, 0x6b, 0x73, 0x12, - 0x3d, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x12, 0x40, - 0x0a, 0x0e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, 0x6b, 0x73, 0x22, 0x9b, - 0x01, 0x0a, 0x09, 0x4a, 0x77, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, - 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2e, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, - 0x01, 0x00, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, - 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, - 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xa3, 0x01, 0x0a, - 0x15, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, 0x75, 0x64, - 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, - 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, - 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, - 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, - 0x65, 0x73, 0x22, 0xf3, 0x04, 0x0a, 0x0e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x7e, 0x0a, 0x16, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x75, 0x64, - 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, - 0x6e, 0x63, 0x65, 0x73, 0x48, 0x00, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x41, 0x6e, 0x64, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x0c, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x73, 0x41, 0x6e, 0x79, 0x12, 0x6b, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, - 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, - 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x4f, 0x0a, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, - 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4f, 0x72, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xcd, 0x01, 0x0a, 0x14, 0x4a, 0x77, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x6d, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x15, 0x4a, 0x77, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x6d, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, - 0x02, 0x08, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xc5, 0x02, 0x0a, 0x0f, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x46, - 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5d, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, - 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x12, - 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x22, 0xdb, 0x02, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x6a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x1a, - 0x7c, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x55, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x41, 0x9a, - 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, - 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, - 0x22, 0xc7, 0x06, 0x0a, 0x11, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6f, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x6e, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x10, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x32, 0x0a, 0x15, 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x72, 0x73, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x7f, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, - 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x7a, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x82, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x55, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xcd, 0x01, 0x0a, 0x0e, 0x50, - 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, - 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, - 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, - 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1c, 0x0a, 0x15, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x56, 0x0a, 0x3d, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescData = file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDesc -) - -func file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDescData -} - -var file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_goTypes = []interface{}{ - (*JwtProvider)(nil), // 0: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtProvider - (*RemoteJwks)(nil), // 1: envoy.extensions.filters.http.jwt_authn.v4alpha.RemoteJwks - (*JwtHeader)(nil), // 2: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtHeader - (*ProviderWithAudiences)(nil), // 3: envoy.extensions.filters.http.jwt_authn.v4alpha.ProviderWithAudiences - (*JwtRequirement)(nil), // 4: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement - (*JwtRequirementOrList)(nil), // 5: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirementOrList - (*JwtRequirementAndList)(nil), // 6: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirementAndList - (*RequirementRule)(nil), // 7: envoy.extensions.filters.http.jwt_authn.v4alpha.RequirementRule - (*FilterStateRule)(nil), // 8: envoy.extensions.filters.http.jwt_authn.v4alpha.FilterStateRule - (*JwtAuthentication)(nil), // 9: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication - (*PerRouteConfig)(nil), // 10: envoy.extensions.filters.http.jwt_authn.v4alpha.PerRouteConfig - nil, // 11: envoy.extensions.filters.http.jwt_authn.v4alpha.FilterStateRule.RequiresEntry - nil, // 12: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.ProvidersEntry - nil, // 13: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.RequirementMapEntry - (*v4alpha.DataSource)(nil), // 14: envoy.config.core.v4alpha.DataSource - (*v4alpha.HttpUri)(nil), // 15: envoy.config.core.v4alpha.HttpUri - (*duration.Duration)(nil), // 16: google.protobuf.Duration - (*emptypb.Empty)(nil), // 17: google.protobuf.Empty - (*v4alpha1.RouteMatch)(nil), // 18: envoy.config.route.v4alpha.RouteMatch -} -var file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtProvider.remote_jwks:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.RemoteJwks - 14, // 1: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtProvider.local_jwks:type_name -> envoy.config.core.v4alpha.DataSource - 2, // 2: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtProvider.from_headers:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtHeader - 15, // 3: envoy.extensions.filters.http.jwt_authn.v4alpha.RemoteJwks.http_uri:type_name -> envoy.config.core.v4alpha.HttpUri - 16, // 4: envoy.extensions.filters.http.jwt_authn.v4alpha.RemoteJwks.cache_duration:type_name -> google.protobuf.Duration - 3, // 5: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement.provider_and_audiences:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.ProviderWithAudiences - 5, // 6: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement.requires_any:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirementOrList - 6, // 7: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement.requires_all:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirementAndList - 17, // 8: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement.allow_missing_or_failed:type_name -> google.protobuf.Empty - 17, // 9: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement.allow_missing:type_name -> google.protobuf.Empty - 4, // 10: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirementOrList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement - 4, // 11: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirementAndList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement - 18, // 12: envoy.extensions.filters.http.jwt_authn.v4alpha.RequirementRule.match:type_name -> envoy.config.route.v4alpha.RouteMatch - 4, // 13: envoy.extensions.filters.http.jwt_authn.v4alpha.RequirementRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement - 11, // 14: envoy.extensions.filters.http.jwt_authn.v4alpha.FilterStateRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.FilterStateRule.RequiresEntry - 12, // 15: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.providers:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.ProvidersEntry - 7, // 16: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.rules:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.RequirementRule - 8, // 17: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.filter_state_rules:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.FilterStateRule - 13, // 18: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.requirement_map:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.RequirementMapEntry - 4, // 19: envoy.extensions.filters.http.jwt_authn.v4alpha.FilterStateRule.RequiresEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement - 0, // 20: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.ProvidersEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtProvider - 4, // 21: envoy.extensions.filters.http.jwt_authn.v4alpha.JwtAuthentication.RequirementMapEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v4alpha.JwtRequirement - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_init() } -func file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_init() { - if File_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoteJwks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProviderWithAudiences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtRequirementOrList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtRequirementAndList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequirementRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterStateRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JwtAuthentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PerRouteConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*JwtProvider_RemoteJwks)(nil), - (*JwtProvider_LocalJwks)(nil), - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*JwtRequirement_ProviderName)(nil), - (*JwtRequirement_ProviderAndAudiences)(nil), - (*JwtRequirement_RequiresAny)(nil), - (*JwtRequirement_RequiresAll)(nil), - (*JwtRequirement_AllowMissingOrFailed)(nil), - (*JwtRequirement_AllowMissing)(nil), - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*RequirementRule_Requires)(nil), - (*RequirementRule_RequirementName)(nil), - } - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*PerRouteConfig_Disabled)(nil), - (*PerRouteConfig_RequirementName)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto = out.File - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_rawDesc = nil - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_goTypes = nil - file_envoy_extensions_filters_http_jwt_authn_v4alpha_config_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.pb.validate.go b/pkg/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.pb.validate.go deleted file mode 100644 index 7b67e998cd..0000000000 --- a/pkg/api/envoy/extensions/filters/http/jwt_authn/v4alpha/config.pb.validate.go +++ /dev/null @@ -1,1134 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/jwt_authn/v4alpha/config.proto - -package envoy_extensions_filters_http_jwt_authn_v4alpha - -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{} -) - -// Validate checks the field values on JwtProvider with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *JwtProvider) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Issuer - - // no validation rules for Forward - - for idx, item := range m.GetFromHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtProviderValidationError{ - field: fmt.Sprintf("FromHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if !_JwtProvider_ForwardPayloadHeader_Pattern.MatchString(m.GetForwardPayloadHeader()) { - return JwtProviderValidationError{ - field: "ForwardPayloadHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - // no validation rules for PayloadInMetadata - - // no validation rules for ClockSkewSeconds - - switch m.JwksSourceSpecifier.(type) { - - case *JwtProvider_RemoteJwks: - - if v, ok := interface{}(m.GetRemoteJwks()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtProviderValidationError{ - field: "RemoteJwks", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *JwtProvider_LocalJwks: - - if v, ok := interface{}(m.GetLocalJwks()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtProviderValidationError{ - field: "LocalJwks", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return JwtProviderValidationError{ - field: "JwksSourceSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// JwtProviderValidationError is the validation error returned by -// JwtProvider.Validate if the designated constraints aren't met. -type JwtProviderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e JwtProviderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e JwtProviderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e JwtProviderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e JwtProviderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e JwtProviderValidationError) ErrorName() string { return "JwtProviderValidationError" } - -// Error satisfies the builtin error interface -func (e JwtProviderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sJwtProvider.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = JwtProviderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = JwtProviderValidationError{} - -var _JwtProvider_ForwardPayloadHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RemoteJwks with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *RemoteJwks) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RemoteJwksValidationError{ - field: "HttpUri", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetCacheDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RemoteJwksValidationError{ - field: "CacheDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RemoteJwksValidationError is the validation error returned by -// RemoteJwks.Validate if the designated constraints aren't met. -type RemoteJwksValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RemoteJwksValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RemoteJwksValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RemoteJwksValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RemoteJwksValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RemoteJwksValidationError) ErrorName() string { return "RemoteJwksValidationError" } - -// Error satisfies the builtin error interface -func (e RemoteJwksValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRemoteJwks.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RemoteJwksValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RemoteJwksValidationError{} - -// Validate checks the field values on JwtHeader with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *JwtHeader) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return JwtHeaderValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if !_JwtHeader_Name_Pattern.MatchString(m.GetName()) { - return JwtHeaderValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - if !_JwtHeader_ValuePrefix_Pattern.MatchString(m.GetValuePrefix()) { - return JwtHeaderValidationError{ - field: "ValuePrefix", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - return nil -} - -// JwtHeaderValidationError is the validation error returned by -// JwtHeader.Validate if the designated constraints aren't met. -type JwtHeaderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e JwtHeaderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e JwtHeaderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e JwtHeaderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e JwtHeaderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e JwtHeaderValidationError) ErrorName() string { return "JwtHeaderValidationError" } - -// Error satisfies the builtin error interface -func (e JwtHeaderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sJwtHeader.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = JwtHeaderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = JwtHeaderValidationError{} - -var _JwtHeader_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _JwtHeader_ValuePrefix_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on ProviderWithAudiences with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ProviderWithAudiences) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ProviderName - - return nil -} - -// ProviderWithAudiencesValidationError is the validation error returned by -// ProviderWithAudiences.Validate if the designated constraints aren't met. -type ProviderWithAudiencesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ProviderWithAudiencesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ProviderWithAudiencesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ProviderWithAudiencesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ProviderWithAudiencesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ProviderWithAudiencesValidationError) ErrorName() string { - return "ProviderWithAudiencesValidationError" -} - -// Error satisfies the builtin error interface -func (e ProviderWithAudiencesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sProviderWithAudiences.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ProviderWithAudiencesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ProviderWithAudiencesValidationError{} - -// Validate checks the field values on JwtRequirement with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *JwtRequirement) Validate() error { - if m == nil { - return nil - } - - switch m.RequiresType.(type) { - - case *JwtRequirement_ProviderName: - // no validation rules for ProviderName - - case *JwtRequirement_ProviderAndAudiences: - - if v, ok := interface{}(m.GetProviderAndAudiences()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtRequirementValidationError{ - field: "ProviderAndAudiences", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *JwtRequirement_RequiresAny: - - if v, ok := interface{}(m.GetRequiresAny()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtRequirementValidationError{ - field: "RequiresAny", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *JwtRequirement_RequiresAll: - - if v, ok := interface{}(m.GetRequiresAll()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtRequirementValidationError{ - field: "RequiresAll", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *JwtRequirement_AllowMissingOrFailed: - - if v, ok := interface{}(m.GetAllowMissingOrFailed()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtRequirementValidationError{ - field: "AllowMissingOrFailed", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *JwtRequirement_AllowMissing: - - if v, ok := interface{}(m.GetAllowMissing()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtRequirementValidationError{ - field: "AllowMissing", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// JwtRequirementValidationError is the validation error returned by -// JwtRequirement.Validate if the designated constraints aren't met. -type JwtRequirementValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e JwtRequirementValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e JwtRequirementValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e JwtRequirementValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e JwtRequirementValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e JwtRequirementValidationError) ErrorName() string { return "JwtRequirementValidationError" } - -// Error satisfies the builtin error interface -func (e JwtRequirementValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sJwtRequirement.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = JwtRequirementValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = JwtRequirementValidationError{} - -// Validate checks the field values on JwtRequirementOrList with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *JwtRequirementOrList) Validate() error { - if m == nil { - return nil - } - - if len(m.GetRequirements()) < 2 { - return JwtRequirementOrListValidationError{ - field: "Requirements", - reason: "value must contain at least 2 item(s)", - } - } - - for idx, item := range m.GetRequirements() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtRequirementOrListValidationError{ - field: fmt.Sprintf("Requirements[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// JwtRequirementOrListValidationError is the validation error returned by -// JwtRequirementOrList.Validate if the designated constraints aren't met. -type JwtRequirementOrListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e JwtRequirementOrListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e JwtRequirementOrListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e JwtRequirementOrListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e JwtRequirementOrListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e JwtRequirementOrListValidationError) ErrorName() string { - return "JwtRequirementOrListValidationError" -} - -// Error satisfies the builtin error interface -func (e JwtRequirementOrListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sJwtRequirementOrList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = JwtRequirementOrListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = JwtRequirementOrListValidationError{} - -// Validate checks the field values on JwtRequirementAndList with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *JwtRequirementAndList) Validate() error { - if m == nil { - return nil - } - - if len(m.GetRequirements()) < 2 { - return JwtRequirementAndListValidationError{ - field: "Requirements", - reason: "value must contain at least 2 item(s)", - } - } - - for idx, item := range m.GetRequirements() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtRequirementAndListValidationError{ - field: fmt.Sprintf("Requirements[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// JwtRequirementAndListValidationError is the validation error returned by -// JwtRequirementAndList.Validate if the designated constraints aren't met. -type JwtRequirementAndListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e JwtRequirementAndListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e JwtRequirementAndListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e JwtRequirementAndListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e JwtRequirementAndListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e JwtRequirementAndListValidationError) ErrorName() string { - return "JwtRequirementAndListValidationError" -} - -// Error satisfies the builtin error interface -func (e JwtRequirementAndListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sJwtRequirementAndList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = JwtRequirementAndListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = JwtRequirementAndListValidationError{} - -// Validate checks the field values on RequirementRule with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *RequirementRule) Validate() error { - if m == nil { - return nil - } - - if m.GetMatch() == nil { - return RequirementRuleValidationError{ - field: "Match", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RequirementRuleValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.RequirementType.(type) { - - case *RequirementRule_Requires: - - if v, ok := interface{}(m.GetRequires()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RequirementRuleValidationError{ - field: "Requires", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RequirementRule_RequirementName: - - if utf8.RuneCountInString(m.GetRequirementName()) < 1 { - return RequirementRuleValidationError{ - field: "RequirementName", - reason: "value length must be at least 1 runes", - } - } - - } - - return nil -} - -// RequirementRuleValidationError is the validation error returned by -// RequirementRule.Validate if the designated constraints aren't met. -type RequirementRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RequirementRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RequirementRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RequirementRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RequirementRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RequirementRuleValidationError) ErrorName() string { return "RequirementRuleValidationError" } - -// Error satisfies the builtin error interface -func (e RequirementRuleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRequirementRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RequirementRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RequirementRuleValidationError{} - -// Validate checks the field values on FilterStateRule with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *FilterStateRule) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return FilterStateRuleValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - for key, val := range m.GetRequires() { - _ = val - - // no validation rules for Requires[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterStateRuleValidationError{ - field: fmt.Sprintf("Requires[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// FilterStateRuleValidationError is the validation error returned by -// FilterStateRule.Validate if the designated constraints aren't met. -type FilterStateRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterStateRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterStateRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterStateRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterStateRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterStateRuleValidationError) ErrorName() string { return "FilterStateRuleValidationError" } - -// Error satisfies the builtin error interface -func (e FilterStateRuleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterStateRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterStateRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterStateRuleValidationError{} - -// Validate checks the field values on JwtAuthentication with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *JwtAuthentication) Validate() error { - if m == nil { - return nil - } - - for key, val := range m.GetProviders() { - _ = val - - // no validation rules for Providers[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtAuthenticationValidationError{ - field: fmt.Sprintf("Providers[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRules() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtAuthenticationValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetFilterStateRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtAuthenticationValidationError{ - field: "FilterStateRules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for BypassCorsPreflight - - for key, val := range m.GetRequirementMap() { - _ = val - - // no validation rules for RequirementMap[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return JwtAuthenticationValidationError{ - field: fmt.Sprintf("RequirementMap[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// JwtAuthenticationValidationError is the validation error returned by -// JwtAuthentication.Validate if the designated constraints aren't met. -type JwtAuthenticationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e JwtAuthenticationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e JwtAuthenticationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e JwtAuthenticationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e JwtAuthenticationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e JwtAuthenticationValidationError) ErrorName() string { - return "JwtAuthenticationValidationError" -} - -// Error satisfies the builtin error interface -func (e JwtAuthenticationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sJwtAuthentication.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = JwtAuthenticationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = JwtAuthenticationValidationError{} - -// Validate checks the field values on PerRouteConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *PerRouteConfig) Validate() error { - if m == nil { - return nil - } - - switch m.RequirementSpecifier.(type) { - - case *PerRouteConfig_Disabled: - - if m.GetDisabled() != true { - return PerRouteConfigValidationError{ - field: "Disabled", - reason: "value must equal true", - } - } - - case *PerRouteConfig_RequirementName: - - if utf8.RuneCountInString(m.GetRequirementName()) < 1 { - return PerRouteConfigValidationError{ - field: "RequirementName", - reason: "value length must be at least 1 runes", - } - } - - default: - return PerRouteConfigValidationError{ - field: "RequirementSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// PerRouteConfigValidationError is the validation error returned by -// PerRouteConfig.Validate if the designated constraints aren't met. -type PerRouteConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PerRouteConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PerRouteConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PerRouteConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PerRouteConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PerRouteConfigValidationError) ErrorName() string { return "PerRouteConfigValidationError" } - -// Error satisfies the builtin error interface -func (e PerRouteConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPerRouteConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PerRouteConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PerRouteConfigValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.go b/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.go index 0e4aa142a0..730f347c30 100644 --- a/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.go +++ b/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/kill_request/v3/kill_request.proto -package envoy_extensions_filters_http_kill_request_v3 +package kill_requestv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - proto "github.com/golang/protobuf/proto" + _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,9 +23,53 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// On which direction should the filter check for the `kill_request_header`. +// Default to `REQUEST` if unspecified. +type KillRequest_Direction int32 + +const ( + KillRequest_REQUEST KillRequest_Direction = 0 + KillRequest_RESPONSE KillRequest_Direction = 1 +) + +// Enum value maps for KillRequest_Direction. +var ( + KillRequest_Direction_name = map[int32]string{ + 0: "REQUEST", + 1: "RESPONSE", + } + KillRequest_Direction_value = map[string]int32{ + "REQUEST": 0, + "RESPONSE": 1, + } +) + +func (x KillRequest_Direction) Enum() *KillRequest_Direction { + p := new(KillRequest_Direction) + *p = x + return p +} + +func (x KillRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KillRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes[0].Descriptor() +} + +func (KillRequest_Direction) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes[0] +} + +func (x KillRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KillRequest_Direction.Descriptor instead. +func (KillRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescGZIP(), []int{0, 0} +} // Configuration for KillRequest filter. type KillRequest struct { @@ -36,7 +80,8 @@ type KillRequest struct { // The probability that a Kill request will be triggered. Probability *v3.FractionalPercent `protobuf:"bytes,1,opt,name=probability,proto3" json:"probability,omitempty"` // The name of the kill request header. If this field is not empty, it will override the :ref:`default header ` name. Otherwise the default header name will be used. - KillRequestHeader string `protobuf:"bytes,2,opt,name=kill_request_header,json=killRequestHeader,proto3" json:"kill_request_header,omitempty"` + KillRequestHeader string `protobuf:"bytes,2,opt,name=kill_request_header,json=killRequestHeader,proto3" json:"kill_request_header,omitempty"` + Direction KillRequest_Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=envoy.extensions.filters.http.kill_request.v3.KillRequest_Direction" json:"direction,omitempty"` } func (x *KillRequest) Reset() { @@ -85,6 +130,13 @@ func (x *KillRequest) GetKillRequestHeader() string { return "" } +func (x *KillRequest) GetDirection() KillRequest_Direction { + if x != nil { + return x.Direction + } + return KillRequest_REQUEST +} + var File_envoy_extensions_filters_http_kill_request_v3_kill_request_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDesc = []byte{ @@ -98,24 +150,40 @@ var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDes 0x33, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x42, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x42, 0x59, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x13, 0x6b, 0x69, + 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, + 0x02, 0xc8, 0x01, 0x00, 0x52, 0x11, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x6c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x26, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x01, 0x42, 0xbe, 0x01, + 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6b, 0x69, + 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4b, + 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -130,18 +198,21 @@ func file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDe return file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescData } +var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_goTypes = []interface{}{ - (*KillRequest)(nil), // 0: envoy.extensions.filters.http.kill_request.v3.KillRequest - (*v3.FractionalPercent)(nil), // 1: envoy.type.v3.FractionalPercent + (KillRequest_Direction)(0), // 0: envoy.extensions.filters.http.kill_request.v3.KillRequest.Direction + (*KillRequest)(nil), // 1: envoy.extensions.filters.http.kill_request.v3.KillRequest + (*v3.FractionalPercent)(nil), // 2: envoy.type.v3.FractionalPercent } var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.http.kill_request.v3.KillRequest.probability:type_name -> envoy.type.v3.FractionalPercent - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: envoy.extensions.filters.http.kill_request.v3.KillRequest.probability:type_name -> envoy.type.v3.FractionalPercent + 0, // 1: envoy.extensions.filters.http.kill_request.v3.KillRequest.direction:type_name -> envoy.extensions.filters.http.kill_request.v3.KillRequest.Direction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_init() } @@ -168,13 +239,14 @@ func file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_init( File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_goTypes, DependencyIndexes: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes, MessageInfos: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_msgTypes, }.Build() File_envoy_extensions_filters_http_kill_request_v3_kill_request_proto = out.File diff --git a/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.validate.go b/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.validate.go index 987d7cb055..393929bb9d 100644 --- a/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/kill_request/v3/kill_request.proto -package envoy_extensions_filters_http_kill_request_v3 +package kill_requestv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on KillRequest with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *KillRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on KillRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in KillRequestMultiError, or +// nil if none found. +func (m *KillRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *KillRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetProbability()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetProbability()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, KillRequestValidationError{ + field: "Probability", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, KillRequestValidationError{ + field: "Probability", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProbability()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return KillRequestValidationError{ field: "Probability", @@ -51,11 +86,51 @@ func (m *KillRequest) Validate() error { } } - // no validation rules for KillRequestHeader + if !_KillRequest_KillRequestHeader_Pattern.MatchString(m.GetKillRequestHeader()) { + err := KillRequestValidationError{ + field: "KillRequestHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := KillRequest_Direction_name[int32(m.GetDirection())]; !ok { + err := KillRequestValidationError{ + field: "Direction", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return KillRequestMultiError(errors) + } return nil } +// KillRequestMultiError is an error wrapping multiple validation errors +// returned by KillRequest.ValidateAll() if the designated constraints aren't met. +type KillRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m KillRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m KillRequestMultiError) AllErrors() []error { return m } + // KillRequestValidationError is the validation error returned by // KillRequest.Validate if the designated constraints aren't met. type KillRequestValidationError struct { @@ -109,3 +184,5 @@ var _ interface { Cause() error ErrorName() string } = KillRequestValidationError{} + +var _KillRequest_KillRequestHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.go b/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.go index 41d587d03d..129f66aca5 100644 --- a/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.go +++ b/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto -package envoy_extensions_filters_http_local_ratelimit_v3 +package local_ratelimitv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/ratelimit/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,11 +25,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 7] +// [#next-free-field: 13] type LocalRateLimit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -59,7 +55,7 @@ type LocalRateLimit struct { // // .. note:: // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive + // ` must be >= 50ms to avoid too aggressive // refills. TokenBucket *v3.TokenBucket `protobuf:"bytes,3,opt,name=token_bucket,json=tokenBucket,proto3" json:"token_bucket,omitempty"` // If set, this will enable -- but not necessarily enforce -- the rate limit for the given @@ -72,9 +68,47 @@ type LocalRateLimit struct { // // Defaults to 0% of requests for safety. FilterEnforced *v31.RuntimeFractionalPercent `protobuf:"bytes,5,opt,name=filter_enforced,json=filterEnforced,proto3" json:"filter_enforced,omitempty"` + // Specifies a list of HTTP headers that should be added to each request that + // has been rate limited and is also forwarded upstream. This can only occur when the + // filter is enabled but not enforced. + RequestHeadersToAddWhenNotEnforced []*v31.HeaderValueOption `protobuf:"bytes,10,rep,name=request_headers_to_add_when_not_enforced,json=requestHeadersToAddWhenNotEnforced,proto3" json:"request_headers_to_add_when_not_enforced,omitempty"` // Specifies a list of HTTP headers that should be added to each response for requests that - // have been rate limited. + // have been rate limited. This occurs when the filter is either enabled or fully enforced. ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,6,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + // The rate limit descriptor list to use in the local rate limit to override + // on. The rate limit descriptor is selected by the first full match from the + // request descriptors. + // + // Example on how to use ::ref:`this ` + // + // .. note:: + // + // In the current implementation the descriptor's token bucket :ref:`fill_interval + // ` must be a multiple + // global :ref:`token bucket's` fill interval. + // + // The descriptors must match verbatim for rate limiting to apply. There is no partial + // match by a subset of descriptor entries in the current implementation. + Descriptors []*v32.LocalRateLimitDescriptor `protobuf:"bytes,8,rep,name=descriptors,proto3" json:"descriptors,omitempty"` + // Specifies the rate limit configurations to be applied with the same + // stage number. If not set, the default stage number is 0. + // + // .. note:: + // + // The filter supports a range of 0 - 10 inclusively for stage numbers. + Stage uint32 `protobuf:"varint,9,opt,name=stage,proto3" json:"stage,omitempty"` + // Specifies the scope of the rate limiter's token bucket. + // If set to false, the token bucket is shared across all worker threads, + // thus the rate limits are applied per Envoy process. + // If set to true, a token bucket is allocated for each connection. + // Thus the rate limits are applied per connection thereby allowing + // one to rate limit requests on a per connection basis. + // If unspecified, the default value is false. + LocalRateLimitPerDownstreamConnection bool `protobuf:"varint,11,opt,name=local_rate_limit_per_downstream_connection,json=localRateLimitPerDownstreamConnection,proto3" json:"local_rate_limit_per_downstream_connection,omitempty"` + // Defines the standard version to use for X-RateLimit headers emitted by the filter. + // + // Disabled by default. + EnableXRatelimitHeaders v32.XRateLimitHeadersRFCVersion `protobuf:"varint,12,opt,name=enable_x_ratelimit_headers,json=enableXRatelimitHeaders,proto3,enum=envoy.extensions.common.ratelimit.v3.XRateLimitHeadersRFCVersion" json:"enable_x_ratelimit_headers,omitempty"` } func (x *LocalRateLimit) Reset() { @@ -144,6 +178,13 @@ func (x *LocalRateLimit) GetFilterEnforced() *v31.RuntimeFractionalPercent { return nil } +func (x *LocalRateLimit) GetRequestHeadersToAddWhenNotEnforced() []*v31.HeaderValueOption { + if x != nil { + return x.RequestHeadersToAddWhenNotEnforced + } + return nil +} + func (x *LocalRateLimit) GetResponseHeadersToAdd() []*v31.HeaderValueOption { if x != nil { return x.ResponseHeadersToAdd @@ -151,6 +192,34 @@ func (x *LocalRateLimit) GetResponseHeadersToAdd() []*v31.HeaderValueOption { return nil } +func (x *LocalRateLimit) GetDescriptors() []*v32.LocalRateLimitDescriptor { + if x != nil { + return x.Descriptors + } + return nil +} + +func (x *LocalRateLimit) GetStage() uint32 { + if x != nil { + return x.Stage + } + return 0 +} + +func (x *LocalRateLimit) GetLocalRateLimitPerDownstreamConnection() bool { + if x != nil { + return x.LocalRateLimitPerDownstreamConnection + } + return false +} + +func (x *LocalRateLimit) GetEnableXRatelimitHeaders() v32.XRateLimitHeadersRFCVersion { + if x != nil { + return x.EnableXRatelimitHeaders + } + return v32.XRateLimitHeadersRFCVersion(0) +} + var File_envoy_extensions_filters_http_local_ratelimit_v3_local_rate_limit_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_http_local_ratelimit_v3_local_rate_limit_proto_rawDesc = []byte{ @@ -163,51 +232,90 @@ var file_envoy_extensions_filters_http_local_ratelimit_v3_local_rate_limit_proto 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x03, 0x0a, 0x0e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, - 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0b, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x55, 0x0a, 0x0e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x57, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x0a, 0x52, 0x14, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x41, 0x64, 0x64, 0x42, 0x5f, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, + 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, + 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x07, + 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, + 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x55, 0x0a, 0x0e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x57, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12, 0x87, 0x01, 0x0a, + 0x28, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x77, 0x68, 0x65, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x10, 0x0a, 0x52, 0x22, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x57, 0x68, 0x65, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, + 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x0a, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, + 0x12, 0x60, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x12, 0x59, 0x0a, 0x2a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x25, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x88, 0x01, 0x0a, + 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x17, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x58, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0xca, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4c, 0x6f, 0x63, 0x61, + 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -230,18 +338,23 @@ var file_envoy_extensions_filters_http_local_ratelimit_v3_local_rate_limit_proto (*v3.TokenBucket)(nil), // 2: envoy.type.v3.TokenBucket (*v31.RuntimeFractionalPercent)(nil), // 3: envoy.config.core.v3.RuntimeFractionalPercent (*v31.HeaderValueOption)(nil), // 4: envoy.config.core.v3.HeaderValueOption + (*v32.LocalRateLimitDescriptor)(nil), // 5: envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor + (v32.XRateLimitHeadersRFCVersion)(0), // 6: envoy.extensions.common.ratelimit.v3.XRateLimitHeadersRFCVersion } var file_envoy_extensions_filters_http_local_ratelimit_v3_local_rate_limit_proto_depIdxs = []int32{ 1, // 0: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.status:type_name -> envoy.type.v3.HttpStatus 2, // 1: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.token_bucket:type_name -> envoy.type.v3.TokenBucket 3, // 2: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.filter_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent 3, // 3: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.filter_enforced:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 4, // 4: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 4, // 4: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.request_headers_to_add_when_not_enforced:type_name -> envoy.config.core.v3.HeaderValueOption + 4, // 5: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 5, // 6: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.descriptors:type_name -> envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor + 6, // 7: envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit.enable_x_ratelimit_headers:type_name -> envoy.extensions.common.ratelimit.v3.XRateLimitHeadersRFCVersion + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_http_local_ratelimit_v3_local_rate_limit_proto_init() } diff --git a/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.validate.go index 810405e077..239bb34ebc 100644 --- a/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto -package envoy_extensions_filters_http_local_ratelimit_v3 +package local_ratelimitv3 import ( "bytes" @@ -11,11 +11,14 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/ratelimit/v3" ) // ensure the imports are used @@ -30,25 +33,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.XRateLimitHeadersRFCVersion(0) ) // Validate checks the field values on LocalRateLimit with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LocalRateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalRateLimit with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LocalRateLimitMultiError, +// or nil if none found. +func (m *LocalRateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalRateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return LocalRateLimitValidationError{ + err := LocalRateLimitValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "Status", @@ -58,7 +101,26 @@ func (m *LocalRateLimit) Validate() error { } } - if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTokenBucket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "TokenBucket", @@ -68,7 +130,26 @@ func (m *LocalRateLimit) Validate() error { } } - if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "FilterEnabled", @@ -78,7 +159,26 @@ func (m *LocalRateLimit) Validate() error { } } - if v, ok := interface{}(m.GetFilterEnforced()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnforced()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "FilterEnforced", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "FilterEnforced", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnforced()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "FilterEnforced", @@ -88,17 +188,85 @@ func (m *LocalRateLimit) Validate() error { } } + if len(m.GetRequestHeadersToAddWhenNotEnforced()) > 10 { + err := LocalRateLimitValidationError{ + field: "RequestHeadersToAddWhenNotEnforced", + reason: "value must contain no more than 10 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRequestHeadersToAddWhenNotEnforced() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: fmt.Sprintf("RequestHeadersToAddWhenNotEnforced[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: fmt.Sprintf("RequestHeadersToAddWhenNotEnforced[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalRateLimitValidationError{ + field: fmt.Sprintf("RequestHeadersToAddWhenNotEnforced[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(m.GetResponseHeadersToAdd()) > 10 { - return LocalRateLimitValidationError{ + err := LocalRateLimitValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 10 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -110,9 +278,88 @@ func (m *LocalRateLimit) Validate() error { } + for idx, item := range m.GetDescriptors() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalRateLimitValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.GetStage() > 10 { + err := LocalRateLimitValidationError{ + field: "Stage", + reason: "value must be less than or equal to 10", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for LocalRateLimitPerDownstreamConnection + + if _, ok := v3.XRateLimitHeadersRFCVersion_name[int32(m.GetEnableXRatelimitHeaders())]; !ok { + err := LocalRateLimitValidationError{ + field: "EnableXRatelimitHeaders", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return LocalRateLimitMultiError(errors) + } + return nil } +// LocalRateLimitMultiError is an error wrapping multiple validation errors +// returned by LocalRateLimit.ValidateAll() if the designated constraints +// aren't met. +type LocalRateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalRateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalRateLimitMultiError) AllErrors() []error { return m } + // LocalRateLimitValidationError is the validation error returned by // LocalRateLimit.Validate if the designated constraints aren't met. type LocalRateLimitValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.go b/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.go index 72efb66853..7ba7164327 100644 --- a/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.go +++ b/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/lua/v3/lua.proto -package envoy_extensions_filters_http_lua_v3 +package luav3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Lua struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -247,12 +242,18 @@ var file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDesc = []byte{ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x0f, 0x0a, 0x08, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x48, 0x0a, - 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x75, 0x61, - 0x2e, 0x76, 0x33, 0x42, 0x08, 0x4c, 0x75, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x9b, 0x01, + 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x75, + 0x61, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x4c, 0x75, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6c, 0x75, 0x61, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x75, + 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.validate.go b/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.validate.go index f173ae16e0..3e475cb1dc 100644 --- a/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/lua/v3/lua.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/lua/v3/lua.proto -package envoy_extensions_filters_http_lua_v3 +package luav3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,43 +31,111 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Lua with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Lua) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Lua with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in LuaMultiError, or nil if none found. +func (m *Lua) ValidateAll() error { + return m.validate(true) +} + +func (m *Lua) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetInlineCode()) < 1 { - return LuaValidationError{ + err := LuaValidationError{ field: "InlineCode", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - for key, val := range m.GetSourceCodes() { - _ = val - - // no validation rules for SourceCodes[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LuaValidationError{ - field: fmt.Sprintf("SourceCodes[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]string, len(m.GetSourceCodes())) + i := 0 + for key := range m.GetSourceCodes() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetSourceCodes()[key] + _ = val + + // no validation rules for SourceCodes[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LuaValidationError{ + field: fmt.Sprintf("SourceCodes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LuaValidationError{ + field: fmt.Sprintf("SourceCodes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LuaValidationError{ + field: fmt.Sprintf("SourceCodes[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return LuaMultiError(errors) } return nil } +// LuaMultiError is an error wrapping multiple validation errors returned by +// Lua.ValidateAll() if the designated constraints aren't met. +type LuaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LuaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LuaMultiError) AllErrors() []error { return m } + // LuaValidationError is the validation error returned by Lua.Validate if the // designated constraints aren't met. type LuaValidationError struct { @@ -122,36 +191,77 @@ var _ interface { } = LuaValidationError{} // Validate checks the field values on LuaPerRoute with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LuaPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LuaPerRoute with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LuaPerRouteMultiError, or +// nil if none found. +func (m *LuaPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *LuaPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Override.(type) { case *LuaPerRoute_Disabled: if m.GetDisabled() != true { - return LuaPerRouteValidationError{ + err := LuaPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *LuaPerRoute_Name: if utf8.RuneCountInString(m.GetName()) < 1 { - return LuaPerRouteValidationError{ + err := LuaPerRouteValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *LuaPerRoute_SourceCode: - if v, ok := interface{}(m.GetSourceCode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LuaPerRouteValidationError{ + field: "SourceCode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LuaPerRouteValidationError{ + field: "SourceCode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceCode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LuaPerRouteValidationError{ field: "SourceCode", @@ -162,16 +272,40 @@ func (m *LuaPerRoute) Validate() error { } default: - return LuaPerRouteValidationError{ + err := LuaPerRouteValidationError{ field: "Override", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return LuaPerRouteMultiError(errors) + } + return nil } +// LuaPerRouteMultiError is an error wrapping multiple validation errors +// returned by LuaPerRoute.ValidateAll() if the designated constraints aren't met. +type LuaPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LuaPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LuaPerRouteMultiError) AllErrors() []error { return m } + // LuaPerRouteValidationError is the validation error returned by // LuaPerRoute.Validate if the designated constraints aren't met. type LuaPerRouteValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/oauth2/v3/oauth.pb.go b/pkg/api/envoy/extensions/filters/http/oauth2/v3/oauth.pb.go new file mode 100644 index 0000000000..1d4414d974 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/oauth2/v3/oauth.pb.go @@ -0,0 +1,619 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/oauth2/v3/oauth.proto + +package oauth2v3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" + v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OAuth2Credentials struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The client_id to be used in the authorize calls. This value will be URL encoded when sent to the OAuth server. + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // The secret used to retrieve the access token. This value will be URL encoded when sent to the OAuth server. + TokenSecret *v3.SdsSecretConfig `protobuf:"bytes,2,opt,name=token_secret,json=tokenSecret,proto3" json:"token_secret,omitempty"` + // Configures how the secret token should be created. + // + // Types that are assignable to TokenFormation: + // *OAuth2Credentials_HmacSecret + TokenFormation isOAuth2Credentials_TokenFormation `protobuf_oneof:"token_formation"` + // The cookie names used in OAuth filters flow. + CookieNames *OAuth2Credentials_CookieNames `protobuf:"bytes,4,opt,name=cookie_names,json=cookieNames,proto3" json:"cookie_names,omitempty"` +} + +func (x *OAuth2Credentials) Reset() { + *x = OAuth2Credentials{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2Credentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2Credentials) ProtoMessage() {} + +func (x *OAuth2Credentials) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2Credentials.ProtoReflect.Descriptor instead. +func (*OAuth2Credentials) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{0} +} + +func (x *OAuth2Credentials) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *OAuth2Credentials) GetTokenSecret() *v3.SdsSecretConfig { + if x != nil { + return x.TokenSecret + } + return nil +} + +func (m *OAuth2Credentials) GetTokenFormation() isOAuth2Credentials_TokenFormation { + if m != nil { + return m.TokenFormation + } + return nil +} + +func (x *OAuth2Credentials) GetHmacSecret() *v3.SdsSecretConfig { + if x, ok := x.GetTokenFormation().(*OAuth2Credentials_HmacSecret); ok { + return x.HmacSecret + } + return nil +} + +func (x *OAuth2Credentials) GetCookieNames() *OAuth2Credentials_CookieNames { + if x != nil { + return x.CookieNames + } + return nil +} + +type isOAuth2Credentials_TokenFormation interface { + isOAuth2Credentials_TokenFormation() +} + +type OAuth2Credentials_HmacSecret struct { + // If present, the secret token will be a HMAC using the provided secret. + HmacSecret *v3.SdsSecretConfig `protobuf:"bytes,3,opt,name=hmac_secret,json=hmacSecret,proto3,oneof"` +} + +func (*OAuth2Credentials_HmacSecret) isOAuth2Credentials_TokenFormation() {} + +// OAuth config +// +// [#next-free-field: 11] +type OAuth2Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Endpoint on the authorization server to retrieve the access token from. + TokenEndpoint *v31.HttpUri `protobuf:"bytes,1,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` + // The endpoint redirect to for authorization in response to unauthorized requests. + AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` + // Credentials used for OAuth. + Credentials *OAuth2Credentials `protobuf:"bytes,3,opt,name=credentials,proto3" json:"credentials,omitempty"` + // The redirect URI passed to the authorization endpoint. Supports header formatting + // tokens. For more information, including details on header value syntax, see the + // documentation on :ref:`custom request headers `. + // + // This URI should not contain any query parameters. + RedirectUri string `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + // Matching criteria used to determine whether a path appears to be the result of a redirect from the authorization server. + RedirectPathMatcher *v32.PathMatcher `protobuf:"bytes,5,opt,name=redirect_path_matcher,json=redirectPathMatcher,proto3" json:"redirect_path_matcher,omitempty"` + // The path to sign a user out, clearing their credential cookies. + SignoutPath *v32.PathMatcher `protobuf:"bytes,6,opt,name=signout_path,json=signoutPath,proto3" json:"signout_path,omitempty"` + // Forward the OAuth token as a Bearer to upstream web service. + ForwardBearerToken bool `protobuf:"varint,7,opt,name=forward_bearer_token,json=forwardBearerToken,proto3" json:"forward_bearer_token,omitempty"` + // Any request that matches any of the provided matchers will be passed through without OAuth validation. + PassThroughMatcher []*v33.HeaderMatcher `protobuf:"bytes,8,rep,name=pass_through_matcher,json=passThroughMatcher,proto3" json:"pass_through_matcher,omitempty"` + // Optional list of OAuth scopes to be claimed in the authorization request. If not specified, + // defaults to "user" scope. + // OAuth RFC https://tools.ietf.org/html/rfc6749#section-3.3 + AuthScopes []string `protobuf:"bytes,9,rep,name=auth_scopes,json=authScopes,proto3" json:"auth_scopes,omitempty"` + // Optional resource parameter for authorization request + // RFC: https://tools.ietf.org/html/rfc8707 + Resources []string `protobuf:"bytes,10,rep,name=resources,proto3" json:"resources,omitempty"` +} + +func (x *OAuth2Config) Reset() { + *x = OAuth2Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2Config) ProtoMessage() {} + +func (x *OAuth2Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2Config.ProtoReflect.Descriptor instead. +func (*OAuth2Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{1} +} + +func (x *OAuth2Config) GetTokenEndpoint() *v31.HttpUri { + if x != nil { + return x.TokenEndpoint + } + return nil +} + +func (x *OAuth2Config) GetAuthorizationEndpoint() string { + if x != nil { + return x.AuthorizationEndpoint + } + return "" +} + +func (x *OAuth2Config) GetCredentials() *OAuth2Credentials { + if x != nil { + return x.Credentials + } + return nil +} + +func (x *OAuth2Config) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +func (x *OAuth2Config) GetRedirectPathMatcher() *v32.PathMatcher { + if x != nil { + return x.RedirectPathMatcher + } + return nil +} + +func (x *OAuth2Config) GetSignoutPath() *v32.PathMatcher { + if x != nil { + return x.SignoutPath + } + return nil +} + +func (x *OAuth2Config) GetForwardBearerToken() bool { + if x != nil { + return x.ForwardBearerToken + } + return false +} + +func (x *OAuth2Config) GetPassThroughMatcher() []*v33.HeaderMatcher { + if x != nil { + return x.PassThroughMatcher + } + return nil +} + +func (x *OAuth2Config) GetAuthScopes() []string { + if x != nil { + return x.AuthScopes + } + return nil +} + +func (x *OAuth2Config) GetResources() []string { + if x != nil { + return x.Resources + } + return nil +} + +// Filter config. +type OAuth2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Leave this empty to disable OAuth2 for a specific route, using per filter config. + Config *OAuth2Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *OAuth2) Reset() { + *x = OAuth2{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2) ProtoMessage() {} + +func (x *OAuth2) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2.ProtoReflect.Descriptor instead. +func (*OAuth2) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{2} +} + +func (x *OAuth2) GetConfig() *OAuth2Config { + if x != nil { + return x.Config + } + return nil +} + +type OAuth2Credentials_CookieNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Cookie name to hold OAuth bearer token value. When the authentication server validates the + // client and returns an authorization token back to the OAuth filter, no matter what format + // that token is, if :ref:`forward_bearer_token ` + // is set to true the filter will send over the bearer token as a cookie with this name to the + // upstream. Defaults to ``BearerToken``. + BearerToken string `protobuf:"bytes,1,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` + // Cookie name to hold OAuth HMAC value. Defaults to ``OauthHMAC``. + OauthHmac string `protobuf:"bytes,2,opt,name=oauth_hmac,json=oauthHmac,proto3" json:"oauth_hmac,omitempty"` + // Cookie name to hold OAuth expiry value. Defaults to ``OauthExpires``. + OauthExpires string `protobuf:"bytes,3,opt,name=oauth_expires,json=oauthExpires,proto3" json:"oauth_expires,omitempty"` +} + +func (x *OAuth2Credentials_CookieNames) Reset() { + *x = OAuth2Credentials_CookieNames{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2Credentials_CookieNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2Credentials_CookieNames) ProtoMessage() {} + +func (x *OAuth2Credentials_CookieNames) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2Credentials_CookieNames.ProtoReflect.Descriptor instead. +func (*OAuth2Credentials_CookieNames) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *OAuth2Credentials_CookieNames) GetBearerToken() string { + if x != nil { + return x.BearerToken + } + return "" +} + +func (x *OAuth2Credentials_CookieNames) GetOauthHmac() string { + if x != nil { + return x.OauthHmac + } + return "" +} + +func (x *OAuth2Credentials_CookieNames) GetOauthExpires() string { + if x != nil { + return x.OauthExpires + } + return "" +} + +var File_envoy_extensions_filters_http_oauth2_v3_oauth_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x1a, 0x23, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x04, 0x0a, 0x11, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x67, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x67, 0x0a, 0x0b, 0x68, 0x6d, 0x61, 0x63, + 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x6d, 0x61, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x12, 0x69, 0x0a, 0x0c, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, + 0x33, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, + 0x0b, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x9b, 0x01, 0x0a, + 0x0b, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x0c, + 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, + 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x0a, + 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x48, 0x6d, 0x61, 0x63, 0x12, 0x30, 0x0a, 0x0d, 0x6f, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x0c, 0x6f, 0x61, + 0x75, 0x74, 0x68, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x42, 0x16, 0x0a, 0x0f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x22, 0xa4, 0x05, 0x0a, 0x0c, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x16, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x12, 0x2a, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, + 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x60, 0x0a, + 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x4f, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, + 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x30, 0x0a, 0x14, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x65, 0x61, 0x72, + 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x56, 0x0a, 0x14, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x70, 0x61, 0x73, 0x73, 0x54, 0x68, 0x72, 0x6f, + 0x75, 0x67, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x06, 0x4f, 0x41, 0x75, + 0x74, 0x68, 0x32, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x41, + 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xa6, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x4f, 0x61, + 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x61, 0x75, 0x74, 0x68, + 0x32, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData = file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc +) + +func file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData +} + +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_goTypes = []interface{}{ + (*OAuth2Credentials)(nil), // 0: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials + (*OAuth2Config)(nil), // 1: envoy.extensions.filters.http.oauth2.v3.OAuth2Config + (*OAuth2)(nil), // 2: envoy.extensions.filters.http.oauth2.v3.OAuth2 + (*OAuth2Credentials_CookieNames)(nil), // 3: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.CookieNames + (*v3.SdsSecretConfig)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + (*v31.HttpUri)(nil), // 5: envoy.config.core.v3.HttpUri + (*v32.PathMatcher)(nil), // 6: envoy.type.matcher.v3.PathMatcher + (*v33.HeaderMatcher)(nil), // 7: envoy.config.route.v3.HeaderMatcher +} +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.token_secret:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 4, // 1: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.hmac_secret:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 3, // 2: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.cookie_names:type_name -> envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.CookieNames + 5, // 3: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.token_endpoint:type_name -> envoy.config.core.v3.HttpUri + 0, // 4: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.credentials:type_name -> envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials + 6, // 5: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.redirect_path_matcher:type_name -> envoy.type.matcher.v3.PathMatcher + 6, // 6: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.signout_path:type_name -> envoy.type.matcher.v3.PathMatcher + 7, // 7: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.pass_through_matcher:type_name -> envoy.config.route.v3.HeaderMatcher + 1, // 8: envoy.extensions.filters.http.oauth2.v3.OAuth2.config:type_name -> envoy.extensions.filters.http.oauth2.v3.OAuth2Config + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_init() } +func file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_init() { + if File_envoy_extensions_filters_http_oauth2_v3_oauth_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2Credentials); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2Credentials_CookieNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*OAuth2Credentials_HmacSecret)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_oauth2_v3_oauth_proto = out.File + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc = nil + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_goTypes = nil + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/oauth2/v3/oauth.pb.validate.go b/pkg/api/envoy/extensions/filters/http/oauth2/v3/oauth.pb.validate.go new file mode 100644 index 0000000000..6f20c5ef24 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/oauth2/v3/oauth.pb.validate.go @@ -0,0 +1,861 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/oauth2/v3/oauth.proto + +package oauth2v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OAuth2Credentials with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *OAuth2Credentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2Credentials with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OAuth2CredentialsMultiError, or nil if none found. +func (m *OAuth2Credentials) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2Credentials) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetClientId()) < 1 { + err := OAuth2CredentialsValidationError{ + field: "ClientId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetTokenSecret() == nil { + err := OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTokenSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCookieNames()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "CookieNames", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "CookieNames", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCookieNames()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2CredentialsValidationError{ + field: "CookieNames", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.TokenFormation.(type) { + + case *OAuth2Credentials_HmacSecret: + + if m.GetHmacSecret() == nil { + err := OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetHmacSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHmacSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := OAuth2CredentialsValidationError{ + field: "TokenFormation", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return OAuth2CredentialsMultiError(errors) + } + + return nil +} + +// OAuth2CredentialsMultiError is an error wrapping multiple validation errors +// returned by OAuth2Credentials.ValidateAll() if the designated constraints +// aren't met. +type OAuth2CredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2CredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2CredentialsMultiError) AllErrors() []error { return m } + +// OAuth2CredentialsValidationError is the validation error returned by +// OAuth2Credentials.Validate if the designated constraints aren't met. +type OAuth2CredentialsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2CredentialsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2CredentialsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2CredentialsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2CredentialsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2CredentialsValidationError) ErrorName() string { + return "OAuth2CredentialsValidationError" +} + +// Error satisfies the builtin error interface +func (e OAuth2CredentialsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOAuth2Credentials.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2CredentialsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2CredentialsValidationError{} + +// Validate checks the field values on OAuth2Config with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *OAuth2Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2Config with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OAuth2ConfigMultiError, or +// nil if none found. +func (m *OAuth2Config) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTokenEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "TokenEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "TokenEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenEndpoint()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "TokenEndpoint", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetAuthorizationEndpoint()) < 1 { + err := OAuth2ConfigValidationError{ + field: "AuthorizationEndpoint", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetCredentials() == nil { + err := OAuth2ConfigValidationError{ + field: "Credentials", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "Credentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "Credentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCredentials()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "Credentials", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetRedirectUri()) < 1 { + err := OAuth2ConfigValidationError{ + field: "RedirectUri", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetRedirectPathMatcher() == nil { + err := OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRedirectPathMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectPathMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetSignoutPath() == nil { + err := OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSignoutPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSignoutPath()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ForwardBearerToken + + for idx, item := range m.GetPassThroughMatcher() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: fmt.Sprintf("PassThroughMatcher[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: fmt.Sprintf("PassThroughMatcher[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: fmt.Sprintf("PassThroughMatcher[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return OAuth2ConfigMultiError(errors) + } + + return nil +} + +// OAuth2ConfigMultiError is an error wrapping multiple validation errors +// returned by OAuth2Config.ValidateAll() if the designated constraints aren't met. +type OAuth2ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2ConfigMultiError) AllErrors() []error { return m } + +// OAuth2ConfigValidationError is the validation error returned by +// OAuth2Config.Validate if the designated constraints aren't met. +type OAuth2ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2ConfigValidationError) ErrorName() string { return "OAuth2ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e OAuth2ConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOAuth2Config.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2ConfigValidationError{} + +// Validate checks the field values on OAuth2 with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *OAuth2) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2 with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in OAuth2MultiError, or nil if none found. +func (m *OAuth2) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OAuth2MultiError(errors) + } + + return nil +} + +// OAuth2MultiError is an error wrapping multiple validation errors returned by +// OAuth2.ValidateAll() if the designated constraints aren't met. +type OAuth2MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2MultiError) AllErrors() []error { return m } + +// OAuth2ValidationError is the validation error returned by OAuth2.Validate if +// the designated constraints aren't met. +type OAuth2ValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2ValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2ValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2ValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2ValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2ValidationError) ErrorName() string { return "OAuth2ValidationError" } + +// Error satisfies the builtin error interface +func (e OAuth2ValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOAuth2.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2ValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2ValidationError{} + +// Validate checks the field values on OAuth2Credentials_CookieNames with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *OAuth2Credentials_CookieNames) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2Credentials_CookieNames with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// OAuth2Credentials_CookieNamesMultiError, or nil if none found. +func (m *OAuth2Credentials_CookieNames) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2Credentials_CookieNames) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetBearerToken() != "" { + + if !_OAuth2Credentials_CookieNames_BearerToken_Pattern.MatchString(m.GetBearerToken()) { + err := OAuth2Credentials_CookieNamesValidationError{ + field: "BearerToken", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetOauthHmac() != "" { + + if !_OAuth2Credentials_CookieNames_OauthHmac_Pattern.MatchString(m.GetOauthHmac()) { + err := OAuth2Credentials_CookieNamesValidationError{ + field: "OauthHmac", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetOauthExpires() != "" { + + if !_OAuth2Credentials_CookieNames_OauthExpires_Pattern.MatchString(m.GetOauthExpires()) { + err := OAuth2Credentials_CookieNamesValidationError{ + field: "OauthExpires", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return OAuth2Credentials_CookieNamesMultiError(errors) + } + + return nil +} + +// OAuth2Credentials_CookieNamesMultiError is an error wrapping multiple +// validation errors returned by OAuth2Credentials_CookieNames.ValidateAll() +// if the designated constraints aren't met. +type OAuth2Credentials_CookieNamesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2Credentials_CookieNamesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2Credentials_CookieNamesMultiError) AllErrors() []error { return m } + +// OAuth2Credentials_CookieNamesValidationError is the validation error +// returned by OAuth2Credentials_CookieNames.Validate if the designated +// constraints aren't met. +type OAuth2Credentials_CookieNamesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2Credentials_CookieNamesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2Credentials_CookieNamesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2Credentials_CookieNamesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2Credentials_CookieNamesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2Credentials_CookieNamesValidationError) ErrorName() string { + return "OAuth2Credentials_CookieNamesValidationError" +} + +// Error satisfies the builtin error interface +func (e OAuth2Credentials_CookieNamesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOAuth2Credentials_CookieNames.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2Credentials_CookieNamesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2Credentials_CookieNamesValidationError{} + +var _OAuth2Credentials_CookieNames_BearerToken_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +var _OAuth2Credentials_CookieNames_OauthHmac_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +var _OAuth2Credentials_CookieNames_OauthExpires_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") diff --git a/pkg/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.pb.go b/pkg/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.pb.go deleted file mode 100644 index 4a3304317c..0000000000 --- a/pkg/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.pb.go +++ /dev/null @@ -1,491 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/oauth2/v3alpha/oauth.proto - -package envoy_extensions_filters_http_oauth2_v3alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" - v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type OAuth2Credentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The client_id to be used in the authorize calls. This value will be URL encoded when sent to the OAuth server. - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // The secret used to retrieve the access token. This value will be URL encoded when sent to the OAuth server. - TokenSecret *v3.SdsSecretConfig `protobuf:"bytes,2,opt,name=token_secret,json=tokenSecret,proto3" json:"token_secret,omitempty"` - // Configures how the secret token should be created. - // - // Types that are assignable to TokenFormation: - // *OAuth2Credentials_HmacSecret - TokenFormation isOAuth2Credentials_TokenFormation `protobuf_oneof:"token_formation"` -} - -func (x *OAuth2Credentials) Reset() { - *x = OAuth2Credentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuth2Credentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuth2Credentials) ProtoMessage() {} - -func (x *OAuth2Credentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuth2Credentials.ProtoReflect.Descriptor instead. -func (*OAuth2Credentials) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescGZIP(), []int{0} -} - -func (x *OAuth2Credentials) GetClientId() string { - if x != nil { - return x.ClientId - } - return "" -} - -func (x *OAuth2Credentials) GetTokenSecret() *v3.SdsSecretConfig { - if x != nil { - return x.TokenSecret - } - return nil -} - -func (m *OAuth2Credentials) GetTokenFormation() isOAuth2Credentials_TokenFormation { - if m != nil { - return m.TokenFormation - } - return nil -} - -func (x *OAuth2Credentials) GetHmacSecret() *v3.SdsSecretConfig { - if x, ok := x.GetTokenFormation().(*OAuth2Credentials_HmacSecret); ok { - return x.HmacSecret - } - return nil -} - -type isOAuth2Credentials_TokenFormation interface { - isOAuth2Credentials_TokenFormation() -} - -type OAuth2Credentials_HmacSecret struct { - // If present, the secret token will be a HMAC using the provided secret. - HmacSecret *v3.SdsSecretConfig `protobuf:"bytes,3,opt,name=hmac_secret,json=hmacSecret,proto3,oneof"` -} - -func (*OAuth2Credentials_HmacSecret) isOAuth2Credentials_TokenFormation() {} - -// OAuth config -// -// [#next-free-field: 9] -type OAuth2Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Endpoint on the authorization server to retrieve the access token from. - TokenEndpoint *v31.HttpUri `protobuf:"bytes,1,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` - // The endpoint redirect to for authorization in response to unauthorized requests. - AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` - // Credentials used for OAuth. - Credentials *OAuth2Credentials `protobuf:"bytes,3,opt,name=credentials,proto3" json:"credentials,omitempty"` - // The redirect URI passed to the authorization endpoint. Supports header formatting - // tokens. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers `. - // - // This URI should not contain any query parameters. - RedirectUri string `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` - // Matching criteria used to determine whether a path appears to be the result of a redirect from the authorization server. - RedirectPathMatcher *v32.PathMatcher `protobuf:"bytes,5,opt,name=redirect_path_matcher,json=redirectPathMatcher,proto3" json:"redirect_path_matcher,omitempty"` - // The path to sign a user out, clearing their credential cookies. - SignoutPath *v32.PathMatcher `protobuf:"bytes,6,opt,name=signout_path,json=signoutPath,proto3" json:"signout_path,omitempty"` - // Forward the OAuth token as a Bearer to upstream web service. - ForwardBearerToken bool `protobuf:"varint,7,opt,name=forward_bearer_token,json=forwardBearerToken,proto3" json:"forward_bearer_token,omitempty"` - // Any request that matches any of the provided matchers will be passed through without OAuth validation. - PassThroughMatcher []*v33.HeaderMatcher `protobuf:"bytes,8,rep,name=pass_through_matcher,json=passThroughMatcher,proto3" json:"pass_through_matcher,omitempty"` -} - -func (x *OAuth2Config) Reset() { - *x = OAuth2Config{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuth2Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuth2Config) ProtoMessage() {} - -func (x *OAuth2Config) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuth2Config.ProtoReflect.Descriptor instead. -func (*OAuth2Config) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescGZIP(), []int{1} -} - -func (x *OAuth2Config) GetTokenEndpoint() *v31.HttpUri { - if x != nil { - return x.TokenEndpoint - } - return nil -} - -func (x *OAuth2Config) GetAuthorizationEndpoint() string { - if x != nil { - return x.AuthorizationEndpoint - } - return "" -} - -func (x *OAuth2Config) GetCredentials() *OAuth2Credentials { - if x != nil { - return x.Credentials - } - return nil -} - -func (x *OAuth2Config) GetRedirectUri() string { - if x != nil { - return x.RedirectUri - } - return "" -} - -func (x *OAuth2Config) GetRedirectPathMatcher() *v32.PathMatcher { - if x != nil { - return x.RedirectPathMatcher - } - return nil -} - -func (x *OAuth2Config) GetSignoutPath() *v32.PathMatcher { - if x != nil { - return x.SignoutPath - } - return nil -} - -func (x *OAuth2Config) GetForwardBearerToken() bool { - if x != nil { - return x.ForwardBearerToken - } - return false -} - -func (x *OAuth2Config) GetPassThroughMatcher() []*v33.HeaderMatcher { - if x != nil { - return x.PassThroughMatcher - } - return nil -} - -// Filter config. -type OAuth2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Leave this empty to disable OAuth2 for a specific route, using per filter config. - Config *OAuth2Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *OAuth2) Reset() { - *x = OAuth2{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuth2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuth2) ProtoMessage() {} - -func (x *OAuth2) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuth2.ProtoReflect.Descriptor instead. -func (*OAuth2) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescGZIP(), []int{2} -} - -func (x *OAuth2) GetConfig() *OAuth2Config { - if x != nil { - return x.Config - } - return nil -} - -var File_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6f, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, - 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, - 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xa3, 0x02, 0x0a, 0x11, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x67, 0x0a, 0x0c, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x67, 0x0a, 0x0b, 0x68, 0x6d, 0x61, 0x63, 0x5f, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x0a, 0x68, 0x6d, 0x61, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x16, - 0x0a, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xea, 0x04, 0x0a, 0x0c, 0x4f, 0x41, 0x75, 0x74, 0x68, - 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x0d, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3e, 0x0a, - 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x6b, 0x0a, - 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x0c, 0x72, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x60, 0x0a, 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, - 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x61, 0x74, - 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, - 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x69, - 0x67, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x56, 0x0a, 0x14, 0x70, - 0x61, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, - 0x12, 0x70, 0x61, 0x73, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x22, 0x5c, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x52, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, - 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x41, 0x75, - 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x5a, 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x0a, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescData = file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDesc -) - -func file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDescData -} - -var file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_goTypes = []interface{}{ - (*OAuth2Credentials)(nil), // 0: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Credentials - (*OAuth2Config)(nil), // 1: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config - (*OAuth2)(nil), // 2: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2 - (*v3.SdsSecretConfig)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - (*v31.HttpUri)(nil), // 4: envoy.config.core.v3.HttpUri - (*v32.PathMatcher)(nil), // 5: envoy.type.matcher.v3.PathMatcher - (*v33.HeaderMatcher)(nil), // 6: envoy.config.route.v3.HeaderMatcher -} -var file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Credentials.token_secret:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - 3, // 1: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Credentials.hmac_secret:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - 4, // 2: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config.token_endpoint:type_name -> envoy.config.core.v3.HttpUri - 0, // 3: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config.credentials:type_name -> envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Credentials - 5, // 4: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config.redirect_path_matcher:type_name -> envoy.type.matcher.v3.PathMatcher - 5, // 5: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config.signout_path:type_name -> envoy.type.matcher.v3.PathMatcher - 6, // 6: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config.pass_through_matcher:type_name -> envoy.config.route.v3.HeaderMatcher - 1, // 7: envoy.extensions.filters.http.oauth2.v3alpha.OAuth2.config:type_name -> envoy.extensions.filters.http.oauth2.v3alpha.OAuth2Config - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_init() } -func file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_init() { - if File_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuth2Credentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuth2Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuth2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*OAuth2Credentials_HmacSecret)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto = out.File - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_rawDesc = nil - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_goTypes = nil - file_envoy_extensions_filters_http_oauth2_v3alpha_oauth_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.pb.validate.go b/pkg/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.pb.validate.go deleted file mode 100644 index b202207e77..0000000000 --- a/pkg/api/envoy/extensions/filters/http/oauth2/v3alpha/oauth.pb.validate.go +++ /dev/null @@ -1,385 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/oauth2/v3alpha/oauth.proto - -package envoy_extensions_filters_http_oauth2_v3alpha - -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{} -) - -// Validate checks the field values on OAuth2Credentials with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *OAuth2Credentials) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetClientId()) < 1 { - return OAuth2CredentialsValidationError{ - field: "ClientId", - reason: "value length must be at least 1 runes", - } - } - - if m.GetTokenSecret() == nil { - return OAuth2CredentialsValidationError{ - field: "TokenSecret", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetTokenSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2CredentialsValidationError{ - field: "TokenSecret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.TokenFormation.(type) { - - case *OAuth2Credentials_HmacSecret: - - if m.GetHmacSecret() == nil { - return OAuth2CredentialsValidationError{ - field: "HmacSecret", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetHmacSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2CredentialsValidationError{ - field: "HmacSecret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return OAuth2CredentialsValidationError{ - field: "TokenFormation", - reason: "value is required", - } - - } - - return nil -} - -// OAuth2CredentialsValidationError is the validation error returned by -// OAuth2Credentials.Validate if the designated constraints aren't met. -type OAuth2CredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OAuth2CredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OAuth2CredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OAuth2CredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OAuth2CredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OAuth2CredentialsValidationError) ErrorName() string { - return "OAuth2CredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e OAuth2CredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOAuth2Credentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OAuth2CredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OAuth2CredentialsValidationError{} - -// Validate checks the field values on OAuth2Config with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *OAuth2Config) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetTokenEndpoint()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "TokenEndpoint", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetAuthorizationEndpoint()) < 1 { - return OAuth2ConfigValidationError{ - field: "AuthorizationEndpoint", - reason: "value length must be at least 1 runes", - } - } - - if m.GetCredentials() == nil { - return OAuth2ConfigValidationError{ - field: "Credentials", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "Credentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetRedirectUri()) < 1 { - return OAuth2ConfigValidationError{ - field: "RedirectUri", - reason: "value length must be at least 1 runes", - } - } - - if m.GetRedirectPathMatcher() == nil { - return OAuth2ConfigValidationError{ - field: "RedirectPathMatcher", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetRedirectPathMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "RedirectPathMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetSignoutPath() == nil { - return OAuth2ConfigValidationError{ - field: "SignoutPath", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetSignoutPath()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "SignoutPath", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ForwardBearerToken - - for idx, item := range m.GetPassThroughMatcher() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: fmt.Sprintf("PassThroughMatcher[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// OAuth2ConfigValidationError is the validation error returned by -// OAuth2Config.Validate if the designated constraints aren't met. -type OAuth2ConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OAuth2ConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OAuth2ConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OAuth2ConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OAuth2ConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OAuth2ConfigValidationError) ErrorName() string { return "OAuth2ConfigValidationError" } - -// Error satisfies the builtin error interface -func (e OAuth2ConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOAuth2Config.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OAuth2ConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OAuth2ConfigValidationError{} - -// Validate checks the field values on OAuth2 with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *OAuth2) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// OAuth2ValidationError is the validation error returned by OAuth2.Validate if -// the designated constraints aren't met. -type OAuth2ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OAuth2ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OAuth2ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OAuth2ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OAuth2ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OAuth2ValidationError) ErrorName() string { return "OAuth2ValidationError" } - -// Error satisfies the builtin error interface -func (e OAuth2ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOAuth2.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OAuth2ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OAuth2ValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.pb.go b/pkg/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.pb.go deleted file mode 100644 index 845c3f2dcd..0000000000 --- a/pkg/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.pb.go +++ /dev/null @@ -1,506 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/oauth2/v4alpha/oauth.proto - -package envoy_extensions_filters_http_oauth2_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type OAuth2Credentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The client_id to be used in the authorize calls. This value will be URL encoded when sent to the OAuth server. - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // The secret used to retrieve the access token. This value will be URL encoded when sent to the OAuth server. - TokenSecret *v4alpha.SdsSecretConfig `protobuf:"bytes,2,opt,name=token_secret,json=tokenSecret,proto3" json:"token_secret,omitempty"` - // Configures how the secret token should be created. - // - // Types that are assignable to TokenFormation: - // *OAuth2Credentials_HmacSecret - TokenFormation isOAuth2Credentials_TokenFormation `protobuf_oneof:"token_formation"` -} - -func (x *OAuth2Credentials) Reset() { - *x = OAuth2Credentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuth2Credentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuth2Credentials) ProtoMessage() {} - -func (x *OAuth2Credentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuth2Credentials.ProtoReflect.Descriptor instead. -func (*OAuth2Credentials) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescGZIP(), []int{0} -} - -func (x *OAuth2Credentials) GetClientId() string { - if x != nil { - return x.ClientId - } - return "" -} - -func (x *OAuth2Credentials) GetTokenSecret() *v4alpha.SdsSecretConfig { - if x != nil { - return x.TokenSecret - } - return nil -} - -func (m *OAuth2Credentials) GetTokenFormation() isOAuth2Credentials_TokenFormation { - if m != nil { - return m.TokenFormation - } - return nil -} - -func (x *OAuth2Credentials) GetHmacSecret() *v4alpha.SdsSecretConfig { - if x, ok := x.GetTokenFormation().(*OAuth2Credentials_HmacSecret); ok { - return x.HmacSecret - } - return nil -} - -type isOAuth2Credentials_TokenFormation interface { - isOAuth2Credentials_TokenFormation() -} - -type OAuth2Credentials_HmacSecret struct { - // If present, the secret token will be a HMAC using the provided secret. - HmacSecret *v4alpha.SdsSecretConfig `protobuf:"bytes,3,opt,name=hmac_secret,json=hmacSecret,proto3,oneof"` -} - -func (*OAuth2Credentials_HmacSecret) isOAuth2Credentials_TokenFormation() {} - -// OAuth config -// -// [#next-free-field: 9] -type OAuth2Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Endpoint on the authorization server to retrieve the access token from. - TokenEndpoint *v4alpha1.HttpUri `protobuf:"bytes,1,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` - // The endpoint redirect to for authorization in response to unauthorized requests. - AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` - // Credentials used for OAuth. - Credentials *OAuth2Credentials `protobuf:"bytes,3,opt,name=credentials,proto3" json:"credentials,omitempty"` - // The redirect URI passed to the authorization endpoint. Supports header formatting - // tokens. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers `. - // - // This URI should not contain any query parameters. - RedirectUri string `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` - // Matching criteria used to determine whether a path appears to be the result of a redirect from the authorization server. - RedirectPathMatcher *v4alpha2.PathMatcher `protobuf:"bytes,5,opt,name=redirect_path_matcher,json=redirectPathMatcher,proto3" json:"redirect_path_matcher,omitempty"` - // The path to sign a user out, clearing their credential cookies. - SignoutPath *v4alpha2.PathMatcher `protobuf:"bytes,6,opt,name=signout_path,json=signoutPath,proto3" json:"signout_path,omitempty"` - // Forward the OAuth token as a Bearer to upstream web service. - ForwardBearerToken bool `protobuf:"varint,7,opt,name=forward_bearer_token,json=forwardBearerToken,proto3" json:"forward_bearer_token,omitempty"` - // Any request that matches any of the provided matchers will be passed through without OAuth validation. - PassThroughMatcher []*v4alpha3.HeaderMatcher `protobuf:"bytes,8,rep,name=pass_through_matcher,json=passThroughMatcher,proto3" json:"pass_through_matcher,omitempty"` -} - -func (x *OAuth2Config) Reset() { - *x = OAuth2Config{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuth2Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuth2Config) ProtoMessage() {} - -func (x *OAuth2Config) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuth2Config.ProtoReflect.Descriptor instead. -func (*OAuth2Config) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescGZIP(), []int{1} -} - -func (x *OAuth2Config) GetTokenEndpoint() *v4alpha1.HttpUri { - if x != nil { - return x.TokenEndpoint - } - return nil -} - -func (x *OAuth2Config) GetAuthorizationEndpoint() string { - if x != nil { - return x.AuthorizationEndpoint - } - return "" -} - -func (x *OAuth2Config) GetCredentials() *OAuth2Credentials { - if x != nil { - return x.Credentials - } - return nil -} - -func (x *OAuth2Config) GetRedirectUri() string { - if x != nil { - return x.RedirectUri - } - return "" -} - -func (x *OAuth2Config) GetRedirectPathMatcher() *v4alpha2.PathMatcher { - if x != nil { - return x.RedirectPathMatcher - } - return nil -} - -func (x *OAuth2Config) GetSignoutPath() *v4alpha2.PathMatcher { - if x != nil { - return x.SignoutPath - } - return nil -} - -func (x *OAuth2Config) GetForwardBearerToken() bool { - if x != nil { - return x.ForwardBearerToken - } - return false -} - -func (x *OAuth2Config) GetPassThroughMatcher() []*v4alpha3.HeaderMatcher { - if x != nil { - return x.PassThroughMatcher - } - return nil -} - -// Filter config. -type OAuth2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Leave this empty to disable OAuth2 for a specific route, using per filter config. - Config *OAuth2Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *OAuth2) Reset() { - *x = OAuth2{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuth2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuth2) ProtoMessage() {} - -func (x *OAuth2) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuth2.ProtoReflect.Descriptor instead. -func (*OAuth2) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescGZIP(), []int{2} -} - -func (x *OAuth2) GetConfig() *OAuth2Config { - if x != nil { - return x.Config - } - return nil -} - -var File_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6f, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, - 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x02, 0x0a, 0x11, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, - 0x12, 0x6c, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x6c, - 0x0a, 0x0b, 0x68, 0x6d, 0x61, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x0a, 0x68, 0x6d, 0x61, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x45, 0x9a, 0xc5, - 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x42, 0x16, 0x0a, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc0, 0x05, 0x0a, 0x0c, - 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0e, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x6b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, - 0x74, 0x68, 0x32, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x41, 0x75, 0x74, - 0x68, 0x32, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, - 0x12, 0x65, 0x0a, 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x61, 0x74, - 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x61, 0x74, 0x68, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x6f, - 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x30, 0x0a, - 0x14, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x5b, 0x0a, 0x14, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x70, 0x61, 0x73, 0x73, 0x54, 0x68, - 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x3a, 0x40, 0x9a, 0xc5, - 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x98, - 0x01, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x52, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3a, 0x9a, - 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x42, 0x5a, 0x0a, 0x3a, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescData = file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDesc -) - -func file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDescData -} - -var file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_goTypes = []interface{}{ - (*OAuth2Credentials)(nil), // 0: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Credentials - (*OAuth2Config)(nil), // 1: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Config - (*OAuth2)(nil), // 2: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2 - (*v4alpha.SdsSecretConfig)(nil), // 3: envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - (*v4alpha1.HttpUri)(nil), // 4: envoy.config.core.v4alpha.HttpUri - (*v4alpha2.PathMatcher)(nil), // 5: envoy.type.matcher.v4alpha.PathMatcher - (*v4alpha3.HeaderMatcher)(nil), // 6: envoy.config.route.v4alpha.HeaderMatcher -} -var file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Credentials.token_secret:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - 3, // 1: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Credentials.hmac_secret:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - 4, // 2: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Config.token_endpoint:type_name -> envoy.config.core.v4alpha.HttpUri - 0, // 3: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Config.credentials:type_name -> envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Credentials - 5, // 4: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Config.redirect_path_matcher:type_name -> envoy.type.matcher.v4alpha.PathMatcher - 5, // 5: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Config.signout_path:type_name -> envoy.type.matcher.v4alpha.PathMatcher - 6, // 6: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Config.pass_through_matcher:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 1, // 7: envoy.extensions.filters.http.oauth2.v4alpha.OAuth2.config:type_name -> envoy.extensions.filters.http.oauth2.v4alpha.OAuth2Config - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_init() } -func file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_init() { - if File_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuth2Credentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuth2Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuth2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*OAuth2Credentials_HmacSecret)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto = out.File - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_rawDesc = nil - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_goTypes = nil - file_envoy_extensions_filters_http_oauth2_v4alpha_oauth_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.pb.validate.go b/pkg/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.pb.validate.go deleted file mode 100644 index 8c0dddcfa8..0000000000 --- a/pkg/api/envoy/extensions/filters/http/oauth2/v4alpha/oauth.pb.validate.go +++ /dev/null @@ -1,385 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/oauth2/v4alpha/oauth.proto - -package envoy_extensions_filters_http_oauth2_v4alpha - -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{} -) - -// Validate checks the field values on OAuth2Credentials with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *OAuth2Credentials) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetClientId()) < 1 { - return OAuth2CredentialsValidationError{ - field: "ClientId", - reason: "value length must be at least 1 runes", - } - } - - if m.GetTokenSecret() == nil { - return OAuth2CredentialsValidationError{ - field: "TokenSecret", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetTokenSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2CredentialsValidationError{ - field: "TokenSecret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.TokenFormation.(type) { - - case *OAuth2Credentials_HmacSecret: - - if m.GetHmacSecret() == nil { - return OAuth2CredentialsValidationError{ - field: "HmacSecret", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetHmacSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2CredentialsValidationError{ - field: "HmacSecret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return OAuth2CredentialsValidationError{ - field: "TokenFormation", - reason: "value is required", - } - - } - - return nil -} - -// OAuth2CredentialsValidationError is the validation error returned by -// OAuth2Credentials.Validate if the designated constraints aren't met. -type OAuth2CredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OAuth2CredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OAuth2CredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OAuth2CredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OAuth2CredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OAuth2CredentialsValidationError) ErrorName() string { - return "OAuth2CredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e OAuth2CredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOAuth2Credentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OAuth2CredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OAuth2CredentialsValidationError{} - -// Validate checks the field values on OAuth2Config with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *OAuth2Config) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetTokenEndpoint()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "TokenEndpoint", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetAuthorizationEndpoint()) < 1 { - return OAuth2ConfigValidationError{ - field: "AuthorizationEndpoint", - reason: "value length must be at least 1 runes", - } - } - - if m.GetCredentials() == nil { - return OAuth2ConfigValidationError{ - field: "Credentials", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "Credentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetRedirectUri()) < 1 { - return OAuth2ConfigValidationError{ - field: "RedirectUri", - reason: "value length must be at least 1 runes", - } - } - - if m.GetRedirectPathMatcher() == nil { - return OAuth2ConfigValidationError{ - field: "RedirectPathMatcher", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetRedirectPathMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "RedirectPathMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetSignoutPath() == nil { - return OAuth2ConfigValidationError{ - field: "SignoutPath", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetSignoutPath()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: "SignoutPath", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ForwardBearerToken - - for idx, item := range m.GetPassThroughMatcher() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ConfigValidationError{ - field: fmt.Sprintf("PassThroughMatcher[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// OAuth2ConfigValidationError is the validation error returned by -// OAuth2Config.Validate if the designated constraints aren't met. -type OAuth2ConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OAuth2ConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OAuth2ConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OAuth2ConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OAuth2ConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OAuth2ConfigValidationError) ErrorName() string { return "OAuth2ConfigValidationError" } - -// Error satisfies the builtin error interface -func (e OAuth2ConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOAuth2Config.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OAuth2ConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OAuth2ConfigValidationError{} - -// Validate checks the field values on OAuth2 with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *OAuth2) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OAuth2ValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// OAuth2ValidationError is the validation error returned by OAuth2.Validate if -// the designated constraints aren't met. -type OAuth2ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OAuth2ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OAuth2ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OAuth2ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OAuth2ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OAuth2ValidationError) ErrorName() string { return "OAuth2ValidationError" } - -// Error satisfies the builtin error interface -func (e OAuth2ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOAuth2.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OAuth2ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OAuth2ValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.go b/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.go index 717eae02bb..6bc7d6c0ac 100644 --- a/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.go +++ b/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/on_demand/v3/on_demand.proto -package envoy_extensions_filters_http_on_demand_v3 +package on_demandv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OnDemand struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -78,19 +72,23 @@ var file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDesc = [] 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x08, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x3a, - 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6e, - 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x53, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, - 0x76, 0x33, 0x42, 0x0d, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x08, 0x4f, 0x6e, + 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, + 0x64, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0xb2, 0x01, + 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, + 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4f, 0x6e, 0x44, 0x65, + 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2f, 0x76, 0x33, 0x3b, 0x6f, + 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.validate.go b/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.validate.go index 7c903379b8..5f32162361 100644 --- a/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/on_demand/v3/on_demand.proto -package envoy_extensions_filters_http_on_demand_v3 +package on_demandv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OnDemand with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OnDemand) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OnDemand with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OnDemandMultiError, or nil +// if none found. +func (m *OnDemand) ValidateAll() error { + return m.validate(true) +} + +func (m *OnDemand) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return OnDemandMultiError(errors) + } + return nil } +// OnDemandMultiError is an error wrapping multiple validation errors returned +// by OnDemand.ValidateAll() if the designated constraints aren't met. +type OnDemandMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OnDemandMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OnDemandMultiError) AllErrors() []error { return m } + // OnDemandValidationError is the validation error returned by // OnDemand.Validate if the designated constraints aren't met. type OnDemandValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.go b/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.go index 39f888c913..4c7c93549f 100644 --- a/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.go +++ b/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/original_src/v3/original_src.proto -package envoy_extensions_filters_http_original_src_v3 +package original_srcv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The Original Src filter binds upstream connections to the original source address determined // for the request. This address could come from something like the Proxy Protocol filter, or it // could come from trusted http headers. @@ -95,21 +89,26 @@ var file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDes 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x0b, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6d, - 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x3a, - 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, - 0x72, 0x63, 0x42, 0x59, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, - 0x33, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, + 0x72, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x42, 0xbe, 0x01, 0x0a, 0x3b, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, + 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.validate.go b/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.validate.go index 2d12ada9bb..07214561a6 100644 --- a/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/original_src/v3/original_src.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/original_src/v3/original_src.proto -package envoy_extensions_filters_http_original_src_v3 +package original_srcv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OriginalSrc with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OriginalSrc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalSrc with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OriginalSrcMultiError, or +// nil if none found. +func (m *OriginalSrc) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalSrc) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Mark + if len(errors) > 0 { + return OriginalSrcMultiError(errors) + } + return nil } +// OriginalSrcMultiError is an error wrapping multiple validation errors +// returned by OriginalSrc.ValidateAll() if the designated constraints aren't met. +type OriginalSrcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalSrcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalSrcMultiError) AllErrors() []error { return m } + // OriginalSrcValidationError is the validation error returned by // OriginalSrc.Validate if the designated constraints aren't met. type OriginalSrcValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go b/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go index 4a24a2cb21..244771b692 100644 --- a/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go +++ b/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go @@ -1,16 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto -package envoy_extensions_filters_http_ratelimit_v3 +package ratelimitv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v3" + v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" + v34 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/metadata/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,11 +28,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Defines the version of the standard to use for X-RateLimit headers. +// +// [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.XRateLimitHeadersRFCVersion instead.] type RateLimit_XRateLimitHeadersRFCVersion int32 const ( @@ -78,6 +79,54 @@ func (RateLimit_XRateLimitHeadersRFCVersion) EnumDescriptor() ([]byte, []int) { return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{0, 0} } +type RateLimitConfig_Action_MetaData_Source int32 + +const ( + // Query :ref:`dynamic metadata ` + RateLimitConfig_Action_MetaData_DYNAMIC RateLimitConfig_Action_MetaData_Source = 0 + // Query :ref:`route entry metadata ` + RateLimitConfig_Action_MetaData_ROUTE_ENTRY RateLimitConfig_Action_MetaData_Source = 1 +) + +// Enum value maps for RateLimitConfig_Action_MetaData_Source. +var ( + RateLimitConfig_Action_MetaData_Source_name = map[int32]string{ + 0: "DYNAMIC", + 1: "ROUTE_ENTRY", + } + RateLimitConfig_Action_MetaData_Source_value = map[string]int32{ + "DYNAMIC": 0, + "ROUTE_ENTRY": 1, + } +) + +func (x RateLimitConfig_Action_MetaData_Source) Enum() *RateLimitConfig_Action_MetaData_Source { + p := new(RateLimitConfig_Action_MetaData_Source) + *p = x + return p +} + +func (x RateLimitConfig_Action_MetaData_Source) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RateLimitConfig_Action_MetaData_Source) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1].Descriptor() +} + +func (RateLimitConfig_Action_MetaData_Source) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1] +} + +func (x RateLimitConfig_Action_MetaData_Source) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RateLimitConfig_Action_MetaData_Source.Descriptor instead. +func (RateLimitConfig_Action_MetaData_Source) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 6, 0} +} + type RateLimitPerRoute_VhRateLimitsOptions int32 const ( @@ -114,11 +163,11 @@ func (x RateLimitPerRoute_VhRateLimitsOptions) String() string { } func (RateLimitPerRoute_VhRateLimitsOptions) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1].Descriptor() + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[2].Descriptor() } func (RateLimitPerRoute_VhRateLimitsOptions) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1] + return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[2] } func (x RateLimitPerRoute_VhRateLimitsOptions) Number() protoreflect.EnumNumber { @@ -127,10 +176,68 @@ func (x RateLimitPerRoute_VhRateLimitsOptions) Number() protoreflect.EnumNumber // Deprecated: Use RateLimitPerRoute_VhRateLimitsOptions.Descriptor instead. func (RateLimitPerRoute_VhRateLimitsOptions) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0} + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{2, 0} } -// [#next-free-field: 10] +// The override option determines how the filter handles the cases where there is an override config at a more specific level than this one (from least to most specific: virtual host, route, cluster weight). +// [#not-implemented-hide:] +type RateLimitPerRoute_OverrideOptions int32 + +const ( + // Client-defined default, typically OVERRIDE_POLICY. If VhRateLimitsOptions is set, that will be used instead. + RateLimitPerRoute_DEFAULT RateLimitPerRoute_OverrideOptions = 0 + // If there is an override config at a more specific level, use that instead of this one. + RateLimitPerRoute_OVERRIDE_POLICY RateLimitPerRoute_OverrideOptions = 1 + // If there is an override config at a more specific level, use data from both. + RateLimitPerRoute_INCLUDE_POLICY RateLimitPerRoute_OverrideOptions = 2 + // If there is an override config at a more specific level, ignore it and use only this one. + RateLimitPerRoute_IGNORE_POLICY RateLimitPerRoute_OverrideOptions = 3 +) + +// Enum value maps for RateLimitPerRoute_OverrideOptions. +var ( + RateLimitPerRoute_OverrideOptions_name = map[int32]string{ + 0: "DEFAULT", + 1: "OVERRIDE_POLICY", + 2: "INCLUDE_POLICY", + 3: "IGNORE_POLICY", + } + RateLimitPerRoute_OverrideOptions_value = map[string]int32{ + "DEFAULT": 0, + "OVERRIDE_POLICY": 1, + "INCLUDE_POLICY": 2, + "IGNORE_POLICY": 3, + } +) + +func (x RateLimitPerRoute_OverrideOptions) Enum() *RateLimitPerRoute_OverrideOptions { + p := new(RateLimitPerRoute_OverrideOptions) + *p = x + return p +} + +func (x RateLimitPerRoute_OverrideOptions) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RateLimitPerRoute_OverrideOptions) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[3].Descriptor() +} + +func (RateLimitPerRoute_OverrideOptions) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[3] +} + +func (x RateLimitPerRoute_OverrideOptions) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RateLimitPerRoute_OverrideOptions.Descriptor instead. +func (RateLimitPerRoute_OverrideOptions) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{2, 1} +} + +// [#next-free-field: 11] type RateLimit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -190,11 +297,20 @@ type RateLimit struct { // the `draft RFC `_. // // Disabled by default. + // + // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.XRateLimitHeadersRFCVersion instead.] EnableXRatelimitHeaders RateLimit_XRateLimitHeadersRFCVersion `protobuf:"varint,8,opt,name=enable_x_ratelimit_headers,json=enableXRatelimitHeaders,proto3,enum=envoy.extensions.filters.http.ratelimit.v3.RateLimit_XRateLimitHeadersRFCVersion" json:"enable_x_ratelimit_headers,omitempty"` // Disables emitting the :ref:`x-envoy-ratelimited` header // in case of rate limiting (i.e. 429 responses). // Having this header not present potentially makes the request retriable. DisableXEnvoyRatelimitedHeader bool `protobuf:"varint,9,opt,name=disable_x_envoy_ratelimited_header,json=disableXEnvoyRatelimitedHeader,proto3" json:"disable_x_envoy_ratelimited_header,omitempty"` + // This field allows for a custom HTTP response status code to the downstream client when + // the request has been rate limited. + // Defaults to 429 (TooManyRequests). + // + // .. note:: + // If this is set to < 400, 429 will be used instead. + RateLimitedStatus *v31.HttpStatus `protobuf:"bytes,10,opt,name=rate_limited_status,json=rateLimitedStatus,proto3" json:"rate_limited_status,omitempty"` } func (x *RateLimit) Reset() { @@ -292,6 +408,105 @@ func (x *RateLimit) GetDisableXEnvoyRatelimitedHeader() bool { return false } +func (x *RateLimit) GetRateLimitedStatus() *v31.HttpStatus { + if x != nil { + return x.RateLimitedStatus + } + return nil +} + +// Global rate limiting :ref:`architecture overview `. +// Also applies to Local rate limiting :ref:`using descriptors `. +// [#not-implemented-hide:] +type RateLimitConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Refers to the stage set in the filter. The rate limit configuration only + // applies to filters with the same stage number. The default stage number is + // 0. + // + // .. note:: + // + // The filter supports a range of 0 - 10 inclusively for stage numbers. + Stage uint32 `protobuf:"varint,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 []*RateLimitConfig_Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` + // An optional limit override to be appended to the descriptor produced by this + // rate limit configuration. If the override value is invalid or cannot be resolved + // from metadata, no override is provided. See :ref:`rate limit override + // ` for more information. + Limit *RateLimitConfig_Override `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (x *RateLimitConfig) Reset() { + *x = RateLimitConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig) ProtoMessage() {} + +func (x *RateLimitConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig.ProtoReflect.Descriptor instead. +func (*RateLimitConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1} +} + +func (x *RateLimitConfig) GetStage() uint32 { + if x != nil { + return x.Stage + } + return 0 +} + +func (x *RateLimitConfig) GetDisableKey() string { + if x != nil { + return x.DisableKey + } + return "" +} + +func (x *RateLimitConfig) GetActions() []*RateLimitConfig_Action { + if x != nil { + return x.Actions + } + return nil +} + +func (x *RateLimitConfig) GetLimit() *RateLimitConfig_Override { + if x != nil { + return x.Limit + } + return nil +} + type RateLimitPerRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -299,12 +514,20 @@ type RateLimitPerRoute struct { // Specifies if the rate limit filter should include the virtual host rate limits. VhRateLimits RateLimitPerRoute_VhRateLimitsOptions `protobuf:"varint,1,opt,name=vh_rate_limits,json=vhRateLimits,proto3,enum=envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute_VhRateLimitsOptions" json:"vh_rate_limits,omitempty"` + // Specifies if the rate limit filter should include the lower levels (route level, virtual host level or cluster weight level) rate limits override options. + // [#not-implemented-hide:] + OverrideOption RateLimitPerRoute_OverrideOptions `protobuf:"varint,2,opt,name=override_option,json=overrideOption,proto3,enum=envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute_OverrideOptions" json:"override_option,omitempty"` + // Rate limit configuration. If not set, uses the + // :ref:`VirtualHost.rate_limits` or + // :ref:`RouteAction.rate_limits` fields instead. + // [#not-implemented-hide:] + RateLimits []*RateLimitConfig `protobuf:"bytes,3,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` } func (x *RateLimitPerRoute) Reset() { *x = RateLimitPerRoute{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1] + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -317,7 +540,7 @@ func (x *RateLimitPerRoute) String() string { func (*RateLimitPerRoute) ProtoMessage() {} func (x *RateLimitPerRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1] + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -330,7 +553,7 @@ func (x *RateLimitPerRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimitPerRoute.ProtoReflect.Descriptor instead. func (*RateLimitPerRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1} + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{2} } func (x *RateLimitPerRoute) GetVhRateLimits() RateLimitPerRoute_VhRateLimitsOptions { @@ -340,168 +563,1285 @@ func (x *RateLimitPerRoute) GetVhRateLimits() RateLimitPerRoute_VhRateLimitsOpti return RateLimitPerRoute_OVERRIDE } -var File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto protoreflect.FileDescriptor +func (x *RateLimitPerRoute) GetOverrideOption() RateLimitPerRoute_OverrideOptions { + if x != nil { + return x.OverrideOption + } + return RateLimitPerRoute_DEFAULT +} -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x06, 0x0a, 0x09, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, - 0x42, 0x1e, 0x72, 0x1c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x08, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x04, 0x62, 0x6f, 0x74, 0x68, 0x52, 0x00, - 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x4a, - 0x0a, 0x22, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x78, 0x68, 0x61, 0x75, - 0x73, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x72, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x41, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x45, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x69, 0x0a, 0x12, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x58, - 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x4a, 0x0a, 0x22, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x58, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x52, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x1b, - 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, - 0x46, 0x46, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x52, 0x41, 0x46, 0x54, 0x5f, 0x56, 0x45, - 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x30, 0x33, 0x10, 0x01, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, - 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0e, 0x76, 0x68, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0c, 0x76, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x3c, 0x0a, - 0x13, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x02, 0x42, 0x54, 0x0a, 0x38, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *RateLimitPerRoute) GetRateLimits() []*RateLimitConfig { + if x != nil { + return x.RateLimits + } + return nil } -var ( - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc -) +// [#next-free-field: 10] +type RateLimitConfig_Action struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData + // Types that are assignable to ActionSpecifier: + // *RateLimitConfig_Action_SourceCluster_ + // *RateLimitConfig_Action_DestinationCluster_ + // *RateLimitConfig_Action_RequestHeaders_ + // *RateLimitConfig_Action_RemoteAddress_ + // *RateLimitConfig_Action_GenericKey_ + // *RateLimitConfig_Action_HeaderValueMatch_ + // *RateLimitConfig_Action_Metadata + // *RateLimitConfig_Action_Extension + ActionSpecifier isRateLimitConfig_Action_ActionSpecifier `protobuf_oneof:"action_specifier"` } -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_goTypes = []interface{}{ - (RateLimit_XRateLimitHeadersRFCVersion)(0), // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion - (RateLimitPerRoute_VhRateLimitsOptions)(0), // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions - (*RateLimit)(nil), // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimit - (*RateLimitPerRoute)(nil), // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute - (*duration.Duration)(nil), // 4: google.protobuf.Duration - (*v3.RateLimitServiceConfig)(nil), // 5: envoy.config.ratelimit.v3.RateLimitServiceConfig +func (x *RateLimitConfig_Action) Reset() { + *x = RateLimitConfig_Action{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_depIdxs = []int32{ - 4, // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.timeout:type_name -> google.protobuf.Duration - 5, // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v3.RateLimitServiceConfig - 0, // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimit.enable_x_ratelimit_headers:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion - 1, // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + +func (x *RateLimitConfig_Action) String() string { + return protoimpl.X.MessageStringOf(x) } -func init() { file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() } -func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() { - if File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitPerRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } +func (*RateLimitConfig_Action) ProtoMessage() {} + +func (x *RateLimitConfig_Action) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0} +} + +func (m *RateLimitConfig_Action) GetActionSpecifier() isRateLimitConfig_Action_ActionSpecifier { + if m != nil { + return m.ActionSpecifier + } + return nil +} + +func (x *RateLimitConfig_Action) GetSourceCluster() *RateLimitConfig_Action_SourceCluster { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_SourceCluster_); ok { + return x.SourceCluster + } + return nil +} + +func (x *RateLimitConfig_Action) GetDestinationCluster() *RateLimitConfig_Action_DestinationCluster { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_DestinationCluster_); ok { + return x.DestinationCluster + } + return nil +} + +func (x *RateLimitConfig_Action) GetRequestHeaders() *RateLimitConfig_Action_RequestHeaders { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_RequestHeaders_); ok { + return x.RequestHeaders + } + return nil +} + +func (x *RateLimitConfig_Action) GetRemoteAddress() *RateLimitConfig_Action_RemoteAddress { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_RemoteAddress_); ok { + return x.RemoteAddress + } + return nil +} + +func (x *RateLimitConfig_Action) GetGenericKey() *RateLimitConfig_Action_GenericKey { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_GenericKey_); ok { + return x.GenericKey + } + return nil +} + +func (x *RateLimitConfig_Action) GetHeaderValueMatch() *RateLimitConfig_Action_HeaderValueMatch { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_HeaderValueMatch_); ok { + return x.HeaderValueMatch + } + return nil +} + +func (x *RateLimitConfig_Action) GetMetadata() *RateLimitConfig_Action_MetaData { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_Metadata); ok { + return x.Metadata + } + return nil +} + +func (x *RateLimitConfig_Action) GetExtension() *v32.TypedExtensionConfig { + if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_Extension); ok { + return x.Extension + } + return nil +} + +type isRateLimitConfig_Action_ActionSpecifier interface { + isRateLimitConfig_Action_ActionSpecifier() +} + +type RateLimitConfig_Action_SourceCluster_ struct { + // Rate limit on source cluster. + SourceCluster *RateLimitConfig_Action_SourceCluster `protobuf:"bytes,1,opt,name=source_cluster,json=sourceCluster,proto3,oneof"` +} + +type RateLimitConfig_Action_DestinationCluster_ struct { + // Rate limit on destination cluster. + DestinationCluster *RateLimitConfig_Action_DestinationCluster `protobuf:"bytes,2,opt,name=destination_cluster,json=destinationCluster,proto3,oneof"` +} + +type RateLimitConfig_Action_RequestHeaders_ struct { + // Rate limit on request headers. + RequestHeaders *RateLimitConfig_Action_RequestHeaders `protobuf:"bytes,3,opt,name=request_headers,json=requestHeaders,proto3,oneof"` +} + +type RateLimitConfig_Action_RemoteAddress_ struct { + // Rate limit on remote address. + RemoteAddress *RateLimitConfig_Action_RemoteAddress `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3,oneof"` +} + +type RateLimitConfig_Action_GenericKey_ struct { + // Rate limit on a generic key. + GenericKey *RateLimitConfig_Action_GenericKey `protobuf:"bytes,5,opt,name=generic_key,json=genericKey,proto3,oneof"` +} + +type RateLimitConfig_Action_HeaderValueMatch_ struct { + // Rate limit on the existence of request headers. + HeaderValueMatch *RateLimitConfig_Action_HeaderValueMatch `protobuf:"bytes,6,opt,name=header_value_match,json=headerValueMatch,proto3,oneof"` +} + +type RateLimitConfig_Action_Metadata struct { + // Rate limit on metadata. + Metadata *RateLimitConfig_Action_MetaData `protobuf:"bytes,8,opt,name=metadata,proto3,oneof"` +} + +type RateLimitConfig_Action_Extension struct { + // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. + // [#extension-category: envoy.rate_limit_descriptors] + Extension *v32.TypedExtensionConfig `protobuf:"bytes,9,opt,name=extension,proto3,oneof"` +} + +func (*RateLimitConfig_Action_SourceCluster_) isRateLimitConfig_Action_ActionSpecifier() {} + +func (*RateLimitConfig_Action_DestinationCluster_) isRateLimitConfig_Action_ActionSpecifier() {} + +func (*RateLimitConfig_Action_RequestHeaders_) isRateLimitConfig_Action_ActionSpecifier() {} + +func (*RateLimitConfig_Action_RemoteAddress_) isRateLimitConfig_Action_ActionSpecifier() {} + +func (*RateLimitConfig_Action_GenericKey_) isRateLimitConfig_Action_ActionSpecifier() {} + +func (*RateLimitConfig_Action_HeaderValueMatch_) isRateLimitConfig_Action_ActionSpecifier() {} + +func (*RateLimitConfig_Action_Metadata) isRateLimitConfig_Action_ActionSpecifier() {} + +func (*RateLimitConfig_Action_Extension) isRateLimitConfig_Action_ActionSpecifier() {} + +type RateLimitConfig_Override struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to OverrideSpecifier: + // *RateLimitConfig_Override_DynamicMetadata_ + OverrideSpecifier isRateLimitConfig_Override_OverrideSpecifier `protobuf_oneof:"override_specifier"` +} + +func (x *RateLimitConfig_Override) Reset() { + *x = RateLimitConfig_Override{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Override) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Override) ProtoMessage() {} + +func (x *RateLimitConfig_Override) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Override.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Override) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 1} +} + +func (m *RateLimitConfig_Override) GetOverrideSpecifier() isRateLimitConfig_Override_OverrideSpecifier { + if m != nil { + return m.OverrideSpecifier + } + return nil +} + +func (x *RateLimitConfig_Override) GetDynamicMetadata() *RateLimitConfig_Override_DynamicMetadata { + if x, ok := x.GetOverrideSpecifier().(*RateLimitConfig_Override_DynamicMetadata_); ok { + return x.DynamicMetadata + } + return nil +} + +type isRateLimitConfig_Override_OverrideSpecifier interface { + isRateLimitConfig_Override_OverrideSpecifier() +} + +type RateLimitConfig_Override_DynamicMetadata_ struct { + // Limit override from dynamic metadata. + DynamicMetadata *RateLimitConfig_Override_DynamicMetadata `protobuf:"bytes,1,opt,name=dynamic_metadata,json=dynamicMetadata,proto3,oneof"` +} + +func (*RateLimitConfig_Override_DynamicMetadata_) isRateLimitConfig_Override_OverrideSpecifier() {} + +// The following descriptor entry is appended to the descriptor: +// +// .. code-block:: cpp +// +// ("source_cluster", "") +// +// is derived from the :option:`--service-cluster` option. +type RateLimitConfig_Action_SourceCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RateLimitConfig_Action_SourceCluster) Reset() { + *x = RateLimitConfig_Action_SourceCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Action_SourceCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Action_SourceCluster) ProtoMessage() {} + +func (x *RateLimitConfig_Action_SourceCluster) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action_SourceCluster.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action_SourceCluster) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 0} +} + +// The following descriptor entry is appended to the descriptor: +// +// .. code-block:: cpp +// +// ("destination_cluster", "") +// +// Once a request matches against a route table rule, a routed cluster is determined by one of +// the following :ref:`route table configuration ` +// settings: +// +// * :ref:`cluster ` indicates the upstream cluster +// to route to. +// * :ref:`weighted_clusters ` +// chooses a cluster randomly from a set of clusters with attributed weight. +// * :ref:`cluster_header ` indicates which +// header in the request contains the target cluster. +type RateLimitConfig_Action_DestinationCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RateLimitConfig_Action_DestinationCluster) Reset() { + *x = RateLimitConfig_Action_DestinationCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Action_DestinationCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Action_DestinationCluster) ProtoMessage() {} + +func (x *RateLimitConfig_Action_DestinationCluster) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action_DestinationCluster.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action_DestinationCluster) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 1} +} + +// The following descriptor entry is appended when a header contains a key that matches the +// *header_name*: +// +// .. code-block:: cpp +// +// ("", "") +type RateLimitConfig_Action_RequestHeaders struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The header name to be queried from the request headers. The header’s + // value is used to populate the value of the descriptor entry for the + // descriptor_key. + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` + // The key to use in the descriptor entry. + DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` + // If set to true, Envoy skips the descriptor while calling rate limiting service + // when header is not present in the request. By default it skips calling the + // rate limiting service if this header is not present in the request. + SkipIfAbsent bool `protobuf:"varint,3,opt,name=skip_if_absent,json=skipIfAbsent,proto3" json:"skip_if_absent,omitempty"` +} + +func (x *RateLimitConfig_Action_RequestHeaders) Reset() { + *x = RateLimitConfig_Action_RequestHeaders{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Action_RequestHeaders) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Action_RequestHeaders) ProtoMessage() {} + +func (x *RateLimitConfig_Action_RequestHeaders) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action_RequestHeaders.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action_RequestHeaders) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 2} +} + +func (x *RateLimitConfig_Action_RequestHeaders) GetHeaderName() string { + if x != nil { + return x.HeaderName + } + return "" +} + +func (x *RateLimitConfig_Action_RequestHeaders) GetDescriptorKey() string { + if x != nil { + return x.DescriptorKey + } + return "" +} + +func (x *RateLimitConfig_Action_RequestHeaders) GetSkipIfAbsent() bool { + if x != nil { + return x.SkipIfAbsent + } + return false +} + +// The following descriptor entry is appended to the descriptor and is populated using the +// trusted address from :ref:`x-forwarded-for `: +// +// .. code-block:: cpp +// +// ("remote_address", "") +type RateLimitConfig_Action_RemoteAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RateLimitConfig_Action_RemoteAddress) Reset() { + *x = RateLimitConfig_Action_RemoteAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Action_RemoteAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Action_RemoteAddress) ProtoMessage() {} + +func (x *RateLimitConfig_Action_RemoteAddress) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action_RemoteAddress.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action_RemoteAddress) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 3} +} + +// The following descriptor entry is appended to the descriptor: +// +// .. code-block:: cpp +// +// ("generic_key", "") +type RateLimitConfig_Action_GenericKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The value to use in the descriptor entry. + DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` + // An optional key to use in the descriptor entry. If not set it defaults + // to 'generic_key' as the descriptor key. + DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` +} + +func (x *RateLimitConfig_Action_GenericKey) Reset() { + *x = RateLimitConfig_Action_GenericKey{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Action_GenericKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Action_GenericKey) ProtoMessage() {} + +func (x *RateLimitConfig_Action_GenericKey) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action_GenericKey.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action_GenericKey) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 4} +} + +func (x *RateLimitConfig_Action_GenericKey) GetDescriptorValue() string { + if x != nil { + return x.DescriptorValue + } + return "" +} + +func (x *RateLimitConfig_Action_GenericKey) GetDescriptorKey() string { + if x != nil { + return x.DescriptorKey + } + return "" +} + +// The following descriptor entry is appended to the descriptor: +// +// .. code-block:: cpp +// +// ("header_match", "") +type RateLimitConfig_Action_HeaderValueMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The value to use in the descriptor entry. + DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` + // 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 bool `protobuf:"varint,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 []*v33.HeaderMatcher `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *RateLimitConfig_Action_HeaderValueMatch) Reset() { + *x = RateLimitConfig_Action_HeaderValueMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Action_HeaderValueMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Action_HeaderValueMatch) ProtoMessage() {} + +func (x *RateLimitConfig_Action_HeaderValueMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action_HeaderValueMatch.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 5} +} + +func (x *RateLimitConfig_Action_HeaderValueMatch) GetDescriptorValue() string { + if x != nil { + return x.DescriptorValue + } + return "" +} + +func (x *RateLimitConfig_Action_HeaderValueMatch) GetExpectMatch() bool { + if x != nil { + return x.ExpectMatch + } + return false +} + +func (x *RateLimitConfig_Action_HeaderValueMatch) GetHeaders() []*v33.HeaderMatcher { + if x != nil { + return x.Headers + } + return nil +} + +// The following descriptor entry is appended when the metadata contains a key value: +// +// .. code-block:: cpp +// +// ("", "") +type RateLimitConfig_Action_MetaData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The key to use in the descriptor entry. + DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` + // Metadata struct that defines the key and path to retrieve the string value. A match will + // only happen if the value in the metadata is of type string. + MetadataKey *v34.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` + // An optional value to use if *metadata_key* is empty. If not set and + // no value is present under the metadata_key then no descriptor is generated. + DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + // Source of metadata + Source RateLimitConfig_Action_MetaData_Source `protobuf:"varint,4,opt,name=source,proto3,enum=envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig_Action_MetaData_Source" json:"source,omitempty"` +} + +func (x *RateLimitConfig_Action_MetaData) Reset() { + *x = RateLimitConfig_Action_MetaData{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Action_MetaData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Action_MetaData) ProtoMessage() {} + +func (x *RateLimitConfig_Action_MetaData) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Action_MetaData.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Action_MetaData) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 6} +} + +func (x *RateLimitConfig_Action_MetaData) GetDescriptorKey() string { + if x != nil { + return x.DescriptorKey + } + return "" +} + +func (x *RateLimitConfig_Action_MetaData) GetMetadataKey() *v34.MetadataKey { + if x != nil { + return x.MetadataKey + } + return nil +} + +func (x *RateLimitConfig_Action_MetaData) GetDefaultValue() string { + if x != nil { + return x.DefaultValue + } + return "" +} + +func (x *RateLimitConfig_Action_MetaData) GetSource() RateLimitConfig_Action_MetaData_Source { + if x != nil { + return x.Source + } + return RateLimitConfig_Action_MetaData_DYNAMIC +} + +// Fetches the override from the dynamic metadata. +type RateLimitConfig_Override_DynamicMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata struct that defines the key and path to retrieve the struct value. + // The value must be a struct containing an integer "requests_per_unit" property + // and a "unit" property with a value parseable to :ref:`RateLimitUnit + // enum ` + MetadataKey *v34.MetadataKey `protobuf:"bytes,1,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` +} + +func (x *RateLimitConfig_Override_DynamicMetadata) Reset() { + *x = RateLimitConfig_Override_DynamicMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitConfig_Override_DynamicMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitConfig_Override_DynamicMetadata) ProtoMessage() {} + +func (x *RateLimitConfig_Override_DynamicMetadata) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitConfig_Override_DynamicMetadata.ProtoReflect.Descriptor instead. +func (*RateLimitConfig_Override_DynamicMetadata) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 1, 0} +} + +func (x *RateLimitConfig_Override_DynamicMetadata) GetMetadataKey() *v34.MetadataKey { + if x != nil { + return x.MetadataKey + } + return nil +} + +var File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x06, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, 0x42, 0x1e, 0x72, 0x1c, + 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x04, 0x62, 0x6f, 0x74, 0x68, 0x52, 0x00, 0x52, 0x0b, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2a, + 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x64, + 0x65, 0x6e, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x4a, 0x0a, 0x22, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x65, 0x64, 0x41, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x68, + 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x69, 0x0a, 0x12, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x98, 0x01, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x58, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x58, 0x52, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x22, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x58, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x1b, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x46, 0x46, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x44, + 0x52, 0x41, 0x46, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x30, 0x33, 0x10, + 0x01, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xba, 0x12, 0x0a, 0x0f, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x66, + 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x1a, 0x91, 0x0e, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, + 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x55, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x7c, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, + 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x79, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x70, 0x0a, 0x0b, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x48, 0x00, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x83, + 0x01, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x48, 0x00, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x69, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, + 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x4a, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, + 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x0f, 0x0a, 0x0d, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x14, 0x0a, 0x12, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x1a, 0x96, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, + 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x69, 0x66, + 0x5f, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, + 0x6b, 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x1a, 0x0f, 0x0a, 0x0d, 0x52, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x67, 0x0a, 0x0a, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x1a, 0xb3, 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x48, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0xcf, 0x02, 0x0a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x74, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x26, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x0b, 0x0a, 0x07, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, + 0x52, 0x4f, 0x55, 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x01, 0x42, 0x17, 0x0a, + 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x8e, 0x02, 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x63, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x19, 0x0a, 0x12, + 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x92, 0x04, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x81, 0x01, + 0x0a, 0x0e, 0x76, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0c, 0x76, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4d, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x73, 0x22, 0x3c, 0x0a, 0x13, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x56, 0x45, + 0x52, 0x52, 0x49, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, + 0x44, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x02, + 0x22, 0x5a, 0x0a, 0x0f, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, + 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x5f, 0x50, 0x4f, 0x4c, + 0x49, 0x43, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x47, 0x4e, + 0x4f, 0x52, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x03, 0x42, 0xb3, 0x01, 0x0a, + 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc +) + +func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData +} + +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_goTypes = []interface{}{ + (RateLimit_XRateLimitHeadersRFCVersion)(0), // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion + (RateLimitConfig_Action_MetaData_Source)(0), // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.Source + (RateLimitPerRoute_VhRateLimitsOptions)(0), // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions + (RateLimitPerRoute_OverrideOptions)(0), // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.OverrideOptions + (*RateLimit)(nil), // 4: envoy.extensions.filters.http.ratelimit.v3.RateLimit + (*RateLimitConfig)(nil), // 5: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig + (*RateLimitPerRoute)(nil), // 6: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute + (*RateLimitConfig_Action)(nil), // 7: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action + (*RateLimitConfig_Override)(nil), // 8: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override + (*RateLimitConfig_Action_SourceCluster)(nil), // 9: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.SourceCluster + (*RateLimitConfig_Action_DestinationCluster)(nil), // 10: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.DestinationCluster + (*RateLimitConfig_Action_RequestHeaders)(nil), // 11: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RequestHeaders + (*RateLimitConfig_Action_RemoteAddress)(nil), // 12: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RemoteAddress + (*RateLimitConfig_Action_GenericKey)(nil), // 13: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.GenericKey + (*RateLimitConfig_Action_HeaderValueMatch)(nil), // 14: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.HeaderValueMatch + (*RateLimitConfig_Action_MetaData)(nil), // 15: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData + (*RateLimitConfig_Override_DynamicMetadata)(nil), // 16: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.DynamicMetadata + (*duration.Duration)(nil), // 17: google.protobuf.Duration + (*v3.RateLimitServiceConfig)(nil), // 18: envoy.config.ratelimit.v3.RateLimitServiceConfig + (*v31.HttpStatus)(nil), // 19: envoy.type.v3.HttpStatus + (*v32.TypedExtensionConfig)(nil), // 20: envoy.config.core.v3.TypedExtensionConfig + (*v33.HeaderMatcher)(nil), // 21: envoy.config.route.v3.HeaderMatcher + (*v34.MetadataKey)(nil), // 22: envoy.type.metadata.v3.MetadataKey +} +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_depIdxs = []int32{ + 17, // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.timeout:type_name -> google.protobuf.Duration + 18, // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v3.RateLimitServiceConfig + 0, // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimit.enable_x_ratelimit_headers:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion + 19, // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimit.rate_limited_status:type_name -> envoy.type.v3.HttpStatus + 7, // 4: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.actions:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action + 8, // 5: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.limit:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override + 2, // 6: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions + 3, // 7: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.override_option:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.OverrideOptions + 5, // 8: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.rate_limits:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig + 9, // 9: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.source_cluster:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.SourceCluster + 10, // 10: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.destination_cluster:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.DestinationCluster + 11, // 11: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.request_headers:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RequestHeaders + 12, // 12: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.remote_address:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RemoteAddress + 13, // 13: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.generic_key:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.GenericKey + 14, // 14: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.header_value_match:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.HeaderValueMatch + 15, // 15: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.metadata:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData + 20, // 16: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.extension:type_name -> envoy.config.core.v3.TypedExtensionConfig + 16, // 17: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.dynamic_metadata:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.DynamicMetadata + 21, // 18: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.HeaderValueMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 22, // 19: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey + 1, // 20: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.source:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.Source + 22, // 21: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.DynamicMetadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() } +func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() { + if File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Override); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action_SourceCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action_DestinationCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action_RequestHeaders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action_RemoteAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action_GenericKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action_HeaderValueMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Action_MetaData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitConfig_Override_DynamicMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*RateLimitConfig_Action_SourceCluster_)(nil), + (*RateLimitConfig_Action_DestinationCluster_)(nil), + (*RateLimitConfig_Action_RequestHeaders_)(nil), + (*RateLimitConfig_Action_RemoteAddress_)(nil), + (*RateLimitConfig_Action_GenericKey_)(nil), + (*RateLimitConfig_Action_HeaderValueMatch_)(nil), + (*RateLimitConfig_Action_Metadata)(nil), + (*RateLimitConfig_Action_Extension)(nil), + } + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*RateLimitConfig_Override_DynamicMetadata_)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, + NumEnums: 4, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go index 7ac1903f2f..20af095795 100644 --- a/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto -package envoy_extensions_filters_http_ratelimit_v3 +package ratelimitv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,38 +31,85 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetDomain()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Domain", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetStage() > 10 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Stage", reason: "value must be less than or equal to 10", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := _RateLimit_RequestType_InLookup[m.GetRequestType()]; !ok { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RequestType", reason: "value must be in list [internal external both ]", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "Timeout", @@ -76,13 +124,36 @@ func (m *RateLimit) Validate() error { // no validation rules for RateLimitedAsResourceExhausted if m.GetRateLimitService() == nil { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RateLimitService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "RateLimitService", @@ -93,17 +164,70 @@ func (m *RateLimit) Validate() error { } if _, ok := RateLimit_XRateLimitHeadersRFCVersion_name[int32(m.GetEnableXRatelimitHeaders())]; !ok { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "EnableXRatelimitHeaders", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DisableXEnvoyRatelimitedHeader + if all { + switch v := interface{}(m.GetRateLimitedStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitedStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitedStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitedStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitValidationError{ + field: "RateLimitedStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { @@ -165,24 +289,295 @@ var _RateLimit_RequestType_InLookup = map[string]struct{}{ "": {}, } +// Validate checks the field values on RateLimitConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *RateLimitConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitConfigMultiError, or nil if none found. +func (m *RateLimitConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetStage() > 10 { + err := RateLimitConfigValidationError{ + field: "Stage", + reason: "value must be less than or equal to 10", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for DisableKey + + if len(m.GetActions()) < 1 { + err := RateLimitConfigValidationError{ + field: "Actions", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetActions() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfigValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfigValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfigValidationError{ + field: fmt.Sprintf("Actions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfigValidationError{ + field: "Limit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfigValidationError{ + field: "Limit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfigValidationError{ + field: "Limit", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitConfigMultiError(errors) + } + + return nil +} + +// RateLimitConfigMultiError is an error wrapping multiple validation errors +// returned by RateLimitConfig.ValidateAll() if the designated constraints +// aren't met. +type RateLimitConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfigMultiError) AllErrors() []error { return m } + +// RateLimitConfigValidationError is the validation error returned by +// RateLimitConfig.Validate if the designated constraints aren't met. +type RateLimitConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfigValidationError) ErrorName() string { return "RateLimitConfigValidationError" } + +// Error satisfies the builtin error interface +func (e RateLimitConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRateLimitConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfigValidationError{} + // Validate checks the field values on RateLimitPerRoute with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimitPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitPerRouteMultiError, or nil if none found. +func (m *RateLimitPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := RateLimitPerRoute_VhRateLimitsOptions_name[int32(m.GetVhRateLimits())]; !ok { - return RateLimitPerRouteValidationError{ + err := RateLimitPerRouteValidationError{ field: "VhRateLimits", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := RateLimitPerRoute_OverrideOptions_name[int32(m.GetOverrideOption())]; !ok { + err := RateLimitPerRouteValidationError{ + field: "OverrideOption", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRateLimits() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitPerRouteValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitPerRouteValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitPerRouteValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitPerRouteMultiError(errors) } return nil } +// RateLimitPerRouteMultiError is an error wrapping multiple validation errors +// returned by RateLimitPerRoute.ValidateAll() if the designated constraints +// aren't met. +type RateLimitPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitPerRouteMultiError) AllErrors() []error { return m } + // RateLimitPerRouteValidationError is the validation error returned by // RateLimitPerRoute.Validate if the designated constraints aren't met. type RateLimitPerRouteValidationError struct { @@ -238,3 +633,1567 @@ var _ interface { Cause() error ErrorName() string } = RateLimitPerRouteValidationError{} + +// Validate checks the field values on RateLimitConfig_Action with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RateLimitConfig_Action) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig_Action with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitConfig_ActionMultiError, or nil if none found. +func (m *RateLimitConfig_Action) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ActionSpecifier.(type) { + + case *RateLimitConfig_Action_SourceCluster_: + + if all { + switch v := interface{}(m.GetSourceCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "SourceCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "SourceCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "SourceCluster", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitConfig_Action_DestinationCluster_: + + if all { + switch v := interface{}(m.GetDestinationCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "DestinationCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "DestinationCluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "DestinationCluster", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitConfig_Action_RequestHeaders_: + + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitConfig_Action_RemoteAddress_: + + if all { + switch v := interface{}(m.GetRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitConfig_Action_GenericKey_: + + if all { + switch v := interface{}(m.GetGenericKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "GenericKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "GenericKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "GenericKey", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitConfig_Action_HeaderValueMatch_: + + if all { + switch v := interface{}(m.GetHeaderValueMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "HeaderValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "HeaderValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "HeaderValueMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitConfig_Action_Metadata: + + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitConfig_Action_Extension: + + if all { + switch v := interface{}(m.GetExtension()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_ActionValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_ActionValidationError{ + field: "Extension", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RateLimitConfig_ActionValidationError{ + field: "ActionSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RateLimitConfig_ActionMultiError(errors) + } + + return nil +} + +// RateLimitConfig_ActionMultiError is an error wrapping multiple validation +// errors returned by RateLimitConfig_Action.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_ActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_ActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_ActionMultiError) AllErrors() []error { return m } + +// RateLimitConfig_ActionValidationError is the validation error returned by +// RateLimitConfig_Action.Validate if the designated constraints aren't met. +type RateLimitConfig_ActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_ActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_ActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_ActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_ActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_ActionValidationError) ErrorName() string { + return "RateLimitConfig_ActionValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_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 %sRateLimitConfig_Action.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_ActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_ActionValidationError{} + +// Validate checks the field values on RateLimitConfig_Override with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RateLimitConfig_Override) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig_Override with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitConfig_OverrideMultiError, or nil if none found. +func (m *RateLimitConfig_Override) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Override) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.OverrideSpecifier.(type) { + + case *RateLimitConfig_Override_DynamicMetadata_: + + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_OverrideValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_OverrideValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_OverrideValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RateLimitConfig_OverrideValidationError{ + field: "OverrideSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RateLimitConfig_OverrideMultiError(errors) + } + + return nil +} + +// RateLimitConfig_OverrideMultiError is an error wrapping multiple validation +// errors returned by RateLimitConfig_Override.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_OverrideMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_OverrideMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_OverrideMultiError) AllErrors() []error { return m } + +// RateLimitConfig_OverrideValidationError is the validation error returned by +// RateLimitConfig_Override.Validate if the designated constraints aren't met. +type RateLimitConfig_OverrideValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_OverrideValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_OverrideValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_OverrideValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_OverrideValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_OverrideValidationError) ErrorName() string { + return "RateLimitConfig_OverrideValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_OverrideValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRateLimitConfig_Override.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_OverrideValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_OverrideValidationError{} + +// Validate checks the field values on RateLimitConfig_Action_SourceCluster +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *RateLimitConfig_Action_SourceCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig_Action_SourceCluster +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimitConfig_Action_SourceClusterMultiError, or nil if none found. +func (m *RateLimitConfig_Action_SourceCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action_SourceCluster) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RateLimitConfig_Action_SourceClusterMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Action_SourceClusterMultiError is an error wrapping multiple +// validation errors returned by +// RateLimitConfig_Action_SourceCluster.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_Action_SourceClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Action_SourceClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Action_SourceClusterMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Action_SourceClusterValidationError is the validation error +// returned by RateLimitConfig_Action_SourceCluster.Validate if the designated +// constraints aren't met. +type RateLimitConfig_Action_SourceClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Action_SourceClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Action_SourceClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Action_SourceClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Action_SourceClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Action_SourceClusterValidationError) ErrorName() string { + return "RateLimitConfig_Action_SourceClusterValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_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 %sRateLimitConfig_Action_SourceCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Action_SourceClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Action_SourceClusterValidationError{} + +// Validate checks the field values on +// RateLimitConfig_Action_DestinationCluster with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RateLimitConfig_Action_DestinationCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitConfig_Action_DestinationCluster with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// RateLimitConfig_Action_DestinationClusterMultiError, or nil if none found. +func (m *RateLimitConfig_Action_DestinationCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action_DestinationCluster) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RateLimitConfig_Action_DestinationClusterMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Action_DestinationClusterMultiError is an error wrapping +// multiple validation errors returned by +// RateLimitConfig_Action_DestinationCluster.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_Action_DestinationClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Action_DestinationClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Action_DestinationClusterMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Action_DestinationClusterValidationError is the validation +// error returned by RateLimitConfig_Action_DestinationCluster.Validate if the +// designated constraints aren't met. +type RateLimitConfig_Action_DestinationClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Action_DestinationClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Action_DestinationClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Action_DestinationClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Action_DestinationClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Action_DestinationClusterValidationError) ErrorName() string { + return "RateLimitConfig_Action_DestinationClusterValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_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 %sRateLimitConfig_Action_DestinationCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Action_DestinationClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Action_DestinationClusterValidationError{} + +// Validate checks the field values on RateLimitConfig_Action_RequestHeaders +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *RateLimitConfig_Action_RequestHeaders) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig_Action_RequestHeaders +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimitConfig_Action_RequestHeadersMultiError, or nil if none found. +func (m *RateLimitConfig_Action_RequestHeaders) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action_RequestHeaders) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetHeaderName()) < 1 { + err := RateLimitConfig_Action_RequestHeadersValidationError{ + field: "HeaderName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_RateLimitConfig_Action_RequestHeaders_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + err := RateLimitConfig_Action_RequestHeadersValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { + err := RateLimitConfig_Action_RequestHeadersValidationError{ + field: "DescriptorKey", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for SkipIfAbsent + + if len(errors) > 0 { + return RateLimitConfig_Action_RequestHeadersMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Action_RequestHeadersMultiError is an error wrapping +// multiple validation errors returned by +// RateLimitConfig_Action_RequestHeaders.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_Action_RequestHeadersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Action_RequestHeadersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Action_RequestHeadersMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Action_RequestHeadersValidationError is the validation error +// returned by RateLimitConfig_Action_RequestHeaders.Validate if the +// designated constraints aren't met. +type RateLimitConfig_Action_RequestHeadersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Action_RequestHeadersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Action_RequestHeadersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Action_RequestHeadersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Action_RequestHeadersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Action_RequestHeadersValidationError) ErrorName() string { + return "RateLimitConfig_Action_RequestHeadersValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_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 %sRateLimitConfig_Action_RequestHeaders.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Action_RequestHeadersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Action_RequestHeadersValidationError{} + +var _RateLimitConfig_Action_RequestHeaders_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on RateLimitConfig_Action_RemoteAddress +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *RateLimitConfig_Action_RemoteAddress) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig_Action_RemoteAddress +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimitConfig_Action_RemoteAddressMultiError, or nil if none found. +func (m *RateLimitConfig_Action_RemoteAddress) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action_RemoteAddress) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RateLimitConfig_Action_RemoteAddressMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Action_RemoteAddressMultiError is an error wrapping multiple +// validation errors returned by +// RateLimitConfig_Action_RemoteAddress.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_Action_RemoteAddressMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Action_RemoteAddressMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Action_RemoteAddressMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Action_RemoteAddressValidationError is the validation error +// returned by RateLimitConfig_Action_RemoteAddress.Validate if the designated +// constraints aren't met. +type RateLimitConfig_Action_RemoteAddressValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Action_RemoteAddressValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Action_RemoteAddressValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Action_RemoteAddressValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Action_RemoteAddressValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Action_RemoteAddressValidationError) ErrorName() string { + return "RateLimitConfig_Action_RemoteAddressValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_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 %sRateLimitConfig_Action_RemoteAddress.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Action_RemoteAddressValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Action_RemoteAddressValidationError{} + +// Validate checks the field values on RateLimitConfig_Action_GenericKey with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *RateLimitConfig_Action_GenericKey) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig_Action_GenericKey +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimitConfig_Action_GenericKeyMultiError, or nil if none found. +func (m *RateLimitConfig_Action_GenericKey) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action_GenericKey) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { + err := RateLimitConfig_Action_GenericKeyValidationError{ + field: "DescriptorValue", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for DescriptorKey + + if len(errors) > 0 { + return RateLimitConfig_Action_GenericKeyMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Action_GenericKeyMultiError is an error wrapping multiple +// validation errors returned by +// RateLimitConfig_Action_GenericKey.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_Action_GenericKeyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Action_GenericKeyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Action_GenericKeyMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Action_GenericKeyValidationError is the validation error +// returned by RateLimitConfig_Action_GenericKey.Validate if the designated +// constraints aren't met. +type RateLimitConfig_Action_GenericKeyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Action_GenericKeyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Action_GenericKeyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Action_GenericKeyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Action_GenericKeyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Action_GenericKeyValidationError) ErrorName() string { + return "RateLimitConfig_Action_GenericKeyValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_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 %sRateLimitConfig_Action_GenericKey.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Action_GenericKeyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Action_GenericKeyValidationError{} + +// Validate checks the field values on RateLimitConfig_Action_HeaderValueMatch +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *RateLimitConfig_Action_HeaderValueMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitConfig_Action_HeaderValueMatch with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// RateLimitConfig_Action_HeaderValueMatchMultiError, or nil if none found. +func (m *RateLimitConfig_Action_HeaderValueMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action_HeaderValueMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { + err := RateLimitConfig_Action_HeaderValueMatchValidationError{ + field: "DescriptorValue", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for ExpectMatch + + if len(m.GetHeaders()) < 1 { + err := RateLimitConfig_Action_HeaderValueMatchValidationError{ + field: "Headers", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_Action_HeaderValueMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_Action_HeaderValueMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_Action_HeaderValueMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitConfig_Action_HeaderValueMatchMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Action_HeaderValueMatchMultiError is an error wrapping +// multiple validation errors returned by +// RateLimitConfig_Action_HeaderValueMatch.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_Action_HeaderValueMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Action_HeaderValueMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Action_HeaderValueMatchMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Action_HeaderValueMatchValidationError is the validation +// error returned by RateLimitConfig_Action_HeaderValueMatch.Validate if the +// designated constraints aren't met. +type RateLimitConfig_Action_HeaderValueMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Action_HeaderValueMatchValidationError) ErrorName() string { + return "RateLimitConfig_Action_HeaderValueMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_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 %sRateLimitConfig_Action_HeaderValueMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Action_HeaderValueMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Action_HeaderValueMatchValidationError{} + +// Validate checks the field values on RateLimitConfig_Action_MetaData with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RateLimitConfig_Action_MetaData) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitConfig_Action_MetaData with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RateLimitConfig_Action_MetaDataMultiError, or nil if none found. +func (m *RateLimitConfig_Action_MetaData) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Action_MetaData) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { + err := RateLimitConfig_Action_MetaDataValidationError{ + field: "DescriptorKey", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetMetadataKey() == nil { + err := RateLimitConfig_Action_MetaDataValidationError{ + field: "MetadataKey", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMetadataKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_Action_MetaDataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_Action_MetaDataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_Action_MetaDataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for DefaultValue + + if _, ok := RateLimitConfig_Action_MetaData_Source_name[int32(m.GetSource())]; !ok { + err := RateLimitConfig_Action_MetaDataValidationError{ + field: "Source", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RateLimitConfig_Action_MetaDataMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Action_MetaDataMultiError is an error wrapping multiple +// validation errors returned by RateLimitConfig_Action_MetaData.ValidateAll() +// if the designated constraints aren't met. +type RateLimitConfig_Action_MetaDataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Action_MetaDataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Action_MetaDataMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Action_MetaDataValidationError is the validation error +// returned by RateLimitConfig_Action_MetaData.Validate if the designated +// constraints aren't met. +type RateLimitConfig_Action_MetaDataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Action_MetaDataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Action_MetaDataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Action_MetaDataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Action_MetaDataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Action_MetaDataValidationError) ErrorName() string { + return "RateLimitConfig_Action_MetaDataValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_Action_MetaDataValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRateLimitConfig_Action_MetaData.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Action_MetaDataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Action_MetaDataValidationError{} + +// Validate checks the field values on RateLimitConfig_Override_DynamicMetadata +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *RateLimitConfig_Override_DynamicMetadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitConfig_Override_DynamicMetadata with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// RateLimitConfig_Override_DynamicMetadataMultiError, or nil if none found. +func (m *RateLimitConfig_Override_DynamicMetadata) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitConfig_Override_DynamicMetadata) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMetadataKey() == nil { + err := RateLimitConfig_Override_DynamicMetadataValidationError{ + field: "MetadataKey", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMetadataKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitConfig_Override_DynamicMetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitConfig_Override_DynamicMetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitConfig_Override_DynamicMetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitConfig_Override_DynamicMetadataMultiError(errors) + } + + return nil +} + +// RateLimitConfig_Override_DynamicMetadataMultiError is an error wrapping +// multiple validation errors returned by +// RateLimitConfig_Override_DynamicMetadata.ValidateAll() if the designated +// constraints aren't met. +type RateLimitConfig_Override_DynamicMetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitConfig_Override_DynamicMetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitConfig_Override_DynamicMetadataMultiError) AllErrors() []error { return m } + +// RateLimitConfig_Override_DynamicMetadataValidationError is the validation +// error returned by RateLimitConfig_Override_DynamicMetadata.Validate if the +// designated constraints aren't met. +type RateLimitConfig_Override_DynamicMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitConfig_Override_DynamicMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitConfig_Override_DynamicMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitConfig_Override_DynamicMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitConfig_Override_DynamicMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitConfig_Override_DynamicMetadataValidationError) ErrorName() string { + return "RateLimitConfig_Override_DynamicMetadataValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitConfig_Override_DynamicMetadataValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRateLimitConfig_Override_DynamicMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitConfig_Override_DynamicMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitConfig_Override_DynamicMetadataValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.pb.go b/pkg/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.pb.go deleted file mode 100644 index e20410b9a8..0000000000 --- a/pkg/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.pb.go +++ /dev/null @@ -1,524 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.proto - -package envoy_extensions_filters_http_ratelimit_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Defines the version of the standard to use for X-RateLimit headers. -type RateLimit_XRateLimitHeadersRFCVersion int32 - -const ( - // X-RateLimit headers disabled. - RateLimit_OFF RateLimit_XRateLimitHeadersRFCVersion = 0 - // Use `draft RFC Version 03 `_. - RateLimit_DRAFT_VERSION_03 RateLimit_XRateLimitHeadersRFCVersion = 1 -) - -// Enum value maps for RateLimit_XRateLimitHeadersRFCVersion. -var ( - RateLimit_XRateLimitHeadersRFCVersion_name = map[int32]string{ - 0: "OFF", - 1: "DRAFT_VERSION_03", - } - RateLimit_XRateLimitHeadersRFCVersion_value = map[string]int32{ - "OFF": 0, - "DRAFT_VERSION_03": 1, - } -) - -func (x RateLimit_XRateLimitHeadersRFCVersion) Enum() *RateLimit_XRateLimitHeadersRFCVersion { - p := new(RateLimit_XRateLimitHeadersRFCVersion) - *p = x - return p -} - -func (x RateLimit_XRateLimitHeadersRFCVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RateLimit_XRateLimitHeadersRFCVersion) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_enumTypes[0].Descriptor() -} - -func (RateLimit_XRateLimitHeadersRFCVersion) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_enumTypes[0] -} - -func (x RateLimit_XRateLimitHeadersRFCVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RateLimit_XRateLimitHeadersRFCVersion.Descriptor instead. -func (RateLimit_XRateLimitHeadersRFCVersion) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP(), []int{0, 0} -} - -type RateLimitPerRoute_VhRateLimitsOptions int32 - -const ( - // Use the virtual host rate limits unless the route has a rate limit policy. - RateLimitPerRoute_OVERRIDE RateLimitPerRoute_VhRateLimitsOptions = 0 - // Use the virtual host rate limits even if the route has a rate limit policy. - RateLimitPerRoute_INCLUDE RateLimitPerRoute_VhRateLimitsOptions = 1 - // Ignore the virtual host rate limits even if the route does not have a rate limit policy. - RateLimitPerRoute_IGNORE RateLimitPerRoute_VhRateLimitsOptions = 2 -) - -// Enum value maps for RateLimitPerRoute_VhRateLimitsOptions. -var ( - RateLimitPerRoute_VhRateLimitsOptions_name = map[int32]string{ - 0: "OVERRIDE", - 1: "INCLUDE", - 2: "IGNORE", - } - RateLimitPerRoute_VhRateLimitsOptions_value = map[string]int32{ - "OVERRIDE": 0, - "INCLUDE": 1, - "IGNORE": 2, - } -) - -func (x RateLimitPerRoute_VhRateLimitsOptions) Enum() *RateLimitPerRoute_VhRateLimitsOptions { - p := new(RateLimitPerRoute_VhRateLimitsOptions) - *p = x - return p -} - -func (x RateLimitPerRoute_VhRateLimitsOptions) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RateLimitPerRoute_VhRateLimitsOptions) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_enumTypes[1].Descriptor() -} - -func (RateLimitPerRoute_VhRateLimitsOptions) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_enumTypes[1] -} - -func (x RateLimitPerRoute_VhRateLimitsOptions) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RateLimitPerRoute_VhRateLimitsOptions.Descriptor instead. -func (RateLimitPerRoute_VhRateLimitsOptions) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP(), []int{1, 0} -} - -// [#next-free-field: 10] -type RateLimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The rate limit domain to use when calling the rate limit service. - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - // Specifies the rate limit configurations to be applied with the same - // stage number. If not set, the default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - Stage uint32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"` - // The type of requests the filter should apply to. The supported - // types are *internal*, *external* or *both*. A request is considered internal if - // :ref:`x-envoy-internal` is set to true. If - // :ref:`x-envoy-internal` is not set or false, a - // request is considered external. The filter defaults to *both*, and it will apply to all request - // types. - RequestType string `protobuf:"bytes,3,opt,name=request_type,json=requestType,proto3" json:"request_type,omitempty"` - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - Timeout *duration.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - FailureModeDeny bool `protobuf:"varint,5,opt,name=failure_mode_deny,json=failureModeDeny,proto3" json:"failure_mode_deny,omitempty"` - // Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead - // of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The - // HTTP code will be 200 for a gRPC response. - RateLimitedAsResourceExhausted bool `protobuf:"varint,6,opt,name=rate_limited_as_resource_exhausted,json=rateLimitedAsResourceExhausted,proto3" json:"rate_limited_as_resource_exhausted,omitempty"` - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - RateLimitService *v4alpha.RateLimitServiceConfig `protobuf:"bytes,7,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"` - // Defines the standard version to use for X-RateLimit headers emitted by the filter: - // - // * ``X-RateLimit-Limit`` - indicates the request-quota associated to the - // client in the current time-window followed by the description of the - // quota policy. The values are returned by the rate limiting service in - // :ref:`current_limit` - // field. Example: `10, 10;w=1;name="per-ip", 1000;w=3600`. - // * ``X-RateLimit-Remaining`` - indicates the remaining requests in the - // current time-window. The values are returned by the rate limiting service - // in :ref:`limit_remaining` - // field. - // * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of - // the current time-window. The values are returned by the rate limiting service - // in :ref:`duration_until_reset` - // field. - // - // In case rate limiting policy specifies more then one time window, the values - // above represent the window that is closest to reaching its limit. - // - // For more information about the headers specification see selected version of - // the `draft RFC `_. - // - // Disabled by default. - EnableXRatelimitHeaders RateLimit_XRateLimitHeadersRFCVersion `protobuf:"varint,8,opt,name=enable_x_ratelimit_headers,json=enableXRatelimitHeaders,proto3,enum=envoy.extensions.filters.http.ratelimit.v4alpha.RateLimit_XRateLimitHeadersRFCVersion" json:"enable_x_ratelimit_headers,omitempty"` - // Disables emitting the :ref:`x-envoy-ratelimited` header - // in case of rate limiting (i.e. 429 responses). - // Having this header not present potentially makes the request retriable. - DisableXEnvoyRatelimitedHeader bool `protobuf:"varint,9,opt,name=disable_x_envoy_ratelimited_header,json=disableXEnvoyRatelimitedHeader,proto3" json:"disable_x_envoy_ratelimited_header,omitempty"` -} - -func (x *RateLimit) Reset() { - *x = RateLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit) ProtoMessage() {} - -func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. -func (*RateLimit) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP(), []int{0} -} - -func (x *RateLimit) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *RateLimit) GetStage() uint32 { - if x != nil { - return x.Stage - } - return 0 -} - -func (x *RateLimit) GetRequestType() string { - if x != nil { - return x.RequestType - } - return "" -} - -func (x *RateLimit) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *RateLimit) GetFailureModeDeny() bool { - if x != nil { - return x.FailureModeDeny - } - return false -} - -func (x *RateLimit) GetRateLimitedAsResourceExhausted() bool { - if x != nil { - return x.RateLimitedAsResourceExhausted - } - return false -} - -func (x *RateLimit) GetRateLimitService() *v4alpha.RateLimitServiceConfig { - if x != nil { - return x.RateLimitService - } - return nil -} - -func (x *RateLimit) GetEnableXRatelimitHeaders() RateLimit_XRateLimitHeadersRFCVersion { - if x != nil { - return x.EnableXRatelimitHeaders - } - return RateLimit_OFF -} - -func (x *RateLimit) GetDisableXEnvoyRatelimitedHeader() bool { - if x != nil { - return x.DisableXEnvoyRatelimitedHeader - } - return false -} - -type RateLimitPerRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies if the rate limit filter should include the virtual host rate limits. - VhRateLimits RateLimitPerRoute_VhRateLimitsOptions `protobuf:"varint,1,opt,name=vh_rate_limits,json=vhRateLimits,proto3,enum=envoy.extensions.filters.http.ratelimit.v4alpha.RateLimitPerRoute_VhRateLimitsOptions" json:"vh_rate_limits,omitempty"` -} - -func (x *RateLimitPerRoute) Reset() { - *x = RateLimitPerRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitPerRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitPerRoute) ProtoMessage() {} - -func (x *RateLimitPerRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimitPerRoute.ProtoReflect.Descriptor instead. -func (*RateLimitPerRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP(), []int{1} -} - -func (x *RateLimitPerRoute) GetVhRateLimits() RateLimitPerRoute_VhRateLimitsOptions { - if x != nil { - return x.VhRateLimits - } - return RateLimitPerRoute_OVERRIDE -} - -var File_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDesc = []byte{ - 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x06, 0x0a, 0x09, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, 0x42, - 0x1e, 0x72, 0x1c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x08, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x04, 0x62, 0x6f, 0x74, 0x68, 0x52, 0x00, 0x52, - 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x4a, 0x0a, - 0x22, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x78, 0x68, 0x61, 0x75, 0x73, - 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x72, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x41, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x45, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x6e, 0x0a, 0x12, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x56, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x58, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x58, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x22, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x58, 0x45, - 0x6e, 0x76, 0x6f, 0x79, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x1b, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x46, 0x46, 0x10, 0x00, 0x12, 0x14, 0x0a, - 0x10, 0x44, 0x52, 0x41, 0x46, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x30, - 0x33, 0x10, 0x01, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x22, 0x9f, 0x02, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, - 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x0e, 0x76, 0x68, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x56, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0c, 0x76, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, - 0x3c, 0x0a, 0x13, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, - 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x02, 0x3a, 0x43, 0x9a, - 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x42, 0x59, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescData = file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDesc -) - -func file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDescData -} - -var file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_goTypes = []interface{}{ - (RateLimit_XRateLimitHeadersRFCVersion)(0), // 0: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimit.XRateLimitHeadersRFCVersion - (RateLimitPerRoute_VhRateLimitsOptions)(0), // 1: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimitPerRoute.VhRateLimitsOptions - (*RateLimit)(nil), // 2: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimit - (*RateLimitPerRoute)(nil), // 3: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimitPerRoute - (*duration.Duration)(nil), // 4: google.protobuf.Duration - (*v4alpha.RateLimitServiceConfig)(nil), // 5: envoy.config.ratelimit.v4alpha.RateLimitServiceConfig -} -var file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_depIdxs = []int32{ - 4, // 0: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimit.timeout:type_name -> google.protobuf.Duration - 5, // 1: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v4alpha.RateLimitServiceConfig - 0, // 2: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimit.enable_x_ratelimit_headers:type_name -> envoy.extensions.filters.http.ratelimit.v4alpha.RateLimit.XRateLimitHeadersRFCVersion - 1, // 3: envoy.extensions.filters.http.ratelimit.v4alpha.RateLimitPerRoute.vh_rate_limits:type_name -> envoy.extensions.filters.http.ratelimit.v4alpha.RateLimitPerRoute.VhRateLimitsOptions - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_init() } -func file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_init() { - if File_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitPerRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto = out.File - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_rawDesc = nil - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_goTypes = nil - file_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.pb.validate.go deleted file mode 100644 index 40629abf4b..0000000000 --- a/pkg/api/envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.pb.validate.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/ratelimit/v4alpha/rate_limit.proto - -package envoy_extensions_filters_http_ratelimit_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetDomain()) < 1 { - return RateLimitValidationError{ - field: "Domain", - reason: "value length must be at least 1 runes", - } - } - - if m.GetStage() > 10 { - return RateLimitValidationError{ - field: "Stage", - reason: "value must be less than or equal to 10", - } - } - - if _, ok := _RateLimit_RequestType_InLookup[m.GetRequestType()]; !ok { - return RateLimitValidationError{ - field: "RequestType", - reason: "value must be in list [internal external both ]", - } - } - - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for FailureModeDeny - - // no validation rules for RateLimitedAsResourceExhausted - - if m.GetRateLimitService() == nil { - return RateLimitValidationError{ - field: "RateLimitService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "RateLimitService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := RateLimit_XRateLimitHeadersRFCVersion_name[int32(m.GetEnableXRatelimitHeaders())]; !ok { - return RateLimitValidationError{ - field: "EnableXRatelimitHeaders", - reason: "value must be one of the defined enum values", - } - } - - // no validation rules for DisableXEnvoyRatelimitedHeader - - 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{} - -var _RateLimit_RequestType_InLookup = map[string]struct{}{ - "internal": {}, - "external": {}, - "both": {}, - "": {}, -} - -// Validate checks the field values on RateLimitPerRoute with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *RateLimitPerRoute) Validate() error { - if m == nil { - return nil - } - - if _, ok := RateLimitPerRoute_VhRateLimitsOptions_name[int32(m.GetVhRateLimits())]; !ok { - return RateLimitPerRouteValidationError{ - field: "VhRateLimits", - reason: "value must be one of the defined enum values", - } - } - - return nil -} - -// RateLimitPerRouteValidationError is the validation error returned by -// RateLimitPerRoute.Validate if the designated constraints aren't met. -type RateLimitPerRouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitPerRouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitPerRouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitPerRouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitPerRouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitPerRouteValidationError) ErrorName() string { - return "RateLimitPerRouteValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitPerRouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitPerRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitPerRouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitPerRouteValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.go b/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.go index 68b3d9eb7a..3107300b71 100644 --- a/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.go +++ b/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/rbac/v3/rbac.proto -package envoy_extensions_filters_http_rbac_v3 +package rbacv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/rbac/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // RBAC filter config. type RBAC struct { state protoimpl.MessageState @@ -36,11 +30,16 @@ type RBAC struct { // Specify the RBAC rules to be applied globally. // If absent, no enforcing RBAC policy will be applied. + // If present and empty, DENY. Rules *v3.RBAC `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"` // Shadow rules are not enforced by the filter (i.e., returning a 403) // but will emit stats and logs and can be used for rule testing. // If absent, no shadow RBAC policy will be applied. ShadowRules *v3.RBAC `protobuf:"bytes,2,opt,name=shadow_rules,json=shadowRules,proto3" json:"shadow_rules,omitempty"` + // If specified, shadow rules will emit stats with the given prefix. + // This is useful to distinguish the stat when there are more than 1 RBAC filter configured with + // shadow rules. + ShadowRulesStatPrefix string `protobuf:"bytes,3,opt,name=shadow_rules_stat_prefix,json=shadowRulesStatPrefix,proto3" json:"shadow_rules_stat_prefix,omitempty"` } func (x *RBAC) Reset() { @@ -89,6 +88,13 @@ func (x *RBAC) GetShadowRules() *v3.RBAC { return nil } +func (x *RBAC) GetShadowRulesStatPrefix() string { + if x != nil { + return x.ShadowRulesStatPrefix + } + return "" +} + type RBACPerRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -152,16 +158,18 @@ var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc = []byte{ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x01, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x30, - 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x01, 0x0a, + 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, + 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x68, 0x61, 0x64, 0x6f, + 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, - 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, - 0x41, 0x43, 0x52, 0x0b, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x3a, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x0b, 0x73, 0x68, 0x61, 0x64, 0x6f, + 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, + 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x22, 0x8b, 0x01, @@ -173,12 +181,18 @@ var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc = []byte{ 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x50, 0x65, 0x72, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x4a, 0x0a, 0x33, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, - 0x76, 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x9f, 0x01, 0x0a, 0x33, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, + 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x62, 0x61, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.validate.go b/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.validate.go index 9dcf9fcc46..ea7a56d784 100644 --- a/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/rbac/v3/rbac.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/rbac/v3/rbac.proto -package envoy_extensions_filters_http_rbac_v3 +package rbacv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "Rules", @@ -50,7 +85,26 @@ func (m *RBAC) Validate() error { } } - if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "ShadowRules", @@ -60,9 +114,31 @@ func (m *RBAC) Validate() error { } } + // no validation rules for ShadowRulesStatPrefix + + if len(errors) > 0 { + return RBACMultiError(errors) + } + return nil } +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + // RBACValidationError is the validation error returned by RBAC.Validate if the // designated constraints aren't met. type RBACValidationError struct { @@ -118,14 +194,47 @@ var _ interface { } = RBACValidationError{} // Validate checks the field values on RBACPerRoute with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RBACPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBACPerRoute with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RBACPerRouteMultiError, or +// nil if none found. +func (m *RBACPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *RBACPerRoute) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRbac()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRbac()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACPerRouteValidationError{ + field: "Rbac", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACPerRouteValidationError{ + field: "Rbac", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRbac()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACPerRouteValidationError{ field: "Rbac", @@ -135,9 +244,29 @@ func (m *RBACPerRoute) Validate() error { } } + if len(errors) > 0 { + return RBACPerRouteMultiError(errors) + } + return nil } +// RBACPerRouteMultiError is an error wrapping multiple validation errors +// returned by RBACPerRoute.ValidateAll() if the designated constraints aren't met. +type RBACPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACPerRouteMultiError) AllErrors() []error { return m } + // RBACPerRouteValidationError is the validation error returned by // RBACPerRoute.Validate if the designated constraints aren't met. type RBACPerRouteValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.pb.go b/pkg/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.pb.go deleted file mode 100644 index 6818000153..0000000000 --- a/pkg/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.pb.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/rbac/v4alpha/rbac.proto - -package envoy_extensions_filters_http_rbac_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/rbac/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// RBAC filter config. -type RBAC struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify the RBAC rules to be applied globally. - // If absent, no enforcing RBAC policy will be applied. - Rules *v4alpha.RBAC `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"` - // Shadow rules are not enforced by the filter (i.e., returning a 403) - // but will emit stats and logs and can be used for rule testing. - // If absent, no shadow RBAC policy will be applied. - ShadowRules *v4alpha.RBAC `protobuf:"bytes,2,opt,name=shadow_rules,json=shadowRules,proto3" json:"shadow_rules,omitempty"` -} - -func (x *RBAC) Reset() { - *x = RBAC{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RBAC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RBAC) ProtoMessage() {} - -func (x *RBAC) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RBAC.ProtoReflect.Descriptor instead. -func (*RBAC) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{0} -} - -func (x *RBAC) GetRules() *v4alpha.RBAC { - if x != nil { - return x.Rules - } - return nil -} - -func (x *RBAC) GetShadowRules() *v4alpha.RBAC { - if x != nil { - return x.ShadowRules - } - return nil -} - -type RBACPerRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Override the global configuration of the filter with this new config. - // If absent, the global RBAC policy will be disabled for this route. - Rbac *RBAC `protobuf:"bytes,2,opt,name=rbac,proto3" json:"rbac,omitempty"` -} - -func (x *RBACPerRoute) Reset() { - *x = RBACPerRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RBACPerRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RBACPerRoute) ProtoMessage() {} - -func (x *RBACPerRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RBACPerRoute.ProtoReflect.Descriptor instead. -func (*RBACPerRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{1} -} - -func (x *RBACPerRoute) GetRbac() *RBAC { - if x != nil { - return x.Rbac - } - return nil -} - -var File_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDesc = []byte{ - 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x62, 0x61, - 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, - 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x35, 0x0a, - 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x05, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0c, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x0b, 0x73, 0x68, 0x61, - 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, - 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, - 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x22, 0x95, 0x01, 0x0a, 0x0c, - 0x52, 0x42, 0x41, 0x43, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x04, - 0x72, 0x62, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x04, 0x72, 0x62, - 0x61, 0x63, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x42, 0x41, 0x43, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4a, 0x04, 0x08, - 0x01, 0x10, 0x02, 0x42, 0x4f, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescData = file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDesc -) - -func file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDescData -} - -var file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_goTypes = []interface{}{ - (*RBAC)(nil), // 0: envoy.extensions.filters.http.rbac.v4alpha.RBAC - (*RBACPerRoute)(nil), // 1: envoy.extensions.filters.http.rbac.v4alpha.RBACPerRoute - (*v4alpha.RBAC)(nil), // 2: envoy.config.rbac.v4alpha.RBAC -} -var file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.filters.http.rbac.v4alpha.RBAC.rules:type_name -> envoy.config.rbac.v4alpha.RBAC - 2, // 1: envoy.extensions.filters.http.rbac.v4alpha.RBAC.shadow_rules:type_name -> envoy.config.rbac.v4alpha.RBAC - 0, // 2: envoy.extensions.filters.http.rbac.v4alpha.RBACPerRoute.rbac:type_name -> envoy.extensions.filters.http.rbac.v4alpha.RBAC - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_init() } -func file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_init() { - if File_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RBAC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RBACPerRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto = out.File - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_rawDesc = nil - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_goTypes = nil - file_envoy_extensions_filters_http_rbac_v4alpha_rbac_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.pb.validate.go b/pkg/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.pb.validate.go deleted file mode 100644 index ff67b0d62b..0000000000 --- a/pkg/api/envoy/extensions/filters/http/rbac/v4alpha/rbac.pb.validate.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/rbac/v4alpha/rbac.proto - -package envoy_extensions_filters_http_rbac_v4alpha - -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{} -) - -// Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *RBAC) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACValidationError{ - field: "Rules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACValidationError{ - field: "ShadowRules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RBACValidationError is the validation error returned by RBAC.Validate if the -// designated constraints aren't met. -type RBACValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RBACValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RBACValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RBACValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RBACValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RBACValidationError) ErrorName() string { return "RBACValidationError" } - -// Error satisfies the builtin error interface -func (e RBACValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRBAC.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RBACValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RBACValidationError{} - -// Validate checks the field values on RBACPerRoute with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RBACPerRoute) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetRbac()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACPerRouteValidationError{ - field: "Rbac", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// RBACPerRouteValidationError is the validation error returned by -// RBACPerRoute.Validate if the designated constraints aren't met. -type RBACPerRouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RBACPerRouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RBACPerRouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RBACPerRouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RBACPerRouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RBACPerRouteValidationError) ErrorName() string { return "RBACPerRouteValidationError" } - -// Error satisfies the builtin error interface -func (e RBACPerRouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRBACPerRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RBACPerRouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RBACPerRouteValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.go b/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.go index a8d2b6257d..0ed783a5a9 100644 --- a/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.go +++ b/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.go @@ -1,18 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/response_map/v3/response_map.proto -package envoy_extensions_filters_http_response_map_v3 +package response_mapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/struct" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -27,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The configuration to filter and change local response. type ResponseMapper struct { state protoimpl.MessageState @@ -303,66 +297,68 @@ var file_envoy_extensions_filters_http_response_map_v3_response_map_proto_rawDes 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02, - 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x12, 0x4c, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, - 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x12, 0x60, 0x0a, 0x14, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, - 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, - 0x61, 0x70, 0x12, 0x57, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x62, - 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xb8, 0x01, 0x0a, - 0x13, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x50, 0x65, 0x72, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, - 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x69, 0x0a, 0x0c, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x59, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02, 0x0a, + 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, + 0x4c, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, + 0x60, 0x0a, 0x14, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x6f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, + 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, + 0x70, 0x12, 0x57, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x62, 0x6f, + 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x13, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x50, 0x65, 0x72, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, + 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x69, 0x0a, 0x0c, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x4d, 0x61, 0x70, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xbe, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x4d, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x33, + 0x3b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.validate.go b/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.validate.go index 26789c5394..e3e5c539d5 100644 --- a/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/response_map/v3/response_map.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/response_map/v3/response_map.proto -package envoy_extensions_filters_http_response_map_v3 +package response_mapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ResponseMapper with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ResponseMapper) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseMapper with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResponseMapperMultiError, +// or nil if none found. +func (m *ResponseMapper) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseMapper) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetFilter() == nil { - return ResponseMapperValidationError{ + err := ResponseMapperValidationError{ field: "Filter", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapperValidationError{ field: "Filter", @@ -61,15 +100,38 @@ func (m *ResponseMapper) Validate() error { if wrapper := m.GetStatusCode(); wrapper != nil { if val := wrapper.GetValue(); val < 200 || val >= 600 { - return ResponseMapperValidationError{ + err := ResponseMapperValidationError{ field: "StatusCode", reason: "value must be inside range [200, 600)", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapperValidationError{ field: "Body", @@ -79,7 +141,26 @@ func (m *ResponseMapper) Validate() error { } } - if v, ok := interface{}(m.GetBodyFormatOverride()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBodyFormatOverride()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "BodyFormatOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "BodyFormatOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBodyFormatOverride()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapperValidationError{ field: "BodyFormatOverride", @@ -89,9 +170,30 @@ func (m *ResponseMapper) Validate() error { } } + if len(errors) > 0 { + return ResponseMapperMultiError(errors) + } + return nil } +// ResponseMapperMultiError is an error wrapping multiple validation errors +// returned by ResponseMapper.ValidateAll() if the designated constraints +// aren't met. +type ResponseMapperMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseMapperMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseMapperMultiError) AllErrors() []error { return m } + // ResponseMapperValidationError is the validation error returned by // ResponseMapper.Validate if the designated constraints aren't met. type ResponseMapperValidationError struct { @@ -147,17 +249,50 @@ var _ interface { } = ResponseMapperValidationError{} // Validate checks the field values on ResponseMap with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ResponseMap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseMap with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResponseMapMultiError, or +// nil if none found. +func (m *ResponseMap) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseMap) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetMappers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapValidationError{ + field: fmt.Sprintf("Mappers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapValidationError{ + field: fmt.Sprintf("Mappers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapValidationError{ field: fmt.Sprintf("Mappers[%v]", idx), @@ -169,7 +304,26 @@ func (m *ResponseMap) Validate() error { } - if v, ok := interface{}(m.GetBodyFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBodyFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapValidationError{ + field: "BodyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapValidationError{ + field: "BodyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBodyFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapValidationError{ field: "BodyFormat", @@ -179,9 +333,29 @@ func (m *ResponseMap) Validate() error { } } + if len(errors) > 0 { + return ResponseMapMultiError(errors) + } + return nil } +// ResponseMapMultiError is an error wrapping multiple validation errors +// returned by ResponseMap.ValidateAll() if the designated constraints aren't met. +type ResponseMapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseMapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseMapMultiError) AllErrors() []error { return m } + // ResponseMapValidationError is the validation error returned by // ResponseMap.Validate if the designated constraints aren't met. type ResponseMapValidationError struct { @@ -238,33 +412,74 @@ var _ interface { // Validate checks the field values on ResponseMapPerRoute with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ResponseMapPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseMapPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResponseMapPerRouteMultiError, or nil if none found. +func (m *ResponseMapPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseMapPerRoute) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Override.(type) { case *ResponseMapPerRoute_Disabled: if m.GetDisabled() != true { - return ResponseMapPerRouteValidationError{ + err := ResponseMapPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *ResponseMapPerRoute_ResponseMap: if m.GetResponseMap() == nil { - return ResponseMapPerRouteValidationError{ + err := ResponseMapPerRouteValidationError{ field: "ResponseMap", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetResponseMap()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResponseMap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapPerRouteValidationError{ + field: "ResponseMap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapPerRouteValidationError{ + field: "ResponseMap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseMap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapPerRouteValidationError{ field: "ResponseMap", @@ -275,16 +490,41 @@ func (m *ResponseMapPerRoute) Validate() error { } default: - return ResponseMapPerRouteValidationError{ + err := ResponseMapPerRouteValidationError{ field: "Override", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ResponseMapPerRouteMultiError(errors) } return nil } +// ResponseMapPerRouteMultiError is an error wrapping multiple validation +// errors returned by ResponseMapPerRoute.ValidateAll() if the designated +// constraints aren't met. +type ResponseMapPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseMapPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseMapPerRouteMultiError) AllErrors() []error { return m } + // ResponseMapPerRouteValidationError is the validation error returned by // ResponseMapPerRoute.Validate if the designated constraints aren't met. type ResponseMapPerRouteValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.pb.go b/pkg/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.pb.go deleted file mode 100644 index 812c082c6a..0000000000 --- a/pkg/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.pb.go +++ /dev/null @@ -1,487 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/response_map/v4alpha/response_map.proto - -package envoy_extensions_filters_http_response_map_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// The configuration to filter and change local response. -type ResponseMapper struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Filter to determine if this mapper should apply. - Filter *v4alpha.AccessLogFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // The new response status code if specified. - StatusCode *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` - // The new body text if specified. It will be used in the `%LOCAL_REPLY_BODY%` - // command operator in the `body_format`. - Body *v4alpha1.DataSource `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` - BodyFormatOverride *v4alpha1.SubstitutionFormatString `protobuf:"bytes,4,opt,name=body_format_override,json=bodyFormatOverride,proto3" json:"body_format_override,omitempty"` -} - -func (x *ResponseMapper) Reset() { - *x = ResponseMapper{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseMapper) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseMapper) ProtoMessage() {} - -func (x *ResponseMapper) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseMapper.ProtoReflect.Descriptor instead. -func (*ResponseMapper) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescGZIP(), []int{0} -} - -func (x *ResponseMapper) GetFilter() *v4alpha.AccessLogFilter { - if x != nil { - return x.Filter - } - return nil -} - -func (x *ResponseMapper) GetStatusCode() *wrappers.UInt32Value { - if x != nil { - return x.StatusCode - } - return nil -} - -func (x *ResponseMapper) GetBody() *v4alpha1.DataSource { - if x != nil { - return x.Body - } - return nil -} - -func (x *ResponseMapper) GetBodyFormatOverride() *v4alpha1.SubstitutionFormatString { - if x != nil { - return x.BodyFormatOverride - } - return nil -} - -// The configuration to customize HTTP responses read by Envoy. -type ResponseMap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration of list of mappers which allows to filter and change HTTP response. - // The mappers will be checked by the specified order until one is matched. - Mappers []*ResponseMapper `protobuf:"bytes,1,rep,name=mappers,proto3" json:"mappers,omitempty"` - // The configuration to form response body from the :ref:`command operators ` - // and to specify response content type as one of: plain/text or application/json. - // - // Example one: plain/text body_format. - // - // .. code-block:: - // - // text_format: %LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=$REQ(:path)% - // - // The following response body in `plain/text` format will be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: - // - // upstream connection error:503:path=/foo - // - // Example two: application/json body_format. - // - // .. code-block:: - // - // json_format: - // status: %RESPONSE_CODE% - // message: %LOCAL_REPLY_BODY% - // path: $REQ(:path)% - // - // The following response body in "application/json" format would be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: json - // - // { - // "status": 503, - // "message": "upstream connection error", - // "path": "/foo" - // } - // - BodyFormat *v4alpha1.SubstitutionFormatString `protobuf:"bytes,2,opt,name=body_format,json=bodyFormat,proto3" json:"body_format,omitempty"` -} - -func (x *ResponseMap) Reset() { - *x = ResponseMap{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseMap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseMap) ProtoMessage() {} - -func (x *ResponseMap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseMap.ProtoReflect.Descriptor instead. -func (*ResponseMap) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescGZIP(), []int{1} -} - -func (x *ResponseMap) GetMappers() []*ResponseMapper { - if x != nil { - return x.Mappers - } - return nil -} - -func (x *ResponseMap) GetBodyFormat() *v4alpha1.SubstitutionFormatString { - if x != nil { - return x.BodyFormat - } - return nil -} - -// Extra settings on a per virtualhost/route/weighted-cluster level. -type ResponseMapPerRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Override: - // *ResponseMapPerRoute_Disabled - // *ResponseMapPerRoute_ResponseMap - Override isResponseMapPerRoute_Override `protobuf_oneof:"override"` -} - -func (x *ResponseMapPerRoute) Reset() { - *x = ResponseMapPerRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseMapPerRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseMapPerRoute) ProtoMessage() {} - -func (x *ResponseMapPerRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseMapPerRoute.ProtoReflect.Descriptor instead. -func (*ResponseMapPerRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescGZIP(), []int{2} -} - -func (m *ResponseMapPerRoute) GetOverride() isResponseMapPerRoute_Override { - if m != nil { - return m.Override - } - return nil -} - -func (x *ResponseMapPerRoute) GetDisabled() bool { - if x, ok := x.GetOverride().(*ResponseMapPerRoute_Disabled); ok { - return x.Disabled - } - return false -} - -func (x *ResponseMapPerRoute) GetResponseMap() *ResponseMap { - if x, ok := x.GetOverride().(*ResponseMapPerRoute_ResponseMap); ok { - return x.ResponseMap - } - return nil -} - -type isResponseMapPerRoute_Override interface { - isResponseMapPerRoute_Override() -} - -type ResponseMapPerRoute_Disabled struct { - // Disable the response map filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` -} - -type ResponseMapPerRoute_ResponseMap struct { - // Override the global configuration of the response map filter with this new config. - ResponseMap *ResponseMap `protobuf:"bytes,2,opt,name=response_map,json=responseMap,proto3,oneof"` -} - -func (*ResponseMapPerRoute_Disabled) isResponseMapPerRoute_Override() {} - -func (*ResponseMapPerRoute_ResponseMap) isResponseMapPerRoute_Override() {} - -var File_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDesc = []byte{ - 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, - 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x75, 0x62, - 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x03, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0b, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x12, 0x65, 0x0a, 0x14, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, - 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, - 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x22, - 0x83, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x12, - 0x5c, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, - 0x0b, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4d, 0x61, 0x70, 0x22, 0x87, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4d, 0x61, 0x70, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, - 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x6e, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x61, 0x70, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x0f, - 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, - 0x5e, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescData = file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDesc -) - -func file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDescData -} - -var file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_goTypes = []interface{}{ - (*ResponseMapper)(nil), // 0: envoy.extensions.filters.http.response_map.v4alpha.ResponseMapper - (*ResponseMap)(nil), // 1: envoy.extensions.filters.http.response_map.v4alpha.ResponseMap - (*ResponseMapPerRoute)(nil), // 2: envoy.extensions.filters.http.response_map.v4alpha.ResponseMapPerRoute - (*v4alpha.AccessLogFilter)(nil), // 3: envoy.config.accesslog.v4alpha.AccessLogFilter - (*wrappers.UInt32Value)(nil), // 4: google.protobuf.UInt32Value - (*v4alpha1.DataSource)(nil), // 5: envoy.config.core.v4alpha.DataSource - (*v4alpha1.SubstitutionFormatString)(nil), // 6: envoy.config.core.v4alpha.SubstitutionFormatString -} -var file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.filters.http.response_map.v4alpha.ResponseMapper.filter:type_name -> envoy.config.accesslog.v4alpha.AccessLogFilter - 4, // 1: envoy.extensions.filters.http.response_map.v4alpha.ResponseMapper.status_code:type_name -> google.protobuf.UInt32Value - 5, // 2: envoy.extensions.filters.http.response_map.v4alpha.ResponseMapper.body:type_name -> envoy.config.core.v4alpha.DataSource - 6, // 3: envoy.extensions.filters.http.response_map.v4alpha.ResponseMapper.body_format_override:type_name -> envoy.config.core.v4alpha.SubstitutionFormatString - 0, // 4: envoy.extensions.filters.http.response_map.v4alpha.ResponseMap.mappers:type_name -> envoy.extensions.filters.http.response_map.v4alpha.ResponseMapper - 6, // 5: envoy.extensions.filters.http.response_map.v4alpha.ResponseMap.body_format:type_name -> envoy.config.core.v4alpha.SubstitutionFormatString - 1, // 6: envoy.extensions.filters.http.response_map.v4alpha.ResponseMapPerRoute.response_map:type_name -> envoy.extensions.filters.http.response_map.v4alpha.ResponseMap - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_init() } -func file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_init() { - if File_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseMapper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseMapPerRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*ResponseMapPerRoute_Disabled)(nil), - (*ResponseMapPerRoute_ResponseMap)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto = out.File - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_rawDesc = nil - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_goTypes = nil - file_envoy_extensions_filters_http_response_map_v4alpha_response_map_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.pb.validate.go b/pkg/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.pb.validate.go deleted file mode 100644 index 64d14373ec..0000000000 --- a/pkg/api/envoy/extensions/filters/http/response_map/v4alpha/response_map.pb.validate.go +++ /dev/null @@ -1,342 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/response_map/v4alpha/response_map.proto - -package envoy_extensions_filters_http_response_map_v4alpha - -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{} -) - -// Validate checks the field values on ResponseMapper with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ResponseMapper) Validate() error { - if m == nil { - return nil - } - - if m.GetFilter() == nil { - return ResponseMapperValidationError{ - field: "Filter", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapperValidationError{ - field: "Filter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetStatusCode(); wrapper != nil { - - if val := wrapper.GetValue(); val < 200 || val >= 600 { - return ResponseMapperValidationError{ - field: "StatusCode", - reason: "value must be inside range [200, 600)", - } - } - - } - - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapperValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetBodyFormatOverride()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapperValidationError{ - field: "BodyFormatOverride", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ResponseMapperValidationError is the validation error returned by -// ResponseMapper.Validate if the designated constraints aren't met. -type ResponseMapperValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResponseMapperValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResponseMapperValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResponseMapperValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResponseMapperValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResponseMapperValidationError) ErrorName() string { return "ResponseMapperValidationError" } - -// Error satisfies the builtin error interface -func (e ResponseMapperValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResponseMapper.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResponseMapperValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResponseMapperValidationError{} - -// Validate checks the field values on ResponseMap with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ResponseMap) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetMappers() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapValidationError{ - field: fmt.Sprintf("Mappers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetBodyFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapValidationError{ - field: "BodyFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ResponseMapValidationError is the validation error returned by -// ResponseMap.Validate if the designated constraints aren't met. -type ResponseMapValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResponseMapValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResponseMapValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResponseMapValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResponseMapValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResponseMapValidationError) ErrorName() string { return "ResponseMapValidationError" } - -// Error satisfies the builtin error interface -func (e ResponseMapValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResponseMap.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResponseMapValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResponseMapValidationError{} - -// Validate checks the field values on ResponseMapPerRoute with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ResponseMapPerRoute) Validate() error { - if m == nil { - return nil - } - - switch m.Override.(type) { - - case *ResponseMapPerRoute_Disabled: - - if m.GetDisabled() != true { - return ResponseMapPerRouteValidationError{ - field: "Disabled", - reason: "value must equal true", - } - } - - case *ResponseMapPerRoute_ResponseMap: - - if m.GetResponseMap() == nil { - return ResponseMapPerRouteValidationError{ - field: "ResponseMap", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetResponseMap()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapPerRouteValidationError{ - field: "ResponseMap", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return ResponseMapPerRouteValidationError{ - field: "Override", - reason: "value is required", - } - - } - - return nil -} - -// ResponseMapPerRouteValidationError is the validation error returned by -// ResponseMapPerRoute.Validate if the designated constraints aren't met. -type ResponseMapPerRouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResponseMapPerRouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResponseMapPerRouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResponseMapPerRouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResponseMapPerRouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResponseMapPerRouteValidationError) ErrorName() string { - return "ResponseMapPerRouteValidationError" -} - -// Error satisfies the builtin error interface -func (e ResponseMapPerRouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResponseMapPerRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResponseMapPerRouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResponseMapPerRouteValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.go b/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.go index 851a3a3fb0..eb5010ac58 100644 --- a/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.go +++ b/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/router/v3/router.proto -package envoy_extensions_filters_http_router_v3 +package routerv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,11 +24,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 7] +// [#next-free-field: 8] type Router struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -74,6 +69,15 @@ type Router struct { // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress // Envoy, when deriving timeout for upstream cluster. RespectExpectedRqTimeout bool `protobuf:"varint,6,opt,name=respect_expected_rq_timeout,json=respectExpectedRqTimeout,proto3" json:"respect_expected_rq_timeout,omitempty"` + // If set, Envoy will avoid incrementing HTTP failure code stats + // on gRPC requests. This includes the individual status code value + // (e.g. upstream_rq_504) and group stats (e.g. upstream_rq_5xx). + // This field is useful if interested in relying only on the gRPC + // stats filter to define success and failure metrics for gRPC requests + // as not all failed gRPC requests charge HTTP status code metrics. See + // :ref:`gRPC stats filter` documentation + // for more details. + SuppressGrpcRequestFailureCodeStats bool `protobuf:"varint,7,opt,name=suppress_grpc_request_failure_code_stats,json=suppressGrpcRequestFailureCodeStats,proto3" json:"suppress_grpc_request_failure_code_stats,omitempty"` } func (x *Router) Reset() { @@ -150,6 +154,13 @@ func (x *Router) GetRespectExpectedRqTimeout() bool { return false } +func (x *Router) GetSuppressGrpcRequestFailureCodeStats() bool { + if x != nil { + return x.SuppressGrpcRequestFailureCodeStats + } + return false +} + var File_envoy_extensions_filters_http_router_v3_router_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_http_router_v3_router_proto_rawDesc = []byte{ @@ -169,7 +180,7 @@ var file_envoy_extensions_filters_http_router_v3_router_proto_rawDesc = []byte{ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x05, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, @@ -201,15 +212,26 @@ var file_envoy_extensions_filters_http_router_v3_router_proto_rawDesc = []byte{ 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x71, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x71, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0x4e, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x74, 0x12, 0x55, 0x0a, 0x28, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x23, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x47, + 0x72, 0x70, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, + 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0xa7, 0x01, 0x0a, + 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.validate.go b/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.validate.go index 848067814a..8f061af69f 100644 --- a/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/router/v3/router.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/router/v3/router.proto -package envoy_extensions_filters_http_router_v3 +package routerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Router with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDynamicStats()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetDynamicStats()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouterValidationError{ + field: "DynamicStats", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouterValidationError{ + field: "DynamicStats", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicStats()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: "DynamicStats", @@ -55,7 +90,26 @@ func (m *Router) Validate() error { for idx, item := range m.GetUpstreamLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouterValidationError{ + field: fmt.Sprintf("UpstreamLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouterValidationError{ + field: fmt.Sprintf("UpstreamLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: fmt.Sprintf("UpstreamLog[%v]", idx), @@ -73,19 +127,45 @@ func (m *Router) Validate() error { _, _ = idx, item if _, ok := _Router_StrictCheckHeaders_InLookup[item]; !ok { - return RouterValidationError{ + err := RouterValidationError{ field: fmt.Sprintf("StrictCheckHeaders[%v]", idx), reason: "value must be in list [x-envoy-upstream-rq-timeout-ms x-envoy-upstream-rq-per-try-timeout-ms x-envoy-max-retries x-envoy-retry-grpc-on x-envoy-retry-on]", } + if !all { + return err + } + errors = append(errors, err) } } // no validation rules for RespectExpectedRqTimeout + // no validation rules for SuppressGrpcRequestFailureCodeStats + + if len(errors) > 0 { + return RouterMultiError(errors) + } + return nil } +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + // RouterValidationError is the validation error returned by Router.Validate if // the designated constraints aren't met. type RouterValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/router/v4alpha/router.pb.go b/pkg/api/envoy/extensions/filters/http/router/v4alpha/router.pb.go deleted file mode 100644 index 18f5936bc8..0000000000 --- a/pkg/api/envoy/extensions/filters/http/router/v4alpha/router.pb.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/router/v4alpha/router.proto - -package envoy_extensions_filters_http_router_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 7] -type Router struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether the router generates dynamic cluster statistics. Defaults to - // true. Can be disabled in high performance scenarios. - DynamicStats *wrappers.BoolValue `protobuf:"bytes,1,opt,name=dynamic_stats,json=dynamicStats,proto3" json:"dynamic_stats,omitempty"` - // Whether to start a child span for egress routed calls. This can be - // useful in scenarios where other filters (auth, ratelimit, etc.) make - // outbound calls and have child spans rooted at the same ingress - // parent. Defaults to false. - StartChildSpan bool `protobuf:"varint,2,opt,name=start_child_span,json=startChildSpan,proto3" json:"start_child_span,omitempty"` - // Configuration for HTTP upstream logs emitted by the router. Upstream logs - // are configured in the same way as access logs, but each log entry represents - // an upstream request. Presuming retries are configured, multiple upstream - // requests may be made for each downstream (inbound) request. - UpstreamLog []*v4alpha.AccessLog `protobuf:"bytes,3,rep,name=upstream_log,json=upstreamLog,proto3" json:"upstream_log,omitempty"` - // Do not add any additional *x-envoy-* headers to requests or responses. This - // only affects the :ref:`router filter generated *x-envoy-* headers - // `, other Envoy filters and the HTTP - // connection manager may continue to set *x-envoy-* headers. - SuppressEnvoyHeaders bool `protobuf:"varint,4,opt,name=suppress_envoy_headers,json=suppressEnvoyHeaders,proto3" json:"suppress_envoy_headers,omitempty"` - // Specifies a list of HTTP headers to strictly validate. Envoy will reject a - // request and respond with HTTP status 400 if the request contains an invalid - // value for any of the headers listed in this field. Strict header checking - // is only supported for the following headers: - // - // Value must be a ','-delimited list (i.e. no spaces) of supported retry - // policy values: - // - // * :ref:`config_http_filters_router_x-envoy-retry-grpc-on` - // * :ref:`config_http_filters_router_x-envoy-retry-on` - // - // Value must be an integer: - // - // * :ref:`config_http_filters_router_x-envoy-max-retries` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` - StrictCheckHeaders []string `protobuf:"bytes,5,rep,name=strict_check_headers,json=strictCheckHeaders,proto3" json:"strict_check_headers,omitempty"` - // If not set, ingress Envoy will ignore - // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress - // Envoy, when deriving timeout for upstream cluster. - RespectExpectedRqTimeout bool `protobuf:"varint,6,opt,name=respect_expected_rq_timeout,json=respectExpectedRqTimeout,proto3" json:"respect_expected_rq_timeout,omitempty"` -} - -func (x *Router) Reset() { - *x = Router{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_router_v4alpha_router_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Router) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Router) ProtoMessage() {} - -func (x *Router) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_router_v4alpha_router_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Router.ProtoReflect.Descriptor instead. -func (*Router) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescGZIP(), []int{0} -} - -func (x *Router) GetDynamicStats() *wrappers.BoolValue { - if x != nil { - return x.DynamicStats - } - return nil -} - -func (x *Router) GetStartChildSpan() bool { - if x != nil { - return x.StartChildSpan - } - return false -} - -func (x *Router) GetUpstreamLog() []*v4alpha.AccessLog { - if x != nil { - return x.UpstreamLog - } - return nil -} - -func (x *Router) GetSuppressEnvoyHeaders() bool { - if x != nil { - return x.SuppressEnvoyHeaders - } - return false -} - -func (x *Router) GetStrictCheckHeaders() []string { - if x != nil { - return x.StrictCheckHeaders - } - return nil -} - -func (x *Router) GetRespectExpectedRqTimeout() bool { - if x != nil { - return x.RespectExpectedRqTimeout - } - return false -} - -var File_envoy_extensions_filters_http_router_v4alpha_router_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDesc = []byte{ - 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2c, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x04, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, - 0x3f, 0x0a, 0x0d, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0c, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x4c, 0x0a, 0x0c, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x0b, 0x75, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x75, 0x70, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0xc7, - 0x01, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x94, 0x01, - 0xfa, 0x42, 0x90, 0x01, 0x92, 0x01, 0x8c, 0x01, 0x22, 0x89, 0x01, 0x72, 0x86, 0x01, 0x52, 0x1e, - 0x78, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2d, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x2d, 0x72, 0x71, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2d, 0x6d, 0x73, 0x52, 0x26, - 0x78, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2d, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x2d, 0x72, 0x71, 0x2d, 0x70, 0x65, 0x72, 0x2d, 0x74, 0x72, 0x79, 0x2d, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x2d, 0x6d, 0x73, 0x52, 0x13, 0x78, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2d, - 0x6d, 0x61, 0x78, 0x2d, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x15, 0x78, 0x2d, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2d, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, - 0x6f, 0x6e, 0x52, 0x10, 0x78, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2d, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x2d, 0x6f, 0x6e, 0x52, 0x12, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x73, 0x70, - 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x71, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x72, - 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x71, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0x53, - 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescData = file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDesc -) - -func file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDescData -} - -var file_envoy_extensions_filters_http_router_v4alpha_router_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_http_router_v4alpha_router_proto_goTypes = []interface{}{ - (*Router)(nil), // 0: envoy.extensions.filters.http.router.v4alpha.Router - (*wrappers.BoolValue)(nil), // 1: google.protobuf.BoolValue - (*v4alpha.AccessLog)(nil), // 2: envoy.config.accesslog.v4alpha.AccessLog -} -var file_envoy_extensions_filters_http_router_v4alpha_router_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.http.router.v4alpha.Router.dynamic_stats:type_name -> google.protobuf.BoolValue - 2, // 1: envoy.extensions.filters.http.router.v4alpha.Router.upstream_log:type_name -> envoy.config.accesslog.v4alpha.AccessLog - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_router_v4alpha_router_proto_init() } -func file_envoy_extensions_filters_http_router_v4alpha_router_proto_init() { - if File_envoy_extensions_filters_http_router_v4alpha_router_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_router_v4alpha_router_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Router); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_router_v4alpha_router_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_router_v4alpha_router_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_router_v4alpha_router_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_router_v4alpha_router_proto = out.File - file_envoy_extensions_filters_http_router_v4alpha_router_proto_rawDesc = nil - file_envoy_extensions_filters_http_router_v4alpha_router_proto_goTypes = nil - file_envoy_extensions_filters_http_router_v4alpha_router_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.pb.go b/pkg/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.pb.go new file mode 100644 index 0000000000..aa436f976a --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.pb.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto + +package set_metadatav3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + _struct "github.com/golang/protobuf/ptypes/struct" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The metadata namespace. + MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"` + // The value to update the namespace with. See + // :ref:`the filter documentation ` for + // more information on how this value is merged with potentially existing + // ones. + Value *_struct.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetMetadataNamespace() string { + if x != nil { + return x.MetadataNamespace + } + return "" +} + +func (x *Config) GetValue() *_struct.Struct { + if x != nil { + return x.Value + } + return nil +} + +var File_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, + 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, + 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x36, 0x0a, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0xbe, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, + 0x76, 0x33, 0x3b, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescData = file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDesc +) + +func file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDescData +} + +var file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.filters.http.set_metadata.v3.Config + (*_struct.Struct)(nil), // 1: google.protobuf.Struct +} +var file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.http.set_metadata.v3.Config.value:type_name -> google.protobuf.Struct + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_init() } +func file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_init() { + if File_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto = out.File + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_rawDesc = nil + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_goTypes = nil + file_envoy_extensions_filters_http_set_metadata_v3_set_metadata_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.pb.validate.go b/pkg/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.pb.validate.go new file mode 100644 index 0000000000..2384bfaa7b --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.pb.validate.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto + +package set_metadatav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetMetadataNamespace()) < 1 { + err := ConfigValidationError{ + field: "MetadataNamespace", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/squash/v3/squash.pb.go b/pkg/api/envoy/extensions/filters/http/squash/v3/squash.pb.go deleted file mode 100644 index 0ae69c27e4..0000000000 --- a/pkg/api/envoy/extensions/filters/http/squash/v3/squash.pb.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/squash/v3/squash.proto - -package envoy_extensions_filters_http_squash_v3 - -import ( - _ "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" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 6] -type Squash struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the cluster that hosts the Squash server. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // When the filter requests the Squash server to create a DebugAttachment, it will use this - // structure as template for the body of the request. It can contain reference to environment - // variables in the form of '{{ ENV_VAR_NAME }}'. These can be used to provide the Squash server - // with more information to find the process to attach the debugger to. For example, in a - // Istio/k8s environment, this will contain information on the pod: - // - // .. code-block:: json - // - // { - // "spec": { - // "attachment": { - // "pod": "{{ POD_NAME }}", - // "namespace": "{{ POD_NAMESPACE }}" - // }, - // "match_request": true - // } - // } - // - // (where POD_NAME, POD_NAMESPACE are configured in the pod via the Downward API) - AttachmentTemplate *_struct.Struct `protobuf:"bytes,2,opt,name=attachment_template,json=attachmentTemplate,proto3" json:"attachment_template,omitempty"` - // The timeout for individual requests sent to the Squash cluster. Defaults to 1 second. - RequestTimeout *duration.Duration `protobuf:"bytes,3,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` - // The total timeout Squash will delay a request and wait for it to be attached. Defaults to 60 - // seconds. - AttachmentTimeout *duration.Duration `protobuf:"bytes,4,opt,name=attachment_timeout,json=attachmentTimeout,proto3" json:"attachment_timeout,omitempty"` - // Amount of time to poll for the status of the attachment object in the Squash server - // (to check if has been attached). Defaults to 1 second. - AttachmentPollPeriod *duration.Duration `protobuf:"bytes,5,opt,name=attachment_poll_period,json=attachmentPollPeriod,proto3" json:"attachment_poll_period,omitempty"` -} - -func (x *Squash) Reset() { - *x = Squash{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_squash_v3_squash_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Squash) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Squash) ProtoMessage() {} - -func (x *Squash) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_squash_v3_squash_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Squash.ProtoReflect.Descriptor instead. -func (*Squash) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescGZIP(), []int{0} -} - -func (x *Squash) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *Squash) GetAttachmentTemplate() *_struct.Struct { - if x != nil { - return x.AttachmentTemplate - } - return nil -} - -func (x *Squash) GetRequestTimeout() *duration.Duration { - if x != nil { - return x.RequestTimeout - } - return nil -} - -func (x *Squash) GetAttachmentTimeout() *duration.Duration { - if x != nil { - return x.AttachmentTimeout - } - return nil -} - -func (x *Squash) GetAttachmentPollPeriod() *duration.Duration { - if x != nil { - return x.AttachmentPollPeriod - } - return nil -} - -var File_envoy_extensions_filters_http_squash_v3_squash_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDesc = []byte{ - 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x03, 0x0a, 0x06, 0x53, 0x71, 0x75, - 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x13, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x12, 0x61, 0x74, - 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x48, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x61, 0x74, 0x74, - 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4f, - 0x0a, 0x16, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x6c, - 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x61, 0x74, 0x74, 0x61, 0x63, - 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, - 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x71, 0x75, 0x61, 0x73, - 0x68, 0x42, 0x4e, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x71, 0x75, 0x61, - 0x73, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescData = file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDesc -) - -func file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDescData -} - -var file_envoy_extensions_filters_http_squash_v3_squash_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_http_squash_v3_squash_proto_goTypes = []interface{}{ - (*Squash)(nil), // 0: envoy.extensions.filters.http.squash.v3.Squash - (*_struct.Struct)(nil), // 1: google.protobuf.Struct - (*duration.Duration)(nil), // 2: google.protobuf.Duration -} -var file_envoy_extensions_filters_http_squash_v3_squash_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.http.squash.v3.Squash.attachment_template:type_name -> google.protobuf.Struct - 2, // 1: envoy.extensions.filters.http.squash.v3.Squash.request_timeout:type_name -> google.protobuf.Duration - 2, // 2: envoy.extensions.filters.http.squash.v3.Squash.attachment_timeout:type_name -> google.protobuf.Duration - 2, // 3: envoy.extensions.filters.http.squash.v3.Squash.attachment_poll_period:type_name -> google.protobuf.Duration - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_squash_v3_squash_proto_init() } -func file_envoy_extensions_filters_http_squash_v3_squash_proto_init() { - if File_envoy_extensions_filters_http_squash_v3_squash_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_squash_v3_squash_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Squash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_squash_v3_squash_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_squash_v3_squash_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_squash_v3_squash_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_squash_v3_squash_proto = out.File - file_envoy_extensions_filters_http_squash_v3_squash_proto_rawDesc = nil - file_envoy_extensions_filters_http_squash_v3_squash_proto_goTypes = nil - file_envoy_extensions_filters_http_squash_v3_squash_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/squash/v3/squash.pb.validate.go b/pkg/api/envoy/extensions/filters/http/squash/v3/squash.pb.validate.go deleted file mode 100644 index 0ac4de6d1e..0000000000 --- a/pkg/api/envoy/extensions/filters/http/squash/v3/squash.pb.validate.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/squash/v3/squash.proto - -package envoy_extensions_filters_http_squash_v3 - -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{} -) - -// Validate checks the field values on Squash with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Squash) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetCluster()) < 1 { - return SquashValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetAttachmentTemplate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SquashValidationError{ - field: "AttachmentTemplate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SquashValidationError{ - field: "RequestTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAttachmentTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SquashValidationError{ - field: "AttachmentTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetAttachmentPollPeriod()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SquashValidationError{ - field: "AttachmentPollPeriod", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// SquashValidationError is the validation error returned by Squash.Validate if -// the designated constraints aren't met. -type SquashValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SquashValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SquashValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SquashValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SquashValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SquashValidationError) ErrorName() string { return "SquashValidationError" } - -// Error satisfies the builtin error interface -func (e SquashValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSquash.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SquashValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SquashValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.go b/pkg/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.go new file mode 100644 index 0000000000..5b0143999f --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.go @@ -0,0 +1,292 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto + +package stateful_sessionv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StatefulSession struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specific implementation of session state. This session state will be used to store and + // get address of the upstream host to which the session is assigned. + // + // [#extension-category: envoy.http.stateful_session] + SessionState *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=session_state,json=sessionState,proto3" json:"session_state,omitempty"` +} + +func (x *StatefulSession) Reset() { + *x = StatefulSession{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatefulSession) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatefulSession) ProtoMessage() {} + +func (x *StatefulSession) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatefulSession.ProtoReflect.Descriptor instead. +func (*StatefulSession) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescGZIP(), []int{0} +} + +func (x *StatefulSession) GetSessionState() *v3.TypedExtensionConfig { + if x != nil { + return x.SessionState + } + return nil +} + +type StatefulSessionPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Override: + // *StatefulSessionPerRoute_Disabled + // *StatefulSessionPerRoute_StatefulSession + Override isStatefulSessionPerRoute_Override `protobuf_oneof:"override"` +} + +func (x *StatefulSessionPerRoute) Reset() { + *x = StatefulSessionPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatefulSessionPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatefulSessionPerRoute) ProtoMessage() {} + +func (x *StatefulSessionPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatefulSessionPerRoute.ProtoReflect.Descriptor instead. +func (*StatefulSessionPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescGZIP(), []int{1} +} + +func (m *StatefulSessionPerRoute) GetOverride() isStatefulSessionPerRoute_Override { + if m != nil { + return m.Override + } + return nil +} + +func (x *StatefulSessionPerRoute) GetDisabled() bool { + if x, ok := x.GetOverride().(*StatefulSessionPerRoute_Disabled); ok { + return x.Disabled + } + return false +} + +func (x *StatefulSessionPerRoute) GetStatefulSession() *StatefulSession { + if x, ok := x.GetOverride().(*StatefulSessionPerRoute_StatefulSession); ok { + return x.StatefulSession + } + return nil +} + +type isStatefulSessionPerRoute_Override interface { + isStatefulSessionPerRoute_Override() +} + +type StatefulSessionPerRoute_Disabled struct { + // Disable the stateful session filter for this particular vhost or route. If disabled is + // specified in multiple per-filter-configs, the most specific one will be used. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` +} + +type StatefulSessionPerRoute_StatefulSession struct { + // Per-route stateful session configuration that can be served by RDS or static route table. + StatefulSession *StatefulSession `protobuf:"bytes,2,opt,name=stateful_session,json=statefulSession,proto3,oneof"` +} + +func (*StatefulSessionPerRoute_Disabled) isStatefulSessionPerRoute_Override() {} + +func (*StatefulSessionPerRoute_StatefulSession) isStatefulSessionPerRoute_Override() {} + +var File_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, + 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x62, 0x0a, 0x0f, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, + 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, + 0xc2, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x6f, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x42, 0xce, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, + 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x6b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData = file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc +) + +func file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData +} + +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_goTypes = []interface{}{ + (*StatefulSession)(nil), // 0: envoy.extensions.filters.http.stateful_session.v3.StatefulSession + (*StatefulSessionPerRoute)(nil), // 1: envoy.extensions.filters.http.stateful_session.v3.StatefulSessionPerRoute + (*v3.TypedExtensionConfig)(nil), // 2: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.stateful_session.v3.StatefulSession.session_state:type_name -> envoy.config.core.v3.TypedExtensionConfig + 0, // 1: envoy.extensions.filters.http.stateful_session.v3.StatefulSessionPerRoute.stateful_session:type_name -> envoy.extensions.filters.http.stateful_session.v3.StatefulSession + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_init() } +func file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_init() { + if File_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatefulSession); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatefulSessionPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StatefulSessionPerRoute_Disabled)(nil), + (*StatefulSessionPerRoute_StatefulSession)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto = out.File + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc = nil + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_goTypes = nil + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.validate.go b/pkg/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.validate.go new file mode 100644 index 0000000000..796991ea70 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.validate.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto + +package stateful_sessionv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StatefulSession with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *StatefulSession) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatefulSession with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StatefulSessionMultiError, or nil if none found. +func (m *StatefulSession) ValidateAll() error { + return m.validate(true) +} + +func (m *StatefulSession) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSessionState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatefulSessionValidationError{ + field: "SessionState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatefulSessionValidationError{ + field: "SessionState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StatefulSessionValidationError{ + field: "SessionState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StatefulSessionMultiError(errors) + } + + return nil +} + +// StatefulSessionMultiError is an error wrapping multiple validation errors +// returned by StatefulSession.ValidateAll() if the designated constraints +// aren't met. +type StatefulSessionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatefulSessionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatefulSessionMultiError) AllErrors() []error { return m } + +// StatefulSessionValidationError is the validation error returned by +// StatefulSession.Validate if the designated constraints aren't met. +type StatefulSessionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StatefulSessionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StatefulSessionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StatefulSessionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StatefulSessionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StatefulSessionValidationError) ErrorName() string { return "StatefulSessionValidationError" } + +// Error satisfies the builtin error interface +func (e StatefulSessionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStatefulSession.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StatefulSessionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StatefulSessionValidationError{} + +// Validate checks the field values on StatefulSessionPerRoute with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *StatefulSessionPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatefulSessionPerRoute with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StatefulSessionPerRouteMultiError, or nil if none found. +func (m *StatefulSessionPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *StatefulSessionPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Override.(type) { + + case *StatefulSessionPerRoute_Disabled: + + if m.GetDisabled() != true { + err := StatefulSessionPerRouteValidationError{ + field: "Disabled", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *StatefulSessionPerRoute_StatefulSession: + + if all { + switch v := interface{}(m.GetStatefulSession()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatefulSessionPerRouteValidationError{ + field: "StatefulSession", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatefulSessionPerRouteValidationError{ + field: "StatefulSession", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatefulSession()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StatefulSessionPerRouteValidationError{ + field: "StatefulSession", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := StatefulSessionPerRouteValidationError{ + field: "Override", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return StatefulSessionPerRouteMultiError(errors) + } + + return nil +} + +// StatefulSessionPerRouteMultiError is an error wrapping multiple validation +// errors returned by StatefulSessionPerRoute.ValidateAll() if the designated +// constraints aren't met. +type StatefulSessionPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatefulSessionPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatefulSessionPerRouteMultiError) AllErrors() []error { return m } + +// StatefulSessionPerRouteValidationError is the validation error returned by +// StatefulSessionPerRoute.Validate if the designated constraints aren't met. +type StatefulSessionPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StatefulSessionPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StatefulSessionPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StatefulSessionPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StatefulSessionPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StatefulSessionPerRouteValidationError) ErrorName() string { + return "StatefulSessionPerRouteValidationError" +} + +// Error satisfies the builtin error interface +func (e StatefulSessionPerRouteValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStatefulSessionPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StatefulSessionPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StatefulSessionPerRouteValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.go b/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.go index 69e53005ec..4406fa8189 100644 --- a/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.go +++ b/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/tap/v3/tap.proto -package envoy_extensions_filters_http_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/tap/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Top level configuration for the tap filter. type Tap struct { state protoimpl.MessageState @@ -103,12 +98,18 @@ var file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, - 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x42, 0x48, 0x0a, - 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, 0x70, - 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x42, 0x9b, 0x01, + 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, + 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.validate.go b/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.validate.go index 0fcaa12608..e7ae5b69c0 100644 --- a/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/tap/v3/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/tap/v3/tap.proto -package envoy_extensions_filters_http_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Tap with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Tap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tap with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TapMultiError, or nil if none found. +func (m *Tap) ValidateAll() error { + return m.validate(true) +} + +func (m *Tap) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return TapValidationError{ + err := TapValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapValidationError{ field: "CommonConfig", @@ -57,9 +96,29 @@ func (m *Tap) Validate() error { } } + if len(errors) > 0 { + return TapMultiError(errors) + } + return nil } +// TapMultiError is an error wrapping multiple validation errors returned by +// Tap.ValidateAll() if the designated constraints aren't met. +type TapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapMultiError) AllErrors() []error { return m } + // TapValidationError is the validation error returned by Tap.Validate if the // designated constraints aren't met. type TapValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/http/tap/v4alpha/tap.pb.go b/pkg/api/envoy/extensions/filters/http/tap/v4alpha/tap.pb.go deleted file mode 100644 index ef4cb81837..0000000000 --- a/pkg/api/envoy/extensions/filters/http/tap/v4alpha/tap.pb.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/http/tap/v4alpha/tap.proto - -package envoy_extensions_filters_http_tap_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/tap/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Top level configuration for the tap filter. -type Tap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Common configuration for the HTTP tap filter. - CommonConfig *v4alpha.CommonExtensionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` -} - -func (x *Tap) Reset() { - *x = Tap{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tap) ProtoMessage() {} - -func (x *Tap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tap.ProtoReflect.Descriptor instead. -func (*Tap) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescGZIP(), []int{0} -} - -func (x *Tap) GetCommonConfig() *v4alpha.CommonExtensionConfig { - if x != nil { - return x.CommonConfig - } - return nil -} - -var File_envoy_extensions_filters_http_tap_v4alpha_tap_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x01, - 0x0a, 0x03, 0x54, 0x61, 0x70, 0x12, 0x69, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x61, - 0x70, 0x42, 0x4d, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x54, 0x61, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescData = file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDesc -) - -func file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDescData -} - -var file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_goTypes = []interface{}{ - (*Tap)(nil), // 0: envoy.extensions.filters.http.tap.v4alpha.Tap - (*v4alpha.CommonExtensionConfig)(nil), // 1: envoy.extensions.common.tap.v4alpha.CommonExtensionConfig -} -var file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.http.tap.v4alpha.Tap.common_config:type_name -> envoy.extensions.common.tap.v4alpha.CommonExtensionConfig - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_init() } -func file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_init() { - if File_envoy_extensions_filters_http_tap_v4alpha_tap_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_http_tap_v4alpha_tap_proto = out.File - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_rawDesc = nil - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_goTypes = nil - file_envoy_extensions_filters_http_tap_v4alpha_tap_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/http/tap/v4alpha/tap.pb.validate.go b/pkg/api/envoy/extensions/filters/http/tap/v4alpha/tap.pb.validate.go deleted file mode 100644 index 1477f72496..0000000000 --- a/pkg/api/envoy/extensions/filters/http/tap/v4alpha/tap.pb.validate.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/tap/v4alpha/tap.proto - -package envoy_extensions_filters_http_tap_v4alpha - -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{} -) - -// Validate checks the field values on Tap with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *Tap) Validate() error { - if m == nil { - return nil - } - - if m.GetCommonConfig() == nil { - return TapValidationError{ - field: "CommonConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapValidationError{ - field: "CommonConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// TapValidationError is the validation error returned by Tap.Validate if the -// designated constraints aren't met. -type TapValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TapValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TapValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TapValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TapValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TapValidationError) ErrorName() string { return "TapValidationError" } - -// Error satisfies the builtin error interface -func (e TapValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTap.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TapValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TapValidationError{} diff --git a/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.go b/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.go index 2861eda78d..e9c043509c 100644 --- a/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.go +++ b/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/http/wasm/v3/wasm.proto -package envoy_extensions_filters_http_wasm_v3 +package wasmv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/wasm/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Wasm struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -88,21 +82,22 @@ var file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDesc = []byte{ 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x04, 0x57, 0x61, 0x73, - 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x4a, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, + 0x04, 0x57, 0x61, 0x73, 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, + 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9f, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, + 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.validate.go b/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.validate.go index 6a152e96b2..38b9b23923 100644 --- a/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/http/wasm/v3/wasm.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/http/wasm/v3/wasm.proto -package envoy_extensions_filters_http_wasm_v3 +package wasmv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Wasm with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Wasm) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Wasm with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in WasmMultiError, or nil if none found. +func (m *Wasm) ValidateAll() error { + return m.validate(true) +} + +func (m *Wasm) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WasmValidationError{ field: "Config", @@ -50,9 +85,29 @@ func (m *Wasm) Validate() error { } } + if len(errors) > 0 { + return WasmMultiError(errors) + } + return nil } +// WasmMultiError is an error wrapping multiple validation errors returned by +// Wasm.ValidateAll() if the designated constraints aren't met. +type WasmMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmMultiError) AllErrors() []error { return m } + // WasmValidationError is the validation error returned by Wasm.Validate if the // designated constraints aren't met. type WasmValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.go b/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.go index aa11886064..b1e295a6fb 100644 --- a/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.go +++ b/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto -package envoy_extensions_filters_listener_http_inspector_v3 +package http_inspectorv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HttpInspector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -84,14 +79,20 @@ var file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_prot 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x61, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x48, 0x74, - 0x74, 0x70, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0xce, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x48, + 0x74, 0x74, 0x70, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x6b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.validate.go b/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.validate.go index e288bbf9fc..44d4272686 100644 --- a/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto -package envoy_extensions_filters_listener_http_inspector_v3 +package http_inspectorv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpInspector with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpInspector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpInspector with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpInspectorMultiError, or +// nil if none found. +func (m *HttpInspector) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpInspector) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return HttpInspectorMultiError(errors) + } + return nil } +// HttpInspectorMultiError is an error wrapping multiple validation errors +// returned by HttpInspector.ValidateAll() if the designated constraints +// aren't met. +type HttpInspectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpInspectorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpInspectorMultiError) AllErrors() []error { return m } + // HttpInspectorValidationError is the validation error returned by // HttpInspector.Validate if the designated constraints aren't met. type HttpInspectorValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.go b/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.go index 1583bb28c4..bc03f203e0 100644 --- a/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.go +++ b/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/listener/original_dst/v3/original_dst.proto -package envoy_extensions_filters_listener_original_dst_v3 +package original_dstv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OriginalDst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -83,14 +78,20 @@ var file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_ra 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x42, 0x5d, 0x0a, 0x3f, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x10, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x42, 0xc6, 0x01, 0x0a, 0x3f, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x42, + 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.validate.go b/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.validate.go index 7982d66333..e75a679d34 100644 --- a/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/listener/original_dst/v3/original_dst.proto -package envoy_extensions_filters_listener_original_dst_v3 +package original_dstv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OriginalDst with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OriginalDst) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalDst with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OriginalDstMultiError, or +// nil if none found. +func (m *OriginalDst) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalDst) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return OriginalDstMultiError(errors) + } + return nil } +// OriginalDstMultiError is an error wrapping multiple validation errors +// returned by OriginalDst.ValidateAll() if the designated constraints aren't met. +type OriginalDstMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalDstMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalDstMultiError) AllErrors() []error { return m } + // OriginalDstValidationError is the validation error returned by // OriginalDst.Validate if the designated constraints aren't met. type OriginalDstValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.go b/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.go index 40a67373ee..9114584565 100644 --- a/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.go +++ b/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/listener/original_src/v3/original_src.proto -package envoy_extensions_filters_listener_original_src_v3 +package original_srcv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The Original Src filter binds upstream connections to the original source address determined // for the connection. This address could come from something like the Proxy Protocol filter, or it // could come from trusted http headers. @@ -104,24 +98,29 @@ var file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_ra 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x53, 0x72, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x72, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x42, 0x5d, 0x0a, 0x3f, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0x42, - 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0b, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x62, + 0x69, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x62, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x45, 0x9a, 0xc5, + 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x53, 0x72, 0x63, 0x42, 0xc6, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, + 0x72, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, + 0x72, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.validate.go b/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.validate.go index 5ff663201d..d9f220c80b 100644 --- a/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/listener/original_src/v3/original_src.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/listener/original_src/v3/original_src.proto -package envoy_extensions_filters_listener_original_src_v3 +package original_srcv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,59 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OriginalSrc with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OriginalSrc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalSrc with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OriginalSrcMultiError, or +// nil if none found. +func (m *OriginalSrc) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalSrc) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for BindPort // no validation rules for Mark + if len(errors) > 0 { + return OriginalSrcMultiError(errors) + } + return nil } +// OriginalSrcMultiError is an error wrapping multiple validation errors +// returned by OriginalSrc.ValidateAll() if the designated constraints aren't met. +type OriginalSrcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalSrcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalSrcMultiError) AllErrors() []error { return m } + // OriginalSrcValidationError is the validation error returned by // OriginalSrc.Validate if the designated constraints aren't met. type OriginalSrcValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.go b/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.go index 7560b24717..81e3f768ca 100644 --- a/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.go +++ b/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto -package envoy_extensions_filters_listener_proxy_protocol_v3 +package proxy_protocolv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ProxyProtocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -236,13 +231,20 @@ var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_prot 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, - 0x61, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xce, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.validate.go b/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.validate.go index a4011e2822..324ed16925 100644 --- a/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto -package envoy_extensions_filters_listener_proxy_protocol_v3 +package proxy_protocolv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ProxyProtocol with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ProxyProtocol) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocol with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ProxyProtocolMultiError, or +// nil if none found. +func (m *ProxyProtocol) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocol) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocolValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocolValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProxyProtocolValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -56,9 +91,30 @@ func (m *ProxyProtocol) Validate() error { } + if len(errors) > 0 { + return ProxyProtocolMultiError(errors) + } + return nil } +// ProxyProtocolMultiError is an error wrapping multiple validation errors +// returned by ProxyProtocol.ValidateAll() if the designated constraints +// aren't met. +type ProxyProtocolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocolMultiError) AllErrors() []error { return m } + // ProxyProtocolValidationError is the validation error returned by // ProxyProtocol.Validate if the designated constraints aren't met. type ProxyProtocolValidationError struct { @@ -115,24 +171,63 @@ var _ interface { // Validate checks the field values on ProxyProtocol_KeyValuePair with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ProxyProtocol_KeyValuePair) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocol_KeyValuePair with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProxyProtocol_KeyValuePairMultiError, or nil if none found. +func (m *ProxyProtocol_KeyValuePair) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocol_KeyValuePair) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for MetadataNamespace if utf8.RuneCountInString(m.GetKey()) < 1 { - return ProxyProtocol_KeyValuePairValidationError{ + err := ProxyProtocol_KeyValuePairValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ProxyProtocol_KeyValuePairMultiError(errors) } return nil } +// ProxyProtocol_KeyValuePairMultiError is an error wrapping multiple +// validation errors returned by ProxyProtocol_KeyValuePair.ValidateAll() if +// the designated constraints aren't met. +type ProxyProtocol_KeyValuePairMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocol_KeyValuePairMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocol_KeyValuePairMultiError) AllErrors() []error { return m } + // ProxyProtocol_KeyValuePairValidationError is the validation error returned // by ProxyProtocol_KeyValuePair.Validate if the designated constraints aren't met. type ProxyProtocol_KeyValuePairValidationError struct { @@ -191,20 +286,57 @@ var _ interface { // Validate checks the field values on ProxyProtocol_Rule with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ProxyProtocol_Rule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocol_Rule with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProxyProtocol_RuleMultiError, or nil if none found. +func (m *ProxyProtocol_Rule) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocol_Rule) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetTlvType() >= 256 { - return ProxyProtocol_RuleValidationError{ + err := ProxyProtocol_RuleValidationError{ field: "TlvType", reason: "value must be less than 256", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetOnTlvPresent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOnTlvPresent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocol_RuleValidationError{ + field: "OnTlvPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocol_RuleValidationError{ + field: "OnTlvPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnTlvPresent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProxyProtocol_RuleValidationError{ field: "OnTlvPresent", @@ -214,9 +346,30 @@ func (m *ProxyProtocol_Rule) Validate() error { } } + if len(errors) > 0 { + return ProxyProtocol_RuleMultiError(errors) + } + return nil } +// ProxyProtocol_RuleMultiError is an error wrapping multiple validation errors +// returned by ProxyProtocol_Rule.ValidateAll() if the designated constraints +// aren't met. +type ProxyProtocol_RuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocol_RuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocol_RuleMultiError) AllErrors() []error { return m } + // ProxyProtocol_RuleValidationError is the validation error returned by // ProxyProtocol_Rule.Validate if the designated constraints aren't met. type ProxyProtocol_RuleValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.go b/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.go index 25764caedc..2abb9a5e70 100644 --- a/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.go +++ b/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto -package envoy_extensions_filters_listener_tls_inspector_v3 +package tls_inspectorv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" + wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,14 +22,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type TlsInspector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Populate `JA3` fingerprint hash using data from the TLS Client Hello packet. Default is false. + EnableJa3Fingerprinting *wrappers.BoolValue `protobuf:"bytes,1,opt,name=enable_ja3_fingerprinting,json=enableJa3Fingerprinting,proto3" json:"enable_ja3_fingerprinting,omitempty"` } func (x *TlsInspector) Reset() { @@ -64,6 +63,13 @@ func (*TlsInspector) Descriptor() ([]byte, []int) { return file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto_rawDescGZIP(), []int{0} } +func (x *TlsInspector) GetEnableJa3Fingerprinting() *wrappers.BoolValue { + if x != nil { + return x.EnableJa3Fingerprinting + } + return nil +} + var File_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto_rawDesc = []byte{ @@ -74,23 +80,37 @@ var file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto_ 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x74, 0x6c, 0x73, 0x5f, - 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, + 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, - 0x0a, 0x0c, 0x54, 0x6c, 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x41, - 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x74, 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x6c, 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x42, 0x5f, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x74, 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x54, 0x6c, 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, + 0x01, 0x0a, 0x0c, 0x54, 0x6c, 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x56, 0x0a, 0x19, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6a, 0x61, 0x33, 0x5f, 0x66, 0x69, + 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x61, 0x33, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, + 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x74, 0x6c, 0x73, + 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x6c, + 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0xca, 0x01, 0x0a, 0x40, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x74, + 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, + 0x11, 0x54, 0x6c, 0x73, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x74, + 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x74, 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -107,14 +127,16 @@ func file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto var file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto_goTypes = []interface{}{ - (*TlsInspector)(nil), // 0: envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector + (*TlsInspector)(nil), // 0: envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector + (*wrappers.BoolValue)(nil), // 1: google.protobuf.BoolValue } var file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector.enable_ja3_fingerprinting:type_name -> google.protobuf.BoolValue + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_listener_tls_inspector_v3_tls_inspector_proto_init() } diff --git a/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.validate.go b/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.validate.go index 573a746425..d87f99a64a 100644 --- a/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto -package envoy_extensions_filters_listener_tls_inspector_v3 +package tls_inspectorv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,84 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TlsInspector with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TlsInspector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsInspector with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TlsInspectorMultiError, or +// nil if none found. +func (m *TlsInspector) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsInspector) validate(all bool) error { if m == nil { return nil } + var errors []error + + if all { + switch v := interface{}(m.GetEnableJa3Fingerprinting()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsInspectorValidationError{ + field: "EnableJa3Fingerprinting", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsInspectorValidationError{ + field: "EnableJa3Fingerprinting", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnableJa3Fingerprinting()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsInspectorValidationError{ + field: "EnableJa3Fingerprinting", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TlsInspectorMultiError(errors) + } + return nil } +// TlsInspectorMultiError is an error wrapping multiple validation errors +// returned by TlsInspector.ValidateAll() if the designated constraints aren't met. +type TlsInspectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsInspectorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsInspectorMultiError) AllErrors() []error { return m } + // TlsInspectorValidationError is the validation error returned by // TlsInspector.Validate if the designated constraints aren't met. type TlsInspectorValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.go b/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.go index b4dec4b52b..ab2694c306 100644 --- a/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.go +++ b/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto -package envoy_extensions_filters_network_client_ssl_auth_v3 +package client_ssl_authv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ClientSSLAuth struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -157,13 +152,20 @@ var file_envoy_extensions_filters_network_client_ssl_auth_v3_client_ssl_auth_pro 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x53, 0x4c, - 0x41, 0x75, 0x74, 0x68, 0x42, 0x61, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x73, - 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x53, 0x73, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x41, 0x75, 0x74, 0x68, 0x42, 0xcf, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x73, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.validate.go b/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.validate.go index 9559f99d67..f69667e787 100644 --- a/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto -package envoy_extensions_filters_network_client_ssl_auth_v3 +package client_ssl_authv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,39 +31,85 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClientSSLAuth with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClientSSLAuth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientSSLAuth with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClientSSLAuthMultiError, or +// nil if none found. +func (m *ClientSSLAuth) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientSSLAuth) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetAuthApiCluster()) < 1 { - return ClientSSLAuthValidationError{ + err := ClientSSLAuthValidationError{ field: "AuthApiCluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_ClientSSLAuth_AuthApiCluster_Pattern.MatchString(m.GetAuthApiCluster()) { - return ClientSSLAuthValidationError{ + err := ClientSSLAuthValidationError{ field: "AuthApiCluster", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return ClientSSLAuthValidationError{ + err := ClientSSLAuthValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRefreshDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: "RefreshDelay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: "RefreshDelay", @@ -75,7 +122,26 @@ func (m *ClientSSLAuth) Validate() error { for idx, item := range m.GetIpWhiteList() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: fmt.Sprintf("IpWhiteList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientSSLAuthValidationError{ + field: fmt.Sprintf("IpWhiteList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: fmt.Sprintf("IpWhiteList[%v]", idx), @@ -87,9 +153,30 @@ func (m *ClientSSLAuth) Validate() error { } + if len(errors) > 0 { + return ClientSSLAuthMultiError(errors) + } + return nil } +// ClientSSLAuthMultiError is an error wrapping multiple validation errors +// returned by ClientSSLAuth.ValidateAll() if the designated constraints +// aren't met. +type ClientSSLAuthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientSSLAuthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientSSLAuthMultiError) AllErrors() []error { return m } + // ClientSSLAuthValidationError is the validation error returned by // ClientSSLAuth.Validate if the designated constraints aren't met. type ClientSSLAuthValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.pb.go b/pkg/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.pb.go new file mode 100644 index 0000000000..a247400500 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto + +package connection_limitv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ConnectionLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The prefix to use when emitting :ref:`statistics + // `. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // The max connections configuration to use for new incoming connections that are processed + // by the filter's filter chain. When max_connection is reached, the incoming connection + // will be closed after delay duration. + MaxConnections *wrappers.UInt64Value `protobuf:"bytes,2,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` + // The delay configuration to use for rejecting the connection after some specified time duration + // instead of immediately rejecting the connection. That way, a malicious user is not able to + // retry as fast as possible which provides a better DoS protection for Envoy. If this is not present, + // the connection will be closed immediately. + Delay *duration.Duration `protobuf:"bytes,3,opt,name=delay,proto3" json:"delay,omitempty"` + // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults + // to enabled. + RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,4,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"` +} + +func (x *ConnectionLimit) Reset() { + *x = ConnectionLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectionLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectionLimit) ProtoMessage() {} + +func (x *ConnectionLimit) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectionLimit.ProtoReflect.Descriptor instead. +func (*ConnectionLimit) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescGZIP(), []int{0} +} + +func (x *ConnectionLimit) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *ConnectionLimit) GetMaxConnections() *wrappers.UInt64Value { + if x != nil { + return x.MaxConnections + } + return nil +} + +func (x *ConnectionLimit) GetDelay() *duration.Duration { + if x != nil { + return x.Delay + } + return nil +} + +func (x *ConnectionLimit) GetRuntimeEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.RuntimeEnabled + } + return nil +} + +var File_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDesc = []byte{ + 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x02, 0x0a, + 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x4e, 0x0a, 0x0f, 0x6d, 0x61, + 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x51, 0x0a, 0x0f, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0xd4, + 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescData = file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDesc +) + +func file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDescData +} + +var file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_goTypes = []interface{}{ + (*ConnectionLimit)(nil), // 0: envoy.extensions.filters.network.connection_limit.v3.ConnectionLimit + (*wrappers.UInt64Value)(nil), // 1: google.protobuf.UInt64Value + (*duration.Duration)(nil), // 2: google.protobuf.Duration + (*v3.RuntimeFeatureFlag)(nil), // 3: envoy.config.core.v3.RuntimeFeatureFlag +} +var file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.connection_limit.v3.ConnectionLimit.max_connections:type_name -> google.protobuf.UInt64Value + 2, // 1: envoy.extensions.filters.network.connection_limit.v3.ConnectionLimit.delay:type_name -> google.protobuf.Duration + 3, // 2: envoy.extensions.filters.network.connection_limit.v3.ConnectionLimit.runtime_enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_init() } +func file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_init() { + if File_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectionLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto = out.File + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_rawDesc = nil + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_goTypes = nil + file_envoy_extensions_filters_network_connection_limit_v3_connection_limit_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.pb.validate.go new file mode 100644 index 0000000000..e2250eef5c --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.pb.validate.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto + +package connection_limitv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ConnectionLimit with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ConnectionLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConnectionLimit with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ConnectionLimitMultiError, or nil if none found. +func (m *ConnectionLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectionLimit) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := ConnectionLimitValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetMaxConnections(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := ConnectionLimitValidationError{ + field: "MaxConnections", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionLimitValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionLimitValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectionLimitValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectionLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ConnectionLimitMultiError(errors) + } + + return nil +} + +// ConnectionLimitMultiError is an error wrapping multiple validation errors +// returned by ConnectionLimit.ValidateAll() if the designated constraints +// aren't met. +type ConnectionLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectionLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectionLimitMultiError) AllErrors() []error { return m } + +// ConnectionLimitValidationError is the validation error returned by +// ConnectionLimit.Validate if the designated constraints aren't met. +type ConnectionLimitValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectionLimitValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectionLimitValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectionLimitValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectionLimitValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectionLimitValidationError) ErrorName() string { return "ConnectionLimitValidationError" } + +// Error satisfies the builtin error interface +func (e ConnectionLimitValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectionLimit.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectionLimitValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectionLimitValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.go b/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.go index 684af8bb23..c697e9cbd2 100644 --- a/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.go +++ b/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/direct_response/v3/config.proto -package envoy_extensions_filters_network_direct_response_v3 +package direct_responsev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Config struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -100,13 +95,20 @@ var file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDes 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x5a, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x42, 0xc8, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, + 0x76, 0x33, 0x3b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.validate.go b/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.validate.go index 5685377219..477855eb8c 100644 --- a/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/direct_response/v3/config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/direct_response/v3/config.proto -package envoy_extensions_filters_network_direct_response_v3 +package direct_responsev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Config with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigValidationError{ field: "Response", @@ -50,9 +85,29 @@ func (m *Config) Validate() error { } } + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil } +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + // ConfigValidationError is the validation error returned by Config.Validate if // the designated constraints aren't met. type ConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.go index 080ab55e12..4f6e902644 100644 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.go +++ b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto -package envoy_extensions_filters_network_dubbo_proxy_router_v3 +package routerv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Router struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -83,13 +78,20 @@ var file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_raw 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x42, 0x5d, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x42, 0xc5, 0x01, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.validate.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.validate.go index 69f7cd1571..afce741322 100644 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto -package envoy_extensions_filters_network_dubbo_proxy_router_v3 +package routerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Router with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RouterMultiError(errors) + } + return nil } +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + // RouterValidationError is the validation error returned by Router.Validate if // the designated constraints aren't met. type RouterValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.go index 62463ddd62..aa866174da 100644 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto -package envoy_extensions_filters_network_dubbo_proxy_v3 +package dubbo_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Dubbo Protocol types supported by Envoy. type ProtocolType int32 @@ -336,13 +331,20 @@ var file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDe 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x10, 0x00, 0x2a, 0x21, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, - 0x73, 0x73, 0x69, 0x61, 0x6e, 0x32, 0x10, 0x00, 0x42, 0x5a, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x44, 0x75, 0x62, 0x62, 0x6f, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x73, 0x69, 0x61, 0x6e, 0x32, 0x10, 0x00, 0x42, 0xc0, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, + 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x44, 0x75, 0x62, 0x62, + 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.validate.go index cf09c12f2d..3d6b0267bd 100644 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto -package envoy_extensions_filters_network_dubbo_proxy_v3 +package dubbo_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,41 +31,88 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on DubboProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DubboProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DubboProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DubboProxyMultiError, or +// nil if none found. +func (m *DubboProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *DubboProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return DubboProxyValidationError{ + err := DubboProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProtocolType_name[int32(m.GetProtocolType())]; !ok { - return DubboProxyValidationError{ + err := DubboProxyValidationError{ field: "ProtocolType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := SerializationType_name[int32(m.GetSerializationType())]; !ok { - return DubboProxyValidationError{ + err := DubboProxyValidationError{ field: "SerializationType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRouteConfig() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboProxyValidationError{ field: fmt.Sprintf("RouteConfig[%v]", idx), @@ -79,7 +127,26 @@ func (m *DubboProxy) Validate() error { for idx, item := range m.GetDubboFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("DubboFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("DubboFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboProxyValidationError{ field: fmt.Sprintf("DubboFilters[%v]", idx), @@ -91,9 +158,29 @@ func (m *DubboProxy) Validate() error { } + if len(errors) > 0 { + return DubboProxyMultiError(errors) + } + return nil } +// DubboProxyMultiError is an error wrapping multiple validation errors +// returned by DubboProxy.ValidateAll() if the designated constraints aren't met. +type DubboProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DubboProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DubboProxyMultiError) AllErrors() []error { return m } + // DubboProxyValidationError is the validation error returned by // DubboProxy.Validate if the designated constraints aren't met. type DubboProxyValidationError struct { @@ -149,21 +236,58 @@ var _ interface { } = DubboProxyValidationError{} // Validate checks the field values on DubboFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DubboFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DubboFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DubboFilterMultiError, or +// nil if none found. +func (m *DubboFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *DubboFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return DubboFilterValidationError{ + err := DubboFilterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboFilterValidationError{ field: "Config", @@ -173,9 +297,29 @@ func (m *DubboFilter) Validate() error { } } + if len(errors) > 0 { + return DubboFilterMultiError(errors) + } + return nil } +// DubboFilterMultiError is an error wrapping multiple validation errors +// returned by DubboFilter.ValidateAll() if the designated constraints aren't met. +type DubboFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DubboFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DubboFilterMultiError) AllErrors() []error { return m } + // DubboFilterValidationError is the validation error returned by // DubboFilter.Validate if the designated constraints aren't met. type DubboFilterValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.go index b5df0a887a..072b737e29 100644 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.go +++ b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/dubbo_proxy/v3/route.proto -package envoy_extensions_filters_network_dubbo_proxy_v3 +package dubbo_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type RouteConfiguration struct { state protoimpl.MessageState @@ -38,7 +33,15 @@ type RouteConfiguration struct { // The name of the route configuration. Reserved for future use in asynchronous route discovery. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The interface name of the service. + // The interface name of the service. Wildcard interface are supported in the suffix or prefix form. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add``, ``com.prod.methods.add``, etc. + // ``com.dev.methods.*`` will match ``com.dev.methods.add``, ``com.dev.methods.update``, etc. + // Special wildcard ``*`` matching any interface. + // + // .. note:: + // + // The wildcard will not match the empty string. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add`` but not ``.methods.add``. Interface string `protobuf:"bytes,2,opt,name=interface,proto3" json:"interface,omitempty"` // Which group does the interface belong to. Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` @@ -597,13 +600,19 @@ var file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDesc = [ 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x55, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, - 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0xbb, 0x01, 0x0a, 0x3d, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, + 0x33, 0x3b, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.validate.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.validate.go index 0c33aa26ec..443d6a5746 100644 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/dubbo_proxy/v3/route.proto -package envoy_extensions_filters_network_dubbo_proxy_v3 +package dubbo_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for Interface @@ -52,7 +68,26 @@ func (m *RouteConfiguration) Validate() error { for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -64,9 +99,30 @@ func (m *RouteConfiguration) Validate() error { } + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil } +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + // RouteConfigurationValidationError is the validation error returned by // RouteConfiguration.Validate if the designated constraints aren't met. type RouteConfigurationValidationError struct { @@ -124,20 +180,57 @@ var _ interface { } = RouteConfigurationValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatch() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Match", @@ -148,13 +241,36 @@ func (m *Route) Validate() error { } if m.GetRoute() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Route", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Route", @@ -164,9 +280,29 @@ func (m *Route) Validate() error { } } + if len(errors) > 0 { + return RouteMultiError(errors) + } + return nil } +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + // RouteValidationError is the validation error returned by Route.Validate if // the designated constraints aren't met. type RouteValidationError struct { @@ -222,13 +358,47 @@ var _ interface { } = RouteValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMethod()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMethod()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Method", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Method", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMethod()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: "Method", @@ -241,7 +411,26 @@ func (m *RouteMatch) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -253,9 +442,29 @@ func (m *RouteMatch) Validate() error { } + if len(errors) > 0 { + return RouteMatchMultiError(errors) + } + return nil } +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + // RouteMatchValidationError is the validation error returned by // RouteMatch.Validate if the designated constraints aren't met. type RouteMatchValidationError struct { @@ -311,13 +520,27 @@ var _ interface { } = RouteMatchValidationError{} // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ClusterSpecifier.(type) { case *RouteAction_Cluster: @@ -325,7 +548,26 @@ func (m *RouteAction) Validate() error { case *RouteAction_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "WeightedClusters", @@ -336,16 +578,40 @@ func (m *RouteAction) Validate() error { } default: - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return RouteActionMultiError(errors) } return nil } +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + // RouteActionValidationError is the validation error returned by // RouteAction.Validate if the designated constraints aren't met. type RouteActionValidationError struct { @@ -401,14 +667,47 @@ var _ interface { } = RouteActionValidationError{} // Validate checks the field values on MethodMatch with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MethodMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MethodMatchMultiError, or +// nil if none found. +func (m *MethodMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatch) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: "Name", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: "Name", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatchValidationError{ field: "Name", @@ -418,26 +717,75 @@ func (m *MethodMatch) Validate() error { } } - for key, val := range m.GetParamsMatch() { - _ = val - - // no validation rules for ParamsMatch[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MethodMatchValidationError{ - field: fmt.Sprintf("ParamsMatch[%v]", key), - reason: "embedded message failed validation", - cause: err, + { + sorted_keys := make([]uint32, len(m.GetParamsMatch())) + i := 0 + for key := range m.GetParamsMatch() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetParamsMatch()[key] + _ = val + + // no validation rules for ParamsMatch[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + } } } + } + } + if len(errors) > 0 { + return MethodMatchMultiError(errors) } return nil } +// MethodMatchMultiError is an error wrapping multiple validation errors +// returned by MethodMatch.ValidateAll() if the designated constraints aren't met. +type MethodMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatchMultiError) AllErrors() []error { return m } + // MethodMatchValidationError is the validation error returned by // MethodMatch.Validate if the designated constraints aren't met. type MethodMatchValidationError struct { @@ -494,12 +842,27 @@ var _ interface { // Validate checks the field values on MethodMatch_ParameterMatchSpecifier with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *MethodMatch_ParameterMatchSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatch_ParameterMatchSpecifier +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// MethodMatch_ParameterMatchSpecifierMultiError, or nil if none found. +func (m *MethodMatch_ParameterMatchSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatch_ParameterMatchSpecifier) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ParameterMatchSpecifier.(type) { case *MethodMatch_ParameterMatchSpecifier_ExactMatch: @@ -507,7 +870,26 @@ func (m *MethodMatch_ParameterMatchSpecifier) Validate() error { case *MethodMatch_ParameterMatchSpecifier_RangeMatch: - if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRangeMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatch_ParameterMatchSpecifierValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatch_ParameterMatchSpecifierValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatch_ParameterMatchSpecifierValidationError{ field: "RangeMatch", @@ -519,9 +901,31 @@ func (m *MethodMatch_ParameterMatchSpecifier) Validate() error { } + if len(errors) > 0 { + return MethodMatch_ParameterMatchSpecifierMultiError(errors) + } + return nil } +// MethodMatch_ParameterMatchSpecifierMultiError is an error wrapping multiple +// validation errors returned by +// MethodMatch_ParameterMatchSpecifier.ValidateAll() if the designated +// constraints aren't met. +type MethodMatch_ParameterMatchSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatch_ParameterMatchSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatch_ParameterMatchSpecifierMultiError) AllErrors() []error { return m } + // MethodMatch_ParameterMatchSpecifierValidationError is the validation error // returned by MethodMatch_ParameterMatchSpecifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.pb.go deleted file mode 100644 index 98f21e744b..0000000000 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.pb.go +++ /dev/null @@ -1,437 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.proto - -package envoy_extensions_filters_network_dubbo_proxy_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Dubbo Protocol types supported by Envoy. -type ProtocolType int32 - -const ( - // the default protocol. - ProtocolType_Dubbo ProtocolType = 0 -) - -// Enum value maps for ProtocolType. -var ( - ProtocolType_name = map[int32]string{ - 0: "Dubbo", - } - ProtocolType_value = map[string]int32{ - "Dubbo": 0, - } -) - -func (x ProtocolType) Enum() *ProtocolType { - p := new(ProtocolType) - *p = x - return p -} - -func (x ProtocolType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProtocolType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_enumTypes[0].Descriptor() -} - -func (ProtocolType) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_enumTypes[0] -} - -func (x ProtocolType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProtocolType.Descriptor instead. -func (ProtocolType) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescGZIP(), []int{0} -} - -// Dubbo Serialization types supported by Envoy. -type SerializationType int32 - -const ( - // the default serialization protocol. - SerializationType_Hessian2 SerializationType = 0 -) - -// Enum value maps for SerializationType. -var ( - SerializationType_name = map[int32]string{ - 0: "Hessian2", - } - SerializationType_value = map[string]int32{ - "Hessian2": 0, - } -) - -func (x SerializationType) Enum() *SerializationType { - p := new(SerializationType) - *p = x - return p -} - -func (x SerializationType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SerializationType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_enumTypes[1].Descriptor() -} - -func (SerializationType) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_enumTypes[1] -} - -func (x SerializationType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SerializationType.Descriptor instead. -func (SerializationType) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescGZIP(), []int{1} -} - -// [#next-free-field: 6] -type DubboProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The human readable prefix to use when emitting statistics. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // Configure the protocol used. - ProtocolType ProtocolType `protobuf:"varint,2,opt,name=protocol_type,json=protocolType,proto3,enum=envoy.extensions.filters.network.dubbo_proxy.v4alpha.ProtocolType" json:"protocol_type,omitempty"` - // Configure the serialization protocol used. - SerializationType SerializationType `protobuf:"varint,3,opt,name=serialization_type,json=serializationType,proto3,enum=envoy.extensions.filters.network.dubbo_proxy.v4alpha.SerializationType" json:"serialization_type,omitempty"` - // The route table for the connection manager is static and is specified in this property. - RouteConfig []*RouteConfiguration `protobuf:"bytes,4,rep,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` - // A list of individual Dubbo filters that make up the filter chain for requests made to the - // Dubbo proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no dubbo_filters are specified, a default Dubbo router filter - // (`envoy.filters.dubbo.router`) is used. - DubboFilters []*DubboFilter `protobuf:"bytes,5,rep,name=dubbo_filters,json=dubboFilters,proto3" json:"dubbo_filters,omitempty"` -} - -func (x *DubboProxy) Reset() { - *x = DubboProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DubboProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DubboProxy) ProtoMessage() {} - -func (x *DubboProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DubboProxy.ProtoReflect.Descriptor instead. -func (*DubboProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescGZIP(), []int{0} -} - -func (x *DubboProxy) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *DubboProxy) GetProtocolType() ProtocolType { - if x != nil { - return x.ProtocolType - } - return ProtocolType_Dubbo -} - -func (x *DubboProxy) GetSerializationType() SerializationType { - if x != nil { - return x.SerializationType - } - return SerializationType_Hessian2 -} - -func (x *DubboProxy) GetRouteConfig() []*RouteConfiguration { - if x != nil { - return x.RouteConfig - } - return nil -} - -func (x *DubboProxy) GetDubboFilters() []*DubboFilter { - if x != nil { - return x.DubboFilters - } - return nil -} - -// DubboFilter configures a Dubbo filter. -type DubboFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a supported - // filter. - 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. - Config *any.Any `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *DubboFilter) Reset() { - *x = DubboFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DubboFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DubboFilter) ProtoMessage() {} - -func (x *DubboFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DubboFilter.ProtoReflect.Descriptor instead. -func (*DubboFilter) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescGZIP(), []int{1} -} - -func (x *DubboFilter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DubboFilter) GetConfig() *any.Any { - if x != nil { - return x.Config - } - return nil -} - -var File_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDesc = []byte{ - 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x40, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x04, 0x0a, 0x0a, 0x44, 0x75, 0x62, 0x62, 0x6f, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x71, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x11, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, - 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x66, 0x0a, 0x0d, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, - 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x64, 0x75, - 0x62, 0x62, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, - 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x22, 0x9c, 0x01, - 0x0a, 0x0b, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, - 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2a, 0x19, 0x0a, 0x0c, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, - 0x44, 0x75, 0x62, 0x62, 0x6f, 0x10, 0x00, 0x2a, 0x21, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, - 0x48, 0x65, 0x73, 0x73, 0x69, 0x61, 0x6e, 0x32, 0x10, 0x00, 0x42, 0x5f, 0x0a, 0x42, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, - 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x0f, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescData = file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDesc -) - -func file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDescData -} - -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_goTypes = []interface{}{ - (ProtocolType)(0), // 0: envoy.extensions.filters.network.dubbo_proxy.v4alpha.ProtocolType - (SerializationType)(0), // 1: envoy.extensions.filters.network.dubbo_proxy.v4alpha.SerializationType - (*DubboProxy)(nil), // 2: envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboProxy - (*DubboFilter)(nil), // 3: envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboFilter - (*RouteConfiguration)(nil), // 4: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteConfiguration - (*any.Any)(nil), // 5: google.protobuf.Any -} -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_depIdxs = []int32{ - 0, // 0: envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboProxy.protocol_type:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.ProtocolType - 1, // 1: envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboProxy.serialization_type:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.SerializationType - 4, // 2: envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboProxy.route_config:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteConfiguration - 3, // 3: envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboProxy.dubbo_filters:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboFilter - 5, // 4: envoy.extensions.filters.network.dubbo_proxy.v4alpha.DubboFilter.config:type_name -> google.protobuf.Any - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_init() } -func file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_init() { - if File_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto != nil { - return - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DubboProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DubboFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto = out.File - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_dubbo_proxy_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.pb.validate.go deleted file mode 100644 index f2a313027a..0000000000 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.pb.validate.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/dubbo_proxy/v4alpha/dubbo_proxy.proto - -package envoy_extensions_filters_network_dubbo_proxy_v4alpha - -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{} -) - -// Validate checks the field values on DubboProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *DubboProxy) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return DubboProxyValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if _, ok := ProtocolType_name[int32(m.GetProtocolType())]; !ok { - return DubboProxyValidationError{ - field: "ProtocolType", - reason: "value must be one of the defined enum values", - } - } - - if _, ok := SerializationType_name[int32(m.GetSerializationType())]; !ok { - return DubboProxyValidationError{ - field: "SerializationType", - reason: "value must be one of the defined enum values", - } - } - - for idx, item := range m.GetRouteConfig() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DubboProxyValidationError{ - field: fmt.Sprintf("RouteConfig[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetDubboFilters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DubboProxyValidationError{ - field: fmt.Sprintf("DubboFilters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// DubboProxyValidationError is the validation error returned by -// DubboProxy.Validate if the designated constraints aren't met. -type DubboProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DubboProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DubboProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DubboProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DubboProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DubboProxyValidationError) ErrorName() string { return "DubboProxyValidationError" } - -// Error satisfies the builtin error interface -func (e DubboProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDubboProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DubboProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DubboProxyValidationError{} - -// Validate checks the field values on DubboFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *DubboFilter) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return DubboFilterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DubboFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// DubboFilterValidationError is the validation error returned by -// DubboFilter.Validate if the designated constraints aren't met. -type DubboFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DubboFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DubboFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DubboFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DubboFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DubboFilterValidationError) ErrorName() string { return "DubboFilterValidationError" } - -// Error satisfies the builtin error interface -func (e DubboFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDubboFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DubboFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DubboFilterValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.pb.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.pb.go deleted file mode 100644 index a075f69dfa..0000000000 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.pb.go +++ /dev/null @@ -1,762 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto - -package envoy_extensions_filters_network_dubbo_proxy_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 6] -type RouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The interface name of the service. - Interface string `protobuf:"bytes,2,opt,name=interface,proto3" json:"interface,omitempty"` - // Which group does the interface belong to. - Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` - // The version number of the interface. - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - Routes []*Route `protobuf:"bytes,5,rep,name=routes,proto3" json:"routes,omitempty"` -} - -func (x *RouteConfiguration) Reset() { - *x = RouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteConfiguration) ProtoMessage() {} - -func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. -func (*RouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteConfiguration) GetInterface() string { - if x != nil { - return x.Interface - } - return "" -} - -func (x *RouteConfiguration) GetGroup() string { - if x != nil { - return x.Group - } - return "" -} - -func (x *RouteConfiguration) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *RouteConfiguration) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Route matching parameters. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Route request to some upstream cluster. - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescGZIP(), []int{1} -} - -func (x *Route) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (x *Route) GetRoute() *RouteAction { - if x != nil { - return x.Route - } - return nil -} - -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Method level routing matching. - Method *MethodMatch `protobuf:"bytes,1,opt,name=method,proto3" json:"method,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 []*v4alpha.HeaderMatcher `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescGZIP(), []int{2} -} - -func (x *RouteMatch) GetMethod() *MethodMatch { - if x != nil { - return x.Method - } - return nil -} - -func (x *RouteMatch) GetHeaders() []*v4alpha.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -type RouteAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ClusterSpecifier: - // *RouteAction_Cluster - // *RouteAction_WeightedClusters - ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` -} - -func (x *RouteAction) Reset() { - *x = RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction) ProtoMessage() {} - -func (x *RouteAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. -func (*RouteAction) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescGZIP(), []int{3} -} - -func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { - if m != nil { - return m.ClusterSpecifier - } - return nil -} - -func (x *RouteAction) GetCluster() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *RouteAction) GetWeightedClusters() *v4alpha.WeightedCluster { - if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -type isRouteAction_ClusterSpecifier interface { - isRouteAction_ClusterSpecifier() -} - -type RouteAction_Cluster struct { - // Indicates the upstream cluster to which the request should be routed. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` -} - -type RouteAction_WeightedClusters struct { - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - // Currently ClusterWeight only supports the name and weight fields. - WeightedClusters *v4alpha.WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} - -func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} - -type MethodMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the method. - Name *v4alpha1.StringMatcher `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Method parameter definition. - // The key is the parameter index, starting from 0. - // The value is the parameter matching type. - ParamsMatch map[uint32]*MethodMatch_ParameterMatchSpecifier `protobuf:"bytes,2,rep,name=params_match,json=paramsMatch,proto3" json:"params_match,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *MethodMatch) Reset() { - *x = MethodMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MethodMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MethodMatch) ProtoMessage() {} - -func (x *MethodMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MethodMatch.ProtoReflect.Descriptor instead. -func (*MethodMatch) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescGZIP(), []int{4} -} - -func (x *MethodMatch) GetName() *v4alpha1.StringMatcher { - if x != nil { - return x.Name - } - return nil -} - -func (x *MethodMatch) GetParamsMatch() map[uint32]*MethodMatch_ParameterMatchSpecifier { - if x != nil { - return x.ParamsMatch - } - return nil -} - -// The parameter matching type. -type MethodMatch_ParameterMatchSpecifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ParameterMatchSpecifier: - // *MethodMatch_ParameterMatchSpecifier_ExactMatch - // *MethodMatch_ParameterMatchSpecifier_RangeMatch - ParameterMatchSpecifier isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier `protobuf_oneof:"parameter_match_specifier"` -} - -func (x *MethodMatch_ParameterMatchSpecifier) Reset() { - *x = MethodMatch_ParameterMatchSpecifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MethodMatch_ParameterMatchSpecifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MethodMatch_ParameterMatchSpecifier) ProtoMessage() {} - -func (x *MethodMatch_ParameterMatchSpecifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MethodMatch_ParameterMatchSpecifier.ProtoReflect.Descriptor instead. -func (*MethodMatch_ParameterMatchSpecifier) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescGZIP(), []int{4, 0} -} - -func (m *MethodMatch_ParameterMatchSpecifier) GetParameterMatchSpecifier() isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier { - if m != nil { - return m.ParameterMatchSpecifier - } - return nil -} - -func (x *MethodMatch_ParameterMatchSpecifier) GetExactMatch() string { - if x, ok := x.GetParameterMatchSpecifier().(*MethodMatch_ParameterMatchSpecifier_ExactMatch); ok { - return x.ExactMatch - } - return "" -} - -func (x *MethodMatch_ParameterMatchSpecifier) GetRangeMatch() *v3.Int64Range { - if x, ok := x.GetParameterMatchSpecifier().(*MethodMatch_ParameterMatchSpecifier_RangeMatch); ok { - return x.RangeMatch - } - return nil -} - -type isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier interface { - isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier() -} - -type MethodMatch_ParameterMatchSpecifier_ExactMatch struct { - // If specified, header match will be performed based on the value of the header. - ExactMatch string `protobuf:"bytes,3,opt,name=exact_match,json=exactMatch,proto3,oneof"` -} - -type MethodMatch_ParameterMatchSpecifier_RangeMatch struct { - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting - // of an optional plus or minus sign followed by a sequence of digits. The rule will not match - // if the header value does not represent an integer. Match will fail for empty values, - // floating point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, - // "somestring", 10.9, "-1somestring" - RangeMatch *v3.Int64Range `protobuf:"bytes,4,opt,name=range_match,json=rangeMatch,proto3,oneof"` -} - -func (*MethodMatch_ParameterMatchSpecifier_ExactMatch) isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier() { -} - -func (*MethodMatch_ParameterMatchSpecifier_RangeMatch) isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier() { -} - -var File_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDesc = []byte{ - 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x49, 0x9a, 0xc5, 0x88, 0x1e, 0x44, 0x0a, - 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x02, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x60, 0x0a, - 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x61, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, - 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x22, 0xef, 0x01, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x59, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, - 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x22, 0xe3, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x5a, - 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, - 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, - 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x99, 0x05, 0x0a, 0x0b, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x75, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x52, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xf3, - 0x01, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0b, 0x65, 0x78, - 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3c, 0x0a, - 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, - 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x5a, 0x9a, 0xc5, 0x88, - 0x1e, 0x55, 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x1a, 0x99, 0x01, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6f, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x59, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, - 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x5a, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescData = file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDesc -) - -func file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDescData -} - -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteConfiguration - (*Route)(nil), // 1: envoy.extensions.filters.network.dubbo_proxy.v4alpha.Route - (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteMatch - (*RouteAction)(nil), // 3: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteAction - (*MethodMatch)(nil), // 4: envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch - (*MethodMatch_ParameterMatchSpecifier)(nil), // 5: envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.ParameterMatchSpecifier - nil, // 6: envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.ParamsMatchEntry - (*v4alpha.HeaderMatcher)(nil), // 7: envoy.config.route.v4alpha.HeaderMatcher - (*v4alpha.WeightedCluster)(nil), // 8: envoy.config.route.v4alpha.WeightedCluster - (*v4alpha1.StringMatcher)(nil), // 9: envoy.type.matcher.v4alpha.StringMatcher - (*v3.Int64Range)(nil), // 10: envoy.type.v3.Int64Range -} -var file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteConfiguration.routes:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.Route - 2, // 1: envoy.extensions.filters.network.dubbo_proxy.v4alpha.Route.match:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteMatch - 3, // 2: envoy.extensions.filters.network.dubbo_proxy.v4alpha.Route.route:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteAction - 4, // 3: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteMatch.method:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch - 7, // 4: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteMatch.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 8, // 5: envoy.extensions.filters.network.dubbo_proxy.v4alpha.RouteAction.weighted_clusters:type_name -> envoy.config.route.v4alpha.WeightedCluster - 9, // 6: envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.name:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 6, // 7: envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.params_match:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.ParamsMatchEntry - 10, // 8: envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.ParameterMatchSpecifier.range_match:type_name -> envoy.type.v3.Int64Range - 5, // 9: envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.ParamsMatchEntry.value:type_name -> envoy.extensions.filters.network.dubbo_proxy.v4alpha.MethodMatch.ParameterMatchSpecifier - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_init() } -func file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_init() { - if File_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodMatch_ParameterMatchSpecifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*RouteAction_Cluster)(nil), - (*RouteAction_WeightedClusters)(nil), - } - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*MethodMatch_ParameterMatchSpecifier_ExactMatch)(nil), - (*MethodMatch_ParameterMatchSpecifier_RangeMatch)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto = out.File - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_rawDesc = nil - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_goTypes = nil - file_envoy_extensions_filters_network_dubbo_proxy_v4alpha_route_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.pb.validate.go b/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.pb.validate.go deleted file mode 100644 index 40740dbaa7..0000000000 --- a/pkg/api/envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.pb.validate.go +++ /dev/null @@ -1,580 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/dubbo_proxy/v4alpha/route.proto - -package envoy_extensions_filters_network_dubbo_proxy_v4alpha - -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{} -) - -// 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 - - // no validation rules for Interface - - // no validation rules for Group - - // no validation rules for Version - - for idx, item := range m.GetRoutes() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - 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{} - -// 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 - } - - 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 m.GetRoute() == nil { - return RouteValidationError{ - field: "Route", - reason: "value is required", - } - } - - 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, - } - } - } - - 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 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.GetMethod()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "Method", - 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, - } - } - } - - } - - 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 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 - } - - switch m.ClusterSpecifier.(type) { - - case *RouteAction_Cluster: - // no validation rules for Cluster - - 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", - } - - } - - 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 MethodMatch with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *MethodMatch) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MethodMatchValidationError{ - field: "Name", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for key, val := range m.GetParamsMatch() { - _ = val - - // no validation rules for ParamsMatch[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MethodMatchValidationError{ - field: fmt.Sprintf("ParamsMatch[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// MethodMatchValidationError is the validation error returned by -// MethodMatch.Validate if the designated constraints aren't met. -type MethodMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MethodMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MethodMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MethodMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MethodMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MethodMatchValidationError) ErrorName() string { return "MethodMatchValidationError" } - -// Error satisfies the builtin error interface -func (e MethodMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMethodMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MethodMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MethodMatchValidationError{} - -// Validate checks the field values on MethodMatch_ParameterMatchSpecifier with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *MethodMatch_ParameterMatchSpecifier) Validate() error { - if m == nil { - return nil - } - - switch m.ParameterMatchSpecifier.(type) { - - case *MethodMatch_ParameterMatchSpecifier_ExactMatch: - // no validation rules for ExactMatch - - case *MethodMatch_ParameterMatchSpecifier_RangeMatch: - - if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MethodMatch_ParameterMatchSpecifierValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// MethodMatch_ParameterMatchSpecifierValidationError is the validation error -// returned by MethodMatch_ParameterMatchSpecifier.Validate if the designated -// constraints aren't met. -type MethodMatch_ParameterMatchSpecifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MethodMatch_ParameterMatchSpecifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MethodMatch_ParameterMatchSpecifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MethodMatch_ParameterMatchSpecifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MethodMatch_ParameterMatchSpecifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MethodMatch_ParameterMatchSpecifierValidationError) ErrorName() string { - return "MethodMatch_ParameterMatchSpecifierValidationError" -} - -// Error satisfies the builtin error interface -func (e MethodMatch_ParameterMatchSpecifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMethodMatch_ParameterMatchSpecifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MethodMatch_ParameterMatchSpecifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MethodMatch_ParameterMatchSpecifierValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.go b/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.go index 81d7130994..6913ebbada 100644 --- a/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.go +++ b/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/echo/v3/echo.proto -package envoy_extensions_filters_network_echo_v3 +package echov3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Echo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -80,13 +75,18 @@ var file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDesc = []byte{ 0x6f, 0x22, 0x37, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, - 0x68, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x42, 0x4d, 0x0a, 0x36, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, 0x68, - 0x6f, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x68, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x42, 0xa5, 0x01, 0x0a, 0x36, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, + 0x68, 0x6f, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x63, 0x68, 0x6f, + 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x63, 0x68, 0x6f, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.validate.go b/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.validate.go index 31ab675c98..3cb5f7803f 100644 --- a/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/echo/v3/echo.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/echo/v3/echo.proto -package envoy_extensions_filters_network_echo_v3 +package echov3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Echo with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Echo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Echo with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in EchoMultiError, or nil if none found. +func (m *Echo) ValidateAll() error { + return m.validate(true) +} + +func (m *Echo) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return EchoMultiError(errors) + } + return nil } +// EchoMultiError is an error wrapping multiple validation errors returned by +// Echo.ValidateAll() if the designated constraints aren't met. +type EchoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EchoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EchoMultiError) AllErrors() []error { return m } + // EchoValidationError is the validation error returned by Echo.Validate if the // designated constraints aren't met. type EchoValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.go b/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.go index e17d7959c6..9de2e59451 100644 --- a/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.go +++ b/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto -package envoy_extensions_filters_network_ext_authz_v3 +package ext_authzv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,15 +24,11 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // External Authorization filter calls out to an external service over the // gRPC Authorization API defined by -// :ref:`CheckRequest `. +// :ref:`CheckRequest `. // A failed check will cause this filter to close the TCP connection. -// [#next-free-field: 7] +// [#next-free-field: 8] type ExtAuthz struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -52,7 +47,7 @@ type ExtAuthz struct { // Specifies if the peer certificate is sent to the external service. // // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. + // :ref:`certificate`. IncludePeerCertificate bool `protobuf:"varint,4,opt,name=include_peer_certificate,json=includePeerCertificate,proto3" json:"include_peer_certificate,omitempty"` // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and // version of Check{Request,Response} used on the wire. @@ -60,6 +55,10 @@ type ExtAuthz struct { // Specifies if the filter is enabled with metadata matcher. // If this field is not specified, the filter will be enabled for all requests. FilterEnabledMetadata *v31.MetadataMatcher `protobuf:"bytes,6,opt,name=filter_enabled_metadata,json=filterEnabledMetadata,proto3" json:"filter_enabled_metadata,omitempty"` + // Optional labels that will be passed to :ref:`labels` in + // :ref:`destination`. + // The labels will be read from :ref:`metadata` with the specified key. + BootstrapMetadataLabelsKey string `protobuf:"bytes,7,opt,name=bootstrap_metadata_labels_key,json=bootstrapMetadataLabelsKey,proto3" json:"bootstrap_metadata_labels_key,omitempty"` } func (x *ExtAuthz) Reset() { @@ -126,7 +125,7 @@ func (x *ExtAuthz) GetTransportApiVersion() v3.ApiVersion { if x != nil { return x.TransportApiVersion } - return v3.ApiVersion_AUTO + return v3.ApiVersion(0) } func (x *ExtAuthz) GetFilterEnabledMetadata() *v31.MetadataMatcher { @@ -136,6 +135,13 @@ func (x *ExtAuthz) GetFilterEnabledMetadata() *v31.MetadataMatcher { return nil } +func (x *ExtAuthz) GetBootstrapMetadataLabelsKey() string { + if x != nil { + return x.BootstrapMetadataLabelsKey + } + return "" +} + var File_envoy_extensions_filters_network_ext_authz_v3_ext_authz_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_network_ext_authz_v3_ext_authz_proto_rawDesc = []byte{ @@ -159,7 +165,7 @@ var file_envoy_extensions_filters_network_ext_authz_v3_ext_authz_proto_rawDesc = 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xdc, 0x03, 0x0a, 0x08, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x12, + 0x74, 0x6f, 0x22, 0x9f, 0x04, 0x0a, 0x08, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x44, 0x0a, 0x0c, 0x67, 0x72, 0x70, @@ -185,17 +191,27 @@ var file_envoy_extensions_filters_network_ext_authz_v3_ext_authz_proto_rawDesc = 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x15, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x42, 0x56, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x33, - 0x42, 0x0d, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x1d, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, + 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, + 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, + 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x7a, 0x42, 0xb8, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, + 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, 0x74, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.validate.go b/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.validate.go index 6cab9c74d5..469bc29e5e 100644 --- a/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto -package envoy_extensions_filters_network_ext_authz_v3 +package ext_authzv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,26 +33,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.ApiVersion(0) ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ExtAuthz) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtAuthz with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExtAuthzMultiError, or nil +// if none found. +func (m *ExtAuthz) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtAuthz) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return ExtAuthzValidationError{ + err := ExtAuthzValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "GrpcService", @@ -66,13 +106,36 @@ func (m *ExtAuthz) Validate() error { // no validation rules for IncludePeerCertificate if _, ok := v3.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return ExtAuthzValidationError{ + err := ExtAuthzValidationError{ field: "TransportApiVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFilterEnabledMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilterEnabledMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabledMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtAuthzValidationError{ + field: "FilterEnabledMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabledMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ExtAuthzValidationError{ field: "FilterEnabledMetadata", @@ -82,9 +145,31 @@ func (m *ExtAuthz) Validate() error { } } + // no validation rules for BootstrapMetadataLabelsKey + + if len(errors) > 0 { + return ExtAuthzMultiError(errors) + } + return nil } +// ExtAuthzMultiError is an error wrapping multiple validation errors returned +// by ExtAuthz.ValidateAll() if the designated constraints aren't met. +type ExtAuthzMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtAuthzMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtAuthzMultiError) AllErrors() []error { return m } + // ExtAuthzValidationError is the validation error returned by // ExtAuthz.Validate if the designated constraints aren't met. type ExtAuthzValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.pb.go b/pkg/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.pb.go deleted file mode 100644 index 6ac369104c..0000000000 --- a/pkg/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.pb.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.proto - -package envoy_extensions_filters_network_ext_authz_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// 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. -// [#next-free-field: 7] -type ExtAuthz struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *v4alpha.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"` - // Specifies if the peer certificate is sent to the external service. - // - // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - IncludePeerCertificate bool `protobuf:"varint,4,opt,name=include_peer_certificate,json=includePeerCertificate,proto3" json:"include_peer_certificate,omitempty"` - // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and - // version of Check{Request,Response} used on the wire. - TransportApiVersion v4alpha.ApiVersion `protobuf:"varint,5,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v4alpha.ApiVersion" json:"transport_api_version,omitempty"` - // Specifies if the filter is enabled with metadata matcher. - // If this field is not specified, the filter will be enabled for all requests. - FilterEnabledMetadata *v4alpha1.MetadataMatcher `protobuf:"bytes,6,opt,name=filter_enabled_metadata,json=filterEnabledMetadata,proto3" json:"filter_enabled_metadata,omitempty"` -} - -func (x *ExtAuthz) Reset() { - *x = ExtAuthz{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtAuthz) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtAuthz) ProtoMessage() {} - -func (x *ExtAuthz) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtAuthz.ProtoReflect.Descriptor instead. -func (*ExtAuthz) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP(), []int{0} -} - -func (x *ExtAuthz) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *ExtAuthz) GetGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -func (x *ExtAuthz) GetFailureModeAllow() bool { - if x != nil { - return x.FailureModeAllow - } - return false -} - -func (x *ExtAuthz) GetIncludePeerCertificate() bool { - if x != nil { - return x.IncludePeerCertificate - } - return false -} - -func (x *ExtAuthz) GetTransportApiVersion() v4alpha.ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return v4alpha.ApiVersion_hidden_envoy_deprecated_AUTO -} - -func (x *ExtAuthz) GetFilterEnabledMetadata() *v4alpha1.MetadataMatcher { - if x != nil { - return x.FilterEnabledMetadata - } - return nil -} - -var File_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDesc = []byte{ - 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x03, 0x0a, 0x08, - 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x49, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2c, 0x0a, - 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x38, 0x0a, 0x18, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x17, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x15, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, - 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x42, 0x5b, - 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x0d, 0x45, 0x78, 0x74, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescData = file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDesc -) - -func file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDescData -} - -var file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_goTypes = []interface{}{ - (*ExtAuthz)(nil), // 0: envoy.extensions.filters.network.ext_authz.v4alpha.ExtAuthz - (*v4alpha.GrpcService)(nil), // 1: envoy.config.core.v4alpha.GrpcService - (v4alpha.ApiVersion)(0), // 2: envoy.config.core.v4alpha.ApiVersion - (*v4alpha1.MetadataMatcher)(nil), // 3: envoy.type.matcher.v4alpha.MetadataMatcher -} -var file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.ext_authz.v4alpha.ExtAuthz.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 2, // 1: envoy.extensions.filters.network.ext_authz.v4alpha.ExtAuthz.transport_api_version:type_name -> envoy.config.core.v4alpha.ApiVersion - 3, // 2: envoy.extensions.filters.network.ext_authz.v4alpha.ExtAuthz.filter_enabled_metadata:type_name -> envoy.type.matcher.v4alpha.MetadataMatcher - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_init() } -func file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_init() { - if File_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtAuthz); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto = out.File - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_rawDesc = nil - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_goTypes = nil - file_envoy_extensions_filters_network_ext_authz_v4alpha_ext_authz_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.pb.validate.go b/pkg/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.pb.validate.go deleted file mode 100644 index 63a8dc7aaf..0000000000 --- a/pkg/api/envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.pb.validate.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/ext_authz/v4alpha/ext_authz.proto - -package envoy_extensions_filters_network_ext_authz_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.ApiVersion(0) -) - -// 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 { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return ExtAuthzValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - 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 - - if _, ok := v4alpha.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - return ExtAuthzValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - } - - if v, ok := interface{}(m.GetFilterEnabledMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "FilterEnabledMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ExtAuthzValidationError is the validation error returned by -// ExtAuthz.Validate if the designated constraints aren't met. -type ExtAuthzValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtAuthzValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtAuthzValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtAuthzValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtAuthzValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtAuthzValidationError) ErrorName() string { return "ExtAuthzValidationError" } - -// Error satisfies the builtin error interface -func (e ExtAuthzValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtAuthz.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtAuthzValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtAuthzValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go b/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go index ac2bf77b9b..d01b8d87c8 100644 --- a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go +++ b/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go @@ -1,25 +1,23 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto -package envoy_extensions_filters_network_http_connection_manager_v3 +package http_connection_managerv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" v35 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/trace/v3" + v36 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/http/v3" v34 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/tracing/v3" v33 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -34,10 +32,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HttpConnectionManager_CodecType int32 const ( @@ -343,7 +337,7 @@ func (HttpConnectionManager_Tracing_OperationName) EnumDescriptor() ([]byte, []i return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{0, 0, 0} } -// [#next-free-field: 46] +// [#next-free-field: 50] type HttpConnectionManager struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -370,7 +364,7 @@ type HttpConnectionManager struct { AddUserAgent *wrappers.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 settings for HTTP requests handled by the connection manager. These will be // applicable to both HTTP1 and HTTP2 requests. @@ -379,6 +373,9 @@ type HttpConnectionManager struct { HttpProtocolOptions *v3.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 *v3.Http2ProtocolOptions `protobuf:"bytes,9,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` + // Additional HTTP/3 settings that are passed directly to the HTTP/3 codec. + // [#not-implemented-hide:] + Http3ProtocolOptions *v3.Http3ProtocolOptions `protobuf:"bytes,44,opt,name=http3_protocol_options,json=http3ProtocolOptions,proto3" json:"http3_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"` @@ -386,11 +383,13 @@ type HttpConnectionManager struct { // By default, Envoy will overwrite the header with the value specified in // server_name. ServerHeaderTransformation HttpConnectionManager_ServerHeaderTransformation `protobuf:"varint,34,opt,name=server_header_transformation,json=serverHeaderTransformation,proto3,enum=envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager_ServerHeaderTransformation" json:"server_header_transformation,omitempty"` + // Allows for explicit transformation of the :scheme header on the request path. + // If not set, Envoy's default :ref:`scheme ` + // handling applies. + SchemeHeaderTransformation *v3.SchemeHeaderTransformation `protobuf:"bytes,48,opt,name=scheme_header_transformation,json=schemeHeaderTransformation,proto3" json:"scheme_header_transformation,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 *wrappers.UInt32Value `protobuf:"bytes,29,opt,name=max_request_headers_kb,json=maxRequestHeadersKb,proto3" json:"max_request_headers_kb,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 @@ -400,10 +399,10 @@ type HttpConnectionManager struct { // // This idle timeout applies to new streams and is overridable by the // :ref:`route-level idle_timeout - // `. Even on a stream in + // `. 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 @@ -416,12 +415,12 @@ type HttpConnectionManager struct { // data has been proxied within available flow control windows. If the timeout is hit in this // case, the :ref:`tx_flush_timeout ` counter will be // incremented. Note that :ref:`max_stream_duration - // ` does not apply to + // ` does not apply to // this corner case. // // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. + // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. // // 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 @@ -499,6 +498,24 @@ type HttpConnectionManager struct { // 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"` + // The configuration for the original IP detection extensions. + // + // When configured the extensions will be called along with the request headers + // and information about the downstream connection, such as the directly connected address. + // Each extension will then use these parameters to decide the request's effective remote address. + // If an extension fails to detect the original IP address and isn't configured to reject + // the request, the HCM will try the remaining extensions until one succeeds or rejects + // the request. If the request isn't rejected nor any extension succeeds, the HCM will + // fallback to using the remote address. + // + // .. WARNING:: + // Extensions cannot be used in conjunction with :ref:`use_remote_address + // ` + // nor :ref:`xff_num_trusted_hops + // `. + // + // [#extension-category: envoy.http.original_ip_detection] + OriginalIpDetectionExtensions []*v3.TypedExtensionConfig `protobuf:"bytes,46,rep,name=original_ip_detection_extensions,json=originalIpDetectionExtensions,proto3" json:"original_ip_detection_extensions,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 @@ -508,7 +525,7 @@ type HttpConnectionManager struct { // :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. @@ -534,7 +551,7 @@ type HttpConnectionManager struct { // header. ForwardClientCertDetails HttpConnectionManager_ForwardClientCertDetails `protobuf:"varint,16,opt,name=forward_client_cert_details,json=forwardClientCertDetails,proto3,enum=envoy.extensions.filters.network.http_connection_manager.v3.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 @@ -548,7 +565,7 @@ type HttpConnectionManager struct { 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 @@ -586,25 +603,33 @@ type HttpConnectionManager struct { // variable can be used to apply the action to a portion of all requests. PathWithEscapedSlashesAction HttpConnectionManager_PathWithEscapedSlashesAction `protobuf:"varint,45,opt,name=path_with_escaped_slashes_action,json=pathWithEscapedSlashesAction,proto3,enum=envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager_PathWithEscapedSlashesAction" json:"path_with_escaped_slashes_action,omitempty"` // The configuration of the request ID extension. This includes operations such as - // generation, validation, and associated tracing operations. + // generation, validation, and associated tracing operations. If empty, the + // :ref:`UuidRequestIdConfig ` + // default extension is used with default parameters. See the documentation for that extension + // for details on what it does. Customizing the configuration for the default extension can be + // achieved by configuring it explicitly here. For example, to disable trace reason packing, + // the following configuration can be used: // - // If not set, Envoy uses the default UUID-based behavior: - // - // 1. Request ID is propagated using *x-request-id* header. + // .. validated-code-block:: yaml + // :type-name: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension // - // 2. Request ID is a universally unique identifier (UUID). + // typed_config: + // "@type": type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig + // pack_trace_reason: false // - // 3. Tracing decision (sampled, forced, etc) is set in 14th byte of the UUID. + // [#extension-category: envoy.request_id] RequestIdExtension *RequestIDExtension `protobuf:"bytes,36,opt,name=request_id_extension,json=requestIdExtension,proto3" json:"request_id_extension,omitempty"` // The configuration to customize local reply returned by Envoy. It can customize status code, // body text and response content type. If not specified, status code and text body are hard // coded in Envoy, the response content type is plain text. LocalReplyConfig *LocalReplyConfig `protobuf:"bytes,38,opt,name=local_reply_config,json=localReplyConfig,proto3" json:"local_reply_config,omitempty"` // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` - // local port and request method is not CONNECT. This affects the upstream host header as well. + // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` + // local port. This affects the upstream host header unless the method is + // CONNECT in which case if no filter adds a port the original port will be restored before headers are + // sent upstream. // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part // of `HTTP spec `_ and is provided for convenience. // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. StripMatchingHostPort bool `protobuf:"varint,39,opt,name=strip_matching_host_port,json=stripMatchingHostPort,proto3" json:"strip_matching_host_port,omitempty"` @@ -628,8 +653,28 @@ type HttpConnectionManager struct { // *not* the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging // ` StreamErrorOnInvalidHttpMessage *wrappers.BoolValue `protobuf:"bytes,40,opt,name=stream_error_on_invalid_http_message,json=streamErrorOnInvalidHttpMessage,proto3" json:"stream_error_on_invalid_http_message,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedIdleTimeout *duration.Duration `protobuf:"bytes,11,opt,name=hidden_envoy_deprecated_idle_timeout,json=hiddenEnvoyDeprecatedIdleTimeout,proto3" json:"hidden_envoy_deprecated_idle_timeout,omitempty"` + // [#not-implemented-hide:] Path normalization configuration. This includes + // configurations for transformations (e.g. RFC 3986 normalization or merge + // adjacent slashes) and the policy to apply them. The policy determines + // whether transformations affect the forwarded *:path* header. RFC 3986 path + // normalization is enabled by default and the default policy is that the + // normalized header will be forwarded. See :ref:`PathNormalizationOptions + // ` + // for details. + PathNormalizationOptions *HttpConnectionManager_PathNormalizationOptions `protobuf:"bytes,43,opt,name=path_normalization_options,json=pathNormalizationOptions,proto3" json:"path_normalization_options,omitempty"` + // Determines if trailing dot of the host should be removed from host/authority header before any + // processing of request by HTTP filters or routing. + // This affects the upstream host header. + // Without setting this option, incoming requests with host `example.com.` will not match against + // route with :ref:`domains` match set to `example.com`. Defaults to `false`. + // When the incoming request contains a host/authority header that includes a port number, + // setting this option will strip a trailing dot, if present, from the host section, + // leaving the port as is (e.g. host value `example.com.:443` will be updated to `example.com:443`). + StripTrailingHostDot bool `protobuf:"varint,47,opt,name=strip_trailing_host_dot,json=stripTrailingHostDot,proto3" json:"strip_trailing_host_dot,omitempty"` + // Proxy-Status HTTP response header configuration. + // If this config is set, the Proxy-Status HTTP response header field is + // populated. By default, it is not. + ProxyStatusConfig *HttpConnectionManager_ProxyStatusConfig `protobuf:"bytes,49,opt,name=proxy_status_config,json=proxyStatusConfig,proto3" json:"proxy_status_config,omitempty"` } func (x *HttpConnectionManager) Reset() { @@ -748,6 +793,13 @@ func (x *HttpConnectionManager) GetHttp2ProtocolOptions() *v3.Http2ProtocolOptio return nil } +func (x *HttpConnectionManager) GetHttp3ProtocolOptions() *v3.Http3ProtocolOptions { + if x != nil { + return x.Http3ProtocolOptions + } + return nil +} + func (x *HttpConnectionManager) GetServerName() string { if x != nil { return x.ServerName @@ -762,6 +814,13 @@ func (x *HttpConnectionManager) GetServerHeaderTransformation() HttpConnectionMa return HttpConnectionManager_OVERWRITE } +func (x *HttpConnectionManager) GetSchemeHeaderTransformation() *v3.SchemeHeaderTransformation { + if x != nil { + return x.SchemeHeaderTransformation + } + return nil +} + func (x *HttpConnectionManager) GetMaxRequestHeadersKb() *wrappers.UInt32Value { if x != nil { return x.MaxRequestHeadersKb @@ -825,6 +884,13 @@ func (x *HttpConnectionManager) GetXffNumTrustedHops() uint32 { return 0 } +func (x *HttpConnectionManager) GetOriginalIpDetectionExtensions() []*v3.TypedExtensionConfig { + if x != nil { + return x.OriginalIpDetectionExtensions + } + return nil +} + func (x *HttpConnectionManager) GetInternalAddressConfig() *HttpConnectionManager_InternalAddressConfig { if x != nil { return x.InternalAddressConfig @@ -965,10 +1031,23 @@ func (x *HttpConnectionManager) GetStreamErrorOnInvalidHttpMessage() *wrappers.B return nil } -// Deprecated: Do not use. -func (x *HttpConnectionManager) GetHiddenEnvoyDeprecatedIdleTimeout() *duration.Duration { +func (x *HttpConnectionManager) GetPathNormalizationOptions() *HttpConnectionManager_PathNormalizationOptions { if x != nil { - return x.HiddenEnvoyDeprecatedIdleTimeout + return x.PathNormalizationOptions + } + return nil +} + +func (x *HttpConnectionManager) GetStripTrailingHostDot() bool { + if x != nil { + return x.StripTrailingHostDot + } + return false +} + +func (x *HttpConnectionManager) GetProxyStatusConfig() *HttpConnectionManager_ProxyStatusConfig { + if x != nil { + return x.ProxyStatusConfig } return nil } @@ -1006,10 +1085,11 @@ type isHttpConnectionManager_StripPortMode interface { type HttpConnectionManager_StripAnyHostPort struct { // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if request method is not CONNECT. - // This affects the upstream host header as well. + // of request by HTTP filters or routing. + // This affects the upstream host header unless the method is CONNECT in + // which case if no filter adds a port the original port will be restored before headers are sent upstream. // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part // of `HTTP spec `_ and is provided for convenience. // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. StripAnyHostPort bool `protobuf:"varint,42,opt,name=strip_any_host_port,json=stripAnyHostPort,proto3,oneof"` @@ -1412,7 +1492,7 @@ type ScopedRoutes_ScopedRouteConfigurationsList struct { // The set of routing scopes corresponding to the HCM. A scope is assigned to a request by // matching a key constructed from the request's attributes according to the algorithm specified // by the - // :ref:`ScopeKeyBuilder` + // :ref:`ScopeKeyBuilder` // in this message. ScopedRouteConfigurationsList *ScopedRouteConfigurationsList `protobuf:"bytes,4,opt,name=scoped_route_configurations_list,json=scopedRouteConfigurationsList,proto3,oneof"` } @@ -1421,7 +1501,7 @@ type ScopedRoutes_ScopedRds struct { // The set of routing scopes associated with the HCM will be dynamically loaded via the SRDS // API. A scope is assigned to a request by matching a key constructed from the request's // attributes according to the algorithm specified by the - // :ref:`ScopeKeyBuilder` + // :ref:`ScopeKeyBuilder` // in this message. ScopedRds *ScopedRds `protobuf:"bytes,5,opt,name=scoped_rds,json=scopedRds,proto3,oneof"` } @@ -1437,6 +1517,9 @@ type ScopedRds struct { // Configuration source specifier for scoped RDS. ScopedRdsConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=scoped_rds_config_source,json=scopedRdsConfigSource,proto3" json:"scoped_rds_config_source,omitempty"` + // xdstp:// resource locator for scoped RDS collection. + // [#not-implemented-hide:] + SrdsResourcesLocator string `protobuf:"bytes,2,opt,name=srds_resources_locator,json=srdsResourcesLocator,proto3" json:"srds_resources_locator,omitempty"` } func (x *ScopedRds) Reset() { @@ -1478,21 +1561,30 @@ func (x *ScopedRds) GetScopedRdsConfigSource() *v3.ConfigSource { return nil } -// [#next-free-field: 6] +func (x *ScopedRds) GetSrdsResourcesLocator() string { + if x != nil { + return x.SrdsResourcesLocator + } + return "" +} + +// [#next-free-field: 7] type HttpFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the filter configuration. The name is used as a fallback to - // select an extension if the type of the configuration proto is not - // sufficient. It also serves as a resource name in ExtensionConfigDS. + // The name of the filter configuration. It also serves as a resource name in ExtensionConfigDS. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are assignable to ConfigType: // *HttpFilter_TypedConfig // *HttpFilter_ConfigDiscovery - // *HttpFilter_HiddenEnvoyDeprecatedConfig ConfigType isHttpFilter_ConfigType `protobuf_oneof:"config_type"` + // If true, clients that do not support this filter may ignore the + // filter but otherwise accept the config. + // Otherwise, clients that do not support this filter must reject the config. + // This is also same with typed per filter config. + IsOptional bool `protobuf:"varint,6,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` } func (x *HttpFilter) Reset() { @@ -1555,12 +1647,11 @@ func (x *HttpFilter) GetConfigDiscovery() *v3.ExtensionConfigSource { return nil } -// Deprecated: Do not use. -func (x *HttpFilter) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*HttpFilter_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig +func (x *HttpFilter) GetIsOptional() bool { + if x != nil { + return x.IsOptional } - return nil + return false } type isHttpFilter_ConfigType interface { @@ -1570,6 +1661,11 @@ type isHttpFilter_ConfigType interface { type HttpFilter_TypedConfig struct { // Filter specific configuration which depends on the filter being instantiated. See the supported // filters for further documentation. + // + // To support configuring a :ref:`match tree `, use an + // :ref:`ExtensionWithMatcher ` + // with the desired HTTP filter. + // [#extension-category: envoy.filters.http] TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` } @@ -1577,20 +1673,18 @@ type HttpFilter_ConfigDiscovery struct { // Configuration source specifier for an extension configuration discovery service. // In case of a failure and without the default configuration, the HTTP listener responds with code 500. // Extension configs delivered through this mechanism are not expected to require warming (see https://github.com/envoyproxy/envoy/issues/12061). + // + // To support configuring a :ref:`match tree `, use an + // :ref:`ExtensionWithMatcher ` + // with the desired HTTP filter. This works for both the default filter configuration as well + // as for filters provided via the API. ConfigDiscovery *v3.ExtensionConfigSource `protobuf:"bytes,5,opt,name=config_discovery,json=configDiscovery,proto3,oneof"` } -type HttpFilter_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*HttpFilter_TypedConfig) isHttpFilter_ConfigType() {} func (*HttpFilter_ConfigDiscovery) isHttpFilter_ConfigType() {} -func (*HttpFilter_HiddenEnvoyDeprecatedConfig) isHttpFilter_ConfigType() {} - type RequestIDExtension struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1639,6 +1733,58 @@ func (x *RequestIDExtension) GetTypedConfig() *any.Any { return nil } +// [#protodoc-title: Envoy Mobile HTTP connection manager] +// HTTP connection manager for use in Envoy mobile. +// [#extension: envoy.filters.network.envoy_mobile_http_connection_manager] +type EnvoyMobileHttpConnectionManager struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The configuration for the underlying HttpConnectionManager which will be + // instantiated for Envoy mobile. + Config *HttpConnectionManager `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *EnvoyMobileHttpConnectionManager) Reset() { + *x = EnvoyMobileHttpConnectionManager{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnvoyMobileHttpConnectionManager) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvoyMobileHttpConnectionManager) ProtoMessage() {} + +func (x *EnvoyMobileHttpConnectionManager) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvoyMobileHttpConnectionManager.ProtoReflect.Descriptor instead. +func (*EnvoyMobileHttpConnectionManager) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{9} +} + +func (x *EnvoyMobileHttpConnectionManager) GetConfig() *HttpConnectionManager { + if x != nil { + return x.Config + } + return nil +} + // [#next-free-field: 10] type HttpConnectionManager_Tracing struct { state protoimpl.MessageState @@ -1687,16 +1833,12 @@ type HttpConnectionManager_Tracing struct { // Such a constraint is inherent to OpenCensus itself. It cannot be overcome without changes // on OpenCensus side. Provider *v35.Tracing_Http `protobuf:"bytes,9,opt,name=provider,proto3" json:"provider,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedOperationName HttpConnectionManager_Tracing_OperationName `protobuf:"varint,1,opt,name=hidden_envoy_deprecated_operation_name,json=hiddenEnvoyDeprecatedOperationName,proto3,enum=envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager_Tracing_OperationName" json:"hidden_envoy_deprecated_operation_name,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRequestHeadersForTags []string `protobuf:"bytes,2,rep,name=hidden_envoy_deprecated_request_headers_for_tags,json=hiddenEnvoyDeprecatedRequestHeadersForTags,proto3" json:"hidden_envoy_deprecated_request_headers_for_tags,omitempty"` } func (x *HttpConnectionManager_Tracing) Reset() { *x = HttpConnectionManager_Tracing{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[9] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1709,7 +1851,7 @@ func (x *HttpConnectionManager_Tracing) String() string { func (*HttpConnectionManager_Tracing) ProtoMessage() {} func (x *HttpConnectionManager_Tracing) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[9] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1774,22 +1916,6 @@ func (x *HttpConnectionManager_Tracing) GetProvider() *v35.Tracing_Http { return nil } -// Deprecated: Do not use. -func (x *HttpConnectionManager_Tracing) GetHiddenEnvoyDeprecatedOperationName() HttpConnectionManager_Tracing_OperationName { - if x != nil { - return x.HiddenEnvoyDeprecatedOperationName - } - return HttpConnectionManager_Tracing_INGRESS -} - -// Deprecated: Do not use. -func (x *HttpConnectionManager_Tracing) GetHiddenEnvoyDeprecatedRequestHeadersForTags() []string { - if x != nil { - return x.HiddenEnvoyDeprecatedRequestHeadersForTags - } - return nil -} - type HttpConnectionManager_InternalAddressConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1797,12 +1923,15 @@ 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"` + // List of CIDR ranges that are treated as internal. If unset, then RFC1918 / RFC4193 + // IP addresses will be considered internal. + CidrRanges []*v3.CidrRange `protobuf:"bytes,2,rep,name=cidr_ranges,json=cidrRanges,proto3" json:"cidr_ranges,omitempty"` } func (x *HttpConnectionManager_InternalAddressConfig) Reset() { *x = HttpConnectionManager_InternalAddressConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[10] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1815,7 +1944,7 @@ func (x *HttpConnectionManager_InternalAddressConfig) String() string { func (*HttpConnectionManager_InternalAddressConfig) ProtoMessage() {} func (x *HttpConnectionManager_InternalAddressConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[10] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1838,6 +1967,13 @@ func (x *HttpConnectionManager_InternalAddressConfig) GetUnixSockets() bool { return false } +func (x *HttpConnectionManager_InternalAddressConfig) GetCidrRanges() []*v3.CidrRange { + if x != nil { + return x.CidrRanges + } + return nil +} + // [#next-free-field: 7] type HttpConnectionManager_SetCurrentClientCertDetails struct { state protoimpl.MessageState @@ -1866,7 +2002,7 @@ type HttpConnectionManager_SetCurrentClientCertDetails struct { func (x *HttpConnectionManager_SetCurrentClientCertDetails) Reset() { *x = HttpConnectionManager_SetCurrentClientCertDetails{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[11] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1879,7 +2015,7 @@ func (x *HttpConnectionManager_SetCurrentClientCertDetails) String() string { func (*HttpConnectionManager_SetCurrentClientCertDetails) ProtoMessage() {} func (x *HttpConnectionManager_SetCurrentClientCertDetails) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[11] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1958,7 +2094,7 @@ type HttpConnectionManager_UpgradeConfig struct { 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 + // ` as documented in the // :ref:`upgrade documentation `. Enabled *wrappers.BoolValue `protobuf:"bytes,3,opt,name=enabled,proto3" json:"enabled,omitempty"` } @@ -1966,7 +2102,7 @@ type HttpConnectionManager_UpgradeConfig struct { func (x *HttpConnectionManager_UpgradeConfig) Reset() { *x = HttpConnectionManager_UpgradeConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[12] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1979,7 +2115,7 @@ func (x *HttpConnectionManager_UpgradeConfig) String() string { func (*HttpConnectionManager_UpgradeConfig) ProtoMessage() {} func (x *HttpConnectionManager_UpgradeConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[12] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2016,22 +2152,250 @@ func (x *HttpConnectionManager_UpgradeConfig) GetEnabled() *wrappers.BoolValue { return nil } +// [#not-implemented-hide:] Transformations that apply to path headers. Transformations are applied +// before any processing of requests by HTTP filters, routing, and matching. Only the normalized +// path will be visible internally if a transformation is enabled. Any path rewrites that the +// router performs (e.g. :ref:`regex_rewrite +// ` or :ref:`prefix_rewrite +// `) will apply to the *:path* header +// destined for the upstream. +// +// Note: access logging and tracing will show the original *:path* header. +type HttpConnectionManager_PathNormalizationOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [#not-implemented-hide:] Normalization applies internally before any processing of requests by + // HTTP filters, routing, and matching *and* will affect the forwarded *:path* header. Defaults + // to :ref:`NormalizePathRFC3986 + // `. When not + // specified, this value may be overridden by the runtime variable + // :ref:`http_connection_manager.normalize_path`. + // Envoy will respond with 400 to paths that are malformed (e.g. for paths that fail RFC 3986 + // normalization due to disallowed characters.) + ForwardingTransformation *v36.PathTransformation `protobuf:"bytes,1,opt,name=forwarding_transformation,json=forwardingTransformation,proto3" json:"forwarding_transformation,omitempty"` + // [#not-implemented-hide:] Normalization only applies internally before any processing of + // requests by HTTP filters, routing, and matching. These will be applied after full + // transformation is applied. The *:path* header before this transformation will be restored in + // the router filter and sent upstream unless it was mutated by a filter. Defaults to no + // transformations. + // Multiple actions can be applied in the same Transformation, forming a sequential + // pipeline. The transformations will be performed in the order that they appear. Envoy will + // respond with 400 to paths that are malformed (e.g. for paths that fail RFC 3986 + // normalization due to disallowed characters.) + HttpFilterTransformation *v36.PathTransformation `protobuf:"bytes,2,opt,name=http_filter_transformation,json=httpFilterTransformation,proto3" json:"http_filter_transformation,omitempty"` +} + +func (x *HttpConnectionManager_PathNormalizationOptions) Reset() { + *x = HttpConnectionManager_PathNormalizationOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpConnectionManager_PathNormalizationOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpConnectionManager_PathNormalizationOptions) ProtoMessage() {} + +func (x *HttpConnectionManager_PathNormalizationOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpConnectionManager_PathNormalizationOptions.ProtoReflect.Descriptor instead. +func (*HttpConnectionManager_PathNormalizationOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *HttpConnectionManager_PathNormalizationOptions) GetForwardingTransformation() *v36.PathTransformation { + if x != nil { + return x.ForwardingTransformation + } + return nil +} + +func (x *HttpConnectionManager_PathNormalizationOptions) GetHttpFilterTransformation() *v36.PathTransformation { + if x != nil { + return x.HttpFilterTransformation + } + return nil +} + +// Configures the manner in which the Proxy-Status HTTP response header is +// populated. +// +// See the [Proxy-Status +// RFC](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-proxy-status-08). +// [#comment:TODO: Update this with the non-draft URL when finalized.] +// +// The Proxy-Status header is a string of the form: +// +// "; error=; details=
" +// [#next-free-field: 7] +type HttpConnectionManager_ProxyStatusConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, the details field of the Proxy-Status header is not populated with stream_info.response_code_details. + // This value defaults to `false`, i.e. the `details` field is populated by default. + RemoveDetails bool `protobuf:"varint,1,opt,name=remove_details,json=removeDetails,proto3" json:"remove_details,omitempty"` + // If true, the details field of the Proxy-Status header will not contain + // connection termination details. This value defaults to `false`, i.e. the + // `details` field will contain connection termination details by default. + RemoveConnectionTerminationDetails bool `protobuf:"varint,2,opt,name=remove_connection_termination_details,json=removeConnectionTerminationDetails,proto3" json:"remove_connection_termination_details,omitempty"` + // If true, the details field of the Proxy-Status header will not contain an + // enumeration of the Envoy ResponseFlags. This value defaults to `false`, + // i.e. the `details` field will contain a list of ResponseFlags by default. + RemoveResponseFlags bool `protobuf:"varint,3,opt,name=remove_response_flags,json=removeResponseFlags,proto3" json:"remove_response_flags,omitempty"` + // If true, overwrites the existing Status header with the response code + // recommended by the Proxy-Status spec. + // This value defaults to `false`, i.e. the HTTP response code is not + // overwritten. + SetRecommendedResponseCode bool `protobuf:"varint,4,opt,name=set_recommended_response_code,json=setRecommendedResponseCode,proto3" json:"set_recommended_response_code,omitempty"` + // The name of the proxy as it appears at the start of the Proxy-Status + // header. + // + // If neither of these values are set, this value defaults to `server_name`, + // which itself defaults to "envoy". + // + // Types that are assignable to ProxyName: + // *HttpConnectionManager_ProxyStatusConfig_UseNodeId + // *HttpConnectionManager_ProxyStatusConfig_LiteralProxyName + ProxyName isHttpConnectionManager_ProxyStatusConfig_ProxyName `protobuf_oneof:"proxy_name"` +} + +func (x *HttpConnectionManager_ProxyStatusConfig) Reset() { + *x = HttpConnectionManager_ProxyStatusConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpConnectionManager_ProxyStatusConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpConnectionManager_ProxyStatusConfig) ProtoMessage() {} + +func (x *HttpConnectionManager_ProxyStatusConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpConnectionManager_ProxyStatusConfig.ProtoReflect.Descriptor instead. +func (*HttpConnectionManager_ProxyStatusConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{0, 5} +} + +func (x *HttpConnectionManager_ProxyStatusConfig) GetRemoveDetails() bool { + if x != nil { + return x.RemoveDetails + } + return false +} + +func (x *HttpConnectionManager_ProxyStatusConfig) GetRemoveConnectionTerminationDetails() bool { + if x != nil { + return x.RemoveConnectionTerminationDetails + } + return false +} + +func (x *HttpConnectionManager_ProxyStatusConfig) GetRemoveResponseFlags() bool { + if x != nil { + return x.RemoveResponseFlags + } + return false +} + +func (x *HttpConnectionManager_ProxyStatusConfig) GetSetRecommendedResponseCode() bool { + if x != nil { + return x.SetRecommendedResponseCode + } + return false +} + +func (m *HttpConnectionManager_ProxyStatusConfig) GetProxyName() isHttpConnectionManager_ProxyStatusConfig_ProxyName { + if m != nil { + return m.ProxyName + } + return nil +} + +func (x *HttpConnectionManager_ProxyStatusConfig) GetUseNodeId() bool { + if x, ok := x.GetProxyName().(*HttpConnectionManager_ProxyStatusConfig_UseNodeId); ok { + return x.UseNodeId + } + return false +} + +func (x *HttpConnectionManager_ProxyStatusConfig) GetLiteralProxyName() string { + if x, ok := x.GetProxyName().(*HttpConnectionManager_ProxyStatusConfig_LiteralProxyName); ok { + return x.LiteralProxyName + } + return "" +} + +type isHttpConnectionManager_ProxyStatusConfig_ProxyName interface { + isHttpConnectionManager_ProxyStatusConfig_ProxyName() +} + +type HttpConnectionManager_ProxyStatusConfig_UseNodeId struct { + // If `use_node_id` is set, Proxy-Status headers will use the Envoy's node + // ID as the name of the proxy. + UseNodeId bool `protobuf:"varint,5,opt,name=use_node_id,json=useNodeId,proto3,oneof"` +} + +type HttpConnectionManager_ProxyStatusConfig_LiteralProxyName struct { + // If `literal_proxy_name` is set, Proxy-Status headers will use this + // value as the name of the proxy. + LiteralProxyName string `protobuf:"bytes,6,opt,name=literal_proxy_name,json=literalProxyName,proto3,oneof"` +} + +func (*HttpConnectionManager_ProxyStatusConfig_UseNodeId) isHttpConnectionManager_ProxyStatusConfig_ProxyName() { +} + +func (*HttpConnectionManager_ProxyStatusConfig_LiteralProxyName) isHttpConnectionManager_ProxyStatusConfig_ProxyName() { +} + // Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These -// keys are matched against a set of :ref:`Key` -// objects assembled from :ref:`ScopedRouteConfiguration` +// keys are matched against a set of :ref:`Key` +// objects assembled from :ref:`ScopedRouteConfiguration` // messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via -// :ref:`scoped_route_configurations_list`. +// :ref:`scoped_route_configurations_list`. // // Upon receiving a request's headers, the Router will build a key using the algorithm specified // by this message. This key will be used to look up the routing table (i.e., the -// :ref:`RouteConfiguration`) to use for the request. +// :ref:`RouteConfiguration`) to use for the request. type ScopedRoutes_ScopeKeyBuilder struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The final(built) scope key consists of the ordered union of these fragments, which are compared in order with the - // fragments of a :ref:`ScopedRouteConfiguration`. + // fragments of a :ref:`ScopedRouteConfiguration`. // A missing fragment during comparison will make the key invalid, i.e., the computed key doesn't match any key. Fragments []*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` } @@ -2039,7 +2403,7 @@ type ScopedRoutes_ScopeKeyBuilder struct { func (x *ScopedRoutes_ScopeKeyBuilder) Reset() { *x = ScopedRoutes_ScopeKeyBuilder{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[13] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2052,7 +2416,7 @@ func (x *ScopedRoutes_ScopeKeyBuilder) String() string { func (*ScopedRoutes_ScopeKeyBuilder) ProtoMessage() {} func (x *ScopedRoutes_ScopeKeyBuilder) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[13] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2089,7 +2453,7 @@ type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder struct { func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Reset() { *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[14] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2102,7 +2466,7 @@ func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) String() string { func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ProtoMessage() {} func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[14] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2186,7 +2550,7 @@ type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor struct { func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Reset() { *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2199,7 +2563,7 @@ func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Stri func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ProtoMessage() {} func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2291,7 +2655,7 @@ type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Reset() { *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[16] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2304,7 +2668,7 @@ func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvEle func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoMessage() {} func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[16] + mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2349,680 +2713,761 @@ var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connec 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x30, 0x0a, 0x15, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, - 0x85, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, - 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x63, 0x6f, - 0x64, 0x65, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x54, 0x0a, 0x03, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, + 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, + 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x38, 0x0a, 0x15, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x85, + 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x5c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x64, + 0x65, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x54, 0x0a, 0x03, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x64, 0x73, 0x48, + 0x00, 0x52, 0x03, 0x72, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x0d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x64, 0x73, - 0x48, 0x00, 0x52, 0x03, 0x72, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x0d, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, + 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, + 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x73, 0x0a, 0x1c, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x23, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x8a, + 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x74, + 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x5e, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68, 0x74, + 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x69, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x8a, + 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x16, + 0x68, 0x74, 0x74, 0x70, 0x33, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x33, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, + 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, + 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0xb9, 0x01, 0x0a, + 0x1c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x22, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x6d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1a, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x72, 0x0a, 0x1c, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x1a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x16, + 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x5f, 0x6b, 0x62, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, + 0x05, 0x18, 0x80, 0x40, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4b, 0x62, 0x12, 0x52, 0x0a, 0x13, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x11, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x4b, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x0e, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x62, 0x0a, 0x17, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, + 0x32, 0x00, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x3e, 0x0a, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x4d, 0x0a, 0x15, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x61, + 0x79, 0x65, 0x64, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x51, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x8a, 0x93, + 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x10, 0x75, 0x73, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, + 0x75, 0x6d, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x78, 0x66, 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, + 0x73, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x70, 0x73, 0x12, 0x73, 0x0a, 0x20, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2e, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1d, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x49, 0x70, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xa0, 0x01, + 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x68, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x78, 0x66, 0x66, 0x5f, 0x61, 0x70, 0x70, + 0x65, 0x6e, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x58, + 0x66, 0x66, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x76, 0x69, 0x61, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, + 0x01, 0x00, 0x52, 0x03, 0x76, 0x69, 0x61, 0x12, 0x4a, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x21, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, + 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, + 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x1c, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x49, 0x64, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xb4, 0x01, + 0x0a, 0x1b, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x6b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x18, 0x66, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x1f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, + 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x0c, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x1b, + 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x31, 0x30, + 0x30, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x12, 0x65, 0x0a, 0x31, 0x72, 0x65, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x2a, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x49, + 0x70, 0x76, 0x34, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x49, 0x70, 0x76, 0x36, + 0x12, 0x89, 0x01, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x60, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0e, + 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x1e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x0d, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, + 0x73, 0x68, 0x65, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x20, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x5f, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x73, 0x0a, - 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x23, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, - 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, - 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x5e, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68, - 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x69, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, - 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, - 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0xb9, 0x01, 0x0a, 0x1c, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x22, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x6d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, + 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, + 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x81, + 0x01, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x7b, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x6c, + 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x50, 0x0a, 0x18, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, + 0x67, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x27, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, + 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x52, 0x15, 0x73, 0x74, 0x72, 0x69, + 0x70, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, + 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x61, 0x6e, 0x79, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, + 0x52, 0x10, 0x73, 0x74, 0x72, 0x69, 0x70, 0x41, 0x6e, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, + 0x72, 0x74, 0x12, 0x69, 0x0a, 0x24, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1f, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0xa9, 0x01, + 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x6b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1a, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6b, - 0x62, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x60, 0x20, 0x00, - 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x4b, 0x62, 0x12, 0x52, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, - 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, - 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4b, 0x0a, 0x0f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, - 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x62, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x0f, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x32, 0x00, 0x8a, 0x93, 0xb7, 0x2a, - 0x02, 0x08, 0x01, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x64, 0x72, - 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x72, - 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x15, 0x64, 0x65, - 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x6c, 0x6f, - 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x51, - 0x0a, 0x12, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, - 0x10, 0x75, 0x73, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x2f, 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x72, 0x75, - 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x11, 0x78, 0x66, 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x48, 0x6f, - 0x70, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x19, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x68, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x78, 0x66, - 0x66, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, - 0x73, 0x6b, 0x69, 0x70, 0x58, 0x66, 0x66, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x76, 0x69, 0x61, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x76, 0x69, 0x61, 0x12, - 0x4a, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x19, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x21, - 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x49, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xb4, 0x01, 0x0a, 0x1b, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x6b, 0x2e, 0x65, 0x6e, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x18, 0x70, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x73, 0x74, 0x72, + 0x69, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x64, 0x6f, 0x74, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x74, 0x72, 0x69, + 0x70, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x44, 0x6f, 0x74, + 0x12, 0x94, 0x01, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x31, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x64, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xf6, 0x04, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, + 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, + 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, + 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, + 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, + 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, + 0x6f, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, + 0x61, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, + 0x61, 0x78, 0x50, 0x61, 0x74, 0x68, 0x54, 0x61, 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, + 0x67, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x22, 0x28, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x3a, 0x5b, 0x9a, + 0xc5, 0x88, 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x1a, 0xe7, 0x01, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, + 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x69, 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x63, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, + 0x69, 0x9a, 0xc5, 0x88, 0x1e, 0x64, 0x0a, 0x62, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x98, 0x02, 0x0a, 0x1b, 0x53, + 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x75, 0x72, 0x69, 0x3a, 0x6f, + 0x9a, 0xc5, 0x88, 0x1e, 0x6a, 0x0a, 0x68, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4a, + 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0xae, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x61, 0x0a, 0x07, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, - 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x18, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0xb4, 0x01, 0x0a, - 0x1f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x1b, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x31, 0x30, 0x30, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x10, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x31, 0x30, 0x30, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x65, 0x12, 0x65, 0x0a, 0x31, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x65, - 0x64, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x2a, 0x72, 0x65, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x61, - 0x70, 0x70, 0x65, 0x64, 0x49, 0x70, 0x76, 0x36, 0x12, 0x89, 0x01, 0x0a, 0x0f, 0x75, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x60, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, - 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x6d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xb7, 0x01, 0x0a, - 0x20, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, 0x73, 0x63, 0x61, 0x70, - 0x65, 0x64, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, - 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, - 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x57, 0x69, - 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x3a, 0x61, 0x9a, 0xc5, 0x88, 0x1e, 0x5c, 0x0a, 0x5a, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe5, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x68, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x63, 0x0a, 0x19, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x1a, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, + 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xe4, + 0x02, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x51, 0x0a, 0x25, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x32, + 0x0a, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, + 0x67, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x75, 0x73, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x69, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x03, 0x22, 0x53, 0x0a, + 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x4f, + 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x50, + 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01, + 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, + 0x10, 0x02, 0x22, 0x79, 0x0a, 0x18, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0c, + 0x0a, 0x08, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, + 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x46, + 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x22, 0xa0, 0x01, + 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, + 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, + 0x0a, 0x1f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x43, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, + 0x54, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x45, 0x50, 0x5f, 0x55, 0x4e, 0x43, 0x48, + 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55, + 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x44, 0x49, + 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, + 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x04, + 0x3a, 0x53, 0x9a, 0xc5, 0x88, 0x1e, 0x4e, 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x11, 0x0a, + 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x4a, 0x04, 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x52, 0x0c, 0x69, 0x64, + 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x4c, + 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x65, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x07, 0x6d, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x62, 0x6f, 0x64, + 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x9c, 0x03, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08, + 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x60, 0x0a, 0x14, 0x62, 0x6f, + 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x58, 0x0a, 0x0e, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x03, 0x52, 0x64, 0x73, 0x12, 0x51, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x41, 0x9a, + 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x64, 0x73, + 0x22, 0xf7, 0x01, 0x0a, 0x1d, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x79, 0x0a, 0x1b, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x19, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x5b, 0x9a, + 0xc5, 0x88, 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xdf, 0x0e, 0x0a, 0x0c, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x59, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x11, 0x72, 0x64, + 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x72, 0x64, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0xa5, 0x01, 0x0a, 0x20, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7b, 0x0a, 0x12, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x1d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x67, 0x0a, 0x0a, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x18, 0x73, 0x74, 0x72, 0x69, 0x70, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, 0x42, 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x11, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x52, 0x15, 0x73, 0x74, 0x72, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, - 0x67, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x72, - 0x69, 0x70, 0x5f, 0x61, 0x6e, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x10, 0x73, 0x74, 0x72, 0x69, 0x70, 0x41, - 0x6e, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x69, 0x0a, 0x24, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x73, 0x0a, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x49, - 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0xfb, 0x06, 0x0a, 0x07, 0x54, - 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, - 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, - 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, - 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, - 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x10, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x74, 0x68, 0x54, 0x61, 0x67, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x54, 0x61, 0x67, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xce, 0x01, 0x0a, 0x26, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x68, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x48, 0x00, + 0x52, 0x09, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x1a, 0xd9, 0x09, 0x0a, 0x0f, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, + 0x91, 0x01, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x1a, 0xd5, 0x07, 0x0a, 0x0f, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0xb6, 0x01, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x7e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, + 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x14, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x1a, 0x8f, 0x05, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0xa5, 0x01, 0x0a, 0x07, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x88, 0x01, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, + 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, + 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x1a, 0xdb, 0x01, 0x0a, 0x09, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x25, 0x0a, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x73, + 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x3a, 0x8b, 0x01, 0x9a, 0xc5, 0x88, 0x1e, 0x85, 0x01, 0x0a, 0x82, 0x01, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, - 0x65, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0xb8, 0xee, 0xf2, - 0xd2, 0x05, 0x01, 0x52, 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x68, 0x0a, 0x30, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x2a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x54, 0x61, 0x67, - 0x73, 0x22, 0x28, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x3a, 0x5b, 0x9a, 0xc5, 0x88, - 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x3a, 0x7f, 0x9a, 0xc5, 0x88, 0x1e, 0x7a, 0x0a, 0x78, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, + 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x3a, 0x6a, 0x9a, 0xc5, 0x88, 0x1e, 0x65, 0x0a, 0x63, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x0b, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x5a, 0x9a, 0xc5, 0x88, + 0x1e, 0x55, 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x1a, 0xa5, 0x01, 0x0a, 0x15, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x69, 0x9a, 0xc5, 0x88, 0x1e, 0x64, 0x0a, 0x62, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0x98, 0x02, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, - 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x03, 0x75, 0x72, 0x69, 0x3a, 0x6f, 0x9a, 0xc5, 0x88, 0x1e, 0x6a, 0x0a, 0x68, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0xae, 0x02, 0x0a, 0x0d, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, - 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x61, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x61, 0x9a, 0xc5, 0x88, 0x1e, 0x5c, - 0x0a, 0x5a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x36, 0x0a, 0x09, - 0x43, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, - 0x4f, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, - 0x50, 0x33, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, - 0x42, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x41, 0x53, 0x53, 0x5f, - 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, 0x10, 0x02, 0x22, 0x79, 0x0a, 0x18, 0x46, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, - 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, - 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, - 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x41, 0x4e, - 0x49, 0x54, 0x49, 0x5a, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x41, - 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x04, 0x22, 0xa0, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, - 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, - 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x43, - 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, - 0x45, 0x50, 0x5f, 0x55, 0x4e, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, - 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, - 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, - 0x14, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x46, 0x4f, - 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x04, 0x3a, 0x53, 0x9a, 0xc5, 0x88, 0x1e, 0x4e, 0x0a, 0x4c, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x42, 0x16, 0x0a, 0x0f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x4a, 0x04, 0x08, 0x1b, 0x10, 0x1c, 0x22, 0xca, 0x01, - 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x65, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x42, 0x17, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf1, 0x01, 0x0a, + 0x09, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x12, 0x65, 0x0a, 0x18, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x15, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x72, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x73, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, + 0x22, 0xcc, 0x02, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, + 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x62, 0x6f, 0x64, - 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, - 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x9c, 0x03, 0x0a, 0x0e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x4c, 0x0a, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0b, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, - 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x60, 0x0a, - 0x14, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x6f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, 0x6f, 0x64, - 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, - 0x58, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, - 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x0c, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x03, 0x52, 0x64, - 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, - 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x64, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x1d, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x79, 0x0a, 0x1b, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x19, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x3a, 0x5b, 0x9a, 0xc5, 0x88, 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xe9, 0x0e, - 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x11, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x59, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x58, 0x0a, - 0x11, 0x72, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x72, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0xa5, 0x01, 0x0a, 0x20, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, + 0x04, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x9f, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, + 0x50, 0x9a, 0xc5, 0x88, 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x6f, 0x62, 0x69, 0x6c, + 0x65, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xef, 0x01, 0x0a, 0x49, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x1d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x67, 0x0a, 0x0a, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x48, 0x00, 0x52, 0x09, 0x73, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x1a, 0xd9, 0x09, 0x0a, 0x0f, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x91, 0x01, 0x0a, - 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x1a, 0xd5, 0x07, 0x0a, 0x0f, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x65, 0x72, 0x12, 0xb6, 0x01, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x7e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, - 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x14, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0x8f, 0x05, - 0x0a, 0x14, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, - 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0xa5, 0x01, 0x0a, 0x07, 0x65, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x88, 0x01, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x1a, 0xdb, 0x01, 0x0a, 0x09, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, - 0x0a, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x73, 0x65, 0x70, 0x61, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x3a, 0x8b, 0x01, 0x9a, 0xc5, 0x88, 0x1e, 0x85, 0x01, 0x0a, 0x82, 0x01, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, - 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x7f, - 0x9a, 0xc5, 0x88, 0x1e, 0x7a, 0x0a, 0x78, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, - 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, - 0x0e, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x3a, - 0x6a, 0x9a, 0xc5, 0x88, 0x1e, 0x65, 0x0a, 0x63, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x5a, 0x9a, 0xc5, 0x88, 0x1e, 0x55, 0x0a, - 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x65, 0x72, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x42, 0x17, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x09, 0x53, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x12, 0x65, 0x0a, 0x18, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x5f, 0x72, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x15, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, - 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x47, - 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x22, 0x81, 0x03, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, - 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, - 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, - 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x48, 0x9a, 0xc5, - 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x9f, 0x01, 0x0a, 0x12, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x50, 0x9a, 0xc5, 0x88, - 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x71, 0x0a, - 0x49, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x48, 0x74, 0x74, 0x70, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x1a, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7c, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, + 0x76, 0x33, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3038,7 +3483,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_goTypes = []interface{}{ (HttpConnectionManager_CodecType)(0), // 0: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.CodecType (HttpConnectionManager_ServerHeaderTransformation)(0), // 1: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ServerHeaderTransformation @@ -3054,102 +3499,115 @@ var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connec (*ScopedRds)(nil), // 11: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds (*HttpFilter)(nil), // 12: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter (*RequestIDExtension)(nil), // 13: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension - (*HttpConnectionManager_Tracing)(nil), // 14: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing - (*HttpConnectionManager_InternalAddressConfig)(nil), // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig - (*HttpConnectionManager_SetCurrentClientCertDetails)(nil), // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails - (*HttpConnectionManager_UpgradeConfig)(nil), // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig - (*ScopedRoutes_ScopeKeyBuilder)(nil), // 18: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), // 19: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), // 20: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 21: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement - (*v32.RouteConfiguration)(nil), // 22: envoy.config.route.v3.RouteConfiguration - (*wrappers.BoolValue)(nil), // 23: google.protobuf.BoolValue - (*v3.HttpProtocolOptions)(nil), // 24: envoy.config.core.v3.HttpProtocolOptions - (*v3.Http1ProtocolOptions)(nil), // 25: envoy.config.core.v3.Http1ProtocolOptions - (*v3.Http2ProtocolOptions)(nil), // 26: envoy.config.core.v3.Http2ProtocolOptions - (*wrappers.UInt32Value)(nil), // 27: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 28: google.protobuf.Duration - (*v31.AccessLog)(nil), // 29: envoy.config.accesslog.v3.AccessLog - (*v3.SubstitutionFormatString)(nil), // 30: envoy.config.core.v3.SubstitutionFormatString - (*v31.AccessLogFilter)(nil), // 31: envoy.config.accesslog.v3.AccessLogFilter - (*v3.DataSource)(nil), // 32: envoy.config.core.v3.DataSource - (*v3.HeaderValueOption)(nil), // 33: envoy.config.core.v3.HeaderValueOption - (*v3.ConfigSource)(nil), // 34: envoy.config.core.v3.ConfigSource - (*v32.ScopedRouteConfiguration)(nil), // 35: envoy.config.route.v3.ScopedRouteConfiguration - (*any.Any)(nil), // 36: google.protobuf.Any - (*v3.ExtensionConfigSource)(nil), // 37: envoy.config.core.v3.ExtensionConfigSource - (*_struct.Struct)(nil), // 38: google.protobuf.Struct - (*v33.Percent)(nil), // 39: envoy.type.v3.Percent - (*v34.CustomTag)(nil), // 40: envoy.type.tracing.v3.CustomTag - (*v35.Tracing_Http)(nil), // 41: envoy.config.trace.v3.Tracing.Http + (*EnvoyMobileHttpConnectionManager)(nil), // 14: envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager + (*HttpConnectionManager_Tracing)(nil), // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing + (*HttpConnectionManager_InternalAddressConfig)(nil), // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig + (*HttpConnectionManager_SetCurrentClientCertDetails)(nil), // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails + (*HttpConnectionManager_UpgradeConfig)(nil), // 18: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig + (*HttpConnectionManager_PathNormalizationOptions)(nil), // 19: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions + (*HttpConnectionManager_ProxyStatusConfig)(nil), // 20: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ProxyStatusConfig + (*ScopedRoutes_ScopeKeyBuilder)(nil), // 21: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), // 22: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), // 23: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 24: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement + (*v32.RouteConfiguration)(nil), // 25: envoy.config.route.v3.RouteConfiguration + (*wrappers.BoolValue)(nil), // 26: google.protobuf.BoolValue + (*v3.HttpProtocolOptions)(nil), // 27: envoy.config.core.v3.HttpProtocolOptions + (*v3.Http1ProtocolOptions)(nil), // 28: envoy.config.core.v3.Http1ProtocolOptions + (*v3.Http2ProtocolOptions)(nil), // 29: envoy.config.core.v3.Http2ProtocolOptions + (*v3.Http3ProtocolOptions)(nil), // 30: envoy.config.core.v3.Http3ProtocolOptions + (*v3.SchemeHeaderTransformation)(nil), // 31: envoy.config.core.v3.SchemeHeaderTransformation + (*wrappers.UInt32Value)(nil), // 32: google.protobuf.UInt32Value + (*duration.Duration)(nil), // 33: google.protobuf.Duration + (*v31.AccessLog)(nil), // 34: envoy.config.accesslog.v3.AccessLog + (*v3.TypedExtensionConfig)(nil), // 35: envoy.config.core.v3.TypedExtensionConfig + (*v3.SubstitutionFormatString)(nil), // 36: envoy.config.core.v3.SubstitutionFormatString + (*v31.AccessLogFilter)(nil), // 37: envoy.config.accesslog.v3.AccessLogFilter + (*v3.DataSource)(nil), // 38: envoy.config.core.v3.DataSource + (*v3.HeaderValueOption)(nil), // 39: envoy.config.core.v3.HeaderValueOption + (*v3.ConfigSource)(nil), // 40: envoy.config.core.v3.ConfigSource + (*v32.ScopedRouteConfiguration)(nil), // 41: envoy.config.route.v3.ScopedRouteConfiguration + (*any.Any)(nil), // 42: google.protobuf.Any + (*v3.ExtensionConfigSource)(nil), // 43: envoy.config.core.v3.ExtensionConfigSource + (*v33.Percent)(nil), // 44: envoy.type.v3.Percent + (*v34.CustomTag)(nil), // 45: envoy.type.tracing.v3.CustomTag + (*v35.Tracing_Http)(nil), // 46: envoy.config.trace.v3.Tracing.Http + (*v3.CidrRange)(nil), // 47: envoy.config.core.v3.CidrRange + (*v36.PathTransformation)(nil), // 48: envoy.type.http.v3.PathTransformation } var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_depIdxs = []int32{ 0, // 0: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.codec_type:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.CodecType 8, // 1: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.Rds - 22, // 2: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config:type_name -> envoy.config.route.v3.RouteConfiguration + 25, // 2: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config:type_name -> envoy.config.route.v3.RouteConfiguration 10, // 3: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.scoped_routes:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes 12, // 4: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter - 23, // 5: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue - 14, // 6: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.tracing:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing - 24, // 7: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions - 25, // 8: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions - 26, // 9: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions - 1, // 10: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.server_header_transformation:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ServerHeaderTransformation - 27, // 11: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value - 28, // 12: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration - 28, // 13: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration - 28, // 14: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_headers_timeout:type_name -> google.protobuf.Duration - 28, // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration - 28, // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration - 29, // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.access_log:type_name -> envoy.config.accesslog.v3.AccessLog - 23, // 18: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue - 15, // 19: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig - 23, // 20: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue - 2, // 21: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.forward_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ForwardClientCertDetails - 16, // 22: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.set_current_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails - 17, // 23: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig - 23, // 24: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue - 3, // 25: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_with_escaped_slashes_action:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathWithEscapedSlashesAction - 13, // 26: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_id_extension:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension - 6, // 27: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.local_reply_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig - 23, // 28: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 28, // 29: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.hidden_envoy_deprecated_idle_timeout:type_name -> google.protobuf.Duration - 7, // 30: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.mappers:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper - 30, // 31: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.body_format:type_name -> envoy.config.core.v3.SubstitutionFormatString - 31, // 32: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.filter:type_name -> envoy.config.accesslog.v3.AccessLogFilter - 27, // 33: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.status_code:type_name -> google.protobuf.UInt32Value - 32, // 34: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body:type_name -> envoy.config.core.v3.DataSource - 30, // 35: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body_format_override:type_name -> envoy.config.core.v3.SubstitutionFormatString - 33, // 36: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 34, // 37: envoy.extensions.filters.network.http_connection_manager.v3.Rds.config_source:type_name -> envoy.config.core.v3.ConfigSource - 35, // 38: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.config.route.v3.ScopedRouteConfiguration - 18, // 39: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder - 34, // 40: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.rds_config_source:type_name -> envoy.config.core.v3.ConfigSource - 9, // 41: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList - 11, // 42: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds - 34, // 43: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds.scoped_rds_config_source:type_name -> envoy.config.core.v3.ConfigSource - 36, // 44: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.typed_config:type_name -> google.protobuf.Any - 37, // 45: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.config_discovery:type_name -> envoy.config.core.v3.ExtensionConfigSource - 38, // 46: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 36, // 47: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension.typed_config:type_name -> google.protobuf.Any - 39, // 48: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.v3.Percent - 39, // 49: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.v3.Percent - 39, // 50: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.v3.Percent - 27, // 51: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value - 40, // 52: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag - 41, // 53: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v3.Tracing.Http - 4, // 54: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.hidden_envoy_deprecated_operation_name:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.OperationName - 23, // 55: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue - 12, // 56: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter - 23, // 57: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 19, // 58: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.fragments:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder - 20, // 59: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.header_value_extractor:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor - 21, // 60: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement - 61, // [61:61] is the sub-list for method output_type - 61, // [61:61] is the sub-list for method input_type - 61, // [61:61] is the sub-list for extension type_name - 61, // [61:61] is the sub-list for extension extendee - 0, // [0:61] is the sub-list for field type_name + 26, // 5: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue + 15, // 6: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.tracing:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing + 27, // 7: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions + 28, // 8: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions + 29, // 9: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions + 30, // 10: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http3_protocol_options:type_name -> envoy.config.core.v3.Http3ProtocolOptions + 1, // 11: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.server_header_transformation:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ServerHeaderTransformation + 31, // 12: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.scheme_header_transformation:type_name -> envoy.config.core.v3.SchemeHeaderTransformation + 32, // 13: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value + 33, // 14: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration + 33, // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration + 33, // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_headers_timeout:type_name -> google.protobuf.Duration + 33, // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration + 33, // 18: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration + 34, // 19: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.access_log:type_name -> envoy.config.accesslog.v3.AccessLog + 26, // 20: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue + 35, // 21: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.original_ip_detection_extensions:type_name -> envoy.config.core.v3.TypedExtensionConfig + 16, // 22: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig + 26, // 23: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue + 2, // 24: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.forward_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ForwardClientCertDetails + 17, // 25: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.set_current_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails + 18, // 26: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig + 26, // 27: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue + 3, // 28: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_with_escaped_slashes_action:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathWithEscapedSlashesAction + 13, // 29: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_id_extension:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension + 6, // 30: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.local_reply_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig + 26, // 31: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue + 19, // 32: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_normalization_options:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions + 20, // 33: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.proxy_status_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ProxyStatusConfig + 7, // 34: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.mappers:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper + 36, // 35: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.body_format:type_name -> envoy.config.core.v3.SubstitutionFormatString + 37, // 36: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.filter:type_name -> envoy.config.accesslog.v3.AccessLogFilter + 32, // 37: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.status_code:type_name -> google.protobuf.UInt32Value + 38, // 38: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body:type_name -> envoy.config.core.v3.DataSource + 36, // 39: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body_format_override:type_name -> envoy.config.core.v3.SubstitutionFormatString + 39, // 40: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 40, // 41: envoy.extensions.filters.network.http_connection_manager.v3.Rds.config_source:type_name -> envoy.config.core.v3.ConfigSource + 41, // 42: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.config.route.v3.ScopedRouteConfiguration + 21, // 43: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder + 40, // 44: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.rds_config_source:type_name -> envoy.config.core.v3.ConfigSource + 9, // 45: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList + 11, // 46: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds + 40, // 47: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds.scoped_rds_config_source:type_name -> envoy.config.core.v3.ConfigSource + 42, // 48: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.typed_config:type_name -> google.protobuf.Any + 43, // 49: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.config_discovery:type_name -> envoy.config.core.v3.ExtensionConfigSource + 42, // 50: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension.typed_config:type_name -> google.protobuf.Any + 5, // 51: envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager.config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + 44, // 52: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.v3.Percent + 44, // 53: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.v3.Percent + 44, // 54: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.v3.Percent + 32, // 55: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value + 45, // 56: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag + 46, // 57: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v3.Tracing.Http + 47, // 58: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig.cidr_ranges:type_name -> envoy.config.core.v3.CidrRange + 26, // 59: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue + 12, // 60: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter + 26, // 61: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue + 48, // 62: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.forwarding_transformation:type_name -> envoy.type.http.v3.PathTransformation + 48, // 63: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.http_filter_transformation:type_name -> envoy.type.http.v3.PathTransformation + 22, // 64: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.fragments:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder + 23, // 65: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.header_value_extractor:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor + 24, // 66: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement + 67, // [67:67] is the sub-list for method output_type + 67, // [67:67] is the sub-list for method input_type + 67, // [67:67] is the sub-list for extension type_name + 67, // [67:67] is the sub-list for extension extendee + 0, // [0:67] is the sub-list for field type_name } func init() { @@ -3269,7 +3727,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_Tracing); i { + switch v := v.(*EnvoyMobileHttpConnectionManager); i { case 0: return &v.state case 1: @@ -3281,7 +3739,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_InternalAddressConfig); i { + switch v := v.(*HttpConnectionManager_Tracing); i { case 0: return &v.state case 1: @@ -3293,7 +3751,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_SetCurrentClientCertDetails); i { + switch v := v.(*HttpConnectionManager_InternalAddressConfig); i { case 0: return &v.state case 1: @@ -3305,7 +3763,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_UpgradeConfig); i { + switch v := v.(*HttpConnectionManager_SetCurrentClientCertDetails); i { case 0: return &v.state case 1: @@ -3317,7 +3775,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes_ScopeKeyBuilder); i { + switch v := v.(*HttpConnectionManager_UpgradeConfig); i { case 0: return &v.state case 1: @@ -3329,7 +3787,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder); i { + switch v := v.(*HttpConnectionManager_PathNormalizationOptions); i { case 0: return &v.state case 1: @@ -3341,7 +3799,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor); i { + switch v := v.(*HttpConnectionManager_ProxyStatusConfig); i { case 0: return &v.state case 1: @@ -3353,6 +3811,42 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne } } file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScopedRoutes_ScopeKeyBuilder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement); i { case 0: return &v.state @@ -3378,12 +3872,15 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[7].OneofWrappers = []interface{}{ (*HttpFilter_TypedConfig)(nil), (*HttpFilter_ConfigDiscovery)(nil), - (*HttpFilter_HiddenEnvoyDeprecatedConfig)(nil), } - file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[14].OneofWrappers = []interface{}{ + file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*HttpConnectionManager_ProxyStatusConfig_UseNodeId)(nil), + (*HttpConnectionManager_ProxyStatusConfig_LiteralProxyName)(nil), + } + file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[17].OneofWrappers = []interface{}{ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_)(nil), } - file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15].OneofWrappers = []interface{}{ + file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18].OneofWrappers = []interface{}{ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index)(nil), (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element)(nil), } @@ -3393,7 +3890,7 @@ func file_envoy_extensions_filters_network_http_connection_manager_v3_http_conne GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDesc, NumEnums: 5, - NumMessages: 17, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go b/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go index 1e3a68f0a9..7cd77775cd 100644 --- a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto -package envoy_extensions_filters_network_http_connection_manager_v3 +package http_connection_managerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpConnectionManager) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpConnectionManager with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpConnectionManagerMultiError, or nil if none found. +func (m *HttpConnectionManager) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := HttpConnectionManager_CodecType_name[int32(m.GetCodecType())]; !ok { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "CodecType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHttpFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("HttpFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("HttpFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: fmt.Sprintf("HttpFilters[%v]", idx), @@ -70,7 +113,26 @@ func (m *HttpConnectionManager) Validate() error { } - if v, ok := interface{}(m.GetAddUserAgent()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAddUserAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "AddUserAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "AddUserAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddUserAgent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "AddUserAgent", @@ -80,7 +142,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTracing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "Tracing", @@ -90,7 +171,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "CommonHttpProtocolOptions", @@ -100,7 +200,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "HttpProtocolOptions", @@ -110,7 +229,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "Http2ProtocolOptions", @@ -120,32 +258,121 @@ func (m *HttpConnectionManager) Validate() error { } } + if all { + switch v := interface{}(m.GetHttp3ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp3ProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + if !_HttpConnectionManager_ServerName_Pattern.MatchString(m.GetServerName()) { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "ServerName", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := HttpConnectionManager_ServerHeaderTransformation_name[int32(m.GetServerHeaderTransformation())]; !ok { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "ServerHeaderTransformation", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSchemeHeaderTransformation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "SchemeHeaderTransformation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "SchemeHeaderTransformation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSchemeHeaderTransformation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "SchemeHeaderTransformation", + reason: "embedded message failed validation", + cause: err, + } + } } if wrapper := m.GetMaxRequestHeadersKb(); wrapper != nil { - if val := wrapper.GetValue(); val <= 0 || val > 96 { - return HttpConnectionManagerValidationError{ + if val := wrapper.GetValue(); val <= 0 || val > 8192 { + err := HttpConnectionManagerValidationError{ field: "MaxRequestHeadersKb", - reason: "value must be inside range (0, 96]", + reason: "value must be inside range (0, 8192]", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetStreamIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStreamIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "StreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "StreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "StreamIdleTimeout", @@ -155,7 +382,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "RequestTimeout", @@ -166,27 +412,55 @@ func (m *HttpConnectionManager) Validate() error { } if d := m.GetRequestHeadersTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return HttpConnectionManagerValidationError{ + err = HttpConnectionManagerValidationError{ field: "RequestHeadersTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - gte := time.Duration(0*time.Second + 0*time.Nanosecond) + gte := time.Duration(0*time.Second + 0*time.Nanosecond) - if dur < gte { - return HttpConnectionManagerValidationError{ - field: "RequestHeadersTimeout", - reason: "value must be greater than or equal to 0s", + if dur < gte { + err := HttpConnectionManagerValidationError{ + field: "RequestHeadersTimeout", + reason: "value must be greater than or equal to 0s", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } - if v, ok := interface{}(m.GetDrainTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDrainTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DrainTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DrainTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "DrainTimeout", @@ -196,7 +470,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetDelayedCloseTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDelayedCloseTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DelayedCloseTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "DelayedCloseTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelayedCloseTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "DelayedCloseTimeout", @@ -209,7 +502,26 @@ func (m *HttpConnectionManager) Validate() error { for idx, item := range m.GetAccessLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: fmt.Sprintf("AccessLog[%v]", idx), @@ -221,7 +533,26 @@ func (m *HttpConnectionManager) Validate() error { } - if v, ok := interface{}(m.GetUseRemoteAddress()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "UseRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "UseRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseRemoteAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "UseRemoteAddress", @@ -233,7 +564,60 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for XffNumTrustedHops - if v, ok := interface{}(m.GetInternalAddressConfig()).(interface{ Validate() error }); ok { + for idx, item := range m.GetOriginalIpDetectionExtensions() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("OriginalIpDetectionExtensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("OriginalIpDetectionExtensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: fmt.Sprintf("OriginalIpDetectionExtensions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetInternalAddressConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "InternalAddressConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "InternalAddressConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInternalAddressConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "InternalAddressConfig", @@ -245,9 +629,37 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for SkipXffAppend - // no validation rules for Via + if !_HttpConnectionManager_Via_Pattern.MatchString(m.GetVia()) { + err := HttpConnectionManagerValidationError{ + field: "Via", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } - if v, ok := interface{}(m.GetGenerateRequestId()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGenerateRequestId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "GenerateRequestId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "GenerateRequestId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGenerateRequestId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "GenerateRequestId", @@ -262,13 +674,36 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for AlwaysSetRequestIdInResponse if _, ok := HttpConnectionManager_ForwardClientCertDetails_name[int32(m.GetForwardClientCertDetails())]; !ok { - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "ForwardClientCertDetails", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSetCurrentClientCertDetails()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSetCurrentClientCertDetails()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "SetCurrentClientCertDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "SetCurrentClientCertDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSetCurrentClientCertDetails()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "SetCurrentClientCertDetails", @@ -285,7 +720,26 @@ func (m *HttpConnectionManager) Validate() error { for idx, item := range m.GetUpgradeConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: fmt.Sprintf("UpgradeConfigs[%v]", idx), @@ -297,7 +751,26 @@ func (m *HttpConnectionManager) Validate() error { } - if v, ok := interface{}(m.GetNormalizePath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNormalizePath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "NormalizePath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "NormalizePath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNormalizePath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "NormalizePath", @@ -311,7 +784,26 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for PathWithEscapedSlashesAction - if v, ok := interface{}(m.GetRequestIdExtension()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestIdExtension()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestIdExtension", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RequestIdExtension", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestIdExtension()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "RequestIdExtension", @@ -321,7 +813,26 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetLocalReplyConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLocalReplyConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "LocalReplyConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "LocalReplyConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalReplyConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "LocalReplyConfig", @@ -333,7 +844,26 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for StripMatchingHostPort - if v, ok := interface{}(m.GetStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStreamErrorOnInvalidHttpMessage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "StreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "StreamErrorOnInvalidHttpMessage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "StreamErrorOnInvalidHttpMessage", @@ -343,10 +873,60 @@ func (m *HttpConnectionManager) Validate() error { } } - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPathNormalizationOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "PathNormalizationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "PathNormalizationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPathNormalizationOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "PathNormalizationOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for StripTrailingHostDot + + if all { + switch v := interface{}(m.GetProxyStatusConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "ProxyStatusConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "ProxyStatusConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProxyStatusConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ - field: "HiddenEnvoyDeprecatedIdleTimeout", + field: "ProxyStatusConfig", reason: "embedded message failed validation", cause: err, } @@ -357,7 +937,26 @@ func (m *HttpConnectionManager) Validate() error { case *HttpConnectionManager_Rds: - if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "Rds", @@ -369,7 +968,26 @@ func (m *HttpConnectionManager) Validate() error { case *HttpConnectionManager_RouteConfig: - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "RouteConfig", @@ -381,7 +999,26 @@ func (m *HttpConnectionManager) Validate() error { case *HttpConnectionManager_ScopedRoutes: - if v, ok := interface{}(m.GetScopedRoutes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRoutes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "ScopedRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManagerValidationError{ + field: "ScopedRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRoutes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManagerValidationError{ field: "ScopedRoutes", @@ -392,10 +1029,14 @@ func (m *HttpConnectionManager) Validate() error { } default: - return HttpConnectionManagerValidationError{ + err := HttpConnectionManagerValidationError{ field: "RouteSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } @@ -406,10 +1047,31 @@ func (m *HttpConnectionManager) Validate() error { } + if len(errors) > 0 { + return HttpConnectionManagerMultiError(errors) + } + return nil } -// HttpConnectionManagerValidationError is the validation error returned by +// HttpConnectionManagerMultiError is an error wrapping multiple validation +// errors returned by HttpConnectionManager.ValidateAll() if the designated +// constraints aren't met. +type HttpConnectionManagerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManagerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManagerMultiError) AllErrors() []error { return m } + +// HttpConnectionManagerValidationError is the validation error returned by // HttpConnectionManager.Validate if the designated constraints aren't met. type HttpConnectionManagerValidationError struct { field string @@ -467,18 +1129,53 @@ var _ interface { var _HttpConnectionManager_ServerName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") +var _HttpConnectionManager_Via_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + // Validate checks the field values on LocalReplyConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LocalReplyConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalReplyConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LocalReplyConfigMultiError, or nil if none found. +func (m *LocalReplyConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalReplyConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetMappers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalReplyConfigValidationError{ + field: fmt.Sprintf("Mappers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalReplyConfigValidationError{ + field: fmt.Sprintf("Mappers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalReplyConfigValidationError{ field: fmt.Sprintf("Mappers[%v]", idx), @@ -490,7 +1187,26 @@ func (m *LocalReplyConfig) Validate() error { } - if v, ok := interface{}(m.GetBodyFormat()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBodyFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalReplyConfigValidationError{ + field: "BodyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalReplyConfigValidationError{ + field: "BodyFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBodyFormat()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalReplyConfigValidationError{ field: "BodyFormat", @@ -500,9 +1216,30 @@ func (m *LocalReplyConfig) Validate() error { } } + if len(errors) > 0 { + return LocalReplyConfigMultiError(errors) + } + return nil } +// LocalReplyConfigMultiError is an error wrapping multiple validation errors +// returned by LocalReplyConfig.ValidateAll() if the designated constraints +// aren't met. +type LocalReplyConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalReplyConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalReplyConfigMultiError) AllErrors() []error { return m } + // LocalReplyConfigValidationError is the validation error returned by // LocalReplyConfig.Validate if the designated constraints aren't met. type LocalReplyConfigValidationError struct { @@ -558,21 +1295,58 @@ var _ interface { } = LocalReplyConfigValidationError{} // Validate checks the field values on ResponseMapper with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ResponseMapper) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseMapper with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResponseMapperMultiError, +// or nil if none found. +func (m *ResponseMapper) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseMapper) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetFilter() == nil { - return ResponseMapperValidationError{ + err := ResponseMapperValidationError{ field: "Filter", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapperValidationError{ field: "Filter", @@ -585,15 +1359,38 @@ func (m *ResponseMapper) Validate() error { if wrapper := m.GetStatusCode(); wrapper != nil { if val := wrapper.GetValue(); val < 200 || val >= 600 { - return ResponseMapperValidationError{ + err := ResponseMapperValidationError{ field: "StatusCode", reason: "value must be inside range [200, 600)", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapperValidationError{ field: "Body", @@ -603,7 +1400,26 @@ func (m *ResponseMapper) Validate() error { } } - if v, ok := interface{}(m.GetBodyFormatOverride()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBodyFormatOverride()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "BodyFormatOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: "BodyFormatOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBodyFormatOverride()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapperValidationError{ field: "BodyFormatOverride", @@ -614,16 +1430,39 @@ func (m *ResponseMapper) Validate() error { } if len(m.GetHeadersToAdd()) > 1000 { - return ResponseMapperValidationError{ + err := ResponseMapperValidationError{ field: "HeadersToAdd", reason: "value must contain no more than 1000 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseMapperValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseMapperValidationError{ field: fmt.Sprintf("HeadersToAdd[%v]", idx), @@ -635,9 +1474,30 @@ func (m *ResponseMapper) Validate() error { } + if len(errors) > 0 { + return ResponseMapperMultiError(errors) + } + return nil } +// ResponseMapperMultiError is an error wrapping multiple validation errors +// returned by ResponseMapper.ValidateAll() if the designated constraints +// aren't met. +type ResponseMapperMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseMapperMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseMapperMultiError) AllErrors() []error { return m } + // ResponseMapperValidationError is the validation error returned by // ResponseMapper.Validate if the designated constraints aren't met. type ResponseMapperValidationError struct { @@ -693,20 +1553,57 @@ var _ interface { } = ResponseMapperValidationError{} // Validate checks the field values on Rds with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Rds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Rds with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RdsMultiError, or nil if none found. +func (m *Rds) ValidateAll() error { + return m.validate(true) +} + +func (m *Rds) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetConfigSource() == nil { - return RdsValidationError{ + err := RdsValidationError{ field: "ConfigSource", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RdsValidationError{ field: "ConfigSource", @@ -718,9 +1615,29 @@ func (m *Rds) Validate() error { // no validation rules for RouteConfigName + if len(errors) > 0 { + return RdsMultiError(errors) + } + return nil } +// RdsMultiError is an error wrapping multiple validation errors returned by +// Rds.ValidateAll() if the designated constraints aren't met. +type RdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RdsMultiError) AllErrors() []error { return m } + // RdsValidationError is the validation error returned by Rds.Validate if the // designated constraints aren't met. type RdsValidationError struct { @@ -777,23 +1694,60 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRouteConfigurationsList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRouteConfigurationsList with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ScopedRouteConfigurationsListMultiError, or nil if none found. +func (m *ScopedRouteConfigurationsList) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRouteConfigurationsList) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetScopedRouteConfigurations()) < 1 { - return ScopedRouteConfigurationsListValidationError{ + err := ScopedRouteConfigurationsListValidationError{ field: "ScopedRouteConfigurations", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetScopedRouteConfigurations() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRouteConfigurationsListValidationError{ + field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRouteConfigurationsListValidationError{ + field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRouteConfigurationsListValidationError{ field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx), @@ -805,9 +1759,30 @@ func (m *ScopedRouteConfigurationsList) Validate() error { } + if len(errors) > 0 { + return ScopedRouteConfigurationsListMultiError(errors) + } + return nil } +// ScopedRouteConfigurationsListMultiError is an error wrapping multiple +// validation errors returned by ScopedRouteConfigurationsList.ValidateAll() +// if the designated constraints aren't met. +type ScopedRouteConfigurationsListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRouteConfigurationsListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRouteConfigurationsListMultiError) AllErrors() []error { return m } + // ScopedRouteConfigurationsListValidationError is the validation error // returned by ScopedRouteConfigurationsList.Validate if the designated // constraints aren't met. @@ -866,28 +1841,69 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRoutes with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ScopedRoutesMultiError, or +// nil if none found. +func (m *ScopedRoutes) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return ScopedRoutesValidationError{ + err := ScopedRoutesValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetScopeKeyBuilder() == nil { - return ScopedRoutesValidationError{ + err := ScopedRoutesValidationError{ field: "ScopeKeyBuilder", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetScopeKeyBuilder()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopeKeyBuilder()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopeKeyBuilder", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopeKeyBuilder", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopeKeyBuilder()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "ScopeKeyBuilder", @@ -897,14 +1913,26 @@ func (m *ScopedRoutes) Validate() error { } } - if m.GetRdsConfigSource() == nil { - return ScopedRoutesValidationError{ - field: "RdsConfigSource", - reason: "value is required", + if all { + switch v := interface{}(m.GetRdsConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "RdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "RdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } } - } - - if v, ok := interface{}(m.GetRdsConfigSource()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetRdsConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "RdsConfigSource", @@ -918,7 +1946,26 @@ func (m *ScopedRoutes) Validate() error { case *ScopedRoutes_ScopedRouteConfigurationsList: - if v, ok := interface{}(m.GetScopedRouteConfigurationsList()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRouteConfigurationsList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRouteConfigurationsList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRouteConfigurationsList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRouteConfigurationsList()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "ScopedRouteConfigurationsList", @@ -930,7 +1977,26 @@ func (m *ScopedRoutes) Validate() error { case *ScopedRoutes_ScopedRds: - if v, ok := interface{}(m.GetScopedRds()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesValidationError{ + field: "ScopedRds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRds()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutesValidationError{ field: "ScopedRds", @@ -941,16 +2007,40 @@ func (m *ScopedRoutes) Validate() error { } default: - return ScopedRoutesValidationError{ + err := ScopedRoutesValidationError{ field: "ConfigSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ScopedRoutesMultiError(errors) + } + return nil } +// ScopedRoutesMultiError is an error wrapping multiple validation errors +// returned by ScopedRoutes.ValidateAll() if the designated constraints aren't met. +type ScopedRoutesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesMultiError) AllErrors() []error { return m } + // ScopedRoutesValidationError is the validation error returned by // ScopedRoutes.Validate if the designated constraints aren't met. type ScopedRoutesValidationError struct { @@ -1006,20 +2096,58 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRds with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ScopedRdsMultiError, or nil +// if none found. +func (m *ScopedRds) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRds) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetScopedRdsConfigSource() == nil { - return ScopedRdsValidationError{ + err := ScopedRdsValidationError{ field: "ScopedRdsConfigSource", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetScopedRdsConfigSource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRdsConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRdsValidationError{ + field: "ScopedRdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRdsValidationError{ + field: "ScopedRdsConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRdsConfigSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRdsValidationError{ field: "ScopedRdsConfigSource", @@ -1029,9 +2157,31 @@ func (m *ScopedRds) Validate() error { } } + // no validation rules for SrdsResourcesLocator + + if len(errors) > 0 { + return ScopedRdsMultiError(errors) + } + return nil } +// ScopedRdsMultiError is an error wrapping multiple validation errors returned +// by ScopedRds.ValidateAll() if the designated constraints aren't met. +type ScopedRdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRdsMultiError) AllErrors() []error { return m } + // ScopedRdsValidationError is the validation error returned by // ScopedRds.Validate if the designated constraints aren't met. type ScopedRdsValidationError struct { @@ -1087,24 +2237,64 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpFilter with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpFilterMultiError, or +// nil if none found. +func (m *HttpFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return HttpFilterValidationError{ + err := HttpFilterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } + // no validation rules for IsOptional + switch m.ConfigType.(type) { case *HttpFilter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpFilterValidationError{ field: "TypedConfig", @@ -1116,22 +2306,29 @@ func (m *HttpFilter) Validate() error { case *HttpFilter_ConfigDiscovery: - if v, ok := interface{}(m.GetConfigDiscovery()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpFilterValidationError{ - field: "ConfigDiscovery", - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(m.GetConfigDiscovery()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "ConfigDiscovery", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpFilterValidationError{ + field: "ConfigDiscovery", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *HttpFilter_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetConfigDiscovery()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpFilterValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "ConfigDiscovery", reason: "embedded message failed validation", cause: err, } @@ -1140,9 +2337,29 @@ func (m *HttpFilter) Validate() error { } + if len(errors) > 0 { + return HttpFilterMultiError(errors) + } + return nil } +// HttpFilterMultiError is an error wrapping multiple validation errors +// returned by HttpFilter.ValidateAll() if the designated constraints aren't met. +type HttpFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpFilterMultiError) AllErrors() []error { return m } + // HttpFilterValidationError is the validation error returned by // HttpFilter.Validate if the designated constraints aren't met. type HttpFilterValidationError struct { @@ -1199,13 +2416,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RequestIDExtension) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RequestIDExtension with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RequestIDExtensionMultiError, or nil if none found. +func (m *RequestIDExtension) ValidateAll() error { + return m.validate(true) +} + +func (m *RequestIDExtension) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequestIDExtensionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequestIDExtensionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequestIDExtensionValidationError{ field: "TypedConfig", @@ -1215,9 +2465,30 @@ func (m *RequestIDExtension) Validate() error { } } + if len(errors) > 0 { + return RequestIDExtensionMultiError(errors) + } + return nil } +// RequestIDExtensionMultiError is an error wrapping multiple validation errors +// returned by RequestIDExtension.ValidateAll() if the designated constraints +// aren't met. +type RequestIDExtensionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RequestIDExtensionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RequestIDExtensionMultiError) AllErrors() []error { return m } + // RequestIDExtensionValidationError is the validation error returned by // RequestIDExtension.Validate if the designated constraints aren't met. type RequestIDExtensionValidationError struct { @@ -1274,38 +2545,243 @@ var _ interface { 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. -func (m *HttpConnectionManager_Tracing) Validate() error { +// Validate checks the field values on EnvoyMobileHttpConnectionManager with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *EnvoyMobileHttpConnectionManager) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EnvoyMobileHttpConnectionManager with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// EnvoyMobileHttpConnectionManagerMultiError, or nil if none found. +func (m *EnvoyMobileHttpConnectionManager) ValidateAll() error { + return m.validate(true) +} + +func (m *EnvoyMobileHttpConnectionManager) validate(all bool) error { if m == nil { return nil } - 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, + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EnvoyMobileHttpConnectionManagerValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EnvoyMobileHttpConnectionManagerValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return HttpConnectionManager_TracingValidationError{ - field: "RandomSampling", + return EnvoyMobileHttpConnectionManagerValidationError{ + field: "Config", 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", + if len(errors) > 0 { + return EnvoyMobileHttpConnectionManagerMultiError(errors) + } + + return nil +} + +// EnvoyMobileHttpConnectionManagerMultiError is an error wrapping multiple +// validation errors returned by +// EnvoyMobileHttpConnectionManager.ValidateAll() if the designated +// constraints aren't met. +type EnvoyMobileHttpConnectionManagerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EnvoyMobileHttpConnectionManagerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EnvoyMobileHttpConnectionManagerMultiError) AllErrors() []error { return m } + +// EnvoyMobileHttpConnectionManagerValidationError is the validation error +// returned by EnvoyMobileHttpConnectionManager.Validate if the designated +// constraints aren't met. +type EnvoyMobileHttpConnectionManagerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EnvoyMobileHttpConnectionManagerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EnvoyMobileHttpConnectionManagerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EnvoyMobileHttpConnectionManagerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EnvoyMobileHttpConnectionManagerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EnvoyMobileHttpConnectionManagerValidationError) ErrorName() string { + return "EnvoyMobileHttpConnectionManagerValidationError" +} + +// Error satisfies the builtin error interface +func (e EnvoyMobileHttpConnectionManagerValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sEnvoyMobileHttpConnectionManager.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EnvoyMobileHttpConnectionManagerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EnvoyMobileHttpConnectionManagerValidationError{} + +// Validate checks the field values on HttpConnectionManager_Tracing with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HttpConnectionManager_Tracing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpConnectionManager_Tracing with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// HttpConnectionManager_TracingMultiError, or nil if none found. +func (m *HttpConnectionManager_Tracing) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_Tracing) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetClientSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRandomSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetOverallSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "OverallSampling", reason: "embedded message failed validation", cause: err, } @@ -1314,7 +2790,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { // no validation rules for Verbose - if v, ok := interface{}(m.GetMaxPathTagLength()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxPathTagLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "MaxPathTagLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "MaxPathTagLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPathTagLength()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: "MaxPathTagLength", @@ -1327,7 +2822,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { for idx, item := range m.GetCustomTags() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: fmt.Sprintf("CustomTags[%v]", idx), @@ -1339,7 +2853,26 @@ func (m *HttpConnectionManager_Tracing) Validate() error { } - if v, ok := interface{}(m.GetProvider()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetProvider()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "Provider", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_TracingValidationError{ + field: "Provider", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProvider()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpConnectionManager_TracingValidationError{ field: "Provider", @@ -1349,16 +2882,30 @@ func (m *HttpConnectionManager_Tracing) Validate() error { } } - if _, ok := HttpConnectionManager_Tracing_OperationName_name[int32(m.GetHiddenEnvoyDeprecatedOperationName())]; !ok { - return HttpConnectionManager_TracingValidationError{ - field: "HiddenEnvoyDeprecatedOperationName", - reason: "value must be one of the defined enum values", - } + if len(errors) > 0 { + return HttpConnectionManager_TracingMultiError(errors) } return nil } +// HttpConnectionManager_TracingMultiError is an error wrapping multiple +// validation errors returned by HttpConnectionManager_Tracing.ValidateAll() +// if the designated constraints aren't met. +type HttpConnectionManager_TracingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_TracingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_TracingMultiError) AllErrors() []error { return m } + // HttpConnectionManager_TracingValidationError is the validation error // returned by HttpConnectionManager_Tracing.Validate if the designated // constraints aren't met. @@ -1393,46 +2940,438 @@ func (e HttpConnectionManager_TracingValidationError) Error() string { cause = fmt.Sprintf(" | caused by: %v", e.cause) } - key := "" - if e.key { - key = "key for " + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpConnectionManager_Tracing.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpConnectionManager_TracingValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpConnectionManager_TracingValidationError{} + +// Validate checks the field values on +// HttpConnectionManager_InternalAddressConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HttpConnectionManager_InternalAddressConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpConnectionManager_InternalAddressConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// HttpConnectionManager_InternalAddressConfigMultiError, or nil if none found. +func (m *HttpConnectionManager_InternalAddressConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_InternalAddressConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for UnixSockets + + for idx, item := range m.GetCidrRanges() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_InternalAddressConfigValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_InternalAddressConfigValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_InternalAddressConfigValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HttpConnectionManager_InternalAddressConfigMultiError(errors) + } + + return nil +} + +// HttpConnectionManager_InternalAddressConfigMultiError is an error wrapping +// multiple validation errors returned by +// HttpConnectionManager_InternalAddressConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpConnectionManager_InternalAddressConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_InternalAddressConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_InternalAddressConfigMultiError) AllErrors() []error { return m } + +// HttpConnectionManager_InternalAddressConfigValidationError is the validation +// error returned by HttpConnectionManager_InternalAddressConfig.Validate if +// the designated constraints aren't met. +type HttpConnectionManager_InternalAddressConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpConnectionManager_InternalAddressConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpConnectionManager_InternalAddressConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpConnectionManager_InternalAddressConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpConnectionManager_InternalAddressConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpConnectionManager_InternalAddressConfigValidationError) ErrorName() string { + return "HttpConnectionManager_InternalAddressConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpConnectionManager_InternalAddressConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpConnectionManager_InternalAddressConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpConnectionManager_InternalAddressConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpConnectionManager_InternalAddressConfigValidationError{} + +// Validate checks the field values on +// HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HttpConnectionManager_SetCurrentClientCertDetails) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// HttpConnectionManager_SetCurrentClientCertDetailsMultiError, or nil if none found. +func (m *HttpConnectionManager_SetCurrentClientCertDetails) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_SetCurrentClientCertDetails) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else 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 + + if len(errors) > 0 { + return HttpConnectionManager_SetCurrentClientCertDetailsMultiError(errors) + } + + return nil +} + +// HttpConnectionManager_SetCurrentClientCertDetailsMultiError is an error +// wrapping multiple validation errors returned by +// HttpConnectionManager_SetCurrentClientCertDetails.ValidateAll() if the +// designated constraints aren't met. +type HttpConnectionManager_SetCurrentClientCertDetailsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_SetCurrentClientCertDetailsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_SetCurrentClientCertDetailsMultiError) AllErrors() []error { return m } + +// HttpConnectionManager_SetCurrentClientCertDetailsValidationError is the +// validation error returned by +// HttpConnectionManager_SetCurrentClientCertDetails.Validate if the +// designated constraints aren't met. +type HttpConnectionManager_SetCurrentClientCertDetailsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) ErrorName() string { + return "HttpConnectionManager_SetCurrentClientCertDetailsValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpConnectionManager_SetCurrentClientCertDetails.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{} + +// Validate checks the field values on HttpConnectionManager_UpgradeConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *HttpConnectionManager_UpgradeConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpConnectionManager_UpgradeConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// HttpConnectionManager_UpgradeConfigMultiError, or nil if none found. +func (m *HttpConnectionManager_UpgradeConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_UpgradeConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for UpgradeType + + for idx, item := range m.GetFilters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_UpgradeConfigValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpConnectionManager_UpgradeConfigMultiError(errors) } - return fmt.Sprintf( - "invalid %sHttpConnectionManager_Tracing.%s: %s%s", - key, - e.field, - e.reason, - cause) + return nil } -var _ error = HttpConnectionManager_TracingValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpConnectionManager_TracingValidationError{} +// HttpConnectionManager_UpgradeConfigMultiError is an error wrapping multiple +// validation errors returned by +// HttpConnectionManager_UpgradeConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpConnectionManager_UpgradeConfigMultiError []error -// Validate checks the field values on -// HttpConnectionManager_InternalAddressConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HttpConnectionManager_InternalAddressConfig) Validate() error { - if m == nil { - return nil +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_UpgradeConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) } - - // no validation rules for UnixSockets - - return nil + return strings.Join(msgs, "; ") } -// HttpConnectionManager_InternalAddressConfigValidationError is the validation -// error returned by HttpConnectionManager_InternalAddressConfig.Validate if -// the designated constraints aren't met. -type HttpConnectionManager_InternalAddressConfigValidationError struct { +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_UpgradeConfigMultiError) AllErrors() []error { return m } + +// HttpConnectionManager_UpgradeConfigValidationError is the validation error +// returned by HttpConnectionManager_UpgradeConfig.Validate if the designated +// constraints aren't met. +type HttpConnectionManager_UpgradeConfigValidationError struct { field string reason string cause error @@ -1440,24 +3379,24 @@ type HttpConnectionManager_InternalAddressConfigValidationError struct { } // Field function returns field value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Field() string { return e.field } +func (e HttpConnectionManager_UpgradeConfigValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Reason() string { return e.reason } +func (e HttpConnectionManager_UpgradeConfigValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Cause() error { return e.cause } +func (e HttpConnectionManager_UpgradeConfigValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Key() bool { return e.key } +func (e HttpConnectionManager_UpgradeConfigValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e HttpConnectionManager_InternalAddressConfigValidationError) ErrorName() string { - return "HttpConnectionManager_InternalAddressConfigValidationError" +func (e HttpConnectionManager_UpgradeConfigValidationError) ErrorName() string { + return "HttpConnectionManager_UpgradeConfigValidationError" } // Error satisfies the builtin error interface -func (e HttpConnectionManager_InternalAddressConfigValidationError) Error() string { +func (e HttpConnectionManager_UpgradeConfigValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1469,14 +3408,14 @@ func (e HttpConnectionManager_InternalAddressConfigValidationError) Error() stri } return fmt.Sprintf( - "invalid %sHttpConnectionManager_InternalAddressConfig.%s: %s%s", + "invalid %sHttpConnectionManager_UpgradeConfig.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = HttpConnectionManager_InternalAddressConfigValidationError{} +var _ error = HttpConnectionManager_UpgradeConfigValidationError{} var _ interface { Field() string @@ -1484,43 +3423,120 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = HttpConnectionManager_InternalAddressConfigValidationError{} +} = HttpConnectionManager_UpgradeConfigValidationError{} // Validate checks the field values on -// HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HttpConnectionManager_SetCurrentClientCertDetails) Validate() error { +// HttpConnectionManager_PathNormalizationOptions with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HttpConnectionManager_PathNormalizationOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpConnectionManager_PathNormalizationOptions with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// HttpConnectionManager_PathNormalizationOptionsMultiError, or nil if none found. +func (m *HttpConnectionManager_PathNormalizationOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_PathNormalizationOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetForwardingTransformation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{ + field: "ForwardingTransformation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{ + field: "ForwardingTransformation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetForwardingTransformation()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ - field: "Subject", + return HttpConnectionManager_PathNormalizationOptionsValidationError{ + field: "ForwardingTransformation", reason: "embedded message failed validation", cause: err, } } } - // no validation rules for Cert + if all { + switch v := interface{}(m.GetHttpFilterTransformation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{ + field: "HttpFilterTransformation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{ + field: "HttpFilterTransformation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpFilterTransformation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_PathNormalizationOptionsValidationError{ + field: "HttpFilterTransformation", + reason: "embedded message failed validation", + cause: err, + } + } + } - // no validation rules for Chain + if len(errors) > 0 { + return HttpConnectionManager_PathNormalizationOptionsMultiError(errors) + } - // no validation rules for Dns + return nil +} - // no validation rules for Uri +// HttpConnectionManager_PathNormalizationOptionsMultiError is an error +// wrapping multiple validation errors returned by +// HttpConnectionManager_PathNormalizationOptions.ValidateAll() if the +// designated constraints aren't met. +type HttpConnectionManager_PathNormalizationOptionsMultiError []error - return nil +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_PathNormalizationOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") } -// HttpConnectionManager_SetCurrentClientCertDetailsValidationError is the +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_PathNormalizationOptionsMultiError) AllErrors() []error { return m } + +// HttpConnectionManager_PathNormalizationOptionsValidationError is the // validation error returned by -// HttpConnectionManager_SetCurrentClientCertDetails.Validate if the -// designated constraints aren't met. -type HttpConnectionManager_SetCurrentClientCertDetailsValidationError struct { +// HttpConnectionManager_PathNormalizationOptions.Validate if the designated +// constraints aren't met. +type HttpConnectionManager_PathNormalizationOptionsValidationError struct { field string reason string cause error @@ -1528,30 +3544,26 @@ type HttpConnectionManager_SetCurrentClientCertDetailsValidationError struct { } // Field function returns field value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Field() string { - return e.field -} +func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Reason() string { +func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Cause() error { - return e.cause -} +func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Key() bool { return e.key } +func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) ErrorName() string { - return "HttpConnectionManager_SetCurrentClientCertDetailsValidationError" +func (e HttpConnectionManager_PathNormalizationOptionsValidationError) ErrorName() string { + return "HttpConnectionManager_PathNormalizationOptionsValidationError" } // Error satisfies the builtin error interface -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Error() string { +func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1563,14 +3575,14 @@ func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Error( } return fmt.Sprintf( - "invalid %sHttpConnectionManager_SetCurrentClientCertDetails.%s: %s%s", + "invalid %sHttpConnectionManager_PathNormalizationOptions.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{} +var _ error = HttpConnectionManager_PathNormalizationOptionsValidationError{} var _ interface { Field() string @@ -1578,50 +3590,79 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{} +} = HttpConnectionManager_PathNormalizationOptionsValidationError{} -// Validate checks the field values on HttpConnectionManager_UpgradeConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *HttpConnectionManager_UpgradeConfig) Validate() error { +// Validate checks the field values on HttpConnectionManager_ProxyStatusConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *HttpConnectionManager_ProxyStatusConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpConnectionManager_ProxyStatusConfig with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// HttpConnectionManager_ProxyStatusConfigMultiError, or nil if none found. +func (m *HttpConnectionManager_ProxyStatusConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionManager_ProxyStatusConfig) validate(all bool) error { if m == nil { return nil } - // no validation rules for UpgradeType + var errors []error - for idx, item := range m.GetFilters() { - _, _ = idx, item + // no validation rules for RemoveDetails - 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, - } - } - } + // no validation rules for RemoveConnectionTerminationDetails + + // no validation rules for RemoveResponseFlags + + // no validation rules for SetRecommendedResponseCode + + switch m.ProxyName.(type) { + + case *HttpConnectionManager_ProxyStatusConfig_UseNodeId: + // no validation rules for UseNodeId + + case *HttpConnectionManager_ProxyStatusConfig_LiteralProxyName: + // no validation rules for LiteralProxyName } - 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, - } - } + if len(errors) > 0 { + return HttpConnectionManager_ProxyStatusConfigMultiError(errors) } return nil } -// HttpConnectionManager_UpgradeConfigValidationError is the validation error -// returned by HttpConnectionManager_UpgradeConfig.Validate if the designated +// HttpConnectionManager_ProxyStatusConfigMultiError is an error wrapping +// multiple validation errors returned by +// HttpConnectionManager_ProxyStatusConfig.ValidateAll() if the designated // constraints aren't met. -type HttpConnectionManager_UpgradeConfigValidationError struct { +type HttpConnectionManager_ProxyStatusConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionManager_ProxyStatusConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionManager_ProxyStatusConfigMultiError) AllErrors() []error { return m } + +// HttpConnectionManager_ProxyStatusConfigValidationError is the validation +// error returned by HttpConnectionManager_ProxyStatusConfig.Validate if the +// designated constraints aren't met. +type HttpConnectionManager_ProxyStatusConfigValidationError struct { field string reason string cause error @@ -1629,24 +3670,24 @@ type HttpConnectionManager_UpgradeConfigValidationError struct { } // Field function returns field value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Field() string { return e.field } +func (e HttpConnectionManager_ProxyStatusConfigValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Reason() string { return e.reason } +func (e HttpConnectionManager_ProxyStatusConfigValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Cause() error { return e.cause } +func (e HttpConnectionManager_ProxyStatusConfigValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Key() bool { return e.key } +func (e HttpConnectionManager_ProxyStatusConfigValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e HttpConnectionManager_UpgradeConfigValidationError) ErrorName() string { - return "HttpConnectionManager_UpgradeConfigValidationError" +func (e HttpConnectionManager_ProxyStatusConfigValidationError) ErrorName() string { + return "HttpConnectionManager_ProxyStatusConfigValidationError" } // Error satisfies the builtin error interface -func (e HttpConnectionManager_UpgradeConfigValidationError) Error() string { +func (e HttpConnectionManager_ProxyStatusConfigValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1658,14 +3699,14 @@ func (e HttpConnectionManager_UpgradeConfigValidationError) Error() string { } return fmt.Sprintf( - "invalid %sHttpConnectionManager_UpgradeConfig.%s: %s%s", + "invalid %sHttpConnectionManager_ProxyStatusConfig.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = HttpConnectionManager_UpgradeConfigValidationError{} +var _ error = HttpConnectionManager_ProxyStatusConfigValidationError{} var _ interface { Field() string @@ -1673,27 +3714,64 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = HttpConnectionManager_UpgradeConfigValidationError{} +} = HttpConnectionManager_ProxyStatusConfigValidationError{} // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRoutes_ScopeKeyBuilder with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilderMultiError, or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetFragments()) < 1 { - return ScopedRoutes_ScopeKeyBuilderValidationError{ + err := ScopedRoutes_ScopeKeyBuilderValidationError{ field: "Fragments", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetFragments() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilderValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilderValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutes_ScopeKeyBuilderValidationError{ field: fmt.Sprintf("Fragments[%v]", idx), @@ -1705,9 +3783,30 @@ func (m *ScopedRoutes_ScopeKeyBuilder) Validate() error { } + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilderMultiError(errors) + } + return nil } +// ScopedRoutes_ScopeKeyBuilderMultiError is an error wrapping multiple +// validation errors returned by ScopedRoutes_ScopeKeyBuilder.ValidateAll() if +// the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilderMultiError) AllErrors() []error { return m } + // ScopedRoutes_ScopeKeyBuilderValidationError is the validation error returned // by ScopedRoutes_ScopeKeyBuilder.Validate if the designated constraints // aren't met. @@ -1767,17 +3866,52 @@ var _ interface { // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError, or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Type.(type) { case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_: - if v, ok := interface{}(m.GetHeaderValueExtractor()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHeaderValueExtractor()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + field: "HeaderValueExtractor", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + field: "HeaderValueExtractor", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderValueExtractor()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ field: "HeaderValueExtractor", @@ -1788,16 +3922,42 @@ func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Validate() error { } default: - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ field: "Type", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError(errors) } return nil } +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError is an error wrapping +// multiple validation errors returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError) AllErrors() []error { return m } + // ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError is the // validation error returned by // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Validate if the designated @@ -1859,17 +4019,37 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Validate() error { + return m.validate(false) +} + +// ValidateAll 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, the result is a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError, +// or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for ElementSeparator @@ -1881,7 +4061,26 @@ func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Vali case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element: - if v, ok := interface{}(m.GetElement()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetElement()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + field: "Element", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + field: "Element", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetElement()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ field: "Element", @@ -1893,9 +4092,33 @@ func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Vali } + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError(errors) + } + return nil } +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError +// is an error wrapping multiple validation errors returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.ValidateAll() +// if the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError) AllErrors() []error { + return m +} + // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError // is the validation error returned by // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Validate @@ -1965,29 +4188,78 @@ var _ interface { // 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. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Validate() error { + return m.validate(false) +} + +// ValidateAll 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, the result is a list of violation errors wrapped in +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError, +// or nil if none found. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetSeparator()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ field: "Separator", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetKey()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ + err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError(errors) } return nil } +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError +// is an error wrapping multiple validation errors returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.ValidateAll() +// if the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError) AllErrors() []error { + return m +} + // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError // is the validation error returned by // ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Validate diff --git a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.pb.go b/pkg/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.pb.go deleted file mode 100644 index 73f6b1f9b0..0000000000 --- a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.pb.go +++ /dev/null @@ -1,3364 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto - -package envoy_extensions_filters_network_http_connection_manager_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/trace/v4alpha" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/tracing/v3" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - _ "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type 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. - HttpConnectionManager_AUTO HttpConnectionManager_CodecType = 0 - // The connection manager will assume that the client is speaking HTTP/1.1. - HttpConnectionManager_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). - HttpConnectionManager_HTTP2 HttpConnectionManager_CodecType = 2 - // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with - // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient - // to distinguish HTTP1 and HTTP2 traffic. - HttpConnectionManager_HTTP3 HttpConnectionManager_CodecType = 3 -) - -// Enum value maps for HttpConnectionManager_CodecType. -var ( - HttpConnectionManager_CodecType_name = map[int32]string{ - 0: "AUTO", - 1: "HTTP1", - 2: "HTTP2", - 3: "HTTP3", - } - HttpConnectionManager_CodecType_value = map[string]int32{ - "AUTO": 0, - "HTTP1": 1, - "HTTP2": 2, - "HTTP3": 3, - } -) - -func (x HttpConnectionManager_CodecType) Enum() *HttpConnectionManager_CodecType { - p := new(HttpConnectionManager_CodecType) - *p = x - return p -} - -func (x HttpConnectionManager_CodecType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpConnectionManager_CodecType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[0].Descriptor() -} - -func (HttpConnectionManager_CodecType) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[0] -} - -func (x HttpConnectionManager_CodecType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpConnectionManager_CodecType.Descriptor instead. -func (HttpConnectionManager_CodecType) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 0} -} - -type HttpConnectionManager_ServerHeaderTransformation int32 - -const ( - // Overwrite any Server header with the contents of server_name. - HttpConnectionManager_OVERWRITE HttpConnectionManager_ServerHeaderTransformation = 0 - // If no Server header is present, append Server server_name - // If a Server header is present, pass it through. - HttpConnectionManager_APPEND_IF_ABSENT HttpConnectionManager_ServerHeaderTransformation = 1 - // Pass through the value of the server header, and do not append a header - // if none is present. - HttpConnectionManager_PASS_THROUGH HttpConnectionManager_ServerHeaderTransformation = 2 -) - -// Enum value maps for HttpConnectionManager_ServerHeaderTransformation. -var ( - HttpConnectionManager_ServerHeaderTransformation_name = map[int32]string{ - 0: "OVERWRITE", - 1: "APPEND_IF_ABSENT", - 2: "PASS_THROUGH", - } - HttpConnectionManager_ServerHeaderTransformation_value = map[string]int32{ - "OVERWRITE": 0, - "APPEND_IF_ABSENT": 1, - "PASS_THROUGH": 2, - } -) - -func (x HttpConnectionManager_ServerHeaderTransformation) Enum() *HttpConnectionManager_ServerHeaderTransformation { - p := new(HttpConnectionManager_ServerHeaderTransformation) - *p = x - return p -} - -func (x HttpConnectionManager_ServerHeaderTransformation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpConnectionManager_ServerHeaderTransformation) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[1].Descriptor() -} - -func (HttpConnectionManager_ServerHeaderTransformation) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[1] -} - -func (x HttpConnectionManager_ServerHeaderTransformation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpConnectionManager_ServerHeaderTransformation.Descriptor instead. -func (HttpConnectionManager_ServerHeaderTransformation) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 1} -} - -// How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP -// header. -type HttpConnectionManager_ForwardClientCertDetails int32 - -const ( - // Do not send the XFCC header to the next hop. This is the default value. - HttpConnectionManager_SANITIZE HttpConnectionManager_ForwardClientCertDetails = 0 - // When the client connection is mTLS (Mutual TLS), forward the XFCC header - // in the request. - HttpConnectionManager_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. - HttpConnectionManager_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. - HttpConnectionManager_SANITIZE_SET HttpConnectionManager_ForwardClientCertDetails = 3 - // Always forward the XFCC header in the request, regardless of whether the - // client connection is mTLS. - HttpConnectionManager_ALWAYS_FORWARD_ONLY HttpConnectionManager_ForwardClientCertDetails = 4 -) - -// Enum value maps for HttpConnectionManager_ForwardClientCertDetails. -var ( - HttpConnectionManager_ForwardClientCertDetails_name = map[int32]string{ - 0: "SANITIZE", - 1: "FORWARD_ONLY", - 2: "APPEND_FORWARD", - 3: "SANITIZE_SET", - 4: "ALWAYS_FORWARD_ONLY", - } - HttpConnectionManager_ForwardClientCertDetails_value = map[string]int32{ - "SANITIZE": 0, - "FORWARD_ONLY": 1, - "APPEND_FORWARD": 2, - "SANITIZE_SET": 3, - "ALWAYS_FORWARD_ONLY": 4, - } -) - -func (x HttpConnectionManager_ForwardClientCertDetails) Enum() *HttpConnectionManager_ForwardClientCertDetails { - p := new(HttpConnectionManager_ForwardClientCertDetails) - *p = x - return p -} - -func (x HttpConnectionManager_ForwardClientCertDetails) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpConnectionManager_ForwardClientCertDetails) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[2].Descriptor() -} - -func (HttpConnectionManager_ForwardClientCertDetails) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[2] -} - -func (x HttpConnectionManager_ForwardClientCertDetails) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpConnectionManager_ForwardClientCertDetails.Descriptor instead. -func (HttpConnectionManager_ForwardClientCertDetails) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 2} -} - -// Determines the action for request that contain %2F, %2f, %5C or %5c sequences in the URI path. -// This operation occurs before URL normalization and the merge slashes transformations if they were enabled. -type HttpConnectionManager_PathWithEscapedSlashesAction int32 - -const ( - // Default behavior specific to implementation (i.e. Envoy) of this configuration option. - // Envoy, by default, takes the KEEP_UNCHANGED action. - // NOTE: the implementation may change the default behavior at-will. - HttpConnectionManager_IMPLEMENTATION_SPECIFIC_DEFAULT HttpConnectionManager_PathWithEscapedSlashesAction = 0 - // Keep escaped slashes. - HttpConnectionManager_KEEP_UNCHANGED HttpConnectionManager_PathWithEscapedSlashesAction = 1 - // Reject client request with the 400 status. gRPC requests will be rejected with the INTERNAL (13) error code. - // The "httpN.downstream_rq_failed_path_normalization" counter is incremented for each rejected request. - HttpConnectionManager_REJECT_REQUEST HttpConnectionManager_PathWithEscapedSlashesAction = 2 - // Unescape %2F and %5C sequences and redirect request to the new path if these sequences were present. - // Redirect occurs after path normalization and merge slashes transformations if they were configured. - // NOTE: gRPC requests will be rejected with the INTERNAL (13) error code. - // This option minimizes possibility of path confusion exploits by forcing request with unescaped slashes to - // traverse all parties: downstream client, intermediate proxies, Envoy and upstream server. - // The "httpN.downstream_rq_redirected_with_normalized_path" counter is incremented for each - // redirected request. - HttpConnectionManager_UNESCAPE_AND_REDIRECT HttpConnectionManager_PathWithEscapedSlashesAction = 3 - // Unescape %2F and %5C sequences. - // Note: this option should not be enabled if intermediaries perform path based access control as - // it may lead to path confusion vulnerabilities. - HttpConnectionManager_UNESCAPE_AND_FORWARD HttpConnectionManager_PathWithEscapedSlashesAction = 4 -) - -// Enum value maps for HttpConnectionManager_PathWithEscapedSlashesAction. -var ( - HttpConnectionManager_PathWithEscapedSlashesAction_name = map[int32]string{ - 0: "IMPLEMENTATION_SPECIFIC_DEFAULT", - 1: "KEEP_UNCHANGED", - 2: "REJECT_REQUEST", - 3: "UNESCAPE_AND_REDIRECT", - 4: "UNESCAPE_AND_FORWARD", - } - HttpConnectionManager_PathWithEscapedSlashesAction_value = map[string]int32{ - "IMPLEMENTATION_SPECIFIC_DEFAULT": 0, - "KEEP_UNCHANGED": 1, - "REJECT_REQUEST": 2, - "UNESCAPE_AND_REDIRECT": 3, - "UNESCAPE_AND_FORWARD": 4, - } -) - -func (x HttpConnectionManager_PathWithEscapedSlashesAction) Enum() *HttpConnectionManager_PathWithEscapedSlashesAction { - p := new(HttpConnectionManager_PathWithEscapedSlashesAction) - *p = x - return p -} - -func (x HttpConnectionManager_PathWithEscapedSlashesAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpConnectionManager_PathWithEscapedSlashesAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[3].Descriptor() -} - -func (HttpConnectionManager_PathWithEscapedSlashesAction) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[3] -} - -func (x HttpConnectionManager_PathWithEscapedSlashesAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpConnectionManager_PathWithEscapedSlashesAction.Descriptor instead. -func (HttpConnectionManager_PathWithEscapedSlashesAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 3} -} - -type HttpConnectionManager_Tracing_OperationName int32 - -const ( - // The HTTP listener is used for ingress/incoming requests. - HttpConnectionManager_Tracing_INGRESS HttpConnectionManager_Tracing_OperationName = 0 - // The HTTP listener is used for egress/outgoing requests. - HttpConnectionManager_Tracing_EGRESS HttpConnectionManager_Tracing_OperationName = 1 -) - -// Enum value maps for HttpConnectionManager_Tracing_OperationName. -var ( - HttpConnectionManager_Tracing_OperationName_name = map[int32]string{ - 0: "INGRESS", - 1: "EGRESS", - } - HttpConnectionManager_Tracing_OperationName_value = map[string]int32{ - "INGRESS": 0, - "EGRESS": 1, - } -) - -func (x HttpConnectionManager_Tracing_OperationName) Enum() *HttpConnectionManager_Tracing_OperationName { - p := new(HttpConnectionManager_Tracing_OperationName) - *p = x - return p -} - -func (x HttpConnectionManager_Tracing_OperationName) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpConnectionManager_Tracing_OperationName) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[4].Descriptor() -} - -func (HttpConnectionManager_Tracing_OperationName) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes[4] -} - -func (x HttpConnectionManager_Tracing_OperationName) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpConnectionManager_Tracing_OperationName.Descriptor instead. -func (HttpConnectionManager_Tracing_OperationName) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 0, 0} -} - -// [#next-free-field: 46] -type HttpConnectionManager struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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.extensions.filters.network.http_connection_manager.v4alpha.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"` - // Types that are assignable to RouteSpecifier: - // *HttpConnectionManager_Rds - // *HttpConnectionManager_RouteConfig - // *HttpConnectionManager_ScopedRoutes - 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. :ref:`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 *wrappers.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 settings for HTTP requests handled by the connection manager. These will be - // applicable to both HTTP1 and HTTP2 requests. - CommonHttpProtocolOptions *v4alpha.HttpProtocolOptions `protobuf:"bytes,35,opt,name=common_http_protocol_options,json=commonHttpProtocolOptions,proto3" json:"common_http_protocol_options,omitempty"` - // Additional HTTP/1 settings that are passed to the HTTP/1 codec. - HttpProtocolOptions *v4alpha.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 *v4alpha.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"` - // Defines the action to be applied to the Server header on the response path. - // By default, Envoy will overwrite the header with the value specified in - // server_name. - ServerHeaderTransformation HttpConnectionManager_ServerHeaderTransformation `protobuf:"varint,34,opt,name=server_header_transformation,json=serverHeaderTransformation,proto3,enum=envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager_ServerHeaderTransformation" json:"server_header_transformation,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 *wrappers.UInt32Value `protobuf:"bytes,29,opt,name=max_request_headers_kb,json=maxRequestHeadersKb,proto3" json:"max_request_headers_kb,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. - // - // This timeout also specifies the amount of time that Envoy will wait for the peer to open enough - // window to write any remaining stream data once the entirety of stream data (local end stream is - // true) has been buffered pending available window. In other words, this timeout defends against - // a peer that does not release enough window to completely write the stream, even though all - // data has been proxied within available flow control windows. If the timeout is hit in this - // case, the :ref:`tx_flush_timeout ` counter will be - // incremented. Note that :ref:`max_stream_duration - // ` does not apply to - // this corner case. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. - // - // 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 *duration.Duration `protobuf:"bytes,24,opt,name=stream_idle_timeout,json=streamIdleTimeout,proto3" json:"stream_idle_timeout,omitempty"` - // The amount of time that Envoy will wait for the entire request to be received. - // 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 *duration.Duration `protobuf:"bytes,28,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` - // The amount of time that Envoy will wait for the request headers to be received. The timer is - // activated when the first byte of the headers is received, and is disarmed when the last byte of - // the headers has been received. If not specified or set to 0, this timeout is disabled. - RequestHeadersTimeout *duration.Duration `protobuf:"bytes,41,opt,name=request_headers_timeout,json=requestHeadersTimeout,proto3" json:"request_headers_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 *duration.Duration `protobuf:"bytes,12,opt,name=drain_timeout,json=drainTimeout,proto3" 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 reasonable "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 *duration.Duration `protobuf:"bytes,26,opt,name=delayed_close_timeout,json=delayedCloseTimeout,proto3" json:"delayed_close_timeout,omitempty"` - // Configuration for :ref:`HTTP access logs ` - // emitted by the connection manager. - AccessLog []*v4alpha1.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 *wrappers.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 *wrappers.BoolValue `protobuf:"bytes,15,opt,name=generate_request_id,json=generateRequestId,proto3" json:"generate_request_id,omitempty"` - // Whether the connection manager will keep the :ref:`x-request-id - // ` header if passed for a request that is edge - // (Edge request is the request from external clients to front Envoy) and not reset it, which - // is the current Envoy behaviour. This defaults to false. - PreserveExternalRequestId bool `protobuf:"varint,32,opt,name=preserve_external_request_id,json=preserveExternalRequestId,proto3" json:"preserve_external_request_id,omitempty"` - // If set, Envoy will always set :ref:`x-request-id ` header in response. - // If this is false or not set, the request ID is returned in responses only if tracing is forced using - // :ref:`x-envoy-force-trace ` header. - AlwaysSetRequestIdInResponse bool `protobuf:"varint,37,opt,name=always_set_request_id_in_response,json=alwaysSetRequestIdInResponse,proto3" json:"always_set_request_id_in_response,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.extensions.filters.network.http_connection_manager.v4alpha.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 *wrappers.BoolValue `protobuf:"bytes,30,opt,name=normalize_path,json=normalizePath,proto3" json:"normalize_path,omitempty"` - // Determines if adjacent slashes in the path are merged into one before any processing of - // requests by HTTP filters or routing. This affects the upstream *:path* header as well. Without - // setting this option, incoming requests with path `//dir///file` will not match against route - // with `prefix` match set to `/dir`. Defaults to `false`. Note that slash merging is not part of - // `HTTP spec `_ and is provided for convenience. - MergeSlashes bool `protobuf:"varint,33,opt,name=merge_slashes,json=mergeSlashes,proto3" json:"merge_slashes,omitempty"` - // Action to take when request URL path contains escaped slash sequences (%2F, %2f, %5C and %5c). - // The default value can be overridden by the :ref:`http_connection_manager.path_with_escaped_slashes_action` - // runtime variable. - // The :ref:`http_connection_manager.path_with_escaped_slashes_action_sampling` runtime - // variable can be used to apply the action to a portion of all requests. - PathWithEscapedSlashesAction HttpConnectionManager_PathWithEscapedSlashesAction `protobuf:"varint,45,opt,name=path_with_escaped_slashes_action,json=pathWithEscapedSlashesAction,proto3,enum=envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager_PathWithEscapedSlashesAction" json:"path_with_escaped_slashes_action,omitempty"` - // The configuration of the request ID extension. This includes operations such as - // generation, validation, and associated tracing operations. - // - // If not set, Envoy uses the default UUID-based behavior: - // - // 1. Request ID is propagated using *x-request-id* header. - // - // 2. Request ID is a universally unique identifier (UUID). - // - // 3. Tracing decision (sampled, forced, etc) is set in 14th byte of the UUID. - RequestIdExtension *RequestIDExtension `protobuf:"bytes,36,opt,name=request_id_extension,json=requestIdExtension,proto3" json:"request_id_extension,omitempty"` - // The configuration to customize local reply returned by Envoy. It can customize status code, - // body text and response content type. If not specified, status code and text body are hard - // coded in Envoy, the response content type is plain text. - LocalReplyConfig *LocalReplyConfig `protobuf:"bytes,38,opt,name=local_reply_config,json=localReplyConfig,proto3" json:"local_reply_config,omitempty"` - // Types that are assignable to StripPortMode: - // *HttpConnectionManager_StripMatchingHostPort - // *HttpConnectionManager_StripAnyHostPort - StripPortMode isHttpConnectionManager_StripPortMode `protobuf_oneof:"strip_port_mode"` - // Governs Envoy's behavior when receiving invalid HTTP from downstream. - // If this option is false (default), Envoy will err on the conservative side handling HTTP - // errors, terminating both HTTP/1.1 and HTTP/2 connections when receiving an invalid request. - // If this option is set to true, Envoy will be more permissive, only resetting the invalid - // stream in the case of HTTP/2 and leaving the connection open where possible (if the entire - // request is read for HTTP/1.1) - // In general this should be true for deployments receiving trusted traffic (L2 Envoys, - // company-internal mesh) and false when receiving untrusted traffic (edge deployments). - // - // If different behaviors for invalid_http_message for HTTP/1 and HTTP/2 are - // desired, one should use the new HTTP/1 option :ref:`override_stream_error_on_invalid_http_message - // ` or the new HTTP/2 option - // :ref:`override_stream_error_on_invalid_http_message - // ` - // *not* the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging - // ` - StreamErrorOnInvalidHttpMessage *wrappers.BoolValue `protobuf:"bytes,40,opt,name=stream_error_on_invalid_http_message,json=streamErrorOnInvalidHttpMessage,proto3" json:"stream_error_on_invalid_http_message,omitempty"` -} - -func (x *HttpConnectionManager) Reset() { - *x = HttpConnectionManager{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpConnectionManager) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpConnectionManager) ProtoMessage() {} - -func (x *HttpConnectionManager) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpConnectionManager.ProtoReflect.Descriptor instead. -func (*HttpConnectionManager) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0} -} - -func (x *HttpConnectionManager) GetCodecType() HttpConnectionManager_CodecType { - if x != nil { - return x.CodecType - } - return HttpConnectionManager_AUTO -} - -func (x *HttpConnectionManager) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (m *HttpConnectionManager) GetRouteSpecifier() isHttpConnectionManager_RouteSpecifier { - if m != nil { - return m.RouteSpecifier - } - return nil -} - -func (x *HttpConnectionManager) GetRds() *Rds { - if x, ok := x.GetRouteSpecifier().(*HttpConnectionManager_Rds); ok { - return x.Rds - } - return nil -} - -func (x *HttpConnectionManager) GetRouteConfig() *v4alpha2.RouteConfiguration { - if x, ok := x.GetRouteSpecifier().(*HttpConnectionManager_RouteConfig); ok { - return x.RouteConfig - } - return nil -} - -func (x *HttpConnectionManager) GetScopedRoutes() *ScopedRoutes { - if x, ok := x.GetRouteSpecifier().(*HttpConnectionManager_ScopedRoutes); ok { - return x.ScopedRoutes - } - return nil -} - -func (x *HttpConnectionManager) GetHttpFilters() []*HttpFilter { - if x != nil { - return x.HttpFilters - } - return nil -} - -func (x *HttpConnectionManager) GetAddUserAgent() *wrappers.BoolValue { - if x != nil { - return x.AddUserAgent - } - return nil -} - -func (x *HttpConnectionManager) GetTracing() *HttpConnectionManager_Tracing { - if x != nil { - return x.Tracing - } - return nil -} - -func (x *HttpConnectionManager) GetCommonHttpProtocolOptions() *v4alpha.HttpProtocolOptions { - if x != nil { - return x.CommonHttpProtocolOptions - } - return nil -} - -func (x *HttpConnectionManager) GetHttpProtocolOptions() *v4alpha.Http1ProtocolOptions { - if x != nil { - return x.HttpProtocolOptions - } - return nil -} - -func (x *HttpConnectionManager) GetHttp2ProtocolOptions() *v4alpha.Http2ProtocolOptions { - if x != nil { - return x.Http2ProtocolOptions - } - return nil -} - -func (x *HttpConnectionManager) GetServerName() string { - if x != nil { - return x.ServerName - } - return "" -} - -func (x *HttpConnectionManager) GetServerHeaderTransformation() HttpConnectionManager_ServerHeaderTransformation { - if x != nil { - return x.ServerHeaderTransformation - } - return HttpConnectionManager_OVERWRITE -} - -func (x *HttpConnectionManager) GetMaxRequestHeadersKb() *wrappers.UInt32Value { - if x != nil { - return x.MaxRequestHeadersKb - } - return nil -} - -func (x *HttpConnectionManager) GetStreamIdleTimeout() *duration.Duration { - if x != nil { - return x.StreamIdleTimeout - } - return nil -} - -func (x *HttpConnectionManager) GetRequestTimeout() *duration.Duration { - if x != nil { - return x.RequestTimeout - } - return nil -} - -func (x *HttpConnectionManager) GetRequestHeadersTimeout() *duration.Duration { - if x != nil { - return x.RequestHeadersTimeout - } - return nil -} - -func (x *HttpConnectionManager) GetDrainTimeout() *duration.Duration { - if x != nil { - return x.DrainTimeout - } - return nil -} - -func (x *HttpConnectionManager) GetDelayedCloseTimeout() *duration.Duration { - if x != nil { - return x.DelayedCloseTimeout - } - return nil -} - -func (x *HttpConnectionManager) GetAccessLog() []*v4alpha1.AccessLog { - if x != nil { - return x.AccessLog - } - return nil -} - -func (x *HttpConnectionManager) GetUseRemoteAddress() *wrappers.BoolValue { - if x != nil { - return x.UseRemoteAddress - } - return nil -} - -func (x *HttpConnectionManager) GetXffNumTrustedHops() uint32 { - if x != nil { - return x.XffNumTrustedHops - } - return 0 -} - -func (x *HttpConnectionManager) GetInternalAddressConfig() *HttpConnectionManager_InternalAddressConfig { - if x != nil { - return x.InternalAddressConfig - } - return nil -} - -func (x *HttpConnectionManager) GetSkipXffAppend() bool { - if x != nil { - return x.SkipXffAppend - } - return false -} - -func (x *HttpConnectionManager) GetVia() string { - if x != nil { - return x.Via - } - return "" -} - -func (x *HttpConnectionManager) GetGenerateRequestId() *wrappers.BoolValue { - if x != nil { - return x.GenerateRequestId - } - return nil -} - -func (x *HttpConnectionManager) GetPreserveExternalRequestId() bool { - if x != nil { - return x.PreserveExternalRequestId - } - return false -} - -func (x *HttpConnectionManager) GetAlwaysSetRequestIdInResponse() bool { - if x != nil { - return x.AlwaysSetRequestIdInResponse - } - return false -} - -func (x *HttpConnectionManager) GetForwardClientCertDetails() HttpConnectionManager_ForwardClientCertDetails { - if x != nil { - return x.ForwardClientCertDetails - } - return HttpConnectionManager_SANITIZE -} - -func (x *HttpConnectionManager) GetSetCurrentClientCertDetails() *HttpConnectionManager_SetCurrentClientCertDetails { - if x != nil { - return x.SetCurrentClientCertDetails - } - return nil -} - -func (x *HttpConnectionManager) GetProxy_100Continue() bool { - if x != nil { - return x.Proxy_100Continue - } - return false -} - -func (x *HttpConnectionManager) GetRepresentIpv4RemoteAddressAsIpv4MappedIpv6() bool { - if x != nil { - return x.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 - } - return false -} - -func (x *HttpConnectionManager) GetUpgradeConfigs() []*HttpConnectionManager_UpgradeConfig { - if x != nil { - return x.UpgradeConfigs - } - return nil -} - -func (x *HttpConnectionManager) GetNormalizePath() *wrappers.BoolValue { - if x != nil { - return x.NormalizePath - } - return nil -} - -func (x *HttpConnectionManager) GetMergeSlashes() bool { - if x != nil { - return x.MergeSlashes - } - return false -} - -func (x *HttpConnectionManager) GetPathWithEscapedSlashesAction() HttpConnectionManager_PathWithEscapedSlashesAction { - if x != nil { - return x.PathWithEscapedSlashesAction - } - return HttpConnectionManager_IMPLEMENTATION_SPECIFIC_DEFAULT -} - -func (x *HttpConnectionManager) GetRequestIdExtension() *RequestIDExtension { - if x != nil { - return x.RequestIdExtension - } - return nil -} - -func (x *HttpConnectionManager) GetLocalReplyConfig() *LocalReplyConfig { - if x != nil { - return x.LocalReplyConfig - } - return nil -} - -func (m *HttpConnectionManager) GetStripPortMode() isHttpConnectionManager_StripPortMode { - if m != nil { - return m.StripPortMode - } - return nil -} - -func (x *HttpConnectionManager) GetStripMatchingHostPort() bool { - if x, ok := x.GetStripPortMode().(*HttpConnectionManager_StripMatchingHostPort); ok { - return x.StripMatchingHostPort - } - return false -} - -func (x *HttpConnectionManager) GetStripAnyHostPort() bool { - if x, ok := x.GetStripPortMode().(*HttpConnectionManager_StripAnyHostPort); ok { - return x.StripAnyHostPort - } - return false -} - -func (x *HttpConnectionManager) GetStreamErrorOnInvalidHttpMessage() *wrappers.BoolValue { - if x != nil { - return x.StreamErrorOnInvalidHttpMessage - } - return nil -} - -type isHttpConnectionManager_RouteSpecifier interface { - isHttpConnectionManager_RouteSpecifier() -} - -type HttpConnectionManager_Rds struct { - // The connection manager’s route table will be dynamically loaded via the RDS API. - Rds *Rds `protobuf:"bytes,3,opt,name=rds,proto3,oneof"` -} - -type HttpConnectionManager_RouteConfig struct { - // The route table for the connection manager is static and is specified in this property. - RouteConfig *v4alpha2.RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"` -} - -type HttpConnectionManager_ScopedRoutes struct { - // A route table will be dynamically assigned to each request based on request attributes - // (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are - // specified in this message. - 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() {} - -type isHttpConnectionManager_StripPortMode interface { - isHttpConnectionManager_StripPortMode() -} - -type HttpConnectionManager_StripMatchingHostPort struct { - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` - // local port and request method is not CONNECT. This affects the upstream host header as well. - // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. - StripMatchingHostPort bool `protobuf:"varint,39,opt,name=strip_matching_host_port,json=stripMatchingHostPort,proto3,oneof"` -} - -type HttpConnectionManager_StripAnyHostPort struct { - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if request method is not CONNECT. - // This affects the upstream host header as well. - // Without setting this option, incoming requests with host `example:443` will not match against - // route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. - StripAnyHostPort bool `protobuf:"varint,42,opt,name=strip_any_host_port,json=stripAnyHostPort,proto3,oneof"` -} - -func (*HttpConnectionManager_StripMatchingHostPort) isHttpConnectionManager_StripPortMode() {} - -func (*HttpConnectionManager_StripAnyHostPort) isHttpConnectionManager_StripPortMode() {} - -// The configuration to customize local reply returned by Envoy. -type LocalReplyConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration of list of mappers which allows to filter and change local response. - // The mappers will be checked by the specified order until one is matched. - Mappers []*ResponseMapper `protobuf:"bytes,1,rep,name=mappers,proto3" json:"mappers,omitempty"` - // The configuration to form response body from the :ref:`command operators ` - // and to specify response content type as one of: plain/text or application/json. - // - // Example one: "plain/text" ``body_format``. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // The following response body in "plain/text" format will be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - // Example two: "application/json" ``body_format``. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // path: "%REQ(:path)%" - // - // The following response body in "application/json" format would be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: json - // - // { - // "status": 503, - // "message": "upstream connection error", - // "path": "/foo" - // } - // - BodyFormat *v4alpha.SubstitutionFormatString `protobuf:"bytes,2,opt,name=body_format,json=bodyFormat,proto3" json:"body_format,omitempty"` -} - -func (x *LocalReplyConfig) Reset() { - *x = LocalReplyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LocalReplyConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalReplyConfig) ProtoMessage() {} - -func (x *LocalReplyConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalReplyConfig.ProtoReflect.Descriptor instead. -func (*LocalReplyConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{1} -} - -func (x *LocalReplyConfig) GetMappers() []*ResponseMapper { - if x != nil { - return x.Mappers - } - return nil -} - -func (x *LocalReplyConfig) GetBodyFormat() *v4alpha.SubstitutionFormatString { - if x != nil { - return x.BodyFormat - } - return nil -} - -// The configuration to filter and change local response. -// [#next-free-field: 6] -type ResponseMapper struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Filter to determine if this mapper should apply. - Filter *v4alpha1.AccessLogFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // The new response status code if specified. - StatusCode *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` - // The new local reply body text if specified. It will be used in the `%LOCAL_REPLY_BODY%` - // command operator in the `body_format`. - Body *v4alpha.DataSource `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` - // A per mapper `body_format` to override the :ref:`body_format `. - // It will be used when this mapper is matched. - BodyFormatOverride *v4alpha.SubstitutionFormatString `protobuf:"bytes,4,opt,name=body_format_override,json=bodyFormatOverride,proto3" json:"body_format_override,omitempty"` - // HTTP headers to add to a local reply. This allows the response mapper to append, to add - // or to override headers of any local reply before it is sent to a downstream client. - HeadersToAdd []*v4alpha.HeaderValueOption `protobuf:"bytes,5,rep,name=headers_to_add,json=headersToAdd,proto3" json:"headers_to_add,omitempty"` -} - -func (x *ResponseMapper) Reset() { - *x = ResponseMapper{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseMapper) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseMapper) ProtoMessage() {} - -func (x *ResponseMapper) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseMapper.ProtoReflect.Descriptor instead. -func (*ResponseMapper) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{2} -} - -func (x *ResponseMapper) GetFilter() *v4alpha1.AccessLogFilter { - if x != nil { - return x.Filter - } - return nil -} - -func (x *ResponseMapper) GetStatusCode() *wrappers.UInt32Value { - if x != nil { - return x.StatusCode - } - return nil -} - -func (x *ResponseMapper) GetBody() *v4alpha.DataSource { - if x != nil { - return x.Body - } - return nil -} - -func (x *ResponseMapper) GetBodyFormatOverride() *v4alpha.SubstitutionFormatString { - if x != nil { - return x.BodyFormatOverride - } - return nil -} - -func (x *ResponseMapper) GetHeadersToAdd() []*v4alpha.HeaderValueOption { - if x != nil { - return x.HeadersToAdd - } - return nil -} - -type Rds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration source specifier for RDS. - ConfigSource *v4alpha.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` - // 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"` -} - -func (x *Rds) Reset() { - *x = Rds{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Rds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Rds) ProtoMessage() {} - -func (x *Rds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Rds.ProtoReflect.Descriptor instead. -func (*Rds) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{3} -} - -func (x *Rds) GetConfigSource() *v4alpha.ConfigSource { - if x != nil { - return x.ConfigSource - } - return nil -} - -func (x *Rds) GetRouteConfigName() string { - if x != nil { - return x.RouteConfigName - } - return "" -} - -// This message is used to work around the limitations with 'oneof' and repeated fields. -type ScopedRouteConfigurationsList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ScopedRouteConfigurations []*v4alpha2.ScopedRouteConfiguration `protobuf:"bytes,1,rep,name=scoped_route_configurations,json=scopedRouteConfigurations,proto3" json:"scoped_route_configurations,omitempty"` -} - -func (x *ScopedRouteConfigurationsList) Reset() { - *x = ScopedRouteConfigurationsList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfigurationsList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfigurationsList) ProtoMessage() {} - -func (x *ScopedRouteConfigurationsList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfigurationsList.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfigurationsList) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{4} -} - -func (x *ScopedRouteConfigurationsList) GetScopedRouteConfigurations() []*v4alpha2.ScopedRouteConfiguration { - if x != nil { - return x.ScopedRouteConfigurations - } - return nil -} - -// [#next-free-field: 6] -type ScopedRoutes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name assigned to the scoped routing configuration. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The algorithm to use for constructing a scope key for each request. - ScopeKeyBuilder *ScopedRoutes_ScopeKeyBuilder `protobuf:"bytes,2,opt,name=scope_key_builder,json=scopeKeyBuilder,proto3" json:"scope_key_builder,omitempty"` - // Configuration source specifier for RDS. - // This config source is used to subscribe to RouteConfiguration resources specified in - // ScopedRouteConfiguration messages. - RdsConfigSource *v4alpha.ConfigSource `protobuf:"bytes,3,opt,name=rds_config_source,json=rdsConfigSource,proto3" json:"rds_config_source,omitempty"` - // Types that are assignable to ConfigSpecifier: - // *ScopedRoutes_ScopedRouteConfigurationsList - // *ScopedRoutes_ScopedRds - ConfigSpecifier isScopedRoutes_ConfigSpecifier `protobuf_oneof:"config_specifier"` -} - -func (x *ScopedRoutes) Reset() { - *x = ScopedRoutes{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutes) ProtoMessage() {} - -func (x *ScopedRoutes) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutes.ProtoReflect.Descriptor instead. -func (*ScopedRoutes) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{5} -} - -func (x *ScopedRoutes) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScopedRoutes) GetScopeKeyBuilder() *ScopedRoutes_ScopeKeyBuilder { - if x != nil { - return x.ScopeKeyBuilder - } - return nil -} - -func (x *ScopedRoutes) GetRdsConfigSource() *v4alpha.ConfigSource { - if x != nil { - return x.RdsConfigSource - } - return nil -} - -func (m *ScopedRoutes) GetConfigSpecifier() isScopedRoutes_ConfigSpecifier { - if m != nil { - return m.ConfigSpecifier - } - return nil -} - -func (x *ScopedRoutes) GetScopedRouteConfigurationsList() *ScopedRouteConfigurationsList { - if x, ok := x.GetConfigSpecifier().(*ScopedRoutes_ScopedRouteConfigurationsList); ok { - return x.ScopedRouteConfigurationsList - } - return nil -} - -func (x *ScopedRoutes) GetScopedRds() *ScopedRds { - if x, ok := x.GetConfigSpecifier().(*ScopedRoutes_ScopedRds); ok { - return x.ScopedRds - } - return nil -} - -type isScopedRoutes_ConfigSpecifier interface { - isScopedRoutes_ConfigSpecifier() -} - -type ScopedRoutes_ScopedRouteConfigurationsList struct { - // The set of routing scopes corresponding to the HCM. A scope is assigned to a request by - // matching a key constructed from the request's attributes according to the algorithm specified - // by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRouteConfigurationsList *ScopedRouteConfigurationsList `protobuf:"bytes,4,opt,name=scoped_route_configurations_list,json=scopedRouteConfigurationsList,proto3,oneof"` -} - -type ScopedRoutes_ScopedRds struct { - // The set of routing scopes associated with the HCM will be dynamically loaded via the SRDS - // API. A scope is assigned to a request by matching a key constructed from the request's - // attributes according to the algorithm specified by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRds *ScopedRds `protobuf:"bytes,5,opt,name=scoped_rds,json=scopedRds,proto3,oneof"` -} - -func (*ScopedRoutes_ScopedRouteConfigurationsList) isScopedRoutes_ConfigSpecifier() {} - -func (*ScopedRoutes_ScopedRds) isScopedRoutes_ConfigSpecifier() {} - -type ScopedRds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration source specifier for scoped RDS. - ScopedRdsConfigSource *v4alpha.ConfigSource `protobuf:"bytes,1,opt,name=scoped_rds_config_source,json=scopedRdsConfigSource,proto3" json:"scoped_rds_config_source,omitempty"` -} - -func (x *ScopedRds) Reset() { - *x = ScopedRds{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRds) ProtoMessage() {} - -func (x *ScopedRds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRds.ProtoReflect.Descriptor instead. -func (*ScopedRds) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{6} -} - -func (x *ScopedRds) GetScopedRdsConfigSource() *v4alpha.ConfigSource { - if x != nil { - return x.ScopedRdsConfigSource - } - return nil -} - -// [#next-free-field: 6] -type HttpFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter configuration. The name is used as a fallback to - // select an extension if the type of the configuration proto is not - // sufficient. It also serves as a resource name in ExtensionConfigDS. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to ConfigType: - // *HttpFilter_TypedConfig - // *HttpFilter_ConfigDiscovery - ConfigType isHttpFilter_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *HttpFilter) Reset() { - *x = HttpFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpFilter) ProtoMessage() {} - -func (x *HttpFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpFilter.ProtoReflect.Descriptor instead. -func (*HttpFilter) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{7} -} - -func (x *HttpFilter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *HttpFilter) GetConfigType() isHttpFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *HttpFilter) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*HttpFilter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -func (x *HttpFilter) GetConfigDiscovery() *v4alpha.ExtensionConfigSource { - if x, ok := x.GetConfigType().(*HttpFilter_ConfigDiscovery); ok { - return x.ConfigDiscovery - } - return nil -} - -type isHttpFilter_ConfigType interface { - isHttpFilter_ConfigType() -} - -type HttpFilter_TypedConfig struct { - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -type HttpFilter_ConfigDiscovery struct { - // Configuration source specifier for an extension configuration discovery service. - // In case of a failure and without the default configuration, the HTTP listener responds with code 500. - // Extension configs delivered through this mechanism are not expected to require warming (see https://github.com/envoyproxy/envoy/issues/12061). - ConfigDiscovery *v4alpha.ExtensionConfigSource `protobuf:"bytes,5,opt,name=config_discovery,json=configDiscovery,proto3,oneof"` -} - -func (*HttpFilter_TypedConfig) isHttpFilter_ConfigType() {} - -func (*HttpFilter_ConfigDiscovery) isHttpFilter_ConfigType() {} - -type RequestIDExtension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Request ID extension specific configuration. - TypedConfig *any.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *RequestIDExtension) Reset() { - *x = RequestIDExtension{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestIDExtension) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestIDExtension) ProtoMessage() {} - -func (x *RequestIDExtension) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequestIDExtension.ProtoReflect.Descriptor instead. -func (*RequestIDExtension) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{8} -} - -func (x *RequestIDExtension) GetTypedConfig() *any.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -// [#next-free-field: 10] -type HttpConnectionManager_Tracing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_sampling' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - ClientSampling *v3.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 *v3.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 *v3.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"` - // Maximum length of the request path to extract and include in the HttpUrl tag. Used to - // truncate lengthy request paths to meet the needs of a tracing backend. - // Default: 256 - MaxPathTagLength *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_path_tag_length,json=maxPathTagLength,proto3" json:"max_path_tag_length,omitempty"` - // A list of custom tags with unique tag name to create tags for the active span. - CustomTags []*v31.CustomTag `protobuf:"bytes,8,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` - // Configuration for an external tracing provider. - // If not specified, no tracing will be performed. - // - // .. attention:: - // Please be aware that *envoy.tracers.opencensus* provider can only be configured once - // in Envoy lifetime. - // Any attempts to reconfigure it or to use different configurations for different HCM filters - // will be rejected. - // Such a constraint is inherent to OpenCensus itself. It cannot be overcome without changes - // on OpenCensus side. - Provider *v4alpha3.Tracing_Http `protobuf:"bytes,9,opt,name=provider,proto3" json:"provider,omitempty"` -} - -func (x *HttpConnectionManager_Tracing) Reset() { - *x = HttpConnectionManager_Tracing{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpConnectionManager_Tracing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpConnectionManager_Tracing) ProtoMessage() {} - -func (x *HttpConnectionManager_Tracing) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpConnectionManager_Tracing.ProtoReflect.Descriptor instead. -func (*HttpConnectionManager_Tracing) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *HttpConnectionManager_Tracing) GetClientSampling() *v3.Percent { - if x != nil { - return x.ClientSampling - } - return nil -} - -func (x *HttpConnectionManager_Tracing) GetRandomSampling() *v3.Percent { - if x != nil { - return x.RandomSampling - } - return nil -} - -func (x *HttpConnectionManager_Tracing) GetOverallSampling() *v3.Percent { - if x != nil { - return x.OverallSampling - } - return nil -} - -func (x *HttpConnectionManager_Tracing) GetVerbose() bool { - if x != nil { - return x.Verbose - } - return false -} - -func (x *HttpConnectionManager_Tracing) GetMaxPathTagLength() *wrappers.UInt32Value { - if x != nil { - return x.MaxPathTagLength - } - return nil -} - -func (x *HttpConnectionManager_Tracing) GetCustomTags() []*v31.CustomTag { - if x != nil { - return x.CustomTags - } - return nil -} - -func (x *HttpConnectionManager_Tracing) GetProvider() *v4alpha3.Tracing_Http { - if x != nil { - return x.Provider - } - return nil -} - -type HttpConnectionManager_InternalAddressConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether unix socket addresses should be considered internal. - UnixSockets bool `protobuf:"varint,1,opt,name=unix_sockets,json=unixSockets,proto3" json:"unix_sockets,omitempty"` -} - -func (x *HttpConnectionManager_InternalAddressConfig) Reset() { - *x = HttpConnectionManager_InternalAddressConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpConnectionManager_InternalAddressConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpConnectionManager_InternalAddressConfig) ProtoMessage() {} - -func (x *HttpConnectionManager_InternalAddressConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpConnectionManager_InternalAddressConfig.ProtoReflect.Descriptor instead. -func (*HttpConnectionManager_InternalAddressConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *HttpConnectionManager_InternalAddressConfig) GetUnixSockets() bool { - if x != nil { - return x.UnixSockets - } - return false -} - -// [#next-free-field: 7] -type HttpConnectionManager_SetCurrentClientCertDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether to forward the subject of the client cert. Defaults to false. - Subject *wrappers.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 entire client cert chain (including the leaf cert) in URL encoded PEM - // format. This will appear in the XFCC header comma separated from other values with the value - // Chain="PEM". - // Defaults to false. - Chain bool `protobuf:"varint,6,opt,name=chain,proto3" json:"chain,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"` -} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) Reset() { - *x = HttpConnectionManager_SetCurrentClientCertDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpConnectionManager_SetCurrentClientCertDetails) ProtoMessage() {} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpConnectionManager_SetCurrentClientCertDetails.ProtoReflect.Descriptor instead. -func (*HttpConnectionManager_SetCurrentClientCertDetails) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) GetSubject() *wrappers.BoolValue { - if x != nil { - return x.Subject - } - return nil -} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) GetCert() bool { - if x != nil { - return x.Cert - } - return false -} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) GetChain() bool { - if x != nil { - return x.Chain - } - return false -} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) GetDns() bool { - if x != nil { - return x.Dns - } - return false -} - -func (x *HttpConnectionManager_SetCurrentClientCertDetails) GetUri() bool { - if x != nil { - return x.Uri - } - 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The case-insensitive name of this upgrade, e.g. "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] - // will be proxied upstream. - UpgradeType string `protobuf:"bytes,1,opt,name=upgrade_type,json=upgradeType,proto3" json:"upgrade_type,omitempty"` - // 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 *wrappers.BoolValue `protobuf:"bytes,3,opt,name=enabled,proto3" json:"enabled,omitempty"` -} - -func (x *HttpConnectionManager_UpgradeConfig) Reset() { - *x = HttpConnectionManager_UpgradeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpConnectionManager_UpgradeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpConnectionManager_UpgradeConfig) ProtoMessage() {} - -func (x *HttpConnectionManager_UpgradeConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpConnectionManager_UpgradeConfig.ProtoReflect.Descriptor instead. -func (*HttpConnectionManager_UpgradeConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *HttpConnectionManager_UpgradeConfig) GetUpgradeType() string { - if x != nil { - return x.UpgradeType - } - return "" -} - -func (x *HttpConnectionManager_UpgradeConfig) GetFilters() []*HttpFilter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *HttpConnectionManager_UpgradeConfig) GetEnabled() *wrappers.BoolValue { - if x != nil { - return x.Enabled - } - return nil -} - -// Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These -// keys are matched against a set of :ref:`Key` -// objects assembled from :ref:`ScopedRouteConfiguration` -// messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via -// :ref:`scoped_route_configurations_list`. -// -// Upon receiving a request's headers, the Router will build a key using the algorithm specified -// by this message. This key will be used to look up the routing table (i.e., the -// :ref:`RouteConfiguration`) to use for the request. -type ScopedRoutes_ScopeKeyBuilder struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The final(built) scope key consists of the ordered union of these fragments, which are compared in order with the - // fragments of a :ref:`ScopedRouteConfiguration`. - // A missing fragment during comparison will make the key invalid, i.e., the computed key doesn't match any key. - Fragments []*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` -} - -func (x *ScopedRoutes_ScopeKeyBuilder) Reset() { - *x = ScopedRoutes_ScopeKeyBuilder{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutes_ScopeKeyBuilder) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutes_ScopeKeyBuilder) ProtoMessage() {} - -func (x *ScopedRoutes_ScopeKeyBuilder) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutes_ScopeKeyBuilder.ProtoReflect.Descriptor instead. -func (*ScopedRoutes_ScopeKeyBuilder) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *ScopedRoutes_ScopeKeyBuilder) GetFragments() []*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder { - if x != nil { - return x.Fragments - } - return nil -} - -// Specifies the mechanism for constructing key fragments which are composed into scope keys. -type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ - Type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type `protobuf_oneof:"type"` -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Reset() { - *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ProtoMessage() {} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.ProtoReflect.Descriptor instead. -func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{5, 0, 0} -} - -func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) GetType() isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) GetHeaderValueExtractor() *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor { - if x, ok := x.GetType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_); ok { - return x.HeaderValueExtractor - } - return nil -} - -type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type interface { - isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type() -} - -type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ struct { - // Specifies how a header field's value should be extracted. - 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() { -} - -// Specifies how the value of a header should be extracted. -// The following example maps the structure of a header to the fields in this message. -// -// .. code:: -// -// <0> <1> <-- index -// X-Header: a=b;c=d -// | || | -// | || \----> -// | || -// | |\----> -// | | -// | \----> -// | -// \----> -// -// Each 'a=b' key-value pair constitutes an 'element' of the header field. -type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the header field to extract the value from. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The element separator (e.g., ';' separates 'a;b;c;d'). - // Default: empty string. This causes the entirety of the header field to be extracted. - // If this field is set to an empty string and 'index' is used in the oneof below, 'index' - // must be set to 0. - ElementSeparator string `protobuf:"bytes,2,opt,name=element_separator,json=elementSeparator,proto3" json:"element_separator,omitempty"` - // Types that are assignable to ExtractType: - // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index - // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element - ExtractType isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType `protobuf_oneof:"extract_type"` -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Reset() { - *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ProtoMessage() {} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.ProtoReflect.Descriptor instead. -func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{5, 0, 0, 0} -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetElementSeparator() string { - if x != nil { - return x.ElementSeparator - } - return "" -} - -func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetExtractType() isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType { - if m != nil { - return m.ExtractType - } - return nil -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetIndex() uint32 { - if x, ok := x.GetExtractType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index); ok { - return x.Index - } - return 0 -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetElement() *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement { - if x, ok := x.GetExtractType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element); ok { - return x.Element - } - return nil -} - -type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType interface { - isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType() -} - -type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index struct { - // Specifies the zero based index of the element to extract. - // Note Envoy concatenates multiple values of the same header key into a comma separated - // string, the splitting always happens after the concatenation. - Index uint32 `protobuf:"varint,3,opt,name=index,proto3,oneof"` -} - -type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element struct { - // Specifies the key value pair to extract the value from. - 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() { -} - -// Specifies a header field's key value pair to match on. -type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The separator between key and value (e.g., '=' separates 'k=v;...'). - // If an element is an empty string, the element is ignored. - // If an element contains no separator, the whole element is parsed as key and the - // fragment value is an empty string. - // If there are multiple values for a matched key, the first value is returned. - Separator string `protobuf:"bytes,1,opt,name=separator,proto3" json:"separator,omitempty"` - // The key to match on. - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Reset() { - *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoMessage() {} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.ProtoReflect.Descriptor instead. -func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP(), []int{5, 0, 0, 0, 0} -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) GetSeparator() string { - if x != nil { - return x.Separator - } - return "" -} - -func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -var File_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDesc = []byte{ - 0x0a, 0x5e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x2e, 0x0a, - 0x15, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x8a, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x63, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x61, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x59, 0x0a, - 0x03, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x64, - 0x73, 0x48, 0x00, 0x52, 0x03, 0x72, 0x64, 0x73, 0x12, 0x53, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, - 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x75, 0x0a, - 0x0d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x12, 0x6f, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, - 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x63, 0x0a, 0x15, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68, 0x74, - 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x6e, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x14, 0x68, 0x74, 0x74, - 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x2c, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, - 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0xbe, 0x01, 0x0a, 0x1c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x72, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x1a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x5c, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6b, 0x62, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x60, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4b, 0x62, 0x12, 0x52, - 0x0a, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, - 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x4b, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, - 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x62, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0xfa, 0x42, 0x05, - 0xaa, 0x01, 0x02, 0x32, 0x00, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x15, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x15, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, - 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x48, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, - 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x51, 0x0a, 0x12, - 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x10, 0x75, - 0x73, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x2f, 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, - 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x78, - 0x66, 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x70, 0x73, - 0x12, 0xa5, 0x01, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x19, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x6d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, - 0x5f, 0x78, 0x66, 0x66, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x58, 0x66, 0x66, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x61, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x76, - 0x69, 0x61, 0x12, 0x4a, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x3f, - 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x20, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x47, 0x0a, 0x21, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x61, 0x6c, 0x77, 0x61, - 0x79, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x49, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xb9, 0x01, 0x0a, 0x1b, 0x66, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x70, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x18, 0x66, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x12, 0xb9, 0x01, 0x0a, 0x1f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x73, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x52, 0x1b, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x31, 0x30, 0x30, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x12, 0x65, - 0x0a, 0x31, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, - 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x61, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x69, - 0x70, 0x76, 0x36, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x2a, 0x72, 0x65, 0x70, 0x72, 0x65, - 0x73, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x61, 0x70, 0x70, 0x65, - 0x64, 0x49, 0x70, 0x76, 0x36, 0x12, 0x8e, 0x01, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x65, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x6e, 0x6f, 0x72, 0x6d, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x72, - 0x67, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0xbc, - 0x01, 0x0a, 0x20, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, 0x73, 0x63, - 0x61, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x74, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, - 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x1c, 0x70, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, - 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x86, 0x01, - 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x26, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x18, 0x73, 0x74, 0x72, - 0x69, 0x70, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x6f, 0x73, 0x74, - 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x15, 0x73, - 0x74, 0x72, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, - 0x50, 0x6f, 0x72, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x61, 0x6e, - 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x2a, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x01, 0x52, 0x10, 0x73, 0x74, 0x72, 0x69, 0x70, 0x41, 0x6e, 0x79, 0x48, 0x6f, 0x73, - 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x69, 0x0a, 0x24, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x28, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x1f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x1a, 0x80, 0x05, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, - 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, - 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, - 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, - 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, - 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x6d, - 0x61, 0x78, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x74, 0x68, 0x54, - 0x61, 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x12, 0x44, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x22, 0x28, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x3a, 0x60, 0x9a, 0xc5, 0x88, - 0x1e, 0x5b, 0x0a, 0x59, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x4a, 0x04, 0x08, - 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x1a, 0xaa, 0x01, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, - 0x0c, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x3a, 0x6e, 0x9a, 0xc5, 0x88, 0x1e, 0x69, 0x0a, 0x67, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0x9d, 0x02, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, - 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x03, 0x75, 0x72, 0x69, 0x3a, 0x74, 0x9a, 0xc5, 0x88, 0x1e, 0x6f, 0x0a, 0x6d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, - 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, - 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, - 0x1a, 0xb8, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x66, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x3a, 0x66, 0x9a, 0xc5, 0x88, 0x1e, 0x61, 0x0a, 0x5f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x36, 0x0a, 0x09, 0x43, - 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, - 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, - 0x33, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, - 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, - 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, 0x10, 0x02, 0x22, 0x79, 0x0a, 0x18, 0x46, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, - 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x46, - 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x41, 0x4e, 0x49, - 0x54, 0x49, 0x5a, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, - 0x57, 0x41, 0x59, 0x53, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, - 0x59, 0x10, 0x04, 0x22, 0xa0, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, - 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, - 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x43, 0x5f, - 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x45, - 0x50, 0x5f, 0x55, 0x4e, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, - 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, - 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, 0x4e, - 0x44, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, - 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, - 0x57, 0x41, 0x52, 0x44, 0x10, 0x04, 0x3a, 0x58, 0x9a, 0xc5, 0x88, 0x1e, 0x53, 0x0a, 0x51, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x69, - 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x4a, 0x04, 0x08, 0x1b, 0x10, - 0x1c, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x52, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xa9, 0x02, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6a, 0x0a, 0x07, 0x6d, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x07, 0x6d, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x0b, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3a, 0x53, 0x9a, 0xc5, - 0x88, 0x1e, 0x4e, 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x22, 0x83, 0x04, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, - 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x65, - 0x0a, 0x14, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x12, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x5d, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, - 0x6f, 0x41, 0x64, 0x64, 0x3a, 0x51, 0x9a, 0xc5, 0x88, 0x1e, 0x4c, 0x0a, 0x4a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x22, 0xd1, 0x01, 0x0a, 0x03, 0x52, 0x64, 0x73, 0x12, - 0x56, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, - 0x61, 0x6d, 0x65, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x64, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x1d, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x7e, 0x0a, - 0x1b, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x19, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x60, 0x9a, - 0xc5, 0x88, 0x1e, 0x5b, 0x0a, 0x59, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, - 0xa7, 0x0f, 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x94, 0x01, - 0x0a, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, - 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x11, 0x72, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0f, 0x72, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x20, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x1d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x6c, 0x0a, 0x0a, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, - 0x73, 0x48, 0x00, 0x52, 0x09, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x1a, 0xfe, - 0x09, 0x0a, 0x0f, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x65, 0x72, 0x12, 0x96, 0x01, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xf0, 0x07, 0x0a, 0x0f, - 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, - 0xbc, 0x01, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x83, 0x01, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x14, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0x9f, - 0x05, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0xaa, 0x01, 0x0a, 0x07, 0x65, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x8d, 0x01, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x65, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0xe0, 0x01, 0x0a, 0x09, 0x4b, 0x76, 0x45, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x90, 0x01, 0x9a, 0xc5, 0x88, 0x1e, 0x8a, 0x01, 0x0a, - 0x87, 0x01, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, - 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x84, 0x01, 0x9a, 0xc5, 0x88, 0x1e, - 0x7f, 0x0a, 0x7d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x3a, 0x6f, 0x9a, 0xc5, 0x88, 0x1e, 0x6a, 0x0a, 0x68, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x42, 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x5f, - 0x9a, 0xc5, 0x88, 0x1e, 0x5a, 0x0a, 0x58, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3a, - 0x4f, 0x9a, 0xc5, 0x88, 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x42, 0x17, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc5, 0x01, 0x0a, 0x09, 0x53, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x12, 0x6a, 0x0a, 0x18, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x64, 0x5f, 0x72, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x15, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x3a, 0x4c, 0x9a, 0xc5, 0x88, 0x1e, 0x47, 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, - 0x73, 0x22, 0xb5, 0x02, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, - 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x02, 0x10, - 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa4, 0x01, 0x0a, 0x12, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x55, 0x9a, 0xc5, 0x88, 0x1e, 0x50, - 0x0a, 0x4e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x42, 0x76, 0x0a, 0x4e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x1a, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescData = file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDesc -) - -func file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDescData -} - -var file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_goTypes = []interface{}{ - (HttpConnectionManager_CodecType)(0), // 0: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.CodecType - (HttpConnectionManager_ServerHeaderTransformation)(0), // 1: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.ServerHeaderTransformation - (HttpConnectionManager_ForwardClientCertDetails)(0), // 2: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.ForwardClientCertDetails - (HttpConnectionManager_PathWithEscapedSlashesAction)(0), // 3: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.PathWithEscapedSlashesAction - (HttpConnectionManager_Tracing_OperationName)(0), // 4: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing.OperationName - (*HttpConnectionManager)(nil), // 5: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager - (*LocalReplyConfig)(nil), // 6: envoy.extensions.filters.network.http_connection_manager.v4alpha.LocalReplyConfig - (*ResponseMapper)(nil), // 7: envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper - (*Rds)(nil), // 8: envoy.extensions.filters.network.http_connection_manager.v4alpha.Rds - (*ScopedRouteConfigurationsList)(nil), // 9: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRouteConfigurationsList - (*ScopedRoutes)(nil), // 10: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes - (*ScopedRds)(nil), // 11: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRds - (*HttpFilter)(nil), // 12: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpFilter - (*RequestIDExtension)(nil), // 13: envoy.extensions.filters.network.http_connection_manager.v4alpha.RequestIDExtension - (*HttpConnectionManager_Tracing)(nil), // 14: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing - (*HttpConnectionManager_InternalAddressConfig)(nil), // 15: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.InternalAddressConfig - (*HttpConnectionManager_SetCurrentClientCertDetails)(nil), // 16: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.SetCurrentClientCertDetails - (*HttpConnectionManager_UpgradeConfig)(nil), // 17: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.UpgradeConfig - (*ScopedRoutes_ScopeKeyBuilder)(nil), // 18: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), // 19: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), // 20: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 21: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement - (*v4alpha2.RouteConfiguration)(nil), // 22: envoy.config.route.v4alpha.RouteConfiguration - (*wrappers.BoolValue)(nil), // 23: google.protobuf.BoolValue - (*v4alpha.HttpProtocolOptions)(nil), // 24: envoy.config.core.v4alpha.HttpProtocolOptions - (*v4alpha.Http1ProtocolOptions)(nil), // 25: envoy.config.core.v4alpha.Http1ProtocolOptions - (*v4alpha.Http2ProtocolOptions)(nil), // 26: envoy.config.core.v4alpha.Http2ProtocolOptions - (*wrappers.UInt32Value)(nil), // 27: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 28: google.protobuf.Duration - (*v4alpha1.AccessLog)(nil), // 29: envoy.config.accesslog.v4alpha.AccessLog - (*v4alpha.SubstitutionFormatString)(nil), // 30: envoy.config.core.v4alpha.SubstitutionFormatString - (*v4alpha1.AccessLogFilter)(nil), // 31: envoy.config.accesslog.v4alpha.AccessLogFilter - (*v4alpha.DataSource)(nil), // 32: envoy.config.core.v4alpha.DataSource - (*v4alpha.HeaderValueOption)(nil), // 33: envoy.config.core.v4alpha.HeaderValueOption - (*v4alpha.ConfigSource)(nil), // 34: envoy.config.core.v4alpha.ConfigSource - (*v4alpha2.ScopedRouteConfiguration)(nil), // 35: envoy.config.route.v4alpha.ScopedRouteConfiguration - (*any.Any)(nil), // 36: google.protobuf.Any - (*v4alpha.ExtensionConfigSource)(nil), // 37: envoy.config.core.v4alpha.ExtensionConfigSource - (*v3.Percent)(nil), // 38: envoy.type.v3.Percent - (*v31.CustomTag)(nil), // 39: envoy.type.tracing.v3.CustomTag - (*v4alpha3.Tracing_Http)(nil), // 40: envoy.config.trace.v4alpha.Tracing.Http -} -var file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_depIdxs = []int32{ - 0, // 0: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.codec_type:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.CodecType - 8, // 1: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.Rds - 22, // 2: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.route_config:type_name -> envoy.config.route.v4alpha.RouteConfiguration - 10, // 3: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.scoped_routes:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes - 12, // 4: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.http_filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpFilter - 23, // 5: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue - 14, // 6: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.tracing:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing - 24, // 7: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.config.core.v4alpha.HttpProtocolOptions - 25, // 8: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.http_protocol_options:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions - 26, // 9: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.http2_protocol_options:type_name -> envoy.config.core.v4alpha.Http2ProtocolOptions - 1, // 10: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.server_header_transformation:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.ServerHeaderTransformation - 27, // 11: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value - 28, // 12: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration - 28, // 13: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration - 28, // 14: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.request_headers_timeout:type_name -> google.protobuf.Duration - 28, // 15: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration - 28, // 16: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration - 29, // 17: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.access_log:type_name -> envoy.config.accesslog.v4alpha.AccessLog - 23, // 18: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue - 15, // 19: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.internal_address_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.InternalAddressConfig - 23, // 20: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue - 2, // 21: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.forward_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.ForwardClientCertDetails - 16, // 22: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.set_current_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.SetCurrentClientCertDetails - 17, // 23: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.upgrade_configs:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.UpgradeConfig - 23, // 24: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue - 3, // 25: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.path_with_escaped_slashes_action:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.PathWithEscapedSlashesAction - 13, // 26: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.request_id_extension:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.RequestIDExtension - 6, // 27: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.local_reply_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.LocalReplyConfig - 23, // 28: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 7, // 29: envoy.extensions.filters.network.http_connection_manager.v4alpha.LocalReplyConfig.mappers:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper - 30, // 30: envoy.extensions.filters.network.http_connection_manager.v4alpha.LocalReplyConfig.body_format:type_name -> envoy.config.core.v4alpha.SubstitutionFormatString - 31, // 31: envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper.filter:type_name -> envoy.config.accesslog.v4alpha.AccessLogFilter - 27, // 32: envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper.status_code:type_name -> google.protobuf.UInt32Value - 32, // 33: envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper.body:type_name -> envoy.config.core.v4alpha.DataSource - 30, // 34: envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper.body_format_override:type_name -> envoy.config.core.v4alpha.SubstitutionFormatString - 33, // 35: envoy.extensions.filters.network.http_connection_manager.v4alpha.ResponseMapper.headers_to_add:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 34, // 36: envoy.extensions.filters.network.http_connection_manager.v4alpha.Rds.config_source:type_name -> envoy.config.core.v4alpha.ConfigSource - 35, // 37: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.config.route.v4alpha.ScopedRouteConfiguration - 18, // 38: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.scope_key_builder:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder - 34, // 39: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.rds_config_source:type_name -> envoy.config.core.v4alpha.ConfigSource - 9, // 40: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.scoped_route_configurations_list:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRouteConfigurationsList - 11, // 41: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.scoped_rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRds - 34, // 42: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRds.scoped_rds_config_source:type_name -> envoy.config.core.v4alpha.ConfigSource - 36, // 43: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpFilter.typed_config:type_name -> google.protobuf.Any - 37, // 44: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpFilter.config_discovery:type_name -> envoy.config.core.v4alpha.ExtensionConfigSource - 36, // 45: envoy.extensions.filters.network.http_connection_manager.v4alpha.RequestIDExtension.typed_config:type_name -> google.protobuf.Any - 38, // 46: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.v3.Percent - 38, // 47: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.v3.Percent - 38, // 48: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.v3.Percent - 27, // 49: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value - 39, // 50: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag - 40, // 51: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v4alpha.Tracing.Http - 23, // 52: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue - 12, // 53: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.UpgradeConfig.filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpFilter - 23, // 54: envoy.extensions.filters.network.http_connection_manager.v4alpha.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 19, // 55: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.fragments:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder - 20, // 56: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.header_value_extractor:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor - 21, // 57: envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement - 58, // [58:58] is the sub-list for method output_type - 58, // [58:58] is the sub-list for method input_type - 58, // [58:58] is the sub-list for extension type_name - 58, // [58:58] is the sub-list for extension extendee - 0, // [0:58] is the sub-list for field type_name -} - -func init() { - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_init() -} -func file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_init() { - if File_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalReplyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseMapper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Rds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfigurationsList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestIDExtension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_Tracing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_InternalAddressConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_SetCurrentClientCertDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpConnectionManager_UpgradeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes_ScopeKeyBuilder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*HttpConnectionManager_Rds)(nil), - (*HttpConnectionManager_RouteConfig)(nil), - (*HttpConnectionManager_ScopedRoutes)(nil), - (*HttpConnectionManager_StripMatchingHostPort)(nil), - (*HttpConnectionManager_StripAnyHostPort)(nil), - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*ScopedRoutes_ScopedRouteConfigurationsList)(nil), - (*ScopedRoutes_ScopedRds)(nil), - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*HttpFilter_TypedConfig)(nil), - (*HttpFilter_ConfigDiscovery)(nil), - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_)(nil), - } - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes[15].OneofWrappers = []interface{}{ - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index)(nil), - (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDesc, - NumEnums: 5, - NumMessages: 17, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto = out.File - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_rawDesc = nil - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_goTypes = nil - file_envoy_extensions_filters_network_http_connection_manager_v4alpha_http_connection_manager_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.pb.validate.go b/pkg/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.pb.validate.go deleted file mode 100644 index cdbda7e253..0000000000 --- a/pkg/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.pb.validate.go +++ /dev/null @@ -1,2027 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto - -package envoy_extensions_filters_network_http_connection_manager_v4alpha - -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{} -) - -// 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. -func (m *HttpConnectionManager) Validate() error { - if m == nil { - return nil - } - - if _, ok := HttpConnectionManager_CodecType_name[int32(m.GetCodecType())]; !ok { - return HttpConnectionManagerValidationError{ - field: "CodecType", - reason: "value must be one of the defined enum values", - } - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return HttpConnectionManagerValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - for idx, item := range m.GetHttpFilters() { - _, _ = idx, item - - 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, - } - } - } - - } - - 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, - } - } - } - - 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, - } - } - } - - 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, - } - } - } - - 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{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if !_HttpConnectionManager_ServerName_Pattern.MatchString(m.GetServerName()) { - return HttpConnectionManagerValidationError{ - field: "ServerName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - 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 val := wrapper.GetValue(); val <= 0 || val > 96 { - return HttpConnectionManagerValidationError{ - field: "MaxRequestHeadersKb", - reason: "value must be inside range (0, 96]", - } - } - - } - - 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, - } - } - } - - 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, - } - } - } - - if d := m.GetRequestHeadersTimeout(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return HttpConnectionManagerValidationError{ - field: "RequestHeadersTimeout", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur < gte { - return HttpConnectionManagerValidationError{ - field: "RequestHeadersTimeout", - reason: "value must be greater than or equal to 0s", - } - } - - } - - 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, - } - } - } - - 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, - } - } - } - - for idx, item := range m.GetAccessLog() { - _, _ = idx, item - - 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, - } - } - } - - } - - 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 - - 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, - } - } - } - - // no validation rules for SkipXffAppend - - // no validation rules for Via - - 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 - - // no validation rules for AlwaysSetRequestIdInResponse - - if _, ok := HttpConnectionManager_ForwardClientCertDetails_name[int32(m.GetForwardClientCertDetails())]; !ok { - return HttpConnectionManagerValidationError{ - field: "ForwardClientCertDetails", - reason: "value must be one of the defined enum values", - } - } - - 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, - } - } - } - - // no validation rules for Proxy_100Continue - - // no validation rules for RepresentIpv4RemoteAddressAsIpv4MappedIpv6 - - for idx, item := range m.GetUpgradeConfigs() { - _, _ = idx, item - - 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, - } - } - } - - } - - 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, - } - } - } - - // no validation rules for MergeSlashes - - // no validation rules for PathWithEscapedSlashesAction - - 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, - } - } - } - - if v, ok := interface{}(m.GetLocalReplyConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "LocalReplyConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "StreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.RouteSpecifier.(type) { - - case *HttpConnectionManager_Rds: - - 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: - - 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, - } - } - } - - case *HttpConnectionManager_ScopedRoutes: - - 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, - } - } - } - - default: - return HttpConnectionManagerValidationError{ - field: "RouteSpecifier", - reason: "value is required", - } - - } - - switch m.StripPortMode.(type) { - - case *HttpConnectionManager_StripMatchingHostPort: - // no validation rules for StripMatchingHostPort - - case *HttpConnectionManager_StripAnyHostPort: - // no validation rules for StripAnyHostPort - - } - - return nil -} - -// HttpConnectionManagerValidationError is the validation error returned by -// HttpConnectionManager.Validate if the designated constraints aren't met. -type HttpConnectionManagerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpConnectionManagerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpConnectionManagerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpConnectionManagerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpConnectionManagerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpConnectionManagerValidationError) ErrorName() string { - return "HttpConnectionManagerValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpConnectionManagerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpConnectionManager.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpConnectionManagerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpConnectionManagerValidationError{} - -var _HttpConnectionManager_ServerName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on LocalReplyConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *LocalReplyConfig) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetMappers() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalReplyConfigValidationError{ - field: fmt.Sprintf("Mappers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetBodyFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalReplyConfigValidationError{ - field: "BodyFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// LocalReplyConfigValidationError is the validation error returned by -// LocalReplyConfig.Validate if the designated constraints aren't met. -type LocalReplyConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalReplyConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalReplyConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalReplyConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalReplyConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalReplyConfigValidationError) ErrorName() string { return "LocalReplyConfigValidationError" } - -// Error satisfies the builtin error interface -func (e LocalReplyConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocalReplyConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalReplyConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalReplyConfigValidationError{} - -// Validate checks the field values on ResponseMapper with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ResponseMapper) Validate() error { - if m == nil { - return nil - } - - if m.GetFilter() == nil { - return ResponseMapperValidationError{ - field: "Filter", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapperValidationError{ - field: "Filter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetStatusCode(); wrapper != nil { - - if val := wrapper.GetValue(); val < 200 || val >= 600 { - return ResponseMapperValidationError{ - field: "StatusCode", - reason: "value must be inside range [200, 600)", - } - } - - } - - if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapperValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetBodyFormatOverride()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapperValidationError{ - field: "BodyFormatOverride", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetHeadersToAdd()) > 1000 { - return ResponseMapperValidationError{ - field: "HeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetHeadersToAdd() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResponseMapperValidationError{ - field: fmt.Sprintf("HeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ResponseMapperValidationError is the validation error returned by -// ResponseMapper.Validate if the designated constraints aren't met. -type ResponseMapperValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResponseMapperValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResponseMapperValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResponseMapperValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResponseMapperValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResponseMapperValidationError) ErrorName() string { return "ResponseMapperValidationError" } - -// Error satisfies the builtin error interface -func (e ResponseMapperValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResponseMapper.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResponseMapperValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResponseMapperValidationError{} - -// Validate checks the field values on Rds with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *Rds) Validate() error { - if m == nil { - return nil - } - - if m.GetConfigSource() == nil { - return RdsValidationError{ - field: "ConfigSource", - reason: "value is required", - } - } - - 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, - } - } - } - - // no validation rules for RouteConfigName - - return nil -} - -// RdsValidationError is the validation error returned by Rds.Validate if the -// designated constraints aren't met. -type RdsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RdsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RdsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RdsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RdsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RdsValidationError) ErrorName() string { return "RdsValidationError" } - -// Error satisfies the builtin error interface -func (e RdsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRds.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RdsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return ScopedRoutesValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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 { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return HttpFilterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - case *HttpFilter_TypedConfig: - - 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, - } - } - } - - case *HttpFilter_ConfigDiscovery: - - if v, ok := interface{}(m.GetConfigDiscovery()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpFilterValidationError{ - field: "ConfigDiscovery", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// HttpFilterValidationError is the validation error returned by -// HttpFilter.Validate if the designated constraints aren't met. -type HttpFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpFilterValidationError) ErrorName() string { return "HttpFilterValidationError" } - -// Error satisfies the builtin error interface -func (e HttpFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - 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. -func (m *HttpConnectionManager_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 HttpConnectionManager_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 HttpConnectionManager_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 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 -} - -// HttpConnectionManager_TracingValidationError is the validation error -// returned by HttpConnectionManager_Tracing.Validate if the designated -// constraints aren't met. -type HttpConnectionManager_TracingValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpConnectionManager_TracingValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpConnectionManager_TracingValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpConnectionManager_TracingValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpConnectionManager_TracingValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpConnectionManager_TracingValidationError) ErrorName() string { - return "HttpConnectionManager_TracingValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpConnectionManager_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 %sHttpConnectionManager_Tracing.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpConnectionManager_TracingValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpConnectionManager_TracingValidationError{} - -// Validate checks the field values on -// HttpConnectionManager_InternalAddressConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HttpConnectionManager_InternalAddressConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for UnixSockets - - return nil -} - -// HttpConnectionManager_InternalAddressConfigValidationError is the validation -// error returned by HttpConnectionManager_InternalAddressConfig.Validate if -// the designated constraints aren't met. -type HttpConnectionManager_InternalAddressConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpConnectionManager_InternalAddressConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpConnectionManager_InternalAddressConfigValidationError) ErrorName() string { - return "HttpConnectionManager_InternalAddressConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpConnectionManager_InternalAddressConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpConnectionManager_InternalAddressConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpConnectionManager_InternalAddressConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpConnectionManager_InternalAddressConfigValidationError{} - -// Validate checks the field values on -// HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HttpConnectionManager_SetCurrentClientCertDetails) Validate() error { - if m == nil { - return nil - } - - 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 - - return nil -} - -// HttpConnectionManager_SetCurrentClientCertDetailsValidationError is the -// validation error returned by -// HttpConnectionManager_SetCurrentClientCertDetails.Validate if the -// designated constraints aren't met. -type HttpConnectionManager_SetCurrentClientCertDetailsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) ErrorName() string { - return "HttpConnectionManager_SetCurrentClientCertDetailsValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpConnectionManager_SetCurrentClientCertDetails.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{} - -// Validate checks the field values on HttpConnectionManager_UpgradeConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *HttpConnectionManager_UpgradeConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for UpgradeType - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - 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, - } - } - } - - } - - 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, - } - } - } - - return nil -} - -// HttpConnectionManager_UpgradeConfigValidationError is the validation error -// returned by HttpConnectionManager_UpgradeConfig.Validate if the designated -// constraints aren't met. -type HttpConnectionManager_UpgradeConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpConnectionManager_UpgradeConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpConnectionManager_UpgradeConfigValidationError) ErrorName() string { - return "HttpConnectionManager_UpgradeConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpConnectionManager_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 %sHttpConnectionManager_UpgradeConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpConnectionManager_UpgradeConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - 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 utf8.RuneCountInString(m.GetName()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - // 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 utf8.RuneCountInString(m.GetSeparator()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ - field: "Separator", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetKey()) < 1 { - return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - } - - 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/pkg/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.pb.go b/pkg/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.pb.go deleted file mode 100644 index f30c901f8f..0000000000 --- a/pkg/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.pb.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto - -package envoy_extensions_filters_network_kafka_broker_v3 - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type KafkaBroker struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The prefix to use when emitting :ref:`statistics `. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` -} - -func (x *KafkaBroker) Reset() { - *x = KafkaBroker{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KafkaBroker) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KafkaBroker) ProtoMessage() {} - -func (x *KafkaBroker) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KafkaBroker.ProtoReflect.Descriptor instead. -func (*KafkaBroker) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescGZIP(), []int{0} -} - -func (x *KafkaBroker) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -var File_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDesc = []byte{ - 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2f, - 0x76, 0x33, 0x2f, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, - 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x0b, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x72, 0x6f, 0x6b, 0x65, - 0x72, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x44, 0x9a, 0xc5, 0x88, - 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x72, 0x6f, 0x6b, 0x65, - 0x72, 0x42, 0x5c, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescData = file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDesc -) - -func file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDescData -} - -var file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_goTypes = []interface{}{ - (*KafkaBroker)(nil), // 0: envoy.extensions.filters.network.kafka_broker.v3.KafkaBroker -} -var file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_init() } -func file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_init() { - if File_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KafkaBroker); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto = out.File - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_rawDesc = nil - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_goTypes = nil - file_envoy_extensions_filters_network_kafka_broker_v3_kafka_broker_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.pb.validate.go b/pkg/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.pb.validate.go deleted file mode 100644 index 5a69a0d6e9..0000000000 --- a/pkg/api/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.pb.validate.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto - -package envoy_extensions_filters_network_kafka_broker_v3 - -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{} -) - -// Validate checks the field values on KafkaBroker with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *KafkaBroker) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return KafkaBrokerValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// KafkaBrokerValidationError is the validation error returned by -// KafkaBroker.Validate if the designated constraints aren't met. -type KafkaBrokerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KafkaBrokerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KafkaBrokerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KafkaBrokerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KafkaBrokerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KafkaBrokerValidationError) ErrorName() string { return "KafkaBrokerValidationError" } - -// Error satisfies the builtin error interface -func (e KafkaBrokerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKafkaBroker.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KafkaBrokerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KafkaBrokerValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.go b/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.go index a6dad1aa28..cd8d7123ca 100644 --- a/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.go +++ b/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto -package envoy_extensions_filters_network_local_ratelimit_v3 +package local_ratelimitv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type LocalRateLimit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -43,16 +38,22 @@ type LocalRateLimit struct { // the connection will be immediately closed. // // .. note:: - // In the current implementation each filter and filter chain has an independent rate limit. + // In the current implementation each filter and filter chain has an independent rate limit, unless + // a shared rate limit is configured via :ref:`share_key `. // // .. note:: // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive + // ` must be >= 50ms to avoid too aggressive // refills. TokenBucket *v3.TokenBucket `protobuf:"bytes,2,opt,name=token_bucket,json=tokenBucket,proto3" json:"token_bucket,omitempty"` // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults // to enabled. RuntimeEnabled *v31.RuntimeFeatureFlag `protobuf:"bytes,3,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"` + // Specifies that the token bucket used for rate limiting should be shared with other local_rate_limit filters + // with a matching :ref:`token_bucket ` + // and `share_key` configuration. All fields of `token_bucket` must match exactly for the token bucket to be shared. If this + // field is empty, this filter will not share a token bucket with any other filter. + ShareKey string `protobuf:"bytes,4,opt,name=share_key,json=shareKey,proto3" json:"share_key,omitempty"` } func (x *LocalRateLimit) Reset() { @@ -108,6 +109,13 @@ func (x *LocalRateLimit) GetRuntimeEnabled() *v31.RuntimeFeatureFlag { return nil } +func (x *LocalRateLimit) GetShareKey() string { + if x != nil { + return x.ShareKey + } + return "" +} + var File_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDesc = []byte{ @@ -129,7 +137,7 @@ var file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_pr 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa2, 0x02, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0xbf, 0x02, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x47, 0x0a, 0x0c, @@ -142,18 +150,27 @@ var file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_pr 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, - 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x42, 0x62, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x42, 0xd0, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.validate.go index 159cc34f18..87e34accd8 100644 --- a/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto -package envoy_extensions_filters_network_local_ratelimit_v3 +package local_ratelimitv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,32 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on LocalRateLimit with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LocalRateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalRateLimit with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LocalRateLimitMultiError, +// or nil if none found. +func (m *LocalRateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalRateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return LocalRateLimitValidationError{ + err := LocalRateLimitValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetTokenBucket() == nil { - return LocalRateLimitValidationError{ + err := LocalRateLimitValidationError{ field: "TokenBucket", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTokenBucket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "TokenBucket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "TokenBucket", @@ -65,7 +108,26 @@ func (m *LocalRateLimit) Validate() error { } } - if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalRateLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalRateLimitValidationError{ field: "RuntimeEnabled", @@ -75,9 +137,32 @@ func (m *LocalRateLimit) Validate() error { } } + // no validation rules for ShareKey + + if len(errors) > 0 { + return LocalRateLimitMultiError(errors) + } + return nil } +// LocalRateLimitMultiError is an error wrapping multiple validation errors +// returned by LocalRateLimit.ValidateAll() if the designated constraints +// aren't met. +type LocalRateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalRateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalRateLimitMultiError) AllErrors() []error { return m } + // LocalRateLimitValidationError is the validation error returned by // LocalRateLimit.Validate if the designated constraints aren't met. type LocalRateLimitValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.go new file mode 100644 index 0000000000..41f19b9826 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto + +package actionv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the route match action. +// [#not-implemented-hide:] +type RouteAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ClusterSpecifier: + // *RouteAction_Cluster + // *RouteAction_WeightedClusters + ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` +} + +func (x *RouteAction) Reset() { + *x = RouteAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteAction) ProtoMessage() {} + +func (x *RouteAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. +func (*RouteAction) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescGZIP(), []int{0} +} + +func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { + if m != nil { + return m.ClusterSpecifier + } + return nil +} + +func (x *RouteAction) GetCluster() string { + if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { + return x.Cluster + } + return "" +} + +func (x *RouteAction) GetWeightedClusters() *v3.WeightedCluster { + if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { + return x.WeightedClusters + } + return nil +} + +type isRouteAction_ClusterSpecifier interface { + isRouteAction_ClusterSpecifier() +} + +type RouteAction_Cluster struct { + // Indicates the upstream cluster to which the request should be routed. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` +} + +type RouteAction_WeightedClusters struct { + // Multiple upstream clusters can be specified for a given route. The request is routed to one + // of the upstream clusters based on weights assigned to each cluster. + // Currently ClusterWeight only supports the name and weight fields. + WeightedClusters *v3.WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` +} + +func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} + +func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc = []byte{ + 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x2c, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x55, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x42, 0xed, 0x01, 0x0a, 0x54, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x76, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_goTypes = []interface{}{ + (*RouteAction)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.RouteAction + (*v3.WeightedCluster)(nil), // 1: envoy.config.route.v3.WeightedCluster +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.RouteAction.weighted_clusters:type_name -> envoy.config.route.v3.WeightedCluster + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_init() +} +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*RouteAction_Cluster)(nil), + (*RouteAction_WeightedClusters)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.validate.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.validate.go new file mode 100644 index 0000000000..480af4ff19 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.validate.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto + +package actionv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ClusterSpecifier.(type) { + + case *RouteAction_Cluster: + // no validation rules for Cluster + + case *RouteAction_WeightedClusters: + + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RouteActionValidationError{ + field: "ClusterSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RouteActionMultiError(errors) + } + + return nil +} + +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + +// RouteActionValidationError is the validation error returned by +// RouteAction.Validate if the designated constraints aren't met. +type RouteActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteActionValidationError) ErrorName() string { return "RouteActionValidationError" } + +// Error satisfies the builtin error interface +func (e RouteActionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRouteAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteActionValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.go new file mode 100644 index 0000000000..44912c7a68 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.go @@ -0,0 +1,290 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto + +package matcherv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Used to match request service of the downstream request. Only applicable if a service provided +// by the application protocol. +// [#not-implemented-hide:] +type ServiceMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ServiceMatchInput) Reset() { + *x = ServiceMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceMatchInput) ProtoMessage() {} + +func (x *ServiceMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceMatchInput.ProtoReflect.Descriptor instead. +func (*ServiceMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP(), []int{0} +} + +// Used to match request method of the downstream request. Only applicable if a method provided +// by the application protocol. +// [#not-implemented-hide:] +type MethodMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MethodMatchInput) Reset() { + *x = MethodMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodMatchInput) ProtoMessage() {} + +func (x *MethodMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodMatchInput.ProtoReflect.Descriptor instead. +func (*MethodMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP(), []int{1} +} + +// Used to match an arbitrary property of the downstream request. +// These properties are populated by the codecs of application protocols. +// [#not-implemented-hide:] +type PropertyMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The property name to match on. + PropertyName string `protobuf:"bytes,1,opt,name=property_name,json=propertyName,proto3" json:"property_name,omitempty"` +} + +func (x *PropertyMatchInput) Reset() { + *x = PropertyMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PropertyMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PropertyMatchInput) ProtoMessage() {} + +func (x *PropertyMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PropertyMatchInput.ProtoReflect.Descriptor instead. +func (*PropertyMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP(), []int{2} +} + +func (x *PropertyMatchInput) GetPropertyName() string { + if x != nil { + return x.PropertyName + } + return "" +} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc = []byte{ + 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x12, + 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x22, 0x42, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0xe1, 0x01, 0x0a, 0x4d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_goTypes = []interface{}{ + (*ServiceMatchInput)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.ServiceMatchInput + (*MethodMatchInput)(nil), // 1: envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.MethodMatchInput + (*PropertyMatchInput)(nil), // 2: envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_init() +} +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PropertyMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.validate.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.validate.go new file mode 100644 index 0000000000..b23ba8ce05 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.validate.go @@ -0,0 +1,351 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto + +package matcherv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ServiceMatchInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ServiceMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServiceMatchInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ServiceMatchInputMultiError, or nil if none found. +func (m *ServiceMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ServiceMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ServiceMatchInputMultiError(errors) + } + + return nil +} + +// ServiceMatchInputMultiError is an error wrapping multiple validation errors +// returned by ServiceMatchInput.ValidateAll() if the designated constraints +// aren't met. +type ServiceMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServiceMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServiceMatchInputMultiError) AllErrors() []error { return m } + +// ServiceMatchInputValidationError is the validation error returned by +// ServiceMatchInput.Validate if the designated constraints aren't met. +type ServiceMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServiceMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServiceMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServiceMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServiceMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServiceMatchInputValidationError) ErrorName() string { + return "ServiceMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e ServiceMatchInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sServiceMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServiceMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServiceMatchInputValidationError{} + +// Validate checks the field values on MethodMatchInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *MethodMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatchInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MethodMatchInputMultiError, or nil if none found. +func (m *MethodMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return MethodMatchInputMultiError(errors) + } + + return nil +} + +// MethodMatchInputMultiError is an error wrapping multiple validation errors +// returned by MethodMatchInput.ValidateAll() if the designated constraints +// aren't met. +type MethodMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatchInputMultiError) AllErrors() []error { return m } + +// MethodMatchInputValidationError is the validation error returned by +// MethodMatchInput.Validate if the designated constraints aren't met. +type MethodMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MethodMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MethodMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MethodMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MethodMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MethodMatchInputValidationError) ErrorName() string { return "MethodMatchInputValidationError" } + +// Error satisfies the builtin error interface +func (e MethodMatchInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sMethodMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MethodMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MethodMatchInputValidationError{} + +// Validate checks the field values on PropertyMatchInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *PropertyMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PropertyMatchInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PropertyMatchInputMultiError, or nil if none found. +func (m *PropertyMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *PropertyMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPropertyName()) < 1 { + err := PropertyMatchInputValidationError{ + field: "PropertyName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PropertyMatchInputMultiError(errors) + } + + return nil +} + +// PropertyMatchInputMultiError is an error wrapping multiple validation errors +// returned by PropertyMatchInput.ValidateAll() if the designated constraints +// aren't met. +type PropertyMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PropertyMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PropertyMatchInputMultiError) AllErrors() []error { return m } + +// PropertyMatchInputValidationError is the validation error returned by +// PropertyMatchInput.Validate if the designated constraints aren't met. +type PropertyMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PropertyMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PropertyMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PropertyMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PropertyMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PropertyMatchInputValidationError) ErrorName() string { + return "PropertyMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e PropertyMatchInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPropertyMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PropertyMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PropertyMatchInputValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.go new file mode 100644 index 0000000000..7b1e47d821 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.go @@ -0,0 +1,454 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto + +package meta_protocol_proxyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#not-implemented-hide:] +// [#next-free-field: 6] +type MetaProtocolProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The human readable prefix to use when emitting statistics. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // The application protocol built on top of the meta protocol proxy. + ApplicationProtocol *ApplicationProtocol `protobuf:"bytes,2,opt,name=application_protocol,json=applicationProtocol,proto3" json:"application_protocol,omitempty"` + // Types that are assignable to RouteSpecifier: + // *MetaProtocolProxy_Rds + // *MetaProtocolProxy_RouteConfig + RouteSpecifier isMetaProtocolProxy_RouteSpecifier `protobuf_oneof:"route_specifier"` + // A list of individual Layer-7 filters that make up the filter chain for requests made to the + // meta protocol proxy. Order matters as the filters are processed sequentially as request events + // happen. + MetaProtocolFilters []*v3.TypedExtensionConfig `protobuf:"bytes,5,rep,name=meta_protocol_filters,json=metaProtocolFilters,proto3" json:"meta_protocol_filters,omitempty"` +} + +func (x *MetaProtocolProxy) Reset() { + *x = MetaProtocolProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetaProtocolProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaProtocolProxy) ProtoMessage() {} + +func (x *MetaProtocolProxy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaProtocolProxy.ProtoReflect.Descriptor instead. +func (*MetaProtocolProxy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *MetaProtocolProxy) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *MetaProtocolProxy) GetApplicationProtocol() *ApplicationProtocol { + if x != nil { + return x.ApplicationProtocol + } + return nil +} + +func (m *MetaProtocolProxy) GetRouteSpecifier() isMetaProtocolProxy_RouteSpecifier { + if m != nil { + return m.RouteSpecifier + } + return nil +} + +func (x *MetaProtocolProxy) GetRds() *MetaRds { + if x, ok := x.GetRouteSpecifier().(*MetaProtocolProxy_Rds); ok { + return x.Rds + } + return nil +} + +func (x *MetaProtocolProxy) GetRouteConfig() *RouteConfiguration { + if x, ok := x.GetRouteSpecifier().(*MetaProtocolProxy_RouteConfig); ok { + return x.RouteConfig + } + return nil +} + +func (x *MetaProtocolProxy) GetMetaProtocolFilters() []*v3.TypedExtensionConfig { + if x != nil { + return x.MetaProtocolFilters + } + return nil +} + +type isMetaProtocolProxy_RouteSpecifier interface { + isMetaProtocolProxy_RouteSpecifier() +} + +type MetaProtocolProxy_Rds struct { + // The meta protocol proxies route table will be dynamically loaded via the meta RDS API. + Rds *MetaRds `protobuf:"bytes,3,opt,name=rds,proto3,oneof"` +} + +type MetaProtocolProxy_RouteConfig struct { + // The route table for the meta protocol proxy is static and is specified in this property. + RouteConfig *RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"` +} + +func (*MetaProtocolProxy_Rds) isMetaProtocolProxy_RouteSpecifier() {} + +func (*MetaProtocolProxy_RouteConfig) isMetaProtocolProxy_RouteSpecifier() {} + +// [#not-implemented-hide:] +type ApplicationProtocol struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the application protocol. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The codec which encodes and decodes the application protocol. + Codec *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` +} + +func (x *ApplicationProtocol) Reset() { + *x = ApplicationProtocol{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplicationProtocol) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplicationProtocol) ProtoMessage() {} + +func (x *ApplicationProtocol) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplicationProtocol.ProtoReflect.Descriptor instead. +func (*ApplicationProtocol) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP(), []int{1} +} + +func (x *ApplicationProtocol) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ApplicationProtocol) GetCodec() *v3.TypedExtensionConfig { + if x != nil { + return x.Codec + } + return nil +} + +// [#not-implemented-hide:] +type MetaRds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration source specifier for RDS. + ConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + // The name of the route configuration. This name will be passed to the RDS API. This allows an + // Envoy configuration with multiple meta protocol proxies to use different route configurations. + RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"` +} + +func (x *MetaRds) Reset() { + *x = MetaRds{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetaRds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaRds) ProtoMessage() {} + +func (x *MetaRds) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaRds.ProtoReflect.Descriptor instead. +func (*MetaRds) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP(), []int{2} +} + +func (x *MetaRds) GetConfigSource() *v3.ConfigSource { + if x != nil { + return x.ConfigSource + } + return nil +} + +func (x *MetaRds) GetRouteConfigName() string { + if x != nil { + return x.RouteConfigName + } + return "" +} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc = []byte{ + 0x0a, 0x51, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x43, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x04, 0x0a, 0x11, 0x4d, + 0x65, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x89, 0x01, 0x0a, 0x14, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x13, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x54, 0x0a, 0x03, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x64, 0x73, 0x48, 0x00, 0x52, 0x03, 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x0c, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, + 0x0a, 0x15, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x6d, 0x65, 0x74, 0x61, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x42, 0x16, + 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x7e, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1b, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x05, 0x63, 0x6f, + 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x22, 0x91, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x61, 0x52, + 0x64, 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0xe7, 0x01, 0x0a, 0x45, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x4d, 0x65, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x74, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x6d, + 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, + 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_goTypes = []interface{}{ + (*MetaProtocolProxy)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy + (*ApplicationProtocol)(nil), // 1: envoy.extensions.filters.network.meta_protocol_proxy.v3.ApplicationProtocol + (*MetaRds)(nil), // 2: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaRds + (*RouteConfiguration)(nil), // 3: envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration + (*v3.TypedExtensionConfig)(nil), // 4: envoy.config.core.v3.TypedExtensionConfig + (*v3.ConfigSource)(nil), // 5: envoy.config.core.v3.ConfigSource +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.application_protocol:type_name -> envoy.extensions.filters.network.meta_protocol_proxy.v3.ApplicationProtocol + 2, // 1: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.rds:type_name -> envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaRds + 3, // 2: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.route_config:type_name -> envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration + 4, // 3: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.meta_protocol_filters:type_name -> envoy.config.core.v3.TypedExtensionConfig + 4, // 4: envoy.extensions.filters.network.meta_protocol_proxy.v3.ApplicationProtocol.codec:type_name -> envoy.config.core.v3.TypedExtensionConfig + 5, // 5: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaRds.config_source:type_name -> envoy.config.core.v3.ConfigSource + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_init() +} +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto != nil { + return + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetaProtocolProxy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplicationProtocol); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetaRds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*MetaProtocolProxy_Rds)(nil), + (*MetaProtocolProxy_RouteConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.validate.go new file mode 100644 index 0000000000..2d23a0b22f --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.validate.go @@ -0,0 +1,601 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto + +package meta_protocol_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on MetaProtocolProxy with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *MetaProtocolProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetaProtocolProxy with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetaProtocolProxyMultiError, or nil if none found. +func (m *MetaProtocolProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *MetaProtocolProxy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := MetaProtocolProxyValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetApplicationProtocol() == nil { + err := MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetApplicationProtocol()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApplicationProtocol()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetMetaProtocolFilters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: fmt.Sprintf("MetaProtocolFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: fmt.Sprintf("MetaProtocolFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaProtocolProxyValidationError{ + field: fmt.Sprintf("MetaProtocolFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.RouteSpecifier.(type) { + + case *MetaProtocolProxy_Rds: + + if all { + switch v := interface{}(m.GetRds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaProtocolProxyValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MetaProtocolProxy_RouteConfig: + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaProtocolProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := MetaProtocolProxyValidationError{ + field: "RouteSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return MetaProtocolProxyMultiError(errors) + } + + return nil +} + +// MetaProtocolProxyMultiError is an error wrapping multiple validation errors +// returned by MetaProtocolProxy.ValidateAll() if the designated constraints +// aren't met. +type MetaProtocolProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetaProtocolProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetaProtocolProxyMultiError) AllErrors() []error { return m } + +// MetaProtocolProxyValidationError is the validation error returned by +// MetaProtocolProxy.Validate if the designated constraints aren't met. +type MetaProtocolProxyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetaProtocolProxyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetaProtocolProxyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetaProtocolProxyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetaProtocolProxyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetaProtocolProxyValidationError) ErrorName() string { + return "MetaProtocolProxyValidationError" +} + +// Error satisfies the builtin error interface +func (e MetaProtocolProxyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sMetaProtocolProxy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetaProtocolProxyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetaProtocolProxyValidationError{} + +// Validate checks the field values on ApplicationProtocol with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ApplicationProtocol) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApplicationProtocol with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ApplicationProtocolMultiError, or nil if none found. +func (m *ApplicationProtocol) ValidateAll() error { + return m.validate(true) +} + +func (m *ApplicationProtocol) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := ApplicationProtocolValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetCodec() == nil { + err := ApplicationProtocolValidationError{ + field: "Codec", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCodec()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApplicationProtocolValidationError{ + field: "Codec", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApplicationProtocolValidationError{ + field: "Codec", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCodec()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ApplicationProtocolValidationError{ + field: "Codec", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ApplicationProtocolMultiError(errors) + } + + return nil +} + +// ApplicationProtocolMultiError is an error wrapping multiple validation +// errors returned by ApplicationProtocol.ValidateAll() if the designated +// constraints aren't met. +type ApplicationProtocolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApplicationProtocolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApplicationProtocolMultiError) AllErrors() []error { return m } + +// ApplicationProtocolValidationError is the validation error returned by +// ApplicationProtocol.Validate if the designated constraints aren't met. +type ApplicationProtocolValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ApplicationProtocolValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ApplicationProtocolValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ApplicationProtocolValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ApplicationProtocolValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ApplicationProtocolValidationError) ErrorName() string { + return "ApplicationProtocolValidationError" +} + +// Error satisfies the builtin error interface +func (e ApplicationProtocolValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sApplicationProtocol.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ApplicationProtocolValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ApplicationProtocolValidationError{} + +// Validate checks the field values on MetaRds with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *MetaRds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetaRds with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in MetaRdsMultiError, or nil if none found. +func (m *MetaRds) ValidateAll() error { + return m.validate(true) +} + +func (m *MetaRds) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetConfigSource() == nil { + err := MetaRdsValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaRdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaRdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaRdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetRouteConfigName()) < 1 { + err := MetaRdsValidationError{ + field: "RouteConfigName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return MetaRdsMultiError(errors) + } + + return nil +} + +// MetaRdsMultiError is an error wrapping multiple validation errors returned +// by MetaRds.ValidateAll() if the designated constraints aren't met. +type MetaRdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetaRdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetaRdsMultiError) AllErrors() []error { return m } + +// MetaRdsValidationError is the validation error returned by MetaRds.Validate +// if the designated constraints aren't met. +type MetaRdsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetaRdsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetaRdsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetaRdsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetaRdsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetaRdsValidationError) ErrorName() string { return "MetaRdsValidationError" } + +// Error satisfies the builtin error interface +func (e MetaRdsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sMetaRds.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetaRdsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetaRdsValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.go new file mode 100644 index 0000000000..e3b63e4f4f --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.go @@ -0,0 +1,236 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto + +package meta_protocol_proxyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#protodoc-title: Meta Protocol Proxy Route Configuration] +// The meta protocol proxy makes use of the `xds matching API` for routing configurations. +// +// In the below example, we combine a top level tree matcher with a linear matcher to match +// the incoming requests, and send the matching requests to v1 of the upstream service. +// +// name: demo-v1 +// route: +// matcher_tree: +// input: +// name: request-service +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.ServiceMatchInput +// exact_match_map: +// map: +// org.apache.dubbo.samples.basic.api.DemoService: +// matcher: +// matcher_list: +// matchers: +// - predicate: +// and_matcher: +// predicate: +// - single_predicate: +// input: +// name: request-properties +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +// property_name: version +// value_match: +// exact: v1 +// - single_predicate: +// input: +// name: request-properties +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +// property_name: user +// value_match: +// exact: john +// on_match: +// action: +// name: route +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.routeAction +// cluster: outbound|20880|v1|org.apache.dubbo.samples.basic.api.demoservice +// [#not-implemented-hide:] +type RouteConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the route configuration. For example, it might match route_config_name in + // envoy.extensions.filters.network.meta_protocol_proxy.v3.Rds. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The match tree to use when resolving route actions for incoming requests. + Route *v3.Matcher `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` +} + +func (x *RouteConfiguration) Reset() { + *x = RouteConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteConfiguration) ProtoMessage() {} + +func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. +func (*RouteConfiguration) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescGZIP(), []int{0} +} + +func (x *RouteConfiguration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RouteConfiguration) GetRoute() *v3.Matcher { + if x != nil { + return x.Route + } + return nil +} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc = []byte{ + 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, + 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x12, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, + 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x42, 0xdb, 0x01, 0x0a, 0x45, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x74, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_goTypes = []interface{}{ + (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration + (*v3.Matcher)(nil), // 1: xds.type.matcher.v3.Matcher +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration.route:type_name -> xds.type.matcher.v3.Matcher + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_init() } +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.validate.go b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.validate.go new file mode 100644 index 0000000000..7bd0adea2c --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.validate.go @@ -0,0 +1,189 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto + +package meta_protocol_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := RouteConfigurationValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetRoute() == nil { + err := RouteConfigurationValidationError{ + field: "Route", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteConfigurationValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + + return nil +} + +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + +// RouteConfigurationValidationError is the validation error returned by +// RouteConfiguration.Validate if the designated constraints aren't met. +type RouteConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteConfigurationValidationError) ErrorName() string { + return "RouteConfigurationValidationError" +} + +// Error satisfies the builtin error interface +func (e RouteConfigurationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRouteConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteConfigurationValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.go index 0efcf351f6..c367fb94c9 100644 --- a/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto -package envoy_extensions_filters_network_mongo_proxy_v3 +package mongo_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/common/fault/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type MongoProxy struct { state protoimpl.MessageState @@ -160,13 +155,20 @@ var file_envoy_extensions_filters_network_mongo_proxy_v3_mongo_proxy_proto_rawDe 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x6e, - 0x67, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x5a, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0xc0, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.validate.go index fdf9a83123..b4be528456 100644 --- a/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto -package envoy_extensions_filters_network_mongo_proxy_v3 +package mongo_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MongoProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MongoProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MongoProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MongoProxyMultiError, or +// nil if none found. +func (m *MongoProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *MongoProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return MongoProxyValidationError{ + err := MongoProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AccessLog - if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MongoProxyValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MongoProxyValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MongoProxyValidationError{ field: "Delay", @@ -61,9 +101,29 @@ func (m *MongoProxy) Validate() error { // no validation rules for EmitDynamicMetadata + if len(errors) > 0 { + return MongoProxyMultiError(errors) + } + return nil } +// MongoProxyMultiError is an error wrapping multiple validation errors +// returned by MongoProxy.ValidateAll() if the designated constraints aren't met. +type MongoProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MongoProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MongoProxyMultiError) AllErrors() []error { return m } + // MongoProxyValidationError is the validation error returned by // MongoProxy.Validate if the designated constraints aren't met. type MongoProxyValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.pb.go deleted file mode 100644 index 7ad35834aa..0000000000 --- a/pkg/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto - -package envoy_extensions_filters_network_mysql_proxy_v3 - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type MySQLProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The human readable prefix to use when emitting :ref:`statistics - // `. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // [#not-implemented-hide:] The optional path to use for writing MySQL access logs. - // If the access log field is empty, access logs will not be written. - AccessLog string `protobuf:"bytes,2,opt,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` -} - -func (x *MySQLProxy) Reset() { - *x = MySQLProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MySQLProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MySQLProxy) ProtoMessage() {} - -func (x *MySQLProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MySQLProxy.ProtoReflect.Descriptor instead. -func (*MySQLProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescGZIP(), []int{0} -} - -func (x *MySQLProxy) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *MySQLProxy) GetAccessLog() string { - if x != nil { - return x.AccessLog - } - return "" -} - -var File_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDesc = []byte{ - 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, - 0x33, 0x2f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x99, 0x01, 0x0a, 0x0a, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, - 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x79, 0x73, 0x71, - 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x5a, 0x0a, 0x3d, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x79, - 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4d, 0x79, - 0x73, 0x71, 0x6c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescData = file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDesc -) - -func file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDescData -} - -var file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_goTypes = []interface{}{ - (*MySQLProxy)(nil), // 0: envoy.extensions.filters.network.mysql_proxy.v3.MySQLProxy -} -var file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_init() } -func file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_init() { - if File_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MySQLProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto = out.File - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_mysql_proxy_v3_mysql_proxy_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.pb.validate.go deleted file mode 100644 index 4145017587..0000000000 --- a/pkg/api/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.pb.validate.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto - -package envoy_extensions_filters_network_mysql_proxy_v3 - -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{} -) - -// Validate checks the field values on MySQLProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *MySQLProxy) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return MySQLProxyValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - // no validation rules for AccessLog - - return nil -} - -// MySQLProxyValidationError is the validation error returned by -// MySQLProxy.Validate if the designated constraints aren't met. -type MySQLProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MySQLProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MySQLProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MySQLProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MySQLProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MySQLProxyValidationError) ErrorName() string { return "MySQLProxyValidationError" } - -// Error satisfies the builtin error interface -func (e MySQLProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMySQLProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MySQLProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MySQLProxyValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.pb.go deleted file mode 100644 index fbcc71fa2e..0000000000 --- a/pkg/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.pb.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto - -package envoy_extensions_filters_network_postgres_proxy_v3alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type PostgresProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The human readable prefix to use when emitting :ref:`statistics - // `. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // Controls whether SQL statements received in Frontend Query messages - // are parsed. Parsing is required to produce Postgres proxy filter - // metadata. Defaults to true. - EnableSqlParsing *wrappers.BoolValue `protobuf:"bytes,2,opt,name=enable_sql_parsing,json=enableSqlParsing,proto3" json:"enable_sql_parsing,omitempty"` -} - -func (x *PostgresProxy) Reset() { - *x = PostgresProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PostgresProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostgresProxy) ProtoMessage() {} - -func (x *PostgresProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PostgresProxy.ProtoReflect.Descriptor instead. -func (*PostgresProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescGZIP(), []int{0} -} - -func (x *PostgresProxy) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *PostgresProxy) GetEnableSqlParsing() *wrappers.BoolValue { - if x != nil { - return x.EnableSqlParsing - } - return nil -} - -var File_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDesc = []byte{ - 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x48, - 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x61, 0x72, - 0x73, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x71, - 0x6c, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6d, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x12, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescData = file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDesc -) - -func file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDescData -} - -var file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_goTypes = []interface{}{ - (*PostgresProxy)(nil), // 0: envoy.extensions.filters.network.postgres_proxy.v3alpha.PostgresProxy - (*wrappers.BoolValue)(nil), // 1: google.protobuf.BoolValue -} -var file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.postgres_proxy.v3alpha.PostgresProxy.enable_sql_parsing:type_name -> google.protobuf.BoolValue - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_init() } -func file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_init() { - if File_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostgresProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto = out.File - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_postgres_proxy_v3alpha_postgres_proxy_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.pb.validate.go deleted file mode 100644 index d942f9707f..0000000000 --- a/pkg/api/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.pb.validate.go +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto - -package envoy_extensions_filters_network_postgres_proxy_v3alpha - -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{} -) - -// Validate checks the field values on PostgresProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *PostgresProxy) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return PostgresProxyValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetEnableSqlParsing()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PostgresProxyValidationError{ - field: "EnableSqlParsing", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// PostgresProxyValidationError is the validation error returned by -// PostgresProxy.Validate if the designated constraints aren't met. -type PostgresProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PostgresProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PostgresProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PostgresProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PostgresProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PostgresProxyValidationError) ErrorName() string { return "PostgresProxyValidationError" } - -// Error satisfies the builtin error interface -func (e PostgresProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPostgresProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PostgresProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PostgresProxyValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.go b/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.go index 25c2518a79..c97c46b49c 100644 --- a/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.go +++ b/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto -package envoy_extensions_filters_network_ratelimit_v3 +package ratelimitv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/ratelimit/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 7] type RateLimit struct { state protoimpl.MessageState @@ -181,13 +176,20 @@ var file_envoy_extensions_filters_network_ratelimit_v3_rate_limit_proto_rawDesc 0x65, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x57, 0x0a, - 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0xb9, 0x01, + 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.validate.go index 76cb0c6d8f..bcd052f502 100644 --- a/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto -package envoy_extensions_filters_network_ratelimit_v3 +package ratelimitv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,41 +31,88 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetDomain()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Domain", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetDescriptors()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Descriptors", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetDescriptors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: fmt.Sprintf("Descriptors[%v]", idx), @@ -76,7 +124,26 @@ func (m *RateLimit) Validate() error { } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "Timeout", @@ -89,13 +156,36 @@ func (m *RateLimit) Validate() error { // no validation rules for FailureModeDeny if m.GetRateLimitService() == nil { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RateLimitService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "RateLimitService", @@ -105,9 +195,29 @@ func (m *RateLimit) Validate() error { } } + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.pb.go b/pkg/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.pb.go deleted file mode 100644 index 108addeb65..0000000000 --- a/pkg/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.pb.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.proto - -package envoy_extensions_filters_network_ratelimit_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/ratelimit/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 7] -type RateLimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The prefix to use when emitting :ref:`statistics `. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // The rate limit domain to use in the rate limit service request. - Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` - // The rate limit descriptor list to use in the rate limit service request. - Descriptors []*v3.RateLimitDescriptor `protobuf:"bytes,3,rep,name=descriptors,proto3" json:"descriptors,omitempty"` - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - Timeout *duration.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - FailureModeDeny bool `protobuf:"varint,5,opt,name=failure_mode_deny,json=failureModeDeny,proto3" json:"failure_mode_deny,omitempty"` - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - RateLimitService *v4alpha.RateLimitServiceConfig `protobuf:"bytes,6,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"` -} - -func (x *RateLimit) Reset() { - *x = RateLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit) ProtoMessage() {} - -func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. -func (*RateLimit) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP(), []int{0} -} - -func (x *RateLimit) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *RateLimit) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *RateLimit) GetDescriptors() []*v3.RateLimitDescriptor { - if x != nil { - return x.Descriptors - } - return nil -} - -func (x *RateLimit) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *RateLimit) GetFailureModeDeny() bool { - if x != nil { - return x.FailureModeDeny - } - return false -} - -func (x *RateLimit) GetRateLimitService() *v4alpha.RateLimitServiceConfig { - if x != nil { - return x.RateLimitService - } - return nil -} - -var File_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDesc = []byte{ - 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x03, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x06, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x65, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x79, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, - 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x6e, 0x0a, 0x12, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x5c, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescData = file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDesc -) - -func file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDescData -} - -var file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_goTypes = []interface{}{ - (*RateLimit)(nil), // 0: envoy.extensions.filters.network.ratelimit.v4alpha.RateLimit - (*v3.RateLimitDescriptor)(nil), // 1: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor - (*duration.Duration)(nil), // 2: google.protobuf.Duration - (*v4alpha.RateLimitServiceConfig)(nil), // 3: envoy.config.ratelimit.v4alpha.RateLimitServiceConfig -} -var file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.ratelimit.v4alpha.RateLimit.descriptors:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor - 2, // 1: envoy.extensions.filters.network.ratelimit.v4alpha.RateLimit.timeout:type_name -> google.protobuf.Duration - 3, // 2: envoy.extensions.filters.network.ratelimit.v4alpha.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v4alpha.RateLimitServiceConfig - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_init() } -func file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_init() { - if File_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto = out.File - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_rawDesc = nil - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_goTypes = nil - file_envoy_extensions_filters_network_ratelimit_v4alpha_rate_limit_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.pb.validate.go deleted file mode 100644 index 0a94e9172d..0000000000 --- a/pkg/api/envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.pb.validate.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/ratelimit/v4alpha/rate_limit.proto - -package envoy_extensions_filters_network_ratelimit_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return RateLimitValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetDomain()) < 1 { - return RateLimitValidationError{ - field: "Domain", - reason: "value length must be at least 1 runes", - } - } - - if len(m.GetDescriptors()) < 1 { - return RateLimitValidationError{ - field: "Descriptors", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetDescriptors() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: fmt.Sprintf("Descriptors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for FailureModeDeny - - if m.GetRateLimitService() == nil { - return RateLimitValidationError{ - field: "RateLimitService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "RateLimitService", - 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{} diff --git a/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.go b/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.go index 329d42de4a..4f8c1ffe72 100644 --- a/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.go +++ b/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/rbac/v3/rbac.proto -package envoy_extensions_filters_network_rbac_v3 +package rbacv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/rbac/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RBAC_EnforcementType int32 const ( @@ -83,6 +78,7 @@ func (RBAC_EnforcementType) EnumDescriptor() ([]byte, []int) { // // Header should not be used in rules/shadow_rules in RBAC network filter as // this information is only available in :ref:`RBAC http filter `. +// [#next-free-field: 6] type RBAC struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -90,11 +86,16 @@ type RBAC struct { // Specify the RBAC rules to be applied globally. // If absent, no enforcing RBAC policy will be applied. + // If present and empty, DENY. Rules *v3.RBAC `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"` // Shadow rules are not enforced by the filter but will emit stats and logs // and can be used for rule testing. // If absent, no shadow RBAC policy will be applied. ShadowRules *v3.RBAC `protobuf:"bytes,2,opt,name=shadow_rules,json=shadowRules,proto3" json:"shadow_rules,omitempty"` + // If specified, shadow rules will emit stats with the given prefix. + // This is useful to distinguish the stat when there are more than 1 RBAC filter configured with + // shadow rules. + ShadowRulesStatPrefix string `protobuf:"bytes,5,opt,name=shadow_rules_stat_prefix,json=shadowRulesStatPrefix,proto3" json:"shadow_rules_stat_prefix,omitempty"` // The prefix to use when emitting statistics. StatPrefix string `protobuf:"bytes,3,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` // RBAC enforcement strategy. By default RBAC will be enforced only once @@ -151,6 +152,13 @@ func (x *RBAC) GetShadowRules() *v3.RBAC { return nil } +func (x *RBAC) GetShadowRulesStatPrefix() string { + if x != nil { + return x.ShadowRulesStatPrefix + } + return "" +} + func (x *RBAC) GetStatPrefix() string { if x != nil { return x.StatPrefix @@ -181,7 +189,7 @@ var file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDesc = []byte{ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x02, 0x0a, 0x04, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x03, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, @@ -189,29 +197,38 @@ var file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDesc = []byte{ 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x0b, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, - 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x69, 0x0a, 0x10, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, - 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x0f, 0x45, 0x6e, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, - 0x16, 0x4f, 0x4e, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x46, 0x49, 0x52, - 0x53, 0x54, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, - 0x54, 0x49, 0x4e, 0x55, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, - 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x42, 0x4d, 0x0a, 0x36, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, - 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, + 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x69, 0x0a, 0x10, 0x65, 0x6e, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, + 0x41, 0x43, 0x2e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x0f, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x4e, 0x45, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x5f, 0x42, 0x59, 0x54, 0x45, + 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x4f, 0x55, 0x53, + 0x10, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x42, 0x41, 0x43, 0x42, 0xa5, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, + 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x62, 0x61, + 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.validate.go b/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.validate.go index 50fdeddbcd..137cdb8f65 100644 --- a/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/rbac/v3/rbac.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/rbac/v3/rbac.proto -package envoy_extensions_filters_network_rbac_v3 +package rbacv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "Rules", @@ -50,7 +85,26 @@ func (m *RBAC) Validate() error { } } - if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetShadowRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RBACValidationError{ field: "ShadowRules", @@ -60,18 +114,44 @@ func (m *RBAC) Validate() error { } } + // no validation rules for ShadowRulesStatPrefix + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return RBACValidationError{ + err := RBACValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for EnforcementType + if len(errors) > 0 { + return RBACMultiError(errors) + } + return nil } +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + // RBACValidationError is the validation error returned by RBAC.Validate if the // designated constraints aren't met. type RBACValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.pb.go b/pkg/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.pb.go deleted file mode 100644 index 424191a35d..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.pb.go +++ /dev/null @@ -1,287 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/rbac/v4alpha/rbac.proto - -package envoy_extensions_filters_network_rbac_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/rbac/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type RBAC_EnforcementType int32 - -const ( - // Apply RBAC policies when the first byte of data arrives on the connection. - RBAC_ONE_TIME_ON_FIRST_BYTE RBAC_EnforcementType = 0 - // Continuously apply RBAC policies as data arrives. Use this mode when - // using RBAC with message oriented protocols such as Mongo, MySQL, Kafka, - // etc. when the protocol decoders emit dynamic metadata such as the - // resources being accessed and the operations on the resources. - RBAC_CONTINUOUS RBAC_EnforcementType = 1 -) - -// Enum value maps for RBAC_EnforcementType. -var ( - RBAC_EnforcementType_name = map[int32]string{ - 0: "ONE_TIME_ON_FIRST_BYTE", - 1: "CONTINUOUS", - } - RBAC_EnforcementType_value = map[string]int32{ - "ONE_TIME_ON_FIRST_BYTE": 0, - "CONTINUOUS": 1, - } -) - -func (x RBAC_EnforcementType) Enum() *RBAC_EnforcementType { - p := new(RBAC_EnforcementType) - *p = x - return p -} - -func (x RBAC_EnforcementType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RBAC_EnforcementType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_enumTypes[0].Descriptor() -} - -func (RBAC_EnforcementType) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_enumTypes[0] -} - -func (x RBAC_EnforcementType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RBAC_EnforcementType.Descriptor instead. -func (RBAC_EnforcementType) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{0, 0} -} - -// RBAC network filter config. -// -// Header should not be used in rules/shadow_rules in RBAC network filter as -// this information is only available in :ref:`RBAC http filter `. -type RBAC struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify the RBAC rules to be applied globally. - // If absent, no enforcing RBAC policy will be applied. - Rules *v4alpha.RBAC `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"` - // Shadow rules are not enforced by the filter but will emit stats and logs - // and can be used for rule testing. - // If absent, no shadow RBAC policy will be applied. - ShadowRules *v4alpha.RBAC `protobuf:"bytes,2,opt,name=shadow_rules,json=shadowRules,proto3" json:"shadow_rules,omitempty"` - // The prefix to use when emitting statistics. - StatPrefix string `protobuf:"bytes,3,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // RBAC enforcement strategy. By default RBAC will be enforced only once - // when the first byte of data arrives from the downstream. When used in - // conjunction with filters that emit dynamic metadata after decoding - // every payload (e.g., Mongo, MySQL, Kafka) set the enforcement type to - // CONTINUOUS to enforce RBAC policies on every message boundary. - EnforcementType RBAC_EnforcementType `protobuf:"varint,4,opt,name=enforcement_type,json=enforcementType,proto3,enum=envoy.extensions.filters.network.rbac.v4alpha.RBAC_EnforcementType" json:"enforcement_type,omitempty"` -} - -func (x *RBAC) Reset() { - *x = RBAC{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RBAC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RBAC) ProtoMessage() {} - -func (x *RBAC) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RBAC.ProtoReflect.Descriptor instead. -func (*RBAC) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescGZIP(), []int{0} -} - -func (x *RBAC) GetRules() *v4alpha.RBAC { - if x != nil { - return x.Rules - } - return nil -} - -func (x *RBAC) GetShadowRules() *v4alpha.RBAC { - if x != nil { - return x.ShadowRules - } - return nil -} - -func (x *RBAC) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *RBAC) GetEnforcementType() RBAC_EnforcementType { - if x != nil { - return x.EnforcementType - } - return RBAC_ONE_TIME_ON_FIRST_BYTE -} - -var File_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, - 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x03, 0x0a, 0x04, 0x52, - 0x42, 0x41, 0x43, 0x12, 0x35, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, - 0x42, 0x41, 0x43, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0c, 0x73, 0x68, - 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x42, 0x41, - 0x43, 0x52, 0x0b, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x28, - 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x6e, 0x0a, 0x10, 0x65, 0x6e, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x0f, 0x45, 0x6e, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4f, - 0x4e, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, - 0x5f, 0x42, 0x59, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x54, 0x49, - 0x4e, 0x55, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x42, 0x52, 0x0a, - 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x09, 0x52, 0x62, - 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescData = file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDesc -) - -func file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDescData -} - -var file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_goTypes = []interface{}{ - (RBAC_EnforcementType)(0), // 0: envoy.extensions.filters.network.rbac.v4alpha.RBAC.EnforcementType - (*RBAC)(nil), // 1: envoy.extensions.filters.network.rbac.v4alpha.RBAC - (*v4alpha.RBAC)(nil), // 2: envoy.config.rbac.v4alpha.RBAC -} -var file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.filters.network.rbac.v4alpha.RBAC.rules:type_name -> envoy.config.rbac.v4alpha.RBAC - 2, // 1: envoy.extensions.filters.network.rbac.v4alpha.RBAC.shadow_rules:type_name -> envoy.config.rbac.v4alpha.RBAC - 0, // 2: envoy.extensions.filters.network.rbac.v4alpha.RBAC.enforcement_type:type_name -> envoy.extensions.filters.network.rbac.v4alpha.RBAC.EnforcementType - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_init() } -func file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_init() { - if File_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RBAC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto = out.File - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_rawDesc = nil - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_goTypes = nil - file_envoy_extensions_filters_network_rbac_v4alpha_rbac_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.pb.validate.go b/pkg/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.pb.validate.go deleted file mode 100644 index 9461f538b6..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rbac/v4alpha/rbac.pb.validate.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/rbac/v4alpha/rbac.proto - -package envoy_extensions_filters_network_rbac_v4alpha - -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{} -) - -// Validate checks the field values on RBAC with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *RBAC) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACValidationError{ - field: "Rules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RBACValidationError{ - field: "ShadowRules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return RBACValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - // no validation rules for EnforcementType - - return nil -} - -// RBACValidationError is the validation error returned by RBAC.Validate if the -// designated constraints aren't met. -type RBACValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RBACValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RBACValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RBACValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RBACValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RBACValidationError) ErrorName() string { return "RBACValidationError" } - -// Error satisfies the builtin error interface -func (e RBACValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRBAC.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RBACValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RBACValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.go index fec76a1cb4..fab2818c0c 100644 --- a/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.go @@ -1,17 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto -package envoy_extensions_filters_network_redis_proxy_v3 +package redis_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // ReadPolicy controls how Envoy routes read commands to Redis nodes. This is currently // supported for Redis Cluster. All ReadPolicy settings except MASTER may return stale data // because replication is asynchronous and requires some delay. You need to ensure that your @@ -180,7 +174,7 @@ type RedisProxy struct { // * ``get abc:users`` would retrieve the key 'abc:users' from cluster_b. // * ``get ab:users`` would retrieve the key 'ab:users' from cluster_a. // * ``get z:users`` would return a NoUpstreamHost error. A :ref:`catch-all - // route` + // route` // would have retrieved the key from that cluster instead. // // See the :ref:`configuration section @@ -235,8 +229,6 @@ type RedisProxy struct { // client. If an AUTH command is received when the password is not set, then an "ERR Client sent // AUTH, but no ACL is set" error will be returned. DownstreamAuthUsername *v3.DataSource `protobuf:"bytes,7,opt,name=downstream_auth_username,json=downstreamAuthUsername,proto3" json:"downstream_auth_username,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedCluster string `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_cluster,json=hiddenEnvoyDeprecatedCluster,proto3" json:"hidden_envoy_deprecated_cluster,omitempty"` } func (x *RedisProxy) Reset() { @@ -320,16 +312,8 @@ func (x *RedisProxy) GetDownstreamAuthUsername() *v3.DataSource { return nil } -// Deprecated: Do not use. -func (x *RedisProxy) GetHiddenEnvoyDeprecatedCluster() string { - if x != nil { - return x.HiddenEnvoyDeprecatedCluster - } - return "" -} - // RedisProtocolOptions specifies Redis upstream protocol options. This object is used in -// :ref:`typed_extension_protocol_options`, +// :ref:`typed_extension_protocol_options`, // keyed by the name `envoy.filters.network.redis_proxy`. type RedisProtocolOptions struct { state protoimpl.MessageState @@ -553,8 +537,6 @@ type RedisProxy_PrefixRoutes struct { // Optional catch-all route to forward commands that doesn't match any of the routes. The // catch-all route becomes required when no routes are specified. CatchAllRoute *RedisProxy_PrefixRoutes_Route `protobuf:"bytes,4,opt,name=catch_all_route,json=catchAllRoute,proto3" json:"catch_all_route,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedCatchAllCluster string `protobuf:"bytes,3,opt,name=hidden_envoy_deprecated_catch_all_cluster,json=hiddenEnvoyDeprecatedCatchAllCluster,proto3" json:"hidden_envoy_deprecated_catch_all_cluster,omitempty"` } func (x *RedisProxy_PrefixRoutes) Reset() { @@ -610,14 +592,6 @@ func (x *RedisProxy_PrefixRoutes) GetCatchAllRoute() *RedisProxy_PrefixRoutes_Ro return nil } -// Deprecated: Do not use. -func (x *RedisProxy_PrefixRoutes) GetHiddenEnvoyDeprecatedCatchAllCluster() string { - if x != nil { - return x.HiddenEnvoyDeprecatedCatchAllCluster - } - return "" -} - // RedisFault defines faults used for fault injection. type RedisProxy_RedisFault struct { state protoimpl.MessageState @@ -863,183 +837,171 @@ var file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDe 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x17, 0x0a, 0x0a, 0x52, 0x65, 0x64, 0x69, - 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x12, 0x72, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xdb, 0x16, 0x0a, 0x0a, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x72, 0x0a, 0x08, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x50, + 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x69, + 0x63, 0x72, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6c, 0x61, 0x74, 0x65, + 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x12, 0x6d, 0x0a, 0x0d, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, - 0x69, 0x6e, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, - 0x12, 0x6d, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, - 0x62, 0x0a, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x16, 0x64, 0x6f, 0x77, - 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x12, 0x5e, 0x0a, 0x06, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x0c, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x18, 0x64, 0x6f, + 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, + 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5e, + 0x0a, 0x06, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x62, + 0x0a, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x16, 0x64, 0x6f, 0x77, 0x6e, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x1a, 0xae, 0x06, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x6f, 0x70, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x09, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x48, + 0x61, 0x73, 0x68, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x1c, 0x6d, 0x61, 0x78, + 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x65, 0x66, + 0x6f, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x18, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x4b, 0x0a, 0x14, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x12, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x65, 0x0a, 0x20, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, + 0x6d, 0x61, 0x78, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, + 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x82, 0x01, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x22, 0x7e, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x06, 0x4d, 0x41, 0x53, 0x54, 0x45, 0x52, 0x10, 0x00, 0x1a, 0x0f, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x09, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x12, + 0x29, 0x0a, 0x0d, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x53, 0x54, 0x45, 0x52, + 0x10, 0x01, 0x1a, 0x16, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x10, 0x0a, 0x0e, 0x50, 0x52, 0x45, 0x46, + 0x45, 0x52, 0x5f, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, + 0x50, 0x4c, 0x49, 0x43, 0x41, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x52, 0x45, 0x46, 0x45, + 0x52, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x41, + 0x4e, 0x59, 0x10, 0x04, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x1a, 0x8a, 0x08, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, + 0x63, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x76, 0x0a, 0x0f, 0x63, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x52, 0x0d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, + 0x8a, 0x05, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, + 0x28, 0xe8, 0x07, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x96, 0x01, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x62, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, - 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x55, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x1f, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x1c, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xae, 0x06, 0x0a, 0x10, 0x43, 0x6f, 0x6e, - 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x42, 0x0a, - 0x0a, 0x6f, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x61, 0x73, 0x68, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, - 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3e, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, - 0x53, 0x69, 0x7a, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, - 0x4b, 0x0a, 0x14, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, - 0x46, 0x6c, 0x75, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x65, 0x0a, 0x20, - 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x6d, 0x61, 0x78, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x57, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, - 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, - 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, - 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, - 0x72, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x7e, 0x0a, 0x0a, 0x52, 0x65, - 0x61, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x06, 0x4d, 0x41, 0x53, 0x54, - 0x45, 0x52, 0x10, 0x00, 0x1a, 0x0f, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x09, 0x0a, 0x07, 0x50, 0x52, - 0x49, 0x4d, 0x41, 0x52, 0x59, 0x12, 0x29, 0x0a, 0x0d, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, - 0x4d, 0x41, 0x53, 0x54, 0x45, 0x52, 0x10, 0x01, 0x1a, 0x16, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x10, - 0x0a, 0x0e, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, - 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x10, 0x02, 0x12, 0x12, 0x0a, - 0x0e, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x10, - 0x03, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x04, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, - 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, - 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, - 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, - 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0xd4, 0x08, 0x0a, 0x0c, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x06, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, - 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, - 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x61, - 0x73, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x76, 0x0a, - 0x0f, 0x63, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x61, 0x0a, 0x29, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, - 0x05, 0x01, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6c, - 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x8a, 0x05, 0x0a, 0x05, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x12, 0x20, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0xe8, 0x07, 0x52, 0x06, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x96, 0x01, 0x0a, - 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x62, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xac, 0x02, 0x0a, + 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, + 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x3a, 0x63, 0x9a, 0xc5, 0x88, 0x1e, 0x5e, 0x0a, 0x5c, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x4f, 0x9a, 0xc5, 0x88, + 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xac, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x59, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x3a, - 0x63, 0x9a, 0xc5, 0x88, 0x1e, 0x5e, 0x0a, 0x5c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x4f, 0x9a, 0xc5, 0x88, 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x49, 0x9a, 0xc5, 0x88, 0x1e, 0x44, 0x0a, 0x42, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x49, 0x9a, 0xc5, + 0x88, 0x1e, 0x44, 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, + 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x11, 0x63, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xe0, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x64, 0x69, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x7e, 0x0a, 0x0a, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x55, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, @@ -1066,29 +1028,36 @@ var file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDe 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0d, 0x61, 0x75, - 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0c, 0x61, 0x75, 0x74, - 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x4d, 0x0a, 0x0d, 0x61, 0x75, 0x74, - 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0d, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, - 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, - 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, - 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x5a, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x4d, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, + 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0xc0, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, + 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.go index 7fb381106e..933d86db98 100644 --- a/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto -package envoy_extensions_filters_network_redis_proxy_v3 +package redis_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,31 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RedisProxy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RedisProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RedisProxyMultiError, or +// nil if none found. +func (m *RedisProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return RedisProxyValidationError{ + err := RedisProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetSettings() == nil { - return RedisProxyValidationError{ + err := RedisProxyValidationError{ field: "Settings", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSettings()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "Settings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "Settings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSettings()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "Settings", @@ -66,7 +110,26 @@ func (m *RedisProxy) Validate() error { // no validation rules for LatencyInMicros - if v, ok := interface{}(m.GetPrefixRoutes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrefixRoutes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "PrefixRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "PrefixRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrefixRoutes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "PrefixRoutes", @@ -76,7 +139,26 @@ func (m *RedisProxy) Validate() error { } } - if v, ok := interface{}(m.GetDownstreamAuthPassword()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamAuthPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamAuthPassword()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "DownstreamAuthPassword", @@ -89,7 +171,26 @@ func (m *RedisProxy) Validate() error { for idx, item := range m.GetFaults() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: fmt.Sprintf("Faults[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: fmt.Sprintf("Faults[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: fmt.Sprintf("Faults[%v]", idx), @@ -101,7 +202,26 @@ func (m *RedisProxy) Validate() error { } - if v, ok := interface{}(m.GetDownstreamAuthUsername()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamAuthUsername()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamAuthUsername()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "DownstreamAuthUsername", @@ -111,11 +231,29 @@ func (m *RedisProxy) Validate() error { } } - // no validation rules for HiddenEnvoyDeprecatedCluster + if len(errors) > 0 { + return RedisProxyMultiError(errors) + } return nil } +// RedisProxyMultiError is an error wrapping multiple validation errors +// returned by RedisProxy.ValidateAll() if the designated constraints aren't met. +type RedisProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxyMultiError) AllErrors() []error { return m } + // RedisProxyValidationError is the validation error returned by // RedisProxy.Validate if the designated constraints aren't met. type RedisProxyValidationError struct { @@ -172,13 +310,46 @@ var _ interface { // Validate checks the field values on RedisProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisProtocolOptionsMultiError, or nil if none found. +func (m *RedisProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAuthPassword()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAuthPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthPassword()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProtocolOptionsValidationError{ field: "AuthPassword", @@ -188,7 +359,26 @@ func (m *RedisProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetAuthUsername()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAuthUsername()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthUsername()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProtocolOptionsValidationError{ field: "AuthUsername", @@ -198,9 +388,30 @@ func (m *RedisProtocolOptions) Validate() error { } } + if len(errors) > 0 { + return RedisProtocolOptionsMultiError(errors) + } + return nil } +// RedisProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by RedisProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type RedisProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProtocolOptionsMultiError) AllErrors() []error { return m } + // RedisProtocolOptionsValidationError is the validation error returned by // RedisProtocolOptions.Validate if the designated constraints aren't met. type RedisProtocolOptionsValidationError struct { @@ -259,17 +470,35 @@ var _ interface { // Validate checks the field values on RedisProxy_ConnPoolSettings with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProxy_ConnPoolSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_ConnPoolSettings with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisProxy_ConnPoolSettingsMultiError, or nil if none found. +func (m *RedisProxy_ConnPoolSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_ConnPoolSettings) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetOpTimeout() == nil { - return RedisProxy_ConnPoolSettingsValidationError{ + err := RedisProxy_ConnPoolSettingsValidationError{ field: "OpTimeout", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for EnableHashtagging @@ -278,7 +507,26 @@ func (m *RedisProxy_ConnPoolSettings) Validate() error { // no validation rules for MaxBufferSizeBeforeFlush - if v, ok := interface{}(m.GetBufferFlushTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetBufferFlushTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "BufferFlushTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "BufferFlushTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferFlushTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "BufferFlushTimeout", @@ -288,7 +536,26 @@ func (m *RedisProxy_ConnPoolSettings) Validate() error { } } - if v, ok := interface{}(m.GetMaxUpstreamUnknownConnections()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxUpstreamUnknownConnections()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "MaxUpstreamUnknownConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "MaxUpstreamUnknownConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxUpstreamUnknownConnections()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "MaxUpstreamUnknownConnections", @@ -301,15 +568,40 @@ func (m *RedisProxy_ConnPoolSettings) Validate() error { // no validation rules for EnableCommandStats if _, ok := RedisProxy_ConnPoolSettings_ReadPolicy_name[int32(m.GetReadPolicy())]; !ok { - return RedisProxy_ConnPoolSettingsValidationError{ + err := RedisProxy_ConnPoolSettingsValidationError{ field: "ReadPolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RedisProxy_ConnPoolSettingsMultiError(errors) } return nil } +// RedisProxy_ConnPoolSettingsMultiError is an error wrapping multiple +// validation errors returned by RedisProxy_ConnPoolSettings.ValidateAll() if +// the designated constraints aren't met. +type RedisProxy_ConnPoolSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_ConnPoolSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_ConnPoolSettingsMultiError) AllErrors() []error { return m } + // RedisProxy_ConnPoolSettingsValidationError is the validation error returned // by RedisProxy_ConnPoolSettings.Validate if the designated constraints // aren't met. @@ -369,16 +661,49 @@ var _ interface { // Validate checks the field values on RedisProxy_PrefixRoutes with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProxy_PrefixRoutes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_PrefixRoutes with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisProxy_PrefixRoutesMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutesValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -392,7 +717,26 @@ func (m *RedisProxy_PrefixRoutes) Validate() error { // no validation rules for CaseInsensitive - if v, ok := interface{}(m.GetCatchAllRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCatchAllRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: "CatchAllRoute", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: "CatchAllRoute", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCatchAllRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutesValidationError{ field: "CatchAllRoute", @@ -402,11 +746,30 @@ func (m *RedisProxy_PrefixRoutes) Validate() error { } } - // no validation rules for HiddenEnvoyDeprecatedCatchAllCluster + if len(errors) > 0 { + return RedisProxy_PrefixRoutesMultiError(errors) + } return nil } +// RedisProxy_PrefixRoutesMultiError is an error wrapping multiple validation +// errors returned by RedisProxy_PrefixRoutes.ValidateAll() if the designated +// constraints aren't met. +type RedisProxy_PrefixRoutesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutesMultiError) AllErrors() []error { return m } + // RedisProxy_PrefixRoutesValidationError is the validation error returned by // RedisProxy_PrefixRoutes.Validate if the designated constraints aren't met. type RedisProxy_PrefixRoutesValidationError struct { @@ -465,27 +828,68 @@ var _ interface { // Validate checks the field values on RedisProxy_RedisFault with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProxy_RedisFault) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_RedisFault with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RedisProxy_RedisFaultMultiError, or nil if none found. +func (m *RedisProxy_RedisFault) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_RedisFault) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := RedisProxy_RedisFault_RedisFaultType_name[int32(m.GetFaultType())]; !ok { - return RedisProxy_RedisFaultValidationError{ + err := RedisProxy_RedisFaultValidationError{ field: "FaultType", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if m.GetFaultEnabled() == nil { - return RedisProxy_RedisFaultValidationError{ + err := RedisProxy_RedisFaultValidationError{ field: "FaultEnabled", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetFaultEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFaultEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "FaultEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "FaultEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFaultEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_RedisFaultValidationError{ field: "FaultEnabled", @@ -495,7 +899,26 @@ func (m *RedisProxy_RedisFault) Validate() error { } } - if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_RedisFaultValidationError{ field: "Delay", @@ -505,9 +928,30 @@ func (m *RedisProxy_RedisFault) Validate() error { } } + if len(errors) > 0 { + return RedisProxy_RedisFaultMultiError(errors) + } + return nil } +// RedisProxy_RedisFaultMultiError is an error wrapping multiple validation +// errors returned by RedisProxy_RedisFault.ValidateAll() if the designated +// constraints aren't met. +type RedisProxy_RedisFaultMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_RedisFaultMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_RedisFaultMultiError) AllErrors() []error { return m } + // RedisProxy_RedisFaultValidationError is the validation error returned by // RedisProxy_RedisFault.Validate if the designated constraints aren't met. type RedisProxy_RedisFaultValidationError struct { @@ -566,32 +1010,73 @@ var _ interface { // Validate checks the field values on RedisProxy_PrefixRoutes_Route with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RedisProxy_PrefixRoutes_Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_PrefixRoutes_Route with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RedisProxy_PrefixRoutes_RouteMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes_Route) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes_Route) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPrefix()) > 1000 { - return RedisProxy_PrefixRoutes_RouteValidationError{ + err := RedisProxy_PrefixRoutes_RouteValidationError{ field: "Prefix", reason: "value length must be at most 1000 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for RemovePrefix if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RedisProxy_PrefixRoutes_RouteValidationError{ + err := RedisProxy_PrefixRoutes_RouteValidationError{ field: "Cluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRequestMirrorPolicy() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_RouteValidationError{ + field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_RouteValidationError{ + field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutes_RouteValidationError{ field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), @@ -603,9 +1088,30 @@ func (m *RedisProxy_PrefixRoutes_Route) Validate() error { } + if len(errors) > 0 { + return RedisProxy_PrefixRoutes_RouteMultiError(errors) + } + return nil } +// RedisProxy_PrefixRoutes_RouteMultiError is an error wrapping multiple +// validation errors returned by RedisProxy_PrefixRoutes_Route.ValidateAll() +// if the designated constraints aren't met. +type RedisProxy_PrefixRoutes_RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutes_RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutes_RouteMultiError) AllErrors() []error { return m } + // RedisProxy_PrefixRoutes_RouteValidationError is the validation error // returned by RedisProxy_PrefixRoutes_Route.Validate if the designated // constraints aren't met. @@ -665,21 +1171,59 @@ var _ interface { // Validate checks the field values on // RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + err := RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ field: "Cluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ field: "RuntimeFraction", @@ -691,9 +1235,31 @@ func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) Validate() error { // no validation rules for ExcludeReadCommands + if len(errors) > 0 { + return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError(errors) + } + return nil } +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError is an error +// wrapping multiple validation errors returned by +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.ValidateAll() if the +// designated constraints aren't met. +type RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError) AllErrors() []error { return m } + // RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError is the // validation error returned by // RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.Validate if the diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.pb.go deleted file mode 100644 index 129e39d5e3..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.pb.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v3 - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type RocketmqProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The human readable prefix to use when emitting statistics. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // The route table for the connection manager is specified in this property. - RouteConfig *RouteConfiguration `protobuf:"bytes,2,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` - // The largest duration transient object expected to live, more than 10s is recommended. - TransientObjectLifeSpan *duration.Duration `protobuf:"bytes,3,opt,name=transient_object_life_span,json=transientObjectLifeSpan,proto3" json:"transient_object_life_span,omitempty"` - // If develop_mode is enabled, this proxy plugin may work without dedicated traffic intercepting - // facility without considering backward compatibility of exiting RocketMQ client SDK. - DevelopMode bool `protobuf:"varint,4,opt,name=develop_mode,json=developMode,proto3" json:"develop_mode,omitempty"` -} - -func (x *RocketmqProxy) Reset() { - *x = RocketmqProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RocketmqProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RocketmqProxy) ProtoMessage() {} - -func (x *RocketmqProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RocketmqProxy.ProtoReflect.Descriptor instead. -func (*RocketmqProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescGZIP(), []int{0} -} - -func (x *RocketmqProxy) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *RocketmqProxy) GetRouteConfig() *RouteConfiguration { - if x != nil { - return x.RouteConfig - } - return nil -} - -func (x *RocketmqProxy) GetTransientObjectLifeSpan() *duration.Duration { - if x != nil { - return x.TransientObjectLifeSpan - } - return nil -} - -func (x *RocketmqProxy) GetDevelopMode() bool { - if x != nil { - return x.DevelopMode - } - return false -} - -var File_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDesc = []byte{ - 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x3e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, - 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, - 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, - 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x02, 0x0a, 0x0d, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x69, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, - 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, 0x1a, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6c, - 0x69, 0x66, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x66, 0x65, 0x53, 0x70, - 0x61, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x60, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x52, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x6d, 0x71, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescData = file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDesc -) - -func file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDescData -} - -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_goTypes = []interface{}{ - (*RocketmqProxy)(nil), // 0: envoy.extensions.filters.network.rocketmq_proxy.v3.RocketmqProxy - (*RouteConfiguration)(nil), // 1: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteConfiguration - (*duration.Duration)(nil), // 2: google.protobuf.Duration -} -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.rocketmq_proxy.v3.RocketmqProxy.route_config:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v3.RouteConfiguration - 2, // 1: envoy.extensions.filters.network.rocketmq_proxy.v3.RocketmqProxy.transient_object_life_span:type_name -> google.protobuf.Duration - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_init() } -func file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_init() { - if File_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto != nil { - return - } - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RocketmqProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto = out.File - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v3_rocketmq_proxy_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.pb.validate.go deleted file mode 100644 index 258629be03..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.pb.validate.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v3 - -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{} -) - -// Validate checks the field values on RocketmqProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RocketmqProxy) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return RocketmqProxyValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RocketmqProxyValidationError{ - field: "RouteConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTransientObjectLifeSpan()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RocketmqProxyValidationError{ - field: "TransientObjectLifeSpan", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DevelopMode - - return nil -} - -// RocketmqProxyValidationError is the validation error returned by -// RocketmqProxy.Validate if the designated constraints aren't met. -type RocketmqProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RocketmqProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RocketmqProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RocketmqProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RocketmqProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RocketmqProxyValidationError) ErrorName() string { return "RocketmqProxyValidationError" } - -// Error satisfies the builtin error interface -func (e RocketmqProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRocketmqProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RocketmqProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RocketmqProxyValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.pb.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.pb.go deleted file mode 100644 index 4d0b7bfb9b..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.pb.go +++ /dev/null @@ -1,443 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v3 - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type RouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the route configuration. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"` -} - -func (x *RouteConfiguration) Reset() { - *x = RouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteConfiguration) ProtoMessage() {} - -func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. -func (*RouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteConfiguration) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Route matching parameters. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Route request to some upstream cluster. - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescGZIP(), []int{1} -} - -func (x *Route) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (x *Route) GetRoute() *RouteAction { - if x != nil { - return x.Route - } - return nil -} - -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the topic. - Topic *v3.StringMatcher `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,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 []*v31.HeaderMatcher `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescGZIP(), []int{2} -} - -func (x *RouteMatch) GetTopic() *v3.StringMatcher { - if x != nil { - return x.Topic - } - return nil -} - -func (x *RouteMatch) GetHeaders() []*v31.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -type RouteAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Indicates the upstream cluster to which the request should be routed. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. - MetadataMatch *v32.Metadata `protobuf:"bytes,2,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` -} - -func (x *RouteAction) Reset() { - *x = RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction) ProtoMessage() {} - -func (x *RouteAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. -func (*RouteAction) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescGZIP(), []int{3} -} - -func (x *RouteAction) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *RouteAction) GetMetadataMatch() *v32.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -var File_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDesc = []byte{ - 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x06, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, - 0xc8, 0x01, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x5e, 0x0a, 0x05, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5f, 0x0a, 0x05, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x05, 0x74, 0x6f, 0x70, - 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, - 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, - 0x77, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, - 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x58, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescData = file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDesc -) - -func file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDescData -} - -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteConfiguration - (*Route)(nil), // 1: envoy.extensions.filters.network.rocketmq_proxy.v3.Route - (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteMatch - (*RouteAction)(nil), // 3: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteAction - (*v3.StringMatcher)(nil), // 4: envoy.type.matcher.v3.StringMatcher - (*v31.HeaderMatcher)(nil), // 5: envoy.config.route.v3.HeaderMatcher - (*v32.Metadata)(nil), // 6: envoy.config.core.v3.Metadata -} -var file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteConfiguration.routes:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v3.Route - 2, // 1: envoy.extensions.filters.network.rocketmq_proxy.v3.Route.match:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v3.RouteMatch - 3, // 2: envoy.extensions.filters.network.rocketmq_proxy.v3.Route.route:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v3.RouteAction - 4, // 3: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteMatch.topic:type_name -> envoy.type.matcher.v3.StringMatcher - 5, // 4: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 6, // 5: envoy.extensions.filters.network.rocketmq_proxy.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_init() } -func file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_init() { - if File_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto = out.File - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_rawDesc = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_goTypes = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v3_route_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.pb.validate.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.pb.validate.go deleted file mode 100644 index 5f358b0826..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v3/route.pb.validate.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v3 - -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{} -) - -// 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.GetRoutes() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - 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{} - -// 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 - } - - 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 m.GetRoute() == nil { - return RouteValidationError{ - field: "Route", - reason: "value is required", - } - } - - 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, - } - } - } - - 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 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 m.GetTopic() == nil { - return RouteMatchValidationError{ - field: "Topic", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetTopic()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "Topic", - 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, - } - } - } - - } - - 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 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 utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteActionValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - 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{} diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.pb.go deleted file mode 100644 index a5407f212d..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.pb.go +++ /dev/null @@ -1,232 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type RocketmqProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The human readable prefix to use when emitting statistics. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // The route table for the connection manager is specified in this property. - RouteConfig *RouteConfiguration `protobuf:"bytes,2,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` - // The largest duration transient object expected to live, more than 10s is recommended. - TransientObjectLifeSpan *duration.Duration `protobuf:"bytes,3,opt,name=transient_object_life_span,json=transientObjectLifeSpan,proto3" json:"transient_object_life_span,omitempty"` - // If develop_mode is enabled, this proxy plugin may work without dedicated traffic intercepting - // facility without considering backward compatibility of exiting RocketMQ client SDK. - DevelopMode bool `protobuf:"varint,4,opt,name=develop_mode,json=developMode,proto3" json:"develop_mode,omitempty"` -} - -func (x *RocketmqProxy) Reset() { - *x = RocketmqProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RocketmqProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RocketmqProxy) ProtoMessage() {} - -func (x *RocketmqProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RocketmqProxy.ProtoReflect.Descriptor instead. -func (*RocketmqProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescGZIP(), []int{0} -} - -func (x *RocketmqProxy) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *RocketmqProxy) GetRouteConfig() *RouteConfiguration { - if x != nil { - return x.RouteConfig - } - return nil -} - -func (x *RocketmqProxy) GetTransientObjectLifeSpan() *duration.Duration { - if x != nil { - return x.TransientObjectLifeSpan - } - return nil -} - -func (x *RocketmqProxy) GetDevelopMode() bool { - if x != nil { - return x.DevelopMode - } - return false -} - -var File_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDesc = []byte{ - 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xed, 0x02, 0x0a, 0x0d, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x6e, - 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, - 0x0a, 0x1a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, - 0x66, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, - 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, - 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x42, 0x65, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x12, 0x52, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescData = file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDesc -) - -func file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDescData -} - -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_goTypes = []interface{}{ - (*RocketmqProxy)(nil), // 0: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RocketmqProxy - (*RouteConfiguration)(nil), // 1: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteConfiguration - (*duration.Duration)(nil), // 2: google.protobuf.Duration -} -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RocketmqProxy.route_config:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteConfiguration - 2, // 1: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RocketmqProxy.transient_object_life_span:type_name -> google.protobuf.Duration - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_init() } -func file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_init() { - if File_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto != nil { - return - } - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RocketmqProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto = out.File - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_rocketmq_proxy_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.pb.validate.go deleted file mode 100644 index b60cecb26c..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.pb.validate.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/rocketmq_proxy/v4alpha/rocketmq_proxy.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v4alpha - -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{} -) - -// Validate checks the field values on RocketmqProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RocketmqProxy) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return RocketmqProxyValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RocketmqProxyValidationError{ - field: "RouteConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTransientObjectLifeSpan()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RocketmqProxyValidationError{ - field: "TransientObjectLifeSpan", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DevelopMode - - return nil -} - -// RocketmqProxyValidationError is the validation error returned by -// RocketmqProxy.Validate if the designated constraints aren't met. -type RocketmqProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RocketmqProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RocketmqProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RocketmqProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RocketmqProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RocketmqProxyValidationError) ErrorName() string { return "RocketmqProxyValidationError" } - -// Error satisfies the builtin error interface -func (e RocketmqProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRocketmqProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RocketmqProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RocketmqProxyValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.pb.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.pb.go deleted file mode 100644 index f3285ec931..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.pb.go +++ /dev/null @@ -1,465 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type RouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the route configuration. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"` -} - -func (x *RouteConfiguration) Reset() { - *x = RouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteConfiguration) ProtoMessage() {} - -func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. -func (*RouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteConfiguration) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Route matching parameters. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Route request to some upstream cluster. - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescGZIP(), []int{1} -} - -func (x *Route) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (x *Route) GetRoute() *RouteAction { - if x != nil { - return x.Route - } - return nil -} - -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the topic. - Topic *v4alpha.StringMatcher `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,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 []*v4alpha1.HeaderMatcher `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescGZIP(), []int{2} -} - -func (x *RouteMatch) GetTopic() *v4alpha.StringMatcher { - if x != nil { - return x.Topic - } - return nil -} - -func (x *RouteMatch) GetHeaders() []*v4alpha1.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -type RouteAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Indicates the upstream cluster to which the request should be routed. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. - MetadataMatch *v4alpha2.Metadata `protobuf:"bytes,2,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` -} - -func (x *RouteAction) Reset() { - *x = RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction) ProtoMessage() {} - -func (x *RouteAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. -func (*RouteAction) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescGZIP(), []int{3} -} - -func (x *RouteAction) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *RouteAction) GetMetadataMatch() *v4alpha2.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -var File_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDesc = []byte{ - 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x12, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x4c, - 0x9a, 0xc5, 0x88, 0x1e, 0x47, 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x02, 0x0a, - 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x63, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, - 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x64, 0x0a, 0x05, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x49, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x43, 0x0a, 0x07, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xc3, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0e, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5d, 0x0a, - 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x72, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescData = file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDesc -) - -func file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDescData -} - -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteConfiguration - (*Route)(nil), // 1: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.Route - (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteMatch - (*RouteAction)(nil), // 3: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteAction - (*v4alpha.StringMatcher)(nil), // 4: envoy.type.matcher.v4alpha.StringMatcher - (*v4alpha1.HeaderMatcher)(nil), // 5: envoy.config.route.v4alpha.HeaderMatcher - (*v4alpha2.Metadata)(nil), // 6: envoy.config.core.v4alpha.Metadata -} -var file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteConfiguration.routes:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v4alpha.Route - 2, // 1: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.Route.match:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteMatch - 3, // 2: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.Route.route:type_name -> envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteAction - 4, // 3: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteMatch.topic:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 5, // 4: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteMatch.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 6, // 5: envoy.extensions.filters.network.rocketmq_proxy.v4alpha.RouteAction.metadata_match:type_name -> envoy.config.core.v4alpha.Metadata - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_init() } -func file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_init() { - if File_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto = out.File - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_rawDesc = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_goTypes = nil - file_envoy_extensions_filters_network_rocketmq_proxy_v4alpha_route_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.pb.validate.go b/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.pb.validate.go deleted file mode 100644 index 09a328a768..0000000000 --- a/pkg/api/envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.pb.validate.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/rocketmq_proxy/v4alpha/route.proto - -package envoy_extensions_filters_network_rocketmq_proxy_v4alpha - -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{} -) - -// 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.GetRoutes() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - 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{} - -// 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 - } - - 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 m.GetRoute() == nil { - return RouteValidationError{ - field: "Route", - reason: "value is required", - } - } - - 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, - } - } - } - - 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 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 m.GetTopic() == nil { - return RouteMatchValidationError{ - field: "Topic", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetTopic()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "Topic", - 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, - } - } - } - - } - - 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 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 utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteActionValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - 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{} diff --git a/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.go b/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.go index bcc52b03e6..4815abf934 100644 --- a/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.go +++ b/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto -package envoy_extensions_filters_network_sni_cluster_v3 +package sni_clusterv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type SniCluster struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -83,13 +78,19 @@ var file_envoy_extensions_filters_network_sni_cluster_v3_sni_cluster_proto_rawDe 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x6e, 0x69, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x42, 0x5a, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x53, 0x6e, 0x69, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x42, 0xc0, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x53, 0x6e, 0x69, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x73, 0x6e, 0x69, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.validate.go b/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.validate.go index c32207b207..f4c3997f97 100644 --- a/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto -package envoy_extensions_filters_network_sni_cluster_v3 +package sni_clusterv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SniCluster with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SniCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SniCluster with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SniClusterMultiError, or +// nil if none found. +func (m *SniCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *SniCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SniClusterMultiError(errors) + } + return nil } +// SniClusterMultiError is an error wrapping multiple validation errors +// returned by SniCluster.ValidateAll() if the designated constraints aren't met. +type SniClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SniClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SniClusterMultiError) AllErrors() []error { return m } + // SniClusterValidationError is the validation error returned by // SniCluster.Validate if the designated constraints aren't met. type SniClusterValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.pb.go similarity index 50% rename from pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.pb.go rename to pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.pb.go index ea8978db6d..c734ead044 100644 --- a/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto -package envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha +package sni_dynamic_forward_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/dynamic_forward_proxy/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the SNI-based dynamic forward proxy filter. See the // :ref:`architecture overview ` for // more information. Note this filter must be configured along with @@ -42,7 +37,7 @@ type FilterConfig struct { // The DNS cache configuration that the filter will attach to. Note this // configuration must match that of associated :ref:`dynamic forward proxy // cluster configuration - // `. + // `. DnsCacheConfig *v3.DnsCacheConfig `protobuf:"bytes,1,opt,name=dns_cache_config,json=dnsCacheConfig,proto3" json:"dns_cache_config,omitempty"` // Types that are assignable to PortSpecifier: // *FilterConfig_PortValue @@ -52,7 +47,7 @@ type FilterConfig struct { func (x *FilterConfig) Reset() { *x = FilterConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_msgTypes[0] + mi := &file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -65,7 +60,7 @@ func (x *FilterConfig) String() string { func (*FilterConfig) ProtoMessage() {} func (x *FilterConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_msgTypes[0] + mi := &file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78,7 +73,7 @@ func (x *FilterConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterConfig.ProtoReflect.Descriptor instead. func (*FilterConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescGZIP(), []int{0} + return file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescGZIP(), []int{0} } func (x *FilterConfig) GetDnsCacheConfig() *v3.DnsCacheConfig { @@ -113,72 +108,77 @@ type FilterConfig_PortValue struct { func (*FilterConfig_PortValue) isFilterConfig_PortSpecifier() {} -var File_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto protoreflect.FileDescriptor +var File_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto protoreflect.FileDescriptor -var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDesc = []byte{ - 0x0a, 0x62, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, +var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDesc = []byte{ + 0x0a, 0x5d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, - 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x63, - 0x61, 0x63, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x64, 0x6e, - 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x0a, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0xff, 0xff, 0x03, 0x20, 0x00, 0x48, 0x00, 0x52, - 0x09, 0x70, 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x81, 0x01, 0x0a, - 0x50, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x1b, 0x53, 0x6e, 0x69, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x46, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x40, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, + 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x10, 0x64, 0x6e, 0x73, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0e, 0x64, 0x6e, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x2c, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0xff, 0xff, 0x03, 0x20, 0x00, + 0x48, 0x00, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x10, 0x0a, + 0x0e, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, + 0xf7, 0x01, 0x0a, 0x4b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, + 0x1b, 0x53, 0x6e, 0x69, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x46, 0x6f, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x80, + 0x01, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x6e, 0x69, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescData = file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDesc + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescData = file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDesc ) -func file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescData) +func file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescData) }) - return file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDescData + return file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDescData } -var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_goTypes = []interface{}{ - (*FilterConfig)(nil), // 0: envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha.FilterConfig +var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_goTypes = []interface{}{ + (*FilterConfig)(nil), // 0: envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3.FilterConfig (*v3.DnsCacheConfig)(nil), // 1: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig } -var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha.FilterConfig.dns_cache_config:type_name -> envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig +var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3.FilterConfig.dns_cache_config:type_name -> envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -187,14 +187,14 @@ var file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_ } func init() { - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_init() + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_init() } -func file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_init() { - if File_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto != nil { +func file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_init() { + if File_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FilterConfig); i { case 0: return &v.state @@ -207,25 +207,25 @@ func file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni } } } - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ (*FilterConfig_PortValue)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDesc, + RawDescriptor: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_msgTypes, + GoTypes: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_msgTypes, }.Build() - File_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto = out.File - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha_sni_dynamic_forward_proxy_proto_depIdxs = nil + File_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto = out.File + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_goTypes = nil + file_envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3_sni_dynamic_forward_proxy_proto_depIdxs = nil } diff --git a/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.pb.validate.go similarity index 53% rename from pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.pb.validate.go rename to pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.pb.validate.go index 6810b6529c..be1533461b 100644 --- a/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto +// source: envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto -package envoy_extensions_filters_network_sni_dynamic_forward_proxy_v3alpha +package sni_dynamic_forward_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDnsCacheConfig() == nil { - return FilterConfigValidationError{ + err := FilterConfigValidationError{ field: "DnsCacheConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDnsCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "DnsCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsCacheConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterConfigValidationError{ field: "DnsCacheConfig", @@ -63,17 +102,41 @@ func (m *FilterConfig) Validate() error { case *FilterConfig_PortValue: if val := m.GetPortValue(); val <= 0 || val > 65535 { - return FilterConfigValidationError{ + err := FilterConfigValidationError{ field: "PortValue", reason: "value must be inside range (0, 65535]", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil } +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + // FilterConfigValidationError is the validation error returned by // FilterConfig.Validate if the designated constraints aren't met. type FilterConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.go index 188b642d79..2b5ece350f 100644 --- a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto -package envoy_extensions_filters_network_tcp_proxy_v3 +package tcp_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -28,11 +27,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 14] +// [#next-free-field: 15] type TcpProxy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -45,6 +40,12 @@ type TcpProxy struct { // *TcpProxy_Cluster // *TcpProxy_WeightedClusters ClusterSpecifier isTcpProxy_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` + // The on demand policy for the upstream cluster. + // It applies to both + // :ref:`TcpProxy.cluster ` + // and + // :ref:`TcpProxy.weighted_clusters `. + OnDemand *TcpProxy_OnDemand `protobuf:"bytes,14,opt,name=on_demand,json=onDemand,proto3" json:"on_demand,omitempty"` // 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*. @@ -77,17 +78,13 @@ type TcpProxy struct { // load balancing algorithms will select a host randomly. Currently the number of hash policies is // limited to 1. HashPolicy []*v32.HashPolicy `protobuf:"bytes,11,rep,name=hash_policy,json=hashPolicy,proto3" json:"hash_policy,omitempty"` - // [#not-implemented-hide:] feature in progress - // If set, this configures tunneling, e.g. configuration options to tunnel multiple TCP - // payloads over a shared HTTP/2 tunnel. If this message is absent, the payload - // will be proxied upstream as per usual. + // If set, this configures tunneling, e.g. configuration options to tunnel TCP payload over + // HTTP CONNECT. If this message is absent, the payload will be proxied upstream as per usual. TunnelingConfig *TcpProxy_TunnelingConfig `protobuf:"bytes,12,opt,name=tunneling_config,json=tunnelingConfig,proto3" json:"tunneling_config,omitempty"` // The maximum duration of a connection. The duration is defined as the period since a connection // was established. If not set, there is no max duration. When max_downstream_connection_duration // is reached the connection will be closed. Duration must be at least 1ms. MaxDownstreamConnectionDuration *duration.Duration `protobuf:"bytes,13,opt,name=max_downstream_connection_duration,json=maxDownstreamConnectionDuration,proto3" json:"max_downstream_connection_duration,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedDeprecatedV1 *TcpProxy_DeprecatedV1 `protobuf:"bytes,6,opt,name=hidden_envoy_deprecated_deprecated_v1,json=hiddenEnvoyDeprecatedDeprecatedV1,proto3" json:"hidden_envoy_deprecated_deprecated_v1,omitempty"` } func (x *TcpProxy) Reset() { @@ -150,6 +147,13 @@ func (x *TcpProxy) GetWeightedClusters() *TcpProxy_WeightedCluster { return nil } +func (x *TcpProxy) GetOnDemand() *TcpProxy_OnDemand { + if x != nil { + return x.OnDemand + } + return nil +} + func (x *TcpProxy) GetMetadataMatch() *v3.Metadata { if x != nil { return x.MetadataMatch @@ -213,14 +217,6 @@ func (x *TcpProxy) GetMaxDownstreamConnectionDuration() *duration.Duration { return nil } -// Deprecated: Do not use. -func (x *TcpProxy) GetHiddenEnvoyDeprecatedDeprecatedV1() *TcpProxy_DeprecatedV1 { - if x != nil { - return x.HiddenEnvoyDeprecatedDeprecatedV1 - } - return nil -} - type isTcpProxy_ClusterSpecifier interface { isTcpProxy_ClusterSpecifier() } @@ -293,8 +289,8 @@ func (x *TcpProxy_WeightedCluster) GetClusters() []*TcpProxy_WeightedCluster_Clu } // Configuration for tunneling TCP over other transports or application layers. -// Currently, only HTTP/2 is supported. When other options exist, HTTP/2 will -// remain the default. +// Tunneling is supported over both HTTP/1.1 and HTTP/2. Upstream protocol is +// determined by the cluster configuration. type TcpProxy_TunnelingConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -302,6 +298,16 @@ type TcpProxy_TunnelingConfig struct { // The hostname to send in the synthesized CONNECT headers to the upstream proxy. Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + // Use POST method instead of CONNECT method to tunnel the TCP stream. + // The 'protocol: bytestream' header is also NOT set for HTTP/2 to comply with the spec. + // + // The upstream proxy is expected to convert POST payload as raw TCP. + UsePost bool `protobuf:"varint,2,opt,name=use_post,json=usePost,proto3" json:"use_post,omitempty"` + // Additional request headers to upstream proxy. This is mainly used to + // trigger upstream to convert POST requests back to CONNECT requests. + // + // Neither *:-prefixed* pseudo-headers nor the Host: header can be overridden. + HeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,3,rep,name=headers_to_add,json=headersToAdd,proto3" json:"headers_to_add,omitempty"` } func (x *TcpProxy_TunnelingConfig) Reset() { @@ -343,17 +349,43 @@ func (x *TcpProxy_TunnelingConfig) GetHostname() string { return "" } -// Deprecated: Do not use. -type TcpProxy_DeprecatedV1 struct { +func (x *TcpProxy_TunnelingConfig) GetUsePost() bool { + if x != nil { + return x.UsePost + } + return false +} + +func (x *TcpProxy_TunnelingConfig) GetHeadersToAdd() []*v3.HeaderValueOption { + if x != nil { + return x.HeadersToAdd + } + return nil +} + +type TcpProxy_OnDemand struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Routes []*TcpProxy_DeprecatedV1_TCPRoute `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"` + // An optional configuration for on-demand cluster discovery + // service. If not specified, the on-demand cluster discovery will + // be disabled. When it's specified, the filter will pause a request + // to an unknown cluster and will begin a cluster discovery + // process. When the discovery is finished (successfully or not), + // the request will be resumed. + OdcdsConfig *v3.ConfigSource `protobuf:"bytes,1,opt,name=odcds_config,json=odcdsConfig,proto3" json:"odcds_config,omitempty"` + // xdstp:// resource locator for on-demand cluster collection. + // [#not-implemented-hide:] + ResourcesLocator string `protobuf:"bytes,2,opt,name=resources_locator,json=resourcesLocator,proto3" json:"resources_locator,omitempty"` + // The timeout for on demand cluster lookup. If the CDS cannot return the required cluster, + // the downstream request will be closed with the error code detail NO_CLUSTER_FOUND. + // [#not-implemented-hide:] + Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` } -func (x *TcpProxy_DeprecatedV1) Reset() { - *x = TcpProxy_DeprecatedV1{} +func (x *TcpProxy_OnDemand) Reset() { + *x = TcpProxy_OnDemand{} if protoimpl.UnsafeEnabled { mi := &file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -361,13 +393,13 @@ func (x *TcpProxy_DeprecatedV1) Reset() { } } -func (x *TcpProxy_DeprecatedV1) String() string { +func (x *TcpProxy_OnDemand) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TcpProxy_DeprecatedV1) ProtoMessage() {} +func (*TcpProxy_OnDemand) ProtoMessage() {} -func (x *TcpProxy_DeprecatedV1) ProtoReflect() protoreflect.Message { +func (x *TcpProxy_OnDemand) ProtoReflect() protoreflect.Message { mi := &file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -379,14 +411,28 @@ func (x *TcpProxy_DeprecatedV1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TcpProxy_DeprecatedV1.ProtoReflect.Descriptor instead. -func (*TcpProxy_DeprecatedV1) Descriptor() ([]byte, []int) { +// Deprecated: Use TcpProxy_OnDemand.ProtoReflect.Descriptor instead. +func (*TcpProxy_OnDemand) Descriptor() ([]byte, []int) { return file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_rawDescGZIP(), []int{0, 2} } -func (x *TcpProxy_DeprecatedV1) GetRoutes() []*TcpProxy_DeprecatedV1_TCPRoute { +func (x *TcpProxy_OnDemand) GetOdcdsConfig() *v3.ConfigSource { if x != nil { - return x.Routes + return x.OdcdsConfig + } + return nil +} + +func (x *TcpProxy_OnDemand) GetResourcesLocator() string { + if x != nil { + return x.ResourcesLocator + } + return "" +} + +func (x *TcpProxy_OnDemand) GetTimeout() *duration.Duration { + if x != nil { + return x.Timeout } return nil } @@ -406,7 +452,7 @@ type TcpProxy_WeightedCluster_ClusterWeight struct { // 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:`TcpProxy.metadata_match - // `, with values + // `, with values // here taking precedence. The filter name should be specified as *envoy.lb*. MetadataMatch *v3.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` } @@ -464,86 +510,6 @@ func (x *TcpProxy_WeightedCluster_ClusterWeight) GetMetadataMatch() *v3.Metadata return nil } -// [#next-free-field: 6] -type TcpProxy_DeprecatedV1_TCPRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - DestinationIpList []*v3.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 []*v3.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"` -} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) Reset() { - *x = TcpProxy_DeprecatedV1_TCPRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpProxy_DeprecatedV1_TCPRoute) ProtoMessage() {} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpProxy_DeprecatedV1_TCPRoute.ProtoReflect.Descriptor instead. -func (*TcpProxy_DeprecatedV1_TCPRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_rawDescGZIP(), []int{0, 2, 0} -} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) GetDestinationIpList() []*v3.CidrRange { - if x != nil { - return x.DestinationIpList - } - return nil -} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) GetDestinationPorts() string { - if x != nil { - return x.DestinationPorts - } - return "" -} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) GetSourceIpList() []*v3.CidrRange { - if x != nil { - return x.SourceIpList - } - return nil -} - -func (x *TcpProxy_DeprecatedV1_TCPRoute) GetSourcePorts() string { - if x != nil { - return x.SourcePorts - } - return "" -} - var File_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_rawDesc = []byte{ @@ -556,176 +522,164 @@ var file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_rawDesc = 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x61, - 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x12, 0x0a, 0x08, 0x54, - 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x76, 0x0a, - 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3c, 0x0a, 0x0c, - 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, - 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, 0x0a, 0x17, 0x64, 0x6f, - 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, - 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x43, 0x0a, 0x0a, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x67, 0x12, 0x57, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x68, 0x61, - 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x72, 0x0a, 0x10, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, - 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x0f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x22, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x6f, 0x77, 0x6e, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xfd, 0x0f, 0x0a, 0x08, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x76, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x09, 0x6f, + 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, + 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x51, 0x0a, 0x17, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, + 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, - 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x44, 0x6f, - 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x9a, 0x01, 0x0a, 0x25, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x76, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, - 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x21, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x1a, 0xc7, 0x03, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x08, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x55, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, - 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x1a, 0xec, 0x01, 0x0a, 0x0d, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, - 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, - 0x56, 0x9a, 0xc5, 0x88, 0x1e, 0x51, 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x64, 0x6f, 0x77, + 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, + 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x57, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x12, 0x6d, 0x61, 0x78, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, + 0x44, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x72, 0x0a, 0x10, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x22, 0x6d, 0x61, 0x78, + 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x1f, + 0x6d, 0x61, 0x78, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0xc7, 0x03, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x55, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x1a, 0xec, 0x01, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x56, 0x9a, 0xc5, 0x88, 0x1e, 0x51, 0x0a, 0x4f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, + 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, + 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xf5, 0x01, 0x0a, 0x0f, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, + 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x58, 0x0a, + 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x1a, 0x80, 0x01, 0x0a, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, - 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, - 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x63, 0x70, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xb0, 0x04, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x6f, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x2e, 0x54, 0x43, 0x50, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x1a, 0xe5, 0x02, 0x0a, 0x08, 0x54, 0x43, 0x50, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x72, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, - 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x3a, 0x4e, - 0x9a, 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, - 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x56, 0x31, 0x2e, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x47, - 0x18, 0x01, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x32, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, + 0x79, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x1a, 0xb3, 0x01, 0x0a, 0x08, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x45, + 0x0a, 0x0c, 0x6f, 0x64, 0x63, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x6f, 0x64, 0x63, 0x64, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x56, 0x0a, 0x3b, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, - 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x54, 0x63, 0x70, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x06, 0x10, + 0x07, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x31, + 0x42, 0xb8, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0x42, 0x0d, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -740,38 +694,38 @@ func file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_rawDescG return file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_rawDescData } -var file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_goTypes = []interface{}{ (*TcpProxy)(nil), // 0: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy (*TcpProxy_WeightedCluster)(nil), // 1: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster (*TcpProxy_TunnelingConfig)(nil), // 2: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.TunnelingConfig - (*TcpProxy_DeprecatedV1)(nil), // 3: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.DeprecatedV1 + (*TcpProxy_OnDemand)(nil), // 3: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.OnDemand (*TcpProxy_WeightedCluster_ClusterWeight)(nil), // 4: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster.ClusterWeight - (*TcpProxy_DeprecatedV1_TCPRoute)(nil), // 5: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.DeprecatedV1.TCPRoute - (*v3.Metadata)(nil), // 6: envoy.config.core.v3.Metadata - (*duration.Duration)(nil), // 7: google.protobuf.Duration - (*v31.AccessLog)(nil), // 8: envoy.config.accesslog.v3.AccessLog - (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value - (*v32.HashPolicy)(nil), // 10: envoy.type.v3.HashPolicy - (*v3.CidrRange)(nil), // 11: envoy.config.core.v3.CidrRange + (*v3.Metadata)(nil), // 5: envoy.config.core.v3.Metadata + (*duration.Duration)(nil), // 6: google.protobuf.Duration + (*v31.AccessLog)(nil), // 7: envoy.config.accesslog.v3.AccessLog + (*wrappers.UInt32Value)(nil), // 8: google.protobuf.UInt32Value + (*v32.HashPolicy)(nil), // 9: envoy.type.v3.HashPolicy + (*v3.HeaderValueOption)(nil), // 10: envoy.config.core.v3.HeaderValueOption + (*v3.ConfigSource)(nil), // 11: envoy.config.core.v3.ConfigSource } var file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_depIdxs = []int32{ 1, // 0: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.weighted_clusters:type_name -> envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster - 6, // 1: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.metadata_match:type_name -> envoy.config.core.v3.Metadata - 7, // 2: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.idle_timeout:type_name -> google.protobuf.Duration - 7, // 3: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.downstream_idle_timeout:type_name -> google.protobuf.Duration - 7, // 4: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.upstream_idle_timeout:type_name -> google.protobuf.Duration - 8, // 5: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.access_log:type_name -> envoy.config.accesslog.v3.AccessLog - 9, // 6: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.max_connect_attempts:type_name -> google.protobuf.UInt32Value - 10, // 7: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.hash_policy:type_name -> envoy.type.v3.HashPolicy - 2, // 8: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.tunneling_config:type_name -> envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.TunnelingConfig - 7, // 9: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.max_downstream_connection_duration:type_name -> google.protobuf.Duration - 3, // 10: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.hidden_envoy_deprecated_deprecated_v1:type_name -> envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.DeprecatedV1 + 3, // 1: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.on_demand:type_name -> envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.OnDemand + 5, // 2: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.metadata_match:type_name -> envoy.config.core.v3.Metadata + 6, // 3: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.idle_timeout:type_name -> google.protobuf.Duration + 6, // 4: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.downstream_idle_timeout:type_name -> google.protobuf.Duration + 6, // 5: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.upstream_idle_timeout:type_name -> google.protobuf.Duration + 7, // 6: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.access_log:type_name -> envoy.config.accesslog.v3.AccessLog + 8, // 7: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.max_connect_attempts:type_name -> google.protobuf.UInt32Value + 9, // 8: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.hash_policy:type_name -> envoy.type.v3.HashPolicy + 2, // 9: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.tunneling_config:type_name -> envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.TunnelingConfig + 6, // 10: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.max_downstream_connection_duration:type_name -> google.protobuf.Duration 4, // 11: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster.clusters:type_name -> envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster.ClusterWeight - 5, // 12: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.DeprecatedV1.routes:type_name -> envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.DeprecatedV1.TCPRoute - 6, // 13: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v3.Metadata - 11, // 14: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.DeprecatedV1.TCPRoute.destination_ip_list:type_name -> envoy.config.core.v3.CidrRange - 11, // 15: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.DeprecatedV1.TCPRoute.source_ip_list:type_name -> envoy.config.core.v3.CidrRange + 10, // 12: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.TunnelingConfig.headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 11, // 13: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.OnDemand.odcds_config:type_name -> envoy.config.core.v3.ConfigSource + 6, // 14: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.OnDemand.timeout:type_name -> google.protobuf.Duration + 5, // 15: envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v3.Metadata 16, // [16:16] is the sub-list for method output_type 16, // [16:16] is the sub-list for method input_type 16, // [16:16] is the sub-list for extension type_name @@ -822,7 +776,7 @@ func file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_init() { } } file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProxy_DeprecatedV1); i { + switch v := v.(*TcpProxy_OnDemand); i { case 0: return &v.state case 1: @@ -845,18 +799,6 @@ func file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_init() { return nil } } - file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProxy_DeprecatedV1_TCPRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ (*TcpProxy_Cluster)(nil), @@ -868,7 +810,7 @@ func file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_network_tcp_proxy_v3_tcp_proxy_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.validate.go index c76f1d2cc5..c047ca5ac3 100644 --- a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto -package envoy_extensions_filters_network_tcp_proxy_v3 +package tcp_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,92 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TcpProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TcpProxyMultiError, or nil +// if none found. +func (m *TcpProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOnDemand()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "OnDemand", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "OnDemand", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnDemand()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: "OnDemand", + reason: "embedded message failed validation", + cause: err, + } + } } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "MetadataMatch", @@ -57,7 +126,26 @@ func (m *TcpProxy) Validate() error { } } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "IdleTimeout", @@ -67,7 +155,26 @@ func (m *TcpProxy) Validate() error { } } - if v, ok := interface{}(m.GetDownstreamIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "DownstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "DownstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "DownstreamIdleTimeout", @@ -77,7 +184,26 @@ func (m *TcpProxy) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "UpstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "UpstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "UpstreamIdleTimeout", @@ -90,7 +216,26 @@ func (m *TcpProxy) Validate() error { for idx, item := range m.GetAccessLog() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: fmt.Sprintf("AccessLog[%v]", idx), @@ -105,25 +250,52 @@ func (m *TcpProxy) Validate() error { if wrapper := m.GetMaxConnectAttempts(); wrapper != nil { if wrapper.GetValue() < 1 { - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "MaxConnectAttempts", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } if len(m.GetHashPolicy()) > 1 { - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "HashPolicy", reason: "value must contain no more than 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHashPolicy() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: fmt.Sprintf("HashPolicy[%v]", idx), @@ -135,7 +307,26 @@ func (m *TcpProxy) Validate() error { } - if v, ok := interface{}(m.GetTunnelingConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTunnelingConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "TunnelingConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "TunnelingConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTunnelingConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "TunnelingConfig", @@ -146,33 +337,32 @@ func (m *TcpProxy) Validate() error { } if d := m.GetMaxDownstreamConnectionDuration(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return TcpProxyValidationError{ + err = TcpProxyValidationError{ field: "MaxDownstreamConnectionDuration", reason: "value is not a valid duration", cause: err, } - } - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - return TcpProxyValidationError{ - field: "MaxDownstreamConnectionDuration", - reason: "value must be greater than or equal to 1ms", + if !all { + return err } - } + errors = append(errors, err) + } else { - } + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedDeprecatedV1()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "HiddenEnvoyDeprecatedDeprecatedV1", - reason: "embedded message failed validation", - cause: err, + if dur < gte { + err := TcpProxyValidationError{ + field: "MaxDownstreamConnectionDuration", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) } + } } @@ -183,7 +373,26 @@ func (m *TcpProxy) Validate() error { case *TcpProxy_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxyValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "WeightedClusters", @@ -194,16 +403,40 @@ func (m *TcpProxy) Validate() error { } default: - return TcpProxyValidationError{ + err := TcpProxyValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return TcpProxyMultiError(errors) + } + return nil } +// TcpProxyMultiError is an error wrapping multiple validation errors returned +// by TcpProxy.ValidateAll() if the designated constraints aren't met. +type TcpProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxyMultiError) AllErrors() []error { return m } + // TcpProxyValidationError is the validation error returned by // TcpProxy.Validate if the designated constraints aren't met. type TcpProxyValidationError struct { @@ -260,23 +493,60 @@ var _ interface { // Validate checks the field values on TcpProxy_WeightedCluster with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProxy_WeightedCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy_WeightedCluster with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpProxy_WeightedClusterMultiError, or nil if none found. +func (m *TcpProxy_WeightedCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_WeightedCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusters()) < 1 { - return TcpProxy_WeightedClusterValidationError{ + err := TcpProxy_WeightedClusterValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -288,9 +558,30 @@ func (m *TcpProxy_WeightedCluster) Validate() error { } + if len(errors) > 0 { + return TcpProxy_WeightedClusterMultiError(errors) + } + return nil } +// TcpProxy_WeightedClusterMultiError is an error wrapping multiple validation +// errors returned by TcpProxy_WeightedCluster.ValidateAll() if the designated +// constraints aren't met. +type TcpProxy_WeightedClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_WeightedClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_WeightedClusterMultiError) AllErrors() []error { return m } + // TcpProxy_WeightedClusterValidationError is the validation error returned by // TcpProxy_WeightedCluster.Validate if the designated constraints aren't met. type TcpProxy_WeightedClusterValidationError struct { @@ -349,22 +640,108 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpProxy_TunnelingConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy_TunnelingConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpProxy_TunnelingConfigMultiError, or nil if none found. +func (m *TcpProxy_TunnelingConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_TunnelingConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetHostname()) < 1 { - return TcpProxy_TunnelingConfigValidationError{ + err := TcpProxy_TunnelingConfigValidationError{ field: "Hostname", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for UsePost + + if len(m.GetHeadersToAdd()) > 1000 { + err := TcpProxy_TunnelingConfigValidationError{ + field: "HeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetHeadersToAdd() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_TunnelingConfigValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_TunnelingConfigValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_TunnelingConfigValidationError{ + field: fmt.Sprintf("HeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return TcpProxy_TunnelingConfigMultiError(errors) } return nil } +// TcpProxy_TunnelingConfigMultiError is an error wrapping multiple validation +// errors returned by TcpProxy_TunnelingConfig.ValidateAll() if the designated +// constraints aren't met. +type TcpProxy_TunnelingConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_TunnelingConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_TunnelingConfigMultiError) AllErrors() []error { return m } + // TcpProxy_TunnelingConfigValidationError is the validation error returned by // TcpProxy_TunnelingConfig.Validate if the designated constraints aren't met. type TcpProxy_TunnelingConfigValidationError struct { @@ -421,42 +798,115 @@ var _ interface { ErrorName() string } = TcpProxy_TunnelingConfigValidationError{} -// Validate checks the field values on TcpProxy_DeprecatedV1 with the rules +// Validate checks the field values on TcpProxy_OnDemand with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *TcpProxy_OnDemand) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpProxy_OnDemand with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *TcpProxy_DeprecatedV1) Validate() error { +// violated, the result is a list of violation errors wrapped in +// TcpProxy_OnDemandMultiError, or nil if none found. +func (m *TcpProxy_OnDemand) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_OnDemand) validate(all bool) error { if m == nil { return nil } - if len(m.GetRoutes()) < 1 { - return TcpProxy_DeprecatedV1ValidationError{ - field: "Routes", - reason: "value must contain at least 1 item(s)", + var errors []error + + if all { + switch v := interface{}(m.GetOdcdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_OnDemandValidationError{ + field: "OdcdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_OnDemandValidationError{ + field: "OdcdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOdcdsConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_OnDemandValidationError{ + field: "OdcdsConfig", + reason: "embedded message failed validation", + cause: err, + } } } - for idx, item := range m.GetRoutes() { - _, _ = idx, item + // no validation rules for ResourcesLocator - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_OnDemandValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: if err := v.Validate(); err != nil { - return TcpProxy_DeprecatedV1ValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), + errors = append(errors, TcpProxy_OnDemandValidationError{ + field: "Timeout", reason: "embedded message failed validation", cause: err, - } + }) } } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_OnDemandValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + if len(errors) > 0 { + return TcpProxy_OnDemandMultiError(errors) } return nil } -// TcpProxy_DeprecatedV1ValidationError is the validation error returned by -// TcpProxy_DeprecatedV1.Validate if the designated constraints aren't met. -type TcpProxy_DeprecatedV1ValidationError struct { +// TcpProxy_OnDemandMultiError is an error wrapping multiple validation errors +// returned by TcpProxy_OnDemand.ValidateAll() if the designated constraints +// aren't met. +type TcpProxy_OnDemandMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_OnDemandMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_OnDemandMultiError) AllErrors() []error { return m } + +// TcpProxy_OnDemandValidationError is the validation error returned by +// TcpProxy_OnDemand.Validate if the designated constraints aren't met. +type TcpProxy_OnDemandValidationError struct { field string reason string cause error @@ -464,24 +914,24 @@ type TcpProxy_DeprecatedV1ValidationError struct { } // Field function returns field value. -func (e TcpProxy_DeprecatedV1ValidationError) Field() string { return e.field } +func (e TcpProxy_OnDemandValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TcpProxy_DeprecatedV1ValidationError) Reason() string { return e.reason } +func (e TcpProxy_OnDemandValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TcpProxy_DeprecatedV1ValidationError) Cause() error { return e.cause } +func (e TcpProxy_OnDemandValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TcpProxy_DeprecatedV1ValidationError) Key() bool { return e.key } +func (e TcpProxy_OnDemandValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TcpProxy_DeprecatedV1ValidationError) ErrorName() string { - return "TcpProxy_DeprecatedV1ValidationError" +func (e TcpProxy_OnDemandValidationError) ErrorName() string { + return "TcpProxy_OnDemandValidationError" } // Error satisfies the builtin error interface -func (e TcpProxy_DeprecatedV1ValidationError) Error() string { +func (e TcpProxy_OnDemandValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -493,14 +943,14 @@ func (e TcpProxy_DeprecatedV1ValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTcpProxy_DeprecatedV1.%s: %s%s", + "invalid %sTcpProxy_OnDemand.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TcpProxy_DeprecatedV1ValidationError{} +var _ error = TcpProxy_OnDemandValidationError{} var _ interface { Field() string @@ -508,31 +958,74 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TcpProxy_DeprecatedV1ValidationError{} +} = TcpProxy_OnDemandValidationError{} // Validate checks the field values on TcpProxy_WeightedCluster_ClusterWeight // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// TcpProxy_WeightedCluster_ClusterWeight with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// TcpProxy_WeightedCluster_ClusterWeightMultiError, or nil if none found. +func (m *TcpProxy_WeightedCluster_ClusterWeight) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpProxy_WeightedCluster_ClusterWeight) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return TcpProxy_WeightedCluster_ClusterWeightValidationError{ + err := TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetWeight() < 1 { - return TcpProxy_WeightedCluster_ClusterWeightValidationError{ + err := TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Weight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpProxy_WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpProxy_WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "MetadataMatch", @@ -542,9 +1035,31 @@ func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { } } + if len(errors) > 0 { + return TcpProxy_WeightedCluster_ClusterWeightMultiError(errors) + } + return nil } +// TcpProxy_WeightedCluster_ClusterWeightMultiError is an error wrapping +// multiple validation errors returned by +// TcpProxy_WeightedCluster_ClusterWeight.ValidateAll() if the designated +// constraints aren't met. +type TcpProxy_WeightedCluster_ClusterWeightMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpProxy_WeightedCluster_ClusterWeightMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpProxy_WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } + // TcpProxy_WeightedCluster_ClusterWeightValidationError is the validation // error returned by TcpProxy_WeightedCluster_ClusterWeight.Validate if the // designated constraints aren't met. @@ -601,112 +1116,3 @@ var _ interface { Cause() error ErrorName() string } = TcpProxy_WeightedCluster_ClusterWeightValidationError{} - -// 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. -func (m *TcpProxy_DeprecatedV1_TCPRoute) Validate() error { - if m == nil { - return nil - } - - if len(m.GetCluster()) < 1 { - return TcpProxy_DeprecatedV1_TCPRouteValidationError{ - field: "Cluster", - reason: "value length must be at least 1 bytes", - } - } - - for idx, item := range m.GetDestinationIpList() { - _, _ = idx, item - - 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, - } - } - } - - } - - // no validation rules for DestinationPorts - - for idx, item := range m.GetSourceIpList() { - _, _ = idx, item - - 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, - } - } - } - - } - - // no validation rules for SourcePorts - - return nil -} - -// TcpProxy_DeprecatedV1_TCPRouteValidationError is the validation error -// returned by TcpProxy_DeprecatedV1_TCPRoute.Validate if the designated -// constraints aren't met. -type TcpProxy_DeprecatedV1_TCPRouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpProxy_DeprecatedV1_TCPRouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpProxy_DeprecatedV1_TCPRouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpProxy_DeprecatedV1_TCPRouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpProxy_DeprecatedV1_TCPRouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpProxy_DeprecatedV1_TCPRouteValidationError) ErrorName() string { - return "TcpProxy_DeprecatedV1_TCPRouteValidationError" -} - -// Error satisfies the builtin error interface -func (e TcpProxy_DeprecatedV1_TCPRouteValidationError) Error() string { - 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_DeprecatedV1_TCPRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpProxy_DeprecatedV1_TCPRouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpProxy_DeprecatedV1_TCPRouteValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.pb.go deleted file mode 100644 index 39f90db046..0000000000 --- a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.pb.go +++ /dev/null @@ -1,673 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.proto - -package envoy_extensions_filters_network_tcp_proxy_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 14] -type TcpProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 assignable 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 *v4alpha.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, the default idle timeout is 1 hour. If set - // to 0s, the timeout will be disabled. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - IdleTimeout *duration.Duration `protobuf:"bytes,8,opt,name=idle_timeout,json=idleTimeout,proto3" 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 *duration.Duration `protobuf:"bytes,3,opt,name=downstream_idle_timeout,json=downstreamIdleTimeout,proto3" json:"downstream_idle_timeout,omitempty"` - // [#not-implemented-hide:] - UpstreamIdleTimeout *duration.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 []*v4alpha1.AccessLog `protobuf:"bytes,5,rep,name=access_log,json=accessLog,proto3" json:"access_log,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 *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_connect_attempts,json=maxConnectAttempts,proto3" json:"max_connect_attempts,omitempty"` - // Optional configuration for TCP proxy hash policy. If hash_policy is not set, the hash-based - // load balancing algorithms will select a host randomly. Currently the number of hash policies is - // limited to 1. - HashPolicy []*v3.HashPolicy `protobuf:"bytes,11,rep,name=hash_policy,json=hashPolicy,proto3" json:"hash_policy,omitempty"` - // [#not-implemented-hide:] feature in progress - // If set, this configures tunneling, e.g. configuration options to tunnel multiple TCP - // payloads over a shared HTTP/2 tunnel. If this message is absent, the payload - // will be proxied upstream as per usual. - TunnelingConfig *TcpProxy_TunnelingConfig `protobuf:"bytes,12,opt,name=tunneling_config,json=tunnelingConfig,proto3" json:"tunneling_config,omitempty"` - // The maximum duration of a connection. The duration is defined as the period since a connection - // was established. If not set, there is no max duration. When max_downstream_connection_duration - // is reached the connection will be closed. Duration must be at least 1ms. - MaxDownstreamConnectionDuration *duration.Duration `protobuf:"bytes,13,opt,name=max_downstream_connection_duration,json=maxDownstreamConnectionDuration,proto3" json:"max_downstream_connection_duration,omitempty"` -} - -func (x *TcpProxy) Reset() { - *x = TcpProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpProxy) ProtoMessage() {} - -func (x *TcpProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpProxy.ProtoReflect.Descriptor instead. -func (*TcpProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescGZIP(), []int{0} -} - -func (x *TcpProxy) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (m *TcpProxy) GetClusterSpecifier() isTcpProxy_ClusterSpecifier { - if m != nil { - return m.ClusterSpecifier - } - return nil -} - -func (x *TcpProxy) GetCluster() string { - if x, ok := x.GetClusterSpecifier().(*TcpProxy_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *TcpProxy) GetWeightedClusters() *TcpProxy_WeightedCluster { - if x, ok := x.GetClusterSpecifier().(*TcpProxy_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -func (x *TcpProxy) GetMetadataMatch() *v4alpha.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *TcpProxy) GetIdleTimeout() *duration.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *TcpProxy) GetDownstreamIdleTimeout() *duration.Duration { - if x != nil { - return x.DownstreamIdleTimeout - } - return nil -} - -func (x *TcpProxy) GetUpstreamIdleTimeout() *duration.Duration { - if x != nil { - return x.UpstreamIdleTimeout - } - return nil -} - -func (x *TcpProxy) GetAccessLog() []*v4alpha1.AccessLog { - if x != nil { - return x.AccessLog - } - return nil -} - -func (x *TcpProxy) GetMaxConnectAttempts() *wrappers.UInt32Value { - if x != nil { - return x.MaxConnectAttempts - } - return nil -} - -func (x *TcpProxy) GetHashPolicy() []*v3.HashPolicy { - if x != nil { - return x.HashPolicy - } - return nil -} - -func (x *TcpProxy) GetTunnelingConfig() *TcpProxy_TunnelingConfig { - if x != nil { - return x.TunnelingConfig - } - return nil -} - -func (x *TcpProxy) GetMaxDownstreamConnectionDuration() *duration.Duration { - if x != nil { - return x.MaxDownstreamConnectionDuration - } - return nil -} - -type isTcpProxy_ClusterSpecifier interface { - isTcpProxy_ClusterSpecifier() -} - -type TcpProxy_Cluster struct { - // The upstream cluster to connect to. - Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3,oneof"` -} - -type TcpProxy_WeightedClusters struct { - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - WeightedClusters *TcpProxy_WeightedCluster `protobuf:"bytes,10,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} - -func (*TcpProxy_Cluster) isTcpProxy_ClusterSpecifier() {} - -func (*TcpProxy_WeightedClusters) isTcpProxy_ClusterSpecifier() {} - -// 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies one or more upstream clusters associated with the route. - Clusters []*TcpProxy_WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` -} - -func (x *TcpProxy_WeightedCluster) Reset() { - *x = TcpProxy_WeightedCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpProxy_WeightedCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpProxy_WeightedCluster) ProtoMessage() {} - -func (x *TcpProxy_WeightedCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpProxy_WeightedCluster.ProtoReflect.Descriptor instead. -func (*TcpProxy_WeightedCluster) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *TcpProxy_WeightedCluster) GetClusters() []*TcpProxy_WeightedCluster_ClusterWeight { - if x != nil { - return x.Clusters - } - return nil -} - -// Configuration for tunneling TCP over other transports or application layers. -// Currently, only HTTP/2 is supported. When other options exist, HTTP/2 will -// remain the default. -type TcpProxy_TunnelingConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hostname to send in the synthesized CONNECT headers to the upstream proxy. - Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` -} - -func (x *TcpProxy_TunnelingConfig) Reset() { - *x = TcpProxy_TunnelingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpProxy_TunnelingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpProxy_TunnelingConfig) ProtoMessage() {} - -func (x *TcpProxy_TunnelingConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpProxy_TunnelingConfig.ProtoReflect.Descriptor instead. -func (*TcpProxy_TunnelingConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *TcpProxy_TunnelingConfig) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -type TcpProxy_WeightedCluster_ClusterWeight struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` - // 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:`TcpProxy.metadata_match - // `, with values - // here taking precedence. The filter name should be specified as *envoy.lb*. - MetadataMatch *v4alpha.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` -} - -func (x *TcpProxy_WeightedCluster_ClusterWeight) Reset() { - *x = TcpProxy_WeightedCluster_ClusterWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpProxy_WeightedCluster_ClusterWeight) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpProxy_WeightedCluster_ClusterWeight) ProtoMessage() {} - -func (x *TcpProxy_WeightedCluster_ClusterWeight) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpProxy_WeightedCluster_ClusterWeight.ProtoReflect.Descriptor instead. -func (*TcpProxy_WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (x *TcpProxy_WeightedCluster_ClusterWeight) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TcpProxy_WeightedCluster_ClusterWeight) GetWeight() uint32 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *TcpProxy_WeightedCluster_ClusterWeight) GetMetadataMatch() *v4alpha.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -var File_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDesc = []byte{ - 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x61, - 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x0d, 0x0a, 0x08, 0x54, - 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x7b, 0x0a, - 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x63, - 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, 0x0a, 0x17, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x15, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x13, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x48, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, - 0x12, 0x57, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, - 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x68, 0x61, 0x73, - 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x77, 0x0a, 0x10, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, - 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, - 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, 0x22, 0x6d, 0x61, 0x78, 0x5f, - 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x1f, 0x6d, - 0x61, 0x78, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xdc, - 0x03, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x80, 0x01, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x1a, 0xf6, 0x01, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x06, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4a, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x3a, 0x5b, 0x9a, 0xc5, 0x88, 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x4d, - 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x85, 0x01, - 0x0a, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, - 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x63, 0x70, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, - 0x08, 0x06, 0x10, 0x07, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x76, 0x31, 0x42, 0x5b, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0d, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescData = file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDesc -) - -func file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDescData -} - -var file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_goTypes = []interface{}{ - (*TcpProxy)(nil), // 0: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy - (*TcpProxy_WeightedCluster)(nil), // 1: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.WeightedCluster - (*TcpProxy_TunnelingConfig)(nil), // 2: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.TunnelingConfig - (*TcpProxy_WeightedCluster_ClusterWeight)(nil), // 3: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.WeightedCluster.ClusterWeight - (*v4alpha.Metadata)(nil), // 4: envoy.config.core.v4alpha.Metadata - (*duration.Duration)(nil), // 5: google.protobuf.Duration - (*v4alpha1.AccessLog)(nil), // 6: envoy.config.accesslog.v4alpha.AccessLog - (*wrappers.UInt32Value)(nil), // 7: google.protobuf.UInt32Value - (*v3.HashPolicy)(nil), // 8: envoy.type.v3.HashPolicy -} -var file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.weighted_clusters:type_name -> envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.WeightedCluster - 4, // 1: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.metadata_match:type_name -> envoy.config.core.v4alpha.Metadata - 5, // 2: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.idle_timeout:type_name -> google.protobuf.Duration - 5, // 3: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.downstream_idle_timeout:type_name -> google.protobuf.Duration - 5, // 4: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.upstream_idle_timeout:type_name -> google.protobuf.Duration - 6, // 5: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.access_log:type_name -> envoy.config.accesslog.v4alpha.AccessLog - 7, // 6: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.max_connect_attempts:type_name -> google.protobuf.UInt32Value - 8, // 7: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.hash_policy:type_name -> envoy.type.v3.HashPolicy - 2, // 8: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.tunneling_config:type_name -> envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.TunnelingConfig - 5, // 9: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.max_downstream_connection_duration:type_name -> google.protobuf.Duration - 3, // 10: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.WeightedCluster.clusters:type_name -> envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.WeightedCluster.ClusterWeight - 4, // 11: envoy.extensions.filters.network.tcp_proxy.v4alpha.TcpProxy.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v4alpha.Metadata - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_init() } -func file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_init() { - if File_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProxy_WeightedCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProxy_TunnelingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProxy_WeightedCluster_ClusterWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*TcpProxy_Cluster)(nil), - (*TcpProxy_WeightedClusters)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto = out.File - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_tcp_proxy_v4alpha_tcp_proxy_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.pb.validate.go deleted file mode 100644 index 12d75a5b03..0000000000 --- a/pkg/api/envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.pb.validate.go +++ /dev/null @@ -1,504 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/tcp_proxy/v4alpha/tcp_proxy.proto - -package envoy_extensions_filters_network_tcp_proxy_v4alpha - -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{} -) - -// 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 { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return TcpProxyValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - 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 v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - 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{}(m.GetUpstreamIdleTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "UpstreamIdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetAccessLog() { - _, _ = idx, item - - 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, - } - } - } - - } - - if wrapper := m.GetMaxConnectAttempts(); wrapper != nil { - - if wrapper.GetValue() < 1 { - return TcpProxyValidationError{ - field: "MaxConnectAttempts", - reason: "value must be greater than or equal to 1", - } - } - - } - - 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, - } - } - } - - if d := m.GetMaxDownstreamConnectionDuration(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return TcpProxyValidationError{ - field: "MaxDownstreamConnectionDuration", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - return TcpProxyValidationError{ - field: "MaxDownstreamConnectionDuration", - reason: "value must be greater than or equal to 1ms", - } - } - - } - - switch m.ClusterSpecifier.(type) { - - case *TcpProxy_Cluster: - // no validation rules for Cluster - - case *TcpProxy_WeightedClusters: - - 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, - } - } - } - - default: - return TcpProxyValidationError{ - field: "ClusterSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// TcpProxyValidationError is the validation error returned by -// TcpProxy.Validate if the designated constraints aren't met. -type TcpProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpProxyValidationError) ErrorName() string { return "TcpProxyValidationError" } - -// Error satisfies the builtin error interface -func (e TcpProxyValidationError) Error() string { - 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.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpProxyValidationError{} - -// Validate checks the field values on TcpProxy_WeightedCluster with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *TcpProxy_WeightedCluster) Validate() error { - if m == nil { - return nil - } - - if len(m.GetClusters()) < 1 { - return TcpProxy_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 TcpProxy_WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// TcpProxy_WeightedClusterValidationError is the validation error returned by -// TcpProxy_WeightedCluster.Validate if the designated constraints aren't met. -type TcpProxy_WeightedClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpProxy_WeightedClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpProxy_WeightedClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpProxy_WeightedClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpProxy_WeightedClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpProxy_WeightedClusterValidationError) ErrorName() string { - return "TcpProxy_WeightedClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e TcpProxy_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 %sTcpProxy_WeightedCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpProxy_WeightedClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - 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 utf8.RuneCountInString(m.GetHostname()) < 1 { - return TcpProxy_TunnelingConfigValidationError{ - field: "Hostname", - reason: "value length must be at least 1 runes", - } - } - - 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_WeightedCluster_ClusterWeight -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return TcpProxy_WeightedCluster_ClusterWeightValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if m.GetWeight() < 1 { - return TcpProxy_WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "value must be greater than or equal to 1", - } - } - - 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 -} - -// TcpProxy_WeightedCluster_ClusterWeightValidationError is the validation -// error returned by TcpProxy_WeightedCluster_ClusterWeight.Validate if the -// designated constraints aren't met. -type TcpProxy_WeightedCluster_ClusterWeightValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpProxy_WeightedCluster_ClusterWeightValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpProxy_WeightedCluster_ClusterWeightValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpProxy_WeightedCluster_ClusterWeightValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpProxy_WeightedCluster_ClusterWeightValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpProxy_WeightedCluster_ClusterWeightValidationError) ErrorName() string { - return "TcpProxy_WeightedCluster_ClusterWeightValidationError" -} - -// Error satisfies the builtin error interface -func (e TcpProxy_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 %sTcpProxy_WeightedCluster_ClusterWeight.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpProxy_WeightedCluster_ClusterWeightValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpProxy_WeightedCluster_ClusterWeightValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.go new file mode 100644 index 0000000000..f5021e0a76 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.go @@ -0,0 +1,607 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto + +package header_to_metadatav3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type HeaderToMetadata_ValueType int32 + +const ( + HeaderToMetadata_STRING HeaderToMetadata_ValueType = 0 + HeaderToMetadata_NUMBER HeaderToMetadata_ValueType = 1 + // The value is a serialized `protobuf.Value + // `_. + HeaderToMetadata_PROTOBUF_VALUE HeaderToMetadata_ValueType = 2 +) + +// Enum value maps for HeaderToMetadata_ValueType. +var ( + HeaderToMetadata_ValueType_name = map[int32]string{ + 0: "STRING", + 1: "NUMBER", + 2: "PROTOBUF_VALUE", + } + HeaderToMetadata_ValueType_value = map[string]int32{ + "STRING": 0, + "NUMBER": 1, + "PROTOBUF_VALUE": 2, + } +) + +func (x HeaderToMetadata_ValueType) Enum() *HeaderToMetadata_ValueType { + p := new(HeaderToMetadata_ValueType) + *p = x + return p +} + +func (x HeaderToMetadata_ValueType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderToMetadata_ValueType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[0].Descriptor() +} + +func (HeaderToMetadata_ValueType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[0] +} + +func (x HeaderToMetadata_ValueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderToMetadata_ValueType.Descriptor instead. +func (HeaderToMetadata_ValueType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} +} + +// ValueEncode defines the encoding algorithm. +type HeaderToMetadata_ValueEncode int32 + +const ( + // The value is not encoded. + HeaderToMetadata_NONE HeaderToMetadata_ValueEncode = 0 + // The value is encoded in `Base64 `_. + // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the + // non-ASCII characters in the header. + HeaderToMetadata_BASE64 HeaderToMetadata_ValueEncode = 1 +) + +// Enum value maps for HeaderToMetadata_ValueEncode. +var ( + HeaderToMetadata_ValueEncode_name = map[int32]string{ + 0: "NONE", + 1: "BASE64", + } + HeaderToMetadata_ValueEncode_value = map[string]int32{ + "NONE": 0, + "BASE64": 1, + } +) + +func (x HeaderToMetadata_ValueEncode) Enum() *HeaderToMetadata_ValueEncode { + p := new(HeaderToMetadata_ValueEncode) + *p = x + return p +} + +func (x HeaderToMetadata_ValueEncode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderToMetadata_ValueEncode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[1].Descriptor() +} + +func (HeaderToMetadata_ValueEncode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[1] +} + +func (x HeaderToMetadata_ValueEncode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderToMetadata_ValueEncode.Descriptor instead. +func (HeaderToMetadata_ValueEncode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} +} + +type HeaderToMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of rules to apply to requests. + RequestRules []*HeaderToMetadata_Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"` +} + +func (x *HeaderToMetadata) Reset() { + *x = HeaderToMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderToMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderToMetadata) ProtoMessage() {} + +func (x *HeaderToMetadata) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderToMetadata.ProtoReflect.Descriptor instead. +func (*HeaderToMetadata) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *HeaderToMetadata) GetRequestRules() []*HeaderToMetadata_Rule { + if x != nil { + return x.RequestRules + } + return nil +} + +// [#next-free-field: 7] +type HeaderToMetadata_KeyValuePair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The namespace — if this is empty, the filter's namespace will be used. + MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"` + // The key to use within the namespace. + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // Types that are assignable to ValueType: + // *HeaderToMetadata_KeyValuePair_Value + // *HeaderToMetadata_KeyValuePair_RegexValueRewrite + ValueType isHeaderToMetadata_KeyValuePair_ValueType `protobuf_oneof:"value_type"` + // The value's type — defaults to string. + Type HeaderToMetadata_ValueType `protobuf:"varint,5,opt,name=type,proto3,enum=envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata_ValueType" json:"type,omitempty"` + // How is the value encoded, default is NONE (not encoded). + // The value will be decoded accordingly before storing to metadata. + Encode HeaderToMetadata_ValueEncode `protobuf:"varint,6,opt,name=encode,proto3,enum=envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata_ValueEncode" json:"encode,omitempty"` +} + +func (x *HeaderToMetadata_KeyValuePair) Reset() { + *x = HeaderToMetadata_KeyValuePair{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderToMetadata_KeyValuePair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderToMetadata_KeyValuePair) ProtoMessage() {} + +func (x *HeaderToMetadata_KeyValuePair) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderToMetadata_KeyValuePair.ProtoReflect.Descriptor instead. +func (*HeaderToMetadata_KeyValuePair) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *HeaderToMetadata_KeyValuePair) GetMetadataNamespace() string { + if x != nil { + return x.MetadataNamespace + } + return "" +} + +func (x *HeaderToMetadata_KeyValuePair) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (m *HeaderToMetadata_KeyValuePair) GetValueType() isHeaderToMetadata_KeyValuePair_ValueType { + if m != nil { + return m.ValueType + } + return nil +} + +func (x *HeaderToMetadata_KeyValuePair) GetValue() string { + if x, ok := x.GetValueType().(*HeaderToMetadata_KeyValuePair_Value); ok { + return x.Value + } + return "" +} + +func (x *HeaderToMetadata_KeyValuePair) GetRegexValueRewrite() *v3.RegexMatchAndSubstitute { + if x, ok := x.GetValueType().(*HeaderToMetadata_KeyValuePair_RegexValueRewrite); ok { + return x.RegexValueRewrite + } + return nil +} + +func (x *HeaderToMetadata_KeyValuePair) GetType() HeaderToMetadata_ValueType { + if x != nil { + return x.Type + } + return HeaderToMetadata_STRING +} + +func (x *HeaderToMetadata_KeyValuePair) GetEncode() HeaderToMetadata_ValueEncode { + if x != nil { + return x.Encode + } + return HeaderToMetadata_NONE +} + +type isHeaderToMetadata_KeyValuePair_ValueType interface { + isHeaderToMetadata_KeyValuePair_ValueType() +} + +type HeaderToMetadata_KeyValuePair_Value struct { + // The value to pair with the given key. + // + // When used for on_present case, if value is non-empty it'll be used instead + // of the header value. If both are empty, no metadata is added. + // + // When used for on_missing case, a non-empty value must be provided otherwise + // no metadata is added. + Value string `protobuf:"bytes,3,opt,name=value,proto3,oneof"` +} + +type HeaderToMetadata_KeyValuePair_RegexValueRewrite struct { + // If present, the header's value will be matched and substituted with this. + // If there is no match or substitution, the header value + // is used as-is. + // + // This is only used for on_present. + // + // Note: if the `value` field is non-empty this field should be empty. + RegexValueRewrite *v3.RegexMatchAndSubstitute `protobuf:"bytes,4,opt,name=regex_value_rewrite,json=regexValueRewrite,proto3,oneof"` +} + +func (*HeaderToMetadata_KeyValuePair_Value) isHeaderToMetadata_KeyValuePair_ValueType() {} + +func (*HeaderToMetadata_KeyValuePair_RegexValueRewrite) isHeaderToMetadata_KeyValuePair_ValueType() {} + +// A Rule defines what metadata to apply when a header is present or missing. +type HeaderToMetadata_Rule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies that a match will be performed on the value of a header. + // + // The header to be extracted. + Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // If the header is present, apply this metadata KeyValuePair. + // + // If the value in the KeyValuePair is non-empty, it'll be used instead + // of the header value. + OnPresent *HeaderToMetadata_KeyValuePair `protobuf:"bytes,2,opt,name=on_present,json=onPresent,proto3" json:"on_present,omitempty"` + // If the header is not present, apply this metadata KeyValuePair. + // + // The value in the KeyValuePair must be set, since it'll be used in lieu + // of the missing header value. + OnMissing *HeaderToMetadata_KeyValuePair `protobuf:"bytes,3,opt,name=on_missing,json=onMissing,proto3" json:"on_missing,omitempty"` + // Whether or not to remove the header after a rule is applied. + // + // This prevents headers from leaking. + Remove bool `protobuf:"varint,4,opt,name=remove,proto3" json:"remove,omitempty"` +} + +func (x *HeaderToMetadata_Rule) Reset() { + *x = HeaderToMetadata_Rule{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderToMetadata_Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderToMetadata_Rule) ProtoMessage() {} + +func (x *HeaderToMetadata_Rule) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderToMetadata_Rule.ProtoReflect.Descriptor instead. +func (*HeaderToMetadata_Rule) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *HeaderToMetadata_Rule) GetHeader() string { + if x != nil { + return x.Header + } + return "" +} + +func (x *HeaderToMetadata_Rule) GetOnPresent() *HeaderToMetadata_KeyValuePair { + if x != nil { + return x.OnPresent + } + return nil +} + +func (x *HeaderToMetadata_Rule) GetOnMissing() *HeaderToMetadata_KeyValuePair { + if x != nil { + return x.OnMissing + } + return nil +} + +func (x *HeaderToMetadata_Rule) GetRemove() bool { + if x != nil { + return x.Remove + } + return false +} + +var File_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc = []byte{ + 0x0a, 0x64, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, + 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, + 0x08, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x62, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0xec, 0x03, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x72, 0x65, + 0x67, 0x65, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, + 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x67, 0x65, 0x78, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x85, 0x01, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x67, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x06, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x52, 0x06, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xdd, 0x02, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x89, 0x01, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x70, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x09, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x12, 0x89, 0x01, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, + 0x61, 0x69, 0x72, 0x52, 0x09, 0x6f, 0x6e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x37, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x50, + 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x22, + 0x23, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x08, + 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x53, 0x45, + 0x36, 0x34, 0x10, 0x01, 0x42, 0x86, 0x02, 0x0a, 0x59, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x87, 0x01, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc +) + +func file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData +} + +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_goTypes = []interface{}{ + (HeaderToMetadata_ValueType)(0), // 0: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueType + (HeaderToMetadata_ValueEncode)(0), // 1: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueEncode + (*HeaderToMetadata)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata + (*HeaderToMetadata_KeyValuePair)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair + (*HeaderToMetadata_Rule)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule + (*v3.RegexMatchAndSubstitute)(nil), // 5: envoy.type.matcher.v3.RegexMatchAndSubstitute +} +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.request_rules:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule + 5, // 1: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair.regex_value_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute + 0, // 2: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair.type:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueType + 1, // 3: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair.encode:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueEncode + 3, // 4: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule.on_present:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair + 3, // 5: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule.on_missing:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_init() +} +func file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_init() { + if File_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderToMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderToMetadata_KeyValuePair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderToMetadata_Rule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*HeaderToMetadata_KeyValuePair_Value)(nil), + (*HeaderToMetadata_KeyValuePair_RegexValueRewrite)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto = out.File + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc = nil + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_goTypes = nil + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.validate.go new file mode 100644 index 0000000000..2c2030731c --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.validate.go @@ -0,0 +1,534 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto + +package header_to_metadatav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HeaderToMetadata with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *HeaderToMetadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderToMetadata with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HeaderToMetadataMultiError, or nil if none found. +func (m *HeaderToMetadata) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderToMetadata) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetRequestRules()) < 1 { + err := HeaderToMetadataValidationError{ + field: "RequestRules", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRequestRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadataValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadataValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderToMetadataValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HeaderToMetadataMultiError(errors) + } + + return nil +} + +// HeaderToMetadataMultiError is an error wrapping multiple validation errors +// returned by HeaderToMetadata.ValidateAll() if the designated constraints +// aren't met. +type HeaderToMetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderToMetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderToMetadataMultiError) AllErrors() []error { return m } + +// HeaderToMetadataValidationError is the validation error returned by +// HeaderToMetadata.Validate if the designated constraints aren't met. +type HeaderToMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderToMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderToMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderToMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderToMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderToMetadataValidationError) ErrorName() string { return "HeaderToMetadataValidationError" } + +// Error satisfies the builtin error interface +func (e HeaderToMetadataValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHeaderToMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderToMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderToMetadataValidationError{} + +// Validate checks the field values on HeaderToMetadata_KeyValuePair with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HeaderToMetadata_KeyValuePair) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderToMetadata_KeyValuePair with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// HeaderToMetadata_KeyValuePairMultiError, or nil if none found. +func (m *HeaderToMetadata_KeyValuePair) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderToMetadata_KeyValuePair) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MetadataNamespace + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := HeaderToMetadata_KeyValuePairValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := HeaderToMetadata_ValueType_name[int32(m.GetType())]; !ok { + err := HeaderToMetadata_KeyValuePairValidationError{ + field: "Type", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Encode + + switch m.ValueType.(type) { + + case *HeaderToMetadata_KeyValuePair_Value: + // no validation rules for Value + + case *HeaderToMetadata_KeyValuePair_RegexValueRewrite: + + if all { + switch v := interface{}(m.GetRegexValueRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadata_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadata_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderToMetadata_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HeaderToMetadata_KeyValuePairMultiError(errors) + } + + return nil +} + +// HeaderToMetadata_KeyValuePairMultiError is an error wrapping multiple +// validation errors returned by HeaderToMetadata_KeyValuePair.ValidateAll() +// if the designated constraints aren't met. +type HeaderToMetadata_KeyValuePairMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderToMetadata_KeyValuePairMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderToMetadata_KeyValuePairMultiError) AllErrors() []error { return m } + +// HeaderToMetadata_KeyValuePairValidationError is the validation error +// returned by HeaderToMetadata_KeyValuePair.Validate if the designated +// constraints aren't met. +type HeaderToMetadata_KeyValuePairValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderToMetadata_KeyValuePairValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderToMetadata_KeyValuePairValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderToMetadata_KeyValuePairValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderToMetadata_KeyValuePairValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderToMetadata_KeyValuePairValidationError) ErrorName() string { + return "HeaderToMetadata_KeyValuePairValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderToMetadata_KeyValuePairValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHeaderToMetadata_KeyValuePair.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderToMetadata_KeyValuePairValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderToMetadata_KeyValuePairValidationError{} + +// Validate checks the field values on HeaderToMetadata_Rule with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HeaderToMetadata_Rule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderToMetadata_Rule with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HeaderToMetadata_RuleMultiError, or nil if none found. +func (m *HeaderToMetadata_Rule) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderToMetadata_Rule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetHeader()) < 1 { + err := HeaderToMetadata_RuleValidationError{ + field: "Header", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_HeaderToMetadata_Rule_Header_Pattern.MatchString(m.GetHeader()) { + err := HeaderToMetadata_RuleValidationError{ + field: "Header", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOnPresent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnPresent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderToMetadata_RuleValidationError{ + field: "OnPresent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetOnMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnMissing()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderToMetadata_RuleValidationError{ + field: "OnMissing", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Remove + + if len(errors) > 0 { + return HeaderToMetadata_RuleMultiError(errors) + } + + return nil +} + +// HeaderToMetadata_RuleMultiError is an error wrapping multiple validation +// errors returned by HeaderToMetadata_Rule.ValidateAll() if the designated +// constraints aren't met. +type HeaderToMetadata_RuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderToMetadata_RuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderToMetadata_RuleMultiError) AllErrors() []error { return m } + +// HeaderToMetadata_RuleValidationError is the validation error returned by +// HeaderToMetadata_Rule.Validate if the designated constraints aren't met. +type HeaderToMetadata_RuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderToMetadata_RuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderToMetadata_RuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderToMetadata_RuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderToMetadata_RuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderToMetadata_RuleValidationError) ErrorName() string { + return "HeaderToMetadata_RuleValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderToMetadata_RuleValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHeaderToMetadata_Rule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderToMetadata_RuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderToMetadata_RuleValidationError{} + +var _HeaderToMetadata_Rule_Header_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.go index 8691b05a36..cd559433b4 100644 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.go +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto -package envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3 +package ratelimitv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-free-field: 6] type RateLimit struct { state protoimpl.MessageState @@ -39,7 +34,7 @@ type RateLimit struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // Specifies the rate limit configuration stage. Each configured rate limit filter performs a // rate limit check using descriptors configured in the - // :ref:`envoy_api_msg_extensions.filters.network.thrift_proxy.v3.RouteAction` for the request. + // :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.RouteAction` for the request. // Only those entries with a matching stage number are used for a given filter. If not set, the // default stage number is 0. // @@ -172,14 +167,22 @@ var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x0a, 0x50, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x61, 0x74, 0x65, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6d, 0x69, 0x74, 0x42, 0xe3, 0x01, 0x0a, 0x50, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x75, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.validate.go index 2ede62c35e..4ff74265e9 100644 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto -package envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3 +package ratelimitv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,31 +31,74 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetDomain()) < 1 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Domain", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if m.GetStage() > 10 { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "Stage", reason: "value must be less than or equal to 10", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "Timeout", @@ -67,13 +111,36 @@ func (m *RateLimit) Validate() error { // no validation rules for FailureModeDeny if m.GetRateLimitService() == nil { - return RateLimitValidationError{ + err := RateLimitValidationError{ field: "RateLimitService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRateLimitService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitValidationError{ field: "RateLimitService", @@ -83,9 +150,29 @@ func (m *RateLimit) Validate() error { } } + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil } +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + // RateLimitValidationError is the validation error returned by // RateLimit.Validate if the designated constraints aren't met. type RateLimitValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.pb.go deleted file mode 100644 index 6157fcab38..0000000000 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.pb.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.proto - -package envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/ratelimit/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 6] -type RateLimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The rate limit domain to use in the rate limit service request. - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - // Specifies the rate limit configuration stage. Each configured rate limit filter performs a - // rate limit check using descriptors configured in the - // :ref:`envoy_api_msg_extensions.filters.network.thrift_proxy.v4alpha.RouteAction` for the request. - // Only those entries with a matching stage number are used for a given filter. If not set, the - // default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - Stage uint32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"` - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - FailureModeDeny bool `protobuf:"varint,4,opt,name=failure_mode_deny,json=failureModeDeny,proto3" json:"failure_mode_deny,omitempty"` - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - RateLimitService *v4alpha.RateLimitServiceConfig `protobuf:"bytes,5,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"` -} - -func (x *RateLimit) Reset() { - *x = RateLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit) ProtoMessage() {} - -func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. -func (*RateLimit) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP(), []int{0} -} - -func (x *RateLimit) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *RateLimit) GetStage() uint32 { - if x != nil { - return x.Stage - } - return 0 -} - -func (x *RateLimit) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *RateLimit) GetFailureModeDeny() bool { - if x != nil { - return x.FailureModeDeny - } - return false -} - -func (x *RateLimit) GetRateLimitService() *v4alpha.RateLimitServiceConfig { - if x != nil { - return x.RateLimitService - } - return nil -} - -var File_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDesc = []byte{ - 0x0a, 0x58, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x47, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x02, 0x0a, 0x09, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x79, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x6e, 0x0a, 0x12, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x53, 0x9a, 0xc5, 0x88, 0x1e, 0x4e, 0x0a, 0x4c, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x71, 0x0a, 0x55, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, - 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDesc -) - -func file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDescData -} - -var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_goTypes = []interface{}{ - (*RateLimit)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v4alpha.RateLimit - (*duration.Duration)(nil), // 1: google.protobuf.Duration - (*v4alpha.RateLimitServiceConfig)(nil), // 2: envoy.config.ratelimit.v4alpha.RateLimitServiceConfig -} -var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v4alpha.RateLimit.timeout:type_name -> google.protobuf.Duration - 2, // 1: envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v4alpha.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v4alpha.RateLimitServiceConfig - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_init() -} -func file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_init() { - if File_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto = out.File - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_rawDesc = nil - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_goTypes = nil - file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha_rate_limit_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.pb.validate.go deleted file mode 100644 index b5c14a7e7a..0000000000 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.pb.validate.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v4alpha/rate_limit.proto - -package envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetDomain()) < 1 { - return RateLimitValidationError{ - field: "Domain", - reason: "value length must be at least 1 runes", - } - } - - if m.GetStage() > 10 { - return RateLimitValidationError{ - field: "Stage", - reason: "value must be less than or equal to 10", - } - } - - if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for FailureModeDeny - - if m.GetRateLimitService() == nil { - return RateLimitValidationError{ - field: "RateLimitService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "RateLimitService", - 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{} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.go new file mode 100644 index 0000000000..d5dc2461e7 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto + +package routerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Router struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Router) Reset() { + *x = Router{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Router) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Router) ProtoMessage() {} + +func (x *Router) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Router.ProtoReflect.Descriptor instead. +func (*Router) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x42, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, + 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0xc7, 0x01, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, + 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc +) + +func file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData +} + +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_goTypes = []interface{}{ + (*Router)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.router.v3.Router +} +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_init() } +func file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_init() { + if File_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Router); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto = out.File + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc = nil + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_goTypes = nil + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/http/router/v4alpha/router.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.validate.go similarity index 53% rename from pkg/api/envoy/extensions/filters/http/router/v4alpha/router.pb.validate.go rename to pkg/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.validate.go index 5ddb546e6c..abc43f0c82 100644 --- a/pkg/api/envoy/extensions/filters/http/router/v4alpha/router.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/http/router/v4alpha/router.proto +// source: envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto -package envoy_extensions_filters_http_router_v4alpha +package routerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,62 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Router with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetDynamicStats()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouterValidationError{ - field: "DynamicStats", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for StartChildSpan - - for idx, item := range m.GetUpstreamLog() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouterValidationError{ - field: fmt.Sprintf("UpstreamLog[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } + var errors []error + if len(errors) > 0 { + return RouterMultiError(errors) } - // no validation rules for SuppressEnvoyHeaders - - for idx, item := range m.GetStrictCheckHeaders() { - _, _ = idx, item + return nil +} - if _, ok := _Router_StrictCheckHeaders_InLookup[item]; !ok { - return RouterValidationError{ - field: fmt.Sprintf("StrictCheckHeaders[%v]", idx), - reason: "value must be in list [x-envoy-upstream-rq-timeout-ms x-envoy-upstream-rq-per-try-timeout-ms x-envoy-max-retries x-envoy-retry-grpc-on x-envoy-retry-on]", - } - } +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) } - - // no validation rules for RespectExpectedRqTimeout - - return nil + return strings.Join(msgs, "; ") } +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + // RouterValidationError is the validation error returned by Router.Validate if // the designated constraints aren't met. type RouterValidationError struct { @@ -139,11 +132,3 @@ var _ interface { Cause() error ErrorName() string } = RouterValidationError{} - -var _Router_StrictCheckHeaders_InLookup = map[string]struct{}{ - "x-envoy-upstream-rq-timeout-ms": {}, - "x-envoy-upstream-rq-per-try-timeout-ms": {}, - "x-envoy-max-retries": {}, - "x-envoy-retry-grpc-on": {}, - "x-envoy-retry-on": {}, -} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.go index 9cb0596d21..b75830a4dc 100644 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.go +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/thrift_proxy/v3/route.proto -package envoy_extensions_filters_network_thrift_proxy_v3 +package thrift_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RouteConfiguration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -155,17 +150,17 @@ type RouteMatch struct { // *RouteMatch_ServiceName MatchSpecifier isRouteMatch_MatchSpecifier `protobuf_oneof:"match_specifier"` // Inverts whatever matching is done in the :ref:`method_name - // ` or + // ` or // :ref:`service_name - // ` fields. + // ` fields. // Cannot be combined with wildcard matching as that would result in routes never being matched. // // .. note:: // // This does not invert matching done as part of the :ref:`headers field - // ` field. To + // ` field. To // invert header matching, see :ref:`invert_match - // `. + // `. Invert bool `protobuf:"varint,3,opt,name=invert,proto3" json:"invert,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 @@ -263,7 +258,7 @@ func (*RouteMatch_MethodName) isRouteMatch_MatchSpecifier() {} func (*RouteMatch_ServiceName) isRouteMatch_MatchSpecifier() {} -// [#next-free-field: 7] +// [#next-free-field: 8] type RouteAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -277,7 +272,7 @@ type RouteAction struct { // 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. // Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match - // `, + // `, // with values there taking precedence. Keys and values should be provided under the "envoy.lb" // metadata key. MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` @@ -288,6 +283,8 @@ type RouteAction struct { // Strip the service prefix from the method name, if there's a prefix. For // example, the method call Service:method would end up being just method. StripServiceName bool `protobuf:"varint,5,opt,name=strip_service_name,json=stripServiceName,proto3" json:"strip_service_name,omitempty"` + // Indicates that the route has request mirroring policies. + RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,7,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` } func (x *RouteAction) Reset() { @@ -371,6 +368,13 @@ func (x *RouteAction) GetStripServiceName() bool { return false } +func (x *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { + if x != nil { + return x.RequestMirrorPolicies + } + return nil +} + type isRouteAction_ClusterSpecifier interface { isRouteAction_ClusterSpecifier() } @@ -454,6 +458,77 @@ func (x *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { return nil } +// 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. +// +// .. note:: +// +// Shadowing will not be triggered if the primary cluster does not exist. +type RouteAction_RequestMirrorPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the cluster that requests will be mirrored to. The cluster must + // exist in the cluster manager configuration when the route configuration is loaded. + // If it disappears at runtime, the shadow request will silently be ignored. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` + // If not specified, all requests to the target cluster will be mirrored. + // + // For some fraction N/D, a random number in the range [0,D) is selected. If the + // number is <= the value of the numerator N, or if the key is not present, the default + // value, the request will be mirrored. + RuntimeFraction *v31.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` +} + +func (x *RouteAction_RequestMirrorPolicy) Reset() { + *x = RouteAction_RequestMirrorPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteAction_RequestMirrorPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} + +func (x *RouteAction_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteAction_RequestMirrorPolicy.ProtoReflect.Descriptor instead. +func (*RouteAction_RequestMirrorPolicy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *RouteAction_RequestMirrorPolicy) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *v31.RuntimeFractionalPercent { + if x != nil { + return x.RuntimeFraction + } + return nil +} + type WeightedCluster_ClusterWeight struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -468,7 +543,7 @@ type WeightedCluster_ClusterWeight struct { // 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, combined with what's // provided in :ref:`RouteAction's metadata_match - // `, + // `, // will be considered. Values here will take precedence. Keys and values should be provided // under the "envoy.lb" metadata key. MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` @@ -477,7 +552,7 @@ type WeightedCluster_ClusterWeight struct { func (x *WeightedCluster_ClusterWeight) Reset() { *x = WeightedCluster_ClusterWeight{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -490,7 +565,7 @@ func (x *WeightedCluster_ClusterWeight) String() string { func (*WeightedCluster_ClusterWeight) ProtoMessage() {} func (x *WeightedCluster_ClusterWeight) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -595,7 +670,7 @@ var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDesc = 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x0f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf4, 0x03, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x96, 0x06, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x11, 0x77, @@ -620,49 +695,74 @@ var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDesc = 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x74, 0x72, - 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x44, 0x9a, - 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xdf, 0x03, - 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x75, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x06, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x89, 0x01, + 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, + 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x93, 0x01, 0x0a, 0x13, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x56, 0x9a, - 0xc5, 0x88, 0x1e, 0x51, 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, - 0x56, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, + 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, + 0xdf, 0x03, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x75, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x02, 0x0a, 0x0d, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x77, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, + 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, + 0x56, 0x9a, 0xc5, 0x88, 0x1e, 0x51, 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x42, 0xbe, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x68, 0x72, 0x69, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -677,35 +777,39 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZ return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescData } -var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration - (*Route)(nil), // 1: envoy.extensions.filters.network.thrift_proxy.v3.Route - (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch - (*RouteAction)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction - (*WeightedCluster)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster - (*WeightedCluster_ClusterWeight)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight - (*v3.HeaderMatcher)(nil), // 6: envoy.config.route.v3.HeaderMatcher - (*v31.Metadata)(nil), // 7: envoy.config.core.v3.Metadata - (*v3.RateLimit)(nil), // 8: envoy.config.route.v3.RateLimit - (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value + (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration + (*Route)(nil), // 1: envoy.extensions.filters.network.thrift_proxy.v3.Route + (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch + (*RouteAction)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction + (*WeightedCluster)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster + (*RouteAction_RequestMirrorPolicy)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.RequestMirrorPolicy + (*WeightedCluster_ClusterWeight)(nil), // 6: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight + (*v3.HeaderMatcher)(nil), // 7: envoy.config.route.v3.HeaderMatcher + (*v31.Metadata)(nil), // 8: envoy.config.core.v3.Metadata + (*v3.RateLimit)(nil), // 9: envoy.config.route.v3.RateLimit + (*v31.RuntimeFractionalPercent)(nil), // 10: envoy.config.core.v3.RuntimeFractionalPercent + (*wrappers.UInt32Value)(nil), // 11: google.protobuf.UInt32Value } var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_depIdxs = []int32{ 1, // 0: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration.routes:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.Route 2, // 1: envoy.extensions.filters.network.thrift_proxy.v3.Route.match:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch 3, // 2: envoy.extensions.filters.network.thrift_proxy.v3.Route.route:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteAction - 6, // 3: envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 7, // 3: envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher 4, // 4: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.weighted_clusters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster - 7, // 5: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata - 8, // 6: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.rate_limits:type_name -> envoy.config.route.v3.RateLimit - 5, // 7: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.clusters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight - 9, // 8: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value - 7, // 9: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v3.Metadata - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 8, // 5: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata + 9, // 6: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.rate_limits:type_name -> envoy.config.route.v3.RateLimit + 5, // 7: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.request_mirror_policies:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.RequestMirrorPolicy + 6, // 8: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.clusters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight + 10, // 9: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 11, // 10: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value + 8, // 11: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v3.Metadata + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_init() } @@ -775,6 +879,18 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_init() { } } file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteAction_RequestMirrorPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WeightedCluster_ClusterWeight); i { case 0: return &v.state @@ -802,7 +918,7 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.validate.go index 79d61563ce..1f31934c34 100644 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/thrift_proxy/v3/route.proto -package envoy_extensions_filters_network_thrift_proxy_v3 +package thrift_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RouteConfiguration with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name for idx, item := range m.GetRoutes() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("Routes[%v]", idx), @@ -58,9 +93,30 @@ func (m *RouteConfiguration) Validate() error { } + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil } +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + // RouteConfigurationValidationError is the validation error returned by // RouteConfiguration.Validate if the designated constraints aren't met. type RouteConfigurationValidationError struct { @@ -118,20 +174,57 @@ var _ interface { } = RouteConfigurationValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatch() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Match", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Match", @@ -142,13 +235,36 @@ func (m *Route) Validate() error { } if m.GetRoute() == nil { - return RouteValidationError{ + err := RouteValidationError{ field: "Route", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteValidationError{ field: "Route", @@ -158,9 +274,29 @@ func (m *Route) Validate() error { } } + if len(errors) > 0 { + return RouteMultiError(errors) + } + return nil } +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + // RouteValidationError is the validation error returned by Route.Validate if // the designated constraints aren't met. type RouteValidationError struct { @@ -216,18 +352,52 @@ var _ interface { } = RouteValidationError{} // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Invert for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -248,16 +418,40 @@ func (m *RouteMatch) Validate() error { // no validation rules for ServiceName default: - return RouteMatchValidationError{ + err := RouteMatchValidationError{ field: "MatchSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return RouteMatchMultiError(errors) + } + return nil } +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + // RouteMatchValidationError is the validation error returned by // RouteMatch.Validate if the designated constraints aren't met. type RouteMatchValidationError struct { @@ -313,14 +507,47 @@ var _ interface { } = RouteMatchValidationError{} // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "MetadataMatch", @@ -333,7 +560,26 @@ func (m *RouteAction) Validate() error { for idx, item := range m.GetRateLimits() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: fmt.Sprintf("RateLimits[%v]", idx), @@ -347,20 +593,77 @@ func (m *RouteAction) Validate() error { // no validation rules for StripServiceName + for idx, item := range m.GetRequestMirrorPolicies() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + switch m.ClusterSpecifier.(type) { case *RouteAction_Cluster: if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "Cluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *RouteAction_WeightedClusters: - if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteActionValidationError{ field: "WeightedClusters", @@ -373,30 +676,62 @@ func (m *RouteAction) Validate() error { case *RouteAction_ClusterHeader: if utf8.RuneCountInString(m.GetClusterHeader()) < 1 { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterHeader", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterHeader", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } default: - return RouteActionValidationError{ + err := RouteActionValidationError{ field: "ClusterSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return RouteActionMultiError(errors) + } + return nil } +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + // RouteActionValidationError is the validation error returned by // RouteAction.Validate if the designated constraints aren't met. type RouteActionValidationError struct { @@ -454,24 +789,61 @@ var _ interface { var _RouteAction_ClusterHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") // Validate checks the field values on WeightedCluster with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// WeightedClusterMultiError, or nil if none found. +func (m *WeightedCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetClusters()) < 1 { - return WeightedClusterValidationError{ + err := WeightedClusterValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetClusters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), @@ -483,9 +855,30 @@ func (m *WeightedCluster) Validate() error { } + if len(errors) > 0 { + return WeightedClusterMultiError(errors) + } + return nil } +// WeightedClusterMultiError is an error wrapping multiple validation errors +// returned by WeightedCluster.ValidateAll() if the designated constraints +// aren't met. +type WeightedClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedClusterMultiError) AllErrors() []error { return m } + // WeightedClusterValidationError is the validation error returned by // WeightedCluster.Validate if the designated constraints aren't met. type WeightedClusterValidationError struct { @@ -540,33 +933,217 @@ var _ interface { ErrorName() string } = WeightedClusterValidationError{} +// Validate checks the field values on RouteAction_RequestMirrorPolicy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RouteAction_RequestMirrorPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_RequestMirrorPolicy with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// RouteAction_RequestMirrorPolicyMultiError, or nil if none found. +func (m *RouteAction_RequestMirrorPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_RequestMirrorPolicy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := RouteAction_RequestMirrorPolicyValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouteAction_RequestMirrorPolicyMultiError(errors) + } + + return nil +} + +// RouteAction_RequestMirrorPolicyMultiError is an error wrapping multiple +// validation errors returned by RouteAction_RequestMirrorPolicy.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_RequestMirrorPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_RequestMirrorPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_RequestMirrorPolicyMultiError) AllErrors() []error { return m } + +// RouteAction_RequestMirrorPolicyValidationError is the validation error +// returned by RouteAction_RequestMirrorPolicy.Validate if the designated +// constraints aren't met. +type RouteAction_RequestMirrorPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteAction_RequestMirrorPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteAction_RequestMirrorPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteAction_RequestMirrorPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteAction_RequestMirrorPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteAction_RequestMirrorPolicyValidationError) ErrorName() string { + return "RouteAction_RequestMirrorPolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e RouteAction_RequestMirrorPolicyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRouteAction_RequestMirrorPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteAction_RequestMirrorPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteAction_RequestMirrorPolicyValidationError{} + // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *WeightedCluster_ClusterWeight) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster_ClusterWeight with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// WeightedCluster_ClusterWeightMultiError, or nil if none found. +func (m *WeightedCluster_ClusterWeight) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster_ClusterWeight) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetWeight(); wrapper != nil { if wrapper.GetValue() < 1 { - return WeightedCluster_ClusterWeightValidationError{ + err := WeightedCluster_ClusterWeightValidationError{ field: "Weight", reason: "value must be greater than or equal to 1", } + if !all { + return err + } + errors = append(errors, err) } } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WeightedCluster_ClusterWeightValidationError{ field: "MetadataMatch", @@ -576,9 +1153,30 @@ func (m *WeightedCluster_ClusterWeight) Validate() error { } } + if len(errors) > 0 { + return WeightedCluster_ClusterWeightMultiError(errors) + } + return nil } +// WeightedCluster_ClusterWeightMultiError is an error wrapping multiple +// validation errors returned by WeightedCluster_ClusterWeight.ValidateAll() +// if the designated constraints aren't met. +type WeightedCluster_ClusterWeightMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedCluster_ClusterWeightMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } + // WeightedCluster_ClusterWeightValidationError is the validation error // returned by WeightedCluster_ClusterWeight.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.go index de3c1d6575..215f5d83de 100644 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.go @@ -1,17 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto -package envoy_extensions_filters_network_thrift_proxy_v3 +package thrift_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Thrift transport types supported by Envoy. type TransportType int32 @@ -104,6 +101,8 @@ const ( // The Thrift proxy will use the Thrift compact protocol. ProtocolType_COMPACT ProtocolType = 3 // The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library. + // + // Deprecated: Do not use. ProtocolType_TWITTER ProtocolType = 4 ) @@ -152,38 +151,104 @@ func (ProtocolType) EnumDescriptor() ([]byte, []int) { return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{1} } -// [#next-free-field: 7] +type Trds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration source specifier. + // In case of *api_config_source* only aggregated *api_type* is supported. + ConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + // The name of the route configuration. This allows to use different route + // configurations. Tells which route configuration should be fetched from the configuration source. + // Leave unspecified is also valid and means the unnamed route configuration. + RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"` +} + +func (x *Trds) Reset() { + *x = Trds{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trds) ProtoMessage() {} + +func (x *Trds) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trds.ProtoReflect.Descriptor instead. +func (*Trds) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *Trds) GetConfigSource() *v3.ConfigSource { + if x != nil { + return x.ConfigSource + } + return nil +} + +func (x *Trds) GetRouteConfigName() string { + if x != nil { + return x.RouteConfigName + } + return "" +} + +// [#next-free-field: 9] type ThriftProxy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Supplies the type of transport that the Thrift proxy should use. Defaults to - // :ref:`AUTO_TRANSPORT`. + // :ref:`AUTO_TRANSPORT`. Transport TransportType `protobuf:"varint,2,opt,name=transport,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.TransportType" json:"transport,omitempty"` // Supplies the type of protocol that the Thrift proxy should use. Defaults to - // :ref:`AUTO_PROTOCOL`. + // :ref:`AUTO_PROTOCOL`. Protocol ProtocolType `protobuf:"varint,3,opt,name=protocol,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType" json:"protocol,omitempty"` // The human readable prefix to use when emitting statistics. StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` // The route table for the connection manager is static and is specified in this property. + // It is invalid to define both *route_config* and *trds*. RouteConfig *RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` + // Use xDS to fetch the route configuration. It is invalid to define both *route_config* and *trds*. + Trds *Trds `protobuf:"bytes,8,opt,name=trds,proto3" json:"trds,omitempty"` // A list of individual Thrift filters that make up the filter chain for requests made to the // Thrift proxy. Order matters as the filters are processed sequentially. For backwards // compatibility, if no thrift_filters are specified, a default Thrift router filter // (`envoy.filters.thrift.router`) is used. + // [#extension-category: envoy.thrift_proxy.filters] ThriftFilters []*ThriftFilter `protobuf:"bytes,5,rep,name=thrift_filters,json=thriftFilters,proto3" json:"thrift_filters,omitempty"` // If set to true, Envoy will try to skip decode data after metadata in the Thrift message. - // This mode will only work if the upstream and downstream protocols are the same and the transport - // is the same, the transport type is framed and the protocol is not Twitter. Otherwise Envoy will + // This mode will only work if the upstream and downstream protocols are the same and the transports + // are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will // fallback to decode the data. PayloadPassthrough bool `protobuf:"varint,6,opt,name=payload_passthrough,json=payloadPassthrough,proto3" json:"payload_passthrough,omitempty"` + // Optional maximum requests for a single downstream connection. If not specified, there is no limit. + MaxRequestsPerConnection *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` } func (x *ThriftProxy) Reset() { *x = ThriftProxy{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -196,7 +261,7 @@ func (x *ThriftProxy) String() string { func (*ThriftProxy) ProtoMessage() {} func (x *ThriftProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -209,7 +274,7 @@ func (x *ThriftProxy) ProtoReflect() protoreflect.Message { // Deprecated: Use ThriftProxy.ProtoReflect.Descriptor instead. func (*ThriftProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{0} + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{1} } func (x *ThriftProxy) GetTransport() TransportType { @@ -240,6 +305,13 @@ func (x *ThriftProxy) GetRouteConfig() *RouteConfiguration { return nil } +func (x *ThriftProxy) GetTrds() *Trds { + if x != nil { + return x.Trds + } + return nil +} + func (x *ThriftProxy) GetThriftFilters() []*ThriftFilter { if x != nil { return x.ThriftFilters @@ -254,6 +326,13 @@ func (x *ThriftProxy) GetPayloadPassthrough() bool { return false } +func (x *ThriftProxy) GetMaxRequestsPerConnection() *wrappers.UInt32Value { + if x != nil { + return x.MaxRequestsPerConnection + } + return nil +} + // ThriftFilter configures a Thrift filter. type ThriftFilter struct { state protoimpl.MessageState @@ -272,14 +351,13 @@ type ThriftFilter struct { // // Types that are assignable to ConfigType: // *ThriftFilter_TypedConfig - // *ThriftFilter_HiddenEnvoyDeprecatedConfig ConfigType isThriftFilter_ConfigType `protobuf_oneof:"config_type"` } func (x *ThriftFilter) Reset() { *x = ThriftFilter{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -292,7 +370,7 @@ func (x *ThriftFilter) String() string { func (*ThriftFilter) ProtoMessage() {} func (x *ThriftFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -305,7 +383,7 @@ func (x *ThriftFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use ThriftFilter.ProtoReflect.Descriptor instead. func (*ThriftFilter) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{1} + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{2} } func (x *ThriftFilter) GetName() string { @@ -329,14 +407,6 @@ func (x *ThriftFilter) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *ThriftFilter) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*ThriftFilter_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isThriftFilter_ConfigType interface { isThriftFilter_ConfigType() } @@ -345,18 +415,11 @@ type ThriftFilter_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type ThriftFilter_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*ThriftFilter_TypedConfig) isThriftFilter_ConfigType() {} -func (*ThriftFilter_HiddenEnvoyDeprecatedConfig) isThriftFilter_ConfigType() {} - // ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in // in -// :ref:`typed_extension_protocol_options`, +// :ref:`typed_extension_protocol_options`, // keyed by the name `envoy.filters.network.thrift_proxy`. type ThriftProtocolOptions struct { state protoimpl.MessageState @@ -365,12 +428,12 @@ type ThriftProtocolOptions struct { // Supplies the type of transport that the Thrift proxy should use for upstream connections. // Selecting - // :ref:`AUTO_TRANSPORT`, + // :ref:`AUTO_TRANSPORT`, // which is the default, causes the proxy to use the same transport as the downstream connection. Transport TransportType `protobuf:"varint,1,opt,name=transport,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.TransportType" json:"transport,omitempty"` // Supplies the type of protocol that the Thrift proxy should use for upstream connections. // Selecting - // :ref:`AUTO_PROTOCOL`, + // :ref:`AUTO_PROTOCOL`, // which is the default, causes the proxy to use the same protocol as the downstream connection. Protocol ProtocolType `protobuf:"varint,2,opt,name=protocol,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType" json:"protocol,omitempty"` } @@ -378,7 +441,7 @@ type ThriftProtocolOptions struct { func (x *ThriftProtocolOptions) Reset() { *x = ThriftProtocolOptions{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -391,7 +454,7 @@ func (x *ThriftProtocolOptions) String() string { func (*ThriftProtocolOptions) ProtoMessage() {} func (x *ThriftProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2] + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -404,7 +467,7 @@ func (x *ThriftProtocolOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use ThriftProtocolOptions.ProtoReflect.Descriptor instead. func (*ThriftProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{2} + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{3} } func (x *ThriftProtocolOptions) GetTransport() TransportType { @@ -431,111 +494,143 @@ var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_raw 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x04, 0x0a, 0x0b, 0x54, 0x68, - 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x67, 0x0a, 0x09, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x04, 0x54, + 0x72, 0x64, 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0xa9, 0x06, 0x0a, 0x0b, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x12, 0x67, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x64, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x80, 0x01, 0x0a, 0x0c, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, + 0x12, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x63, + 0x0a, 0x04, 0x74, 0x72, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x64, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x67, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, - 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x0e, 0x74, - 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x0d, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x61, - 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x12, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, - 0x75, 0x67, 0x68, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x68, - 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x22, 0xa0, 0x02, 0x0a, 0x0c, 0x54, 0x68, - 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x62, 0x0a, 0x1e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, - 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, - 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xb6, 0x02, 0x0a, - 0x15, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x64, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x3a, 0x4e, 0x9a, 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x54, 0x72, 0x64, 0x73, 0x42, 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, + 0x72, 0x64, 0x73, 0x12, 0x65, 0x0a, 0x0e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x74, 0x68, 0x72, + 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x50, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x12, 0x5b, 0x0a, 0x1b, 0x6d, + 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x18, + 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, + 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, + 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x22, 0xca, + 0x01, 0x0a, 0x0c, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, + 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, + 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xb6, 0x02, 0x0a, 0x15, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x49, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, - 0x41, 0x4d, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, 0x46, 0x52, 0x41, 0x4d, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x03, - 0x2a, 0x57, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, - 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, - 0x0e, 0x0a, 0x0a, 0x4c, 0x41, 0x58, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, - 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x43, 0x54, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, - 0x54, 0x57, 0x49, 0x54, 0x54, 0x45, 0x52, 0x10, 0x04, 0x42, 0x5c, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, - 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x54, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x64, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x3a, 0x4e, 0x9a, 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x49, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x41, + 0x4d, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, 0x46, 0x52, 0x41, 0x4d, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x03, 0x2a, + 0x64, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0e, + 0x0a, 0x0a, 0x4c, 0x41, 0x58, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x0b, + 0x0a, 0x07, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x43, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x07, 0x54, + 0x57, 0x49, 0x54, 0x54, 0x45, 0x52, 0x10, 0x04, 0x1a, 0x0b, 0x08, 0x01, 0x8a, 0xf4, 0x9b, 0xb3, + 0x05, 0x03, 0x33, 0x2e, 0x30, 0x42, 0xc4, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -551,31 +646,35 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_ra } var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_goTypes = []interface{}{ (TransportType)(0), // 0: envoy.extensions.filters.network.thrift_proxy.v3.TransportType (ProtocolType)(0), // 1: envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType - (*ThriftProxy)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy - (*ThriftFilter)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter - (*ThriftProtocolOptions)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions - (*RouteConfiguration)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration - (*any.Any)(nil), // 6: google.protobuf.Any - (*_struct.Struct)(nil), // 7: google.protobuf.Struct + (*Trds)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v3.Trds + (*ThriftProxy)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy + (*ThriftFilter)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter + (*ThriftProtocolOptions)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions + (*v3.ConfigSource)(nil), // 6: envoy.config.core.v3.ConfigSource + (*RouteConfiguration)(nil), // 7: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration + (*wrappers.UInt32Value)(nil), // 8: google.protobuf.UInt32Value + (*any.Any)(nil), // 9: google.protobuf.Any } var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_depIdxs = []int32{ - 0, // 0: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.TransportType - 1, // 1: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType - 5, // 2: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.route_config:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration - 3, // 3: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.thrift_filters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter - 6, // 4: envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter.typed_config:type_name -> google.protobuf.Any - 7, // 5: envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 0, // 6: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.TransportType - 1, // 7: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 6, // 0: envoy.extensions.filters.network.thrift_proxy.v3.Trds.config_source:type_name -> envoy.config.core.v3.ConfigSource + 0, // 1: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.TransportType + 1, // 2: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType + 7, // 3: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.route_config:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration + 2, // 4: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.trds:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.Trds + 4, // 5: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.thrift_filters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter + 8, // 6: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.max_requests_per_connection:type_name -> google.protobuf.UInt32Value + 9, // 7: envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter.typed_config:type_name -> google.protobuf.Any + 0, // 8: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.TransportType + 1, // 9: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_init() } @@ -586,7 +685,7 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_in file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_init() if !protoimpl.UnsafeEnabled { file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThriftProxy); i { + switch v := v.(*Trds); i { case 0: return &v.state case 1: @@ -598,7 +697,7 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_in } } file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThriftFilter); i { + switch v := v.(*ThriftProxy); i { case 0: return &v.state case 1: @@ -610,6 +709,18 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_in } } file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThriftFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ThriftProtocolOptions); i { case 0: return &v.state @@ -622,9 +733,8 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_in } } } - file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2].OneofWrappers = []interface{}{ (*ThriftFilter_TypedConfig)(nil), - (*ThriftFilter_HiddenEnvoyDeprecatedConfig)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -632,7 +742,7 @@ func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_in GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDesc, NumEnums: 2, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.validate.go index a4da0ac0bc..d428a5227b 100644 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto -package envoy_extensions_filters_network_thrift_proxy_v3 +package thrift_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,39 +31,225 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) +// Validate checks the field values on Trds with the rules defined in the proto +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. +func (m *Trds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Trds with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TrdsMultiError, or nil if none found. +func (m *Trds) ValidateAll() error { + return m.validate(true) +} + +func (m *Trds) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetConfigSource() == nil { + err := TrdsValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RouteConfigName + + if len(errors) > 0 { + return TrdsMultiError(errors) + } + + return nil +} + +// TrdsMultiError is an error wrapping multiple validation errors returned by +// Trds.ValidateAll() if the designated constraints aren't met. +type TrdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TrdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TrdsMultiError) AllErrors() []error { return m } + +// TrdsValidationError is the validation error returned by Trds.Validate if the +// designated constraints aren't met. +type TrdsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TrdsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TrdsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TrdsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TrdsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TrdsValidationError) ErrorName() string { return "TrdsValidationError" } + +// Error satisfies the builtin error interface +func (e TrdsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTrds.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TrdsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TrdsValidationError{} + // Validate checks the field values on ThriftProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ThriftProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftProxy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ThriftProxyMultiError, or +// nil if none found. +func (m *ThriftProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { - return ThriftProxyValidationError{ + err := ThriftProxyValidationError{ field: "Transport", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { - return ThriftProxyValidationError{ + err := ThriftProxyValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return ThriftProxyValidationError{ + err := ThriftProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftProxyValidationError{ field: "RouteConfig", @@ -72,10 +259,58 @@ func (m *ThriftProxy) Validate() error { } } + if all { + switch v := interface{}(m.GetTrds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "Trds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "Trds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ThriftProxyValidationError{ + field: "Trds", + reason: "embedded message failed validation", + cause: err, + } + } + } + for idx, item := range m.GetThriftFilters() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("ThriftFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("ThriftFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftProxyValidationError{ field: fmt.Sprintf("ThriftFilters[%v]", idx), @@ -89,9 +324,58 @@ func (m *ThriftProxy) Validate() error { // no validation rules for PayloadPassthrough + if all { + switch v := interface{}(m.GetMaxRequestsPerConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ThriftProxyValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ThriftProxyMultiError(errors) + } + return nil } +// ThriftProxyMultiError is an error wrapping multiple validation errors +// returned by ThriftProxy.ValidateAll() if the designated constraints aren't met. +type ThriftProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftProxyMultiError) AllErrors() []error { return m } + // ThriftProxyValidationError is the validation error returned by // ThriftProxy.Validate if the designated constraints aren't met. type ThriftProxyValidationError struct { @@ -147,40 +431,65 @@ var _ interface { } = ThriftProxyValidationError{} // Validate checks the field values on ThriftFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ThriftFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftFilter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ThriftFilterMultiError, or +// nil if none found. +func (m *ThriftFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftFilter) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return ThriftFilterValidationError{ + err := ThriftFilterValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { case *ThriftFilter_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ThriftFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *ThriftFilter_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftFilterValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -189,9 +498,29 @@ func (m *ThriftFilter) Validate() error { } + if len(errors) > 0 { + return ThriftFilterMultiError(errors) + } + return nil } +// ThriftFilterMultiError is an error wrapping multiple validation errors +// returned by ThriftFilter.ValidateAll() if the designated constraints aren't met. +type ThriftFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftFilterMultiError) AllErrors() []error { return m } + // ThriftFilterValidationError is the validation error returned by // ThriftFilter.Validate if the designated constraints aren't met. type ThriftFilterValidationError struct { @@ -248,29 +577,72 @@ var _ interface { // Validate checks the field values on ThriftProtocolOptions with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ThriftProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ThriftProtocolOptionsMultiError, or nil if none found. +func (m *ThriftProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftProtocolOptions) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { - return ThriftProtocolOptionsValidationError{ + err := ThriftProtocolOptionsValidationError{ field: "Transport", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { - return ThriftProtocolOptionsValidationError{ + err := ThriftProtocolOptionsValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ThriftProtocolOptionsMultiError(errors) } return nil } +// ThriftProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by ThriftProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type ThriftProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftProtocolOptionsMultiError) AllErrors() []error { return m } + // ThriftProtocolOptionsValidationError is the validation error returned by // ThriftProtocolOptions.Validate if the designated constraints aren't met. type ThriftProtocolOptionsValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.pb.go deleted file mode 100644 index e04720437b..0000000000 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.pb.go +++ /dev/null @@ -1,821 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/thrift_proxy/v4alpha/route.proto - -package envoy_extensions_filters_network_thrift_proxy_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type RouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"` -} - -func (x *RouteConfiguration) Reset() { - *x = RouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteConfiguration) ProtoMessage() {} - -func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. -func (*RouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteConfiguration) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Route matching parameters. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Route request to some upstream cluster. - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescGZIP(), []int{1} -} - -func (x *Route) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (x *Route) GetRoute() *RouteAction { - if x != nil { - return x.Route - } - return nil -} - -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchSpecifier: - // *RouteMatch_MethodName - // *RouteMatch_ServiceName - MatchSpecifier isRouteMatch_MatchSpecifier `protobuf_oneof:"match_specifier"` - // Inverts whatever matching is done in the :ref:`method_name - // ` or - // :ref:`service_name - // ` fields. - // Cannot be combined with wildcard matching as that would result in routes never being matched. - // - // .. note:: - // - // This does not invert matching done as part of the :ref:`headers field - // ` field. To - // invert header matching, see :ref:`invert_match - // `. - Invert bool `protobuf:"varint,3,opt,name=invert,proto3" json:"invert,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). Note that this only applies for Thrift transports and/or - // protocols that support headers. - Headers []*v4alpha.HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescGZIP(), []int{2} -} - -func (m *RouteMatch) GetMatchSpecifier() isRouteMatch_MatchSpecifier { - if m != nil { - return m.MatchSpecifier - } - return nil -} - -func (x *RouteMatch) GetMethodName() string { - if x, ok := x.GetMatchSpecifier().(*RouteMatch_MethodName); ok { - return x.MethodName - } - return "" -} - -func (x *RouteMatch) GetServiceName() string { - if x, ok := x.GetMatchSpecifier().(*RouteMatch_ServiceName); ok { - return x.ServiceName - } - return "" -} - -func (x *RouteMatch) GetInvert() bool { - if x != nil { - return x.Invert - } - return false -} - -func (x *RouteMatch) GetHeaders() []*v4alpha.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -type isRouteMatch_MatchSpecifier interface { - isRouteMatch_MatchSpecifier() -} - -type RouteMatch_MethodName struct { - // If specified, the route must exactly match the request method name. As a special case, an - // empty string matches any request method name. - MethodName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3,oneof"` -} - -type RouteMatch_ServiceName struct { - // If specified, the route must have the service name as the request method name prefix. As a - // special case, an empty string matches any service name. Only relevant when service - // multiplexing. - ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3,oneof"` -} - -func (*RouteMatch_MethodName) isRouteMatch_MatchSpecifier() {} - -func (*RouteMatch_ServiceName) isRouteMatch_MatchSpecifier() {} - -// [#next-free-field: 7] -type RouteAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ClusterSpecifier: - // *RouteAction_Cluster - // *RouteAction_WeightedClusters - // *RouteAction_ClusterHeader - ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` - // 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. - // Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match - // `, - // with values there taking precedence. Keys and values should be provided under the "envoy.lb" - // metadata key. - MetadataMatch *v4alpha1.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` - // Specifies a set of rate limit configurations that could be applied to the route. - // N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders - // action with the header name ":method-name". - RateLimits []*v4alpha.RateLimit `protobuf:"bytes,4,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` - // Strip the service prefix from the method name, if there's a prefix. For - // example, the method call Service:method would end up being just method. - StripServiceName bool `protobuf:"varint,5,opt,name=strip_service_name,json=stripServiceName,proto3" json:"strip_service_name,omitempty"` -} - -func (x *RouteAction) Reset() { - *x = RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction) ProtoMessage() {} - -func (x *RouteAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. -func (*RouteAction) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescGZIP(), []int{3} -} - -func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { - if m != nil { - return m.ClusterSpecifier - } - return nil -} - -func (x *RouteAction) GetCluster() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *RouteAction) GetWeightedClusters() *WeightedCluster { - if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -func (x *RouteAction) GetClusterHeader() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_ClusterHeader); ok { - return x.ClusterHeader - } - return "" -} - -func (x *RouteAction) GetMetadataMatch() *v4alpha1.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *RouteAction) GetRateLimits() []*v4alpha.RateLimit { - if x != nil { - return x.RateLimits - } - return nil -} - -func (x *RouteAction) GetStripServiceName() bool { - if x != nil { - return x.StripServiceName - } - return false -} - -type isRouteAction_ClusterSpecifier interface { - isRouteAction_ClusterSpecifier() -} - -type RouteAction_Cluster struct { - // Indicates a single upstream cluster to which the request should be routed - // to. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` -} - -type RouteAction_WeightedClusters struct { - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - WeightedClusters *WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} - -type RouteAction_ClusterHeader struct { - // Envoy will determine the cluster to route to by reading the value of the - // Thrift header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist Envoy will - // respond with an unknown method exception or an internal error exception, - // respectively. - ClusterHeader string `protobuf:"bytes,6,opt,name=cluster_header,json=clusterHeader,proto3,oneof"` -} - -func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} - -// 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 WeightedCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies one or more upstream clusters associated with the route. - Clusters []*WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` -} - -func (x *WeightedCluster) Reset() { - *x = WeightedCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster) ProtoMessage() {} - -func (x *WeightedCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster.ProtoReflect.Descriptor instead. -func (*WeightedCluster) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescGZIP(), []int{4} -} - -func (x *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { - if x != nil { - return x.Clusters - } - return nil -} - -type WeightedCluster_ClusterWeight struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *wrappers.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, combined with what's - // provided in :ref:`RouteAction's metadata_match - // `, - // will be considered. Values here will take precedence. Keys and values should be provided - // under the "envoy.lb" metadata key. - MetadataMatch *v4alpha1.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` -} - -func (x *WeightedCluster_ClusterWeight) Reset() { - *x = WeightedCluster_ClusterWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster_ClusterWeight) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster_ClusterWeight) ProtoMessage() {} - -func (x *WeightedCluster_ClusterWeight) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster_ClusterWeight.ProtoReflect.Descriptor instead. -func (*WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *WeightedCluster_ClusterWeight) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WeightedCluster_ClusterWeight) GetWeight() *wrappers.UInt32Value { - if x != nil { - return x.Weight - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *v4alpha1.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -var File_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDesc = []byte{ - 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, - 0x01, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x06, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x3a, - 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x02, 0x0a, 0x05, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x61, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x62, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x3d, 0x9a, 0xc5, - 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x8d, 0x02, 0x0a, 0x0a, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, - 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, - 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x0f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x82, 0x04, 0x0a, 0x0b, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x75, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, - 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x00, - 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x4a, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x46, 0x0a, 0x0b, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x10, 0x73, 0x74, 0x72, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0xe7, 0x03, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x7a, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x1a, 0x8e, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x3d, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4a, - 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x55, 0x9a, 0xc5, 0x88, 0x1e, - 0x50, 0x0a, 0x4e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x5b, 0x0a, 0x43, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDesc -) - -func file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDescData -} - -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteConfiguration - (*Route)(nil), // 1: envoy.extensions.filters.network.thrift_proxy.v4alpha.Route - (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteMatch - (*RouteAction)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteAction - (*WeightedCluster)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v4alpha.WeightedCluster - (*WeightedCluster_ClusterWeight)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v4alpha.WeightedCluster.ClusterWeight - (*v4alpha.HeaderMatcher)(nil), // 6: envoy.config.route.v4alpha.HeaderMatcher - (*v4alpha1.Metadata)(nil), // 7: envoy.config.core.v4alpha.Metadata - (*v4alpha.RateLimit)(nil), // 8: envoy.config.route.v4alpha.RateLimit - (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value -} -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteConfiguration.routes:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.Route - 2, // 1: envoy.extensions.filters.network.thrift_proxy.v4alpha.Route.match:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteMatch - 3, // 2: envoy.extensions.filters.network.thrift_proxy.v4alpha.Route.route:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteAction - 6, // 3: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteMatch.headers:type_name -> envoy.config.route.v4alpha.HeaderMatcher - 4, // 4: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteAction.weighted_clusters:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.WeightedCluster - 7, // 5: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteAction.metadata_match:type_name -> envoy.config.core.v4alpha.Metadata - 8, // 6: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteAction.rate_limits:type_name -> envoy.config.route.v4alpha.RateLimit - 5, // 7: envoy.extensions.filters.network.thrift_proxy.v4alpha.WeightedCluster.clusters:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.WeightedCluster.ClusterWeight - 9, // 8: envoy.extensions.filters.network.thrift_proxy.v4alpha.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value - 7, // 9: envoy.extensions.filters.network.thrift_proxy.v4alpha.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v4alpha.Metadata - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_init() } -func file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_init() { - if File_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster_ClusterWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*RouteMatch_MethodName)(nil), - (*RouteMatch_ServiceName)(nil), - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*RouteAction_Cluster)(nil), - (*RouteAction_WeightedClusters)(nil), - (*RouteAction_ClusterHeader)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto = out.File - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_rawDesc = nil - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_goTypes = nil - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.pb.validate.go deleted file mode 100644 index 73ee1b2bb6..0000000000 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/route.pb.validate.go +++ /dev/null @@ -1,637 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/thrift_proxy/v4alpha/route.proto - -package envoy_extensions_filters_network_thrift_proxy_v4alpha - -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{} -) - -// 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.GetRoutes() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - 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{} - -// 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 - } - - 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 m.GetRoute() == nil { - return RouteValidationError{ - field: "Route", - reason: "value is required", - } - } - - 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, - } - } - } - - 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 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 - } - - // no validation rules for Invert - - 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, - } - } - } - - } - - switch m.MatchSpecifier.(type) { - - case *RouteMatch_MethodName: - // no validation rules for MethodName - - case *RouteMatch_ServiceName: - // no validation rules for ServiceName - - default: - return RouteMatchValidationError{ - field: "MatchSpecifier", - 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 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 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, - } - } - } - - 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, - } - } - } - - } - - // no validation rules for StripServiceName - - switch m.ClusterSpecifier.(type) { - - case *RouteAction_Cluster: - - if utf8.RuneCountInString(m.GetCluster()) < 1 { - return RouteActionValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - case *RouteAction_ClusterHeader: - - if utf8.RuneCountInString(m.GetClusterHeader()) < 1 { - return RouteActionValidationError{ - field: "ClusterHeader", - reason: "value length must be at least 1 runes", - } - } - - if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - return RouteActionValidationError{ - field: "ClusterHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - } - - default: - return RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "value is required", - } - - } - - 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]*$") - -// 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, - } - } - } - - } - - 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 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 utf8.RuneCountInString(m.GetName()) < 1 { - return WeightedCluster_ClusterWeightValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - if wrapper := m.GetWeight(); wrapper != nil { - - if wrapper.GetValue() < 1 { - return WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "value must be greater than or equal to 1", - } - } - - } - - 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, - } - } - } - - 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{} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.pb.go deleted file mode 100644 index a69f289319..0000000000 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.pb.go +++ /dev/null @@ -1,627 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.proto - -package envoy_extensions_filters_network_thrift_proxy_v4alpha - -import ( - _ "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" - _ "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Thrift transport types supported by Envoy. -type TransportType int32 - -const ( - // For downstream connections, the Thrift proxy will attempt to determine which transport to use. - // For upstream connections, the Thrift proxy will use same transport as the downstream - // connection. - TransportType_AUTO_TRANSPORT TransportType = 0 - // The Thrift proxy will use the Thrift framed transport. - TransportType_FRAMED TransportType = 1 - // The Thrift proxy will use the Thrift unframed transport. - TransportType_UNFRAMED TransportType = 2 - // The Thrift proxy will assume the client is using the Thrift header transport. - TransportType_HEADER TransportType = 3 -) - -// Enum value maps for TransportType. -var ( - TransportType_name = map[int32]string{ - 0: "AUTO_TRANSPORT", - 1: "FRAMED", - 2: "UNFRAMED", - 3: "HEADER", - } - TransportType_value = map[string]int32{ - "AUTO_TRANSPORT": 0, - "FRAMED": 1, - "UNFRAMED": 2, - "HEADER": 3, - } -) - -func (x TransportType) Enum() *TransportType { - p := new(TransportType) - *p = x - return p -} - -func (x TransportType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TransportType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_enumTypes[0].Descriptor() -} - -func (TransportType) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_enumTypes[0] -} - -func (x TransportType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TransportType.Descriptor instead. -func (TransportType) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescGZIP(), []int{0} -} - -// Thrift Protocol types supported by Envoy. -type ProtocolType int32 - -const ( - // For downstream connections, the Thrift proxy will attempt to determine which protocol to use. - // Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol - // detection. For upstream connections, the Thrift proxy will use the same protocol as the - // downstream connection. - ProtocolType_AUTO_PROTOCOL ProtocolType = 0 - // The Thrift proxy will use the Thrift binary protocol. - ProtocolType_BINARY ProtocolType = 1 - // The Thrift proxy will use Thrift non-strict binary protocol. - ProtocolType_LAX_BINARY ProtocolType = 2 - // The Thrift proxy will use the Thrift compact protocol. - ProtocolType_COMPACT ProtocolType = 3 - // The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library. - ProtocolType_TWITTER ProtocolType = 4 -) - -// Enum value maps for ProtocolType. -var ( - ProtocolType_name = map[int32]string{ - 0: "AUTO_PROTOCOL", - 1: "BINARY", - 2: "LAX_BINARY", - 3: "COMPACT", - 4: "TWITTER", - } - ProtocolType_value = map[string]int32{ - "AUTO_PROTOCOL": 0, - "BINARY": 1, - "LAX_BINARY": 2, - "COMPACT": 3, - "TWITTER": 4, - } -) - -func (x ProtocolType) Enum() *ProtocolType { - p := new(ProtocolType) - *p = x - return p -} - -func (x ProtocolType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProtocolType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_enumTypes[1].Descriptor() -} - -func (ProtocolType) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_enumTypes[1] -} - -func (x ProtocolType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProtocolType.Descriptor instead. -func (ProtocolType) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescGZIP(), []int{1} -} - -// [#next-free-field: 7] -type ThriftProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Supplies the type of transport that the Thrift proxy should use. Defaults to - // :ref:`AUTO_TRANSPORT`. - Transport TransportType `protobuf:"varint,2,opt,name=transport,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v4alpha.TransportType" json:"transport,omitempty"` - // Supplies the type of protocol that the Thrift proxy should use. Defaults to - // :ref:`AUTO_PROTOCOL`. - Protocol ProtocolType `protobuf:"varint,3,opt,name=protocol,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v4alpha.ProtocolType" json:"protocol,omitempty"` - // The human readable prefix to use when emitting statistics. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // The route table for the connection manager is static and is specified in this property. - RouteConfig *RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` - // A list of individual Thrift filters that make up the filter chain for requests made to the - // Thrift proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no thrift_filters are specified, a default Thrift router filter - // (`envoy.filters.thrift.router`) is used. - ThriftFilters []*ThriftFilter `protobuf:"bytes,5,rep,name=thrift_filters,json=thriftFilters,proto3" json:"thrift_filters,omitempty"` - // If set to true, Envoy will try to skip decode data after metadata in the Thrift message. - // This mode will only work if the upstream and downstream protocols are the same and the transport - // is the same, the transport type is framed and the protocol is not Twitter. Otherwise Envoy will - // fallback to decode the data. - PayloadPassthrough bool `protobuf:"varint,6,opt,name=payload_passthrough,json=payloadPassthrough,proto3" json:"payload_passthrough,omitempty"` -} - -func (x *ThriftProxy) Reset() { - *x = ThriftProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ThriftProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ThriftProxy) ProtoMessage() {} - -func (x *ThriftProxy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ThriftProxy.ProtoReflect.Descriptor instead. -func (*ThriftProxy) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescGZIP(), []int{0} -} - -func (x *ThriftProxy) GetTransport() TransportType { - if x != nil { - return x.Transport - } - return TransportType_AUTO_TRANSPORT -} - -func (x *ThriftProxy) GetProtocol() ProtocolType { - if x != nil { - return x.Protocol - } - return ProtocolType_AUTO_PROTOCOL -} - -func (x *ThriftProxy) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *ThriftProxy) GetRouteConfig() *RouteConfiguration { - if x != nil { - return x.RouteConfig - } - return nil -} - -func (x *ThriftProxy) GetThriftFilters() []*ThriftFilter { - if x != nil { - return x.ThriftFilters - } - return nil -} - -func (x *ThriftProxy) GetPayloadPassthrough() bool { - if x != nil { - return x.PayloadPassthrough - } - return false -} - -// ThriftFilter configures a Thrift filter. -type ThriftFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - // [#comment:TODO(zuercher): Auto generate the following list] - // * :ref:`envoy.filters.thrift.router ` - // * :ref:`envoy.filters.thrift.rate_limit ` - 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 assignable to ConfigType: - // *ThriftFilter_TypedConfig - ConfigType isThriftFilter_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *ThriftFilter) Reset() { - *x = ThriftFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ThriftFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ThriftFilter) ProtoMessage() {} - -func (x *ThriftFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ThriftFilter.ProtoReflect.Descriptor instead. -func (*ThriftFilter) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescGZIP(), []int{1} -} - -func (x *ThriftFilter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *ThriftFilter) GetConfigType() isThriftFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *ThriftFilter) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*ThriftFilter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isThriftFilter_ConfigType interface { - isThriftFilter_ConfigType() -} - -type ThriftFilter_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*ThriftFilter_TypedConfig) isThriftFilter_ConfigType() {} - -// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in -// in -// :ref:`typed_extension_protocol_options`, -// keyed by the name `envoy.filters.network.thrift_proxy`. -type ThriftProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Supplies the type of transport that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_TRANSPORT`, - // which is the default, causes the proxy to use the same transport as the downstream connection. - Transport TransportType `protobuf:"varint,1,opt,name=transport,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v4alpha.TransportType" json:"transport,omitempty"` - // Supplies the type of protocol that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_PROTOCOL`, - // which is the default, causes the proxy to use the same protocol as the downstream connection. - Protocol ProtocolType `protobuf:"varint,2,opt,name=protocol,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v4alpha.ProtocolType" json:"protocol,omitempty"` -} - -func (x *ThriftProtocolOptions) Reset() { - *x = ThriftProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ThriftProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ThriftProtocolOptions) ProtoMessage() {} - -func (x *ThriftProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ThriftProtocolOptions.ProtoReflect.Descriptor instead. -func (*ThriftProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescGZIP(), []int{2} -} - -func (x *ThriftProtocolOptions) GetTransport() TransportType { - if x != nil { - return x.Transport - } - return TransportType_AUTO_TRANSPORT -} - -func (x *ThriftProtocolOptions) GetProtocol() ProtocolType { - if x != nil { - return x.Protocol - } - return ProtocolType_AUTO_PROTOCOL -} - -var File_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDesc = []byte{ - 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x1a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x04, 0x0a, 0x0b, 0x54, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x6c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, - 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x69, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, - 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x6c, 0x0a, 0x0c, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6a, 0x0a, 0x0e, 0x74, 0x68, 0x72, - 0x69, 0x66, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x12, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x73, 0x73, 0x74, - 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x22, 0xc9, 0x01, 0x0a, 0x0c, - 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, - 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x68, - 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xbf, 0x02, 0x0a, 0x15, 0x54, 0x68, 0x72, 0x69, - 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x6c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x69, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, - 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x49, 0x0a, 0x0d, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x00, 0x12, 0x0a, - 0x0a, 0x06, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, - 0x46, 0x52, 0x41, 0x4d, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, - 0x45, 0x52, 0x10, 0x03, 0x2a, 0x57, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, - 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, - 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x41, 0x58, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, - 0x59, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x43, 0x54, 0x10, 0x03, - 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x57, 0x49, 0x54, 0x54, 0x45, 0x52, 0x10, 0x04, 0x42, 0x61, 0x0a, - 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x10, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDesc -) - -func file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescData) - }) - return file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDescData -} - -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_goTypes = []interface{}{ - (TransportType)(0), // 0: envoy.extensions.filters.network.thrift_proxy.v4alpha.TransportType - (ProtocolType)(0), // 1: envoy.extensions.filters.network.thrift_proxy.v4alpha.ProtocolType - (*ThriftProxy)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProxy - (*ThriftFilter)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftFilter - (*ThriftProtocolOptions)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProtocolOptions - (*RouteConfiguration)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteConfiguration - (*any.Any)(nil), // 6: google.protobuf.Any -} -var file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_depIdxs = []int32{ - 0, // 0: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProxy.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.TransportType - 1, // 1: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProxy.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.ProtocolType - 5, // 2: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProxy.route_config:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.RouteConfiguration - 3, // 3: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProxy.thrift_filters:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftFilter - 6, // 4: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftFilter.typed_config:type_name -> google.protobuf.Any - 0, // 5: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProtocolOptions.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.TransportType - 1, // 6: envoy.extensions.filters.network.thrift_proxy.v4alpha.ThriftProtocolOptions.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v4alpha.ProtocolType - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_init() } -func file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_init() { - if File_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto != nil { - return - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThriftProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThriftFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThriftProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ThriftFilter_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDesc, - NumEnums: 2, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_depIdxs, - EnumInfos: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_enumTypes, - MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto = out.File - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_rawDesc = nil - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_goTypes = nil - file_envoy_extensions_filters_network_thrift_proxy_v4alpha_thrift_proxy_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.pb.validate.go deleted file mode 100644 index 78c77b6031..0000000000 --- a/pkg/api/envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.pb.validate.go +++ /dev/null @@ -1,316 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/network/thrift_proxy/v4alpha/thrift_proxy.proto - -package envoy_extensions_filters_network_thrift_proxy_v4alpha - -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{} -) - -// Validate checks the field values on ThriftProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ThriftProxy) Validate() error { - if m == nil { - return nil - } - - if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { - return ThriftProxyValidationError{ - field: "Transport", - reason: "value must be one of the defined enum values", - } - } - - if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { - return ThriftProxyValidationError{ - field: "Protocol", - reason: "value must be one of the defined enum values", - } - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return ThriftProxyValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ThriftProxyValidationError{ - field: "RouteConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetThriftFilters() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ThriftProxyValidationError{ - field: fmt.Sprintf("ThriftFilters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for PayloadPassthrough - - return nil -} - -// ThriftProxyValidationError is the validation error returned by -// ThriftProxy.Validate if the designated constraints aren't met. -type ThriftProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ThriftProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ThriftProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ThriftProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ThriftProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ThriftProxyValidationError) ErrorName() string { return "ThriftProxyValidationError" } - -// Error satisfies the builtin error interface -func (e ThriftProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sThriftProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ThriftProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ThriftProxyValidationError{} - -// Validate checks the field values on ThriftFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ThriftFilter) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return ThriftFilterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - case *ThriftFilter_TypedConfig: - - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ThriftFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ThriftFilterValidationError is the validation error returned by -// ThriftFilter.Validate if the designated constraints aren't met. -type ThriftFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ThriftFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ThriftFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ThriftFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ThriftFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ThriftFilterValidationError) ErrorName() string { return "ThriftFilterValidationError" } - -// Error satisfies the builtin error interface -func (e ThriftFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sThriftFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ThriftFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ThriftFilterValidationError{} - -// Validate checks the field values on ThriftProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ThriftProtocolOptions) Validate() error { - if m == nil { - return nil - } - - if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { - return ThriftProtocolOptionsValidationError{ - field: "Transport", - reason: "value must be one of the defined enum values", - } - } - - if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { - return ThriftProtocolOptionsValidationError{ - field: "Protocol", - reason: "value must be one of the defined enum values", - } - } - - return nil -} - -// ThriftProtocolOptionsValidationError is the validation error returned by -// ThriftProtocolOptions.Validate if the designated constraints aren't met. -type ThriftProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ThriftProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ThriftProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ThriftProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ThriftProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ThriftProtocolOptionsValidationError) ErrorName() string { - return "ThriftProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e ThriftProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sThriftProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ThriftProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ThriftProtocolOptionsValidationError{} diff --git a/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.go b/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.go index 3c4d4fbd47..c54470669f 100644 --- a/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.go +++ b/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/wasm/v3/wasm.proto -package envoy_extensions_filters_network_wasm_v3 +package wasmv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/wasm/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Wasm struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -89,20 +83,22 @@ var file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDesc = []byte{ 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x46, 0x0a, 0x04, 0x57, 0x61, 0x73, 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, - 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4d, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, - 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x04, 0x57, 0x61, 0x73, 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, + 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa5, 0x01, 0x0a, 0x36, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x77, + 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x77, 0x61, 0x73, + 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.validate.go b/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.validate.go index 0622850327..9a073eff84 100644 --- a/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/wasm/v3/wasm.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/wasm/v3/wasm.proto -package envoy_extensions_filters_network_wasm_v3 +package wasmv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Wasm with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Wasm) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Wasm with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in WasmMultiError, or nil if none found. +func (m *Wasm) ValidateAll() error { + return m.validate(true) +} + +func (m *Wasm) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WasmValidationError{ field: "Config", @@ -50,9 +85,29 @@ func (m *Wasm) Validate() error { } } + if len(errors) > 0 { + return WasmMultiError(errors) + } + return nil } +// WasmMultiError is an error wrapping multiple validation errors returned by +// Wasm.ValidateAll() if the designated constraints aren't met. +type WasmMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmMultiError) AllErrors() []error { return m } + // WasmValidationError is the validation error returned by Wasm.Validate if the // designated constraints aren't met. type WasmValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.go b/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.go index b37a0baffc..cf67f6ea55 100644 --- a/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto -package envoy_extensions_filters_network_zookeeper_proxy_v3 +package zookeeper_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ZooKeeperProxy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -136,14 +131,21 @@ var file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_pro 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x5a, 0x6f, 0x6f, - 0x4b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x62, 0x0a, 0x41, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x7a, 0x6f, - 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, - 0x42, 0x13, 0x5a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0xd0, 0x01, 0x0a, 0x41, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x7a, + 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, + 0x33, 0x42, 0x13, 0x5a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.validate.go index 496aabf04b..6d356237dd 100644 --- a/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto -package envoy_extensions_filters_network_zookeeper_proxy_v3 +package zookeeper_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ZooKeeperProxy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ZooKeeperProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ZooKeeperProxy with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ZooKeeperProxyMultiError, +// or nil if none found. +func (m *ZooKeeperProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *ZooKeeperProxy) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return ZooKeeperProxyValidationError{ + err := ZooKeeperProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AccessLog - if v, ok := interface{}(m.GetMaxPacketBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxPacketBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZooKeeperProxyValidationError{ + field: "MaxPacketBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZooKeeperProxyValidationError{ + field: "MaxPacketBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPacketBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZooKeeperProxyValidationError{ field: "MaxPacketBytes", @@ -60,9 +99,30 @@ func (m *ZooKeeperProxy) Validate() error { } } + if len(errors) > 0 { + return ZooKeeperProxyMultiError(errors) + } + return nil } +// ZooKeeperProxyMultiError is an error wrapping multiple validation errors +// returned by ZooKeeperProxy.ValidateAll() if the designated constraints +// aren't met. +type ZooKeeperProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZooKeeperProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZooKeeperProxyMultiError) AllErrors() []error { return m } + // ZooKeeperProxyValidationError is the validation error returned by // ZooKeeperProxy.Validate if the designated constraints aren't met. type ZooKeeperProxyValidationError struct { diff --git a/pkg/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.go b/pkg/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.go new file mode 100644 index 0000000000..e1a4ff8e6b --- /dev/null +++ b/pkg/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.go @@ -0,0 +1,517 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto + +package dns_filterv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/dns/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the DNS filter. +type DnsFilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The stat prefix used when emitting DNS filter statistics + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // Server context configuration contains the data that the filter uses to respond + // to DNS requests. + ServerConfig *DnsFilterConfig_ServerContextConfig `protobuf:"bytes,2,opt,name=server_config,json=serverConfig,proto3" json:"server_config,omitempty"` + // Client context configuration controls Envoy's behavior when it must use external + // resolvers to answer a query. This object is optional and if omitted instructs + // the filter to resolve queries from the data in the server_config + ClientConfig *DnsFilterConfig_ClientContextConfig `protobuf:"bytes,3,opt,name=client_config,json=clientConfig,proto3" json:"client_config,omitempty"` +} + +func (x *DnsFilterConfig) Reset() { + *x = DnsFilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsFilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsFilterConfig) ProtoMessage() {} + +func (x *DnsFilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsFilterConfig.ProtoReflect.Descriptor instead. +func (*DnsFilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP(), []int{0} +} + +func (x *DnsFilterConfig) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *DnsFilterConfig) GetServerConfig() *DnsFilterConfig_ServerContextConfig { + if x != nil { + return x.ServerConfig + } + return nil +} + +func (x *DnsFilterConfig) GetClientConfig() *DnsFilterConfig_ClientContextConfig { + if x != nil { + return x.ClientConfig + } + return nil +} + +// This message contains the configuration for the DNS Filter operating +// in a server context. This message will contain the virtual hosts and +// associated addresses with which Envoy will respond to queries +type DnsFilterConfig_ServerContextConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ConfigSource: + // *DnsFilterConfig_ServerContextConfig_InlineDnsTable + // *DnsFilterConfig_ServerContextConfig_ExternalDnsTable + ConfigSource isDnsFilterConfig_ServerContextConfig_ConfigSource `protobuf_oneof:"config_source"` +} + +func (x *DnsFilterConfig_ServerContextConfig) Reset() { + *x = DnsFilterConfig_ServerContextConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsFilterConfig_ServerContextConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsFilterConfig_ServerContextConfig) ProtoMessage() {} + +func (x *DnsFilterConfig_ServerContextConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsFilterConfig_ServerContextConfig.ProtoReflect.Descriptor instead. +func (*DnsFilterConfig_ServerContextConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *DnsFilterConfig_ServerContextConfig) GetConfigSource() isDnsFilterConfig_ServerContextConfig_ConfigSource { + if m != nil { + return m.ConfigSource + } + return nil +} + +func (x *DnsFilterConfig_ServerContextConfig) GetInlineDnsTable() *v3.DnsTable { + if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_InlineDnsTable); ok { + return x.InlineDnsTable + } + return nil +} + +func (x *DnsFilterConfig_ServerContextConfig) GetExternalDnsTable() *v31.DataSource { + if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_ExternalDnsTable); ok { + return x.ExternalDnsTable + } + return nil +} + +type isDnsFilterConfig_ServerContextConfig_ConfigSource interface { + isDnsFilterConfig_ServerContextConfig_ConfigSource() +} + +type DnsFilterConfig_ServerContextConfig_InlineDnsTable struct { + // Load the configuration specified from the control plane + InlineDnsTable *v3.DnsTable `protobuf:"bytes,1,opt,name=inline_dns_table,json=inlineDnsTable,proto3,oneof"` +} + +type DnsFilterConfig_ServerContextConfig_ExternalDnsTable struct { + // Seed the filter configuration from an external path. This source + // is a yaml formatted file that contains the DnsTable driving Envoy's + // responses to DNS queries + ExternalDnsTable *v31.DataSource `protobuf:"bytes,2,opt,name=external_dns_table,json=externalDnsTable,proto3,oneof"` +} + +func (*DnsFilterConfig_ServerContextConfig_InlineDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { +} + +func (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { +} + +// This message contains the configuration for the DNS Filter operating +// in a client context. This message will contain the timeouts, retry, +// and forwarding configuration for Envoy to make DNS requests to other +// resolvers +// +// [#next-free-field: 6] +type DnsFilterConfig_ClientContextConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Sets the maximum time we will wait for the upstream query to complete + // We allow 5s for the upstream resolution to complete, so the minimum + // value here is 1. Note that the total latency for a failed query is the + // number of retries multiplied by the resolver_timeout. + ResolverTimeout *duration.Duration `protobuf:"bytes,1,opt,name=resolver_timeout,json=resolverTimeout,proto3" json:"resolver_timeout,omitempty"` + // This field was used for `dns_resolution_config` in Envoy 1.19.0 and + // 1.19.1. + // Control planes that need to set this field for Envoy 1.19.0 and + // 1.19.1 clients should fork the protobufs and change the field type + // to `DnsResolutionConfig`. + // Control planes that need to simultaneously support Envoy 1.18.x and + // Envoy 1.19.x should avoid Envoy 1.19.0 and 1.19.1. + // + // [#not-implemented-hide:] + // + // Deprecated: Do not use. + UpstreamResolvers []*v31.Address `protobuf:"bytes,2,rep,name=upstream_resolvers,json=upstreamResolvers,proto3" json:"upstream_resolvers,omitempty"` + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + // + // Deprecated: Do not use. + DnsResolutionConfig *v31.DnsResolutionConfig `protobuf:"bytes,5,opt,name=dns_resolution_config,json=dnsResolutionConfig,proto3" json:"dns_resolution_config,omitempty"` + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this *typed_dns_resolver_config*. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, + // when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. + // When *typed_dns_resolver_config* is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + TypedDnsResolverConfig *v31.TypedExtensionConfig `protobuf:"bytes,4,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"` + // Controls how many outstanding external lookup contexts the filter tracks. + // The context structure allows the filter to respond to every query even if the external + // resolution times out or is otherwise unsuccessful + MaxPendingLookups uint64 `protobuf:"varint,3,opt,name=max_pending_lookups,json=maxPendingLookups,proto3" json:"max_pending_lookups,omitempty"` +} + +func (x *DnsFilterConfig_ClientContextConfig) Reset() { + *x = DnsFilterConfig_ClientContextConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsFilterConfig_ClientContextConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsFilterConfig_ClientContextConfig) ProtoMessage() {} + +func (x *DnsFilterConfig_ClientContextConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsFilterConfig_ClientContextConfig.ProtoReflect.Descriptor instead. +func (*DnsFilterConfig_ClientContextConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *DnsFilterConfig_ClientContextConfig) GetResolverTimeout() *duration.Duration { + if x != nil { + return x.ResolverTimeout + } + return nil +} + +// Deprecated: Do not use. +func (x *DnsFilterConfig_ClientContextConfig) GetUpstreamResolvers() []*v31.Address { + if x != nil { + return x.UpstreamResolvers + } + return nil +} + +// Deprecated: Do not use. +func (x *DnsFilterConfig_ClientContextConfig) GetDnsResolutionConfig() *v31.DnsResolutionConfig { + if x != nil { + return x.DnsResolutionConfig + } + return nil +} + +func (x *DnsFilterConfig_ClientContextConfig) GetTypedDnsResolverConfig() *v31.TypedExtensionConfig { + if x != nil { + return x.TypedDnsResolverConfig + } + return nil +} + +func (x *DnsFilterConfig_ClientContextConfig) GetMaxPendingLookups() uint64 { + if x != nil { + return x.MaxPendingLookups + } + return 0 +} + +var File_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x64, + 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x07, 0x0a, 0x0f, 0x44, 0x6e, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x74, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, + 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, + 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x10, 0x69, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x6e, 0x73, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6e, + 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xce, 0x03, 0x0a, + 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, + 0x04, 0x32, 0x02, 0x08, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x59, 0x0a, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x11, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0b, 0x18, 0x01, 0x92, + 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, + 0x19, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x74, 0x79, + 0x70, 0x65, 0x64, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x50, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x42, 0xb4, 0x01, + 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x44, 0x6e, 0x73, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5e, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, + 0x70, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData = file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc +) + +func file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData) + }) + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData +} + +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_goTypes = []interface{}{ + (*DnsFilterConfig)(nil), // 0: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig + (*DnsFilterConfig_ServerContextConfig)(nil), // 1: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig + (*DnsFilterConfig_ClientContextConfig)(nil), // 2: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig + (*v3.DnsTable)(nil), // 3: envoy.data.dns.v3.DnsTable + (*v31.DataSource)(nil), // 4: envoy.config.core.v3.DataSource + (*duration.Duration)(nil), // 5: google.protobuf.Duration + (*v31.Address)(nil), // 6: envoy.config.core.v3.Address + (*v31.DnsResolutionConfig)(nil), // 7: envoy.config.core.v3.DnsResolutionConfig + (*v31.TypedExtensionConfig)(nil), // 8: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.server_config:type_name -> envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig + 2, // 1: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.client_config:type_name -> envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig + 3, // 2: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig.inline_dns_table:type_name -> envoy.data.dns.v3.DnsTable + 4, // 3: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig.external_dns_table:type_name -> envoy.config.core.v3.DataSource + 5, // 4: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.resolver_timeout:type_name -> google.protobuf.Duration + 6, // 5: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.upstream_resolvers:type_name -> envoy.config.core.v3.Address + 7, // 6: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.dns_resolution_config:type_name -> envoy.config.core.v3.DnsResolutionConfig + 8, // 7: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.typed_dns_resolver_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_init() } +func file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_init() { + if File_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsFilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsFilterConfig_ServerContextConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsFilterConfig_ClientContextConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*DnsFilterConfig_ServerContextConfig_InlineDnsTable)(nil), + (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto = out.File + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc = nil + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_goTypes = nil + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.validate.go b/pkg/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.validate.go new file mode 100644 index 0000000000..c9deacca42 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.validate.go @@ -0,0 +1,624 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto + +package dns_filterv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DnsFilterConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *DnsFilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsFilterConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DnsFilterConfigMultiError, or nil if none found. +func (m *DnsFilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsFilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := DnsFilterConfigValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetServerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ServerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ServerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServerConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfigValidationError{ + field: "ServerConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetClientConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClientConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DnsFilterConfigMultiError(errors) + } + + return nil +} + +// DnsFilterConfigMultiError is an error wrapping multiple validation errors +// returned by DnsFilterConfig.ValidateAll() if the designated constraints +// aren't met. +type DnsFilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsFilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsFilterConfigMultiError) AllErrors() []error { return m } + +// DnsFilterConfigValidationError is the validation error returned by +// DnsFilterConfig.Validate if the designated constraints aren't met. +type DnsFilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsFilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsFilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsFilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsFilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsFilterConfigValidationError) ErrorName() string { return "DnsFilterConfigValidationError" } + +// Error satisfies the builtin error interface +func (e DnsFilterConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDnsFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsFilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsFilterConfigValidationError{} + +// Validate checks the field values on DnsFilterConfig_ServerContextConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *DnsFilterConfig_ServerContextConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsFilterConfig_ServerContextConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// DnsFilterConfig_ServerContextConfigMultiError, or nil if none found. +func (m *DnsFilterConfig_ServerContextConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsFilterConfig_ServerContextConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ConfigSource.(type) { + + case *DnsFilterConfig_ServerContextConfig_InlineDnsTable: + + if all { + switch v := interface{}(m.GetInlineDnsTable()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "InlineDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "InlineDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInlineDnsTable()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ServerContextConfigValidationError{ + field: "InlineDnsTable", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *DnsFilterConfig_ServerContextConfig_ExternalDnsTable: + + if all { + switch v := interface{}(m.GetExternalDnsTable()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "ExternalDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "ExternalDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternalDnsTable()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ServerContextConfigValidationError{ + field: "ExternalDnsTable", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := DnsFilterConfig_ServerContextConfigValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return DnsFilterConfig_ServerContextConfigMultiError(errors) + } + + return nil +} + +// DnsFilterConfig_ServerContextConfigMultiError is an error wrapping multiple +// validation errors returned by +// DnsFilterConfig_ServerContextConfig.ValidateAll() if the designated +// constraints aren't met. +type DnsFilterConfig_ServerContextConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsFilterConfig_ServerContextConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsFilterConfig_ServerContextConfigMultiError) AllErrors() []error { return m } + +// DnsFilterConfig_ServerContextConfigValidationError is the validation error +// returned by DnsFilterConfig_ServerContextConfig.Validate if the designated +// constraints aren't met. +type DnsFilterConfig_ServerContextConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsFilterConfig_ServerContextConfigValidationError) ErrorName() string { + return "DnsFilterConfig_ServerContextConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsFilterConfig_ServerContextConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDnsFilterConfig_ServerContextConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsFilterConfig_ServerContextConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsFilterConfig_ServerContextConfigValidationError{} + +// Validate checks the field values on DnsFilterConfig_ClientContextConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *DnsFilterConfig_ClientContextConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsFilterConfig_ClientContextConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// DnsFilterConfig_ClientContextConfigMultiError, or nil if none found. +func (m *DnsFilterConfig_ClientContextConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsFilterConfig_ClientContextConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetResolverTimeout(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsFilterConfig_ClientContextConfigValidationError{ + field: "ResolverTimeout", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(1*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := DnsFilterConfig_ClientContextConfigValidationError{ + field: "ResolverTimeout", + reason: "value must be greater than or equal to 1s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + for idx, item := range m.GetUpstreamResolvers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: fmt.Sprintf("UpstreamResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: fmt.Sprintf("UpstreamResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ClientContextConfigValidationError{ + field: fmt.Sprintf("UpstreamResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetDnsResolutionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolutionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ClientContextConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTypedDnsResolverConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedDnsResolverConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ClientContextConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetMaxPendingLookups() < 1 { + err := DnsFilterConfig_ClientContextConfigValidationError{ + field: "MaxPendingLookups", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return DnsFilterConfig_ClientContextConfigMultiError(errors) + } + + return nil +} + +// DnsFilterConfig_ClientContextConfigMultiError is an error wrapping multiple +// validation errors returned by +// DnsFilterConfig_ClientContextConfig.ValidateAll() if the designated +// constraints aren't met. +type DnsFilterConfig_ClientContextConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsFilterConfig_ClientContextConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsFilterConfig_ClientContextConfigMultiError) AllErrors() []error { return m } + +// DnsFilterConfig_ClientContextConfigValidationError is the validation error +// returned by DnsFilterConfig_ClientContextConfig.Validate if the designated +// constraints aren't met. +type DnsFilterConfig_ClientContextConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsFilterConfig_ClientContextConfigValidationError) ErrorName() string { + return "DnsFilterConfig_ClientContextConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsFilterConfig_ClientContextConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDnsFilterConfig_ClientContextConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsFilterConfig_ClientContextConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsFilterConfig_ClientContextConfigValidationError{} diff --git a/pkg/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.pb.go b/pkg/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.pb.go deleted file mode 100644 index 5b771e80fb..0000000000 --- a/pkg/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.pb.go +++ /dev/null @@ -1,448 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.proto - -package envoy_extensions_filters_udp_dns_filter_v3alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/dns/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for the DNS filter. -type DnsFilterConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The stat prefix used when emitting DNS filter statistics - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // Server context configuration contains the data that the filter uses to respond - // to DNS requests. - ServerConfig *DnsFilterConfig_ServerContextConfig `protobuf:"bytes,2,opt,name=server_config,json=serverConfig,proto3" json:"server_config,omitempty"` - // Client context configuration controls Envoy's behavior when it must use external - // resolvers to answer a query. This object is optional and if omitted instructs - // the filter to resolve queries from the data in the server_config - ClientConfig *DnsFilterConfig_ClientContextConfig `protobuf:"bytes,3,opt,name=client_config,json=clientConfig,proto3" json:"client_config,omitempty"` -} - -func (x *DnsFilterConfig) Reset() { - *x = DnsFilterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsFilterConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsFilterConfig) ProtoMessage() {} - -func (x *DnsFilterConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsFilterConfig.ProtoReflect.Descriptor instead. -func (*DnsFilterConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescGZIP(), []int{0} -} - -func (x *DnsFilterConfig) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *DnsFilterConfig) GetServerConfig() *DnsFilterConfig_ServerContextConfig { - if x != nil { - return x.ServerConfig - } - return nil -} - -func (x *DnsFilterConfig) GetClientConfig() *DnsFilterConfig_ClientContextConfig { - if x != nil { - return x.ClientConfig - } - return nil -} - -// This message contains the configuration for the DNS Filter operating -// in a server context. This message will contain the virtual hosts and -// associated addresses with which Envoy will respond to queries -type DnsFilterConfig_ServerContextConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ConfigSource: - // *DnsFilterConfig_ServerContextConfig_InlineDnsTable - // *DnsFilterConfig_ServerContextConfig_ExternalDnsTable - ConfigSource isDnsFilterConfig_ServerContextConfig_ConfigSource `protobuf_oneof:"config_source"` -} - -func (x *DnsFilterConfig_ServerContextConfig) Reset() { - *x = DnsFilterConfig_ServerContextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsFilterConfig_ServerContextConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsFilterConfig_ServerContextConfig) ProtoMessage() {} - -func (x *DnsFilterConfig_ServerContextConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsFilterConfig_ServerContextConfig.ProtoReflect.Descriptor instead. -func (*DnsFilterConfig_ServerContextConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *DnsFilterConfig_ServerContextConfig) GetConfigSource() isDnsFilterConfig_ServerContextConfig_ConfigSource { - if m != nil { - return m.ConfigSource - } - return nil -} - -func (x *DnsFilterConfig_ServerContextConfig) GetInlineDnsTable() *v3.DnsTable { - if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_InlineDnsTable); ok { - return x.InlineDnsTable - } - return nil -} - -func (x *DnsFilterConfig_ServerContextConfig) GetExternalDnsTable() *v31.DataSource { - if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_ExternalDnsTable); ok { - return x.ExternalDnsTable - } - return nil -} - -type isDnsFilterConfig_ServerContextConfig_ConfigSource interface { - isDnsFilterConfig_ServerContextConfig_ConfigSource() -} - -type DnsFilterConfig_ServerContextConfig_InlineDnsTable struct { - // Load the configuration specified from the control plane - InlineDnsTable *v3.DnsTable `protobuf:"bytes,1,opt,name=inline_dns_table,json=inlineDnsTable,proto3,oneof"` -} - -type DnsFilterConfig_ServerContextConfig_ExternalDnsTable struct { - // Seed the filter configuration from an external path. This source - // is a yaml formatted file that contains the DnsTable driving Envoy's - // responses to DNS queries - ExternalDnsTable *v31.DataSource `protobuf:"bytes,2,opt,name=external_dns_table,json=externalDnsTable,proto3,oneof"` -} - -func (*DnsFilterConfig_ServerContextConfig_InlineDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { -} - -func (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { -} - -// This message contains the configuration for the DNS Filter operating -// in a client context. This message will contain the timeouts, retry, -// and forwarding configuration for Envoy to make DNS requests to other -// resolvers -type DnsFilterConfig_ClientContextConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Sets the maximum time we will wait for the upstream query to complete - // We allow 5s for the upstream resolution to complete, so the minimum - // value here is 1. Note that the total latency for a failed query is the - // number of retries multiplied by the resolver_timeout. - ResolverTimeout *duration.Duration `protobuf:"bytes,1,opt,name=resolver_timeout,json=resolverTimeout,proto3" json:"resolver_timeout,omitempty"` - // A list of DNS servers to which we can forward queries. If not - // specified, Envoy will use the ambient DNS resolvers in the - // system. - UpstreamResolvers []*v31.Address `protobuf:"bytes,2,rep,name=upstream_resolvers,json=upstreamResolvers,proto3" json:"upstream_resolvers,omitempty"` - // Controls how many outstanding external lookup contexts the filter tracks. - // The context structure allows the filter to respond to every query even if the external - // resolution times out or is otherwise unsuccessful - MaxPendingLookups uint64 `protobuf:"varint,3,opt,name=max_pending_lookups,json=maxPendingLookups,proto3" json:"max_pending_lookups,omitempty"` -} - -func (x *DnsFilterConfig_ClientContextConfig) Reset() { - *x = DnsFilterConfig_ClientContextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsFilterConfig_ClientContextConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsFilterConfig_ClientContextConfig) ProtoMessage() {} - -func (x *DnsFilterConfig_ClientContextConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsFilterConfig_ClientContextConfig.ProtoReflect.Descriptor instead. -func (*DnsFilterConfig_ClientContextConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *DnsFilterConfig_ClientContextConfig) GetResolverTimeout() *duration.Duration { - if x != nil { - return x.ResolverTimeout - } - return nil -} - -func (x *DnsFilterConfig_ClientContextConfig) GetUpstreamResolvers() []*v31.Address { - if x != nil { - return x.UpstreamResolvers - } - return nil -} - -func (x *DnsFilterConfig_ClientContextConfig) GetMaxPendingLookups() uint64 { - if x != nil { - return x.MaxPendingLookups - } - return 0 -} - -var File_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDesc = []byte{ - 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x64, - 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, - 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x05, 0x0a, 0x0f, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x79, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x79, 0x0a, 0x0d, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, - 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x47, 0x0a, 0x10, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, - 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x1a, 0xee, 0x01, 0x0a, 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, 0x08, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x12, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x11, - 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x73, 0x42, 0x61, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, - 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x0e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescData = file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDesc -) - -func file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescData) - }) - return file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDescData -} - -var file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_goTypes = []interface{}{ - (*DnsFilterConfig)(nil), // 0: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig - (*DnsFilterConfig_ServerContextConfig)(nil), // 1: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ServerContextConfig - (*DnsFilterConfig_ClientContextConfig)(nil), // 2: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ClientContextConfig - (*v3.DnsTable)(nil), // 3: envoy.data.dns.v3.DnsTable - (*v31.DataSource)(nil), // 4: envoy.config.core.v3.DataSource - (*duration.Duration)(nil), // 5: google.protobuf.Duration - (*v31.Address)(nil), // 6: envoy.config.core.v3.Address -} -var file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.server_config:type_name -> envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ServerContextConfig - 2, // 1: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.client_config:type_name -> envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ClientContextConfig - 3, // 2: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ServerContextConfig.inline_dns_table:type_name -> envoy.data.dns.v3.DnsTable - 4, // 3: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ServerContextConfig.external_dns_table:type_name -> envoy.config.core.v3.DataSource - 5, // 4: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ClientContextConfig.resolver_timeout:type_name -> google.protobuf.Duration - 6, // 5: envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig.ClientContextConfig.upstream_resolvers:type_name -> envoy.config.core.v3.Address - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_init() } -func file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_init() { - if File_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsFilterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsFilterConfig_ServerContextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsFilterConfig_ClientContextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*DnsFilterConfig_ServerContextConfig_InlineDnsTable)(nil), - (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto = out.File - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_rawDesc = nil - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_goTypes = nil - file_envoy_extensions_filters_udp_dns_filter_v3alpha_dns_filter_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.pb.validate.go b/pkg/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.pb.validate.go deleted file mode 100644 index 402a7f3feb..0000000000 --- a/pkg/api/envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.pb.validate.go +++ /dev/null @@ -1,339 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/udp/dns_filter/v3alpha/dns_filter.proto - -package envoy_extensions_filters_udp_dns_filter_v3alpha - -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{} -) - -// Validate checks the field values on DnsFilterConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *DnsFilterConfig) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return DnsFilterConfigValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetServerConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfigValidationError{ - field: "ServerConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetClientConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfigValidationError{ - field: "ClientConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// DnsFilterConfigValidationError is the validation error returned by -// DnsFilterConfig.Validate if the designated constraints aren't met. -type DnsFilterConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsFilterConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsFilterConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsFilterConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsFilterConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsFilterConfigValidationError) ErrorName() string { return "DnsFilterConfigValidationError" } - -// Error satisfies the builtin error interface -func (e DnsFilterConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsFilterConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsFilterConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsFilterConfigValidationError{} - -// Validate checks the field values on DnsFilterConfig_ServerContextConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *DnsFilterConfig_ServerContextConfig) Validate() error { - if m == nil { - return nil - } - - switch m.ConfigSource.(type) { - - case *DnsFilterConfig_ServerContextConfig_InlineDnsTable: - - if v, ok := interface{}(m.GetInlineDnsTable()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfig_ServerContextConfigValidationError{ - field: "InlineDnsTable", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DnsFilterConfig_ServerContextConfig_ExternalDnsTable: - - if v, ok := interface{}(m.GetExternalDnsTable()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfig_ServerContextConfigValidationError{ - field: "ExternalDnsTable", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return DnsFilterConfig_ServerContextConfigValidationError{ - field: "ConfigSource", - reason: "value is required", - } - - } - - return nil -} - -// DnsFilterConfig_ServerContextConfigValidationError is the validation error -// returned by DnsFilterConfig_ServerContextConfig.Validate if the designated -// constraints aren't met. -type DnsFilterConfig_ServerContextConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsFilterConfig_ServerContextConfigValidationError) ErrorName() string { - return "DnsFilterConfig_ServerContextConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsFilterConfig_ServerContextConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsFilterConfig_ServerContextConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsFilterConfig_ServerContextConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsFilterConfig_ServerContextConfigValidationError{} - -// Validate checks the field values on DnsFilterConfig_ClientContextConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *DnsFilterConfig_ClientContextConfig) Validate() error { - if m == nil { - return nil - } - - if d := m.GetResolverTimeout(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: "ResolverTimeout", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(1*time.Second + 0*time.Nanosecond) - - if dur < gte { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: "ResolverTimeout", - reason: "value must be greater than or equal to 1s", - } - } - - } - - for idx, item := range m.GetUpstreamResolvers() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: fmt.Sprintf("UpstreamResolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if m.GetMaxPendingLookups() < 1 { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: "MaxPendingLookups", - reason: "value must be greater than or equal to 1", - } - } - - return nil -} - -// DnsFilterConfig_ClientContextConfigValidationError is the validation error -// returned by DnsFilterConfig_ClientContextConfig.Validate if the designated -// constraints aren't met. -type DnsFilterConfig_ClientContextConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsFilterConfig_ClientContextConfigValidationError) ErrorName() string { - return "DnsFilterConfig_ClientContextConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsFilterConfig_ClientContextConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsFilterConfig_ClientContextConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsFilterConfig_ClientContextConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsFilterConfig_ClientContextConfigValidationError{} diff --git a/pkg/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.pb.go b/pkg/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.pb.go deleted file mode 100644 index 6e9492a310..0000000000 --- a/pkg/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.pb.go +++ /dev/null @@ -1,468 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.proto - -package envoy_extensions_filters_udp_dns_filter_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/dns/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for the DNS filter. -type DnsFilterConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The stat prefix used when emitting DNS filter statistics - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // Server context configuration contains the data that the filter uses to respond - // to DNS requests. - ServerConfig *DnsFilterConfig_ServerContextConfig `protobuf:"bytes,2,opt,name=server_config,json=serverConfig,proto3" json:"server_config,omitempty"` - // Client context configuration controls Envoy's behavior when it must use external - // resolvers to answer a query. This object is optional and if omitted instructs - // the filter to resolve queries from the data in the server_config - ClientConfig *DnsFilterConfig_ClientContextConfig `protobuf:"bytes,3,opt,name=client_config,json=clientConfig,proto3" json:"client_config,omitempty"` -} - -func (x *DnsFilterConfig) Reset() { - *x = DnsFilterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsFilterConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsFilterConfig) ProtoMessage() {} - -func (x *DnsFilterConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsFilterConfig.ProtoReflect.Descriptor instead. -func (*DnsFilterConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescGZIP(), []int{0} -} - -func (x *DnsFilterConfig) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *DnsFilterConfig) GetServerConfig() *DnsFilterConfig_ServerContextConfig { - if x != nil { - return x.ServerConfig - } - return nil -} - -func (x *DnsFilterConfig) GetClientConfig() *DnsFilterConfig_ClientContextConfig { - if x != nil { - return x.ClientConfig - } - return nil -} - -// This message contains the configuration for the DNS Filter operating -// in a server context. This message will contain the virtual hosts and -// associated addresses with which Envoy will respond to queries -type DnsFilterConfig_ServerContextConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ConfigSource: - // *DnsFilterConfig_ServerContextConfig_InlineDnsTable - // *DnsFilterConfig_ServerContextConfig_ExternalDnsTable - ConfigSource isDnsFilterConfig_ServerContextConfig_ConfigSource `protobuf_oneof:"config_source"` -} - -func (x *DnsFilterConfig_ServerContextConfig) Reset() { - *x = DnsFilterConfig_ServerContextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsFilterConfig_ServerContextConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsFilterConfig_ServerContextConfig) ProtoMessage() {} - -func (x *DnsFilterConfig_ServerContextConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsFilterConfig_ServerContextConfig.ProtoReflect.Descriptor instead. -func (*DnsFilterConfig_ServerContextConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *DnsFilterConfig_ServerContextConfig) GetConfigSource() isDnsFilterConfig_ServerContextConfig_ConfigSource { - if m != nil { - return m.ConfigSource - } - return nil -} - -func (x *DnsFilterConfig_ServerContextConfig) GetInlineDnsTable() *v4alpha.DnsTable { - if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_InlineDnsTable); ok { - return x.InlineDnsTable - } - return nil -} - -func (x *DnsFilterConfig_ServerContextConfig) GetExternalDnsTable() *v4alpha1.DataSource { - if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_ExternalDnsTable); ok { - return x.ExternalDnsTable - } - return nil -} - -type isDnsFilterConfig_ServerContextConfig_ConfigSource interface { - isDnsFilterConfig_ServerContextConfig_ConfigSource() -} - -type DnsFilterConfig_ServerContextConfig_InlineDnsTable struct { - // Load the configuration specified from the control plane - InlineDnsTable *v4alpha.DnsTable `protobuf:"bytes,1,opt,name=inline_dns_table,json=inlineDnsTable,proto3,oneof"` -} - -type DnsFilterConfig_ServerContextConfig_ExternalDnsTable struct { - // Seed the filter configuration from an external path. This source - // is a yaml formatted file that contains the DnsTable driving Envoy's - // responses to DNS queries - ExternalDnsTable *v4alpha1.DataSource `protobuf:"bytes,2,opt,name=external_dns_table,json=externalDnsTable,proto3,oneof"` -} - -func (*DnsFilterConfig_ServerContextConfig_InlineDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { -} - -func (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { -} - -// This message contains the configuration for the DNS Filter operating -// in a client context. This message will contain the timeouts, retry, -// and forwarding configuration for Envoy to make DNS requests to other -// resolvers -type DnsFilterConfig_ClientContextConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Sets the maximum time we will wait for the upstream query to complete - // We allow 5s for the upstream resolution to complete, so the minimum - // value here is 1. Note that the total latency for a failed query is the - // number of retries multiplied by the resolver_timeout. - ResolverTimeout *duration.Duration `protobuf:"bytes,1,opt,name=resolver_timeout,json=resolverTimeout,proto3" json:"resolver_timeout,omitempty"` - // A list of DNS servers to which we can forward queries. If not - // specified, Envoy will use the ambient DNS resolvers in the - // system. - UpstreamResolvers []*v4alpha1.Address `protobuf:"bytes,2,rep,name=upstream_resolvers,json=upstreamResolvers,proto3" json:"upstream_resolvers,omitempty"` - // Controls how many outstanding external lookup contexts the filter tracks. - // The context structure allows the filter to respond to every query even if the external - // resolution times out or is otherwise unsuccessful - MaxPendingLookups uint64 `protobuf:"varint,3,opt,name=max_pending_lookups,json=maxPendingLookups,proto3" json:"max_pending_lookups,omitempty"` -} - -func (x *DnsFilterConfig_ClientContextConfig) Reset() { - *x = DnsFilterConfig_ClientContextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsFilterConfig_ClientContextConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsFilterConfig_ClientContextConfig) ProtoMessage() {} - -func (x *DnsFilterConfig_ClientContextConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsFilterConfig_ClientContextConfig.ProtoReflect.Descriptor instead. -func (*DnsFilterConfig_ClientContextConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *DnsFilterConfig_ClientContextConfig) GetResolverTimeout() *duration.Duration { - if x != nil { - return x.ResolverTimeout - } - return nil -} - -func (x *DnsFilterConfig_ClientContextConfig) GetUpstreamResolvers() []*v4alpha1.Address { - if x != nil { - return x.UpstreamResolvers - } - return nil -} - -func (x *DnsFilterConfig_ClientContextConfig) GetMaxPendingLookups() uint64 { - if x != nil { - return x.MaxPendingLookups - } - return 0 -} - -var File_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDesc = []byte{ - 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x64, - 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, - 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, - 0x6e, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x07, 0x0a, 0x0f, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, - 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x12, 0x79, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x79, - 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xac, 0x02, 0x0a, 0x13, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x4c, 0x0a, 0x10, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x6e, 0x73, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, - 0x0e, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x55, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6e, 0x73, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6e, - 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x5a, 0x9a, 0xc5, 0x88, 0x1e, 0x55, 0x0a, 0x53, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, - 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x14, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xcf, 0x02, 0x0a, 0x13, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, 0x08, - 0x01, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x51, 0x0a, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x11, 0x6d, 0x61, 0x78, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x3a, 0x5a, - 0x9a, 0xc5, 0x88, 0x1e, 0x55, 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, - 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, - 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x61, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, - 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x0e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescData = file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDesc -) - -func file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescData) - }) - return file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDescData -} - -var file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_goTypes = []interface{}{ - (*DnsFilterConfig)(nil), // 0: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig - (*DnsFilterConfig_ServerContextConfig)(nil), // 1: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ServerContextConfig - (*DnsFilterConfig_ClientContextConfig)(nil), // 2: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ClientContextConfig - (*v4alpha.DnsTable)(nil), // 3: envoy.data.dns.v4alpha.DnsTable - (*v4alpha1.DataSource)(nil), // 4: envoy.config.core.v4alpha.DataSource - (*duration.Duration)(nil), // 5: google.protobuf.Duration - (*v4alpha1.Address)(nil), // 6: envoy.config.core.v4alpha.Address -} -var file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.server_config:type_name -> envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ServerContextConfig - 2, // 1: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.client_config:type_name -> envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ClientContextConfig - 3, // 2: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ServerContextConfig.inline_dns_table:type_name -> envoy.data.dns.v4alpha.DnsTable - 4, // 3: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ServerContextConfig.external_dns_table:type_name -> envoy.config.core.v4alpha.DataSource - 5, // 4: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ClientContextConfig.resolver_timeout:type_name -> google.protobuf.Duration - 6, // 5: envoy.extensions.filters.udp.dns_filter.v4alpha.DnsFilterConfig.ClientContextConfig.upstream_resolvers:type_name -> envoy.config.core.v4alpha.Address - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_init() } -func file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_init() { - if File_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsFilterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsFilterConfig_ServerContextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsFilterConfig_ClientContextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*DnsFilterConfig_ServerContextConfig_InlineDnsTable)(nil), - (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_goTypes, - DependencyIndexes: file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_depIdxs, - MessageInfos: file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_msgTypes, - }.Build() - File_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto = out.File - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_rawDesc = nil - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_goTypes = nil - file_envoy_extensions_filters_udp_dns_filter_v4alpha_dns_filter_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.pb.validate.go b/pkg/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.pb.validate.go deleted file mode 100644 index 697d3af1a7..0000000000 --- a/pkg/api/envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.pb.validate.go +++ /dev/null @@ -1,339 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/filters/udp/dns_filter/v4alpha/dns_filter.proto - -package envoy_extensions_filters_udp_dns_filter_v4alpha - -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{} -) - -// Validate checks the field values on DnsFilterConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *DnsFilterConfig) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return DnsFilterConfigValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetServerConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfigValidationError{ - field: "ServerConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetClientConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfigValidationError{ - field: "ClientConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// DnsFilterConfigValidationError is the validation error returned by -// DnsFilterConfig.Validate if the designated constraints aren't met. -type DnsFilterConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsFilterConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsFilterConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsFilterConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsFilterConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsFilterConfigValidationError) ErrorName() string { return "DnsFilterConfigValidationError" } - -// Error satisfies the builtin error interface -func (e DnsFilterConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsFilterConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsFilterConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsFilterConfigValidationError{} - -// Validate checks the field values on DnsFilterConfig_ServerContextConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *DnsFilterConfig_ServerContextConfig) Validate() error { - if m == nil { - return nil - } - - switch m.ConfigSource.(type) { - - case *DnsFilterConfig_ServerContextConfig_InlineDnsTable: - - if v, ok := interface{}(m.GetInlineDnsTable()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfig_ServerContextConfigValidationError{ - field: "InlineDnsTable", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DnsFilterConfig_ServerContextConfig_ExternalDnsTable: - - if v, ok := interface{}(m.GetExternalDnsTable()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfig_ServerContextConfigValidationError{ - field: "ExternalDnsTable", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return DnsFilterConfig_ServerContextConfigValidationError{ - field: "ConfigSource", - reason: "value is required", - } - - } - - return nil -} - -// DnsFilterConfig_ServerContextConfigValidationError is the validation error -// returned by DnsFilterConfig_ServerContextConfig.Validate if the designated -// constraints aren't met. -type DnsFilterConfig_ServerContextConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsFilterConfig_ServerContextConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsFilterConfig_ServerContextConfigValidationError) ErrorName() string { - return "DnsFilterConfig_ServerContextConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsFilterConfig_ServerContextConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsFilterConfig_ServerContextConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsFilterConfig_ServerContextConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsFilterConfig_ServerContextConfigValidationError{} - -// Validate checks the field values on DnsFilterConfig_ClientContextConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *DnsFilterConfig_ClientContextConfig) Validate() error { - if m == nil { - return nil - } - - if d := m.GetResolverTimeout(); d != nil { - dur, err := ptypes.Duration(d) - if err != nil { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: "ResolverTimeout", - reason: "value is not a valid duration", - cause: err, - } - } - - gte := time.Duration(1*time.Second + 0*time.Nanosecond) - - if dur < gte { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: "ResolverTimeout", - reason: "value must be greater than or equal to 1s", - } - } - - } - - for idx, item := range m.GetUpstreamResolvers() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: fmt.Sprintf("UpstreamResolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if m.GetMaxPendingLookups() < 1 { - return DnsFilterConfig_ClientContextConfigValidationError{ - field: "MaxPendingLookups", - reason: "value must be greater than or equal to 1", - } - } - - return nil -} - -// DnsFilterConfig_ClientContextConfigValidationError is the validation error -// returned by DnsFilterConfig_ClientContextConfig.Validate if the designated -// constraints aren't met. -type DnsFilterConfig_ClientContextConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsFilterConfig_ClientContextConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsFilterConfig_ClientContextConfigValidationError) ErrorName() string { - return "DnsFilterConfig_ClientContextConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsFilterConfig_ClientContextConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsFilterConfig_ClientContextConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsFilterConfig_ClientContextConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsFilterConfig_ClientContextConfigValidationError{} diff --git a/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.go b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.go new file mode 100644 index 0000000000..0e7ee9ddc2 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/filters/udp/udp_proxy/v3/route.proto + +package udp_proxyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Route struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates the upstream cluster to which the request should be routed. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` +} + +func (x *Route) Reset() { + *x = Route{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Route) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Route) ProtoMessage() {} + +func (x *Route) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Route.ProtoReflect.Descriptor instead. +func (*Route) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescGZIP(), []int{0} +} + +func (x *Route) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +var File_envoy_extensions_filters_udp_udp_proxy_v3_route_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x05, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0xad, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x5c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x76, 0x33, 0x3b, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData = file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc +) + +func file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData) + }) + return file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData +} + +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_goTypes = []interface{}{ + (*Route)(nil), // 0: envoy.extensions.filters.udp.udp_proxy.v3.Route +} +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_init() } +func file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_init() { + if File_envoy_extensions_filters_udp_udp_proxy_v3_route_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_udp_udp_proxy_v3_route_proto = out.File + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc = nil + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_goTypes = nil + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.validate.go b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.validate.go new file mode 100644 index 0000000000..c26176ca50 --- /dev/null +++ b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.validate.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/udp/udp_proxy/v3/route.proto + +package udp_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := RouteValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RouteMultiError(errors) + } + + return nil +} + +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + +// RouteValidationError is the validation error returned by Route.Validate if +// the designated constraints aren't met. +type RouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteValidationError) ErrorName() string { return "RouteValidationError" } + +// Error satisfies the builtin error interface +func (e RouteValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteValidationError{} diff --git a/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.go b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.go index d00a2d6481..bd7f02c528 100644 --- a/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.go +++ b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.go @@ -1,15 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto -package envoy_extensions_filters_udp_udp_proxy_v3 +package udp_proxyv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v32 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,12 +28,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for the UDP proxy filter. -// [#next-free-field: 6] +// [#next-free-field: 10] type UdpProxyConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -39,6 +39,7 @@ type UdpProxyConfig struct { StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` // Types that are assignable to RouteSpecifier: // *UdpProxyConfig_Cluster + // *UdpProxyConfig_Matcher RouteSpecifier isUdpProxyConfig_RouteSpecifier `protobuf_oneof:"route_specifier"` // The idle timeout for sessions. Idle is defined as no datagrams between received or sent by // the session. The default if not specified is 1 minute. @@ -62,6 +63,16 @@ type UdpProxyConfig struct { // load balancing algorithms will select a host randomly. Currently the number of hash policies is // limited to 1. HashPolicies []*UdpProxyConfig_HashPolicy `protobuf:"bytes,5,rep,name=hash_policies,json=hashPolicies,proto3" json:"hash_policies,omitempty"` + // UDP socket configuration for upstream sockets. The default for + // :ref:`prefer_gro ` is true for upstream + // sockets as the assumption is datagrams will be received from a single source. + UpstreamSocketConfig *v3.UdpSocketConfig `protobuf:"bytes,6,opt,name=upstream_socket_config,json=upstreamSocketConfig,proto3" json:"upstream_socket_config,omitempty"` + // Perform per packet load balancing (upstream host selection) on each received data chunk. + // The default if not specified is false, that means each data chunk is forwarded + // to upstream host selected on first chunk receival for that "session" (identified by source IP/port and local IP/port). + UsePerPacketLoadBalancing bool `protobuf:"varint,7,opt,name=use_per_packet_load_balancing,json=usePerPacketLoadBalancing,proto3" json:"use_per_packet_load_balancing,omitempty"` + // Configuration for access logs emitted by the UDP proxy. Note that certain UDP specific data is emitted as :ref:`Dynamic Metadata `. + AccessLog []*v31.AccessLog `protobuf:"bytes,8,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` } func (x *UdpProxyConfig) Reset() { @@ -110,6 +121,7 @@ func (m *UdpProxyConfig) GetRouteSpecifier() isUdpProxyConfig_RouteSpecifier { return nil } +// Deprecated: Do not use. func (x *UdpProxyConfig) GetCluster() string { if x, ok := x.GetRouteSpecifier().(*UdpProxyConfig_Cluster); ok { return x.Cluster @@ -117,6 +129,13 @@ func (x *UdpProxyConfig) GetCluster() string { return "" } +func (x *UdpProxyConfig) GetMatcher() *v32.Matcher { + if x, ok := x.GetRouteSpecifier().(*UdpProxyConfig_Matcher); ok { + return x.Matcher + } + return nil +} + func (x *UdpProxyConfig) GetIdleTimeout() *duration.Duration { if x != nil { return x.IdleTimeout @@ -138,17 +157,50 @@ func (x *UdpProxyConfig) GetHashPolicies() []*UdpProxyConfig_HashPolicy { return nil } +func (x *UdpProxyConfig) GetUpstreamSocketConfig() *v3.UdpSocketConfig { + if x != nil { + return x.UpstreamSocketConfig + } + return nil +} + +func (x *UdpProxyConfig) GetUsePerPacketLoadBalancing() bool { + if x != nil { + return x.UsePerPacketLoadBalancing + } + return false +} + +func (x *UdpProxyConfig) GetAccessLog() []*v31.AccessLog { + if x != nil { + return x.AccessLog + } + return nil +} + type isUdpProxyConfig_RouteSpecifier interface { isUdpProxyConfig_RouteSpecifier() } type UdpProxyConfig_Cluster struct { // The upstream cluster to connect to. + // This field is deprecated in favor of + // :ref:`matcher `. + // + // Deprecated: Do not use. Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3,oneof"` } +type UdpProxyConfig_Matcher struct { + // The match tree to use when resolving route actions for incoming requests. + // See :ref:`Routing ` for more information. + Matcher *v32.Matcher `protobuf:"bytes,9,opt,name=matcher,proto3,oneof"` +} + func (*UdpProxyConfig_Cluster) isUdpProxyConfig_RouteSpecifier() {} +func (*UdpProxyConfig_Matcher) isUdpProxyConfig_RouteSpecifier() {} + // Specifies the UDP hash policy. // The packets can be routed by hash policy. type UdpProxyConfig_HashPolicy struct { @@ -158,6 +210,7 @@ type UdpProxyConfig_HashPolicy struct { // Types that are assignable to PolicySpecifier: // *UdpProxyConfig_HashPolicy_SourceIp + // *UdpProxyConfig_HashPolicy_Key PolicySpecifier isUdpProxyConfig_HashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` } @@ -207,6 +260,13 @@ func (x *UdpProxyConfig_HashPolicy) GetSourceIp() bool { return false } +func (x *UdpProxyConfig_HashPolicy) GetKey() string { + if x, ok := x.GetPolicySpecifier().(*UdpProxyConfig_HashPolicy_Key); ok { + return x.Key + } + return "" +} + type isUdpProxyConfig_HashPolicy_PolicySpecifier interface { isUdpProxyConfig_HashPolicy_PolicySpecifier() } @@ -216,8 +276,19 @@ type UdpProxyConfig_HashPolicy_SourceIp struct { SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3,oneof"` } +type UdpProxyConfig_HashPolicy_Key struct { + // A given key will be used to compute the hash used by hash-based load balancing algorithms. + // In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints. + // A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session, + // although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level + // (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session. + Key string `protobuf:"bytes,2,opt,name=key,proto3,oneof"` +} + func (*UdpProxyConfig_HashPolicy_SourceIp) isUdpProxyConfig_HashPolicy_PolicySpecifier() {} +func (*UdpProxyConfig_HashPolicy_Key) isUdpProxyConfig_HashPolicy_PolicySpecifier() {} + var File_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto protoreflect.FileDescriptor var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDesc = []byte{ @@ -227,51 +298,90 @@ var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDesc = []b 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xe9, 0x03, 0x0a, 0x0e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, - 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, - 0x75, 0x73, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x49, 0x70, - 0x12, 0x73, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x4d, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, - 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x42, 0x17, 0x0a, 0x10, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x52, 0x0a, - 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x06, 0x0a, 0x0e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x12, 0x18, 0x01, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x92, 0xc7, 0x86, 0xd8, + 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x42, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, + 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x75, 0x73, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x49, + 0x70, 0x12, 0x73, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x16, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, + 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x14, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x1d, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x75, 0x73, 0x65, 0x50, + 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, + 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x1a, 0x6a, 0x0a, 0x0a, 0x48, 0x61, + 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, + 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x17, 0x0a, + 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, + 0xb0, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x55, 0x64, 0x70, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, + 0x70, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -290,16 +400,22 @@ var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes = ma var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_goTypes = []interface{}{ (*UdpProxyConfig)(nil), // 0: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig (*UdpProxyConfig_HashPolicy)(nil), // 1: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.HashPolicy - (*duration.Duration)(nil), // 2: google.protobuf.Duration + (*v32.Matcher)(nil), // 2: xds.type.matcher.v3.Matcher + (*duration.Duration)(nil), // 3: google.protobuf.Duration + (*v3.UdpSocketConfig)(nil), // 4: envoy.config.core.v3.UdpSocketConfig + (*v31.AccessLog)(nil), // 5: envoy.config.accesslog.v3.AccessLog } var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.idle_timeout:type_name -> google.protobuf.Duration - 1, // 1: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.hash_policies:type_name -> envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.HashPolicy - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 0: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.matcher:type_name -> xds.type.matcher.v3.Matcher + 3, // 1: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.idle_timeout:type_name -> google.protobuf.Duration + 1, // 2: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.hash_policies:type_name -> envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.HashPolicy + 4, // 3: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.upstream_socket_config:type_name -> envoy.config.core.v3.UdpSocketConfig + 5, // 4: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.access_log:type_name -> envoy.config.accesslog.v3.AccessLog + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_init() } @@ -335,9 +451,11 @@ func file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_init() { } file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ (*UdpProxyConfig_Cluster)(nil), + (*UdpProxyConfig_Matcher)(nil), } file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[1].OneofWrappers = []interface{}{ (*UdpProxyConfig_HashPolicy_SourceIp)(nil), + (*UdpProxyConfig_HashPolicy_Key)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.validate.go b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.validate.go index 97dc39e6f1..55d14e21b3 100644 --- a/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.validate.go +++ b/pkg/api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto -package envoy_extensions_filters_udp_udp_proxy_v3 +package udp_proxyv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on UdpProxyConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *UdpProxyConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpProxyConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in UdpProxyConfigMultiError, +// or nil if none found. +func (m *UdpProxyConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpProxyConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - return UdpProxyConfigValidationError{ + err := UdpProxyConfigValidationError{ field: "StatPrefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UdpProxyConfigValidationError{ field: "IdleTimeout", @@ -61,16 +100,39 @@ func (m *UdpProxyConfig) Validate() error { // no validation rules for UseOriginalSrcIp if len(m.GetHashPolicies()) > 1 { - return UdpProxyConfigValidationError{ + err := UdpProxyConfigValidationError{ field: "HashPolicies", reason: "value must contain no more than 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetHashPolicies() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("HashPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("HashPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UdpProxyConfigValidationError{ field: fmt.Sprintf("HashPolicies[%v]", idx), @@ -82,28 +144,153 @@ func (m *UdpProxyConfig) Validate() error { } + if all { + switch v := interface{}(m.GetUpstreamSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "UpstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "UpstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpProxyConfigValidationError{ + field: "UpstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for UsePerPacketLoadBalancing + + for idx, item := range m.GetAccessLog() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpProxyConfigValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + switch m.RouteSpecifier.(type) { case *UdpProxyConfig_Cluster: if utf8.RuneCountInString(m.GetCluster()) < 1 { - return UdpProxyConfigValidationError{ + err := UdpProxyConfigValidationError{ field: "Cluster", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + case *UdpProxyConfig_Matcher: + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpProxyConfigValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } } default: - return UdpProxyConfigValidationError{ + err := UdpProxyConfigValidationError{ field: "RouteSpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return UdpProxyConfigMultiError(errors) + } + return nil } +// UdpProxyConfigMultiError is an error wrapping multiple validation errors +// returned by UdpProxyConfig.ValidateAll() if the designated constraints +// aren't met. +type UdpProxyConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpProxyConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpProxyConfigMultiError) AllErrors() []error { return m } + // UdpProxyConfigValidationError is the validation error returned by // UdpProxyConfig.Validate if the designated constraints aren't met. type UdpProxyConfigValidationError struct { @@ -160,34 +347,90 @@ var _ interface { // Validate checks the field values on UdpProxyConfig_HashPolicy with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UdpProxyConfig_HashPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpProxyConfig_HashPolicy with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UdpProxyConfig_HashPolicyMultiError, or nil if none found. +func (m *UdpProxyConfig_HashPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpProxyConfig_HashPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.PolicySpecifier.(type) { case *UdpProxyConfig_HashPolicy_SourceIp: if m.GetSourceIp() != true { - return UdpProxyConfig_HashPolicyValidationError{ + err := UdpProxyConfig_HashPolicyValidationError{ field: "SourceIp", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) + } + + case *UdpProxyConfig_HashPolicy_Key: + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := UdpProxyConfig_HashPolicyValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) } default: - return UdpProxyConfig_HashPolicyValidationError{ + err := UdpProxyConfig_HashPolicyValidationError{ field: "PolicySpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return UdpProxyConfig_HashPolicyMultiError(errors) } return nil } +// UdpProxyConfig_HashPolicyMultiError is an error wrapping multiple validation +// errors returned by UdpProxyConfig_HashPolicy.ValidateAll() if the +// designated constraints aren't met. +type UdpProxyConfig_HashPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpProxyConfig_HashPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpProxyConfig_HashPolicyMultiError) AllErrors() []error { return m } + // UdpProxyConfig_HashPolicyValidationError is the validation error returned by // UdpProxyConfig_HashPolicy.Validate if the designated constraints aren't met. type UdpProxyConfig_HashPolicyValidationError struct { diff --git a/pkg/api/envoy/extensions/formatter/metadata/v3/metadata.pb.go b/pkg/api/envoy/extensions/formatter/metadata/v3/metadata.pb.go new file mode 100644 index 0000000000..b8f6f810b0 --- /dev/null +++ b/pkg/api/envoy/extensions/formatter/metadata/v3/metadata.pb.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/formatter/metadata/v3/metadata.proto + +package metadatav3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Metadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Metadata) Reset() { + *x = Metadata{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_formatter_metadata_v3_metadata_proto protoreflect.FileDescriptor + +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, + 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xa9, 0x01, 0x0a, 0x34, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescOnce sync.Once + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData = file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc +) + +func file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescGZIP() []byte { + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescOnce.Do(func() { + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData) + }) + return file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData +} + +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_goTypes = []interface{}{ + (*Metadata)(nil), // 0: envoy.extensions.formatter.metadata.v3.Metadata +} +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_formatter_metadata_v3_metadata_proto_init() } +func file_envoy_extensions_formatter_metadata_v3_metadata_proto_init() { + if File_envoy_extensions_formatter_metadata_v3_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_formatter_metadata_v3_metadata_proto_goTypes, + DependencyIndexes: file_envoy_extensions_formatter_metadata_v3_metadata_proto_depIdxs, + MessageInfos: file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes, + }.Build() + File_envoy_extensions_formatter_metadata_v3_metadata_proto = out.File + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc = nil + file_envoy_extensions_formatter_metadata_v3_metadata_proto_goTypes = nil + file_envoy_extensions_formatter_metadata_v3_metadata_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/formatter/metadata/v3/metadata.pb.validate.go b/pkg/api/envoy/extensions/formatter/metadata/v3/metadata.pb.validate.go new file mode 100644 index 0000000000..b178d9ff42 --- /dev/null +++ b/pkg/api/envoy/extensions/formatter/metadata/v3/metadata.pb.validate.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/formatter/metadata/v3/metadata.proto + +package metadatav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Metadata with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Metadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Metadata with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataMultiError, or nil +// if none found. +func (m *Metadata) ValidateAll() error { + return m.validate(true) +} + +func (m *Metadata) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return MetadataMultiError(errors) + } + + return nil +} + +// MetadataMultiError is an error wrapping multiple validation errors returned +// by Metadata.ValidateAll() if the designated constraints aren't met. +type MetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMultiError) AllErrors() []error { return m } + +// MetadataValidationError is the validation error returned by +// Metadata.Validate if the designated constraints aren't met. +type MetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetadataValidationError) ErrorName() string { return "MetadataValidationError" } + +// Error satisfies the builtin error interface +func (e MetadataValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetadataValidationError{} diff --git a/pkg/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.go b/pkg/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.go new file mode 100644 index 0000000000..7f8ec80261 --- /dev/null +++ b/pkg/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.go @@ -0,0 +1,154 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/formatter/req_without_query/v3/req_without_query.proto + +package req_without_queryv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the request without query formatter. +type ReqWithoutQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReqWithoutQuery) Reset() { + *x = ReqWithoutQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReqWithoutQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReqWithoutQuery) ProtoMessage() {} + +func (x *ReqWithoutQuery) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReqWithoutQuery.ProtoReflect.Descriptor instead. +func (*ReqWithoutQuery) Descriptor() ([]byte, []int) { + return file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto protoreflect.FileDescriptor + +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x71, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, + 0x33, 0x2f, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, + 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x71, + 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0xcb, 0x01, 0x0a, + 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x14, + 0x52, 0x65, 0x71, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x65, 0x71, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescOnce sync.Once + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData = file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc +) + +func file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescGZIP() []byte { + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescOnce.Do(func() { + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData) + }) + return file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData +} + +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_goTypes = []interface{}{ + (*ReqWithoutQuery)(nil), // 0: envoy.extensions.formatter.req_without_query.v3.ReqWithoutQuery +} +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_init() } +func file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_init() { + if File_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReqWithoutQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_goTypes, + DependencyIndexes: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_depIdxs, + MessageInfos: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes, + }.Build() + File_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto = out.File + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc = nil + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_goTypes = nil + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.validate.go b/pkg/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.validate.go new file mode 100644 index 0000000000..0ea9327d9a --- /dev/null +++ b/pkg/api/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.validate.go @@ -0,0 +1,136 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/formatter/req_without_query/v3/req_without_query.proto + +package req_without_queryv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ReqWithoutQuery with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ReqWithoutQuery) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReqWithoutQuery with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ReqWithoutQueryMultiError, or nil if none found. +func (m *ReqWithoutQuery) ValidateAll() error { + return m.validate(true) +} + +func (m *ReqWithoutQuery) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ReqWithoutQueryMultiError(errors) + } + + return nil +} + +// ReqWithoutQueryMultiError is an error wrapping multiple validation errors +// returned by ReqWithoutQuery.ValidateAll() if the designated constraints +// aren't met. +type ReqWithoutQueryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReqWithoutQueryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReqWithoutQueryMultiError) AllErrors() []error { return m } + +// ReqWithoutQueryValidationError is the validation error returned by +// ReqWithoutQuery.Validate if the designated constraints aren't met. +type ReqWithoutQueryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReqWithoutQueryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReqWithoutQueryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReqWithoutQueryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReqWithoutQueryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReqWithoutQueryValidationError) ErrorName() string { return "ReqWithoutQueryValidationError" } + +// Error satisfies the builtin error interface +func (e ReqWithoutQueryValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sReqWithoutQuery.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReqWithoutQueryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReqWithoutQueryValidationError{} diff --git a/pkg/api/envoy/extensions/health_checkers/redis/v3/redis.pb.go b/pkg/api/envoy/extensions/health_checkers/redis/v3/redis.pb.go new file mode 100644 index 0000000000..e3225d13be --- /dev/null +++ b/pkg/api/envoy/extensions/health_checkers/redis/v3/redis.pb.go @@ -0,0 +1,168 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/health_checkers/redis/v3/redis.proto + +package redisv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Redis struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set, optionally perform ``EXISTS `` instead of ``PING``. A return value + // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other + // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance + // by setting the specified key to any value and waiting for traffic to drain. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *Redis) Reset() { + *x = Redis{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Redis) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Redis) ProtoMessage() {} + +func (x *Redis) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Redis.ProtoReflect.Descriptor instead. +func (*Redis) Descriptor() ([]byte, []int) { + return file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescGZIP(), []int{0} +} + +func (x *Redis) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +var File_envoy_extensions_health_checkers_redis_v3_redis_proto protoreflect.FileDescriptor + +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x72, 0x73, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x64, 0x69, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4c, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, + 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, + 0x69, 0x73, 0x42, 0xa9, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0a, + 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x65, 0x64, 0x69, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescOnce sync.Once + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData = file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc +) + +func file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescGZIP() []byte { + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescOnce.Do(func() { + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData) + }) + return file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData +} + +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_goTypes = []interface{}{ + (*Redis)(nil), // 0: envoy.extensions.health_checkers.redis.v3.Redis +} +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_health_checkers_redis_v3_redis_proto_init() } +func file_envoy_extensions_health_checkers_redis_v3_redis_proto_init() { + if File_envoy_extensions_health_checkers_redis_v3_redis_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Redis); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_health_checkers_redis_v3_redis_proto_goTypes, + DependencyIndexes: file_envoy_extensions_health_checkers_redis_v3_redis_proto_depIdxs, + MessageInfos: file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes, + }.Build() + File_envoy_extensions_health_checkers_redis_v3_redis_proto = out.File + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc = nil + file_envoy_extensions_health_checkers_redis_v3_redis_proto_goTypes = nil + file_envoy_extensions_health_checkers_redis_v3_redis_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/health_checkers/redis/v3/redis.pb.validate.go b/pkg/api/envoy/extensions/health_checkers/redis/v3/redis.pb.validate.go new file mode 100644 index 0000000000..401a614d33 --- /dev/null +++ b/pkg/api/envoy/extensions/health_checkers/redis/v3/redis.pb.validate.go @@ -0,0 +1,136 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/health_checkers/redis/v3/redis.proto + +package redisv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Redis with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Redis) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Redis with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RedisMultiError, or nil if none found. +func (m *Redis) ValidateAll() error { + return m.validate(true) +} + +func (m *Redis) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Key + + if len(errors) > 0 { + return RedisMultiError(errors) + } + + return nil +} + +// RedisMultiError is an error wrapping multiple validation errors returned by +// Redis.ValidateAll() if the designated constraints aren't met. +type RedisMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisMultiError) AllErrors() []error { return m } + +// RedisValidationError is the validation error returned by Redis.Validate if +// the designated constraints aren't met. +type RedisValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisValidationError) ErrorName() string { return "RedisValidationError" } + +// Error satisfies the builtin error interface +func (e RedisValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRedis.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisValidationError{} diff --git a/pkg/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.go b/pkg/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.go new file mode 100644 index 0000000000..0d87e2afec --- /dev/null +++ b/pkg/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.go @@ -0,0 +1,172 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto + +package preserve_casev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the preserve case header formatter. +// See the :ref:`header casing ` configuration guide for more +// information. +type PreserveCaseFormatterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Allows forwarding reason phrase text. + // This is off by default, and a standard reason phrase is used for a corresponding HTTP response code. + ForwardReasonPhrase bool `protobuf:"varint,1,opt,name=forward_reason_phrase,json=forwardReasonPhrase,proto3" json:"forward_reason_phrase,omitempty"` +} + +func (x *PreserveCaseFormatterConfig) Reset() { + *x = PreserveCaseFormatterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreserveCaseFormatterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreserveCaseFormatterConfig) ProtoMessage() {} + +func (x *PreserveCaseFormatterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreserveCaseFormatterConfig.ProtoReflect.Descriptor instead. +func (*PreserveCaseFormatterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescGZIP(), []int{0} +} + +func (x *PreserveCaseFormatterConfig) GetForwardReasonPhrase() bool { + if x != nil { + return x.ForwardReasonPhrase + } + return false +} + +var File_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc = []byte{ + 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x1b, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x43, 0x61, 0x73, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x5f, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x42, 0xd6, 0x01, 0x0a, 0x46, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x63, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x50, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, + 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescOnce sync.Once + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData = file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc +) + +func file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData) + }) + return file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData +} + +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_goTypes = []interface{}{ + (*PreserveCaseFormatterConfig)(nil), // 0: envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig +} +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_init() } +func file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_init() { + if File_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreserveCaseFormatterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_depIdxs, + MessageInfos: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes, + }.Build() + File_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto = out.File + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc = nil + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_goTypes = nil + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.validate.go b/pkg/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.validate.go new file mode 100644 index 0000000000..12c9212c9a --- /dev/null +++ b/pkg/api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.validate.go @@ -0,0 +1,141 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto + +package preserve_casev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PreserveCaseFormatterConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *PreserveCaseFormatterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreserveCaseFormatterConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PreserveCaseFormatterConfigMultiError, or nil if none found. +func (m *PreserveCaseFormatterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreserveCaseFormatterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ForwardReasonPhrase + + if len(errors) > 0 { + return PreserveCaseFormatterConfigMultiError(errors) + } + + return nil +} + +// PreserveCaseFormatterConfigMultiError is an error wrapping multiple +// validation errors returned by PreserveCaseFormatterConfig.ValidateAll() if +// the designated constraints aren't met. +type PreserveCaseFormatterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreserveCaseFormatterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreserveCaseFormatterConfigMultiError) AllErrors() []error { return m } + +// PreserveCaseFormatterConfigValidationError is the validation error returned +// by PreserveCaseFormatterConfig.Validate if the designated constraints +// aren't met. +type PreserveCaseFormatterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PreserveCaseFormatterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PreserveCaseFormatterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PreserveCaseFormatterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PreserveCaseFormatterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PreserveCaseFormatterConfigValidationError) ErrorName() string { + return "PreserveCaseFormatterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e PreserveCaseFormatterConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPreserveCaseFormatterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PreserveCaseFormatterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PreserveCaseFormatterConfigValidationError{} diff --git a/pkg/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.go b/pkg/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.go new file mode 100644 index 0000000000..7ea32cc2a6 --- /dev/null +++ b/pkg/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.go @@ -0,0 +1,222 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto + +package custom_headerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This extension allows for the original downstream remote IP to be detected +// by reading the value from a configured header name. If the value is successfully parsed +// as an IP, it'll be treated as the effective downstream remote address and seen as such +// by all filters. See :ref:`original_ip_detection_extensions +// ` +// for an overview of how extensions operate and what happens when an extension fails +// to detect the remote IP. +// +// [#extension: envoy.http.original_ip_detection.custom_header] +type CustomHeaderConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The header name containing the original downstream remote address, if present. + // + // Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored. + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` + // If set to true, the extension could decide that the detected address should be treated as + // trusted by the HCM. If the address is considered :ref:`trusted`, + // it might be used as input to determine if the request is internal (among other things). + AllowExtensionToSetAddressAsTrusted bool `protobuf:"varint,2,opt,name=allow_extension_to_set_address_as_trusted,json=allowExtensionToSetAddressAsTrusted,proto3" json:"allow_extension_to_set_address_as_trusted,omitempty"` + // If this is set, the request will be rejected when detection fails using it as the HTTP response status. + // + // .. note:: + // If this is set to < 400 or > 511, the default status 403 will be used instead. + RejectWithStatus *v3.HttpStatus `protobuf:"bytes,3,opt,name=reject_with_status,json=rejectWithStatus,proto3" json:"reject_with_status,omitempty"` +} + +func (x *CustomHeaderConfig) Reset() { + *x = CustomHeaderConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomHeaderConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomHeaderConfig) ProtoMessage() {} + +func (x *CustomHeaderConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomHeaderConfig.ProtoReflect.Descriptor instead. +func (*CustomHeaderConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescGZIP(), []int{0} +} + +func (x *CustomHeaderConfig) GetHeaderName() string { + if x != nil { + return x.HeaderName + } + return "" +} + +func (x *CustomHeaderConfig) GetAllowExtensionToSetAddressAsTrusted() bool { + if x != nil { + return x.AllowExtensionToSetAddressAsTrusted + } + return false +} + +func (x *CustomHeaderConfig) GetRejectWithStatus() *v3.HttpStatus { + if x != nil { + return x.RejectWithStatus + } + return nil +} + +var File_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc = []byte{ + 0x0a, 0x50, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, + 0x01, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x56, 0x0a, 0x29, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x23, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x41, + 0x73, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x72, 0x65, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x10, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0xde, 0x01, 0x0a, 0x4a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x42, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescOnce sync.Once + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData = file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc +) + +func file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData) + }) + return file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData +} + +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_goTypes = []interface{}{ + (*CustomHeaderConfig)(nil), // 0: envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig + (*v3.HttpStatus)(nil), // 1: envoy.type.v3.HttpStatus +} +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig.reject_with_status:type_name -> envoy.type.v3.HttpStatus + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_init() +} +func file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_init() { + if File_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomHeaderConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_depIdxs, + MessageInfos: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes, + }.Build() + File_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto = out.File + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc = nil + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_goTypes = nil + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.validate.go b/pkg/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.validate.go new file mode 100644 index 0000000000..d5805a32d6 --- /dev/null +++ b/pkg/api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.validate.go @@ -0,0 +1,193 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto + +package custom_headerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CustomHeaderConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CustomHeaderConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomHeaderConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomHeaderConfigMultiError, or nil if none found. +func (m *CustomHeaderConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomHeaderConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetHeaderName()) < 1 { + err := CustomHeaderConfigValidationError{ + field: "HeaderName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_CustomHeaderConfig_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + err := CustomHeaderConfigValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for AllowExtensionToSetAddressAsTrusted + + if all { + switch v := interface{}(m.GetRejectWithStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomHeaderConfigValidationError{ + field: "RejectWithStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomHeaderConfigValidationError{ + field: "RejectWithStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRejectWithStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CustomHeaderConfigValidationError{ + field: "RejectWithStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CustomHeaderConfigMultiError(errors) + } + + return nil +} + +// CustomHeaderConfigMultiError is an error wrapping multiple validation errors +// returned by CustomHeaderConfig.ValidateAll() if the designated constraints +// aren't met. +type CustomHeaderConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomHeaderConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomHeaderConfigMultiError) AllErrors() []error { return m } + +// CustomHeaderConfigValidationError is the validation error returned by +// CustomHeaderConfig.Validate if the designated constraints aren't met. +type CustomHeaderConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CustomHeaderConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CustomHeaderConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CustomHeaderConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CustomHeaderConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CustomHeaderConfigValidationError) ErrorName() string { + return "CustomHeaderConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CustomHeaderConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCustomHeaderConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CustomHeaderConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CustomHeaderConfigValidationError{} + +var _CustomHeaderConfig_HeaderName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") diff --git a/pkg/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.go b/pkg/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.go new file mode 100644 index 0000000000..8506caff69 --- /dev/null +++ b/pkg/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.go @@ -0,0 +1,172 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/http/original_ip_detection/xff/v3/xff.proto + +package xffv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This extension allows for the original downstream remote IP to be detected +// by reading the :ref:`config_http_conn_man_headers_x-forwarded-for` header. +// +// [#extension: envoy.http.original_ip_detection.xff] +type XffConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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,1,opt,name=xff_num_trusted_hops,json=xffNumTrustedHops,proto3" json:"xff_num_trusted_hops,omitempty"` +} + +func (x *XffConfig) Reset() { + *x = XffConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XffConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XffConfig) ProtoMessage() {} + +func (x *XffConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XffConfig.ProtoReflect.Descriptor instead. +func (*XffConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescGZIP(), []int{0} +} + +func (x *XffConfig) GetXffNumTrustedHops() uint32 { + if x != nil { + return x.XffNumTrustedHops + } + return 0 +} + +var File_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x66, + 0x66, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x66, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, + 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x66, 0x66, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x3c, 0x0a, 0x09, 0x58, 0x66, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2f, + 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x78, 0x66, + 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x70, 0x73, 0x42, + 0xb7, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x66, + 0x66, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x58, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x66, 0x66, 0x2f, 0x76, 0x33, 0x3b, 0x78, 0x66, 0x66, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescOnce sync.Once + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData = file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc +) + +func file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData) + }) + return file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData +} + +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_goTypes = []interface{}{ + (*XffConfig)(nil), // 0: envoy.extensions.http.original_ip_detection.xff.v3.XffConfig +} +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_init() } +func file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_init() { + if File_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XffConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_depIdxs, + MessageInfos: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes, + }.Build() + File_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto = out.File + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc = nil + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_goTypes = nil + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.validate.go b/pkg/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.validate.go new file mode 100644 index 0000000000..41afbdc1ad --- /dev/null +++ b/pkg/api/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/original_ip_detection/xff/v3/xff.proto + +package xffv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on XffConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *XffConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on XffConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in XffConfigMultiError, or nil +// if none found. +func (m *XffConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *XffConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for XffNumTrustedHops + + if len(errors) > 0 { + return XffConfigMultiError(errors) + } + + return nil +} + +// XffConfigMultiError is an error wrapping multiple validation errors returned +// by XffConfig.ValidateAll() if the designated constraints aren't met. +type XffConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m XffConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m XffConfigMultiError) AllErrors() []error { return m } + +// XffConfigValidationError is the validation error returned by +// XffConfig.Validate if the designated constraints aren't met. +type XffConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e XffConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e XffConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e XffConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e XffConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e XffConfigValidationError) ErrorName() string { return "XffConfigValidationError" } + +// Error satisfies the builtin error interface +func (e XffConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sXffConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = XffConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = XffConfigValidationError{} diff --git a/pkg/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.go b/pkg/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.go new file mode 100644 index 0000000000..8a035a265b --- /dev/null +++ b/pkg/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/http/stateful_session/cookie/v3/cookie.proto + +package cookiev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/http/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This extension allows the session state to be tracked via cookies. +// +// This extension first encodes the address of the upstream host selected by the load balancer +// into a `set-cookie` response header with the :ref:`cookie configuration +// `. +// when new requests are incoming, this extension will try to parse the specific upstream host +// address by the cookie name. If the address parsed from the cookie corresponds to a valid +// upstream host, this upstream host will be selected first. See :ref:`stateful session filter +// `. +// +// For example, if the cookie name is set to `sticky-host`, envoy will prefer `1.2.3.4:80` +// as the upstream host when the request contains the following header: +// +// .. code-block:: none +// +// cookie: sticky-host="MS4yLjMuNDo4MA==" +// +// When processing the upstream response, if `1.2.3.4:80` is indeed the final choice the extension +// does nothing. If `1.2.3.4:80` is not the final choice, the new selected host will be used to +// update the cookie (via the `set-cookie` response header). +// +// [#extension: envoy.http.stateful_session.cookie] +type CookieBasedSessionState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The cookie configuration used to track session state. + Cookie *v3.Cookie `protobuf:"bytes,1,opt,name=cookie,proto3" json:"cookie,omitempty"` +} + +func (x *CookieBasedSessionState) Reset() { + *x = CookieBasedSessionState{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CookieBasedSessionState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CookieBasedSessionState) ProtoMessage() {} + +func (x *CookieBasedSessionState) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CookieBasedSessionState.ProtoReflect.Descriptor instead. +func (*CookieBasedSessionState) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescGZIP(), []int{0} +} + +func (x *CookieBasedSessionState) GetCookie() *v3.Cookie { + if x != nil { + return x.Cookie + } + return nil +} + +var File_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc = []byte{ + 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, + 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x17, 0x43, 0x6f, + 0x6f, 0x6b, 0x69, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x63, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x42, 0xb9, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, + 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescOnce sync.Once + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData = file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc +) + +func file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData) + }) + return file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData +} + +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_goTypes = []interface{}{ + (*CookieBasedSessionState)(nil), // 0: envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState + (*v3.Cookie)(nil), // 1: envoy.type.http.v3.Cookie +} +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState.cookie:type_name -> envoy.type.http.v3.Cookie + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_init() } +func file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_init() { + if File_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CookieBasedSessionState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_depIdxs, + MessageInfos: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes, + }.Build() + File_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto = out.File + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc = nil + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_goTypes = nil + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.validate.go b/pkg/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.validate.go new file mode 100644 index 0000000000..56f956c088 --- /dev/null +++ b/pkg/api/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.validate.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/stateful_session/cookie/v3/cookie.proto + +package cookiev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CookieBasedSessionState with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CookieBasedSessionState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CookieBasedSessionState with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CookieBasedSessionStateMultiError, or nil if none found. +func (m *CookieBasedSessionState) ValidateAll() error { + return m.validate(true) +} + +func (m *CookieBasedSessionState) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetCookie() == nil { + err := CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCookie()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CookieBasedSessionStateMultiError(errors) + } + + return nil +} + +// CookieBasedSessionStateMultiError is an error wrapping multiple validation +// errors returned by CookieBasedSessionState.ValidateAll() if the designated +// constraints aren't met. +type CookieBasedSessionStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CookieBasedSessionStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CookieBasedSessionStateMultiError) AllErrors() []error { return m } + +// CookieBasedSessionStateValidationError is the validation error returned by +// CookieBasedSessionState.Validate if the designated constraints aren't met. +type CookieBasedSessionStateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CookieBasedSessionStateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CookieBasedSessionStateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CookieBasedSessionStateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CookieBasedSessionStateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CookieBasedSessionStateValidationError) ErrorName() string { + return "CookieBasedSessionStateValidationError" +} + +// Error satisfies the builtin error interface +func (e CookieBasedSessionStateValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCookieBasedSessionState.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CookieBasedSessionStateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CookieBasedSessionStateValidationError{} diff --git a/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.go b/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.go index 09179267fc..0ab7595f2e 100644 --- a/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.go +++ b/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto -package envoy_extensions_internal_redirect_allow_listed_routes_v3 +package allow_listed_routesv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // An internal redirect predicate that accepts only explicitly allowed target routes. // [#extension: envoy.internal_redirect_predicates.allow_listed_routes] type AllowListedRoutesConfig struct { @@ -35,7 +30,7 @@ type AllowListedRoutesConfig struct { unknownFields protoimpl.UnknownFields // The list of routes that's allowed as redirect target by this predicate, - // identified by the route's :ref:`name `. + // identified by the route's :ref:`name `. // Empty route names are not allowed. AllowedRouteNames []string `protobuf:"bytes,1,rep,name=allowed_route_names,json=allowedRouteNames,proto3" json:"allowed_route_names,omitempty"` } @@ -93,24 +88,29 @@ var file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_ 0x2e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x17, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, - 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x92, - 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0x71, 0x0a, 0x47, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x57, 0x0a, 0x17, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x13, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x92, 0x01, 0x06, 0x22, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0xe9, 0x01, 0x0a, 0x47, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x76, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.validate.go b/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.validate.go index 8c37c8fb7d..71eb0f97a9 100644 --- a/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.validate.go +++ b/pkg/api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto -package envoy_extensions_internal_redirect_allow_listed_routes_v3 +package allow_listed_routesv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,32 +31,72 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AllowListedRoutesConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AllowListedRoutesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AllowListedRoutesConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AllowListedRoutesConfigMultiError, or nil if none found. +func (m *AllowListedRoutesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AllowListedRoutesConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetAllowedRouteNames() { _, _ = idx, item if utf8.RuneCountInString(item) < 1 { - return AllowListedRoutesConfigValidationError{ + err := AllowListedRoutesConfigValidationError{ field: fmt.Sprintf("AllowedRouteNames[%v]", idx), reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } } + if len(errors) > 0 { + return AllowListedRoutesConfigMultiError(errors) + } + return nil } +// AllowListedRoutesConfigMultiError is an error wrapping multiple validation +// errors returned by AllowListedRoutesConfig.ValidateAll() if the designated +// constraints aren't met. +type AllowListedRoutesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AllowListedRoutesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AllowListedRoutesConfigMultiError) AllErrors() []error { return m } + // AllowListedRoutesConfigValidationError is the validation error returned by // AllowListedRoutesConfig.Validate if the designated constraints aren't met. type AllowListedRoutesConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.go b/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.go index 5c2b0218b2..9273fa516d 100644 --- a/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.go +++ b/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto -package envoy_extensions_internal_redirect_previous_routes_v3 +package previous_routesv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // An internal redirect predicate that rejects redirect targets that are pointing // to a route that has been followed by a previous redirect from the current route. // [#extension: envoy.internal_redirect_predicates.previous_routes] @@ -80,18 +75,23 @@ var file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_c 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x0a, - 0x14, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6a, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, - 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x19, 0x50, 0x72, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x42, 0xda, 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x19, 0x50, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.validate.go b/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.validate.go index 5c6af43145..a1146b5dbe 100644 --- a/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.validate.go +++ b/pkg/api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto -package envoy_extensions_internal_redirect_previous_routes_v3 +package previous_routesv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on PreviousRoutesConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *PreviousRoutesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousRoutesConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PreviousRoutesConfigMultiError, or nil if none found. +func (m *PreviousRoutesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousRoutesConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return PreviousRoutesConfigMultiError(errors) + } + return nil } +// PreviousRoutesConfigMultiError is an error wrapping multiple validation +// errors returned by PreviousRoutesConfig.ValidateAll() if the designated +// constraints aren't met. +type PreviousRoutesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousRoutesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousRoutesConfigMultiError) AllErrors() []error { return m } + // PreviousRoutesConfigValidationError is the validation error returned by // PreviousRoutesConfig.Validate if the designated constraints aren't met. type PreviousRoutesConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.go b/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.go index 257464b970..a20883079e 100644 --- a/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.go +++ b/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto -package envoy_extensions_internal_redirect_safe_cross_scheme_v3 +package safe_cross_schemev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,17 +21,12 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // An internal redirect predicate that checks the scheme between the // downstream url and the redirect target url and allows a) same scheme // redirect and b) safe cross scheme redirect, which means if the downstream // scheme is HTTPS, both HTTPS and HTTP redirect targets are allowed, but if the // downstream scheme is HTTP, only HTTP redirect targets are allowed. -// [#extension: -// envoy.internal_redirect_predicates.safe_cross_scheme] +// [#extension: envoy.internal_redirect_predicates.safe_cross_scheme] type SafeCrossSchemeConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -86,19 +79,23 @@ var file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_sche 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, - 0x53, 0x61, 0x66, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6d, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x63, - 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x1a, - 0x53, 0x61, 0x66, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x17, 0x0a, 0x15, 0x53, 0x61, 0x66, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xe1, 0x01, 0x0a, 0x45, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x73, + 0x61, 0x66, 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x53, 0x61, 0x66, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x72, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2f, 0x73, 0x61, 0x66, + 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2f, 0x76, + 0x33, 0x3b, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.validate.go b/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.validate.go index 0c31dcc0ec..f45cc61ac0 100644 --- a/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.validate.go +++ b/pkg/api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto -package envoy_extensions_internal_redirect_safe_cross_scheme_v3 +package safe_cross_schemev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SafeCrossSchemeConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *SafeCrossSchemeConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SafeCrossSchemeConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SafeCrossSchemeConfigMultiError, or nil if none found. +func (m *SafeCrossSchemeConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SafeCrossSchemeConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SafeCrossSchemeConfigMultiError(errors) + } + return nil } +// SafeCrossSchemeConfigMultiError is an error wrapping multiple validation +// errors returned by SafeCrossSchemeConfig.ValidateAll() if the designated +// constraints aren't met. +type SafeCrossSchemeConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SafeCrossSchemeConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SafeCrossSchemeConfigMultiError) AllErrors() []error { return m } + // SafeCrossSchemeConfigValidationError is the validation error returned by // SafeCrossSchemeConfig.Validate if the designated constraints aren't met. type SafeCrossSchemeConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/key_value/file_based/v3/config.pb.go b/pkg/api/envoy/extensions/key_value/file_based/v3/config.pb.go new file mode 100644 index 0000000000..9f242a73f0 --- /dev/null +++ b/pkg/api/envoy/extensions/key_value/file_based/v3/config.pb.go @@ -0,0 +1,209 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/key_value/file_based/v3/config.proto + +package file_basedv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#extension: envoy.key_value.file_based] +// This is configuration to flush a key value store out to disk. +type FileBasedKeyValueStoreConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The filename to read the keys and values from, and write the keys and + // values to. + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + // The interval at which the key value store should be flushed to the file. + FlushInterval *duration.Duration `protobuf:"bytes,2,opt,name=flush_interval,json=flushInterval,proto3" json:"flush_interval,omitempty"` + // The maximum number of entries to cache, or 0 to allow for unlimited entries. + // Defaults to 1000 if not present. + MaxEntries *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` +} + +func (x *FileBasedKeyValueStoreConfig) Reset() { + *x = FileBasedKeyValueStoreConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileBasedKeyValueStoreConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileBasedKeyValueStoreConfig) ProtoMessage() {} + +func (x *FileBasedKeyValueStoreConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileBasedKeyValueStoreConfig.ProtoReflect.Descriptor instead. +func (*FileBasedKeyValueStoreConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *FileBasedKeyValueStoreConfig) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +func (x *FileBasedKeyValueStoreConfig) GetFlushInterval() *duration.Duration { + if x != nil { + return x.FlushInterval + } + return nil +} + +func (x *FileBasedKeyValueStoreConfig) GetMaxEntries() *wrappers.UInt32Value { + if x != nil { + return x.MaxEntries + } + return nil +} + +var File_envoy_extensions_key_value_file_based_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x2e, 0x76, + 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x1c, 0x46, + 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x08, 0x66, + 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x40, 0x0a, 0x0e, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x42, 0xad, 0x01, 0x0a, 0x36, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6b, + 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, + 0x73, 0x65, 0x64, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6b, + 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, + 0x73, 0x65, 0x64, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, + 0x64, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData = file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc +) + +func file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData +} + +var file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_key_value_file_based_v3_config_proto_goTypes = []interface{}{ + (*FileBasedKeyValueStoreConfig)(nil), // 0: envoy.extensions.key_value.file_based.v3.FileBasedKeyValueStoreConfig + (*duration.Duration)(nil), // 1: google.protobuf.Duration + (*wrappers.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_key_value_file_based_v3_config_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.key_value.file_based.v3.FileBasedKeyValueStoreConfig.flush_interval:type_name -> google.protobuf.Duration + 2, // 1: envoy.extensions.key_value.file_based.v3.FileBasedKeyValueStoreConfig.max_entries:type_name -> google.protobuf.UInt32Value + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_key_value_file_based_v3_config_proto_init() } +func file_envoy_extensions_key_value_file_based_v3_config_proto_init() { + if File_envoy_extensions_key_value_file_based_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileBasedKeyValueStoreConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_key_value_file_based_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_key_value_file_based_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_key_value_file_based_v3_config_proto = out.File + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc = nil + file_envoy_extensions_key_value_file_based_v3_config_proto_goTypes = nil + file_envoy_extensions_key_value_file_based_v3_config_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/key_value/file_based/v3/config.pb.validate.go b/pkg/api/envoy/extensions/key_value/file_based/v3/config.pb.validate.go new file mode 100644 index 0000000000..2dd52049cd --- /dev/null +++ b/pkg/api/envoy/extensions/key_value/file_based/v3/config.pb.validate.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/key_value/file_based/v3/config.proto + +package file_basedv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FileBasedKeyValueStoreConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *FileBasedKeyValueStoreConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileBasedKeyValueStoreConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FileBasedKeyValueStoreConfigMultiError, or nil if none found. +func (m *FileBasedKeyValueStoreConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FileBasedKeyValueStoreConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetFilename()) < 1 { + err := FileBasedKeyValueStoreConfigValidationError{ + field: "Filename", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetFlushInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "FlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "FlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFlushInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileBasedKeyValueStoreConfigValidationError{ + field: "FlushInterval", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxEntries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "MaxEntries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "MaxEntries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxEntries()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileBasedKeyValueStoreConfigValidationError{ + field: "MaxEntries", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return FileBasedKeyValueStoreConfigMultiError(errors) + } + + return nil +} + +// FileBasedKeyValueStoreConfigMultiError is an error wrapping multiple +// validation errors returned by FileBasedKeyValueStoreConfig.ValidateAll() if +// the designated constraints aren't met. +type FileBasedKeyValueStoreConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileBasedKeyValueStoreConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileBasedKeyValueStoreConfigMultiError) AllErrors() []error { return m } + +// FileBasedKeyValueStoreConfigValidationError is the validation error returned +// by FileBasedKeyValueStoreConfig.Validate if the designated constraints +// aren't met. +type FileBasedKeyValueStoreConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FileBasedKeyValueStoreConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FileBasedKeyValueStoreConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FileBasedKeyValueStoreConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FileBasedKeyValueStoreConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FileBasedKeyValueStoreConfigValidationError) ErrorName() string { + return "FileBasedKeyValueStoreConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e FileBasedKeyValueStoreConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFileBasedKeyValueStoreConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FileBasedKeyValueStoreConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FileBasedKeyValueStoreConfigValidationError{} diff --git a/pkg/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go b/pkg/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go new file mode 100644 index 0000000000..f6e926c0d4 --- /dev/null +++ b/pkg/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto + +package ring_hashv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The hash function used to hash hosts onto the ketama ring. +type RingHash_HashFunction int32 + +const ( + // Currently defaults to XX_HASH. + RingHash_DEFAULT_HASH RingHash_HashFunction = 0 + // Use `xxHash `_. + RingHash_XX_HASH RingHash_HashFunction = 1 + // 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. + RingHash_MURMUR_HASH_2 RingHash_HashFunction = 2 +) + +// Enum value maps for RingHash_HashFunction. +var ( + RingHash_HashFunction_name = map[int32]string{ + 0: "DEFAULT_HASH", + 1: "XX_HASH", + 2: "MURMUR_HASH_2", + } + RingHash_HashFunction_value = map[string]int32{ + "DEFAULT_HASH": 0, + "XX_HASH": 1, + "MURMUR_HASH_2": 2, + } +) + +func (x RingHash_HashFunction) Enum() *RingHash_HashFunction { + p := new(RingHash_HashFunction) + *p = x + return p +} + +func (x RingHash_HashFunction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RingHash_HashFunction) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes[0].Descriptor() +} + +func (RingHash_HashFunction) Type() protoreflect.EnumType { + return &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes[0] +} + +func (x RingHash_HashFunction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RingHash_HashFunction.Descriptor instead. +func (RingHash_HashFunction) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP(), []int{0, 0} +} + +// This configuration allows the built-in RING_HASH LB policy to be configured via the LB policy +// extension point. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +// [#next-free-field: 6] +type RingHash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash function used to hash hosts onto the ketama ring. The value defaults to + // :ref:`XX_HASH`. + HashFunction RingHash_HashFunction `protobuf:"varint,1,opt,name=hash_function,json=hashFunction,proto3,enum=envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash_HashFunction" json:"hash_function,omitempty"` + // 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 *wrappers.UInt64Value `protobuf:"bytes,2,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,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 *wrappers.UInt64Value `protobuf:"bytes,3,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` + // If set to `true`, the cluster will use hostname instead of the resolved + // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. + UseHostnameForHashing bool `protobuf:"varint,4,opt,name=use_hostname_for_hashing,json=useHostnameForHashing,proto3" json:"use_hostname_for_hashing,omitempty"` + // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 + // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. + // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. + // Minimum is 100. + // + // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified + // `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests + // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing + // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify + // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the + // cascading overflow effect when choosing the next host in the ring/table). + // + // If weights are specified on the hosts, they are respected. + // + // This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts + // being probed, so use a higher value if you require better performance. + HashBalanceFactor *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=hash_balance_factor,json=hashBalanceFactor,proto3" json:"hash_balance_factor,omitempty"` +} + +func (x *RingHash) Reset() { + *x = RingHash{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RingHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RingHash) ProtoMessage() {} + +func (x *RingHash) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RingHash.ProtoReflect.Descriptor instead. +func (*RingHash) Descriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP(), []int{0} +} + +func (x *RingHash) GetHashFunction() RingHash_HashFunction { + if x != nil { + return x.HashFunction + } + return RingHash_DEFAULT_HASH +} + +func (x *RingHash) GetMinimumRingSize() *wrappers.UInt64Value { + if x != nil { + return x.MinimumRingSize + } + return nil +} + +func (x *RingHash) GetMaximumRingSize() *wrappers.UInt64Value { + if x != nil { + return x.MaximumRingSize + } + return nil +} + +func (x *RingHash) GetUseHostnameForHashing() bool { + if x != nil { + return x.UseHostnameForHashing + } + return false +} + +func (x *RingHash) GetHashBalanceFactor() *wrappers.UInt32Value { + if x != nil { + return x.HashBalanceFactor + } + return nil +} + +var File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto protoreflect.FileDescriptor + +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc = []byte{ + 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, + 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x04, 0x0a, 0x08, 0x52, 0x69, 0x6e, 0x67, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x7b, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x48, 0x61, 0x73, 0x68, + 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, + 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, + 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x18, + 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x72, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x75, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x48, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x64, 0x52, 0x11, 0x68, 0x61, 0x73, 0x68, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x40, 0x0a, 0x0c, + 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x0c, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x58, 0x58, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4d, + 0x55, 0x52, 0x4d, 0x55, 0x52, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x32, 0x10, 0x02, 0x42, 0xc8, + 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescOnce sync.Once + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData = file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc +) + +func file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP() []byte { + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescOnce.Do(func() { + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData) + }) + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData +} + +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes = []interface{}{ + (RingHash_HashFunction)(0), // 0: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.HashFunction + (*RingHash)(nil), // 1: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash + (*wrappers.UInt64Value)(nil), // 2: google.protobuf.UInt64Value + (*wrappers.UInt32Value)(nil), // 3: google.protobuf.UInt32Value +} +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.hash_function:type_name -> envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.HashFunction + 2, // 1: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.minimum_ring_size:type_name -> google.protobuf.UInt64Value + 2, // 2: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.maximum_ring_size:type_name -> google.protobuf.UInt64Value + 3, // 3: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.hash_balance_factor:type_name -> google.protobuf.UInt32Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_init() } +func file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_init() { + if File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RingHash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes, + DependencyIndexes: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs, + EnumInfos: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes, + MessageInfos: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes, + }.Build() + File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto = out.File + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc = nil + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes = nil + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go b/pkg/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go new file mode 100644 index 0000000000..d71983cba2 --- /dev/null +++ b/pkg/api/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go @@ -0,0 +1,193 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto + +package ring_hashv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RingHash with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RingHash) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RingHash with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RingHashMultiError, or nil +// if none found. +func (m *RingHash) ValidateAll() error { + return m.validate(true) +} + +func (m *RingHash) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := RingHash_HashFunction_name[int32(m.GetHashFunction())]; !ok { + err := RingHashValidationError{ + field: "HashFunction", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetMinimumRingSize(); wrapper != nil { + + if wrapper.GetValue() > 8388608 { + err := RingHashValidationError{ + field: "MinimumRingSize", + reason: "value must be less than or equal to 8388608", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetMaximumRingSize(); wrapper != nil { + + if wrapper.GetValue() > 8388608 { + err := RingHashValidationError{ + field: "MaximumRingSize", + reason: "value must be less than or equal to 8388608", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + // no validation rules for UseHostnameForHashing + + if wrapper := m.GetHashBalanceFactor(); wrapper != nil { + + if wrapper.GetValue() < 100 { + err := RingHashValidationError{ + field: "HashBalanceFactor", + reason: "value must be greater than or equal to 100", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return RingHashMultiError(errors) + } + + return nil +} + +// RingHashMultiError is an error wrapping multiple validation errors returned +// by RingHash.ValidateAll() if the designated constraints aren't met. +type RingHashMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RingHashMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RingHashMultiError) AllErrors() []error { return m } + +// RingHashValidationError is the validation error returned by +// RingHash.Validate if the designated constraints aren't met. +type RingHashValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RingHashValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RingHashValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RingHashValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RingHashValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RingHashValidationError) ErrorName() string { return "RingHashValidationError" } + +// Error satisfies the builtin error interface +func (e RingHashValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRingHash.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RingHashValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RingHashValidationError{} diff --git a/pkg/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.go b/pkg/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.go new file mode 100644 index 0000000000..5d0facf15a --- /dev/null +++ b/pkg/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto + +package round_robinv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This configuration allows the built-in ROUND_ROBIN LB policy to be configured via the LB policy +// extension point. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +type RoundRobin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + SlowStartConfig *v3.Cluster_SlowStartConfig `protobuf:"bytes,1,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"` +} + +func (x *RoundRobin) Reset() { + *x = RoundRobin{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoundRobin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoundRobin) ProtoMessage() {} + +func (x *RoundRobin) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoundRobin.ProtoReflect.Descriptor instead. +func (*RoundRobin) Descriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescGZIP(), []int{0} +} + +func (x *RoundRobin) GetSlowStartConfig() *v3.Cluster_SlowStartConfig { + if x != nil { + return x.SlowStartConfig + } + return nil +} + +var File_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto protoreflect.FileDescriptor + +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc = []byte{ + 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, + 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, + 0x6e, 0x12, 0x5c, 0x0a, 0x11, 0x73, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, + 0x73, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0xd0, 0x01, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescOnce sync.Once + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData = file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc +) + +func file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescGZIP() []byte { + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescOnce.Do(func() { + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData) + }) + return file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData +} + +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_goTypes = []interface{}{ + (*RoundRobin)(nil), // 0: envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin + (*v3.Cluster_SlowStartConfig)(nil), // 1: envoy.config.cluster.v3.Cluster.SlowStartConfig +} +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin.slow_start_config:type_name -> envoy.config.cluster.v3.Cluster.SlowStartConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_init() } +func file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_init() { + if File_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoundRobin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_goTypes, + DependencyIndexes: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_depIdxs, + MessageInfos: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes, + }.Build() + File_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto = out.File + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc = nil + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_goTypes = nil + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.validate.go b/pkg/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.validate.go new file mode 100644 index 0000000000..25c479abd5 --- /dev/null +++ b/pkg/api/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.validate.go @@ -0,0 +1,164 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto + +package round_robinv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RoundRobin with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RoundRobin) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoundRobin with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RoundRobinMultiError, or +// nil if none found. +func (m *RoundRobin) ValidateAll() error { + return m.validate(true) +} + +func (m *RoundRobin) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSlowStartConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoundRobinValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoundRobinValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSlowStartConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoundRobinValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RoundRobinMultiError(errors) + } + + return nil +} + +// RoundRobinMultiError is an error wrapping multiple validation errors +// returned by RoundRobin.ValidateAll() if the designated constraints aren't met. +type RoundRobinMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoundRobinMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoundRobinMultiError) AllErrors() []error { return m } + +// RoundRobinValidationError is the validation error returned by +// RoundRobin.Validate if the designated constraints aren't met. +type RoundRobinValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RoundRobinValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RoundRobinValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RoundRobinValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RoundRobinValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RoundRobinValidationError) ErrorName() string { return "RoundRobinValidationError" } + +// Error satisfies the builtin error interface +func (e RoundRobinValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRoundRobin.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RoundRobinValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RoundRobinValidationError{} diff --git a/pkg/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go b/pkg/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go new file mode 100644 index 0000000000..26c4be7cc1 --- /dev/null +++ b/pkg/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto + +package wrr_localityv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +type WrrLocality struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The child LB policy to create for endpoint-picking within the chosen locality. + EndpointPickingPolicy *v3.LoadBalancingPolicy `protobuf:"bytes,1,opt,name=endpoint_picking_policy,json=endpointPickingPolicy,proto3" json:"endpoint_picking_policy,omitempty"` +} + +func (x *WrrLocality) Reset() { + *x = WrrLocality{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WrrLocality) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WrrLocality) ProtoMessage() {} + +func (x *WrrLocality) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WrrLocality.ProtoReflect.Descriptor instead. +func (*WrrLocality) Descriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescGZIP(), []int{0} +} + +func (x *WrrLocality) GetEndpointPickingPolicy() *v3.LoadBalancingPolicy { + if x != nil { + return x.EndpointPickingPolicy + } + return nil +} + +var File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto protoreflect.FileDescriptor + +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc = []byte{ + 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x0b, 0x57, 0x72, 0x72, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x6e, 0x0a, 0x17, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x70, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x15, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0xd4, 0x01, 0x0a, 0x46, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x2e, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x33, + 0x42, 0x10, 0x57, 0x72, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescOnce sync.Once + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData = file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc +) + +func file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescGZIP() []byte { + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescOnce.Do(func() { + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData) + }) + return file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData +} + +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes = []interface{}{ + (*WrrLocality)(nil), // 0: envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality + (*v3.LoadBalancingPolicy)(nil), // 1: envoy.config.cluster.v3.LoadBalancingPolicy +} +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality.endpoint_picking_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_init() } +func file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_init() { + if File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WrrLocality); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes, + DependencyIndexes: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs, + MessageInfos: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes, + }.Build() + File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto = out.File + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc = nil + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes = nil + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go b/pkg/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go new file mode 100644 index 0000000000..ec7470e88b --- /dev/null +++ b/pkg/api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto + +package wrr_localityv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on WrrLocality with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *WrrLocality) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WrrLocality with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in WrrLocalityMultiError, or +// nil if none found. +func (m *WrrLocality) ValidateAll() error { + return m.validate(true) +} + +func (m *WrrLocality) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetEndpointPickingPolicy() == nil { + err := WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetEndpointPickingPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointPickingPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WrrLocalityMultiError(errors) + } + + return nil +} + +// WrrLocalityMultiError is an error wrapping multiple validation errors +// returned by WrrLocality.ValidateAll() if the designated constraints aren't met. +type WrrLocalityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WrrLocalityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WrrLocalityMultiError) AllErrors() []error { return m } + +// WrrLocalityValidationError is the validation error returned by +// WrrLocality.Validate if the designated constraints aren't met. +type WrrLocalityValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WrrLocalityValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WrrLocalityValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WrrLocalityValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WrrLocalityValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WrrLocalityValidationError) ErrorName() string { return "WrrLocalityValidationError" } + +// Error satisfies the builtin error interface +func (e WrrLocalityValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sWrrLocality.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WrrLocalityValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WrrLocalityValidationError{} diff --git a/pkg/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.go b/pkg/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.go new file mode 100644 index 0000000000..dd9f5a7f97 --- /dev/null +++ b/pkg/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.go @@ -0,0 +1,170 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto + +package environment_variablev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Reads an environment variable to provide an input for matching. +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the environment variable to read from. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc = []byte{ + 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0xe4, 0x01, + 0x0a, 0x4d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x42, + 0x0a, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData = file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc +) + +func file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData) + }) + return file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData +} + +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.matching.common_inputs.environment_variable.v3.Config +} +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_init() } +func file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_init() { + if File_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto = out.File + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc = nil + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_goTypes = nil + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.validate.go b/pkg/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.validate.go new file mode 100644 index 0000000000..3afc2ca22a --- /dev/null +++ b/pkg/api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.validate.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto + +package environment_variablev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := ConfigValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/pkg/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go b/pkg/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go new file mode 100644 index 0000000000..c5b8310a63 --- /dev/null +++ b/pkg/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go @@ -0,0 +1,629 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto + +package networkv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Specifies that matching should be performed by the destination IP address. +// [#extension: envoy.matching.inputs.destination_ip] +type DestinationIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DestinationIPInput) Reset() { + *x = DestinationIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationIPInput) ProtoMessage() {} + +func (x *DestinationIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationIPInput.ProtoReflect.Descriptor instead. +func (*DestinationIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{0} +} + +// Specifies that matching should be performed by the destination port. +// [#extension: envoy.matching.inputs.destination_port] +type DestinationPortInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DestinationPortInput) Reset() { + *x = DestinationPortInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationPortInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationPortInput) ProtoMessage() {} + +func (x *DestinationPortInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationPortInput.ProtoReflect.Descriptor instead. +func (*DestinationPortInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{1} +} + +// Specifies that matching should be performed by the source IP address. +// [#extension: envoy.matching.inputs.source_ip] +type SourceIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourceIPInput) Reset() { + *x = SourceIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceIPInput) ProtoMessage() {} + +func (x *SourceIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceIPInput.ProtoReflect.Descriptor instead. +func (*SourceIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{2} +} + +// Specifies that matching should be performed by the source port. +// [#extension: envoy.matching.inputs.source_port] +type SourcePortInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourcePortInput) Reset() { + *x = SourcePortInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourcePortInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourcePortInput) ProtoMessage() {} + +func (x *SourcePortInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourcePortInput.ProtoReflect.Descriptor instead. +func (*SourcePortInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{3} +} + +// Input that matches by the directly connected source IP address (this +// will only be different from the source IP address when using a listener +// filter that overrides the source address, such as the :ref:`Proxy Protocol +// listener filter `). +// [#extension: envoy.matching.inputs.direct_source_ip] +type DirectSourceIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DirectSourceIPInput) Reset() { + *x = DirectSourceIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirectSourceIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectSourceIPInput) ProtoMessage() {} + +func (x *DirectSourceIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectSourceIPInput.ProtoReflect.Descriptor instead. +func (*DirectSourceIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{4} +} + +// Input that matches by the source IP type. +// Specifies the source IP match type. The values include: +// +// * ``local`` - matches a connection originating from the same host, +// [#extension: envoy.matching.inputs.source_type] +type SourceTypeInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourceTypeInput) Reset() { + *x = SourceTypeInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceTypeInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceTypeInput) ProtoMessage() {} + +func (x *SourceTypeInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceTypeInput.ProtoReflect.Descriptor instead. +func (*SourceTypeInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{5} +} + +// Input that matches by the requested server name (e.g. SNI in TLS). +// +// :ref:`TLS Inspector ` provides the requested server name based on SNI, +// when TLS protocol is detected. +// [#extension: envoy.matching.inputs.server_name] +type ServerNameInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ServerNameInput) Reset() { + *x = ServerNameInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNameInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNameInput) ProtoMessage() {} + +func (x *ServerNameInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerNameInput.ProtoReflect.Descriptor instead. +func (*ServerNameInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{6} +} + +// Input that matches by the transport protocol. +// +// Suggested values include: +// +// * ``raw_buffer`` - default, used when no transport protocol is detected, +// * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` +// when TLS protocol is detected. +// [#extension: envoy.matching.inputs.transport_protocol] +type TransportProtocolInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TransportProtocolInput) Reset() { + *x = TransportProtocolInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransportProtocolInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransportProtocolInput) ProtoMessage() {} + +func (x *TransportProtocolInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransportProtocolInput.ProtoReflect.Descriptor instead. +func (*TransportProtocolInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{7} +} + +// List of quoted and comma-separated requested application protocols. The list consists of a +// single negotiated application protocol once the network stream is established. +// +// Examples: +// +// * ``'h2','http/1.1'`` +// * ``'h2c'``` +// +// Suggested values in the list include: +// +// * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector +// ` and :ref:`envoy.filters.listener.http_inspector +// `, +// * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` +// * ``h2c`` - set by :ref:`envoy.filters.listener.http_inspector ` +// +// .. attention:: +// +// Currently, :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. +// [#extension: envoy.matching.inputs.application_protocol] +type ApplicationProtocolInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ApplicationProtocolInput) Reset() { + *x = ApplicationProtocolInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplicationProtocolInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplicationProtocolInput) ProtoMessage() {} + +func (x *ApplicationProtocolInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplicationProtocolInput.ProtoReflect.Descriptor instead. +func (*ApplicationProtocolInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{8} +} + +var File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x50, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x15, + 0x0a, 0x13, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x50, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x42, 0xc5, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x76, 0x33, 0x3b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData = file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc +) + +func file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData) + }) + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData +} + +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes = []interface{}{ + (*DestinationIPInput)(nil), // 0: envoy.extensions.matching.common_inputs.network.v3.DestinationIPInput + (*DestinationPortInput)(nil), // 1: envoy.extensions.matching.common_inputs.network.v3.DestinationPortInput + (*SourceIPInput)(nil), // 2: envoy.extensions.matching.common_inputs.network.v3.SourceIPInput + (*SourcePortInput)(nil), // 3: envoy.extensions.matching.common_inputs.network.v3.SourcePortInput + (*DirectSourceIPInput)(nil), // 4: envoy.extensions.matching.common_inputs.network.v3.DirectSourceIPInput + (*SourceTypeInput)(nil), // 5: envoy.extensions.matching.common_inputs.network.v3.SourceTypeInput + (*ServerNameInput)(nil), // 6: envoy.extensions.matching.common_inputs.network.v3.ServerNameInput + (*TransportProtocolInput)(nil), // 7: envoy.extensions.matching.common_inputs.network.v3.TransportProtocolInput + (*ApplicationProtocolInput)(nil), // 8: envoy.extensions.matching.common_inputs.network.v3.ApplicationProtocolInput +} +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_init() } +func file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_init() { + if File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationPortInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourcePortInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DirectSourceIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceTypeInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNameInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransportProtocolInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplicationProtocolInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto = out.File + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc = nil + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes = nil + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go b/pkg/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go new file mode 100644 index 0000000000..7cc9b90f6a --- /dev/null +++ b/pkg/api/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go @@ -0,0 +1,946 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto + +package networkv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DestinationIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DestinationIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DestinationIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DestinationIPInputMultiError, or nil if none found. +func (m *DestinationIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DestinationIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DestinationIPInputMultiError(errors) + } + + return nil +} + +// DestinationIPInputMultiError is an error wrapping multiple validation errors +// returned by DestinationIPInput.ValidateAll() if the designated constraints +// aren't met. +type DestinationIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DestinationIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DestinationIPInputMultiError) AllErrors() []error { return m } + +// DestinationIPInputValidationError is the validation error returned by +// DestinationIPInput.Validate if the designated constraints aren't met. +type DestinationIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DestinationIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DestinationIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DestinationIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DestinationIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DestinationIPInputValidationError) ErrorName() string { + return "DestinationIPInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DestinationIPInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDestinationIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DestinationIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DestinationIPInputValidationError{} + +// Validate checks the field values on DestinationPortInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DestinationPortInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DestinationPortInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DestinationPortInputMultiError, or nil if none found. +func (m *DestinationPortInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DestinationPortInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DestinationPortInputMultiError(errors) + } + + return nil +} + +// DestinationPortInputMultiError is an error wrapping multiple validation +// errors returned by DestinationPortInput.ValidateAll() if the designated +// constraints aren't met. +type DestinationPortInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DestinationPortInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DestinationPortInputMultiError) AllErrors() []error { return m } + +// DestinationPortInputValidationError is the validation error returned by +// DestinationPortInput.Validate if the designated constraints aren't met. +type DestinationPortInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DestinationPortInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DestinationPortInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DestinationPortInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DestinationPortInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DestinationPortInputValidationError) ErrorName() string { + return "DestinationPortInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DestinationPortInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDestinationPortInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DestinationPortInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DestinationPortInputValidationError{} + +// Validate checks the field values on SourceIPInput with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SourceIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourceIPInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SourceIPInputMultiError, or +// nil if none found. +func (m *SourceIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourceIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourceIPInputMultiError(errors) + } + + return nil +} + +// SourceIPInputMultiError is an error wrapping multiple validation errors +// returned by SourceIPInput.ValidateAll() if the designated constraints +// aren't met. +type SourceIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourceIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourceIPInputMultiError) AllErrors() []error { return m } + +// SourceIPInputValidationError is the validation error returned by +// SourceIPInput.Validate if the designated constraints aren't met. +type SourceIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourceIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourceIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourceIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourceIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourceIPInputValidationError) ErrorName() string { return "SourceIPInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourceIPInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSourceIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourceIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourceIPInputValidationError{} + +// Validate checks the field values on SourcePortInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *SourcePortInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourcePortInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SourcePortInputMultiError, or nil if none found. +func (m *SourcePortInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourcePortInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourcePortInputMultiError(errors) + } + + return nil +} + +// SourcePortInputMultiError is an error wrapping multiple validation errors +// returned by SourcePortInput.ValidateAll() if the designated constraints +// aren't met. +type SourcePortInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourcePortInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourcePortInputMultiError) AllErrors() []error { return m } + +// SourcePortInputValidationError is the validation error returned by +// SourcePortInput.Validate if the designated constraints aren't met. +type SourcePortInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourcePortInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourcePortInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourcePortInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourcePortInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourcePortInputValidationError) ErrorName() string { return "SourcePortInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourcePortInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSourcePortInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourcePortInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourcePortInputValidationError{} + +// Validate checks the field values on DirectSourceIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DirectSourceIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DirectSourceIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DirectSourceIPInputMultiError, or nil if none found. +func (m *DirectSourceIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DirectSourceIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DirectSourceIPInputMultiError(errors) + } + + return nil +} + +// DirectSourceIPInputMultiError is an error wrapping multiple validation +// errors returned by DirectSourceIPInput.ValidateAll() if the designated +// constraints aren't met. +type DirectSourceIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DirectSourceIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DirectSourceIPInputMultiError) AllErrors() []error { return m } + +// DirectSourceIPInputValidationError is the validation error returned by +// DirectSourceIPInput.Validate if the designated constraints aren't met. +type DirectSourceIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DirectSourceIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DirectSourceIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DirectSourceIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DirectSourceIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DirectSourceIPInputValidationError) ErrorName() string { + return "DirectSourceIPInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DirectSourceIPInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDirectSourceIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DirectSourceIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DirectSourceIPInputValidationError{} + +// Validate checks the field values on SourceTypeInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *SourceTypeInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourceTypeInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SourceTypeInputMultiError, or nil if none found. +func (m *SourceTypeInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourceTypeInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourceTypeInputMultiError(errors) + } + + return nil +} + +// SourceTypeInputMultiError is an error wrapping multiple validation errors +// returned by SourceTypeInput.ValidateAll() if the designated constraints +// aren't met. +type SourceTypeInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourceTypeInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourceTypeInputMultiError) AllErrors() []error { return m } + +// SourceTypeInputValidationError is the validation error returned by +// SourceTypeInput.Validate if the designated constraints aren't met. +type SourceTypeInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourceTypeInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourceTypeInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourceTypeInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourceTypeInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourceTypeInputValidationError) ErrorName() string { return "SourceTypeInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourceTypeInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSourceTypeInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourceTypeInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourceTypeInputValidationError{} + +// Validate checks the field values on ServerNameInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ServerNameInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServerNameInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ServerNameInputMultiError, or nil if none found. +func (m *ServerNameInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ServerNameInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ServerNameInputMultiError(errors) + } + + return nil +} + +// ServerNameInputMultiError is an error wrapping multiple validation errors +// returned by ServerNameInput.ValidateAll() if the designated constraints +// aren't met. +type ServerNameInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServerNameInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServerNameInputMultiError) AllErrors() []error { return m } + +// ServerNameInputValidationError is the validation error returned by +// ServerNameInput.Validate if the designated constraints aren't met. +type ServerNameInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerNameInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerNameInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerNameInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerNameInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerNameInputValidationError) ErrorName() string { return "ServerNameInputValidationError" } + +// Error satisfies the builtin error interface +func (e ServerNameInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sServerNameInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerNameInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerNameInputValidationError{} + +// Validate checks the field values on TransportProtocolInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *TransportProtocolInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TransportProtocolInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TransportProtocolInputMultiError, or nil if none found. +func (m *TransportProtocolInput) ValidateAll() error { + return m.validate(true) +} + +func (m *TransportProtocolInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return TransportProtocolInputMultiError(errors) + } + + return nil +} + +// TransportProtocolInputMultiError is an error wrapping multiple validation +// errors returned by TransportProtocolInput.ValidateAll() if the designated +// constraints aren't met. +type TransportProtocolInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TransportProtocolInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TransportProtocolInputMultiError) AllErrors() []error { return m } + +// TransportProtocolInputValidationError is the validation error returned by +// TransportProtocolInput.Validate if the designated constraints aren't met. +type TransportProtocolInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TransportProtocolInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TransportProtocolInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TransportProtocolInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TransportProtocolInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TransportProtocolInputValidationError) ErrorName() string { + return "TransportProtocolInputValidationError" +} + +// Error satisfies the builtin error interface +func (e TransportProtocolInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTransportProtocolInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TransportProtocolInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TransportProtocolInputValidationError{} + +// Validate checks the field values on ApplicationProtocolInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ApplicationProtocolInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApplicationProtocolInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ApplicationProtocolInputMultiError, or nil if none found. +func (m *ApplicationProtocolInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ApplicationProtocolInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ApplicationProtocolInputMultiError(errors) + } + + return nil +} + +// ApplicationProtocolInputMultiError is an error wrapping multiple validation +// errors returned by ApplicationProtocolInput.ValidateAll() if the designated +// constraints aren't met. +type ApplicationProtocolInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApplicationProtocolInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApplicationProtocolInputMultiError) AllErrors() []error { return m } + +// ApplicationProtocolInputValidationError is the validation error returned by +// ApplicationProtocolInput.Validate if the designated constraints aren't met. +type ApplicationProtocolInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ApplicationProtocolInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ApplicationProtocolInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ApplicationProtocolInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ApplicationProtocolInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ApplicationProtocolInputValidationError) ErrorName() string { + return "ApplicationProtocolInputValidationError" +} + +// Error satisfies the builtin error interface +func (e ApplicationProtocolInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sApplicationProtocolInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ApplicationProtocolInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ApplicationProtocolInputValidationError{} diff --git a/pkg/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.go b/pkg/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.go new file mode 100644 index 0000000000..9bca0fc556 --- /dev/null +++ b/pkg/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.go @@ -0,0 +1,206 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto + +package consistent_hashingv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The consistent hashing matchers computes a consistent hash from the input and matches if the resulting hash +// is within the configured threshold. +// More specifically, this matcher evaluates to true if hash(input, seed) % modulo >= threshold. +// Note that the consistency of the match result relies on the internal hash function (xxhash) remaining +// unchanged. While this is unlikely to happen intentionally, this could cause inconsistent match results +// between deployments. +type ConsistentHashing struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The threshold the resulting hash must be over in order for this matcher to evaluate to true. + // This value must be below the configured modulo value. + // Setting this to 0 is equivalent to this matcher always matching. + Threshold uint32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"` + // The value to use for the modulus in the calculation. This effectively bounds the hash output, + // specifying the range of possible values. + // This value must be above the configured threshold. + Modulo uint32 `protobuf:"varint,2,opt,name=modulo,proto3" json:"modulo,omitempty"` + // Optional seed passed through the hash function. This allows using additional information when computing + // the hash value: by changing the seed value, a different partition of matching and non-matching inputs will + // be created that remains consistent for that seed value. + Seed uint64 `protobuf:"varint,3,opt,name=seed,proto3" json:"seed,omitempty"` +} + +func (x *ConsistentHashing) Reset() { + *x = ConsistentHashing{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConsistentHashing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsistentHashing) ProtoMessage() {} + +func (x *ConsistentHashing) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConsistentHashing.ProtoReflect.Descriptor instead. +func (*ConsistentHashing) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescGZIP(), []int{0} +} + +func (x *ConsistentHashing) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *ConsistentHashing) GetModulo() uint32 { + if x != nil { + return x.Modulo + } + return 0 +} + +func (x *ConsistentHashing) GetSeed() uint64 { + if x != nil { + return x.Seed + } + return 0 +} + +var File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc = []byte{ + 0x0a, 0x57, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x06, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x42, 0xec, 0x01, 0x0a, 0x4c, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x43, 0x6f, 0x6e, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData = file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc +) + +func file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData) + }) + return file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData +} + +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes = []interface{}{ + (*ConsistentHashing)(nil), // 0: envoy.extensions.matching.input_matchers.consistent_hashing.v3.ConsistentHashing +} +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_init() +} +func file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_init() { + if File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConsistentHashing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto = out.File + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc = nil + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes = nil + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.validate.go b/pkg/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.validate.go new file mode 100644 index 0000000000..c7294050b1 --- /dev/null +++ b/pkg/api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.validate.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto + +package consistent_hashingv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ConsistentHashing with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ConsistentHashing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConsistentHashing with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ConsistentHashingMultiError, or nil if none found. +func (m *ConsistentHashing) ValidateAll() error { + return m.validate(true) +} + +func (m *ConsistentHashing) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Threshold + + if m.GetModulo() <= 0 { + err := ConsistentHashingValidationError{ + field: "Modulo", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Seed + + if len(errors) > 0 { + return ConsistentHashingMultiError(errors) + } + + return nil +} + +// ConsistentHashingMultiError is an error wrapping multiple validation errors +// returned by ConsistentHashing.ValidateAll() if the designated constraints +// aren't met. +type ConsistentHashingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConsistentHashingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConsistentHashingMultiError) AllErrors() []error { return m } + +// ConsistentHashingValidationError is the validation error returned by +// ConsistentHashing.Validate if the designated constraints aren't met. +type ConsistentHashingValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConsistentHashingValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConsistentHashingValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConsistentHashingValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConsistentHashingValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConsistentHashingValidationError) ErrorName() string { + return "ConsistentHashingValidationError" +} + +// Error satisfies the builtin error interface +func (e ConsistentHashingValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConsistentHashing.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConsistentHashingValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConsistentHashingValidationError{} diff --git a/pkg/api/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.go b/pkg/api/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.go new file mode 100644 index 0000000000..1cc8ad283c --- /dev/null +++ b/pkg/api/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/matching/input_matchers/ip/v3/ip.proto + +package ipv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This input matcher matches IPv4 or IPv6 addresses against a list of CIDR +// ranges. It returns true if and only if the input IP belongs to at least one +// of these CIDR ranges. Internally, it uses a Level-Compressed trie, as +// described in the paper `IP-address lookup using LC-tries +// `_ +// by S. Nilsson and G. Karlsson. For "big" lists of IPs, this matcher is more +// efficient than multiple single IP matcher, that would have a linear cost. +type Ip struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Match if the IP belongs to any of these CIDR ranges. + CidrRanges []*v3.CidrRange `protobuf:"bytes,1,rep,name=cidr_ranges,json=cidrRanges,proto3" json:"cidr_ranges,omitempty"` + // The human readable prefix to use when emitting statistics for the IP input + // matcher. Names in the table below are concatenated to this prefix. + // + // .. csv-table:: + // :header: Name, Type, Description + // :widths: 1, 1, 2 + // + // ip_parsing_failed, Counter, Total number of IP addresses the matcher was unable to parse + StatPrefix string `protobuf:"bytes,2,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` +} + +func (x *Ip) Reset() { + *x = Ip{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ip) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ip) ProtoMessage() {} + +func (x *Ip) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ip.ProtoReflect.Descriptor instead. +func (*Ip) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescGZIP(), []int{0} +} + +func (x *Ip) GetCidrRanges() []*v3.CidrRange { + if x != nil { + return x.CidrRanges + } + return nil +} + +func (x *Ip) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +var File_envoy_extensions_matching_input_matchers_ip_v3_ip_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x69, 0x70, 0x2f, 0x76, 0x33, + 0x2f, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x2e, 0x69, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7a, 0x0a, 0x02, 0x49, 0x70, 0x12, 0x4a, 0x0a, 0x0b, 0x63, + 0x69, 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x63, 0x69, 0x64, + 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x42, 0xad, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2e, 0x69, 0x70, 0x2e, + 0x76, 0x33, 0x42, 0x07, 0x49, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x69, + 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x69, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData = file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc +) + +func file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData) + }) + return file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData +} + +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_goTypes = []interface{}{ + (*Ip)(nil), // 0: envoy.extensions.matching.input_matchers.ip.v3.Ip + (*v3.CidrRange)(nil), // 1: envoy.config.core.v3.CidrRange +} +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.matching.input_matchers.ip.v3.Ip.cidr_ranges:type_name -> envoy.config.core.v3.CidrRange + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_init() } +func file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_init() { + if File_envoy_extensions_matching_input_matchers_ip_v3_ip_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_input_matchers_ip_v3_ip_proto = out.File + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc = nil + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_goTypes = nil + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.validate.go b/pkg/api/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.validate.go new file mode 100644 index 0000000000..c36fdbd857 --- /dev/null +++ b/pkg/api/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.validate.go @@ -0,0 +1,190 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/input_matchers/ip/v3/ip.proto + +package ipv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Ip with the rules defined in the proto +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. +func (m *Ip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Ip with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in IpMultiError, or nil if none found. +func (m *Ip) ValidateAll() error { + return m.validate(true) +} + +func (m *Ip) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetCidrRanges()) < 1 { + err := IpValidationError{ + field: "CidrRanges", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetCidrRanges() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IpValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IpValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IpValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := IpValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return IpMultiError(errors) + } + + return nil +} + +// IpMultiError is an error wrapping multiple validation errors returned by +// Ip.ValidateAll() if the designated constraints aren't met. +type IpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IpMultiError) AllErrors() []error { return m } + +// IpValidationError is the validation error returned by Ip.Validate if the +// designated constraints aren't met. +type IpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IpValidationError) ErrorName() string { return "IpValidationError" } + +// Error satisfies the builtin error interface +func (e IpValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sIp.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IpValidationError{} diff --git a/pkg/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.go b/pkg/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.go new file mode 100644 index 0000000000..d735137bd0 --- /dev/null +++ b/pkg/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto + +package applev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for apple DNS resolver. +type AppleDnsResolverConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AppleDnsResolverConfig) Reset() { + *x = AppleDnsResolverConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppleDnsResolverConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppleDnsResolverConfig) ProtoMessage() {} + +func (x *AppleDnsResolverConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppleDnsResolverConfig.ProtoReflect.Descriptor instead. +func (*AppleDnsResolverConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto protoreflect.FileDescriptor + +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x41, 0x70, 0x70, 0x6c, + 0x65, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xbe, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, + 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x15, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, + 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescOnce sync.Once + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData = file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc +) + +func file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescGZIP() []byte { + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescOnce.Do(func() { + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData) + }) + return file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData +} + +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_goTypes = []interface{}{ + (*AppleDnsResolverConfig)(nil), // 0: envoy.extensions.network.dns_resolver.apple.v3.AppleDnsResolverConfig +} +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_init() } +func file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_init() { + if File_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppleDnsResolverConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_goTypes, + DependencyIndexes: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_depIdxs, + MessageInfos: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes, + }.Build() + File_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto = out.File + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc = nil + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_goTypes = nil + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.validate.go b/pkg/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.validate.go new file mode 100644 index 0000000000..a497bcc884 --- /dev/null +++ b/pkg/api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto + +package applev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AppleDnsResolverConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AppleDnsResolverConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AppleDnsResolverConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AppleDnsResolverConfigMultiError, or nil if none found. +func (m *AppleDnsResolverConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AppleDnsResolverConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return AppleDnsResolverConfigMultiError(errors) + } + + return nil +} + +// AppleDnsResolverConfigMultiError is an error wrapping multiple validation +// errors returned by AppleDnsResolverConfig.ValidateAll() if the designated +// constraints aren't met. +type AppleDnsResolverConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AppleDnsResolverConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AppleDnsResolverConfigMultiError) AllErrors() []error { return m } + +// AppleDnsResolverConfigValidationError is the validation error returned by +// AppleDnsResolverConfig.Validate if the designated constraints aren't met. +type AppleDnsResolverConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AppleDnsResolverConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AppleDnsResolverConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AppleDnsResolverConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AppleDnsResolverConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AppleDnsResolverConfigValidationError) ErrorName() string { + return "AppleDnsResolverConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e AppleDnsResolverConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAppleDnsResolverConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AppleDnsResolverConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AppleDnsResolverConfigValidationError{} diff --git a/pkg/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.go b/pkg/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.go new file mode 100644 index 0000000000..fceda1d0e0 --- /dev/null +++ b/pkg/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto + +package caresv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for c-ares DNS resolver. +type CaresDnsResolverConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of dns resolver addresses. + // :ref:`use_resolvers_as_fallback` + // below dictates if the DNS client should override system defaults or only use the provided + // resolvers if the system defaults are not available, i.e., as a fallback. + Resolvers []*v3.Address `protobuf:"bytes,1,rep,name=resolvers,proto3" json:"resolvers,omitempty"` + // If true use the resolvers listed in the + // :ref:`resolvers` + // field only if c-ares is unable to obtain a + // nameserver from the system (e.g., /etc/resolv.conf). + // Otherwise, the resolvers listed in the resolvers list will override the default system + // resolvers. Defaults to false. + UseResolversAsFallback bool `protobuf:"varint,3,opt,name=use_resolvers_as_fallback,json=useResolversAsFallback,proto3" json:"use_resolvers_as_fallback,omitempty"` + // The resolver will query available network interfaces and determine if there are no available + // interfaces for a given IP family. It will then filter these addresses from the results it + // presents. e.g., if there are no available IPv4 network interfaces, the resolver will not + // provide IPv4 addresses. + FilterUnroutableFamilies bool `protobuf:"varint,4,opt,name=filter_unroutable_families,json=filterUnroutableFamilies,proto3" json:"filter_unroutable_families,omitempty"` + // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. + DnsResolverOptions *v3.DnsResolverOptions `protobuf:"bytes,2,opt,name=dns_resolver_options,json=dnsResolverOptions,proto3" json:"dns_resolver_options,omitempty"` +} + +func (x *CaresDnsResolverConfig) Reset() { + *x = CaresDnsResolverConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CaresDnsResolverConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CaresDnsResolverConfig) ProtoMessage() {} + +func (x *CaresDnsResolverConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CaresDnsResolverConfig.ProtoReflect.Descriptor instead. +func (*CaresDnsResolverConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescGZIP(), []int{0} +} + +func (x *CaresDnsResolverConfig) GetResolvers() []*v3.Address { + if x != nil { + return x.Resolvers + } + return nil +} + +func (x *CaresDnsResolverConfig) GetUseResolversAsFallback() bool { + if x != nil { + return x.UseResolversAsFallback + } + return false +} + +func (x *CaresDnsResolverConfig) GetFilterUnroutableFamilies() bool { + if x != nil { + return x.FilterUnroutableFamilies + } + return false +} + +func (x *CaresDnsResolverConfig) GetDnsResolverOptions() *v3.DnsResolverOptions { + if x != nil { + return x.DnsResolverOptions + } + return nil +} + +var File_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto protoreflect.FileDescriptor + +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x2e, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x02, 0x0a, 0x16, 0x43, + 0x61, 0x72, 0x65, 0x73, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x19, + 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, + 0x5f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x16, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x41, 0x73, 0x46, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x3c, 0x0a, 0x1a, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x5f, 0x75, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x6d, + 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x6d, + 0x69, 0x6c, 0x69, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x14, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x64, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0xbe, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, 0x73, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2e, + 0x76, 0x33, 0x42, 0x15, 0x43, 0x61, 0x72, 0x65, 0x73, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, 0x73, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2f, + 0x76, 0x33, 0x3b, 0x63, 0x61, 0x72, 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescOnce sync.Once + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData = file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc +) + +func file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescGZIP() []byte { + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescOnce.Do(func() { + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData) + }) + return file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData +} + +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_goTypes = []interface{}{ + (*CaresDnsResolverConfig)(nil), // 0: envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig + (*v3.Address)(nil), // 1: envoy.config.core.v3.Address + (*v3.DnsResolverOptions)(nil), // 2: envoy.config.core.v3.DnsResolverOptions +} +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig.resolvers:type_name -> envoy.config.core.v3.Address + 2, // 1: envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig.dns_resolver_options:type_name -> envoy.config.core.v3.DnsResolverOptions + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_init() } +func file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_init() { + if File_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaresDnsResolverConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_goTypes, + DependencyIndexes: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_depIdxs, + MessageInfos: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes, + }.Build() + File_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto = out.File + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc = nil + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_goTypes = nil + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.validate.go b/pkg/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.validate.go new file mode 100644 index 0000000000..aa6445906a --- /dev/null +++ b/pkg/api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.validate.go @@ -0,0 +1,216 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto + +package caresv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CaresDnsResolverConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CaresDnsResolverConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CaresDnsResolverConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CaresDnsResolverConfigMultiError, or nil if none found. +func (m *CaresDnsResolverConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CaresDnsResolverConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetResolvers()) < 1 { + err := CaresDnsResolverConfigValidationError{ + field: "Resolvers", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetResolvers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CaresDnsResolverConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for UseResolversAsFallback + + // no validation rules for FilterUnroutableFamilies + + if all { + switch v := interface{}(m.GetDnsResolverOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolverOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CaresDnsResolverConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CaresDnsResolverConfigMultiError(errors) + } + + return nil +} + +// CaresDnsResolverConfigMultiError is an error wrapping multiple validation +// errors returned by CaresDnsResolverConfig.ValidateAll() if the designated +// constraints aren't met. +type CaresDnsResolverConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CaresDnsResolverConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CaresDnsResolverConfigMultiError) AllErrors() []error { return m } + +// CaresDnsResolverConfigValidationError is the validation error returned by +// CaresDnsResolverConfig.Validate if the designated constraints aren't met. +type CaresDnsResolverConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CaresDnsResolverConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CaresDnsResolverConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CaresDnsResolverConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CaresDnsResolverConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CaresDnsResolverConfigValidationError) ErrorName() string { + return "CaresDnsResolverConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CaresDnsResolverConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCaresDnsResolverConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CaresDnsResolverConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CaresDnsResolverConfigValidationError{} diff --git a/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.go b/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.go index adf40ed1bf..3a4cce3718 100644 --- a/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.go +++ b/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/network/socket_interface/v3/default_socket_interface.proto -package envoy_extensions_network_socket_interface_v3 +package socket_interfacev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for default socket interface that relies on OS dependent syscall to create // sockets. type DefaultSocketInterface struct { @@ -80,14 +75,20 @@ var file_envoy_extensions_network_socket_interface_v3_default_socket_interface_p 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x42, 0x63, 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x1b, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x66, 0x61, 0x63, 0x65, 0x42, 0xcb, 0x01, 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x1b, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.validate.go b/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.validate.go index e5205f972f..b7c0972eaf 100644 --- a/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.validate.go +++ b/pkg/api/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/network/socket_interface/v3/default_socket_interface.proto -package envoy_extensions_network_socket_interface_v3 +package socket_interfacev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on DefaultSocketInterface with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DefaultSocketInterface) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DefaultSocketInterface with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DefaultSocketInterfaceMultiError, or nil if none found. +func (m *DefaultSocketInterface) ValidateAll() error { + return m.validate(true) +} + +func (m *DefaultSocketInterface) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return DefaultSocketInterfaceMultiError(errors) + } + return nil } +// DefaultSocketInterfaceMultiError is an error wrapping multiple validation +// errors returned by DefaultSocketInterface.ValidateAll() if the designated +// constraints aren't met. +type DefaultSocketInterfaceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DefaultSocketInterfaceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DefaultSocketInterfaceMultiError) AllErrors() []error { return m } + // DefaultSocketInterfaceValidationError is the validation error returned by // DefaultSocketInterface.Validate if the designated constraints aren't met. type DefaultSocketInterfaceValidationError struct { diff --git a/pkg/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.go b/pkg/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.go new file mode 100644 index 0000000000..732ff0bb5e --- /dev/null +++ b/pkg/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.go @@ -0,0 +1,151 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto + +package crypto_streamv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the default QUIC server crypto stream provided by QUICHE. +type CryptoServerStreamConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CryptoServerStreamConfig) Reset() { + *x = CryptoServerStreamConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CryptoServerStreamConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CryptoServerStreamConfig) ProtoMessage() {} + +func (x *CryptoServerStreamConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CryptoServerStreamConfig.ProtoReflect.Descriptor instead. +func (*CryptoServerStreamConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto protoreflect.FileDescriptor + +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x71, + 0x75, 0x69, 0x63, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0xb2, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescOnce sync.Once + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData = file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc +) + +func file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescGZIP() []byte { + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescOnce.Do(func() { + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData) + }) + return file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData +} + +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_goTypes = []interface{}{ + (*CryptoServerStreamConfig)(nil), // 0: envoy.extensions.quic.crypto_stream.v3.CryptoServerStreamConfig +} +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_init() } +func file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_init() { + if File_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CryptoServerStreamConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_goTypes, + DependencyIndexes: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_depIdxs, + MessageInfos: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes, + }.Build() + File_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto = out.File + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc = nil + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_goTypes = nil + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.validate.go b/pkg/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.validate.go new file mode 100644 index 0000000000..d3d00d5a35 --- /dev/null +++ b/pkg/api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto + +package crypto_streamv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CryptoServerStreamConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CryptoServerStreamConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CryptoServerStreamConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CryptoServerStreamConfigMultiError, or nil if none found. +func (m *CryptoServerStreamConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CryptoServerStreamConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return CryptoServerStreamConfigMultiError(errors) + } + + return nil +} + +// CryptoServerStreamConfigMultiError is an error wrapping multiple validation +// errors returned by CryptoServerStreamConfig.ValidateAll() if the designated +// constraints aren't met. +type CryptoServerStreamConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CryptoServerStreamConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CryptoServerStreamConfigMultiError) AllErrors() []error { return m } + +// CryptoServerStreamConfigValidationError is the validation error returned by +// CryptoServerStreamConfig.Validate if the designated constraints aren't met. +type CryptoServerStreamConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CryptoServerStreamConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CryptoServerStreamConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CryptoServerStreamConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CryptoServerStreamConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CryptoServerStreamConfigValidationError) ErrorName() string { + return "CryptoServerStreamConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CryptoServerStreamConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCryptoServerStreamConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CryptoServerStreamConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CryptoServerStreamConfigValidationError{} diff --git a/pkg/api/envoy/extensions/quic/proof_source/v3/proof_source.pb.go b/pkg/api/envoy/extensions/quic/proof_source/v3/proof_source.pb.go new file mode 100644 index 0000000000..72be9938ac --- /dev/null +++ b/pkg/api/envoy/extensions/quic/proof_source/v3/proof_source.pb.go @@ -0,0 +1,150 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/quic/proof_source/v3/proof_source.proto + +package proof_sourcev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the default QUIC proof source. +type ProofSourceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ProofSourceConfig) Reset() { + *x = ProofSourceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProofSourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProofSourceConfig) ProtoMessage() {} + +func (x *ProofSourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProofSourceConfig.ProtoReflect.Descriptor instead. +func (*ProofSourceConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_quic_proof_source_v3_proof_source_proto protoreflect.FileDescriptor + +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x71, 0x75, 0x69, + 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, + 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x13, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xae, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescOnce sync.Once + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData = file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc +) + +func file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescGZIP() []byte { + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescOnce.Do(func() { + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData) + }) + return file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData +} + +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_goTypes = []interface{}{ + (*ProofSourceConfig)(nil), // 0: envoy.extensions.quic.proof_source.v3.ProofSourceConfig +} +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_quic_proof_source_v3_proof_source_proto_init() } +func file_envoy_extensions_quic_proof_source_v3_proof_source_proto_init() { + if File_envoy_extensions_quic_proof_source_v3_proof_source_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProofSourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_goTypes, + DependencyIndexes: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_depIdxs, + MessageInfos: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes, + }.Build() + File_envoy_extensions_quic_proof_source_v3_proof_source_proto = out.File + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc = nil + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_goTypes = nil + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/quic/proof_source/v3/proof_source.pb.validate.go b/pkg/api/envoy/extensions/quic/proof_source/v3/proof_source.pb.validate.go new file mode 100644 index 0000000000..69f3beb1ba --- /dev/null +++ b/pkg/api/envoy/extensions/quic/proof_source/v3/proof_source.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/quic/proof_source/v3/proof_source.proto + +package proof_sourcev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProofSourceConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ProofSourceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProofSourceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProofSourceConfigMultiError, or nil if none found. +func (m *ProofSourceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ProofSourceConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ProofSourceConfigMultiError(errors) + } + + return nil +} + +// ProofSourceConfigMultiError is an error wrapping multiple validation errors +// returned by ProofSourceConfig.ValidateAll() if the designated constraints +// aren't met. +type ProofSourceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProofSourceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProofSourceConfigMultiError) AllErrors() []error { return m } + +// ProofSourceConfigValidationError is the validation error returned by +// ProofSourceConfig.Validate if the designated constraints aren't met. +type ProofSourceConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProofSourceConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProofSourceConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProofSourceConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProofSourceConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProofSourceConfigValidationError) ErrorName() string { + return "ProofSourceConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e ProofSourceConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sProofSourceConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProofSourceConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProofSourceConfigValidationError{} diff --git a/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.go b/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.go index c41b71ec6f..686dc98f14 100644 --- a/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.go +++ b/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto -package envoy_extensions_rate_limit_descriptors_expr_v3 +package exprv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The following descriptor entry is appended with a value computed // from a symbolic Common Expression Language expression. // See :ref:`attributes ` for the set of @@ -165,12 +160,18 @@ var file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDesc = [] 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x72, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x54, 0x0a, 0x3d, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x45, 0x78, 0x70, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0xb3, 0x01, 0x0a, 0x3d, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x45, 0x78, + 0x70, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, + 0x33, 0x3b, 0x65, 0x78, 0x70, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.validate.go b/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.validate.go index 44184959b5..c3bdf9cb77 100644 --- a/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.validate.go +++ b/pkg/api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto -package envoy_extensions_rate_limit_descriptors_expr_v3 +package exprv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,41 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Descriptor with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Descriptor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Descriptor with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DescriptorMultiError, or +// nil if none found. +func (m *Descriptor) ValidateAll() error { + return m.validate(true) +} + +func (m *Descriptor) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - return DescriptorValidationError{ + err := DescriptorValidationError{ field: "DescriptorKey", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for SkipIfError @@ -54,15 +75,38 @@ func (m *Descriptor) Validate() error { case *Descriptor_Text: if utf8.RuneCountInString(m.GetText()) < 1 { - return DescriptorValidationError{ + err := DescriptorValidationError{ field: "Text", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *Descriptor_Parsed: - if v, ok := interface{}(m.GetParsed()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetParsed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DescriptorValidationError{ + field: "Parsed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DescriptorValidationError{ + field: "Parsed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParsed()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DescriptorValidationError{ field: "Parsed", @@ -74,9 +118,29 @@ func (m *Descriptor) Validate() error { } + if len(errors) > 0 { + return DescriptorMultiError(errors) + } + return nil } +// DescriptorMultiError is an error wrapping multiple validation errors +// returned by Descriptor.ValidateAll() if the designated constraints aren't met. +type DescriptorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DescriptorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DescriptorMultiError) AllErrors() []error { return m } + // DescriptorValidationError is the validation error returned by // Descriptor.Validate if the designated constraints aren't met. type DescriptorValidationError struct { diff --git a/pkg/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.go b/pkg/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.go new file mode 100644 index 0000000000..c41c8f23ee --- /dev/null +++ b/pkg/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.go @@ -0,0 +1,205 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto + +package upstream_ip_portv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is configuration for matching upstream ip and port. +// Note that although both fields are optional, at least one of IP or port must be supplied. If only +// one is supplied the other is a wildcard match. +// This matcher requires a filter in the chain to have saved the upstream address in the +// filter state before the matcher is executed by RBAC filter. The state should be saved with key +// `envoy.stream.upstream_address` (See +// :repo:`upstream_address.h`). +// Also, See :repo:`proxy_filter.cc< +// source/extensions/filters/http/dynamic_forward_proxy/proxy_filter.cc>` for an example of a +// filter which populates the FilterState. +type UpstreamIpPortMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A CIDR block that will be used to match the upstream IP. + // Both Ipv4 and Ipv6 ranges can be matched. + UpstreamIp *v3.CidrRange `protobuf:"bytes,1,opt,name=upstream_ip,json=upstreamIp,proto3" json:"upstream_ip,omitempty"` + // A port range that will be used to match the upstream port. + UpstreamPortRange *v31.Int64Range `protobuf:"bytes,2,opt,name=upstream_port_range,json=upstreamPortRange,proto3" json:"upstream_port_range,omitempty"` +} + +func (x *UpstreamIpPortMatcher) Reset() { + *x = UpstreamIpPortMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamIpPortMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamIpPortMatcher) ProtoMessage() {} + +func (x *UpstreamIpPortMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamIpPortMatcher.ProtoReflect.Descriptor instead. +func (*UpstreamIpPortMatcher) Descriptor() ([]byte, []int) { + return file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescGZIP(), []int{0} +} + +func (x *UpstreamIpPortMatcher) GetUpstreamIp() *v3.CidrRange { + if x != nil { + return x.UpstreamIp + } + return nil +} + +func (x *UpstreamIpPortMatcher) GetUpstreamPortRange() *v31.Int64Range { + if x != nil { + return x.UpstreamPortRange + } + return nil +} + +var File_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto protoreflect.FileDescriptor + +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc = []byte{ + 0x0a, 0x51, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, + 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, + 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x49, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, + 0x70, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0xd6, 0x01, 0x0a, + 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, + 0x33, 0x42, 0x1a, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x70, 0x50, 0x6f, 0x72, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescOnce sync.Once + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData = file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc +) + +func file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescGZIP() []byte { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescOnce.Do(func() { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData) + }) + return file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData +} + +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_goTypes = []interface{}{ + (*UpstreamIpPortMatcher)(nil), // 0: envoy.extensions.rbac.matchers.upstream_ip_port.v3.UpstreamIpPortMatcher + (*v3.CidrRange)(nil), // 1: envoy.config.core.v3.CidrRange + (*v31.Int64Range)(nil), // 2: envoy.type.v3.Int64Range +} +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.rbac.matchers.upstream_ip_port.v3.UpstreamIpPortMatcher.upstream_ip:type_name -> envoy.config.core.v3.CidrRange + 2, // 1: envoy.extensions.rbac.matchers.upstream_ip_port.v3.UpstreamIpPortMatcher.upstream_port_range:type_name -> envoy.type.v3.Int64Range + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_init() +} +func file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_init() { + if File_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpstreamIpPortMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_goTypes, + DependencyIndexes: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_depIdxs, + MessageInfos: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes, + }.Build() + File_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto = out.File + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc = nil + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_goTypes = nil + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.validate.go b/pkg/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.validate.go new file mode 100644 index 0000000000..cb0bab0ce3 --- /dev/null +++ b/pkg/api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.validate.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto + +package upstream_ip_portv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UpstreamIpPortMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *UpstreamIpPortMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamIpPortMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamIpPortMatcherMultiError, or nil if none found. +func (m *UpstreamIpPortMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamIpPortMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetUpstreamIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamIp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamIpPortMatcherValidationError{ + field: "UpstreamIp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUpstreamPortRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamPortRange()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamIpPortMatcherValidationError{ + field: "UpstreamPortRange", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UpstreamIpPortMatcherMultiError(errors) + } + + return nil +} + +// UpstreamIpPortMatcherMultiError is an error wrapping multiple validation +// errors returned by UpstreamIpPortMatcher.ValidateAll() if the designated +// constraints aren't met. +type UpstreamIpPortMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamIpPortMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamIpPortMatcherMultiError) AllErrors() []error { return m } + +// UpstreamIpPortMatcherValidationError is the validation error returned by +// UpstreamIpPortMatcher.Validate if the designated constraints aren't met. +type UpstreamIpPortMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpstreamIpPortMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpstreamIpPortMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpstreamIpPortMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpstreamIpPortMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpstreamIpPortMatcherValidationError) ErrorName() string { + return "UpstreamIpPortMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e UpstreamIpPortMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUpstreamIpPortMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpstreamIpPortMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpstreamIpPortMatcherValidationError{} diff --git a/pkg/api/envoy/extensions/request_id/uuid/v3/uuid.pb.go b/pkg/api/envoy/extensions/request_id/uuid/v3/uuid.pb.go new file mode 100644 index 0000000000..4d0aa66dbc --- /dev/null +++ b/pkg/api/envoy/extensions/request_id/uuid/v3/uuid.pb.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/request_id/uuid/v3/uuid.proto + +package uuidv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the default UUID request ID extension which has the following behavior: +// +// 1. Request ID is propagated using the :ref:`x-request-id +// ` header. +// +// 2. Request ID is a universally unique identifier `(UUID4) +// `_. +// +// 3. Tracing decision (sampled, forced, etc) is set in 14th nibble of the UUID. By default this will +// overwrite existing UUIDs received in the *x-request-id* header if the trace sampling decision +// is changed. The 14th nibble of the UUID4 has been chosen because it is fixed to '4' by the +// standard. Thus, '4' indicates a default UUID and no trace status. This nibble is swapped to: +// +// a. '9': Sampled. +// b. 'a': Force traced due to server-side override. +// c. 'b': Force traced due to client-side request ID joining. +// +// See the :ref:`x-request-id ` documentation for +// more information. +type UuidRequestIdConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether the implementation alters the UUID to contain the trace sampling decision as per the + // `UuidRequestIdConfig` message documentation. This defaults to true. If disabled no + // modification to the UUID will be performed. It is important to note that if disabled, + // stable sampling of traces, access logs, etc. will no longer work and only random sampling will + // be possible. + PackTraceReason *wrappers.BoolValue `protobuf:"bytes,1,opt,name=pack_trace_reason,json=packTraceReason,proto3" json:"pack_trace_reason,omitempty"` + // Set whether to use :ref:`x-request-id` for sampling or not. + // This defaults to true. See the :ref:`context propagation ` + // overview for more information. + UseRequestIdForTraceSampling *wrappers.BoolValue `protobuf:"bytes,2,opt,name=use_request_id_for_trace_sampling,json=useRequestIdForTraceSampling,proto3" json:"use_request_id_for_trace_sampling,omitempty"` +} + +func (x *UuidRequestIdConfig) Reset() { + *x = UuidRequestIdConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UuidRequestIdConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UuidRequestIdConfig) ProtoMessage() {} + +func (x *UuidRequestIdConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UuidRequestIdConfig.ProtoReflect.Descriptor instead. +func (*UuidRequestIdConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescGZIP(), []int{0} +} + +func (x *UuidRequestIdConfig) GetPackTraceReason() *wrappers.BoolValue { + if x != nil { + return x.PackTraceReason + } + return nil +} + +func (x *UuidRequestIdConfig) GetUseRequestIdForTraceSampling() *wrappers.BoolValue { + if x != nil { + return x.UseRequestIdForTraceSampling + } + return nil +} + +var File_envoy_extensions_request_id_uuid_v3_uuid_proto protoreflect.FileDescriptor + +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x2f, 0x75, 0x75, + 0x69, 0x64, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x2e, 0x75, 0x75, + 0x69, 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x55, 0x75, 0x69, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x11, + 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x21, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1c, 0x75, 0x73, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x42, 0x9b, 0x01, 0x0a, 0x31, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x76, 0x33, 0x42, + 0x09, 0x55, 0x75, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x2f, 0x75, 0x75, 0x69, 0x64, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x75, 0x69, 0x64, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescOnce sync.Once + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData = file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc +) + +func file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescGZIP() []byte { + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescOnce.Do(func() { + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData) + }) + return file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData +} + +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_goTypes = []interface{}{ + (*UuidRequestIdConfig)(nil), // 0: envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig + (*wrappers.BoolValue)(nil), // 1: google.protobuf.BoolValue +} +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.pack_trace_reason:type_name -> google.protobuf.BoolValue + 1, // 1: envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.use_request_id_for_trace_sampling:type_name -> google.protobuf.BoolValue + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_request_id_uuid_v3_uuid_proto_init() } +func file_envoy_extensions_request_id_uuid_v3_uuid_proto_init() { + if File_envoy_extensions_request_id_uuid_v3_uuid_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UuidRequestIdConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_request_id_uuid_v3_uuid_proto_goTypes, + DependencyIndexes: file_envoy_extensions_request_id_uuid_v3_uuid_proto_depIdxs, + MessageInfos: file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes, + }.Build() + File_envoy_extensions_request_id_uuid_v3_uuid_proto = out.File + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc = nil + file_envoy_extensions_request_id_uuid_v3_uuid_proto_goTypes = nil + file_envoy_extensions_request_id_uuid_v3_uuid_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/request_id/uuid/v3/uuid.pb.validate.go b/pkg/api/envoy/extensions/request_id/uuid/v3/uuid.pb.validate.go new file mode 100644 index 0000000000..ddeb25ed82 --- /dev/null +++ b/pkg/api/envoy/extensions/request_id/uuid/v3/uuid.pb.validate.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/request_id/uuid/v3/uuid.proto + +package uuidv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UuidRequestIdConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *UuidRequestIdConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UuidRequestIdConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UuidRequestIdConfigMultiError, or nil if none found. +func (m *UuidRequestIdConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UuidRequestIdConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPackTraceReason()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "PackTraceReason", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "PackTraceReason", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPackTraceReason()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UuidRequestIdConfigValidationError{ + field: "PackTraceReason", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUseRequestIdForTraceSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "UseRequestIdForTraceSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "UseRequestIdForTraceSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseRequestIdForTraceSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UuidRequestIdConfigValidationError{ + field: "UseRequestIdForTraceSampling", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UuidRequestIdConfigMultiError(errors) + } + + return nil +} + +// UuidRequestIdConfigMultiError is an error wrapping multiple validation +// errors returned by UuidRequestIdConfig.ValidateAll() if the designated +// constraints aren't met. +type UuidRequestIdConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UuidRequestIdConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UuidRequestIdConfigMultiError) AllErrors() []error { return m } + +// UuidRequestIdConfigValidationError is the validation error returned by +// UuidRequestIdConfig.Validate if the designated constraints aren't met. +type UuidRequestIdConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UuidRequestIdConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UuidRequestIdConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UuidRequestIdConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UuidRequestIdConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UuidRequestIdConfigValidationError) ErrorName() string { + return "UuidRequestIdConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e UuidRequestIdConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUuidRequestIdConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UuidRequestIdConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UuidRequestIdConfigValidationError{} diff --git a/pkg/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.go b/pkg/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.go new file mode 100644 index 0000000000..a642140d7f --- /dev/null +++ b/pkg/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.go @@ -0,0 +1,176 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto + +package fixed_heapv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The fixed heap resource monitor reports the Envoy process memory pressure, computed as a +// fraction of currently reserved heap memory divided by a statically configured maximum +// specified in the FixedHeapConfig. +type FixedHeapConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaxHeapSizeBytes uint64 `protobuf:"varint,1,opt,name=max_heap_size_bytes,json=maxHeapSizeBytes,proto3" json:"max_heap_size_bytes,omitempty"` +} + +func (x *FixedHeapConfig) Reset() { + *x = FixedHeapConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FixedHeapConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FixedHeapConfig) ProtoMessage() {} + +func (x *FixedHeapConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FixedHeapConfig.ProtoReflect.Descriptor instead. +func (*FixedHeapConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescGZIP(), []int{0} +} + +func (x *FixedHeapConfig) GetMaxHeapSizeBytes() uint64 { + if x != nil { + return x.MaxHeapSizeBytes + } + return 0 +} + +var File_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto protoreflect.FileDescriptor + +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2f, + 0x76, 0x33, 0x2f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x92, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x78, 0x65, 0x64, 0x48, 0x65, 0x61, 0x70, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x65, 0x61, 0x70, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x48, + 0x65, 0x61, 0x70, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, + 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, + 0x6f, 0x72, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x48, 0x65, 0x61, 0x70, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xc0, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x48, + 0x65, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescOnce sync.Once + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData = file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc +) + +func file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescGZIP() []byte { + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescOnce.Do(func() { + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData) + }) + return file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData +} + +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_goTypes = []interface{}{ + (*FixedHeapConfig)(nil), // 0: envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig +} +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_init() } +func file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_init() { + if File_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FixedHeapConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_goTypes, + DependencyIndexes: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_depIdxs, + MessageInfos: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes, + }.Build() + File_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto = out.File + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc = nil + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_goTypes = nil + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.validate.go b/pkg/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.validate.go new file mode 100644 index 0000000000..734d392064 --- /dev/null +++ b/pkg/api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.validate.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto + +package fixed_heapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FixedHeapConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *FixedHeapConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FixedHeapConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FixedHeapConfigMultiError, or nil if none found. +func (m *FixedHeapConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FixedHeapConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMaxHeapSizeBytes() <= 0 { + err := FixedHeapConfigValidationError{ + field: "MaxHeapSizeBytes", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FixedHeapConfigMultiError(errors) + } + + return nil +} + +// FixedHeapConfigMultiError is an error wrapping multiple validation errors +// returned by FixedHeapConfig.ValidateAll() if the designated constraints +// aren't met. +type FixedHeapConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FixedHeapConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FixedHeapConfigMultiError) AllErrors() []error { return m } + +// FixedHeapConfigValidationError is the validation error returned by +// FixedHeapConfig.Validate if the designated constraints aren't met. +type FixedHeapConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FixedHeapConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FixedHeapConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FixedHeapConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FixedHeapConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FixedHeapConfigValidationError) ErrorName() string { return "FixedHeapConfigValidationError" } + +// Error satisfies the builtin error interface +func (e FixedHeapConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFixedHeapConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FixedHeapConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FixedHeapConfigValidationError{} diff --git a/pkg/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.go b/pkg/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.go new file mode 100644 index 0000000000..d80b2a2bb4 --- /dev/null +++ b/pkg/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto + +package injected_resourcev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The injected resource monitor allows injecting a synthetic resource pressure into Envoy +// via a text file, which must contain a floating-point number in the range [0..1] representing +// the resource pressure and be updated atomically by a symbolic link swap. +// This is intended primarily for integration tests to force Envoy into an overloaded state. +type InjectedResourceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` +} + +func (x *InjectedResourceConfig) Reset() { + *x = InjectedResourceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InjectedResourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InjectedResourceConfig) ProtoMessage() {} + +func (x *InjectedResourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InjectedResourceConfig.ProtoReflect.Descriptor instead. +func (*InjectedResourceConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescGZIP(), []int{0} +} + +func (x *InjectedResourceConfig) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +var File_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto protoreflect.FileDescriptor + +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc = []byte{ + 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x16, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x23, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x55, 0x9a, 0xc5, 0x88, 0x1e, 0x50, 0x0a, 0x4e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xdc, 0x01, 0x0a, + 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x73, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x72, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescOnce sync.Once + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData = file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc +) + +func file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescGZIP() []byte { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescOnce.Do(func() { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData) + }) + return file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData +} + +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_goTypes = []interface{}{ + (*InjectedResourceConfig)(nil), // 0: envoy.extensions.resource_monitors.injected_resource.v3.InjectedResourceConfig +} +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_init() +} +func file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_init() { + if File_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InjectedResourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_goTypes, + DependencyIndexes: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_depIdxs, + MessageInfos: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes, + }.Build() + File_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto = out.File + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc = nil + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_goTypes = nil + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.validate.go b/pkg/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.validate.go new file mode 100644 index 0000000000..7bd4ba901d --- /dev/null +++ b/pkg/api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.validate.go @@ -0,0 +1,149 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto + +package injected_resourcev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on InjectedResourceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *InjectedResourceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InjectedResourceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// InjectedResourceConfigMultiError, or nil if none found. +func (m *InjectedResourceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *InjectedResourceConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetFilename()) < 1 { + err := InjectedResourceConfigValidationError{ + field: "Filename", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return InjectedResourceConfigMultiError(errors) + } + + return nil +} + +// InjectedResourceConfigMultiError is an error wrapping multiple validation +// errors returned by InjectedResourceConfig.ValidateAll() if the designated +// constraints aren't met. +type InjectedResourceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InjectedResourceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InjectedResourceConfigMultiError) AllErrors() []error { return m } + +// InjectedResourceConfigValidationError is the validation error returned by +// InjectedResourceConfig.Validate if the designated constraints aren't met. +type InjectedResourceConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InjectedResourceConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InjectedResourceConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InjectedResourceConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InjectedResourceConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InjectedResourceConfigValidationError) ErrorName() string { + return "InjectedResourceConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e InjectedResourceConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInjectedResourceConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InjectedResourceConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InjectedResourceConfigValidationError{} diff --git a/pkg/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.go b/pkg/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.go new file mode 100644 index 0000000000..78d2f51a60 --- /dev/null +++ b/pkg/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.go @@ -0,0 +1,160 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto + +package omit_canary_hostsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OmitCanaryHostsPredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OmitCanaryHostsPredicate) Reset() { + *x = OmitCanaryHostsPredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OmitCanaryHostsPredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OmitCanaryHostsPredicate) ProtoMessage() {} + +func (x *OmitCanaryHostsPredicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OmitCanaryHostsPredicate.ProtoReflect.Descriptor instead. +func (*OmitCanaryHostsPredicate) Descriptor() ([]byte, []int) { + return file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto protoreflect.FileDescriptor + +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x6f, 0x6d, + 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, + 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, + 0x0a, 0x18, 0x4f, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, + 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, + 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, + 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6d, 0x69, 0x74, 0x43, + 0x61, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x42, 0xcd, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x4f, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x61, + 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, + 0x73, 0x74, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, + 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescOnce sync.Once + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData = file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc +) + +func file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescGZIP() []byte { + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescOnce.Do(func() { + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData) + }) + return file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData +} + +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_goTypes = []interface{}{ + (*OmitCanaryHostsPredicate)(nil), // 0: envoy.extensions.retry.host.omit_canary_hosts.v3.OmitCanaryHostsPredicate +} +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_init() } +func file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_init() { + if File_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OmitCanaryHostsPredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_goTypes, + DependencyIndexes: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_depIdxs, + MessageInfos: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes, + }.Build() + File_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto = out.File + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc = nil + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_goTypes = nil + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.validate.go b/pkg/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.validate.go new file mode 100644 index 0000000000..22253d6e2e --- /dev/null +++ b/pkg/api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto + +package omit_canary_hostsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OmitCanaryHostsPredicate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *OmitCanaryHostsPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OmitCanaryHostsPredicate with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OmitCanaryHostsPredicateMultiError, or nil if none found. +func (m *OmitCanaryHostsPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *OmitCanaryHostsPredicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return OmitCanaryHostsPredicateMultiError(errors) + } + + return nil +} + +// OmitCanaryHostsPredicateMultiError is an error wrapping multiple validation +// errors returned by OmitCanaryHostsPredicate.ValidateAll() if the designated +// constraints aren't met. +type OmitCanaryHostsPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OmitCanaryHostsPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OmitCanaryHostsPredicateMultiError) AllErrors() []error { return m } + +// OmitCanaryHostsPredicateValidationError is the validation error returned by +// OmitCanaryHostsPredicate.Validate if the designated constraints aren't met. +type OmitCanaryHostsPredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OmitCanaryHostsPredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OmitCanaryHostsPredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OmitCanaryHostsPredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OmitCanaryHostsPredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OmitCanaryHostsPredicateValidationError) ErrorName() string { + return "OmitCanaryHostsPredicateValidationError" +} + +// Error satisfies the builtin error interface +func (e OmitCanaryHostsPredicateValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOmitCanaryHostsPredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OmitCanaryHostsPredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OmitCanaryHostsPredicateValidationError{} diff --git a/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.go b/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.go index 2d224432d5..cad55bb751 100644 --- a/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.go +++ b/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto -package envoy_extensions_retry_host_omit_host_metadata_v3 +package omit_host_metadatav3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A retry host predicate that can be used to reject a host based on // predefined metadata match criteria. // [#extension: envoy.retry_host_predicates.omit_host_metadata] @@ -109,13 +104,20 @@ var file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_co 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6d, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x68, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, - 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x1b, 0x4f, 0x6d, 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x66, 0x69, 0x67, 0x42, 0xd7, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x1b, 0x4f, 0x6d, 0x69, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.validate.go b/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.validate.go index e500f3b817..1130fb777e 100644 --- a/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.validate.go +++ b/pkg/api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto -package envoy_extensions_retry_host_omit_host_metadata_v3 +package omit_host_metadatav3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on OmitHostMetadataConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *OmitHostMetadataConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OmitHostMetadataConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// OmitHostMetadataConfigMultiError, or nil if none found. +func (m *OmitHostMetadataConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OmitHostMetadataConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OmitHostMetadataConfigValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OmitHostMetadataConfigValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OmitHostMetadataConfigValidationError{ field: "MetadataMatch", @@ -51,9 +86,30 @@ func (m *OmitHostMetadataConfig) Validate() error { } } + if len(errors) > 0 { + return OmitHostMetadataConfigMultiError(errors) + } + return nil } +// OmitHostMetadataConfigMultiError is an error wrapping multiple validation +// errors returned by OmitHostMetadataConfig.ValidateAll() if the designated +// constraints aren't met. +type OmitHostMetadataConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OmitHostMetadataConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OmitHostMetadataConfigMultiError) AllErrors() []error { return m } + // OmitHostMetadataConfigValidationError is the validation error returned by // OmitHostMetadataConfig.Validate if the designated constraints aren't met. type OmitHostMetadataConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.go b/pkg/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.go new file mode 100644 index 0000000000..ed82435107 --- /dev/null +++ b/pkg/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto + +package previous_hostsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PreviousHostsPredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PreviousHostsPredicate) Reset() { + *x = PreviousHostsPredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreviousHostsPredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreviousHostsPredicate) ProtoMessage() {} + +func (x *PreviousHostsPredicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreviousHostsPredicate.ProtoReflect.Descriptor instead. +func (*PreviousHostsPredicate) Descriptor() ([]byte, []int) { + return file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto protoreflect.FileDescriptor + +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc = []byte{ + 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x2f, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x16, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a, + 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x42, 0xc2, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x6f, 0x73, + 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x65, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescOnce sync.Once + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData = file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc +) + +func file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescGZIP() []byte { + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescOnce.Do(func() { + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData) + }) + return file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData +} + +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_goTypes = []interface{}{ + (*PreviousHostsPredicate)(nil), // 0: envoy.extensions.retry.host.previous_hosts.v3.PreviousHostsPredicate +} +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_init() } +func file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_init() { + if File_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreviousHostsPredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_goTypes, + DependencyIndexes: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_depIdxs, + MessageInfos: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes, + }.Build() + File_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto = out.File + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc = nil + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_goTypes = nil + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.validate.go b/pkg/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.validate.go new file mode 100644 index 0000000000..6207512ae4 --- /dev/null +++ b/pkg/api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto + +package previous_hostsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PreviousHostsPredicate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *PreviousHostsPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousHostsPredicate with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PreviousHostsPredicateMultiError, or nil if none found. +func (m *PreviousHostsPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousHostsPredicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return PreviousHostsPredicateMultiError(errors) + } + + return nil +} + +// PreviousHostsPredicateMultiError is an error wrapping multiple validation +// errors returned by PreviousHostsPredicate.ValidateAll() if the designated +// constraints aren't met. +type PreviousHostsPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousHostsPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousHostsPredicateMultiError) AllErrors() []error { return m } + +// PreviousHostsPredicateValidationError is the validation error returned by +// PreviousHostsPredicate.Validate if the designated constraints aren't met. +type PreviousHostsPredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PreviousHostsPredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PreviousHostsPredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PreviousHostsPredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PreviousHostsPredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PreviousHostsPredicateValidationError) ErrorName() string { + return "PreviousHostsPredicateValidationError" +} + +// Error satisfies the builtin error interface +func (e PreviousHostsPredicateValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPreviousHostsPredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PreviousHostsPredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PreviousHostsPredicateValidationError{} diff --git a/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.go b/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.go index 1760d393f9..958c428a35 100644 --- a/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.go +++ b/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto -package envoy_extensions_retry_priority_previous_priorities_v3 +package previous_prioritiesv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A retry host selector that attempts to spread retries between priorities, even if certain // priorities would not normally be attempted due to higher priorities being available. // @@ -137,14 +132,22 @@ var file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorit 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x6f, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1d, 0x50, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xe4, 0x01, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1d, + 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.validate.go b/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.validate.go index 9a25a2f880..7cd8c26257 100644 --- a/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.validate.go +++ b/pkg/api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto -package envoy_extensions_retry_priority_previous_priorities_v3 +package previous_prioritiesv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,27 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on PreviousPrioritiesConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *PreviousPrioritiesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousPrioritiesConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PreviousPrioritiesConfigMultiError, or nil if none found. +func (m *PreviousPrioritiesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousPrioritiesConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetUpdateFrequency() <= 0 { - return PreviousPrioritiesConfigValidationError{ + err := PreviousPrioritiesConfigValidationError{ field: "UpdateFrequency", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PreviousPrioritiesConfigMultiError(errors) } return nil } +// PreviousPrioritiesConfigMultiError is an error wrapping multiple validation +// errors returned by PreviousPrioritiesConfig.ValidateAll() if the designated +// constraints aren't met. +type PreviousPrioritiesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousPrioritiesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousPrioritiesConfigMultiError) AllErrors() []error { return m } + // PreviousPrioritiesConfigValidationError is the validation error returned by // PreviousPrioritiesConfig.Validate if the designated constraints aren't met. type PreviousPrioritiesConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.go b/pkg/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.go new file mode 100644 index 0000000000..7552f71114 --- /dev/null +++ b/pkg/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.go @@ -0,0 +1,235 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto + +package graphite_statsdv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GraphiteStatsdSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to StatsdSpecifier: + // *GraphiteStatsdSink_Address + StatsdSpecifier isGraphiteStatsdSink_StatsdSpecifier `protobuf_oneof:"statsd_specifier"` + // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field + // ` for more details. + Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` + // Optional max datagram size to use when sending UDP messages. By default Envoy + // will emit one metric per datagram. By specifying a max-size larger than a single + // metric, Envoy will emit multiple, new-line separated metrics. The max datagram + // size should not exceed your network's MTU. + // + // Note that this value may not be respected if smaller than a single metric. + MaxBytesPerDatagram *wrappers.UInt64Value `protobuf:"bytes,4,opt,name=max_bytes_per_datagram,json=maxBytesPerDatagram,proto3" json:"max_bytes_per_datagram,omitempty"` +} + +func (x *GraphiteStatsdSink) Reset() { + *x = GraphiteStatsdSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GraphiteStatsdSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphiteStatsdSink) ProtoMessage() {} + +func (x *GraphiteStatsdSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphiteStatsdSink.ProtoReflect.Descriptor instead. +func (*GraphiteStatsdSink) Descriptor() ([]byte, []int) { + return file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescGZIP(), []int{0} +} + +func (m *GraphiteStatsdSink) GetStatsdSpecifier() isGraphiteStatsdSink_StatsdSpecifier { + if m != nil { + return m.StatsdSpecifier + } + return nil +} + +func (x *GraphiteStatsdSink) GetAddress() *v3.Address { + if x, ok := x.GetStatsdSpecifier().(*GraphiteStatsdSink_Address); ok { + return x.Address + } + return nil +} + +func (x *GraphiteStatsdSink) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +func (x *GraphiteStatsdSink) GetMaxBytesPerDatagram() *wrappers.UInt64Value { + if x != nil { + return x.MaxBytesPerDatagram + } + return nil +} + +type isGraphiteStatsdSink_StatsdSpecifier interface { + isGraphiteStatsdSink_StatsdSpecifier() +} + +type GraphiteStatsdSink_Address struct { + // The UDP address of a running Graphite-compliant listener. If specified, + // statistics will be flushed to this address. + Address *v3.Address `protobuf:"bytes,1,opt,name=address,proto3,oneof"` +} + +func (*GraphiteStatsdSink_Address) isGraphiteStatsdSink_StatsdSpecifier() {} + +var File_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto protoreflect.FileDescriptor + +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x2f, 0x76, 0x33, + 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, + 0x6e, 0x6b, 0x73, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x12, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x5a, 0x0a, 0x16, + 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, + 0x02, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x17, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x42, 0xc6, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x2e, + 0x76, 0x33, 0x42, 0x13, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x2f, 0x76, 0x33, + 0x3b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescOnce sync.Once + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData = file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc +) + +func file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescGZIP() []byte { + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescOnce.Do(func() { + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData) + }) + return file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData +} + +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_goTypes = []interface{}{ + (*GraphiteStatsdSink)(nil), // 0: envoy.extensions.stat_sinks.graphite_statsd.v3.GraphiteStatsdSink + (*v3.Address)(nil), // 1: envoy.config.core.v3.Address + (*wrappers.UInt64Value)(nil), // 2: google.protobuf.UInt64Value +} +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.stat_sinks.graphite_statsd.v3.GraphiteStatsdSink.address:type_name -> envoy.config.core.v3.Address + 2, // 1: envoy.extensions.stat_sinks.graphite_statsd.v3.GraphiteStatsdSink.max_bytes_per_datagram:type_name -> google.protobuf.UInt64Value + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_init() } +func file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_init() { + if File_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GraphiteStatsdSink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*GraphiteStatsdSink_Address)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_goTypes, + DependencyIndexes: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_depIdxs, + MessageInfos: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes, + }.Build() + File_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto = out.File + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc = nil + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_goTypes = nil + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.validate.go b/pkg/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.validate.go new file mode 100644 index 0000000000..88ee31a2e9 --- /dev/null +++ b/pkg/api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.validate.go @@ -0,0 +1,200 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto + +package graphite_statsdv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GraphiteStatsdSink with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GraphiteStatsdSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GraphiteStatsdSink with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GraphiteStatsdSinkMultiError, or nil if none found. +func (m *GraphiteStatsdSink) ValidateAll() error { + return m.validate(true) +} + +func (m *GraphiteStatsdSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Prefix + + if wrapper := m.GetMaxBytesPerDatagram(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := GraphiteStatsdSinkValidationError{ + field: "MaxBytesPerDatagram", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + switch m.StatsdSpecifier.(type) { + + case *GraphiteStatsdSink_Address: + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GraphiteStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GraphiteStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GraphiteStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := GraphiteStatsdSinkValidationError{ + field: "StatsdSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return GraphiteStatsdSinkMultiError(errors) + } + + return nil +} + +// GraphiteStatsdSinkMultiError is an error wrapping multiple validation errors +// returned by GraphiteStatsdSink.ValidateAll() if the designated constraints +// aren't met. +type GraphiteStatsdSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GraphiteStatsdSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GraphiteStatsdSinkMultiError) AllErrors() []error { return m } + +// GraphiteStatsdSinkValidationError is the validation error returned by +// GraphiteStatsdSink.Validate if the designated constraints aren't met. +type GraphiteStatsdSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GraphiteStatsdSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GraphiteStatsdSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GraphiteStatsdSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GraphiteStatsdSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GraphiteStatsdSinkValidationError) ErrorName() string { + return "GraphiteStatsdSinkValidationError" +} + +// Error satisfies the builtin error interface +func (e GraphiteStatsdSinkValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGraphiteStatsdSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GraphiteStatsdSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GraphiteStatsdSinkValidationError{} diff --git a/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.go b/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.go index 92cee593f7..6fa012fb42 100644 --- a/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.go +++ b/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/stat_sinks/wasm/v3/wasm.proto -package envoy_extensions_stat_sinks_wasm_v3 +package wasmv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/wasm/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Wasm struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -88,20 +82,22 @@ var file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDesc = []byte{ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x04, 0x57, 0x61, 0x73, 0x6d, 0x12, 0x3e, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x48, 0x0a, - 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, - 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x04, 0x57, 0x61, 0x73, + 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x9b, 0x01, 0x0a, 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2e, + 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, + 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.validate.go b/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.validate.go index ec3fc9cec0..2a6f541571 100644 --- a/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.validate.go +++ b/pkg/api/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/stat_sinks/wasm/v3/wasm.proto -package envoy_extensions_stat_sinks_wasm_v3 +package wasmv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,51 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Wasm with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Wasm) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Wasm with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in WasmMultiError, or nil if none found. +func (m *Wasm) ValidateAll() error { + return m.validate(true) +} + +func (m *Wasm) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WasmValidationError{ field: "Config", @@ -50,9 +85,29 @@ func (m *Wasm) Validate() error { } } + if len(errors) > 0 { + return WasmMultiError(errors) + } + return nil } +// WasmMultiError is an error wrapping multiple validation errors returned by +// Wasm.ValidateAll() if the designated constraints aren't met. +type WasmMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmMultiError) AllErrors() []error { return m } + // WasmValidationError is the validation error returned by Wasm.Validate if the // designated constraints aren't met. type WasmValidationError struct { diff --git a/pkg/api/envoy/extensions/tracers/datadog/v4alpha/datadog.pb.go b/pkg/api/envoy/extensions/tracers/datadog/v4alpha/datadog.pb.go deleted file mode 100644 index 2ced6a25b5..0000000000 --- a/pkg/api/envoy/extensions/tracers/datadog/v4alpha/datadog.pb.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/tracers/datadog/v4alpha/datadog.proto - -package envoy_extensions_tracers_datadog_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for the Datadog tracer. -// [#extension: envoy.tracers.datadog] -type DatadogConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The cluster to use for submitting traces to the Datadog agent. - CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` - // The name used for the service when traces are generated by envoy. - ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` -} - -func (x *DatadogConfig) Reset() { - *x = DatadogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DatadogConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DatadogConfig) ProtoMessage() {} - -func (x *DatadogConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DatadogConfig.ProtoReflect.Descriptor instead. -func (*DatadogConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescGZIP(), []int{0} -} - -func (x *DatadogConfig) GetCollectorCluster() string { - if x != nil { - return x.CollectorCluster - } - return "" -} - -func (x *DatadogConfig) GetServiceName() string { - if x != nil { - return x.ServiceName - } - return "" -} - -var File_envoy_extensions_tracers_datadog_v4alpha_datadog_proto protoreflect.FileDescriptor - -var file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDesc = []byte{ - 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x64, - 0x6f, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x64, - 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x72, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01, - 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x34, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x50, 0x0a, - 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescOnce sync.Once - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescData = file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDesc -) - -func file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescGZIP() []byte { - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescOnce.Do(func() { - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescData) - }) - return file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDescData -} - -var file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_goTypes = []interface{}{ - (*DatadogConfig)(nil), // 0: envoy.extensions.tracers.datadog.v4alpha.DatadogConfig -} -var file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_init() } -func file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_init() { - if File_envoy_extensions_tracers_datadog_v4alpha_datadog_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatadogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_goTypes, - DependencyIndexes: file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_depIdxs, - MessageInfos: file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_msgTypes, - }.Build() - File_envoy_extensions_tracers_datadog_v4alpha_datadog_proto = out.File - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_rawDesc = nil - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_goTypes = nil - file_envoy_extensions_tracers_datadog_v4alpha_datadog_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/tracers/datadog/v4alpha/datadog.pb.validate.go b/pkg/api/envoy/extensions/tracers/datadog/v4alpha/datadog.pb.validate.go deleted file mode 100644 index c0d999585a..0000000000 --- a/pkg/api/envoy/extensions/tracers/datadog/v4alpha/datadog.pb.validate.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/tracers/datadog/v4alpha/datadog.proto - -package envoy_extensions_tracers_datadog_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetCollectorCluster()) < 1 { - return DatadogConfigValidationError{ - field: "CollectorCluster", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetServiceName()) < 1 { - return DatadogConfigValidationError{ - field: "ServiceName", - reason: "value length must be at least 1 runes", - } - } - - 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{} diff --git a/pkg/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.pb.go b/pkg/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.pb.go deleted file mode 100644 index 762a5db5f0..0000000000 --- a/pkg/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.pb.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto - -package envoy_extensions_tracers_dynamic_ot_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// DynamicOtConfig is used to dynamically load a tracer from a shared library -// that implements the `OpenTracing dynamic loading API -// `_. -// [#extension: envoy.tracers.dynamic_ot] -type DynamicOtConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Dynamic library implementing the `OpenTracing API - // `_. - Library string `protobuf:"bytes,1,opt,name=library,proto3" json:"library,omitempty"` - // The configuration to use when creating a tracer from the given dynamic - // library. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *DynamicOtConfig) Reset() { - *x = DynamicOtConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicOtConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicOtConfig) ProtoMessage() {} - -func (x *DynamicOtConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicOtConfig.ProtoReflect.Descriptor instead. -func (*DynamicOtConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescGZIP(), []int{0} -} - -func (x *DynamicOtConfig) GetLibrary() string { - if x != nil { - return x.Library - } - return "" -} - -func (x *DynamicOtConfig) GetConfig() *_struct.Struct { - if x != nil { - return x.Config - } - return nil -} - -var File_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto protoreflect.FileDescriptor - -var file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDesc = []byte{ - 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x5f, 0x6f, 0x74, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x64, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x5f, 0x6f, 0x74, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x4f, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x07, 0x6c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x07, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2c, 0x9a, 0xc5, - 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x4f, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x55, 0x0a, 0x39, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x72, 0x73, 0x2e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6f, 0x74, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x4f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescOnce sync.Once - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescData = file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDesc -) - -func file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescGZIP() []byte { - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescOnce.Do(func() { - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescData) - }) - return file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDescData -} - -var file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_goTypes = []interface{}{ - (*DynamicOtConfig)(nil), // 0: envoy.extensions.tracers.dynamic_ot.v4alpha.DynamicOtConfig - (*_struct.Struct)(nil), // 1: google.protobuf.Struct -} -var file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.tracers.dynamic_ot.v4alpha.DynamicOtConfig.config:type_name -> google.protobuf.Struct - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_init() } -func file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_init() { - if File_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicOtConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_goTypes, - DependencyIndexes: file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_depIdxs, - MessageInfos: file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_msgTypes, - }.Build() - File_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto = out.File - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_rawDesc = nil - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_goTypes = nil - file_envoy_extensions_tracers_dynamic_ot_v4alpha_dynamic_ot_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.pb.validate.go b/pkg/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.pb.validate.go deleted file mode 100644 index 8dc7cfe3d8..0000000000 --- a/pkg/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.pb.validate.go +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto - -package envoy_extensions_tracers_dynamic_ot_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetLibrary()) < 1 { - return DynamicOtConfigValidationError{ - field: "Library", - reason: "value length must be at least 1 runes", - } - } - - 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{} diff --git a/pkg/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.pb.go b/pkg/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.pb.go deleted file mode 100644 index 67926bd222..0000000000 --- a/pkg/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.pb.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto - -package envoy_extensions_tracers_lightstep_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Available propagation modes -type LightstepConfig_PropagationMode int32 - -const ( - // Propagate trace context in the single header x-ot-span-context. - LightstepConfig_ENVOY LightstepConfig_PropagationMode = 0 - // Propagate trace context using LightStep's native format. - LightstepConfig_LIGHTSTEP LightstepConfig_PropagationMode = 1 - // Propagate trace context using the b3 format. - LightstepConfig_B3 LightstepConfig_PropagationMode = 2 - // Propagation trace context using the w3 trace-context standard. - LightstepConfig_TRACE_CONTEXT LightstepConfig_PropagationMode = 3 -) - -// Enum value maps for LightstepConfig_PropagationMode. -var ( - LightstepConfig_PropagationMode_name = map[int32]string{ - 0: "ENVOY", - 1: "LIGHTSTEP", - 2: "B3", - 3: "TRACE_CONTEXT", - } - LightstepConfig_PropagationMode_value = map[string]int32{ - "ENVOY": 0, - "LIGHTSTEP": 1, - "B3": 2, - "TRACE_CONTEXT": 3, - } -) - -func (x LightstepConfig_PropagationMode) Enum() *LightstepConfig_PropagationMode { - p := new(LightstepConfig_PropagationMode) - *p = x - return p -} - -func (x LightstepConfig_PropagationMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LightstepConfig_PropagationMode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_enumTypes[0].Descriptor() -} - -func (LightstepConfig_PropagationMode) Type() protoreflect.EnumType { - return &file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_enumTypes[0] -} - -func (x LightstepConfig_PropagationMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LightstepConfig_PropagationMode.Descriptor instead. -func (LightstepConfig_PropagationMode) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescGZIP(), []int{0, 0} -} - -// Configuration for the LightStep tracer. -// [#extension: envoy.tracers.lightstep] -type LightstepConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The cluster manager cluster that hosts the LightStep collectors. - CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` - // File containing the access token to the `LightStep - // `_ API. - AccessTokenFile string `protobuf:"bytes,2,opt,name=access_token_file,json=accessTokenFile,proto3" json:"access_token_file,omitempty"` - // Propagation modes to use by LightStep's tracer. - PropagationModes []LightstepConfig_PropagationMode `protobuf:"varint,3,rep,packed,name=propagation_modes,json=propagationModes,proto3,enum=envoy.extensions.tracers.lightstep.v4alpha.LightstepConfig_PropagationMode" json:"propagation_modes,omitempty"` -} - -func (x *LightstepConfig) Reset() { - *x = LightstepConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LightstepConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LightstepConfig) ProtoMessage() {} - -func (x *LightstepConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LightstepConfig.ProtoReflect.Descriptor instead. -func (*LightstepConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescGZIP(), []int{0} -} - -func (x *LightstepConfig) GetCollectorCluster() string { - if x != nil { - return x.CollectorCluster - } - return "" -} - -func (x *LightstepConfig) GetAccessTokenFile() string { - if x != nil { - return x.AccessTokenFile - } - return "" -} - -func (x *LightstepConfig) GetPropagationModes() []LightstepConfig_PropagationMode { - if x != nil { - return x.PropagationModes - } - return nil -} - -var File_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto protoreflect.FileDescriptor - -var file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x73, 0x74, 0x65, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6c, 0x69, 0x67, - 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x02, 0x0a, 0x0f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, - 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, - 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x69, - 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x4b, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, - 0x74, 0x65, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x67, 0x68, - 0x74, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, - 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x0d, 0xfa, 0x42, 0x0a, - 0x92, 0x01, 0x07, 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70, - 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x0f, - 0x50, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x09, 0x0a, 0x05, 0x45, 0x4e, 0x56, 0x4f, 0x59, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x49, - 0x47, 0x48, 0x54, 0x53, 0x54, 0x45, 0x50, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x42, 0x33, 0x10, - 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, - 0x58, 0x54, 0x10, 0x03, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x54, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x67, - 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, - 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, 0x65, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescOnce sync.Once - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescData = file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDesc -) - -func file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescGZIP() []byte { - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescOnce.Do(func() { - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescData) - }) - return file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDescData -} - -var file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_goTypes = []interface{}{ - (LightstepConfig_PropagationMode)(0), // 0: envoy.extensions.tracers.lightstep.v4alpha.LightstepConfig.PropagationMode - (*LightstepConfig)(nil), // 1: envoy.extensions.tracers.lightstep.v4alpha.LightstepConfig -} -var file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_depIdxs = []int32{ - 0, // 0: envoy.extensions.tracers.lightstep.v4alpha.LightstepConfig.propagation_modes:type_name -> envoy.extensions.tracers.lightstep.v4alpha.LightstepConfig.PropagationMode - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_init() } -func file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_init() { - if File_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LightstepConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_goTypes, - DependencyIndexes: file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_depIdxs, - EnumInfos: file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_enumTypes, - MessageInfos: file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_msgTypes, - }.Build() - File_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto = out.File - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_rawDesc = nil - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_goTypes = nil - file_envoy_extensions_tracers_lightstep_v4alpha_lightstep_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.pb.validate.go b/pkg/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.pb.validate.go deleted file mode 100644 index 4f5aae4a6b..0000000000 --- a/pkg/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.pb.validate.go +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto - -package envoy_extensions_tracers_lightstep_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetCollectorCluster()) < 1 { - return LightstepConfigValidationError{ - field: "CollectorCluster", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetAccessTokenFile()) < 1 { - return LightstepConfigValidationError{ - field: "AccessTokenFile", - reason: "value length must be at least 1 runes", - } - } - - 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{} diff --git a/pkg/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.pb.go b/pkg/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.pb.go deleted file mode 100644 index 39df6b38e5..0000000000 --- a/pkg/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.pb.go +++ /dev/null @@ -1,449 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto - -package envoy_extensions_tracers_opencensus_v4alpha - -import ( - v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type OpenCensusConfig_TraceContext int32 - -const ( - // No-op default, no trace context is utilized. - OpenCensusConfig_NONE OpenCensusConfig_TraceContext = 0 - // W3C Trace-Context format "traceparent:" header. - OpenCensusConfig_TRACE_CONTEXT OpenCensusConfig_TraceContext = 1 - // Binary "grpc-trace-bin:" header. - OpenCensusConfig_GRPC_TRACE_BIN OpenCensusConfig_TraceContext = 2 - // "X-Cloud-Trace-Context:" header. - OpenCensusConfig_CLOUD_TRACE_CONTEXT OpenCensusConfig_TraceContext = 3 - // X-B3-* headers. - OpenCensusConfig_B3 OpenCensusConfig_TraceContext = 4 -) - -// Enum value maps for OpenCensusConfig_TraceContext. -var ( - OpenCensusConfig_TraceContext_name = map[int32]string{ - 0: "NONE", - 1: "TRACE_CONTEXT", - 2: "GRPC_TRACE_BIN", - 3: "CLOUD_TRACE_CONTEXT", - 4: "B3", - } - 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) Enum() *OpenCensusConfig_TraceContext { - p := new(OpenCensusConfig_TraceContext) - *p = x - return p -} - -func (x OpenCensusConfig_TraceContext) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (OpenCensusConfig_TraceContext) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_enumTypes[0].Descriptor() -} - -func (OpenCensusConfig_TraceContext) Type() protoreflect.EnumType { - return &file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_enumTypes[0] -} - -func (x OpenCensusConfig_TraceContext) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OpenCensusConfig_TraceContext.Descriptor instead. -func (OpenCensusConfig_TraceContext) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescGZIP(), []int{0, 0} -} - -// Configuration for the OpenCensus tracer. -// [#next-free-field: 15] -// [#extension: envoy.tracers.opencensus] -type OpenCensusConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configures tracing, e.g. the sampler, max number of annotations, etc. - TraceConfig *v1.TraceConfig `protobuf:"bytes,1,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` - // Enables the stdout exporter if set to true. This is intended for debugging - // purposes. - StdoutExporterEnabled bool `protobuf:"varint,2,opt,name=stdout_exporter_enabled,json=stdoutExporterEnabled,proto3" json:"stdout_exporter_enabled,omitempty"` - // Enables the Stackdriver exporter if set to true. The project_id must also - // be set. - StackdriverExporterEnabled bool `protobuf:"varint,3,opt,name=stackdriver_exporter_enabled,json=stackdriverExporterEnabled,proto3" json:"stackdriver_exporter_enabled,omitempty"` - // The Cloud project_id to use for Stackdriver tracing. - StackdriverProjectId string `protobuf:"bytes,4,opt,name=stackdriver_project_id,json=stackdriverProjectId,proto3" json:"stackdriver_project_id,omitempty"` - // (optional) By default, the Stackdriver exporter will connect to production - // Stackdriver. If stackdriver_address is non-empty, it will instead connect - // to this address, which is in the gRPC format: - // https://github.com/grpc/grpc/blob/master/doc/naming.md - StackdriverAddress string `protobuf:"bytes,10,opt,name=stackdriver_address,json=stackdriverAddress,proto3" json:"stackdriver_address,omitempty"` - // (optional) The gRPC server that hosts Stackdriver tracing service. Only - // Google gRPC is supported. If :ref:`target_uri ` - // is not provided, the default production Stackdriver address will be used. - StackdriverGrpcService *v4alpha.GrpcService `protobuf:"bytes,13,opt,name=stackdriver_grpc_service,json=stackdriverGrpcService,proto3" json:"stackdriver_grpc_service,omitempty"` - // Enables the Zipkin exporter if set to true. The url and service name must - // also be set. This is deprecated, prefer to use Envoy's :ref:`native Zipkin - // tracer `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedZipkinExporterEnabled bool `protobuf:"varint,5,opt,name=hidden_envoy_deprecated_zipkin_exporter_enabled,json=hiddenEnvoyDeprecatedZipkinExporterEnabled,proto3" json:"hidden_envoy_deprecated_zipkin_exporter_enabled,omitempty"` - // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans". This is - // deprecated, prefer to use Envoy's :ref:`native Zipkin tracer - // `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedZipkinUrl string `protobuf:"bytes,6,opt,name=hidden_envoy_deprecated_zipkin_url,json=hiddenEnvoyDeprecatedZipkinUrl,proto3" json:"hidden_envoy_deprecated_zipkin_url,omitempty"` - // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or - // ocagent_grpc_service must also be set. - OcagentExporterEnabled bool `protobuf:"varint,11,opt,name=ocagent_exporter_enabled,json=ocagentExporterEnabled,proto3" json:"ocagent_exporter_enabled,omitempty"` - // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC - // format: https://github.com/grpc/grpc/blob/master/doc/naming.md - // [#comment:TODO: deprecate this field] - OcagentAddress string `protobuf:"bytes,12,opt,name=ocagent_address,json=ocagentAddress,proto3" json:"ocagent_address,omitempty"` - // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported. - // This is only used if the ocagent_address is left empty. - OcagentGrpcService *v4alpha.GrpcService `protobuf:"bytes,14,opt,name=ocagent_grpc_service,json=ocagentGrpcService,proto3" json:"ocagent_grpc_service,omitempty"` - // List of incoming trace context headers we will accept. First one found - // wins. - IncomingTraceContext []OpenCensusConfig_TraceContext `protobuf:"varint,8,rep,packed,name=incoming_trace_context,json=incomingTraceContext,proto3,enum=envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig_TraceContext" json:"incoming_trace_context,omitempty"` - // List of outgoing trace context headers we will produce. - OutgoingTraceContext []OpenCensusConfig_TraceContext `protobuf:"varint,9,rep,packed,name=outgoing_trace_context,json=outgoingTraceContext,proto3,enum=envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig_TraceContext" json:"outgoing_trace_context,omitempty"` -} - -func (x *OpenCensusConfig) Reset() { - *x = OpenCensusConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenCensusConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenCensusConfig) ProtoMessage() {} - -func (x *OpenCensusConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenCensusConfig.ProtoReflect.Descriptor instead. -func (*OpenCensusConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescGZIP(), []int{0} -} - -func (x *OpenCensusConfig) GetTraceConfig() *v1.TraceConfig { - if x != nil { - return x.TraceConfig - } - return nil -} - -func (x *OpenCensusConfig) GetStdoutExporterEnabled() bool { - if x != nil { - return x.StdoutExporterEnabled - } - return false -} - -func (x *OpenCensusConfig) GetStackdriverExporterEnabled() bool { - if x != nil { - return x.StackdriverExporterEnabled - } - return false -} - -func (x *OpenCensusConfig) GetStackdriverProjectId() string { - if x != nil { - return x.StackdriverProjectId - } - return "" -} - -func (x *OpenCensusConfig) GetStackdriverAddress() string { - if x != nil { - return x.StackdriverAddress - } - return "" -} - -func (x *OpenCensusConfig) GetStackdriverGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.StackdriverGrpcService - } - return nil -} - -// Deprecated: Do not use. -func (x *OpenCensusConfig) GetHiddenEnvoyDeprecatedZipkinExporterEnabled() bool { - if x != nil { - return x.HiddenEnvoyDeprecatedZipkinExporterEnabled - } - return false -} - -// Deprecated: Do not use. -func (x *OpenCensusConfig) GetHiddenEnvoyDeprecatedZipkinUrl() string { - if x != nil { - return x.HiddenEnvoyDeprecatedZipkinUrl - } - return "" -} - -func (x *OpenCensusConfig) GetOcagentExporterEnabled() bool { - if x != nil { - return x.OcagentExporterEnabled - } - return false -} - -func (x *OpenCensusConfig) GetOcagentAddress() string { - if x != nil { - return x.OcagentAddress - } - return "" -} - -func (x *OpenCensusConfig) GetOcagentGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.OcagentGrpcService - } - return nil -} - -func (x *OpenCensusConfig) GetIncomingTraceContext() []OpenCensusConfig_TraceContext { - if x != nil { - return x.IncomingTraceContext - } - return nil -} - -func (x *OpenCensusConfig) GetOutgoingTraceContext() []OpenCensusConfig_TraceContext { - if x != nil { - return x.OutgoingTraceContext - } - return nil -} - -var File_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto protoreflect.FileDescriptor - -var file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDesc = []byte{ - 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2c, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x6f, 0x70, 0x65, 0x6e, 0x63, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xb3, 0x09, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x60, 0x0a, 0x18, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, - 0x65, 0x72, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x16, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x2f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x2a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x4e, - 0x0a, 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, - 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x1e, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x38, - 0x0a, 0x18, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x16, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x63, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x58, 0x0a, 0x14, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x12, 0x6f, 0x63, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x16, - 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x4a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x80, - 0x01, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x4a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x6f, 0x75, 0x74, - 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x22, 0x60, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, - 0x52, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x49, 0x4e, - 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x43, - 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x42, - 0x33, 0x10, 0x04, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x42, 0x56, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescOnce sync.Once - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescData = file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDesc -) - -func file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescGZIP() []byte { - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescOnce.Do(func() { - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescData) - }) - return file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDescData -} - -var file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_goTypes = []interface{}{ - (OpenCensusConfig_TraceContext)(0), // 0: envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.TraceContext - (*OpenCensusConfig)(nil), // 1: envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig - (*v1.TraceConfig)(nil), // 2: opencensus.proto.trace.v1.TraceConfig - (*v4alpha.GrpcService)(nil), // 3: envoy.config.core.v4alpha.GrpcService -} -var file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.trace_config:type_name -> opencensus.proto.trace.v1.TraceConfig - 3, // 1: envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.stackdriver_grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 3, // 2: envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.ocagent_grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 0, // 3: envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.incoming_trace_context:type_name -> envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.TraceContext - 0, // 4: envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.outgoing_trace_context:type_name -> envoy.extensions.tracers.opencensus.v4alpha.OpenCensusConfig.TraceContext - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_init() } -func file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_init() { - if File_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenCensusConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_goTypes, - DependencyIndexes: file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_depIdxs, - EnumInfos: file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_enumTypes, - MessageInfos: file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_msgTypes, - }.Build() - File_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto = out.File - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_rawDesc = nil - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_goTypes = nil - file_envoy_extensions_tracers_opencensus_v4alpha_opencensus_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.pb.validate.go b/pkg/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.pb.validate.go deleted file mode 100644 index a509d8798b..0000000000 --- a/pkg/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.pb.validate.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto - -package envoy_extensions_tracers_opencensus_v4alpha - -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{} -) - -// 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 HiddenEnvoyDeprecatedZipkinExporterEnabled - - // no validation rules for HiddenEnvoyDeprecatedZipkinUrl - - // 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{} diff --git a/pkg/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.pb.go b/pkg/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.pb.go deleted file mode 100644 index b97180f1bc..0000000000 --- a/pkg/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.pb.go +++ /dev/null @@ -1,350 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/tracers/skywalking/v4alpha/skywalking.proto - -package envoy_extensions_tracers_skywalking_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for the SkyWalking tracer. Please note that if SkyWalking tracer is used as the -// provider of http tracer, then -// :ref:`start_child_span ` -// in the router must be set to true to get the correct topology and tracing data. Moreover, SkyWalking -// Tracer does not support SkyWalking extension header (``sw8-x``) temporarily. -// [#extension: envoy.tracers.skywalking] -type SkyWalkingConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // SkyWalking collector service. - GrpcService *v4alpha.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` - ClientConfig *ClientConfig `protobuf:"bytes,2,opt,name=client_config,json=clientConfig,proto3" json:"client_config,omitempty"` -} - -func (x *SkyWalkingConfig) Reset() { - *x = SkyWalkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SkyWalkingConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SkyWalkingConfig) ProtoMessage() {} - -func (x *SkyWalkingConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SkyWalkingConfig.ProtoReflect.Descriptor instead. -func (*SkyWalkingConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescGZIP(), []int{0} -} - -func (x *SkyWalkingConfig) GetGrpcService() *v4alpha.GrpcService { - if x != nil { - return x.GrpcService - } - return nil -} - -func (x *SkyWalkingConfig) GetClientConfig() *ClientConfig { - if x != nil { - return x.ClientConfig - } - return nil -} - -// Client config for SkyWalking tracer. -type ClientConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Service name for SkyWalking tracer. If this field is empty, then local service cluster name - // that configured by :ref:`Bootstrap node ` - // message's :ref:`cluster ` field or command line - // option :option:`--service-cluster` will be used. If both this field and local service cluster - // name are empty, ``EnvoyProxy`` is used as the service name by default. - ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` - // Service instance name for SkyWalking tracer. If this field is empty, then local service node - // that configured by :ref:`Bootstrap node ` - // message's :ref:`id ` field or command line option - // :option:`--service-node` will be used. If both this field and local service node are empty, - // ``EnvoyProxy`` is used as the instance name by default. - InstanceName string `protobuf:"bytes,2,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` - // Authentication token config for SkyWalking. SkyWalking can use token authentication to secure - // that monitoring application data can be trusted. In current version, Token is considered as a - // simple string. - // [#comment:TODO(wbpcode): Get backend token through the SDS API.] - // - // Types that are assignable to BackendTokenSpecifier: - // *ClientConfig_BackendToken - BackendTokenSpecifier isClientConfig_BackendTokenSpecifier `protobuf_oneof:"backend_token_specifier"` - // Envoy caches the segment in memory when the SkyWalking backend service is temporarily unavailable. - // This field specifies the maximum number of segments that can be cached. If not specified, the - // default is 1024. - MaxCacheSize *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_cache_size,json=maxCacheSize,proto3" json:"max_cache_size,omitempty"` -} - -func (x *ClientConfig) Reset() { - *x = ClientConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientConfig) ProtoMessage() {} - -func (x *ClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. -func (*ClientConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescGZIP(), []int{1} -} - -func (x *ClientConfig) GetServiceName() string { - if x != nil { - return x.ServiceName - } - return "" -} - -func (x *ClientConfig) GetInstanceName() string { - if x != nil { - return x.InstanceName - } - return "" -} - -func (m *ClientConfig) GetBackendTokenSpecifier() isClientConfig_BackendTokenSpecifier { - if m != nil { - return m.BackendTokenSpecifier - } - return nil -} - -func (x *ClientConfig) GetBackendToken() string { - if x, ok := x.GetBackendTokenSpecifier().(*ClientConfig_BackendToken); ok { - return x.BackendToken - } - return "" -} - -func (x *ClientConfig) GetMaxCacheSize() *wrappers.UInt32Value { - if x != nil { - return x.MaxCacheSize - } - return nil -} - -type isClientConfig_BackendTokenSpecifier interface { - isClientConfig_BackendTokenSpecifier() -} - -type ClientConfig_BackendToken struct { - // Inline authentication token string. - BackendToken string `protobuf:"bytes,3,opt,name=backend_token,json=backendToken,proto3,oneof"` -} - -func (*ClientConfig_BackendToken) isClientConfig_BackendTokenSpecifier() {} - -var File_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto protoreflect.FileDescriptor - -var file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDesc = []byte{ - 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x6b, 0x79, 0x77, 0x61, - 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x6b, - 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2c, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x10, 0x53, 0x6b, 0x79, 0x57, 0x61, - 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x5e, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x72, 0x73, 0x2e, 0x73, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x6b, 0x79, 0x57, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0x8f, 0x02, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x42, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x63, - 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x6d, - 0x61, 0x78, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x29, 0x9a, 0xc5, 0x88, - 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x19, 0x0a, 0x17, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x42, 0x56, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x6b, 0x79, 0x77, - 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0f, - 0x53, 0x6b, 0x79, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescOnce sync.Once - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescData = file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDesc -) - -func file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescGZIP() []byte { - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescOnce.Do(func() { - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescData) - }) - return file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDescData -} - -var file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_goTypes = []interface{}{ - (*SkyWalkingConfig)(nil), // 0: envoy.extensions.tracers.skywalking.v4alpha.SkyWalkingConfig - (*ClientConfig)(nil), // 1: envoy.extensions.tracers.skywalking.v4alpha.ClientConfig - (*v4alpha.GrpcService)(nil), // 2: envoy.config.core.v4alpha.GrpcService - (*wrappers.UInt32Value)(nil), // 3: google.protobuf.UInt32Value -} -var file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.tracers.skywalking.v4alpha.SkyWalkingConfig.grpc_service:type_name -> envoy.config.core.v4alpha.GrpcService - 1, // 1: envoy.extensions.tracers.skywalking.v4alpha.SkyWalkingConfig.client_config:type_name -> envoy.extensions.tracers.skywalking.v4alpha.ClientConfig - 3, // 2: envoy.extensions.tracers.skywalking.v4alpha.ClientConfig.max_cache_size:type_name -> google.protobuf.UInt32Value - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_init() } -func file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_init() { - if File_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SkyWalkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ClientConfig_BackendToken)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_goTypes, - DependencyIndexes: file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_depIdxs, - MessageInfos: file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_msgTypes, - }.Build() - File_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto = out.File - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_rawDesc = nil - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_goTypes = nil - file_envoy_extensions_tracers_skywalking_v4alpha_skywalking_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.pb.validate.go b/pkg/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.pb.validate.go deleted file mode 100644 index fdef5ba9dd..0000000000 --- a/pkg/api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.pb.validate.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/tracers/skywalking/v4alpha/skywalking.proto - -package envoy_extensions_tracers_skywalking_v4alpha - -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{} -) - -// Validate checks the field values on SkyWalkingConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *SkyWalkingConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetGrpcService() == nil { - return SkyWalkingConfigValidationError{ - field: "GrpcService", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SkyWalkingConfigValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetClientConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SkyWalkingConfigValidationError{ - field: "ClientConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// SkyWalkingConfigValidationError is the validation error returned by -// SkyWalkingConfig.Validate if the designated constraints aren't met. -type SkyWalkingConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SkyWalkingConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SkyWalkingConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SkyWalkingConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SkyWalkingConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SkyWalkingConfigValidationError) ErrorName() string { return "SkyWalkingConfigValidationError" } - -// Error satisfies the builtin error interface -func (e SkyWalkingConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSkyWalkingConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SkyWalkingConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SkyWalkingConfigValidationError{} - -// Validate checks the field values on ClientConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ClientConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ServiceName - - // no validation rules for InstanceName - - if v, ok := interface{}(m.GetMaxCacheSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClientConfigValidationError{ - field: "MaxCacheSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.BackendTokenSpecifier.(type) { - - case *ClientConfig_BackendToken: - // no validation rules for BackendToken - - } - - return nil -} - -// ClientConfigValidationError is the validation error returned by -// ClientConfig.Validate if the designated constraints aren't met. -type ClientConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClientConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClientConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClientConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClientConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClientConfigValidationError) ErrorName() string { return "ClientConfigValidationError" } - -// Error satisfies the builtin error interface -func (e ClientConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClientConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClientConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClientConfigValidationError{} diff --git a/pkg/api/envoy/extensions/tracers/xray/v4alpha/xray.pb.go b/pkg/api/envoy/extensions/tracers/xray/v4alpha/xray.pb.go deleted file mode 100644 index 2b41d939fe..0000000000 --- a/pkg/api/envoy/extensions/tracers/xray/v4alpha/xray.pb.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/tracers/xray/v4alpha/xray.proto - -package envoy_extensions_tracers_xray_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type XRayConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The UDP endpoint of the X-Ray Daemon where the spans will be sent. - // If this value is not set, the default value of 127.0.0.1:2000 will be used. - DaemonEndpoint *v4alpha.SocketAddress `protobuf:"bytes,1,opt,name=daemon_endpoint,json=daemonEndpoint,proto3" json:"daemon_endpoint,omitempty"` - // The name of the X-Ray segment. - SegmentName string `protobuf:"bytes,2,opt,name=segment_name,json=segmentName,proto3" json:"segment_name,omitempty"` - // The location of a local custom sampling rules JSON file. - // For an example of the sampling rules see: - // `X-Ray SDK documentation - // `_ - SamplingRuleManifest *v4alpha.DataSource `protobuf:"bytes,3,opt,name=sampling_rule_manifest,json=samplingRuleManifest,proto3" json:"sampling_rule_manifest,omitempty"` - // Optional custom fields to be added to each trace segment. - // see: `X-Ray Segment Document documentation - // `__ - SegmentFields *XRayConfig_SegmentFields `protobuf:"bytes,4,opt,name=segment_fields,json=segmentFields,proto3" json:"segment_fields,omitempty"` -} - -func (x *XRayConfig) Reset() { - *x = XRayConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *XRayConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*XRayConfig) ProtoMessage() {} - -func (x *XRayConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use XRayConfig.ProtoReflect.Descriptor instead. -func (*XRayConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescGZIP(), []int{0} -} - -func (x *XRayConfig) GetDaemonEndpoint() *v4alpha.SocketAddress { - if x != nil { - return x.DaemonEndpoint - } - return nil -} - -func (x *XRayConfig) GetSegmentName() string { - if x != nil { - return x.SegmentName - } - return "" -} - -func (x *XRayConfig) GetSamplingRuleManifest() *v4alpha.DataSource { - if x != nil { - return x.SamplingRuleManifest - } - return nil -} - -func (x *XRayConfig) GetSegmentFields() *XRayConfig_SegmentFields { - if x != nil { - return x.SegmentFields - } - return nil -} - -type XRayConfig_SegmentFields struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of AWS resource, e.g. "AWS::AppMesh::Proxy". - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - // AWS resource metadata dictionary. - // See: `X-Ray Segment Document documentation `__ - Aws *_struct.Struct `protobuf:"bytes,2,opt,name=aws,proto3" json:"aws,omitempty"` -} - -func (x *XRayConfig_SegmentFields) Reset() { - *x = XRayConfig_SegmentFields{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *XRayConfig_SegmentFields) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*XRayConfig_SegmentFields) ProtoMessage() {} - -func (x *XRayConfig_SegmentFields) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use XRayConfig_SegmentFields.ProtoReflect.Descriptor instead. -func (*XRayConfig_SegmentFields) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *XRayConfig_SegmentFields) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *XRayConfig_SegmentFields) GetAws() *_struct.Struct { - if x != nil { - return x.Aws - } - return nil -} - -var File_envoy_extensions_tracers_xray_v4alpha_xray_proto protoreflect.FileDescriptor - -var file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x78, 0x72, 0x61, - 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x85, 0x04, 0x0a, 0x0a, 0x58, 0x52, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x0e, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x5b, 0x0a, 0x16, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, - 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x14, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x52, 0x75, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x0e, - 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, - 0x78, 0x72, 0x61, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x58, 0x52, 0x61, - 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x89, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x29, - 0x0a, 0x03, 0x61, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x03, 0x61, 0x77, 0x73, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, - 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x58, 0x52, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, - 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x58, - 0x52, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4a, 0x0a, 0x33, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x72, 0x73, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x09, 0x58, 0x72, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescOnce sync.Once - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescData = file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDesc -) - -func file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescGZIP() []byte { - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescOnce.Do(func() { - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescData) - }) - return file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDescData -} - -var file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_tracers_xray_v4alpha_xray_proto_goTypes = []interface{}{ - (*XRayConfig)(nil), // 0: envoy.extensions.tracers.xray.v4alpha.XRayConfig - (*XRayConfig_SegmentFields)(nil), // 1: envoy.extensions.tracers.xray.v4alpha.XRayConfig.SegmentFields - (*v4alpha.SocketAddress)(nil), // 2: envoy.config.core.v4alpha.SocketAddress - (*v4alpha.DataSource)(nil), // 3: envoy.config.core.v4alpha.DataSource - (*_struct.Struct)(nil), // 4: google.protobuf.Struct -} -var file_envoy_extensions_tracers_xray_v4alpha_xray_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.tracers.xray.v4alpha.XRayConfig.daemon_endpoint:type_name -> envoy.config.core.v4alpha.SocketAddress - 3, // 1: envoy.extensions.tracers.xray.v4alpha.XRayConfig.sampling_rule_manifest:type_name -> envoy.config.core.v4alpha.DataSource - 1, // 2: envoy.extensions.tracers.xray.v4alpha.XRayConfig.segment_fields:type_name -> envoy.extensions.tracers.xray.v4alpha.XRayConfig.SegmentFields - 4, // 3: envoy.extensions.tracers.xray.v4alpha.XRayConfig.SegmentFields.aws:type_name -> google.protobuf.Struct - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_tracers_xray_v4alpha_xray_proto_init() } -func file_envoy_extensions_tracers_xray_v4alpha_xray_proto_init() { - if File_envoy_extensions_tracers_xray_v4alpha_xray_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*XRayConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*XRayConfig_SegmentFields); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_tracers_xray_v4alpha_xray_proto_goTypes, - DependencyIndexes: file_envoy_extensions_tracers_xray_v4alpha_xray_proto_depIdxs, - MessageInfos: file_envoy_extensions_tracers_xray_v4alpha_xray_proto_msgTypes, - }.Build() - File_envoy_extensions_tracers_xray_v4alpha_xray_proto = out.File - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_rawDesc = nil - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_goTypes = nil - file_envoy_extensions_tracers_xray_v4alpha_xray_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/tracers/xray/v4alpha/xray.pb.validate.go b/pkg/api/envoy/extensions/tracers/xray/v4alpha/xray.pb.validate.go deleted file mode 100644 index fa9dc5a208..0000000000 --- a/pkg/api/envoy/extensions/tracers/xray/v4alpha/xray.pb.validate.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/tracers/xray/v4alpha/xray.proto - -package envoy_extensions_tracers_xray_v4alpha - -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{} -) - -// Validate checks the field values on XRayConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *XRayConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetDaemonEndpoint()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return XRayConfigValidationError{ - field: "DaemonEndpoint", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetSegmentName()) < 1 { - return XRayConfigValidationError{ - field: "SegmentName", - reason: "value length must be at least 1 runes", - } - } - - if v, ok := interface{}(m.GetSamplingRuleManifest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return XRayConfigValidationError{ - field: "SamplingRuleManifest", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetSegmentFields()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return XRayConfigValidationError{ - field: "SegmentFields", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// XRayConfigValidationError is the validation error returned by -// XRayConfig.Validate if the designated constraints aren't met. -type XRayConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e XRayConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e XRayConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e XRayConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e XRayConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e XRayConfigValidationError) ErrorName() string { return "XRayConfigValidationError" } - -// Error satisfies the builtin error interface -func (e XRayConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sXRayConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = XRayConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = XRayConfigValidationError{} - -// Validate checks the field values on XRayConfig_SegmentFields with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *XRayConfig_SegmentFields) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Origin - - if v, ok := interface{}(m.GetAws()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return XRayConfig_SegmentFieldsValidationError{ - field: "Aws", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// XRayConfig_SegmentFieldsValidationError is the validation error returned by -// XRayConfig_SegmentFields.Validate if the designated constraints aren't met. -type XRayConfig_SegmentFieldsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e XRayConfig_SegmentFieldsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e XRayConfig_SegmentFieldsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e XRayConfig_SegmentFieldsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e XRayConfig_SegmentFieldsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e XRayConfig_SegmentFieldsValidationError) ErrorName() string { - return "XRayConfig_SegmentFieldsValidationError" -} - -// Error satisfies the builtin error interface -func (e XRayConfig_SegmentFieldsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sXRayConfig_SegmentFields.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = XRayConfig_SegmentFieldsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = XRayConfig_SegmentFieldsValidationError{} diff --git a/pkg/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.pb.go b/pkg/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.pb.go deleted file mode 100644 index b95f9caac4..0000000000 --- a/pkg/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.pb.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto - -package envoy_extensions_tracers_zipkin_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Available Zipkin collector endpoint versions. -type ZipkinConfig_CollectorEndpointVersion int32 - -const ( - // Zipkin API v1, JSON over HTTP. - // [#comment: The default implementation of Zipkin client before this field is added was only v1 - // and the way user configure this was by not explicitly specifying the version. Consequently, - // before this is added, the corresponding Zipkin collector expected to receive v1 payload. - // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when - // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field, - // since in Zipkin realm this v1 version is considered to be not preferable anymore.] - // - // Deprecated: Do not use. - ZipkinConfig_hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE ZipkinConfig_CollectorEndpointVersion = 0 - // Zipkin API v2, JSON over HTTP. - ZipkinConfig_HTTP_JSON ZipkinConfig_CollectorEndpointVersion = 1 - // Zipkin API v2, protobuf over HTTP. - ZipkinConfig_HTTP_PROTO ZipkinConfig_CollectorEndpointVersion = 2 - // [#not-implemented-hide:] - ZipkinConfig_GRPC ZipkinConfig_CollectorEndpointVersion = 3 -) - -// Enum value maps for ZipkinConfig_CollectorEndpointVersion. -var ( - ZipkinConfig_CollectorEndpointVersion_name = map[int32]string{ - 0: "hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE", - 1: "HTTP_JSON", - 2: "HTTP_PROTO", - 3: "GRPC", - } - ZipkinConfig_CollectorEndpointVersion_value = map[string]int32{ - "hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE": 0, - "HTTP_JSON": 1, - "HTTP_PROTO": 2, - "GRPC": 3, - } -) - -func (x ZipkinConfig_CollectorEndpointVersion) Enum() *ZipkinConfig_CollectorEndpointVersion { - p := new(ZipkinConfig_CollectorEndpointVersion) - *p = x - return p -} - -func (x ZipkinConfig_CollectorEndpointVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ZipkinConfig_CollectorEndpointVersion) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_enumTypes[0].Descriptor() -} - -func (ZipkinConfig_CollectorEndpointVersion) Type() protoreflect.EnumType { - return &file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_enumTypes[0] -} - -func (x ZipkinConfig_CollectorEndpointVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ZipkinConfig_CollectorEndpointVersion.Descriptor instead. -func (ZipkinConfig_CollectorEndpointVersion) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescGZIP(), []int{0, 0} -} - -// Configuration for the Zipkin tracer. -// [#extension: envoy.tracers.zipkin] -// [#next-free-field: 7] -type ZipkinConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The cluster manager cluster that hosts the Zipkin collectors. - CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` - // The API endpoint of the Zipkin service where the spans will be sent. When - // using a standard Zipkin installation, the API endpoint is typically - // /api/v1/spans, which is the default value. - CollectorEndpoint string `protobuf:"bytes,2,opt,name=collector_endpoint,json=collectorEndpoint,proto3" json:"collector_endpoint,omitempty"` - // Determines whether a 128bit trace id will be used when creating a new - // trace instance. The default value is false, which will result in a 64 bit trace id being used. - TraceId_128Bit bool `protobuf:"varint,3,opt,name=trace_id_128bit,json=traceId128bit,proto3" json:"trace_id_128bit,omitempty"` - // Determines whether client and server spans will share the same span context. - // The default value is true. - SharedSpanContext *wrappers.BoolValue `protobuf:"bytes,4,opt,name=shared_span_context,json=sharedSpanContext,proto3" json:"shared_span_context,omitempty"` - // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be - // used. - CollectorEndpointVersion ZipkinConfig_CollectorEndpointVersion `protobuf:"varint,5,opt,name=collector_endpoint_version,json=collectorEndpointVersion,proto3,enum=envoy.extensions.tracers.zipkin.v4alpha.ZipkinConfig_CollectorEndpointVersion" json:"collector_endpoint_version,omitempty"` - // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors - // that require a specific hostname. Defaults to :ref:`collector_cluster ` above. - CollectorHostname string `protobuf:"bytes,6,opt,name=collector_hostname,json=collectorHostname,proto3" json:"collector_hostname,omitempty"` -} - -func (x *ZipkinConfig) Reset() { - *x = ZipkinConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ZipkinConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ZipkinConfig) ProtoMessage() {} - -func (x *ZipkinConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ZipkinConfig.ProtoReflect.Descriptor instead. -func (*ZipkinConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescGZIP(), []int{0} -} - -func (x *ZipkinConfig) GetCollectorCluster() string { - if x != nil { - return x.CollectorCluster - } - return "" -} - -func (x *ZipkinConfig) GetCollectorEndpoint() string { - if x != nil { - return x.CollectorEndpoint - } - return "" -} - -func (x *ZipkinConfig) GetTraceId_128Bit() bool { - if x != nil { - return x.TraceId_128Bit - } - return false -} - -func (x *ZipkinConfig) GetSharedSpanContext() *wrappers.BoolValue { - if x != nil { - return x.SharedSpanContext - } - return nil -} - -func (x *ZipkinConfig) GetCollectorEndpointVersion() ZipkinConfig_CollectorEndpointVersion { - if x != nil { - return x.CollectorEndpointVersion - } - return ZipkinConfig_hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE -} - -func (x *ZipkinConfig) GetCollectorHostname() string { - if x != nil { - return x.CollectorHostname - } - return "" -} - -var File_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto protoreflect.FileDescriptor - -var file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDesc = []byte{ - 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x7a, 0x69, 0x70, 0x6b, 0x69, - 0x6e, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, - 0x2e, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xec, 0x04, 0x0a, 0x0c, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x34, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x12, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x26, - 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x31, 0x32, 0x38, 0x62, 0x69, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, - 0x31, 0x32, 0x38, 0x62, 0x69, 0x74, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, - 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x8c, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x72, 0x73, 0x2e, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x90, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, - 0x3d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x44, 0x45, 0x50, 0x52, 0x45, 0x43, 0x41, - 0x54, 0x45, 0x44, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, - 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, - 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x54, - 0x54, 0x50, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x54, 0x54, - 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x52, 0x50, - 0x43, 0x10, 0x03, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4e, - 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x7a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescOnce sync.Once - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescData = file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDesc -) - -func file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescGZIP() []byte { - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescOnce.Do(func() { - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescData) - }) - return file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDescData -} - -var file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_goTypes = []interface{}{ - (ZipkinConfig_CollectorEndpointVersion)(0), // 0: envoy.extensions.tracers.zipkin.v4alpha.ZipkinConfig.CollectorEndpointVersion - (*ZipkinConfig)(nil), // 1: envoy.extensions.tracers.zipkin.v4alpha.ZipkinConfig - (*wrappers.BoolValue)(nil), // 2: google.protobuf.BoolValue -} -var file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.tracers.zipkin.v4alpha.ZipkinConfig.shared_span_context:type_name -> google.protobuf.BoolValue - 0, // 1: envoy.extensions.tracers.zipkin.v4alpha.ZipkinConfig.collector_endpoint_version:type_name -> envoy.extensions.tracers.zipkin.v4alpha.ZipkinConfig.CollectorEndpointVersion - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_init() } -func file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_init() { - if File_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ZipkinConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_goTypes, - DependencyIndexes: file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_depIdxs, - EnumInfos: file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_enumTypes, - MessageInfos: file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_msgTypes, - }.Build() - File_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto = out.File - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_rawDesc = nil - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_goTypes = nil - file_envoy_extensions_tracers_zipkin_v4alpha_zipkin_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.pb.validate.go b/pkg/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.pb.validate.go deleted file mode 100644 index 372c92732e..0000000000 --- a/pkg/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.pb.validate.go +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto - -package envoy_extensions_tracers_zipkin_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetCollectorCluster()) < 1 { - return ZipkinConfigValidationError{ - field: "CollectorCluster", - reason: "value length must be at least 1 runes", - } - } - - if utf8.RuneCountInString(m.GetCollectorEndpoint()) < 1 { - return ZipkinConfigValidationError{ - field: "CollectorEndpoint", - reason: "value length must be at least 1 runes", - } - } - - // 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 - - // no validation rules for CollectorHostname - - 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{} diff --git a/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.go b/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.go index 05341e77f7..14bfc2a270 100644 --- a/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/alts/v3/alts.proto -package envoy_extensions_transport_sockets_alts_v3 +package altsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,11 +22,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for ALTS transport socket. This provides Google's ALTS protocol to Envoy. +// Store the peer identity in dynamic metadata, namespace is "envoy.transport_socket.peer_information", key is "peer_identity". // https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security/ type Alts struct { state protoimpl.MessageState @@ -113,13 +109,18 @@ var file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDesc = []byte{ 0x6e, 0x74, 0x73, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, - 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6c, 0x74, 0x73, 0x42, 0x4f, 0x0a, 0x38, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x41, 0x6c, 0x74, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6c, 0x74, 0x73, 0x42, 0xa9, 0x01, 0x0a, 0x38, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x41, 0x6c, 0x74, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x61, 0x6c, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x6c, 0x74, 0x73, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.validate.go index 8f3e6d1ffc..1734209f49 100644 --- a/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/alts/v3/alts.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/alts/v3/alts.proto -package envoy_extensions_transport_sockets_alts_v3 +package altsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Alts with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Alts) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Alts with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in AltsMultiError, or nil if none found. +func (m *Alts) ValidateAll() error { + return m.validate(true) +} + +func (m *Alts) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetHandshakerService()) < 1 { - return AltsValidationError{ + err := AltsValidationError{ field: "HandshakerService", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AltsMultiError(errors) } return nil } +// AltsMultiError is an error wrapping multiple validation errors returned by +// Alts.ValidateAll() if the designated constraints aren't met. +type AltsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AltsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AltsMultiError) AllErrors() []error { return m } + // AltsValidationError is the validation error returned by Alts.Validate if the // designated constraints aren't met. type AltsValidationError struct { diff --git a/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.go b/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.go index c95304f1e7..00a7633cc2 100644 --- a/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto -package envoy_extensions_transport_sockets_proxy_protocol_v3 +package proxy_protocolv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for PROXY protocol socket type ProxyProtocolUpstreamTransport struct { state protoimpl.MessageState @@ -118,14 +113,21 @@ var file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_pro 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x42, 0x6a, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0xd8, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x76, 0x33, 0x3b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.validate.go index d13622a872..372f691dbb 100644 --- a/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto -package envoy_extensions_transport_sockets_proxy_protocol_v3 +package proxy_protocolv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ProxyProtocolUpstreamTransport with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ProxyProtocolUpstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocolUpstreamTransport with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ProxyProtocolUpstreamTransportMultiError, or nil if none found. +func (m *ProxyProtocolUpstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocolUpstreamTransport) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProxyProtocolUpstreamTransportValidationError{ field: "Config", @@ -52,13 +87,36 @@ func (m *ProxyProtocolUpstreamTransport) Validate() error { } if m.GetTransportSocket() == nil { - return ProxyProtocolUpstreamTransportValidationError{ + err := ProxyProtocolUpstreamTransportValidationError{ field: "TransportSocket", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProxyProtocolUpstreamTransportValidationError{ field: "TransportSocket", @@ -68,9 +126,30 @@ func (m *ProxyProtocolUpstreamTransport) Validate() error { } } + if len(errors) > 0 { + return ProxyProtocolUpstreamTransportMultiError(errors) + } + return nil } +// ProxyProtocolUpstreamTransportMultiError is an error wrapping multiple +// validation errors returned by ProxyProtocolUpstreamTransport.ValidateAll() +// if the designated constraints aren't met. +type ProxyProtocolUpstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocolUpstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocolUpstreamTransportMultiError) AllErrors() []error { return m } + // ProxyProtocolUpstreamTransportValidationError is the validation error // returned by ProxyProtocolUpstreamTransport.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.go b/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.go index b519f321fc..48b459bceb 100644 --- a/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.go @@ -1,16 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/quic/v3/quic_transport.proto -package envoy_extensions_transport_sockets_quic_v3 +package quicv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for Downstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. type QuicDownstreamTransport struct { state protoimpl.MessageState @@ -35,6 +31,9 @@ type QuicDownstreamTransport struct { unknownFields protoimpl.UnknownFields DownstreamTlsContext *v3.DownstreamTlsContext `protobuf:"bytes,1,opt,name=downstream_tls_context,json=downstreamTlsContext,proto3" json:"downstream_tls_context,omitempty"` + // If false, QUIC will tell TLS to reject any early data and to stop issuing 0-RTT credentials with resumption session tickets. This will prevent clients from sending 0-RTT requests. + // Default to true. + EnableEarlyData *wrappers.BoolValue `protobuf:"bytes,2,opt,name=enable_early_data,json=enableEarlyData,proto3" json:"enable_early_data,omitempty"` } func (x *QuicDownstreamTransport) Reset() { @@ -76,6 +75,13 @@ func (x *QuicDownstreamTransport) GetDownstreamTlsContext() *v3.DownstreamTlsCon return nil } +func (x *QuicDownstreamTransport) GetEnableEarlyData() *wrappers.BoolValue { + if x != nil { + return x.EnableEarlyData + } + return nil +} + // Configuration for Upstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. type QuicUpstreamTransport struct { state protoimpl.MessageState @@ -137,37 +143,47 @@ var file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDesc 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, - 0x0a, 0x17, 0x51, 0x75, 0x69, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x7f, 0x0a, 0x16, 0x64, 0x6f, 0x77, - 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x14, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x51, - 0x75, 0x69, 0x63, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x79, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x55, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x12, 0x75, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, - 0x58, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x51, 0x75, 0x69, - 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x17, 0x51, + 0x75, 0x69, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x7f, 0x0a, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x14, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, + 0x92, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x79, 0x0a, 0x14, 0x75, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x42, 0xb2, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x76, + 0x33, 0x42, 0x12, 0x51, 0x75, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x71, 0x75, 0x69, 0x63, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -188,16 +204,18 @@ var file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_goTypes (*QuicDownstreamTransport)(nil), // 0: envoy.extensions.transport_sockets.quic.v3.QuicDownstreamTransport (*QuicUpstreamTransport)(nil), // 1: envoy.extensions.transport_sockets.quic.v3.QuicUpstreamTransport (*v3.DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext - (*v3.UpstreamTlsContext)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext + (*wrappers.BoolValue)(nil), // 3: google.protobuf.BoolValue + (*v3.UpstreamTlsContext)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext } var file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_depIdxs = []int32{ 2, // 0: envoy.extensions.transport_sockets.quic.v3.QuicDownstreamTransport.downstream_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext - 3, // 1: envoy.extensions.transport_sockets.quic.v3.QuicUpstreamTransport.upstream_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 1: envoy.extensions.transport_sockets.quic.v3.QuicDownstreamTransport.enable_early_data:type_name -> google.protobuf.BoolValue + 4, // 2: envoy.extensions.transport_sockets.quic.v3.QuicUpstreamTransport.upstream_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_init() } diff --git a/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.validate.go index fc8209dc6c..3ec953d412 100644 --- a/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/quic/v3/quic_transport.proto -package envoy_extensions_transport_sockets_quic_v3 +package quicv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,25 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on QuicDownstreamTransport with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *QuicDownstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicDownstreamTransport with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QuicDownstreamTransportMultiError, or nil if none found. +func (m *QuicDownstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicDownstreamTransport) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDownstreamTlsContext() == nil { - return QuicDownstreamTransportValidationError{ + err := QuicDownstreamTransportValidationError{ field: "DownstreamTlsContext", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDownstreamTlsContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDownstreamTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "DownstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "DownstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicDownstreamTransportValidationError{ field: "DownstreamTlsContext", @@ -58,9 +97,59 @@ func (m *QuicDownstreamTransport) Validate() error { } } + if all { + switch v := interface{}(m.GetEnableEarlyData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "EnableEarlyData", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "EnableEarlyData", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnableEarlyData()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicDownstreamTransportValidationError{ + field: "EnableEarlyData", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return QuicDownstreamTransportMultiError(errors) + } + return nil } +// QuicDownstreamTransportMultiError is an error wrapping multiple validation +// errors returned by QuicDownstreamTransport.ValidateAll() if the designated +// constraints aren't met. +type QuicDownstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicDownstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicDownstreamTransportMultiError) AllErrors() []error { return m } + // QuicDownstreamTransportValidationError is the validation error returned by // QuicDownstreamTransport.Validate if the designated constraints aren't met. type QuicDownstreamTransportValidationError struct { @@ -119,20 +208,57 @@ var _ interface { // Validate checks the field values on QuicUpstreamTransport with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *QuicUpstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicUpstreamTransport with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// QuicUpstreamTransportMultiError, or nil if none found. +func (m *QuicUpstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicUpstreamTransport) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetUpstreamTlsContext() == nil { - return QuicUpstreamTransportValidationError{ + err := QuicUpstreamTransportValidationError{ field: "UpstreamTlsContext", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetUpstreamTlsContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicUpstreamTransportValidationError{ + field: "UpstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicUpstreamTransportValidationError{ + field: "UpstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuicUpstreamTransportValidationError{ field: "UpstreamTlsContext", @@ -142,9 +268,30 @@ func (m *QuicUpstreamTransport) Validate() error { } } + if len(errors) > 0 { + return QuicUpstreamTransportMultiError(errors) + } + return nil } +// QuicUpstreamTransportMultiError is an error wrapping multiple validation +// errors returned by QuicUpstreamTransport.ValidateAll() if the designated +// constraints aren't met. +type QuicUpstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicUpstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicUpstreamTransportMultiError) AllErrors() []error { return m } + // QuicUpstreamTransportValidationError is the validation error returned by // QuicUpstreamTransport.Validate if the designated constraints aren't met. type QuicUpstreamTransportValidationError struct { diff --git a/pkg/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.pb.go b/pkg/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.pb.go deleted file mode 100644 index 430552ebc1..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.pb.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.proto - -package envoy_extensions_transport_sockets_quic_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for Downstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. -type QuicDownstreamTransport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DownstreamTlsContext *v4alpha.DownstreamTlsContext `protobuf:"bytes,1,opt,name=downstream_tls_context,json=downstreamTlsContext,proto3" json:"downstream_tls_context,omitempty"` -} - -func (x *QuicDownstreamTransport) Reset() { - *x = QuicDownstreamTransport{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuicDownstreamTransport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuicDownstreamTransport) ProtoMessage() {} - -func (x *QuicDownstreamTransport) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuicDownstreamTransport.ProtoReflect.Descriptor instead. -func (*QuicDownstreamTransport) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescGZIP(), []int{0} -} - -func (x *QuicDownstreamTransport) GetDownstreamTlsContext() *v4alpha.DownstreamTlsContext { - if x != nil { - return x.DownstreamTlsContext - } - return nil -} - -// Configuration for Upstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. -type QuicUpstreamTransport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UpstreamTlsContext *v4alpha.UpstreamTlsContext `protobuf:"bytes,1,opt,name=upstream_tls_context,json=upstreamTlsContext,proto3" json:"upstream_tls_context,omitempty"` -} - -func (x *QuicUpstreamTransport) Reset() { - *x = QuicUpstreamTransport{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuicUpstreamTransport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuicUpstreamTransport) ProtoMessage() {} - -func (x *QuicUpstreamTransport) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuicUpstreamTransport.ProtoReflect.Descriptor instead. -func (*QuicUpstreamTransport) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescGZIP(), []int{1} -} - -func (x *QuicUpstreamTransport) GetUpstreamTlsContext() *v4alpha.UpstreamTlsContext { - if x != nil { - return x.UpstreamTlsContext - } - return nil -} - -var File_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto protoreflect.FileDescriptor - -var file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDesc = []byte{ - 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, 0x0a, - 0x17, 0x51, 0x75, 0x69, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x84, 0x01, 0x0a, 0x16, 0x64, 0x6f, 0x77, - 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x14, 0x64, 0x6f, 0x77, 0x6e, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x3a, - 0x49, 0x9a, 0xc5, 0x88, 0x1e, 0x44, 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, - 0x76, 0x33, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xe0, 0x01, 0x0a, 0x15, 0x51, - 0x75, 0x69, 0x63, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x7e, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x71, 0x75, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x55, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x5d, 0x0a, - 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x12, - 0x51, 0x75, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescOnce sync.Once - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescData = file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDesc -) - -func file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescGZIP() []byte { - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescOnce.Do(func() { - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescData) - }) - return file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDescData -} - -var file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_goTypes = []interface{}{ - (*QuicDownstreamTransport)(nil), // 0: envoy.extensions.transport_sockets.quic.v4alpha.QuicDownstreamTransport - (*QuicUpstreamTransport)(nil), // 1: envoy.extensions.transport_sockets.quic.v4alpha.QuicUpstreamTransport - (*v4alpha.DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext - (*v4alpha.UpstreamTlsContext)(nil), // 3: envoy.extensions.transport_sockets.tls.v4alpha.UpstreamTlsContext -} -var file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_depIdxs = []int32{ - 2, // 0: envoy.extensions.transport_sockets.quic.v4alpha.QuicDownstreamTransport.downstream_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext - 3, // 1: envoy.extensions.transport_sockets.quic.v4alpha.QuicUpstreamTransport.upstream_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.UpstreamTlsContext - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_init() } -func file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_init() { - if File_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuicDownstreamTransport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuicUpstreamTransport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_goTypes, - DependencyIndexes: file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_depIdxs, - MessageInfos: file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_msgTypes, - }.Build() - File_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto = out.File - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_rawDesc = nil - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_goTypes = nil - file_envoy_extensions_transport_sockets_quic_v4alpha_quic_transport_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.pb.validate.go deleted file mode 100644 index 2c6bff8523..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.pb.validate.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/transport_sockets/quic/v4alpha/quic_transport.proto - -package envoy_extensions_transport_sockets_quic_v4alpha - -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{} -) - -// Validate checks the field values on QuicDownstreamTransport with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *QuicDownstreamTransport) Validate() error { - if m == nil { - return nil - } - - if m.GetDownstreamTlsContext() == nil { - return QuicDownstreamTransportValidationError{ - field: "DownstreamTlsContext", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetDownstreamTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QuicDownstreamTransportValidationError{ - field: "DownstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// QuicDownstreamTransportValidationError is the validation error returned by -// QuicDownstreamTransport.Validate if the designated constraints aren't met. -type QuicDownstreamTransportValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QuicDownstreamTransportValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QuicDownstreamTransportValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QuicDownstreamTransportValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QuicDownstreamTransportValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QuicDownstreamTransportValidationError) ErrorName() string { - return "QuicDownstreamTransportValidationError" -} - -// Error satisfies the builtin error interface -func (e QuicDownstreamTransportValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQuicDownstreamTransport.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QuicDownstreamTransportValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QuicDownstreamTransportValidationError{} - -// Validate checks the field values on QuicUpstreamTransport with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *QuicUpstreamTransport) Validate() error { - if m == nil { - return nil - } - - if m.GetUpstreamTlsContext() == nil { - return QuicUpstreamTransportValidationError{ - field: "UpstreamTlsContext", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetUpstreamTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QuicUpstreamTransportValidationError{ - field: "UpstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// QuicUpstreamTransportValidationError is the validation error returned by -// QuicUpstreamTransport.Validate if the designated constraints aren't met. -type QuicUpstreamTransportValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QuicUpstreamTransportValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QuicUpstreamTransportValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QuicUpstreamTransportValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QuicUpstreamTransportValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QuicUpstreamTransportValidationError) ErrorName() string { - return "QuicUpstreamTransportValidationError" -} - -// Error satisfies the builtin error interface -func (e QuicUpstreamTransportValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQuicUpstreamTransport.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QuicUpstreamTransportValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QuicUpstreamTransportValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.go b/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.go index 599927d50f..b3078452fe 100644 --- a/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto -package envoy_extensions_transport_sockets_raw_buffer_v3 +package raw_bufferv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for raw buffer transport socket. type RawBuffer struct { state protoimpl.MessageState @@ -84,13 +79,19 @@ var file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDe 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x42, 0x5a, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x42, 0xc0, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2f, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.validate.go index 39b5bb5d1d..dcdeba43a6 100644 --- a/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto -package envoy_extensions_transport_sockets_raw_buffer_v3 +package raw_bufferv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RawBuffer with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RawBuffer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RawBuffer with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RawBufferMultiError, or nil +// if none found. +func (m *RawBuffer) ValidateAll() error { + return m.validate(true) +} + +func (m *RawBuffer) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RawBufferMultiError(errors) + } + return nil } +// RawBufferMultiError is an error wrapping multiple validation errors returned +// by RawBuffer.ValidateAll() if the designated constraints aren't met. +type RawBufferMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RawBufferMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RawBufferMultiError) AllErrors() []error { return m } + // RawBufferValidationError is the validation error returned by // RawBuffer.Validate if the designated constraints aren't met. type RawBufferValidationError struct { diff --git a/pkg/api/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.go b/pkg/api/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.go new file mode 100644 index 0000000000..f30c5b49df --- /dev/null +++ b/pkg/api/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/s2a/v3/s2a.proto + +package s2av3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#not-implemented-hide:] +// Configuration for S2A transport socket. This allows Envoy clients to +// configure how to offload mTLS handshakes to the S2A service. +// https://github.com/google/s2a-core#readme +type S2AConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the S2A. This can be an IP address or a hostname, + // followed by a port number. + S2AAddress string `protobuf:"bytes,1,opt,name=s2a_address,json=s2aAddress,proto3" json:"s2a_address,omitempty"` +} + +func (x *S2AConfiguration) Reset() { + *x = S2AConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2AConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2AConfiguration) ProtoMessage() {} + +func (x *S2AConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use S2AConfiguration.ProtoReflect.Descriptor instead. +func (*S2AConfiguration) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescGZIP(), []int{0} +} + +func (x *S2AConfiguration) GetS2AAddress() string { + if x != nil { + return x.S2AAddress + } + return "" +} + +var File_envoy_extensions_transport_sockets_s2a_v3_s2a_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x32, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x76, 0x33, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x10, 0x53, 0x32, 0x41, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0b, + 0x73, 0x32, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x32, 0x61, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0xa5, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x32, 0x61, 0x2e, + 0x76, 0x33, 0x42, 0x08, 0x53, 0x32, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x73, 0x32, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData = file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_goTypes = []interface{}{ + (*S2AConfiguration)(nil), // 0: envoy.extensions.transport_sockets.s2a.v3.S2AConfiguration +} +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_init() } +func file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_init() { + if File_envoy_extensions_transport_sockets_s2a_v3_s2a_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2AConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_s2a_v3_s2a_proto = out.File + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_goTypes = nil + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.validate.go new file mode 100644 index 0000000000..baac1900f9 --- /dev/null +++ b/pkg/api/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.validate.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/s2a/v3/s2a.proto + +package s2av3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on S2AConfiguration with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *S2AConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on S2AConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// S2AConfigurationMultiError, or nil if none found. +func (m *S2AConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *S2AConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetS2AAddress()) < 1 { + err := S2AConfigurationValidationError{ + field: "S2AAddress", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return S2AConfigurationMultiError(errors) + } + + return nil +} + +// S2AConfigurationMultiError is an error wrapping multiple validation errors +// returned by S2AConfiguration.ValidateAll() if the designated constraints +// aren't met. +type S2AConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m S2AConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m S2AConfigurationMultiError) AllErrors() []error { return m } + +// S2AConfigurationValidationError is the validation error returned by +// S2AConfiguration.Validate if the designated constraints aren't met. +type S2AConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e S2AConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e S2AConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e S2AConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e S2AConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e S2AConfigurationValidationError) ErrorName() string { return "S2AConfigurationValidationError" } + +// Error satisfies the builtin error interface +func (e S2AConfigurationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sS2AConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = S2AConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = S2AConfigurationValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.go b/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.go index e0572f2dd7..657304ec70 100644 --- a/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.go @@ -1,18 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/starttls/v3/starttls.proto -package envoy_extensions_transport_sockets_starttls_v3 +package starttlsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -26,14 +24,10 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for StartTls transport socket. +// Configuration for a downstream StartTls transport socket. // StartTls transport socket wraps two sockets: -// - raw_buffer socket which is used at the beginning of the session -// - TLS socket used when a protocol negotiates a switch to encrypted traffic. +// * raw_buffer socket which is used at the beginning of the session +// * TLS socket used when a protocol negotiates a switch to encrypted traffic. type StartTlsConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -41,7 +35,7 @@ type StartTlsConfig struct { // (optional) Configuration for clear-text socket used at the beginning of the session. CleartextSocketConfig *v3.RawBuffer `protobuf:"bytes,1,opt,name=cleartext_socket_config,json=cleartextSocketConfig,proto3" json:"cleartext_socket_config,omitempty"` - // Configuration for TLS socket. + // Configuration for a downstream TLS socket. TlsSocketConfig *v31.DownstreamTlsContext `protobuf:"bytes,2,opt,name=tls_socket_config,json=tlsSocketConfig,proto3" json:"tls_socket_config,omitempty"` } @@ -91,6 +85,67 @@ func (x *StartTlsConfig) GetTlsSocketConfig() *v31.DownstreamTlsContext { return nil } +// Configuration for an upstream StartTls transport socket. +// StartTls transport socket wraps two sockets: +// * raw_buffer socket which is used at the beginning of the session +// * TLS socket used when a protocol negotiates a switch to encrypted traffic. +type UpstreamStartTlsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // (optional) Configuration for clear-text socket used at the beginning of the session. + CleartextSocketConfig *v3.RawBuffer `protobuf:"bytes,1,opt,name=cleartext_socket_config,json=cleartextSocketConfig,proto3" json:"cleartext_socket_config,omitempty"` + // Configuration for an upstream TLS socket. + TlsSocketConfig *v31.UpstreamTlsContext `protobuf:"bytes,2,opt,name=tls_socket_config,json=tlsSocketConfig,proto3" json:"tls_socket_config,omitempty"` +} + +func (x *UpstreamStartTlsConfig) Reset() { + *x = UpstreamStartTlsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamStartTlsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamStartTlsConfig) ProtoMessage() {} + +func (x *UpstreamStartTlsConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamStartTlsConfig.ProtoReflect.Descriptor instead. +func (*UpstreamStartTlsConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescGZIP(), []int{1} +} + +func (x *UpstreamStartTlsConfig) GetCleartextSocketConfig() *v3.RawBuffer { + if x != nil { + return x.CleartextSocketConfig + } + return nil +} + +func (x *UpstreamStartTlsConfig) GetTlsSocketConfig() *v31.UpstreamTlsContext { + if x != nil { + return x.TlsSocketConfig + } + return nil +} + var File_envoy_extensions_transport_sockets_starttls_v3_starttls_proto protoreflect.FileDescriptor var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDesc = []byte{ @@ -108,37 +163,55 @@ var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDesc = 0x74, 0x6f, 0x1a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, - 0x78, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x52, 0x15, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x75, 0x0a, 0x11, 0x74, 0x6c, - 0x73, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x57, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2e, 0x76, - 0x33, 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xfc, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x52, 0x15, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x75, 0x0a, 0x11, 0x74, 0x6c, 0x73, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, + 0x6c, 0x73, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x82, + 0x02, 0x0a, 0x16, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, 0x63, 0x6c, 0x65, + 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, + 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x52, 0x15, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, + 0x78, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, + 0x0a, 0x11, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, + 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, + 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0xb9, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, + 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x74, 0x6c, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -153,20 +226,24 @@ func file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescG return file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescData } -var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_goTypes = []interface{}{ (*StartTlsConfig)(nil), // 0: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig - (*v3.RawBuffer)(nil), // 1: envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer - (*v31.DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + (*UpstreamStartTlsConfig)(nil), // 1: envoy.extensions.transport_sockets.starttls.v3.UpstreamStartTlsConfig + (*v3.RawBuffer)(nil), // 2: envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer + (*v31.DownstreamTlsContext)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + (*v31.UpstreamTlsContext)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext } var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig.cleartext_socket_config:type_name -> envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer - 2, // 1: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig.tls_socket_config:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 0: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig.cleartext_socket_config:type_name -> envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer + 3, // 1: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig.tls_socket_config:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + 2, // 2: envoy.extensions.transport_sockets.starttls.v3.UpstreamStartTlsConfig.cleartext_socket_config:type_name -> envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer + 4, // 3: envoy.extensions.transport_sockets.starttls.v3.UpstreamStartTlsConfig.tls_socket_config:type_name -> envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_init() } @@ -187,6 +264,18 @@ func file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_init() { return nil } } + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpstreamStartTlsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -194,7 +283,7 @@ func file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.go index e2883c9c95..c71daba17f 100644 --- a/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/starttls/v3/starttls.proto -package envoy_extensions_transport_sockets_starttls_v3 +package starttlsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StartTlsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StartTlsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StartTlsConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StartTlsConfigMultiError, +// or nil if none found. +func (m *StartTlsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *StartTlsConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCleartextSocketConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCleartextSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCleartextSocketConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StartTlsConfigValidationError{ field: "CleartextSocketConfig", @@ -52,13 +87,36 @@ func (m *StartTlsConfig) Validate() error { } if m.GetTlsSocketConfig() == nil { - return StartTlsConfigValidationError{ + err := StartTlsConfigValidationError{ field: "TlsSocketConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTlsSocketConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsSocketConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StartTlsConfigValidationError{ field: "TlsSocketConfig", @@ -68,9 +126,30 @@ func (m *StartTlsConfig) Validate() error { } } + if len(errors) > 0 { + return StartTlsConfigMultiError(errors) + } + return nil } +// StartTlsConfigMultiError is an error wrapping multiple validation errors +// returned by StartTlsConfig.ValidateAll() if the designated constraints +// aren't met. +type StartTlsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StartTlsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StartTlsConfigMultiError) AllErrors() []error { return m } + // StartTlsConfigValidationError is the validation error returned by // StartTlsConfig.Validate if the designated constraints aren't met. type StartTlsConfigValidationError struct { @@ -124,3 +203,174 @@ var _ interface { Cause() error ErrorName() string } = StartTlsConfigValidationError{} + +// Validate checks the field values on UpstreamStartTlsConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *UpstreamStartTlsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamStartTlsConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamStartTlsConfigMultiError, or nil if none found. +func (m *UpstreamStartTlsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamStartTlsConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCleartextSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCleartextSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamStartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetTlsSocketConfig() == nil { + err := UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTlsSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UpstreamStartTlsConfigMultiError(errors) + } + + return nil +} + +// UpstreamStartTlsConfigMultiError is an error wrapping multiple validation +// errors returned by UpstreamStartTlsConfig.ValidateAll() if the designated +// constraints aren't met. +type UpstreamStartTlsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamStartTlsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamStartTlsConfigMultiError) AllErrors() []error { return m } + +// UpstreamStartTlsConfigValidationError is the validation error returned by +// UpstreamStartTlsConfig.Validate if the designated constraints aren't met. +type UpstreamStartTlsConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpstreamStartTlsConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpstreamStartTlsConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpstreamStartTlsConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpstreamStartTlsConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpstreamStartTlsConfigValidationError) ErrorName() string { + return "UpstreamStartTlsConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e UpstreamStartTlsConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUpstreamStartTlsConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpstreamStartTlsConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpstreamStartTlsConfigValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.pb.go b/pkg/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.pb.go deleted file mode 100644 index 9d15711e0b..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.pb.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/transport_sockets/starttls/v4alpha/starttls.proto - -package envoy_extensions_transport_sockets_starttls_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/raw_buffer/v3" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for StartTls transport socket. -// StartTls transport socket wraps two sockets: -// - raw_buffer socket which is used at the beginning of the session -// - TLS socket used when a protocol negotiates a switch to encrypted traffic. -type StartTlsConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // (optional) Configuration for clear-text socket used at the beginning of the session. - CleartextSocketConfig *v3.RawBuffer `protobuf:"bytes,1,opt,name=cleartext_socket_config,json=cleartextSocketConfig,proto3" json:"cleartext_socket_config,omitempty"` - // Configuration for TLS socket. - TlsSocketConfig *v4alpha.DownstreamTlsContext `protobuf:"bytes,2,opt,name=tls_socket_config,json=tlsSocketConfig,proto3" json:"tls_socket_config,omitempty"` -} - -func (x *StartTlsConfig) Reset() { - *x = StartTlsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StartTlsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartTlsConfig) ProtoMessage() {} - -func (x *StartTlsConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartTlsConfig.ProtoReflect.Descriptor instead. -func (*StartTlsConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescGZIP(), []int{0} -} - -func (x *StartTlsConfig) GetCleartextSocketConfig() *v3.RawBuffer { - if x != nil { - return x.CleartextSocketConfig - } - return nil -} - -func (x *StartTlsConfig) GetTlsSocketConfig() *v4alpha.DownstreamTlsContext { - if x != nil { - return x.TlsSocketConfig - } - return nil -} - -var File_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto protoreflect.FileDescriptor - -var file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDesc = []byte{ - 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, - 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x72, 0x61, - 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x77, 0x5f, - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x38, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x6c, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc7, 0x02, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, 0x78, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, - 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x52, 0x15, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7a, 0x0a, 0x11, 0x74, 0x6c, 0x73, - 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x5c, 0x0a, 0x41, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescOnce sync.Once - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescData = file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDesc -) - -func file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescGZIP() []byte { - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescOnce.Do(func() { - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescData) - }) - return file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDescData -} - -var file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_goTypes = []interface{}{ - (*StartTlsConfig)(nil), // 0: envoy.extensions.transport_sockets.starttls.v4alpha.StartTlsConfig - (*v3.RawBuffer)(nil), // 1: envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer - (*v4alpha.DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext -} -var file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.transport_sockets.starttls.v4alpha.StartTlsConfig.cleartext_socket_config:type_name -> envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer - 2, // 1: envoy.extensions.transport_sockets.starttls.v4alpha.StartTlsConfig.tls_socket_config:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_init() } -func file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_init() { - if File_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartTlsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_goTypes, - DependencyIndexes: file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_depIdxs, - MessageInfos: file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_msgTypes, - }.Build() - File_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto = out.File - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_rawDesc = nil - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_goTypes = nil - file_envoy_extensions_transport_sockets_starttls_v4alpha_starttls_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.pb.validate.go deleted file mode 100644 index 1390de2457..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/starttls/v4alpha/starttls.pb.validate.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/transport_sockets/starttls/v4alpha/starttls.proto - -package envoy_extensions_transport_sockets_starttls_v4alpha - -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{} -) - -// Validate checks the field values on StartTlsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *StartTlsConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetCleartextSocketConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StartTlsConfigValidationError{ - field: "CleartextSocketConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetTlsSocketConfig() == nil { - return StartTlsConfigValidationError{ - field: "TlsSocketConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetTlsSocketConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StartTlsConfigValidationError{ - field: "TlsSocketConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// StartTlsConfigValidationError is the validation error returned by -// StartTlsConfig.Validate if the designated constraints aren't met. -type StartTlsConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StartTlsConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StartTlsConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StartTlsConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StartTlsConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StartTlsConfigValidationError) ErrorName() string { return "StartTlsConfigValidationError" } - -// Error satisfies the builtin error interface -func (e StartTlsConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStartTlsConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StartTlsConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StartTlsConfigValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.go b/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.go index 0b7eb3732d..8af20ae1db 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/tap/v3/tap.proto -package envoy_extensions_transport_sockets_tap_v3 +package tapv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/tap/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configuration for tap transport socket. This wraps another transport socket, providing the // ability to interpose and record in plain text any traffic that is surfaced to Envoy. type Tap struct { @@ -123,12 +118,18 @@ var file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDesc = []byte{ 0x6b, 0x65, 0x74, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x42, 0x4d, 0x0a, 0x37, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x42, 0xa5, 0x01, 0x0a, 0x37, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.validate.go index 6b21438a8e..f4f3c5ff24 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/tap/v3/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/tap/v3/tap.proto -package envoy_extensions_transport_sockets_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Tap with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. func (m *Tap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tap with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TapMultiError, or nil if none found. +func (m *Tap) ValidateAll() error { + return m.validate(true) +} + +func (m *Tap) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetCommonConfig() == nil { - return TapValidationError{ + err := TapValidationError{ field: "CommonConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapValidationError{ field: "CommonConfig", @@ -58,13 +97,36 @@ func (m *Tap) Validate() error { } if m.GetTransportSocket() == nil { - return TapValidationError{ + err := TapValidationError{ field: "TransportSocket", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapValidationError{ field: "TransportSocket", @@ -74,9 +136,29 @@ func (m *Tap) Validate() error { } } + if len(errors) > 0 { + return TapMultiError(errors) + } + return nil } +// TapMultiError is an error wrapping multiple validation errors returned by +// Tap.ValidateAll() if the designated constraints aren't met. +type TapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapMultiError) AllErrors() []error { return m } + // TapValidationError is the validation error returned by Tap.Validate if the // designated constraints aren't met. type TapValidationError struct { diff --git a/pkg/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.pb.go b/pkg/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.pb.go deleted file mode 100644 index 6813afed76..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.pb.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/transport_sockets/tap/v4alpha/tap.proto - -package envoy_extensions_transport_sockets_tap_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/tap/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for tap transport socket. This wraps another transport socket, providing the -// ability to interpose and record in plain text any traffic that is surfaced to Envoy. -type Tap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Common configuration for the tap transport socket. - CommonConfig *v4alpha.CommonExtensionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` - // The underlying transport socket being wrapped. - TransportSocket *v4alpha1.TransportSocket `protobuf:"bytes,2,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` -} - -func (x *Tap) Reset() { - *x = Tap{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tap) ProtoMessage() {} - -func (x *Tap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tap.ProtoReflect.Descriptor instead. -func (*Tap) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescGZIP(), []int{0} -} - -func (x *Tap) GetCommonConfig() *v4alpha.CommonExtensionConfig { - if x != nil { - return x.CommonConfig - } - return nil -} - -func (x *Tap) GetTransportSocket() *v4alpha1.TransportSocket { - if x != nil { - return x.TransportSocket - } - return nil -} - -var File_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto protoreflect.FileDescriptor - -var file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, - 0x0a, 0x03, 0x54, 0x61, 0x70, 0x12, 0x69, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x5f, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x61, 0x70, - 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x61, 0x70, 0x42, 0x52, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x61, 0x70, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescOnce sync.Once - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescData = file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDesc -) - -func file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescGZIP() []byte { - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescOnce.Do(func() { - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescData) - }) - return file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDescData -} - -var file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_goTypes = []interface{}{ - (*Tap)(nil), // 0: envoy.extensions.transport_sockets.tap.v4alpha.Tap - (*v4alpha.CommonExtensionConfig)(nil), // 1: envoy.extensions.common.tap.v4alpha.CommonExtensionConfig - (*v4alpha1.TransportSocket)(nil), // 2: envoy.config.core.v4alpha.TransportSocket -} -var file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.transport_sockets.tap.v4alpha.Tap.common_config:type_name -> envoy.extensions.common.tap.v4alpha.CommonExtensionConfig - 2, // 1: envoy.extensions.transport_sockets.tap.v4alpha.Tap.transport_socket:type_name -> envoy.config.core.v4alpha.TransportSocket - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_init() } -func file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_init() { - if File_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_goTypes, - DependencyIndexes: file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_depIdxs, - MessageInfos: file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_msgTypes, - }.Build() - File_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto = out.File - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_rawDesc = nil - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_goTypes = nil - file_envoy_extensions_transport_sockets_tap_v4alpha_tap_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.pb.validate.go deleted file mode 100644 index f6c05d8196..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tap/v4alpha/tap.pb.validate.go +++ /dev/null @@ -1,132 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/transport_sockets/tap/v4alpha/tap.proto - -package envoy_extensions_transport_sockets_tap_v4alpha - -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{} -) - -// Validate checks the field values on Tap with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *Tap) Validate() error { - if m == nil { - return nil - } - - if m.GetCommonConfig() == nil { - return TapValidationError{ - field: "CommonConfig", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapValidationError{ - field: "CommonConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetTransportSocket() == nil { - return TapValidationError{ - field: "TransportSocket", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TapValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// TapValidationError is the validation error returned by Tap.Validate if the -// designated constraints aren't met. -type TapValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TapValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TapValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TapValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TapValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TapValidationError) ErrorName() string { return "TapValidationError" } - -// Error satisfies the builtin error interface -func (e TapValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTap.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TapValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TapValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.go b/pkg/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.go new file mode 100644 index 0000000000..d6d1f2f4a1 --- /dev/null +++ b/pkg/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto + +package tcp_statsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the TCP Stats transport socket wrapper, which wraps another transport socket for +// all communication, but emits stats about the underlying TCP connection. +// +// The stats are documented :ref:`here ` for listeners and +// :ref:`here ` for clusters. +// +// This transport socket is currently only supported on Linux. +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The underlying transport socket being wrapped. + TransportSocket *v3.TransportSocket `protobuf:"bytes,1,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` + // Period to update stats while the connection is open. If unset, updates only happen when the + // connection is closed. Stats are always updated one final time when the connection is closed. + UpdatePeriod *duration.Duration `protobuf:"bytes,2,opt,name=update_period,json=updatePeriod,proto3" json:"update_period,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetTransportSocket() *v3.TransportSocket { + if x != nil { + return x.TransportSocket + } + return nil +} + +func (x *Config) GetUpdatePeriod() *duration.Duration { + if x != nil { + return x.UpdatePeriod + } + return nil +} + +var File_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, + 0x33, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x06, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, + 0x84, 0x3d, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x42, 0xbc, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x76, 0x33, 0x42, 0x0d, 0x54, 0x63, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x62, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, + 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x63, 0x70, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData = file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.transport_sockets.tcp_stats.v3.Config + (*v3.TransportSocket)(nil), // 1: envoy.config.core.v3.TransportSocket + (*duration.Duration)(nil), // 2: google.protobuf.Duration +} +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.transport_sockets.tcp_stats.v3.Config.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 2, // 1: envoy.extensions.transport_sockets.tcp_stats.v3.Config.update_period:type_name -> google.protobuf.Duration + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_init() } +func file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_init() { + if File_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto = out.File + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_goTypes = nil + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.validate.go new file mode 100644 index 0000000000..0d343afc9c --- /dev/null +++ b/pkg/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.validate.go @@ -0,0 +1,204 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto + +package tcp_statsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetTransportSocket() == nil { + err := ConfigValidationError{ + field: "TransportSocket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if d := m.GetUpdatePeriod(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = ConfigValidationError{ + field: "UpdatePeriod", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := ConfigValidationError{ + field: "UpdatePeriod", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.go index 42409fac99..e378f8a6d8 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/tls/v3/cert.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +19,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_extensions_transport_sockets_tls_v3_cert_proto protoreflect.FileDescriptor var file_envoy_extensions_transport_sockets_tls_v3_cert_proto_rawDesc = []byte{ @@ -34,24 +28,28 @@ var file_envoy_extensions_transport_sockets_tls_v3_cert_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, - 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, - 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x46, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, - 0x42, 0x09, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x50, 0x01, 0x50, - 0x02, 0x50, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x33, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, + 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x9e, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x76, 0x33, 0x42, 0x09, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, + 0x33, 0x3b, 0x74, 0x6c, 0x73, 0x76, 0x33, 0x50, 0x00, 0x50, 0x01, 0x50, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_extensions_transport_sockets_tls_v3_cert_proto_goTypes = []interface{}{} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.validate.go index ed05fb32a7..81f1b85e58 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/cert.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/tls/v3/cert.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.go index e3dda4bdb9..d149f880e1 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.go @@ -1,19 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/tls/v3/common.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" _ "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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -28,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type TlsParameters_TlsProtocol int32 const ( @@ -92,6 +87,63 @@ func (TlsParameters_TlsProtocol) EnumDescriptor() ([]byte, []int) { return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{0, 0} } +// Indicates the choice of GeneralName as defined in section 4.2.1.5 of RFC 5280 to match +// against. +type SubjectAltNameMatcher_SanType int32 + +const ( + SubjectAltNameMatcher_SAN_TYPE_UNSPECIFIED SubjectAltNameMatcher_SanType = 0 + SubjectAltNameMatcher_EMAIL SubjectAltNameMatcher_SanType = 1 + SubjectAltNameMatcher_DNS SubjectAltNameMatcher_SanType = 2 + SubjectAltNameMatcher_URI SubjectAltNameMatcher_SanType = 3 + SubjectAltNameMatcher_IP_ADDRESS SubjectAltNameMatcher_SanType = 4 +) + +// Enum value maps for SubjectAltNameMatcher_SanType. +var ( + SubjectAltNameMatcher_SanType_name = map[int32]string{ + 0: "SAN_TYPE_UNSPECIFIED", + 1: "EMAIL", + 2: "DNS", + 3: "URI", + 4: "IP_ADDRESS", + } + SubjectAltNameMatcher_SanType_value = map[string]int32{ + "SAN_TYPE_UNSPECIFIED": 0, + "EMAIL": 1, + "DNS": 2, + "URI": 3, + "IP_ADDRESS": 4, + } +) + +func (x SubjectAltNameMatcher_SanType) Enum() *SubjectAltNameMatcher_SanType { + p := new(SubjectAltNameMatcher_SanType) + *p = x + return p +} + +func (x SubjectAltNameMatcher_SanType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubjectAltNameMatcher_SanType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[1].Descriptor() +} + +func (SubjectAltNameMatcher_SanType) Type() protoreflect.EnumType { + return &file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[1] +} + +func (x SubjectAltNameMatcher_SanType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubjectAltNameMatcher_SanType.Descriptor instead. +func (SubjectAltNameMatcher_SanType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{5, 0} +} + // Peer certificate verification mode. type CertificateValidationContext_TrustChainVerification int32 @@ -100,7 +152,7 @@ const ( CertificateValidationContext_VERIFY_TRUST_CHAIN CertificateValidationContext_TrustChainVerification = 0 // Connections where the certificate fails verification will be permitted. // For HTTP connections, the result of certificate verification can be used in route matching. ( - // see :ref:`validated ` ). + // see :ref:`validated ` ). CertificateValidationContext_ACCEPT_UNTRUSTED CertificateValidationContext_TrustChainVerification = 1 ) @@ -127,11 +179,11 @@ func (x CertificateValidationContext_TrustChainVerification) String() string { } func (CertificateValidationContext_TrustChainVerification) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[1].Descriptor() + return file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[2].Descriptor() } func (CertificateValidationContext_TrustChainVerification) Type() protoreflect.EnumType { - return &file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[1] + return &file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[2] } func (x CertificateValidationContext_TrustChainVerification) Number() protoreflect.EnumNumber { @@ -140,7 +192,7 @@ func (x CertificateValidationContext_TrustChainVerification) Number() protorefle // Deprecated: Use CertificateValidationContext_TrustChainVerification.Descriptor instead. func (CertificateValidationContext_TrustChainVerification) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{4, 0} + return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{6, 0} } type TlsParameters struct { @@ -148,18 +200,19 @@ type TlsParameters struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for - // servers. + // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for both clients and servers. TlsMinimumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,1,opt,name=tls_minimum_protocol_version,json=tlsMinimumProtocolVersion,proto3,enum=envoy.extensions.transport_sockets.tls.v3.TlsParameters_TlsProtocol" json:"tls_minimum_protocol_version,omitempty"` // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for // servers. TlsMaximumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,2,opt,name=tls_maximum_protocol_version,json=tlsMaximumProtocolVersion,proto3,enum=envoy.extensions.transport_sockets.tls.v3.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. + // when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). + // + // If not specified, a default list will be used. Defaults are different for server (downstream) and + // client (upstream) TLS configurations. // - // In non-FIPS builds, the default cipher list is: + // In non-FIPS builds, the default server cipher list is: // // .. code-block:: none // @@ -176,7 +229,7 @@ type TlsParameters struct { // AES256-GCM-SHA384 // AES256-SHA // - // In builds using :ref:`BoringSSL FIPS `, the default cipher list is: + // In builds using :ref:`BoringSSL FIPS `, the default server cipher list is: // // .. code-block:: none // @@ -192,6 +245,24 @@ type TlsParameters struct { // ECDHE-RSA-AES256-SHA // AES256-GCM-SHA384 // AES256-SHA + // + // In non-FIPS builds, the default client 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-AES256-GCM-SHA384 + // ECDHE-RSA-AES256-GCM-SHA384 + // + // In builds using :ref:`BoringSSL FIPS `, the default client cipher list is: + // + // .. code-block:: none + // + // ECDHE-ECDSA-AES128-GCM-SHA256 + // ECDHE-RSA-AES128-GCM-SHA256 + // ECDHE-ECDSA-AES256-GCM-SHA384 + // ECDHE-RSA-AES256-GCM-SHA384 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. @@ -286,7 +357,6 @@ type PrivateKeyProvider struct { // // Types that are assignable to ConfigType: // *PrivateKeyProvider_TypedConfig - // *PrivateKeyProvider_HiddenEnvoyDeprecatedConfig ConfigType isPrivateKeyProvider_ConfigType `protobuf_oneof:"config_type"` } @@ -343,14 +413,6 @@ func (x *PrivateKeyProvider) GetTypedConfig() *any.Any { return nil } -// Deprecated: Do not use. -func (x *PrivateKeyProvider) GetHiddenEnvoyDeprecatedConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*PrivateKeyProvider_HiddenEnvoyDeprecatedConfig); ok { - return x.HiddenEnvoyDeprecatedConfig - } - return nil -} - type isPrivateKeyProvider_ConfigType interface { isPrivateKeyProvider_ConfigType() } @@ -359,16 +421,9 @@ type PrivateKeyProvider_TypedConfig struct { TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } -type PrivateKeyProvider_HiddenEnvoyDeprecatedConfig struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedConfig *_struct.Struct `protobuf:"bytes,2,opt,name=hidden_envoy_deprecated_config,json=hiddenEnvoyDeprecatedConfig,proto3,oneof"` -} - func (*PrivateKeyProvider_TypedConfig) isPrivateKeyProvider_ConfigType() {} -func (*PrivateKeyProvider_HiddenEnvoyDeprecatedConfig) isPrivateKeyProvider_ConfigType() {} - -// [#next-free-field: 8] +// [#next-free-field: 9] type TlsCertificate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -387,6 +442,20 @@ type TlsCertificate struct { // directory for any file moves to support rotation. This currently only // applies to dynamic secrets, when the *TlsCertificate* is delivered via SDS. PrivateKey *v3.DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // `Pkcs12` data containing TLS certificate, chain, and private key. + // + // If *pkcs12* is a filesystem path, the file will be read, but no watch will + // be added to the parent directory, since *pkcs12* isn't used by SDS. + // This field is mutually exclusive with *certificate_chain*, *private_key* and *private_key_provider*. + // This can't be marked as ``oneof`` due to API compatibility reasons. Setting + // both :ref:`private_key `, + // :ref:`certificate_chain `, + // or :ref:`private_key_provider ` + // and :ref:`pkcs12 ` + // fields will result in an error. Use :ref:`password + // ` + // to specify the password to unprotect the `PKCS12` data, if necessary. + Pkcs12 *v3.DataSource `protobuf:"bytes,8,opt,name=pkcs12,proto3" json:"pkcs12,omitempty"` // If specified, updates of file-based *certificate_chain* and *private_key* // sources will be triggered by this watch. The certificate/key pair will be // read together and validated for atomic read consistency (i.e. no @@ -399,11 +468,11 @@ type TlsCertificate struct { // ` documentation for further details. WatchedDirectory *v3.WatchedDirectory `protobuf:"bytes,7,opt,name=watched_directory,json=watchedDirectory,proto3" json:"watched_directory,omitempty"` // BoringSSL private key method provider. This is an alternative to :ref:`private_key - // ` field. This can't be + // ` field. This can't be // marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key - // ` and + // ` and // :ref:`private_key_provider - // ` fields will result in an + // ` fields will result in an // error. PrivateKeyProvider *PrivateKeyProvider `protobuf:"bytes,6,opt,name=private_key_provider,json=privateKeyProvider,proto3" json:"private_key_provider,omitempty"` // The password to decrypt the TLS private key. If this field is not set, it is assumed that the @@ -463,6 +532,13 @@ func (x *TlsCertificate) GetPrivateKey() *v3.DataSource { return nil } +func (x *TlsCertificate) GetPkcs12() *v3.DataSource { + if x != nil { + return x.Pkcs12 + } + return nil +} + func (x *TlsCertificate) GetWatchedDirectory() *v3.WatchedDirectory { if x != nil { return x.WatchedDirectory @@ -508,7 +584,7 @@ type TlsSessionTicketKeys struct { // 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 ` + // 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. @@ -568,7 +644,134 @@ func (x *TlsSessionTicketKeys) GetKeys() []*v3.DataSource { return nil } -// [#next-free-field: 12] +// Indicates a certificate to be obtained from a named CertificateProvider plugin instance. +// The plugin instances are defined in the client's bootstrap file. +// The plugin allows certificates to be fetched/refreshed over the network asynchronously with +// respect to the TLS handshake. +// [#not-implemented-hide:] +type CertificateProviderPluginInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Provider instance name. If not present, defaults to "default". + // + // Instance names should generally be defined not in terms of the underlying provider + // implementation (e.g., "file_watcher") but rather in terms of the function of the + // certificates (e.g., "foo_deployment_identity"). + InstanceName string `protobuf:"bytes,1,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` + // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify + // a root-certificate (validation context) or "example.com" to specify a certificate for a + // particular domain. Not all provider instances will actually use this field, so the value + // defaults to the empty string. + CertificateName string `protobuf:"bytes,2,opt,name=certificate_name,json=certificateName,proto3" json:"certificate_name,omitempty"` +} + +func (x *CertificateProviderPluginInstance) Reset() { + *x = CertificateProviderPluginInstance{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CertificateProviderPluginInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CertificateProviderPluginInstance) ProtoMessage() {} + +func (x *CertificateProviderPluginInstance) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CertificateProviderPluginInstance.ProtoReflect.Descriptor instead. +func (*CertificateProviderPluginInstance) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{4} +} + +func (x *CertificateProviderPluginInstance) GetInstanceName() string { + if x != nil { + return x.InstanceName + } + return "" +} + +func (x *CertificateProviderPluginInstance) GetCertificateName() string { + if x != nil { + return x.CertificateName + } + return "" +} + +// Matcher for subject alternative names, to match both type and value of the SAN. +type SubjectAltNameMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specification of type of SAN. Note that the default enum value is an invalid choice. + SanType SubjectAltNameMatcher_SanType `protobuf:"varint,1,opt,name=san_type,json=sanType,proto3,enum=envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher_SanType" json:"san_type,omitempty"` + // Matcher for SAN value. + Matcher *v31.StringMatcher `protobuf:"bytes,2,opt,name=matcher,proto3" json:"matcher,omitempty"` +} + +func (x *SubjectAltNameMatcher) Reset() { + *x = SubjectAltNameMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectAltNameMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectAltNameMatcher) ProtoMessage() {} + +func (x *SubjectAltNameMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectAltNameMatcher.ProtoReflect.Descriptor instead. +func (*SubjectAltNameMatcher) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{5} +} + +func (x *SubjectAltNameMatcher) GetSanType() SubjectAltNameMatcher_SanType { + if x != nil { + return x.SanType + } + return SubjectAltNameMatcher_SAN_TYPE_UNSPECIFIED +} + +func (x *SubjectAltNameMatcher) GetMatcher() *v31.StringMatcher { + if x != nil { + return x.Matcher + } + return nil +} + +// [#next-free-field: 17] type CertificateValidationContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -579,13 +782,13 @@ type CertificateValidationContext struct { // 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:`match_subject_alt_names - // `) is also + // `, or + // :ref:`match_typed_subject_alt_names + // `) is also // specified. // // It can optionally contain certificate revocation lists, in which case Envoy will verify @@ -593,6 +796,9 @@ type CertificateValidationContext struct { // that if a CRL is provided for any certificate authority in a trust chain, a CRL must be // provided for all certificate authorities in that chain. Failure to do so will result in // verification failure for both revoked and unrevoked certificates from that chain. + // The behavior of requiring all certificates to contain CRLs if any do can be altered by + // setting :ref:`only_verify_leaf_cert_crl ` + // true. If set to true, only the final certificate in the chain undergoes CRL verification. // // See :ref:`the TLS overview ` for a list of common // system CA locations. @@ -601,7 +807,17 @@ type CertificateValidationContext struct { // directory for any file moves to support rotation. This currently only // applies to dynamic secrets, when the *CertificateValidationContext* is // delivered via SDS. + // + // Only one of *trusted_ca* and *ca_certificate_provider_instance* may be specified. + // + // [#next-major-version: This field and watched_directory below should ideally be moved into a + // separate sub-message, since there's no point in specifying the latter field without this one.] TrustedCa *v3.DataSource `protobuf:"bytes,1,opt,name=trusted_ca,json=trustedCa,proto3" json:"trusted_ca,omitempty"` + // Certificate provider instance for fetching TLS certificates. + // + // Only one of *trusted_ca* and *ca_certificate_provider_instance* may be specified. + // [#not-implemented-hide:] + CaCertificateProviderInstance *CertificateProviderPluginInstance `protobuf:"bytes,13,opt,name=ca_certificate_provider_instance,json=caCertificateProviderInstance,proto3" json:"ca_certificate_provider_instance,omitempty"` // If specified, updates of a file-based *trusted_ca* source will be triggered // by this watch. This allows explicit control over the path watched, by // default the parent directory of the filesystem path in *trusted_ca* is @@ -629,15 +845,15 @@ type CertificateValidationContext struct { // // When both: // :ref:`verify_certificate_hash - // ` and + // ` and // :ref:`verify_certificate_spki - // ` are specified, + // ` 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"` @@ -663,29 +879,42 @@ type CertificateValidationContext struct { // // When both: // :ref:`verify_certificate_hash - // ` and + // ` and // :ref:`verify_certificate_spki - // ` are specified, + // ` 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 name matchers. If specified, Envoy will verify that the // Subject Alternative Name of the presented certificate matches one of the specified matchers. + // The matching uses "any" semantics, that is to say, the SAN is verified if at least one matcher is + // matched. // // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be - // configured with exact match type in the :ref:`string matcher `. + // configured with exact match type in the :ref:`string matcher `. // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", // it should be configured as shown below. // // .. code-block:: yaml // - // match_subject_alt_names: - // exact: "api.example.com" + // match_typed_subject_alt_names: + // - san_type: DNS + // matcher: + // exact: "api.example.com" // // .. attention:: // // Subject Alternative Names are easily spoofable and verifying only them is insecure, // therefore this option must be used together with :ref:`trusted_ca - // `. + // `. + MatchTypedSubjectAltNames []*SubjectAltNameMatcher `protobuf:"bytes,15,rep,name=match_typed_subject_alt_names,json=matchTypedSubjectAltNames,proto3" json:"match_typed_subject_alt_names,omitempty"` + // This field is deprecated in favor of + // :ref:`match_typed_subject_alt_names + // `. + // Note that if both this field and :ref:`match_typed_subject_alt_names + // ` + // are specified, the former (deprecated field) is ignored. + // + // Deprecated: Do not use. MatchSubjectAltNames []*v31.StringMatcher `protobuf:"bytes,9,rep,name=match_subject_alt_names,json=matchSubjectAltNames,proto3" json:"match_subject_alt_names,omitempty"` // [#not-implemented-hide:] Must present signed certificate time-stamp. RequireSignedCertificateTimestamp *wrappers.BoolValue `protobuf:"bytes,6,opt,name=require_signed_certificate_timestamp,json=requireSignedCertificateTimestamp,proto3" json:"require_signed_certificate_timestamp,omitempty"` @@ -697,20 +926,35 @@ type CertificateValidationContext struct { // for any certificate authority in a trust chain, a CRL must be provided // for all certificate authorities in that chain. Failure to do so will // result in verification failure for both revoked and unrevoked certificates - // from that chain. + // from that chain. This default behavior can be altered by setting + // :ref:`only_verify_leaf_cert_crl ` to + // true. Crl *v3.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"` // Certificate trust chain verification mode. TrustChainVerification CertificateValidationContext_TrustChainVerification `protobuf:"varint,10,opt,name=trust_chain_verification,json=trustChainVerification,proto3,enum=envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext_TrustChainVerification" json:"trust_chain_verification,omitempty"` - // Deprecated: Do not use. - HiddenEnvoyDeprecatedVerifySubjectAltName []string `protobuf:"bytes,4,rep,name=hidden_envoy_deprecated_verify_subject_alt_name,json=hiddenEnvoyDeprecatedVerifySubjectAltName,proto3" json:"hidden_envoy_deprecated_verify_subject_alt_name,omitempty"` + // The configuration of an extension specific certificate validator. + // If specified, all validation is done by the specified validator, + // and the behavior of all other validation settings is defined by the specified validator (and may be entirely ignored, unused, and unvalidated). + // Refer to the documentation for the specified validator. If you do not want a custom validation algorithm, do not set this field. + // [#extension-category: envoy.tls.cert_validator] + CustomValidatorConfig *v3.TypedExtensionConfig `protobuf:"bytes,12,opt,name=custom_validator_config,json=customValidatorConfig,proto3" json:"custom_validator_config,omitempty"` + // If this option is set to true, only the certificate at the end of the + // certificate chain will be subject to validation by :ref:`CRL `. + OnlyVerifyLeafCertCrl bool `protobuf:"varint,14,opt,name=only_verify_leaf_cert_crl,json=onlyVerifyLeafCertCrl,proto3" json:"only_verify_leaf_cert_crl,omitempty"` + // Config for the max number of intermediate certificates in chain that are parsed during verification. + // This does not include the leaf certificate. If configured, and the certificate chain is longer than allowed, the certificates + // above the limit are ignored, and certificate validation will fail. The default limit is 100, + // though this can be system-dependent. + // https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_verify_depth.html + MaxVerifyDepth *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=max_verify_depth,json=maxVerifyDepth,proto3" json:"max_verify_depth,omitempty"` } func (x *CertificateValidationContext) Reset() { *x = CertificateValidationContext{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4] + mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -723,7 +967,7 @@ func (x *CertificateValidationContext) String() string { func (*CertificateValidationContext) ProtoMessage() {} func (x *CertificateValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4] + mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -736,7 +980,7 @@ func (x *CertificateValidationContext) ProtoReflect() protoreflect.Message { // Deprecated: Use CertificateValidationContext.ProtoReflect.Descriptor instead. func (*CertificateValidationContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{4} + return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{6} } func (x *CertificateValidationContext) GetTrustedCa() *v3.DataSource { @@ -746,6 +990,13 @@ func (x *CertificateValidationContext) GetTrustedCa() *v3.DataSource { return nil } +func (x *CertificateValidationContext) GetCaCertificateProviderInstance() *CertificateProviderPluginInstance { + if x != nil { + return x.CaCertificateProviderInstance + } + return nil +} + func (x *CertificateValidationContext) GetWatchedDirectory() *v3.WatchedDirectory { if x != nil { return x.WatchedDirectory @@ -767,6 +1018,14 @@ func (x *CertificateValidationContext) GetVerifyCertificateHash() []string { return nil } +func (x *CertificateValidationContext) GetMatchTypedSubjectAltNames() []*SubjectAltNameMatcher { + if x != nil { + return x.MatchTypedSubjectAltNames + } + return nil +} + +// Deprecated: Do not use. func (x *CertificateValidationContext) GetMatchSubjectAltNames() []*v31.StringMatcher { if x != nil { return x.MatchSubjectAltNames @@ -802,10 +1061,23 @@ func (x *CertificateValidationContext) GetTrustChainVerification() CertificateVa return CertificateValidationContext_VERIFY_TRUST_CHAIN } -// Deprecated: Do not use. -func (x *CertificateValidationContext) GetHiddenEnvoyDeprecatedVerifySubjectAltName() []string { +func (x *CertificateValidationContext) GetCustomValidatorConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.CustomValidatorConfig + } + return nil +} + +func (x *CertificateValidationContext) GetOnlyVerifyLeafCertCrl() bool { if x != nil { - return x.HiddenEnvoyDeprecatedVerifySubjectAltName + return x.OnlyVerifyLeafCertCrl + } + return false +} + +func (x *CertificateValidationContext) GetMaxVerifyDepth() *wrappers.UInt32Value { + if x != nil { + return x.MaxVerifyDepth } return nil } @@ -821,179 +1093,238 @@ var file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDesc = []byte 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, - 0x03, 0x0a, 0x0d, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x8f, 0x01, 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x69, 0x6e, 0x69, - 0x6d, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x8f, 0x01, 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x61, - 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, - 0x75, 0x69, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x69, 0x70, - 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x63, 0x64, - 0x68, 0x5f, 0x63, 0x75, 0x72, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x65, 0x63, 0x64, 0x68, 0x43, 0x75, 0x72, 0x76, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0b, 0x54, 0x6c, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4c, 0x53, - 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, - 0x5f, 0x30, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x31, 0x10, - 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x0b, - 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x3a, 0x26, 0x9a, 0xc5, 0x88, - 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x22, 0xab, 0x02, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0d, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, 0x1e, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, 0x18, 0x01, - 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x86, 0x05, 0x0a, 0x0e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x12, 0x49, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, - 0x02, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x53, - 0x0a, 0x11, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x03, 0x0a, 0x0d, + 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x8f, 0x01, + 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x54, + 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x8f, 0x01, 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, 0x74, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, + 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x63, 0x64, 0x68, 0x5f, 0x63, + 0x75, 0x72, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x63, 0x64, + 0x68, 0x43, 0x75, 0x72, 0x76, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0b, 0x54, 0x6c, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4c, 0x53, 0x5f, 0x41, 0x55, + 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x30, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x31, 0x10, 0x02, 0x12, 0x0b, + 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, + 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, + 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x22, 0xcf, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, + 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, + 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0xc8, 0x05, 0x0a, 0x0e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x49, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x12, 0x6f, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x12, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x41, 0x0a, 0x0b, 0x6f, 0x63, - 0x73, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, + 0xa4, 0x02, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, + 0x40, 0x0a, 0x06, 0x70, 0x6b, 0x63, 0x73, 0x31, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x0a, 0x6f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x12, 0x62, 0x0a, - 0x1c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x1a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x14, 0x54, - 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x12, 0x44, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x0e, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0xb8, 0xb7, 0x8b, - 0xa4, 0x02, 0x01, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x90, 0x08, 0x0a, 0x1c, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x74, 0x72, 0x75, - 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x09, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, 0x61, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x10, 0x77, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, - 0x46, 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x6b, 0x69, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x10, 0x2c, 0x28, 0x2c, - 0x52, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x53, 0x70, 0x6b, 0x69, 0x12, 0x46, 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, - 0x22, 0x06, 0x72, 0x04, 0x10, 0x40, 0x28, 0x5f, 0x52, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x5b, 0x0a, 0x17, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x24, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x32, 0x0a, 0x03, 0x63, 0x72, 0x6c, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x06, 0x70, 0x6b, 0x63, 0x73, 0x31, + 0x32, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x6f, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x52, 0x12, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, + 0xa4, 0x02, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x41, 0x0a, + 0x0b, 0x6f, 0x63, 0x73, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x0a, 0x6f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, + 0x12, 0x62, 0x0a, 0x1c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x03, 0x63, 0x72, 0x6c, 0x12, 0x3a, 0x0a, - 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x18, 0x74, 0x72, - 0x75, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5e, 0x2e, 0x65, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x1a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, + 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x8b, 0x01, + 0x0a, 0x14, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x44, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x3a, 0x2d, 0x9a, 0xc5, + 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x73, 0x0a, 0x21, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0xa4, 0x02, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x08, 0x73, 0x61, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, + 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, + 0x20, 0x00, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x22, 0x50, 0x0a, 0x07, 0x53, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x14, 0x53, 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, + 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4e, 0x53, 0x10, 0x02, 0x12, 0x07, + 0x0a, 0x03, 0x55, 0x52, 0x49, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x50, 0x5f, 0x41, 0x44, + 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, 0x04, 0x22, 0x90, 0x0c, 0x0a, 0x1c, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x57, 0x0a, 0x0a, 0x74, 0x72, 0x75, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x16, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x10, 0x12, 0x0e, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, + 0x61, 0x12, 0xad, 0x01, 0x0a, 0x20, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x16, 0x74, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, - 0x0a, 0x2f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x29, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, - 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x16, 0x54, 0x72, 0x75, 0x73, 0x74, 0x43, + 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x16, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x10, 0x12, 0x0e, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x1d, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x6b, + 0x69, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x22, + 0x06, 0x72, 0x04, 0x10, 0x2c, 0x28, 0x2c, 0x52, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6b, 0x69, 0x12, 0x46, + 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x10, 0x40, 0x28, 0x5f, 0x52, + 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x82, 0x01, 0x0a, 0x1d, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, + 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x52, 0x19, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x68, 0x0a, 0x17, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, + 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x24, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x32, 0x0a, 0x03, 0x63, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x03, 0x63, 0x72, 0x6c, 0x12, 0x3a, 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x18, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x54, + 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x16, 0x74, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x19, 0x6f, + 0x6e, 0x6c, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x5f, + 0x63, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x72, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x6f, 0x6e, 0x6c, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, + 0x72, 0x74, 0x43, 0x72, 0x6c, 0x12, 0x4f, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x44, 0x65, 0x70, 0x74, 0x68, 0x22, 0x46, 0x0a, 0x16, 0x54, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x5f, 0x54, 0x52, 0x55, 0x53, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x43, 0x45, @@ -1001,13 +1332,20 @@ var file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDesc = []byte 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0x50, 0x0a, 0x37, 0x69, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, + 0x06, 0x52, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0xa8, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x6c, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1022,47 +1360,57 @@ func file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP() [ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescData } -var file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_envoy_extensions_transport_sockets_tls_v3_common_proto_goTypes = []interface{}{ (TlsParameters_TlsProtocol)(0), // 0: envoy.extensions.transport_sockets.tls.v3.TlsParameters.TlsProtocol - (CertificateValidationContext_TrustChainVerification)(0), // 1: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.TrustChainVerification - (*TlsParameters)(nil), // 2: envoy.extensions.transport_sockets.tls.v3.TlsParameters - (*PrivateKeyProvider)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider - (*TlsCertificate)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.TlsCertificate - (*TlsSessionTicketKeys)(nil), // 5: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys - (*CertificateValidationContext)(nil), // 6: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext - (*any.Any)(nil), // 7: google.protobuf.Any - (*_struct.Struct)(nil), // 8: google.protobuf.Struct - (*v3.DataSource)(nil), // 9: envoy.config.core.v3.DataSource - (*v3.WatchedDirectory)(nil), // 10: envoy.config.core.v3.WatchedDirectory - (*v31.StringMatcher)(nil), // 11: envoy.type.matcher.v3.StringMatcher - (*wrappers.BoolValue)(nil), // 12: google.protobuf.BoolValue + (SubjectAltNameMatcher_SanType)(0), // 1: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.SanType + (CertificateValidationContext_TrustChainVerification)(0), // 2: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.TrustChainVerification + (*TlsParameters)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.TlsParameters + (*PrivateKeyProvider)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider + (*TlsCertificate)(nil), // 5: envoy.extensions.transport_sockets.tls.v3.TlsCertificate + (*TlsSessionTicketKeys)(nil), // 6: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys + (*CertificateProviderPluginInstance)(nil), // 7: envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance + (*SubjectAltNameMatcher)(nil), // 8: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher + (*CertificateValidationContext)(nil), // 9: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext + (*any.Any)(nil), // 10: google.protobuf.Any + (*v3.DataSource)(nil), // 11: envoy.config.core.v3.DataSource + (*v3.WatchedDirectory)(nil), // 12: envoy.config.core.v3.WatchedDirectory + (*v31.StringMatcher)(nil), // 13: envoy.type.matcher.v3.StringMatcher + (*wrappers.BoolValue)(nil), // 14: google.protobuf.BoolValue + (*v3.TypedExtensionConfig)(nil), // 15: envoy.config.core.v3.TypedExtensionConfig + (*wrappers.UInt32Value)(nil), // 16: google.protobuf.UInt32Value } var file_envoy_extensions_transport_sockets_tls_v3_common_proto_depIdxs = []int32{ 0, // 0: envoy.extensions.transport_sockets.tls.v3.TlsParameters.tls_minimum_protocol_version:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsParameters.TlsProtocol 0, // 1: envoy.extensions.transport_sockets.tls.v3.TlsParameters.tls_maximum_protocol_version:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsParameters.TlsProtocol - 7, // 2: envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider.typed_config:type_name -> google.protobuf.Any - 8, // 3: envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider.hidden_envoy_deprecated_config:type_name -> google.protobuf.Struct - 9, // 4: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.certificate_chain:type_name -> envoy.config.core.v3.DataSource - 9, // 5: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.private_key:type_name -> envoy.config.core.v3.DataSource - 10, // 6: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory - 3, // 7: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.private_key_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider - 9, // 8: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.password:type_name -> envoy.config.core.v3.DataSource - 9, // 9: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.ocsp_staple:type_name -> envoy.config.core.v3.DataSource - 9, // 10: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.signed_certificate_timestamp:type_name -> envoy.config.core.v3.DataSource - 9, // 11: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys.keys:type_name -> envoy.config.core.v3.DataSource - 9, // 12: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.trusted_ca:type_name -> envoy.config.core.v3.DataSource - 10, // 13: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory - 11, // 14: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.match_subject_alt_names:type_name -> envoy.type.matcher.v3.StringMatcher - 12, // 15: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.require_signed_certificate_timestamp:type_name -> google.protobuf.BoolValue - 9, // 16: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.crl:type_name -> envoy.config.core.v3.DataSource - 1, // 17: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.trust_chain_verification:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.TrustChainVerification - 18, // [18:18] is the sub-list for method output_type - 18, // [18:18] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 10, // 2: envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider.typed_config:type_name -> google.protobuf.Any + 11, // 3: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.certificate_chain:type_name -> envoy.config.core.v3.DataSource + 11, // 4: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.private_key:type_name -> envoy.config.core.v3.DataSource + 11, // 5: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.pkcs12:type_name -> envoy.config.core.v3.DataSource + 12, // 6: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory + 4, // 7: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.private_key_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider + 11, // 8: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.password:type_name -> envoy.config.core.v3.DataSource + 11, // 9: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.ocsp_staple:type_name -> envoy.config.core.v3.DataSource + 11, // 10: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.signed_certificate_timestamp:type_name -> envoy.config.core.v3.DataSource + 11, // 11: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys.keys:type_name -> envoy.config.core.v3.DataSource + 1, // 12: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.san_type:type_name -> envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.SanType + 13, // 13: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.matcher:type_name -> envoy.type.matcher.v3.StringMatcher + 11, // 14: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.trusted_ca:type_name -> envoy.config.core.v3.DataSource + 7, // 15: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.ca_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance + 12, // 16: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory + 8, // 17: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.match_typed_subject_alt_names:type_name -> envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher + 13, // 18: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.match_subject_alt_names:type_name -> envoy.type.matcher.v3.StringMatcher + 14, // 19: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.require_signed_certificate_timestamp:type_name -> google.protobuf.BoolValue + 11, // 20: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.crl:type_name -> envoy.config.core.v3.DataSource + 2, // 21: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.trust_chain_verification:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.TrustChainVerification + 15, // 22: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.custom_validator_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 16, // 23: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.max_verify_depth:type_name -> google.protobuf.UInt32Value + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_envoy_extensions_transport_sockets_tls_v3_common_proto_init() } @@ -1120,6 +1468,30 @@ func file_envoy_extensions_transport_sockets_tls_v3_common_proto_init() { } } file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CertificateProviderPluginInstance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectAltNameMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CertificateValidationContext); i { case 0: return &v.state @@ -1134,15 +1506,14 @@ func file_envoy_extensions_transport_sockets_tls_v3_common_proto_init() { } file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[1].OneofWrappers = []interface{}{ (*PrivateKeyProvider_TypedConfig)(nil), - (*PrivateKeyProvider_HiddenEnvoyDeprecatedConfig)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDesc, - NumEnums: 2, - NumMessages: 5, + NumEnums: 3, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.validate.go index f19a0a9816..a015061171 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/tls/v3/common.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,34 +31,78 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TlsParameters) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsParameters with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TlsParametersMultiError, or +// nil if none found. +func (m *TlsParameters) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsParameters) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMinimumProtocolVersion())]; !ok { - return TlsParametersValidationError{ + err := TlsParametersValidationError{ field: "TlsMinimumProtocolVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMaximumProtocolVersion())]; !ok { - return TlsParametersValidationError{ + err := TlsParametersValidationError{ field: "TlsMaximumProtocolVersion", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return TlsParametersMultiError(errors) } return nil } +// TlsParametersMultiError is an error wrapping multiple validation errors +// returned by TlsParameters.ValidateAll() if the designated constraints +// aren't met. +type TlsParametersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsParametersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsParametersMultiError) AllErrors() []error { return m } + // TlsParametersValidationError is the validation error returned by // TlsParameters.Validate if the designated constraints aren't met. type TlsParametersValidationError struct { @@ -114,39 +159,64 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *PrivateKeyProvider) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PrivateKeyProvider with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PrivateKeyProviderMultiError, or nil if none found. +func (m *PrivateKeyProvider) ValidateAll() error { + return m.validate(true) +} + +func (m *PrivateKeyProvider) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetProviderName()) < 1 { - return PrivateKeyProviderValidationError{ + err := PrivateKeyProviderValidationError{ field: "ProviderName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.ConfigType.(type) { 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, + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrivateKeyProviderValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrivateKeyProviderValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) } } - } - - case *PrivateKeyProvider_HiddenEnvoyDeprecatedConfig: - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PrivateKeyProviderValidationError{ - field: "HiddenEnvoyDeprecatedConfig", + field: "TypedConfig", reason: "embedded message failed validation", cause: err, } @@ -155,9 +225,30 @@ func (m *PrivateKeyProvider) Validate() error { } + if len(errors) > 0 { + return PrivateKeyProviderMultiError(errors) + } + return nil } +// PrivateKeyProviderMultiError is an error wrapping multiple validation errors +// returned by PrivateKeyProvider.ValidateAll() if the designated constraints +// aren't met. +type PrivateKeyProviderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PrivateKeyProviderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PrivateKeyProviderMultiError) AllErrors() []error { return m } + // PrivateKeyProviderValidationError is the validation error returned by // PrivateKeyProvider.Validate if the designated constraints aren't met. type PrivateKeyProviderValidationError struct { @@ -215,14 +306,47 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TlsCertificate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsCertificate with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TlsCertificateMultiError, +// or nil if none found. +func (m *TlsCertificate) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsCertificate) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCertificateChain()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCertificateChain()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "CertificateChain", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "CertificateChain", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCertificateChain()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "CertificateChain", @@ -232,7 +356,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrivateKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "PrivateKey", @@ -242,7 +385,55 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPkcs12()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "Pkcs12", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "Pkcs12", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPkcs12()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsCertificateValidationError{ + field: "Pkcs12", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetWatchedDirectory()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "WatchedDirectory", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "WatchedDirectory", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "WatchedDirectory", @@ -252,7 +443,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetPrivateKeyProvider()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPrivateKeyProvider()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKeyProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "PrivateKeyProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrivateKeyProvider()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "PrivateKeyProvider", @@ -262,7 +472,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetPassword()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "Password", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "Password", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPassword()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "Password", @@ -272,7 +501,26 @@ func (m *TlsCertificate) Validate() error { } } - if v, ok := interface{}(m.GetOcspStaple()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOcspStaple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "OcspStaple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: "OcspStaple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOcspStaple()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "OcspStaple", @@ -285,7 +533,26 @@ func (m *TlsCertificate) Validate() error { for idx, item := range m.GetSignedCertificateTimestamp() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsCertificateValidationError{ + field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), @@ -297,9 +564,30 @@ func (m *TlsCertificate) Validate() error { } + if len(errors) > 0 { + return TlsCertificateMultiError(errors) + } + return nil } +// TlsCertificateMultiError is an error wrapping multiple validation errors +// returned by TlsCertificate.ValidateAll() if the designated constraints +// aren't met. +type TlsCertificateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsCertificateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsCertificateMultiError) AllErrors() []error { return m } + // TlsCertificateValidationError is the validation error returned by // TlsCertificate.Validate if the designated constraints aren't met. type TlsCertificateValidationError struct { @@ -356,23 +644,60 @@ var _ interface { // Validate checks the field values on TlsSessionTicketKeys with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TlsSessionTicketKeys) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsSessionTicketKeys with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TlsSessionTicketKeysMultiError, or nil if none found. +func (m *TlsSessionTicketKeys) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsSessionTicketKeys) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetKeys()) < 1 { - return TlsSessionTicketKeysValidationError{ + err := TlsSessionTicketKeysValidationError{ field: "Keys", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetKeys() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsSessionTicketKeysValidationError{ + field: fmt.Sprintf("Keys[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsSessionTicketKeysValidationError{ + field: fmt.Sprintf("Keys[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsSessionTicketKeysValidationError{ field: fmt.Sprintf("Keys[%v]", idx), @@ -384,9 +709,30 @@ func (m *TlsSessionTicketKeys) Validate() error { } + if len(errors) > 0 { + return TlsSessionTicketKeysMultiError(errors) + } + return nil } +// TlsSessionTicketKeysMultiError is an error wrapping multiple validation +// errors returned by TlsSessionTicketKeys.ValidateAll() if the designated +// constraints aren't met. +type TlsSessionTicketKeysMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsSessionTicketKeysMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsSessionTicketKeysMultiError) AllErrors() []error { return m } + // TlsSessionTicketKeysValidationError is the validation error returned by // TlsSessionTicketKeys.Validate if the designated constraints aren't met. type TlsSessionTicketKeysValidationError struct { @@ -443,15 +789,325 @@ var _ interface { ErrorName() string } = TlsSessionTicketKeysValidationError{} +// Validate checks the field values on CertificateProviderPluginInstance with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *CertificateProviderPluginInstance) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateProviderPluginInstance +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// CertificateProviderPluginInstanceMultiError, or nil if none found. +func (m *CertificateProviderPluginInstance) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateProviderPluginInstance) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for InstanceName + + // no validation rules for CertificateName + + if len(errors) > 0 { + return CertificateProviderPluginInstanceMultiError(errors) + } + + return nil +} + +// CertificateProviderPluginInstanceMultiError is an error wrapping multiple +// validation errors returned by +// CertificateProviderPluginInstance.ValidateAll() if the designated +// constraints aren't met. +type CertificateProviderPluginInstanceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateProviderPluginInstanceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateProviderPluginInstanceMultiError) AllErrors() []error { return m } + +// CertificateProviderPluginInstanceValidationError is the validation error +// returned by CertificateProviderPluginInstance.Validate if the designated +// constraints aren't met. +type CertificateProviderPluginInstanceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CertificateProviderPluginInstanceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CertificateProviderPluginInstanceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CertificateProviderPluginInstanceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CertificateProviderPluginInstanceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CertificateProviderPluginInstanceValidationError) ErrorName() string { + return "CertificateProviderPluginInstanceValidationError" +} + +// Error satisfies the builtin error interface +func (e CertificateProviderPluginInstanceValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCertificateProviderPluginInstance.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CertificateProviderPluginInstanceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CertificateProviderPluginInstanceValidationError{} + +// Validate checks the field values on SubjectAltNameMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SubjectAltNameMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectAltNameMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SubjectAltNameMatcherMultiError, or nil if none found. +func (m *SubjectAltNameMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectAltNameMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := _SubjectAltNameMatcher_SanType_NotInLookup[m.GetSanType()]; ok { + err := SubjectAltNameMatcherValidationError{ + field: "SanType", + reason: "value must not be in list [0]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := SubjectAltNameMatcher_SanType_name[int32(m.GetSanType())]; !ok { + err := SubjectAltNameMatcherValidationError{ + field: "SanType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetMatcher() == nil { + err := SubjectAltNameMatcherValidationError{ + field: "Matcher", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubjectAltNameMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubjectAltNameMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubjectAltNameMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return SubjectAltNameMatcherMultiError(errors) + } + + return nil +} + +// SubjectAltNameMatcherMultiError is an error wrapping multiple validation +// errors returned by SubjectAltNameMatcher.ValidateAll() if the designated +// constraints aren't met. +type SubjectAltNameMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectAltNameMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectAltNameMatcherMultiError) AllErrors() []error { return m } + +// SubjectAltNameMatcherValidationError is the validation error returned by +// SubjectAltNameMatcher.Validate if the designated constraints aren't met. +type SubjectAltNameMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectAltNameMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectAltNameMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectAltNameMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectAltNameMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectAltNameMatcherValidationError) ErrorName() string { + return "SubjectAltNameMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e SubjectAltNameMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSubjectAltNameMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectAltNameMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectAltNameMatcherValidationError{} + +var _SubjectAltNameMatcher_SanType_NotInLookup = map[SubjectAltNameMatcher_SanType]struct{}{ + 0: {}, +} + // Validate checks the field values on CertificateValidationContext with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CertificateValidationContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateValidationContext with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CertificateValidationContextMultiError, or nil if none found. +func (m *CertificateValidationContext) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateValidationContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTrustedCa()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTrustedCa()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "TrustedCa", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "TrustedCa", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrustedCa()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "TrustedCa", @@ -461,7 +1117,55 @@ func (m *CertificateValidationContext) Validate() error { } } - if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCaCertificateProviderInstance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "CaCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "CaCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCaCertificateProviderInstance()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateValidationContextValidationError{ + field: "CaCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetWatchedDirectory()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "WatchedDirectory", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "WatchedDirectory", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "WatchedDirectory", @@ -475,17 +1179,25 @@ func (m *CertificateValidationContext) Validate() error { _, _ = idx, item if utf8.RuneCountInString(item) < 44 { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), reason: "value length must be at least 44 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(item) > 44 { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), reason: "value length must be at most 44 bytes", } + if !all { + return err + } + errors = append(errors, err) } } @@ -494,17 +1206,59 @@ func (m *CertificateValidationContext) Validate() error { _, _ = idx, item if utf8.RuneCountInString(item) < 64 { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), reason: "value length must be at least 64 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(item) > 95 { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), reason: "value length must be at most 95 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + } + + for idx, item := range m.GetMatchTypedSubjectAltNames() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: fmt.Sprintf("MatchTypedSubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: fmt.Sprintf("MatchTypedSubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateValidationContextValidationError{ + field: fmt.Sprintf("MatchTypedSubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } } } @@ -512,7 +1266,26 @@ func (m *CertificateValidationContext) Validate() error { for idx, item := range m.GetMatchSubjectAltNames() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), @@ -524,7 +1297,26 @@ func (m *CertificateValidationContext) Validate() error { } - if v, ok := interface{}(m.GetRequireSignedCertificateTimestamp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequireSignedCertificateTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "RequireSignedCertificateTimestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "RequireSignedCertificateTimestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequireSignedCertificateTimestamp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "RequireSignedCertificateTimestamp", @@ -534,7 +1326,26 @@ func (m *CertificateValidationContext) Validate() error { } } - if v, ok := interface{}(m.GetCrl()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCrl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "Crl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "Crl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCrl()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "Crl", @@ -547,15 +1358,86 @@ func (m *CertificateValidationContext) Validate() error { // no validation rules for AllowExpiredCertificate if _, ok := CertificateValidationContext_TrustChainVerification_name[int32(m.GetTrustChainVerification())]; !ok { - return CertificateValidationContextValidationError{ + err := CertificateValidationContextValidationError{ field: "TrustChainVerification", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCustomValidatorConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "CustomValidatorConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationContextValidationError{ + field: "CustomValidatorConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomValidatorConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateValidationContextValidationError{ + field: "CustomValidatorConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for OnlyVerifyLeafCertCrl + + if wrapper := m.GetMaxVerifyDepth(); wrapper != nil { + + if wrapper.GetValue() > 100 { + err := CertificateValidationContextValidationError{ + field: "MaxVerifyDepth", + reason: "value must be less than or equal to 100", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return CertificateValidationContextMultiError(errors) } return nil } +// CertificateValidationContextMultiError is an error wrapping multiple +// validation errors returned by CertificateValidationContext.ValidateAll() if +// the designated constraints aren't met. +type CertificateValidationContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateValidationContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateValidationContextMultiError) AllErrors() []error { return m } + // CertificateValidationContextValidationError is the validation error returned // by CertificateValidationContext.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.go index 56572e03c2..d2beee634d 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/tls/v3/secret.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type GenericSecret struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -269,8 +264,6 @@ var file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDesc = []byte 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, @@ -328,13 +321,18 @@ var file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDesc = []byte 0x48, 0x00, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x1f, 0x9a, 0xc5, 0x88, 0x1e, 0x1a, 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x50, 0x0a, 0x37, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0xa8, 0x01, 0x0a, 0x37, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, + 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x6c, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go index 1da0465a5e..8733bec97c 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/tls/v3/secret.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *GenericSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GenericSecret with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GenericSecretMultiError, or +// nil if none found. +func (m *GenericSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *GenericSecret) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GenericSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GenericSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GenericSecretValidationError{ field: "Secret", @@ -51,9 +86,30 @@ func (m *GenericSecret) Validate() error { } } + if len(errors) > 0 { + return GenericSecretMultiError(errors) + } + return nil } +// GenericSecretMultiError is an error wrapping multiple validation errors +// returned by GenericSecret.ValidateAll() if the designated constraints +// aren't met. +type GenericSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GenericSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GenericSecretMultiError) AllErrors() []error { return m } + // GenericSecretValidationError is the validation error returned by // GenericSecret.Validate if the designated constraints aren't met. type GenericSecretValidationError struct { @@ -109,21 +165,58 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SdsSecretConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SdsSecretConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SdsSecretConfigMultiError, or nil if none found. +func (m *SdsSecretConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SdsSecretConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return SdsSecretConfigValidationError{ + err := SdsSecretConfigValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSdsConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SdsSecretConfigValidationError{ + field: "SdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SdsSecretConfigValidationError{ + field: "SdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSdsConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SdsSecretConfigValidationError{ field: "SdsConfig", @@ -133,9 +226,30 @@ func (m *SdsSecretConfig) Validate() error { } } + if len(errors) > 0 { + return SdsSecretConfigMultiError(errors) + } + return nil } +// SdsSecretConfigMultiError is an error wrapping multiple validation errors +// returned by SdsSecretConfig.ValidateAll() if the designated constraints +// aren't met. +type SdsSecretConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SdsSecretConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SdsSecretConfigMultiError) AllErrors() []error { return m } + // SdsSecretConfigValidationError is the validation error returned by // SdsSecretConfig.Validate if the designated constraints aren't met. type SdsSecretConfigValidationError struct { @@ -191,19 +305,52 @@ var _ interface { } = SdsSecretConfigValidationError{} // Validate checks the field values on Secret with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Secret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Secret with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in SecretMultiError, or nil if none found. +func (m *Secret) ValidateAll() error { + return m.validate(true) +} + +func (m *Secret) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name switch m.Type.(type) { case *Secret_TlsCertificate: - if v, ok := interface{}(m.GetTlsCertificate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsCertificate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "TlsCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "TlsCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCertificate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "TlsCertificate", @@ -215,7 +362,26 @@ func (m *Secret) Validate() error { case *Secret_SessionTicketKeys: - if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSessionTicketKeys()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "SessionTicketKeys", @@ -227,7 +393,26 @@ func (m *Secret) Validate() error { case *Secret_ValidationContext: - if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "ValidationContext", @@ -239,7 +424,26 @@ func (m *Secret) Validate() error { case *Secret_GenericSecret: - if v, ok := interface{}(m.GetGenericSecret()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGenericSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretValidationError{ + field: "GenericSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretValidationError{ + field: "GenericSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGenericSecret()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "GenericSecret", @@ -251,9 +455,29 @@ func (m *Secret) Validate() error { } + if len(errors) > 0 { + return SecretMultiError(errors) + } + return nil } +// SecretMultiError is an error wrapping multiple validation errors returned by +// Secret.ValidateAll() if the designated constraints aren't met. +type SecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretMultiError) AllErrors() []error { return m } + // SecretValidationError is the validation error returned by Secret.Validate if // the designated constraints aren't met. type SecretValidationError struct { diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.go index 961dc5de03..1e5d03c5cc 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/transport_sockets/tls/v3/tls.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" duration "github.com/golang/protobuf/ptypes/duration" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type DownstreamTlsContext_OcspStaplePolicy int32 const ( @@ -104,7 +99,7 @@ type UpstreamTlsContext struct { // .. attention:: // // Server certificate verification is not enabled by default. Configure - // :ref:`trusted_ca` to enable + // :ref:`trusted_ca` to enable // verification. 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. @@ -201,10 +196,9 @@ type DownstreamTlsContext struct { // *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig // *DownstreamTlsContext_DisableStatelessSessionResumption SessionTicketKeysType isDownstreamTlsContext_SessionTicketKeysType `protobuf_oneof:"session_ticket_keys_type"` - // If specified, session_timeout will change maximum lifetime (in seconds) of TLS session - // Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) - // ` - // only seconds could be specified (fractional seconds are going to be ignored). + // If specified, ``session_timeout`` will change the maximum lifetime (in seconds) of the TLS session. + // Currently this value is used as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_. + // Only seconds can be specified (fractional seconds are ignored). SessionTimeout *duration.Duration `protobuf:"bytes,6,opt,name=session_timeout,json=sessionTimeout,proto3" json:"session_timeout,omitempty"` // Config for whether to use certificates if they do not have // an accompanying OCSP response or if the response expires at runtime. @@ -325,8 +319,8 @@ type DownstreamTlsContext_DisableStatelessSessionResumption struct { // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS // server to not issue TLS session tickets for the purposes of stateless TLS session resumption. // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using - // the keys specified through either :ref:`session_ticket_keys ` - // or :ref:`session_ticket_keys_sds_secret_config `. + // the keys specified through either :ref:`session_ticket_keys ` + // or :ref:`session_ticket_keys_sds_secret_config `. // If this config is set to false and no keys are explicitly configured, the TLS server will issue // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the // implication that sessions cannot be resumed across hot restarts or on different hosts. @@ -341,8 +335,78 @@ func (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) isDownstreamTlsCon func (*DownstreamTlsContext_DisableStatelessSessionResumption) isDownstreamTlsContext_SessionTicketKeysType() { } +// TLS key log configuration. +// The key log file format is "format used by NSS for its SSLKEYLOGFILE debugging output" (text taken from openssl man page) +type TlsKeyLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to save the TLS key log. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // The local IP address that will be used to filter the connection which should save the TLS key log + // If it is not set, any local IP address will be matched. + LocalAddressRange []*v3.CidrRange `protobuf:"bytes,2,rep,name=local_address_range,json=localAddressRange,proto3" json:"local_address_range,omitempty"` + // The remote IP address that will be used to filter the connection which should save the TLS key log + // If it is not set, any remote IP address will be matched. + RemoteAddressRange []*v3.CidrRange `protobuf:"bytes,3,rep,name=remote_address_range,json=remoteAddressRange,proto3" json:"remote_address_range,omitempty"` +} + +func (x *TlsKeyLog) Reset() { + *x = TlsKeyLog{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TlsKeyLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TlsKeyLog) ProtoMessage() {} + +func (x *TlsKeyLog) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TlsKeyLog.ProtoReflect.Descriptor instead. +func (*TlsKeyLog) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{2} +} + +func (x *TlsKeyLog) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *TlsKeyLog) GetLocalAddressRange() []*v3.CidrRange { + if x != nil { + return x.LocalAddressRange + } + return nil +} + +func (x *TlsKeyLog) GetRemoteAddressRange() []*v3.CidrRange { + if x != nil { + return x.RemoteAddressRange + } + return nil +} + // TLS context shared by both client and server TLS contexts. -// [#next-free-field: 14] +// [#next-free-field: 16] type CommonTlsContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -356,15 +420,40 @@ type CommonTlsContext struct { // 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. + // + // Only one of *tls_certificates*, *tls_certificate_sds_secret_configs*, + // and *tls_certificate_provider_instance* may be used. + // [#next-major-version: These mutually exclusive fields should ideally be in a oneof, but it's + // not legal to put a repeated field in a oneof. In the next major version, we should rework + // this to avoid this problem.] TlsCertificates []*TlsCertificate `protobuf:"bytes,2,rep,name=tls_certificates,json=tlsCertificates,proto3" json:"tls_certificates,omitempty"` // Configs for fetching TLS certificates via SDS API. Note SDS API allows certificates to be // fetched/refreshed over the network asynchronously with respect to the TLS handshake. + // + // The same number and types of certificates as :ref:`tls_certificates ` + // are valid in the the certificates fetched through this setting. + // + // Only one of *tls_certificates*, *tls_certificate_sds_secret_configs*, + // and *tls_certificate_provider_instance* may be used. + // [#next-major-version: These mutually exclusive fields should ideally be in a oneof, but it's + // not legal to put a repeated field in a oneof. In the next major version, we should rework + // this to avoid this problem.] TlsCertificateSdsSecretConfigs []*SdsSecretConfig `protobuf:"bytes,6,rep,name=tls_certificate_sds_secret_configs,json=tlsCertificateSdsSecretConfigs,proto3" json:"tls_certificate_sds_secret_configs,omitempty"` + // Certificate provider instance for fetching TLS certs. + // + // Only one of *tls_certificates*, *tls_certificate_sds_secret_configs*, + // and *tls_certificate_provider_instance* may be used. + // [#not-implemented-hide:] + TlsCertificateProviderInstance *CertificateProviderPluginInstance `protobuf:"bytes,14,opt,name=tls_certificate_provider_instance,json=tlsCertificateProviderInstance,proto3" json:"tls_certificate_provider_instance,omitempty"` // Certificate provider for fetching TLS certificates. // [#not-implemented-hide:] + // + // Deprecated: Do not use. TlsCertificateCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,9,opt,name=tls_certificate_certificate_provider,json=tlsCertificateCertificateProvider,proto3" json:"tls_certificate_certificate_provider,omitempty"` // Certificate provider instance for fetching TLS certificates. // [#not-implemented-hide:] + // + // Deprecated: Do not use. TlsCertificateCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,11,opt,name=tls_certificate_certificate_provider_instance,json=tlsCertificateCertificateProviderInstance,proto3" json:"tls_certificate_certificate_provider_instance,omitempty"` // Types that are assignable to ValidationContextType: // *CommonTlsContext_ValidationContext @@ -376,7 +465,7 @@ type CommonTlsContext struct { // 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. @@ -387,12 +476,14 @@ type CommonTlsContext struct { // Custom TLS handshaker. If empty, defaults to native TLS handshaking // behavior. CustomHandshaker *v3.TypedExtensionConfig `protobuf:"bytes,13,opt,name=custom_handshaker,json=customHandshaker,proto3" json:"custom_handshaker,omitempty"` + // TLS key log configuration + KeyLog *TlsKeyLog `protobuf:"bytes,15,opt,name=key_log,json=keyLog,proto3" json:"key_log,omitempty"` } func (x *CommonTlsContext) Reset() { *x = CommonTlsContext{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -405,7 +496,7 @@ func (x *CommonTlsContext) String() string { func (*CommonTlsContext) ProtoMessage() {} func (x *CommonTlsContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -418,7 +509,7 @@ func (x *CommonTlsContext) ProtoReflect() protoreflect.Message { // Deprecated: Use CommonTlsContext.ProtoReflect.Descriptor instead. func (*CommonTlsContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{2} + return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3} } func (x *CommonTlsContext) GetTlsParams() *TlsParameters { @@ -442,6 +533,14 @@ func (x *CommonTlsContext) GetTlsCertificateSdsSecretConfigs() []*SdsSecretConfi return nil } +func (x *CommonTlsContext) GetTlsCertificateProviderInstance() *CertificateProviderPluginInstance { + if x != nil { + return x.TlsCertificateProviderInstance + } + return nil +} + +// Deprecated: Do not use. func (x *CommonTlsContext) GetTlsCertificateCertificateProvider() *CommonTlsContext_CertificateProvider { if x != nil { return x.TlsCertificateCertificateProvider @@ -449,6 +548,7 @@ func (x *CommonTlsContext) GetTlsCertificateCertificateProvider() *CommonTlsCont return nil } +// Deprecated: Do not use. func (x *CommonTlsContext) GetTlsCertificateCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance { if x != nil { return x.TlsCertificateCertificateProviderInstance @@ -484,6 +584,7 @@ func (x *CommonTlsContext) GetCombinedValidationContext() *CommonTlsContext_Comb return nil } +// Deprecated: Do not use. func (x *CommonTlsContext) GetValidationContextCertificateProvider() *CommonTlsContext_CertificateProvider { if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextCertificateProvider); ok { return x.ValidationContextCertificateProvider @@ -491,6 +592,7 @@ func (x *CommonTlsContext) GetValidationContextCertificateProvider() *CommonTlsC return nil } +// Deprecated: Do not use. func (x *CommonTlsContext) GetValidationContextCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance { if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextCertificateProviderInstance); ok { return x.ValidationContextCertificateProviderInstance @@ -512,6 +614,13 @@ func (x *CommonTlsContext) GetCustomHandshaker() *v3.TypedExtensionConfig { return nil } +func (x *CommonTlsContext) GetKeyLog() *TlsKeyLog { + if x != nil { + return x.KeyLog + } + return nil +} + type isCommonTlsContext_ValidationContextType interface { isCommonTlsContext_ValidationContextType() } @@ -541,12 +650,16 @@ type CommonTlsContext_CombinedValidationContext struct { type CommonTlsContext_ValidationContextCertificateProvider struct { // Certificate provider for fetching validation context. // [#not-implemented-hide:] + // + // Deprecated: Do not use. ValidationContextCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,10,opt,name=validation_context_certificate_provider,json=validationContextCertificateProvider,proto3,oneof"` } type CommonTlsContext_ValidationContextCertificateProviderInstance struct { // Certificate provider instance for fetching validation context. // [#not-implemented-hide:] + // + // Deprecated: Do not use. ValidationContextCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,12,opt,name=validation_context_certificate_provider_instance,json=validationContextCertificateProviderInstance,proto3,oneof"` } @@ -565,6 +678,12 @@ func (*CommonTlsContext_ValidationContextCertificateProviderInstance) isCommonTl // Config for Certificate provider to get certificates. This provider should allow certificates to be // fetched/refreshed over the network asynchronously with respect to the TLS handshake. +// +// DEPRECATED: This message is not currently used, but if we ever do need it, we will want to +// move it out of CommonTlsContext and into common.proto, similar to the existing +// CertificateProviderPluginInstance message. +// +// [#not-implemented-hide:] type CommonTlsContext_CertificateProvider struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -588,7 +707,7 @@ type CommonTlsContext_CertificateProvider struct { func (x *CommonTlsContext_CertificateProvider) Reset() { *x = CommonTlsContext_CertificateProvider{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -601,7 +720,7 @@ func (x *CommonTlsContext_CertificateProvider) String() string { func (*CommonTlsContext_CertificateProvider) ProtoMessage() {} func (x *CommonTlsContext_CertificateProvider) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -614,7 +733,7 @@ func (x *CommonTlsContext_CertificateProvider) ProtoReflect() protoreflect.Messa // Deprecated: Use CommonTlsContext_CertificateProvider.ProtoReflect.Descriptor instead. func (*CommonTlsContext_CertificateProvider) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{2, 0} + return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3, 0} } func (x *CommonTlsContext_CertificateProvider) GetName() string { @@ -651,6 +770,11 @@ func (*CommonTlsContext_CertificateProvider_TypedConfig) isCommonTlsContext_Cert // Similar to CertificateProvider above, but allows the provider instances to be configured on // the client side instead of being sent from the control plane. +// +// DEPRECATED: This message was moved outside of CommonTlsContext +// and now lives in common.proto. +// +// [#not-implemented-hide:] type CommonTlsContext_CertificateProviderInstance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -675,7 +799,7 @@ type CommonTlsContext_CertificateProviderInstance struct { func (x *CommonTlsContext_CertificateProviderInstance) Reset() { *x = CommonTlsContext_CertificateProviderInstance{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -688,7 +812,7 @@ func (x *CommonTlsContext_CertificateProviderInstance) String() string { func (*CommonTlsContext_CertificateProviderInstance) ProtoMessage() {} func (x *CommonTlsContext_CertificateProviderInstance) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -701,7 +825,7 @@ func (x *CommonTlsContext_CertificateProviderInstance) ProtoReflect() protorefle // Deprecated: Use CommonTlsContext_CertificateProviderInstance.ProtoReflect.Descriptor instead. func (*CommonTlsContext_CertificateProviderInstance) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{2, 1} + return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3, 1} } func (x *CommonTlsContext_CertificateProviderInstance) GetInstanceName() string { @@ -727,25 +851,25 @@ type CommonTlsContext_CombinedCertificateValidationContext struct { 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. Note SDS API allows certificates to be // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,2,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3" json:"validation_context_sds_secret_config,omitempty"` - // Certificate provider for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. + // Certificate provider for fetching CA certs. This will populate the + // *default_validation_context.trusted_ca* field. // [#not-implemented-hide:] + // + // Deprecated: Do not use. ValidationContextCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,3,opt,name=validation_context_certificate_provider,json=validationContextCertificateProvider,proto3" json:"validation_context_certificate_provider,omitempty"` - // Certificate provider instance for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. + // Certificate provider instance for fetching CA certs. This will populate the + // *default_validation_context.trusted_ca* field. // [#not-implemented-hide:] + // + // Deprecated: Do not use. ValidationContextCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,4,opt,name=validation_context_certificate_provider_instance,json=validationContextCertificateProviderInstance,proto3" json:"validation_context_certificate_provider_instance,omitempty"` } func (x *CommonTlsContext_CombinedCertificateValidationContext) Reset() { *x = CommonTlsContext_CombinedCertificateValidationContext{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -758,7 +882,7 @@ func (x *CommonTlsContext_CombinedCertificateValidationContext) String() string func (*CommonTlsContext_CombinedCertificateValidationContext) ProtoMessage() {} func (x *CommonTlsContext_CombinedCertificateValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5] + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -771,7 +895,7 @@ func (x *CommonTlsContext_CombinedCertificateValidationContext) ProtoReflect() p // Deprecated: Use CommonTlsContext_CombinedCertificateValidationContext.ProtoReflect.Descriptor instead. func (*CommonTlsContext_CombinedCertificateValidationContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{2, 2} + return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3, 2} } func (x *CommonTlsContext_CombinedCertificateValidationContext) GetDefaultValidationContext() *CertificateValidationContext { @@ -788,6 +912,7 @@ func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationCon return nil } +// Deprecated: Do not use. func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextCertificateProvider() *CommonTlsContext_CertificateProvider { if x != nil { return x.ValidationContextCertificateProvider @@ -795,6 +920,7 @@ func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationCon return nil } +// Deprecated: Do not use. func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance { if x != nil { return x.ValidationContextCertificateProviderInstance @@ -811,296 +937,329 @@ var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, - 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, - 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x02, 0x0a, - 0x12, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x69, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x10, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1a, - 0x0a, 0x03, 0x73, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x72, 0x03, 0x28, 0xff, 0x01, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, - 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x6d, - 0x61, 0x78, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, - 0x65, 0x79, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x22, 0xea, 0x07, 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, - 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x69, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x58, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x3b, - 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x69, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x6e, 0x69, 0x12, 0x71, 0x0a, 0x13, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, - 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x8d, - 0x01, 0x0a, 0x25, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x53, - 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, - 0x0a, 0x24, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, - 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, - 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x21, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x1a, 0x06, 0x08, - 0x80, 0x80, 0x80, 0x80, 0x10, 0x32, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x6f, 0x63, 0x73, 0x70, - 0x5f, 0x73, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x10, 0x6f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x22, 0x4e, 0x0a, 0x10, 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x4e, 0x49, 0x45, 0x4e, - 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x45, - 0x10, 0x02, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x44, 0x6f, 0x77, - 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa7, 0x16, - 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x57, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x52, 0x09, 0x74, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x10, 0x74, - 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x90, 0x01, 0x0a, 0x22, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x1e, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x24, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, + 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x02, 0x0a, 0x12, 0x55, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x69, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x03, + 0x73, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, + 0x28, 0xff, 0x01, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x6e, 0x65, + 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x6d, 0x61, 0x78, + 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, + 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xea, + 0x07, 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x69, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x52, 0x21, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xb9, 0x01, 0x0a, 0x2d, 0x74, 0x6c, 0x73, 0x5f, - 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x29, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x8c, 0x01, - 0x0a, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, + 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x12, 0x58, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0b, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x6e, 0x69, 0x12, 0x71, 0x0a, 0x13, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x8d, 0x01, 0x0a, + 0x25, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa2, 0x01, 0x0a, - 0x1b, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x60, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x64, 0x73, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x24, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, + 0x73, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x21, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x54, 0x0a, 0x0f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x1a, 0x06, 0x08, 0x80, 0x80, + 0x80, 0x80, 0x10, 0x32, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x6f, 0x63, 0x73, 0x70, 0x5f, 0x73, + 0x74, 0x61, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, - 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0xa8, 0x01, 0x0a, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, + 0x6f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x22, 0x4e, 0x0a, 0x10, 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x4e, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x53, 0x54, 0x41, 0x50, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, + 0x52, 0x49, 0x43, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0f, 0x0a, 0x0b, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x45, 0x10, 0x02, + 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, + 0x1a, 0x0a, 0x18, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x09, + 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x4f, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, + 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xf4, 0x17, 0x0a, 0x10, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x57, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xc1, 0x01, 0x0a, - 0x30, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x48, 0x00, 0x52, 0x2c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, - 0x1a, 0x92, 0x01, 0x0a, 0x13, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x6d, 0x0a, 0x1b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xf4, 0x06, 0x0a, 0x24, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, - 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x8f, 0x01, - 0x0a, 0x1a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x09, 0x74, + 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, - 0xb6, 0x01, 0x0a, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x2a, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1c, 0x12, 0x1a, 0x64, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xca, 0x01, 0x0a, 0x27, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, + 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x74, + 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x90, + 0x01, 0x0a, 0x22, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, + 0x02, 0x52, 0x1e, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x73, 0x12, 0x97, 0x01, 0x0a, 0x21, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x1e, 0x74, 0x6c, 0x73, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0xad, 0x01, 0x0a, 0x24, + 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x22, 0xf2, 0x98, 0xfe, - 0x8f, 0x05, 0x1c, 0x12, 0x1a, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, - 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xe3, 0x01, 0x0a, 0x30, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, + 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x21, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xc6, 0x01, 0x0a, 0x2d, + 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x0b, 0x18, 0x01, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x29, 0x74, 0x6c, 0x73, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x22, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x1c, 0x12, 0x1a, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x2c, 0x76, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x8c, + 0x01, 0x0a, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, + 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa2, 0x01, + 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x60, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, + 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x12, 0xb5, 0x01, 0x0a, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, + 0x2e, 0x30, 0x48, 0x00, 0x52, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xce, 0x01, 0x0a, 0x30, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x0b, + 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x2c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x4e, 0x9a, 0xc5, 0x88, - 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x3a, 0x29, 0x9a, 0xc5, 0x88, - 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x19, 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0x4d, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, - 0x76, 0x33, 0x42, 0x08, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, + 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, 0x6b, + 0x65, 0x79, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x4c, + 0x6f, 0x67, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4c, 0x6f, 0x67, 0x1a, 0x92, 0x01, 0x0a, 0x13, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x4f, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x0d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, + 0x6d, 0x0a, 0x1b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xa4, + 0x06, 0x0a, 0x24, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x8f, 0x01, 0x0a, 0x1a, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x94, 0x01, 0x0a, 0x24, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x20, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0xb3, 0x01, 0x0a, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, + 0x52, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xcc, 0x01, 0x0a, 0x30, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, + 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x2c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x4e, 0x9a, 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x42, 0x19, 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, + 0x06, 0x42, 0xa5, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, + 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x6c, 0x73, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1116,56 +1275,63 @@ func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP() []by } var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_goTypes = []interface{}{ (DownstreamTlsContext_OcspStaplePolicy)(0), // 0: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.OcspStaplePolicy (*UpstreamTlsContext)(nil), // 1: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext (*DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext - (*CommonTlsContext)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext - (*CommonTlsContext_CertificateProvider)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider - (*CommonTlsContext_CertificateProviderInstance)(nil), // 5: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance - (*CommonTlsContext_CombinedCertificateValidationContext)(nil), // 6: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext - (*wrappers.UInt32Value)(nil), // 7: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 8: google.protobuf.BoolValue - (*TlsSessionTicketKeys)(nil), // 9: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys - (*SdsSecretConfig)(nil), // 10: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - (*duration.Duration)(nil), // 11: google.protobuf.Duration - (*TlsParameters)(nil), // 12: envoy.extensions.transport_sockets.tls.v3.TlsParameters - (*TlsCertificate)(nil), // 13: envoy.extensions.transport_sockets.tls.v3.TlsCertificate - (*CertificateValidationContext)(nil), // 14: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext - (*v3.TypedExtensionConfig)(nil), // 15: envoy.config.core.v3.TypedExtensionConfig + (*TlsKeyLog)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.TlsKeyLog + (*CommonTlsContext)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext + (*CommonTlsContext_CertificateProvider)(nil), // 5: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider + (*CommonTlsContext_CertificateProviderInstance)(nil), // 6: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance + (*CommonTlsContext_CombinedCertificateValidationContext)(nil), // 7: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext + (*wrappers.UInt32Value)(nil), // 8: google.protobuf.UInt32Value + (*wrappers.BoolValue)(nil), // 9: google.protobuf.BoolValue + (*TlsSessionTicketKeys)(nil), // 10: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys + (*SdsSecretConfig)(nil), // 11: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + (*duration.Duration)(nil), // 12: google.protobuf.Duration + (*v3.CidrRange)(nil), // 13: envoy.config.core.v3.CidrRange + (*TlsParameters)(nil), // 14: envoy.extensions.transport_sockets.tls.v3.TlsParameters + (*TlsCertificate)(nil), // 15: envoy.extensions.transport_sockets.tls.v3.TlsCertificate + (*CertificateProviderPluginInstance)(nil), // 16: envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance + (*CertificateValidationContext)(nil), // 17: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext + (*v3.TypedExtensionConfig)(nil), // 18: envoy.config.core.v3.TypedExtensionConfig } var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext - 7, // 1: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext.max_session_keys:type_name -> google.protobuf.UInt32Value - 3, // 2: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext - 8, // 3: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.require_client_certificate:type_name -> google.protobuf.BoolValue - 8, // 4: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.require_sni:type_name -> google.protobuf.BoolValue - 9, // 5: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_ticket_keys:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys - 10, // 6: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_ticket_keys_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - 11, // 7: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_timeout:type_name -> google.protobuf.Duration + 4, // 0: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext + 8, // 1: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext.max_session_keys:type_name -> google.protobuf.UInt32Value + 4, // 2: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext + 9, // 3: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.require_client_certificate:type_name -> google.protobuf.BoolValue + 9, // 4: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.require_sni:type_name -> google.protobuf.BoolValue + 10, // 5: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_ticket_keys:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys + 11, // 6: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_ticket_keys_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 12, // 7: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_timeout:type_name -> google.protobuf.Duration 0, // 8: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.ocsp_staple_policy:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.OcspStaplePolicy - 12, // 9: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_params:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsParameters - 13, // 10: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificates:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsCertificate - 10, // 11: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_sds_secret_configs:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - 4, // 12: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider - 5, // 13: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance - 14, // 14: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext - 10, // 15: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - 6, // 16: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.combined_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext - 4, // 17: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider - 5, // 18: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance - 15, // 19: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.custom_handshaker:type_name -> envoy.config.core.v3.TypedExtensionConfig - 15, // 20: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider.typed_config:type_name -> envoy.config.core.v3.TypedExtensionConfig - 14, // 21: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.default_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext - 10, // 22: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig - 4, // 23: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider - 5, // 24: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 13, // 9: envoy.extensions.transport_sockets.tls.v3.TlsKeyLog.local_address_range:type_name -> envoy.config.core.v3.CidrRange + 13, // 10: envoy.extensions.transport_sockets.tls.v3.TlsKeyLog.remote_address_range:type_name -> envoy.config.core.v3.CidrRange + 14, // 11: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_params:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsParameters + 15, // 12: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificates:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsCertificate + 11, // 13: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_sds_secret_configs:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 16, // 14: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance + 5, // 15: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider + 6, // 16: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance + 17, // 17: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext + 11, // 18: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 7, // 19: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.combined_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext + 5, // 20: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider + 6, // 21: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance + 18, // 22: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.custom_handshaker:type_name -> envoy.config.core.v3.TypedExtensionConfig + 3, // 23: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.key_log:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsKeyLog + 18, // 24: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider.typed_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 17, // 25: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.default_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext + 11, // 26: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 5, // 27: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider + 6, // 28: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() } @@ -1201,7 +1367,7 @@ func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() { } } file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext); i { + switch v := v.(*TlsKeyLog); i { case 0: return &v.state case 1: @@ -1213,7 +1379,7 @@ func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() { } } file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext_CertificateProvider); i { + switch v := v.(*CommonTlsContext); i { case 0: return &v.state case 1: @@ -1225,7 +1391,7 @@ func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() { } } file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext_CertificateProviderInstance); i { + switch v := v.(*CommonTlsContext_CertificateProvider); i { case 0: return &v.state case 1: @@ -1237,6 +1403,18 @@ func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() { } } file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonTlsContext_CertificateProviderInstance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommonTlsContext_CombinedCertificateValidationContext); i { case 0: return &v.state @@ -1254,14 +1432,14 @@ func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() { (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig)(nil), (*DownstreamTlsContext_DisableStatelessSessionResumption)(nil), } - file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3].OneofWrappers = []interface{}{ (*CommonTlsContext_ValidationContext)(nil), (*CommonTlsContext_ValidationContextSdsSecretConfig)(nil), (*CommonTlsContext_CombinedValidationContext)(nil), (*CommonTlsContext_ValidationContextCertificateProvider)(nil), (*CommonTlsContext_ValidationContextCertificateProviderInstance)(nil), } - file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4].OneofWrappers = []interface{}{ (*CommonTlsContext_CertificateProvider_TypedConfig)(nil), } type x struct{} @@ -1270,7 +1448,7 @@ func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDesc, NumEnums: 1, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go index 7684bcb890..6656de555b 100644 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/transport_sockets/tls/v3/tls.proto -package envoy_extensions_transport_sockets_tls_v3 +package tlsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on UpstreamTlsContext with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *UpstreamTlsContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamTlsContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpstreamTlsContextMultiError, or nil if none found. +func (m *UpstreamTlsContext) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamTlsContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "CommonTlsContext", @@ -52,15 +87,38 @@ func (m *UpstreamTlsContext) Validate() error { } if len(m.GetSni()) > 255 { - return UpstreamTlsContextValidationError{ + err := UpstreamTlsContextValidationError{ field: "Sni", reason: "value length must be at most 255 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for AllowRenegotiation - if v, ok := interface{}(m.GetMaxSessionKeys()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxSessionKeys()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "MaxSessionKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamTlsContextValidationError{ + field: "MaxSessionKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxSessionKeys()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "MaxSessionKeys", @@ -70,9 +128,30 @@ func (m *UpstreamTlsContext) Validate() error { } } + if len(errors) > 0 { + return UpstreamTlsContextMultiError(errors) + } + return nil } +// UpstreamTlsContextMultiError is an error wrapping multiple validation errors +// returned by UpstreamTlsContext.ValidateAll() if the designated constraints +// aren't met. +type UpstreamTlsContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamTlsContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamTlsContextMultiError) AllErrors() []error { return m } + // UpstreamTlsContextValidationError is the validation error returned by // UpstreamTlsContext.Validate if the designated constraints aren't met. type UpstreamTlsContextValidationError struct { @@ -131,13 +210,46 @@ var _ interface { // Validate checks the field values on DownstreamTlsContext with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DownstreamTlsContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DownstreamTlsContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DownstreamTlsContextMultiError, or nil if none found. +func (m *DownstreamTlsContext) ValidateAll() error { + return m.validate(true) +} + +func (m *DownstreamTlsContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "CommonTlsContext", @@ -147,7 +259,26 @@ func (m *DownstreamTlsContext) Validate() error { } } - if v, ok := interface{}(m.GetRequireClientCertificate()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequireClientCertificate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireClientCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireClientCertificate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequireClientCertificate()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireClientCertificate", @@ -157,7 +288,26 @@ func (m *DownstreamTlsContext) Validate() error { } } - if v, ok := interface{}(m.GetRequireSni()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequireSni()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireSni", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "RequireSni", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequireSni()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireSni", @@ -168,39 +318,71 @@ func (m *DownstreamTlsContext) Validate() error { } if d := m.GetSessionTimeout(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return DownstreamTlsContextValidationError{ + err = DownstreamTlsContextValidationError{ field: "SessionTimeout", reason: "value is not a valid duration", cause: err, } - } + if !all { + return err + } + errors = append(errors, err) + } else { - lt := time.Duration(4294967296*time.Second + 0*time.Nanosecond) - gte := time.Duration(0*time.Second + 0*time.Nanosecond) + 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)", + if dur < gte || dur >= lt { + err := DownstreamTlsContextValidationError{ + field: "SessionTimeout", + reason: "value must be inside range [0s, 1193046h28m16s)", + } + if !all { + return err + } + errors = append(errors, err) } - } + } } if _, ok := DownstreamTlsContext_OcspStaplePolicy_name[int32(m.GetOcspStaplePolicy())]; !ok { - return DownstreamTlsContextValidationError{ + err := DownstreamTlsContextValidationError{ field: "OcspStaplePolicy", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.SessionTicketKeysType.(type) { case *DownstreamTlsContext_SessionTicketKeys: - if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSessionTicketKeys()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeys", @@ -212,7 +394,26 @@ func (m *DownstreamTlsContext) Validate() error { case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: - if v, ok := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeysSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DownstreamTlsContextValidationError{ + field: "SessionTicketKeysSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeysSdsSecretConfig", @@ -227,9 +428,30 @@ func (m *DownstreamTlsContext) Validate() error { } + if len(errors) > 0 { + return DownstreamTlsContextMultiError(errors) + } + return nil } +// DownstreamTlsContextMultiError is an error wrapping multiple validation +// errors returned by DownstreamTlsContext.ValidateAll() if the designated +// constraints aren't met. +type DownstreamTlsContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DownstreamTlsContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DownstreamTlsContextMultiError) AllErrors() []error { return m } + // DownstreamTlsContextValidationError is the validation error returned by // DownstreamTlsContext.Validate if the designated constraints aren't met. type DownstreamTlsContextValidationError struct { @@ -286,15 +508,226 @@ var _ interface { ErrorName() string } = DownstreamTlsContextValidationError{} +// Validate checks the field values on TlsKeyLog with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *TlsKeyLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TlsKeyLog with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TlsKeyLogMultiError, or nil +// if none found. +func (m *TlsKeyLog) ValidateAll() error { + return m.validate(true) +} + +func (m *TlsKeyLog) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPath()) < 1 { + err := TlsKeyLogValidationError{ + field: "Path", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetLocalAddressRange() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsKeyLogValidationError{ + field: fmt.Sprintf("LocalAddressRange[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsKeyLogValidationError{ + field: fmt.Sprintf("LocalAddressRange[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsKeyLogValidationError{ + field: fmt.Sprintf("LocalAddressRange[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetRemoteAddressRange() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TlsKeyLogValidationError{ + field: fmt.Sprintf("RemoteAddressRange[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TlsKeyLogValidationError{ + field: fmt.Sprintf("RemoteAddressRange[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsKeyLogValidationError{ + field: fmt.Sprintf("RemoteAddressRange[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return TlsKeyLogMultiError(errors) + } + + return nil +} + +// TlsKeyLogMultiError is an error wrapping multiple validation errors returned +// by TlsKeyLog.ValidateAll() if the designated constraints aren't met. +type TlsKeyLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TlsKeyLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TlsKeyLogMultiError) AllErrors() []error { return m } + +// TlsKeyLogValidationError is the validation error returned by +// TlsKeyLog.Validate if the designated constraints aren't met. +type TlsKeyLogValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TlsKeyLogValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TlsKeyLogValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TlsKeyLogValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TlsKeyLogValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TlsKeyLogValidationError) ErrorName() string { return "TlsKeyLogValidationError" } + +// Error satisfies the builtin error interface +func (e TlsKeyLogValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTlsKeyLog.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TlsKeyLogValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TlsKeyLogValidationError{} + // Validate checks the field values on CommonTlsContext with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CommonTlsContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonTlsContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonTlsContextMultiError, or nil if none found. +func (m *CommonTlsContext) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonTlsContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTlsParams()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTlsParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsParams()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "TlsParams", @@ -307,7 +740,26 @@ func (m *CommonTlsContext) Validate() error { for idx, item := range m.GetTlsCertificates() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: fmt.Sprintf("TlsCertificates[%v]", idx), @@ -319,17 +771,40 @@ func (m *CommonTlsContext) Validate() error { } - if len(m.GetTlsCertificateSdsSecretConfigs()) > 1 { - return CommonTlsContextValidationError{ + if len(m.GetTlsCertificateSdsSecretConfigs()) > 2 { + err := CommonTlsContextValidationError{ field: "TlsCertificateSdsSecretConfigs", - reason: "value must contain no more than 1 item(s)", + reason: "value must contain no more than 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetTlsCertificateSdsSecretConfigs() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), @@ -341,7 +816,55 @@ func (m *CommonTlsContext) Validate() error { } - if v, ok := interface{}(m.GetTlsCertificateCertificateProvider()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsCertificateProviderInstance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCertificateProviderInstance()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: "TlsCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTlsCertificateCertificateProvider()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsCertificateCertificateProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsCertificateCertificateProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCertificateCertificateProvider()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "TlsCertificateCertificateProvider", @@ -351,7 +874,26 @@ func (m *CommonTlsContext) Validate() error { } } - if v, ok := interface{}(m.GetTlsCertificateCertificateProviderInstance()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTlsCertificateCertificateProviderInstance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsCertificateCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "TlsCertificateCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCertificateCertificateProviderInstance()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "TlsCertificateCertificateProviderInstance", @@ -361,7 +903,26 @@ func (m *CommonTlsContext) Validate() error { } } - if v, ok := interface{}(m.GetCustomHandshaker()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCustomHandshaker()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "CustomHandshaker", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "CustomHandshaker", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomHandshaker()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "CustomHandshaker", @@ -371,11 +932,59 @@ func (m *CommonTlsContext) Validate() error { } } + if all { + switch v := interface{}(m.GetKeyLog()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "KeyLog", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "KeyLog", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeyLog()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: "KeyLog", + reason: "embedded message failed validation", + cause: err, + } + } + } + switch m.ValidationContextType.(type) { case *CommonTlsContext_ValidationContext: - if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "ValidationContext", @@ -387,7 +996,26 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_ValidationContextSdsSecretConfig: - if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "ValidationContextSdsSecretConfig", @@ -399,7 +1027,26 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_CombinedValidationContext: - if v, ok := interface{}(m.GetCombinedValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCombinedValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "CombinedValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "CombinedValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCombinedValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "CombinedValidationContext", @@ -411,7 +1058,26 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_ValidationContextCertificateProvider: - if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextCertificateProvider()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextCertificateProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextCertificateProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "ValidationContextCertificateProvider", @@ -423,7 +1089,26 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_ValidationContextCertificateProviderInstance: - if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextCertificateProviderInstance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContextValidationError{ + field: "ValidationContextCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContextValidationError{ field: "ValidationContextCertificateProviderInstance", @@ -435,9 +1120,30 @@ func (m *CommonTlsContext) Validate() error { } + if len(errors) > 0 { + return CommonTlsContextMultiError(errors) + } + return nil } +// CommonTlsContextMultiError is an error wrapping multiple validation errors +// returned by CommonTlsContext.ValidateAll() if the designated constraints +// aren't met. +type CommonTlsContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonTlsContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonTlsContextMultiError) AllErrors() []error { return m } + // CommonTlsContextValidationError is the validation error returned by // CommonTlsContext.Validate if the designated constraints aren't met. type CommonTlsContextValidationError struct { @@ -494,24 +1200,62 @@ var _ interface { // Validate checks the field values on CommonTlsContext_CertificateProvider // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *CommonTlsContext_CertificateProvider) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonTlsContext_CertificateProvider +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// CommonTlsContext_CertificateProviderMultiError, or nil if none found. +func (m *CommonTlsContext_CertificateProvider) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonTlsContext_CertificateProvider) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return CommonTlsContext_CertificateProviderValidationError{ + err := CommonTlsContext_CertificateProviderValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.Config.(type) { case *CommonTlsContext_CertificateProvider_TypedConfig: - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContext_CertificateProviderValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContext_CertificateProviderValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CertificateProviderValidationError{ field: "TypedConfig", @@ -522,16 +1266,42 @@ func (m *CommonTlsContext_CertificateProvider) Validate() error { } default: - return CommonTlsContext_CertificateProviderValidationError{ + err := CommonTlsContext_CertificateProviderValidationError{ field: "Config", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return CommonTlsContext_CertificateProviderMultiError(errors) } return nil } +// CommonTlsContext_CertificateProviderMultiError is an error wrapping multiple +// validation errors returned by +// CommonTlsContext_CertificateProvider.ValidateAll() if the designated +// constraints aren't met. +type CommonTlsContext_CertificateProviderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonTlsContext_CertificateProviderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonTlsContext_CertificateProviderMultiError) AllErrors() []error { return m } + // CommonTlsContext_CertificateProviderValidationError is the validation error // returned by CommonTlsContext_CertificateProvider.Validate if the designated // constraints aren't met. @@ -591,19 +1361,57 @@ var _ interface { // Validate checks the field values on // CommonTlsContext_CertificateProviderInstance with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CommonTlsContext_CertificateProviderInstance) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// CommonTlsContext_CertificateProviderInstance with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// CommonTlsContext_CertificateProviderInstanceMultiError, or nil if none found. +func (m *CommonTlsContext_CertificateProviderInstance) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonTlsContext_CertificateProviderInstance) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for InstanceName // no validation rules for CertificateName + if len(errors) > 0 { + return CommonTlsContext_CertificateProviderInstanceMultiError(errors) + } + return nil } +// CommonTlsContext_CertificateProviderInstanceMultiError is an error wrapping +// multiple validation errors returned by +// CommonTlsContext_CertificateProviderInstance.ValidateAll() if the +// designated constraints aren't met. +type CommonTlsContext_CertificateProviderInstanceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonTlsContext_CertificateProviderInstanceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonTlsContext_CertificateProviderInstanceMultiError) AllErrors() []error { return m } + // CommonTlsContext_CertificateProviderInstanceValidationError is the // validation error returned by // CommonTlsContext_CertificateProviderInstance.Validate if the designated @@ -665,20 +1473,59 @@ var _ interface { // Validate checks the field values on // CommonTlsContext_CombinedCertificateValidationContext with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// CommonTlsContext_CombinedCertificateValidationContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CommonTlsContext_CombinedCertificateValidationContextMultiError, or nil if +// none found. +func (m *CommonTlsContext_CombinedCertificateValidationContext) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonTlsContext_CombinedCertificateValidationContext) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetDefaultValidationContext() == nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ + err := CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetDefaultValidationContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDefaultValidationContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "DefaultValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "DefaultValidationContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultValidationContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", @@ -689,13 +1536,36 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } if m.GetValidationContextSdsSecretConfig() == nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ + err := CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", @@ -705,7 +1575,26 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } } - if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextCertificateProvider()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextCertificateProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextCertificateProvider", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextCertificateProvider", @@ -715,7 +1604,26 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } } - if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValidationContextCertificateProviderInstance()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextCertificateProviderInstance", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextCertificateProviderInstance", @@ -725,9 +1633,33 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } } + if len(errors) > 0 { + return CommonTlsContext_CombinedCertificateValidationContextMultiError(errors) + } + return nil } +// CommonTlsContext_CombinedCertificateValidationContextMultiError is an error +// wrapping multiple validation errors returned by +// CommonTlsContext_CombinedCertificateValidationContext.ValidateAll() if the +// designated constraints aren't met. +type CommonTlsContext_CombinedCertificateValidationContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) AllErrors() []error { + return m +} + // CommonTlsContext_CombinedCertificateValidationContextValidationError is the // validation error returned by // CommonTlsContext_CombinedCertificateValidationContext.Validate if the diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.go new file mode 100644 index 0000000000..4602ffbb85 --- /dev/null +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.go @@ -0,0 +1,286 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto + +package tlsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration specific to the `SPIFFE `_ certificate validator. +// +// Example: +// +// .. validated-code-block:: yaml +// :type-name: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext +// +// custom_validator_config: +// name: envoy.tls.cert_validator.spiffe +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig +// trust_domains: +// - name: foo.com +// trust_bundle: +// filename: "foo.pem" +// - name: envoy.com +// trust_bundle: +// filename: "envoy.pem" +// +// In this example, a presented peer certificate whose SAN matches `spiffe//foo.com/**` is validated against +// the "foo.pem" x.509 certificate. All the trust bundles are isolated from each other, so no trust domain can mint +// a SVID belonging to another trust domain. That means, in this example, a SVID signed by `envoy.com`'s CA with `spiffe//foo.com/**` +// SAN would be rejected since Envoy selects the trust bundle according to the presented SAN before validate the certificate. +// +// Note that SPIFFE validator inherits and uses the following options from :ref:`CertificateValidationContext `. +// +// - :ref:`allow_expired_certificate ` to allow expired certificates. +// - :ref:`match_typed_subject_alt_names ` to match **URI** SAN of certificates. Unlike the default validator, SPIFFE validator only matches **URI** SAN (which equals to SVID in SPIFFE terminology) and ignore other SAN types. +// +type SPIFFECertValidatorConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field specifies trust domains used for validating incoming X.509-SVID(s). + TrustDomains []*SPIFFECertValidatorConfig_TrustDomain `protobuf:"bytes,1,rep,name=trust_domains,json=trustDomains,proto3" json:"trust_domains,omitempty"` +} + +func (x *SPIFFECertValidatorConfig) Reset() { + *x = SPIFFECertValidatorConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SPIFFECertValidatorConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SPIFFECertValidatorConfig) ProtoMessage() {} + +func (x *SPIFFECertValidatorConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SPIFFECertValidatorConfig.ProtoReflect.Descriptor instead. +func (*SPIFFECertValidatorConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescGZIP(), []int{0} +} + +func (x *SPIFFECertValidatorConfig) GetTrustDomains() []*SPIFFECertValidatorConfig_TrustDomain { + if x != nil { + return x.TrustDomains + } + return nil +} + +type SPIFFECertValidatorConfig_TrustDomain struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the trust domain, `example.com`, `foo.bar.gov` for example. + // Note that this must *not* have "spiffe://" prefix. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Specify a data source holding x.509 trust bundle used for validating incoming SVID(s) in this trust domain. + TrustBundle *v3.DataSource `protobuf:"bytes,2,opt,name=trust_bundle,json=trustBundle,proto3" json:"trust_bundle,omitempty"` +} + +func (x *SPIFFECertValidatorConfig_TrustDomain) Reset() { + *x = SPIFFECertValidatorConfig_TrustDomain{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SPIFFECertValidatorConfig_TrustDomain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SPIFFECertValidatorConfig_TrustDomain) ProtoMessage() {} + +func (x *SPIFFECertValidatorConfig_TrustDomain) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SPIFFECertValidatorConfig_TrustDomain.ProtoReflect.Descriptor instead. +func (*SPIFFECertValidatorConfig_TrustDomain) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *SPIFFECertValidatorConfig_TrustDomain) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SPIFFECertValidatorConfig_TrustDomain) GetTrustBundle() *v3.DataSource { + if x != nil { + return x.TrustBundle + } + return nil +} + +var File_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc = []byte{ + 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73, 0x5f, + 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x19, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, 0x43, 0x65, 0x72, 0x74, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x7f, 0x0a, 0x0d, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, 0x43, 0x65, 0x72, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x75, + 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, + 0x1a, 0x6f, 0x0a, 0x0b, 0x54, 0x72, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, + 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0c, + 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, + 0x65, 0x42, 0xba, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1d, 0x54, + 0x6c, 0x73, 0x53, 0x70, 0x69, 0x66, 0x66, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, + 0x3b, 0x74, 0x6c, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_goTypes = []interface{}{ + (*SPIFFECertValidatorConfig)(nil), // 0: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig + (*SPIFFECertValidatorConfig_TrustDomain)(nil), // 1: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.TrustDomain + (*v3.DataSource)(nil), // 2: envoy.config.core.v3.DataSource +} +var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.trust_domains:type_name -> envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.TrustDomain + 2, // 1: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.TrustDomain.trust_bundle:type_name -> envoy.config.core.v3.DataSource + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_init() } +func file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_init() { + if File_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SPIFFECertValidatorConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SPIFFECertValidatorConfig_TrustDomain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto = out.File + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_goTypes = nil + file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.validate.go new file mode 100644 index 0000000000..c15476be59 --- /dev/null +++ b/pkg/api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.validate.go @@ -0,0 +1,328 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto + +package tlsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SPIFFECertValidatorConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SPIFFECertValidatorConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SPIFFECertValidatorConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SPIFFECertValidatorConfigMultiError, or nil if none found. +func (m *SPIFFECertValidatorConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SPIFFECertValidatorConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetTrustDomains()) < 1 { + err := SPIFFECertValidatorConfigValidationError{ + field: "TrustDomains", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetTrustDomains() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SPIFFECertValidatorConfigValidationError{ + field: fmt.Sprintf("TrustDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SPIFFECertValidatorConfigValidationError{ + field: fmt.Sprintf("TrustDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SPIFFECertValidatorConfigValidationError{ + field: fmt.Sprintf("TrustDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SPIFFECertValidatorConfigMultiError(errors) + } + + return nil +} + +// SPIFFECertValidatorConfigMultiError is an error wrapping multiple validation +// errors returned by SPIFFECertValidatorConfig.ValidateAll() if the +// designated constraints aren't met. +type SPIFFECertValidatorConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SPIFFECertValidatorConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SPIFFECertValidatorConfigMultiError) AllErrors() []error { return m } + +// SPIFFECertValidatorConfigValidationError is the validation error returned by +// SPIFFECertValidatorConfig.Validate if the designated constraints aren't met. +type SPIFFECertValidatorConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SPIFFECertValidatorConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SPIFFECertValidatorConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SPIFFECertValidatorConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SPIFFECertValidatorConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SPIFFECertValidatorConfigValidationError) ErrorName() string { + return "SPIFFECertValidatorConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e SPIFFECertValidatorConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSPIFFECertValidatorConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SPIFFECertValidatorConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SPIFFECertValidatorConfigValidationError{} + +// Validate checks the field values on SPIFFECertValidatorConfig_TrustDomain +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *SPIFFECertValidatorConfig_TrustDomain) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SPIFFECertValidatorConfig_TrustDomain +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// SPIFFECertValidatorConfig_TrustDomainMultiError, or nil if none found. +func (m *SPIFFECertValidatorConfig_TrustDomain) ValidateAll() error { + return m.validate(true) +} + +func (m *SPIFFECertValidatorConfig_TrustDomain) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := SPIFFECertValidatorConfig_TrustDomainValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTrustBundle()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SPIFFECertValidatorConfig_TrustDomainValidationError{ + field: "TrustBundle", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SPIFFECertValidatorConfig_TrustDomainValidationError{ + field: "TrustBundle", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrustBundle()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SPIFFECertValidatorConfig_TrustDomainValidationError{ + field: "TrustBundle", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return SPIFFECertValidatorConfig_TrustDomainMultiError(errors) + } + + return nil +} + +// SPIFFECertValidatorConfig_TrustDomainMultiError is an error wrapping +// multiple validation errors returned by +// SPIFFECertValidatorConfig_TrustDomain.ValidateAll() if the designated +// constraints aren't met. +type SPIFFECertValidatorConfig_TrustDomainMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SPIFFECertValidatorConfig_TrustDomainMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SPIFFECertValidatorConfig_TrustDomainMultiError) AllErrors() []error { return m } + +// SPIFFECertValidatorConfig_TrustDomainValidationError is the validation error +// returned by SPIFFECertValidatorConfig_TrustDomain.Validate if the +// designated constraints aren't met. +type SPIFFECertValidatorConfig_TrustDomainValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SPIFFECertValidatorConfig_TrustDomainValidationError) ErrorName() string { + return "SPIFFECertValidatorConfig_TrustDomainValidationError" +} + +// Error satisfies the builtin error interface +func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSPIFFECertValidatorConfig_TrustDomain.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SPIFFECertValidatorConfig_TrustDomainValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SPIFFECertValidatorConfig_TrustDomainValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/common.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/common.pb.go deleted file mode 100644 index bcec86cef9..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/common.pb.go +++ /dev/null @@ -1,1132 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/transport_sockets/tls/v4alpha/common.proto - -package envoy_extensions_transport_sockets_tls_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - _ "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/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type 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 -) - -// Enum value maps for TlsParameters_TlsProtocol. -var ( - TlsParameters_TlsProtocol_name = map[int32]string{ - 0: "TLS_AUTO", - 1: "TLSv1_0", - 2: "TLSv1_1", - 3: "TLSv1_2", - 4: "TLSv1_3", - } - TlsParameters_TlsProtocol_value = map[string]int32{ - "TLS_AUTO": 0, - "TLSv1_0": 1, - "TLSv1_1": 2, - "TLSv1_2": 3, - "TLSv1_3": 4, - } -) - -func (x TlsParameters_TlsProtocol) Enum() *TlsParameters_TlsProtocol { - p := new(TlsParameters_TlsProtocol) - *p = x - return p -} - -func (x TlsParameters_TlsProtocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TlsParameters_TlsProtocol) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_enumTypes[0].Descriptor() -} - -func (TlsParameters_TlsProtocol) Type() protoreflect.EnumType { - return &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_enumTypes[0] -} - -func (x TlsParameters_TlsProtocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TlsParameters_TlsProtocol.Descriptor instead. -func (TlsParameters_TlsProtocol) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP(), []int{0, 0} -} - -// Peer certificate verification mode. -type CertificateValidationContext_TrustChainVerification int32 - -const ( - // Perform default certificate verification (e.g., against CA / verification lists) - CertificateValidationContext_VERIFY_TRUST_CHAIN CertificateValidationContext_TrustChainVerification = 0 - // Connections where the certificate fails verification will be permitted. - // For HTTP connections, the result of certificate verification can be used in route matching. ( - // see :ref:`validated ` ). - CertificateValidationContext_ACCEPT_UNTRUSTED CertificateValidationContext_TrustChainVerification = 1 -) - -// Enum value maps for CertificateValidationContext_TrustChainVerification. -var ( - CertificateValidationContext_TrustChainVerification_name = map[int32]string{ - 0: "VERIFY_TRUST_CHAIN", - 1: "ACCEPT_UNTRUSTED", - } - CertificateValidationContext_TrustChainVerification_value = map[string]int32{ - "VERIFY_TRUST_CHAIN": 0, - "ACCEPT_UNTRUSTED": 1, - } -) - -func (x CertificateValidationContext_TrustChainVerification) Enum() *CertificateValidationContext_TrustChainVerification { - p := new(CertificateValidationContext_TrustChainVerification) - *p = x - return p -} - -func (x CertificateValidationContext_TrustChainVerification) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CertificateValidationContext_TrustChainVerification) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_enumTypes[1].Descriptor() -} - -func (CertificateValidationContext_TrustChainVerification) Type() protoreflect.EnumType { - return &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_enumTypes[1] -} - -func (x CertificateValidationContext_TrustChainVerification) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CertificateValidationContext_TrustChainVerification.Descriptor instead. -func (CertificateValidationContext_TrustChainVerification) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP(), []int{4, 0} -} - -type TlsParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for - // servers. - TlsMinimumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,1,opt,name=tls_minimum_protocol_version,json=tlsMinimumProtocolVersion,proto3,enum=envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters_TlsProtocol" json:"tls_minimum_protocol_version,omitempty"` - // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for - // servers. - TlsMaximumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,2,opt,name=tls_maximum_protocol_version,json=tlsMaximumProtocolVersion,proto3,enum=envoy.extensions.transport_sockets.tls.v4alpha.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"` -} - -func (x *TlsParameters) Reset() { - *x = TlsParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TlsParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TlsParameters) ProtoMessage() {} - -func (x *TlsParameters) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TlsParameters.ProtoReflect.Descriptor instead. -func (*TlsParameters) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP(), []int{0} -} - -func (x *TlsParameters) GetTlsMinimumProtocolVersion() TlsParameters_TlsProtocol { - if x != nil { - return x.TlsMinimumProtocolVersion - } - return TlsParameters_TLS_AUTO -} - -func (x *TlsParameters) GetTlsMaximumProtocolVersion() TlsParameters_TlsProtocol { - if x != nil { - return x.TlsMaximumProtocolVersion - } - return TlsParameters_TLS_AUTO -} - -func (x *TlsParameters) GetCipherSuites() []string { - if x != nil { - return x.CipherSuites - } - return nil -} - -func (x *TlsParameters) GetEcdhCurves() []string { - if x != nil { - return x.EcdhCurves - } - return nil -} - -// BoringSSL private key method configuration. The private key methods are used for external -// (potentially asynchronous) signing and decryption operations. Some use cases for private key -// methods would be TPM support and TLS acceleration. -type PrivateKeyProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Private key method provider name. The name must match a - // supported private key method provider type. - ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"` - // Private key method provider specific configuration. - // - // Types that are assignable to ConfigType: - // *PrivateKeyProvider_TypedConfig - ConfigType isPrivateKeyProvider_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *PrivateKeyProvider) Reset() { - *x = PrivateKeyProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrivateKeyProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivateKeyProvider) ProtoMessage() {} - -func (x *PrivateKeyProvider) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrivateKeyProvider.ProtoReflect.Descriptor instead. -func (*PrivateKeyProvider) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP(), []int{1} -} - -func (x *PrivateKeyProvider) GetProviderName() string { - if x != nil { - return x.ProviderName - } - return "" -} - -func (m *PrivateKeyProvider) GetConfigType() isPrivateKeyProvider_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *PrivateKeyProvider) GetTypedConfig() *any.Any { - if x, ok := x.GetConfigType().(*PrivateKeyProvider_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isPrivateKeyProvider_ConfigType interface { - isPrivateKeyProvider_ConfigType() -} - -type PrivateKeyProvider_TypedConfig struct { - TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*PrivateKeyProvider_TypedConfig) isPrivateKeyProvider_ConfigType() {} - -// [#next-free-field: 8] -type TlsCertificate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The TLS certificate chain. - // - // If *certificate_chain* is a filesystem path, a watch will be added to the - // parent directory for any file moves to support rotation. This currently - // only applies to dynamic secrets, when the *TlsCertificate* is delivered via - // SDS. - CertificateChain *v4alpha.DataSource `protobuf:"bytes,1,opt,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` - // The TLS private key. - // - // If *private_key* is a filesystem path, a watch will be added to the parent - // directory for any file moves to support rotation. This currently only - // applies to dynamic secrets, when the *TlsCertificate* is delivered via SDS. - PrivateKey *v4alpha.DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // If specified, updates of file-based *certificate_chain* and *private_key* - // sources will be triggered by this watch. The certificate/key pair will be - // read together and validated for atomic read consistency (i.e. no - // intervening modification occurred between cert/key read, verified by file - // hash comparisons). This allows explicit control over the path watched, by - // default the parent directories of the filesystem paths in - // *certificate_chain* and *private_key* are watched if this field is not - // specified. This only applies when a *TlsCertificate* is delivered by SDS - // with references to filesystem paths. See the :ref:`SDS key rotation - // ` documentation for further details. - WatchedDirectory *v4alpha.WatchedDirectory `protobuf:"bytes,7,opt,name=watched_directory,json=watchedDirectory,proto3" json:"watched_directory,omitempty"` - // BoringSSL private key method provider. This is an alternative to :ref:`private_key - // ` field. This can't be - // marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key - // ` and - // :ref:`private_key_provider - // ` fields will result in an - // error. - PrivateKeyProvider *PrivateKeyProvider `protobuf:"bytes,6,opt,name=private_key_provider,json=privateKeyProvider,proto3" json:"private_key_provider,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 *v4alpha.DataSource `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - // The OCSP response to be stapled with this certificate during the handshake. - // The response must be DER-encoded and may only be provided via ``filename`` or - // ``inline_bytes``. The response may pertain to only one certificate. - OcspStaple *v4alpha.DataSource `protobuf:"bytes,4,opt,name=ocsp_staple,json=ocspStaple,proto3" json:"ocsp_staple,omitempty"` - // [#not-implemented-hide:] - SignedCertificateTimestamp []*v4alpha.DataSource `protobuf:"bytes,5,rep,name=signed_certificate_timestamp,json=signedCertificateTimestamp,proto3" json:"signed_certificate_timestamp,omitempty"` -} - -func (x *TlsCertificate) Reset() { - *x = TlsCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TlsCertificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TlsCertificate) ProtoMessage() {} - -func (x *TlsCertificate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TlsCertificate.ProtoReflect.Descriptor instead. -func (*TlsCertificate) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP(), []int{2} -} - -func (x *TlsCertificate) GetCertificateChain() *v4alpha.DataSource { - if x != nil { - return x.CertificateChain - } - return nil -} - -func (x *TlsCertificate) GetPrivateKey() *v4alpha.DataSource { - if x != nil { - return x.PrivateKey - } - return nil -} - -func (x *TlsCertificate) GetWatchedDirectory() *v4alpha.WatchedDirectory { - if x != nil { - return x.WatchedDirectory - } - return nil -} - -func (x *TlsCertificate) GetPrivateKeyProvider() *PrivateKeyProvider { - if x != nil { - return x.PrivateKeyProvider - } - return nil -} - -func (x *TlsCertificate) GetPassword() *v4alpha.DataSource { - if x != nil { - return x.Password - } - return nil -} - -func (x *TlsCertificate) GetOcspStaple() *v4alpha.DataSource { - if x != nil { - return x.OcspStaple - } - return nil -} - -func (x *TlsCertificate) GetSignedCertificateTimestamp() []*v4alpha.DataSource { - if x != nil { - return x.SignedCertificateTimestamp - } - return nil -} - -type TlsSessionTicketKeys struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 []*v4alpha.DataSource `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *TlsSessionTicketKeys) Reset() { - *x = TlsSessionTicketKeys{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TlsSessionTicketKeys) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TlsSessionTicketKeys) ProtoMessage() {} - -func (x *TlsSessionTicketKeys) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TlsSessionTicketKeys.ProtoReflect.Descriptor instead. -func (*TlsSessionTicketKeys) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP(), []int{3} -} - -func (x *TlsSessionTicketKeys) GetKeys() []*v4alpha.DataSource { - if x != nil { - return x.Keys - } - return nil -} - -// [#next-free-field: 12] -type CertificateValidationContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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:`match_subject_alt_names - // `) 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. Note - // that if a CRL is provided for any certificate authority in a trust chain, a CRL must be - // provided for all certificate authorities in that chain. Failure to do so will result in - // verification failure for both revoked and unrevoked certificates from that chain. - // - // See :ref:`the TLS overview ` for a list of common - // system CA locations. - // - // If *trusted_ca* is a filesystem path, a watch will be added to the parent - // directory for any file moves to support rotation. This currently only - // applies to dynamic secrets, when the *CertificateValidationContext* is - // delivered via SDS. - TrustedCa *v4alpha.DataSource `protobuf:"bytes,1,opt,name=trusted_ca,json=trustedCa,proto3" json:"trusted_ca,omitempty"` - // If specified, updates of a file-based *trusted_ca* source will be triggered - // by this watch. This allows explicit control over the path watched, by - // default the parent directory of the filesystem path in *trusted_ca* is - // watched if this field is not specified. This only applies when a - // *CertificateValidationContext* is delivered by SDS with references to - // filesystem paths. See the :ref:`SDS key rotation ` - // documentation for further details. - WatchedDirectory *v4alpha.WatchedDirectory `protobuf:"bytes,11,opt,name=watched_directory,json=watchedDirectory,proto3" json:"watched_directory,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 name matchers. If specified, Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified matchers. - // - // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be - // configured with exact match type in the :ref:`string matcher `. - // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", - // it should be configured as shown below. - // - // .. code-block:: yaml - // - // match_subject_alt_names: - // exact: "api.example.com" - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - MatchSubjectAltNames []*v4alpha1.StringMatcher `protobuf:"bytes,9,rep,name=match_subject_alt_names,json=matchSubjectAltNames,proto3" json:"match_subject_alt_names,omitempty"` - // [#not-implemented-hide:] Must present signed certificate time-stamp. - RequireSignedCertificateTimestamp *wrappers.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. Note that if a CRL is provided - // for any certificate authority in a trust chain, a CRL must be provided - // for all certificate authorities in that chain. Failure to do so will - // result in verification failure for both revoked and unrevoked certificates - // from that chain. - Crl *v4alpha.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"` - // Certificate trust chain verification mode. - TrustChainVerification CertificateValidationContext_TrustChainVerification `protobuf:"varint,10,opt,name=trust_chain_verification,json=trustChainVerification,proto3,enum=envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext_TrustChainVerification" json:"trust_chain_verification,omitempty"` -} - -func (x *CertificateValidationContext) Reset() { - *x = CertificateValidationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CertificateValidationContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CertificateValidationContext) ProtoMessage() {} - -func (x *CertificateValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CertificateValidationContext.ProtoReflect.Descriptor instead. -func (*CertificateValidationContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP(), []int{4} -} - -func (x *CertificateValidationContext) GetTrustedCa() *v4alpha.DataSource { - if x != nil { - return x.TrustedCa - } - return nil -} - -func (x *CertificateValidationContext) GetWatchedDirectory() *v4alpha.WatchedDirectory { - if x != nil { - return x.WatchedDirectory - } - return nil -} - -func (x *CertificateValidationContext) GetVerifyCertificateSpki() []string { - if x != nil { - return x.VerifyCertificateSpki - } - return nil -} - -func (x *CertificateValidationContext) GetVerifyCertificateHash() []string { - if x != nil { - return x.VerifyCertificateHash - } - return nil -} - -func (x *CertificateValidationContext) GetMatchSubjectAltNames() []*v4alpha1.StringMatcher { - if x != nil { - return x.MatchSubjectAltNames - } - return nil -} - -func (x *CertificateValidationContext) GetRequireSignedCertificateTimestamp() *wrappers.BoolValue { - if x != nil { - return x.RequireSignedCertificateTimestamp - } - return nil -} - -func (x *CertificateValidationContext) GetCrl() *v4alpha.DataSource { - if x != nil { - return x.Crl - } - return nil -} - -func (x *CertificateValidationContext) GetAllowExpiredCertificate() bool { - if x != nil { - return x.AllowExpiredCertificate - } - return false -} - -func (x *CertificateValidationContext) GetTrustChainVerification() CertificateValidationContext_TrustChainVerification { - if x != nil { - return x.TrustChainVerification - } - return CertificateValidationContext_VERIFY_TRUST_CHAIN -} - -var File_envoy_extensions_transport_sockets_tls_v4alpha_common_proto protoreflect.FileDescriptor - -var file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x94, 0x04, 0x0a, 0x0d, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x6c, 0x73, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x1c, - 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x61, 0x78, 0x69, - 0x6d, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, - 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x69, 0x70, 0x68, 0x65, - 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x63, 0x64, 0x68, 0x5f, - 0x63, 0x75, 0x72, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x63, - 0x64, 0x68, 0x43, 0x75, 0x72, 0x76, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0b, 0x54, 0x6c, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4c, 0x53, 0x5f, 0x41, - 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x30, - 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x31, 0x10, 0x02, 0x12, - 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, - 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xe7, 0x01, 0x0a, 0x12, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x12, 0x2c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, - 0x02, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x22, 0xc1, 0x05, 0x0a, 0x0e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x4e, 0x0a, 0x0b, 0x70, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0a, - 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x58, 0x0a, 0x11, 0x77, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x79, 0x12, 0x74, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x12, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x46, 0x0a, 0x0b, 0x6f, 0x63, 0x73, 0x70, 0x5f, 0x73, 0x74, - 0x61, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x0a, 0x6f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x12, 0x67, 0x0a, - 0x1c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x1a, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x14, 0x54, 0x6c, 0x73, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, - 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0xb8, - 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x3a, 0x45, 0x9a, 0xc5, 0x88, - 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, - 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, - 0x79, 0x73, 0x22, 0xf8, 0x07, 0x0a, 0x1c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x0a, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, - 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, 0x61, 0x12, 0x58, 0x0a, 0x11, 0x77, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x6b, 0x69, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, - 0x10, 0x2c, 0x28, 0x2c, 0x52, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6b, 0x69, 0x12, 0x46, 0x0a, 0x17, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, - 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x10, 0x40, 0x28, 0x5f, 0x52, 0x15, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x60, 0x0a, 0x17, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, - 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x24, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x37, 0x0a, 0x03, 0x63, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x03, 0x63, 0x72, 0x6c, 0x12, 0x3a, 0x0a, 0x19, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0xa7, 0x01, 0x0a, 0x18, 0x74, 0x72, 0x75, 0x73, - 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x63, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x16, 0x74, 0x72, 0x75, 0x73, 0x74, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x46, 0x0a, 0x16, 0x54, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x56, - 0x45, 0x52, 0x49, 0x46, 0x59, 0x5f, 0x54, 0x52, 0x55, 0x53, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x49, - 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x55, 0x4e, - 0x54, 0x52, 0x55, 0x53, 0x54, 0x45, 0x44, 0x10, 0x01, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, - 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, - 0x08, 0x05, 0x10, 0x06, 0x52, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x55, 0x0a, - 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescOnce sync.Once - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDesc -) - -func file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescGZIP() []byte { - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescOnce.Do(func() { - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescData) - }) - return file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDescData -} - -var file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_goTypes = []interface{}{ - (TlsParameters_TlsProtocol)(0), // 0: envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters.TlsProtocol - (CertificateValidationContext_TrustChainVerification)(0), // 1: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.TrustChainVerification - (*TlsParameters)(nil), // 2: envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters - (*PrivateKeyProvider)(nil), // 3: envoy.extensions.transport_sockets.tls.v4alpha.PrivateKeyProvider - (*TlsCertificate)(nil), // 4: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate - (*TlsSessionTicketKeys)(nil), // 5: envoy.extensions.transport_sockets.tls.v4alpha.TlsSessionTicketKeys - (*CertificateValidationContext)(nil), // 6: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext - (*any.Any)(nil), // 7: google.protobuf.Any - (*v4alpha.DataSource)(nil), // 8: envoy.config.core.v4alpha.DataSource - (*v4alpha.WatchedDirectory)(nil), // 9: envoy.config.core.v4alpha.WatchedDirectory - (*v4alpha1.StringMatcher)(nil), // 10: envoy.type.matcher.v4alpha.StringMatcher - (*wrappers.BoolValue)(nil), // 11: google.protobuf.BoolValue -} -var file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_depIdxs = []int32{ - 0, // 0: envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters.tls_minimum_protocol_version:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters.TlsProtocol - 0, // 1: envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters.tls_maximum_protocol_version:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters.TlsProtocol - 7, // 2: envoy.extensions.transport_sockets.tls.v4alpha.PrivateKeyProvider.typed_config:type_name -> google.protobuf.Any - 8, // 3: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate.certificate_chain:type_name -> envoy.config.core.v4alpha.DataSource - 8, // 4: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate.private_key:type_name -> envoy.config.core.v4alpha.DataSource - 9, // 5: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate.watched_directory:type_name -> envoy.config.core.v4alpha.WatchedDirectory - 3, // 6: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate.private_key_provider:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.PrivateKeyProvider - 8, // 7: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate.password:type_name -> envoy.config.core.v4alpha.DataSource - 8, // 8: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate.ocsp_staple:type_name -> envoy.config.core.v4alpha.DataSource - 8, // 9: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate.signed_certificate_timestamp:type_name -> envoy.config.core.v4alpha.DataSource - 8, // 10: envoy.extensions.transport_sockets.tls.v4alpha.TlsSessionTicketKeys.keys:type_name -> envoy.config.core.v4alpha.DataSource - 8, // 11: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.trusted_ca:type_name -> envoy.config.core.v4alpha.DataSource - 9, // 12: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.watched_directory:type_name -> envoy.config.core.v4alpha.WatchedDirectory - 10, // 13: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.match_subject_alt_names:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 11, // 14: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.require_signed_certificate_timestamp:type_name -> google.protobuf.BoolValue - 8, // 15: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.crl:type_name -> envoy.config.core.v4alpha.DataSource - 1, // 16: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.trust_chain_verification:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext.TrustChainVerification - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_init() } -func file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_init() { - if File_envoy_extensions_transport_sockets_tls_v4alpha_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TlsParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivateKeyProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TlsCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TlsSessionTicketKeys); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertificateValidationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*PrivateKeyProvider_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDesc, - NumEnums: 2, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_goTypes, - DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_depIdxs, - EnumInfos: file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_enumTypes, - MessageInfos: file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_msgTypes, - }.Build() - File_envoy_extensions_transport_sockets_tls_v4alpha_common_proto = out.File - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_rawDesc = nil - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_goTypes = nil - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/common.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/common.pb.validate.go deleted file mode 100644 index 4163e402b5..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/common.pb.validate.go +++ /dev/null @@ -1,602 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/transport_sockets/tls/v4alpha/common.proto - -package envoy_extensions_transport_sockets_tls_v4alpha - -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{} -) - -// 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. -func (m *TlsParameters) Validate() error { - if m == nil { - return nil - } - - if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMinimumProtocolVersion())]; !ok { - return TlsParametersValidationError{ - field: "TlsMinimumProtocolVersion", - reason: "value must be one of the defined enum values", - } - } - - if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMaximumProtocolVersion())]; !ok { - return TlsParametersValidationError{ - field: "TlsMaximumProtocolVersion", - reason: "value must be one of the defined enum values", - } - } - - return nil -} - -// TlsParametersValidationError is the validation error returned by -// TlsParameters.Validate if the designated constraints aren't met. -type TlsParametersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TlsParametersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TlsParametersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TlsParametersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TlsParametersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TlsParametersValidationError) ErrorName() string { return "TlsParametersValidationError" } - -// Error satisfies the builtin error interface -func (e TlsParametersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTlsParameters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TlsParametersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - 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 utf8.RuneCountInString(m.GetProviderName()) < 1 { - return PrivateKeyProviderValidationError{ - field: "ProviderName", - reason: "value length must be at least 1 runes", - } - } - - switch m.ConfigType.(type) { - - 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. -func (m *TlsCertificate) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - 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, - } - } - } - - if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "WatchedDirectory", - 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, - } - } - } - - 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{}(m.GetOcspStaple()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "OcspStaple", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetSignedCertificateTimestamp() { - _, _ = idx, item - - 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, - } - } - } - - } - - return nil -} - -// TlsCertificateValidationError is the validation error returned by -// TlsCertificate.Validate if the designated constraints aren't met. -type TlsCertificateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TlsCertificateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TlsCertificateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TlsCertificateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TlsCertificateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TlsCertificateValidationError) ErrorName() string { return "TlsCertificateValidationError" } - -// Error satisfies the builtin error interface -func (e TlsCertificateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTlsCertificate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TlsCertificateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TlsCertificateValidationError{} - -// Validate checks the field values on TlsSessionTicketKeys with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *TlsSessionTicketKeys) Validate() error { - if m == nil { - return nil - } - - if len(m.GetKeys()) < 1 { - return TlsSessionTicketKeysValidationError{ - field: "Keys", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetKeys() { - _, _ = idx, item - - 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, - } - } - } - - } - - return nil -} - -// TlsSessionTicketKeysValidationError is the validation error returned by -// TlsSessionTicketKeys.Validate if the designated constraints aren't met. -type TlsSessionTicketKeysValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TlsSessionTicketKeysValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TlsSessionTicketKeysValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TlsSessionTicketKeysValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TlsSessionTicketKeysValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TlsSessionTicketKeysValidationError) ErrorName() string { - return "TlsSessionTicketKeysValidationError" -} - -// Error satisfies the builtin error interface -func (e TlsSessionTicketKeysValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTlsSessionTicketKeys.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TlsSessionTicketKeysValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TlsSessionTicketKeysValidationError{} - -// Validate checks the field values on CertificateValidationContext with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CertificateValidationContext) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "WatchedDirectory", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetVerifyCertificateSpki() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 44 { - return CertificateValidationContextValidationError{ - field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), - reason: "value length must be at least 44 runes", - } - } - - if len(item) > 44 { - return CertificateValidationContextValidationError{ - field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), - reason: "value length must be at most 44 bytes", - } - } - - } - - for idx, item := range m.GetVerifyCertificateHash() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 64 { - return CertificateValidationContextValidationError{ - field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), - reason: "value length must be at least 64 runes", - } - } - - if len(item) > 95 { - return CertificateValidationContextValidationError{ - field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), - reason: "value length must be at most 95 bytes", - } - } - - } - - 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: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - 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{}(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 -} - -// CertificateValidationContextValidationError is the validation error returned -// by CertificateValidationContext.Validate if the designated constraints -// aren't met. -type CertificateValidationContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CertificateValidationContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CertificateValidationContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CertificateValidationContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CertificateValidationContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CertificateValidationContextValidationError) ErrorName() string { - return "CertificateValidationContextValidationError" -} - -// Error satisfies the builtin error interface -func (e CertificateValidationContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCertificateValidationContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CertificateValidationContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CertificateValidationContextValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.pb.go deleted file mode 100644 index 765887ee1e..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.pb.go +++ /dev/null @@ -1,451 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/transport_sockets/tls/v4alpha/secret.proto - -package envoy_extensions_transport_sockets_tls_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type GenericSecret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Secret of generic type and is available to filters. - Secret *v4alpha.DataSource `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *GenericSecret) Reset() { - *x = GenericSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenericSecret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenericSecret) ProtoMessage() {} - -func (x *GenericSecret) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenericSecret.ProtoReflect.Descriptor instead. -func (*GenericSecret) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescGZIP(), []int{0} -} - -func (x *GenericSecret) GetSecret() *v4alpha.DataSource { - if x != nil { - return x.Secret - } - return nil -} - -type SdsSecretConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name 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. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - SdsConfig *v4alpha.ConfigSource `protobuf:"bytes,2,opt,name=sds_config,json=sdsConfig,proto3" json:"sds_config,omitempty"` -} - -func (x *SdsSecretConfig) Reset() { - *x = SdsSecretConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SdsSecretConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SdsSecretConfig) ProtoMessage() {} - -func (x *SdsSecretConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SdsSecretConfig.ProtoReflect.Descriptor instead. -func (*SdsSecretConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescGZIP(), []int{1} -} - -func (x *SdsSecretConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SdsSecretConfig) GetSdsConfig() *v4alpha.ConfigSource { - if x != nil { - return x.SdsConfig - } - return nil -} - -// [#next-free-field: 6] -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 assignable to Type: - // *Secret_TlsCertificate - // *Secret_SessionTicketKeys - // *Secret_ValidationContext - // *Secret_GenericSecret - Type isSecret_Type `protobuf_oneof:"type"` -} - -func (x *Secret) Reset() { - *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Secret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Secret) ProtoMessage() {} - -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescGZIP(), []int{2} -} - -func (x *Secret) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *Secret) GetType() isSecret_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *Secret) GetTlsCertificate() *TlsCertificate { - if x, ok := x.GetType().(*Secret_TlsCertificate); ok { - return x.TlsCertificate - } - return nil -} - -func (x *Secret) GetSessionTicketKeys() *TlsSessionTicketKeys { - if x, ok := x.GetType().(*Secret_SessionTicketKeys); ok { - return x.SessionTicketKeys - } - return nil -} - -func (x *Secret) GetValidationContext() *CertificateValidationContext { - if x, ok := x.GetType().(*Secret_ValidationContext); ok { - return x.ValidationContext - } - return nil -} - -func (x *Secret) GetGenericSecret() *GenericSecret { - if x, ok := x.GetType().(*Secret_GenericSecret); ok { - return x.GenericSecret - } - return nil -} - -type isSecret_Type interface { - isSecret_Type() -} - -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"` -} - -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() {} - -var File_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto protoreflect.FileDescriptor - -var file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, - 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x45, - 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x06, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x0f, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x73, 0x64, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x09, 0x73, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x40, - 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0xa7, 0x04, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x69, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, - 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x6c, 0x73, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x00, 0x52, - 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, - 0x79, 0x73, 0x12, 0x7d, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x66, 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x55, 0x0a, 0x3c, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescOnce sync.Once - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDesc -) - -func file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescGZIP() []byte { - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescOnce.Do(func() { - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescData) - }) - return file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDescData -} - -var file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_goTypes = []interface{}{ - (*GenericSecret)(nil), // 0: envoy.extensions.transport_sockets.tls.v4alpha.GenericSecret - (*SdsSecretConfig)(nil), // 1: envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - (*Secret)(nil), // 2: envoy.extensions.transport_sockets.tls.v4alpha.Secret - (*v4alpha.DataSource)(nil), // 3: envoy.config.core.v4alpha.DataSource - (*v4alpha.ConfigSource)(nil), // 4: envoy.config.core.v4alpha.ConfigSource - (*TlsCertificate)(nil), // 5: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate - (*TlsSessionTicketKeys)(nil), // 6: envoy.extensions.transport_sockets.tls.v4alpha.TlsSessionTicketKeys - (*CertificateValidationContext)(nil), // 7: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext -} -var file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.transport_sockets.tls.v4alpha.GenericSecret.secret:type_name -> envoy.config.core.v4alpha.DataSource - 4, // 1: envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig.sds_config:type_name -> envoy.config.core.v4alpha.ConfigSource - 5, // 2: envoy.extensions.transport_sockets.tls.v4alpha.Secret.tls_certificate:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate - 6, // 3: envoy.extensions.transport_sockets.tls.v4alpha.Secret.session_ticket_keys:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.TlsSessionTicketKeys - 7, // 4: envoy.extensions.transport_sockets.tls.v4alpha.Secret.validation_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext - 0, // 5: envoy.extensions.transport_sockets.tls.v4alpha.Secret.generic_secret:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.GenericSecret - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_init() } -func file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_init() { - if File_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto != nil { - return - } - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenericSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SdsSecretConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Secret_TlsCertificate)(nil), - (*Secret_SessionTicketKeys)(nil), - (*Secret_ValidationContext)(nil), - (*Secret_GenericSecret)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_goTypes, - DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_depIdxs, - MessageInfos: file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_msgTypes, - }.Build() - File_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto = out.File - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_rawDesc = nil - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_goTypes = nil - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.pb.validate.go deleted file mode 100644 index fcafbc2071..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/secret.pb.validate.go +++ /dev/null @@ -1,309 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/transport_sockets/tls/v4alpha/secret.proto - -package envoy_extensions_transport_sockets_tls_v4alpha - -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{} -) - -// 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. -func (m *SdsSecretConfig) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return SdsSecretConfigValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - 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, - } - } - } - - return nil -} - -// SdsSecretConfigValidationError is the validation error returned by -// SdsSecretConfig.Validate if the designated constraints aren't met. -type SdsSecretConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SdsSecretConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SdsSecretConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SdsSecretConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SdsSecretConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SdsSecretConfigValidationError) ErrorName() string { return "SdsSecretConfigValidationError" } - -// Error satisfies the builtin error interface -func (e SdsSecretConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSdsSecretConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SdsSecretConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SdsSecretConfigValidationError{} - -// Validate checks the field values on Secret with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Secret) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - switch m.Type.(type) { - - case *Secret_TlsCertificate: - - 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: - - 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: - - 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, - } - } - } - - case *Secret_GenericSecret: - - 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, - } - } - } - - } - - return nil -} - -// SecretValidationError is the validation error returned by Secret.Validate if -// the designated constraints aren't met. -type SecretValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SecretValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SecretValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SecretValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SecretValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SecretValidationError) ErrorName() string { return "SecretValidationError" } - -// Error satisfies the builtin error interface -func (e SecretValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSecret.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SecretValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SecretValidationError{} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.pb.go b/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.pb.go deleted file mode 100644 index 7973f04153..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.pb.go +++ /dev/null @@ -1,1345 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/transport_sockets/tls/v4alpha/tls.proto - -package envoy_extensions_transport_sockets_tls_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" - duration "github.com/golang/protobuf/ptypes/duration" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type DownstreamTlsContext_OcspStaplePolicy int32 - -const ( - // OCSP responses are optional. If an OCSP response is absent - // or expired, the associated certificate will be used for - // connections without an OCSP staple. - DownstreamTlsContext_LENIENT_STAPLING DownstreamTlsContext_OcspStaplePolicy = 0 - // OCSP responses are optional. If an OCSP response is absent, - // the associated certificate will be used without an - // OCSP staple. If a response is provided but is expired, - // the associated certificate will not be used for - // subsequent connections. If no suitable certificate is found, - // the connection is rejected. - DownstreamTlsContext_STRICT_STAPLING DownstreamTlsContext_OcspStaplePolicy = 1 - // OCSP responses are required. Configuration will fail if - // a certificate is provided without an OCSP response. If a - // response expires, the associated certificate will not be - // used connections. If no suitable certificate is found, the - // connection is rejected. - DownstreamTlsContext_MUST_STAPLE DownstreamTlsContext_OcspStaplePolicy = 2 -) - -// Enum value maps for DownstreamTlsContext_OcspStaplePolicy. -var ( - DownstreamTlsContext_OcspStaplePolicy_name = map[int32]string{ - 0: "LENIENT_STAPLING", - 1: "STRICT_STAPLING", - 2: "MUST_STAPLE", - } - DownstreamTlsContext_OcspStaplePolicy_value = map[string]int32{ - "LENIENT_STAPLING": 0, - "STRICT_STAPLING": 1, - "MUST_STAPLE": 2, - } -) - -func (x DownstreamTlsContext_OcspStaplePolicy) Enum() *DownstreamTlsContext_OcspStaplePolicy { - p := new(DownstreamTlsContext_OcspStaplePolicy) - *p = x - return p -} - -func (x DownstreamTlsContext_OcspStaplePolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DownstreamTlsContext_OcspStaplePolicy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_enumTypes[0].Descriptor() -} - -func (DownstreamTlsContext_OcspStaplePolicy) Type() protoreflect.EnumType { - return &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_enumTypes[0] -} - -func (x DownstreamTlsContext_OcspStaplePolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DownstreamTlsContext_OcspStaplePolicy.Descriptor instead. -func (DownstreamTlsContext_OcspStaplePolicy) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP(), []int{1, 0} -} - -type UpstreamTlsContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Common TLS context settings. - // - // .. attention:: - // - // Server certificate verification is not enabled by default. Configure - // :ref:`trusted_ca` to enable - // verification. - 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 *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_session_keys,json=maxSessionKeys,proto3" json:"max_session_keys,omitempty"` -} - -func (x *UpstreamTlsContext) Reset() { - *x = UpstreamTlsContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamTlsContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamTlsContext) ProtoMessage() {} - -func (x *UpstreamTlsContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamTlsContext.ProtoReflect.Descriptor instead. -func (*UpstreamTlsContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP(), []int{0} -} - -func (x *UpstreamTlsContext) GetCommonTlsContext() *CommonTlsContext { - if x != nil { - return x.CommonTlsContext - } - return nil -} - -func (x *UpstreamTlsContext) GetSni() string { - if x != nil { - return x.Sni - } - return "" -} - -func (x *UpstreamTlsContext) GetAllowRenegotiation() bool { - if x != nil { - return x.AllowRenegotiation - } - return false -} - -func (x *UpstreamTlsContext) GetMaxSessionKeys() *wrappers.UInt32Value { - if x != nil { - return x.MaxSessionKeys - } - return nil -} - -// [#next-free-field: 9] -type DownstreamTlsContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 *wrappers.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 *wrappers.BoolValue `protobuf:"bytes,3,opt,name=require_sni,json=requireSni,proto3" json:"require_sni,omitempty"` - // Types that are assignable to SessionTicketKeysType: - // *DownstreamTlsContext_SessionTicketKeys - // *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig - // *DownstreamTlsContext_DisableStatelessSessionResumption - SessionTicketKeysType isDownstreamTlsContext_SessionTicketKeysType `protobuf_oneof:"session_ticket_keys_type"` - // If specified, session_timeout will change maximum lifetime (in seconds) of TLS session - // Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) - // ` - // only seconds could be specified (fractional seconds are going to be ignored). - SessionTimeout *duration.Duration `protobuf:"bytes,6,opt,name=session_timeout,json=sessionTimeout,proto3" json:"session_timeout,omitempty"` - // Config for whether to use certificates if they do not have - // an accompanying OCSP response or if the response expires at runtime. - // Defaults to LENIENT_STAPLING - OcspStaplePolicy DownstreamTlsContext_OcspStaplePolicy `protobuf:"varint,8,opt,name=ocsp_staple_policy,json=ocspStaplePolicy,proto3,enum=envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext_OcspStaplePolicy" json:"ocsp_staple_policy,omitempty"` -} - -func (x *DownstreamTlsContext) Reset() { - *x = DownstreamTlsContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DownstreamTlsContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DownstreamTlsContext) ProtoMessage() {} - -func (x *DownstreamTlsContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DownstreamTlsContext.ProtoReflect.Descriptor instead. -func (*DownstreamTlsContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP(), []int{1} -} - -func (x *DownstreamTlsContext) GetCommonTlsContext() *CommonTlsContext { - if x != nil { - return x.CommonTlsContext - } - return nil -} - -func (x *DownstreamTlsContext) GetRequireClientCertificate() *wrappers.BoolValue { - if x != nil { - return x.RequireClientCertificate - } - return nil -} - -func (x *DownstreamTlsContext) GetRequireSni() *wrappers.BoolValue { - if x != nil { - return x.RequireSni - } - return nil -} - -func (m *DownstreamTlsContext) GetSessionTicketKeysType() isDownstreamTlsContext_SessionTicketKeysType { - if m != nil { - return m.SessionTicketKeysType - } - return nil -} - -func (x *DownstreamTlsContext) GetSessionTicketKeys() *TlsSessionTicketKeys { - if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_SessionTicketKeys); ok { - return x.SessionTicketKeys - } - return nil -} - -func (x *DownstreamTlsContext) GetSessionTicketKeysSdsSecretConfig() *SdsSecretConfig { - if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig); ok { - return x.SessionTicketKeysSdsSecretConfig - } - return nil -} - -func (x *DownstreamTlsContext) GetDisableStatelessSessionResumption() bool { - if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_DisableStatelessSessionResumption); ok { - return x.DisableStatelessSessionResumption - } - return false -} - -func (x *DownstreamTlsContext) GetSessionTimeout() *duration.Duration { - if x != nil { - return x.SessionTimeout - } - return nil -} - -func (x *DownstreamTlsContext) GetOcspStaplePolicy() DownstreamTlsContext_OcspStaplePolicy { - if x != nil { - return x.OcspStaplePolicy - } - return DownstreamTlsContext_LENIENT_STAPLING -} - -type isDownstreamTlsContext_SessionTicketKeysType interface { - isDownstreamTlsContext_SessionTicketKeysType() -} - -type DownstreamTlsContext_SessionTicketKeys struct { - // TLS session ticket key settings. - SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,4,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"` -} - -type DownstreamTlsContext_SessionTicketKeysSdsSecretConfig struct { - // Config for fetching TLS session ticket keys via SDS API. - SessionTicketKeysSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,5,opt,name=session_ticket_keys_sds_secret_config,json=sessionTicketKeysSdsSecretConfig,proto3,oneof"` -} - -type DownstreamTlsContext_DisableStatelessSessionResumption struct { - // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS - // server to not issue TLS session tickets for the purposes of stateless TLS session resumption. - // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using - // the keys specified through either :ref:`session_ticket_keys ` - // or :ref:`session_ticket_keys_sds_secret_config `. - // If this config is set to false and no keys are explicitly configured, the TLS server will issue - // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the - // implication that sessions cannot be resumed across hot restarts or on different hosts. - DisableStatelessSessionResumption bool `protobuf:"varint,7,opt,name=disable_stateless_session_resumption,json=disableStatelessSessionResumption,proto3,oneof"` -} - -func (*DownstreamTlsContext_SessionTicketKeys) isDownstreamTlsContext_SessionTicketKeysType() {} - -func (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) isDownstreamTlsContext_SessionTicketKeysType() { -} - -func (*DownstreamTlsContext_DisableStatelessSessionResumption) isDownstreamTlsContext_SessionTicketKeysType() { -} - -// TLS context shared by both client and server TLS contexts. -// [#next-free-field: 14] -type CommonTlsContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - TlsCertificateSdsSecretConfigs []*SdsSecretConfig `protobuf:"bytes,6,rep,name=tls_certificate_sds_secret_configs,json=tlsCertificateSdsSecretConfigs,proto3" json:"tls_certificate_sds_secret_configs,omitempty"` - // Certificate provider for fetching TLS certificates. - // [#not-implemented-hide:] - TlsCertificateCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,9,opt,name=tls_certificate_certificate_provider,json=tlsCertificateCertificateProvider,proto3" json:"tls_certificate_certificate_provider,omitempty"` - // Certificate provider instance for fetching TLS certificates. - // [#not-implemented-hide:] - TlsCertificateCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,11,opt,name=tls_certificate_certificate_provider_instance,json=tlsCertificateCertificateProviderInstance,proto3" json:"tls_certificate_certificate_provider_instance,omitempty"` - // Types that are assignable to ValidationContextType: - // *CommonTlsContext_ValidationContext - // *CommonTlsContext_ValidationContextSdsSecretConfig - // *CommonTlsContext_CombinedValidationContext - // *CommonTlsContext_ValidationContextCertificateProvider - // *CommonTlsContext_ValidationContextCertificateProviderInstance - 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"` - // Custom TLS handshaker. If empty, defaults to native TLS handshaking - // behavior. - CustomHandshaker *v4alpha.TypedExtensionConfig `protobuf:"bytes,13,opt,name=custom_handshaker,json=customHandshaker,proto3" json:"custom_handshaker,omitempty"` -} - -func (x *CommonTlsContext) Reset() { - *x = CommonTlsContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTlsContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTlsContext) ProtoMessage() {} - -func (x *CommonTlsContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonTlsContext.ProtoReflect.Descriptor instead. -func (*CommonTlsContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP(), []int{2} -} - -func (x *CommonTlsContext) GetTlsParams() *TlsParameters { - if x != nil { - return x.TlsParams - } - return nil -} - -func (x *CommonTlsContext) GetTlsCertificates() []*TlsCertificate { - if x != nil { - return x.TlsCertificates - } - return nil -} - -func (x *CommonTlsContext) GetTlsCertificateSdsSecretConfigs() []*SdsSecretConfig { - if x != nil { - return x.TlsCertificateSdsSecretConfigs - } - return nil -} - -func (x *CommonTlsContext) GetTlsCertificateCertificateProvider() *CommonTlsContext_CertificateProvider { - if x != nil { - return x.TlsCertificateCertificateProvider - } - return nil -} - -func (x *CommonTlsContext) GetTlsCertificateCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance { - if x != nil { - return x.TlsCertificateCertificateProviderInstance - } - return nil -} - -func (m *CommonTlsContext) GetValidationContextType() isCommonTlsContext_ValidationContextType { - if m != nil { - return m.ValidationContextType - } - return nil -} - -func (x *CommonTlsContext) GetValidationContext() *CertificateValidationContext { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContext); ok { - return x.ValidationContext - } - return nil -} - -func (x *CommonTlsContext) GetValidationContextSdsSecretConfig() *SdsSecretConfig { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextSdsSecretConfig); ok { - return x.ValidationContextSdsSecretConfig - } - return nil -} - -func (x *CommonTlsContext) GetCombinedValidationContext() *CommonTlsContext_CombinedCertificateValidationContext { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_CombinedValidationContext); ok { - return x.CombinedValidationContext - } - return nil -} - -func (x *CommonTlsContext) GetValidationContextCertificateProvider() *CommonTlsContext_CertificateProvider { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextCertificateProvider); ok { - return x.ValidationContextCertificateProvider - } - return nil -} - -func (x *CommonTlsContext) GetValidationContextCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextCertificateProviderInstance); ok { - return x.ValidationContextCertificateProviderInstance - } - return nil -} - -func (x *CommonTlsContext) GetAlpnProtocols() []string { - if x != nil { - return x.AlpnProtocols - } - return nil -} - -func (x *CommonTlsContext) GetCustomHandshaker() *v4alpha.TypedExtensionConfig { - if x != nil { - return x.CustomHandshaker - } - return nil -} - -type isCommonTlsContext_ValidationContextType interface { - isCommonTlsContext_ValidationContextType() -} - -type CommonTlsContext_ValidationContext struct { - // How to validate peer certificates. - ValidationContext *CertificateValidationContext `protobuf:"bytes,3,opt,name=validation_context,json=validationContext,proto3,oneof"` -} - -type CommonTlsContext_ValidationContextSdsSecretConfig struct { - // Config for fetching validation context via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,7,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3,oneof"` -} - -type CommonTlsContext_CombinedValidationContext struct { - // Combined certificate validation context holds a default CertificateValidationContext - // and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic - // and default CertificateValidationContext are merged into a new CertificateValidationContext - // for validation. This merge is done by Message::MergeFrom(), so dynamic - // CertificateValidationContext overwrites singular fields in default - // CertificateValidationContext, and concatenates repeated fields to default - // CertificateValidationContext, and logical OR is applied to boolean fields. - CombinedValidationContext *CommonTlsContext_CombinedCertificateValidationContext `protobuf:"bytes,8,opt,name=combined_validation_context,json=combinedValidationContext,proto3,oneof"` -} - -type CommonTlsContext_ValidationContextCertificateProvider struct { - // Certificate provider for fetching validation context. - // [#not-implemented-hide:] - ValidationContextCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,10,opt,name=validation_context_certificate_provider,json=validationContextCertificateProvider,proto3,oneof"` -} - -type CommonTlsContext_ValidationContextCertificateProviderInstance struct { - // Certificate provider instance for fetching validation context. - // [#not-implemented-hide:] - ValidationContextCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,12,opt,name=validation_context_certificate_provider_instance,json=validationContextCertificateProviderInstance,proto3,oneof"` -} - -func (*CommonTlsContext_ValidationContext) isCommonTlsContext_ValidationContextType() {} - -func (*CommonTlsContext_ValidationContextSdsSecretConfig) isCommonTlsContext_ValidationContextType() { -} - -func (*CommonTlsContext_CombinedValidationContext) isCommonTlsContext_ValidationContextType() {} - -func (*CommonTlsContext_ValidationContextCertificateProvider) isCommonTlsContext_ValidationContextType() { -} - -func (*CommonTlsContext_ValidationContextCertificateProviderInstance) isCommonTlsContext_ValidationContextType() { -} - -// Config for Certificate provider to get certificates. This provider should allow certificates to be -// fetched/refreshed over the network asynchronously with respect to the TLS handshake. -type CommonTlsContext_CertificateProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "TLS" to specify a new tls-certificate. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Provider specific config. - // Note: an implementation is expected to dedup multiple instances of the same config - // to maintain a single certificate-provider instance. The sharing can happen, for - // example, among multiple clusters or between the tls_certificate and validation_context - // certificate providers of a cluster. - // This config could be supplied inline or (in future) a named xDS resource. - // - // Types that are assignable to Config: - // *CommonTlsContext_CertificateProvider_TypedConfig - Config isCommonTlsContext_CertificateProvider_Config `protobuf_oneof:"config"` -} - -func (x *CommonTlsContext_CertificateProvider) Reset() { - *x = CommonTlsContext_CertificateProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTlsContext_CertificateProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTlsContext_CertificateProvider) ProtoMessage() {} - -func (x *CommonTlsContext_CertificateProvider) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonTlsContext_CertificateProvider.ProtoReflect.Descriptor instead. -func (*CommonTlsContext_CertificateProvider) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *CommonTlsContext_CertificateProvider) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *CommonTlsContext_CertificateProvider) GetConfig() isCommonTlsContext_CertificateProvider_Config { - if m != nil { - return m.Config - } - return nil -} - -func (x *CommonTlsContext_CertificateProvider) GetTypedConfig() *v4alpha.TypedExtensionConfig { - if x, ok := x.GetConfig().(*CommonTlsContext_CertificateProvider_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isCommonTlsContext_CertificateProvider_Config interface { - isCommonTlsContext_CertificateProvider_Config() -} - -type CommonTlsContext_CertificateProvider_TypedConfig struct { - TypedConfig *v4alpha.TypedExtensionConfig `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*CommonTlsContext_CertificateProvider_TypedConfig) isCommonTlsContext_CertificateProvider_Config() { -} - -// Similar to CertificateProvider above, but allows the provider instances to be configured on -// the client side instead of being sent from the control plane. -type CommonTlsContext_CertificateProviderInstance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Provider instance name. This name must be defined in the client's configuration (e.g., a - // bootstrap file) to correspond to a provider instance (i.e., the same data in the typed_config - // field that would be sent in the CertificateProvider message if the config was sent by the - // control plane). If not present, defaults to "default". - // - // Instance names should generally be defined not in terms of the underlying provider - // implementation (e.g., "file_watcher") but rather in terms of the function of the - // certificates (e.g., "foo_deployment_identity"). - InstanceName string `protobuf:"bytes,1,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` - // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "example.com" to specify a certificate for a - // particular domain. Not all provider instances will actually use this field, so the value - // defaults to the empty string. - CertificateName string `protobuf:"bytes,2,opt,name=certificate_name,json=certificateName,proto3" json:"certificate_name,omitempty"` -} - -func (x *CommonTlsContext_CertificateProviderInstance) Reset() { - *x = CommonTlsContext_CertificateProviderInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTlsContext_CertificateProviderInstance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTlsContext_CertificateProviderInstance) ProtoMessage() {} - -func (x *CommonTlsContext_CertificateProviderInstance) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonTlsContext_CertificateProviderInstance.ProtoReflect.Descriptor instead. -func (*CommonTlsContext_CertificateProviderInstance) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP(), []int{2, 1} -} - -func (x *CommonTlsContext_CertificateProviderInstance) GetInstanceName() string { - if x != nil { - return x.InstanceName - } - return "" -} - -func (x *CommonTlsContext_CertificateProviderInstance) GetCertificateName() string { - if x != nil { - return x.CertificateName - } - return "" -} - -type CommonTlsContext_CombinedCertificateValidationContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // How to validate peer certificates. - DefaultValidationContext *CertificateValidationContext `protobuf:"bytes,1,opt,name=default_validation_context,json=defaultValidationContext,proto3" json:"default_validation_context,omitempty"` - // Types that are assignable to DynamicValidationContext: - // *CommonTlsContext_CombinedCertificateValidationContext_ValidationContextSdsSecretConfig - // *CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProvider - // *CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProviderInstance - DynamicValidationContext isCommonTlsContext_CombinedCertificateValidationContext_DynamicValidationContext `protobuf_oneof:"dynamic_validation_context"` -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) Reset() { - *x = CommonTlsContext_CombinedCertificateValidationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTlsContext_CombinedCertificateValidationContext) ProtoMessage() {} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonTlsContext_CombinedCertificateValidationContext.ProtoReflect.Descriptor instead. -func (*CommonTlsContext_CombinedCertificateValidationContext) Descriptor() ([]byte, []int) { - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP(), []int{2, 2} -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) GetDefaultValidationContext() *CertificateValidationContext { - if x != nil { - return x.DefaultValidationContext - } - return nil -} - -func (m *CommonTlsContext_CombinedCertificateValidationContext) GetDynamicValidationContext() isCommonTlsContext_CombinedCertificateValidationContext_DynamicValidationContext { - if m != nil { - return m.DynamicValidationContext - } - return nil -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextSdsSecretConfig() *SdsSecretConfig { - if x, ok := x.GetDynamicValidationContext().(*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextSdsSecretConfig); ok { - return x.ValidationContextSdsSecretConfig - } - return nil -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextCertificateProvider() *CommonTlsContext_CertificateProvider { - if x, ok := x.GetDynamicValidationContext().(*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProvider); ok { - return x.ValidationContextCertificateProvider - } - return nil -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance { - if x, ok := x.GetDynamicValidationContext().(*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProviderInstance); ok { - return x.ValidationContextCertificateProviderInstance - } - return nil -} - -type isCommonTlsContext_CombinedCertificateValidationContext_DynamicValidationContext interface { - isCommonTlsContext_CombinedCertificateValidationContext_DynamicValidationContext() -} - -type CommonTlsContext_CombinedCertificateValidationContext_ValidationContextSdsSecretConfig struct { - // Config for fetching validation context via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. - ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,2,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3,oneof"` -} - -type CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProvider struct { - // Certificate provider for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. - // [#not-implemented-hide:] - ValidationContextCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,3,opt,name=validation_context_certificate_provider,json=validationContextCertificateProvider,proto3,oneof"` -} - -type CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProviderInstance struct { - // Certificate provider instance for fetching validation context. - // Only one of validation_context_sds_secret_config, validation_context_certificate_provider, - // or validation_context_certificate_provider_instance may be used. - // [#not-implemented-hide:] - ValidationContextCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,4,opt,name=validation_context_certificate_provider_instance,json=validationContextCertificateProviderInstance,proto3,oneof"` -} - -func (*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextSdsSecretConfig) isCommonTlsContext_CombinedCertificateValidationContext_DynamicValidationContext() { -} - -func (*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProvider) isCommonTlsContext_CombinedCertificateValidationContext_DynamicValidationContext() { -} - -func (*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProviderInstance) isCommonTlsContext_CombinedCertificateValidationContext_DynamicValidationContext() { -} - -var File_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto protoreflect.FileDescriptor - -var file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x02, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x6e, 0x0a, 0x12, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, - 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x03, - 0x73, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, - 0x28, 0xff, 0x01, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x6e, 0x65, - 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x6d, 0x61, 0x78, - 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, - 0x73, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x96, 0x08, 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, - 0x6e, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x10, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, - 0x58, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x72, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x53, 0x6e, 0x69, 0x12, 0x76, 0x0a, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x92, - 0x01, 0x0a, 0x25, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, - 0x00, 0x52, 0x20, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x73, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x24, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x21, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, - 0x01, 0x0a, 0x1a, 0x06, 0x08, 0x80, 0x80, 0x80, 0x80, 0x10, 0x32, 0x00, 0x52, 0x0e, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x8d, 0x01, 0x0a, - 0x12, 0x6f, 0x63, 0x73, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x55, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, - 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x6f, 0x63, 0x73, 0x70, - 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x4e, 0x0a, 0x10, - 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x4e, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, - 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, - 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, - 0x55, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x45, 0x10, 0x02, 0x3a, 0x45, 0x9a, 0xc5, - 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, - 0x98, 0x18, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x5c, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, - 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x09, 0x74, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x69, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x6c, - 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x74, 0x6c, - 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x95, 0x01, - 0x0a, 0x22, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x64, 0x73, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1e, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0xa5, 0x01, 0x0a, 0x24, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x21, 0x74, 0x6c, 0x73, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xbe, 0x01, - 0x0a, 0x2d, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x52, 0x29, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x7d, - 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x91, 0x01, - 0x0a, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x64, - 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, - 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0xa7, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x65, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, - 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, - 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0xad, 0x01, 0x0a, 0x27, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xc6, 0x01, 0x0a, 0x30, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, - 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x2c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, - 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x5c, 0x0a, 0x11, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, - 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x1a, 0xee, 0x01, 0x0a, 0x13, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x55, 0x9a, 0xc5, 0x88, 0x1e, 0x50, 0x0a, 0x4e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, - 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xcc, 0x01, 0x0a, 0x1b, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x29, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x5d, 0x9a, 0xc5, 0x88, 0x1e, - 0x58, 0x0a, 0x56, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0xda, 0x06, 0x0a, 0x24, 0x43, 0x6f, - 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x94, 0x01, 0x0a, 0x1a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x9b, 0x01, 0x0a, 0x24, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, - 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xad, 0x01, 0x0a, 0x27, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xc6, 0x01, 0x0a, 0x30, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x5c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x48, 0x00, 0x52, 0x2c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x3a, 0x66, 0x9a, 0xc5, 0x88, 0x1e, 0x61, 0x0a, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x1c, 0x0a, 0x1a, 0x64, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x19, 0x0a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0x52, 0x0a, 0x3c, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, - 0x6c, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x54, 0x6c, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescOnce sync.Once - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDesc -) - -func file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescGZIP() []byte { - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescOnce.Do(func() { - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescData) - }) - return file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDescData -} - -var file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_goTypes = []interface{}{ - (DownstreamTlsContext_OcspStaplePolicy)(0), // 0: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.OcspStaplePolicy - (*UpstreamTlsContext)(nil), // 1: envoy.extensions.transport_sockets.tls.v4alpha.UpstreamTlsContext - (*DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext - (*CommonTlsContext)(nil), // 3: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext - (*CommonTlsContext_CertificateProvider)(nil), // 4: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProvider - (*CommonTlsContext_CertificateProviderInstance)(nil), // 5: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProviderInstance - (*CommonTlsContext_CombinedCertificateValidationContext)(nil), // 6: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CombinedCertificateValidationContext - (*wrappers.UInt32Value)(nil), // 7: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 8: google.protobuf.BoolValue - (*TlsSessionTicketKeys)(nil), // 9: envoy.extensions.transport_sockets.tls.v4alpha.TlsSessionTicketKeys - (*SdsSecretConfig)(nil), // 10: envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - (*duration.Duration)(nil), // 11: google.protobuf.Duration - (*TlsParameters)(nil), // 12: envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters - (*TlsCertificate)(nil), // 13: envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate - (*CertificateValidationContext)(nil), // 14: envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext - (*v4alpha.TypedExtensionConfig)(nil), // 15: envoy.config.core.v4alpha.TypedExtensionConfig -} -var file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.transport_sockets.tls.v4alpha.UpstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext - 7, // 1: envoy.extensions.transport_sockets.tls.v4alpha.UpstreamTlsContext.max_session_keys:type_name -> google.protobuf.UInt32Value - 3, // 2: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext - 8, // 3: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.require_client_certificate:type_name -> google.protobuf.BoolValue - 8, // 4: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.require_sni:type_name -> google.protobuf.BoolValue - 9, // 5: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.session_ticket_keys:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.TlsSessionTicketKeys - 10, // 6: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.session_ticket_keys_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - 11, // 7: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.session_timeout:type_name -> google.protobuf.Duration - 0, // 8: envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.ocsp_staple_policy:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.DownstreamTlsContext.OcspStaplePolicy - 12, // 9: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.tls_params:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.TlsParameters - 13, // 10: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.tls_certificates:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.TlsCertificate - 10, // 11: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.tls_certificate_sds_secret_configs:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - 4, // 12: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.tls_certificate_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProvider - 5, // 13: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.tls_certificate_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProviderInstance - 14, // 14: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.validation_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext - 10, // 15: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - 6, // 16: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.combined_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CombinedCertificateValidationContext - 4, // 17: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProvider - 5, // 18: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProviderInstance - 15, // 19: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.custom_handshaker:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 15, // 20: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProvider.typed_config:type_name -> envoy.config.core.v4alpha.TypedExtensionConfig - 14, // 21: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CombinedCertificateValidationContext.default_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CertificateValidationContext - 10, // 22: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CombinedCertificateValidationContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.SdsSecretConfig - 4, // 23: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProvider - 5, // 24: envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v4alpha.CommonTlsContext.CertificateProviderInstance - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_init() } -func file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_init() { - if File_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto != nil { - return - } - file_envoy_extensions_transport_sockets_tls_v4alpha_common_proto_init() - file_envoy_extensions_transport_sockets_tls_v4alpha_secret_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamTlsContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownstreamTlsContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext_CertificateProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext_CertificateProviderInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext_CombinedCertificateValidationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*DownstreamTlsContext_SessionTicketKeys)(nil), - (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig)(nil), - (*DownstreamTlsContext_DisableStatelessSessionResumption)(nil), - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*CommonTlsContext_ValidationContext)(nil), - (*CommonTlsContext_ValidationContextSdsSecretConfig)(nil), - (*CommonTlsContext_CombinedValidationContext)(nil), - (*CommonTlsContext_ValidationContextCertificateProvider)(nil), - (*CommonTlsContext_ValidationContextCertificateProviderInstance)(nil), - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*CommonTlsContext_CertificateProvider_TypedConfig)(nil), - } - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextSdsSecretConfig)(nil), - (*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProvider)(nil), - (*CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProviderInstance)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_goTypes, - DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_depIdxs, - EnumInfos: file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_enumTypes, - MessageInfos: file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_msgTypes, - }.Build() - File_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto = out.File - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_rawDesc = nil - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_goTypes = nil - file_envoy_extensions_transport_sockets_tls_v4alpha_tls_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.pb.validate.go b/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.pb.validate.go deleted file mode 100644 index b821625e3e..0000000000 --- a/pkg/api/envoy/extensions/transport_sockets/tls/v4alpha/tls.pb.validate.go +++ /dev/null @@ -1,805 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/transport_sockets/tls/v4alpha/tls.proto - -package envoy_extensions_transport_sockets_tls_v4alpha - -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{} -) - -// Validate checks the field values on UpstreamTlsContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UpstreamTlsContext) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - if len(m.GetSni()) > 255 { - return UpstreamTlsContextValidationError{ - field: "Sni", - reason: "value length must be at most 255 bytes", - } - } - - // no validation rules for AllowRenegotiation - - 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, - } - } - } - - return nil -} - -// UpstreamTlsContextValidationError is the validation error returned by -// UpstreamTlsContext.Validate if the designated constraints aren't met. -type UpstreamTlsContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamTlsContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamTlsContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamTlsContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamTlsContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamTlsContextValidationError) ErrorName() string { - return "UpstreamTlsContextValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamTlsContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamTlsContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamTlsContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamTlsContextValidationError{} - -// Validate checks the field values on DownstreamTlsContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DownstreamTlsContext) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - 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, - } - } - } - - 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)", - } - } - - } - - if _, ok := DownstreamTlsContext_OcspStaplePolicy_name[int32(m.GetOcspStaplePolicy())]; !ok { - return DownstreamTlsContextValidationError{ - field: "OcspStaplePolicy", - reason: "value must be one of the defined enum values", - } - } - - switch m.SessionTicketKeysType.(type) { - - case *DownstreamTlsContext_SessionTicketKeys: - - 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: - - 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, - } - } - } - - case *DownstreamTlsContext_DisableStatelessSessionResumption: - // no validation rules for DisableStatelessSessionResumption - - } - - return nil -} - -// DownstreamTlsContextValidationError is the validation error returned by -// DownstreamTlsContext.Validate if the designated constraints aren't met. -type DownstreamTlsContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DownstreamTlsContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DownstreamTlsContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DownstreamTlsContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DownstreamTlsContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DownstreamTlsContextValidationError) ErrorName() string { - return "DownstreamTlsContextValidationError" -} - -// Error satisfies the builtin error interface -func (e DownstreamTlsContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDownstreamTlsContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DownstreamTlsContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DownstreamTlsContextValidationError{} - -// Validate checks the field values on CommonTlsContext with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *CommonTlsContext) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - for idx, item := range m.GetTlsCertificates() { - _, _ = idx, item - - 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, - } - } - } - - } - - if len(m.GetTlsCertificateSdsSecretConfigs()) > 1 { - return CommonTlsContextValidationError{ - field: "TlsCertificateSdsSecretConfigs", - reason: "value must contain no more than 1 item(s)", - } - } - - for idx, item := range m.GetTlsCertificateSdsSecretConfigs() { - _, _ = idx, item - - 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, - } - } - } - - } - - if v, ok := interface{}(m.GetTlsCertificateCertificateProvider()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "TlsCertificateCertificateProvider", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTlsCertificateCertificateProviderInstance()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "TlsCertificateCertificateProviderInstance", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetCustomHandshaker()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "CustomHandshaker", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.ValidationContextType.(type) { - - case *CommonTlsContext_ValidationContext: - - 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: - - 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: - - 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, - } - } - } - - case *CommonTlsContext_ValidationContextCertificateProvider: - - if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "ValidationContextCertificateProvider", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CommonTlsContext_ValidationContextCertificateProviderInstance: - - if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "ValidationContextCertificateProviderInstance", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// CommonTlsContextValidationError is the validation error returned by -// CommonTlsContext.Validate if the designated constraints aren't met. -type CommonTlsContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonTlsContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommonTlsContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommonTlsContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommonTlsContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommonTlsContextValidationError) ErrorName() string { return "CommonTlsContextValidationError" } - -// Error satisfies the builtin error interface -func (e CommonTlsContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonTlsContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonTlsContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonTlsContextValidationError{} - -// Validate checks the field values on CommonTlsContext_CertificateProvider -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *CommonTlsContext_CertificateProvider) Validate() error { - if m == nil { - return nil - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - return CommonTlsContext_CertificateProviderValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - } - - switch m.Config.(type) { - - case *CommonTlsContext_CertificateProvider_TypedConfig: - - if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContext_CertificateProviderValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return CommonTlsContext_CertificateProviderValidationError{ - field: "Config", - reason: "value is required", - } - - } - - return nil -} - -// CommonTlsContext_CertificateProviderValidationError is the validation error -// returned by CommonTlsContext_CertificateProvider.Validate if the designated -// constraints aren't met. -type CommonTlsContext_CertificateProviderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonTlsContext_CertificateProviderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommonTlsContext_CertificateProviderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommonTlsContext_CertificateProviderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommonTlsContext_CertificateProviderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommonTlsContext_CertificateProviderValidationError) ErrorName() string { - return "CommonTlsContext_CertificateProviderValidationError" -} - -// Error satisfies the builtin error interface -func (e CommonTlsContext_CertificateProviderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonTlsContext_CertificateProvider.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonTlsContext_CertificateProviderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonTlsContext_CertificateProviderValidationError{} - -// Validate checks the field values on -// CommonTlsContext_CertificateProviderInstance with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *CommonTlsContext_CertificateProviderInstance) Validate() error { - if m == nil { - return nil - } - - // no validation rules for InstanceName - - // no validation rules for CertificateName - - return nil -} - -// CommonTlsContext_CertificateProviderInstanceValidationError is the -// validation error returned by -// CommonTlsContext_CertificateProviderInstance.Validate if the designated -// constraints aren't met. -type CommonTlsContext_CertificateProviderInstanceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonTlsContext_CertificateProviderInstanceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommonTlsContext_CertificateProviderInstanceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommonTlsContext_CertificateProviderInstanceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommonTlsContext_CertificateProviderInstanceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommonTlsContext_CertificateProviderInstanceValidationError) ErrorName() string { - return "CommonTlsContext_CertificateProviderInstanceValidationError" -} - -// Error satisfies the builtin error interface -func (e CommonTlsContext_CertificateProviderInstanceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonTlsContext_CertificateProviderInstance.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonTlsContext_CertificateProviderInstanceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonTlsContext_CertificateProviderInstanceValidationError{} - -// Validate checks the field values on -// CommonTlsContext_CombinedCertificateValidationContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error { - if m == nil { - return nil - } - - if m.GetDefaultValidationContext() == nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "DefaultValidationContext", - reason: "value is required", - } - } - - 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, - } - } - } - - switch m.DynamicValidationContext.(type) { - - case *CommonTlsContext_CombinedCertificateValidationContext_ValidationContextSdsSecretConfig: - - if m.GetValidationContextSdsSecretConfig() == nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "value is required", - } - } - - 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, - } - } - } - - case *CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProvider: - - if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextCertificateProvider", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CommonTlsContext_CombinedCertificateValidationContext_ValidationContextCertificateProviderInstance: - - if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextCertificateProviderInstance", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// CommonTlsContext_CombinedCertificateValidationContextValidationError is the -// validation error returned by -// CommonTlsContext_CombinedCertificateValidationContext.Validate if the -// designated constraints aren't met. -type CommonTlsContext_CombinedCertificateValidationContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) ErrorName() string { - return "CommonTlsContext_CombinedCertificateValidationContextValidationError" -} - -// Error satisfies the builtin error interface -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonTlsContext_CombinedCertificateValidationContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonTlsContext_CombinedCertificateValidationContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonTlsContext_CombinedCertificateValidationContextValidationError{} diff --git a/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.go b/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.go index 483fef8245..84e79255f5 100644 --- a/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.go +++ b/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto -package envoy_extensions_upstreams_http_generic_v3 +package genericv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A connection pool which forwards downstream HTTP as TCP or HTTP to upstream, // based on CONNECT configuration. // [#extension: envoy.upstreams.http.generic] @@ -81,14 +76,20 @@ var file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_prot 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x42, 0x6a, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x42, - 0x24, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x42, 0xc7, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x33, + 0x42, 0x24, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, + 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.validate.go b/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.validate.go index 7de5ea1dff..ebadda895f 100644 --- a/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.validate.go +++ b/pkg/api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto -package envoy_extensions_upstreams_http_generic_v3 +package genericv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GenericConnectionPoolProto with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GenericConnectionPoolProto) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GenericConnectionPoolProto with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GenericConnectionPoolProtoMultiError, or nil if none found. +func (m *GenericConnectionPoolProto) ValidateAll() error { + return m.validate(true) +} + +func (m *GenericConnectionPoolProto) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return GenericConnectionPoolProtoMultiError(errors) + } + return nil } +// GenericConnectionPoolProtoMultiError is an error wrapping multiple +// validation errors returned by GenericConnectionPoolProto.ValidateAll() if +// the designated constraints aren't met. +type GenericConnectionPoolProtoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GenericConnectionPoolProtoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GenericConnectionPoolProtoMultiError) AllErrors() []error { return m } + // GenericConnectionPoolProtoValidationError is the validation error returned // by GenericConnectionPoolProto.Validate if the designated constraints aren't met. type GenericConnectionPoolProtoValidationError struct { diff --git a/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.go b/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.go index b3324cb4d8..0e999b0b87 100644 --- a/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.go +++ b/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto -package envoy_extensions_upstreams_http_http_v3 +package httpv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A connection pool which forwards downstream HTTP as HTTP to upstream. // [#extension: envoy.upstreams.http.http] type HttpConnectionPoolProto struct { @@ -79,14 +74,19 @@ var file_envoy_extensions_upstreams_http_http_v3_http_connection_pool_proto_rawD 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x64, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, - 0x42, 0x21, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0xbb, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, + 0x33, 0x42, 0x21, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.validate.go b/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.validate.go index 6cab049ccc..50734f0a31 100644 --- a/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.validate.go +++ b/pkg/api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto -package envoy_extensions_upstreams_http_http_v3 +package httpv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpConnectionPoolProto with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpConnectionPoolProto) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpConnectionPoolProto with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpConnectionPoolProtoMultiError, or nil if none found. +func (m *HttpConnectionPoolProto) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpConnectionPoolProto) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return HttpConnectionPoolProtoMultiError(errors) + } + return nil } +// HttpConnectionPoolProtoMultiError is an error wrapping multiple validation +// errors returned by HttpConnectionPoolProto.ValidateAll() if the designated +// constraints aren't met. +type HttpConnectionPoolProtoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpConnectionPoolProtoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpConnectionPoolProtoMultiError) AllErrors() []error { return m } + // HttpConnectionPoolProtoValidationError is the validation error returned by // HttpConnectionPoolProto.Validate if the designated constraints aren't met. type HttpConnectionPoolProtoValidationError struct { diff --git a/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.go b/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.go index 588888afc0..c93160fd6a 100644 --- a/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.go +++ b/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto -package envoy_extensions_upstreams_http_tcp_v3 +package tcpv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A connection pool which forwards downstream HTTP as TCP to upstream, // [#extension: envoy.upstreams.http.tcp] type TcpConnectionPoolProto struct { @@ -79,13 +74,19 @@ var file_envoy_extensions_upstreams_http_tcp_v3_tcp_connection_pool_proto_rawDes 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x54, 0x63, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x42, 0x62, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x63, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x20, 0x54, 0x63, 0x70, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x42, 0xb7, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x63, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x20, 0x54, 0x63, + 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x01, + 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x74, 0x63, 0x70, 0x2f, 0x76, 0x33, 0x3b, + 0x74, 0x63, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.validate.go b/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.validate.go index 1e51268d85..26a1dade88 100644 --- a/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.validate.go +++ b/pkg/api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto -package envoy_extensions_upstreams_http_tcp_v3 +package tcpv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TcpConnectionPoolProto with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *TcpConnectionPoolProto) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpConnectionPoolProto with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TcpConnectionPoolProtoMultiError, or nil if none found. +func (m *TcpConnectionPoolProto) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpConnectionPoolProto) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return TcpConnectionPoolProtoMultiError(errors) + } + return nil } +// TcpConnectionPoolProtoMultiError is an error wrapping multiple validation +// errors returned by TcpConnectionPoolProto.ValidateAll() if the designated +// constraints aren't met. +type TcpConnectionPoolProtoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpConnectionPoolProtoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpConnectionPoolProtoMultiError) AllErrors() []error { return m } + // TcpConnectionPoolProtoValidationError is the validation error returned by // TcpConnectionPoolProto.Validate if the designated constraints aren't met. type TcpConnectionPoolProtoValidationError struct { diff --git a/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.go b/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.go index fbe6cb617f..a3153526bc 100644 --- a/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.go +++ b/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/upstreams/http/v3/http_protocol_options.proto -package envoy_extensions_upstreams_http_v3 +package httpv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,13 +23,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // HttpProtocolOptions specifies Http upstream protocol options. This object // is used in -// :ref:`typed_extension_protocol_options`, +// :ref:`typed_extension_protocol_options`, // keyed by the name `envoy.extensions.upstreams.http.v3.HttpProtocolOptions`. // // This controls what protocol(s) should be used for upstream and how said protocol(s) are configured. @@ -190,8 +185,8 @@ func (*HttpProtocolOptions_UseDownstreamProtocolConfig) isHttpProtocolOptions_Up func (*HttpProtocolOptions_AutoConfig) isHttpProtocolOptions_UpstreamProtocolOptions() {} -// If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). -// Note that HTTP/2 should generally be used for upstream clusters doing gRPC. +// If this is used, the cluster will only operate on one of the possible upstream protocols. +// Note that HTTP/2 or above should generally be used for upstream gRPC clusters. type HttpProtocolOptions_ExplicitHttpConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -200,6 +195,7 @@ type HttpProtocolOptions_ExplicitHttpConfig struct { // Types that are assignable to ProtocolConfig: // *HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions // *HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions + // *HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions ProtocolConfig isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig `protobuf_oneof:"protocol_config"` } @@ -256,6 +252,13 @@ func (x *HttpProtocolOptions_ExplicitHttpConfig) GetHttp2ProtocolOptions() *v3.H return nil } +func (x *HttpProtocolOptions_ExplicitHttpConfig) GetHttp3ProtocolOptions() *v3.Http3ProtocolOptions { + if x, ok := x.GetProtocolConfig().(*HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions); ok { + return x.Http3ProtocolOptions + } + return nil +} + type isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig interface { isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig() } @@ -268,14 +271,27 @@ type HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions struct { Http2ProtocolOptions *v3.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3,oneof"` } +type HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions struct { + // .. warning:: + // QUIC upstream support is currently not ready for internet use. + // Please see :ref:`here ` for details. + Http3ProtocolOptions *v3.Http3ProtocolOptions `protobuf:"bytes,3,opt,name=http3_protocol_options,json=http3ProtocolOptions,proto3,oneof"` +} + func (*HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions) isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig() { } func (*HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions) isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig() { } +func (*HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions) isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig() { +} + // If this is used, the cluster can use either of the configured protocols, and // will use whichever protocol was used by the downstream connection. +// +// If HTTP/3 is configured for downstream and not configured for upstream, +// HTTP/3 requests will fail over to HTTP/2. type HttpProtocolOptions_UseDownstreamHttpConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -283,6 +299,10 @@ type HttpProtocolOptions_UseDownstreamHttpConfig struct { HttpProtocolOptions *v3.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` Http2ProtocolOptions *v3.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` + // .. warning:: + // QUIC upstream support is currently not ready for internet use. + // Please see :ref:`here ` for details. + Http3ProtocolOptions *v3.Http3ProtocolOptions `protobuf:"bytes,3,opt,name=http3_protocol_options,json=http3ProtocolOptions,proto3" json:"http3_protocol_options,omitempty"` } func (x *HttpProtocolOptions_UseDownstreamHttpConfig) Reset() { @@ -331,6 +351,13 @@ func (x *HttpProtocolOptions_UseDownstreamHttpConfig) GetHttp2ProtocolOptions() return nil } +func (x *HttpProtocolOptions_UseDownstreamHttpConfig) GetHttp3ProtocolOptions() *v3.Http3ProtocolOptions { + if x != nil { + return x.Http3ProtocolOptions + } + return nil +} + // If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever // protocol is negotiated by ALPN with the upstream. // Clusters configured with *AutoHttpConfig* will use the highest available @@ -347,6 +374,24 @@ type HttpProtocolOptions_AutoHttpConfig struct { HttpProtocolOptions *v3.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` Http2ProtocolOptions *v3.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` + // Unlike HTTP/1 and HTTP/2, HTTP/3 will not be configured unless it is + // present, and (soon) only if there is an indication of server side + // support. + // See :ref:`here ` for more information on + // when HTTP/3 will be used, and when Envoy will fail over to TCP. + // + // .. warning:: + // QUIC upstream support is currently not ready for internet use. + // Please see :ref:`here ` for details. + Http3ProtocolOptions *v3.Http3ProtocolOptions `protobuf:"bytes,3,opt,name=http3_protocol_options,json=http3ProtocolOptions,proto3" json:"http3_protocol_options,omitempty"` + // The presence of alternate protocols cache options causes the use of the + // alternate protocols cache, which is responsible for parsing and caching + // HTTP Alt-Svc headers. This enables the use of HTTP/3 for origins that + // advertise supporting it. + // + // .. note:: + // This is required when HTTP/3 is enabled. + AlternateProtocolsCacheOptions *v3.AlternateProtocolsCacheOptions `protobuf:"bytes,4,opt,name=alternate_protocols_cache_options,json=alternateProtocolsCacheOptions,proto3" json:"alternate_protocols_cache_options,omitempty"` } func (x *HttpProtocolOptions_AutoHttpConfig) Reset() { @@ -395,6 +440,20 @@ func (x *HttpProtocolOptions_AutoHttpConfig) GetHttp2ProtocolOptions() *v3.Http2 return nil } +func (x *HttpProtocolOptions_AutoHttpConfig) GetHttp3ProtocolOptions() *v3.Http3ProtocolOptions { + if x != nil { + return x.Http3ProtocolOptions + } + return nil +} + +func (x *HttpProtocolOptions_AutoHttpConfig) GetAlternateProtocolsCacheOptions() *v3.AlternateProtocolsCacheOptions { + if x != nil { + return x.AlternateProtocolsCacheOptions + } + return nil +} + var File_envoy_extensions_upstreams_http_v3_http_protocol_options_proto protoreflect.FileDescriptor var file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_rawDesc = []byte{ @@ -410,7 +469,7 @@ var file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_rawDesc 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc7, 0x0a, 0x0a, 0x13, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x22, 0xf0, 0x0d, 0x0a, 0x13, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6a, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, @@ -450,7 +509,7 @@ var file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_rawDesc 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x1a, 0xf2, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x48, 0x74, + 0x67, 0x1a, 0xd6, 0x02, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, @@ -463,44 +522,76 @@ var file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_rawDesc 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x16, - 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xdb, 0x01, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x44, 0x6f, - 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x5e, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68, - 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, - 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xd2, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x6f, 0x48, 0x74, 0x74, - 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, + 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x33, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x14, 0x68, 0x74, + 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x16, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xbd, 0x02, 0x0a, 0x17, 0x55, + 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x20, 0x0a, 0x19, 0x75, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x56, 0x0a, 0x30, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x42, - 0x18, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, + 0x33, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xb5, 0x03, 0x0a, 0x0e, 0x41, + 0x75, 0x74, 0x6f, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a, + 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a, + 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x33, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, + 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x7f, 0x0a, 0x21, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x1e, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x20, 0x0a, 0x19, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x42, 0xa8, 0x01, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x18, 0x48, 0x74, 0x74, 0x70, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x76, 0x33, + 0x3b, 0x68, 0x74, 0x74, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -525,6 +616,8 @@ var file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_goTypes (*v3.UpstreamHttpProtocolOptions)(nil), // 5: envoy.config.core.v3.UpstreamHttpProtocolOptions (*v3.Http1ProtocolOptions)(nil), // 6: envoy.config.core.v3.Http1ProtocolOptions (*v3.Http2ProtocolOptions)(nil), // 7: envoy.config.core.v3.Http2ProtocolOptions + (*v3.Http3ProtocolOptions)(nil), // 8: envoy.config.core.v3.Http3ProtocolOptions + (*v3.AlternateProtocolsCacheOptions)(nil), // 9: envoy.config.core.v3.AlternateProtocolsCacheOptions } var file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_depIdxs = []int32{ 4, // 0: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions @@ -534,15 +627,19 @@ var file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_depIdxs 3, // 4: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.auto_config:type_name -> envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig 6, // 5: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions 7, // 6: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions - 6, // 7: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions - 7, // 8: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions - 6, // 9: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions - 7, // 10: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 8, // 7: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig.http3_protocol_options:type_name -> envoy.config.core.v3.Http3ProtocolOptions + 6, // 8: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions + 7, // 9: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions + 8, // 10: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig.http3_protocol_options:type_name -> envoy.config.core.v3.Http3ProtocolOptions + 6, // 11: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions + 7, // 12: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions + 8, // 13: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig.http3_protocol_options:type_name -> envoy.config.core.v3.Http3ProtocolOptions + 9, // 14: envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig.alternate_protocols_cache_options:type_name -> envoy.config.core.v3.AlternateProtocolsCacheOptions + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_init() } @@ -608,6 +705,7 @@ func file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_init() file_envoy_extensions_upstreams_http_v3_http_protocol_options_proto_msgTypes[1].OneofWrappers = []interface{}{ (*HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions)(nil), (*HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions)(nil), + (*HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.validate.go b/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.validate.go index 1f72366fe4..5bfce6c8eb 100644 --- a/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.validate.go +++ b/pkg/api/envoy/extensions/upstreams/http/v3/http_protocol_options.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/upstreams/http/v3/http_protocol_options.proto -package envoy_extensions_upstreams_http_v3 +package httpv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HttpProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpProtocolOptionsMultiError, or nil if none found. +func (m *HttpProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpProtocolOptions) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetCommonHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "CommonHttpProtocolOptions", @@ -51,7 +86,26 @@ func (m *HttpProtocolOptions) Validate() error { } } - if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUpstreamHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "UpstreamHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "UpstreamHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "UpstreamHttpProtocolOptions", @@ -65,7 +119,26 @@ func (m *HttpProtocolOptions) Validate() error { case *HttpProtocolOptions_ExplicitHttpConfig_: - if v, ok := interface{}(m.GetExplicitHttpConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetExplicitHttpConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "ExplicitHttpConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "ExplicitHttpConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExplicitHttpConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "ExplicitHttpConfig", @@ -77,7 +150,26 @@ func (m *HttpProtocolOptions) Validate() error { case *HttpProtocolOptions_UseDownstreamProtocolConfig: - if v, ok := interface{}(m.GetUseDownstreamProtocolConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetUseDownstreamProtocolConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "UseDownstreamProtocolConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "UseDownstreamProtocolConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseDownstreamProtocolConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "UseDownstreamProtocolConfig", @@ -89,7 +181,26 @@ func (m *HttpProtocolOptions) Validate() error { case *HttpProtocolOptions_AutoConfig: - if v, ok := interface{}(m.GetAutoConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAutoConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "AutoConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptionsValidationError{ + field: "AutoConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAutoConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "AutoConfig", @@ -100,16 +211,41 @@ func (m *HttpProtocolOptions) Validate() error { } default: - return HttpProtocolOptionsValidationError{ + err := HttpProtocolOptionsValidationError{ field: "UpstreamProtocolOptions", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HttpProtocolOptionsMultiError(errors) } return nil } +// HttpProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by HttpProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type HttpProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpProtocolOptionsMultiError) AllErrors() []error { return m } + // HttpProtocolOptionsValidationError is the validation error returned by // HttpProtocolOptions.Validate if the designated constraints aren't met. type HttpProtocolOptionsValidationError struct { @@ -168,17 +304,52 @@ var _ interface { // Validate checks the field values on HttpProtocolOptions_ExplicitHttpConfig // with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. func (m *HttpProtocolOptions_ExplicitHttpConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpProtocolOptions_ExplicitHttpConfig with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// HttpProtocolOptions_ExplicitHttpConfigMultiError, or nil if none found. +func (m *HttpProtocolOptions_ExplicitHttpConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpProtocolOptions_ExplicitHttpConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.ProtocolConfig.(type) { case *HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions: - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_ExplicitHttpConfigValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_ExplicitHttpConfigValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptions_ExplicitHttpConfigValidationError{ field: "HttpProtocolOptions", @@ -190,7 +361,26 @@ func (m *HttpProtocolOptions_ExplicitHttpConfig) Validate() error { case *HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions: - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_ExplicitHttpConfigValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_ExplicitHttpConfigValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptions_ExplicitHttpConfigValidationError{ field: "Http2ProtocolOptions", @@ -200,17 +390,74 @@ func (m *HttpProtocolOptions_ExplicitHttpConfig) Validate() error { } } + case *HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions: + + if all { + switch v := interface{}(m.GetHttp3ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_ExplicitHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_ExplicitHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp3ProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptions_ExplicitHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: - return HttpProtocolOptions_ExplicitHttpConfigValidationError{ + err := HttpProtocolOptions_ExplicitHttpConfigValidationError{ field: "ProtocolConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HttpProtocolOptions_ExplicitHttpConfigMultiError(errors) } return nil } +// HttpProtocolOptions_ExplicitHttpConfigMultiError is an error wrapping +// multiple validation errors returned by +// HttpProtocolOptions_ExplicitHttpConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpProtocolOptions_ExplicitHttpConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpProtocolOptions_ExplicitHttpConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpProtocolOptions_ExplicitHttpConfigMultiError) AllErrors() []error { return m } + // HttpProtocolOptions_ExplicitHttpConfigValidationError is the validation // error returned by HttpProtocolOptions_ExplicitHttpConfig.Validate if the // designated constraints aren't met. @@ -270,13 +517,48 @@ var _ interface { // Validate checks the field values on // HttpProtocolOptions_UseDownstreamHttpConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpProtocolOptions_UseDownstreamHttpConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HttpProtocolOptions_UseDownstreamHttpConfig with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// HttpProtocolOptions_UseDownstreamHttpConfigMultiError, or nil if none found. +func (m *HttpProtocolOptions_UseDownstreamHttpConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpProtocolOptions_UseDownstreamHttpConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ field: "HttpProtocolOptions", @@ -286,7 +568,26 @@ func (m *HttpProtocolOptions_UseDownstreamHttpConfig) Validate() error { } } - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ field: "Http2ProtocolOptions", @@ -296,9 +597,60 @@ func (m *HttpProtocolOptions_UseDownstreamHttpConfig) Validate() error { } } + if all { + switch v := interface{}(m.GetHttp3ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp3ProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpProtocolOptions_UseDownstreamHttpConfigMultiError(errors) + } + return nil } +// HttpProtocolOptions_UseDownstreamHttpConfigMultiError is an error wrapping +// multiple validation errors returned by +// HttpProtocolOptions_UseDownstreamHttpConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpProtocolOptions_UseDownstreamHttpConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpProtocolOptions_UseDownstreamHttpConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpProtocolOptions_UseDownstreamHttpConfigMultiError) AllErrors() []error { return m } + // HttpProtocolOptions_UseDownstreamHttpConfigValidationError is the validation // error returned by HttpProtocolOptions_UseDownstreamHttpConfig.Validate if // the designated constraints aren't met. @@ -358,13 +710,47 @@ var _ interface { // Validate checks the field values on HttpProtocolOptions_AutoHttpConfig with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *HttpProtocolOptions_AutoHttpConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpProtocolOptions_AutoHttpConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// HttpProtocolOptions_AutoHttpConfigMultiError, or nil if none found. +func (m *HttpProtocolOptions_AutoHttpConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpProtocolOptions_AutoHttpConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetHttpProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptions_AutoHttpConfigValidationError{ field: "HttpProtocolOptions", @@ -374,7 +760,26 @@ func (m *HttpProtocolOptions_AutoHttpConfig) Validate() error { } } - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptions_AutoHttpConfigValidationError{ field: "Http2ProtocolOptions", @@ -384,9 +789,89 @@ func (m *HttpProtocolOptions_AutoHttpConfig) Validate() error { } } + if all { + switch v := interface{}(m.GetHttp3ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp3ProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "Http3ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAlternateProtocolsCacheOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAlternateProtocolsCacheOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpProtocolOptions_AutoHttpConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpProtocolOptions_AutoHttpConfigMultiError(errors) + } + return nil } +// HttpProtocolOptions_AutoHttpConfigMultiError is an error wrapping multiple +// validation errors returned by +// HttpProtocolOptions_AutoHttpConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpProtocolOptions_AutoHttpConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpProtocolOptions_AutoHttpConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpProtocolOptions_AutoHttpConfigMultiError) AllErrors() []error { return m } + // HttpProtocolOptions_AutoHttpConfigValidationError is the validation error // returned by HttpProtocolOptions_AutoHttpConfig.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.pb.go b/pkg/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.pb.go deleted file mode 100644 index cf8d5fbd1d..0000000000 --- a/pkg/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.pb.go +++ /dev/null @@ -1,656 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto - -package envoy_extensions_upstreams_http_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// HttpProtocolOptions specifies Http upstream protocol options. This object -// is used in -// :ref:`typed_extension_protocol_options`, -// keyed by the name `envoy.extensions.upstreams.http.v3.HttpProtocolOptions`. -// -// This controls what protocol(s) should be used for upstream and how said protocol(s) are configured. -// -// This replaces the prior pattern of explicit protocol configuration directly -// in the cluster. So a configuration like this, explicitly configuring the use of HTTP/2 upstream: -// -// .. code:: -// -// clusters: -// - name: some_service -// connect_timeout: 5s -// upstream_http_protocol_options: -// auto_sni: true -// common_http_protocol_options: -// idle_timeout: 1s -// http2_protocol_options: -// max_concurrent_streams: 100 -// .... [further cluster config] -// -// Would now look like this: -// -// .. code:: -// -// clusters: -// - name: some_service -// connect_timeout: 5s -// typed_extension_protocol_options: -// envoy.extensions.upstreams.http.v3.HttpProtocolOptions: -// "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions -// upstream_http_protocol_options: -// auto_sni: true -// common_http_protocol_options: -// idle_timeout: 1s -// explicit_http_config: -// http2_protocol_options: -// max_concurrent_streams: 100 -// .... [further cluster config] -// [#next-free-field: 6] -type HttpProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This contains options common across HTTP/1 and HTTP/2 - CommonHttpProtocolOptions *v4alpha.HttpProtocolOptions `protobuf:"bytes,1,opt,name=common_http_protocol_options,json=commonHttpProtocolOptions,proto3" json:"common_http_protocol_options,omitempty"` - // This contains common protocol options which are only applied upstream. - UpstreamHttpProtocolOptions *v4alpha.UpstreamHttpProtocolOptions `protobuf:"bytes,2,opt,name=upstream_http_protocol_options,json=upstreamHttpProtocolOptions,proto3" json:"upstream_http_protocol_options,omitempty"` - // This controls the actual protocol to be used upstream. - // - // Types that are assignable to UpstreamProtocolOptions: - // *HttpProtocolOptions_ExplicitHttpConfig_ - // *HttpProtocolOptions_UseDownstreamProtocolConfig - // *HttpProtocolOptions_AutoConfig - UpstreamProtocolOptions isHttpProtocolOptions_UpstreamProtocolOptions `protobuf_oneof:"upstream_protocol_options"` -} - -func (x *HttpProtocolOptions) Reset() { - *x = HttpProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpProtocolOptions) ProtoMessage() {} - -func (x *HttpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpProtocolOptions.ProtoReflect.Descriptor instead. -func (*HttpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescGZIP(), []int{0} -} - -func (x *HttpProtocolOptions) GetCommonHttpProtocolOptions() *v4alpha.HttpProtocolOptions { - if x != nil { - return x.CommonHttpProtocolOptions - } - return nil -} - -func (x *HttpProtocolOptions) GetUpstreamHttpProtocolOptions() *v4alpha.UpstreamHttpProtocolOptions { - if x != nil { - return x.UpstreamHttpProtocolOptions - } - return nil -} - -func (m *HttpProtocolOptions) GetUpstreamProtocolOptions() isHttpProtocolOptions_UpstreamProtocolOptions { - if m != nil { - return m.UpstreamProtocolOptions - } - return nil -} - -func (x *HttpProtocolOptions) GetExplicitHttpConfig() *HttpProtocolOptions_ExplicitHttpConfig { - if x, ok := x.GetUpstreamProtocolOptions().(*HttpProtocolOptions_ExplicitHttpConfig_); ok { - return x.ExplicitHttpConfig - } - return nil -} - -func (x *HttpProtocolOptions) GetUseDownstreamProtocolConfig() *HttpProtocolOptions_UseDownstreamHttpConfig { - if x, ok := x.GetUpstreamProtocolOptions().(*HttpProtocolOptions_UseDownstreamProtocolConfig); ok { - return x.UseDownstreamProtocolConfig - } - return nil -} - -func (x *HttpProtocolOptions) GetAutoConfig() *HttpProtocolOptions_AutoHttpConfig { - if x, ok := x.GetUpstreamProtocolOptions().(*HttpProtocolOptions_AutoConfig); ok { - return x.AutoConfig - } - return nil -} - -type isHttpProtocolOptions_UpstreamProtocolOptions interface { - isHttpProtocolOptions_UpstreamProtocolOptions() -} - -type HttpProtocolOptions_ExplicitHttpConfig_ struct { - // To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use *explicit_http_config*. - // If the *explicit_http_config* is empty, HTTP/1.1 is used. - ExplicitHttpConfig *HttpProtocolOptions_ExplicitHttpConfig `protobuf:"bytes,3,opt,name=explicit_http_config,json=explicitHttpConfig,proto3,oneof"` -} - -type HttpProtocolOptions_UseDownstreamProtocolConfig struct { - // This allows switching on protocol based on what protocol the downstream - // connection used. - UseDownstreamProtocolConfig *HttpProtocolOptions_UseDownstreamHttpConfig `protobuf:"bytes,4,opt,name=use_downstream_protocol_config,json=useDownstreamProtocolConfig,proto3,oneof"` -} - -type HttpProtocolOptions_AutoConfig struct { - // This allows switching on protocol based on ALPN - AutoConfig *HttpProtocolOptions_AutoHttpConfig `protobuf:"bytes,5,opt,name=auto_config,json=autoConfig,proto3,oneof"` -} - -func (*HttpProtocolOptions_ExplicitHttpConfig_) isHttpProtocolOptions_UpstreamProtocolOptions() {} - -func (*HttpProtocolOptions_UseDownstreamProtocolConfig) isHttpProtocolOptions_UpstreamProtocolOptions() { -} - -func (*HttpProtocolOptions_AutoConfig) isHttpProtocolOptions_UpstreamProtocolOptions() {} - -// If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). -// Note that HTTP/2 should generally be used for upstream clusters doing gRPC. -type HttpProtocolOptions_ExplicitHttpConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ProtocolConfig: - // *HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions - // *HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions - ProtocolConfig isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig `protobuf_oneof:"protocol_config"` -} - -func (x *HttpProtocolOptions_ExplicitHttpConfig) Reset() { - *x = HttpProtocolOptions_ExplicitHttpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpProtocolOptions_ExplicitHttpConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpProtocolOptions_ExplicitHttpConfig) ProtoMessage() {} - -func (x *HttpProtocolOptions_ExplicitHttpConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpProtocolOptions_ExplicitHttpConfig.ProtoReflect.Descriptor instead. -func (*HttpProtocolOptions_ExplicitHttpConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *HttpProtocolOptions_ExplicitHttpConfig) GetProtocolConfig() isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig { - if m != nil { - return m.ProtocolConfig - } - return nil -} - -func (x *HttpProtocolOptions_ExplicitHttpConfig) GetHttpProtocolOptions() *v4alpha.Http1ProtocolOptions { - if x, ok := x.GetProtocolConfig().(*HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions); ok { - return x.HttpProtocolOptions - } - return nil -} - -func (x *HttpProtocolOptions_ExplicitHttpConfig) GetHttp2ProtocolOptions() *v4alpha.Http2ProtocolOptions { - if x, ok := x.GetProtocolConfig().(*HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions); ok { - return x.Http2ProtocolOptions - } - return nil -} - -type isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig interface { - isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig() -} - -type HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions struct { - HttpProtocolOptions *v4alpha.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3,oneof"` -} - -type HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions struct { - Http2ProtocolOptions *v4alpha.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3,oneof"` -} - -func (*HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions) isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig() { -} - -func (*HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions) isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig() { -} - -// If this is used, the cluster can use either of the configured protocols, and -// will use whichever protocol was used by the downstream connection. -type HttpProtocolOptions_UseDownstreamHttpConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HttpProtocolOptions *v4alpha.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` - Http2ProtocolOptions *v4alpha.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` -} - -func (x *HttpProtocolOptions_UseDownstreamHttpConfig) Reset() { - *x = HttpProtocolOptions_UseDownstreamHttpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpProtocolOptions_UseDownstreamHttpConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpProtocolOptions_UseDownstreamHttpConfig) ProtoMessage() {} - -func (x *HttpProtocolOptions_UseDownstreamHttpConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpProtocolOptions_UseDownstreamHttpConfig.ProtoReflect.Descriptor instead. -func (*HttpProtocolOptions_UseDownstreamHttpConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *HttpProtocolOptions_UseDownstreamHttpConfig) GetHttpProtocolOptions() *v4alpha.Http1ProtocolOptions { - if x != nil { - return x.HttpProtocolOptions - } - return nil -} - -func (x *HttpProtocolOptions_UseDownstreamHttpConfig) GetHttp2ProtocolOptions() *v4alpha.Http2ProtocolOptions { - if x != nil { - return x.Http2ProtocolOptions - } - return nil -} - -// If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever -// protocol is negotiated by ALPN with the upstream. -// Clusters configured with *AutoHttpConfig* will use the highest available -// protocol; HTTP/2 if supported, otherwise HTTP/1. -// If the upstream does not support ALPN, *AutoHttpConfig* will fail over to HTTP/1. -// This can only be used with transport sockets which support ALPN. Using a -// transport socket which does not support ALPN will result in configuration -// failure. The transport layer may be configured with custom ALPN, but the default ALPN -// for the cluster (or if custom ALPN fails) will be "h2,http/1.1". -type HttpProtocolOptions_AutoHttpConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HttpProtocolOptions *v4alpha.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` - Http2ProtocolOptions *v4alpha.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` -} - -func (x *HttpProtocolOptions_AutoHttpConfig) Reset() { - *x = HttpProtocolOptions_AutoHttpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpProtocolOptions_AutoHttpConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpProtocolOptions_AutoHttpConfig) ProtoMessage() {} - -func (x *HttpProtocolOptions_AutoHttpConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpProtocolOptions_AutoHttpConfig.ProtoReflect.Descriptor instead. -func (*HttpProtocolOptions_AutoHttpConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *HttpProtocolOptions_AutoHttpConfig) GetHttpProtocolOptions() *v4alpha.Http1ProtocolOptions { - if x != nil { - return x.HttpProtocolOptions - } - return nil -} - -func (x *HttpProtocolOptions_AutoHttpConfig) GetHttp2ProtocolOptions() *v4alpha.Http2ProtocolOptions { - if x != nil { - return x.Http2ProtocolOptions - } - return nil -} - -var File_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto protoreflect.FileDescriptor - -var file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDesc = []byte{ - 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, - 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x28, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x0d, 0x0a, 0x13, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6f, 0x0a, 0x1c, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7b, 0x0a, 0x1e, - 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x1b, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x14, 0x65, 0x78, - 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x48, - 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, 0x70, - 0x6c, 0x69, 0x63, 0x69, 0x74, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x9b, 0x01, 0x0a, 0x1e, 0x75, 0x73, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, - 0x52, 0x1b, 0x75, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6e, 0x0a, - 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, - 0x00, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xce, 0x02, - 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x68, - 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x14, - 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x50, 0x9a, 0xc5, 0x88, 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x48, 0x74, 0x74, 0x70, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x16, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xbc, - 0x02, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x63, 0x0a, 0x15, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x65, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x55, 0x9a, 0xc5, 0x88, 0x1e, 0x50, 0x0a, 0x4e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xaa, 0x02, - 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x6f, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x63, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x65, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x4c, 0x9a, 0xc5, - 0x88, 0x1e, 0x47, 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x6f, - 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, - 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x20, 0x0a, 0x19, 0x75, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x5b, 0x0a, 0x35, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x18, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescOnce sync.Once - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescData = file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDesc -) - -func file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescGZIP() []byte { - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescOnce.Do(func() { - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescData) - }) - return file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDescData -} - -var file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_goTypes = []interface{}{ - (*HttpProtocolOptions)(nil), // 0: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions - (*HttpProtocolOptions_ExplicitHttpConfig)(nil), // 1: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.ExplicitHttpConfig - (*HttpProtocolOptions_UseDownstreamHttpConfig)(nil), // 2: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.UseDownstreamHttpConfig - (*HttpProtocolOptions_AutoHttpConfig)(nil), // 3: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.AutoHttpConfig - (*v4alpha.HttpProtocolOptions)(nil), // 4: envoy.config.core.v4alpha.HttpProtocolOptions - (*v4alpha.UpstreamHttpProtocolOptions)(nil), // 5: envoy.config.core.v4alpha.UpstreamHttpProtocolOptions - (*v4alpha.Http1ProtocolOptions)(nil), // 6: envoy.config.core.v4alpha.Http1ProtocolOptions - (*v4alpha.Http2ProtocolOptions)(nil), // 7: envoy.config.core.v4alpha.Http2ProtocolOptions -} -var file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_depIdxs = []int32{ - 4, // 0: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.common_http_protocol_options:type_name -> envoy.config.core.v4alpha.HttpProtocolOptions - 5, // 1: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.upstream_http_protocol_options:type_name -> envoy.config.core.v4alpha.UpstreamHttpProtocolOptions - 1, // 2: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.explicit_http_config:type_name -> envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.ExplicitHttpConfig - 2, // 3: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.use_downstream_protocol_config:type_name -> envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.UseDownstreamHttpConfig - 3, // 4: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.auto_config:type_name -> envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.AutoHttpConfig - 6, // 5: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.ExplicitHttpConfig.http_protocol_options:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions - 7, // 6: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.ExplicitHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v4alpha.Http2ProtocolOptions - 6, // 7: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.UseDownstreamHttpConfig.http_protocol_options:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions - 7, // 8: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.UseDownstreamHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v4alpha.Http2ProtocolOptions - 6, // 9: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.AutoHttpConfig.http_protocol_options:type_name -> envoy.config.core.v4alpha.Http1ProtocolOptions - 7, // 10: envoy.extensions.upstreams.http.v4alpha.HttpProtocolOptions.AutoHttpConfig.http2_protocol_options:type_name -> envoy.config.core.v4alpha.Http2ProtocolOptions - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_init() } -func file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_init() { - if File_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpProtocolOptions_ExplicitHttpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpProtocolOptions_UseDownstreamHttpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpProtocolOptions_AutoHttpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*HttpProtocolOptions_ExplicitHttpConfig_)(nil), - (*HttpProtocolOptions_UseDownstreamProtocolConfig)(nil), - (*HttpProtocolOptions_AutoConfig)(nil), - } - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions)(nil), - (*HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_goTypes, - DependencyIndexes: file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_depIdxs, - MessageInfos: file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_msgTypes, - }.Build() - File_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto = out.File - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_rawDesc = nil - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_goTypes = nil - file_envoy_extensions_upstreams_http_v4alpha_http_protocol_options_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.pb.validate.go b/pkg/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.pb.validate.go deleted file mode 100644 index 6cd42b4f42..0000000000 --- a/pkg/api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.pb.validate.go +++ /dev/null @@ -1,445 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto - -package envoy_extensions_upstreams_http_v4alpha - -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{} -) - -// 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. -func (m *HttpProtocolOptions) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "CommonHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "UpstreamHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.UpstreamProtocolOptions.(type) { - - case *HttpProtocolOptions_ExplicitHttpConfig_: - - if v, ok := interface{}(m.GetExplicitHttpConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "ExplicitHttpConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HttpProtocolOptions_UseDownstreamProtocolConfig: - - if v, ok := interface{}(m.GetUseDownstreamProtocolConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "UseDownstreamProtocolConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HttpProtocolOptions_AutoConfig: - - if v, ok := interface{}(m.GetAutoConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "AutoConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return HttpProtocolOptionsValidationError{ - field: "UpstreamProtocolOptions", - reason: "value is required", - } - - } - - return nil -} - -// HttpProtocolOptionsValidationError is the validation error returned by -// HttpProtocolOptions.Validate if the designated constraints aren't met. -type HttpProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpProtocolOptionsValidationError) ErrorName() string { - return "HttpProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpProtocolOptionsValidationError{} - -// Validate checks the field values on HttpProtocolOptions_ExplicitHttpConfig -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *HttpProtocolOptions_ExplicitHttpConfig) Validate() error { - if m == nil { - return nil - } - - switch m.ProtocolConfig.(type) { - - case *HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions: - - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptions_ExplicitHttpConfigValidationError{ - field: "HttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions: - - if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptions_ExplicitHttpConfigValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return HttpProtocolOptions_ExplicitHttpConfigValidationError{ - field: "ProtocolConfig", - reason: "value is required", - } - - } - - return nil -} - -// HttpProtocolOptions_ExplicitHttpConfigValidationError is the validation -// error returned by HttpProtocolOptions_ExplicitHttpConfig.Validate if the -// designated constraints aren't met. -type HttpProtocolOptions_ExplicitHttpConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpProtocolOptions_ExplicitHttpConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpProtocolOptions_ExplicitHttpConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpProtocolOptions_ExplicitHttpConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpProtocolOptions_ExplicitHttpConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpProtocolOptions_ExplicitHttpConfigValidationError) ErrorName() string { - return "HttpProtocolOptions_ExplicitHttpConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpProtocolOptions_ExplicitHttpConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpProtocolOptions_ExplicitHttpConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpProtocolOptions_ExplicitHttpConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpProtocolOptions_ExplicitHttpConfigValidationError{} - -// Validate checks the field values on -// HttpProtocolOptions_UseDownstreamHttpConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HttpProtocolOptions_UseDownstreamHttpConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ - 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 HttpProtocolOptions_UseDownstreamHttpConfigValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// HttpProtocolOptions_UseDownstreamHttpConfigValidationError is the validation -// error returned by HttpProtocolOptions_UseDownstreamHttpConfig.Validate if -// the designated constraints aren't met. -type HttpProtocolOptions_UseDownstreamHttpConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpProtocolOptions_UseDownstreamHttpConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpProtocolOptions_UseDownstreamHttpConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpProtocolOptions_UseDownstreamHttpConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpProtocolOptions_UseDownstreamHttpConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpProtocolOptions_UseDownstreamHttpConfigValidationError) ErrorName() string { - return "HttpProtocolOptions_UseDownstreamHttpConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpProtocolOptions_UseDownstreamHttpConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpProtocolOptions_UseDownstreamHttpConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpProtocolOptions_UseDownstreamHttpConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpProtocolOptions_UseDownstreamHttpConfigValidationError{} - -// Validate checks the field values on HttpProtocolOptions_AutoHttpConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *HttpProtocolOptions_AutoHttpConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptions_AutoHttpConfigValidationError{ - 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 HttpProtocolOptions_AutoHttpConfigValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// HttpProtocolOptions_AutoHttpConfigValidationError is the validation error -// returned by HttpProtocolOptions_AutoHttpConfig.Validate if the designated -// constraints aren't met. -type HttpProtocolOptions_AutoHttpConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpProtocolOptions_AutoHttpConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpProtocolOptions_AutoHttpConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpProtocolOptions_AutoHttpConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpProtocolOptions_AutoHttpConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpProtocolOptions_AutoHttpConfigValidationError) ErrorName() string { - return "HttpProtocolOptions_AutoHttpConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpProtocolOptions_AutoHttpConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpProtocolOptions_AutoHttpConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpProtocolOptions_AutoHttpConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpProtocolOptions_AutoHttpConfigValidationError{} diff --git a/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.go b/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.go index 4671a35990..ff05b4f60b 100644 --- a/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.go +++ b/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto -package envoy_extensions_upstreams_tcp_generic_v3 +package genericv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A connection pool which forwards downstream TCP as TCP or HTTP to upstream, // based on CONNECT configuration. // [#extension: envoy.upstreams.tcp.generic] @@ -81,14 +76,20 @@ var file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x42, 0x69, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x74, 0x63, - 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x24, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x42, 0xc5, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x74, + 0x63, 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x24, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x74, 0x63, 0x70, 0x2f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.validate.go b/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.validate.go index 2e7c553a52..665ef49c90 100644 --- a/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.validate.go +++ b/pkg/api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto -package envoy_extensions_upstreams_tcp_generic_v3 +package genericv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on GenericConnectionPoolProto with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *GenericConnectionPoolProto) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GenericConnectionPoolProto with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GenericConnectionPoolProtoMultiError, or nil if none found. +func (m *GenericConnectionPoolProto) ValidateAll() error { + return m.validate(true) +} + +func (m *GenericConnectionPoolProto) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return GenericConnectionPoolProtoMultiError(errors) + } + return nil } +// GenericConnectionPoolProtoMultiError is an error wrapping multiple +// validation errors returned by GenericConnectionPoolProto.ValidateAll() if +// the designated constraints aren't met. +type GenericConnectionPoolProtoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GenericConnectionPoolProtoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GenericConnectionPoolProtoMultiError) AllErrors() []error { return m } + // GenericConnectionPoolProtoValidationError is the validation error returned // by GenericConnectionPoolProto.Validate if the designated constraints aren't met. type GenericConnectionPoolProtoValidationError struct { diff --git a/pkg/api/envoy/extensions/wasm/v3/wasm.pb.go b/pkg/api/envoy/extensions/wasm/v3/wasm.pb.go index 42a25ebbb7..6f1987e833 100644 --- a/pkg/api/envoy/extensions/wasm/v3/wasm.pb.go +++ b/pkg/api/envoy/extensions/wasm/v3/wasm.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/extensions/wasm/v3/wasm.proto -package envoy_extensions_wasm_v3 +package wasmv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,12 +24,108 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// Configuration for restricting Proxy-Wasm capabilities available to modules. +type CapabilityRestrictionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Proxy-Wasm capabilities which will be allowed. Capabilities are mapped by + // name. The *SanitizationConfig* which each capability maps to is currently unimplemented and ignored, + // and so should be left empty. + // + // The capability names are given in the + // `Proxy-Wasm ABI `_. + // Additionally, the following WASI capabilities from + // `this list `_ + // are implemented and can be allowed: + // *fd_write*, *fd_read*, *fd_seek*, *fd_close*, *fd_fdstat_get*, *environ_get*, *environ_sizes_get*, + // *args_get*, *args_sizes_get*, *proc_exit*, *clock_time_get*, *random_get*. + AllowedCapabilities map[string]*SanitizationConfig `protobuf:"bytes,1,rep,name=allowed_capabilities,json=allowedCapabilities,proto3" json:"allowed_capabilities,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *CapabilityRestrictionConfig) Reset() { + *x = CapabilityRestrictionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CapabilityRestrictionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CapabilityRestrictionConfig) ProtoMessage() {} + +func (x *CapabilityRestrictionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CapabilityRestrictionConfig.ProtoReflect.Descriptor instead. +func (*CapabilityRestrictionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{0} +} + +func (x *CapabilityRestrictionConfig) GetAllowedCapabilities() map[string]*SanitizationConfig { + if x != nil { + return x.AllowedCapabilities + } + return nil +} + +// Configuration for sanitization of inputs to an allowed capability. +// +// NOTE: This is currently unimplemented. +type SanitizationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SanitizationConfig) Reset() { + *x = SanitizationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SanitizationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SanitizationConfig) ProtoMessage() {} + +func (x *SanitizationConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SanitizationConfig.ProtoReflect.Descriptor instead. +func (*SanitizationConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{1} +} // Configuration for a Wasm VM. -// [#next-free-field: 7] +// [#next-free-field: 8] type VmConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -40,7 +135,7 @@ type VmConfig struct { // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can // reduce memory utilization and make sharing of data easier which may have security implications. - // See ref: "TODO: add ref" for details. + // [#comment: TODO: add ref for details.] VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` // The Wasm runtime type. // Available Wasm runtime types are registered as extensions. The following runtimes are included @@ -55,6 +150,11 @@ type VmConfig struct { // // **envoy.wasm.runtime.v8**: `V8 `_-based WebAssembly runtime. // + // .. _extension_envoy.wasm.runtime.wamr: + // + // **envoy.wasm.runtime.wamr**: `WAMR `_-based WebAssembly runtime. + // This runtime is not enabled in the official build. + // // .. _extension_envoy.wasm.runtime.wavm: // // **envoy.wasm.runtime.wavm**: `WAVM `_-based WebAssembly runtime. @@ -65,6 +165,7 @@ type VmConfig struct { // **envoy.wasm.runtime.wasmtime**: `Wasmtime `_-based WebAssembly runtime. // This runtime is not enabled in the official build. // + // [#extension-category: envoy.wasm.runtime] Runtime string `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"` // The Wasm code that Envoy will execute. Code *v3.AsyncDataSource `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` @@ -81,12 +182,18 @@ type VmConfig struct { // update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter // warming state. NackOnCodeCacheMiss bool `protobuf:"varint,6,opt,name=nack_on_code_cache_miss,json=nackOnCodeCacheMiss,proto3" json:"nack_on_code_cache_miss,omitempty"` + // Specifies environment variables to be injected to this VM which will be available through + // WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions are mostly implicitly + // called in your language's standard library, so you do not need to call them directly and you can access to env + // vars just like when you do on native platforms. + // Warning: Envoy rejects the configuration if there's conflict of key space. + EnvironmentVariables *EnvironmentVariables `protobuf:"bytes,7,opt,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"` } func (x *VmConfig) Reset() { *x = VmConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0] + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -99,7 +206,7 @@ func (x *VmConfig) String() string { func (*VmConfig) ProtoMessage() {} func (x *VmConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0] + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112,7 +219,7 @@ func (x *VmConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use VmConfig.ProtoReflect.Descriptor instead. func (*VmConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{0} + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{2} } func (x *VmConfig) GetVmId() string { @@ -157,8 +264,73 @@ func (x *VmConfig) GetNackOnCodeCacheMiss() bool { return false } +func (x *VmConfig) GetEnvironmentVariables() *EnvironmentVariables { + if x != nil { + return x.EnvironmentVariables + } + return nil +} + +type EnvironmentVariables struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The keys of *Envoy's* environment variables exposed to this VM. In other words, if a key exists in Envoy's environment + // variables, then that key-value pair will be injected. Note that if a key does not exist, it will be ignored. + HostEnvKeys []string `protobuf:"bytes,1,rep,name=host_env_keys,json=hostEnvKeys,proto3" json:"host_env_keys,omitempty"` + // Explicitly given key-value pairs to be injected to this VM in the form of "KEY=VALUE". + KeyValues map[string]string `protobuf:"bytes,2,rep,name=key_values,json=keyValues,proto3" json:"key_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *EnvironmentVariables) Reset() { + *x = EnvironmentVariables{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnvironmentVariables) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvironmentVariables) ProtoMessage() {} + +func (x *EnvironmentVariables) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvironmentVariables.ProtoReflect.Descriptor instead. +func (*EnvironmentVariables) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{3} +} + +func (x *EnvironmentVariables) GetHostEnvKeys() []string { + if x != nil { + return x.HostEnvKeys + } + return nil +} + +func (x *EnvironmentVariables) GetKeyValues() map[string]string { + if x != nil { + return x.KeyValues + } + return nil +} + // Base Configuration for Wasm Plugins e.g. filters and services. -// [#next-free-field: 6] +// [#next-free-field: 7] type PluginConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -189,12 +361,14 @@ type PluginConfig struct { // during xDS updates the xDS configuration will be rejected and when on_start or on_configuration return false on initial // startup the proxy will not start. FailOpen bool `protobuf:"varint,5,opt,name=fail_open,json=failOpen,proto3" json:"fail_open,omitempty"` + // Configuration for restricting Proxy-Wasm capabilities available to modules. + CapabilityRestrictionConfig *CapabilityRestrictionConfig `protobuf:"bytes,6,opt,name=capability_restriction_config,json=capabilityRestrictionConfig,proto3" json:"capability_restriction_config,omitempty"` } func (x *PluginConfig) Reset() { *x = PluginConfig{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1] + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -207,7 +381,7 @@ func (x *PluginConfig) String() string { func (*PluginConfig) ProtoMessage() {} func (x *PluginConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1] + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -220,7 +394,7 @@ func (x *PluginConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use PluginConfig.ProtoReflect.Descriptor instead. func (*PluginConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{1} + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{4} } func (x *PluginConfig) GetName() string { @@ -265,6 +439,13 @@ func (x *PluginConfig) GetFailOpen() bool { return false } +func (x *PluginConfig) GetCapabilityRestrictionConfig() *CapabilityRestrictionConfig { + if x != nil { + return x.CapabilityRestrictionConfig + } + return nil +} + type isPluginConfig_Vm interface { isPluginConfig_Vm() } @@ -292,7 +473,7 @@ type WasmService struct { func (x *WasmService) Reset() { *x = WasmService{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2] + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -305,7 +486,7 @@ func (x *WasmService) String() string { func (*WasmService) ProtoMessage() {} func (x *WasmService) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2] + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -318,7 +499,7 @@ func (x *WasmService) ProtoReflect() protoreflect.Message { // Deprecated: Use WasmService.ProtoReflect.Descriptor instead. func (*WasmService) Descriptor() ([]byte, []int) { - return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{2} + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{5} } func (x *WasmService) GetConfig() *PluginConfig { @@ -347,54 +528,103 @@ var file_envoy_extensions_wasm_v3_wasm_proto_rawDesc = []byte{ 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x02, 0x0a, 0x08, 0x56, 0x6d, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x65, 0x63, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x12, - 0x34, 0x0a, 0x17, 0x6e, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x13, 0x6e, 0x61, 0x63, 0x6b, 0x4f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x4d, 0x69, 0x73, 0x73, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, - 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, - 0x74, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x09, 0x76, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, - 0x33, 0x2e, 0x56, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x08, 0x76, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x61, 0x69, 0x6c, 0x4f, 0x70, 0x65, 0x6e, 0x42, - 0x04, 0x0a, 0x02, 0x76, 0x6d, 0x22, 0x6b, 0x0a, 0x0b, 0x57, 0x61, 0x73, 0x6d, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x02, 0x0a, 0x1b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x74, 0x0a, 0x18, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, - 0x6f, 0x6e, 0x42, 0x3d, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, - 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x14, 0x0a, + 0x12, 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x81, 0x03, 0x0a, 0x08, 0x56, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x73, + 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x17, + 0x6e, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6e, + 0x61, 0x63, 0x6b, 0x4f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4d, 0x69, + 0x73, 0x73, 0x12, 0x63, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x52, 0x14, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x14, 0x45, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x76, + 0x4b, 0x65, 0x79, 0x73, 0x12, 0x5c, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, + 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xd8, 0x02, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x41, + 0x0a, 0x09, 0x76, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x6d, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x08, 0x76, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x3a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, + 0x09, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x66, 0x61, 0x69, 0x6c, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x79, 0x0a, 0x1d, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1b, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0x0a, 0x02, 0x76, 0x6d, 0x22, 0x6b, 0x0a, 0x0b, 0x57, + 0x61, 0x73, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, + 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x42, 0x85, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, + 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, + 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -409,25 +639,35 @@ func file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP() []byte { return file_envoy_extensions_wasm_v3_wasm_proto_rawDescData } -var file_envoy_extensions_wasm_v3_wasm_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_wasm_v3_wasm_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_envoy_extensions_wasm_v3_wasm_proto_goTypes = []interface{}{ - (*VmConfig)(nil), // 0: envoy.extensions.wasm.v3.VmConfig - (*PluginConfig)(nil), // 1: envoy.extensions.wasm.v3.PluginConfig - (*WasmService)(nil), // 2: envoy.extensions.wasm.v3.WasmService - (*v3.AsyncDataSource)(nil), // 3: envoy.config.core.v3.AsyncDataSource - (*any.Any)(nil), // 4: google.protobuf.Any + (*CapabilityRestrictionConfig)(nil), // 0: envoy.extensions.wasm.v3.CapabilityRestrictionConfig + (*SanitizationConfig)(nil), // 1: envoy.extensions.wasm.v3.SanitizationConfig + (*VmConfig)(nil), // 2: envoy.extensions.wasm.v3.VmConfig + (*EnvironmentVariables)(nil), // 3: envoy.extensions.wasm.v3.EnvironmentVariables + (*PluginConfig)(nil), // 4: envoy.extensions.wasm.v3.PluginConfig + (*WasmService)(nil), // 5: envoy.extensions.wasm.v3.WasmService + nil, // 6: envoy.extensions.wasm.v3.CapabilityRestrictionConfig.AllowedCapabilitiesEntry + nil, // 7: envoy.extensions.wasm.v3.EnvironmentVariables.KeyValuesEntry + (*v3.AsyncDataSource)(nil), // 8: envoy.config.core.v3.AsyncDataSource + (*any.Any)(nil), // 9: google.protobuf.Any } var file_envoy_extensions_wasm_v3_wasm_proto_depIdxs = []int32{ - 3, // 0: envoy.extensions.wasm.v3.VmConfig.code:type_name -> envoy.config.core.v3.AsyncDataSource - 4, // 1: envoy.extensions.wasm.v3.VmConfig.configuration:type_name -> google.protobuf.Any - 0, // 2: envoy.extensions.wasm.v3.PluginConfig.vm_config:type_name -> envoy.extensions.wasm.v3.VmConfig - 4, // 3: envoy.extensions.wasm.v3.PluginConfig.configuration:type_name -> google.protobuf.Any - 1, // 4: envoy.extensions.wasm.v3.WasmService.config:type_name -> envoy.extensions.wasm.v3.PluginConfig - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 6, // 0: envoy.extensions.wasm.v3.CapabilityRestrictionConfig.allowed_capabilities:type_name -> envoy.extensions.wasm.v3.CapabilityRestrictionConfig.AllowedCapabilitiesEntry + 8, // 1: envoy.extensions.wasm.v3.VmConfig.code:type_name -> envoy.config.core.v3.AsyncDataSource + 9, // 2: envoy.extensions.wasm.v3.VmConfig.configuration:type_name -> google.protobuf.Any + 3, // 3: envoy.extensions.wasm.v3.VmConfig.environment_variables:type_name -> envoy.extensions.wasm.v3.EnvironmentVariables + 7, // 4: envoy.extensions.wasm.v3.EnvironmentVariables.key_values:type_name -> envoy.extensions.wasm.v3.EnvironmentVariables.KeyValuesEntry + 2, // 5: envoy.extensions.wasm.v3.PluginConfig.vm_config:type_name -> envoy.extensions.wasm.v3.VmConfig + 9, // 6: envoy.extensions.wasm.v3.PluginConfig.configuration:type_name -> google.protobuf.Any + 0, // 7: envoy.extensions.wasm.v3.PluginConfig.capability_restriction_config:type_name -> envoy.extensions.wasm.v3.CapabilityRestrictionConfig + 4, // 8: envoy.extensions.wasm.v3.WasmService.config:type_name -> envoy.extensions.wasm.v3.PluginConfig + 1, // 9: envoy.extensions.wasm.v3.CapabilityRestrictionConfig.AllowedCapabilitiesEntry.value:type_name -> envoy.extensions.wasm.v3.SanitizationConfig + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_envoy_extensions_wasm_v3_wasm_proto_init() } @@ -437,7 +677,7 @@ func file_envoy_extensions_wasm_v3_wasm_proto_init() { } if !protoimpl.UnsafeEnabled { file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VmConfig); i { + switch v := v.(*CapabilityRestrictionConfig); i { case 0: return &v.state case 1: @@ -449,7 +689,7 @@ func file_envoy_extensions_wasm_v3_wasm_proto_init() { } } file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PluginConfig); i { + switch v := v.(*SanitizationConfig); i { case 0: return &v.state case 1: @@ -461,6 +701,42 @@ func file_envoy_extensions_wasm_v3_wasm_proto_init() { } } file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VmConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnvironmentVariables); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WasmService); i { case 0: return &v.state @@ -473,7 +749,7 @@ func file_envoy_extensions_wasm_v3_wasm_proto_init() { } } } - file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4].OneofWrappers = []interface{}{ (*PluginConfig_VmConfig)(nil), } type x struct{} @@ -482,7 +758,7 @@ func file_envoy_extensions_wasm_v3_wasm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_wasm_v3_wasm_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/extensions/wasm/v3/wasm.pb.validate.go b/pkg/api/envoy/extensions/wasm/v3/wasm.pb.validate.go index d3cc0526bb..097cb80f9d 100644 --- a/pkg/api/envoy/extensions/wasm/v3/wasm.pb.validate.go +++ b/pkg/api/envoy/extensions/wasm/v3/wasm.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/extensions/wasm/v3/wasm.proto -package envoy_extensions_wasm_v3 +package wasmv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,316 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) +// Validate checks the field values on CapabilityRestrictionConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CapabilityRestrictionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CapabilityRestrictionConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CapabilityRestrictionConfigMultiError, or nil if none found. +func (m *CapabilityRestrictionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CapabilityRestrictionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetAllowedCapabilities())) + i := 0 + for key := range m.GetAllowedCapabilities() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetAllowedCapabilities()[key] + _ = val + + // no validation rules for AllowedCapabilities[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CapabilityRestrictionConfigValidationError{ + field: fmt.Sprintf("AllowedCapabilities[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CapabilityRestrictionConfigValidationError{ + field: fmt.Sprintf("AllowedCapabilities[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CapabilityRestrictionConfigValidationError{ + field: fmt.Sprintf("AllowedCapabilities[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return CapabilityRestrictionConfigMultiError(errors) + } + + return nil +} + +// CapabilityRestrictionConfigMultiError is an error wrapping multiple +// validation errors returned by CapabilityRestrictionConfig.ValidateAll() if +// the designated constraints aren't met. +type CapabilityRestrictionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CapabilityRestrictionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CapabilityRestrictionConfigMultiError) AllErrors() []error { return m } + +// CapabilityRestrictionConfigValidationError is the validation error returned +// by CapabilityRestrictionConfig.Validate if the designated constraints +// aren't met. +type CapabilityRestrictionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CapabilityRestrictionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CapabilityRestrictionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CapabilityRestrictionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CapabilityRestrictionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CapabilityRestrictionConfigValidationError) ErrorName() string { + return "CapabilityRestrictionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CapabilityRestrictionConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCapabilityRestrictionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CapabilityRestrictionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CapabilityRestrictionConfigValidationError{} + +// Validate checks the field values on SanitizationConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SanitizationConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SanitizationConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SanitizationConfigMultiError, or nil if none found. +func (m *SanitizationConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SanitizationConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SanitizationConfigMultiError(errors) + } + + return nil +} + +// SanitizationConfigMultiError is an error wrapping multiple validation errors +// returned by SanitizationConfig.ValidateAll() if the designated constraints +// aren't met. +type SanitizationConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SanitizationConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SanitizationConfigMultiError) AllErrors() []error { return m } + +// SanitizationConfigValidationError is the validation error returned by +// SanitizationConfig.Validate if the designated constraints aren't met. +type SanitizationConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SanitizationConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SanitizationConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SanitizationConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SanitizationConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SanitizationConfigValidationError) ErrorName() string { + return "SanitizationConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e SanitizationConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSanitizationConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SanitizationConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SanitizationConfigValidationError{} + // Validate checks the field values on VmConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *VmConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on VmConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in VmConfigMultiError, or nil +// if none found. +func (m *VmConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *VmConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VmId if utf8.RuneCountInString(m.GetRuntime()) < 1 { - return VmConfigValidationError{ + err := VmConfigValidationError{ field: "Runtime", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetCode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Code", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Code", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VmConfigValidationError{ field: "Code", @@ -59,7 +350,26 @@ func (m *VmConfig) Validate() error { } } - if v, ok := interface{}(m.GetConfiguration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfiguration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VmConfigValidationError{ field: "Configuration", @@ -73,9 +383,58 @@ func (m *VmConfig) Validate() error { // no validation rules for NackOnCodeCacheMiss + if all { + switch v := interface{}(m.GetEnvironmentVariables()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "EnvironmentVariables", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "EnvironmentVariables", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnvironmentVariables()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VmConfigValidationError{ + field: "EnvironmentVariables", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return VmConfigMultiError(errors) + } + return nil } +// VmConfigMultiError is an error wrapping multiple validation errors returned +// by VmConfig.ValidateAll() if the designated constraints aren't met. +type VmConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VmConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VmConfigMultiError) AllErrors() []error { return m } + // VmConfigValidationError is the validation error returned by // VmConfig.Validate if the designated constraints aren't met. type VmConfigValidationError struct { @@ -130,19 +489,156 @@ var _ interface { ErrorName() string } = VmConfigValidationError{} +// Validate checks the field values on EnvironmentVariables with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *EnvironmentVariables) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EnvironmentVariables with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EnvironmentVariablesMultiError, or nil if none found. +func (m *EnvironmentVariables) ValidateAll() error { + return m.validate(true) +} + +func (m *EnvironmentVariables) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for KeyValues + + if len(errors) > 0 { + return EnvironmentVariablesMultiError(errors) + } + + return nil +} + +// EnvironmentVariablesMultiError is an error wrapping multiple validation +// errors returned by EnvironmentVariables.ValidateAll() if the designated +// constraints aren't met. +type EnvironmentVariablesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EnvironmentVariablesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EnvironmentVariablesMultiError) AllErrors() []error { return m } + +// EnvironmentVariablesValidationError is the validation error returned by +// EnvironmentVariables.Validate if the designated constraints aren't met. +type EnvironmentVariablesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EnvironmentVariablesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EnvironmentVariablesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EnvironmentVariablesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EnvironmentVariablesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EnvironmentVariablesValidationError) ErrorName() string { + return "EnvironmentVariablesValidationError" +} + +// Error satisfies the builtin error interface +func (e EnvironmentVariablesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sEnvironmentVariables.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EnvironmentVariablesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EnvironmentVariablesValidationError{} + // Validate checks the field values on PluginConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PluginConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PluginConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PluginConfigMultiError, or +// nil if none found. +func (m *PluginConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PluginConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for RootId - if v, ok := interface{}(m.GetConfiguration()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfiguration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PluginConfigValidationError{ field: "Configuration", @@ -154,11 +650,59 @@ func (m *PluginConfig) Validate() error { // no validation rules for FailOpen + if all { + switch v := interface{}(m.GetCapabilityRestrictionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "CapabilityRestrictionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "CapabilityRestrictionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCapabilityRestrictionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PluginConfigValidationError{ + field: "CapabilityRestrictionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + switch m.Vm.(type) { case *PluginConfig_VmConfig: - if v, ok := interface{}(m.GetVmConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetVmConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "VmConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "VmConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVmConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PluginConfigValidationError{ field: "VmConfig", @@ -170,9 +714,29 @@ func (m *PluginConfig) Validate() error { } + if len(errors) > 0 { + return PluginConfigMultiError(errors) + } + return nil } +// PluginConfigMultiError is an error wrapping multiple validation errors +// returned by PluginConfig.ValidateAll() if the designated constraints aren't met. +type PluginConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PluginConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PluginConfigMultiError) AllErrors() []error { return m } + // PluginConfigValidationError is the validation error returned by // PluginConfig.Validate if the designated constraints aren't met. type PluginConfigValidationError struct { @@ -228,14 +792,47 @@ var _ interface { } = PluginConfigValidationError{} // Validate checks the field values on WasmService with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *WasmService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WasmService with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in WasmServiceMultiError, or +// nil if none found. +func (m *WasmService) ValidateAll() error { + return m.validate(true) +} + +func (m *WasmService) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmServiceValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmServiceValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return WasmServiceValidationError{ field: "Config", @@ -247,9 +844,29 @@ func (m *WasmService) Validate() error { // no validation rules for Singleton + if len(errors) > 0 { + return WasmServiceMultiError(errors) + } + return nil } +// WasmServiceMultiError is an error wrapping multiple validation errors +// returned by WasmService.ValidateAll() if the designated constraints aren't met. +type WasmServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmServiceMultiError) AllErrors() []error { return m } + // WasmServiceValidationError is the validation error returned by // WasmService.Validate if the designated constraints aren't met. type WasmServiceValidationError struct { diff --git a/pkg/api/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.go b/pkg/api/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.go new file mode 100644 index 0000000000..240b832dab --- /dev/null +++ b/pkg/api/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.go @@ -0,0 +1,199 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/watchdog/profile_action/v3/profile_action.proto + +package profile_actionv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Configuration for the profile watchdog action. +type ProfileActionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How long the profile should last. If not set defaults to 5 seconds. + ProfileDuration *duration.Duration `protobuf:"bytes,1,opt,name=profile_duration,json=profileDuration,proto3" json:"profile_duration,omitempty"` + // File path to the directory to output profiles. + ProfilePath string `protobuf:"bytes,2,opt,name=profile_path,json=profilePath,proto3" json:"profile_path,omitempty"` + // Limits the max number of profiles that can be generated by this action + // over its lifetime to avoid filling the disk. + // If not set (i.e. it's 0), a default of 10 will be used. + MaxProfiles uint64 `protobuf:"varint,3,opt,name=max_profiles,json=maxProfiles,proto3" json:"max_profiles,omitempty"` +} + +func (x *ProfileActionConfig) Reset() { + *x = ProfileActionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProfileActionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfileActionConfig) ProtoMessage() {} + +func (x *ProfileActionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfileActionConfig.ProtoReflect.Descriptor instead. +func (*ProfileActionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescGZIP(), []int{0} +} + +func (x *ProfileActionConfig) GetProfileDuration() *duration.Duration { + if x != nil { + return x.ProfileDuration + } + return nil +} + +func (x *ProfileActionConfig) GetProfilePath() string { + if x != nil { + return x.ProfilePath + } + return "" +} + +func (x *ProfileActionConfig) GetMaxProfiles() uint64 { + if x != nil { + return x.MaxProfiles + } + return 0 +} + +var File_envoy_extensions_watchdog_profile_action_v3_profile_action_proto protoreflect.FileDescriptor + +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x44, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x42, 0xbe, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescOnce sync.Once + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData = file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc +) + +func file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescGZIP() []byte { + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescOnce.Do(func() { + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData) + }) + return file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData +} + +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_goTypes = []interface{}{ + (*ProfileActionConfig)(nil), // 0: envoy.extensions.watchdog.profile_action.v3.ProfileActionConfig + (*duration.Duration)(nil), // 1: google.protobuf.Duration +} +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.watchdog.profile_action.v3.ProfileActionConfig.profile_duration:type_name -> google.protobuf.Duration + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_init() } +func file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_init() { + if File_envoy_extensions_watchdog_profile_action_v3_profile_action_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProfileActionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_goTypes, + DependencyIndexes: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_depIdxs, + MessageInfos: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes, + }.Build() + File_envoy_extensions_watchdog_profile_action_v3_profile_action_proto = out.File + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc = nil + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_goTypes = nil + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.pb.validate.go b/pkg/api/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.validate.go similarity index 52% rename from pkg/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.pb.validate.go rename to pkg/api/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.validate.go index 45daeba96e..423bed6038 100644 --- a/pkg/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.pb.validate.go +++ b/pkg/api/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/extensions/watchdog/profile_action/v3alpha/profile_action.proto +// source: envoy/extensions/watchdog/profile_action/v3/profile_action.proto -package envoy_extensions_watchdog_profile_action_v3alpha +package profile_actionv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ProfileActionConfig with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ProfileActionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProfileActionConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProfileActionConfigMultiError, or nil if none found. +func (m *ProfileActionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ProfileActionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetProfileDuration()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetProfileDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProfileActionConfigValidationError{ + field: "ProfileDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProfileActionConfigValidationError{ + field: "ProfileDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProfileDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProfileActionConfigValidationError{ field: "ProfileDuration", @@ -52,17 +87,42 @@ func (m *ProfileActionConfig) Validate() error { } if utf8.RuneCountInString(m.GetProfilePath()) < 1 { - return ProfileActionConfigValidationError{ + err := ProfileActionConfigValidationError{ field: "ProfilePath", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for MaxProfiles + if len(errors) > 0 { + return ProfileActionConfigMultiError(errors) + } + return nil } +// ProfileActionConfigMultiError is an error wrapping multiple validation +// errors returned by ProfileActionConfig.ValidateAll() if the designated +// constraints aren't met. +type ProfileActionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProfileActionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProfileActionConfigMultiError) AllErrors() []error { return m } + // ProfileActionConfigValidationError is the validation error returned by // ProfileActionConfig.Validate if the designated constraints aren't met. type ProfileActionConfigValidationError struct { diff --git a/pkg/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.pb.go b/pkg/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.pb.go deleted file mode 100644 index a484ec7da0..0000000000 --- a/pkg/api/envoy/extensions/watchdog/profile_action/v3alpha/profile_action.pb.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/extensions/watchdog/profile_action/v3alpha/profile_action.proto - -package envoy_extensions_watchdog_profile_action_v3alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration for the profile watchdog action. -type ProfileActionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // How long the profile should last. If not set defaults to 5 seconds. - ProfileDuration *duration.Duration `protobuf:"bytes,1,opt,name=profile_duration,json=profileDuration,proto3" json:"profile_duration,omitempty"` - // File path to the directory to output profiles. - ProfilePath string `protobuf:"bytes,2,opt,name=profile_path,json=profilePath,proto3" json:"profile_path,omitempty"` - // Limits the max number of profiles that can be generated by this action - // over its lifetime to avoid filling the disk. - // If not set (i.e. it's 0), a default of 10 will be used. - MaxProfiles uint64 `protobuf:"varint,3,opt,name=max_profiles,json=maxProfiles,proto3" json:"max_profiles,omitempty"` -} - -func (x *ProfileActionConfig) Reset() { - *x = ProfileActionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProfileActionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProfileActionConfig) ProtoMessage() {} - -func (x *ProfileActionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProfileActionConfig.ProtoReflect.Descriptor instead. -func (*ProfileActionConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescGZIP(), []int{0} -} - -func (x *ProfileActionConfig) GetProfileDuration() *duration.Duration { - if x != nil { - return x.ProfileDuration - } - return nil -} - -func (x *ProfileActionConfig) GetProfilePath() string { - if x != nil { - return x.ProfilePath - } - return "" -} - -func (x *ProfileActionConfig) GetMaxProfiles() uint64 { - if x != nil { - return x.MaxProfiles - } - return 0 -} - -var File_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto protoreflect.FileDescriptor - -var file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDesc = []byte{ - 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, - 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x10, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, - 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x42, 0x66, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescOnce sync.Once - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescData = file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDesc -) - -func file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescGZIP() []byte { - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescOnce.Do(func() { - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescData) - }) - return file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDescData -} - -var file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_goTypes = []interface{}{ - (*ProfileActionConfig)(nil), // 0: envoy.extensions.watchdog.profile_action.v3alpha.ProfileActionConfig - (*duration.Duration)(nil), // 1: google.protobuf.Duration -} -var file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_depIdxs = []int32{ - 1, // 0: envoy.extensions.watchdog.profile_action.v3alpha.ProfileActionConfig.profile_duration:type_name -> google.protobuf.Duration - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_init() } -func file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_init() { - if File_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProfileActionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_goTypes, - DependencyIndexes: file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_depIdxs, - MessageInfos: file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_msgTypes, - }.Build() - File_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto = out.File - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_rawDesc = nil - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_goTypes = nil - file_envoy_extensions_watchdog_profile_action_v3alpha_profile_action_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/service/accesslog/v2/als.pb.go b/pkg/api/envoy/service/accesslog/v2/als.pb.go index 23ecdeaaff..56a9afb8f0 100644 --- a/pkg/api/envoy/service/accesslog/v2/als.pb.go +++ b/pkg/api/envoy/service/accesslog/v2/als.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/accesslog/v2/als.proto -package envoy_service_accesslog_v2 +package accesslogv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/accesslog/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Empty response for the StreamAccessLogs API. Will never be sent. See below. type StreamAccessLogsResponse struct { state protoimpl.MessageState @@ -389,10 +384,15 @@ var file_envoy_service_accesslog_v2_als_proto_rawDesc = []byte{ 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x42, 0x41, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, - 0x42, 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, + 0x22, 0x00, 0x28, 0x01, 0x42, 0x90, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x32, 0x42, 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x32, + 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/service/accesslog/v2/als.pb.validate.go b/pkg/api/envoy/service/accesslog/v2/als.pb.validate.go index cbaa43fe9e..c0384e921f 100644 --- a/pkg/api/envoy/service/accesslog/v2/als.pb.validate.go +++ b/pkg/api/envoy/service/accesslog/v2/als.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/accesslog/v2/als.proto -package envoy_service_accesslog_v2 +package accesslogv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamAccessLogsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamAccessLogsResponseMultiError, or nil if none found. +func (m *StreamAccessLogsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamAccessLogsResponseMultiError(errors) + } + return nil } +// StreamAccessLogsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamAccessLogsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsResponseMultiError) AllErrors() []error { return m } + // StreamAccessLogsResponseValidationError is the validation error returned by // StreamAccessLogsResponse.Validate if the designated constraints aren't met. type StreamAccessLogsResponseValidationError struct { @@ -102,13 +139,46 @@ var _ interface { // Validate checks the field values on StreamAccessLogsMessage with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsMessage with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamAccessLogsMessageMultiError, or nil if none found. +func (m *StreamAccessLogsMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "Identifier", @@ -122,7 +192,26 @@ func (m *StreamAccessLogsMessage) Validate() error { case *StreamAccessLogsMessage_HttpLogs: - if v, ok := interface{}(m.GetHttpLogs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpLogs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "HttpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "HttpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpLogs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "HttpLogs", @@ -134,7 +223,26 @@ func (m *StreamAccessLogsMessage) Validate() error { case *StreamAccessLogsMessage_TcpLogs: - if v, ok := interface{}(m.GetTcpLogs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTcpLogs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "TcpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "TcpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpLogs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "TcpLogs", @@ -145,16 +253,41 @@ func (m *StreamAccessLogsMessage) Validate() error { } default: - return StreamAccessLogsMessageValidationError{ + err := StreamAccessLogsMessageValidationError{ field: "LogEntries", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return StreamAccessLogsMessageMultiError(errors) } return nil } +// StreamAccessLogsMessageMultiError is an error wrapping multiple validation +// errors returned by StreamAccessLogsMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessageMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessageValidationError is the validation error returned by // StreamAccessLogsMessage.Validate if the designated constraints aren't met. type StreamAccessLogsMessageValidationError struct { @@ -213,20 +346,58 @@ var _ interface { // Validate checks the field values on StreamAccessLogsMessage_Identifier with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *StreamAccessLogsMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsMessage_Identifier +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// StreamAccessLogsMessage_IdentifierMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamAccessLogsMessage_IdentifierValidationError{ + err := StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", @@ -237,15 +408,41 @@ func (m *StreamAccessLogsMessage_Identifier) Validate() error { } if len(m.GetLogName()) < 1 { - return StreamAccessLogsMessage_IdentifierValidationError{ + err := StreamAccessLogsMessage_IdentifierValidationError{ field: "LogName", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return StreamAccessLogsMessage_IdentifierMultiError(errors) } return nil } +// StreamAccessLogsMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by +// StreamAccessLogsMessage_Identifier.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_IdentifierMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessage_IdentifierValidationError is the validation error // returned by StreamAccessLogsMessage_Identifier.Validate if the designated // constraints aren't met. @@ -305,23 +502,62 @@ var _ interface { // Validate checks the field values on // StreamAccessLogsMessage_HTTPAccessLogEntries with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// StreamAccessLogsMessage_HTTPAccessLogEntries with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetLogEntry()) < 1 { - return StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + err := StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ field: "LogEntry", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetLogEntry() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ field: fmt.Sprintf("LogEntry[%v]", idx), @@ -333,9 +569,31 @@ func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) Validate() error { } + if len(errors) > 0 { + return StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError(errors) + } + return nil } +// StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError is an error wrapping +// multiple validation errors returned by +// StreamAccessLogsMessage_HTTPAccessLogEntries.ValidateAll() if the +// designated constraints aren't met. +type StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError is the // validation error returned by // StreamAccessLogsMessage_HTTPAccessLogEntries.Validate if the designated @@ -396,23 +654,62 @@ var _ interface { // Validate checks the field values on // StreamAccessLogsMessage_TCPAccessLogEntries with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsMessage_TCPAccessLogEntries) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// StreamAccessLogsMessage_TCPAccessLogEntries with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// StreamAccessLogsMessage_TCPAccessLogEntriesMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_TCPAccessLogEntries) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_TCPAccessLogEntries) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetLogEntry()) < 1 { - return StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + err := StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ field: "LogEntry", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetLogEntry() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ field: fmt.Sprintf("LogEntry[%v]", idx), @@ -424,9 +721,31 @@ func (m *StreamAccessLogsMessage_TCPAccessLogEntries) Validate() error { } + if len(errors) > 0 { + return StreamAccessLogsMessage_TCPAccessLogEntriesMultiError(errors) + } + return nil } +// StreamAccessLogsMessage_TCPAccessLogEntriesMultiError is an error wrapping +// multiple validation errors returned by +// StreamAccessLogsMessage_TCPAccessLogEntries.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessage_TCPAccessLogEntriesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_TCPAccessLogEntriesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_TCPAccessLogEntriesMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessage_TCPAccessLogEntriesValidationError is the validation // error returned by StreamAccessLogsMessage_TCPAccessLogEntries.Validate if // the designated constraints aren't met. diff --git a/pkg/api/envoy/service/accesslog/v3/als.pb.go b/pkg/api/envoy/service/accesslog/v3/als.pb.go index 51fca20fcc..c7e206eaf1 100644 --- a/pkg/api/envoy/service/accesslog/v3/als.pb.go +++ b/pkg/api/envoy/service/accesslog/v3/als.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/accesslog/v3/als.proto -package envoy_service_accesslog_v3 +package accesslogv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/accesslog/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Empty response for the StreamAccessLogs API. Will never be sent. See below. type StreamAccessLogsResponse struct { state protoimpl.MessageState @@ -175,7 +170,7 @@ type StreamAccessLogsMessage_Identifier struct { // The node sending the access log messages over the stream. Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig - // `. + // `. LogName string `protobuf:"bytes,2,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` } @@ -413,11 +408,16 @@ var file_envoy_service_accesslog_v3_als_proto_rawDesc = []byte{ 0x67, 0x65, 0x1a, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x41, 0x0a, 0x28, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x90, 0x01, 0x0a, + 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/service/accesslog/v3/als.pb.validate.go b/pkg/api/envoy/service/accesslog/v3/als.pb.validate.go index 1e24f3b1ea..7ea917ff09 100644 --- a/pkg/api/envoy/service/accesslog/v3/als.pb.validate.go +++ b/pkg/api/envoy/service/accesslog/v3/als.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/accesslog/v3/als.proto -package envoy_service_accesslog_v3 +package accesslogv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamAccessLogsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamAccessLogsResponseMultiError, or nil if none found. +func (m *StreamAccessLogsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamAccessLogsResponseMultiError(errors) + } + return nil } +// StreamAccessLogsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamAccessLogsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsResponseMultiError) AllErrors() []error { return m } + // StreamAccessLogsResponseValidationError is the validation error returned by // StreamAccessLogsResponse.Validate if the designated constraints aren't met. type StreamAccessLogsResponseValidationError struct { @@ -102,13 +139,46 @@ var _ interface { // Validate checks the field values on StreamAccessLogsMessage with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsMessage with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamAccessLogsMessageMultiError, or nil if none found. +func (m *StreamAccessLogsMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "Identifier", @@ -122,7 +192,26 @@ func (m *StreamAccessLogsMessage) Validate() error { case *StreamAccessLogsMessage_HttpLogs: - if v, ok := interface{}(m.GetHttpLogs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpLogs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "HttpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "HttpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpLogs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "HttpLogs", @@ -134,7 +223,26 @@ func (m *StreamAccessLogsMessage) Validate() error { case *StreamAccessLogsMessage_TcpLogs: - if v, ok := interface{}(m.GetTcpLogs()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTcpLogs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "TcpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "TcpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpLogs()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "TcpLogs", @@ -145,16 +253,41 @@ func (m *StreamAccessLogsMessage) Validate() error { } default: - return StreamAccessLogsMessageValidationError{ + err := StreamAccessLogsMessageValidationError{ field: "LogEntries", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return StreamAccessLogsMessageMultiError(errors) } return nil } +// StreamAccessLogsMessageMultiError is an error wrapping multiple validation +// errors returned by StreamAccessLogsMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessageMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessageValidationError is the validation error returned by // StreamAccessLogsMessage.Validate if the designated constraints aren't met. type StreamAccessLogsMessageValidationError struct { @@ -213,20 +346,58 @@ var _ interface { // Validate checks the field values on StreamAccessLogsMessage_Identifier with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *StreamAccessLogsMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsMessage_Identifier +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// StreamAccessLogsMessage_IdentifierMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamAccessLogsMessage_IdentifierValidationError{ + err := StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", @@ -237,15 +408,41 @@ func (m *StreamAccessLogsMessage_Identifier) Validate() error { } if utf8.RuneCountInString(m.GetLogName()) < 1 { - return StreamAccessLogsMessage_IdentifierValidationError{ + err := StreamAccessLogsMessage_IdentifierValidationError{ field: "LogName", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return StreamAccessLogsMessage_IdentifierMultiError(errors) } return nil } +// StreamAccessLogsMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by +// StreamAccessLogsMessage_Identifier.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_IdentifierMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessage_IdentifierValidationError is the validation error // returned by StreamAccessLogsMessage_Identifier.Validate if the designated // constraints aren't met. @@ -305,23 +502,62 @@ var _ interface { // Validate checks the field values on // StreamAccessLogsMessage_HTTPAccessLogEntries with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// StreamAccessLogsMessage_HTTPAccessLogEntries with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetLogEntry()) < 1 { - return StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + err := StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ field: "LogEntry", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetLogEntry() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ field: fmt.Sprintf("LogEntry[%v]", idx), @@ -333,9 +569,31 @@ func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) Validate() error { } + if len(errors) > 0 { + return StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError(errors) + } + return nil } +// StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError is an error wrapping +// multiple validation errors returned by +// StreamAccessLogsMessage_HTTPAccessLogEntries.ValidateAll() if the +// designated constraints aren't met. +type StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError is the // validation error returned by // StreamAccessLogsMessage_HTTPAccessLogEntries.Validate if the designated @@ -396,23 +654,62 @@ var _ interface { // Validate checks the field values on // StreamAccessLogsMessage_TCPAccessLogEntries with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StreamAccessLogsMessage_TCPAccessLogEntries) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// StreamAccessLogsMessage_TCPAccessLogEntries with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// StreamAccessLogsMessage_TCPAccessLogEntriesMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_TCPAccessLogEntries) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_TCPAccessLogEntries) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetLogEntry()) < 1 { - return StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + err := StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ field: "LogEntry", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetLogEntry() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ field: fmt.Sprintf("LogEntry[%v]", idx), @@ -424,9 +721,31 @@ func (m *StreamAccessLogsMessage_TCPAccessLogEntries) Validate() error { } + if len(errors) > 0 { + return StreamAccessLogsMessage_TCPAccessLogEntriesMultiError(errors) + } + return nil } +// StreamAccessLogsMessage_TCPAccessLogEntriesMultiError is an error wrapping +// multiple validation errors returned by +// StreamAccessLogsMessage_TCPAccessLogEntries.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessage_TCPAccessLogEntriesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_TCPAccessLogEntriesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_TCPAccessLogEntriesMultiError) AllErrors() []error { return m } + // StreamAccessLogsMessage_TCPAccessLogEntriesValidationError is the validation // error returned by StreamAccessLogsMessage_TCPAccessLogEntries.Validate if // the designated constraints aren't met. diff --git a/pkg/api/envoy/service/accesslog/v4alpha/als.pb.go b/pkg/api/envoy/service/accesslog/v4alpha/als.pb.go deleted file mode 100644 index 8162f0e1f0..0000000000 --- a/pkg/api/envoy/service/accesslog/v4alpha/als.pb.go +++ /dev/null @@ -1,681 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/accesslog/v4alpha/als.proto - -package envoy_service_accesslog_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/accesslog/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Empty response for the StreamAccessLogs API. Will never be sent. See below. -type StreamAccessLogsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StreamAccessLogsResponse) Reset() { - *x = StreamAccessLogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamAccessLogsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamAccessLogsResponse) ProtoMessage() {} - -func (x *StreamAccessLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamAccessLogsResponse.ProtoReflect.Descriptor instead. -func (*StreamAccessLogsResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_accesslog_v4alpha_als_proto_rawDescGZIP(), []int{0} -} - -// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream -// access logs without ever expecting a response. -type StreamAccessLogsMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier *StreamAccessLogsMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // Batches of log entries of a single type. Generally speaking, a given stream should only - // ever include one type of log entry. - // - // Types that are assignable to LogEntries: - // *StreamAccessLogsMessage_HttpLogs - // *StreamAccessLogsMessage_TcpLogs - LogEntries isStreamAccessLogsMessage_LogEntries `protobuf_oneof:"log_entries"` -} - -func (x *StreamAccessLogsMessage) Reset() { - *x = StreamAccessLogsMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamAccessLogsMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamAccessLogsMessage) ProtoMessage() {} - -func (x *StreamAccessLogsMessage) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamAccessLogsMessage.ProtoReflect.Descriptor instead. -func (*StreamAccessLogsMessage) Descriptor() ([]byte, []int) { - return file_envoy_service_accesslog_v4alpha_als_proto_rawDescGZIP(), []int{1} -} - -func (x *StreamAccessLogsMessage) GetIdentifier() *StreamAccessLogsMessage_Identifier { - if x != nil { - return x.Identifier - } - return nil -} - -func (m *StreamAccessLogsMessage) GetLogEntries() isStreamAccessLogsMessage_LogEntries { - if m != nil { - return m.LogEntries - } - return nil -} - -func (x *StreamAccessLogsMessage) GetHttpLogs() *StreamAccessLogsMessage_HTTPAccessLogEntries { - if x, ok := x.GetLogEntries().(*StreamAccessLogsMessage_HttpLogs); ok { - return x.HttpLogs - } - return nil -} - -func (x *StreamAccessLogsMessage) GetTcpLogs() *StreamAccessLogsMessage_TCPAccessLogEntries { - if x, ok := x.GetLogEntries().(*StreamAccessLogsMessage_TcpLogs); ok { - return x.TcpLogs - } - return nil -} - -type isStreamAccessLogsMessage_LogEntries interface { - isStreamAccessLogsMessage_LogEntries() -} - -type StreamAccessLogsMessage_HttpLogs struct { - HttpLogs *StreamAccessLogsMessage_HTTPAccessLogEntries `protobuf:"bytes,2,opt,name=http_logs,json=httpLogs,proto3,oneof"` -} - -type StreamAccessLogsMessage_TcpLogs struct { - TcpLogs *StreamAccessLogsMessage_TCPAccessLogEntries `protobuf:"bytes,3,opt,name=tcp_logs,json=tcpLogs,proto3,oneof"` -} - -func (*StreamAccessLogsMessage_HttpLogs) isStreamAccessLogsMessage_LogEntries() {} - -func (*StreamAccessLogsMessage_TcpLogs) isStreamAccessLogsMessage_LogEntries() {} - -type StreamAccessLogsMessage_Identifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node sending the access log messages over the stream. - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig - // `. - LogName string `protobuf:"bytes,2,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` -} - -func (x *StreamAccessLogsMessage_Identifier) Reset() { - *x = StreamAccessLogsMessage_Identifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamAccessLogsMessage_Identifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamAccessLogsMessage_Identifier) ProtoMessage() {} - -func (x *StreamAccessLogsMessage_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamAccessLogsMessage_Identifier.ProtoReflect.Descriptor instead. -func (*StreamAccessLogsMessage_Identifier) Descriptor() ([]byte, []int) { - return file_envoy_service_accesslog_v4alpha_als_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *StreamAccessLogsMessage_Identifier) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *StreamAccessLogsMessage_Identifier) GetLogName() string { - if x != nil { - return x.LogName - } - return "" -} - -// Wrapper for batches of HTTP access log entries. -type StreamAccessLogsMessage_HTTPAccessLogEntries struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LogEntry []*v3.HTTPAccessLogEntry `protobuf:"bytes,1,rep,name=log_entry,json=logEntry,proto3" json:"log_entry,omitempty"` -} - -func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) Reset() { - *x = StreamAccessLogsMessage_HTTPAccessLogEntries{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamAccessLogsMessage_HTTPAccessLogEntries) ProtoMessage() {} - -func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamAccessLogsMessage_HTTPAccessLogEntries.ProtoReflect.Descriptor instead. -func (*StreamAccessLogsMessage_HTTPAccessLogEntries) Descriptor() ([]byte, []int) { - return file_envoy_service_accesslog_v4alpha_als_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) GetLogEntry() []*v3.HTTPAccessLogEntry { - if x != nil { - return x.LogEntry - } - return nil -} - -// Wrapper for batches of TCP access log entries. -type StreamAccessLogsMessage_TCPAccessLogEntries struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LogEntry []*v3.TCPAccessLogEntry `protobuf:"bytes,1,rep,name=log_entry,json=logEntry,proto3" json:"log_entry,omitempty"` -} - -func (x *StreamAccessLogsMessage_TCPAccessLogEntries) Reset() { - *x = StreamAccessLogsMessage_TCPAccessLogEntries{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamAccessLogsMessage_TCPAccessLogEntries) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamAccessLogsMessage_TCPAccessLogEntries) ProtoMessage() {} - -func (x *StreamAccessLogsMessage_TCPAccessLogEntries) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamAccessLogsMessage_TCPAccessLogEntries.ProtoReflect.Descriptor instead. -func (*StreamAccessLogsMessage_TCPAccessLogEntries) Descriptor() ([]byte, []int) { - return file_envoy_service_accesslog_v4alpha_als_proto_rawDescGZIP(), []int{1, 2} -} - -func (x *StreamAccessLogsMessage_TCPAccessLogEntries) GetLogEntry() []*v3.TCPAccessLogEntry { - if x != nil { - return x.LogEntry - } - return nil -} - -var File_envoy_service_accesslog_v4alpha_als_proto protoreflect.FileDescriptor - -var file_envoy_service_accesslog_v4alpha_als_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd5, - 0x07, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, - 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x6c, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x48, 0x54, 0x54, - 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x48, 0x00, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x69, 0x0a, - 0x08, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, - 0x07, 0x74, 0x63, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x1a, 0xb5, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, - 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x1a, 0xba, 0x01, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x09, 0x6c, 0x6f, 0x67, - 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, - 0x02, 0x08, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x4e, 0x9a, - 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, - 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0xb7, 0x01, - 0x0a, 0x13, 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, - 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, - 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, - 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x42, 0x12, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x32, 0xa0, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x10, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, - 0x12, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x39, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x46, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x41, 0x6c, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_accesslog_v4alpha_als_proto_rawDescOnce sync.Once - file_envoy_service_accesslog_v4alpha_als_proto_rawDescData = file_envoy_service_accesslog_v4alpha_als_proto_rawDesc -) - -func file_envoy_service_accesslog_v4alpha_als_proto_rawDescGZIP() []byte { - file_envoy_service_accesslog_v4alpha_als_proto_rawDescOnce.Do(func() { - file_envoy_service_accesslog_v4alpha_als_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_accesslog_v4alpha_als_proto_rawDescData) - }) - return file_envoy_service_accesslog_v4alpha_als_proto_rawDescData -} - -var file_envoy_service_accesslog_v4alpha_als_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_service_accesslog_v4alpha_als_proto_goTypes = []interface{}{ - (*StreamAccessLogsResponse)(nil), // 0: envoy.service.accesslog.v4alpha.StreamAccessLogsResponse - (*StreamAccessLogsMessage)(nil), // 1: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage - (*StreamAccessLogsMessage_Identifier)(nil), // 2: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.Identifier - (*StreamAccessLogsMessage_HTTPAccessLogEntries)(nil), // 3: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.HTTPAccessLogEntries - (*StreamAccessLogsMessage_TCPAccessLogEntries)(nil), // 4: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.TCPAccessLogEntries - (*v4alpha.Node)(nil), // 5: envoy.config.core.v4alpha.Node - (*v3.HTTPAccessLogEntry)(nil), // 6: envoy.data.accesslog.v3.HTTPAccessLogEntry - (*v3.TCPAccessLogEntry)(nil), // 7: envoy.data.accesslog.v3.TCPAccessLogEntry -} -var file_envoy_service_accesslog_v4alpha_als_proto_depIdxs = []int32{ - 2, // 0: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.identifier:type_name -> envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.Identifier - 3, // 1: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.http_logs:type_name -> envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.HTTPAccessLogEntries - 4, // 2: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.tcp_logs:type_name -> envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.TCPAccessLogEntries - 5, // 3: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.Identifier.node:type_name -> envoy.config.core.v4alpha.Node - 6, // 4: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.HTTPAccessLogEntries.log_entry:type_name -> envoy.data.accesslog.v3.HTTPAccessLogEntry - 7, // 5: envoy.service.accesslog.v4alpha.StreamAccessLogsMessage.TCPAccessLogEntries.log_entry:type_name -> envoy.data.accesslog.v3.TCPAccessLogEntry - 1, // 6: envoy.service.accesslog.v4alpha.AccessLogService.StreamAccessLogs:input_type -> envoy.service.accesslog.v4alpha.StreamAccessLogsMessage - 0, // 7: envoy.service.accesslog.v4alpha.AccessLogService.StreamAccessLogs:output_type -> envoy.service.accesslog.v4alpha.StreamAccessLogsResponse - 7, // [7:8] is the sub-list for method output_type - 6, // [6:7] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_service_accesslog_v4alpha_als_proto_init() } -func file_envoy_service_accesslog_v4alpha_als_proto_init() { - if File_envoy_service_accesslog_v4alpha_als_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamAccessLogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamAccessLogsMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamAccessLogsMessage_Identifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamAccessLogsMessage_HTTPAccessLogEntries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamAccessLogsMessage_TCPAccessLogEntries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_service_accesslog_v4alpha_als_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*StreamAccessLogsMessage_HttpLogs)(nil), - (*StreamAccessLogsMessage_TcpLogs)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_accesslog_v4alpha_als_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_accesslog_v4alpha_als_proto_goTypes, - DependencyIndexes: file_envoy_service_accesslog_v4alpha_als_proto_depIdxs, - MessageInfos: file_envoy_service_accesslog_v4alpha_als_proto_msgTypes, - }.Build() - File_envoy_service_accesslog_v4alpha_als_proto = out.File - file_envoy_service_accesslog_v4alpha_als_proto_rawDesc = nil - file_envoy_service_accesslog_v4alpha_als_proto_goTypes = nil - file_envoy_service_accesslog_v4alpha_als_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AccessLogServiceClient is the client API for AccessLogService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AccessLogServiceClient interface { - // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different - // API for "critical" access logs in which Envoy will buffer access logs for some period of time - // until it gets an ACK so it could then retry. This API is designed for high throughput with the - // expectation that it might be lossy. - StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (AccessLogService_StreamAccessLogsClient, error) -} - -type accessLogServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAccessLogServiceClient(cc grpc.ClientConnInterface) AccessLogServiceClient { - return &accessLogServiceClient{cc} -} - -func (c *accessLogServiceClient) StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (AccessLogService_StreamAccessLogsClient, error) { - stream, err := c.cc.NewStream(ctx, &_AccessLogService_serviceDesc.Streams[0], "/envoy.service.accesslog.v4alpha.AccessLogService/StreamAccessLogs", opts...) - if err != nil { - return nil, err - } - x := &accessLogServiceStreamAccessLogsClient{stream} - return x, nil -} - -type AccessLogService_StreamAccessLogsClient interface { - Send(*StreamAccessLogsMessage) error - CloseAndRecv() (*StreamAccessLogsResponse, error) - grpc.ClientStream -} - -type accessLogServiceStreamAccessLogsClient struct { - grpc.ClientStream -} - -func (x *accessLogServiceStreamAccessLogsClient) Send(m *StreamAccessLogsMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *accessLogServiceStreamAccessLogsClient) CloseAndRecv() (*StreamAccessLogsResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(StreamAccessLogsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// AccessLogServiceServer is the server API for AccessLogService service. -type AccessLogServiceServer interface { - // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different - // API for "critical" access logs in which Envoy will buffer access logs for some period of time - // until it gets an ACK so it could then retry. This API is designed for high throughput with the - // expectation that it might be lossy. - StreamAccessLogs(AccessLogService_StreamAccessLogsServer) error -} - -// UnimplementedAccessLogServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAccessLogServiceServer struct { -} - -func (*UnimplementedAccessLogServiceServer) StreamAccessLogs(AccessLogService_StreamAccessLogsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamAccessLogs not implemented") -} - -func RegisterAccessLogServiceServer(s *grpc.Server, srv AccessLogServiceServer) { - s.RegisterService(&_AccessLogService_serviceDesc, srv) -} - -func _AccessLogService_StreamAccessLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AccessLogServiceServer).StreamAccessLogs(&accessLogServiceStreamAccessLogsServer{stream}) -} - -type AccessLogService_StreamAccessLogsServer interface { - SendAndClose(*StreamAccessLogsResponse) error - Recv() (*StreamAccessLogsMessage, error) - grpc.ServerStream -} - -type accessLogServiceStreamAccessLogsServer struct { - grpc.ServerStream -} - -func (x *accessLogServiceStreamAccessLogsServer) SendAndClose(m *StreamAccessLogsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *accessLogServiceStreamAccessLogsServer) Recv() (*StreamAccessLogsMessage, error) { - m := new(StreamAccessLogsMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _AccessLogService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.accesslog.v4alpha.AccessLogService", - HandlerType: (*AccessLogServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamAccessLogs", - Handler: _AccessLogService_StreamAccessLogs_Handler, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/accesslog/v4alpha/als.proto", -} diff --git a/pkg/api/envoy/service/accesslog/v4alpha/als.pb.validate.go b/pkg/api/envoy/service/accesslog/v4alpha/als.pb.validate.go deleted file mode 100644 index ee77de7b9e..0000000000 --- a/pkg/api/envoy/service/accesslog/v4alpha/als.pb.validate.go +++ /dev/null @@ -1,485 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/accesslog/v4alpha/als.proto - -package envoy_service_accesslog_v4alpha - -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{} -) - -// Validate checks the field values on StreamAccessLogsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamAccessLogsResponse) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// StreamAccessLogsResponseValidationError is the validation error returned by -// StreamAccessLogsResponse.Validate if the designated constraints aren't met. -type StreamAccessLogsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamAccessLogsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamAccessLogsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamAccessLogsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamAccessLogsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamAccessLogsResponseValidationError) ErrorName() string { - return "StreamAccessLogsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamAccessLogsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamAccessLogsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamAccessLogsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamAccessLogsResponseValidationError{} - -// Validate checks the field values on StreamAccessLogsMessage with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamAccessLogsMessage) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamAccessLogsMessageValidationError{ - field: "Identifier", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.LogEntries.(type) { - - case *StreamAccessLogsMessage_HttpLogs: - - if v, ok := interface{}(m.GetHttpLogs()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamAccessLogsMessageValidationError{ - field: "HttpLogs", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *StreamAccessLogsMessage_TcpLogs: - - if v, ok := interface{}(m.GetTcpLogs()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamAccessLogsMessageValidationError{ - field: "TcpLogs", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return StreamAccessLogsMessageValidationError{ - field: "LogEntries", - reason: "value is required", - } - - } - - return nil -} - -// StreamAccessLogsMessageValidationError is the validation error returned by -// StreamAccessLogsMessage.Validate if the designated constraints aren't met. -type StreamAccessLogsMessageValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamAccessLogsMessageValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamAccessLogsMessageValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamAccessLogsMessageValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamAccessLogsMessageValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamAccessLogsMessageValidationError) ErrorName() string { - return "StreamAccessLogsMessageValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamAccessLogsMessageValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamAccessLogsMessage.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamAccessLogsMessageValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamAccessLogsMessageValidationError{} - -// Validate checks the field values on StreamAccessLogsMessage_Identifier with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *StreamAccessLogsMessage_Identifier) Validate() error { - if m == nil { - return nil - } - - if m.GetNode() == nil { - return StreamAccessLogsMessage_IdentifierValidationError{ - field: "Node", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamAccessLogsMessage_IdentifierValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetLogName()) < 1 { - return StreamAccessLogsMessage_IdentifierValidationError{ - field: "LogName", - reason: "value length must be at least 1 runes", - } - } - - return nil -} - -// StreamAccessLogsMessage_IdentifierValidationError is the validation error -// returned by StreamAccessLogsMessage_Identifier.Validate if the designated -// constraints aren't met. -type StreamAccessLogsMessage_IdentifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamAccessLogsMessage_IdentifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamAccessLogsMessage_IdentifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamAccessLogsMessage_IdentifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamAccessLogsMessage_IdentifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamAccessLogsMessage_IdentifierValidationError) ErrorName() string { - return "StreamAccessLogsMessage_IdentifierValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamAccessLogsMessage_IdentifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamAccessLogsMessage_Identifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamAccessLogsMessage_IdentifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamAccessLogsMessage_IdentifierValidationError{} - -// Validate checks the field values on -// StreamAccessLogsMessage_HTTPAccessLogEntries with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) Validate() error { - if m == nil { - return nil - } - - if len(m.GetLogEntry()) < 1 { - return StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ - field: "LogEntry", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetLogEntry() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ - field: fmt.Sprintf("LogEntry[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError is the -// validation error returned by -// StreamAccessLogsMessage_HTTPAccessLogEntries.Validate if the designated -// constraints aren't met. -type StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) ErrorName() string { - return "StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamAccessLogsMessage_HTTPAccessLogEntries.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{} - -// Validate checks the field values on -// StreamAccessLogsMessage_TCPAccessLogEntries with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *StreamAccessLogsMessage_TCPAccessLogEntries) Validate() error { - if m == nil { - return nil - } - - if len(m.GetLogEntry()) < 1 { - return StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ - field: "LogEntry", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetLogEntry() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ - field: fmt.Sprintf("LogEntry[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// StreamAccessLogsMessage_TCPAccessLogEntriesValidationError is the validation -// error returned by StreamAccessLogsMessage_TCPAccessLogEntries.Validate if -// the designated constraints aren't met. -type StreamAccessLogsMessage_TCPAccessLogEntriesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) ErrorName() string { - return "StreamAccessLogsMessage_TCPAccessLogEntriesValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamAccessLogsMessage_TCPAccessLogEntries.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{} diff --git a/pkg/api/envoy/service/auth/v2/attribute_context.pb.go b/pkg/api/envoy/service/auth/v2/attribute_context.pb.go index 8baa865e9a..2eee63f98f 100644 --- a/pkg/api/envoy/service/auth/v2/attribute_context.pb.go +++ b/pkg/api/envoy/service/auth/v2/attribute_context.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/auth/v2/attribute_context.proto -package envoy_service_auth_v2 +package authv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // 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. // @@ -324,7 +319,9 @@ type AttributeContext_HttpRequest struct { 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`. + // The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2 + // requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup + // the scheme of the request. 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. @@ -549,12 +546,16 @@ var file_envoy_service_auth_v2_attribute_context_proto_rawDesc = []byte{ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x46, 0x0a, 0x23, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, - 0x42, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x8b, 0x01, 0x0a, 0x23, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x32, 0x42, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x32, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/auth/v2/attribute_context.pb.validate.go b/pkg/api/envoy/service/auth/v2/attribute_context.pb.validate.go index fada71e60e..91c5e0a6a5 100644 --- a/pkg/api/envoy/service/auth/v2/attribute_context.pb.validate.go +++ b/pkg/api/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 envoy_service_auth_v2 +package authv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AttributeContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContextMultiError, or nil if none found. +func (m *AttributeContext) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Source", @@ -51,7 +86,26 @@ func (m *AttributeContext) Validate() error { } } - if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestination()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Destination", @@ -61,7 +115,26 @@ func (m *AttributeContext) Validate() error { } } - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Request", @@ -73,7 +146,26 @@ func (m *AttributeContext) Validate() error { // no validation rules for ContextExtensions - if v, ok := interface{}(m.GetMetadataContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "MetadataContext", @@ -83,9 +175,30 @@ func (m *AttributeContext) Validate() error { } } + if len(errors) > 0 { + return AttributeContextMultiError(errors) + } + return nil } +// AttributeContextMultiError is an error wrapping multiple validation errors +// returned by AttributeContext.ValidateAll() if the designated constraints +// aren't met. +type AttributeContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContextMultiError) AllErrors() []error { return m } + // AttributeContextValidationError is the validation error returned by // AttributeContext.Validate if the designated constraints aren't met. type AttributeContextValidationError struct { @@ -142,13 +255,46 @@ var _ interface { // Validate checks the field values on AttributeContext_Peer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AttributeContext_Peer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_Peer with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContext_PeerMultiError, or nil if none found. +func (m *AttributeContext_Peer) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_Peer) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_PeerValidationError{ field: "Address", @@ -166,9 +312,30 @@ func (m *AttributeContext_Peer) Validate() error { // no validation rules for Certificate + if len(errors) > 0 { + return AttributeContext_PeerMultiError(errors) + } + return nil } +// AttributeContext_PeerMultiError is an error wrapping multiple validation +// errors returned by AttributeContext_Peer.ValidateAll() if the designated +// constraints aren't met. +type AttributeContext_PeerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_PeerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_PeerMultiError) AllErrors() []error { return m } + // AttributeContext_PeerValidationError is the validation error returned by // AttributeContext_Peer.Validate if the designated constraints aren't met. type AttributeContext_PeerValidationError struct { @@ -227,13 +394,46 @@ var _ interface { // Validate checks the field values on AttributeContext_Request with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AttributeContext_Request) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_Request with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContext_RequestMultiError, or nil if none found. +func (m *AttributeContext_Request) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_Request) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_RequestValidationError{ field: "Time", @@ -243,7 +443,26 @@ func (m *AttributeContext_Request) Validate() error { } } - if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_RequestValidationError{ field: "Http", @@ -253,9 +472,30 @@ func (m *AttributeContext_Request) Validate() error { } } + if len(errors) > 0 { + return AttributeContext_RequestMultiError(errors) + } + return nil } +// AttributeContext_RequestMultiError is an error wrapping multiple validation +// errors returned by AttributeContext_Request.ValidateAll() if the designated +// constraints aren't met. +type AttributeContext_RequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_RequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_RequestMultiError) AllErrors() []error { return m } + // AttributeContext_RequestValidationError is the validation error returned by // AttributeContext_Request.Validate if the designated constraints aren't met. type AttributeContext_RequestValidationError struct { @@ -314,12 +554,26 @@ var _ interface { // Validate checks the field values on AttributeContext_HttpRequest with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AttributeContext_HttpRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_HttpRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContext_HttpRequestMultiError, or nil if none found. +func (m *AttributeContext_HttpRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_HttpRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Id // no validation rules for Method @@ -342,9 +596,30 @@ func (m *AttributeContext_HttpRequest) Validate() error { // no validation rules for Body + if len(errors) > 0 { + return AttributeContext_HttpRequestMultiError(errors) + } + return nil } +// AttributeContext_HttpRequestMultiError is an error wrapping multiple +// validation errors returned by AttributeContext_HttpRequest.ValidateAll() if +// the designated constraints aren't met. +type AttributeContext_HttpRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_HttpRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_HttpRequestMultiError) AllErrors() []error { return m } + // AttributeContext_HttpRequestValidationError is the validation error returned // by AttributeContext_HttpRequest.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/service/auth/v2/external_auth.pb.go b/pkg/api/envoy/service/auth/v2/external_auth.pb.go index 1a9ea9655e..a81de3705f 100644 --- a/pkg/api/envoy/service/auth/v2/external_auth.pb.go +++ b/pkg/api/envoy/service/auth/v2/external_auth.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/auth/v2/external_auth.proto -package envoy_service_auth_v2 +package authv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _type "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -30,10 +29,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CheckRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -365,12 +360,16 @@ var file_envoy_service_auth_v2_external_auth_proto_rawDesc = []byte{ 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x45, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x22, 0x00, 0x42, 0x8a, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, + 0x61, 0x75, 0x74, 0x68, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/auth/v2/external_auth.pb.validate.go b/pkg/api/envoy/service/auth/v2/external_auth.pb.validate.go index 97e74610a6..0c79697b20 100644 --- a/pkg/api/envoy/service/auth/v2/external_auth.pb.validate.go +++ b/pkg/api/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 envoy_service_auth_v2 +package authv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckRequestMultiError, or +// nil if none found. +func (m *CheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAttributes()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAttributes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAttributes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckRequestValidationError{ field: "Attributes", @@ -51,9 +86,29 @@ func (m *CheckRequest) Validate() error { } } + if len(errors) > 0 { + return CheckRequestMultiError(errors) + } + return nil } +// CheckRequestMultiError is an error wrapping multiple validation errors +// returned by CheckRequest.ValidateAll() if the designated constraints aren't met. +type CheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckRequestMultiError) AllErrors() []error { return m } + // CheckRequestValidationError is the validation error returned by // CheckRequest.Validate if the designated constraints aren't met. type CheckRequestValidationError struct { @@ -110,20 +165,57 @@ var _ interface { // Validate checks the field values on DeniedHttpResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DeniedHttpResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeniedHttpResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeniedHttpResponseMultiError, or nil if none found. +func (m *DeniedHttpResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DeniedHttpResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetStatus() == nil { - return DeniedHttpResponseValidationError{ + err := DeniedHttpResponseValidationError{ field: "Status", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: "Status", @@ -136,7 +228,26 @@ func (m *DeniedHttpResponse) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -150,9 +261,30 @@ func (m *DeniedHttpResponse) Validate() error { // no validation rules for Body + if len(errors) > 0 { + return DeniedHttpResponseMultiError(errors) + } + return nil } +// DeniedHttpResponseMultiError is an error wrapping multiple validation errors +// returned by DeniedHttpResponse.ValidateAll() if the designated constraints +// aren't met. +type DeniedHttpResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeniedHttpResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeniedHttpResponseMultiError) AllErrors() []error { return m } + // DeniedHttpResponseValidationError is the validation error returned by // DeniedHttpResponse.Validate if the designated constraints aren't met. type DeniedHttpResponseValidationError struct { @@ -210,17 +342,50 @@ var _ interface { } = DeniedHttpResponseValidationError{} // Validate checks the field values on OkHttpResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OkHttpResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OkHttpResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OkHttpResponseMultiError, +// or nil if none found. +func (m *OkHttpResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *OkHttpResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OkHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -232,9 +397,30 @@ func (m *OkHttpResponse) Validate() error { } + if len(errors) > 0 { + return OkHttpResponseMultiError(errors) + } + return nil } +// OkHttpResponseMultiError is an error wrapping multiple validation errors +// returned by OkHttpResponse.ValidateAll() if the designated constraints +// aren't met. +type OkHttpResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OkHttpResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OkHttpResponseMultiError) AllErrors() []error { return m } + // OkHttpResponseValidationError is the validation error returned by // OkHttpResponse.Validate if the designated constraints aren't met. type OkHttpResponseValidationError struct { @@ -290,14 +476,47 @@ var _ interface { } = OkHttpResponseValidationError{} // Validate checks the field values on CheckResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CheckResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckResponseMultiError, or +// nil if none found. +func (m *CheckResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckResponse) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "Status", @@ -311,7 +530,26 @@ func (m *CheckResponse) Validate() error { case *CheckResponse_DeniedResponse: - if v, ok := interface{}(m.GetDeniedResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDeniedResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDeniedResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "DeniedResponse", @@ -323,7 +561,26 @@ func (m *CheckResponse) Validate() error { case *CheckResponse_OkResponse: - if v, ok := interface{}(m.GetOkResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOkResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOkResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "OkResponse", @@ -335,9 +592,30 @@ func (m *CheckResponse) Validate() error { } + if len(errors) > 0 { + return CheckResponseMultiError(errors) + } + return nil } +// CheckResponseMultiError is an error wrapping multiple validation errors +// returned by CheckResponse.ValidateAll() if the designated constraints +// aren't met. +type CheckResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckResponseMultiError) AllErrors() []error { return m } + // CheckResponseValidationError is the validation error returned by // CheckResponse.Validate if the designated constraints aren't met. type CheckResponseValidationError struct { diff --git a/pkg/api/envoy/service/auth/v2alpha/external_auth.pb.go b/pkg/api/envoy/service/auth/v2alpha/external_auth.pb.go index 078e7564ed..fa7ca0d62c 100644 --- a/pkg/api/envoy/service/auth/v2alpha/external_auth.pb.go +++ b/pkg/api/envoy/service/auth/v2alpha/external_auth.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/auth/v2alpha/external_auth.proto -package envoy_service_auth_v2alpha +package v2alpha import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -26,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var File_envoy_service_auth_v2alpha_external_auth_proto protoreflect.FileDescriptor var file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc = []byte{ @@ -40,21 +34,22 @@ var file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc = []byte{ 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x65, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x4a, 0x0a, - 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x63, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x7e, 0x0a, 0x28, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x43, 0x65, 0x72, 0x74, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var file_envoy_service_auth_v2alpha_external_auth_proto_goTypes = []interface{}{ diff --git a/pkg/api/envoy/service/auth/v2alpha/external_auth.pb.validate.go b/pkg/api/envoy/service/auth/v2alpha/external_auth.pb.validate.go index cfe3cff8a6..15b15576b8 100644 --- a/pkg/api/envoy/service/auth/v2alpha/external_auth.pb.validate.go +++ b/pkg/api/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 envoy_service_auth_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/service/auth/v3/attribute_context.pb.go b/pkg/api/envoy/service/auth/v3/attribute_context.pb.go index 5bc4b9b155..bcdfd3fe15 100644 --- a/pkg/api/envoy/service/auth/v3/attribute_context.pb.go +++ b/pkg/api/envoy/service/auth/v3/attribute_context.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/auth/v3/attribute_context.proto -package envoy_service_auth_v3 +package authv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // 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. // @@ -343,7 +338,7 @@ type AttributeContext_HttpRequest struct { Body string `protobuf:"bytes,11,opt,name=body,proto3" json:"body,omitempty"` // The HTTP request body in bytes. This is used instead of // :ref:`body ` when - // :ref:`pack_as_bytes ` + // :ref:`pack_as_bytes ` // is set to true. RawBody []byte `protobuf:"bytes,12,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"` } @@ -579,12 +574,16 @@ var file_envoy_service_auth_v3_attribute_context_proto_rawDesc = []byte{ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x46, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x42, - 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x8b, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, + 0x42, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/auth/v3/attribute_context.pb.validate.go b/pkg/api/envoy/service/auth/v3/attribute_context.pb.validate.go index f6b5a043f5..2dbd2d4b11 100644 --- a/pkg/api/envoy/service/auth/v3/attribute_context.pb.validate.go +++ b/pkg/api/envoy/service/auth/v3/attribute_context.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/auth/v3/attribute_context.proto -package envoy_service_auth_v3 +package authv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AttributeContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContextMultiError, or nil if none found. +func (m *AttributeContext) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Source", @@ -51,7 +86,26 @@ func (m *AttributeContext) Validate() error { } } - if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDestination()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Destination", @@ -61,7 +115,26 @@ func (m *AttributeContext) Validate() error { } } - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "Request", @@ -73,7 +146,26 @@ func (m *AttributeContext) Validate() error { // no validation rules for ContextExtensions - if v, ok := interface{}(m.GetMetadataContext()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataContext()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContextValidationError{ field: "MetadataContext", @@ -83,9 +175,30 @@ func (m *AttributeContext) Validate() error { } } + if len(errors) > 0 { + return AttributeContextMultiError(errors) + } + return nil } +// AttributeContextMultiError is an error wrapping multiple validation errors +// returned by AttributeContext.ValidateAll() if the designated constraints +// aren't met. +type AttributeContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContextMultiError) AllErrors() []error { return m } + // AttributeContextValidationError is the validation error returned by // AttributeContext.Validate if the designated constraints aren't met. type AttributeContextValidationError struct { @@ -142,13 +255,46 @@ var _ interface { // Validate checks the field values on AttributeContext_Peer with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AttributeContext_Peer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_Peer with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContext_PeerMultiError, or nil if none found. +func (m *AttributeContext_Peer) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_Peer) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_PeerValidationError{ field: "Address", @@ -166,9 +312,30 @@ func (m *AttributeContext_Peer) Validate() error { // no validation rules for Certificate + if len(errors) > 0 { + return AttributeContext_PeerMultiError(errors) + } + return nil } +// AttributeContext_PeerMultiError is an error wrapping multiple validation +// errors returned by AttributeContext_Peer.ValidateAll() if the designated +// constraints aren't met. +type AttributeContext_PeerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_PeerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_PeerMultiError) AllErrors() []error { return m } + // AttributeContext_PeerValidationError is the validation error returned by // AttributeContext_Peer.Validate if the designated constraints aren't met. type AttributeContext_PeerValidationError struct { @@ -227,13 +394,46 @@ var _ interface { // Validate checks the field values on AttributeContext_Request with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AttributeContext_Request) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_Request with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContext_RequestMultiError, or nil if none found. +func (m *AttributeContext_Request) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_Request) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_RequestValidationError{ field: "Time", @@ -243,7 +443,26 @@ func (m *AttributeContext_Request) Validate() error { } } - if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AttributeContext_RequestValidationError{ field: "Http", @@ -253,9 +472,30 @@ func (m *AttributeContext_Request) Validate() error { } } + if len(errors) > 0 { + return AttributeContext_RequestMultiError(errors) + } + return nil } +// AttributeContext_RequestMultiError is an error wrapping multiple validation +// errors returned by AttributeContext_Request.ValidateAll() if the designated +// constraints aren't met. +type AttributeContext_RequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_RequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_RequestMultiError) AllErrors() []error { return m } + // AttributeContext_RequestValidationError is the validation error returned by // AttributeContext_Request.Validate if the designated constraints aren't met. type AttributeContext_RequestValidationError struct { @@ -314,12 +554,26 @@ var _ interface { // Validate checks the field values on AttributeContext_HttpRequest with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *AttributeContext_HttpRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_HttpRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AttributeContext_HttpRequestMultiError, or nil if none found. +func (m *AttributeContext_HttpRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_HttpRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Id // no validation rules for Method @@ -344,9 +598,30 @@ func (m *AttributeContext_HttpRequest) Validate() error { // no validation rules for RawBody + if len(errors) > 0 { + return AttributeContext_HttpRequestMultiError(errors) + } + return nil } +// AttributeContext_HttpRequestMultiError is an error wrapping multiple +// validation errors returned by AttributeContext_HttpRequest.ValidateAll() if +// the designated constraints aren't met. +type AttributeContext_HttpRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_HttpRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_HttpRequestMultiError) AllErrors() []error { return m } + // AttributeContext_HttpRequestValidationError is the validation error returned // by AttributeContext_HttpRequest.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/service/auth/v3/external_auth.pb.go b/pkg/api/envoy/service/auth/v3/external_auth.pb.go index c0e99eef33..57448f63b0 100644 --- a/pkg/api/envoy/service/auth/v3/external_auth.pb.go +++ b/pkg/api/envoy/service/auth/v3/external_auth.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/auth/v3/external_auth.proto -package envoy_service_auth_v3 +package authv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" status "google.golang.org/genproto/googleapis/rpc/status" grpc "google.golang.org/grpc" @@ -31,10 +30,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CheckRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -89,11 +84,11 @@ type DeniedHttpResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This field allows the authorization service to send a HTTP response status - // code to the downstream client other than 403 (Forbidden). + // This field allows the authorization service to send an HTTP response status code to the + // downstream client. If not set, Envoy sends ``403 Forbidden`` HTTP status code by default. Status *v3.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. Note that the `append` field in `HeaderValueOption` defaults to + // to the downstream client. Note that the :ref:`append field in HeaderValueOption ` defaults to // false when used in this message. Headers []*v31.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` // This field allows the authorization service to send a response body data @@ -155,7 +150,7 @@ func (x *DeniedHttpResponse) GetBody() string { } // HTTP attributes for an OK response. -// [#next-free-field: 6] +// [#next-free-field: 9] type OkHttpResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -163,7 +158,7 @@ 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. Note that the `append` field in `HeaderValueOption` defaults to + // dispatching it to the upstream. Note that the :ref:`append field in HeaderValueOption ` defaults to // false when used in this message. By setting the `append` field to `true`, // the filter will append the correspondent header value to the matched request header. // By leaving `append` as false, the filter will either add a new header, or override an existing @@ -192,6 +187,17 @@ type OkHttpResponse struct { // // Deprecated: Do not use. DynamicMetadata *_struct.Struct `protobuf:"bytes,3,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` + // This field allows the authorization service to send HTTP response headers + // to the downstream client on success. Note that the :ref:`append field in HeaderValueOption ` + // defaults to false when used in this message. + ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,6,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + // This field allows the authorization service to set (and overwrite) query + // string parameters on the original request before it is sent upstream. + QueryParametersToSet []*v31.QueryParameter `protobuf:"bytes,7,rep,name=query_parameters_to_set,json=queryParametersToSet,proto3" json:"query_parameters_to_set,omitempty"` + // This field allows the authorization service to specify which query parameters + // should be removed from the original request before it is sent upstream. Each + // element in this list is a case-sensitive query parameter name to be removed. + QueryParametersToRemove []string `protobuf:"bytes,8,rep,name=query_parameters_to_remove,json=queryParametersToRemove,proto3" json:"query_parameters_to_remove,omitempty"` } func (x *OkHttpResponse) Reset() { @@ -248,13 +254,36 @@ func (x *OkHttpResponse) GetDynamicMetadata() *_struct.Struct { return nil } +func (x *OkHttpResponse) GetResponseHeadersToAdd() []*v31.HeaderValueOption { + if x != nil { + return x.ResponseHeadersToAdd + } + return nil +} + +func (x *OkHttpResponse) GetQueryParametersToSet() []*v31.QueryParameter { + if x != nil { + return x.QueryParametersToSet + } + return nil +} + +func (x *OkHttpResponse) GetQueryParametersToRemove() []string { + if x != nil { + return x.QueryParametersToRemove + } + return nil +} + // Intended for gRPC and Network Authorization servers `only`. type CheckResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Status `OK` allows the request. Any other status indicates the request should be denied. + // Status `OK` allows the request. Any other status indicates the request should be denied, and + // for HTTP filter, if not overridden by :ref:`denied HTTP response status ` + // Envoy sends ``403 Forbidden`` HTTP status code by default. Status *status.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 @@ -375,84 +404,104 @@ var file_envoy_service_auth_v3_external_auth_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3a, - 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x44, - 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, - 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, + 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6e, 0x69, 0x65, + 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x41, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x03, 0x0a, 0x0e, 0x4f, 0x6b, 0x48, + 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2a, + 0x0a, 0x11, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x64, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x0b, 0x18, + 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5e, 0x0a, 0x17, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x5b, 0x0a, 0x17, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x14, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x54, 0x6f, 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x1a, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x4f, 0x6b, 0x48, 0x74, 0x74, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x4f, - 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdc, 0x02, - 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x54, 0x0a, 0x0f, 0x64, - 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6e, - 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x00, 0x52, 0x0e, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4f, - 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, - 0x0a, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x64, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, - 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, - 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x65, 0x0a, 0x0d, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, - 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x54, 0x0a, 0x0f, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x0f, 0x0a, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0x65, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x45, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, - 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x8a, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, + 0x42, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -477,7 +526,8 @@ var file_envoy_service_auth_v3_external_auth_proto_goTypes = []interface{}{ (*v3.HttpStatus)(nil), // 5: envoy.type.v3.HttpStatus (*v31.HeaderValueOption)(nil), // 6: envoy.config.core.v3.HeaderValueOption (*_struct.Struct)(nil), // 7: google.protobuf.Struct - (*status.Status)(nil), // 8: google.rpc.Status + (*v31.QueryParameter)(nil), // 8: envoy.config.core.v3.QueryParameter + (*status.Status)(nil), // 9: google.rpc.Status } var file_envoy_service_auth_v3_external_auth_proto_depIdxs = []int32{ 4, // 0: envoy.service.auth.v3.CheckRequest.attributes:type_name -> envoy.service.auth.v3.AttributeContext @@ -485,17 +535,19 @@ var file_envoy_service_auth_v3_external_auth_proto_depIdxs = []int32{ 6, // 2: envoy.service.auth.v3.DeniedHttpResponse.headers:type_name -> envoy.config.core.v3.HeaderValueOption 6, // 3: envoy.service.auth.v3.OkHttpResponse.headers:type_name -> envoy.config.core.v3.HeaderValueOption 7, // 4: envoy.service.auth.v3.OkHttpResponse.dynamic_metadata:type_name -> google.protobuf.Struct - 8, // 5: envoy.service.auth.v3.CheckResponse.status:type_name -> google.rpc.Status - 1, // 6: envoy.service.auth.v3.CheckResponse.denied_response:type_name -> envoy.service.auth.v3.DeniedHttpResponse - 2, // 7: envoy.service.auth.v3.CheckResponse.ok_response:type_name -> envoy.service.auth.v3.OkHttpResponse - 7, // 8: envoy.service.auth.v3.CheckResponse.dynamic_metadata:type_name -> google.protobuf.Struct - 0, // 9: envoy.service.auth.v3.Authorization.Check:input_type -> envoy.service.auth.v3.CheckRequest - 3, // 10: envoy.service.auth.v3.Authorization.Check:output_type -> envoy.service.auth.v3.CheckResponse - 10, // [10:11] is the sub-list for method output_type - 9, // [9:10] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 6, // 5: envoy.service.auth.v3.OkHttpResponse.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 8, // 6: envoy.service.auth.v3.OkHttpResponse.query_parameters_to_set:type_name -> envoy.config.core.v3.QueryParameter + 9, // 7: envoy.service.auth.v3.CheckResponse.status:type_name -> google.rpc.Status + 1, // 8: envoy.service.auth.v3.CheckResponse.denied_response:type_name -> envoy.service.auth.v3.DeniedHttpResponse + 2, // 9: envoy.service.auth.v3.CheckResponse.ok_response:type_name -> envoy.service.auth.v3.OkHttpResponse + 7, // 10: envoy.service.auth.v3.CheckResponse.dynamic_metadata:type_name -> google.protobuf.Struct + 0, // 11: envoy.service.auth.v3.Authorization.Check:input_type -> envoy.service.auth.v3.CheckRequest + 3, // 12: envoy.service.auth.v3.Authorization.Check:output_type -> envoy.service.auth.v3.CheckResponse + 12, // [12:13] is the sub-list for method output_type + 11, // [11:12] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_envoy_service_auth_v3_external_auth_proto_init() } diff --git a/pkg/api/envoy/service/auth/v3/external_auth.pb.validate.go b/pkg/api/envoy/service/auth/v3/external_auth.pb.validate.go index 4a4ec55f16..2a8f607961 100644 --- a/pkg/api/envoy/service/auth/v3/external_auth.pb.validate.go +++ b/pkg/api/envoy/service/auth/v3/external_auth.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/auth/v3/external_auth.proto -package envoy_service_auth_v3 +package authv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckRequestMultiError, or +// nil if none found. +func (m *CheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetAttributes()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetAttributes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAttributes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckRequestValidationError{ field: "Attributes", @@ -51,9 +86,29 @@ func (m *CheckRequest) Validate() error { } } + if len(errors) > 0 { + return CheckRequestMultiError(errors) + } + return nil } +// CheckRequestMultiError is an error wrapping multiple validation errors +// returned by CheckRequest.ValidateAll() if the designated constraints aren't met. +type CheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckRequestMultiError) AllErrors() []error { return m } + // CheckRequestValidationError is the validation error returned by // CheckRequest.Validate if the designated constraints aren't met. type CheckRequestValidationError struct { @@ -110,20 +165,46 @@ var _ interface { // Validate checks the field values on DeniedHttpResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DeniedHttpResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeniedHttpResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeniedHttpResponseMultiError, or nil if none found. +func (m *DeniedHttpResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DeniedHttpResponse) validate(all bool) error { if m == nil { return nil } - if m.GetStatus() == nil { - return DeniedHttpResponseValidationError{ - field: "Status", - reason: "value is required", - } - } + var errors []error - if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: "Status", @@ -136,7 +217,26 @@ func (m *DeniedHttpResponse) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -150,9 +250,30 @@ func (m *DeniedHttpResponse) Validate() error { // no validation rules for Body + if len(errors) > 0 { + return DeniedHttpResponseMultiError(errors) + } + return nil } +// DeniedHttpResponseMultiError is an error wrapping multiple validation errors +// returned by DeniedHttpResponse.ValidateAll() if the designated constraints +// aren't met. +type DeniedHttpResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeniedHttpResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeniedHttpResponseMultiError) AllErrors() []error { return m } + // DeniedHttpResponseValidationError is the validation error returned by // DeniedHttpResponse.Validate if the designated constraints aren't met. type DeniedHttpResponseValidationError struct { @@ -210,17 +331,50 @@ var _ interface { } = DeniedHttpResponseValidationError{} // Validate checks the field values on OkHttpResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OkHttpResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OkHttpResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OkHttpResponseMultiError, +// or nil if none found. +func (m *OkHttpResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *OkHttpResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OkHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -232,7 +386,26 @@ func (m *OkHttpResponse) Validate() error { } - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OkHttpResponseValidationError{ field: "DynamicMetadata", @@ -242,9 +415,98 @@ func (m *OkHttpResponse) Validate() error { } } + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OkHttpResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetQueryParametersToSet() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("QueryParametersToSet[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("QueryParametersToSet[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OkHttpResponseValidationError{ + field: fmt.Sprintf("QueryParametersToSet[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return OkHttpResponseMultiError(errors) + } + return nil } +// OkHttpResponseMultiError is an error wrapping multiple validation errors +// returned by OkHttpResponse.ValidateAll() if the designated constraints +// aren't met. +type OkHttpResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OkHttpResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OkHttpResponseMultiError) AllErrors() []error { return m } + // OkHttpResponseValidationError is the validation error returned by // OkHttpResponse.Validate if the designated constraints aren't met. type OkHttpResponseValidationError struct { @@ -300,14 +562,47 @@ var _ interface { } = OkHttpResponseValidationError{} // Validate checks the field values on CheckResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CheckResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckResponseMultiError, or +// nil if none found. +func (m *CheckResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckResponse) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "Status", @@ -317,7 +612,26 @@ func (m *CheckResponse) Validate() error { } } - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "DynamicMetadata", @@ -331,7 +645,26 @@ func (m *CheckResponse) Validate() error { case *CheckResponse_DeniedResponse: - if v, ok := interface{}(m.GetDeniedResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDeniedResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDeniedResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "DeniedResponse", @@ -343,7 +676,26 @@ func (m *CheckResponse) Validate() error { case *CheckResponse_OkResponse: - if v, ok := interface{}(m.GetOkResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOkResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOkResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "OkResponse", @@ -355,9 +707,30 @@ func (m *CheckResponse) Validate() error { } + if len(errors) > 0 { + return CheckResponseMultiError(errors) + } + return nil } +// CheckResponseMultiError is an error wrapping multiple validation errors +// returned by CheckResponse.ValidateAll() if the designated constraints +// aren't met. +type CheckResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckResponseMultiError) AllErrors() []error { return m } + // CheckResponseValidationError is the validation error returned by // CheckResponse.Validate if the designated constraints aren't met. type CheckResponseValidationError struct { diff --git a/pkg/api/envoy/service/auth/v4alpha/attribute_context.pb.go b/pkg/api/envoy/service/auth/v4alpha/attribute_context.pb.go deleted file mode 100644 index 586c9b5a28..0000000000 --- a/pkg/api/envoy/service/auth/v4alpha/attribute_context.pb.go +++ /dev/null @@ -1,710 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/auth/v4alpha/attribute_context.proto - -package envoy_service_auth_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// 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. -// [#comment: The following items are left out of this proto -// Request.Auth field for jwt tokens -// Request.Api for api management -// Origin peer that originated the request -// Caching Protocol -// request_context return values to inject back into the filter chain -// peer.claims -- from X.509 extensions -// Configuration -// - field mask to send -// - which return values from request_context are copied back -// - which return values are copied into request_headers] -// [#next-free-field: 12] -type AttributeContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` - // Dynamic metadata associated with the request. - MetadataContext *v4alpha.Metadata `protobuf:"bytes,11,opt,name=metadata_context,json=metadataContext,proto3" json:"metadata_context,omitempty"` -} - -func (x *AttributeContext) Reset() { - *x = AttributeContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AttributeContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttributeContext) ProtoMessage() {} - -func (x *AttributeContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttributeContext.ProtoReflect.Descriptor instead. -func (*AttributeContext) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescGZIP(), []int{0} -} - -func (x *AttributeContext) GetSource() *AttributeContext_Peer { - if x != nil { - return x.Source - } - return nil -} - -func (x *AttributeContext) GetDestination() *AttributeContext_Peer { - if x != nil { - return x.Destination - } - return nil -} - -func (x *AttributeContext) GetRequest() *AttributeContext_Request { - if x != nil { - return x.Request - } - return nil -} - -func (x *AttributeContext) GetContextExtensions() map[string]string { - if x != nil { - return x.ContextExtensions - } - return nil -} - -func (x *AttributeContext) GetMetadataContext() *v4alpha.Metadata { - if x != nil { - return x.MetadataContext - } - 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. -// [#next-free-field: 6] -type AttributeContext_Peer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the peer, this is typically the IP address. - // It can also be UDS path, or others. - Address *v4alpha.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 - // `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order. - // 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"` - // The X.509 certificate used to authenticate the identify of this peer. - // When present, the certificate contents are encoded in URL and PEM format. - Certificate string `protobuf:"bytes,5,opt,name=certificate,proto3" json:"certificate,omitempty"` -} - -func (x *AttributeContext_Peer) Reset() { - *x = AttributeContext_Peer{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AttributeContext_Peer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttributeContext_Peer) ProtoMessage() {} - -func (x *AttributeContext_Peer) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttributeContext_Peer.ProtoReflect.Descriptor instead. -func (*AttributeContext_Peer) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *AttributeContext_Peer) GetAddress() *v4alpha.Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *AttributeContext_Peer) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *AttributeContext_Peer) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -func (x *AttributeContext_Peer) GetPrincipal() string { - if x != nil { - return x.Principal - } - return "" -} - -func (x *AttributeContext_Peer) GetCertificate() string { - if x != nil { - return x.Certificate - } - return "" -} - -// Represents a network request, such as an HTTP request. -type AttributeContext_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The timestamp when the proxy receives the first byte of the request. - Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` - // Represents an HTTP request or an HTTP-like request. - Http *AttributeContext_HttpRequest `protobuf:"bytes,2,opt,name=http,proto3" json:"http,omitempty"` -} - -func (x *AttributeContext_Request) Reset() { - *x = AttributeContext_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AttributeContext_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttributeContext_Request) ProtoMessage() {} - -func (x *AttributeContext_Request) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttributeContext_Request.ProtoReflect.Descriptor instead. -func (*AttributeContext_Request) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *AttributeContext_Request) GetTime() *timestamp.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *AttributeContext_Request) GetHttp() *AttributeContext_HttpRequest { - if x != nil { - return x.Http - } - return nil -} - -// This message defines attributes for an HTTP request. -// HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests. -// [#next-free-field: 13] -type AttributeContext_HttpRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 - // lower-cased, 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"` - // The HTTP request body in bytes. This is used instead of - // :ref:`body ` when - // :ref:`pack_as_bytes ` - // is set to true. - RawBody []byte `protobuf:"bytes,12,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"` -} - -func (x *AttributeContext_HttpRequest) Reset() { - *x = AttributeContext_HttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AttributeContext_HttpRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttributeContext_HttpRequest) ProtoMessage() {} - -func (x *AttributeContext_HttpRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttributeContext_HttpRequest.ProtoReflect.Descriptor instead. -func (*AttributeContext_HttpRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *AttributeContext_HttpRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetHeaders() map[string]string { - if x != nil { - return x.Headers - } - return nil -} - -func (x *AttributeContext_HttpRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetScheme() string { - if x != nil { - return x.Scheme - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetFragment() string { - if x != nil { - return x.Fragment - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetSize() int64 { - if x != nil { - return x.Size - } - return 0 -} - -func (x *AttributeContext_HttpRequest) GetProtocol() string { - if x != nil { - return x.Protocol - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *AttributeContext_HttpRequest) GetRawBody() []byte { - if x != nil { - return x.RawBody - } - return nil -} - -var File_envoy_service_auth_v4alpha_attribute_context_proto protoreflect.FileDescriptor - -var file_envoy_service_auth_v4alpha_attribute_context_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc4, 0x0c, 0x0a, 0x10, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x72, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x10, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0xe4, 0x02, 0x0a, 0x04, - 0x50, 0x65, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x32, - 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, - 0x65, 0x72, 0x1a, 0xbe, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, - 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x4c, - 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x35, 0x9a, 0xc5, - 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0xde, 0x03, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x5f, 0x0a, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x3a, 0x0a, - 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, - 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, - 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x4b, 0x0a, 0x28, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescOnce sync.Once - file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescData = file_envoy_service_auth_v4alpha_attribute_context_proto_rawDesc -) - -func file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescGZIP() []byte { - file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescOnce.Do(func() { - file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescData) - }) - return file_envoy_service_auth_v4alpha_attribute_context_proto_rawDescData -} - -var file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_service_auth_v4alpha_attribute_context_proto_goTypes = []interface{}{ - (*AttributeContext)(nil), // 0: envoy.service.auth.v4alpha.AttributeContext - (*AttributeContext_Peer)(nil), // 1: envoy.service.auth.v4alpha.AttributeContext.Peer - (*AttributeContext_Request)(nil), // 2: envoy.service.auth.v4alpha.AttributeContext.Request - (*AttributeContext_HttpRequest)(nil), // 3: envoy.service.auth.v4alpha.AttributeContext.HttpRequest - nil, // 4: envoy.service.auth.v4alpha.AttributeContext.ContextExtensionsEntry - nil, // 5: envoy.service.auth.v4alpha.AttributeContext.Peer.LabelsEntry - nil, // 6: envoy.service.auth.v4alpha.AttributeContext.HttpRequest.HeadersEntry - (*v4alpha.Metadata)(nil), // 7: envoy.config.core.v4alpha.Metadata - (*v4alpha.Address)(nil), // 8: envoy.config.core.v4alpha.Address - (*timestamp.Timestamp)(nil), // 9: google.protobuf.Timestamp -} -var file_envoy_service_auth_v4alpha_attribute_context_proto_depIdxs = []int32{ - 1, // 0: envoy.service.auth.v4alpha.AttributeContext.source:type_name -> envoy.service.auth.v4alpha.AttributeContext.Peer - 1, // 1: envoy.service.auth.v4alpha.AttributeContext.destination:type_name -> envoy.service.auth.v4alpha.AttributeContext.Peer - 2, // 2: envoy.service.auth.v4alpha.AttributeContext.request:type_name -> envoy.service.auth.v4alpha.AttributeContext.Request - 4, // 3: envoy.service.auth.v4alpha.AttributeContext.context_extensions:type_name -> envoy.service.auth.v4alpha.AttributeContext.ContextExtensionsEntry - 7, // 4: envoy.service.auth.v4alpha.AttributeContext.metadata_context:type_name -> envoy.config.core.v4alpha.Metadata - 8, // 5: envoy.service.auth.v4alpha.AttributeContext.Peer.address:type_name -> envoy.config.core.v4alpha.Address - 5, // 6: envoy.service.auth.v4alpha.AttributeContext.Peer.labels:type_name -> envoy.service.auth.v4alpha.AttributeContext.Peer.LabelsEntry - 9, // 7: envoy.service.auth.v4alpha.AttributeContext.Request.time:type_name -> google.protobuf.Timestamp - 3, // 8: envoy.service.auth.v4alpha.AttributeContext.Request.http:type_name -> envoy.service.auth.v4alpha.AttributeContext.HttpRequest - 6, // 9: envoy.service.auth.v4alpha.AttributeContext.HttpRequest.headers:type_name -> envoy.service.auth.v4alpha.AttributeContext.HttpRequest.HeadersEntry - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_envoy_service_auth_v4alpha_attribute_context_proto_init() } -func file_envoy_service_auth_v4alpha_attribute_context_proto_init() { - if File_envoy_service_auth_v4alpha_attribute_context_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeContext_Peer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeContext_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeContext_HttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_auth_v4alpha_attribute_context_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_service_auth_v4alpha_attribute_context_proto_goTypes, - DependencyIndexes: file_envoy_service_auth_v4alpha_attribute_context_proto_depIdxs, - MessageInfos: file_envoy_service_auth_v4alpha_attribute_context_proto_msgTypes, - }.Build() - File_envoy_service_auth_v4alpha_attribute_context_proto = out.File - file_envoy_service_auth_v4alpha_attribute_context_proto_rawDesc = nil - file_envoy_service_auth_v4alpha_attribute_context_proto_goTypes = nil - file_envoy_service_auth_v4alpha_attribute_context_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/service/auth/v4alpha/attribute_context.pb.validate.go b/pkg/api/envoy/service/auth/v4alpha/attribute_context.pb.validate.go deleted file mode 100644 index bf2e032f44..0000000000 --- a/pkg/api/envoy/service/auth/v4alpha/attribute_context.pb.validate.go +++ /dev/null @@ -1,405 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/auth/v4alpha/attribute_context.proto - -package envoy_service_auth_v4alpha - -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{} -) - -// 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. -func (m *AttributeContext) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - 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, - } - } - } - - 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 -} - -// AttributeContextValidationError is the validation error returned by -// AttributeContext.Validate if the designated constraints aren't met. -type AttributeContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AttributeContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AttributeContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AttributeContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AttributeContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AttributeContextValidationError) ErrorName() string { return "AttributeContextValidationError" } - -// Error satisfies the builtin error interface -func (e AttributeContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAttributeContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AttributeContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AttributeContextValidationError{} - -// Validate checks the field values on AttributeContext_Peer with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *AttributeContext_Peer) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - // no validation rules for Service - - // no validation rules for Labels - - // no validation rules for Principal - - // no validation rules for Certificate - - return nil -} - -// AttributeContext_PeerValidationError is the validation error returned by -// AttributeContext_Peer.Validate if the designated constraints aren't met. -type AttributeContext_PeerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AttributeContext_PeerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AttributeContext_PeerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AttributeContext_PeerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AttributeContext_PeerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AttributeContext_PeerValidationError) ErrorName() string { - return "AttributeContext_PeerValidationError" -} - -// Error satisfies the builtin error interface -func (e AttributeContext_PeerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAttributeContext_Peer.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AttributeContext_PeerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AttributeContext_PeerValidationError{} - -// Validate checks the field values on AttributeContext_Request with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *AttributeContext_Request) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - 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, - } - } - } - - return nil -} - -// AttributeContext_RequestValidationError is the validation error returned by -// AttributeContext_Request.Validate if the designated constraints aren't met. -type AttributeContext_RequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AttributeContext_RequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AttributeContext_RequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AttributeContext_RequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AttributeContext_RequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AttributeContext_RequestValidationError) ErrorName() string { - return "AttributeContext_RequestValidationError" -} - -// Error satisfies the builtin error interface -func (e AttributeContext_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 %sAttributeContext_Request.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AttributeContext_RequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AttributeContext_RequestValidationError{} - -// Validate checks the field values on AttributeContext_HttpRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *AttributeContext_HttpRequest) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Id - - // no validation rules for Method - - // no validation rules for Headers - - // no validation rules for Path - - // no validation rules for Host - - // no validation rules for Scheme - - // no validation rules for Query - - // no validation rules for Fragment - - // no validation rules for Size - - // no validation rules for Protocol - - // no validation rules for Body - - // no validation rules for RawBody - - return nil -} - -// AttributeContext_HttpRequestValidationError is the validation error returned -// by AttributeContext_HttpRequest.Validate if the designated constraints -// aren't met. -type AttributeContext_HttpRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AttributeContext_HttpRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AttributeContext_HttpRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AttributeContext_HttpRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AttributeContext_HttpRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AttributeContext_HttpRequestValidationError) ErrorName() string { - return "AttributeContext_HttpRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e AttributeContext_HttpRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAttributeContext_HttpRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AttributeContext_HttpRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AttributeContext_HttpRequestValidationError{} diff --git a/pkg/api/envoy/service/auth/v4alpha/external_auth.pb.go b/pkg/api/envoy/service/auth/v4alpha/external_auth.pb.go deleted file mode 100644 index 463012372a..0000000000 --- a/pkg/api/envoy/service/auth/v4alpha/external_auth.pb.go +++ /dev/null @@ -1,669 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/auth/v4alpha/external_auth.proto - -package envoy_service_auth_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" - 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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type CheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The request attributes. - Attributes *AttributeContext `protobuf:"bytes,1,opt,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *CheckRequest) Reset() { - *x = CheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckRequest) ProtoMessage() {} - -func (x *CheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead. -func (*CheckRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_external_auth_proto_rawDescGZIP(), []int{0} -} - -func (x *CheckRequest) GetAttributes() *AttributeContext { - if x != nil { - return x.Attributes - } - return nil -} - -// HTTP attributes for a denied response. -type DeniedHttpResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field allows the authorization service to send a HTTP response status - // code to the downstream client other than 403 (Forbidden). - Status *v3.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. Note that the `append` field in `HeaderValueOption` defaults to - // false when used in this message. - Headers []*v4alpha.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"` -} - -func (x *DeniedHttpResponse) Reset() { - *x = DeniedHttpResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeniedHttpResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeniedHttpResponse) ProtoMessage() {} - -func (x *DeniedHttpResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeniedHttpResponse.ProtoReflect.Descriptor instead. -func (*DeniedHttpResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_external_auth_proto_rawDescGZIP(), []int{1} -} - -func (x *DeniedHttpResponse) GetStatus() *v3.HttpStatus { - if x != nil { - return x.Status - } - return nil -} - -func (x *DeniedHttpResponse) GetHeaders() []*v4alpha.HeaderValueOption { - if x != nil { - return x.Headers - } - return nil -} - -func (x *DeniedHttpResponse) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -// HTTP attributes for an OK response. -// [#next-free-field: 6] -type OkHttpResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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. Note that the `append` field in `HeaderValueOption` defaults to - // false when used in this message. By setting the `append` field to `true`, - // the filter will append the correspondent header value to the matched request header. - // By leaving `append` as false, the filter will either add a new header, or override an existing - // one if there is a match. - Headers []*v4alpha.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` - // HTTP entity headers to remove from the original request before dispatching - // it to the upstream. This allows the authorization service to act on auth - // related headers (like `Authorization`), process them, and consume them. - // Under this model, the upstream will either receive the request (if it's - // authorized) or not receive it (if it's not), but will not see headers - // containing authorization credentials. - // - // Pseudo headers (such as `:authority`, `:method`, `:path` etc), as well as - // the header `Host`, may not be removed as that would make the request - // malformed. If mentioned in `headers_to_remove` these special headers will - // be ignored. - // - // When using the HTTP service this must instead be set by the HTTP - // authorization service as a comma separated list like so: - // ``x-envoy-auth-headers-to-remove: one-auth-header, another-auth-header``. - HeadersToRemove []string `protobuf:"bytes,5,rep,name=headers_to_remove,json=headersToRemove,proto3" json:"headers_to_remove,omitempty"` - // This field has been deprecated in favor of :ref:`CheckResponse.dynamic_metadata - // `. Until it is removed, - // setting this field overrides :ref:`CheckResponse.dynamic_metadata - // `. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedDynamicMetadata *_struct.Struct `protobuf:"bytes,3,opt,name=hidden_envoy_deprecated_dynamic_metadata,json=hiddenEnvoyDeprecatedDynamicMetadata,proto3" json:"hidden_envoy_deprecated_dynamic_metadata,omitempty"` -} - -func (x *OkHttpResponse) Reset() { - *x = OkHttpResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OkHttpResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OkHttpResponse) ProtoMessage() {} - -func (x *OkHttpResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OkHttpResponse.ProtoReflect.Descriptor instead. -func (*OkHttpResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_external_auth_proto_rawDescGZIP(), []int{2} -} - -func (x *OkHttpResponse) GetHeaders() []*v4alpha.HeaderValueOption { - if x != nil { - return x.Headers - } - return nil -} - -func (x *OkHttpResponse) GetHeadersToRemove() []string { - if x != nil { - return x.HeadersToRemove - } - return nil -} - -// Deprecated: Do not use. -func (x *OkHttpResponse) GetHiddenEnvoyDeprecatedDynamicMetadata() *_struct.Struct { - if x != nil { - return x.HiddenEnvoyDeprecatedDynamicMetadata - } - return nil -} - -// Intended for gRPC and Network Authorization servers `only`. -type CheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status `OK` allows the request. Any other status indicates the request should be denied. - Status *status.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. - // - // Types that are assignable to HttpResponse: - // *CheckResponse_DeniedResponse - // *CheckResponse_OkResponse - HttpResponse isCheckResponse_HttpResponse `protobuf_oneof:"http_response"` - // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next - // filter. This metadata lives in a namespace specified by the canonical name of extension filter - // that requires it: - // - // - :ref:`envoy.filters.http.ext_authz ` for HTTP filter. - // - :ref:`envoy.filters.network.ext_authz ` for network filter. - DynamicMetadata *_struct.Struct `protobuf:"bytes,4,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` -} - -func (x *CheckResponse) Reset() { - *x = CheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckResponse) ProtoMessage() {} - -func (x *CheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead. -func (*CheckResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_auth_v4alpha_external_auth_proto_rawDescGZIP(), []int{3} -} - -func (x *CheckResponse) GetStatus() *status.Status { - if x != nil { - return x.Status - } - return nil -} - -func (m *CheckResponse) GetHttpResponse() isCheckResponse_HttpResponse { - if m != nil { - return m.HttpResponse - } - return nil -} - -func (x *CheckResponse) GetDeniedResponse() *DeniedHttpResponse { - if x, ok := x.GetHttpResponse().(*CheckResponse_DeniedResponse); ok { - return x.DeniedResponse - } - return nil -} - -func (x *CheckResponse) GetOkResponse() *OkHttpResponse { - if x, ok := x.GetHttpResponse().(*CheckResponse_OkResponse); ok { - return x.OkResponse - } - return nil -} - -func (x *CheckResponse) GetDynamicMetadata() *_struct.Struct { - if x != nil { - return x.DynamicMetadata - } - return nil -} - -type isCheckResponse_HttpResponse interface { - isCheckResponse_HttpResponse() -} - -type CheckResponse_DeniedResponse struct { - // Supplies http attributes for a denied response. - DeniedResponse *DeniedHttpResponse `protobuf:"bytes,2,opt,name=denied_response,json=deniedResponse,proto3,oneof"` -} - -type CheckResponse_OkResponse struct { - // Supplies http attributes for an ok response. - OkResponse *OkHttpResponse `protobuf:"bytes,3,opt,name=ok_response,json=okResponse,proto3,oneof"` -} - -func (*CheckResponse_DeniedResponse) isCheckResponse_HttpResponse() {} - -func (*CheckResponse_OkResponse) isCheckResponse_HttpResponse() {} - -var File_envoy_service_auth_v4alpha_external_auth_proto protoreflect.FileDescriptor - -var file_envoy_service_auth_v4alpha_external_auth_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, - 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0a, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, - 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0xde, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, - 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x02, 0x0a, 0x0e, 0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x2a, 0x0a, 0x11, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x73, 0x0a, 0x28, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, - 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4f, - 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe6, 0x02, - 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, 0x0f, 0x64, - 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0b, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x6f, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x4a, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, - 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_auth_v4alpha_external_auth_proto_rawDescOnce sync.Once - file_envoy_service_auth_v4alpha_external_auth_proto_rawDescData = file_envoy_service_auth_v4alpha_external_auth_proto_rawDesc -) - -func file_envoy_service_auth_v4alpha_external_auth_proto_rawDescGZIP() []byte { - file_envoy_service_auth_v4alpha_external_auth_proto_rawDescOnce.Do(func() { - file_envoy_service_auth_v4alpha_external_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_auth_v4alpha_external_auth_proto_rawDescData) - }) - return file_envoy_service_auth_v4alpha_external_auth_proto_rawDescData -} - -var file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_service_auth_v4alpha_external_auth_proto_goTypes = []interface{}{ - (*CheckRequest)(nil), // 0: envoy.service.auth.v4alpha.CheckRequest - (*DeniedHttpResponse)(nil), // 1: envoy.service.auth.v4alpha.DeniedHttpResponse - (*OkHttpResponse)(nil), // 2: envoy.service.auth.v4alpha.OkHttpResponse - (*CheckResponse)(nil), // 3: envoy.service.auth.v4alpha.CheckResponse - (*AttributeContext)(nil), // 4: envoy.service.auth.v4alpha.AttributeContext - (*v3.HttpStatus)(nil), // 5: envoy.type.v3.HttpStatus - (*v4alpha.HeaderValueOption)(nil), // 6: envoy.config.core.v4alpha.HeaderValueOption - (*_struct.Struct)(nil), // 7: google.protobuf.Struct - (*status.Status)(nil), // 8: google.rpc.Status -} -var file_envoy_service_auth_v4alpha_external_auth_proto_depIdxs = []int32{ - 4, // 0: envoy.service.auth.v4alpha.CheckRequest.attributes:type_name -> envoy.service.auth.v4alpha.AttributeContext - 5, // 1: envoy.service.auth.v4alpha.DeniedHttpResponse.status:type_name -> envoy.type.v3.HttpStatus - 6, // 2: envoy.service.auth.v4alpha.DeniedHttpResponse.headers:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 6, // 3: envoy.service.auth.v4alpha.OkHttpResponse.headers:type_name -> envoy.config.core.v4alpha.HeaderValueOption - 7, // 4: envoy.service.auth.v4alpha.OkHttpResponse.hidden_envoy_deprecated_dynamic_metadata:type_name -> google.protobuf.Struct - 8, // 5: envoy.service.auth.v4alpha.CheckResponse.status:type_name -> google.rpc.Status - 1, // 6: envoy.service.auth.v4alpha.CheckResponse.denied_response:type_name -> envoy.service.auth.v4alpha.DeniedHttpResponse - 2, // 7: envoy.service.auth.v4alpha.CheckResponse.ok_response:type_name -> envoy.service.auth.v4alpha.OkHttpResponse - 7, // 8: envoy.service.auth.v4alpha.CheckResponse.dynamic_metadata:type_name -> google.protobuf.Struct - 0, // 9: envoy.service.auth.v4alpha.Authorization.Check:input_type -> envoy.service.auth.v4alpha.CheckRequest - 3, // 10: envoy.service.auth.v4alpha.Authorization.Check:output_type -> envoy.service.auth.v4alpha.CheckResponse - 10, // [10:11] is the sub-list for method output_type - 9, // [9:10] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_envoy_service_auth_v4alpha_external_auth_proto_init() } -func file_envoy_service_auth_v4alpha_external_auth_proto_init() { - if File_envoy_service_auth_v4alpha_external_auth_proto != nil { - return - } - file_envoy_service_auth_v4alpha_attribute_context_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeniedHttpResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OkHttpResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*CheckResponse_DeniedResponse)(nil), - (*CheckResponse_OkResponse)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_auth_v4alpha_external_auth_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_auth_v4alpha_external_auth_proto_goTypes, - DependencyIndexes: file_envoy_service_auth_v4alpha_external_auth_proto_depIdxs, - MessageInfos: file_envoy_service_auth_v4alpha_external_auth_proto_msgTypes, - }.Build() - File_envoy_service_auth_v4alpha_external_auth_proto = out.File - file_envoy_service_auth_v4alpha_external_auth_proto_rawDesc = nil - file_envoy_service_auth_v4alpha_external_auth_proto_goTypes = nil - file_envoy_service_auth_v4alpha_external_auth_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AuthorizationClient is the client API for Authorization service. -// -// 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) -} - -type authorizationClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient { - return &authorizationClient{cc} -} - -func (c *authorizationClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { - out := new(CheckResponse) - err := c.cc.Invoke(ctx, "/envoy.service.auth.v4alpha.Authorization/Check", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// 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(context.Context, *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) -} - -func _Authorization_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthorizationServer).Check(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.service.auth.v4alpha.Authorization/Check", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizationServer).Check(ctx, req.(*CheckRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Authorization_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.auth.v4alpha.Authorization", - HandlerType: (*AuthorizationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Check", - Handler: _Authorization_Check_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "envoy/service/auth/v4alpha/external_auth.proto", -} diff --git a/pkg/api/envoy/service/auth/v4alpha/external_auth.pb.validate.go b/pkg/api/envoy/service/auth/v4alpha/external_auth.pb.validate.go deleted file mode 100644 index 4bb36b3677..0000000000 --- a/pkg/api/envoy/service/auth/v4alpha/external_auth.pb.validate.go +++ /dev/null @@ -1,413 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/auth/v4alpha/external_auth.proto - -package envoy_service_auth_v4alpha - -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{} -) - -// 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. -func (m *CheckRequest) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - return nil -} - -// CheckRequestValidationError is the validation error returned by -// CheckRequest.Validate if the designated constraints aren't met. -type CheckRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckRequestValidationError) ErrorName() string { return "CheckRequestValidationError" } - -// Error satisfies the builtin error interface -func (e CheckRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckRequestValidationError{} - -// Validate checks the field values on DeniedHttpResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DeniedHttpResponse) Validate() error { - if m == nil { - return nil - } - - if m.GetStatus() == nil { - return DeniedHttpResponseValidationError{ - field: "Status", - reason: "value is required", - } - } - - 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, - } - } - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - 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, - } - } - } - - } - - // no validation rules for Body - - return nil -} - -// DeniedHttpResponseValidationError is the validation error returned by -// DeniedHttpResponse.Validate if the designated constraints aren't met. -type DeniedHttpResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeniedHttpResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeniedHttpResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeniedHttpResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeniedHttpResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeniedHttpResponseValidationError) ErrorName() string { - return "DeniedHttpResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeniedHttpResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeniedHttpResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeniedHttpResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeniedHttpResponseValidationError{} - -// Validate checks the field values on OkHttpResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *OkHttpResponse) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - 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, - } - } - } - - } - - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OkHttpResponseValidationError{ - field: "HiddenEnvoyDeprecatedDynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// OkHttpResponseValidationError is the validation error returned by -// OkHttpResponse.Validate if the designated constraints aren't met. -type OkHttpResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OkHttpResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OkHttpResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OkHttpResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OkHttpResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OkHttpResponseValidationError) ErrorName() string { return "OkHttpResponseValidationError" } - -// Error satisfies the builtin error interface -func (e OkHttpResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOkHttpResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OkHttpResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OkHttpResponseValidationError{} - -// Validate checks the field values on CheckResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *CheckResponse) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckResponseValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.HttpResponse.(type) { - - case *CheckResponse_DeniedResponse: - - 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: - - 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, - } - } - } - - } - - return nil -} - -// CheckResponseValidationError is the validation error returned by -// CheckResponse.Validate if the designated constraints aren't met. -type CheckResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckResponseValidationError) ErrorName() string { return "CheckResponseValidationError" } - -// Error satisfies the builtin error interface -func (e CheckResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckResponseValidationError{} diff --git a/pkg/api/envoy/service/cluster/v3/cds.pb.go b/pkg/api/envoy/service/cluster/v3/cds.pb.go index 3d9da7a970..044d76511e 100644 --- a/pkg/api/envoy/service/cluster/v3/cds.pb.go +++ b/pkg/api/envoy/service/cluster/v3/cds.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/cluster/v3/cds.proto -package envoy_service_cluster_v3 +package clusterv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type CdsDummy struct { @@ -122,11 +117,16 @@ var file_envoy_service_cluster_v3_cds_proto_rawDesc = []byte{ 0x74, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x27, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x3f, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x42, 0x08, 0x43, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x8a, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x08, 0x43, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/cluster/v3/cds.pb.validate.go b/pkg/api/envoy/service/cluster/v3/cds.pb.validate.go index 7e19521337..cbee245fbf 100644 --- a/pkg/api/envoy/service/cluster/v3/cds.pb.validate.go +++ b/pkg/api/envoy/service/cluster/v3/cds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/cluster/v3/cds.proto -package envoy_service_cluster_v3 +package clusterv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CdsDummyMultiError, or nil +// if none found. +func (m *CdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *CdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return CdsDummyMultiError(errors) + } + return nil } +// CdsDummyMultiError is an error wrapping multiple validation errors returned +// by CdsDummy.ValidateAll() if the designated constraints aren't met. +type CdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CdsDummyMultiError) AllErrors() []error { return m } + // CdsDummyValidationError is the validation error returned by // CdsDummy.Validate if the designated constraints aren't met. type CdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/discovery/v2/ads.pb.go b/pkg/api/envoy/service/discovery/v2/ads.pb.go index 45789cf360..e70d907148 100644 --- a/pkg/api/envoy/service/discovery/v2/ads.pb.go +++ b/pkg/api/envoy/service/discovery/v2/ads.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/discovery/v2/ads.proto -package envoy_service_discovery_v2 +package discoveryv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 type AdsDummy struct { @@ -97,11 +92,16 @@ var file_envoy_service_discovery_v2_ads_proto_rawDesc = []byte{ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x41, 0x0a, 0x28, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x41, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x90, 0x01, 0x0a, 0x28, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x41, 0x64, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/service/discovery/v2/ads.pb.validate.go b/pkg/api/envoy/service/discovery/v2/ads.pb.validate.go index e24bc02715..7b1e54779b 100644 --- a/pkg/api/envoy/service/discovery/v2/ads.pb.validate.go +++ b/pkg/api/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 envoy_service_discovery_v2 +package discoveryv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AdsDummyMultiError, or nil +// if none found. +func (m *AdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *AdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return AdsDummyMultiError(errors) + } + return nil } +// AdsDummyMultiError is an error wrapping multiple validation errors returned +// by AdsDummy.ValidateAll() if the designated constraints aren't met. +type AdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdsDummyMultiError) AllErrors() []error { return m } + // AdsDummyValidationError is the validation error returned by // AdsDummy.Validate if the designated constraints aren't met. type AdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/discovery/v2/hds.pb.go b/pkg/api/envoy/service/discovery/v2/hds.pb.go index 09df503355..7ca5974bc8 100644 --- a/pkg/api/envoy/service/discovery/v2/hds.pb.go +++ b/pkg/api/envoy/service/discovery/v2/hds.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/discovery/v2/hds.proto -package envoy_service_discovery_v2 +package discoveryv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -30,10 +29,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Different Envoy instances may have different capabilities (e.g. Redis) // and/or have ports enabled for different protocols. type Capability_Protocol int32 @@ -241,7 +236,7 @@ func (x *EndpointHealth) GetHealthStatus() core.HealthStatus { if x != nil { return x.HealthStatus } - return core.HealthStatus_UNKNOWN + return core.HealthStatus(0) } type EndpointHealthResponse struct { @@ -682,10 +677,15 @@ var file_envoy_service_discovery_v2_hds_proto_rawDesc = []byte{ 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0x60, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x32, 0x42, 0x08, 0x48, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, + 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0xaf, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x32, 0x42, 0x08, 0x48, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, + 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/pkg/api/envoy/service/discovery/v2/hds.pb.validate.go b/pkg/api/envoy/service/discovery/v2/hds.pb.validate.go index 8459a1dea8..58756adc52 100644 --- a/pkg/api/envoy/service/discovery/v2/hds.pb.validate.go +++ b/pkg/api/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 envoy_service_discovery_v2 +package discoveryv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ) @@ -32,21 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = core.HealthStatus(0) ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Capability) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Capability with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CapabilityMultiError, or +// nil if none found. +func (m *Capability) ValidateAll() error { + return m.validate(true) +} + +func (m *Capability) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return CapabilityMultiError(errors) + } + return nil } +// CapabilityMultiError is an error wrapping multiple validation errors +// returned by Capability.ValidateAll() if the designated constraints aren't met. +type CapabilityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CapabilityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CapabilityMultiError) AllErrors() []error { return m } + // CapabilityValidationError is the validation error returned by // Capability.Validate if the designated constraints aren't met. type CapabilityValidationError struct { @@ -103,13 +140,46 @@ var _ interface { // Validate checks the field values on HealthCheckRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckRequestMultiError, or nil if none found. +func (m *HealthCheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Node", @@ -119,7 +189,26 @@ func (m *HealthCheckRequest) Validate() error { } } - if v, ok := interface{}(m.GetCapability()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCapability()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCapability()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Capability", @@ -129,9 +218,30 @@ func (m *HealthCheckRequest) Validate() error { } } + if len(errors) > 0 { + return HealthCheckRequestMultiError(errors) + } + return nil } +// HealthCheckRequestMultiError is an error wrapping multiple validation errors +// returned by HealthCheckRequest.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckRequestMultiError) AllErrors() []error { return m } + // HealthCheckRequestValidationError is the validation error returned by // HealthCheckRequest.Validate if the designated constraints aren't met. type HealthCheckRequestValidationError struct { @@ -189,14 +299,47 @@ var _ interface { } = HealthCheckRequestValidationError{} // Validate checks the field values on EndpointHealth with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *EndpointHealth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointHealth with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EndpointHealthMultiError, +// or nil if none found. +func (m *EndpointHealth) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointHealth) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthValidationError{ field: "Endpoint", @@ -208,9 +351,30 @@ func (m *EndpointHealth) Validate() error { // no validation rules for HealthStatus + if len(errors) > 0 { + return EndpointHealthMultiError(errors) + } + return nil } +// EndpointHealthMultiError is an error wrapping multiple validation errors +// returned by EndpointHealth.ValidateAll() if the designated constraints +// aren't met. +type EndpointHealthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointHealthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointHealthMultiError) AllErrors() []error { return m } + // EndpointHealthValidationError is the validation error returned by // EndpointHealth.Validate if the designated constraints aren't met. type EndpointHealthValidationError struct { @@ -267,16 +431,49 @@ var _ interface { // Validate checks the field values on EndpointHealthResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EndpointHealthResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointHealthResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EndpointHealthResponseMultiError, or nil if none found. +func (m *EndpointHealthResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointHealthResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetEndpointsHealth() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthResponseValidationError{ field: fmt.Sprintf("EndpointsHealth[%v]", idx), @@ -288,9 +485,30 @@ func (m *EndpointHealthResponse) Validate() error { } + if len(errors) > 0 { + return EndpointHealthResponseMultiError(errors) + } + return nil } +// EndpointHealthResponseMultiError is an error wrapping multiple validation +// errors returned by EndpointHealthResponse.ValidateAll() if the designated +// constraints aren't met. +type EndpointHealthResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointHealthResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointHealthResponseMultiError) AllErrors() []error { return m } + // EndpointHealthResponseValidationError is the validation error returned by // EndpointHealthResponse.Validate if the designated constraints aren't met. type EndpointHealthResponseValidationError struct { @@ -349,17 +567,52 @@ var _ interface { // Validate checks the field values on // HealthCheckRequestOrEndpointHealthResponse with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HealthCheckRequestOrEndpointHealthResponse with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// HealthCheckRequestOrEndpointHealthResponseMultiError, or nil if none found. +func (m *HealthCheckRequestOrEndpointHealthResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckRequestOrEndpointHealthResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.RequestType.(type) { case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - if v, ok := interface{}(m.GetHealthCheckRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthCheckRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "HealthCheckRequest", @@ -371,7 +624,26 @@ func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: - if v, ok := interface{}(m.GetEndpointHealthResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpointHealthResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointHealthResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "EndpointHealthResponse", @@ -383,9 +655,31 @@ func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { } + if len(errors) > 0 { + return HealthCheckRequestOrEndpointHealthResponseMultiError(errors) + } + return nil } +// HealthCheckRequestOrEndpointHealthResponseMultiError is an error wrapping +// multiple validation errors returned by +// HealthCheckRequestOrEndpointHealthResponse.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckRequestOrEndpointHealthResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckRequestOrEndpointHealthResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckRequestOrEndpointHealthResponseMultiError) AllErrors() []error { return m } + // HealthCheckRequestOrEndpointHealthResponseValidationError is the validation // error returned by HealthCheckRequestOrEndpointHealthResponse.Validate if // the designated constraints aren't met. @@ -444,14 +738,47 @@ var _ interface { } = HealthCheckRequestOrEndpointHealthResponseValidationError{} // Validate checks the field values on LocalityEndpoints with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LocalityEndpoints) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityEndpoints with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LocalityEndpointsMultiError, or nil if none found. +func (m *LocalityEndpoints) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityEndpoints) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsValidationError{ field: "Locality", @@ -464,7 +791,26 @@ func (m *LocalityEndpoints) Validate() error { for idx, item := range m.GetEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsValidationError{ field: fmt.Sprintf("Endpoints[%v]", idx), @@ -476,9 +822,30 @@ func (m *LocalityEndpoints) Validate() error { } + if len(errors) > 0 { + return LocalityEndpointsMultiError(errors) + } + return nil } +// LocalityEndpointsMultiError is an error wrapping multiple validation errors +// returned by LocalityEndpoints.ValidateAll() if the designated constraints +// aren't met. +type LocalityEndpointsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityEndpointsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityEndpointsMultiError) AllErrors() []error { return m } + // LocalityEndpointsValidationError is the validation error returned by // LocalityEndpoints.Validate if the designated constraints aren't met. type LocalityEndpointsValidationError struct { @@ -537,18 +904,51 @@ var _ interface { // Validate checks the field values on ClusterHealthCheck with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterHealthCheck with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterHealthCheckMultiError, or nil if none found. +func (m *ClusterHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ClusterName for idx, item := range m.GetHealthChecks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("HealthChecks[%v]", idx), @@ -563,7 +963,26 @@ func (m *ClusterHealthCheck) Validate() error { for idx, item := range m.GetLocalityEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("LocalityEndpoints[%v]", idx), @@ -575,9 +994,30 @@ func (m *ClusterHealthCheck) Validate() error { } + if len(errors) > 0 { + return ClusterHealthCheckMultiError(errors) + } + return nil } +// ClusterHealthCheckMultiError is an error wrapping multiple validation errors +// returned by ClusterHealthCheck.ValidateAll() if the designated constraints +// aren't met. +type ClusterHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterHealthCheckMultiError) AllErrors() []error { return m } + // ClusterHealthCheckValidationError is the validation error returned by // ClusterHealthCheck.Validate if the designated constraints aren't met. type ClusterHealthCheckValidationError struct { @@ -636,16 +1076,49 @@ var _ interface { // Validate checks the field values on HealthCheckSpecifier with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckSpecifier with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckSpecifierMultiError, or nil if none found. +func (m *HealthCheckSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckSpecifier) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetClusterHealthChecks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), @@ -657,7 +1130,26 @@ func (m *HealthCheckSpecifier) Validate() error { } - if v, ok := interface{}(m.GetInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: "Interval", @@ -667,9 +1159,30 @@ func (m *HealthCheckSpecifier) Validate() error { } } + if len(errors) > 0 { + return HealthCheckSpecifierMultiError(errors) + } + return nil } +// HealthCheckSpecifierMultiError is an error wrapping multiple validation +// errors returned by HealthCheckSpecifier.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckSpecifierMultiError) AllErrors() []error { return m } + // HealthCheckSpecifierValidationError is the validation error returned by // HealthCheckSpecifier.Validate if the designated constraints aren't met. type HealthCheckSpecifierValidationError struct { diff --git a/pkg/api/envoy/service/discovery/v2/rtds.pb.go b/pkg/api/envoy/service/discovery/v2/rtds.pb.go index 081e451228..8af512e7ee 100644 --- a/pkg/api/envoy/service/discovery/v2/rtds.pb.go +++ b/pkg/api/envoy/service/discovery/v2/rtds.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/discovery/v2/rtds.proto -package envoy_service_discovery_v2 +package discoveryv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -31,10 +30,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 type RtdsDummy struct { @@ -183,10 +178,15 @@ var file_envoy_service_discovery_v2_rtds_proto_rawDesc = []byte{ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x2a, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x62, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x32, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0xb1, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x32, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, + 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, diff --git a/pkg/api/envoy/service/discovery/v2/rtds.pb.validate.go b/pkg/api/envoy/service/discovery/v2/rtds.pb.validate.go index d6ce75f0d9..4917a198b7 100644 --- a/pkg/api/envoy/service/discovery/v2/rtds.pb.validate.go +++ b/pkg/api/envoy/service/discovery/v2/rtds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/discovery/v2/rtds.proto -package envoy_service_discovery_v2 +package discoveryv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RtdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RtdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RtdsDummyMultiError, or nil +// if none found. +func (m *RtdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *RtdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RtdsDummyMultiError(errors) + } + return nil } +// RtdsDummyMultiError is an error wrapping multiple validation errors returned +// by RtdsDummy.ValidateAll() if the designated constraints aren't met. +type RtdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RtdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RtdsDummyMultiError) AllErrors() []error { return m } + // RtdsDummyValidationError is the validation error returned by // RtdsDummy.Validate if the designated constraints aren't met. type RtdsDummyValidationError struct { @@ -98,20 +135,57 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Runtime) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Runtime with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RuntimeMultiError, or nil if none found. +func (m *Runtime) ValidateAll() error { + return m.validate(true) +} + +func (m *Runtime) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return RuntimeValidationError{ + err := RuntimeValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeValidationError{ field: "Layer", @@ -121,9 +195,29 @@ func (m *Runtime) Validate() error { } } + if len(errors) > 0 { + return RuntimeMultiError(errors) + } + return nil } +// RuntimeMultiError is an error wrapping multiple validation errors returned +// by Runtime.ValidateAll() if the designated constraints aren't met. +type RuntimeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeMultiError) AllErrors() []error { return m } + // RuntimeValidationError is the validation error returned by Runtime.Validate // if the designated constraints aren't met. type RuntimeValidationError struct { diff --git a/pkg/api/envoy/service/discovery/v2/sds.pb.go b/pkg/api/envoy/service/discovery/v2/sds.pb.go index d72347f735..3b4be7914a 100644 --- a/pkg/api/envoy/service/discovery/v2/sds.pb.go +++ b/pkg/api/envoy/service/discovery/v2/sds.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/discovery/v2/sds.proto -package envoy_service_discovery_v2 +package discoveryv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/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" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 type SdsDummy struct { @@ -113,11 +108,16 @@ var file_envoy_service_discovery_v2_sds_proto_rawDesc = []byte{ 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x20, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x1a, 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x60, 0x0a, 0x28, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x53, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, + 0x75, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0xaf, 0x01, 0x0a, 0x28, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x53, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/pkg/api/envoy/service/discovery/v2/sds.pb.validate.go b/pkg/api/envoy/service/discovery/v2/sds.pb.validate.go index 26fb06926b..33239814b6 100644 --- a/pkg/api/envoy/service/discovery/v2/sds.pb.validate.go +++ b/pkg/api/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 envoy_service_discovery_v2 +package discoveryv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SdsDummyMultiError, or nil +// if none found. +func (m *SdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *SdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SdsDummyMultiError(errors) + } + return nil } +// SdsDummyMultiError is an error wrapping multiple validation errors returned +// by SdsDummy.ValidateAll() if the designated constraints aren't met. +type SdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SdsDummyMultiError) AllErrors() []error { return m } + // SdsDummyValidationError is the validation error returned by // SdsDummy.Validate if the designated constraints aren't met. type SdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/discovery/v3/ads.pb.go b/pkg/api/envoy/service/discovery/v3/ads.pb.go index 1fa995ca49..5c049d32ad 100644 --- a/pkg/api/envoy/service/discovery/v3/ads.pb.go +++ b/pkg/api/envoy/service/discovery/v3/ads.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/discovery/v3/ads.proto -package envoy_service_discovery_v3 +package discoveryv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 type AdsDummy struct { @@ -106,10 +101,15 @@ var file_envoy_service_discovery_v3_ads_proto_rawDesc = []byte{ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, - 0x01, 0x42, 0x41, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x41, - 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, + 0x01, 0x42, 0x90, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x08, + 0x41, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/api/envoy/service/discovery/v3/ads.pb.validate.go b/pkg/api/envoy/service/discovery/v3/ads.pb.validate.go index 14f3d05a41..966eb457e1 100644 --- a/pkg/api/envoy/service/discovery/v3/ads.pb.validate.go +++ b/pkg/api/envoy/service/discovery/v3/ads.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/discovery/v3/ads.proto -package envoy_service_discovery_v3 +package discoveryv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *AdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AdsDummyMultiError, or nil +// if none found. +func (m *AdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *AdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return AdsDummyMultiError(errors) + } + return nil } +// AdsDummyMultiError is an error wrapping multiple validation errors returned +// by AdsDummy.ValidateAll() if the designated constraints aren't met. +type AdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdsDummyMultiError) AllErrors() []error { return m } + // AdsDummyValidationError is the validation error returned by // AdsDummy.Validate if the designated constraints aren't met. type AdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/discovery/v3/discovery.pb.go b/pkg/api/envoy/service/discovery/v3/discovery.pb.go index 10859aa142..9c2e6b8af0 100644 --- a/pkg/api/envoy/service/discovery/v3/discovery.pb.go +++ b/pkg/api/envoy/service/discovery/v3/discovery.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/discovery/v3/discovery.proto -package envoy_service_discovery_v3 +package discoveryv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" duration "github.com/golang/protobuf/ptypes/duration" status "google.golang.org/genproto/googleapis/rpc/status" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A DiscoveryRequest requests a set of versioned resources of the same type for // a given Envoy node on some API. // [#next-free-field: 7] @@ -66,7 +61,7 @@ type DiscoveryRequest struct { // or 2) the client has not yet accepted an update in this xDS stream (unlike // delta, where it is populated only for new explicit ACKs). ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` + // 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. @@ -184,7 +179,6 @@ type DiscoveryResponse struct { // 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. ControlPlane *v3.ControlPlane `protobuf:"bytes,6,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` } @@ -346,7 +340,7 @@ type DeltaDiscoveryRequest struct { // nonce in the DeltaDiscoveryResponse. // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. ResponseNonce string `protobuf:"bytes,6,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` + // This is populated when the previous :ref:`DiscoveryResponse ` // failed to update configuration. The *message* field in *error_details* // provides the Envoy internal exception related to the failure. ErrorDetail *status.Status `protobuf:"bytes,7,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` @@ -433,7 +427,7 @@ func (x *DeltaDiscoveryRequest) GetErrorDetail() *status.Status { return nil } -// [#next-free-field: 7] +// [#next-free-field: 8] type DeltaDiscoveryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -453,6 +447,9 @@ type DeltaDiscoveryResponse struct { // The nonce provides a way for DeltaDiscoveryRequests to uniquely // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + // [#not-implemented-hide:] + // The control plane instance that sent the response. + ControlPlane *v3.ControlPlane `protobuf:"bytes,7,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` } func (x *DeltaDiscoveryResponse) Reset() { @@ -522,6 +519,13 @@ func (x *DeltaDiscoveryResponse) GetNonce() string { return "" } +func (x *DeltaDiscoveryResponse) GetControlPlane() *v3.ControlPlane { + if x != nil { + return x.ControlPlane + } + return nil +} + // [#next-free-field: 8] type Resource struct { state protoimpl.MessageState @@ -696,9 +700,7 @@ var file_envoy_service_discovery_v3_discovery_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, @@ -776,7 +778,7 @@ var file_envoy_service_discovery_v3_discovery_proto_rawDesc = []byte{ 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x96, 0x02, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, + 0x73, 0x74, 0x22, 0xdf, 0x02, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x79, 0x73, 0x74, @@ -790,37 +792,46 @@ var file_envoy_service_discovery_v3_discovery_proto_rawDesc = []byte{ 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x3a, - 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd9, 0x02, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, - 0x56, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x1a, 0x30, 0x0a, 0x0c, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, - 0x74, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, - 0x6f, 0x4e, 0x6f, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, - 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x44, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, + 0x47, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd9, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, + 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x1a, 0x30, 0x0a, 0x0c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x42, 0x93, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, + 0x76, 0x33, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -859,14 +870,15 @@ var file_envoy_service_discovery_v3_discovery_proto_depIdxs = []int32{ 5, // 5: envoy.service.discovery.v3.DeltaDiscoveryRequest.initial_resource_versions:type_name -> envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry 8, // 6: envoy.service.discovery.v3.DeltaDiscoveryRequest.error_detail:type_name -> google.rpc.Status 4, // 7: envoy.service.discovery.v3.DeltaDiscoveryResponse.resources:type_name -> envoy.service.discovery.v3.Resource - 9, // 8: envoy.service.discovery.v3.Resource.resource:type_name -> google.protobuf.Any - 11, // 9: envoy.service.discovery.v3.Resource.ttl:type_name -> google.protobuf.Duration - 6, // 10: envoy.service.discovery.v3.Resource.cache_control:type_name -> envoy.service.discovery.v3.Resource.CacheControl - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 10, // 8: envoy.service.discovery.v3.DeltaDiscoveryResponse.control_plane:type_name -> envoy.config.core.v3.ControlPlane + 9, // 9: envoy.service.discovery.v3.Resource.resource:type_name -> google.protobuf.Any + 11, // 10: envoy.service.discovery.v3.Resource.ttl:type_name -> google.protobuf.Duration + 6, // 11: envoy.service.discovery.v3.Resource.cache_control:type_name -> envoy.service.discovery.v3.Resource.CacheControl + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_envoy_service_discovery_v3_discovery_proto_init() } diff --git a/pkg/api/envoy/service/discovery/v3/discovery.pb.validate.go b/pkg/api/envoy/service/discovery/v3/discovery.pb.validate.go index 9d9afe5519..244f4f870d 100644 --- a/pkg/api/envoy/service/discovery/v3/discovery.pb.validate.go +++ b/pkg/api/envoy/service/discovery/v3/discovery.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/discovery/v3/discovery.proto -package envoy_service_discovery_v3 +package discoveryv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,54 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *DiscoveryRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DiscoveryRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DiscoveryRequestMultiError, or nil if none found. +func (m *DiscoveryRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *DiscoveryRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryRequestValidationError{ field: "Node", @@ -57,7 +92,26 @@ func (m *DiscoveryRequest) Validate() error { // no validation rules for ResponseNonce - if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetErrorDetail()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryRequestValidationError{ field: "ErrorDetail", @@ -67,9 +121,30 @@ func (m *DiscoveryRequest) Validate() error { } } + if len(errors) > 0 { + return DiscoveryRequestMultiError(errors) + } + return nil } +// DiscoveryRequestMultiError is an error wrapping multiple validation errors +// returned by DiscoveryRequest.ValidateAll() if the designated constraints +// aren't met. +type DiscoveryRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DiscoveryRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DiscoveryRequestMultiError) AllErrors() []error { return m } + // DiscoveryRequestValidationError is the validation error returned by // DiscoveryRequest.Validate if the designated constraints aren't met. type DiscoveryRequestValidationError struct { @@ -125,19 +200,52 @@ var _ interface { } = DiscoveryRequestValidationError{} // Validate checks the field values on DiscoveryResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *DiscoveryResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DiscoveryResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DiscoveryResponseMultiError, or nil if none found. +func (m *DiscoveryResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DiscoveryResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for VersionInfo for idx, item := range m.GetResources() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryResponseValidationError{ field: fmt.Sprintf("Resources[%v]", idx), @@ -155,7 +263,26 @@ func (m *DiscoveryResponse) Validate() error { // no validation rules for Nonce - if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetControlPlane()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: "ControlPlane", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DiscoveryResponseValidationError{ + field: "ControlPlane", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DiscoveryResponseValidationError{ field: "ControlPlane", @@ -165,9 +292,30 @@ func (m *DiscoveryResponse) Validate() error { } } + if len(errors) > 0 { + return DiscoveryResponseMultiError(errors) + } + return nil } +// DiscoveryResponseMultiError is an error wrapping multiple validation errors +// returned by DiscoveryResponse.ValidateAll() if the designated constraints +// aren't met. +type DiscoveryResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DiscoveryResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DiscoveryResponseMultiError) AllErrors() []error { return m } + // DiscoveryResponseValidationError is the validation error returned by // DiscoveryResponse.Validate if the designated constraints aren't met. type DiscoveryResponseValidationError struct { @@ -226,13 +374,46 @@ var _ interface { // Validate checks the field values on DeltaDiscoveryRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DeltaDiscoveryRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeltaDiscoveryRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeltaDiscoveryRequestMultiError, or nil if none found. +func (m *DeltaDiscoveryRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *DeltaDiscoveryRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeltaDiscoveryRequestValidationError{ field: "Node", @@ -248,7 +429,26 @@ func (m *DeltaDiscoveryRequest) Validate() error { // no validation rules for ResponseNonce - if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetErrorDetail()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeltaDiscoveryRequestValidationError{ + field: "ErrorDetail", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeltaDiscoveryRequestValidationError{ field: "ErrorDetail", @@ -258,9 +458,30 @@ func (m *DeltaDiscoveryRequest) Validate() error { } } + if len(errors) > 0 { + return DeltaDiscoveryRequestMultiError(errors) + } + return nil } +// DeltaDiscoveryRequestMultiError is an error wrapping multiple validation +// errors returned by DeltaDiscoveryRequest.ValidateAll() if the designated +// constraints aren't met. +type DeltaDiscoveryRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeltaDiscoveryRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeltaDiscoveryRequestMultiError) AllErrors() []error { return m } + // DeltaDiscoveryRequestValidationError is the validation error returned by // DeltaDiscoveryRequest.Validate if the designated constraints aren't met. type DeltaDiscoveryRequestValidationError struct { @@ -319,18 +540,51 @@ var _ interface { // Validate checks the field values on DeltaDiscoveryResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *DeltaDiscoveryResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeltaDiscoveryResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeltaDiscoveryResponseMultiError, or nil if none found. +func (m *DeltaDiscoveryResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DeltaDiscoveryResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SystemVersionInfo for idx, item := range m.GetResources() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeltaDiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeltaDiscoveryResponseValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeltaDiscoveryResponseValidationError{ field: fmt.Sprintf("Resources[%v]", idx), @@ -346,9 +600,59 @@ func (m *DeltaDiscoveryResponse) Validate() error { // no validation rules for Nonce + if all { + switch v := interface{}(m.GetControlPlane()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeltaDiscoveryResponseValidationError{ + field: "ControlPlane", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeltaDiscoveryResponseValidationError{ + field: "ControlPlane", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeltaDiscoveryResponseValidationError{ + field: "ControlPlane", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DeltaDiscoveryResponseMultiError(errors) + } + return nil } +// DeltaDiscoveryResponseMultiError is an error wrapping multiple validation +// errors returned by DeltaDiscoveryResponse.ValidateAll() if the designated +// constraints aren't met. +type DeltaDiscoveryResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeltaDiscoveryResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeltaDiscoveryResponseMultiError) AllErrors() []error { return m } + // DeltaDiscoveryResponseValidationError is the validation error returned by // DeltaDiscoveryResponse.Validate if the designated constraints aren't met. type DeltaDiscoveryResponseValidationError struct { @@ -406,17 +710,51 @@ var _ interface { } = DeltaDiscoveryResponseValidationError{} // Validate checks the field values on Resource with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Resource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Resource with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResourceMultiError, or nil +// if none found. +func (m *Resource) ValidateAll() error { + return m.validate(true) +} + +func (m *Resource) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for Version - if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetResource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResourceValidationError{ field: "Resource", @@ -426,7 +764,26 @@ func (m *Resource) Validate() error { } } - if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTtl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "Ttl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "Ttl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResourceValidationError{ field: "Ttl", @@ -436,7 +793,26 @@ func (m *Resource) Validate() error { } } - if v, ok := interface{}(m.GetCacheControl()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCacheControl()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "CacheControl", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceValidationError{ + field: "CacheControl", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheControl()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResourceValidationError{ field: "CacheControl", @@ -446,9 +822,29 @@ func (m *Resource) Validate() error { } } + if len(errors) > 0 { + return ResourceMultiError(errors) + } + return nil } +// ResourceMultiError is an error wrapping multiple validation errors returned +// by Resource.ValidateAll() if the designated constraints aren't met. +type ResourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceMultiError) AllErrors() []error { return m } + // ResourceValidationError is the validation error returned by // Resource.Validate if the designated constraints aren't met. type ResourceValidationError struct { @@ -505,17 +901,52 @@ var _ interface { // Validate checks the field values on Resource_CacheControl with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *Resource_CacheControl) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Resource_CacheControl with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Resource_CacheControlMultiError, or nil if none found. +func (m *Resource_CacheControl) ValidateAll() error { + return m.validate(true) +} + +func (m *Resource_CacheControl) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for DoNotCache + if len(errors) > 0 { + return Resource_CacheControlMultiError(errors) + } + return nil } +// Resource_CacheControlMultiError is an error wrapping multiple validation +// errors returned by Resource_CacheControl.ValidateAll() if the designated +// constraints aren't met. +type Resource_CacheControlMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Resource_CacheControlMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Resource_CacheControlMultiError) AllErrors() []error { return m } + // Resource_CacheControlValidationError is the validation error returned by // Resource_CacheControl.Validate if the designated constraints aren't met. type Resource_CacheControlValidationError struct { diff --git a/pkg/api/envoy/service/discovery/v4alpha/ads.pb.go b/pkg/api/envoy/service/discovery/v4alpha/ads.pb.go deleted file mode 100644 index 9f15b1b056..0000000000 --- a/pkg/api/envoy/service/discovery/v4alpha/ads.pb.go +++ /dev/null @@ -1,371 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/discovery/v4alpha/ads.proto - -package envoy_service_discovery_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -type AdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AdsDummy) Reset() { - *x = AdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v4alpha_ads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdsDummy) ProtoMessage() {} - -func (x *AdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v4alpha_ads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdsDummy.ProtoReflect.Descriptor instead. -func (*AdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v4alpha_ads_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_service_discovery_v4alpha_ads_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v4alpha_ads_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x61, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x36, 0x0a, 0x08, 0x41, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, - 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x41, - 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xbb, 0x02, 0x0a, 0x1a, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, - 0x01, 0x12, 0x91, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x36, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x46, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x41, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_discovery_v4alpha_ads_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v4alpha_ads_proto_rawDescData = file_envoy_service_discovery_v4alpha_ads_proto_rawDesc -) - -func file_envoy_service_discovery_v4alpha_ads_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v4alpha_ads_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v4alpha_ads_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v4alpha_ads_proto_rawDescData) - }) - return file_envoy_service_discovery_v4alpha_ads_proto_rawDescData -} - -var file_envoy_service_discovery_v4alpha_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_service_discovery_v4alpha_ads_proto_goTypes = []interface{}{ - (*AdsDummy)(nil), // 0: envoy.service.discovery.v4alpha.AdsDummy - (*DiscoveryRequest)(nil), // 1: envoy.service.discovery.v4alpha.DiscoveryRequest - (*DeltaDiscoveryRequest)(nil), // 2: envoy.service.discovery.v4alpha.DeltaDiscoveryRequest - (*DiscoveryResponse)(nil), // 3: envoy.service.discovery.v4alpha.DiscoveryResponse - (*DeltaDiscoveryResponse)(nil), // 4: envoy.service.discovery.v4alpha.DeltaDiscoveryResponse -} -var file_envoy_service_discovery_v4alpha_ads_proto_depIdxs = []int32{ - 1, // 0: envoy.service.discovery.v4alpha.AggregatedDiscoveryService.StreamAggregatedResources:input_type -> envoy.service.discovery.v4alpha.DiscoveryRequest - 2, // 1: envoy.service.discovery.v4alpha.AggregatedDiscoveryService.DeltaAggregatedResources:input_type -> envoy.service.discovery.v4alpha.DeltaDiscoveryRequest - 3, // 2: envoy.service.discovery.v4alpha.AggregatedDiscoveryService.StreamAggregatedResources:output_type -> envoy.service.discovery.v4alpha.DiscoveryResponse - 4, // 3: envoy.service.discovery.v4alpha.AggregatedDiscoveryService.DeltaAggregatedResources:output_type -> envoy.service.discovery.v4alpha.DeltaDiscoveryResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v4alpha_ads_proto_init() } -func file_envoy_service_discovery_v4alpha_ads_proto_init() { - if File_envoy_service_discovery_v4alpha_ads_proto != nil { - return - } - file_envoy_service_discovery_v4alpha_discovery_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v4alpha_ads_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v4alpha_ads_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_discovery_v4alpha_ads_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v4alpha_ads_proto_depIdxs, - MessageInfos: file_envoy_service_discovery_v4alpha_ads_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v4alpha_ads_proto = out.File - file_envoy_service_discovery_v4alpha_ads_proto_rawDesc = nil - file_envoy_service_discovery_v4alpha_ads_proto_goTypes = nil - file_envoy_service_discovery_v4alpha_ads_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AggregatedDiscoveryServiceClient is the client API for AggregatedDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AggregatedDiscoveryServiceClient interface { - // This is a gRPC-only API. - StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) - DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error) -} - -type aggregatedDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAggregatedDiscoveryServiceClient(cc grpc.ClientConnInterface) AggregatedDiscoveryServiceClient { - return &aggregatedDiscoveryServiceClient{cc} -} - -func (c *aggregatedDiscoveryServiceClient) StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) { - stream, err := c.cc.NewStream(ctx, &_AggregatedDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v4alpha.AggregatedDiscoveryService/StreamAggregatedResources", opts...) - if err != nil { - return nil, err - } - x := &aggregatedDiscoveryServiceStreamAggregatedResourcesClient{stream} - return x, nil -} - -type AggregatedDiscoveryService_StreamAggregatedResourcesClient interface { - Send(*DiscoveryRequest) error - Recv() (*DiscoveryResponse, error) - grpc.ClientStream -} - -type aggregatedDiscoveryServiceStreamAggregatedResourcesClient struct { - grpc.ClientStream -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Send(m *DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Recv() (*DiscoveryResponse, error) { - m := new(DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *aggregatedDiscoveryServiceClient) DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error) { - stream, err := c.cc.NewStream(ctx, &_AggregatedDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v4alpha.AggregatedDiscoveryService/DeltaAggregatedResources", opts...) - if err != nil { - return nil, err - } - x := &aggregatedDiscoveryServiceDeltaAggregatedResourcesClient{stream} - return x, nil -} - -type AggregatedDiscoveryService_DeltaAggregatedResourcesClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type aggregatedDiscoveryServiceDeltaAggregatedResourcesClient struct { - grpc.ClientStream -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// AggregatedDiscoveryServiceServer is the server API for AggregatedDiscoveryService service. -type AggregatedDiscoveryServiceServer interface { - // This is a gRPC-only API. - StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error - DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error -} - -// UnimplementedAggregatedDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAggregatedDiscoveryServiceServer struct { -} - -func (*UnimplementedAggregatedDiscoveryServiceServer) StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamAggregatedResources not implemented") -} -func (*UnimplementedAggregatedDiscoveryServiceServer) DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaAggregatedResources not implemented") -} - -func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer) { - s.RegisterService(&_AggregatedDiscoveryService_serviceDesc, srv) -} - -func _AggregatedDiscoveryService_StreamAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AggregatedDiscoveryServiceServer).StreamAggregatedResources(&aggregatedDiscoveryServiceStreamAggregatedResourcesServer{stream}) -} - -type AggregatedDiscoveryService_StreamAggregatedResourcesServer interface { - Send(*DiscoveryResponse) error - Recv() (*DiscoveryRequest, error) - grpc.ServerStream -} - -type aggregatedDiscoveryServiceStreamAggregatedResourcesServer struct { - grpc.ServerStream -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Send(m *DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Recv() (*DiscoveryRequest, error) { - m := new(DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _AggregatedDiscoveryService_DeltaAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AggregatedDiscoveryServiceServer).DeltaAggregatedResources(&aggregatedDiscoveryServiceDeltaAggregatedResourcesServer{stream}) -} - -type AggregatedDiscoveryService_DeltaAggregatedResourcesServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type aggregatedDiscoveryServiceDeltaAggregatedResourcesServer struct { - grpc.ServerStream -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _AggregatedDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.discovery.v4alpha.AggregatedDiscoveryService", - HandlerType: (*AggregatedDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamAggregatedResources", - Handler: _AggregatedDiscoveryService_StreamAggregatedResources_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaAggregatedResources", - Handler: _AggregatedDiscoveryService_DeltaAggregatedResources_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/discovery/v4alpha/ads.proto", -} diff --git a/pkg/api/envoy/service/discovery/v4alpha/ads.pb.validate.go b/pkg/api/envoy/service/discovery/v4alpha/ads.pb.validate.go deleted file mode 100644 index 69c765b069..0000000000 --- a/pkg/api/envoy/service/discovery/v4alpha/ads.pb.validate.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v4alpha/ads.proto - -package envoy_service_discovery_v4alpha - -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{} -) - -// 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 { - if m == nil { - return nil - } - - return nil -} - -// AdsDummyValidationError is the validation error returned by -// AdsDummy.Validate if the designated constraints aren't met. -type AdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdsDummyValidationError) ErrorName() string { return "AdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e AdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdsDummyValidationError{} diff --git a/pkg/api/envoy/service/discovery/v4alpha/discovery.pb.go b/pkg/api/envoy/service/discovery/v4alpha/discovery.pb.go deleted file mode 100644 index e96f364c56..0000000000 --- a/pkg/api/envoy/service/discovery/v4alpha/discovery.pb.go +++ /dev/null @@ -1,978 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/discovery/v4alpha/discovery.proto - -package envoy_service_discovery_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - duration "github.com/golang/protobuf/ptypes/duration" - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A DiscoveryRequest requests a set of versioned resources of the same type for -// a given Envoy node on some API. -// [#next-free-field: 7] -type DiscoveryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version_info provided in the request messages will be the version_info - // received with the most recent successfully processed response or empty on - // the first request. It is expected that no new request is sent after a - // response is received until the Envoy instance is ready to ACK/NACK the new - // configuration. ACK/NACK takes place by returning the new API config version - // as applied or the previous API config version respectively. Each type_url - // (see below) has an independent version associated with it. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The node making the request. - Node *v4alpha.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` - // List of resources to subscribe to, e.g. list of cluster names or a route - // configuration name. If this is empty, all resources for the API are - // returned. LDS/CDS may have empty resource_names, which will cause all - // resources for the Envoy instance to be returned. The LDS and CDS responses - // will then imply a number of resources that need to be fetched via EDS/RDS, - // which will be explicitly enumerated in resource_names. - ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit - // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is - // required for ADS. - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above - // discussion on version_info and the DiscoveryResponse nonce comment. This - // may be empty only if 1) this is a non-persistent-stream xDS such as HTTP, - // or 2) the client has not yet accepted an update in this xDS stream (unlike - // delta, where it is populated only for new explicit ACKs). - ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The *message* field in *error_details* provides the Envoy - // internal exception related to the failure. It is only intended for consumption during manual - // debugging, the string provided is not guaranteed to be stable across Envoy versions. - ErrorDetail *status.Status `protobuf:"bytes,6,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` -} - -func (x *DiscoveryRequest) Reset() { - *x = DiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DiscoveryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DiscoveryRequest) ProtoMessage() {} - -func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DiscoveryRequest.ProtoReflect.Descriptor instead. -func (*DiscoveryRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v4alpha_discovery_proto_rawDescGZIP(), []int{0} -} - -func (x *DiscoveryRequest) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *DiscoveryRequest) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *DiscoveryRequest) GetResourceNames() []string { - if x != nil { - return x.ResourceNames - } - return nil -} - -func (x *DiscoveryRequest) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DiscoveryRequest) GetResponseNonce() string { - if x != nil { - return x.ResponseNonce - } - return "" -} - -func (x *DiscoveryRequest) GetErrorDetail() *status.Status { - if x != nil { - return x.ErrorDetail - } - return nil -} - -// [#next-free-field: 7] -type DiscoveryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version of the response data. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The response resources. These resources are typed and depend on the API being called. - Resources []*any.Any `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` - // [#not-implemented-hide:] - // Canary is used to support two Envoy command line flags: - // - // * --terminate-on-canary-transition-failure. When set, Envoy is able to - // terminate if it detects that configuration is stuck at canary. Consider - // this example sequence of updates: - // - Management server applies a canary config successfully. - // - Management server rolls back to a production config. - // - Envoy rejects the new production config. - // Since there is no sensible way to continue receiving configuration - // updates, Envoy will then terminate and apply production config from a - // clean slate. - // * --dry-run-canary. When set, a canary response will never be applied, only - // validated via a dry run. - Canary bool `protobuf:"varint,3,opt,name=canary,proto3" json:"canary,omitempty"` - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the 'resources' repeated Any (if non-empty). - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // For gRPC based subscriptions, the nonce provides a way to explicitly ack a - // specific DiscoveryResponse in a following DiscoveryRequest. Additional - // messages may have been sent by Envoy to the management server for the - // previous version on the stream prior to this DiscoveryResponse, that were - // unprocessed at response send time. The nonce allows the management server - // to ignore any further DiscoveryRequests for the previous version until a - // DiscoveryRequest bearing the nonce. The nonce is optional and is not - // required for non-stream based xDS implementations. - Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` - // [#not-implemented-hide:] - // The control plane instance that sent the response. - ControlPlane *v4alpha.ControlPlane `protobuf:"bytes,6,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` -} - -func (x *DiscoveryResponse) Reset() { - *x = DiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DiscoveryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DiscoveryResponse) ProtoMessage() {} - -func (x *DiscoveryResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DiscoveryResponse.ProtoReflect.Descriptor instead. -func (*DiscoveryResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v4alpha_discovery_proto_rawDescGZIP(), []int{1} -} - -func (x *DiscoveryResponse) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *DiscoveryResponse) GetResources() []*any.Any { - if x != nil { - return x.Resources - } - return nil -} - -func (x *DiscoveryResponse) GetCanary() bool { - if x != nil { - return x.Canary - } - return false -} - -func (x *DiscoveryResponse) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DiscoveryResponse) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -func (x *DiscoveryResponse) GetControlPlane() *v4alpha.ControlPlane { - if x != nil { - return x.ControlPlane - } - return nil -} - -// DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC -// endpoint for Delta xDS. -// -// With Delta xDS, the DeltaDiscoveryResponses do not need to include a full -// snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a -// diff to the state of a xDS client. -// In Delta XDS there are per-resource versions, which allow tracking state at -// the resource granularity. -// An xDS Delta session is always in the context of a gRPC bidirectional -// stream. This allows the xDS server to keep track of the state of xDS clients -// connected to it. -// -// In Delta xDS the nonce field is required and used to pair -// DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK. -// Optionally, a response message level system_version_info is present for -// debugging purposes only. -// -// DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest -// can be either or both of: [1] informing the server of what resources the -// client has gained/lost interest in (using resource_names_subscribe and -// resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from -// the server (using response_nonce, with presence of error_detail making it a NACK). -// Additionally, the first message (for a given type_url) of a reconnected gRPC stream -// has a third role: informing the server of the resources (and their versions) -// that the client already possesses, using the initial_resource_versions field. -// -// As with state-of-the-world, when multiple resource types are multiplexed (ADS), -// all requests/acknowledgments/updates are logically walled off by type_url: -// a Cluster ACK exists in a completely separate world from a prior Route NACK. -// In particular, initial_resource_versions being sent at the "start" of every -// gRPC stream actually entails a message for each type_url, each with its own -// initial_resource_versions. -// [#next-free-field: 8] -type DeltaDiscoveryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node making the request. - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This does not need to be set if - // resources are only referenced via *xds_resource_subscribe* and - // *xds_resources_unsubscribe*. - TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // DeltaDiscoveryRequests allow the client to add or remove individual - // resources to the set of tracked resources in the context of a stream. - // All resource names in the resource_names_subscribe list are added to the - // set of tracked resources and all resource names in the resource_names_unsubscribe - // list are removed from the set of tracked resources. - // - // *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or - // resource_names_unsubscribe list simply means that no resources are to be - // added or removed to the resource list. - // *Like* state-of-the-world xDS, the server must send updates for all tracked - // resources, but can also send updates for resources the client has not subscribed to. - // - // NOTE: the server must respond with all resources listed in resource_names_subscribe, - // even if it believes the client has the most recent version of them. The reason: - // the client may have dropped them, but then regained interest before it had a chance - // to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. - // - // These two fields can be set in any DeltaDiscoveryRequest, including ACKs - // and initial_resource_versions. - // - // A list of Resource names to add to the list of tracked resources. - ResourceNamesSubscribe []string `protobuf:"bytes,3,rep,name=resource_names_subscribe,json=resourceNamesSubscribe,proto3" json:"resource_names_subscribe,omitempty"` - // A list of Resource names to remove from the list of tracked resources. - ResourceNamesUnsubscribe []string `protobuf:"bytes,4,rep,name=resource_names_unsubscribe,json=resourceNamesUnsubscribe,proto3" json:"resource_names_unsubscribe,omitempty"` - // Informs the server of the versions of the resources the xDS client knows of, to enable the - // client to continue the same logical xDS session even in the face of gRPC stream reconnection. - // It will not be populated: [1] in the very first stream of a session, since the client will - // not yet have any resources, [2] in any message after the first in a stream (for a given - // type_url), since the server will already be correctly tracking the client's state. - // (In ADS, the first message *of each type_url* of a reconnected stream populates this map.) - // The map's keys are names of xDS resources known to the xDS client. - // The map's values are opaque resource versions. - InitialResourceVersions map[string]string `protobuf:"bytes,5,rep,name=initial_resource_versions,json=initialResourceVersions,proto3" json:"initial_resource_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // When the DeltaDiscoveryRequest is a ACK or NACK message in response - // to a previous DeltaDiscoveryResponse, the response_nonce must be the - // nonce in the DeltaDiscoveryResponse. - // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. - ResponseNonce string `protobuf:"bytes,6,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The *message* field in *error_details* - // provides the Envoy internal exception related to the failure. - ErrorDetail *status.Status `protobuf:"bytes,7,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` -} - -func (x *DeltaDiscoveryRequest) Reset() { - *x = DeltaDiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeltaDiscoveryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeltaDiscoveryRequest) ProtoMessage() {} - -func (x *DeltaDiscoveryRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeltaDiscoveryRequest.ProtoReflect.Descriptor instead. -func (*DeltaDiscoveryRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v4alpha_discovery_proto_rawDescGZIP(), []int{2} -} - -func (x *DeltaDiscoveryRequest) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DeltaDiscoveryRequest) GetResourceNamesSubscribe() []string { - if x != nil { - return x.ResourceNamesSubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResourceNamesUnsubscribe() []string { - if x != nil { - return x.ResourceNamesUnsubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetInitialResourceVersions() map[string]string { - if x != nil { - return x.InitialResourceVersions - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResponseNonce() string { - if x != nil { - return x.ResponseNonce - } - return "" -} - -func (x *DeltaDiscoveryRequest) GetErrorDetail() *status.Status { - if x != nil { - return x.ErrorDetail - } - return nil -} - -// [#next-free-field: 7] -type DeltaDiscoveryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version of the response data (used for debugging). - SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` - // The response resources. These are typed resources, whose types must match - // the type_url field. - Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty. - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // Resources names of resources that have be deleted and to be removed from the xDS Client. - // Removed resources for missing resources can be ignored. - RemovedResources []string `protobuf:"bytes,6,rep,name=removed_resources,json=removedResources,proto3" json:"removed_resources,omitempty"` - // The nonce provides a way for DeltaDiscoveryRequests to uniquely - // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. - Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (x *DeltaDiscoveryResponse) Reset() { - *x = DeltaDiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeltaDiscoveryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeltaDiscoveryResponse) ProtoMessage() {} - -func (x *DeltaDiscoveryResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeltaDiscoveryResponse.ProtoReflect.Descriptor instead. -func (*DeltaDiscoveryResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v4alpha_discovery_proto_rawDescGZIP(), []int{3} -} - -func (x *DeltaDiscoveryResponse) GetSystemVersionInfo() string { - if x != nil { - return x.SystemVersionInfo - } - return "" -} - -func (x *DeltaDiscoveryResponse) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - -func (x *DeltaDiscoveryResponse) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DeltaDiscoveryResponse) GetRemovedResources() []string { - if x != nil { - return x.RemovedResources - } - return nil -} - -func (x *DeltaDiscoveryResponse) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -// [#next-free-field: 8] -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource's name, to distinguish it from others of the same type of resource. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // The aliases are a list of other names that this resource can go by. - Aliases []string `protobuf:"bytes,4,rep,name=aliases,proto3" json:"aliases,omitempty"` - // The resource level version. It allows xDS to track the state of individual - // resources. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // The resource being tracked. - Resource *any.Any `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - // Time-to-live value for the resource. For each resource, a timer is started. The timer is - // reset each time the resource is received with a new TTL. If the resource is received with - // no TTL set, the timer is removed for the resource. Upon expiration of the timer, the - // configuration for the resource will be removed. - // - // The TTL can be refreshed or changed by sending a response that doesn't change the resource - // version. In this case the resource field does not need to be populated, which allows for - // light-weight "heartbeat" updates to keep a resource with a TTL alive. - // - // The TTL feature is meant to support configurations that should be removed in the event of - // a management server failure. For example, the feature may be used for fault injection - // testing where the fault injection should be terminated in the event that Envoy loses contact - // with the management server. - Ttl *duration.Duration `protobuf:"bytes,6,opt,name=ttl,proto3" json:"ttl,omitempty"` - // Cache control properties for the resource. - // [#not-implemented-hide:] - CacheControl *Resource_CacheControl `protobuf:"bytes,7,opt,name=cache_control,json=cacheControl,proto3" json:"cache_control,omitempty"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v4alpha_discovery_proto_rawDescGZIP(), []int{4} -} - -func (x *Resource) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Resource) GetAliases() []string { - if x != nil { - return x.Aliases - } - return nil -} - -func (x *Resource) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Resource) GetResource() *any.Any { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Resource) GetTtl() *duration.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *Resource) GetCacheControl() *Resource_CacheControl { - if x != nil { - return x.CacheControl - } - return nil -} - -// Cache control properties for the resource. -// [#not-implemented-hide:] -type Resource_CacheControl struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If true, xDS proxies may not cache this resource. - // Note that this does not apply to clients other than xDS proxies, which must cache resources - // for their own use, regardless of the value of this field. - DoNotCache bool `protobuf:"varint,1,opt,name=do_not_cache,json=doNotCache,proto3" json:"do_not_cache,omitempty"` -} - -func (x *Resource_CacheControl) Reset() { - *x = Resource_CacheControl{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource_CacheControl) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource_CacheControl) ProtoMessage() {} - -func (x *Resource_CacheControl) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Resource_CacheControl.ProtoReflect.Descriptor instead. -func (*Resource_CacheControl) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v4alpha_discovery_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *Resource_CacheControl) GetDoNotCache() bool { - if x != nil { - return x.DoNotCache - } - return false -} - -var File_envoy_service_discovery_v4alpha_discovery_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v4alpha_discovery_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, - 0x02, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a, - 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, - 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x3a, 0x32, 0x9a, 0xc5, 0x88, - 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0xb6, 0x02, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x61, - 0x6e, 0x61, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, - 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, - 0x61, 0x6e, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd4, 0x04, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, - 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, - 0x72, 0x6c, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x3c, 0x0a, 0x1a, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x75, - 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x55, - 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x19, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x53, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x1a, 0x4a, 0x0a, 0x1c, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0xa9, 0x02, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x47, 0x0a, 0x09, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2b, - 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x03, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, - 0x5b, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x0c, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x1a, 0x69, 0x0a, 0x0c, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0c, - 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x3a, 0x37, - 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x49, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_discovery_v4alpha_discovery_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v4alpha_discovery_proto_rawDescData = file_envoy_service_discovery_v4alpha_discovery_proto_rawDesc -) - -func file_envoy_service_discovery_v4alpha_discovery_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v4alpha_discovery_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v4alpha_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v4alpha_discovery_proto_rawDescData) - }) - return file_envoy_service_discovery_v4alpha_discovery_proto_rawDescData -} - -var file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_service_discovery_v4alpha_discovery_proto_goTypes = []interface{}{ - (*DiscoveryRequest)(nil), // 0: envoy.service.discovery.v4alpha.DiscoveryRequest - (*DiscoveryResponse)(nil), // 1: envoy.service.discovery.v4alpha.DiscoveryResponse - (*DeltaDiscoveryRequest)(nil), // 2: envoy.service.discovery.v4alpha.DeltaDiscoveryRequest - (*DeltaDiscoveryResponse)(nil), // 3: envoy.service.discovery.v4alpha.DeltaDiscoveryResponse - (*Resource)(nil), // 4: envoy.service.discovery.v4alpha.Resource - nil, // 5: envoy.service.discovery.v4alpha.DeltaDiscoveryRequest.InitialResourceVersionsEntry - (*Resource_CacheControl)(nil), // 6: envoy.service.discovery.v4alpha.Resource.CacheControl - (*v4alpha.Node)(nil), // 7: envoy.config.core.v4alpha.Node - (*status.Status)(nil), // 8: google.rpc.Status - (*any.Any)(nil), // 9: google.protobuf.Any - (*v4alpha.ControlPlane)(nil), // 10: envoy.config.core.v4alpha.ControlPlane - (*duration.Duration)(nil), // 11: google.protobuf.Duration -} -var file_envoy_service_discovery_v4alpha_discovery_proto_depIdxs = []int32{ - 7, // 0: envoy.service.discovery.v4alpha.DiscoveryRequest.node:type_name -> envoy.config.core.v4alpha.Node - 8, // 1: envoy.service.discovery.v4alpha.DiscoveryRequest.error_detail:type_name -> google.rpc.Status - 9, // 2: envoy.service.discovery.v4alpha.DiscoveryResponse.resources:type_name -> google.protobuf.Any - 10, // 3: envoy.service.discovery.v4alpha.DiscoveryResponse.control_plane:type_name -> envoy.config.core.v4alpha.ControlPlane - 7, // 4: envoy.service.discovery.v4alpha.DeltaDiscoveryRequest.node:type_name -> envoy.config.core.v4alpha.Node - 5, // 5: envoy.service.discovery.v4alpha.DeltaDiscoveryRequest.initial_resource_versions:type_name -> envoy.service.discovery.v4alpha.DeltaDiscoveryRequest.InitialResourceVersionsEntry - 8, // 6: envoy.service.discovery.v4alpha.DeltaDiscoveryRequest.error_detail:type_name -> google.rpc.Status - 4, // 7: envoy.service.discovery.v4alpha.DeltaDiscoveryResponse.resources:type_name -> envoy.service.discovery.v4alpha.Resource - 9, // 8: envoy.service.discovery.v4alpha.Resource.resource:type_name -> google.protobuf.Any - 11, // 9: envoy.service.discovery.v4alpha.Resource.ttl:type_name -> google.protobuf.Duration - 6, // 10: envoy.service.discovery.v4alpha.Resource.cache_control:type_name -> envoy.service.discovery.v4alpha.Resource.CacheControl - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v4alpha_discovery_proto_init() } -func file_envoy_service_discovery_v4alpha_discovery_proto_init() { - if File_envoy_service_discovery_v4alpha_discovery_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeltaDiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeltaDiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource_CacheControl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v4alpha_discovery_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_service_discovery_v4alpha_discovery_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v4alpha_discovery_proto_depIdxs, - MessageInfos: file_envoy_service_discovery_v4alpha_discovery_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v4alpha_discovery_proto = out.File - file_envoy_service_discovery_v4alpha_discovery_proto_rawDesc = nil - file_envoy_service_discovery_v4alpha_discovery_proto_goTypes = nil - file_envoy_service_discovery_v4alpha_discovery_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/service/discovery/v4alpha/discovery.pb.validate.go b/pkg/api/envoy/service/discovery/v4alpha/discovery.pb.validate.go deleted file mode 100644 index cda91af001..0000000000 --- a/pkg/api/envoy/service/discovery/v4alpha/discovery.pb.validate.go +++ /dev/null @@ -1,573 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v4alpha/discovery.proto - -package envoy_service_discovery_v4alpha - -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{} -) - -// 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. -func (m *DiscoveryRequest) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - 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, - } - } - } - - // no validation rules for TypeUrl - - // no validation rules for ResponseNonce - - 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, - } - } - } - - return nil -} - -// DiscoveryRequestValidationError is the validation error returned by -// DiscoveryRequest.Validate if the designated constraints aren't met. -type DiscoveryRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DiscoveryRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DiscoveryRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DiscoveryRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DiscoveryRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DiscoveryRequestValidationError) ErrorName() string { return "DiscoveryRequestValidationError" } - -// Error satisfies the builtin error interface -func (e DiscoveryRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDiscoveryRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DiscoveryRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DiscoveryRequestValidationError{} - -// Validate checks the field values on DiscoveryResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *DiscoveryResponse) Validate() error { - if m == nil { - return nil - } - - // no validation rules for VersionInfo - - for idx, item := range m.GetResources() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for Canary - - // no validation rules for TypeUrl - - // no validation rules for Nonce - - if 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, - } - } - } - - return nil -} - -// DiscoveryResponseValidationError is the validation error returned by -// DiscoveryResponse.Validate if the designated constraints aren't met. -type DiscoveryResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DiscoveryResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DiscoveryResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DiscoveryResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DiscoveryResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DiscoveryResponseValidationError) ErrorName() string { - return "DiscoveryResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DiscoveryResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDiscoveryResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DiscoveryResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DiscoveryResponseValidationError{} - -// Validate checks the field values on DeltaDiscoveryRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DeltaDiscoveryRequest) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TypeUrl - - // no validation rules for InitialResourceVersions - - // no validation rules for ResponseNonce - - 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, - } - } - } - - return nil -} - -// DeltaDiscoveryRequestValidationError is the validation error returned by -// DeltaDiscoveryRequest.Validate if the designated constraints aren't met. -type DeltaDiscoveryRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeltaDiscoveryRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeltaDiscoveryRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeltaDiscoveryRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeltaDiscoveryRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeltaDiscoveryRequestValidationError) ErrorName() string { - return "DeltaDiscoveryRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DeltaDiscoveryRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeltaDiscoveryRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeltaDiscoveryRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeltaDiscoveryRequestValidationError{} - -// Validate checks the field values on DeltaDiscoveryResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DeltaDiscoveryResponse) Validate() error { - if m == nil { - return nil - } - - // no validation rules for SystemVersionInfo - - for idx, item := range m.GetResources() { - _, _ = idx, item - - 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 -} - -// DeltaDiscoveryResponseValidationError is the validation error returned by -// DeltaDiscoveryResponse.Validate if the designated constraints aren't met. -type DeltaDiscoveryResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeltaDiscoveryResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeltaDiscoveryResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeltaDiscoveryResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeltaDiscoveryResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeltaDiscoveryResponseValidationError) ErrorName() string { - return "DeltaDiscoveryResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeltaDiscoveryResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeltaDiscoveryResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeltaDiscoveryResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeltaDiscoveryResponseValidationError{} - -// Validate checks the field values on Resource with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Resource) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Name - - // no validation rules for Version - - if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetCacheControl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "CacheControl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ResourceValidationError is the validation error returned by -// Resource.Validate if the designated constraints aren't met. -type ResourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceValidationError{} - -// Validate checks the field values on Resource_CacheControl with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Resource_CacheControl) Validate() error { - if m == nil { - return nil - } - - // no validation rules for DoNotCache - - return nil -} - -// Resource_CacheControlValidationError is the validation error returned by -// Resource_CacheControl.Validate if the designated constraints aren't met. -type Resource_CacheControlValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Resource_CacheControlValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Resource_CacheControlValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Resource_CacheControlValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Resource_CacheControlValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Resource_CacheControlValidationError) ErrorName() string { - return "Resource_CacheControlValidationError" -} - -// Error satisfies the builtin error interface -func (e Resource_CacheControlValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResource_CacheControl.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Resource_CacheControlValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Resource_CacheControlValidationError{} diff --git a/pkg/api/envoy/service/endpoint/v3/eds.pb.go b/pkg/api/envoy/service/endpoint/v3/eds.pb.go index f1ff37bed5..a3e1028c9c 100644 --- a/pkg/api/envoy/service/endpoint/v3/eds.pb.go +++ b/pkg/api/envoy/service/endpoint/v3/eds.pb.go @@ -1,20 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/endpoint/v3/eds.proto -package envoy_service_endpoint_v3 +package endpointv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - 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" codes "google.golang.org/grpc/codes" @@ -32,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type EdsDummy struct { @@ -87,56 +79,56 @@ var file_envoy_service_endpoint_v3_eds_proto_rawDesc = []byte{ 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x08, 0x45, 0x64, 0x73, 0x44, 0x75, - 0x6d, 0x6d, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, - 0x79, 0x32, 0xe1, 0x03, 0x0a, 0x18, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, - 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x28, 0x01, 0x30, 0x01, 0x12, 0x7d, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, + 0x0a, 0x08, 0x45, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, + 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x45, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xe1, 0x03, 0x0a, 0x18, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x17, 0x2f, 0x76, 0x33, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x36, 0x8a, - 0xa4, 0x96, 0xf3, 0x07, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x40, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, - 0x42, 0x08, 0x45, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7d, 0x0a, 0x0e, 0x44, + 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x22, 0x17, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x3a, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x36, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x30, 0x0a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, + 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x8d, 0x01, 0x0a, + 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x45, 0x64, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x76, + 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/endpoint/v3/eds.pb.validate.go b/pkg/api/envoy/service/endpoint/v3/eds.pb.validate.go index 3e1a0d1f41..b8c222a4d9 100644 --- a/pkg/api/envoy/service/endpoint/v3/eds.pb.validate.go +++ b/pkg/api/envoy/service/endpoint/v3/eds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/endpoint/v3/eds.proto -package envoy_service_endpoint_v3 +package endpointv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *EdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EdsDummyMultiError, or nil +// if none found. +func (m *EdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *EdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return EdsDummyMultiError(errors) + } + return nil } +// EdsDummyMultiError is an error wrapping multiple validation errors returned +// by EdsDummy.ValidateAll() if the designated constraints aren't met. +type EdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EdsDummyMultiError) AllErrors() []error { return m } + // EdsDummyValidationError is the validation error returned by // EdsDummy.Validate if the designated constraints aren't met. type EdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/endpoint/v3/leds.pb.go b/pkg/api/envoy/service/endpoint/v3/leds.pb.go new file mode 100644 index 0000000000..e9351b6e35 --- /dev/null +++ b/pkg/api/envoy/service/endpoint/v3/leds.pb.go @@ -0,0 +1,291 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/service/endpoint/v3/leds.proto + +package endpointv3 + +import ( + context "context" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. +type LedsDummy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LedsDummy) Reset() { + *x = LedsDummy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_endpoint_v3_leds_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LedsDummy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedsDummy) ProtoMessage() {} + +func (x *LedsDummy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_endpoint_v3_leds_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedsDummy.ProtoReflect.Descriptor instead. +func (*LedsDummy) Descriptor() ([]byte, []int) { + return file_envoy_service_endpoint_v3_leds_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_service_endpoint_v3_leds_proto protoreflect.FileDescriptor + +var file_envoy_service_endpoint_v3_leds_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x65, 0x64, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, + 0x33, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, + 0x0a, 0x09, 0x4c, 0x65, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xd7, 0x01, 0x0a, 0x20, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x85, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, + 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x1a, 0x2b, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x25, + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x62, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x8e, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, + 0x33, 0x42, 0x09, 0x4c, 0x65, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, + 0x3b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_endpoint_v3_leds_proto_rawDescOnce sync.Once + file_envoy_service_endpoint_v3_leds_proto_rawDescData = file_envoy_service_endpoint_v3_leds_proto_rawDesc +) + +func file_envoy_service_endpoint_v3_leds_proto_rawDescGZIP() []byte { + file_envoy_service_endpoint_v3_leds_proto_rawDescOnce.Do(func() { + file_envoy_service_endpoint_v3_leds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_endpoint_v3_leds_proto_rawDescData) + }) + return file_envoy_service_endpoint_v3_leds_proto_rawDescData +} + +var file_envoy_service_endpoint_v3_leds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_service_endpoint_v3_leds_proto_goTypes = []interface{}{ + (*LedsDummy)(nil), // 0: envoy.service.endpoint.v3.LedsDummy + (*v3.DeltaDiscoveryRequest)(nil), // 1: envoy.service.discovery.v3.DeltaDiscoveryRequest + (*v3.DeltaDiscoveryResponse)(nil), // 2: envoy.service.discovery.v3.DeltaDiscoveryResponse +} +var file_envoy_service_endpoint_v3_leds_proto_depIdxs = []int32{ + 1, // 0: envoy.service.endpoint.v3.LocalityEndpointDiscoveryService.DeltaLocalityEndpoints:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest + 2, // 1: envoy.service.endpoint.v3.LocalityEndpointDiscoveryService.DeltaLocalityEndpoints:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_service_endpoint_v3_leds_proto_init() } +func file_envoy_service_endpoint_v3_leds_proto_init() { + if File_envoy_service_endpoint_v3_leds_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_endpoint_v3_leds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LedsDummy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_endpoint_v3_leds_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_endpoint_v3_leds_proto_goTypes, + DependencyIndexes: file_envoy_service_endpoint_v3_leds_proto_depIdxs, + MessageInfos: file_envoy_service_endpoint_v3_leds_proto_msgTypes, + }.Build() + File_envoy_service_endpoint_v3_leds_proto = out.File + file_envoy_service_endpoint_v3_leds_proto_rawDesc = nil + file_envoy_service_endpoint_v3_leds_proto_goTypes = nil + file_envoy_service_endpoint_v3_leds_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// LocalityEndpointDiscoveryServiceClient is the client API for LocalityEndpointDiscoveryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type LocalityEndpointDiscoveryServiceClient interface { + // The resource_names_subscribe resource_names_unsubscribe fields in DeltaDiscoveryRequest + // specify a list of glob collections to subscribe to updates for. + DeltaLocalityEndpoints(ctx context.Context, opts ...grpc.CallOption) (LocalityEndpointDiscoveryService_DeltaLocalityEndpointsClient, error) +} + +type localityEndpointDiscoveryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewLocalityEndpointDiscoveryServiceClient(cc grpc.ClientConnInterface) LocalityEndpointDiscoveryServiceClient { + return &localityEndpointDiscoveryServiceClient{cc} +} + +func (c *localityEndpointDiscoveryServiceClient) DeltaLocalityEndpoints(ctx context.Context, opts ...grpc.CallOption) (LocalityEndpointDiscoveryService_DeltaLocalityEndpointsClient, error) { + stream, err := c.cc.NewStream(ctx, &_LocalityEndpointDiscoveryService_serviceDesc.Streams[0], "/envoy.service.endpoint.v3.LocalityEndpointDiscoveryService/DeltaLocalityEndpoints", opts...) + if err != nil { + return nil, err + } + x := &localityEndpointDiscoveryServiceDeltaLocalityEndpointsClient{stream} + return x, nil +} + +type LocalityEndpointDiscoveryService_DeltaLocalityEndpointsClient interface { + Send(*v3.DeltaDiscoveryRequest) error + Recv() (*v3.DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type localityEndpointDiscoveryServiceDeltaLocalityEndpointsClient struct { + grpc.ClientStream +} + +func (x *localityEndpointDiscoveryServiceDeltaLocalityEndpointsClient) Send(m *v3.DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *localityEndpointDiscoveryServiceDeltaLocalityEndpointsClient) Recv() (*v3.DeltaDiscoveryResponse, error) { + m := new(v3.DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// LocalityEndpointDiscoveryServiceServer is the server API for LocalityEndpointDiscoveryService service. +type LocalityEndpointDiscoveryServiceServer interface { + // The resource_names_subscribe resource_names_unsubscribe fields in DeltaDiscoveryRequest + // specify a list of glob collections to subscribe to updates for. + DeltaLocalityEndpoints(LocalityEndpointDiscoveryService_DeltaLocalityEndpointsServer) error +} + +// UnimplementedLocalityEndpointDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedLocalityEndpointDiscoveryServiceServer struct { +} + +func (*UnimplementedLocalityEndpointDiscoveryServiceServer) DeltaLocalityEndpoints(LocalityEndpointDiscoveryService_DeltaLocalityEndpointsServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaLocalityEndpoints not implemented") +} + +func RegisterLocalityEndpointDiscoveryServiceServer(s *grpc.Server, srv LocalityEndpointDiscoveryServiceServer) { + s.RegisterService(&_LocalityEndpointDiscoveryService_serviceDesc, srv) +} + +func _LocalityEndpointDiscoveryService_DeltaLocalityEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(LocalityEndpointDiscoveryServiceServer).DeltaLocalityEndpoints(&localityEndpointDiscoveryServiceDeltaLocalityEndpointsServer{stream}) +} + +type LocalityEndpointDiscoveryService_DeltaLocalityEndpointsServer interface { + Send(*v3.DeltaDiscoveryResponse) error + Recv() (*v3.DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type localityEndpointDiscoveryServiceDeltaLocalityEndpointsServer struct { + grpc.ServerStream +} + +func (x *localityEndpointDiscoveryServiceDeltaLocalityEndpointsServer) Send(m *v3.DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *localityEndpointDiscoveryServiceDeltaLocalityEndpointsServer) Recv() (*v3.DeltaDiscoveryRequest, error) { + m := new(v3.DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _LocalityEndpointDiscoveryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.endpoint.v3.LocalityEndpointDiscoveryService", + HandlerType: (*LocalityEndpointDiscoveryServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "DeltaLocalityEndpoints", + Handler: _LocalityEndpointDiscoveryService_DeltaLocalityEndpoints_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/endpoint/v3/leds.proto", +} diff --git a/pkg/api/envoy/service/endpoint/v3/leds.pb.validate.go b/pkg/api/envoy/service/endpoint/v3/leds.pb.validate.go new file mode 100644 index 0000000000..2a4b445da6 --- /dev/null +++ b/pkg/api/envoy/service/endpoint/v3/leds.pb.validate.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/endpoint/v3/leds.proto + +package endpointv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on LedsDummy with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *LedsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LedsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LedsDummyMultiError, or nil +// if none found. +func (m *LedsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *LedsDummy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return LedsDummyMultiError(errors) + } + + return nil +} + +// LedsDummyMultiError is an error wrapping multiple validation errors returned +// by LedsDummy.ValidateAll() if the designated constraints aren't met. +type LedsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LedsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LedsDummyMultiError) AllErrors() []error { return m } + +// LedsDummyValidationError is the validation error returned by +// LedsDummy.Validate if the designated constraints aren't met. +type LedsDummyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LedsDummyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LedsDummyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LedsDummyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LedsDummyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LedsDummyValidationError) ErrorName() string { return "LedsDummyValidationError" } + +// Error satisfies the builtin error interface +func (e LedsDummyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLedsDummy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LedsDummyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LedsDummyValidationError{} diff --git a/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.go b/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.go index 52c6060165..6a797076d7 100644 --- a/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.go +++ b/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/event_reporting/v2alpha/event_reporting_service.proto -package envoy_service_event_reporting_v2alpha +package v2alpha import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] // An events envoy sends to the management server. type StreamEventsRequest struct { @@ -237,16 +232,21 @@ var file_envoy_service_event_reporting_v2alpha_event_reporting_service_proto_raw 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x86, 0x01, 0x0a, 0x33, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0xd4, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x1a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x22, 0x12, 0x20, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x88, + 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x22, 0x12, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.validate.go b/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.validate.go index 63663ff633..a1e7dae1e3 100644 --- a/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.validate.go +++ b/pkg/api/envoy/service/event_reporting/v2alpha/event_reporting_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/event_reporting/v2alpha/event_reporting_service.proto -package envoy_service_event_reporting_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamEventsRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamEventsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamEventsRequestMultiError, or nil if none found. +func (m *StreamEventsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamEventsRequestValidationError{ field: "Identifier", @@ -52,16 +87,39 @@ func (m *StreamEventsRequest) Validate() error { } if len(m.GetEvents()) < 1 { - return StreamEventsRequestValidationError{ + err := StreamEventsRequestValidationError{ field: "Events", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetEvents() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamEventsRequestValidationError{ field: fmt.Sprintf("Events[%v]", idx), @@ -73,9 +131,30 @@ func (m *StreamEventsRequest) Validate() error { } + if len(errors) > 0 { + return StreamEventsRequestMultiError(errors) + } + return nil } +// StreamEventsRequestMultiError is an error wrapping multiple validation +// errors returned by StreamEventsRequest.ValidateAll() if the designated +// constraints aren't met. +type StreamEventsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsRequestMultiError) AllErrors() []error { return m } + // StreamEventsRequestValidationError is the validation error returned by // StreamEventsRequest.Validate if the designated constraints aren't met. type StreamEventsRequestValidationError struct { @@ -134,15 +213,50 @@ var _ interface { // Validate checks the field values on StreamEventsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamEventsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamEventsResponseMultiError, or nil if none found. +func (m *StreamEventsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamEventsResponseMultiError(errors) + } + return nil } +// StreamEventsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamEventsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamEventsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsResponseMultiError) AllErrors() []error { return m } + // StreamEventsResponseValidationError is the validation error returned by // StreamEventsResponse.Validate if the designated constraints aren't met. type StreamEventsResponseValidationError struct { @@ -201,20 +315,57 @@ var _ interface { // Validate checks the field values on StreamEventsRequest_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamEventsRequest_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsRequest_Identifier with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// StreamEventsRequest_IdentifierMultiError, or nil if none found. +func (m *StreamEventsRequest_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsRequest_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamEventsRequest_IdentifierValidationError{ + err := StreamEventsRequest_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamEventsRequest_IdentifierValidationError{ field: "Node", @@ -224,9 +375,30 @@ func (m *StreamEventsRequest_Identifier) Validate() error { } } + if len(errors) > 0 { + return StreamEventsRequest_IdentifierMultiError(errors) + } + return nil } +// StreamEventsRequest_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamEventsRequest_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamEventsRequest_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsRequest_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsRequest_IdentifierMultiError) AllErrors() []error { return m } + // StreamEventsRequest_IdentifierValidationError is the validation error // returned by StreamEventsRequest_Identifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.go b/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.go index 3b0088c9d2..51863edcf4 100644 --- a/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.go +++ b/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/event_reporting/v3/event_reporting_service.proto -package envoy_service_event_reporting_v3 +package event_reportingv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] // An events envoy sends to the management server. type StreamEventsRequest struct { @@ -49,8 +44,8 @@ type StreamEventsRequest struct { // // The following events are supported: // - // * :ref:`HealthCheckEvent ` - // * :ref:`OutlierDetectionEvent ` + // * :ref:`HealthCheckEvent ` + // * :ref:`OutlierDetectionEvent ` Events []*any.Any `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` } @@ -249,14 +244,19 @@ var file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDesc 0x1a, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x59, - 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, - 0x42, 0x1a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0xb4, + 0x01, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x33, 0x42, 0x1a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.validate.go b/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.validate.go index 1ff3fa66c8..3ee828daad 100644 --- a/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.validate.go +++ b/pkg/api/envoy/service/event_reporting/v3/event_reporting_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/event_reporting/v3/event_reporting_service.proto -package envoy_service_event_reporting_v3 +package event_reportingv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamEventsRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamEventsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamEventsRequestMultiError, or nil if none found. +func (m *StreamEventsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamEventsRequestValidationError{ field: "Identifier", @@ -52,16 +87,39 @@ func (m *StreamEventsRequest) Validate() error { } if len(m.GetEvents()) < 1 { - return StreamEventsRequestValidationError{ + err := StreamEventsRequestValidationError{ field: "Events", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetEvents() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamEventsRequestValidationError{ field: fmt.Sprintf("Events[%v]", idx), @@ -73,9 +131,30 @@ func (m *StreamEventsRequest) Validate() error { } + if len(errors) > 0 { + return StreamEventsRequestMultiError(errors) + } + return nil } +// StreamEventsRequestMultiError is an error wrapping multiple validation +// errors returned by StreamEventsRequest.ValidateAll() if the designated +// constraints aren't met. +type StreamEventsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsRequestMultiError) AllErrors() []error { return m } + // StreamEventsRequestValidationError is the validation error returned by // StreamEventsRequest.Validate if the designated constraints aren't met. type StreamEventsRequestValidationError struct { @@ -134,15 +213,50 @@ var _ interface { // Validate checks the field values on StreamEventsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamEventsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamEventsResponseMultiError, or nil if none found. +func (m *StreamEventsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamEventsResponseMultiError(errors) + } + return nil } +// StreamEventsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamEventsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamEventsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsResponseMultiError) AllErrors() []error { return m } + // StreamEventsResponseValidationError is the validation error returned by // StreamEventsResponse.Validate if the designated constraints aren't met. type StreamEventsResponseValidationError struct { @@ -201,20 +315,57 @@ var _ interface { // Validate checks the field values on StreamEventsRequest_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamEventsRequest_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsRequest_Identifier with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// StreamEventsRequest_IdentifierMultiError, or nil if none found. +func (m *StreamEventsRequest_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsRequest_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamEventsRequest_IdentifierValidationError{ + err := StreamEventsRequest_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamEventsRequest_IdentifierValidationError{ field: "Node", @@ -224,9 +375,30 @@ func (m *StreamEventsRequest_Identifier) Validate() error { } } + if len(errors) > 0 { + return StreamEventsRequest_IdentifierMultiError(errors) + } + return nil } +// StreamEventsRequest_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamEventsRequest_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamEventsRequest_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsRequest_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsRequest_IdentifierMultiError) AllErrors() []error { return m } + // StreamEventsRequest_IdentifierValidationError is the validation error // returned by StreamEventsRequest_Identifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/event_reporting/v4alpha/event_reporting_service.pb.go b/pkg/api/envoy/service/event_reporting/v4alpha/event_reporting_service.pb.go deleted file mode 100644 index b8be7ad7a5..0000000000 --- a/pkg/api/envoy/service/event_reporting/v4alpha/event_reporting_service.pb.go +++ /dev/null @@ -1,475 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/event_reporting/v4alpha/event_reporting_service.proto - -package envoy_service_event_reporting_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] -// An events envoy sends to the management server. -type StreamEventsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier *StreamEventsRequest_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // Batch of events. When the stream is already active, it will be the events occurred - // since the last message had been sent. If the server receives unknown event type, it should - // silently ignore it. - // - // The following events are supported: - // - // * :ref:`HealthCheckEvent ` - // * :ref:`OutlierDetectionEvent ` - Events []*any.Any `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` -} - -func (x *StreamEventsRequest) Reset() { - *x = StreamEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamEventsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamEventsRequest) ProtoMessage() {} - -func (x *StreamEventsRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamEventsRequest.ProtoReflect.Descriptor instead. -func (*StreamEventsRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescGZIP(), []int{0} -} - -func (x *StreamEventsRequest) GetIdentifier() *StreamEventsRequest_Identifier { - if x != nil { - return x.Identifier - } - return nil -} - -func (x *StreamEventsRequest) GetEvents() []*any.Any { - if x != nil { - return x.Events - } - return nil -} - -// [#not-implemented-hide:] -// The management server may send envoy a StreamEventsResponse to tell which events the server -// is interested in. In future, with aggregated event reporting service, this message will -// contain, for example, clusters the envoy should send events for, or event types the server -// wants to process. -type StreamEventsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StreamEventsResponse) Reset() { - *x = StreamEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamEventsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamEventsResponse) ProtoMessage() {} - -func (x *StreamEventsResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamEventsResponse.ProtoReflect.Descriptor instead. -func (*StreamEventsResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescGZIP(), []int{1} -} - -type StreamEventsRequest_Identifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node sending the event messages over the stream. - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` -} - -func (x *StreamEventsRequest_Identifier) Reset() { - *x = StreamEventsRequest_Identifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamEventsRequest_Identifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamEventsRequest_Identifier) ProtoMessage() {} - -func (x *StreamEventsRequest_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamEventsRequest_Identifier.ProtoReflect.Descriptor instead. -func (*StreamEventsRequest_Identifier) Descriptor() ([]byte, []int) { - return file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *StreamEventsRequest_Identifier) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -var File_envoy_service_event_reporting_v4alpha_event_reporting_service_proto protoreflect.FileDescriptor - -var file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDesc = []byte{ - 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x03, 0x0a, 0x13, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x65, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, - 0x93, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3d, - 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x46, 0x9a, - 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x54, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, - 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa7, 0x01, 0x0a, 0x15, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, - 0x30, 0x01, 0x42, 0x5e, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x1a, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescOnce sync.Once - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescData = file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDesc -) - -func file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescGZIP() []byte { - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescOnce.Do(func() { - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescData) - }) - return file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDescData -} - -var file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_goTypes = []interface{}{ - (*StreamEventsRequest)(nil), // 0: envoy.service.event_reporting.v4alpha.StreamEventsRequest - (*StreamEventsResponse)(nil), // 1: envoy.service.event_reporting.v4alpha.StreamEventsResponse - (*StreamEventsRequest_Identifier)(nil), // 2: envoy.service.event_reporting.v4alpha.StreamEventsRequest.Identifier - (*any.Any)(nil), // 3: google.protobuf.Any - (*v4alpha.Node)(nil), // 4: envoy.config.core.v4alpha.Node -} -var file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_depIdxs = []int32{ - 2, // 0: envoy.service.event_reporting.v4alpha.StreamEventsRequest.identifier:type_name -> envoy.service.event_reporting.v4alpha.StreamEventsRequest.Identifier - 3, // 1: envoy.service.event_reporting.v4alpha.StreamEventsRequest.events:type_name -> google.protobuf.Any - 4, // 2: envoy.service.event_reporting.v4alpha.StreamEventsRequest.Identifier.node:type_name -> envoy.config.core.v4alpha.Node - 0, // 3: envoy.service.event_reporting.v4alpha.EventReportingService.StreamEvents:input_type -> envoy.service.event_reporting.v4alpha.StreamEventsRequest - 1, // 4: envoy.service.event_reporting.v4alpha.EventReportingService.StreamEvents:output_type -> envoy.service.event_reporting.v4alpha.StreamEventsResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_init() } -func file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_init() { - if File_envoy_service_event_reporting_v4alpha_event_reporting_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamEventsRequest_Identifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_goTypes, - DependencyIndexes: file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_depIdxs, - MessageInfos: file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_msgTypes, - }.Build() - File_envoy_service_event_reporting_v4alpha_event_reporting_service_proto = out.File - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_rawDesc = nil - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_goTypes = nil - file_envoy_service_event_reporting_v4alpha_event_reporting_service_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// EventReportingServiceClient is the client API for EventReportingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EventReportingServiceClient interface { - // Envoy will connect and send StreamEventsRequest messages forever. - // The management server may send StreamEventsResponse to configure event stream. See below. - // This API is designed for high throughput with the expectation that it might be lossy. - StreamEvents(ctx context.Context, opts ...grpc.CallOption) (EventReportingService_StreamEventsClient, error) -} - -type eventReportingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEventReportingServiceClient(cc grpc.ClientConnInterface) EventReportingServiceClient { - return &eventReportingServiceClient{cc} -} - -func (c *eventReportingServiceClient) StreamEvents(ctx context.Context, opts ...grpc.CallOption) (EventReportingService_StreamEventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_EventReportingService_serviceDesc.Streams[0], "/envoy.service.event_reporting.v4alpha.EventReportingService/StreamEvents", opts...) - if err != nil { - return nil, err - } - x := &eventReportingServiceStreamEventsClient{stream} - return x, nil -} - -type EventReportingService_StreamEventsClient interface { - Send(*StreamEventsRequest) error - Recv() (*StreamEventsResponse, error) - grpc.ClientStream -} - -type eventReportingServiceStreamEventsClient struct { - grpc.ClientStream -} - -func (x *eventReportingServiceStreamEventsClient) Send(m *StreamEventsRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *eventReportingServiceStreamEventsClient) Recv() (*StreamEventsResponse, error) { - m := new(StreamEventsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// EventReportingServiceServer is the server API for EventReportingService service. -type EventReportingServiceServer interface { - // Envoy will connect and send StreamEventsRequest messages forever. - // The management server may send StreamEventsResponse to configure event stream. See below. - // This API is designed for high throughput with the expectation that it might be lossy. - StreamEvents(EventReportingService_StreamEventsServer) error -} - -// UnimplementedEventReportingServiceServer can be embedded to have forward compatible implementations. -type UnimplementedEventReportingServiceServer struct { -} - -func (*UnimplementedEventReportingServiceServer) StreamEvents(EventReportingService_StreamEventsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamEvents not implemented") -} - -func RegisterEventReportingServiceServer(s *grpc.Server, srv EventReportingServiceServer) { - s.RegisterService(&_EventReportingService_serviceDesc, srv) -} - -func _EventReportingService_StreamEvents_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(EventReportingServiceServer).StreamEvents(&eventReportingServiceStreamEventsServer{stream}) -} - -type EventReportingService_StreamEventsServer interface { - Send(*StreamEventsResponse) error - Recv() (*StreamEventsRequest, error) - grpc.ServerStream -} - -type eventReportingServiceStreamEventsServer struct { - grpc.ServerStream -} - -func (x *eventReportingServiceStreamEventsServer) Send(m *StreamEventsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *eventReportingServiceStreamEventsServer) Recv() (*StreamEventsRequest, error) { - m := new(StreamEventsRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _EventReportingService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.event_reporting.v4alpha.EventReportingService", - HandlerType: (*EventReportingServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamEvents", - Handler: _EventReportingService_StreamEvents_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/event_reporting/v4alpha/event_reporting_service.proto", -} diff --git a/pkg/api/envoy/service/event_reporting/v4alpha/event_reporting_service.pb.validate.go b/pkg/api/envoy/service/event_reporting/v4alpha/event_reporting_service.pb.validate.go deleted file mode 100644 index 9d015944e0..0000000000 --- a/pkg/api/envoy/service/event_reporting/v4alpha/event_reporting_service.pb.validate.go +++ /dev/null @@ -1,285 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/event_reporting/v4alpha/event_reporting_service.proto - -package envoy_service_event_reporting_v4alpha - -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{} -) - -// Validate checks the field values on StreamEventsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamEventsRequest) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamEventsRequestValidationError{ - field: "Identifier", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetEvents()) < 1 { - return StreamEventsRequestValidationError{ - field: "Events", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetEvents() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamEventsRequestValidationError{ - field: fmt.Sprintf("Events[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// StreamEventsRequestValidationError is the validation error returned by -// StreamEventsRequest.Validate if the designated constraints aren't met. -type StreamEventsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamEventsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamEventsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamEventsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamEventsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamEventsRequestValidationError) ErrorName() string { - return "StreamEventsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamEventsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamEventsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamEventsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamEventsRequestValidationError{} - -// Validate checks the field values on StreamEventsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamEventsResponse) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// StreamEventsResponseValidationError is the validation error returned by -// StreamEventsResponse.Validate if the designated constraints aren't met. -type StreamEventsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamEventsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamEventsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamEventsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamEventsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamEventsResponseValidationError) ErrorName() string { - return "StreamEventsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamEventsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamEventsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamEventsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamEventsResponseValidationError{} - -// Validate checks the field values on StreamEventsRequest_Identifier with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamEventsRequest_Identifier) Validate() error { - if m == nil { - return nil - } - - if m.GetNode() == nil { - return StreamEventsRequest_IdentifierValidationError{ - field: "Node", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamEventsRequest_IdentifierValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// StreamEventsRequest_IdentifierValidationError is the validation error -// returned by StreamEventsRequest_Identifier.Validate if the designated -// constraints aren't met. -type StreamEventsRequest_IdentifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamEventsRequest_IdentifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamEventsRequest_IdentifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamEventsRequest_IdentifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamEventsRequest_IdentifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamEventsRequest_IdentifierValidationError) ErrorName() string { - return "StreamEventsRequest_IdentifierValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamEventsRequest_IdentifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamEventsRequest_Identifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamEventsRequest_IdentifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamEventsRequest_IdentifierValidationError{} diff --git a/pkg/api/envoy/service/ext_proc/v3alpha/external_processor.pb.go b/pkg/api/envoy/service/ext_proc/v3/external_processor.pb.go similarity index 54% rename from pkg/api/envoy/service/ext_proc/v3alpha/external_processor.pb.go rename to pkg/api/envoy/service/ext_proc/v3/external_processor.pb.go index 9f38299b7b..af774f7ce7 100644 --- a/pkg/api/envoy/service/ext_proc/v3alpha/external_processor.pb.go +++ b/pkg/api/envoy/service/ext_proc/v3/external_processor.pb.go @@ -1,19 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/ext_proc/v3alpha/external_processor.proto +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/service/ext_proc/v3/external_processor.proto -package envoy_service_ext_proc_v3alpha +package ext_procv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - v3alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/ext_proc/v3alpha" - v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/http/ext_proc/v3" + v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -31,10 +31,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CommonResponse_ResponseStatus int32 const ( @@ -42,14 +38,18 @@ const ( // request or response, and then continue processing the filter // stream as normal. This is the default. CommonResponse_CONTINUE CommonResponse_ResponseStatus = 0 - // Replace the request or response with the contents - // of this message. If header_mutation is set, apply it to the - // headers. If body_mutation is set and contains a body, then add that - // body to the request or response, even if one does not already exist -- - // otherwise, clear the body. Any additional body and trailers - // received from downstream or upstream will be ignored. - // This can be used to add a body to a request or response that does not - // have one already. + // Apply the specified header mutation, replace the body with the body + // specified in the body mutation (if present), and do not send any + // further messages for this request or response even if the processing + // mode is configured to do so. + // + // When used in response to a request_headers or response_headers message, + // this status makes it possible to either completely replace the body + // while discarding the original body, or to add a body to a message that + // formerly did not have one. + // + // In other words, this response makes it possible to turn an HTTP GET + // into a POST, PUT, or PATCH. CommonResponse_CONTINUE_AND_REPLACE CommonResponse_ResponseStatus = 1 ) @@ -76,11 +76,11 @@ func (x CommonResponse_ResponseStatus) String() string { } func (CommonResponse_ResponseStatus) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_enumTypes[0].Descriptor() + return file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes[0].Descriptor() } func (CommonResponse_ResponseStatus) Type() protoreflect.EnumType { - return &file_envoy_service_ext_proc_v3alpha_external_processor_proto_enumTypes[0] + return &file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes[0] } func (x CommonResponse_ResponseStatus) Number() protoreflect.EnumNumber { @@ -89,7 +89,7 @@ func (x CommonResponse_ResponseStatus) Number() protoreflect.EnumNumber { // Deprecated: Use CommonResponse_ResponseStatus.Descriptor instead. func (CommonResponse_ResponseStatus) EnumDescriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{8, 0} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{8, 0} } // This represents the different types of messages that Envoy can send @@ -101,12 +101,16 @@ type ProcessingRequest struct { unknownFields protoimpl.UnknownFields // Specify whether the filter that sent this request is running in synchronous - // or asynchronous mode. If false, then the server must either respond - // with exactly one ProcessingResponse message or close the stream. - // If true, however, then the server must not respond with - // an additional message, although it may still close the stream. - // The choice of synchronous or asynchronous mode can be chosen in the - // filter configuration. + // or asynchronous mode. The choice of synchronous or asynchronous mode + // can be set in the filter configuration, and defaults to false. + // + // * A value of "false" indicates that the server must respond + // to this message by either sending back a matching ProcessingResponse message, + // or by closing the stream. + // * A value of "true" indicates that the server must not respond to this + // message, although it may still close the stream to indicate that no more messages + // are needed. + // AsyncMode bool `protobuf:"varint,1,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` // Each request message will include one of the following sub-messages. Which // ones are set for a particular HTTP request/response depend on the @@ -125,7 +129,7 @@ type ProcessingRequest struct { func (x *ProcessingRequest) Reset() { *x = ProcessingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[0] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -138,7 +142,7 @@ func (x *ProcessingRequest) String() string { func (*ProcessingRequest) ProtoMessage() {} func (x *ProcessingRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[0] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -151,7 +155,7 @@ func (x *ProcessingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ProcessingRequest.ProtoReflect.Descriptor instead. func (*ProcessingRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{0} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{0} } func (x *ProcessingRequest) GetAsyncMode() bool { @@ -216,39 +220,51 @@ type isProcessingRequest_Request interface { type ProcessingRequest_RequestHeaders struct { // Information about the HTTP request headers, as well as peer info and additional - // properties. If "response_required" is set, the server must send back a + // properties. Unless "async_mode" is true, the server must send back a // HeaderResponse message, an ImmediateResponse message, or close the stream. RequestHeaders *HttpHeaders `protobuf:"bytes,2,opt,name=request_headers,json=requestHeaders,proto3,oneof"` } type ProcessingRequest_ResponseHeaders struct { // Information about the HTTP response headers, as well as peer info and additional - // properties. If "response_required" is set, the server must send back a + // properties. Unless "async_mode" is true, the server must send back a // HeaderResponse message or close the stream. ResponseHeaders *HttpHeaders `protobuf:"bytes,3,opt,name=response_headers,json=responseHeaders,proto3,oneof"` } type ProcessingRequest_RequestBody struct { - // A chunk of the HTTP request body. If "response_required" is set, the server must send back + // A chunk of the HTTP request body. Unless "async_mode" is true, the server must send back // a BodyResponse message, an ImmediateResponse message, or close the stream. RequestBody *HttpBody `protobuf:"bytes,4,opt,name=request_body,json=requestBody,proto3,oneof"` } type ProcessingRequest_ResponseBody struct { - // A chunk of the HTTP request body. If "response_required" is set, the server must send back + // A chunk of the HTTP request body. Unless "async_mode" is true, the server must send back // a BodyResponse message or close the stream. ResponseBody *HttpBody `protobuf:"bytes,5,opt,name=response_body,json=responseBody,proto3,oneof"` } type ProcessingRequest_RequestTrailers struct { - // The HTTP trailers for the request path. If "response_required" is set, the server + // The HTTP trailers for the request path. Unless "async_mode" is true, the server // must send back a TrailerResponse message or close the stream. + // + // This message is only sent if the trailers processing mode is set to "SEND". + // If there are no trailers on the original downstream request, then this message + // will only be sent (with empty trailers waiting to be populated) if the + // processing mode is set before the request headers are sent, such as + // in the filter configuration. RequestTrailers *HttpTrailers `protobuf:"bytes,6,opt,name=request_trailers,json=requestTrailers,proto3,oneof"` } type ProcessingRequest_ResponseTrailers struct { - // The HTTP trailers for the response path. If "response_required" is set, the server + // The HTTP trailers for the response path. Unless "async_mode" is true, the server // must send back a TrailerResponse message or close the stream. + // + // This message is only sent if the trailers processing mode is set to "SEND". + // If there are no trailers on the original downstream request, then this message + // will only be sent (with empty trailers waiting to be populated) if the + // processing mode is set before the request headers are sent, such as + // in the filter configuration. ResponseTrailers *HttpTrailers `protobuf:"bytes,7,opt,name=response_trailers,json=responseTrailers,proto3,oneof"` } @@ -281,6 +297,7 @@ type ProcessingResponse struct { // *ProcessingResponse_ResponseTrailers // *ProcessingResponse_ImmediateResponse Response isProcessingResponse_Response `protobuf_oneof:"response"` + // [#not-implemented-hide:] // Optional metadata that will be emitted as dynamic metadata to be consumed by the next // filter. This metadata will be placed in the namespace "envoy.filters.http.ext_proc". DynamicMetadata *_struct.Struct `protobuf:"bytes,8,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` @@ -288,13 +305,13 @@ type ProcessingResponse struct { // for the duration of this particular request/response only. Servers // may use this to intelligently control how requests are processed // based on the headers and other metadata that they see. - ModeOverride *v3alpha.ProcessingMode `protobuf:"bytes,9,opt,name=mode_override,json=modeOverride,proto3" json:"mode_override,omitempty"` + ModeOverride *v3.ProcessingMode `protobuf:"bytes,9,opt,name=mode_override,json=modeOverride,proto3" json:"mode_override,omitempty"` } func (x *ProcessingResponse) Reset() { *x = ProcessingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[1] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -307,7 +324,7 @@ func (x *ProcessingResponse) String() string { func (*ProcessingResponse) ProtoMessage() {} func (x *ProcessingResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[1] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -320,7 +337,7 @@ func (x *ProcessingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProcessingResponse.ProtoReflect.Descriptor instead. func (*ProcessingResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{1} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{1} } func (m *ProcessingResponse) GetResponse() isProcessingResponse_Response { @@ -386,7 +403,7 @@ func (x *ProcessingResponse) GetDynamicMetadata() *_struct.Struct { return nil } -func (x *ProcessingResponse) GetModeOverride() *v3alpha.ProcessingMode { +func (x *ProcessingResponse) GetModeOverride() *v3.ProcessingMode { if x != nil { return x.ModeOverride } @@ -467,7 +484,8 @@ type HttpHeaders struct { // The HTTP request headers. All header keys will be // lower-cased, because HTTP header keys are case-insensitive. - Headers *v3.HeaderMap `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"` + Headers *v31.HeaderMap `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"` + // [#not-implemented-hide:] // The values of properties selected by the "request_attributes" // or "response_attributes" list in the configuration. Each entry // in the list is populated @@ -482,7 +500,7 @@ type HttpHeaders struct { func (x *HttpHeaders) Reset() { *x = HttpHeaders{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[2] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -495,7 +513,7 @@ func (x *HttpHeaders) String() string { func (*HttpHeaders) ProtoMessage() {} func (x *HttpHeaders) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[2] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -508,10 +526,10 @@ func (x *HttpHeaders) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpHeaders.ProtoReflect.Descriptor instead. func (*HttpHeaders) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{2} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{2} } -func (x *HttpHeaders) GetHeaders() *v3.HeaderMap { +func (x *HttpHeaders) GetHeaders() *v31.HeaderMap { if x != nil { return x.Headers } @@ -545,7 +563,7 @@ type HttpBody struct { func (x *HttpBody) Reset() { *x = HttpBody{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[3] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -558,7 +576,7 @@ func (x *HttpBody) String() string { func (*HttpBody) ProtoMessage() {} func (x *HttpBody) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[3] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -571,7 +589,7 @@ func (x *HttpBody) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpBody.ProtoReflect.Descriptor instead. func (*HttpBody) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{3} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{3} } func (x *HttpBody) GetBody() []byte { @@ -594,13 +612,13 @@ type HttpTrailers struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Trailers *v3.HeaderMap `protobuf:"bytes,1,opt,name=trailers,proto3" json:"trailers,omitempty"` + Trailers *v31.HeaderMap `protobuf:"bytes,1,opt,name=trailers,proto3" json:"trailers,omitempty"` } func (x *HttpTrailers) Reset() { *x = HttpTrailers{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[4] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -613,7 +631,7 @@ func (x *HttpTrailers) String() string { func (*HttpTrailers) ProtoMessage() {} func (x *HttpTrailers) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[4] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -626,10 +644,10 @@ func (x *HttpTrailers) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpTrailers.ProtoReflect.Descriptor instead. func (*HttpTrailers) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{4} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{4} } -func (x *HttpTrailers) GetTrailers() *v3.HeaderMap { +func (x *HttpTrailers) GetTrailers() *v31.HeaderMap { if x != nil { return x.Trailers } @@ -648,7 +666,7 @@ type HeadersResponse struct { func (x *HeadersResponse) Reset() { *x = HeadersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[5] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -661,7 +679,7 @@ func (x *HeadersResponse) String() string { func (*HeadersResponse) ProtoMessage() {} func (x *HeadersResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[5] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -674,7 +692,7 @@ func (x *HeadersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HeadersResponse.ProtoReflect.Descriptor instead. func (*HeadersResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{5} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{5} } func (x *HeadersResponse) GetResponse() *CommonResponse { @@ -697,7 +715,7 @@ type TrailersResponse struct { func (x *TrailersResponse) Reset() { *x = TrailersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[6] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -710,7 +728,7 @@ func (x *TrailersResponse) String() string { func (*TrailersResponse) ProtoMessage() {} func (x *TrailersResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[6] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -723,7 +741,7 @@ func (x *TrailersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TrailersResponse.ProtoReflect.Descriptor instead. func (*TrailersResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{6} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{6} } func (x *TrailersResponse) GetHeaderMutation() *HeaderMutation { @@ -745,7 +763,7 @@ type BodyResponse struct { func (x *BodyResponse) Reset() { *x = BodyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[7] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -758,7 +776,7 @@ func (x *BodyResponse) String() string { func (*BodyResponse) ProtoMessage() {} func (x *BodyResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[7] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -771,7 +789,7 @@ func (x *BodyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BodyResponse.ProtoReflect.Descriptor instead. func (*BodyResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{7} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{7} } func (x *BodyResponse) GetResponse() *CommonResponse { @@ -790,23 +808,21 @@ type CommonResponse struct { // If set, provide additional direction on how the Envoy proxy should // handle the rest of the HTTP filter chain. - Status CommonResponse_ResponseStatus `protobuf:"varint,1,opt,name=status,proto3,enum=envoy.service.ext_proc.v3alpha.CommonResponse_ResponseStatus" json:"status,omitempty"` + Status CommonResponse_ResponseStatus `protobuf:"varint,1,opt,name=status,proto3,enum=envoy.service.ext_proc.v3.CommonResponse_ResponseStatus" json:"status,omitempty"` // Instructions on how to manipulate the headers. When responding to an - // HttpBody request, header mutations will only take effect if the - // headers were not already sent further on the filter chain, which - // happens only if the current processing mode for the body is BUFFERED - // or BUFFERED_PARTIAL. + // HttpBody request, header mutations will only take effect if + // the current processing mode for the body is BUFFERED. HeaderMutation *HeaderMutation `protobuf:"bytes,2,opt,name=header_mutation,json=headerMutation,proto3" json:"header_mutation,omitempty"` // Replace the body of the last message sent to the remote server on this // stream. If responding to an HttpBody request, simply replace or clear - // the body chunk that was sent with that request. If responding to an - // HttpHeaders request, then a new body may be added to the request if this - // message is returned along with the CONTINUE_AND_REPLACE status. + // the body chunk that was sent with that request. Body mutations only take + // effect in response to "body" messages and are ignored otherwise. BodyMutation *BodyMutation `protobuf:"bytes,3,opt,name=body_mutation,json=bodyMutation,proto3" json:"body_mutation,omitempty"` + // [#not-implemented-hide:] // Add new trailers to the message. This may be used when responding to either a // HttpHeaders or HttpBody message, but only if this message is returned // along with the CONTINUE_AND_REPLACE status. - Trailers *v3.HeaderMap `protobuf:"bytes,4,opt,name=trailers,proto3" json:"trailers,omitempty"` + Trailers *v31.HeaderMap `protobuf:"bytes,4,opt,name=trailers,proto3" json:"trailers,omitempty"` // Clear the route cache for the current request. // This is necessary if the remote server // modified headers that are used to calculate the route. @@ -816,7 +832,7 @@ type CommonResponse struct { func (x *CommonResponse) Reset() { *x = CommonResponse{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[8] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -829,7 +845,7 @@ func (x *CommonResponse) String() string { func (*CommonResponse) ProtoMessage() {} func (x *CommonResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[8] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -842,7 +858,7 @@ func (x *CommonResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead. func (*CommonResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{8} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{8} } func (x *CommonResponse) GetStatus() CommonResponse_ResponseStatus { @@ -866,7 +882,7 @@ func (x *CommonResponse) GetBodyMutation() *BodyMutation { return nil } -func (x *CommonResponse) GetTrailers() *v3.HeaderMap { +func (x *CommonResponse) GetTrailers() *v31.HeaderMap { if x != nil { return x.Trailers } @@ -893,7 +909,7 @@ type ImmediateResponse struct { unknownFields protoimpl.UnknownFields // The response code to return - Status *v31.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Status *v32.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // Apply changes to the default headers, which will include content-type. Headers *HeaderMutation `protobuf:"bytes,2,opt,name=headers,proto3" json:"headers,omitempty"` // The message body to return with the response which is sent using the @@ -902,14 +918,15 @@ type ImmediateResponse struct { // If set, then include a gRPC status trailer. GrpcStatus *GrpcStatus `protobuf:"bytes,4,opt,name=grpc_status,json=grpcStatus,proto3" json:"grpc_status,omitempty"` // A string detailing why this local reply was sent, which may be included - // in log and debug output. + // in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS% + // command operator field for use in access logging). Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` } func (x *ImmediateResponse) Reset() { *x = ImmediateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[9] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -922,7 +939,7 @@ func (x *ImmediateResponse) String() string { func (*ImmediateResponse) ProtoMessage() {} func (x *ImmediateResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[9] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -935,10 +952,10 @@ func (x *ImmediateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ImmediateResponse.ProtoReflect.Descriptor instead. func (*ImmediateResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{9} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{9} } -func (x *ImmediateResponse) GetStatus() *v31.HttpStatus { +func (x *ImmediateResponse) GetStatus() *v32.HttpStatus { if x != nil { return x.Status } @@ -986,7 +1003,7 @@ type GrpcStatus struct { func (x *GrpcStatus) Reset() { *x = GrpcStatus{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[10] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -999,7 +1016,7 @@ func (x *GrpcStatus) String() string { func (*GrpcStatus) ProtoMessage() {} func (x *GrpcStatus) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[10] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1012,7 +1029,7 @@ func (x *GrpcStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use GrpcStatus.ProtoReflect.Descriptor instead. func (*GrpcStatus) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{10} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{10} } func (x *GrpcStatus) GetStatus() uint32 { @@ -1032,7 +1049,7 @@ type HeaderMutation struct { // Add or replace HTTP headers. Attempts to set the value of // any "x-envoy" header, and attempts to set the ":method", // ":authority", ":scheme", or "host" headers will be ignored. - SetHeaders []*v3.HeaderValueOption `protobuf:"bytes,1,rep,name=set_headers,json=setHeaders,proto3" json:"set_headers,omitempty"` + SetHeaders []*v31.HeaderValueOption `protobuf:"bytes,1,rep,name=set_headers,json=setHeaders,proto3" json:"set_headers,omitempty"` // Remove these HTTP headers. Attempts to remove system headers -- // any header starting with ":", plus "host" -- will be ignored. RemoveHeaders []string `protobuf:"bytes,2,rep,name=remove_headers,json=removeHeaders,proto3" json:"remove_headers,omitempty"` @@ -1041,7 +1058,7 @@ type HeaderMutation struct { func (x *HeaderMutation) Reset() { *x = HeaderMutation{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[11] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1054,7 +1071,7 @@ func (x *HeaderMutation) String() string { func (*HeaderMutation) ProtoMessage() {} func (x *HeaderMutation) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[11] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1067,10 +1084,10 @@ func (x *HeaderMutation) ProtoReflect() protoreflect.Message { // Deprecated: Use HeaderMutation.ProtoReflect.Descriptor instead. func (*HeaderMutation) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{11} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{11} } -func (x *HeaderMutation) GetSetHeaders() []*v3.HeaderValueOption { +func (x *HeaderMutation) GetSetHeaders() []*v31.HeaderValueOption { if x != nil { return x.SetHeaders } @@ -1100,7 +1117,7 @@ type BodyMutation struct { func (x *BodyMutation) Reset() { *x = BodyMutation{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[12] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1113,7 +1130,7 @@ func (x *BodyMutation) String() string { func (*BodyMutation) ProtoMessage() {} func (x *BodyMutation) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[12] + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1126,7 +1143,7 @@ func (x *BodyMutation) ProtoReflect() protoreflect.Message { // Deprecated: Use BodyMutation.ProtoReflect.Descriptor instead. func (*BodyMutation) Descriptor() ([]byte, []int) { - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP(), []int{12} + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{12} } func (m *BodyMutation) GetMutation() isBodyMutation_Mutation { @@ -1168,313 +1185,311 @@ func (*BodyMutation_Body) isBodyMutation_Mutation() {} func (*BodyMutation_ClearBody) isBodyMutation_Mutation() {} -var File_envoy_service_ext_proc_v3alpha_external_processor_proto protoreflect.FileDescriptor - -var file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x44, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x04, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x56, 0x0a, 0x0f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, - 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x58, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4d, - 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, - 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x4f, 0x0a, - 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, - 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x59, - 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, - 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, - 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x5b, 0x0a, 0x11, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, - 0x72, 0x73, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, - 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x42, 0x0e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xd4, 0x06, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, - 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, +var File_envoy_service_ext_proc_v3_external_processor_proto protoreflect.FileDescriptor + +var file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x1a, + 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x04, 0x0a, 0x11, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x51, + 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, + 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x53, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, + 0x79, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, + 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x0c, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x54, 0x0a, 0x10, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, - 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5c, 0x0a, 0x10, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x48, + 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, + 0x72, 0x73, 0x12, 0x56, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x53, 0x0a, 0x0d, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x42, 0x0e, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xac, 0x06, 0x0a, 0x12, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x55, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, + 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, + 0x4e, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x5d, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, - 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x58, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, + 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x5f, - 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, - 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, - 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, - 0x62, 0x0a, 0x12, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, - 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6d, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, - 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x65, 0x5f, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0c, - 0x6d, 0x6f, 0x64, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x42, 0x0f, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xa1, 0x02, - 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x39, 0x0a, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6d, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x00, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5e, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x65, + 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x65, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9c, 0x02, 0x0a, 0x0b, 0x48, 0x74, + 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0d, + 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x1a, 0x56, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x42, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, + 0x42, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, + 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x4b, 0x0a, 0x0c, + 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x08, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, - 0x64, 0x4f, 0x66, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x1a, 0x56, 0x0a, 0x0f, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x42, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x4b, 0x0a, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, - 0x72, 0x73, 0x22, 0x5d, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, - 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x6b, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x22, 0x58, 0x0a, 0x0f, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5a, - 0x0a, 0x0c, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x03, 0x0a, 0x0e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, + 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0c, 0x42, + 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, - 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xb1, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0d, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x75, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, + 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6c, 0x65, + 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x22, 0x38, 0x0a, 0x0e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0c, + 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x45, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, + 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, + 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x22, 0x8b, 0x02, 0x0a, 0x11, 0x49, 0x6d, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, - 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0d, 0x62, 0x6f, 0x64, 0x79, 0x5f, - 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x6f, - 0x64, 0x79, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x72, - 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x74, - 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x65, 0x61, 0x72, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x22, 0x38, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, - 0x45, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x45, 0x5f, - 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x22, 0x95, 0x02, - 0x0a, 0x11, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x48, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x4b, - 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0a, 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x24, 0x0a, 0x0a, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x0e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, - 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, 0x65, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, - 0x51, 0x0a, 0x0c, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x14, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1f, 0x0a, 0x0a, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6c, 0x65, - 0x61, 0x72, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0x8b, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x76, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, - 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x42, 0x5b, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x16, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, + 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x22, 0x24, 0x0a, 0x0a, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x0e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, + 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, 0x65, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x51, + 0x0a, 0x0c, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1f, 0x0a, 0x0a, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x62, 0x6f, + 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6c, 0x65, 0x61, + 0x72, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0x81, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x6c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0xa3, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, + 0x33, 0x42, 0x16, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( - file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescOnce sync.Once - file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescData = file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDesc + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescOnce sync.Once + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData = file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc ) -func file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescGZIP() []byte { - file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescOnce.Do(func() { - file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescData) +func file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP() []byte { + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescOnce.Do(func() { + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData) }) - return file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDescData -} - -var file_envoy_service_ext_proc_v3alpha_external_processor_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_envoy_service_ext_proc_v3alpha_external_processor_proto_goTypes = []interface{}{ - (CommonResponse_ResponseStatus)(0), // 0: envoy.service.ext_proc.v3alpha.CommonResponse.ResponseStatus - (*ProcessingRequest)(nil), // 1: envoy.service.ext_proc.v3alpha.ProcessingRequest - (*ProcessingResponse)(nil), // 2: envoy.service.ext_proc.v3alpha.ProcessingResponse - (*HttpHeaders)(nil), // 3: envoy.service.ext_proc.v3alpha.HttpHeaders - (*HttpBody)(nil), // 4: envoy.service.ext_proc.v3alpha.HttpBody - (*HttpTrailers)(nil), // 5: envoy.service.ext_proc.v3alpha.HttpTrailers - (*HeadersResponse)(nil), // 6: envoy.service.ext_proc.v3alpha.HeadersResponse - (*TrailersResponse)(nil), // 7: envoy.service.ext_proc.v3alpha.TrailersResponse - (*BodyResponse)(nil), // 8: envoy.service.ext_proc.v3alpha.BodyResponse - (*CommonResponse)(nil), // 9: envoy.service.ext_proc.v3alpha.CommonResponse - (*ImmediateResponse)(nil), // 10: envoy.service.ext_proc.v3alpha.ImmediateResponse - (*GrpcStatus)(nil), // 11: envoy.service.ext_proc.v3alpha.GrpcStatus - (*HeaderMutation)(nil), // 12: envoy.service.ext_proc.v3alpha.HeaderMutation - (*BodyMutation)(nil), // 13: envoy.service.ext_proc.v3alpha.BodyMutation - nil, // 14: envoy.service.ext_proc.v3alpha.HttpHeaders.AttributesEntry + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData +} + +var file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_envoy_service_ext_proc_v3_external_processor_proto_goTypes = []interface{}{ + (CommonResponse_ResponseStatus)(0), // 0: envoy.service.ext_proc.v3.CommonResponse.ResponseStatus + (*ProcessingRequest)(nil), // 1: envoy.service.ext_proc.v3.ProcessingRequest + (*ProcessingResponse)(nil), // 2: envoy.service.ext_proc.v3.ProcessingResponse + (*HttpHeaders)(nil), // 3: envoy.service.ext_proc.v3.HttpHeaders + (*HttpBody)(nil), // 4: envoy.service.ext_proc.v3.HttpBody + (*HttpTrailers)(nil), // 5: envoy.service.ext_proc.v3.HttpTrailers + (*HeadersResponse)(nil), // 6: envoy.service.ext_proc.v3.HeadersResponse + (*TrailersResponse)(nil), // 7: envoy.service.ext_proc.v3.TrailersResponse + (*BodyResponse)(nil), // 8: envoy.service.ext_proc.v3.BodyResponse + (*CommonResponse)(nil), // 9: envoy.service.ext_proc.v3.CommonResponse + (*ImmediateResponse)(nil), // 10: envoy.service.ext_proc.v3.ImmediateResponse + (*GrpcStatus)(nil), // 11: envoy.service.ext_proc.v3.GrpcStatus + (*HeaderMutation)(nil), // 12: envoy.service.ext_proc.v3.HeaderMutation + (*BodyMutation)(nil), // 13: envoy.service.ext_proc.v3.BodyMutation + nil, // 14: envoy.service.ext_proc.v3.HttpHeaders.AttributesEntry (*_struct.Struct)(nil), // 15: google.protobuf.Struct - (*v3alpha.ProcessingMode)(nil), // 16: envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode - (*v3.HeaderMap)(nil), // 17: envoy.config.core.v3.HeaderMap - (*v31.HttpStatus)(nil), // 18: envoy.type.v3.HttpStatus - (*v3.HeaderValueOption)(nil), // 19: envoy.config.core.v3.HeaderValueOption -} -var file_envoy_service_ext_proc_v3alpha_external_processor_proto_depIdxs = []int32{ - 3, // 0: envoy.service.ext_proc.v3alpha.ProcessingRequest.request_headers:type_name -> envoy.service.ext_proc.v3alpha.HttpHeaders - 3, // 1: envoy.service.ext_proc.v3alpha.ProcessingRequest.response_headers:type_name -> envoy.service.ext_proc.v3alpha.HttpHeaders - 4, // 2: envoy.service.ext_proc.v3alpha.ProcessingRequest.request_body:type_name -> envoy.service.ext_proc.v3alpha.HttpBody - 4, // 3: envoy.service.ext_proc.v3alpha.ProcessingRequest.response_body:type_name -> envoy.service.ext_proc.v3alpha.HttpBody - 5, // 4: envoy.service.ext_proc.v3alpha.ProcessingRequest.request_trailers:type_name -> envoy.service.ext_proc.v3alpha.HttpTrailers - 5, // 5: envoy.service.ext_proc.v3alpha.ProcessingRequest.response_trailers:type_name -> envoy.service.ext_proc.v3alpha.HttpTrailers - 6, // 6: envoy.service.ext_proc.v3alpha.ProcessingResponse.request_headers:type_name -> envoy.service.ext_proc.v3alpha.HeadersResponse - 6, // 7: envoy.service.ext_proc.v3alpha.ProcessingResponse.response_headers:type_name -> envoy.service.ext_proc.v3alpha.HeadersResponse - 8, // 8: envoy.service.ext_proc.v3alpha.ProcessingResponse.request_body:type_name -> envoy.service.ext_proc.v3alpha.BodyResponse - 8, // 9: envoy.service.ext_proc.v3alpha.ProcessingResponse.response_body:type_name -> envoy.service.ext_proc.v3alpha.BodyResponse - 7, // 10: envoy.service.ext_proc.v3alpha.ProcessingResponse.request_trailers:type_name -> envoy.service.ext_proc.v3alpha.TrailersResponse - 7, // 11: envoy.service.ext_proc.v3alpha.ProcessingResponse.response_trailers:type_name -> envoy.service.ext_proc.v3alpha.TrailersResponse - 10, // 12: envoy.service.ext_proc.v3alpha.ProcessingResponse.immediate_response:type_name -> envoy.service.ext_proc.v3alpha.ImmediateResponse - 15, // 13: envoy.service.ext_proc.v3alpha.ProcessingResponse.dynamic_metadata:type_name -> google.protobuf.Struct - 16, // 14: envoy.service.ext_proc.v3alpha.ProcessingResponse.mode_override:type_name -> envoy.extensions.filters.http.ext_proc.v3alpha.ProcessingMode - 17, // 15: envoy.service.ext_proc.v3alpha.HttpHeaders.headers:type_name -> envoy.config.core.v3.HeaderMap - 14, // 16: envoy.service.ext_proc.v3alpha.HttpHeaders.attributes:type_name -> envoy.service.ext_proc.v3alpha.HttpHeaders.AttributesEntry - 17, // 17: envoy.service.ext_proc.v3alpha.HttpTrailers.trailers:type_name -> envoy.config.core.v3.HeaderMap - 9, // 18: envoy.service.ext_proc.v3alpha.HeadersResponse.response:type_name -> envoy.service.ext_proc.v3alpha.CommonResponse - 12, // 19: envoy.service.ext_proc.v3alpha.TrailersResponse.header_mutation:type_name -> envoy.service.ext_proc.v3alpha.HeaderMutation - 9, // 20: envoy.service.ext_proc.v3alpha.BodyResponse.response:type_name -> envoy.service.ext_proc.v3alpha.CommonResponse - 0, // 21: envoy.service.ext_proc.v3alpha.CommonResponse.status:type_name -> envoy.service.ext_proc.v3alpha.CommonResponse.ResponseStatus - 12, // 22: envoy.service.ext_proc.v3alpha.CommonResponse.header_mutation:type_name -> envoy.service.ext_proc.v3alpha.HeaderMutation - 13, // 23: envoy.service.ext_proc.v3alpha.CommonResponse.body_mutation:type_name -> envoy.service.ext_proc.v3alpha.BodyMutation - 17, // 24: envoy.service.ext_proc.v3alpha.CommonResponse.trailers:type_name -> envoy.config.core.v3.HeaderMap - 18, // 25: envoy.service.ext_proc.v3alpha.ImmediateResponse.status:type_name -> envoy.type.v3.HttpStatus - 12, // 26: envoy.service.ext_proc.v3alpha.ImmediateResponse.headers:type_name -> envoy.service.ext_proc.v3alpha.HeaderMutation - 11, // 27: envoy.service.ext_proc.v3alpha.ImmediateResponse.grpc_status:type_name -> envoy.service.ext_proc.v3alpha.GrpcStatus - 19, // 28: envoy.service.ext_proc.v3alpha.HeaderMutation.set_headers:type_name -> envoy.config.core.v3.HeaderValueOption - 15, // 29: envoy.service.ext_proc.v3alpha.HttpHeaders.AttributesEntry.value:type_name -> google.protobuf.Struct - 1, // 30: envoy.service.ext_proc.v3alpha.ExternalProcessor.Process:input_type -> envoy.service.ext_proc.v3alpha.ProcessingRequest - 2, // 31: envoy.service.ext_proc.v3alpha.ExternalProcessor.Process:output_type -> envoy.service.ext_proc.v3alpha.ProcessingResponse + (*v3.ProcessingMode)(nil), // 16: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + (*v31.HeaderMap)(nil), // 17: envoy.config.core.v3.HeaderMap + (*v32.HttpStatus)(nil), // 18: envoy.type.v3.HttpStatus + (*v31.HeaderValueOption)(nil), // 19: envoy.config.core.v3.HeaderValueOption +} +var file_envoy_service_ext_proc_v3_external_processor_proto_depIdxs = []int32{ + 3, // 0: envoy.service.ext_proc.v3.ProcessingRequest.request_headers:type_name -> envoy.service.ext_proc.v3.HttpHeaders + 3, // 1: envoy.service.ext_proc.v3.ProcessingRequest.response_headers:type_name -> envoy.service.ext_proc.v3.HttpHeaders + 4, // 2: envoy.service.ext_proc.v3.ProcessingRequest.request_body:type_name -> envoy.service.ext_proc.v3.HttpBody + 4, // 3: envoy.service.ext_proc.v3.ProcessingRequest.response_body:type_name -> envoy.service.ext_proc.v3.HttpBody + 5, // 4: envoy.service.ext_proc.v3.ProcessingRequest.request_trailers:type_name -> envoy.service.ext_proc.v3.HttpTrailers + 5, // 5: envoy.service.ext_proc.v3.ProcessingRequest.response_trailers:type_name -> envoy.service.ext_proc.v3.HttpTrailers + 6, // 6: envoy.service.ext_proc.v3.ProcessingResponse.request_headers:type_name -> envoy.service.ext_proc.v3.HeadersResponse + 6, // 7: envoy.service.ext_proc.v3.ProcessingResponse.response_headers:type_name -> envoy.service.ext_proc.v3.HeadersResponse + 8, // 8: envoy.service.ext_proc.v3.ProcessingResponse.request_body:type_name -> envoy.service.ext_proc.v3.BodyResponse + 8, // 9: envoy.service.ext_proc.v3.ProcessingResponse.response_body:type_name -> envoy.service.ext_proc.v3.BodyResponse + 7, // 10: envoy.service.ext_proc.v3.ProcessingResponse.request_trailers:type_name -> envoy.service.ext_proc.v3.TrailersResponse + 7, // 11: envoy.service.ext_proc.v3.ProcessingResponse.response_trailers:type_name -> envoy.service.ext_proc.v3.TrailersResponse + 10, // 12: envoy.service.ext_proc.v3.ProcessingResponse.immediate_response:type_name -> envoy.service.ext_proc.v3.ImmediateResponse + 15, // 13: envoy.service.ext_proc.v3.ProcessingResponse.dynamic_metadata:type_name -> google.protobuf.Struct + 16, // 14: envoy.service.ext_proc.v3.ProcessingResponse.mode_override:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + 17, // 15: envoy.service.ext_proc.v3.HttpHeaders.headers:type_name -> envoy.config.core.v3.HeaderMap + 14, // 16: envoy.service.ext_proc.v3.HttpHeaders.attributes:type_name -> envoy.service.ext_proc.v3.HttpHeaders.AttributesEntry + 17, // 17: envoy.service.ext_proc.v3.HttpTrailers.trailers:type_name -> envoy.config.core.v3.HeaderMap + 9, // 18: envoy.service.ext_proc.v3.HeadersResponse.response:type_name -> envoy.service.ext_proc.v3.CommonResponse + 12, // 19: envoy.service.ext_proc.v3.TrailersResponse.header_mutation:type_name -> envoy.service.ext_proc.v3.HeaderMutation + 9, // 20: envoy.service.ext_proc.v3.BodyResponse.response:type_name -> envoy.service.ext_proc.v3.CommonResponse + 0, // 21: envoy.service.ext_proc.v3.CommonResponse.status:type_name -> envoy.service.ext_proc.v3.CommonResponse.ResponseStatus + 12, // 22: envoy.service.ext_proc.v3.CommonResponse.header_mutation:type_name -> envoy.service.ext_proc.v3.HeaderMutation + 13, // 23: envoy.service.ext_proc.v3.CommonResponse.body_mutation:type_name -> envoy.service.ext_proc.v3.BodyMutation + 17, // 24: envoy.service.ext_proc.v3.CommonResponse.trailers:type_name -> envoy.config.core.v3.HeaderMap + 18, // 25: envoy.service.ext_proc.v3.ImmediateResponse.status:type_name -> envoy.type.v3.HttpStatus + 12, // 26: envoy.service.ext_proc.v3.ImmediateResponse.headers:type_name -> envoy.service.ext_proc.v3.HeaderMutation + 11, // 27: envoy.service.ext_proc.v3.ImmediateResponse.grpc_status:type_name -> envoy.service.ext_proc.v3.GrpcStatus + 19, // 28: envoy.service.ext_proc.v3.HeaderMutation.set_headers:type_name -> envoy.config.core.v3.HeaderValueOption + 15, // 29: envoy.service.ext_proc.v3.HttpHeaders.AttributesEntry.value:type_name -> google.protobuf.Struct + 1, // 30: envoy.service.ext_proc.v3.ExternalProcessor.Process:input_type -> envoy.service.ext_proc.v3.ProcessingRequest + 2, // 31: envoy.service.ext_proc.v3.ExternalProcessor.Process:output_type -> envoy.service.ext_proc.v3.ProcessingResponse 31, // [31:32] is the sub-list for method output_type 30, // [30:31] is the sub-list for method input_type 30, // [30:30] is the sub-list for extension type_name @@ -1482,13 +1497,13 @@ var file_envoy_service_ext_proc_v3alpha_external_processor_proto_depIdxs = []int 0, // [0:30] is the sub-list for field type_name } -func init() { file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() } -func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { - if File_envoy_service_ext_proc_v3alpha_external_processor_proto != nil { +func init() { file_envoy_service_ext_proc_v3_external_processor_proto_init() } +func file_envoy_service_ext_proc_v3_external_processor_proto_init() { + if File_envoy_service_ext_proc_v3_external_processor_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProcessingRequest); i { case 0: return &v.state @@ -1500,7 +1515,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProcessingResponse); i { case 0: return &v.state @@ -1512,7 +1527,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HttpHeaders); i { case 0: return &v.state @@ -1524,7 +1539,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HttpBody); i { case 0: return &v.state @@ -1536,7 +1551,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HttpTrailers); i { case 0: return &v.state @@ -1548,7 +1563,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeadersResponse); i { case 0: return &v.state @@ -1560,7 +1575,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrailersResponse); i { case 0: return &v.state @@ -1572,7 +1587,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BodyResponse); i { case 0: return &v.state @@ -1584,7 +1599,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommonResponse); i { case 0: return &v.state @@ -1596,7 +1611,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImmediateResponse); i { case 0: return &v.state @@ -1608,7 +1623,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GrpcStatus); i { case 0: return &v.state @@ -1620,7 +1635,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeaderMutation); i { case 0: return &v.state @@ -1632,7 +1647,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { return nil } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BodyMutation); i { case 0: return &v.state @@ -1645,7 +1660,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { } } } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0].OneofWrappers = []interface{}{ (*ProcessingRequest_RequestHeaders)(nil), (*ProcessingRequest_ResponseHeaders)(nil), (*ProcessingRequest_RequestBody)(nil), @@ -1653,7 +1668,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { (*ProcessingRequest_RequestTrailers)(nil), (*ProcessingRequest_ResponseTrailers)(nil), } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1].OneofWrappers = []interface{}{ (*ProcessingResponse_RequestHeaders)(nil), (*ProcessingResponse_ResponseHeaders)(nil), (*ProcessingResponse_RequestBody)(nil), @@ -1662,7 +1677,7 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { (*ProcessingResponse_ResponseTrailers)(nil), (*ProcessingResponse_ImmediateResponse)(nil), } - file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12].OneofWrappers = []interface{}{ (*BodyMutation_Body)(nil), (*BodyMutation_ClearBody)(nil), } @@ -1670,21 +1685,21 @@ func file_envoy_service_ext_proc_v3alpha_external_processor_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDesc, + RawDescriptor: file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc, NumEnums: 1, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_envoy_service_ext_proc_v3alpha_external_processor_proto_goTypes, - DependencyIndexes: file_envoy_service_ext_proc_v3alpha_external_processor_proto_depIdxs, - EnumInfos: file_envoy_service_ext_proc_v3alpha_external_processor_proto_enumTypes, - MessageInfos: file_envoy_service_ext_proc_v3alpha_external_processor_proto_msgTypes, + GoTypes: file_envoy_service_ext_proc_v3_external_processor_proto_goTypes, + DependencyIndexes: file_envoy_service_ext_proc_v3_external_processor_proto_depIdxs, + EnumInfos: file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes, + MessageInfos: file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes, }.Build() - File_envoy_service_ext_proc_v3alpha_external_processor_proto = out.File - file_envoy_service_ext_proc_v3alpha_external_processor_proto_rawDesc = nil - file_envoy_service_ext_proc_v3alpha_external_processor_proto_goTypes = nil - file_envoy_service_ext_proc_v3alpha_external_processor_proto_depIdxs = nil + File_envoy_service_ext_proc_v3_external_processor_proto = out.File + file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc = nil + file_envoy_service_ext_proc_v3_external_processor_proto_goTypes = nil + file_envoy_service_ext_proc_v3_external_processor_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. @@ -1715,7 +1730,7 @@ func NewExternalProcessorClient(cc grpc.ClientConnInterface) ExternalProcessorCl } func (c *externalProcessorClient) Process(ctx context.Context, opts ...grpc.CallOption) (ExternalProcessor_ProcessClient, error) { - stream, err := c.cc.NewStream(ctx, &_ExternalProcessor_serviceDesc.Streams[0], "/envoy.service.ext_proc.v3alpha.ExternalProcessor/Process", opts...) + stream, err := c.cc.NewStream(ctx, &_ExternalProcessor_serviceDesc.Streams[0], "/envoy.service.ext_proc.v3.ExternalProcessor/Process", opts...) if err != nil { return nil, err } @@ -1793,7 +1808,7 @@ func (x *externalProcessorProcessServer) Recv() (*ProcessingRequest, error) { } var _ExternalProcessor_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.ext_proc.v3alpha.ExternalProcessor", + ServiceName: "envoy.service.ext_proc.v3.ExternalProcessor", HandlerType: (*ExternalProcessorServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ @@ -1804,5 +1819,5 @@ var _ExternalProcessor_serviceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "envoy/service/ext_proc/v3alpha/external_processor.proto", + Metadata: "envoy/service/ext_proc/v3/external_processor.proto", } diff --git a/pkg/api/envoy/service/ext_proc/v3/external_processor.pb.validate.go b/pkg/api/envoy/service/ext_proc/v3/external_processor.pb.validate.go new file mode 100644 index 0000000000..888a161f2e --- /dev/null +++ b/pkg/api/envoy/service/ext_proc/v3/external_processor.pb.validate.go @@ -0,0 +1,2272 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/ext_proc/v3/external_processor.proto + +package ext_procv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProcessingRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ProcessingRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProcessingRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProcessingRequestMultiError, or nil if none found. +func (m *ProcessingRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ProcessingRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for AsyncMode + + switch m.Request.(type) { + + case *ProcessingRequest_RequestHeaders: + + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_ResponseHeaders: + + if all { + switch v := interface{}(m.GetResponseHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_RequestBody: + + if all { + switch v := interface{}(m.GetRequestBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_ResponseBody: + + if all { + switch v := interface{}(m.GetResponseBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_RequestTrailers: + + if all { + switch v := interface{}(m.GetRequestTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_ResponseTrailers: + + if all { + switch v := interface{}(m.GetResponseTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ProcessingRequestValidationError{ + field: "Request", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ProcessingRequestMultiError(errors) + } + + return nil +} + +// ProcessingRequestMultiError is an error wrapping multiple validation errors +// returned by ProcessingRequest.ValidateAll() if the designated constraints +// aren't met. +type ProcessingRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProcessingRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProcessingRequestMultiError) AllErrors() []error { return m } + +// ProcessingRequestValidationError is the validation error returned by +// ProcessingRequest.Validate if the designated constraints aren't met. +type ProcessingRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProcessingRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProcessingRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProcessingRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProcessingRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProcessingRequestValidationError) ErrorName() string { + return "ProcessingRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ProcessingRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sProcessingRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProcessingRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProcessingRequestValidationError{} + +// Validate checks the field values on ProcessingResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ProcessingResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProcessingResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ProcessingResponseMultiError, or nil if none found. +func (m *ProcessingResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ProcessingResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetModeOverride()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ModeOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ModeOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetModeOverride()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ModeOverride", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.Response.(type) { + + case *ProcessingResponse_RequestHeaders: + + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ResponseHeaders: + + if all { + switch v := interface{}(m.GetResponseHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_RequestBody: + + if all { + switch v := interface{}(m.GetRequestBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ResponseBody: + + if all { + switch v := interface{}(m.GetResponseBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_RequestTrailers: + + if all { + switch v := interface{}(m.GetRequestTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ResponseTrailers: + + if all { + switch v := interface{}(m.GetResponseTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ImmediateResponse: + + if all { + switch v := interface{}(m.GetImmediateResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ImmediateResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ImmediateResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetImmediateResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ImmediateResponse", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ProcessingResponseValidationError{ + field: "Response", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ProcessingResponseMultiError(errors) + } + + return nil +} + +// ProcessingResponseMultiError is an error wrapping multiple validation errors +// returned by ProcessingResponse.ValidateAll() if the designated constraints +// aren't met. +type ProcessingResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProcessingResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProcessingResponseMultiError) AllErrors() []error { return m } + +// ProcessingResponseValidationError is the validation error returned by +// ProcessingResponse.Validate if the designated constraints aren't met. +type ProcessingResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProcessingResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProcessingResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProcessingResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProcessingResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProcessingResponseValidationError) ErrorName() string { + return "ProcessingResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ProcessingResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sProcessingResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProcessingResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProcessingResponseValidationError{} + +// Validate checks the field values on HttpHeaders with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HttpHeaders) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpHeaders with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpHeadersMultiError, or +// nil if none found. +func (m *HttpHeaders) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpHeaders) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpHeadersValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetAttributes())) + i := 0 + for key := range m.GetAttributes() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetAttributes()[key] + _ = val + + // no validation rules for Attributes[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: fmt.Sprintf("Attributes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: fmt.Sprintf("Attributes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpHeadersValidationError{ + field: fmt.Sprintf("Attributes[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + // no validation rules for EndOfStream + + if len(errors) > 0 { + return HttpHeadersMultiError(errors) + } + + return nil +} + +// HttpHeadersMultiError is an error wrapping multiple validation errors +// returned by HttpHeaders.ValidateAll() if the designated constraints aren't met. +type HttpHeadersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpHeadersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpHeadersMultiError) AllErrors() []error { return m } + +// HttpHeadersValidationError is the validation error returned by +// HttpHeaders.Validate if the designated constraints aren't met. +type HttpHeadersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpHeadersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpHeadersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpHeadersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpHeadersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpHeadersValidationError) ErrorName() string { return "HttpHeadersValidationError" } + +// Error satisfies the builtin error interface +func (e HttpHeadersValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpHeaders.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpHeadersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpHeadersValidationError{} + +// Validate checks the field values on HttpBody with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HttpBody) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBody with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpBodyMultiError, or nil +// if none found. +func (m *HttpBody) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBody) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Body + + // no validation rules for EndOfStream + + if len(errors) > 0 { + return HttpBodyMultiError(errors) + } + + return nil +} + +// HttpBodyMultiError is an error wrapping multiple validation errors returned +// by HttpBody.ValidateAll() if the designated constraints aren't met. +type HttpBodyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBodyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBodyMultiError) AllErrors() []error { return m } + +// HttpBodyValidationError is the validation error returned by +// HttpBody.Validate if the designated constraints aren't met. +type HttpBodyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpBodyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpBodyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpBodyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpBodyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpBodyValidationError) ErrorName() string { return "HttpBodyValidationError" } + +// Error satisfies the builtin error interface +func (e HttpBodyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpBody.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpBodyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpBodyValidationError{} + +// Validate checks the field values on HttpTrailers with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HttpTrailers) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpTrailers with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpTrailersMultiError, or +// nil if none found. +func (m *HttpTrailers) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpTrailers) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpTrailersValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpTrailersValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpTrailersValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpTrailersMultiError(errors) + } + + return nil +} + +// HttpTrailersMultiError is an error wrapping multiple validation errors +// returned by HttpTrailers.ValidateAll() if the designated constraints aren't met. +type HttpTrailersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpTrailersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpTrailersMultiError) AllErrors() []error { return m } + +// HttpTrailersValidationError is the validation error returned by +// HttpTrailers.Validate if the designated constraints aren't met. +type HttpTrailersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpTrailersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpTrailersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpTrailersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpTrailersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpTrailersValidationError) ErrorName() string { return "HttpTrailersValidationError" } + +// Error satisfies the builtin error interface +func (e HttpTrailersValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpTrailers.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpTrailersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpTrailersValidationError{} + +// Validate checks the field values on HeadersResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *HeadersResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeadersResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HeadersResponseMultiError, or nil if none found. +func (m *HeadersResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *HeadersResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeadersResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeadersResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeadersResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HeadersResponseMultiError(errors) + } + + return nil +} + +// HeadersResponseMultiError is an error wrapping multiple validation errors +// returned by HeadersResponse.ValidateAll() if the designated constraints +// aren't met. +type HeadersResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeadersResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeadersResponseMultiError) AllErrors() []error { return m } + +// HeadersResponseValidationError is the validation error returned by +// HeadersResponse.Validate if the designated constraints aren't met. +type HeadersResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeadersResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeadersResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeadersResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeadersResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeadersResponseValidationError) ErrorName() string { return "HeadersResponseValidationError" } + +// Error satisfies the builtin error interface +func (e HeadersResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHeadersResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeadersResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeadersResponseValidationError{} + +// Validate checks the field values on TrailersResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *TrailersResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TrailersResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TrailersResponseMultiError, or nil if none found. +func (m *TrailersResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *TrailersResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHeaderMutation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TrailersResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TrailersResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderMutation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TrailersResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TrailersResponseMultiError(errors) + } + + return nil +} + +// TrailersResponseMultiError is an error wrapping multiple validation errors +// returned by TrailersResponse.ValidateAll() if the designated constraints +// aren't met. +type TrailersResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TrailersResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TrailersResponseMultiError) AllErrors() []error { return m } + +// TrailersResponseValidationError is the validation error returned by +// TrailersResponse.Validate if the designated constraints aren't met. +type TrailersResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TrailersResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TrailersResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TrailersResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TrailersResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TrailersResponseValidationError) ErrorName() string { return "TrailersResponseValidationError" } + +// Error satisfies the builtin error interface +func (e TrailersResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTrailersResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TrailersResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TrailersResponseValidationError{} + +// Validate checks the field values on BodyResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BodyResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BodyResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BodyResponseMultiError, or +// nil if none found. +func (m *BodyResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *BodyResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BodyResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BodyResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BodyResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return BodyResponseMultiError(errors) + } + + return nil +} + +// BodyResponseMultiError is an error wrapping multiple validation errors +// returned by BodyResponse.ValidateAll() if the designated constraints aren't met. +type BodyResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BodyResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BodyResponseMultiError) AllErrors() []error { return m } + +// BodyResponseValidationError is the validation error returned by +// BodyResponse.Validate if the designated constraints aren't met. +type BodyResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BodyResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BodyResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BodyResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BodyResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BodyResponseValidationError) ErrorName() string { return "BodyResponseValidationError" } + +// Error satisfies the builtin error interface +func (e BodyResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBodyResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BodyResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BodyResponseValidationError{} + +// Validate checks the field values on CommonResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *CommonResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CommonResponseMultiError, +// or nil if none found. +func (m *CommonResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := CommonResponse_ResponseStatus_name[int32(m.GetStatus())]; !ok { + err := CommonResponseValidationError{ + field: "Status", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetHeaderMutation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderMutation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetBodyMutation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "BodyMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "BodyMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBodyMutation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonResponseValidationError{ + field: "BodyMutation", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClearRouteCache + + if len(errors) > 0 { + return CommonResponseMultiError(errors) + } + + return nil +} + +// CommonResponseMultiError is an error wrapping multiple validation errors +// returned by CommonResponse.ValidateAll() if the designated constraints +// aren't met. +type CommonResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonResponseMultiError) AllErrors() []error { return m } + +// CommonResponseValidationError is the validation error returned by +// CommonResponse.Validate if the designated constraints aren't met. +type CommonResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CommonResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CommonResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CommonResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CommonResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CommonResponseValidationError) ErrorName() string { return "CommonResponseValidationError" } + +// Error satisfies the builtin error interface +func (e CommonResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCommonResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CommonResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CommonResponseValidationError{} + +// Validate checks the field values on ImmediateResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ImmediateResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ImmediateResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ImmediateResponseMultiError, or nil if none found. +func (m *ImmediateResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ImmediateResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetStatus() == nil { + err := ImmediateResponseValidationError{ + field: "Status", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ImmediateResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ImmediateResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Body + + if all { + switch v := interface{}(m.GetGrpcStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ImmediateResponseValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Details + + if len(errors) > 0 { + return ImmediateResponseMultiError(errors) + } + + return nil +} + +// ImmediateResponseMultiError is an error wrapping multiple validation errors +// returned by ImmediateResponse.ValidateAll() if the designated constraints +// aren't met. +type ImmediateResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ImmediateResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ImmediateResponseMultiError) AllErrors() []error { return m } + +// ImmediateResponseValidationError is the validation error returned by +// ImmediateResponse.Validate if the designated constraints aren't met. +type ImmediateResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ImmediateResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ImmediateResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ImmediateResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ImmediateResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ImmediateResponseValidationError) ErrorName() string { + return "ImmediateResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ImmediateResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sImmediateResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ImmediateResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ImmediateResponseValidationError{} + +// Validate checks the field values on GrpcStatus with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *GrpcStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcStatus with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GrpcStatusMultiError, or +// nil if none found. +func (m *GrpcStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Status + + if len(errors) > 0 { + return GrpcStatusMultiError(errors) + } + + return nil +} + +// GrpcStatusMultiError is an error wrapping multiple validation errors +// returned by GrpcStatus.ValidateAll() if the designated constraints aren't met. +type GrpcStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcStatusMultiError) AllErrors() []error { return m } + +// GrpcStatusValidationError is the validation error returned by +// GrpcStatus.Validate if the designated constraints aren't met. +type GrpcStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GrpcStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcStatusValidationError) ErrorName() string { return "GrpcStatusValidationError" } + +// Error satisfies the builtin error interface +func (e GrpcStatusValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGrpcStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcStatusValidationError{} + +// Validate checks the field values on HeaderMutation with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HeaderMutation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMutation with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HeaderMutationMultiError, +// or nil if none found. +func (m *HeaderMutation) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMutation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetSetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationValidationError{ + field: fmt.Sprintf("SetHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationValidationError{ + field: fmt.Sprintf("SetHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationValidationError{ + field: fmt.Sprintf("SetHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HeaderMutationMultiError(errors) + } + + return nil +} + +// HeaderMutationMultiError is an error wrapping multiple validation errors +// returned by HeaderMutation.ValidateAll() if the designated constraints +// aren't met. +type HeaderMutationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMutationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMutationMultiError) AllErrors() []error { return m } + +// HeaderMutationValidationError is the validation error returned by +// HeaderMutation.Validate if the designated constraints aren't met. +type HeaderMutationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderMutationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderMutationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderMutationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderMutationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderMutationValidationError) ErrorName() string { return "HeaderMutationValidationError" } + +// Error satisfies the builtin error interface +func (e HeaderMutationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHeaderMutation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderMutationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderMutationValidationError{} + +// Validate checks the field values on BodyMutation with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BodyMutation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BodyMutation with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BodyMutationMultiError, or +// nil if none found. +func (m *BodyMutation) ValidateAll() error { + return m.validate(true) +} + +func (m *BodyMutation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Mutation.(type) { + + case *BodyMutation_Body: + // no validation rules for Body + + case *BodyMutation_ClearBody: + // no validation rules for ClearBody + + } + + if len(errors) > 0 { + return BodyMutationMultiError(errors) + } + + return nil +} + +// BodyMutationMultiError is an error wrapping multiple validation errors +// returned by BodyMutation.ValidateAll() if the designated constraints aren't met. +type BodyMutationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BodyMutationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BodyMutationMultiError) AllErrors() []error { return m } + +// BodyMutationValidationError is the validation error returned by +// BodyMutation.Validate if the designated constraints aren't met. +type BodyMutationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BodyMutationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BodyMutationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BodyMutationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BodyMutationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BodyMutationValidationError) ErrorName() string { return "BodyMutationValidationError" } + +// Error satisfies the builtin error interface +func (e BodyMutationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBodyMutation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BodyMutationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BodyMutationValidationError{} diff --git a/pkg/api/envoy/service/ext_proc/v3alpha/external_processor.pb.validate.go b/pkg/api/envoy/service/ext_proc/v3alpha/external_processor.pb.validate.go deleted file mode 100644 index 9121a71c91..0000000000 --- a/pkg/api/envoy/service/ext_proc/v3alpha/external_processor.pb.validate.go +++ /dev/null @@ -1,1261 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/ext_proc/v3alpha/external_processor.proto - -package envoy_service_ext_proc_v3alpha - -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{} -) - -// Validate checks the field values on ProcessingRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ProcessingRequest) Validate() error { - if m == nil { - return nil - } - - // no validation rules for AsyncMode - - switch m.Request.(type) { - - case *ProcessingRequest_RequestHeaders: - - if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingRequestValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingRequest_ResponseHeaders: - - if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingRequestValidationError{ - field: "ResponseHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingRequest_RequestBody: - - if v, ok := interface{}(m.GetRequestBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingRequestValidationError{ - field: "RequestBody", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingRequest_ResponseBody: - - if v, ok := interface{}(m.GetResponseBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingRequestValidationError{ - field: "ResponseBody", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingRequest_RequestTrailers: - - if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingRequestValidationError{ - field: "RequestTrailers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingRequest_ResponseTrailers: - - if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingRequestValidationError{ - field: "ResponseTrailers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return ProcessingRequestValidationError{ - field: "Request", - reason: "value is required", - } - - } - - return nil -} - -// ProcessingRequestValidationError is the validation error returned by -// ProcessingRequest.Validate if the designated constraints aren't met. -type ProcessingRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ProcessingRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ProcessingRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ProcessingRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ProcessingRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ProcessingRequestValidationError) ErrorName() string { - return "ProcessingRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ProcessingRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sProcessingRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ProcessingRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ProcessingRequestValidationError{} - -// Validate checks the field values on ProcessingResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ProcessingResponse) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetModeOverride()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "ModeOverride", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.Response.(type) { - - case *ProcessingResponse_RequestHeaders: - - if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingResponse_ResponseHeaders: - - if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "ResponseHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingResponse_RequestBody: - - if v, ok := interface{}(m.GetRequestBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "RequestBody", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingResponse_ResponseBody: - - if v, ok := interface{}(m.GetResponseBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "ResponseBody", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingResponse_RequestTrailers: - - if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "RequestTrailers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingResponse_ResponseTrailers: - - if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "ResponseTrailers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ProcessingResponse_ImmediateResponse: - - if v, ok := interface{}(m.GetImmediateResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProcessingResponseValidationError{ - field: "ImmediateResponse", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return ProcessingResponseValidationError{ - field: "Response", - reason: "value is required", - } - - } - - return nil -} - -// ProcessingResponseValidationError is the validation error returned by -// ProcessingResponse.Validate if the designated constraints aren't met. -type ProcessingResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ProcessingResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ProcessingResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ProcessingResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ProcessingResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ProcessingResponseValidationError) ErrorName() string { - return "ProcessingResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ProcessingResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sProcessingResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ProcessingResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ProcessingResponseValidationError{} - -// Validate checks the field values on HttpHeaders with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HttpHeaders) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpHeadersValidationError{ - field: "Headers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for key, val := range m.GetAttributes() { - _ = val - - // no validation rules for Attributes[key] - - if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpHeadersValidationError{ - field: fmt.Sprintf("Attributes[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for EndOfStream - - return nil -} - -// HttpHeadersValidationError is the validation error returned by -// HttpHeaders.Validate if the designated constraints aren't met. -type HttpHeadersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpHeadersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpHeadersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpHeadersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpHeadersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpHeadersValidationError) ErrorName() string { return "HttpHeadersValidationError" } - -// Error satisfies the builtin error interface -func (e HttpHeadersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpHeaders.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpHeadersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpHeadersValidationError{} - -// Validate checks the field values on HttpBody with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HttpBody) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Body - - // no validation rules for EndOfStream - - return nil -} - -// HttpBodyValidationError is the validation error returned by -// HttpBody.Validate if the designated constraints aren't met. -type HttpBodyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpBodyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpBodyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpBodyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpBodyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpBodyValidationError) ErrorName() string { return "HttpBodyValidationError" } - -// Error satisfies the builtin error interface -func (e HttpBodyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpBody.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpBodyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpBodyValidationError{} - -// Validate checks the field values on HttpTrailers with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HttpTrailers) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpTrailersValidationError{ - field: "Trailers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// HttpTrailersValidationError is the validation error returned by -// HttpTrailers.Validate if the designated constraints aren't met. -type HttpTrailersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpTrailersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpTrailersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpTrailersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpTrailersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpTrailersValidationError) ErrorName() string { return "HttpTrailersValidationError" } - -// Error satisfies the builtin error interface -func (e HttpTrailersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpTrailers.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpTrailersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpTrailersValidationError{} - -// Validate checks the field values on HeadersResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *HeadersResponse) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeadersResponseValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// HeadersResponseValidationError is the validation error returned by -// HeadersResponse.Validate if the designated constraints aren't met. -type HeadersResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeadersResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeadersResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeadersResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeadersResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeadersResponseValidationError) ErrorName() string { return "HeadersResponseValidationError" } - -// Error satisfies the builtin error interface -func (e HeadersResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeadersResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeadersResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeadersResponseValidationError{} - -// Validate checks the field values on TrailersResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *TrailersResponse) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetHeaderMutation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TrailersResponseValidationError{ - field: "HeaderMutation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// TrailersResponseValidationError is the validation error returned by -// TrailersResponse.Validate if the designated constraints aren't met. -type TrailersResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TrailersResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TrailersResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TrailersResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TrailersResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TrailersResponseValidationError) ErrorName() string { return "TrailersResponseValidationError" } - -// Error satisfies the builtin error interface -func (e TrailersResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTrailersResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TrailersResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TrailersResponseValidationError{} - -// Validate checks the field values on BodyResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *BodyResponse) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BodyResponseValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// BodyResponseValidationError is the validation error returned by -// BodyResponse.Validate if the designated constraints aren't met. -type BodyResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BodyResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BodyResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BodyResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BodyResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BodyResponseValidationError) ErrorName() string { return "BodyResponseValidationError" } - -// Error satisfies the builtin error interface -func (e BodyResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBodyResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BodyResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BodyResponseValidationError{} - -// Validate checks the field values on CommonResponse with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *CommonResponse) Validate() error { - if m == nil { - return nil - } - - if _, ok := CommonResponse_ResponseStatus_name[int32(m.GetStatus())]; !ok { - return CommonResponseValidationError{ - field: "Status", - reason: "value must be one of the defined enum values", - } - } - - if v, ok := interface{}(m.GetHeaderMutation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonResponseValidationError{ - field: "HeaderMutation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetBodyMutation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonResponseValidationError{ - field: "BodyMutation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonResponseValidationError{ - field: "Trailers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ClearRouteCache - - return nil -} - -// CommonResponseValidationError is the validation error returned by -// CommonResponse.Validate if the designated constraints aren't met. -type CommonResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommonResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommonResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommonResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommonResponseValidationError) ErrorName() string { return "CommonResponseValidationError" } - -// Error satisfies the builtin error interface -func (e CommonResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonResponseValidationError{} - -// Validate checks the field values on ImmediateResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ImmediateResponse) Validate() error { - if m == nil { - return nil - } - - if m.GetStatus() == nil { - return ImmediateResponseValidationError{ - field: "Status", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ImmediateResponseValidationError{ - field: "Status", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ImmediateResponseValidationError{ - field: "Headers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Body - - if v, ok := interface{}(m.GetGrpcStatus()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ImmediateResponseValidationError{ - field: "GrpcStatus", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Details - - return nil -} - -// ImmediateResponseValidationError is the validation error returned by -// ImmediateResponse.Validate if the designated constraints aren't met. -type ImmediateResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ImmediateResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ImmediateResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ImmediateResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ImmediateResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ImmediateResponseValidationError) ErrorName() string { - return "ImmediateResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ImmediateResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sImmediateResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ImmediateResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ImmediateResponseValidationError{} - -// Validate checks the field values on GrpcStatus with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *GrpcStatus) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Status - - return nil -} - -// GrpcStatusValidationError is the validation error returned by -// GrpcStatus.Validate if the designated constraints aren't met. -type GrpcStatusValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcStatusValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcStatusValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcStatusValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcStatusValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcStatusValidationError) ErrorName() string { return "GrpcStatusValidationError" } - -// Error satisfies the builtin error interface -func (e GrpcStatusValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcStatus.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcStatusValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcStatusValidationError{} - -// Validate checks the field values on HeaderMutation with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *HeaderMutation) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetSetHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderMutationValidationError{ - field: fmt.Sprintf("SetHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// HeaderMutationValidationError is the validation error returned by -// HeaderMutation.Validate if the designated constraints aren't met. -type HeaderMutationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderMutationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderMutationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderMutationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderMutationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderMutationValidationError) ErrorName() string { return "HeaderMutationValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderMutationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderMutation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderMutationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderMutationValidationError{} - -// Validate checks the field values on BodyMutation with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *BodyMutation) Validate() error { - if m == nil { - return nil - } - - switch m.Mutation.(type) { - - case *BodyMutation_Body: - // no validation rules for Body - - case *BodyMutation_ClearBody: - // no validation rules for ClearBody - - } - - return nil -} - -// BodyMutationValidationError is the validation error returned by -// BodyMutation.Validate if the designated constraints aren't met. -type BodyMutationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BodyMutationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BodyMutationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BodyMutationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BodyMutationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BodyMutationValidationError) ErrorName() string { return "BodyMutationValidationError" } - -// Error satisfies the builtin error interface -func (e BodyMutationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBodyMutation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BodyMutationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BodyMutationValidationError{} diff --git a/pkg/api/envoy/service/extension/v3/config_discovery.pb.go b/pkg/api/envoy/service/extension/v3/config_discovery.pb.go index 1a1d73ee17..c997124d64 100644 --- a/pkg/api/envoy/service/extension/v3/config_discovery.pb.go +++ b/pkg/api/envoy/service/extension/v3/config_discovery.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/extension/v3/config_discovery.proto -package envoy_service_extension_v3 +package extensionv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue // with importing services: https://github.com/google/protobuf/issues/4221 and // protoxform to upgrade the file. @@ -90,48 +85,51 @@ var file_envoy_service_extension_v3_config_discovery_proto_rawDesc = []byte{ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, - 0x09, 0x45, 0x63, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0x81, 0x04, 0x0a, 0x1f, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, - 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x15, - 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x63, + 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0x81, 0x04, 0x0a, 0x1f, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x16, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, + 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, + 0x74, 0x61, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, - 0x30, 0x01, 0x12, 0xa6, 0x01, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x21, 0x22, 0x1f, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x3a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x31, 0x8a, 0xa4, 0x96, - 0xf3, 0x07, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4d, - 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, + 0xa6, 0x01, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1f, + 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x31, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x2b, + 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9c, 0x01, 0x0a, 0x28, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0x88, + 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/extension/v3/config_discovery.pb.validate.go b/pkg/api/envoy/service/extension/v3/config_discovery.pb.validate.go index ecc9c9373d..73e6a490cf 100644 --- a/pkg/api/envoy/service/extension/v3/config_discovery.pb.validate.go +++ b/pkg/api/envoy/service/extension/v3/config_discovery.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/extension/v3/config_discovery.proto -package envoy_service_extension_v3 +package extensionv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on EcdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *EcdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EcdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EcdsDummyMultiError, or nil +// if none found. +func (m *EcdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *EcdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return EcdsDummyMultiError(errors) + } + return nil } +// EcdsDummyMultiError is an error wrapping multiple validation errors returned +// by EcdsDummy.ValidateAll() if the designated constraints aren't met. +type EcdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EcdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EcdsDummyMultiError) AllErrors() []error { return m } + // EcdsDummyValidationError is the validation error returned by // EcdsDummy.Validate if the designated constraints aren't met. type EcdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/health/v3/hds.pb.go b/pkg/api/envoy/service/health/v3/hds.pb.go index b47308f9fb..9bc15ff491 100644 --- a/pkg/api/envoy/service/health/v3/hds.pb.go +++ b/pkg/api/envoy/service/health/v3/hds.pb.go @@ -1,18 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/health/v3/hds.proto -package envoy_service_health_v3 +package healthv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - 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" @@ -31,10 +31,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Different Envoy instances may have different capabilities (e.g. Redis) // and/or have ports enabled for different protocols. type Capability_Protocol int32 @@ -242,7 +238,7 @@ func (x *EndpointHealth) GetHealthStatus() v3.HealthStatus { if x != nil { return x.HealthStatus } - return v3.HealthStatus_UNKNOWN + return v3.HealthStatus(0) } // Group endpoint health by locality under each cluster. @@ -567,9 +563,9 @@ type ClusterHealthCheck struct { ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` HealthChecks []*v3.HealthCheck `protobuf:"bytes,2,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` LocalityEndpoints []*LocalityEndpoints `protobuf:"bytes,3,rep,name=locality_endpoints,json=localityEndpoints,proto3" json:"locality_endpoints,omitempty"` - // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` + // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` // on connection when health checking. For more details, see - // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. + // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. TransportSocketMatches []*v32.Cluster_TransportSocketMatch `protobuf:"bytes,4,rep,name=transport_socket_matches,json=transportSocketMatches,proto3" json:"transport_socket_matches,omitempty"` } @@ -689,6 +685,46 @@ func (x *HealthCheckSpecifier) GetInterval() *duration.Duration { return nil } +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. +type HdsDummy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HdsDummy) Reset() { + *x = HdsDummy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HdsDummy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HdsDummy) ProtoMessage() {} + +func (x *HdsDummy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HdsDummy.ProtoReflect.Descriptor instead. +func (*HdsDummy) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{10} +} + var File_envoy_service_health_v3_hds_proto protoreflect.FileDescriptor var file_envoy_service_health_v3_hds_proto_rawDesc = []byte{ @@ -710,189 +746,195 @@ var file_envoy_service_health_v3_hds_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc8, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x12, 0x62, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x14, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x73, 0x22, 0x28, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, - 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x02, 0x3a, 0x2c, - 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xbf, 0x01, 0x0a, - 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, - 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, - 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcb, - 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x12, 0x3e, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x47, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, - 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0xa9, 0x01, 0x0a, - 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0xa9, 0x01, 0x0a, 0x16, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6c, 0x0a, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, - 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x17, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x22, 0x95, 0x02, 0x0a, 0x16, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x56, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x69, 0x0a, 0x18, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x16, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd8, 0x02, 0x0a, - 0x2a, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x18, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x00, 0x52, 0x16, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x4c, 0x9a, 0xc5, 0x88, 0x1e, 0x47, - 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, - 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x62, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x52, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0x28, 0x0a, 0x08, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, + 0x53, 0x10, 0x02, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x22, 0xbf, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, + 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, + 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0xcb, 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, + 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x22, 0xa9, 0x01, 0x0a, 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, - 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, - 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x22, 0x81, 0x03, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x12, 0x59, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x10, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x0f, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0xa9, 0x01, + 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6c, 0x0a, 0x19, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x6f, 0x0a, - 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x3a, 0x34, - 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x5f, 0x0a, - 0x15, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x13, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x35, - 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x32, 0xde, 0x02, - 0x0a, 0x16, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x43, + 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x52, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0x9e, 0x02, 0x0a, 0x16, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0xb3, 0x01, 0x0a, 0x10, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x43, 0x2e, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x69, 0x0a, 0x18, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd8, 0x02, 0x0a, 0x2a, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x18, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, + 0x16, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x4c, 0x9a, 0xc5, 0x88, 0x1e, 0x47, 0x0a, 0x45, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, + 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x81, + 0x03, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x12, 0x59, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x6f, 0x0a, 0x18, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x3a, 0x34, 0x9a, 0xc5, + 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x15, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x13, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x35, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x0a, 0x0a, 0x08, 0x48, + 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xde, 0x02, 0x0a, 0x16, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x33, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0x3e, - 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x48, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x00, 0x28, 0x01, + 0x30, 0x01, 0x12, 0xb3, 0x01, 0x0a, 0x10, 0x46, 0x65, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x2d, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0x87, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, + 0x76, 0x33, 0x42, 0x08, 0x48, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -908,7 +950,7 @@ func file_envoy_service_health_v3_hds_proto_rawDescGZIP() []byte { } var file_envoy_service_health_v3_hds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_service_health_v3_hds_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_envoy_service_health_v3_hds_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_envoy_service_health_v3_hds_proto_goTypes = []interface{}{ (Capability_Protocol)(0), // 0: envoy.service.health.v3.Capability.Protocol (*Capability)(nil), // 1: envoy.service.health.v3.Capability @@ -921,34 +963,35 @@ var file_envoy_service_health_v3_hds_proto_goTypes = []interface{}{ (*LocalityEndpoints)(nil), // 8: envoy.service.health.v3.LocalityEndpoints (*ClusterHealthCheck)(nil), // 9: envoy.service.health.v3.ClusterHealthCheck (*HealthCheckSpecifier)(nil), // 10: envoy.service.health.v3.HealthCheckSpecifier - (*v3.Node)(nil), // 11: envoy.config.core.v3.Node - (*v31.Endpoint)(nil), // 12: envoy.config.endpoint.v3.Endpoint - (v3.HealthStatus)(0), // 13: envoy.config.core.v3.HealthStatus - (*v3.Locality)(nil), // 14: envoy.config.core.v3.Locality - (*v3.HealthCheck)(nil), // 15: envoy.config.core.v3.HealthCheck - (*v32.Cluster_TransportSocketMatch)(nil), // 16: envoy.config.cluster.v3.Cluster.TransportSocketMatch - (*duration.Duration)(nil), // 17: google.protobuf.Duration + (*HdsDummy)(nil), // 11: envoy.service.health.v3.HdsDummy + (*v3.Node)(nil), // 12: envoy.config.core.v3.Node + (*v31.Endpoint)(nil), // 13: envoy.config.endpoint.v3.Endpoint + (v3.HealthStatus)(0), // 14: envoy.config.core.v3.HealthStatus + (*v3.Locality)(nil), // 15: envoy.config.core.v3.Locality + (*v3.HealthCheck)(nil), // 16: envoy.config.core.v3.HealthCheck + (*v32.Cluster_TransportSocketMatch)(nil), // 17: envoy.config.cluster.v3.Cluster.TransportSocketMatch + (*duration.Duration)(nil), // 18: google.protobuf.Duration } var file_envoy_service_health_v3_hds_proto_depIdxs = []int32{ 0, // 0: envoy.service.health.v3.Capability.health_check_protocols:type_name -> envoy.service.health.v3.Capability.Protocol - 11, // 1: envoy.service.health.v3.HealthCheckRequest.node:type_name -> envoy.config.core.v3.Node + 12, // 1: envoy.service.health.v3.HealthCheckRequest.node:type_name -> envoy.config.core.v3.Node 1, // 2: envoy.service.health.v3.HealthCheckRequest.capability:type_name -> envoy.service.health.v3.Capability - 12, // 3: envoy.service.health.v3.EndpointHealth.endpoint:type_name -> envoy.config.endpoint.v3.Endpoint - 13, // 4: envoy.service.health.v3.EndpointHealth.health_status:type_name -> envoy.config.core.v3.HealthStatus - 14, // 5: envoy.service.health.v3.LocalityEndpointsHealth.locality:type_name -> envoy.config.core.v3.Locality + 13, // 3: envoy.service.health.v3.EndpointHealth.endpoint:type_name -> envoy.config.endpoint.v3.Endpoint + 14, // 4: envoy.service.health.v3.EndpointHealth.health_status:type_name -> envoy.config.core.v3.HealthStatus + 15, // 5: envoy.service.health.v3.LocalityEndpointsHealth.locality:type_name -> envoy.config.core.v3.Locality 3, // 6: envoy.service.health.v3.LocalityEndpointsHealth.endpoints_health:type_name -> envoy.service.health.v3.EndpointHealth 4, // 7: envoy.service.health.v3.ClusterEndpointsHealth.locality_endpoints_health:type_name -> envoy.service.health.v3.LocalityEndpointsHealth 3, // 8: envoy.service.health.v3.EndpointHealthResponse.endpoints_health:type_name -> envoy.service.health.v3.EndpointHealth 5, // 9: envoy.service.health.v3.EndpointHealthResponse.cluster_endpoints_health:type_name -> envoy.service.health.v3.ClusterEndpointsHealth 2, // 10: envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse.health_check_request:type_name -> envoy.service.health.v3.HealthCheckRequest 6, // 11: envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse.endpoint_health_response:type_name -> envoy.service.health.v3.EndpointHealthResponse - 14, // 12: envoy.service.health.v3.LocalityEndpoints.locality:type_name -> envoy.config.core.v3.Locality - 12, // 13: envoy.service.health.v3.LocalityEndpoints.endpoints:type_name -> envoy.config.endpoint.v3.Endpoint - 15, // 14: envoy.service.health.v3.ClusterHealthCheck.health_checks:type_name -> envoy.config.core.v3.HealthCheck + 15, // 12: envoy.service.health.v3.LocalityEndpoints.locality:type_name -> envoy.config.core.v3.Locality + 13, // 13: envoy.service.health.v3.LocalityEndpoints.endpoints:type_name -> envoy.config.endpoint.v3.Endpoint + 16, // 14: envoy.service.health.v3.ClusterHealthCheck.health_checks:type_name -> envoy.config.core.v3.HealthCheck 8, // 15: envoy.service.health.v3.ClusterHealthCheck.locality_endpoints:type_name -> envoy.service.health.v3.LocalityEndpoints - 16, // 16: envoy.service.health.v3.ClusterHealthCheck.transport_socket_matches:type_name -> envoy.config.cluster.v3.Cluster.TransportSocketMatch + 17, // 16: envoy.service.health.v3.ClusterHealthCheck.transport_socket_matches:type_name -> envoy.config.cluster.v3.Cluster.TransportSocketMatch 9, // 17: envoy.service.health.v3.HealthCheckSpecifier.cluster_health_checks:type_name -> envoy.service.health.v3.ClusterHealthCheck - 17, // 18: envoy.service.health.v3.HealthCheckSpecifier.interval:type_name -> google.protobuf.Duration + 18, // 18: envoy.service.health.v3.HealthCheckSpecifier.interval:type_name -> google.protobuf.Duration 7, // 19: envoy.service.health.v3.HealthDiscoveryService.StreamHealthCheck:input_type -> envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse 7, // 20: envoy.service.health.v3.HealthDiscoveryService.FetchHealthCheck:input_type -> envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse 10, // 21: envoy.service.health.v3.HealthDiscoveryService.StreamHealthCheck:output_type -> envoy.service.health.v3.HealthCheckSpecifier @@ -1086,6 +1129,18 @@ func file_envoy_service_health_v3_hds_proto_init() { return nil } } + file_envoy_service_health_v3_hds_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HdsDummy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_envoy_service_health_v3_hds_proto_msgTypes[6].OneofWrappers = []interface{}{ (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest)(nil), @@ -1097,7 +1152,7 @@ func file_envoy_service_health_v3_hds_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_service_health_v3_hds_proto_rawDesc, NumEnums: 1, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/api/envoy/service/health/v3/hds.pb.validate.go b/pkg/api/envoy/service/health/v3/hds.pb.validate.go index 62358c67de..373e5a90d7 100644 --- a/pkg/api/envoy/service/health/v3/hds.pb.validate.go +++ b/pkg/api/envoy/service/health/v3/hds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/health/v3/hds.proto -package envoy_service_health_v3 +package healthv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" ) @@ -32,21 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort _ = v3.HealthStatus(0) ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Capability) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Capability with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CapabilityMultiError, or +// nil if none found. +func (m *Capability) ValidateAll() error { + return m.validate(true) +} + +func (m *Capability) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return CapabilityMultiError(errors) + } + return nil } +// CapabilityMultiError is an error wrapping multiple validation errors +// returned by Capability.ValidateAll() if the designated constraints aren't met. +type CapabilityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CapabilityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CapabilityMultiError) AllErrors() []error { return m } + // CapabilityValidationError is the validation error returned by // Capability.Validate if the designated constraints aren't met. type CapabilityValidationError struct { @@ -103,13 +140,46 @@ var _ interface { // Validate checks the field values on HealthCheckRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckRequestMultiError, or nil if none found. +func (m *HealthCheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Node", @@ -119,7 +189,26 @@ func (m *HealthCheckRequest) Validate() error { } } - if v, ok := interface{}(m.GetCapability()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCapability()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCapability()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Capability", @@ -129,9 +218,30 @@ func (m *HealthCheckRequest) Validate() error { } } + if len(errors) > 0 { + return HealthCheckRequestMultiError(errors) + } + return nil } +// HealthCheckRequestMultiError is an error wrapping multiple validation errors +// returned by HealthCheckRequest.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckRequestMultiError) AllErrors() []error { return m } + // HealthCheckRequestValidationError is the validation error returned by // HealthCheckRequest.Validate if the designated constraints aren't met. type HealthCheckRequestValidationError struct { @@ -189,14 +299,47 @@ var _ interface { } = HealthCheckRequestValidationError{} // Validate checks the field values on EndpointHealth with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *EndpointHealth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointHealth with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EndpointHealthMultiError, +// or nil if none found. +func (m *EndpointHealth) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointHealth) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthValidationError{ field: "Endpoint", @@ -208,9 +351,30 @@ func (m *EndpointHealth) Validate() error { // no validation rules for HealthStatus + if len(errors) > 0 { + return EndpointHealthMultiError(errors) + } + return nil } +// EndpointHealthMultiError is an error wrapping multiple validation errors +// returned by EndpointHealth.ValidateAll() if the designated constraints +// aren't met. +type EndpointHealthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointHealthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointHealthMultiError) AllErrors() []error { return m } + // EndpointHealthValidationError is the validation error returned by // EndpointHealth.Validate if the designated constraints aren't met. type EndpointHealthValidationError struct { @@ -267,13 +431,46 @@ var _ interface { // Validate checks the field values on LocalityEndpointsHealth with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *LocalityEndpointsHealth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityEndpointsHealth with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LocalityEndpointsHealthMultiError, or nil if none found. +func (m *LocalityEndpointsHealth) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityEndpointsHealth) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsHealthValidationError{ field: "Locality", @@ -286,7 +483,26 @@ func (m *LocalityEndpointsHealth) Validate() error { for idx, item := range m.GetEndpointsHealth() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsHealthValidationError{ field: fmt.Sprintf("EndpointsHealth[%v]", idx), @@ -298,9 +514,30 @@ func (m *LocalityEndpointsHealth) Validate() error { } + if len(errors) > 0 { + return LocalityEndpointsHealthMultiError(errors) + } + return nil } +// LocalityEndpointsHealthMultiError is an error wrapping multiple validation +// errors returned by LocalityEndpointsHealth.ValidateAll() if the designated +// constraints aren't met. +type LocalityEndpointsHealthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityEndpointsHealthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityEndpointsHealthMultiError) AllErrors() []error { return m } + // LocalityEndpointsHealthValidationError is the validation error returned by // LocalityEndpointsHealth.Validate if the designated constraints aren't met. type LocalityEndpointsHealthValidationError struct { @@ -359,18 +596,51 @@ var _ interface { // Validate checks the field values on ClusterEndpointsHealth with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterEndpointsHealth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterEndpointsHealth with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterEndpointsHealthMultiError, or nil if none found. +func (m *ClusterEndpointsHealth) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterEndpointsHealth) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ClusterName for idx, item := range m.GetLocalityEndpointsHealth() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterEndpointsHealthValidationError{ + field: fmt.Sprintf("LocalityEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterEndpointsHealthValidationError{ + field: fmt.Sprintf("LocalityEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterEndpointsHealthValidationError{ field: fmt.Sprintf("LocalityEndpointsHealth[%v]", idx), @@ -382,9 +652,30 @@ func (m *ClusterEndpointsHealth) Validate() error { } + if len(errors) > 0 { + return ClusterEndpointsHealthMultiError(errors) + } + return nil } +// ClusterEndpointsHealthMultiError is an error wrapping multiple validation +// errors returned by ClusterEndpointsHealth.ValidateAll() if the designated +// constraints aren't met. +type ClusterEndpointsHealthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterEndpointsHealthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterEndpointsHealthMultiError) AllErrors() []error { return m } + // ClusterEndpointsHealthValidationError is the validation error returned by // ClusterEndpointsHealth.Validate if the designated constraints aren't met. type ClusterEndpointsHealthValidationError struct { @@ -443,16 +734,49 @@ var _ interface { // Validate checks the field values on EndpointHealthResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *EndpointHealthResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointHealthResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EndpointHealthResponseMultiError, or nil if none found. +func (m *EndpointHealthResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointHealthResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetEndpointsHealth() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthResponseValidationError{ field: fmt.Sprintf("EndpointsHealth[%v]", idx), @@ -467,7 +791,26 @@ func (m *EndpointHealthResponse) Validate() error { for idx, item := range m.GetClusterEndpointsHealth() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("ClusterEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("ClusterEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthResponseValidationError{ field: fmt.Sprintf("ClusterEndpointsHealth[%v]", idx), @@ -479,9 +822,30 @@ func (m *EndpointHealthResponse) Validate() error { } + if len(errors) > 0 { + return EndpointHealthResponseMultiError(errors) + } + return nil } +// EndpointHealthResponseMultiError is an error wrapping multiple validation +// errors returned by EndpointHealthResponse.ValidateAll() if the designated +// constraints aren't met. +type EndpointHealthResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointHealthResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointHealthResponseMultiError) AllErrors() []error { return m } + // EndpointHealthResponseValidationError is the validation error returned by // EndpointHealthResponse.Validate if the designated constraints aren't met. type EndpointHealthResponseValidationError struct { @@ -540,17 +904,52 @@ var _ interface { // Validate checks the field values on // HealthCheckRequestOrEndpointHealthResponse with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HealthCheckRequestOrEndpointHealthResponse with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// HealthCheckRequestOrEndpointHealthResponseMultiError, or nil if none found. +func (m *HealthCheckRequestOrEndpointHealthResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckRequestOrEndpointHealthResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.RequestType.(type) { case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - if v, ok := interface{}(m.GetHealthCheckRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHealthCheckRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "HealthCheckRequest", @@ -562,7 +961,26 @@ func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: - if v, ok := interface{}(m.GetEndpointHealthResponse()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpointHealthResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointHealthResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "EndpointHealthResponse", @@ -574,9 +992,31 @@ func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { } + if len(errors) > 0 { + return HealthCheckRequestOrEndpointHealthResponseMultiError(errors) + } + return nil } +// HealthCheckRequestOrEndpointHealthResponseMultiError is an error wrapping +// multiple validation errors returned by +// HealthCheckRequestOrEndpointHealthResponse.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckRequestOrEndpointHealthResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckRequestOrEndpointHealthResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckRequestOrEndpointHealthResponseMultiError) AllErrors() []error { return m } + // HealthCheckRequestOrEndpointHealthResponseValidationError is the validation // error returned by HealthCheckRequestOrEndpointHealthResponse.Validate if // the designated constraints aren't met. @@ -635,14 +1075,47 @@ var _ interface { } = HealthCheckRequestOrEndpointHealthResponseValidationError{} // Validate checks the field values on LocalityEndpoints with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LocalityEndpoints) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityEndpoints with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LocalityEndpointsMultiError, or nil if none found. +func (m *LocalityEndpoints) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityEndpoints) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsValidationError{ field: "Locality", @@ -655,7 +1128,26 @@ func (m *LocalityEndpoints) Validate() error { for idx, item := range m.GetEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsValidationError{ field: fmt.Sprintf("Endpoints[%v]", idx), @@ -667,9 +1159,30 @@ func (m *LocalityEndpoints) Validate() error { } + if len(errors) > 0 { + return LocalityEndpointsMultiError(errors) + } + return nil } +// LocalityEndpointsMultiError is an error wrapping multiple validation errors +// returned by LocalityEndpoints.ValidateAll() if the designated constraints +// aren't met. +type LocalityEndpointsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityEndpointsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityEndpointsMultiError) AllErrors() []error { return m } + // LocalityEndpointsValidationError is the validation error returned by // LocalityEndpoints.Validate if the designated constraints aren't met. type LocalityEndpointsValidationError struct { @@ -728,18 +1241,51 @@ var _ interface { // Validate checks the field values on ClusterHealthCheck with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClusterHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterHealthCheck with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClusterHealthCheckMultiError, or nil if none found. +func (m *ClusterHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterHealthCheck) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for ClusterName for idx, item := range m.GetHealthChecks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("HealthChecks[%v]", idx), @@ -754,7 +1300,26 @@ func (m *ClusterHealthCheck) Validate() error { for idx, item := range m.GetLocalityEndpoints() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("LocalityEndpoints[%v]", idx), @@ -769,7 +1334,26 @@ func (m *ClusterHealthCheck) Validate() error { for idx, item := range m.GetTransportSocketMatches() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("TransportSocketMatches[%v]", idx), @@ -781,9 +1365,30 @@ func (m *ClusterHealthCheck) Validate() error { } + if len(errors) > 0 { + return ClusterHealthCheckMultiError(errors) + } + return nil } +// ClusterHealthCheckMultiError is an error wrapping multiple validation errors +// returned by ClusterHealthCheck.ValidateAll() if the designated constraints +// aren't met. +type ClusterHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterHealthCheckMultiError) AllErrors() []error { return m } + // ClusterHealthCheckValidationError is the validation error returned by // ClusterHealthCheck.Validate if the designated constraints aren't met. type ClusterHealthCheckValidationError struct { @@ -842,16 +1447,49 @@ var _ interface { // Validate checks the field values on HealthCheckSpecifier with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HealthCheckSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckSpecifier with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HealthCheckSpecifierMultiError, or nil if none found. +func (m *HealthCheckSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckSpecifier) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetClusterHealthChecks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), @@ -863,7 +1501,26 @@ func (m *HealthCheckSpecifier) Validate() error { } - if v, ok := interface{}(m.GetInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: "Interval", @@ -873,9 +1530,30 @@ func (m *HealthCheckSpecifier) Validate() error { } } + if len(errors) > 0 { + return HealthCheckSpecifierMultiError(errors) + } + return nil } +// HealthCheckSpecifierMultiError is an error wrapping multiple validation +// errors returned by HealthCheckSpecifier.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckSpecifierMultiError) AllErrors() []error { return m } + // HealthCheckSpecifierValidationError is the validation error returned by // HealthCheckSpecifier.Validate if the designated constraints aren't met. type HealthCheckSpecifierValidationError struct { @@ -931,3 +1609,102 @@ var _ interface { Cause() error ErrorName() string } = HealthCheckSpecifierValidationError{} + +// Validate checks the field values on HdsDummy with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HdsDummyMultiError, or nil +// if none found. +func (m *HdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *HdsDummy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return HdsDummyMultiError(errors) + } + + return nil +} + +// HdsDummyMultiError is an error wrapping multiple validation errors returned +// by HdsDummy.ValidateAll() if the designated constraints aren't met. +type HdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HdsDummyMultiError) AllErrors() []error { return m } + +// HdsDummyValidationError is the validation error returned by +// HdsDummy.Validate if the designated constraints aren't met. +type HdsDummyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HdsDummyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HdsDummyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HdsDummyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HdsDummyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HdsDummyValidationError) ErrorName() string { return "HdsDummyValidationError" } + +// Error satisfies the builtin error interface +func (e HdsDummyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHdsDummy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HdsDummyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HdsDummyValidationError{} diff --git a/pkg/api/envoy/service/health/v4alpha/hds.pb.go b/pkg/api/envoy/service/health/v4alpha/hds.pb.go deleted file mode 100644 index d14ea4272d..0000000000 --- a/pkg/api/envoy/service/health/v4alpha/hds.pb.go +++ /dev/null @@ -1,1350 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/health/v4alpha/hds.proto - -package envoy_service_health_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - 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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Different Envoy instances may have different capabilities (e.g. Redis) -// and/or have ports enabled for different protocols. -type Capability_Protocol int32 - -const ( - Capability_HTTP Capability_Protocol = 0 - Capability_TCP Capability_Protocol = 1 - Capability_REDIS Capability_Protocol = 2 -) - -// Enum value maps for Capability_Protocol. -var ( - Capability_Protocol_name = map[int32]string{ - 0: "HTTP", - 1: "TCP", - 2: "REDIS", - } - Capability_Protocol_value = map[string]int32{ - "HTTP": 0, - "TCP": 1, - "REDIS": 2, - } -) - -func (x Capability_Protocol) Enum() *Capability_Protocol { - p := new(Capability_Protocol) - *p = x - return p -} - -func (x Capability_Protocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Capability_Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_service_health_v4alpha_hds_proto_enumTypes[0].Descriptor() -} - -func (Capability_Protocol) Type() protoreflect.EnumType { - return &file_envoy_service_health_v4alpha_hds_proto_enumTypes[0] -} - -func (x Capability_Protocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Capability_Protocol.Descriptor instead. -func (Capability_Protocol) EnumDescriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{0, 0} -} - -// Defines supported protocols etc, so the management server can assign proper -// endpoints to healthcheck. -type Capability struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HealthCheckProtocols []Capability_Protocol `protobuf:"varint,1,rep,packed,name=health_check_protocols,json=healthCheckProtocols,proto3,enum=envoy.service.health.v4alpha.Capability_Protocol" json:"health_check_protocols,omitempty"` -} - -func (x *Capability) Reset() { - *x = Capability{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Capability) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Capability) ProtoMessage() {} - -func (x *Capability) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Capability.ProtoReflect.Descriptor instead. -func (*Capability) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{0} -} - -func (x *Capability) GetHealthCheckProtocols() []Capability_Protocol { - if x != nil { - return x.HealthCheckProtocols - } - return nil -} - -type HealthCheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - Capability *Capability `protobuf:"bytes,2,opt,name=capability,proto3" json:"capability,omitempty"` -} - -func (x *HealthCheckRequest) Reset() { - *x = HealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequest) ProtoMessage() {} - -func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead. -func (*HealthCheckRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{1} -} - -func (x *HealthCheckRequest) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *HealthCheckRequest) GetCapability() *Capability { - if x != nil { - return x.Capability - } - return nil -} - -type EndpointHealth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Endpoint *v3.Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - HealthStatus v4alpha.HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=envoy.config.core.v4alpha.HealthStatus" json:"health_status,omitempty"` -} - -func (x *EndpointHealth) Reset() { - *x = EndpointHealth{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointHealth) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointHealth) ProtoMessage() {} - -func (x *EndpointHealth) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointHealth.ProtoReflect.Descriptor instead. -func (*EndpointHealth) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{2} -} - -func (x *EndpointHealth) GetEndpoint() *v3.Endpoint { - if x != nil { - return x.Endpoint - } - return nil -} - -func (x *EndpointHealth) GetHealthStatus() v4alpha.HealthStatus { - if x != nil { - return x.HealthStatus - } - return v4alpha.HealthStatus_UNKNOWN -} - -// Group endpoint health by locality under each cluster. -type LocalityEndpointsHealth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Locality *v4alpha.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` - EndpointsHealth []*EndpointHealth `protobuf:"bytes,2,rep,name=endpoints_health,json=endpointsHealth,proto3" json:"endpoints_health,omitempty"` -} - -func (x *LocalityEndpointsHealth) Reset() { - *x = LocalityEndpointsHealth{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LocalityEndpointsHealth) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalityEndpointsHealth) ProtoMessage() {} - -func (x *LocalityEndpointsHealth) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalityEndpointsHealth.ProtoReflect.Descriptor instead. -func (*LocalityEndpointsHealth) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{3} -} - -func (x *LocalityEndpointsHealth) GetLocality() *v4alpha.Locality { - if x != nil { - return x.Locality - } - return nil -} - -func (x *LocalityEndpointsHealth) GetEndpointsHealth() []*EndpointHealth { - if x != nil { - return x.EndpointsHealth - } - return nil -} - -// The health status of endpoints in a cluster. The cluster name and locality -// should match the corresponding fields in ClusterHealthCheck message. -type ClusterEndpointsHealth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - LocalityEndpointsHealth []*LocalityEndpointsHealth `protobuf:"bytes,2,rep,name=locality_endpoints_health,json=localityEndpointsHealth,proto3" json:"locality_endpoints_health,omitempty"` -} - -func (x *ClusterEndpointsHealth) Reset() { - *x = ClusterEndpointsHealth{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterEndpointsHealth) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterEndpointsHealth) ProtoMessage() {} - -func (x *ClusterEndpointsHealth) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterEndpointsHealth.ProtoReflect.Descriptor instead. -func (*ClusterEndpointsHealth) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{4} -} - -func (x *ClusterEndpointsHealth) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *ClusterEndpointsHealth) GetLocalityEndpointsHealth() []*LocalityEndpointsHealth { - if x != nil { - return x.LocalityEndpointsHealth - } - return nil -} - -type EndpointHealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Deprecated - Flat list of endpoint health information. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedEndpointsHealth []*EndpointHealth `protobuf:"bytes,1,rep,name=hidden_envoy_deprecated_endpoints_health,json=hiddenEnvoyDeprecatedEndpointsHealth,proto3" json:"hidden_envoy_deprecated_endpoints_health,omitempty"` - // Organize Endpoint health information by cluster. - ClusterEndpointsHealth []*ClusterEndpointsHealth `protobuf:"bytes,2,rep,name=cluster_endpoints_health,json=clusterEndpointsHealth,proto3" json:"cluster_endpoints_health,omitempty"` -} - -func (x *EndpointHealthResponse) Reset() { - *x = EndpointHealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointHealthResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointHealthResponse) ProtoMessage() {} - -func (x *EndpointHealthResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointHealthResponse.ProtoReflect.Descriptor instead. -func (*EndpointHealthResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{5} -} - -// Deprecated: Do not use. -func (x *EndpointHealthResponse) GetHiddenEnvoyDeprecatedEndpointsHealth() []*EndpointHealth { - if x != nil { - return x.HiddenEnvoyDeprecatedEndpointsHealth - } - return nil -} - -func (x *EndpointHealthResponse) GetClusterEndpointsHealth() []*ClusterEndpointsHealth { - if x != nil { - return x.ClusterEndpointsHealth - } - return nil -} - -type HealthCheckRequestOrEndpointHealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to RequestType: - // *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest - // *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse - RequestType isHealthCheckRequestOrEndpointHealthResponse_RequestType `protobuf_oneof:"request_type"` -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) Reset() { - *x = HealthCheckRequestOrEndpointHealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequestOrEndpointHealthResponse) ProtoMessage() {} - -func (x *HealthCheckRequestOrEndpointHealthResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequestOrEndpointHealthResponse.ProtoReflect.Descriptor instead. -func (*HealthCheckRequestOrEndpointHealthResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{6} -} - -func (m *HealthCheckRequestOrEndpointHealthResponse) GetRequestType() isHealthCheckRequestOrEndpointHealthResponse_RequestType { - if m != nil { - return m.RequestType - } - return nil -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) GetHealthCheckRequest() *HealthCheckRequest { - if x, ok := x.GetRequestType().(*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest); ok { - return x.HealthCheckRequest - } - return nil -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) GetEndpointHealthResponse() *EndpointHealthResponse { - if x, ok := x.GetRequestType().(*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse); ok { - return x.EndpointHealthResponse - } - return nil -} - -type isHealthCheckRequestOrEndpointHealthResponse_RequestType interface { - isHealthCheckRequestOrEndpointHealthResponse_RequestType() -} - -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() { -} - -type LocalityEndpoints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Locality *v4alpha.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` - Endpoints []*v3.Endpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` -} - -func (x *LocalityEndpoints) Reset() { - *x = LocalityEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LocalityEndpoints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalityEndpoints) ProtoMessage() {} - -func (x *LocalityEndpoints) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalityEndpoints.ProtoReflect.Descriptor instead. -func (*LocalityEndpoints) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{7} -} - -func (x *LocalityEndpoints) GetLocality() *v4alpha.Locality { - if x != nil { - return x.Locality - } - return nil -} - -func (x *LocalityEndpoints) GetEndpoints() []*v3.Endpoint { - if x != nil { - return x.Endpoints - } - 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 { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - HealthChecks []*v4alpha.HealthCheck `protobuf:"bytes,2,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` - LocalityEndpoints []*LocalityEndpoints `protobuf:"bytes,3,rep,name=locality_endpoints,json=localityEndpoints,proto3" json:"locality_endpoints,omitempty"` - // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` - // on connection when health checking. For more details, see - // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. - TransportSocketMatches []*v4alpha1.Cluster_TransportSocketMatch `protobuf:"bytes,4,rep,name=transport_socket_matches,json=transportSocketMatches,proto3" json:"transport_socket_matches,omitempty"` -} - -func (x *ClusterHealthCheck) Reset() { - *x = ClusterHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterHealthCheck) ProtoMessage() {} - -func (x *ClusterHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterHealthCheck.ProtoReflect.Descriptor instead. -func (*ClusterHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{8} -} - -func (x *ClusterHealthCheck) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *ClusterHealthCheck) GetHealthChecks() []*v4alpha.HealthCheck { - if x != nil { - return x.HealthChecks - } - return nil -} - -func (x *ClusterHealthCheck) GetLocalityEndpoints() []*LocalityEndpoints { - if x != nil { - return x.LocalityEndpoints - } - return nil -} - -func (x *ClusterHealthCheck) GetTransportSocketMatches() []*v4alpha1.Cluster_TransportSocketMatch { - if x != nil { - return x.TransportSocketMatches - } - return nil -} - -type HealthCheckSpecifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClusterHealthChecks []*ClusterHealthCheck `protobuf:"bytes,1,rep,name=cluster_health_checks,json=clusterHealthChecks,proto3" json:"cluster_health_checks,omitempty"` - // The default is 1 second. - Interval *duration.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` -} - -func (x *HealthCheckSpecifier) Reset() { - *x = HealthCheckSpecifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckSpecifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckSpecifier) ProtoMessage() {} - -func (x *HealthCheckSpecifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_health_v4alpha_hds_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckSpecifier.ProtoReflect.Descriptor instead. -func (*HealthCheckSpecifier) Descriptor() ([]byte, []int) { - return file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP(), []int{9} -} - -func (x *HealthCheckSpecifier) GetClusterHealthChecks() []*ClusterHealthCheck { - if x != nil { - return x.ClusterHealthChecks - } - return nil -} - -func (x *HealthCheckSpecifier) GetInterval() *duration.Duration { - if x != nil { - return x.Interval - } - return nil -} - -var File_envoy_service_health_v4alpha_hds_proto protoreflect.FileDescriptor - -var file_envoy_service_health_v4alpha_hds_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x68, - 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, - 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x0a, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x67, 0x0a, 0x16, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x14, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x73, 0x22, 0x28, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x08, - 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x02, 0x3a, 0x29, 0x9a, 0xc5, - 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xc6, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, - 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x9a, - 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xcd, 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, - 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, - 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x22, 0xeb, 0x01, 0x0a, 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x57, 0x0a, - 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, - 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0xe5, - 0x01, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x71, 0x0a, 0x19, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x3a, - 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0xca, 0x02, 0x0a, 0x16, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x88, 0x01, 0x0a, 0x28, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x42, 0x02, 0x18, 0x01, 0x52, 0x24, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x6e, 0x0a, 0x18, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x52, 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x3a, 0x35, 0x9a, 0xc5, - 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xdf, 0x02, 0x0a, 0x2a, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x64, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x00, 0x52, 0x16, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x49, 0x9a, 0xc5, 0x88, 0x1e, - 0x44, 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, - 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, - 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x3a, 0x30, - 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x22, 0x8d, 0x03, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x5e, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x74, 0x0a, 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x3a, 0x31, 0x9a, - 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x22, 0xe8, 0x01, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x15, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x13, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, - 0x35, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x32, 0xf2, 0x02, 0x0a, 0x16, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x48, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x12, 0xbd, 0x01, 0x0a, 0x10, 0x46, 0x65, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x33, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, - 0x42, 0x43, 0x0a, 0x2a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, - 0x48, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_health_v4alpha_hds_proto_rawDescOnce sync.Once - file_envoy_service_health_v4alpha_hds_proto_rawDescData = file_envoy_service_health_v4alpha_hds_proto_rawDesc -) - -func file_envoy_service_health_v4alpha_hds_proto_rawDescGZIP() []byte { - file_envoy_service_health_v4alpha_hds_proto_rawDescOnce.Do(func() { - file_envoy_service_health_v4alpha_hds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_health_v4alpha_hds_proto_rawDescData) - }) - return file_envoy_service_health_v4alpha_hds_proto_rawDescData -} - -var file_envoy_service_health_v4alpha_hds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_service_health_v4alpha_hds_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_envoy_service_health_v4alpha_hds_proto_goTypes = []interface{}{ - (Capability_Protocol)(0), // 0: envoy.service.health.v4alpha.Capability.Protocol - (*Capability)(nil), // 1: envoy.service.health.v4alpha.Capability - (*HealthCheckRequest)(nil), // 2: envoy.service.health.v4alpha.HealthCheckRequest - (*EndpointHealth)(nil), // 3: envoy.service.health.v4alpha.EndpointHealth - (*LocalityEndpointsHealth)(nil), // 4: envoy.service.health.v4alpha.LocalityEndpointsHealth - (*ClusterEndpointsHealth)(nil), // 5: envoy.service.health.v4alpha.ClusterEndpointsHealth - (*EndpointHealthResponse)(nil), // 6: envoy.service.health.v4alpha.EndpointHealthResponse - (*HealthCheckRequestOrEndpointHealthResponse)(nil), // 7: envoy.service.health.v4alpha.HealthCheckRequestOrEndpointHealthResponse - (*LocalityEndpoints)(nil), // 8: envoy.service.health.v4alpha.LocalityEndpoints - (*ClusterHealthCheck)(nil), // 9: envoy.service.health.v4alpha.ClusterHealthCheck - (*HealthCheckSpecifier)(nil), // 10: envoy.service.health.v4alpha.HealthCheckSpecifier - (*v4alpha.Node)(nil), // 11: envoy.config.core.v4alpha.Node - (*v3.Endpoint)(nil), // 12: envoy.config.endpoint.v3.Endpoint - (v4alpha.HealthStatus)(0), // 13: envoy.config.core.v4alpha.HealthStatus - (*v4alpha.Locality)(nil), // 14: envoy.config.core.v4alpha.Locality - (*v4alpha.HealthCheck)(nil), // 15: envoy.config.core.v4alpha.HealthCheck - (*v4alpha1.Cluster_TransportSocketMatch)(nil), // 16: envoy.config.cluster.v4alpha.Cluster.TransportSocketMatch - (*duration.Duration)(nil), // 17: google.protobuf.Duration -} -var file_envoy_service_health_v4alpha_hds_proto_depIdxs = []int32{ - 0, // 0: envoy.service.health.v4alpha.Capability.health_check_protocols:type_name -> envoy.service.health.v4alpha.Capability.Protocol - 11, // 1: envoy.service.health.v4alpha.HealthCheckRequest.node:type_name -> envoy.config.core.v4alpha.Node - 1, // 2: envoy.service.health.v4alpha.HealthCheckRequest.capability:type_name -> envoy.service.health.v4alpha.Capability - 12, // 3: envoy.service.health.v4alpha.EndpointHealth.endpoint:type_name -> envoy.config.endpoint.v3.Endpoint - 13, // 4: envoy.service.health.v4alpha.EndpointHealth.health_status:type_name -> envoy.config.core.v4alpha.HealthStatus - 14, // 5: envoy.service.health.v4alpha.LocalityEndpointsHealth.locality:type_name -> envoy.config.core.v4alpha.Locality - 3, // 6: envoy.service.health.v4alpha.LocalityEndpointsHealth.endpoints_health:type_name -> envoy.service.health.v4alpha.EndpointHealth - 4, // 7: envoy.service.health.v4alpha.ClusterEndpointsHealth.locality_endpoints_health:type_name -> envoy.service.health.v4alpha.LocalityEndpointsHealth - 3, // 8: envoy.service.health.v4alpha.EndpointHealthResponse.hidden_envoy_deprecated_endpoints_health:type_name -> envoy.service.health.v4alpha.EndpointHealth - 5, // 9: envoy.service.health.v4alpha.EndpointHealthResponse.cluster_endpoints_health:type_name -> envoy.service.health.v4alpha.ClusterEndpointsHealth - 2, // 10: envoy.service.health.v4alpha.HealthCheckRequestOrEndpointHealthResponse.health_check_request:type_name -> envoy.service.health.v4alpha.HealthCheckRequest - 6, // 11: envoy.service.health.v4alpha.HealthCheckRequestOrEndpointHealthResponse.endpoint_health_response:type_name -> envoy.service.health.v4alpha.EndpointHealthResponse - 14, // 12: envoy.service.health.v4alpha.LocalityEndpoints.locality:type_name -> envoy.config.core.v4alpha.Locality - 12, // 13: envoy.service.health.v4alpha.LocalityEndpoints.endpoints:type_name -> envoy.config.endpoint.v3.Endpoint - 15, // 14: envoy.service.health.v4alpha.ClusterHealthCheck.health_checks:type_name -> envoy.config.core.v4alpha.HealthCheck - 8, // 15: envoy.service.health.v4alpha.ClusterHealthCheck.locality_endpoints:type_name -> envoy.service.health.v4alpha.LocalityEndpoints - 16, // 16: envoy.service.health.v4alpha.ClusterHealthCheck.transport_socket_matches:type_name -> envoy.config.cluster.v4alpha.Cluster.TransportSocketMatch - 9, // 17: envoy.service.health.v4alpha.HealthCheckSpecifier.cluster_health_checks:type_name -> envoy.service.health.v4alpha.ClusterHealthCheck - 17, // 18: envoy.service.health.v4alpha.HealthCheckSpecifier.interval:type_name -> google.protobuf.Duration - 7, // 19: envoy.service.health.v4alpha.HealthDiscoveryService.StreamHealthCheck:input_type -> envoy.service.health.v4alpha.HealthCheckRequestOrEndpointHealthResponse - 7, // 20: envoy.service.health.v4alpha.HealthDiscoveryService.FetchHealthCheck:input_type -> envoy.service.health.v4alpha.HealthCheckRequestOrEndpointHealthResponse - 10, // 21: envoy.service.health.v4alpha.HealthDiscoveryService.StreamHealthCheck:output_type -> envoy.service.health.v4alpha.HealthCheckSpecifier - 10, // 22: envoy.service.health.v4alpha.HealthDiscoveryService.FetchHealthCheck:output_type -> envoy.service.health.v4alpha.HealthCheckSpecifier - 21, // [21:23] is the sub-list for method output_type - 19, // [19:21] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_envoy_service_health_v4alpha_hds_proto_init() } -func file_envoy_service_health_v4alpha_hds_proto_init() { - if File_envoy_service_health_v4alpha_hds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_health_v4alpha_hds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Capability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalityEndpointsHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterEndpointsHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointHealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequestOrEndpointHealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalityEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckSpecifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_service_health_v4alpha_hds_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest)(nil), - (*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_health_v4alpha_hds_proto_rawDesc, - NumEnums: 1, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_health_v4alpha_hds_proto_goTypes, - DependencyIndexes: file_envoy_service_health_v4alpha_hds_proto_depIdxs, - EnumInfos: file_envoy_service_health_v4alpha_hds_proto_enumTypes, - MessageInfos: file_envoy_service_health_v4alpha_hds_proto_msgTypes, - }.Build() - File_envoy_service_health_v4alpha_hds_proto = out.File - file_envoy_service_health_v4alpha_hds_proto_rawDesc = nil - file_envoy_service_health_v4alpha_hds_proto_goTypes = nil - file_envoy_service_health_v4alpha_hds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// HealthDiscoveryServiceClient is the client API for HealthDiscoveryService service. -// -// 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) -} - -type healthDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHealthDiscoveryServiceClient(cc grpc.ClientConnInterface) HealthDiscoveryServiceClient { - return &healthDiscoveryServiceClient{cc} -} - -func (c *healthDiscoveryServiceClient) StreamHealthCheck(ctx context.Context, opts ...grpc.CallOption) (HealthDiscoveryService_StreamHealthCheckClient, error) { - stream, err := c.cc.NewStream(ctx, &_HealthDiscoveryService_serviceDesc.Streams[0], "/envoy.service.health.v4alpha.HealthDiscoveryService/StreamHealthCheck", opts...) - if err != nil { - return nil, err - } - x := &healthDiscoveryServiceStreamHealthCheckClient{stream} - return x, nil -} - -type HealthDiscoveryService_StreamHealthCheckClient interface { - Send(*HealthCheckRequestOrEndpointHealthResponse) error - Recv() (*HealthCheckSpecifier, error) - grpc.ClientStream -} - -type healthDiscoveryServiceStreamHealthCheckClient struct { - grpc.ClientStream -} - -func (x *healthDiscoveryServiceStreamHealthCheckClient) Send(m *HealthCheckRequestOrEndpointHealthResponse) error { - return x.ClientStream.SendMsg(m) -} - -func (x *healthDiscoveryServiceStreamHealthCheckClient) Recv() (*HealthCheckSpecifier, error) { - m := new(HealthCheckSpecifier) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *healthDiscoveryServiceClient) FetchHealthCheck(ctx context.Context, in *HealthCheckRequestOrEndpointHealthResponse, opts ...grpc.CallOption) (*HealthCheckSpecifier, error) { - out := new(HealthCheckSpecifier) - err := c.cc.Invoke(ctx, "/envoy.service.health.v4alpha.HealthDiscoveryService/FetchHealthCheck", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// 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(HealthDiscoveryService_StreamHealthCheckServer) error { - return status.Errorf(codes.Unimplemented, "method StreamHealthCheck not implemented") -} -func (*UnimplementedHealthDiscoveryServiceServer) FetchHealthCheck(context.Context, *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) -} - -func _HealthDiscoveryService_StreamHealthCheck_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(HealthDiscoveryServiceServer).StreamHealthCheck(&healthDiscoveryServiceStreamHealthCheckServer{stream}) -} - -type HealthDiscoveryService_StreamHealthCheckServer interface { - Send(*HealthCheckSpecifier) error - Recv() (*HealthCheckRequestOrEndpointHealthResponse, error) - grpc.ServerStream -} - -type healthDiscoveryServiceStreamHealthCheckServer struct { - grpc.ServerStream -} - -func (x *healthDiscoveryServiceStreamHealthCheckServer) Send(m *HealthCheckSpecifier) error { - return x.ServerStream.SendMsg(m) -} - -func (x *healthDiscoveryServiceStreamHealthCheckServer) Recv() (*HealthCheckRequestOrEndpointHealthResponse, error) { - m := new(HealthCheckRequestOrEndpointHealthResponse) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _HealthDiscoveryService_FetchHealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HealthCheckRequestOrEndpointHealthResponse) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HealthDiscoveryServiceServer).FetchHealthCheck(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.service.health.v4alpha.HealthDiscoveryService/FetchHealthCheck", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthDiscoveryServiceServer).FetchHealthCheck(ctx, req.(*HealthCheckRequestOrEndpointHealthResponse)) - } - return interceptor(ctx, in, info, handler) -} - -var _HealthDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.health.v4alpha.HealthDiscoveryService", - HandlerType: (*HealthDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchHealthCheck", - Handler: _HealthDiscoveryService_FetchHealthCheck_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamHealthCheck", - Handler: _HealthDiscoveryService_StreamHealthCheck_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/health/v4alpha/hds.proto", -} diff --git a/pkg/api/envoy/service/health/v4alpha/hds.pb.validate.go b/pkg/api/envoy/service/health/v4alpha/hds.pb.validate.go deleted file mode 100644 index 6a9148733c..0000000000 --- a/pkg/api/envoy/service/health/v4alpha/hds.pb.validate.go +++ /dev/null @@ -1,933 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/health/v4alpha/hds.proto - -package envoy_service_health_v4alpha - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "strings" - "time" - "unicode/utf8" - - "github.com/golang/protobuf/ptypes" - - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" -) - -// 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{} - - _ = v4alpha.HealthStatus(0) -) - -// 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 { - if m == nil { - return nil - } - - return nil -} - -// CapabilityValidationError is the validation error returned by -// Capability.Validate if the designated constraints aren't met. -type CapabilityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CapabilityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CapabilityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CapabilityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CapabilityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CapabilityValidationError) ErrorName() string { return "CapabilityValidationError" } - -// Error satisfies the builtin error interface -func (e CapabilityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCapability.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CapabilityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CapabilityValidationError{} - -// Validate checks the field values on HealthCheckRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheckRequest) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - 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, - } - } - } - - return nil -} - -// HealthCheckRequestValidationError is the validation error returned by -// HealthCheckRequest.Validate if the designated constraints aren't met. -type HealthCheckRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckRequestValidationError) ErrorName() string { - return "HealthCheckRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheckRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheckRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckRequestValidationError{} - -// Validate checks the field values on EndpointHealth with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *EndpointHealth) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - // no validation rules for HealthStatus - - return nil -} - -// EndpointHealthValidationError is the validation error returned by -// EndpointHealth.Validate if the designated constraints aren't met. -type EndpointHealthValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointHealthValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointHealthValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointHealthValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointHealthValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointHealthValidationError) ErrorName() string { return "EndpointHealthValidationError" } - -// Error satisfies the builtin error interface -func (e EndpointHealthValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointHealth.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointHealthValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointHealthValidationError{} - -// Validate checks the field values on LocalityEndpointsHealth with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *LocalityEndpointsHealth) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalityEndpointsHealthValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetEndpointsHealth() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalityEndpointsHealthValidationError{ - field: fmt.Sprintf("EndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// LocalityEndpointsHealthValidationError is the validation error returned by -// LocalityEndpointsHealth.Validate if the designated constraints aren't met. -type LocalityEndpointsHealthValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalityEndpointsHealthValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalityEndpointsHealthValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalityEndpointsHealthValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalityEndpointsHealthValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalityEndpointsHealthValidationError) ErrorName() string { - return "LocalityEndpointsHealthValidationError" -} - -// Error satisfies the builtin error interface -func (e LocalityEndpointsHealthValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocalityEndpointsHealth.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalityEndpointsHealthValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalityEndpointsHealthValidationError{} - -// Validate checks the field values on ClusterEndpointsHealth with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClusterEndpointsHealth) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ClusterName - - for idx, item := range m.GetLocalityEndpointsHealth() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterEndpointsHealthValidationError{ - field: fmt.Sprintf("LocalityEndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ClusterEndpointsHealthValidationError is the validation error returned by -// ClusterEndpointsHealth.Validate if the designated constraints aren't met. -type ClusterEndpointsHealthValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterEndpointsHealthValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterEndpointsHealthValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterEndpointsHealthValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterEndpointsHealthValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterEndpointsHealthValidationError) ErrorName() string { - return "ClusterEndpointsHealthValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterEndpointsHealthValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterEndpointsHealth.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterEndpointsHealthValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterEndpointsHealthValidationError{} - -// Validate checks the field values on EndpointHealthResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *EndpointHealthResponse) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetHiddenEnvoyDeprecatedEndpointsHealth() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointHealthResponseValidationError{ - field: fmt.Sprintf("HiddenEnvoyDeprecatedEndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetClusterEndpointsHealth() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointHealthResponseValidationError{ - field: fmt.Sprintf("ClusterEndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// EndpointHealthResponseValidationError is the validation error returned by -// EndpointHealthResponse.Validate if the designated constraints aren't met. -type EndpointHealthResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointHealthResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointHealthResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointHealthResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointHealthResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointHealthResponseValidationError) ErrorName() string { - return "EndpointHealthResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e EndpointHealthResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointHealthResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointHealthResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointHealthResponseValidationError{} - -// Validate checks the field values on -// HealthCheckRequestOrEndpointHealthResponse with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { - if m == nil { - return nil - } - - switch m.RequestType.(type) { - - case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - - 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: - - 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, - } - } - } - - } - - return nil -} - -// HealthCheckRequestOrEndpointHealthResponseValidationError is the validation -// error returned by HealthCheckRequestOrEndpointHealthResponse.Validate if -// the designated constraints aren't met. -type HealthCheckRequestOrEndpointHealthResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) ErrorName() string { - return "HealthCheckRequestOrEndpointHealthResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheckRequestOrEndpointHealthResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckRequestOrEndpointHealthResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckRequestOrEndpointHealthResponseValidationError{} - -// Validate checks the field values on LocalityEndpoints with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *LocalityEndpoints) Validate() error { - if m == nil { - return nil - } - - 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, - } - } - } - - for idx, item := range m.GetEndpoints() { - _, _ = idx, item - - 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, - } - } - } - - } - - return nil -} - -// LocalityEndpointsValidationError is the validation error returned by -// LocalityEndpoints.Validate if the designated constraints aren't met. -type LocalityEndpointsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalityEndpointsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalityEndpointsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalityEndpointsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalityEndpointsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalityEndpointsValidationError) ErrorName() string { - return "LocalityEndpointsValidationError" -} - -// Error satisfies the builtin error interface -func (e LocalityEndpointsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocalityEndpoints.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalityEndpointsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalityEndpointsValidationError{} - -// Validate checks the field values on ClusterHealthCheck with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClusterHealthCheck) Validate() error { - if m == nil { - return nil - } - - // no validation rules for ClusterName - - for idx, item := range m.GetHealthChecks() { - _, _ = idx, item - - 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, - } - } - } - - } - - for idx, item := range m.GetLocalityEndpoints() { - _, _ = idx, item - - 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, - } - } - } - - } - - for idx, item := range m.GetTransportSocketMatches() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterHealthCheckValidationError{ - field: fmt.Sprintf("TransportSocketMatches[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ClusterHealthCheckValidationError is the validation error returned by -// ClusterHealthCheck.Validate if the designated constraints aren't met. -type ClusterHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterHealthCheckValidationError) ErrorName() string { - return "ClusterHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterHealthCheckValidationError{} - -// Validate checks the field values on HealthCheckSpecifier with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HealthCheckSpecifier) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetClusterHealthChecks() { - _, _ = idx, item - - 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, - } - } - } - - } - - 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, - } - } - } - - return nil -} - -// HealthCheckSpecifierValidationError is the validation error returned by -// HealthCheckSpecifier.Validate if the designated constraints aren't met. -type HealthCheckSpecifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckSpecifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckSpecifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckSpecifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckSpecifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckSpecifierValidationError) ErrorName() string { - return "HealthCheckSpecifierValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheckSpecifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheckSpecifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckSpecifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckSpecifierValidationError{} diff --git a/pkg/api/envoy/service/listener/v3/lds.pb.go b/pkg/api/envoy/service/listener/v3/lds.pb.go index 0917a3e2d0..db03fcaa09 100644 --- a/pkg/api/envoy/service/listener/v3/lds.pb.go +++ b/pkg/api/envoy/service/listener/v3/lds.pb.go @@ -1,20 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/listener/v3/lds.proto -package envoy_service_listener_v3 +package listenerv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - 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" codes "google.golang.org/grpc/codes" @@ -32,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type LdsDummy struct { @@ -87,56 +79,55 @@ var file_envoy_service_listener_v3_lds_proto_rawDesc = []byte{ 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x08, 0x4c, 0x64, 0x73, 0x44, 0x75, - 0x6d, 0x6d, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, - 0x79, 0x32, 0xd4, 0x03, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, - 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x74, 0x0a, - 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x17, 0x2f, 0x76, 0x33, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x29, 0x8a, - 0xa4, 0x96, 0xf3, 0x07, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x40, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x42, 0x08, 0x4c, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, - 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, + 0x0a, 0x08, 0x4c, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, + 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xd4, 0x03, 0x0a, 0x18, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x28, 0x01, 0x30, 0x01, 0x12, 0x74, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x22, 0x17, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x3a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x29, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x23, 0x0a, 0x21, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, + 0x8d, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x4c, 0x64, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/listener/v3/lds.pb.validate.go b/pkg/api/envoy/service/listener/v3/lds.pb.validate.go index c827197f58..bf2ac4d8cf 100644 --- a/pkg/api/envoy/service/listener/v3/lds.pb.validate.go +++ b/pkg/api/envoy/service/listener/v3/lds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/listener/v3/lds.proto -package envoy_service_listener_v3 +package listenerv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *LdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in LdsDummyMultiError, or nil +// if none found. +func (m *LdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *LdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return LdsDummyMultiError(errors) + } + return nil } +// LdsDummyMultiError is an error wrapping multiple validation errors returned +// by LdsDummy.ValidateAll() if the designated constraints aren't met. +type LdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LdsDummyMultiError) AllErrors() []error { return m } + // LdsDummyValidationError is the validation error returned by // LdsDummy.Validate if the designated constraints aren't met. type LdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/load_stats/v2/lrs.pb.go b/pkg/api/envoy/service/load_stats/v2/lrs.pb.go index 3ad25d6063..3fafb58431 100644 --- a/pkg/api/envoy/service/load_stats/v2/lrs.pb.go +++ b/pkg/api/envoy/service/load_stats/v2/lrs.pb.go @@ -1,18 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/load_stats/v2/lrs.proto -package envoy_service_load_stats_v2 +package load_statsv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A load report Envoy sends to the management server. // [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. type LoadStatsRequest struct { @@ -196,46 +190,50 @@ var file_envoy_service_load_stats_v2_lrs_proto_rawDesc = []byte{ 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, - 0xee, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, - 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, - 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, - 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, - 0x01, 0x42, 0x42, 0x0a, 0x29, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x08, - 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x10, 0x4c, + 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x0d, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x6e, 0x64, + 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x75, + 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x6e, + 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/load_stats/v2/lrs.pb.validate.go b/pkg/api/envoy/service/load_stats/v2/lrs.pb.validate.go index 188ae2761d..7edaaf8023 100644 --- a/pkg/api/envoy/service/load_stats/v2/lrs.pb.validate.go +++ b/pkg/api/envoy/service/load_stats/v2/lrs.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/load_stats/v2/lrs.proto -package envoy_service_load_stats_v2 +package load_statsv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on LoadStatsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LoadStatsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadStatsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadStatsRequestMultiError, or nil if none found. +func (m *LoadStatsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadStatsRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: "Node", @@ -54,7 +89,26 @@ func (m *LoadStatsRequest) Validate() error { for idx, item := range m.GetClusterStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: fmt.Sprintf("ClusterStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: fmt.Sprintf("ClusterStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: fmt.Sprintf("ClusterStats[%v]", idx), @@ -66,9 +120,30 @@ func (m *LoadStatsRequest) Validate() error { } + if len(errors) > 0 { + return LoadStatsRequestMultiError(errors) + } + return nil } +// LoadStatsRequestMultiError is an error wrapping multiple validation errors +// returned by LoadStatsRequest.ValidateAll() if the designated constraints +// aren't met. +type LoadStatsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadStatsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadStatsRequestMultiError) AllErrors() []error { return m } + // LoadStatsRequestValidationError is the validation error returned by // LoadStatsRequest.Validate if the designated constraints aren't met. type LoadStatsRequestValidationError struct { @@ -124,16 +199,49 @@ var _ interface { } = LoadStatsRequestValidationError{} // Validate checks the field values on LoadStatsResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LoadStatsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadStatsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadStatsResponseMultiError, or nil if none found. +func (m *LoadStatsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadStatsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SendAllClusters - if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadReportingInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsResponseValidationError{ + field: "LoadReportingInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsResponseValidationError{ + field: "LoadReportingInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsResponseValidationError{ field: "LoadReportingInterval", @@ -145,9 +253,30 @@ func (m *LoadStatsResponse) Validate() error { // no validation rules for ReportEndpointGranularity + if len(errors) > 0 { + return LoadStatsResponseMultiError(errors) + } + return nil } +// LoadStatsResponseMultiError is an error wrapping multiple validation errors +// returned by LoadStatsResponse.ValidateAll() if the designated constraints +// aren't met. +type LoadStatsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadStatsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadStatsResponseMultiError) AllErrors() []error { return m } + // LoadStatsResponseValidationError is the validation error returned by // LoadStatsResponse.Validate if the designated constraints aren't met. type LoadStatsResponseValidationError struct { diff --git a/pkg/api/envoy/service/load_stats/v3/lrs.pb.go b/pkg/api/envoy/service/load_stats/v3/lrs.pb.go index d3800c34ec..cfac113677 100644 --- a/pkg/api/envoy/service/load_stats/v3/lrs.pb.go +++ b/pkg/api/envoy/service/load_stats/v3/lrs.pb.go @@ -1,18 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/load_stats/v3/lrs.proto -package envoy_service_load_stats_v3 +package load_statsv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A load report Envoy sends to the management server. type LoadStatsRequest struct { state protoimpl.MessageState @@ -104,7 +98,7 @@ type LoadStatsResponse struct { Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` // If true, the client should send all clusters it knows about. // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their - // :ref:`client_features` field will honor this field. + // :ref:`client_features` field will honor this field. SendAllClusters bool `protobuf:"varint,4,opt,name=send_all_clusters,json=sendAllClusters,proto3" json:"send_all_clusters,omitempty"` // The minimum interval of time to collect stats over. This is only a minimum for two reasons: // @@ -198,53 +192,56 @@ var file_envoy_service_load_stats_v3_lrs_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, - 0x10, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, 0x33, - 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x6c, - 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, - 0x72, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, - 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x42, 0x0a, 0x29, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x11, 0x4c, + 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, + 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, + 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, 0xc5, 0x88, + 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, + 0x30, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, + 0x42, 0x08, 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, + 0x3b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x76, 0x33, 0x88, 0x01, 0x01, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/load_stats/v3/lrs.pb.validate.go b/pkg/api/envoy/service/load_stats/v3/lrs.pb.validate.go index ec599e6cc3..e6806c11c8 100644 --- a/pkg/api/envoy/service/load_stats/v3/lrs.pb.validate.go +++ b/pkg/api/envoy/service/load_stats/v3/lrs.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/load_stats/v3/lrs.proto -package envoy_service_load_stats_v3 +package load_statsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on LoadStatsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LoadStatsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadStatsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadStatsRequestMultiError, or nil if none found. +func (m *LoadStatsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadStatsRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: "Node", @@ -54,7 +89,26 @@ func (m *LoadStatsRequest) Validate() error { for idx, item := range m.GetClusterStats() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: fmt.Sprintf("ClusterStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: fmt.Sprintf("ClusterStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: fmt.Sprintf("ClusterStats[%v]", idx), @@ -66,9 +120,30 @@ func (m *LoadStatsRequest) Validate() error { } + if len(errors) > 0 { + return LoadStatsRequestMultiError(errors) + } + return nil } +// LoadStatsRequestMultiError is an error wrapping multiple validation errors +// returned by LoadStatsRequest.ValidateAll() if the designated constraints +// aren't met. +type LoadStatsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadStatsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadStatsRequestMultiError) AllErrors() []error { return m } + // LoadStatsRequestValidationError is the validation error returned by // LoadStatsRequest.Validate if the designated constraints aren't met. type LoadStatsRequestValidationError struct { @@ -124,16 +199,49 @@ var _ interface { } = LoadStatsRequestValidationError{} // Validate checks the field values on LoadStatsResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *LoadStatsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadStatsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// LoadStatsResponseMultiError, or nil if none found. +func (m *LoadStatsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadStatsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for SendAllClusters - if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLoadReportingInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsResponseValidationError{ + field: "LoadReportingInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsResponseValidationError{ + field: "LoadReportingInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsResponseValidationError{ field: "LoadReportingInterval", @@ -145,9 +253,30 @@ func (m *LoadStatsResponse) Validate() error { // no validation rules for ReportEndpointGranularity + if len(errors) > 0 { + return LoadStatsResponseMultiError(errors) + } + return nil } +// LoadStatsResponseMultiError is an error wrapping multiple validation errors +// returned by LoadStatsResponse.ValidateAll() if the designated constraints +// aren't met. +type LoadStatsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadStatsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadStatsResponseMultiError) AllErrors() []error { return m } + // LoadStatsResponseValidationError is the validation error returned by // LoadStatsResponse.Validate if the designated constraints aren't met. type LoadStatsResponseValidationError struct { diff --git a/pkg/api/envoy/service/load_stats/v4alpha/lrs.pb.go b/pkg/api/envoy/service/load_stats/v4alpha/lrs.pb.go deleted file mode 100644 index 618fc8b080..0000000000 --- a/pkg/api/envoy/service/load_stats/v4alpha/lrs.pb.go +++ /dev/null @@ -1,502 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/load_stats/v4alpha/lrs.proto - -package envoy_service_load_stats_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - duration "github.com/golang/protobuf/ptypes/duration" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A load report Envoy sends to the management server. -type LoadStatsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Node identifier for Envoy instance. - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // A list of load stats to report. - ClusterStats []*v3.ClusterStats `protobuf:"bytes,2,rep,name=cluster_stats,json=clusterStats,proto3" json:"cluster_stats,omitempty"` -} - -func (x *LoadStatsRequest) Reset() { - *x = LoadStatsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadStatsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadStatsRequest) ProtoMessage() {} - -func (x *LoadStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadStatsRequest.ProtoReflect.Descriptor instead. -func (*LoadStatsRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescGZIP(), []int{0} -} - -func (x *LoadStatsRequest) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *LoadStatsRequest) GetClusterStats() []*v3.ClusterStats { - if x != nil { - return x.ClusterStats - } - return nil -} - -// The management server sends envoy a LoadStatsResponse with all clusters it -// is interested in learning load stats about. -type LoadStatsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Clusters to report stats for. - // Not populated if *send_all_clusters* is true. - Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` - // If true, the client should send all clusters it knows about. - // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their - // :ref:`client_features` field will honor this field. - SendAllClusters bool `protobuf:"varint,4,opt,name=send_all_clusters,json=sendAllClusters,proto3" json:"send_all_clusters,omitempty"` - // The minimum interval of time to collect stats over. This is only a minimum for two reasons: - // - // 1. There may be some delay from when the timer fires until stats sampling occurs. - // 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic - // that is observed in between the corresponding previous *LoadStatsRequest* and this - // *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period - // of inobservability that might otherwise exists between the messages. New clusters are not - // subject to this consideration. - LoadReportingInterval *duration.Duration `protobuf:"bytes,2,opt,name=load_reporting_interval,json=loadReportingInterval,proto3" json:"load_reporting_interval,omitempty"` - // Set to *true* if the management server supports endpoint granularity - // report. - ReportEndpointGranularity bool `protobuf:"varint,3,opt,name=report_endpoint_granularity,json=reportEndpointGranularity,proto3" json:"report_endpoint_granularity,omitempty"` -} - -func (x *LoadStatsResponse) Reset() { - *x = LoadStatsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadStatsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadStatsResponse) ProtoMessage() {} - -func (x *LoadStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadStatsResponse.ProtoReflect.Descriptor instead. -func (*LoadStatsResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescGZIP(), []int{1} -} - -func (x *LoadStatsResponse) GetClusters() []string { - if x != nil { - return x.Clusters - } - return nil -} - -func (x *LoadStatsResponse) GetSendAllClusters() bool { - if x != nil { - return x.SendAllClusters - } - return false -} - -func (x *LoadStatsResponse) GetLoadReportingInterval() *duration.Duration { - if x != nil { - return x.LoadReportingInterval - } - return nil -} - -func (x *LoadStatsResponse) GetReportEndpointGranularity() bool { - if x != nil { - return x.ReportEndpointGranularity - } - return false -} - -var File_envoy_service_load_stats_v4alpha_lrs_proto protoreflect.FileDescriptor - -var file_envoy_service_load_stats_v4alpha_lrs_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2f, 0x6c, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x01, 0x0a, 0x10, - 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x6e, - 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, - 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x61, - 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, - 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x99, - 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, - 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x47, 0x0a, 0x2e, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x08, 0x4c, 0x72, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescOnce sync.Once - file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescData = file_envoy_service_load_stats_v4alpha_lrs_proto_rawDesc -) - -func file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescGZIP() []byte { - file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescOnce.Do(func() { - file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescData) - }) - return file_envoy_service_load_stats_v4alpha_lrs_proto_rawDescData -} - -var file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_service_load_stats_v4alpha_lrs_proto_goTypes = []interface{}{ - (*LoadStatsRequest)(nil), // 0: envoy.service.load_stats.v4alpha.LoadStatsRequest - (*LoadStatsResponse)(nil), // 1: envoy.service.load_stats.v4alpha.LoadStatsResponse - (*v4alpha.Node)(nil), // 2: envoy.config.core.v4alpha.Node - (*v3.ClusterStats)(nil), // 3: envoy.config.endpoint.v3.ClusterStats - (*duration.Duration)(nil), // 4: google.protobuf.Duration -} -var file_envoy_service_load_stats_v4alpha_lrs_proto_depIdxs = []int32{ - 2, // 0: envoy.service.load_stats.v4alpha.LoadStatsRequest.node:type_name -> envoy.config.core.v4alpha.Node - 3, // 1: envoy.service.load_stats.v4alpha.LoadStatsRequest.cluster_stats:type_name -> envoy.config.endpoint.v3.ClusterStats - 4, // 2: envoy.service.load_stats.v4alpha.LoadStatsResponse.load_reporting_interval:type_name -> google.protobuf.Duration - 0, // 3: envoy.service.load_stats.v4alpha.LoadReportingService.StreamLoadStats:input_type -> envoy.service.load_stats.v4alpha.LoadStatsRequest - 1, // 4: envoy.service.load_stats.v4alpha.LoadReportingService.StreamLoadStats:output_type -> envoy.service.load_stats.v4alpha.LoadStatsResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_service_load_stats_v4alpha_lrs_proto_init() } -func file_envoy_service_load_stats_v4alpha_lrs_proto_init() { - if File_envoy_service_load_stats_v4alpha_lrs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadStatsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadStatsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_load_stats_v4alpha_lrs_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_load_stats_v4alpha_lrs_proto_goTypes, - DependencyIndexes: file_envoy_service_load_stats_v4alpha_lrs_proto_depIdxs, - MessageInfos: file_envoy_service_load_stats_v4alpha_lrs_proto_msgTypes, - }.Build() - File_envoy_service_load_stats_v4alpha_lrs_proto = out.File - file_envoy_service_load_stats_v4alpha_lrs_proto_rawDesc = nil - file_envoy_service_load_stats_v4alpha_lrs_proto_goTypes = nil - file_envoy_service_load_stats_v4alpha_lrs_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// LoadReportingServiceClient is the client API for LoadReportingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LoadReportingServiceClient interface { - // Advanced API to allow for multi-dimensional load balancing by remote - // server. For receiving LB assignments, the steps are: - // 1, The management server is configured with per cluster/zone/load metric - // capacity configuration. The capacity configuration definition is - // outside of the scope of this document. - // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters - // to balance. - // - // Independently, Envoy will initiate a StreamLoadStats bidi stream with a - // management server: - // 1. Once a connection establishes, the management server publishes a - // LoadStatsResponse for all clusters it is interested in learning load - // stats about. - // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts - // based on per-zone weights and/or per-instance weights (if specified) - // based on intra-zone LbPolicy. This information comes from the above - // {Stream,Fetch}Endpoints. - // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. - // 4. Envoy aggregates load reports over the period of time given to it in - // LoadStatsResponse.load_reporting_interval. This includes aggregation - // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as - // well as load metrics from upstream hosts. - // 5. When the timer of load_reporting_interval expires, Envoy sends new - // LoadStatsRequest filled with load reports for each cluster. - // 6. The management server uses the load reports from all reported Envoys - // from around the world, computes global assignment and prepares traffic - // assignment destined for each zone Envoys are located in. Goto 2. - StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) -} - -type loadReportingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewLoadReportingServiceClient(cc grpc.ClientConnInterface) LoadReportingServiceClient { - return &loadReportingServiceClient{cc} -} - -func (c *loadReportingServiceClient) StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) { - stream, err := c.cc.NewStream(ctx, &_LoadReportingService_serviceDesc.Streams[0], "/envoy.service.load_stats.v4alpha.LoadReportingService/StreamLoadStats", opts...) - if err != nil { - return nil, err - } - x := &loadReportingServiceStreamLoadStatsClient{stream} - return x, nil -} - -type LoadReportingService_StreamLoadStatsClient interface { - Send(*LoadStatsRequest) error - Recv() (*LoadStatsResponse, error) - grpc.ClientStream -} - -type loadReportingServiceStreamLoadStatsClient struct { - grpc.ClientStream -} - -func (x *loadReportingServiceStreamLoadStatsClient) Send(m *LoadStatsRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *loadReportingServiceStreamLoadStatsClient) Recv() (*LoadStatsResponse, error) { - m := new(LoadStatsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// LoadReportingServiceServer is the server API for LoadReportingService service. -type LoadReportingServiceServer interface { - // Advanced API to allow for multi-dimensional load balancing by remote - // server. For receiving LB assignments, the steps are: - // 1, The management server is configured with per cluster/zone/load metric - // capacity configuration. The capacity configuration definition is - // outside of the scope of this document. - // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters - // to balance. - // - // Independently, Envoy will initiate a StreamLoadStats bidi stream with a - // management server: - // 1. Once a connection establishes, the management server publishes a - // LoadStatsResponse for all clusters it is interested in learning load - // stats about. - // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts - // based on per-zone weights and/or per-instance weights (if specified) - // based on intra-zone LbPolicy. This information comes from the above - // {Stream,Fetch}Endpoints. - // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. - // 4. Envoy aggregates load reports over the period of time given to it in - // LoadStatsResponse.load_reporting_interval. This includes aggregation - // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as - // well as load metrics from upstream hosts. - // 5. When the timer of load_reporting_interval expires, Envoy sends new - // LoadStatsRequest filled with load reports for each cluster. - // 6. The management server uses the load reports from all reported Envoys - // from around the world, computes global assignment and prepares traffic - // assignment destined for each zone Envoys are located in. Goto 2. - StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error -} - -// UnimplementedLoadReportingServiceServer can be embedded to have forward compatible implementations. -type UnimplementedLoadReportingServiceServer struct { -} - -func (*UnimplementedLoadReportingServiceServer) StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamLoadStats not implemented") -} - -func RegisterLoadReportingServiceServer(s *grpc.Server, srv LoadReportingServiceServer) { - s.RegisterService(&_LoadReportingService_serviceDesc, srv) -} - -func _LoadReportingService_StreamLoadStats_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(LoadReportingServiceServer).StreamLoadStats(&loadReportingServiceStreamLoadStatsServer{stream}) -} - -type LoadReportingService_StreamLoadStatsServer interface { - Send(*LoadStatsResponse) error - Recv() (*LoadStatsRequest, error) - grpc.ServerStream -} - -type loadReportingServiceStreamLoadStatsServer struct { - grpc.ServerStream -} - -func (x *loadReportingServiceStreamLoadStatsServer) Send(m *LoadStatsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *loadReportingServiceStreamLoadStatsServer) Recv() (*LoadStatsRequest, error) { - m := new(LoadStatsRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _LoadReportingService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.load_stats.v4alpha.LoadReportingService", - HandlerType: (*LoadReportingServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamLoadStats", - Handler: _LoadReportingService_StreamLoadStats_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/load_stats/v4alpha/lrs.proto", -} diff --git a/pkg/api/envoy/service/load_stats/v4alpha/lrs.pb.validate.go b/pkg/api/envoy/service/load_stats/v4alpha/lrs.pb.validate.go deleted file mode 100644 index b1cb3dca5b..0000000000 --- a/pkg/api/envoy/service/load_stats/v4alpha/lrs.pb.validate.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/load_stats/v4alpha/lrs.proto - -package envoy_service_load_stats_v4alpha - -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{} -) - -// Validate checks the field values on LoadStatsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *LoadStatsRequest) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadStatsRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetClusterStats() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadStatsRequestValidationError{ - field: fmt.Sprintf("ClusterStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// LoadStatsRequestValidationError is the validation error returned by -// LoadStatsRequest.Validate if the designated constraints aren't met. -type LoadStatsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LoadStatsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LoadStatsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LoadStatsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LoadStatsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LoadStatsRequestValidationError) ErrorName() string { return "LoadStatsRequestValidationError" } - -// Error satisfies the builtin error interface -func (e LoadStatsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLoadStatsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LoadStatsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LoadStatsRequestValidationError{} - -// Validate checks the field values on LoadStatsResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *LoadStatsResponse) Validate() error { - if m == nil { - return nil - } - - // no validation rules for SendAllClusters - - if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadStatsResponseValidationError{ - field: "LoadReportingInterval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ReportEndpointGranularity - - return nil -} - -// LoadStatsResponseValidationError is the validation error returned by -// LoadStatsResponse.Validate if the designated constraints aren't met. -type LoadStatsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LoadStatsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LoadStatsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LoadStatsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LoadStatsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LoadStatsResponseValidationError) ErrorName() string { - return "LoadStatsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e LoadStatsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLoadStatsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LoadStatsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LoadStatsResponseValidationError{} diff --git a/pkg/api/envoy/service/metrics/v2/metrics_service.pb.go b/pkg/api/envoy/service/metrics/v2/metrics_service.pb.go index 9d76466461..7c04294733 100644 --- a/pkg/api/envoy/service/metrics/v2/metrics_service.pb.go +++ b/pkg/api/envoy/service/metrics/v2/metrics_service.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/metrics/v2/metrics_service.proto -package envoy_service_metrics_v2 +package metricsv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _go "github.com/prometheus/client_model/go" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type StreamMetricsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -186,43 +181,49 @@ var file_envoy_service_metrics_v2_metrics_service_proto_rawDesc = []byte{ 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x17, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, - 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x43, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32, 0x86, 0x01, 0x0a, 0x0e, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, - 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x2f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x28, 0x01, 0x42, 0x4a, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x13, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, + 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x01, + 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x47, 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x43, 0x0a, 0x0a, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32, + 0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x12, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x1a, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x95, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x2e, 0x76, 0x32, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/metrics/v2/metrics_service.pb.validate.go b/pkg/api/envoy/service/metrics/v2/metrics_service.pb.validate.go index c7e07bd18b..4bda085795 100644 --- a/pkg/api/envoy/service/metrics/v2/metrics_service.pb.validate.go +++ b/pkg/api/envoy/service/metrics/v2/metrics_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/metrics/v2/metrics_service.proto -package envoy_service_metrics_v2 +package metricsv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamMetricsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamMetricsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamMetricsResponseMultiError, or nil if none found. +func (m *StreamMetricsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamMetricsResponseMultiError(errors) + } + return nil } +// StreamMetricsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamMetricsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamMetricsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsResponseMultiError) AllErrors() []error { return m } + // StreamMetricsResponseValidationError is the validation error returned by // StreamMetricsResponse.Validate if the designated constraints aren't met. type StreamMetricsResponseValidationError struct { @@ -102,13 +139,46 @@ var _ interface { // Validate checks the field values on StreamMetricsMessage with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamMetricsMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsMessage with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamMetricsMessageMultiError, or nil if none found. +func (m *StreamMetricsMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsMessage) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessageValidationError{ field: "Identifier", @@ -121,7 +191,26 @@ func (m *StreamMetricsMessage) Validate() error { for idx, item := range m.GetEnvoyMetrics() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: fmt.Sprintf("EnvoyMetrics[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: fmt.Sprintf("EnvoyMetrics[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessageValidationError{ field: fmt.Sprintf("EnvoyMetrics[%v]", idx), @@ -133,9 +222,30 @@ func (m *StreamMetricsMessage) Validate() error { } + if len(errors) > 0 { + return StreamMetricsMessageMultiError(errors) + } + return nil } +// StreamMetricsMessageMultiError is an error wrapping multiple validation +// errors returned by StreamMetricsMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamMetricsMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsMessageMultiError) AllErrors() []error { return m } + // StreamMetricsMessageValidationError is the validation error returned by // StreamMetricsMessage.Validate if the designated constraints aren't met. type StreamMetricsMessageValidationError struct { @@ -194,20 +304,57 @@ var _ interface { // Validate checks the field values on StreamMetricsMessage_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamMetricsMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsMessage_Identifier with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// StreamMetricsMessage_IdentifierMultiError, or nil if none found. +func (m *StreamMetricsMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsMessage_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamMetricsMessage_IdentifierValidationError{ + err := StreamMetricsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessage_IdentifierValidationError{ field: "Node", @@ -217,9 +364,30 @@ func (m *StreamMetricsMessage_Identifier) Validate() error { } } + if len(errors) > 0 { + return StreamMetricsMessage_IdentifierMultiError(errors) + } + return nil } +// StreamMetricsMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamMetricsMessage_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamMetricsMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsMessage_IdentifierMultiError) AllErrors() []error { return m } + // StreamMetricsMessage_IdentifierValidationError is the validation error // returned by StreamMetricsMessage_Identifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/metrics/v3/metrics_service.pb.go b/pkg/api/envoy/service/metrics/v3/metrics_service.pb.go index 50fd362bf6..da7bd0beaf 100644 --- a/pkg/api/envoy/service/metrics/v3/metrics_service.pb.go +++ b/pkg/api/envoy/service/metrics/v3/metrics_service.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/metrics/v3/metrics_service.proto -package envoy_service_metrics_v3 +package metricsv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" _go "github.com/prometheus/client_model/go" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type StreamMetricsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -186,56 +181,62 @@ var file_envoy_service_metrics_v3_metrics_service_proto_rawDesc = []byte{ 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x35, - 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x59, - 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, - 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, - 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5, - 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x32, 0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6f, 0x2f, + 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x15, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x14, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x47, + 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, + 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x4a, 0x0a, 0x26, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2e, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x2f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, + 0x42, 0x95, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x76, 0x33, 0x88, 0x01, 0x01, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/metrics/v3/metrics_service.pb.validate.go b/pkg/api/envoy/service/metrics/v3/metrics_service.pb.validate.go index a214f9e63e..dd4f8e931c 100644 --- a/pkg/api/envoy/service/metrics/v3/metrics_service.pb.validate.go +++ b/pkg/api/envoy/service/metrics/v3/metrics_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/metrics/v3/metrics_service.proto -package envoy_service_metrics_v3 +package metricsv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamMetricsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamMetricsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamMetricsResponseMultiError, or nil if none found. +func (m *StreamMetricsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamMetricsResponseMultiError(errors) + } + return nil } +// StreamMetricsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamMetricsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamMetricsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsResponseMultiError) AllErrors() []error { return m } + // StreamMetricsResponseValidationError is the validation error returned by // StreamMetricsResponse.Validate if the designated constraints aren't met. type StreamMetricsResponseValidationError struct { @@ -102,13 +139,46 @@ var _ interface { // Validate checks the field values on StreamMetricsMessage with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamMetricsMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsMessage with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamMetricsMessageMultiError, or nil if none found. +func (m *StreamMetricsMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsMessage) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessageValidationError{ field: "Identifier", @@ -121,7 +191,26 @@ func (m *StreamMetricsMessage) Validate() error { for idx, item := range m.GetEnvoyMetrics() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: fmt.Sprintf("EnvoyMetrics[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: fmt.Sprintf("EnvoyMetrics[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessageValidationError{ field: fmt.Sprintf("EnvoyMetrics[%v]", idx), @@ -133,9 +222,30 @@ func (m *StreamMetricsMessage) Validate() error { } + if len(errors) > 0 { + return StreamMetricsMessageMultiError(errors) + } + return nil } +// StreamMetricsMessageMultiError is an error wrapping multiple validation +// errors returned by StreamMetricsMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamMetricsMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsMessageMultiError) AllErrors() []error { return m } + // StreamMetricsMessageValidationError is the validation error returned by // StreamMetricsMessage.Validate if the designated constraints aren't met. type StreamMetricsMessageValidationError struct { @@ -194,20 +304,57 @@ var _ interface { // Validate checks the field values on StreamMetricsMessage_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamMetricsMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsMessage_Identifier with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// StreamMetricsMessage_IdentifierMultiError, or nil if none found. +func (m *StreamMetricsMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsMessage_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamMetricsMessage_IdentifierValidationError{ + err := StreamMetricsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamMetricsMessage_IdentifierValidationError{ field: "Node", @@ -217,9 +364,30 @@ func (m *StreamMetricsMessage_Identifier) Validate() error { } } + if len(errors) > 0 { + return StreamMetricsMessage_IdentifierMultiError(errors) + } + return nil } +// StreamMetricsMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamMetricsMessage_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamMetricsMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsMessage_IdentifierMultiError) AllErrors() []error { return m } + // StreamMetricsMessage_IdentifierValidationError is the validation error // returned by StreamMetricsMessage_Identifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/metrics/v4alpha/metrics_service.pb.go b/pkg/api/envoy/service/metrics/v4alpha/metrics_service.pb.go deleted file mode 100644 index a6b917eb47..0000000000 --- a/pkg/api/envoy/service/metrics/v4alpha/metrics_service.pb.go +++ /dev/null @@ -1,456 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/metrics/v4alpha/metrics_service.proto - -package envoy_service_metrics_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _go "github.com/prometheus/client_model/go" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type StreamMetricsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StreamMetricsResponse) Reset() { - *x = StreamMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamMetricsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamMetricsResponse) ProtoMessage() {} - -func (x *StreamMetricsResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamMetricsResponse.ProtoReflect.Descriptor instead. -func (*StreamMetricsResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescGZIP(), []int{0} -} - -type StreamMetricsMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier *StreamMetricsMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // A list of metric entries - EnvoyMetrics []*_go.MetricFamily `protobuf:"bytes,2,rep,name=envoy_metrics,json=envoyMetrics,proto3" json:"envoy_metrics,omitempty"` -} - -func (x *StreamMetricsMessage) Reset() { - *x = StreamMetricsMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamMetricsMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamMetricsMessage) ProtoMessage() {} - -func (x *StreamMetricsMessage) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamMetricsMessage.ProtoReflect.Descriptor instead. -func (*StreamMetricsMessage) Descriptor() ([]byte, []int) { - return file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescGZIP(), []int{1} -} - -func (x *StreamMetricsMessage) GetIdentifier() *StreamMetricsMessage_Identifier { - if x != nil { - return x.Identifier - } - return nil -} - -func (x *StreamMetricsMessage) GetEnvoyMetrics() []*_go.MetricFamily { - if x != nil { - return x.EnvoyMetrics - } - return nil -} - -type StreamMetricsMessage_Identifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node sending metrics over the stream. - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` -} - -func (x *StreamMetricsMessage_Identifier) Reset() { - *x = StreamMetricsMessage_Identifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamMetricsMessage_Identifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamMetricsMessage_Identifier) ProtoMessage() {} - -func (x *StreamMetricsMessage_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamMetricsMessage_Identifier.ProtoReflect.Descriptor instead. -func (*StreamMetricsMessage_Identifier) Descriptor() ([]byte, []int) { - return file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *StreamMetricsMessage_Identifier) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -var File_envoy_service_metrics_v4alpha_metrics_service_proto protoreflect.FileDescriptor - -var file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x35, 0x9a, - 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x03, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x5e, 0x0a, - 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x47, 0x0a, - 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, - 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x8c, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x90, 0x01, 0x0a, 0x0e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, - 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x1a, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x4f, - 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescOnce sync.Once - file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData = file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc -) - -func file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescGZIP() []byte { - file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescOnce.Do(func() { - file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData) - }) - return file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData -} - -var file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_service_metrics_v4alpha_metrics_service_proto_goTypes = []interface{}{ - (*StreamMetricsResponse)(nil), // 0: envoy.service.metrics.v4alpha.StreamMetricsResponse - (*StreamMetricsMessage)(nil), // 1: envoy.service.metrics.v4alpha.StreamMetricsMessage - (*StreamMetricsMessage_Identifier)(nil), // 2: envoy.service.metrics.v4alpha.StreamMetricsMessage.Identifier - (*_go.MetricFamily)(nil), // 3: io.prometheus.client.MetricFamily - (*v4alpha.Node)(nil), // 4: envoy.config.core.v4alpha.Node -} -var file_envoy_service_metrics_v4alpha_metrics_service_proto_depIdxs = []int32{ - 2, // 0: envoy.service.metrics.v4alpha.StreamMetricsMessage.identifier:type_name -> envoy.service.metrics.v4alpha.StreamMetricsMessage.Identifier - 3, // 1: envoy.service.metrics.v4alpha.StreamMetricsMessage.envoy_metrics:type_name -> io.prometheus.client.MetricFamily - 4, // 2: envoy.service.metrics.v4alpha.StreamMetricsMessage.Identifier.node:type_name -> envoy.config.core.v4alpha.Node - 1, // 3: envoy.service.metrics.v4alpha.MetricsService.StreamMetrics:input_type -> envoy.service.metrics.v4alpha.StreamMetricsMessage - 0, // 4: envoy.service.metrics.v4alpha.MetricsService.StreamMetrics:output_type -> envoy.service.metrics.v4alpha.StreamMetricsResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_service_metrics_v4alpha_metrics_service_proto_init() } -func file_envoy_service_metrics_v4alpha_metrics_service_proto_init() { - if File_envoy_service_metrics_v4alpha_metrics_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamMetricsMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamMetricsMessage_Identifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_metrics_v4alpha_metrics_service_proto_goTypes, - DependencyIndexes: file_envoy_service_metrics_v4alpha_metrics_service_proto_depIdxs, - MessageInfos: file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes, - }.Build() - File_envoy_service_metrics_v4alpha_metrics_service_proto = out.File - file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc = nil - file_envoy_service_metrics_v4alpha_metrics_service_proto_goTypes = nil - file_envoy_service_metrics_v4alpha_metrics_service_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// MetricsServiceClient is the client API for MetricsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsServiceClient interface { - // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. - StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error) -} - -type metricsServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient { - return &metricsServiceClient{cc} -} - -func (c *metricsServiceClient) StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error) { - stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/envoy.service.metrics.v4alpha.MetricsService/StreamMetrics", opts...) - if err != nil { - return nil, err - } - x := &metricsServiceStreamMetricsClient{stream} - return x, nil -} - -type MetricsService_StreamMetricsClient interface { - Send(*StreamMetricsMessage) error - CloseAndRecv() (*StreamMetricsResponse, error) - grpc.ClientStream -} - -type metricsServiceStreamMetricsClient struct { - grpc.ClientStream -} - -func (x *metricsServiceStreamMetricsClient) Send(m *StreamMetricsMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *metricsServiceStreamMetricsClient) CloseAndRecv() (*StreamMetricsResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(StreamMetricsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// MetricsServiceServer is the server API for MetricsService service. -type MetricsServiceServer interface { - // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. - StreamMetrics(MetricsService_StreamMetricsServer) error -} - -// UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedMetricsServiceServer struct { -} - -func (*UnimplementedMetricsServiceServer) StreamMetrics(MetricsService_StreamMetricsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamMetrics not implemented") -} - -func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) { - s.RegisterService(&_MetricsService_serviceDesc, srv) -} - -func _MetricsService_StreamMetrics_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MetricsServiceServer).StreamMetrics(&metricsServiceStreamMetricsServer{stream}) -} - -type MetricsService_StreamMetricsServer interface { - SendAndClose(*StreamMetricsResponse) error - Recv() (*StreamMetricsMessage, error) - grpc.ServerStream -} - -type metricsServiceStreamMetricsServer struct { - grpc.ServerStream -} - -func (x *metricsServiceStreamMetricsServer) SendAndClose(m *StreamMetricsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *metricsServiceStreamMetricsServer) Recv() (*StreamMetricsMessage, error) { - m := new(StreamMetricsMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _MetricsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.metrics.v4alpha.MetricsService", - HandlerType: (*MetricsServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamMetrics", - Handler: _MetricsService_StreamMetrics_Handler, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/metrics/v4alpha/metrics_service.proto", -} diff --git a/pkg/api/envoy/service/metrics/v4alpha/metrics_service.pb.validate.go b/pkg/api/envoy/service/metrics/v4alpha/metrics_service.pb.validate.go deleted file mode 100644 index 44fa86a8ec..0000000000 --- a/pkg/api/envoy/service/metrics/v4alpha/metrics_service.pb.validate.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/metrics/v4alpha/metrics_service.proto - -package envoy_service_metrics_v4alpha - -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{} -) - -// Validate checks the field values on StreamMetricsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamMetricsResponse) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// StreamMetricsResponseValidationError is the validation error returned by -// StreamMetricsResponse.Validate if the designated constraints aren't met. -type StreamMetricsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamMetricsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamMetricsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamMetricsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamMetricsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamMetricsResponseValidationError) ErrorName() string { - return "StreamMetricsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamMetricsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamMetricsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamMetricsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamMetricsResponseValidationError{} - -// Validate checks the field values on StreamMetricsMessage with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamMetricsMessage) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamMetricsMessageValidationError{ - field: "Identifier", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetEnvoyMetrics() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamMetricsMessageValidationError{ - field: fmt.Sprintf("EnvoyMetrics[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// StreamMetricsMessageValidationError is the validation error returned by -// StreamMetricsMessage.Validate if the designated constraints aren't met. -type StreamMetricsMessageValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamMetricsMessageValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamMetricsMessageValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamMetricsMessageValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamMetricsMessageValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamMetricsMessageValidationError) ErrorName() string { - return "StreamMetricsMessageValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamMetricsMessageValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamMetricsMessage.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamMetricsMessageValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamMetricsMessageValidationError{} - -// Validate checks the field values on StreamMetricsMessage_Identifier with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamMetricsMessage_Identifier) Validate() error { - if m == nil { - return nil - } - - if m.GetNode() == nil { - return StreamMetricsMessage_IdentifierValidationError{ - field: "Node", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamMetricsMessage_IdentifierValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// StreamMetricsMessage_IdentifierValidationError is the validation error -// returned by StreamMetricsMessage_Identifier.Validate if the designated -// constraints aren't met. -type StreamMetricsMessage_IdentifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamMetricsMessage_IdentifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamMetricsMessage_IdentifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamMetricsMessage_IdentifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamMetricsMessage_IdentifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamMetricsMessage_IdentifierValidationError) ErrorName() string { - return "StreamMetricsMessage_IdentifierValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamMetricsMessage_IdentifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamMetricsMessage_Identifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamMetricsMessage_IdentifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamMetricsMessage_IdentifierValidationError{} diff --git a/pkg/api/envoy/service/ratelimit/v2/rls.pb.go b/pkg/api/envoy/service/ratelimit/v2/rls.pb.go index 2c2fd3020b..8621ff6748 100644 --- a/pkg/api/envoy/service/ratelimit/v2/rls.pb.go +++ b/pkg/api/envoy/service/ratelimit/v2/rls.pb.go @@ -1,19 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/ratelimit/v2/rls.proto -package envoy_service_ratelimit_v2 +package ratelimitv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" ratelimit "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/ratelimit" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -30,10 +27,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RateLimitResponse_Code int32 const ( @@ -224,7 +217,6 @@ func (x *RateLimitRequest) GetHitsAddend() uint32 { } // A response from a ShouldRateLimit call. -// [#next-free-field: 7] type RateLimitResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -241,16 +233,6 @@ type RateLimitResponse struct { Headers []*core.HeaderValue `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` // A list of headers to add to the request when forwarded RequestHeadersToAdd []*core.HeaderValue `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // A response body to send to the downstream client when the response code is not OK. - RawBody []byte `protobuf:"bytes,5,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"` - // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next - // filter. This metadata lives in a namespace specified by the canonical name of extension filter - // that requires it: - // - // - :ref:`envoy.filters.http.ratelimit ` for HTTP filter. - // - :ref:`envoy.filters.network.ratelimit ` for network filter. - // - :ref:`envoy.filters.thrift.rate_limit ` for Thrift filter. - DynamicMetadata *_struct.Struct `protobuf:"bytes,6,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` } func (x *RateLimitResponse) Reset() { @@ -313,20 +295,6 @@ func (x *RateLimitResponse) GetRequestHeadersToAdd() []*core.HeaderValue { return nil } -func (x *RateLimitResponse) GetRawBody() []byte { - if x != nil { - return x.RawBody - } - return nil -} - -func (x *RateLimitResponse) GetDynamicMetadata() *_struct.Struct { - if x != nil { - return x.DynamicMetadata - } - return nil -} - // Defines an actual rate limit in terms of requests per unit of time and the unit itself. type RateLimitResponse_RateLimit struct { state protoimpl.MessageState @@ -471,98 +439,93 @@ var file_envoy_service_ratelimit_v2_rls_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, - 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x4d, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x69, - 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x22, 0xc6, 0x07, 0x0a, 0x11, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, - 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x1f, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x0a, 0x17, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x53, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, - 0x6f, 0x41, 0x64, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0xdd, 0x01, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, - 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x04, 0x75, - 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a, 0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, - 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, - 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, - 0x59, 0x10, 0x04, 0x1a, 0xe1, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x4d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, + 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64, + 0x64, 0x65, 0x6e, 0x64, 0x22, 0xe7, 0x06, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76, + 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x59, 0x0a, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x1f, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x52, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, + 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x1a, 0xdd, 0x01, + 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75, + 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a, + 0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, + 0x55, 0x52, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x1a, 0xe1, 0x01, + 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, + 0x67, 0x22, 0x2b, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0e, + 0x0a, 0x0a, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x32, 0x84, + 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, - 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, - 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x2b, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, - 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, - 0x49, 0x54, 0x10, 0x02, 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 0x6f, - 0x75, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x0a, 0x28, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x90, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x32, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, + 0x32, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x32, 0x88, 0x01, 0x01, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -588,25 +551,23 @@ var file_envoy_service_ratelimit_v2_rls_proto_goTypes = []interface{}{ (*RateLimitResponse_DescriptorStatus)(nil), // 5: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus (*ratelimit.RateLimitDescriptor)(nil), // 6: envoy.api.v2.ratelimit.RateLimitDescriptor (*core.HeaderValue)(nil), // 7: envoy.api.v2.core.HeaderValue - (*_struct.Struct)(nil), // 8: google.protobuf.Struct } var file_envoy_service_ratelimit_v2_rls_proto_depIdxs = []int32{ - 6, // 0: envoy.service.ratelimit.v2.RateLimitRequest.descriptors:type_name -> envoy.api.v2.ratelimit.RateLimitDescriptor - 0, // 1: envoy.service.ratelimit.v2.RateLimitResponse.overall_code:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.Code - 5, // 2: envoy.service.ratelimit.v2.RateLimitResponse.statuses:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus - 7, // 3: envoy.service.ratelimit.v2.RateLimitResponse.headers:type_name -> envoy.api.v2.core.HeaderValue - 7, // 4: envoy.service.ratelimit.v2.RateLimitResponse.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValue - 8, // 5: envoy.service.ratelimit.v2.RateLimitResponse.dynamic_metadata:type_name -> google.protobuf.Struct - 1, // 6: envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.unit:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit - 0, // 7: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.code:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.Code - 4, // 8: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.current_limit:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.RateLimit - 2, // 9: envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v2.RateLimitRequest - 3, // 10: envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v2.RateLimitResponse - 10, // [10:11] is the sub-list for method output_type - 9, // [9:10] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 6, // 0: envoy.service.ratelimit.v2.RateLimitRequest.descriptors:type_name -> envoy.api.v2.ratelimit.RateLimitDescriptor + 0, // 1: envoy.service.ratelimit.v2.RateLimitResponse.overall_code:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.Code + 5, // 2: envoy.service.ratelimit.v2.RateLimitResponse.statuses:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus + 7, // 3: envoy.service.ratelimit.v2.RateLimitResponse.headers:type_name -> envoy.api.v2.core.HeaderValue + 7, // 4: envoy.service.ratelimit.v2.RateLimitResponse.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValue + 1, // 5: envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.unit:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit + 0, // 6: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.code:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.Code + 4, // 7: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.current_limit:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.RateLimit + 2, // 8: envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v2.RateLimitRequest + 3, // 9: envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v2.RateLimitResponse + 9, // [9:10] is the sub-list for method output_type + 8, // [8:9] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_envoy_service_ratelimit_v2_rls_proto_init() } diff --git a/pkg/api/envoy/service/ratelimit/v2/rls.pb.validate.go b/pkg/api/envoy/service/ratelimit/v2/rls.pb.validate.go index e400e59f41..6b24ffb797 100644 --- a/pkg/api/envoy/service/ratelimit/v2/rls.pb.validate.go +++ b/pkg/api/envoy/service/ratelimit/v2/rls.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/ratelimit/v2/rls.proto -package envoy_service_ratelimit_v2 +package ratelimitv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RateLimitRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimitRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitRequestMultiError, or nil if none found. +func (m *RateLimitRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Domain for idx, item := range m.GetDescriptors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitRequestValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitRequestValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitRequestValidationError{ field: fmt.Sprintf("Descriptors[%v]", idx), @@ -60,9 +95,30 @@ func (m *RateLimitRequest) Validate() error { // no validation rules for HitsAddend + if len(errors) > 0 { + return RateLimitRequestMultiError(errors) + } + return nil } +// RateLimitRequestMultiError is an error wrapping multiple validation errors +// returned by RateLimitRequest.ValidateAll() if the designated constraints +// aren't met. +type RateLimitRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitRequestMultiError) AllErrors() []error { return m } + // RateLimitRequestValidationError is the validation error returned by // RateLimitRequest.Validate if the designated constraints aren't met. type RateLimitRequestValidationError struct { @@ -118,19 +174,52 @@ var _ interface { } = RateLimitRequestValidationError{} // Validate checks the field values on RateLimitResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimitResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitResponseMultiError, or nil if none found. +func (m *RateLimitResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for OverallCode for idx, item := range m.GetStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Statuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Statuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), @@ -145,7 +234,26 @@ func (m *RateLimitResponse) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -160,7 +268,26 @@ func (m *RateLimitResponse) Validate() error { for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -172,21 +299,30 @@ func (m *RateLimitResponse) Validate() error { } - // no validation rules for RawBody - - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitResponseValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } + if len(errors) > 0 { + return RateLimitResponseMultiError(errors) } return nil } +// RateLimitResponseMultiError is an error wrapping multiple validation errors +// returned by RateLimitResponse.ValidateAll() if the designated constraints +// aren't met. +type RateLimitResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponseMultiError) AllErrors() []error { return m } + // RateLimitResponseValidationError is the validation error returned by // RateLimitResponse.Validate if the designated constraints aren't met. type RateLimitResponseValidationError struct { @@ -245,21 +381,56 @@ var _ interface { // Validate checks the field values on RateLimitResponse_RateLimit with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitResponse_RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_RateLimit with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitResponse_RateLimitMultiError, or nil if none found. +func (m *RateLimitResponse_RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for RequestsPerUnit // no validation rules for Unit + if len(errors) > 0 { + return RateLimitResponse_RateLimitMultiError(errors) + } + return nil } +// RateLimitResponse_RateLimitMultiError is an error wrapping multiple +// validation errors returned by RateLimitResponse_RateLimit.ValidateAll() if +// the designated constraints aren't met. +type RateLimitResponse_RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_RateLimitMultiError) AllErrors() []error { return m } + // RateLimitResponse_RateLimitValidationError is the validation error returned // by RateLimitResponse_RateLimit.Validate if the designated constraints // aren't met. @@ -319,15 +490,49 @@ var _ interface { // Validate checks the field values on RateLimitResponse_DescriptorStatus with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimitResponse_DescriptorStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_DescriptorStatus +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimitResponse_DescriptorStatusMultiError, or nil if none found. +func (m *RateLimitResponse_DescriptorStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_DescriptorStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Code - if v, ok := interface{}(m.GetCurrentLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCurrentLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "CurrentLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "CurrentLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCurrentLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponse_DescriptorStatusValidationError{ field: "CurrentLimit", @@ -339,9 +544,31 @@ func (m *RateLimitResponse_DescriptorStatus) Validate() error { // no validation rules for LimitRemaining + if len(errors) > 0 { + return RateLimitResponse_DescriptorStatusMultiError(errors) + } + return nil } +// RateLimitResponse_DescriptorStatusMultiError is an error wrapping multiple +// validation errors returned by +// RateLimitResponse_DescriptorStatus.ValidateAll() if the designated +// constraints aren't met. +type RateLimitResponse_DescriptorStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_DescriptorStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_DescriptorStatusMultiError) AllErrors() []error { return m } + // RateLimitResponse_DescriptorStatusValidationError is the validation error // returned by RateLimitResponse_DescriptorStatus.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/ratelimit/v3/rls.pb.go b/pkg/api/envoy/service/ratelimit/v3/rls.pb.go index 05b619aedc..7cec88d082 100644 --- a/pkg/api/envoy/service/ratelimit/v3/rls.pb.go +++ b/pkg/api/envoy/service/ratelimit/v3/rls.pb.go @@ -1,20 +1,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/ratelimit/v3/rls.proto -package envoy_service_ratelimit_v3 +package ratelimitv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/common/ratelimit/v3" _ "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" + timestamp "github.com/golang/protobuf/ptypes/timestamp" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -31,10 +31,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RateLimitResponse_Code int32 const ( @@ -227,7 +223,7 @@ func (x *RateLimitRequest) GetHitsAddend() uint32 { } // A response from a ShouldRateLimit call. -// [#next-free-field: 7] +// [#next-free-field: 8] type RateLimitResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -254,6 +250,18 @@ type RateLimitResponse struct { // - :ref:`envoy.filters.network.ratelimit ` for network filter. // - :ref:`envoy.filters.thrift.rate_limit ` for Thrift filter. DynamicMetadata *_struct.Struct `protobuf:"bytes,6,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` + // Quota is available for a request if its entire descriptor set has cached quota available. + // This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response. + // + // If quota is available, a RLS request will not be made and the quota will be reduced by 1. + // If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered. + // If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the + // :ref:`overall_code `. + // + // If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired, + // the request will be treated as OVER_LIMIT. + // [#not-implemented-hide:] + Quota *RateLimitResponse_Quota `protobuf:"bytes,7,opt,name=quota,proto3" json:"quota,omitempty"` } func (x *RateLimitResponse) Reset() { @@ -330,6 +338,13 @@ func (x *RateLimitResponse) GetDynamicMetadata() *_struct.Struct { return nil } +func (x *RateLimitResponse) GetQuota() *RateLimitResponse_Quota { + if x != nil { + return x.Quota + } + return nil +} + // Defines an actual rate limit in terms of requests per unit of time and the unit itself. type RateLimitResponse_RateLimit struct { state protoimpl.MessageState @@ -397,6 +412,108 @@ func (x *RateLimitResponse_RateLimit) GetUnit() RateLimitResponse_RateLimit_Unit return RateLimitResponse_RateLimit_UNKNOWN } +// Cacheable quota for responses. +// Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set. +// This is a certain number of requests over a period of time. +// The client may cache this result and apply the effective RateLimitResponse to future matching +// requests without querying rate limit service. +// +// When quota expires due to timeout, a new RLS request will also be made. +// The implementation may choose to preemptively query the rate limit server for more quota on or +// before expiration or before the available quota runs out. +// [#not-implemented-hide:] +type RateLimitResponse_Quota struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Number of matching requests granted in quota. Must be 1 or more. + Requests uint32 `protobuf:"varint,1,opt,name=requests,proto3" json:"requests,omitempty"` + // Types that are assignable to ExpirationSpecifier: + // *RateLimitResponse_Quota_ValidUntil + ExpirationSpecifier isRateLimitResponse_Quota_ExpirationSpecifier `protobuf_oneof:"expiration_specifier"` + // The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level. + // + // For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"), + // the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same. + // Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.) + // + // If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`. + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *RateLimitResponse_Quota) Reset() { + *x = RateLimitResponse_Quota{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitResponse_Quota) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitResponse_Quota) ProtoMessage() {} + +func (x *RateLimitResponse_Quota) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitResponse_Quota.ProtoReflect.Descriptor instead. +func (*RateLimitResponse_Quota) Descriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *RateLimitResponse_Quota) GetRequests() uint32 { + if x != nil { + return x.Requests + } + return 0 +} + +func (m *RateLimitResponse_Quota) GetExpirationSpecifier() isRateLimitResponse_Quota_ExpirationSpecifier { + if m != nil { + return m.ExpirationSpecifier + } + return nil +} + +func (x *RateLimitResponse_Quota) GetValidUntil() *timestamp.Timestamp { + if x, ok := x.GetExpirationSpecifier().(*RateLimitResponse_Quota_ValidUntil); ok { + return x.ValidUntil + } + return nil +} + +func (x *RateLimitResponse_Quota) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type isRateLimitResponse_Quota_ExpirationSpecifier interface { + isRateLimitResponse_Quota_ExpirationSpecifier() +} + +type RateLimitResponse_Quota_ValidUntil struct { + // Point in time at which the quota expires. + ValidUntil *timestamp.Timestamp `protobuf:"bytes,2,opt,name=valid_until,json=validUntil,proto3,oneof"` +} + +func (*RateLimitResponse_Quota_ValidUntil) isRateLimitResponse_Quota_ExpirationSpecifier() {} + +// [#next-free-field: 6] type RateLimitResponse_DescriptorStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -410,12 +527,37 @@ type RateLimitResponse_DescriptorStatus struct { LimitRemaining uint32 `protobuf:"varint,3,opt,name=limit_remaining,json=limitRemaining,proto3" json:"limit_remaining,omitempty"` // Duration until reset of the current limit window. DurationUntilReset *duration.Duration `protobuf:"bytes,4,opt,name=duration_until_reset,json=durationUntilReset,proto3" json:"duration_until_reset,omitempty"` + // Quota is available for a request if its descriptor set has cached quota available for all + // descriptors. + // This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota. + // + // If quota is available, a RLS request will not be made and the quota will be reduced by 1 for + // all matching descriptors. + // + // If there is not sufficient quota, there are three cases: + // 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired. + // In this case, the request will be treated as OVER_LIMIT. + // 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors + // have no cached entry. This will trigger a new RLS request. + // When the result is returned, a single unit will be consumed from the quota for all + // matching descriptors. + // If the server did not provide a quota, such as the quota message is empty for some of + // the descriptors, then the request admission is determined by the + // :ref:`overall_code `. + // 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request, + // When the result is returned, a single unit will be consumed from the quota for all + // matching descriptors. + // If the server did not provide a quota, such as the quota message is empty for some of + // the descriptors, then the request admission is determined by the + // :ref:`overall_code `. + // [#not-implemented-hide:] + Quota *RateLimitResponse_Quota `protobuf:"bytes,5,opt,name=quota,proto3" json:"quota,omitempty"` } func (x *RateLimitResponse_DescriptorStatus) Reset() { *x = RateLimitResponse_DescriptorStatus{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -428,7 +570,7 @@ func (x *RateLimitResponse_DescriptorStatus) String() string { func (*RateLimitResponse_DescriptorStatus) ProtoMessage() {} func (x *RateLimitResponse_DescriptorStatus) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -441,7 +583,7 @@ func (x *RateLimitResponse_DescriptorStatus) ProtoReflect() protoreflect.Message // Deprecated: Use RateLimitResponse_DescriptorStatus.ProtoReflect.Descriptor instead. func (*RateLimitResponse_DescriptorStatus) Descriptor() ([]byte, []int) { - return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 1} + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 2} } func (x *RateLimitResponse_DescriptorStatus) GetCode() RateLimitResponse_Code { @@ -472,6 +614,13 @@ func (x *RateLimitResponse_DescriptorStatus) GetDurationUntilReset() *duration.D return nil } +func (x *RateLimitResponse_DescriptorStatus) GetQuota() *RateLimitResponse_Quota { + if x != nil { + return x.Quota + } + return nil +} + var File_envoy_service_ratelimit_v3_rls_proto protoreflect.FileDescriptor var file_envoy_service_ratelimit_v3_rls_proto_rawDesc = []byte{ @@ -488,117 +637,143 @@ var file_envoy_service_ratelimit_v3_rls_proto_rawDesc = []byte{ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, - 0x5b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x68, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x3a, 0x32, 0x9a, - 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0xcf, 0x09, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76, 0x65, 0x72, 0x61, - 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, - 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x5a, - 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, - 0x6f, 0x41, 0x64, 0x64, 0x12, 0x56, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x9c, 0x02, 0x0a, 0x09, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, - 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, - 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a, 0x04, 0x55, - 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, - 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, - 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0xf4, 0x02, 0x0a, 0x10, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, - 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x12, 0x5b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x68, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x3a, 0x32, + 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0xfb, 0x0b, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76, 0x65, 0x72, + 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x72, - 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x4b, - 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, - 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x44, 0x9a, 0xc5, 0x88, - 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x5a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x2b, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0e, - 0x0a, 0x0a, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x3a, 0x33, - 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, - 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x75, - 0x6c, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 0x65, 0x6e, + 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x56, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x05, + 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x0a, 0x28, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x1a, 0x9c, 0x02, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, + 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x55, 0x6e, 0x69, + 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a, 0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, + 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x03, 0x12, 0x07, + 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x93, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, + 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, + 0x6e, 0x74, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0xbf, 0x03, 0x0a, + 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x12, 0x4b, 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x74, + 0x69, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x49, 0x0a, + 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x6f, 0x74, + 0x61, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, + 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2b, + 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, + 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x3a, 0x33, 0x9a, 0xc5, 0x88, + 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x90, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0x88, + 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -614,37 +789,42 @@ func file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP() []byte { } var file_envoy_service_ratelimit_v3_rls_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_service_ratelimit_v3_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_service_ratelimit_v3_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_envoy_service_ratelimit_v3_rls_proto_goTypes = []interface{}{ (RateLimitResponse_Code)(0), // 0: envoy.service.ratelimit.v3.RateLimitResponse.Code (RateLimitResponse_RateLimit_Unit)(0), // 1: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit (*RateLimitRequest)(nil), // 2: envoy.service.ratelimit.v3.RateLimitRequest (*RateLimitResponse)(nil), // 3: envoy.service.ratelimit.v3.RateLimitResponse (*RateLimitResponse_RateLimit)(nil), // 4: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit - (*RateLimitResponse_DescriptorStatus)(nil), // 5: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus - (*v3.RateLimitDescriptor)(nil), // 6: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor - (*v31.HeaderValue)(nil), // 7: envoy.config.core.v3.HeaderValue - (*_struct.Struct)(nil), // 8: google.protobuf.Struct - (*duration.Duration)(nil), // 9: google.protobuf.Duration + (*RateLimitResponse_Quota)(nil), // 5: envoy.service.ratelimit.v3.RateLimitResponse.Quota + (*RateLimitResponse_DescriptorStatus)(nil), // 6: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus + (*v3.RateLimitDescriptor)(nil), // 7: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor + (*v31.HeaderValue)(nil), // 8: envoy.config.core.v3.HeaderValue + (*_struct.Struct)(nil), // 9: google.protobuf.Struct + (*timestamp.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*duration.Duration)(nil), // 11: google.protobuf.Duration } var file_envoy_service_ratelimit_v3_rls_proto_depIdxs = []int32{ - 6, // 0: envoy.service.ratelimit.v3.RateLimitRequest.descriptors:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor + 7, // 0: envoy.service.ratelimit.v3.RateLimitRequest.descriptors:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 0, // 1: envoy.service.ratelimit.v3.RateLimitResponse.overall_code:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Code - 5, // 2: envoy.service.ratelimit.v3.RateLimitResponse.statuses:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus - 7, // 3: envoy.service.ratelimit.v3.RateLimitResponse.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue - 7, // 4: envoy.service.ratelimit.v3.RateLimitResponse.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue - 8, // 5: envoy.service.ratelimit.v3.RateLimitResponse.dynamic_metadata:type_name -> google.protobuf.Struct - 1, // 6: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.unit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit - 0, // 7: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.code:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Code - 4, // 8: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.current_limit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit - 9, // 9: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.duration_until_reset:type_name -> google.protobuf.Duration - 2, // 10: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v3.RateLimitRequest - 3, // 11: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v3.RateLimitResponse - 11, // [11:12] is the sub-list for method output_type - 10, // [10:11] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 6, // 2: envoy.service.ratelimit.v3.RateLimitResponse.statuses:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus + 8, // 3: envoy.service.ratelimit.v3.RateLimitResponse.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue + 8, // 4: envoy.service.ratelimit.v3.RateLimitResponse.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue + 9, // 5: envoy.service.ratelimit.v3.RateLimitResponse.dynamic_metadata:type_name -> google.protobuf.Struct + 5, // 6: envoy.service.ratelimit.v3.RateLimitResponse.quota:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Quota + 1, // 7: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.unit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit + 10, // 8: envoy.service.ratelimit.v3.RateLimitResponse.Quota.valid_until:type_name -> google.protobuf.Timestamp + 0, // 9: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.code:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Code + 4, // 10: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.current_limit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit + 11, // 11: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.duration_until_reset:type_name -> google.protobuf.Duration + 5, // 12: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.quota:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Quota + 2, // 13: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v3.RateLimitRequest + 3, // 14: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v3.RateLimitResponse + 14, // [14:15] is the sub-list for method output_type + 13, // [13:14] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_envoy_service_ratelimit_v3_rls_proto_init() } @@ -690,6 +870,18 @@ func file_envoy_service_ratelimit_v3_rls_proto_init() { } } file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitResponse_Quota); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimitResponse_DescriptorStatus); i { case 0: return &v.state @@ -702,13 +894,16 @@ func file_envoy_service_ratelimit_v3_rls_proto_init() { } } } + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*RateLimitResponse_Quota_ValidUntil)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_service_ratelimit_v3_rls_proto_rawDesc, NumEnums: 2, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/api/envoy/service/ratelimit/v3/rls.pb.validate.go b/pkg/api/envoy/service/ratelimit/v3/rls.pb.validate.go index 77e886b697..a8eb961f84 100644 --- a/pkg/api/envoy/service/ratelimit/v3/rls.pb.validate.go +++ b/pkg/api/envoy/service/ratelimit/v3/rls.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/ratelimit/v3/rls.proto -package envoy_service_ratelimit_v3 +package ratelimitv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RateLimitRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimitRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitRequestMultiError, or nil if none found. +func (m *RateLimitRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Domain for idx, item := range m.GetDescriptors() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitRequestValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitRequestValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitRequestValidationError{ field: fmt.Sprintf("Descriptors[%v]", idx), @@ -60,9 +95,30 @@ func (m *RateLimitRequest) Validate() error { // no validation rules for HitsAddend + if len(errors) > 0 { + return RateLimitRequestMultiError(errors) + } + return nil } +// RateLimitRequestMultiError is an error wrapping multiple validation errors +// returned by RateLimitRequest.ValidateAll() if the designated constraints +// aren't met. +type RateLimitRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitRequestMultiError) AllErrors() []error { return m } + // RateLimitRequestValidationError is the validation error returned by // RateLimitRequest.Validate if the designated constraints aren't met. type RateLimitRequestValidationError struct { @@ -118,19 +174,52 @@ var _ interface { } = RateLimitRequestValidationError{} // Validate checks the field values on RateLimitResponse with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *RateLimitResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitResponseMultiError, or nil if none found. +func (m *RateLimitResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for OverallCode for idx, item := range m.GetStatuses() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Statuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Statuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), @@ -145,7 +234,26 @@ func (m *RateLimitResponse) Validate() error { for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), @@ -160,7 +268,26 @@ func (m *RateLimitResponse) Validate() error { for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), @@ -174,7 +301,26 @@ func (m *RateLimitResponse) Validate() error { // no validation rules for RawBody - if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: "DynamicMetadata", @@ -184,9 +330,59 @@ func (m *RateLimitResponse) Validate() error { } } + if all { + switch v := interface{}(m.GetQuota()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuota()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponseValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitResponseMultiError(errors) + } + return nil } +// RateLimitResponseMultiError is an error wrapping multiple validation errors +// returned by RateLimitResponse.ValidateAll() if the designated constraints +// aren't met. +type RateLimitResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponseMultiError) AllErrors() []error { return m } + // RateLimitResponseValidationError is the validation error returned by // RateLimitResponse.Validate if the designated constraints aren't met. type RateLimitResponseValidationError struct { @@ -245,21 +441,56 @@ var _ interface { // Validate checks the field values on RateLimitResponse_RateLimit with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RateLimitResponse_RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_RateLimit with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitResponse_RateLimitMultiError, or nil if none found. +func (m *RateLimitResponse_RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_RateLimit) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Name // no validation rules for RequestsPerUnit // no validation rules for Unit + if len(errors) > 0 { + return RateLimitResponse_RateLimitMultiError(errors) + } + return nil } +// RateLimitResponse_RateLimitMultiError is an error wrapping multiple +// validation errors returned by RateLimitResponse_RateLimit.ValidateAll() if +// the designated constraints aren't met. +type RateLimitResponse_RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_RateLimitMultiError) AllErrors() []error { return m } + // RateLimitResponse_RateLimitValidationError is the validation error returned // by RateLimitResponse_RateLimit.Validate if the designated constraints // aren't met. @@ -317,17 +548,201 @@ var _ interface { ErrorName() string } = RateLimitResponse_RateLimitValidationError{} +// Validate checks the field values on RateLimitResponse_Quota with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RateLimitResponse_Quota) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_Quota with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RateLimitResponse_QuotaMultiError, or nil if none found. +func (m *RateLimitResponse_Quota) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_Quota) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetRequests() <= 0 { + err := RateLimitResponse_QuotaValidationError{ + field: "Requests", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Id + + switch m.ExpirationSpecifier.(type) { + + case *RateLimitResponse_Quota_ValidUntil: + + if all { + switch v := interface{}(m.GetValidUntil()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_QuotaValidationError{ + field: "ValidUntil", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_QuotaValidationError{ + field: "ValidUntil", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidUntil()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponse_QuotaValidationError{ + field: "ValidUntil", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitResponse_QuotaMultiError(errors) + } + + return nil +} + +// RateLimitResponse_QuotaMultiError is an error wrapping multiple validation +// errors returned by RateLimitResponse_Quota.ValidateAll() if the designated +// constraints aren't met. +type RateLimitResponse_QuotaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_QuotaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_QuotaMultiError) AllErrors() []error { return m } + +// RateLimitResponse_QuotaValidationError is the validation error returned by +// RateLimitResponse_Quota.Validate if the designated constraints aren't met. +type RateLimitResponse_QuotaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitResponse_QuotaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitResponse_QuotaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitResponse_QuotaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitResponse_QuotaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitResponse_QuotaValidationError) ErrorName() string { + return "RateLimitResponse_QuotaValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitResponse_QuotaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRateLimitResponse_Quota.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitResponse_QuotaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitResponse_QuotaValidationError{} + // Validate checks the field values on RateLimitResponse_DescriptorStatus with // the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. +// are violated, the first error encountered is returned, or nil if there are +// no violations. func (m *RateLimitResponse_DescriptorStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_DescriptorStatus +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// RateLimitResponse_DescriptorStatusMultiError, or nil if none found. +func (m *RateLimitResponse_DescriptorStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_DescriptorStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Code - if v, ok := interface{}(m.GetCurrentLimit()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCurrentLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "CurrentLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "CurrentLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCurrentLimit()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponse_DescriptorStatusValidationError{ field: "CurrentLimit", @@ -339,7 +754,26 @@ func (m *RateLimitResponse_DescriptorStatus) Validate() error { // no validation rules for LimitRemaining - if v, ok := interface{}(m.GetDurationUntilReset()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDurationUntilReset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "DurationUntilReset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "DurationUntilReset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDurationUntilReset()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponse_DescriptorStatusValidationError{ field: "DurationUntilReset", @@ -349,9 +783,60 @@ func (m *RateLimitResponse_DescriptorStatus) Validate() error { } } + if all { + switch v := interface{}(m.GetQuota()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuota()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponse_DescriptorStatusValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitResponse_DescriptorStatusMultiError(errors) + } + return nil } +// RateLimitResponse_DescriptorStatusMultiError is an error wrapping multiple +// validation errors returned by +// RateLimitResponse_DescriptorStatus.ValidateAll() if the designated +// constraints aren't met. +type RateLimitResponse_DescriptorStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_DescriptorStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_DescriptorStatusMultiError) AllErrors() []error { return m } + // RateLimitResponse_DescriptorStatusValidationError is the validation error // returned by RateLimitResponse_DescriptorStatus.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/route/v3/rds.pb.go b/pkg/api/envoy/service/route/v3/rds.pb.go index fcdc4c395a..2fe62967b1 100644 --- a/pkg/api/envoy/service/route/v3/rds.pb.go +++ b/pkg/api/envoy/service/route/v3/rds.pb.go @@ -1,19 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/route/v3/rds.proto -package envoy_service_route_v3 +package routev3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/wrappers" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -31,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type RdsDummy struct { @@ -86,65 +79,66 @@ var file_envoy_service_route_v3_rds_proto_rawDesc = []byte{ 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x28, 0x0a, 0x08, 0x52, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x1c, 0x9a, - 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xcc, 0x03, 0x0a, 0x15, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x74, - 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x08, 0x52, 0x64, 0x73, 0x44, + 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x64, 0x73, 0x44, 0x75, 0x6d, + 0x6d, 0x79, 0x32, 0xcc, 0x03, 0x0a, 0x15, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0c, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x7a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, + 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x91, 0x01, 0x0a, 0x0b, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, + 0x22, 0x14, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, + 0x30, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0xcb, 0x01, 0x0a, 0x1b, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, + 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x80, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x56, 0x69, 0x72, 0x74, 0x75, + 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x28, 0x01, 0x30, 0x01, 0x12, 0x91, 0x01, 0x0a, 0x0b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x76, 0x33, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x30, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x2a, - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xcb, 0x01, 0x0a, 0x1b, 0x56, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x11, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x1a, 0x29, 0x8a, - 0xa4, 0x96, 0xf3, 0x07, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, - 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x3d, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x42, 0x08, 0x52, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x01, 0x30, 0x01, 0x1a, 0x29, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x23, 0x0a, 0x21, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x42, + 0x84, 0x01, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x64, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/route/v3/rds.pb.validate.go b/pkg/api/envoy/service/route/v3/rds.pb.validate.go index d8e14c5e67..9c11950ff5 100644 --- a/pkg/api/envoy/service/route/v3/rds.pb.validate.go +++ b/pkg/api/envoy/service/route/v3/rds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/route/v3/rds.proto -package envoy_service_route_v3 +package routev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RdsDummyMultiError, or nil +// if none found. +func (m *RdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *RdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RdsDummyMultiError(errors) + } + return nil } +// RdsDummyMultiError is an error wrapping multiple validation errors returned +// by RdsDummy.ValidateAll() if the designated constraints aren't met. +type RdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RdsDummyMultiError) AllErrors() []error { return m } + // RdsDummyValidationError is the validation error returned by // RdsDummy.Validate if the designated constraints aren't met. type RdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/route/v3/srds.pb.go b/pkg/api/envoy/service/route/v3/srds.pb.go index ffc744874b..d91b0d6c0d 100644 --- a/pkg/api/envoy/service/route/v3/srds.pb.go +++ b/pkg/api/envoy/service/route/v3/srds.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/route/v3/srds.proto -package envoy_service_route_v3 +package routev3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. type SrdsDummy struct { @@ -124,12 +119,16 @@ var file_envoy_service_route_v3_srds_proto_rawDesc = []byte{ 0x3a, 0x01, 0x2a, 0x1a, 0x36, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x3e, 0x0a, 0x24, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x42, 0x09, 0x53, 0x72, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x85, 0x01, 0x0a, 0x24, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x53, 0x72, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, + 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/route/v3/srds.pb.validate.go b/pkg/api/envoy/service/route/v3/srds.pb.validate.go index f85eee4f07..0b3bcf1617 100644 --- a/pkg/api/envoy/service/route/v3/srds.pb.validate.go +++ b/pkg/api/envoy/service/route/v3/srds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/route/v3/srds.proto -package envoy_service_route_v3 +package routev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SrdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SrdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SrdsDummyMultiError, or nil +// if none found. +func (m *SrdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *SrdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SrdsDummyMultiError(errors) + } + return nil } +// SrdsDummyMultiError is an error wrapping multiple validation errors returned +// by SrdsDummy.ValidateAll() if the designated constraints aren't met. +type SrdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SrdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SrdsDummyMultiError) AllErrors() []error { return m } + // SrdsDummyValidationError is the validation error returned by // SrdsDummy.Validate if the designated constraints aren't met. type SrdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/runtime/v3/rtds.pb.go b/pkg/api/envoy/service/runtime/v3/rtds.pb.go index df26165406..643065c07e 100644 --- a/pkg/api/envoy/service/runtime/v3/rtds.pb.go +++ b/pkg/api/envoy/service/runtime/v3/rtds.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/runtime/v3/rtds.proto -package envoy_service_runtime_v3 +package runtimev3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" _ "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" @@ -31,10 +30,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 type RtdsDummy struct { @@ -194,12 +189,17 @@ var file_envoy_service_runtime_v3_rtds_proto_rawDesc = []byte{ 0x65, 0x72, 0x79, 0x3a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x28, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x40, - 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x8b, + 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x76, + 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/runtime/v3/rtds.pb.validate.go b/pkg/api/envoy/service/runtime/v3/rtds.pb.validate.go index 26221076c4..4d44a4c139 100644 --- a/pkg/api/envoy/service/runtime/v3/rtds.pb.validate.go +++ b/pkg/api/envoy/service/runtime/v3/rtds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/runtime/v3/rtds.proto -package envoy_service_runtime_v3 +package runtimev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RtdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RtdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RtdsDummyMultiError, or nil +// if none found. +func (m *RtdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *RtdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return RtdsDummyMultiError(errors) + } + return nil } +// RtdsDummyMultiError is an error wrapping multiple validation errors returned +// by RtdsDummy.ValidateAll() if the designated constraints aren't met. +type RtdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RtdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RtdsDummyMultiError) AllErrors() []error { return m } + // RtdsDummyValidationError is the validation error returned by // RtdsDummy.Validate if the designated constraints aren't met. type RtdsDummyValidationError struct { @@ -98,20 +135,57 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Runtime) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Runtime with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RuntimeMultiError, or nil if none found. +func (m *Runtime) ValidateAll() error { + return m.validate(true) +} + +func (m *Runtime) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return RuntimeValidationError{ + err := RuntimeValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetLayer()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLayer()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeValidationError{ field: "Layer", @@ -121,9 +195,29 @@ func (m *Runtime) Validate() error { } } + if len(errors) > 0 { + return RuntimeMultiError(errors) + } + return nil } +// RuntimeMultiError is an error wrapping multiple validation errors returned +// by Runtime.ValidateAll() if the designated constraints aren't met. +type RuntimeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeMultiError) AllErrors() []error { return m } + // RuntimeValidationError is the validation error returned by Runtime.Validate // if the designated constraints aren't met. type RuntimeValidationError struct { diff --git a/pkg/api/envoy/service/secret/v3/sds.pb.go b/pkg/api/envoy/service/secret/v3/sds.pb.go index 701080d6f3..85aaf48b74 100644 --- a/pkg/api/envoy/service/secret/v3/sds.pb.go +++ b/pkg/api/envoy/service/secret/v3/sds.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/secret/v3/sds.proto -package envoy_service_secret_v3 +package secretv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing // services: https://github.com/google/protobuf/issues/4221 type SdsDummy struct { @@ -123,12 +118,16 @@ var file_envoy_service_secret_v3_sds_proto_rawDesc = []byte{ 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x38, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x3e, - 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x53, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x87, + 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x53, 0x64, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x76, 0x33, 0x88, 0x01, 0x01, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/secret/v3/sds.pb.validate.go b/pkg/api/envoy/service/secret/v3/sds.pb.validate.go index 8395b2f98f..ef2428944d 100644 --- a/pkg/api/envoy/service/secret/v3/sds.pb.validate.go +++ b/pkg/api/envoy/service/secret/v3/sds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/secret/v3/sds.proto -package envoy_service_secret_v3 +package secretv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,19 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *SdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SdsDummy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SdsDummyMultiError, or nil +// if none found. +func (m *SdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *SdsDummy) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return SdsDummyMultiError(errors) + } + return nil } +// SdsDummyMultiError is an error wrapping multiple validation errors returned +// by SdsDummy.ValidateAll() if the designated constraints aren't met. +type SdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SdsDummyMultiError) AllErrors() []error { return m } + // SdsDummyValidationError is the validation error returned by // SdsDummy.Validate if the designated constraints aren't met. type SdsDummyValidationError struct { diff --git a/pkg/api/envoy/service/status/v2/csds.pb.go b/pkg/api/envoy/service/status/v2/csds.pb.go index de6190331d..754da0cbb9 100644 --- a/pkg/api/envoy/service/status/v2/csds.pb.go +++ b/pkg/api/envoy/service/status/v2/csds.pb.go @@ -1,19 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/status/v2/csds.proto -package envoy_service_status_v2 +package statusv2 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/admin/v2alpha" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/struct" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -31,10 +29,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Status of a config. type ConfigStatus int32 @@ -385,86 +379,89 @@ var file_envoy_service_status_v2_csds_proto_rawDesc = []byte{ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x13, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x6e, 0x6f, 0x64, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x22, 0xb1, 0x03, 0x0a, 0x0c, 0x50, 0x65, - 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x53, 0x0a, 0x0f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, - 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, - 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x4a, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, - 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x13, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x10, 0x0a, 0x0e, 0x70, - 0x65, 0x72, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x81, 0x01, - 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, - 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x78, - 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x22, 0x55, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0x4b, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x4e, 0x43, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, - 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x04, 0x32, 0xb8, 0x02, 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, + 0x0a, 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x6e, + 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x22, 0xb1, 0x03, 0x0a, 0x0c, + 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x53, 0x0a, 0x0f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, + 0x52, 0x0e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x50, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, + 0x70, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, + 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, + 0x0a, 0x13, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x11, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x10, 0x0a, + 0x0e, 0x70, 0x65, 0x72, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x81, 0x01, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, + 0x0a, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x58, + 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x55, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0x4b, 0x0a, 0x0c, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x4e, 0x43, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x54, 0x10, + 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x32, 0xb8, 0x02, 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x9e, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, + 0x01, 0x12, 0x9e, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x32, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, - 0x42, 0x3f, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x43, 0x73, 0x64, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, + 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, + 0x01, 0x2a, 0x42, 0x88, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x43, 0x73, + 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/status/v2/csds.pb.validate.go b/pkg/api/envoy/service/status/v2/csds.pb.validate.go index 5e4bd19459..3bc28bbc4c 100644 --- a/pkg/api/envoy/service/status/v2/csds.pb.validate.go +++ b/pkg/api/envoy/service/status/v2/csds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/status/v2/csds.proto -package envoy_service_status_v2 +package statusv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,55 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ClientStatusRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClientStatusRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientStatusRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClientStatusRequestMultiError, or nil if none found. +func (m *ClientStatusRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientStatusRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetNodeMatchers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: fmt.Sprintf("NodeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: fmt.Sprintf("NodeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientStatusRequestValidationError{ field: fmt.Sprintf("NodeMatchers[%v]", idx), @@ -56,9 +91,30 @@ func (m *ClientStatusRequest) Validate() error { } + if len(errors) > 0 { + return ClientStatusRequestMultiError(errors) + } + return nil } +// ClientStatusRequestMultiError is an error wrapping multiple validation +// errors returned by ClientStatusRequest.ValidateAll() if the designated +// constraints aren't met. +type ClientStatusRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientStatusRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientStatusRequestMultiError) AllErrors() []error { return m } + // ClientStatusRequestValidationError is the validation error returned by // ClientStatusRequest.Validate if the designated constraints aren't met. type ClientStatusRequestValidationError struct { @@ -116,20 +172,53 @@ var _ interface { } = ClientStatusRequestValidationError{} // Validate checks the field values on PerXdsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PerXdsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerXdsConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PerXdsConfigMultiError, or +// nil if none found. +func (m *PerXdsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerXdsConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Status switch m.PerXdsConfig.(type) { case *PerXdsConfig_ListenerConfig: - if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListenerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "ListenerConfig", @@ -141,7 +230,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_ClusterConfig: - if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClusterConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "ClusterConfig", @@ -153,7 +261,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_RouteConfig: - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "RouteConfig", @@ -165,7 +292,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_ScopedRouteConfig: - if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ScopedRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ScopedRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "ScopedRouteConfig", @@ -177,9 +323,29 @@ func (m *PerXdsConfig) Validate() error { } + if len(errors) > 0 { + return PerXdsConfigMultiError(errors) + } + return nil } +// PerXdsConfigMultiError is an error wrapping multiple validation errors +// returned by PerXdsConfig.ValidateAll() if the designated constraints aren't met. +type PerXdsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerXdsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerXdsConfigMultiError) AllErrors() []error { return m } + // PerXdsConfigValidationError is the validation error returned by // PerXdsConfig.Validate if the designated constraints aren't met. type PerXdsConfigValidationError struct { @@ -235,14 +401,47 @@ var _ interface { } = PerXdsConfigValidationError{} // Validate checks the field values on ClientConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClientConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClientConfigMultiError, or +// nil if none found. +func (m *ClientConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientConfigValidationError{ field: "Node", @@ -255,7 +454,26 @@ func (m *ClientConfig) Validate() error { for idx, item := range m.GetXdsConfig() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("XdsConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("XdsConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientConfigValidationError{ field: fmt.Sprintf("XdsConfig[%v]", idx), @@ -267,9 +485,29 @@ func (m *ClientConfig) Validate() error { } + if len(errors) > 0 { + return ClientConfigMultiError(errors) + } + return nil } +// ClientConfigMultiError is an error wrapping multiple validation errors +// returned by ClientConfig.ValidateAll() if the designated constraints aren't met. +type ClientConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientConfigMultiError) AllErrors() []error { return m } + // ClientConfigValidationError is the validation error returned by // ClientConfig.Validate if the designated constraints aren't met. type ClientConfigValidationError struct { @@ -326,16 +564,49 @@ var _ interface { // Validate checks the field values on ClientStatusResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClientStatusResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientStatusResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClientStatusResponseMultiError, or nil if none found. +func (m *ClientStatusResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientStatusResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetConfig() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusResponseValidationError{ + field: fmt.Sprintf("Config[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusResponseValidationError{ + field: fmt.Sprintf("Config[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientStatusResponseValidationError{ field: fmt.Sprintf("Config[%v]", idx), @@ -347,9 +618,30 @@ func (m *ClientStatusResponse) Validate() error { } + if len(errors) > 0 { + return ClientStatusResponseMultiError(errors) + } + return nil } +// ClientStatusResponseMultiError is an error wrapping multiple validation +// errors returned by ClientStatusResponse.ValidateAll() if the designated +// constraints aren't met. +type ClientStatusResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientStatusResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientStatusResponseMultiError) AllErrors() []error { return m } + // ClientStatusResponseValidationError is the validation error returned by // ClientStatusResponse.Validate if the designated constraints aren't met. type ClientStatusResponseValidationError struct { diff --git a/pkg/api/envoy/service/status/v3/csds.pb.go b/pkg/api/envoy/service/status/v3/csds.pb.go index 363e2b1776..9965b5600e 100644 --- a/pkg/api/envoy/service/status/v3/csds.pb.go +++ b/pkg/api/envoy/service/status/v3/csds.pb.go @@ -1,19 +1,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/status/v3/csds.proto -package envoy_service_status_v3 +package statusv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v32 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/admin/v3" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/struct" + any "github.com/golang/protobuf/ptypes/any" + timestamp "github.com/golang/protobuf/ptypes/timestamp" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -31,10 +32,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Status of a config from a management server view. type ConfigStatus int32 @@ -231,6 +228,13 @@ type PerXdsConfig struct { // Client config status is populated by xDS clients. Will not be present if // the CSDS server is an xDS server. No matter what the client config status // is, xDS clients should always dump the most recent accepted xDS config. + // + // .. attention:: + // This field is deprecated. Use :ref:`ClientResourceStatus + // ` for per-resource + // config status instead. + // + // Deprecated: Do not use. ClientStatus ClientConfigStatus `protobuf:"varint,7,opt,name=client_status,json=clientStatus,proto3,enum=envoy.service.status.v3.ClientConfigStatus" json:"client_status,omitempty"` // Types that are assignable to PerXdsConfig: // *PerXdsConfig_ListenerConfig @@ -280,6 +284,7 @@ func (x *PerXdsConfig) GetStatus() ConfigStatus { return ConfigStatus_UNKNOWN } +// Deprecated: Do not use. func (x *PerXdsConfig) GetClientStatus() ClientConfigStatus { if x != nil { return x.ClientStatus @@ -370,8 +375,15 @@ type ClientConfig struct { unknownFields protoimpl.UnknownFields // Node for a particular client. - Node *v31.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + Node *v31.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // This field is deprecated in favor of generic_xds_configs which is + // much simpler and uniform in structure. + // + // Deprecated: Do not use. XdsConfig []*PerXdsConfig `protobuf:"bytes,2,rep,name=xds_config,json=xdsConfig,proto3" json:"xds_config,omitempty"` + // Represents generic xDS config and the exact config structure depends on + // the type URL (like Cluster if it is CDS) + GenericXdsConfigs []*ClientConfig_GenericXdsConfig `protobuf:"bytes,3,rep,name=generic_xds_configs,json=genericXdsConfigs,proto3" json:"generic_xds_configs,omitempty"` } func (x *ClientConfig) Reset() { @@ -413,6 +425,7 @@ func (x *ClientConfig) GetNode() *v31.Node { return nil } +// Deprecated: Do not use. func (x *ClientConfig) GetXdsConfig() []*PerXdsConfig { if x != nil { return x.XdsConfig @@ -420,6 +433,13 @@ func (x *ClientConfig) GetXdsConfig() []*PerXdsConfig { return nil } +func (x *ClientConfig) GetGenericXdsConfigs() []*ClientConfig_GenericXdsConfig { + if x != nil { + return x.GenericXdsConfigs + } + return nil +} + type ClientStatusResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -468,6 +488,140 @@ func (x *ClientStatusResponse) GetConfig() []*ClientConfig { return nil } +// GenericXdsConfig is used to specify the config status and the dump +// of any xDS resource identified by their type URL. It is the generalized +// version of the now deprecated ListenersConfigDump, ClustersConfigDump etc +// [#next-free-field: 10] +type ClientConfig_GenericXdsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type_url represents the fully qualified name of xDS resource type + // like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc. + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // Name of the xDS resource + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // This is the :ref:`version_info ` + // in the last processed xDS discovery response. If there are only + // static bootstrap listeners, this field will be "" + VersionInfo string `protobuf:"bytes,3,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The xDS resource config. Actual content depends on the type + XdsConfig *any.Any `protobuf:"bytes,4,opt,name=xds_config,json=xdsConfig,proto3" json:"xds_config,omitempty"` + // Timestamp when the xDS resource was last updated + LastUpdated *timestamp.Timestamp `protobuf:"bytes,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Per xDS resource config status. It is generated by management servers. + // It will not be present if the CSDS server is an xDS client. + ConfigStatus ConfigStatus `protobuf:"varint,6,opt,name=config_status,json=configStatus,proto3,enum=envoy.service.status.v3.ConfigStatus" json:"config_status,omitempty"` + // Per xDS resource status from the view of a xDS client + ClientStatus v32.ClientResourceStatus `protobuf:"varint,7,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` + // Set if the last update failed, cleared after the next successful + // update. The *error_state* field contains the rejected version of + // this particular resource along with the reason and timestamp. For + // successfully updated or acknowledged resource, this field should + // be empty. + // [#not-implemented-hide:] + ErrorState *v32.UpdateFailureState `protobuf:"bytes,8,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // Is static resource is true if it is specified in the config supplied + // through the file at the startup. + IsStaticResource bool `protobuf:"varint,9,opt,name=is_static_resource,json=isStaticResource,proto3" json:"is_static_resource,omitempty"` +} + +func (x *ClientConfig_GenericXdsConfig) Reset() { + *x = ClientConfig_GenericXdsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientConfig_GenericXdsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientConfig_GenericXdsConfig) ProtoMessage() {} + +func (x *ClientConfig_GenericXdsConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientConfig_GenericXdsConfig.ProtoReflect.Descriptor instead. +func (*ClientConfig_GenericXdsConfig) Descriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *ClientConfig_GenericXdsConfig) GetTypeUrl() string { + if x != nil { + return x.TypeUrl + } + return "" +} + +func (x *ClientConfig_GenericXdsConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ClientConfig_GenericXdsConfig) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *ClientConfig_GenericXdsConfig) GetXdsConfig() *any.Any { + if x != nil { + return x.XdsConfig + } + return nil +} + +func (x *ClientConfig_GenericXdsConfig) GetLastUpdated() *timestamp.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *ClientConfig_GenericXdsConfig) GetConfigStatus() ConfigStatus { + if x != nil { + return x.ConfigStatus + } + return ConfigStatus_UNKNOWN +} + +func (x *ClientConfig_GenericXdsConfig) GetClientStatus() v32.ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return v32.ClientResourceStatus(0) +} + +func (x *ClientConfig_GenericXdsConfig) GetErrorState() *v32.UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *ClientConfig_GenericXdsConfig) GetIsStaticResource() bool { + if x != nil { + return x.IsStaticResource + } + return false +} + var File_envoy_service_status_v3_csds_proto protoreflect.FileDescriptor var file_envoy_service_status_v3_csds_proto_rawDesc = []byte{ @@ -483,124 +637,166 @@ var file_envoy_service_status_v3_csds_proto_rawDesc = []byte{ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x9a, 0x05, 0x0a, 0x0c, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x15, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x0f, 0x12, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x67, 0x0a, 0x0d, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x42, 0x15, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0f, 0x12, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0d, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xf9, 0x04, 0x0a, 0x0c, 0x50, 0x65, 0x72, + 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5d, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0b, 0x18, 0x01, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0b, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x13, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, + 0x48, 0x00, 0x52, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, - 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x13, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, - 0x52, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, - 0x70, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x10, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8b, 0x06, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x42, 0x10, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0xb1, 0x01, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, - 0x33, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, - 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x09, 0x78, + 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x66, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x1a, 0xe2, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x0a, 0x78, 0x64, 0x73, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x0d, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, + 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, + 0x4b, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x59, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x54, 0x5f, + 0x53, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x10, + 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x2a, 0x63, 0x0a, 0x12, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, + 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, + 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, + 0x03, 0x32, 0xb8, 0x02, 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x9e, 0x01, 0x0a, 0x11, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, - 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2a, 0x4b, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, - 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, - 0x41, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, - 0x2a, 0x63, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, - 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x43, 0x4b, 0x45, 0x44, - 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x41, 0x43, - 0x4b, 0x45, 0x44, 0x10, 0x03, 0x32, 0xb8, 0x02, 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0x88, 0x01, 0x0a, + 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x9e, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x33, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, - 0x42, 0x3f, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x43, 0x73, 0x64, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x43, 0x73, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -616,44 +812,55 @@ func file_envoy_service_status_v3_csds_proto_rawDescGZIP() []byte { } var file_envoy_service_status_v3_csds_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_service_status_v3_csds_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_service_status_v3_csds_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_envoy_service_status_v3_csds_proto_goTypes = []interface{}{ - (ConfigStatus)(0), // 0: envoy.service.status.v3.ConfigStatus - (ClientConfigStatus)(0), // 1: envoy.service.status.v3.ClientConfigStatus - (*ClientStatusRequest)(nil), // 2: envoy.service.status.v3.ClientStatusRequest - (*PerXdsConfig)(nil), // 3: envoy.service.status.v3.PerXdsConfig - (*ClientConfig)(nil), // 4: envoy.service.status.v3.ClientConfig - (*ClientStatusResponse)(nil), // 5: envoy.service.status.v3.ClientStatusResponse - (*v3.NodeMatcher)(nil), // 6: envoy.type.matcher.v3.NodeMatcher - (*v31.Node)(nil), // 7: envoy.config.core.v3.Node - (*v32.ListenersConfigDump)(nil), // 8: envoy.admin.v3.ListenersConfigDump - (*v32.ClustersConfigDump)(nil), // 9: envoy.admin.v3.ClustersConfigDump - (*v32.RoutesConfigDump)(nil), // 10: envoy.admin.v3.RoutesConfigDump - (*v32.ScopedRoutesConfigDump)(nil), // 11: envoy.admin.v3.ScopedRoutesConfigDump - (*v32.EndpointsConfigDump)(nil), // 12: envoy.admin.v3.EndpointsConfigDump + (ConfigStatus)(0), // 0: envoy.service.status.v3.ConfigStatus + (ClientConfigStatus)(0), // 1: envoy.service.status.v3.ClientConfigStatus + (*ClientStatusRequest)(nil), // 2: envoy.service.status.v3.ClientStatusRequest + (*PerXdsConfig)(nil), // 3: envoy.service.status.v3.PerXdsConfig + (*ClientConfig)(nil), // 4: envoy.service.status.v3.ClientConfig + (*ClientStatusResponse)(nil), // 5: envoy.service.status.v3.ClientStatusResponse + (*ClientConfig_GenericXdsConfig)(nil), // 6: envoy.service.status.v3.ClientConfig.GenericXdsConfig + (*v3.NodeMatcher)(nil), // 7: envoy.type.matcher.v3.NodeMatcher + (*v31.Node)(nil), // 8: envoy.config.core.v3.Node + (*v32.ListenersConfigDump)(nil), // 9: envoy.admin.v3.ListenersConfigDump + (*v32.ClustersConfigDump)(nil), // 10: envoy.admin.v3.ClustersConfigDump + (*v32.RoutesConfigDump)(nil), // 11: envoy.admin.v3.RoutesConfigDump + (*v32.ScopedRoutesConfigDump)(nil), // 12: envoy.admin.v3.ScopedRoutesConfigDump + (*v32.EndpointsConfigDump)(nil), // 13: envoy.admin.v3.EndpointsConfigDump + (*any.Any)(nil), // 14: google.protobuf.Any + (*timestamp.Timestamp)(nil), // 15: google.protobuf.Timestamp + (v32.ClientResourceStatus)(0), // 16: envoy.admin.v3.ClientResourceStatus + (*v32.UpdateFailureState)(nil), // 17: envoy.admin.v3.UpdateFailureState } var file_envoy_service_status_v3_csds_proto_depIdxs = []int32{ - 6, // 0: envoy.service.status.v3.ClientStatusRequest.node_matchers:type_name -> envoy.type.matcher.v3.NodeMatcher - 7, // 1: envoy.service.status.v3.ClientStatusRequest.node:type_name -> envoy.config.core.v3.Node + 7, // 0: envoy.service.status.v3.ClientStatusRequest.node_matchers:type_name -> envoy.type.matcher.v3.NodeMatcher + 8, // 1: envoy.service.status.v3.ClientStatusRequest.node:type_name -> envoy.config.core.v3.Node 0, // 2: envoy.service.status.v3.PerXdsConfig.status:type_name -> envoy.service.status.v3.ConfigStatus 1, // 3: envoy.service.status.v3.PerXdsConfig.client_status:type_name -> envoy.service.status.v3.ClientConfigStatus - 8, // 4: envoy.service.status.v3.PerXdsConfig.listener_config:type_name -> envoy.admin.v3.ListenersConfigDump - 9, // 5: envoy.service.status.v3.PerXdsConfig.cluster_config:type_name -> envoy.admin.v3.ClustersConfigDump - 10, // 6: envoy.service.status.v3.PerXdsConfig.route_config:type_name -> envoy.admin.v3.RoutesConfigDump - 11, // 7: envoy.service.status.v3.PerXdsConfig.scoped_route_config:type_name -> envoy.admin.v3.ScopedRoutesConfigDump - 12, // 8: envoy.service.status.v3.PerXdsConfig.endpoint_config:type_name -> envoy.admin.v3.EndpointsConfigDump - 7, // 9: envoy.service.status.v3.ClientConfig.node:type_name -> envoy.config.core.v3.Node + 9, // 4: envoy.service.status.v3.PerXdsConfig.listener_config:type_name -> envoy.admin.v3.ListenersConfigDump + 10, // 5: envoy.service.status.v3.PerXdsConfig.cluster_config:type_name -> envoy.admin.v3.ClustersConfigDump + 11, // 6: envoy.service.status.v3.PerXdsConfig.route_config:type_name -> envoy.admin.v3.RoutesConfigDump + 12, // 7: envoy.service.status.v3.PerXdsConfig.scoped_route_config:type_name -> envoy.admin.v3.ScopedRoutesConfigDump + 13, // 8: envoy.service.status.v3.PerXdsConfig.endpoint_config:type_name -> envoy.admin.v3.EndpointsConfigDump + 8, // 9: envoy.service.status.v3.ClientConfig.node:type_name -> envoy.config.core.v3.Node 3, // 10: envoy.service.status.v3.ClientConfig.xds_config:type_name -> envoy.service.status.v3.PerXdsConfig - 4, // 11: envoy.service.status.v3.ClientStatusResponse.config:type_name -> envoy.service.status.v3.ClientConfig - 2, // 12: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest - 2, // 13: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest - 5, // 14: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse - 5, // 15: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse - 14, // [14:16] is the sub-list for method output_type - 12, // [12:14] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 6, // 11: envoy.service.status.v3.ClientConfig.generic_xds_configs:type_name -> envoy.service.status.v3.ClientConfig.GenericXdsConfig + 4, // 12: envoy.service.status.v3.ClientStatusResponse.config:type_name -> envoy.service.status.v3.ClientConfig + 14, // 13: envoy.service.status.v3.ClientConfig.GenericXdsConfig.xds_config:type_name -> google.protobuf.Any + 15, // 14: envoy.service.status.v3.ClientConfig.GenericXdsConfig.last_updated:type_name -> google.protobuf.Timestamp + 0, // 15: envoy.service.status.v3.ClientConfig.GenericXdsConfig.config_status:type_name -> envoy.service.status.v3.ConfigStatus + 16, // 16: envoy.service.status.v3.ClientConfig.GenericXdsConfig.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 17, // 17: envoy.service.status.v3.ClientConfig.GenericXdsConfig.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 2, // 18: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest + 2, // 19: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest + 5, // 20: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse + 5, // 21: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse + 20, // [20:22] is the sub-list for method output_type + 18, // [18:20] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_envoy_service_status_v3_csds_proto_init() } @@ -710,6 +917,18 @@ func file_envoy_service_status_v3_csds_proto_init() { return nil } } + file_envoy_service_status_v3_csds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientConfig_GenericXdsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_envoy_service_status_v3_csds_proto_msgTypes[1].OneofWrappers = []interface{}{ (*PerXdsConfig_ListenerConfig)(nil), @@ -724,7 +943,7 @@ func file_envoy_service_status_v3_csds_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_service_status_v3_csds_proto_rawDesc, NumEnums: 2, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/api/envoy/service/status/v3/csds.pb.validate.go b/pkg/api/envoy/service/status/v3/csds.pb.validate.go index 39cf37626a..09fc084140 100644 --- a/pkg/api/envoy/service/status/v3/csds.pb.validate.go +++ b/pkg/api/envoy/service/status/v3/csds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/status/v3/csds.proto -package envoy_service_status_v3 +package statusv3 import ( "bytes" @@ -11,11 +11,14 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/admin/v3" ) // ensure the imports are used @@ -30,21 +33,57 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.ClientResourceStatus(0) ) // Validate checks the field values on ClientStatusRequest with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClientStatusRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientStatusRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClientStatusRequestMultiError, or nil if none found. +func (m *ClientStatusRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientStatusRequest) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetNodeMatchers() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: fmt.Sprintf("NodeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: fmt.Sprintf("NodeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientStatusRequestValidationError{ field: fmt.Sprintf("NodeMatchers[%v]", idx), @@ -56,7 +95,26 @@ func (m *ClientStatusRequest) Validate() error { } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientStatusRequestValidationError{ field: "Node", @@ -66,9 +124,30 @@ func (m *ClientStatusRequest) Validate() error { } } + if len(errors) > 0 { + return ClientStatusRequestMultiError(errors) + } + return nil } +// ClientStatusRequestMultiError is an error wrapping multiple validation +// errors returned by ClientStatusRequest.ValidateAll() if the designated +// constraints aren't met. +type ClientStatusRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientStatusRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientStatusRequestMultiError) AllErrors() []error { return m } + // ClientStatusRequestValidationError is the validation error returned by // ClientStatusRequest.Validate if the designated constraints aren't met. type ClientStatusRequestValidationError struct { @@ -126,13 +205,27 @@ var _ interface { } = ClientStatusRequestValidationError{} // Validate checks the field values on PerXdsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PerXdsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerXdsConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PerXdsConfigMultiError, or +// nil if none found. +func (m *PerXdsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerXdsConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Status // no validation rules for ClientStatus @@ -141,7 +234,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_ListenerConfig: - if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListenerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "ListenerConfig", @@ -153,7 +265,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_ClusterConfig: - if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetClusterConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "ClusterConfig", @@ -165,7 +296,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_RouteConfig: - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "RouteConfig", @@ -177,7 +327,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_ScopedRouteConfig: - if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetScopedRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ScopedRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ScopedRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "ScopedRouteConfig", @@ -189,7 +358,26 @@ func (m *PerXdsConfig) Validate() error { case *PerXdsConfig_EndpointConfig: - if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEndpointConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PerXdsConfigValidationError{ field: "EndpointConfig", @@ -201,9 +389,29 @@ func (m *PerXdsConfig) Validate() error { } + if len(errors) > 0 { + return PerXdsConfigMultiError(errors) + } + return nil } +// PerXdsConfigMultiError is an error wrapping multiple validation errors +// returned by PerXdsConfig.ValidateAll() if the designated constraints aren't met. +type PerXdsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerXdsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerXdsConfigMultiError) AllErrors() []error { return m } + // PerXdsConfigValidationError is the validation error returned by // PerXdsConfig.Validate if the designated constraints aren't met. type PerXdsConfigValidationError struct { @@ -259,14 +467,47 @@ var _ interface { } = PerXdsConfigValidationError{} // Validate checks the field values on ClientConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ClientConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ClientConfigMultiError, or +// nil if none found. +func (m *ClientConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientConfigValidationError{ field: "Node", @@ -279,7 +520,26 @@ func (m *ClientConfig) Validate() error { for idx, item := range m.GetXdsConfig() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("XdsConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("XdsConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientConfigValidationError{ field: fmt.Sprintf("XdsConfig[%v]", idx), @@ -291,9 +551,63 @@ func (m *ClientConfig) Validate() error { } + for idx, item := range m.GetGenericXdsConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("GenericXdsConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("GenericXdsConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfigValidationError{ + field: fmt.Sprintf("GenericXdsConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClientConfigMultiError(errors) + } + return nil } +// ClientConfigMultiError is an error wrapping multiple validation errors +// returned by ClientConfig.ValidateAll() if the designated constraints aren't met. +type ClientConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientConfigMultiError) AllErrors() []error { return m } + // ClientConfigValidationError is the validation error returned by // ClientConfig.Validate if the designated constraints aren't met. type ClientConfigValidationError struct { @@ -350,16 +664,49 @@ var _ interface { // Validate checks the field values on ClientStatusResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ClientStatusResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientStatusResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ClientStatusResponseMultiError, or nil if none found. +func (m *ClientStatusResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientStatusResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetConfig() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusResponseValidationError{ + field: fmt.Sprintf("Config[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusResponseValidationError{ + field: fmt.Sprintf("Config[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientStatusResponseValidationError{ field: fmt.Sprintf("Config[%v]", idx), @@ -371,9 +718,30 @@ func (m *ClientStatusResponse) Validate() error { } + if len(errors) > 0 { + return ClientStatusResponseMultiError(errors) + } + return nil } +// ClientStatusResponseMultiError is an error wrapping multiple validation +// errors returned by ClientStatusResponse.ValidateAll() if the designated +// constraints aren't met. +type ClientStatusResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientStatusResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientStatusResponseMultiError) AllErrors() []error { return m } + // ClientStatusResponseValidationError is the validation error returned by // ClientStatusResponse.Validate if the designated constraints aren't met. type ClientStatusResponseValidationError struct { @@ -429,3 +797,205 @@ var _ interface { Cause() error ErrorName() string } = ClientStatusResponseValidationError{} + +// Validate checks the field values on ClientConfig_GenericXdsConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ClientConfig_GenericXdsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientConfig_GenericXdsConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ClientConfig_GenericXdsConfigMultiError, or nil if none found. +func (m *ClientConfig_GenericXdsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientConfig_GenericXdsConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TypeUrl + + // no validation rules for Name + + // no validation rules for VersionInfo + + if all { + switch v := interface{}(m.GetXdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "XdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "XdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetXdsConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfig_GenericXdsConfigValidationError{ + field: "XdsConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfig_GenericXdsConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ConfigStatus + + // no validation rules for ClientStatus + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfig_GenericXdsConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for IsStaticResource + + if len(errors) > 0 { + return ClientConfig_GenericXdsConfigMultiError(errors) + } + + return nil +} + +// ClientConfig_GenericXdsConfigMultiError is an error wrapping multiple +// validation errors returned by ClientConfig_GenericXdsConfig.ValidateAll() +// if the designated constraints aren't met. +type ClientConfig_GenericXdsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientConfig_GenericXdsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientConfig_GenericXdsConfigMultiError) AllErrors() []error { return m } + +// ClientConfig_GenericXdsConfigValidationError is the validation error +// returned by ClientConfig_GenericXdsConfig.Validate if the designated +// constraints aren't met. +type ClientConfig_GenericXdsConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClientConfig_GenericXdsConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClientConfig_GenericXdsConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClientConfig_GenericXdsConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClientConfig_GenericXdsConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClientConfig_GenericXdsConfigValidationError) ErrorName() string { + return "ClientConfig_GenericXdsConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e ClientConfig_GenericXdsConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sClientConfig_GenericXdsConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClientConfig_GenericXdsConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClientConfig_GenericXdsConfigValidationError{} diff --git a/pkg/api/envoy/service/status/v4alpha/csds.pb.go b/pkg/api/envoy/service/status/v4alpha/csds.pb.go deleted file mode 100644 index fe8c65da36..0000000000 --- a/pkg/api/envoy/service/status/v4alpha/csds.pb.go +++ /dev/null @@ -1,919 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/status/v4alpha/csds.proto - -package envoy_service_status_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/admin/v4alpha" - v4alpha1 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v4alpha" - proto "github.com/golang/protobuf/proto" - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Status of a config from a management server view. -type ConfigStatus int32 - -const ( - // Status info is not available/unknown. - ConfigStatus_UNKNOWN ConfigStatus = 0 - // Management server has sent the config to client and received ACK. - ConfigStatus_SYNCED ConfigStatus = 1 - // Config is not sent. - ConfigStatus_NOT_SENT ConfigStatus = 2 - // Management server has sent the config to client but hasn’t received - // ACK/NACK. - ConfigStatus_STALE ConfigStatus = 3 - // Management server has sent the config to client but received NACK. The - // attached config dump will be the latest config (the rejected one), since - // it is the persisted version in the management server. - ConfigStatus_ERROR ConfigStatus = 4 -) - -// Enum value maps for ConfigStatus. -var ( - ConfigStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "SYNCED", - 2: "NOT_SENT", - 3: "STALE", - 4: "ERROR", - } - ConfigStatus_value = map[string]int32{ - "UNKNOWN": 0, - "SYNCED": 1, - "NOT_SENT": 2, - "STALE": 3, - "ERROR": 4, - } -) - -func (x ConfigStatus) Enum() *ConfigStatus { - p := new(ConfigStatus) - *p = x - return p -} - -func (x ConfigStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ConfigStatus) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_service_status_v4alpha_csds_proto_enumTypes[0].Descriptor() -} - -func (ConfigStatus) Type() protoreflect.EnumType { - return &file_envoy_service_status_v4alpha_csds_proto_enumTypes[0] -} - -func (x ConfigStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ConfigStatus.Descriptor instead. -func (ConfigStatus) EnumDescriptor() ([]byte, []int) { - return file_envoy_service_status_v4alpha_csds_proto_rawDescGZIP(), []int{0} -} - -// Config status from a client-side view. -type ClientConfigStatus int32 - -const ( - // Config status is not available/unknown. - ClientConfigStatus_CLIENT_UNKNOWN ClientConfigStatus = 0 - // Client requested the config but hasn't received any config from management - // server yet. - ClientConfigStatus_CLIENT_REQUESTED ClientConfigStatus = 1 - // Client received the config and replied with ACK. - ClientConfigStatus_CLIENT_ACKED ClientConfigStatus = 2 - // Client received the config and replied with NACK. Notably, the attached - // config dump is not the NACKed version, but the most recent accepted one. If - // no config is accepted yet, the attached config dump will be empty. - ClientConfigStatus_CLIENT_NACKED ClientConfigStatus = 3 -) - -// Enum value maps for ClientConfigStatus. -var ( - ClientConfigStatus_name = map[int32]string{ - 0: "CLIENT_UNKNOWN", - 1: "CLIENT_REQUESTED", - 2: "CLIENT_ACKED", - 3: "CLIENT_NACKED", - } - ClientConfigStatus_value = map[string]int32{ - "CLIENT_UNKNOWN": 0, - "CLIENT_REQUESTED": 1, - "CLIENT_ACKED": 2, - "CLIENT_NACKED": 3, - } -) - -func (x ClientConfigStatus) Enum() *ClientConfigStatus { - p := new(ClientConfigStatus) - *p = x - return p -} - -func (x ClientConfigStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClientConfigStatus) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_service_status_v4alpha_csds_proto_enumTypes[1].Descriptor() -} - -func (ClientConfigStatus) Type() protoreflect.EnumType { - return &file_envoy_service_status_v4alpha_csds_proto_enumTypes[1] -} - -func (x ClientConfigStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClientConfigStatus.Descriptor instead. -func (ClientConfigStatus) EnumDescriptor() ([]byte, []int) { - return file_envoy_service_status_v4alpha_csds_proto_rawDescGZIP(), []int{1} -} - -// Request for client status of clients identified by a list of NodeMatchers. -type ClientStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Management server can use these match criteria to identify clients. - // The match follows OR semantics. - NodeMatchers []*v4alpha.NodeMatcher `protobuf:"bytes,1,rep,name=node_matchers,json=nodeMatchers,proto3" json:"node_matchers,omitempty"` - // The node making the csds request. - Node *v4alpha1.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` -} - -func (x *ClientStatusRequest) Reset() { - *x = ClientStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientStatusRequest) ProtoMessage() {} - -func (x *ClientStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientStatusRequest.ProtoReflect.Descriptor instead. -func (*ClientStatusRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_status_v4alpha_csds_proto_rawDescGZIP(), []int{0} -} - -func (x *ClientStatusRequest) GetNodeMatchers() []*v4alpha.NodeMatcher { - if x != nil { - return x.NodeMatchers - } - return nil -} - -func (x *ClientStatusRequest) GetNode() *v4alpha1.Node { - if x != nil { - return x.Node - } - return nil -} - -// Detailed config (per xDS) with status. -// [#next-free-field: 8] -type PerXdsConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to StatusConfig: - // *PerXdsConfig_Status - // *PerXdsConfig_ClientStatus - StatusConfig isPerXdsConfig_StatusConfig `protobuf_oneof:"status_config"` - // Types that are assignable to PerXdsConfig: - // *PerXdsConfig_ListenerConfig - // *PerXdsConfig_ClusterConfig - // *PerXdsConfig_RouteConfig - // *PerXdsConfig_ScopedRouteConfig - // *PerXdsConfig_EndpointConfig - PerXdsConfig isPerXdsConfig_PerXdsConfig `protobuf_oneof:"per_xds_config"` -} - -func (x *PerXdsConfig) Reset() { - *x = PerXdsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PerXdsConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PerXdsConfig) ProtoMessage() {} - -func (x *PerXdsConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PerXdsConfig.ProtoReflect.Descriptor instead. -func (*PerXdsConfig) Descriptor() ([]byte, []int) { - return file_envoy_service_status_v4alpha_csds_proto_rawDescGZIP(), []int{1} -} - -func (m *PerXdsConfig) GetStatusConfig() isPerXdsConfig_StatusConfig { - if m != nil { - return m.StatusConfig - } - return nil -} - -func (x *PerXdsConfig) GetStatus() ConfigStatus { - if x, ok := x.GetStatusConfig().(*PerXdsConfig_Status); ok { - return x.Status - } - return ConfigStatus_UNKNOWN -} - -func (x *PerXdsConfig) GetClientStatus() ClientConfigStatus { - if x, ok := x.GetStatusConfig().(*PerXdsConfig_ClientStatus); ok { - return x.ClientStatus - } - return ClientConfigStatus_CLIENT_UNKNOWN -} - -func (m *PerXdsConfig) GetPerXdsConfig() isPerXdsConfig_PerXdsConfig { - if m != nil { - return m.PerXdsConfig - } - return nil -} - -func (x *PerXdsConfig) GetListenerConfig() *v4alpha2.ListenersConfigDump { - if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ListenerConfig); ok { - return x.ListenerConfig - } - return nil -} - -func (x *PerXdsConfig) GetClusterConfig() *v4alpha2.ClustersConfigDump { - if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ClusterConfig); ok { - return x.ClusterConfig - } - return nil -} - -func (x *PerXdsConfig) GetRouteConfig() *v4alpha2.RoutesConfigDump { - if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_RouteConfig); ok { - return x.RouteConfig - } - return nil -} - -func (x *PerXdsConfig) GetScopedRouteConfig() *v4alpha2.ScopedRoutesConfigDump { - if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ScopedRouteConfig); ok { - return x.ScopedRouteConfig - } - return nil -} - -func (x *PerXdsConfig) GetEndpointConfig() *v4alpha2.EndpointsConfigDump { - if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_EndpointConfig); ok { - return x.EndpointConfig - } - return nil -} - -type isPerXdsConfig_StatusConfig interface { - isPerXdsConfig_StatusConfig() -} - -type PerXdsConfig_Status struct { - // Config status generated by management servers. Will not be present if the - // CSDS server is an xDS client. - Status ConfigStatus `protobuf:"varint,1,opt,name=status,proto3,enum=envoy.service.status.v4alpha.ConfigStatus,oneof"` -} - -type PerXdsConfig_ClientStatus struct { - // Client config status is populated by xDS clients. Will not be present if - // the CSDS server is an xDS server. No matter what the client config status - // is, xDS clients should always dump the most recent accepted xDS config. - ClientStatus ClientConfigStatus `protobuf:"varint,7,opt,name=client_status,json=clientStatus,proto3,enum=envoy.service.status.v4alpha.ClientConfigStatus,oneof"` -} - -func (*PerXdsConfig_Status) isPerXdsConfig_StatusConfig() {} - -func (*PerXdsConfig_ClientStatus) isPerXdsConfig_StatusConfig() {} - -type isPerXdsConfig_PerXdsConfig interface { - isPerXdsConfig_PerXdsConfig() -} - -type PerXdsConfig_ListenerConfig struct { - ListenerConfig *v4alpha2.ListenersConfigDump `protobuf:"bytes,2,opt,name=listener_config,json=listenerConfig,proto3,oneof"` -} - -type PerXdsConfig_ClusterConfig struct { - ClusterConfig *v4alpha2.ClustersConfigDump `protobuf:"bytes,3,opt,name=cluster_config,json=clusterConfig,proto3,oneof"` -} - -type PerXdsConfig_RouteConfig struct { - RouteConfig *v4alpha2.RoutesConfigDump `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"` -} - -type PerXdsConfig_ScopedRouteConfig struct { - ScopedRouteConfig *v4alpha2.ScopedRoutesConfigDump `protobuf:"bytes,5,opt,name=scoped_route_config,json=scopedRouteConfig,proto3,oneof"` -} - -type PerXdsConfig_EndpointConfig struct { - EndpointConfig *v4alpha2.EndpointsConfigDump `protobuf:"bytes,6,opt,name=endpoint_config,json=endpointConfig,proto3,oneof"` -} - -func (*PerXdsConfig_ListenerConfig) isPerXdsConfig_PerXdsConfig() {} - -func (*PerXdsConfig_ClusterConfig) isPerXdsConfig_PerXdsConfig() {} - -func (*PerXdsConfig_RouteConfig) isPerXdsConfig_PerXdsConfig() {} - -func (*PerXdsConfig_ScopedRouteConfig) isPerXdsConfig_PerXdsConfig() {} - -func (*PerXdsConfig_EndpointConfig) isPerXdsConfig_PerXdsConfig() {} - -// All xds configs for a particular client. -type ClientConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Node for a particular client. - Node *v4alpha1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - XdsConfig []*PerXdsConfig `protobuf:"bytes,2,rep,name=xds_config,json=xdsConfig,proto3" json:"xds_config,omitempty"` -} - -func (x *ClientConfig) Reset() { - *x = ClientConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientConfig) ProtoMessage() {} - -func (x *ClientConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. -func (*ClientConfig) Descriptor() ([]byte, []int) { - return file_envoy_service_status_v4alpha_csds_proto_rawDescGZIP(), []int{2} -} - -func (x *ClientConfig) GetNode() *v4alpha1.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *ClientConfig) GetXdsConfig() []*PerXdsConfig { - if x != nil { - return x.XdsConfig - } - return nil -} - -type ClientStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Client configs for the clients specified in the ClientStatusRequest. - Config []*ClientConfig `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"` -} - -func (x *ClientStatusResponse) Reset() { - *x = ClientStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientStatusResponse) ProtoMessage() {} - -func (x *ClientStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_status_v4alpha_csds_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientStatusResponse.ProtoReflect.Descriptor instead. -func (*ClientStatusResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_status_v4alpha_csds_proto_rawDescGZIP(), []int{3} -} - -func (x *ClientStatusResponse) GetConfig() []*ClientConfig { - if x != nil { - return x.Config - } - return nil -} - -var File_envoy_service_status_v4alpha_csds_proto protoreflect.FileDescriptor - -var file_envoy_service_status_v4alpha_csds_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, - 0x73, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x13, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4c, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x12, - 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa4, 0x05, 0x0a, 0x0c, 0x50, 0x65, 0x72, - 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x57, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x53, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0e, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, - 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x01, - 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x4a, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0b, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x13, 0x73, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0f, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x01, 0x52, - 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, - 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0f, 0x0a, 0x0d, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x10, 0x0a, - 0x0e, 0x70, 0x65, 0x72, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0xbb, 0x01, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8f, 0x01, - 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, - 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, - 0x4b, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x59, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x54, 0x5f, - 0x53, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x10, - 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x2a, 0x63, 0x0a, 0x12, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, - 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, - 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, - 0x03, 0x32, 0xcd, 0x02, 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0xa8, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x33, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, - 0x2a, 0x42, 0x44, 0x0a, 0x2a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, - 0x09, 0x43, 0x73, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_status_v4alpha_csds_proto_rawDescOnce sync.Once - file_envoy_service_status_v4alpha_csds_proto_rawDescData = file_envoy_service_status_v4alpha_csds_proto_rawDesc -) - -func file_envoy_service_status_v4alpha_csds_proto_rawDescGZIP() []byte { - file_envoy_service_status_v4alpha_csds_proto_rawDescOnce.Do(func() { - file_envoy_service_status_v4alpha_csds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_status_v4alpha_csds_proto_rawDescData) - }) - return file_envoy_service_status_v4alpha_csds_proto_rawDescData -} - -var file_envoy_service_status_v4alpha_csds_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_service_status_v4alpha_csds_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_service_status_v4alpha_csds_proto_goTypes = []interface{}{ - (ConfigStatus)(0), // 0: envoy.service.status.v4alpha.ConfigStatus - (ClientConfigStatus)(0), // 1: envoy.service.status.v4alpha.ClientConfigStatus - (*ClientStatusRequest)(nil), // 2: envoy.service.status.v4alpha.ClientStatusRequest - (*PerXdsConfig)(nil), // 3: envoy.service.status.v4alpha.PerXdsConfig - (*ClientConfig)(nil), // 4: envoy.service.status.v4alpha.ClientConfig - (*ClientStatusResponse)(nil), // 5: envoy.service.status.v4alpha.ClientStatusResponse - (*v4alpha.NodeMatcher)(nil), // 6: envoy.type.matcher.v4alpha.NodeMatcher - (*v4alpha1.Node)(nil), // 7: envoy.config.core.v4alpha.Node - (*v4alpha2.ListenersConfigDump)(nil), // 8: envoy.admin.v4alpha.ListenersConfigDump - (*v4alpha2.ClustersConfigDump)(nil), // 9: envoy.admin.v4alpha.ClustersConfigDump - (*v4alpha2.RoutesConfigDump)(nil), // 10: envoy.admin.v4alpha.RoutesConfigDump - (*v4alpha2.ScopedRoutesConfigDump)(nil), // 11: envoy.admin.v4alpha.ScopedRoutesConfigDump - (*v4alpha2.EndpointsConfigDump)(nil), // 12: envoy.admin.v4alpha.EndpointsConfigDump -} -var file_envoy_service_status_v4alpha_csds_proto_depIdxs = []int32{ - 6, // 0: envoy.service.status.v4alpha.ClientStatusRequest.node_matchers:type_name -> envoy.type.matcher.v4alpha.NodeMatcher - 7, // 1: envoy.service.status.v4alpha.ClientStatusRequest.node:type_name -> envoy.config.core.v4alpha.Node - 0, // 2: envoy.service.status.v4alpha.PerXdsConfig.status:type_name -> envoy.service.status.v4alpha.ConfigStatus - 1, // 3: envoy.service.status.v4alpha.PerXdsConfig.client_status:type_name -> envoy.service.status.v4alpha.ClientConfigStatus - 8, // 4: envoy.service.status.v4alpha.PerXdsConfig.listener_config:type_name -> envoy.admin.v4alpha.ListenersConfigDump - 9, // 5: envoy.service.status.v4alpha.PerXdsConfig.cluster_config:type_name -> envoy.admin.v4alpha.ClustersConfigDump - 10, // 6: envoy.service.status.v4alpha.PerXdsConfig.route_config:type_name -> envoy.admin.v4alpha.RoutesConfigDump - 11, // 7: envoy.service.status.v4alpha.PerXdsConfig.scoped_route_config:type_name -> envoy.admin.v4alpha.ScopedRoutesConfigDump - 12, // 8: envoy.service.status.v4alpha.PerXdsConfig.endpoint_config:type_name -> envoy.admin.v4alpha.EndpointsConfigDump - 7, // 9: envoy.service.status.v4alpha.ClientConfig.node:type_name -> envoy.config.core.v4alpha.Node - 3, // 10: envoy.service.status.v4alpha.ClientConfig.xds_config:type_name -> envoy.service.status.v4alpha.PerXdsConfig - 4, // 11: envoy.service.status.v4alpha.ClientStatusResponse.config:type_name -> envoy.service.status.v4alpha.ClientConfig - 2, // 12: envoy.service.status.v4alpha.ClientStatusDiscoveryService.StreamClientStatus:input_type -> envoy.service.status.v4alpha.ClientStatusRequest - 2, // 13: envoy.service.status.v4alpha.ClientStatusDiscoveryService.FetchClientStatus:input_type -> envoy.service.status.v4alpha.ClientStatusRequest - 5, // 14: envoy.service.status.v4alpha.ClientStatusDiscoveryService.StreamClientStatus:output_type -> envoy.service.status.v4alpha.ClientStatusResponse - 5, // 15: envoy.service.status.v4alpha.ClientStatusDiscoveryService.FetchClientStatus:output_type -> envoy.service.status.v4alpha.ClientStatusResponse - 14, // [14:16] is the sub-list for method output_type - 12, // [12:14] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_envoy_service_status_v4alpha_csds_proto_init() } -func file_envoy_service_status_v4alpha_csds_proto_init() { - if File_envoy_service_status_v4alpha_csds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_status_v4alpha_csds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_status_v4alpha_csds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PerXdsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_status_v4alpha_csds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_status_v4alpha_csds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_service_status_v4alpha_csds_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*PerXdsConfig_Status)(nil), - (*PerXdsConfig_ClientStatus)(nil), - (*PerXdsConfig_ListenerConfig)(nil), - (*PerXdsConfig_ClusterConfig)(nil), - (*PerXdsConfig_RouteConfig)(nil), - (*PerXdsConfig_ScopedRouteConfig)(nil), - (*PerXdsConfig_EndpointConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_status_v4alpha_csds_proto_rawDesc, - NumEnums: 2, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_status_v4alpha_csds_proto_goTypes, - DependencyIndexes: file_envoy_service_status_v4alpha_csds_proto_depIdxs, - EnumInfos: file_envoy_service_status_v4alpha_csds_proto_enumTypes, - MessageInfos: file_envoy_service_status_v4alpha_csds_proto_msgTypes, - }.Build() - File_envoy_service_status_v4alpha_csds_proto = out.File - file_envoy_service_status_v4alpha_csds_proto_rawDesc = nil - file_envoy_service_status_v4alpha_csds_proto_goTypes = nil - file_envoy_service_status_v4alpha_csds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ClientStatusDiscoveryServiceClient is the client API for ClientStatusDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ClientStatusDiscoveryServiceClient interface { - StreamClientStatus(ctx context.Context, opts ...grpc.CallOption) (ClientStatusDiscoveryService_StreamClientStatusClient, error) - FetchClientStatus(ctx context.Context, in *ClientStatusRequest, opts ...grpc.CallOption) (*ClientStatusResponse, error) -} - -type clientStatusDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewClientStatusDiscoveryServiceClient(cc grpc.ClientConnInterface) ClientStatusDiscoveryServiceClient { - return &clientStatusDiscoveryServiceClient{cc} -} - -func (c *clientStatusDiscoveryServiceClient) StreamClientStatus(ctx context.Context, opts ...grpc.CallOption) (ClientStatusDiscoveryService_StreamClientStatusClient, error) { - stream, err := c.cc.NewStream(ctx, &_ClientStatusDiscoveryService_serviceDesc.Streams[0], "/envoy.service.status.v4alpha.ClientStatusDiscoveryService/StreamClientStatus", opts...) - if err != nil { - return nil, err - } - x := &clientStatusDiscoveryServiceStreamClientStatusClient{stream} - return x, nil -} - -type ClientStatusDiscoveryService_StreamClientStatusClient interface { - Send(*ClientStatusRequest) error - Recv() (*ClientStatusResponse, error) - grpc.ClientStream -} - -type clientStatusDiscoveryServiceStreamClientStatusClient struct { - grpc.ClientStream -} - -func (x *clientStatusDiscoveryServiceStreamClientStatusClient) Send(m *ClientStatusRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *clientStatusDiscoveryServiceStreamClientStatusClient) Recv() (*ClientStatusResponse, error) { - m := new(ClientStatusResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *clientStatusDiscoveryServiceClient) FetchClientStatus(ctx context.Context, in *ClientStatusRequest, opts ...grpc.CallOption) (*ClientStatusResponse, error) { - out := new(ClientStatusResponse) - err := c.cc.Invoke(ctx, "/envoy.service.status.v4alpha.ClientStatusDiscoveryService/FetchClientStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ClientStatusDiscoveryServiceServer is the server API for ClientStatusDiscoveryService service. -type ClientStatusDiscoveryServiceServer interface { - StreamClientStatus(ClientStatusDiscoveryService_StreamClientStatusServer) error - FetchClientStatus(context.Context, *ClientStatusRequest) (*ClientStatusResponse, error) -} - -// UnimplementedClientStatusDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedClientStatusDiscoveryServiceServer struct { -} - -func (*UnimplementedClientStatusDiscoveryServiceServer) StreamClientStatus(ClientStatusDiscoveryService_StreamClientStatusServer) error { - return status.Errorf(codes.Unimplemented, "method StreamClientStatus not implemented") -} -func (*UnimplementedClientStatusDiscoveryServiceServer) FetchClientStatus(context.Context, *ClientStatusRequest) (*ClientStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchClientStatus not implemented") -} - -func RegisterClientStatusDiscoveryServiceServer(s *grpc.Server, srv ClientStatusDiscoveryServiceServer) { - s.RegisterService(&_ClientStatusDiscoveryService_serviceDesc, srv) -} - -func _ClientStatusDiscoveryService_StreamClientStatus_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ClientStatusDiscoveryServiceServer).StreamClientStatus(&clientStatusDiscoveryServiceStreamClientStatusServer{stream}) -} - -type ClientStatusDiscoveryService_StreamClientStatusServer interface { - Send(*ClientStatusResponse) error - Recv() (*ClientStatusRequest, error) - grpc.ServerStream -} - -type clientStatusDiscoveryServiceStreamClientStatusServer struct { - grpc.ServerStream -} - -func (x *clientStatusDiscoveryServiceStreamClientStatusServer) Send(m *ClientStatusResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *clientStatusDiscoveryServiceStreamClientStatusServer) Recv() (*ClientStatusRequest, error) { - m := new(ClientStatusRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ClientStatusDiscoveryService_FetchClientStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClientStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClientStatusDiscoveryServiceServer).FetchClientStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.service.status.v4alpha.ClientStatusDiscoveryService/FetchClientStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClientStatusDiscoveryServiceServer).FetchClientStatus(ctx, req.(*ClientStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ClientStatusDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.status.v4alpha.ClientStatusDiscoveryService", - HandlerType: (*ClientStatusDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchClientStatus", - Handler: _ClientStatusDiscoveryService_FetchClientStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamClientStatus", - Handler: _ClientStatusDiscoveryService_StreamClientStatus_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/status/v4alpha/csds.proto", -} diff --git a/pkg/api/envoy/service/status/v4alpha/csds.pb.validate.go b/pkg/api/envoy/service/status/v4alpha/csds.pb.validate.go deleted file mode 100644 index 5b403c18a0..0000000000 --- a/pkg/api/envoy/service/status/v4alpha/csds.pb.validate.go +++ /dev/null @@ -1,437 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/status/v4alpha/csds.proto - -package envoy_service_status_v4alpha - -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{} -) - -// Validate checks the field values on ClientStatusRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClientStatusRequest) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetNodeMatchers() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClientStatusRequestValidationError{ - field: fmt.Sprintf("NodeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClientStatusRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// ClientStatusRequestValidationError is the validation error returned by -// ClientStatusRequest.Validate if the designated constraints aren't met. -type ClientStatusRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClientStatusRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClientStatusRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClientStatusRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClientStatusRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClientStatusRequestValidationError) ErrorName() string { - return "ClientStatusRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ClientStatusRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClientStatusRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClientStatusRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClientStatusRequestValidationError{} - -// Validate checks the field values on PerXdsConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *PerXdsConfig) Validate() error { - if m == nil { - return nil - } - - switch m.StatusConfig.(type) { - - case *PerXdsConfig_Status: - // no validation rules for Status - - case *PerXdsConfig_ClientStatus: - // no validation rules for ClientStatus - - } - - switch m.PerXdsConfig.(type) { - - case *PerXdsConfig_ListenerConfig: - - if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PerXdsConfigValidationError{ - field: "ListenerConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *PerXdsConfig_ClusterConfig: - - if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PerXdsConfigValidationError{ - field: "ClusterConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *PerXdsConfig_RouteConfig: - - if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PerXdsConfigValidationError{ - field: "RouteConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *PerXdsConfig_ScopedRouteConfig: - - if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PerXdsConfigValidationError{ - field: "ScopedRouteConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *PerXdsConfig_EndpointConfig: - - if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PerXdsConfigValidationError{ - field: "EndpointConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// PerXdsConfigValidationError is the validation error returned by -// PerXdsConfig.Validate if the designated constraints aren't met. -type PerXdsConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PerXdsConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PerXdsConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PerXdsConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PerXdsConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PerXdsConfigValidationError) ErrorName() string { return "PerXdsConfigValidationError" } - -// Error satisfies the builtin error interface -func (e PerXdsConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPerXdsConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PerXdsConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PerXdsConfigValidationError{} - -// Validate checks the field values on ClientConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ClientConfig) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClientConfigValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetXdsConfig() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClientConfigValidationError{ - field: fmt.Sprintf("XdsConfig[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ClientConfigValidationError is the validation error returned by -// ClientConfig.Validate if the designated constraints aren't met. -type ClientConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClientConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClientConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClientConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClientConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClientConfigValidationError) ErrorName() string { return "ClientConfigValidationError" } - -// Error satisfies the builtin error interface -func (e ClientConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClientConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClientConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClientConfigValidationError{} - -// Validate checks the field values on ClientStatusResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClientStatusResponse) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetConfig() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClientStatusResponseValidationError{ - field: fmt.Sprintf("Config[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// ClientStatusResponseValidationError is the validation error returned by -// ClientStatusResponse.Validate if the designated constraints aren't met. -type ClientStatusResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClientStatusResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClientStatusResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClientStatusResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClientStatusResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClientStatusResponseValidationError) ErrorName() string { - return "ClientStatusResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ClientStatusResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClientStatusResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClientStatusResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClientStatusResponseValidationError{} diff --git a/pkg/api/envoy/service/tap/v2alpha/common.pb.go b/pkg/api/envoy/service/tap/v2alpha/common.pb.go index 9c1532050c..56dfa95d5f 100644 --- a/pkg/api/envoy/service/tap/v2alpha/common.pb.go +++ b/pkg/api/envoy/service/tap/v2alpha/common.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/tap/v2alpha/common.proto -package envoy_service_tap_v2alpha +package v2alpha import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -26,10 +25,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Output format. All output is in the form of one or more :ref:`TraceWrapper // ` messages. This enumeration indicates // how those messages are written. Note that not all sinks support all output formats. See @@ -971,13 +966,18 @@ var file_envoy_service_tap_v2alpha_common_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x5b, 0x0a, 0x27, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x15, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x9d, 0x01, 0x0a, 0x27, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x15, 0x12, 0x13, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/service/tap/v2alpha/common.pb.validate.go b/pkg/api/envoy/service/tap/v2alpha/common.pb.validate.go index 6bf5b66a75..403d6b27f4 100644 --- a/pkg/api/envoy/service/tap/v2alpha/common.pb.validate.go +++ b/pkg/api/envoy/service/tap/v2alpha/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/tap/v2alpha/common.proto -package envoy_service_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,24 +31,63 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TapConfig with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TapConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TapConfig with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TapConfigMultiError, or nil +// if none found. +func (m *TapConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TapConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMatchConfig() == nil { - return TapConfigValidationError{ + err := TapConfigValidationError{ field: "MatchConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetMatchConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMatchConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "MatchConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "MatchConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatchConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapConfigValidationError{ field: "MatchConfig", @@ -58,13 +98,36 @@ func (m *TapConfig) Validate() error { } if m.GetOutputConfig() == nil { - return TapConfigValidationError{ + err := TapConfigValidationError{ field: "OutputConfig", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetOutputConfig()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOutputConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "OutputConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "OutputConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOutputConfig()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapConfigValidationError{ field: "OutputConfig", @@ -74,7 +137,26 @@ func (m *TapConfig) Validate() error { } } - if v, ok := interface{}(m.GetTapEnabled()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTapEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "TapEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "TapEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTapEnabled()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TapConfigValidationError{ field: "TapEnabled", @@ -84,9 +166,29 @@ func (m *TapConfig) Validate() error { } } + if len(errors) > 0 { + return TapConfigMultiError(errors) + } + return nil } +// TapConfigMultiError is an error wrapping multiple validation errors returned +// by TapConfig.ValidateAll() if the designated constraints aren't met. +type TapConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapConfigMultiError) AllErrors() []error { return m } + // TapConfigValidationError is the validation error returned by // TapConfig.Validate if the designated constraints aren't met. type TapConfigValidationError struct { @@ -142,18 +244,51 @@ var _ interface { } = TapConfigValidationError{} // Validate checks the field values on MatchPredicate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MatchPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MatchPredicateMultiError, +// or nil if none found. +func (m *MatchPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *MatchPredicate_OrMatch: - if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOrMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "OrMatch", @@ -165,7 +300,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_AndMatch: - if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetAndMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "AndMatch", @@ -177,7 +331,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_NotMatch: - if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNotMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "NotMatch", @@ -190,15 +363,38 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_AnyMatch: if m.GetAnyMatch() != true { - return MatchPredicateValidationError{ + err := MatchPredicateValidationError{ field: "AnyMatch", reason: "value must equal true", } + if !all { + return err + } + errors = append(errors, err) } case *MatchPredicate_HttpRequestHeadersMatch: - if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestHeadersMatch", @@ -210,7 +406,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpRequestTrailersMatch: - if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpRequestTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpRequestTrailersMatch", @@ -222,7 +437,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseHeadersMatch: - if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseHeadersMatch", @@ -234,7 +468,26 @@ func (m *MatchPredicate) Validate() error { case *MatchPredicate_HttpResponseTrailersMatch: - if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHttpResponseTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicateValidationError{ field: "HttpResponseTrailersMatch", @@ -245,16 +498,41 @@ func (m *MatchPredicate) Validate() error { } default: - return MatchPredicateValidationError{ + err := MatchPredicateValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MatchPredicateMultiError(errors) } return nil } +// MatchPredicateMultiError is an error wrapping multiple validation errors +// returned by MatchPredicate.ValidateAll() if the designated constraints +// aren't met. +type MatchPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicateMultiError) AllErrors() []error { return m } + // MatchPredicateValidationError is the validation error returned by // MatchPredicate.Validate if the designated constraints aren't met. type MatchPredicateValidationError struct { @@ -310,17 +588,50 @@ var _ interface { } = MatchPredicateValidationError{} // Validate checks the field values on HttpHeadersMatch with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *HttpHeadersMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpHeadersMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpHeadersMatchMultiError, or nil if none found. +func (m *HttpHeadersMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpHeadersMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + for idx, item := range m.GetHeaders() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpHeadersMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), @@ -332,9 +643,30 @@ func (m *HttpHeadersMatch) Validate() error { } + if len(errors) > 0 { + return HttpHeadersMatchMultiError(errors) + } + return nil } +// HttpHeadersMatchMultiError is an error wrapping multiple validation errors +// returned by HttpHeadersMatch.ValidateAll() if the designated constraints +// aren't met. +type HttpHeadersMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpHeadersMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpHeadersMatchMultiError) AllErrors() []error { return m } + // HttpHeadersMatchValidationError is the validation error returned by // HttpHeadersMatch.Validate if the designated constraints aren't met. type HttpHeadersMatchValidationError struct { @@ -390,24 +722,61 @@ var _ interface { } = HttpHeadersMatchValidationError{} // Validate checks the field values on OutputConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OutputConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutputConfig with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OutputConfigMultiError, or +// nil if none found. +func (m *OutputConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OutputConfig) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetSinks()) != 1 { - return OutputConfigValidationError{ + err := OutputConfigValidationError{ field: "Sinks", reason: "value must contain exactly 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetSinks() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: fmt.Sprintf("Sinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: fmt.Sprintf("Sinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputConfigValidationError{ field: fmt.Sprintf("Sinks[%v]", idx), @@ -419,7 +788,26 @@ func (m *OutputConfig) Validate() error { } - if v, ok := interface{}(m.GetMaxBufferedRxBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxBufferedRxBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedRxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedRxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxBufferedRxBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputConfigValidationError{ field: "MaxBufferedRxBytes", @@ -429,7 +817,26 @@ func (m *OutputConfig) Validate() error { } } - if v, ok := interface{}(m.GetMaxBufferedTxBytes()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMaxBufferedTxBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedTxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedTxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxBufferedTxBytes()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputConfigValidationError{ field: "MaxBufferedTxBytes", @@ -441,9 +848,29 @@ func (m *OutputConfig) Validate() error { // no validation rules for Streaming + if len(errors) > 0 { + return OutputConfigMultiError(errors) + } + return nil } +// OutputConfigMultiError is an error wrapping multiple validation errors +// returned by OutputConfig.ValidateAll() if the designated constraints aren't met. +type OutputConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutputConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutputConfigMultiError) AllErrors() []error { return m } + // OutputConfigValidationError is the validation error returned by // OutputConfig.Validate if the designated constraints aren't met. type OutputConfigValidationError struct { @@ -499,24 +926,62 @@ var _ interface { } = OutputConfigValidationError{} // Validate checks the field values on OutputSink with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *OutputSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutputSink with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OutputSinkMultiError, or +// nil if none found. +func (m *OutputSink) ValidateAll() error { + return m.validate(true) +} + +func (m *OutputSink) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := OutputSink_Format_name[int32(m.GetFormat())]; !ok { - return OutputSinkValidationError{ + err := OutputSinkValidationError{ field: "Format", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) } switch m.OutputSinkType.(type) { case *OutputSink_StreamingAdmin: - if v, ok := interface{}(m.GetStreamingAdmin()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStreamingAdmin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamingAdmin()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputSinkValidationError{ field: "StreamingAdmin", @@ -528,7 +993,26 @@ func (m *OutputSink) Validate() error { case *OutputSink_FilePerTap: - if v, ok := interface{}(m.GetFilePerTap()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetFilePerTap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "FilePerTap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "FilePerTap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilePerTap()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputSinkValidationError{ field: "FilePerTap", @@ -540,7 +1024,26 @@ func (m *OutputSink) Validate() error { case *OutputSink_StreamingGrpc: - if v, ok := interface{}(m.GetStreamingGrpc()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStreamingGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamingGrpc()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return OutputSinkValidationError{ field: "StreamingGrpc", @@ -551,16 +1054,40 @@ func (m *OutputSink) Validate() error { } default: - return OutputSinkValidationError{ + err := OutputSinkValidationError{ field: "OutputSinkType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return OutputSinkMultiError(errors) + } + return nil } +// OutputSinkMultiError is an error wrapping multiple validation errors +// returned by OutputSink.ValidateAll() if the designated constraints aren't met. +type OutputSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutputSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutputSinkMultiError) AllErrors() []error { return m } + // OutputSinkValidationError is the validation error returned by // OutputSink.Validate if the designated constraints aren't met. type OutputSinkValidationError struct { @@ -617,15 +1144,50 @@ var _ interface { // Validate checks the field values on StreamingAdminSink with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamingAdminSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamingAdminSink with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamingAdminSinkMultiError, or nil if none found. +func (m *StreamingAdminSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamingAdminSink) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamingAdminSinkMultiError(errors) + } + return nil } +// StreamingAdminSinkMultiError is an error wrapping multiple validation errors +// returned by StreamingAdminSink.ValidateAll() if the designated constraints +// aren't met. +type StreamingAdminSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamingAdminSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamingAdminSinkMultiError) AllErrors() []error { return m } + // StreamingAdminSinkValidationError is the validation error returned by // StreamingAdminSink.Validate if the designated constraints aren't met. type StreamingAdminSinkValidationError struct { @@ -683,23 +1245,62 @@ var _ interface { } = StreamingAdminSinkValidationError{} // Validate checks the field values on FilePerTapSink with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *FilePerTapSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilePerTapSink with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FilePerTapSinkMultiError, +// or nil if none found. +func (m *FilePerTapSink) ValidateAll() error { + return m.validate(true) +} + +func (m *FilePerTapSink) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPathPrefix()) < 1 { - return FilePerTapSinkValidationError{ + err := FilePerTapSinkValidationError{ field: "PathPrefix", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FilePerTapSinkMultiError(errors) } return nil } +// FilePerTapSinkMultiError is an error wrapping multiple validation errors +// returned by FilePerTapSink.ValidateAll() if the designated constraints +// aren't met. +type FilePerTapSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilePerTapSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilePerTapSinkMultiError) AllErrors() []error { return m } + // FilePerTapSinkValidationError is the validation error returned by // FilePerTapSink.Validate if the designated constraints aren't met. type FilePerTapSinkValidationError struct { @@ -755,23 +1356,60 @@ var _ interface { } = FilePerTapSinkValidationError{} // Validate checks the field values on StreamingGrpcSink with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *StreamingGrpcSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamingGrpcSink with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamingGrpcSinkMultiError, or nil if none found. +func (m *StreamingGrpcSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamingGrpcSink) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for TapId if m.GetGrpcService() == nil { - return StreamingGrpcSinkValidationError{ + err := StreamingGrpcSinkValidationError{ field: "GrpcService", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamingGrpcSinkValidationError{ field: "GrpcService", @@ -781,9 +1419,30 @@ func (m *StreamingGrpcSink) Validate() error { } } + if len(errors) > 0 { + return StreamingGrpcSinkMultiError(errors) + } + return nil } +// StreamingGrpcSinkMultiError is an error wrapping multiple validation errors +// returned by StreamingGrpcSink.ValidateAll() if the designated constraints +// aren't met. +type StreamingGrpcSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamingGrpcSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamingGrpcSinkMultiError) AllErrors() []error { return m } + // StreamingGrpcSinkValidationError is the validation error returned by // StreamingGrpcSink.Validate if the designated constraints aren't met. type StreamingGrpcSinkValidationError struct { @@ -842,23 +1501,60 @@ var _ interface { // Validate checks the field values on MatchPredicate_MatchSet with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MatchPredicate_MatchSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate_MatchSet with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MatchPredicate_MatchSetMultiError, or nil if none found. +func (m *MatchPredicate_MatchSet) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate_MatchSet) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetRules()) < 2 { - return MatchPredicate_MatchSetValidationError{ + err := MatchPredicate_MatchSetValidationError{ field: "Rules", reason: "value must contain at least 2 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetRules() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MatchPredicate_MatchSetValidationError{ field: fmt.Sprintf("Rules[%v]", idx), @@ -870,9 +1566,30 @@ func (m *MatchPredicate_MatchSet) Validate() error { } + if len(errors) > 0 { + return MatchPredicate_MatchSetMultiError(errors) + } + return nil } +// MatchPredicate_MatchSetMultiError is an error wrapping multiple validation +// errors returned by MatchPredicate_MatchSet.ValidateAll() if the designated +// constraints aren't met. +type MatchPredicate_MatchSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicate_MatchSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicate_MatchSetMultiError) AllErrors() []error { return m } + // MatchPredicate_MatchSetValidationError is the validation error returned by // MatchPredicate_MatchSet.Validate if the designated constraints aren't met. type MatchPredicate_MatchSetValidationError struct { diff --git a/pkg/api/envoy/service/tap/v2alpha/tap.pb.go b/pkg/api/envoy/service/tap/v2alpha/tap.pb.go index b4ab18a181..52a0985a36 100644 --- a/pkg/api/envoy/service/tap/v2alpha/tap.pb.go +++ b/pkg/api/envoy/service/tap/v2alpha/tap.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/tap/v2alpha/tap.proto -package envoy_service_tap_v2alpha +package v2alpha import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" v2alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/tap/v2alpha" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server // and stream taps without ever expecting a response. type StreamTapsRequest struct { @@ -242,11 +237,16 @@ var file_envoy_service_tap_v2alpha_tap_proto_rawDesc = []byte{ 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x40, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x82, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x88, + 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/tap/v2alpha/tap.pb.validate.go b/pkg/api/envoy/service/tap/v2alpha/tap.pb.validate.go index 7c78151caa..a7128b5d89 100644 --- a/pkg/api/envoy/service/tap/v2alpha/tap.pb.validate.go +++ b/pkg/api/envoy/service/tap/v2alpha/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/tap/v2alpha/tap.proto -package envoy_service_tap_v2alpha +package v2alpha import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamTapsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *StreamTapsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTapsRequestMultiError, or nil if none found. +func (m *StreamTapsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTapsRequestValidationError{ field: "Identifier", @@ -53,7 +88,26 @@ func (m *StreamTapsRequest) Validate() error { // no validation rules for TraceId - if v, ok := interface{}(m.GetTrace()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Trace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Trace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrace()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTapsRequestValidationError{ field: "Trace", @@ -63,9 +117,30 @@ func (m *StreamTapsRequest) Validate() error { } } + if len(errors) > 0 { + return StreamTapsRequestMultiError(errors) + } + return nil } +// StreamTapsRequestMultiError is an error wrapping multiple validation errors +// returned by StreamTapsRequest.ValidateAll() if the designated constraints +// aren't met. +type StreamTapsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsRequestMultiError) AllErrors() []error { return m } + // StreamTapsRequestValidationError is the validation error returned by // StreamTapsRequest.Validate if the designated constraints aren't met. type StreamTapsRequestValidationError struct { @@ -124,15 +199,50 @@ var _ interface { // Validate checks the field values on StreamTapsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTapsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTapsResponseMultiError, or nil if none found. +func (m *StreamTapsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamTapsResponseMultiError(errors) + } + return nil } +// StreamTapsResponseMultiError is an error wrapping multiple validation errors +// returned by StreamTapsResponse.ValidateAll() if the designated constraints +// aren't met. +type StreamTapsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsResponseMultiError) AllErrors() []error { return m } + // StreamTapsResponseValidationError is the validation error returned by // StreamTapsResponse.Validate if the designated constraints aren't met. type StreamTapsResponseValidationError struct { @@ -191,20 +301,57 @@ var _ interface { // Validate checks the field values on StreamTapsRequest_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTapsRequest_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsRequest_Identifier with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTapsRequest_IdentifierMultiError, or nil if none found. +func (m *StreamTapsRequest_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsRequest_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamTapsRequest_IdentifierValidationError{ + err := StreamTapsRequest_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTapsRequest_IdentifierValidationError{ field: "Node", @@ -216,9 +363,30 @@ func (m *StreamTapsRequest_Identifier) Validate() error { // no validation rules for TapId + if len(errors) > 0 { + return StreamTapsRequest_IdentifierMultiError(errors) + } + return nil } +// StreamTapsRequest_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamTapsRequest_Identifier.ValidateAll() if +// the designated constraints aren't met. +type StreamTapsRequest_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsRequest_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsRequest_IdentifierMultiError) AllErrors() []error { return m } + // StreamTapsRequest_IdentifierValidationError is the validation error returned // by StreamTapsRequest_Identifier.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/service/tap/v3/tap.pb.go b/pkg/api/envoy/service/tap/v3/tap.pb.go index 118c08c3ea..50a4231d95 100644 --- a/pkg/api/envoy/service/tap/v3/tap.pb.go +++ b/pkg/api/envoy/service/tap/v3/tap.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/tap/v3/tap.proto -package envoy_service_tap_v3 +package tapv3 import ( context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v31 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/tap/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -29,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server // and stream taps without ever expecting a response. type StreamTapsRequest struct { @@ -150,7 +145,7 @@ type StreamTapsRequest_Identifier struct { // The node sending taps over the stream. Node *v31.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // The opaque identifier that was set in the :ref:`output config - // `. + // `. TapId string `protobuf:"bytes,2,opt,name=tap_id,json=tapId,proto3" json:"tap_id,omitempty"` } @@ -253,11 +248,15 @@ var file_envoy_service_tap_v3_tap_proto_rawDesc = []byte{ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x42, 0x3b, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x22, 0x00, 0x28, 0x01, 0x42, 0x7e, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/tap/v3/tap.pb.validate.go b/pkg/api/envoy/service/tap/v3/tap.pb.validate.go index 0c145836ce..1eac282829 100644 --- a/pkg/api/envoy/service/tap/v3/tap.pb.validate.go +++ b/pkg/api/envoy/service/tap/v3/tap.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/tap/v3/tap.proto -package envoy_service_tap_v3 +package tapv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamTapsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *StreamTapsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTapsRequestMultiError, or nil if none found. +func (m *StreamTapsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsRequest) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTapsRequestValidationError{ field: "Identifier", @@ -53,7 +88,26 @@ func (m *StreamTapsRequest) Validate() error { // no validation rules for TraceId - if v, ok := interface{}(m.GetTrace()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Trace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Trace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrace()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTapsRequestValidationError{ field: "Trace", @@ -63,9 +117,30 @@ func (m *StreamTapsRequest) Validate() error { } } + if len(errors) > 0 { + return StreamTapsRequestMultiError(errors) + } + return nil } +// StreamTapsRequestMultiError is an error wrapping multiple validation errors +// returned by StreamTapsRequest.ValidateAll() if the designated constraints +// aren't met. +type StreamTapsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsRequestMultiError) AllErrors() []error { return m } + // StreamTapsRequestValidationError is the validation error returned by // StreamTapsRequest.Validate if the designated constraints aren't met. type StreamTapsRequestValidationError struct { @@ -124,15 +199,50 @@ var _ interface { // Validate checks the field values on StreamTapsResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTapsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTapsResponseMultiError, or nil if none found. +func (m *StreamTapsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamTapsResponseMultiError(errors) + } + return nil } +// StreamTapsResponseMultiError is an error wrapping multiple validation errors +// returned by StreamTapsResponse.ValidateAll() if the designated constraints +// aren't met. +type StreamTapsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsResponseMultiError) AllErrors() []error { return m } + // StreamTapsResponseValidationError is the validation error returned by // StreamTapsResponse.Validate if the designated constraints aren't met. type StreamTapsResponseValidationError struct { @@ -191,20 +301,57 @@ var _ interface { // Validate checks the field values on StreamTapsRequest_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTapsRequest_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsRequest_Identifier with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTapsRequest_IdentifierMultiError, or nil if none found. +func (m *StreamTapsRequest_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsRequest_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamTapsRequest_IdentifierValidationError{ + err := StreamTapsRequest_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTapsRequest_IdentifierValidationError{ field: "Node", @@ -216,9 +363,30 @@ func (m *StreamTapsRequest_Identifier) Validate() error { // no validation rules for TapId + if len(errors) > 0 { + return StreamTapsRequest_IdentifierMultiError(errors) + } + return nil } +// StreamTapsRequest_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamTapsRequest_Identifier.ValidateAll() if +// the designated constraints aren't met. +type StreamTapsRequest_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsRequest_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsRequest_IdentifierMultiError) AllErrors() []error { return m } + // StreamTapsRequest_IdentifierValidationError is the validation error returned // by StreamTapsRequest_Identifier.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/service/tap/v4alpha/tap.pb.go b/pkg/api/envoy/service/tap/v4alpha/tap.pb.go deleted file mode 100644 index b5044f3881..0000000000 --- a/pkg/api/envoy/service/tap/v4alpha/tap.pb.go +++ /dev/null @@ -1,479 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/tap/v4alpha/tap.proto - -package envoy_service_tap_v4alpha - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/tap/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server -// and stream taps without ever expecting a response. -type StreamTapsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier *StreamTapsRequest_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // The trace id. this can be used to merge together a streaming trace. Note that the trace_id - // is not guaranteed to be spatially or temporally unique. - TraceId uint64 `protobuf:"varint,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` - // The trace data. - Trace *v3.TraceWrapper `protobuf:"bytes,3,opt,name=trace,proto3" json:"trace,omitempty"` -} - -func (x *StreamTapsRequest) Reset() { - *x = StreamTapsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_tap_v4alpha_tap_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamTapsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTapsRequest) ProtoMessage() {} - -func (x *StreamTapsRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_tap_v4alpha_tap_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTapsRequest.ProtoReflect.Descriptor instead. -func (*StreamTapsRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_tap_v4alpha_tap_proto_rawDescGZIP(), []int{0} -} - -func (x *StreamTapsRequest) GetIdentifier() *StreamTapsRequest_Identifier { - if x != nil { - return x.Identifier - } - return nil -} - -func (x *StreamTapsRequest) GetTraceId() uint64 { - if x != nil { - return x.TraceId - } - return 0 -} - -func (x *StreamTapsRequest) GetTrace() *v3.TraceWrapper { - if x != nil { - return x.Trace - } - return nil -} - -// [#not-implemented-hide:] -type StreamTapsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StreamTapsResponse) Reset() { - *x = StreamTapsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_tap_v4alpha_tap_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamTapsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTapsResponse) ProtoMessage() {} - -func (x *StreamTapsResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_tap_v4alpha_tap_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTapsResponse.ProtoReflect.Descriptor instead. -func (*StreamTapsResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_tap_v4alpha_tap_proto_rawDescGZIP(), []int{1} -} - -type StreamTapsRequest_Identifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node sending taps over the stream. - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // The opaque identifier that was set in the :ref:`output config - // `. - TapId string `protobuf:"bytes,2,opt,name=tap_id,json=tapId,proto3" json:"tap_id,omitempty"` -} - -func (x *StreamTapsRequest_Identifier) Reset() { - *x = StreamTapsRequest_Identifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_tap_v4alpha_tap_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamTapsRequest_Identifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTapsRequest_Identifier) ProtoMessage() {} - -func (x *StreamTapsRequest_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_tap_v4alpha_tap_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTapsRequest_Identifier.ProtoReflect.Descriptor instead. -func (*StreamTapsRequest_Identifier) Descriptor() ([]byte, []int) { - return file_envoy_service_tap_v4alpha_tap_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *StreamTapsRequest_Identifier) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *StreamTapsRequest_Identifier) GetTapId() string { - if x != nil { - return x.TapId - } - return "" -} - -var File_envoy_service_tap_v4alpha_tap_proto protoreflect.FileDescriptor - -var file_envoy_service_tap_v4alpha_tap_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x74, 0x61, 0x70, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, - 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8c, 0x03, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, - 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x05, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x05, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x1a, 0x9c, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x61, 0x70, 0x49, 0x64, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, - 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, - 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, - 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x0e, 0x54, 0x61, 0x70, 0x53, 0x69, - 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x40, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, - 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_service_tap_v4alpha_tap_proto_rawDescOnce sync.Once - file_envoy_service_tap_v4alpha_tap_proto_rawDescData = file_envoy_service_tap_v4alpha_tap_proto_rawDesc -) - -func file_envoy_service_tap_v4alpha_tap_proto_rawDescGZIP() []byte { - file_envoy_service_tap_v4alpha_tap_proto_rawDescOnce.Do(func() { - file_envoy_service_tap_v4alpha_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_tap_v4alpha_tap_proto_rawDescData) - }) - return file_envoy_service_tap_v4alpha_tap_proto_rawDescData -} - -var file_envoy_service_tap_v4alpha_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_service_tap_v4alpha_tap_proto_goTypes = []interface{}{ - (*StreamTapsRequest)(nil), // 0: envoy.service.tap.v4alpha.StreamTapsRequest - (*StreamTapsResponse)(nil), // 1: envoy.service.tap.v4alpha.StreamTapsResponse - (*StreamTapsRequest_Identifier)(nil), // 2: envoy.service.tap.v4alpha.StreamTapsRequest.Identifier - (*v3.TraceWrapper)(nil), // 3: envoy.data.tap.v3.TraceWrapper - (*v4alpha.Node)(nil), // 4: envoy.config.core.v4alpha.Node -} -var file_envoy_service_tap_v4alpha_tap_proto_depIdxs = []int32{ - 2, // 0: envoy.service.tap.v4alpha.StreamTapsRequest.identifier:type_name -> envoy.service.tap.v4alpha.StreamTapsRequest.Identifier - 3, // 1: envoy.service.tap.v4alpha.StreamTapsRequest.trace:type_name -> envoy.data.tap.v3.TraceWrapper - 4, // 2: envoy.service.tap.v4alpha.StreamTapsRequest.Identifier.node:type_name -> envoy.config.core.v4alpha.Node - 0, // 3: envoy.service.tap.v4alpha.TapSinkService.StreamTaps:input_type -> envoy.service.tap.v4alpha.StreamTapsRequest - 1, // 4: envoy.service.tap.v4alpha.TapSinkService.StreamTaps:output_type -> envoy.service.tap.v4alpha.StreamTapsResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_service_tap_v4alpha_tap_proto_init() } -func file_envoy_service_tap_v4alpha_tap_proto_init() { - if File_envoy_service_tap_v4alpha_tap_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_tap_v4alpha_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamTapsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_tap_v4alpha_tap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamTapsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_tap_v4alpha_tap_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamTapsRequest_Identifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_tap_v4alpha_tap_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_tap_v4alpha_tap_proto_goTypes, - DependencyIndexes: file_envoy_service_tap_v4alpha_tap_proto_depIdxs, - MessageInfos: file_envoy_service_tap_v4alpha_tap_proto_msgTypes, - }.Build() - File_envoy_service_tap_v4alpha_tap_proto = out.File - file_envoy_service_tap_v4alpha_tap_proto_rawDesc = nil - file_envoy_service_tap_v4alpha_tap_proto_goTypes = nil - file_envoy_service_tap_v4alpha_tap_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// TapSinkServiceClient is the client API for TapSinkService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TapSinkServiceClient interface { - // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. - StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) -} - -type tapSinkServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTapSinkServiceClient(cc grpc.ClientConnInterface) TapSinkServiceClient { - return &tapSinkServiceClient{cc} -} - -func (c *tapSinkServiceClient) StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) { - stream, err := c.cc.NewStream(ctx, &_TapSinkService_serviceDesc.Streams[0], "/envoy.service.tap.v4alpha.TapSinkService/StreamTaps", opts...) - if err != nil { - return nil, err - } - x := &tapSinkServiceStreamTapsClient{stream} - return x, nil -} - -type TapSinkService_StreamTapsClient interface { - Send(*StreamTapsRequest) error - CloseAndRecv() (*StreamTapsResponse, error) - grpc.ClientStream -} - -type tapSinkServiceStreamTapsClient struct { - grpc.ClientStream -} - -func (x *tapSinkServiceStreamTapsClient) Send(m *StreamTapsRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *tapSinkServiceStreamTapsClient) CloseAndRecv() (*StreamTapsResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(StreamTapsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// TapSinkServiceServer is the server API for TapSinkService service. -type TapSinkServiceServer interface { - // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. - StreamTaps(TapSinkService_StreamTapsServer) error -} - -// UnimplementedTapSinkServiceServer can be embedded to have forward compatible implementations. -type UnimplementedTapSinkServiceServer struct { -} - -func (*UnimplementedTapSinkServiceServer) StreamTaps(TapSinkService_StreamTapsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamTaps not implemented") -} - -func RegisterTapSinkServiceServer(s *grpc.Server, srv TapSinkServiceServer) { - s.RegisterService(&_TapSinkService_serviceDesc, srv) -} - -func _TapSinkService_StreamTaps_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(TapSinkServiceServer).StreamTaps(&tapSinkServiceStreamTapsServer{stream}) -} - -type TapSinkService_StreamTapsServer interface { - SendAndClose(*StreamTapsResponse) error - Recv() (*StreamTapsRequest, error) - grpc.ServerStream -} - -type tapSinkServiceStreamTapsServer struct { - grpc.ServerStream -} - -func (x *tapSinkServiceStreamTapsServer) SendAndClose(m *StreamTapsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *tapSinkServiceStreamTapsServer) Recv() (*StreamTapsRequest, error) { - m := new(StreamTapsRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _TapSinkService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.tap.v4alpha.TapSinkService", - HandlerType: (*TapSinkServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamTaps", - Handler: _TapSinkService_StreamTaps_Handler, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/tap/v4alpha/tap.proto", -} diff --git a/pkg/api/envoy/service/tap/v4alpha/tap.pb.validate.go b/pkg/api/envoy/service/tap/v4alpha/tap.pb.validate.go deleted file mode 100644 index 40adba5ba1..0000000000 --- a/pkg/api/envoy/service/tap/v4alpha/tap.pb.validate.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/tap/v4alpha/tap.proto - -package envoy_service_tap_v4alpha - -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{} -) - -// Validate checks the field values on StreamTapsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *StreamTapsRequest) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamTapsRequestValidationError{ - field: "Identifier", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TraceId - - if v, ok := interface{}(m.GetTrace()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamTapsRequestValidationError{ - field: "Trace", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// StreamTapsRequestValidationError is the validation error returned by -// StreamTapsRequest.Validate if the designated constraints aren't met. -type StreamTapsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamTapsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamTapsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamTapsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamTapsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamTapsRequestValidationError) ErrorName() string { - return "StreamTapsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamTapsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamTapsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamTapsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamTapsRequestValidationError{} - -// Validate checks the field values on StreamTapsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamTapsResponse) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// StreamTapsResponseValidationError is the validation error returned by -// StreamTapsResponse.Validate if the designated constraints aren't met. -type StreamTapsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamTapsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamTapsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamTapsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamTapsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamTapsResponseValidationError) ErrorName() string { - return "StreamTapsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamTapsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamTapsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamTapsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamTapsResponseValidationError{} - -// Validate checks the field values on StreamTapsRequest_Identifier with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamTapsRequest_Identifier) Validate() error { - if m == nil { - return nil - } - - if m.GetNode() == nil { - return StreamTapsRequest_IdentifierValidationError{ - field: "Node", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamTapsRequest_IdentifierValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TapId - - return nil -} - -// StreamTapsRequest_IdentifierValidationError is the validation error returned -// by StreamTapsRequest_Identifier.Validate if the designated constraints -// aren't met. -type StreamTapsRequest_IdentifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamTapsRequest_IdentifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamTapsRequest_IdentifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamTapsRequest_IdentifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamTapsRequest_IdentifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamTapsRequest_IdentifierValidationError) ErrorName() string { - return "StreamTapsRequest_IdentifierValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamTapsRequest_IdentifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamTapsRequest_Identifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamTapsRequest_IdentifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamTapsRequest_IdentifierValidationError{} diff --git a/pkg/api/envoy/service/trace/v2/trace_service.pb.go b/pkg/api/envoy/service/trace/v2/trace_service.pb.go index 3434b072bd..50ea157033 100644 --- a/pkg/api/envoy/service/trace/v2/trace_service.pb.go +++ b/pkg/api/envoy/service/trace/v2/trace_service.pb.go @@ -1,19 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/trace/v2/trace_service.proto -package envoy_service_trace_v2 +package tracev2 import ( context "context" v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -30,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type StreamTracesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -188,44 +182,46 @@ var file_envoy_service_trace_v2_trace_service_proto_rawDesc = []byte{ 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x16, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x56, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x1a, 0x43, - 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x32, 0x7d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x1a, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x28, 0x01, 0x42, 0x46, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, - 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x74, 0x6f, 0x1a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x13, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x61, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, + 0x1a, 0x43, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x35, + 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32, 0x7d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x1a, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x42, 0x8d, 0x01, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, + 0x32, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/trace/v2/trace_service.pb.validate.go b/pkg/api/envoy/service/trace/v2/trace_service.pb.validate.go index b5f4c445b5..b95d223f6c 100644 --- a/pkg/api/envoy/service/trace/v2/trace_service.pb.validate.go +++ b/pkg/api/envoy/service/trace/v2/trace_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/trace/v2/trace_service.proto -package envoy_service_trace_v2 +package tracev2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamTracesResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTracesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTracesResponseMultiError, or nil if none found. +func (m *StreamTracesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamTracesResponseMultiError(errors) + } + return nil } +// StreamTracesResponseMultiError is an error wrapping multiple validation +// errors returned by StreamTracesResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamTracesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesResponseMultiError) AllErrors() []error { return m } + // StreamTracesResponseValidationError is the validation error returned by // StreamTracesResponse.Validate if the designated constraints aren't met. type StreamTracesResponseValidationError struct { @@ -102,13 +139,46 @@ var _ interface { // Validate checks the field values on StreamTracesMessage with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTracesMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesMessage with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTracesMessageMultiError, or nil if none found. +func (m *StreamTracesMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesMessage) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessageValidationError{ field: "Identifier", @@ -121,7 +191,26 @@ func (m *StreamTracesMessage) Validate() error { for idx, item := range m.GetSpans() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: fmt.Sprintf("Spans[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: fmt.Sprintf("Spans[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessageValidationError{ field: fmt.Sprintf("Spans[%v]", idx), @@ -133,9 +222,30 @@ func (m *StreamTracesMessage) Validate() error { } + if len(errors) > 0 { + return StreamTracesMessageMultiError(errors) + } + return nil } +// StreamTracesMessageMultiError is an error wrapping multiple validation +// errors returned by StreamTracesMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamTracesMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesMessageMultiError) AllErrors() []error { return m } + // StreamTracesMessageValidationError is the validation error returned by // StreamTracesMessage.Validate if the designated constraints aren't met. type StreamTracesMessageValidationError struct { @@ -194,20 +304,57 @@ var _ interface { // Validate checks the field values on StreamTracesMessage_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTracesMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesMessage_Identifier with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// StreamTracesMessage_IdentifierMultiError, or nil if none found. +func (m *StreamTracesMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesMessage_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamTracesMessage_IdentifierValidationError{ + err := StreamTracesMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessage_IdentifierValidationError{ field: "Node", @@ -217,9 +364,30 @@ func (m *StreamTracesMessage_Identifier) Validate() error { } } + if len(errors) > 0 { + return StreamTracesMessage_IdentifierMultiError(errors) + } + return nil } +// StreamTracesMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamTracesMessage_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamTracesMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesMessage_IdentifierMultiError) AllErrors() []error { return m } + // StreamTracesMessage_IdentifierValidationError is the validation error // returned by StreamTracesMessage_Identifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/trace/v3/trace_service.pb.go b/pkg/api/envoy/service/trace/v3/trace_service.pb.go index 6eb1ec314e..8c0de0be7c 100644 --- a/pkg/api/envoy/service/trace/v3/trace_service.pb.go +++ b/pkg/api/envoy/service/trace/v3/trace_service.pb.go @@ -1,19 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/service/trace/v3/trace_service.proto -package envoy_service_trace_v3 +package tracev3 import ( context "context" v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -30,10 +28,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type StreamTracesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -188,57 +182,59 @@ var file_envoy_service_trace_v3_trace_service_proto_rawDesc = []byte{ 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x32, 0x9a, - 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xde, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, - 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x1a, 0x84, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, - 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, + 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x32, 0x7d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xde, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x42, 0x46, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x1a, 0x84, 0x01, 0x0a, 0x0a, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x32, 0x7d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x1a, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x28, 0x01, 0x42, 0x8d, 0x01, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, + 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/service/trace/v3/trace_service.pb.validate.go b/pkg/api/envoy/service/trace/v3/trace_service.pb.validate.go index 091044b079..cda564b7ca 100644 --- a/pkg/api/envoy/service/trace/v3/trace_service.pb.validate.go +++ b/pkg/api/envoy/service/trace/v3/trace_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/trace/v3/trace_service.proto -package envoy_service_trace_v3 +package tracev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,20 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StreamTracesResponse with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTracesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTracesResponseMultiError, or nil if none found. +func (m *StreamTracesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesResponse) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return StreamTracesResponseMultiError(errors) + } + return nil } +// StreamTracesResponseMultiError is an error wrapping multiple validation +// errors returned by StreamTracesResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamTracesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesResponseMultiError) AllErrors() []error { return m } + // StreamTracesResponseValidationError is the validation error returned by // StreamTracesResponse.Validate if the designated constraints aren't met. type StreamTracesResponseValidationError struct { @@ -102,13 +139,46 @@ var _ interface { // Validate checks the field values on StreamTracesMessage with the rules // defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTracesMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesMessage with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StreamTracesMessageMultiError, or nil if none found. +func (m *StreamTracesMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesMessage) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessageValidationError{ field: "Identifier", @@ -121,7 +191,26 @@ func (m *StreamTracesMessage) Validate() error { for idx, item := range m.GetSpans() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: fmt.Sprintf("Spans[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: fmt.Sprintf("Spans[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessageValidationError{ field: fmt.Sprintf("Spans[%v]", idx), @@ -133,9 +222,30 @@ func (m *StreamTracesMessage) Validate() error { } + if len(errors) > 0 { + return StreamTracesMessageMultiError(errors) + } + return nil } +// StreamTracesMessageMultiError is an error wrapping multiple validation +// errors returned by StreamTracesMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamTracesMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesMessageMultiError) AllErrors() []error { return m } + // StreamTracesMessageValidationError is the validation error returned by // StreamTracesMessage.Validate if the designated constraints aren't met. type StreamTracesMessageValidationError struct { @@ -194,20 +304,57 @@ var _ interface { // Validate checks the field values on StreamTracesMessage_Identifier with the // rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StreamTracesMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesMessage_Identifier with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// StreamTracesMessage_IdentifierMultiError, or nil if none found. +func (m *StreamTracesMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesMessage_Identifier) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetNode() == nil { - return StreamTracesMessage_IdentifierValidationError{ + err := StreamTracesMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessage_IdentifierValidationError{ field: "Node", @@ -217,9 +364,30 @@ func (m *StreamTracesMessage_Identifier) Validate() error { } } + if len(errors) > 0 { + return StreamTracesMessage_IdentifierMultiError(errors) + } + return nil } +// StreamTracesMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamTracesMessage_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamTracesMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesMessage_IdentifierMultiError) AllErrors() []error { return m } + // StreamTracesMessage_IdentifierValidationError is the validation error // returned by StreamTracesMessage_Identifier.Validate if the designated // constraints aren't met. diff --git a/pkg/api/envoy/service/trace/v4alpha/trace_service.pb.go b/pkg/api/envoy/service/trace/v4alpha/trace_service.pb.go deleted file mode 100644 index 6e301c1588..0000000000 --- a/pkg/api/envoy/service/trace/v4alpha/trace_service.pb.go +++ /dev/null @@ -1,460 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/service/trace/v4alpha/trace_service.proto - -package envoy_service_trace_v4alpha - -import ( - context "context" - v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" - _ "github.com/cncf/udpa/go/udpa/annotations" - v4alpha "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v4alpha" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type StreamTracesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *StreamTracesResponse) Reset() { - *x = StreamTracesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamTracesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTracesResponse) ProtoMessage() {} - -func (x *StreamTracesResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTracesResponse.ProtoReflect.Descriptor instead. -func (*StreamTracesResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_trace_v4alpha_trace_service_proto_rawDescGZIP(), []int{0} -} - -type StreamTracesMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier data effectively is a structured metadata. - // As a performance optimization this will only be sent in the first message - // on the stream. - Identifier *StreamTracesMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // A list of Span entries - Spans []*v1.Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"` -} - -func (x *StreamTracesMessage) Reset() { - *x = StreamTracesMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamTracesMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTracesMessage) ProtoMessage() {} - -func (x *StreamTracesMessage) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTracesMessage.ProtoReflect.Descriptor instead. -func (*StreamTracesMessage) Descriptor() ([]byte, []int) { - return file_envoy_service_trace_v4alpha_trace_service_proto_rawDescGZIP(), []int{1} -} - -func (x *StreamTracesMessage) GetIdentifier() *StreamTracesMessage_Identifier { - if x != nil { - return x.Identifier - } - return nil -} - -func (x *StreamTracesMessage) GetSpans() []*v1.Span { - if x != nil { - return x.Spans - } - return nil -} - -type StreamTracesMessage_Identifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node sending the access log messages over the stream. - Node *v4alpha.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` -} - -func (x *StreamTracesMessage_Identifier) Reset() { - *x = StreamTracesMessage_Identifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StreamTracesMessage_Identifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTracesMessage_Identifier) ProtoMessage() {} - -func (x *StreamTracesMessage_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTracesMessage_Identifier.ProtoReflect.Descriptor instead. -func (*StreamTracesMessage_Identifier) Descriptor() ([]byte, []int) { - return file_envoy_service_trace_v4alpha_trace_service_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *StreamTracesMessage_Identifier) GetNode() *v4alpha.Node { - if x != nil { - return x.Node - } - return nil -} - -var File_envoy_service_trace_v4alpha_trace_service_proto protoreflect.FileDescriptor - -var file_envoy_service_trace_v4alpha_trace_service_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x32, 0x9a, 0xc5, - 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xe8, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x5b, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x1a, 0x89, 0x01, 0x0a, - 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, - 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, - 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x87, 0x01, 0x0a, 0x0c, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x0c, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x31, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x4b, 0x0a, 0x29, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x42, 0x11, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_trace_v4alpha_trace_service_proto_rawDescOnce sync.Once - file_envoy_service_trace_v4alpha_trace_service_proto_rawDescData = file_envoy_service_trace_v4alpha_trace_service_proto_rawDesc -) - -func file_envoy_service_trace_v4alpha_trace_service_proto_rawDescGZIP() []byte { - file_envoy_service_trace_v4alpha_trace_service_proto_rawDescOnce.Do(func() { - file_envoy_service_trace_v4alpha_trace_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_trace_v4alpha_trace_service_proto_rawDescData) - }) - return file_envoy_service_trace_v4alpha_trace_service_proto_rawDescData -} - -var file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_service_trace_v4alpha_trace_service_proto_goTypes = []interface{}{ - (*StreamTracesResponse)(nil), // 0: envoy.service.trace.v4alpha.StreamTracesResponse - (*StreamTracesMessage)(nil), // 1: envoy.service.trace.v4alpha.StreamTracesMessage - (*StreamTracesMessage_Identifier)(nil), // 2: envoy.service.trace.v4alpha.StreamTracesMessage.Identifier - (*v1.Span)(nil), // 3: opencensus.proto.trace.v1.Span - (*v4alpha.Node)(nil), // 4: envoy.config.core.v4alpha.Node -} -var file_envoy_service_trace_v4alpha_trace_service_proto_depIdxs = []int32{ - 2, // 0: envoy.service.trace.v4alpha.StreamTracesMessage.identifier:type_name -> envoy.service.trace.v4alpha.StreamTracesMessage.Identifier - 3, // 1: envoy.service.trace.v4alpha.StreamTracesMessage.spans:type_name -> opencensus.proto.trace.v1.Span - 4, // 2: envoy.service.trace.v4alpha.StreamTracesMessage.Identifier.node:type_name -> envoy.config.core.v4alpha.Node - 1, // 3: envoy.service.trace.v4alpha.TraceService.StreamTraces:input_type -> envoy.service.trace.v4alpha.StreamTracesMessage - 0, // 4: envoy.service.trace.v4alpha.TraceService.StreamTraces:output_type -> envoy.service.trace.v4alpha.StreamTracesResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_service_trace_v4alpha_trace_service_proto_init() } -func file_envoy_service_trace_v4alpha_trace_service_proto_init() { - if File_envoy_service_trace_v4alpha_trace_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamTracesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamTracesMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamTracesMessage_Identifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_trace_v4alpha_trace_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_trace_v4alpha_trace_service_proto_goTypes, - DependencyIndexes: file_envoy_service_trace_v4alpha_trace_service_proto_depIdxs, - MessageInfos: file_envoy_service_trace_v4alpha_trace_service_proto_msgTypes, - }.Build() - File_envoy_service_trace_v4alpha_trace_service_proto = out.File - file_envoy_service_trace_v4alpha_trace_service_proto_rawDesc = nil - file_envoy_service_trace_v4alpha_trace_service_proto_goTypes = nil - file_envoy_service_trace_v4alpha_trace_service_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// TraceServiceClient is the client API for TraceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TraceServiceClient interface { - // Envoy will connect and send StreamTracesMessage messages forever. It does - // not expect any response to be sent as nothing would be done in the case - // of failure. - StreamTraces(ctx context.Context, opts ...grpc.CallOption) (TraceService_StreamTracesClient, error) -} - -type traceServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTraceServiceClient(cc grpc.ClientConnInterface) TraceServiceClient { - return &traceServiceClient{cc} -} - -func (c *traceServiceClient) StreamTraces(ctx context.Context, opts ...grpc.CallOption) (TraceService_StreamTracesClient, error) { - stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[0], "/envoy.service.trace.v4alpha.TraceService/StreamTraces", opts...) - if err != nil { - return nil, err - } - x := &traceServiceStreamTracesClient{stream} - return x, nil -} - -type TraceService_StreamTracesClient interface { - Send(*StreamTracesMessage) error - CloseAndRecv() (*StreamTracesResponse, error) - grpc.ClientStream -} - -type traceServiceStreamTracesClient struct { - grpc.ClientStream -} - -func (x *traceServiceStreamTracesClient) Send(m *StreamTracesMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *traceServiceStreamTracesClient) CloseAndRecv() (*StreamTracesResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(StreamTracesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// TraceServiceServer is the server API for TraceService service. -type TraceServiceServer interface { - // Envoy will connect and send StreamTracesMessage messages forever. It does - // not expect any response to be sent as nothing would be done in the case - // of failure. - StreamTraces(TraceService_StreamTracesServer) error -} - -// UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedTraceServiceServer struct { -} - -func (*UnimplementedTraceServiceServer) StreamTraces(TraceService_StreamTracesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamTraces not implemented") -} - -func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { - s.RegisterService(&_TraceService_serviceDesc, srv) -} - -func _TraceService_StreamTraces_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(TraceServiceServer).StreamTraces(&traceServiceStreamTracesServer{stream}) -} - -type TraceService_StreamTracesServer interface { - SendAndClose(*StreamTracesResponse) error - Recv() (*StreamTracesMessage, error) - grpc.ServerStream -} - -type traceServiceStreamTracesServer struct { - grpc.ServerStream -} - -func (x *traceServiceStreamTracesServer) SendAndClose(m *StreamTracesResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *traceServiceStreamTracesServer) Recv() (*StreamTracesMessage, error) { - m := new(StreamTracesMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _TraceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.trace.v4alpha.TraceService", - HandlerType: (*TraceServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamTraces", - Handler: _TraceService_StreamTraces_Handler, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/trace/v4alpha/trace_service.proto", -} diff --git a/pkg/api/envoy/service/trace/v4alpha/trace_service.pb.validate.go b/pkg/api/envoy/service/trace/v4alpha/trace_service.pb.validate.go deleted file mode 100644 index eca122807b..0000000000 --- a/pkg/api/envoy/service/trace/v4alpha/trace_service.pb.validate.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/trace/v4alpha/trace_service.proto - -package envoy_service_trace_v4alpha - -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{} -) - -// Validate checks the field values on StreamTracesResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamTracesResponse) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// StreamTracesResponseValidationError is the validation error returned by -// StreamTracesResponse.Validate if the designated constraints aren't met. -type StreamTracesResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamTracesResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamTracesResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamTracesResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamTracesResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamTracesResponseValidationError) ErrorName() string { - return "StreamTracesResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamTracesResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamTracesResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamTracesResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamTracesResponseValidationError{} - -// Validate checks the field values on StreamTracesMessage with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamTracesMessage) Validate() error { - if m == nil { - return nil - } - - if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamTracesMessageValidationError{ - field: "Identifier", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetSpans() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamTracesMessageValidationError{ - field: fmt.Sprintf("Spans[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// StreamTracesMessageValidationError is the validation error returned by -// StreamTracesMessage.Validate if the designated constraints aren't met. -type StreamTracesMessageValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamTracesMessageValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamTracesMessageValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamTracesMessageValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamTracesMessageValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamTracesMessageValidationError) ErrorName() string { - return "StreamTracesMessageValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamTracesMessageValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamTracesMessage.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamTracesMessageValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamTracesMessageValidationError{} - -// Validate checks the field values on StreamTracesMessage_Identifier with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *StreamTracesMessage_Identifier) Validate() error { - if m == nil { - return nil - } - - if m.GetNode() == nil { - return StreamTracesMessage_IdentifierValidationError{ - field: "Node", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StreamTracesMessage_IdentifierValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - return nil -} - -// StreamTracesMessage_IdentifierValidationError is the validation error -// returned by StreamTracesMessage_Identifier.Validate if the designated -// constraints aren't met. -type StreamTracesMessage_IdentifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StreamTracesMessage_IdentifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StreamTracesMessage_IdentifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StreamTracesMessage_IdentifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StreamTracesMessage_IdentifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StreamTracesMessage_IdentifierValidationError) ErrorName() string { - return "StreamTracesMessage_IdentifierValidationError" -} - -// Error satisfies the builtin error interface -func (e StreamTracesMessage_IdentifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStreamTracesMessage_Identifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StreamTracesMessage_IdentifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StreamTracesMessage_IdentifierValidationError{} diff --git a/pkg/api/envoy/type/hash_policy.pb.go b/pkg/api/envoy/type/hash_policy.pb.go index 0ad2b3ae34..2e2d76a258 100644 --- a/pkg/api/envoy/type/hash_policy.pb.go +++ b/pkg/api/envoy/type/hash_policy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/hash_policy.proto -package envoy_type +package _type import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the hash policy type HashPolicy struct { state protoimpl.MessageState @@ -150,11 +145,14 @@ var file_envoy_type_hash_policy_proto_rawDesc = []byte{ 0x63, 0x65, 0x49, 0x70, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x1a, 0x0a, 0x0a, 0x08, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x42, 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x35, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x68, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0f, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/hash_policy.pb.validate.go b/pkg/api/envoy/type/hash_policy.pb.validate.go index f0ccdea1e9..535f1f77e7 100644 --- a/pkg/api/envoy/type/hash_policy.pb.validate.go +++ b/pkg/api/envoy/type/hash_policy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/hash_policy.proto -package envoy_type +package _type import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HashPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HashPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HashPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HashPolicyMultiError, or +// nil if none found. +func (m *HashPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *HashPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.PolicySpecifier.(type) { case *HashPolicy_SourceIp_: - if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HashPolicyValidationError{ field: "SourceIp", @@ -55,16 +91,40 @@ func (m *HashPolicy) Validate() error { } default: - return HashPolicyValidationError{ + err := HashPolicyValidationError{ field: "PolicySpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return HashPolicyMultiError(errors) } return nil } +// HashPolicyMultiError is an error wrapping multiple validation errors +// returned by HashPolicy.ValidateAll() if the designated constraints aren't met. +type HashPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HashPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HashPolicyMultiError) AllErrors() []error { return m } + // HashPolicyValidationError is the validation error returned by // HashPolicy.Validate if the designated constraints aren't met. type HashPolicyValidationError struct { @@ -121,15 +181,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HashPolicy_SourceIp) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HashPolicy_SourceIp with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HashPolicy_SourceIpMultiError, or nil if none found. +func (m *HashPolicy_SourceIp) ValidateAll() error { + return m.validate(true) +} + +func (m *HashPolicy_SourceIp) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return HashPolicy_SourceIpMultiError(errors) + } + return nil } +// HashPolicy_SourceIpMultiError is an error wrapping multiple validation +// errors returned by HashPolicy_SourceIp.ValidateAll() if the designated +// constraints aren't met. +type HashPolicy_SourceIpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HashPolicy_SourceIpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HashPolicy_SourceIpMultiError) AllErrors() []error { return m } + // HashPolicy_SourceIpValidationError is the validation error returned by // HashPolicy_SourceIp.Validate if the designated constraints aren't met. type HashPolicy_SourceIpValidationError struct { diff --git a/pkg/api/envoy/type/http.pb.go b/pkg/api/envoy/type/http.pb.go index 4b3b9d2d07..87aaff1622 100644 --- a/pkg/api/envoy/type/http.pb.go +++ b/pkg/api/envoy/type/http.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/http.proto -package envoy_type +package _type import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CodecClientType int32 const ( @@ -88,10 +83,14 @@ var file_envoy_type_http_proto_rawDesc = []byte{ 0x74, 0x6f, 0x2a, 0x32, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, - 0x54, 0x54, 0x50, 0x33, 0x10, 0x02, 0x42, 0x2f, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x54, 0x54, 0x50, 0x33, 0x10, 0x02, 0x42, 0x62, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x65, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/http.pb.validate.go b/pkg/api/envoy/type/http.pb.validate.go index 295dee129e..69e27cb1e5 100644 --- a/pkg/api/envoy/type/http.pb.validate.go +++ b/pkg/api/envoy/type/http.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/http.proto -package envoy_type +package _type import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/type/http/v3/cookie.pb.go b/pkg/api/envoy/type/http/v3/cookie.pb.go new file mode 100644 index 0000000000..b4f323473f --- /dev/null +++ b/pkg/api/envoy/type/http/v3/cookie.pb.go @@ -0,0 +1,189 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/type/http/v3/cookie.proto + +package httpv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + duration "github.com/golang/protobuf/ptypes/duration" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Cookie defines an API for obtaining or generating HTTP cookie. +type Cookie struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name that will be used to obtain cookie value from downstream HTTP request or generate + // new cookie for downstream. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Duration of cookie. This will be used to set the expiry time of a new cookie when it is + // generated. Set this to 0 to use a session cookie. + Ttl *duration.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` + // Path of cookie. This will be used to set the path of a new cookie when it is generated. + // 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"` +} + +func (x *Cookie) Reset() { + *x = Cookie{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_http_v3_cookie_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cookie) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cookie) ProtoMessage() {} + +func (x *Cookie) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_http_v3_cookie_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cookie.ProtoReflect.Descriptor instead. +func (*Cookie) Descriptor() ([]byte, []int) { + return file_envoy_type_http_v3_cookie_proto_rawDescGZIP(), []int{0} +} + +func (x *Cookie) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Cookie) GetTtl() *duration.Duration { + if x != nil { + return x.Ttl + } + return nil +} + +func (x *Cookie) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +var File_envoy_type_http_v3_cookie_proto protoreflect.FileDescriptor + +var file_envoy_type_http_v3_cookie_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a, + 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0xaa, 0x01, 0x02, 0x32, 0x00, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, + 0x7b, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x68, 0x74, + 0x74, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_http_v3_cookie_proto_rawDescOnce sync.Once + file_envoy_type_http_v3_cookie_proto_rawDescData = file_envoy_type_http_v3_cookie_proto_rawDesc +) + +func file_envoy_type_http_v3_cookie_proto_rawDescGZIP() []byte { + file_envoy_type_http_v3_cookie_proto_rawDescOnce.Do(func() { + file_envoy_type_http_v3_cookie_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_http_v3_cookie_proto_rawDescData) + }) + return file_envoy_type_http_v3_cookie_proto_rawDescData +} + +var file_envoy_type_http_v3_cookie_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_type_http_v3_cookie_proto_goTypes = []interface{}{ + (*Cookie)(nil), // 0: envoy.type.http.v3.Cookie + (*duration.Duration)(nil), // 1: google.protobuf.Duration +} +var file_envoy_type_http_v3_cookie_proto_depIdxs = []int32{ + 1, // 0: envoy.type.http.v3.Cookie.ttl:type_name -> google.protobuf.Duration + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_type_http_v3_cookie_proto_init() } +func file_envoy_type_http_v3_cookie_proto_init() { + if File_envoy_type_http_v3_cookie_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_http_v3_cookie_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cookie); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_http_v3_cookie_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_http_v3_cookie_proto_goTypes, + DependencyIndexes: file_envoy_type_http_v3_cookie_proto_depIdxs, + MessageInfos: file_envoy_type_http_v3_cookie_proto_msgTypes, + }.Build() + File_envoy_type_http_v3_cookie_proto = out.File + file_envoy_type_http_v3_cookie_proto_rawDesc = nil + file_envoy_type_http_v3_cookie_proto_goTypes = nil + file_envoy_type_http_v3_cookie_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/type/http/v3/cookie.pb.validate.go b/pkg/api/envoy/type/http/v3/cookie.pb.validate.go new file mode 100644 index 0000000000..bb23d47819 --- /dev/null +++ b/pkg/api/envoy/type/http/v3/cookie.pb.validate.go @@ -0,0 +1,177 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/http/v3/cookie.proto + +package httpv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Cookie with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Cookie) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cookie with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in CookieMultiError, or nil if none found. +func (m *Cookie) ValidateAll() error { + return m.validate(true) +} + +func (m *Cookie) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := CookieValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetTtl(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = CookieValidationError{ + field: "Ttl", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := CookieValidationError{ + field: "Ttl", + reason: "value must be greater than or equal to 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + // no validation rules for Path + + if len(errors) > 0 { + return CookieMultiError(errors) + } + + return nil +} + +// CookieMultiError is an error wrapping multiple validation errors returned by +// Cookie.ValidateAll() if the designated constraints aren't met. +type CookieMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CookieMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CookieMultiError) AllErrors() []error { return m } + +// CookieValidationError is the validation error returned by Cookie.Validate if +// the designated constraints aren't met. +type CookieValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CookieValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CookieValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CookieValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CookieValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CookieValidationError) ErrorName() string { return "CookieValidationError" } + +// Error satisfies the builtin error interface +func (e 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 %sCookie.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CookieValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CookieValidationError{} diff --git a/pkg/api/envoy/type/http/v3/path_transformation.pb.go b/pkg/api/envoy/type/http/v3/path_transformation.pb.go new file mode 100644 index 0000000000..019f4bb841 --- /dev/null +++ b/pkg/api/envoy/type/http/v3/path_transformation.pb.go @@ -0,0 +1,402 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/type/http/v3/path_transformation.proto + +package httpv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PathTransformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of operations to apply. Transformations will be performed in the order that they appear. + Operations []*PathTransformation_Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *PathTransformation) Reset() { + *x = PathTransformation{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathTransformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathTransformation) ProtoMessage() {} + +func (x *PathTransformation) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathTransformation.ProtoReflect.Descriptor instead. +func (*PathTransformation) Descriptor() ([]byte, []int) { + return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0} +} + +func (x *PathTransformation) GetOperations() []*PathTransformation_Operation { + if x != nil { + return x.Operations + } + return nil +} + +// A type of operation to alter text. +type PathTransformation_Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to OperationSpecifier: + // *PathTransformation_Operation_NormalizePathRfc_3986 + // *PathTransformation_Operation_MergeSlashes_ + OperationSpecifier isPathTransformation_Operation_OperationSpecifier `protobuf_oneof:"operation_specifier"` +} + +func (x *PathTransformation_Operation) Reset() { + *x = PathTransformation_Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathTransformation_Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathTransformation_Operation) ProtoMessage() {} + +func (x *PathTransformation_Operation) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathTransformation_Operation.ProtoReflect.Descriptor instead. +func (*PathTransformation_Operation) Descriptor() ([]byte, []int) { + return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *PathTransformation_Operation) GetOperationSpecifier() isPathTransformation_Operation_OperationSpecifier { + if m != nil { + return m.OperationSpecifier + } + return nil +} + +func (x *PathTransformation_Operation) GetNormalizePathRfc_3986() *PathTransformation_Operation_NormalizePathRFC3986 { + if x, ok := x.GetOperationSpecifier().(*PathTransformation_Operation_NormalizePathRfc_3986); ok { + return x.NormalizePathRfc_3986 + } + return nil +} + +func (x *PathTransformation_Operation) GetMergeSlashes() *PathTransformation_Operation_MergeSlashes { + if x, ok := x.GetOperationSpecifier().(*PathTransformation_Operation_MergeSlashes_); ok { + return x.MergeSlashes + } + return nil +} + +type isPathTransformation_Operation_OperationSpecifier interface { + isPathTransformation_Operation_OperationSpecifier() +} + +type PathTransformation_Operation_NormalizePathRfc_3986 struct { + // Enable path normalization per RFC 3986. + NormalizePathRfc_3986 *PathTransformation_Operation_NormalizePathRFC3986 `protobuf:"bytes,2,opt,name=normalize_path_rfc_3986,json=normalizePathRfc3986,proto3,oneof"` +} + +type PathTransformation_Operation_MergeSlashes_ struct { + // Enable merging adjacent slashes. + MergeSlashes *PathTransformation_Operation_MergeSlashes `protobuf:"bytes,3,opt,name=merge_slashes,json=mergeSlashes,proto3,oneof"` +} + +func (*PathTransformation_Operation_NormalizePathRfc_3986) isPathTransformation_Operation_OperationSpecifier() { +} + +func (*PathTransformation_Operation_MergeSlashes_) isPathTransformation_Operation_OperationSpecifier() { +} + +// Should text be normalized according to RFC 3986? This typically is used for path headers +// before any processing of requests by HTTP filters or routing. This applies percent-encoded +// normalization and path segment normalization. Fails on characters disallowed in URLs +// (e.g. NULLs). See `Normalization and Comparison +// `_ for details of normalization. Note that +// this options does not perform `case normalization +// `_ +type PathTransformation_Operation_NormalizePathRFC3986 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PathTransformation_Operation_NormalizePathRFC3986) Reset() { + *x = PathTransformation_Operation_NormalizePathRFC3986{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathTransformation_Operation_NormalizePathRFC3986) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathTransformation_Operation_NormalizePathRFC3986) ProtoMessage() {} + +func (x *PathTransformation_Operation_NormalizePathRFC3986) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathTransformation_Operation_NormalizePathRFC3986.ProtoReflect.Descriptor instead. +func (*PathTransformation_Operation_NormalizePathRFC3986) Descriptor() ([]byte, []int) { + return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// Determines if adjacent slashes are merged into one. A common use case is for a request path +// header. Using this option in `:ref: PathNormalizationOptions +// ` +// will allow incoming requests with path `//dir///file` to match against route with `prefix` +// match set to `/dir`. When using for header transformations, note that slash merging is not +// part of `HTTP spec `_ and is provided for convenience. +type PathTransformation_Operation_MergeSlashes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PathTransformation_Operation_MergeSlashes) Reset() { + *x = PathTransformation_Operation_MergeSlashes{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathTransformation_Operation_MergeSlashes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathTransformation_Operation_MergeSlashes) ProtoMessage() {} + +func (x *PathTransformation_Operation_MergeSlashes) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathTransformation_Operation_MergeSlashes.ProtoReflect.Descriptor instead. +func (*PathTransformation_Operation_MergeSlashes) Descriptor() ([]byte, []int) { + return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0, 0, 1} +} + +var File_envoy_type_http_v3_path_transformation_proto protoreflect.FileDescriptor + +var file_envoy_type_http_v3_path_transformation_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x03, 0x0a, 0x12, 0x50, + 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x50, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0xb5, 0x02, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x7e, 0x0a, 0x17, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x72, 0x66, 0x63, 0x5f, 0x33, 0x39, 0x38, 0x36, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, + 0x74, 0x68, 0x52, 0x46, 0x43, 0x33, 0x39, 0x38, 0x36, 0x48, 0x00, 0x52, 0x14, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x66, 0x63, 0x33, 0x39, 0x38, + 0x36, 0x12, 0x64, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, + 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x1a, 0x16, 0x0a, 0x14, 0x4e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x46, 0x43, 0x33, 0x39, 0x38, 0x36, 0x1a, + 0x0e, 0x0a, 0x0c, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x42, + 0x1a, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x87, 0x01, 0x0a, 0x20, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, + 0x42, 0x17, 0x50, 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_http_v3_path_transformation_proto_rawDescOnce sync.Once + file_envoy_type_http_v3_path_transformation_proto_rawDescData = file_envoy_type_http_v3_path_transformation_proto_rawDesc +) + +func file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP() []byte { + file_envoy_type_http_v3_path_transformation_proto_rawDescOnce.Do(func() { + file_envoy_type_http_v3_path_transformation_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_http_v3_path_transformation_proto_rawDescData) + }) + return file_envoy_type_http_v3_path_transformation_proto_rawDescData +} + +var file_envoy_type_http_v3_path_transformation_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_type_http_v3_path_transformation_proto_goTypes = []interface{}{ + (*PathTransformation)(nil), // 0: envoy.type.http.v3.PathTransformation + (*PathTransformation_Operation)(nil), // 1: envoy.type.http.v3.PathTransformation.Operation + (*PathTransformation_Operation_NormalizePathRFC3986)(nil), // 2: envoy.type.http.v3.PathTransformation.Operation.NormalizePathRFC3986 + (*PathTransformation_Operation_MergeSlashes)(nil), // 3: envoy.type.http.v3.PathTransformation.Operation.MergeSlashes +} +var file_envoy_type_http_v3_path_transformation_proto_depIdxs = []int32{ + 1, // 0: envoy.type.http.v3.PathTransformation.operations:type_name -> envoy.type.http.v3.PathTransformation.Operation + 2, // 1: envoy.type.http.v3.PathTransformation.Operation.normalize_path_rfc_3986:type_name -> envoy.type.http.v3.PathTransformation.Operation.NormalizePathRFC3986 + 3, // 2: envoy.type.http.v3.PathTransformation.Operation.merge_slashes:type_name -> envoy.type.http.v3.PathTransformation.Operation.MergeSlashes + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_type_http_v3_path_transformation_proto_init() } +func file_envoy_type_http_v3_path_transformation_proto_init() { + if File_envoy_type_http_v3_path_transformation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_http_v3_path_transformation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathTransformation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_http_v3_path_transformation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathTransformation_Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_http_v3_path_transformation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathTransformation_Operation_NormalizePathRFC3986); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_http_v3_path_transformation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathTransformation_Operation_MergeSlashes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_http_v3_path_transformation_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*PathTransformation_Operation_NormalizePathRfc_3986)(nil), + (*PathTransformation_Operation_MergeSlashes_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_http_v3_path_transformation_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_http_v3_path_transformation_proto_goTypes, + DependencyIndexes: file_envoy_type_http_v3_path_transformation_proto_depIdxs, + MessageInfos: file_envoy_type_http_v3_path_transformation_proto_msgTypes, + }.Build() + File_envoy_type_http_v3_path_transformation_proto = out.File + file_envoy_type_http_v3_path_transformation_proto_rawDesc = nil + file_envoy_type_http_v3_path_transformation_proto_goTypes = nil + file_envoy_type_http_v3_path_transformation_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/type/http/v3/path_transformation.pb.validate.go b/pkg/api/envoy/type/http/v3/path_transformation.pb.validate.go new file mode 100644 index 0000000000..370f5c2b5e --- /dev/null +++ b/pkg/api/envoy/type/http/v3/path_transformation.pb.validate.go @@ -0,0 +1,570 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/http/v3/path_transformation.proto + +package httpv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PathTransformation with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *PathTransformation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PathTransformation with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PathTransformationMultiError, or nil if none found. +func (m *PathTransformation) ValidateAll() error { + return m.validate(true) +} + +func (m *PathTransformation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetOperations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PathTransformationValidationError{ + field: fmt.Sprintf("Operations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PathTransformationValidationError{ + field: fmt.Sprintf("Operations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PathTransformationValidationError{ + field: fmt.Sprintf("Operations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return PathTransformationMultiError(errors) + } + + return nil +} + +// PathTransformationMultiError is an error wrapping multiple validation errors +// returned by PathTransformation.ValidateAll() if the designated constraints +// aren't met. +type PathTransformationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathTransformationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathTransformationMultiError) AllErrors() []error { return m } + +// PathTransformationValidationError is the validation error returned by +// PathTransformation.Validate if the designated constraints aren't met. +type PathTransformationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PathTransformationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PathTransformationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PathTransformationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PathTransformationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PathTransformationValidationError) ErrorName() string { + return "PathTransformationValidationError" +} + +// Error satisfies the builtin error interface +func (e PathTransformationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPathTransformation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PathTransformationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PathTransformationValidationError{} + +// Validate checks the field values on PathTransformation_Operation with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *PathTransformation_Operation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PathTransformation_Operation with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PathTransformation_OperationMultiError, or nil if none found. +func (m *PathTransformation_Operation) ValidateAll() error { + return m.validate(true) +} + +func (m *PathTransformation_Operation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.OperationSpecifier.(type) { + + case *PathTransformation_Operation_NormalizePathRfc_3986: + + if all { + switch v := interface{}(m.GetNormalizePathRfc_3986()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PathTransformation_OperationValidationError{ + field: "NormalizePathRfc_3986", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PathTransformation_OperationValidationError{ + field: "NormalizePathRfc_3986", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNormalizePathRfc_3986()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PathTransformation_OperationValidationError{ + field: "NormalizePathRfc_3986", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *PathTransformation_Operation_MergeSlashes_: + + if all { + switch v := interface{}(m.GetMergeSlashes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PathTransformation_OperationValidationError{ + field: "MergeSlashes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PathTransformation_OperationValidationError{ + field: "MergeSlashes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMergeSlashes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PathTransformation_OperationValidationError{ + field: "MergeSlashes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := PathTransformation_OperationValidationError{ + field: "OperationSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return PathTransformation_OperationMultiError(errors) + } + + return nil +} + +// PathTransformation_OperationMultiError is an error wrapping multiple +// validation errors returned by PathTransformation_Operation.ValidateAll() if +// the designated constraints aren't met. +type PathTransformation_OperationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathTransformation_OperationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathTransformation_OperationMultiError) AllErrors() []error { return m } + +// PathTransformation_OperationValidationError is the validation error returned +// by PathTransformation_Operation.Validate if the designated constraints +// aren't met. +type PathTransformation_OperationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PathTransformation_OperationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PathTransformation_OperationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PathTransformation_OperationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PathTransformation_OperationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PathTransformation_OperationValidationError) ErrorName() string { + return "PathTransformation_OperationValidationError" +} + +// Error satisfies the builtin error interface +func (e PathTransformation_OperationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPathTransformation_Operation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PathTransformation_OperationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PathTransformation_OperationValidationError{} + +// Validate checks the field values on +// PathTransformation_Operation_NormalizePathRFC3986 with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *PathTransformation_Operation_NormalizePathRFC3986) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// PathTransformation_Operation_NormalizePathRFC3986 with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// PathTransformation_Operation_NormalizePathRFC3986MultiError, or nil if none found. +func (m *PathTransformation_Operation_NormalizePathRFC3986) ValidateAll() error { + return m.validate(true) +} + +func (m *PathTransformation_Operation_NormalizePathRFC3986) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return PathTransformation_Operation_NormalizePathRFC3986MultiError(errors) + } + + return nil +} + +// PathTransformation_Operation_NormalizePathRFC3986MultiError is an error +// wrapping multiple validation errors returned by +// PathTransformation_Operation_NormalizePathRFC3986.ValidateAll() if the +// designated constraints aren't met. +type PathTransformation_Operation_NormalizePathRFC3986MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathTransformation_Operation_NormalizePathRFC3986MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathTransformation_Operation_NormalizePathRFC3986MultiError) AllErrors() []error { return m } + +// PathTransformation_Operation_NormalizePathRFC3986ValidationError is the +// validation error returned by +// PathTransformation_Operation_NormalizePathRFC3986.Validate if the +// designated constraints aren't met. +type PathTransformation_Operation_NormalizePathRFC3986ValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) ErrorName() string { + return "PathTransformation_Operation_NormalizePathRFC3986ValidationError" +} + +// Error satisfies the builtin error interface +func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPathTransformation_Operation_NormalizePathRFC3986.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PathTransformation_Operation_NormalizePathRFC3986ValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PathTransformation_Operation_NormalizePathRFC3986ValidationError{} + +// Validate checks the field values on +// PathTransformation_Operation_MergeSlashes with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *PathTransformation_Operation_MergeSlashes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// PathTransformation_Operation_MergeSlashes with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// PathTransformation_Operation_MergeSlashesMultiError, or nil if none found. +func (m *PathTransformation_Operation_MergeSlashes) ValidateAll() error { + return m.validate(true) +} + +func (m *PathTransformation_Operation_MergeSlashes) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return PathTransformation_Operation_MergeSlashesMultiError(errors) + } + + return nil +} + +// PathTransformation_Operation_MergeSlashesMultiError is an error wrapping +// multiple validation errors returned by +// PathTransformation_Operation_MergeSlashes.ValidateAll() if the designated +// constraints aren't met. +type PathTransformation_Operation_MergeSlashesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathTransformation_Operation_MergeSlashesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathTransformation_Operation_MergeSlashesMultiError) AllErrors() []error { return m } + +// PathTransformation_Operation_MergeSlashesValidationError is the validation +// error returned by PathTransformation_Operation_MergeSlashes.Validate if the +// designated constraints aren't met. +type PathTransformation_Operation_MergeSlashesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PathTransformation_Operation_MergeSlashesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PathTransformation_Operation_MergeSlashesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PathTransformation_Operation_MergeSlashesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PathTransformation_Operation_MergeSlashesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PathTransformation_Operation_MergeSlashesValidationError) ErrorName() string { + return "PathTransformation_Operation_MergeSlashesValidationError" +} + +// Error satisfies the builtin error interface +func (e PathTransformation_Operation_MergeSlashesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPathTransformation_Operation_MergeSlashes.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PathTransformation_Operation_MergeSlashesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PathTransformation_Operation_MergeSlashesValidationError{} diff --git a/pkg/api/envoy/type/http_status.pb.go b/pkg/api/envoy/type/http_status.pb.go index 0e87f7d92e..59e46f3307 100644 --- a/pkg/api/envoy/type/http_status.pb.go +++ b/pkg/api/envoy/type/http_status.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/http_status.proto -package envoy_type +package _type import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // HTTP response codes supported in Envoy. // For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml type StatusCode int32 @@ -380,10 +375,14 @@ var file_envoy_type_http_status_proto_rawDesc = []byte{ 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x10, 0xfe, 0x03, 0x12, 0x22, 0x0a, 0x1d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xff, 0x03, - 0x42, 0x35, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x42, 0x68, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0f, 0x48, 0x74, - 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/http_status.pb.validate.go b/pkg/api/envoy/type/http_status.pb.validate.go index 7d97cb042a..30bb5e1300 100644 --- a/pkg/api/envoy/type/http_status.pb.validate.go +++ b/pkg/api/envoy/type/http_status.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/http_status.proto -package envoy_type +package _type import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,33 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpStatus with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpStatus with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpStatusMultiError, or +// nil if none found. +func (m *HttpStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := _HttpStatus_Code_NotInLookup[m.GetCode()]; ok { - return HttpStatusValidationError{ + err := HttpStatusValidationError{ field: "Code", reason: "value must not be in list [0]", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := StatusCode_name[int32(m.GetCode())]; !ok { - return HttpStatusValidationError{ + err := HttpStatusValidationError{ field: "Code", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HttpStatusMultiError(errors) } return nil } +// HttpStatusMultiError is an error wrapping multiple validation errors +// returned by HttpStatus.ValidateAll() if the designated constraints aren't met. +type HttpStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpStatusMultiError) AllErrors() []error { return m } + // HttpStatusValidationError is the validation error returned by // HttpStatus.Validate if the designated constraints aren't met. type HttpStatusValidationError struct { diff --git a/pkg/api/envoy/type/matcher/metadata.pb.go b/pkg/api/envoy/type/matcher/metadata.pb.go index 30c188841b..98233da2c0 100644 --- a/pkg/api/envoy/type/matcher/metadata.pb.go +++ b/pkg/api/envoy/type/matcher/metadata.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/metadata.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-major-version: MetadataMatcher should use StructMatcher] type MetadataMatcher struct { state protoimpl.MessageState @@ -192,11 +187,15 @@ var file_envoy_type_matcher_metadata_proto_rawDesc = []byte{ 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x42, 0x3b, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x01, 0x42, 0x76, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/metadata.pb.validate.go b/pkg/api/envoy/type/matcher/metadata.pb.validate.go index 2873dd81e8..d003f6befe 100644 --- a/pkg/api/envoy/type/matcher/metadata.pb.validate.go +++ b/pkg/api/envoy/type/matcher/metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/metadata.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MetadataMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *MetadataMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataMatcherMultiError, or nil if none found. +func (m *MetadataMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetFilter()) < 1 { - return MetadataMatcherValidationError{ + err := MetadataMatcherValidationError{ field: "Filter", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetPath()) < 1 { - return MetadataMatcherValidationError{ + err := MetadataMatcherValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPath() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataMatcherValidationError{ field: fmt.Sprintf("Path[%v]", idx), @@ -71,13 +114,36 @@ func (m *MetadataMatcher) Validate() error { } if m.GetValue() == nil { - return MetadataMatcherValidationError{ + err := MetadataMatcherValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataMatcherValidationError{ field: "Value", @@ -87,9 +153,30 @@ func (m *MetadataMatcher) Validate() error { } } + if len(errors) > 0 { + return MetadataMatcherMultiError(errors) + } + return nil } +// MetadataMatcherMultiError is an error wrapping multiple validation errors +// returned by MetadataMatcher.ValidateAll() if the designated constraints +// aren't met. +type MetadataMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMatcherMultiError) AllErrors() []error { return m } + // MetadataMatcherValidationError is the validation error returned by // MetadataMatcher.Validate if the designated constraints aren't met. type MetadataMatcherValidationError struct { @@ -146,34 +233,77 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataMatcher_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataMatcher_PathSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataMatcher_PathSegmentMultiError, or nil if none found. +func (m *MetadataMatcher_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataMatcher_PathSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Segment.(type) { case *MetadataMatcher_PathSegment_Key: if utf8.RuneCountInString(m.GetKey()) < 1 { - return MetadataMatcher_PathSegmentValidationError{ + err := MetadataMatcher_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } default: - return MetadataMatcher_PathSegmentValidationError{ + err := MetadataMatcher_PathSegmentValidationError{ field: "Segment", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MetadataMatcher_PathSegmentMultiError(errors) } return nil } +// MetadataMatcher_PathSegmentMultiError is an error wrapping multiple +// validation errors returned by MetadataMatcher_PathSegment.ValidateAll() if +// the designated constraints aren't met. +type MetadataMatcher_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMatcher_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMatcher_PathSegmentMultiError) AllErrors() []error { return m } + // MetadataMatcher_PathSegmentValidationError is the validation error returned // by MetadataMatcher_PathSegment.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/type/matcher/node.pb.go b/pkg/api/envoy/type/matcher/node.pb.go index 49b97a6be6..6495434510 100644 --- a/pkg/api/envoy/type/matcher/node.pb.go +++ b/pkg/api/envoy/type/matcher/node.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/node.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a Node. // The match follows AND semantics. type NodeMatcher struct { @@ -106,11 +101,15 @@ var file_envoy_type_matcher_node_proto_rawDesc = []byte{ 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x6e, 0x6f, 0x64, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x42, 0x37, 0x0a, 0x20, 0x69, 0x6f, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x42, 0x72, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x09, - 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/node.pb.validate.go b/pkg/api/envoy/type/matcher/node.pb.validate.go index 79d9e20aeb..a789aba138 100644 --- a/pkg/api/envoy/type/matcher/node.pb.validate.go +++ b/pkg/api/envoy/type/matcher/node.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/node.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on NodeMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *NodeMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NodeMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in NodeMatcherMultiError, or +// nil if none found. +func (m *NodeMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *NodeMatcher) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNodeId()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNodeId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: "NodeId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: "NodeId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNodeId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeMatcherValidationError{ field: "NodeId", @@ -54,7 +89,26 @@ func (m *NodeMatcher) Validate() error { for idx, item := range m.GetNodeMetadatas() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: fmt.Sprintf("NodeMetadatas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: fmt.Sprintf("NodeMetadatas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeMatcherValidationError{ field: fmt.Sprintf("NodeMetadatas[%v]", idx), @@ -66,9 +120,29 @@ func (m *NodeMatcher) Validate() error { } + if len(errors) > 0 { + return NodeMatcherMultiError(errors) + } + return nil } +// NodeMatcherMultiError is an error wrapping multiple validation errors +// returned by NodeMatcher.ValidateAll() if the designated constraints aren't met. +type NodeMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NodeMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NodeMatcherMultiError) AllErrors() []error { return m } + // NodeMatcherValidationError is the validation error returned by // NodeMatcher.Validate if the designated constraints aren't met. type NodeMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/number.pb.go b/pkg/api/envoy/type/matcher/number.pb.go index ccc03f3d0e..6a3dd5b62d 100644 --- a/pkg/api/envoy/type/matcher/number.pb.go +++ b/pkg/api/envoy/type/matcher/number.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/number.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a double value. type DoubleMatcher struct { state protoimpl.MessageState @@ -130,11 +125,15 @@ var file_envoy_type_matcher_number_proto_rawDesc = []byte{ 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x39, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x74, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/number.pb.validate.go b/pkg/api/envoy/type/matcher/number.pb.validate.go index b6009f1f7f..4001fa4c4f 100644 --- a/pkg/api/envoy/type/matcher/number.pb.validate.go +++ b/pkg/api/envoy/type/matcher/number.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/number.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on DoubleMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DoubleMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DoubleMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DoubleMatcherMultiError, or +// nil if none found. +func (m *DoubleMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *DoubleMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.MatchPattern.(type) { case *DoubleMatcher_Range: - if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DoubleMatcherValidationError{ + field: "Range", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DoubleMatcherValidationError{ + field: "Range", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DoubleMatcherValidationError{ field: "Range", @@ -59,16 +94,41 @@ func (m *DoubleMatcher) Validate() error { // no validation rules for Exact default: - return DoubleMatcherValidationError{ + err := DoubleMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return DoubleMatcherMultiError(errors) } return nil } +// DoubleMatcherMultiError is an error wrapping multiple validation errors +// returned by DoubleMatcher.ValidateAll() if the designated constraints +// aren't met. +type DoubleMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DoubleMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DoubleMatcherMultiError) AllErrors() []error { return m } + // DoubleMatcherValidationError is the validation error returned by // DoubleMatcher.Validate if the designated constraints aren't met. type DoubleMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/path.pb.go b/pkg/api/envoy/type/matcher/path.pb.go index e06e97ecaa..b9b4900154 100644 --- a/pkg/api/envoy/type/matcher/path.pb.go +++ b/pkg/api/envoy/type/matcher/path.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/path.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a path on HTTP request. type PathMatcher struct { state protoimpl.MessageState @@ -114,11 +109,15 @@ var file_envoy_type_matcher_path_proto_rawDesc = []byte{ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x0b, - 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x37, 0x0a, 0x20, 0x69, + 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x72, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, - 0x09, 0x50, 0x61, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x50, 0x61, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/path.pb.validate.go b/pkg/api/envoy/type/matcher/path.pb.validate.go index 69a01e6c6a..1b547779ba 100644 --- a/pkg/api/envoy/type/matcher/path.pb.validate.go +++ b/pkg/api/envoy/type/matcher/path.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/path.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on PathMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PathMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PathMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PathMatcherMultiError, or +// nil if none found. +func (m *PathMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *PathMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *PathMatcher_Path: if m.GetPath() == nil { - return PathMatcherValidationError{ + err := PathMatcherValidationError{ field: "Path", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PathMatcherValidationError{ + field: "Path", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PathMatcherValidationError{ + field: "Path", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PathMatcherValidationError{ field: "Path", @@ -63,16 +102,40 @@ func (m *PathMatcher) Validate() error { } default: - return PathMatcherValidationError{ + err := PathMatcherValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return PathMatcherMultiError(errors) } return nil } +// PathMatcherMultiError is an error wrapping multiple validation errors +// returned by PathMatcher.ValidateAll() if the designated constraints aren't met. +type PathMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathMatcherMultiError) AllErrors() []error { return m } + // PathMatcherValidationError is the validation error returned by // PathMatcher.Validate if the designated constraints aren't met. type PathMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/regex.pb.go b/pkg/api/envoy/type/matcher/regex.pb.go index ae6fcf1bec..7ee388d53b 100644 --- a/pkg/api/envoy/type/matcher/regex.pb.go +++ b/pkg/api/envoy/type/matcher/regex.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/regex.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A regex matcher designed for safety when used with untrusted input. type RegexMatcher struct { state protoimpl.MessageState @@ -284,11 +279,15 @@ var file_envoy_type_matcher_regex_proto_rawDesc = []byte{ 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, - 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x38, 0x0a, 0x20, 0x69, + 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x73, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, - 0x0a, 0x52, 0x65, 0x67, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x52, 0x65, 0x67, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/regex.pb.validate.go b/pkg/api/envoy/type/matcher/regex.pb.validate.go index b27b0b32d1..b5d063bfa0 100644 --- a/pkg/api/envoy/type/matcher/regex.pb.validate.go +++ b/pkg/api/envoy/type/matcher/regex.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/regex.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,41 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RegexMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RegexMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RegexMatcherMultiError, or +// nil if none found. +func (m *RegexMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetRegex()) < 1 { - return RegexMatcherValidationError{ + err := RegexMatcherValidationError{ field: "Regex", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.EngineType.(type) { @@ -53,13 +73,36 @@ func (m *RegexMatcher) Validate() error { case *RegexMatcher_GoogleRe2: if m.GetGoogleRe2() == nil { - return RegexMatcherValidationError{ + err := RegexMatcherValidationError{ field: "GoogleRe2", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleRe2()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RegexMatcherValidationError{ field: "GoogleRe2", @@ -70,16 +113,40 @@ func (m *RegexMatcher) Validate() error { } default: - return RegexMatcherValidationError{ + err := RegexMatcherValidationError{ field: "EngineType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return RegexMatcherMultiError(errors) + } + return nil } +// RegexMatcherMultiError is an error wrapping multiple validation errors +// returned by RegexMatcher.ValidateAll() if the designated constraints aren't met. +type RegexMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatcherMultiError) AllErrors() []error { return m } + // RegexMatcherValidationError is the validation error returned by // RegexMatcher.Validate if the designated constraints aren't met. type RegexMatcherValidationError struct { @@ -136,13 +203,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RegexMatchAndSubstitute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatchAndSubstitute with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RegexMatchAndSubstituteMultiError, or nil if none found. +func (m *RegexMatchAndSubstitute) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatchAndSubstitute) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetPattern()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetPattern()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatchAndSubstituteValidationError{ + field: "Pattern", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatchAndSubstituteValidationError{ + field: "Pattern", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPattern()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RegexMatchAndSubstituteValidationError{ field: "Pattern", @@ -154,9 +254,30 @@ func (m *RegexMatchAndSubstitute) Validate() error { // no validation rules for Substitution + if len(errors) > 0 { + return RegexMatchAndSubstituteMultiError(errors) + } + return nil } +// RegexMatchAndSubstituteMultiError is an error wrapping multiple validation +// errors returned by RegexMatchAndSubstitute.ValidateAll() if the designated +// constraints aren't met. +type RegexMatchAndSubstituteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatchAndSubstituteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatchAndSubstituteMultiError) AllErrors() []error { return m } + // RegexMatchAndSubstituteValidationError is the validation error returned by // RegexMatchAndSubstitute.Validate if the designated constraints aren't met. type RegexMatchAndSubstituteValidationError struct { @@ -215,13 +336,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RegexMatcher_GoogleRE2) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatcher_GoogleRE2 with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RegexMatcher_GoogleRE2MultiError, or nil if none found. +func (m *RegexMatcher_GoogleRE2) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatcher_GoogleRE2) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxProgramSize()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxProgramSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ + field: "MaxProgramSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ + field: "MaxProgramSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxProgramSize()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RegexMatcher_GoogleRE2ValidationError{ field: "MaxProgramSize", @@ -231,9 +385,30 @@ func (m *RegexMatcher_GoogleRE2) Validate() error { } } + if len(errors) > 0 { + return RegexMatcher_GoogleRE2MultiError(errors) + } + return nil } +// RegexMatcher_GoogleRE2MultiError is an error wrapping multiple validation +// errors returned by RegexMatcher_GoogleRE2.ValidateAll() if the designated +// constraints aren't met. +type RegexMatcher_GoogleRE2MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatcher_GoogleRE2MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatcher_GoogleRE2MultiError) AllErrors() []error { return m } + // RegexMatcher_GoogleRE2ValidationError is the validation error returned by // RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met. type RegexMatcher_GoogleRE2ValidationError struct { diff --git a/pkg/api/envoy/type/matcher/string.pb.go b/pkg/api/envoy/type/matcher/string.pb.go index d292a093f9..30ca3a46fe 100644 --- a/pkg/api/envoy/type/matcher/string.pb.go +++ b/pkg/api/envoy/type/matcher/string.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/string.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a string. // [#next-free-field: 7] type StringMatcher struct { @@ -282,12 +277,15 @@ var file_envoy_type_matcher_string_proto_rawDesc = []byte{ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x42, 0x39, + 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x42, 0x74, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/string.pb.validate.go b/pkg/api/envoy/type/matcher/string.pb.validate.go index 4c3d5493b0..fe94c88d82 100644 --- a/pkg/api/envoy/type/matcher/string.pb.validate.go +++ b/pkg/api/envoy/type/matcher/string.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/string.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StringMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StringMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StringMatcherMultiError, or +// nil if none found. +func (m *StringMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StringMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for IgnoreCase switch m.MatchPattern.(type) { @@ -51,40 +67,75 @@ func (m *StringMatcher) Validate() error { case *StringMatcher_Prefix: if utf8.RuneCountInString(m.GetPrefix()) < 1 { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "Prefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *StringMatcher_Suffix: if utf8.RuneCountInString(m.GetSuffix()) < 1 { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "Suffix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *StringMatcher_Regex: if len(m.GetRegex()) > 1024 { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } + if !all { + return err + } + errors = append(errors, err) } case *StringMatcher_SafeRegex: if m.GetSafeRegex() == nil { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "SafeRegex", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSafeRegex()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringMatcherValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringMatcherValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StringMatcherValidationError{ field: "SafeRegex", @@ -95,16 +146,41 @@ func (m *StringMatcher) Validate() error { } default: - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return StringMatcherMultiError(errors) + } + return nil } +// StringMatcherMultiError is an error wrapping multiple validation errors +// returned by StringMatcher.ValidateAll() if the designated constraints +// aren't met. +type StringMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringMatcherMultiError) AllErrors() []error { return m } + // StringMatcherValidationError is the validation error returned by // StringMatcher.Validate if the designated constraints aren't met. type StringMatcherValidationError struct { @@ -160,24 +236,61 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ListStringMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListStringMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListStringMatcherMultiError, or nil if none found. +func (m *ListStringMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ListStringMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPatterns()) < 1 { - return ListStringMatcherValidationError{ + err := ListStringMatcherValidationError{ field: "Patterns", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPatterns() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListStringMatcherValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListStringMatcherValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListStringMatcherValidationError{ field: fmt.Sprintf("Patterns[%v]", idx), @@ -189,9 +302,30 @@ func (m *ListStringMatcher) Validate() error { } + if len(errors) > 0 { + return ListStringMatcherMultiError(errors) + } + return nil } +// ListStringMatcherMultiError is an error wrapping multiple validation errors +// returned by ListStringMatcher.ValidateAll() if the designated constraints +// aren't met. +type ListStringMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListStringMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListStringMatcherMultiError) AllErrors() []error { return m } + // ListStringMatcherValidationError is the validation error returned by // ListStringMatcher.Validate if the designated constraints aren't met. type ListStringMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/struct.pb.go b/pkg/api/envoy/type/matcher/struct.pb.go index 67fc755a92..327b944245 100644 --- a/pkg/api/envoy/type/matcher/struct.pb.go +++ b/pkg/api/envoy/type/matcher/struct.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/struct.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // StructMatcher provides a general interface to check if a given value is matched in // google.protobuf.Struct. It uses `path` to retrieve the value // from the struct and then check if it's matched to the specified value. @@ -228,11 +223,15 @@ var file_envoy_type_matcher_struct_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x39, 0x0a, 0x20, 0x69, 0x6f, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x74, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/struct.pb.validate.go b/pkg/api/envoy/type/matcher/struct.pb.validate.go index 6ca1db81ed..3fb899aad2 100644 --- a/pkg/api/envoy/type/matcher/struct.pb.validate.go +++ b/pkg/api/envoy/type/matcher/struct.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/struct.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StructMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StructMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StructMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StructMatcherMultiError, or +// nil if none found. +func (m *StructMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StructMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPath()) < 1 { - return StructMatcherValidationError{ + err := StructMatcherValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPath() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StructMatcherValidationError{ field: fmt.Sprintf("Path[%v]", idx), @@ -64,13 +103,36 @@ func (m *StructMatcher) Validate() error { } if m.GetValue() == nil { - return StructMatcherValidationError{ + err := StructMatcherValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StructMatcherValidationError{ field: "Value", @@ -80,9 +142,30 @@ func (m *StructMatcher) Validate() error { } } + if len(errors) > 0 { + return StructMatcherMultiError(errors) + } + return nil } +// StructMatcherMultiError is an error wrapping multiple validation errors +// returned by StructMatcher.ValidateAll() if the designated constraints +// aren't met. +type StructMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StructMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StructMatcherMultiError) AllErrors() []error { return m } + // StructMatcherValidationError is the validation error returned by // StructMatcher.Validate if the designated constraints aren't met. type StructMatcherValidationError struct { @@ -139,34 +222,77 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StructMatcher_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StructMatcher_PathSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StructMatcher_PathSegmentMultiError, or nil if none found. +func (m *StructMatcher_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *StructMatcher_PathSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Segment.(type) { case *StructMatcher_PathSegment_Key: if utf8.RuneCountInString(m.GetKey()) < 1 { - return StructMatcher_PathSegmentValidationError{ + err := StructMatcher_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } default: - return StructMatcher_PathSegmentValidationError{ + err := StructMatcher_PathSegmentValidationError{ field: "Segment", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return StructMatcher_PathSegmentMultiError(errors) + } + return nil } +// StructMatcher_PathSegmentMultiError is an error wrapping multiple validation +// errors returned by StructMatcher_PathSegment.ValidateAll() if the +// designated constraints aren't met. +type StructMatcher_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StructMatcher_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StructMatcher_PathSegmentMultiError) AllErrors() []error { return m } + // StructMatcher_PathSegmentValidationError is the validation error returned by // StructMatcher_PathSegment.Validate if the designated constraints aren't met. type StructMatcher_PathSegmentValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v3/http_inputs.pb.go b/pkg/api/envoy/type/matcher/v3/http_inputs.pb.go new file mode 100644 index 0000000000..4a808c3a7a --- /dev/null +++ b/pkg/api/envoy/type/matcher/v3/http_inputs.pb.go @@ -0,0 +1,383 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/type/matcher/v3/http_inputs.proto + +package matcherv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Match input indicates that matching should be done on a specific request header. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.request_headers] +type HttpRequestHeaderMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The request header to match on. + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` +} + +func (x *HttpRequestHeaderMatchInput) Reset() { + *x = HttpRequestHeaderMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpRequestHeaderMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpRequestHeaderMatchInput) ProtoMessage() {} + +func (x *HttpRequestHeaderMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpRequestHeaderMatchInput.ProtoReflect.Descriptor instead. +func (*HttpRequestHeaderMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0} +} + +func (x *HttpRequestHeaderMatchInput) GetHeaderName() string { + if x != nil { + return x.HeaderName + } + return "" +} + +// Match input indicates that matching should be done on a specific request trailer. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.request_trailers] +type HttpRequestTrailerMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The request trailer to match on. + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` +} + +func (x *HttpRequestTrailerMatchInput) Reset() { + *x = HttpRequestTrailerMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpRequestTrailerMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpRequestTrailerMatchInput) ProtoMessage() {} + +func (x *HttpRequestTrailerMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpRequestTrailerMatchInput.ProtoReflect.Descriptor instead. +func (*HttpRequestTrailerMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{1} +} + +func (x *HttpRequestTrailerMatchInput) GetHeaderName() string { + if x != nil { + return x.HeaderName + } + return "" +} + +// Match input indicating that matching should be done on a specific response header. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the response contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.response_headers] +type HttpResponseHeaderMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The response header to match on. + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` +} + +func (x *HttpResponseHeaderMatchInput) Reset() { + *x = HttpResponseHeaderMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpResponseHeaderMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpResponseHeaderMatchInput) ProtoMessage() {} + +func (x *HttpResponseHeaderMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpResponseHeaderMatchInput.ProtoReflect.Descriptor instead. +func (*HttpResponseHeaderMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{2} +} + +func (x *HttpResponseHeaderMatchInput) GetHeaderName() string { + if x != nil { + return x.HeaderName + } + return "" +} + +// Match input indicates that matching should be done on a specific response trailer. +// The resulting input string will be all headers for the given key joined by a comma, +// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input +// string will be 'bar,baz'. +// [#comment:TODO(snowp): Link to unified matching docs.] +// [#extension: envoy.matching.inputs.response_trailers] +type HttpResponseTrailerMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The response trailer to match on. + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` +} + +func (x *HttpResponseTrailerMatchInput) Reset() { + *x = HttpResponseTrailerMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpResponseTrailerMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpResponseTrailerMatchInput) ProtoMessage() {} + +func (x *HttpResponseTrailerMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpResponseTrailerMatchInput.ProtoReflect.Descriptor instead. +func (*HttpResponseTrailerMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{3} +} + +func (x *HttpResponseTrailerMatchInput) GetHeaderName() string { + if x != nil { + return x.HeaderName + } + return "" +} + +var File_envoy_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_v3_http_inputs_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x1b, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, + 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x1c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, + 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x1c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, + 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x4d, 0x0a, 0x1d, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, + 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x42, 0x88, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once + file_envoy_type_matcher_v3_http_inputs_proto_rawDescData = file_envoy_type_matcher_v3_http_inputs_proto_rawDesc +) + +func file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_http_inputs_proto_rawDescData) + }) + return file_envoy_type_matcher_v3_http_inputs_proto_rawDescData +} + +var file_envoy_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{ + (*HttpRequestHeaderMatchInput)(nil), // 0: envoy.type.matcher.v3.HttpRequestHeaderMatchInput + (*HttpRequestTrailerMatchInput)(nil), // 1: envoy.type.matcher.v3.HttpRequestTrailerMatchInput + (*HttpResponseHeaderMatchInput)(nil), // 2: envoy.type.matcher.v3.HttpResponseHeaderMatchInput + (*HttpResponseTrailerMatchInput)(nil), // 3: envoy.type.matcher.v3.HttpResponseTrailerMatchInput +} +var file_envoy_type_matcher_v3_http_inputs_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_v3_http_inputs_proto_init() } +func file_envoy_type_matcher_v3_http_inputs_proto_init() { + if File_envoy_type_matcher_v3_http_inputs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpRequestHeaderMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpRequestTrailerMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpResponseHeaderMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpResponseTrailerMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_v3_http_inputs_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_v3_http_inputs_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_v3_http_inputs_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_v3_http_inputs_proto_msgTypes, + }.Build() + File_envoy_type_matcher_v3_http_inputs_proto = out.File + file_envoy_type_matcher_v3_http_inputs_proto_rawDesc = nil + file_envoy_type_matcher_v3_http_inputs_proto_goTypes = nil + file_envoy_type_matcher_v3_http_inputs_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/type/matcher/v3/http_inputs.pb.validate.go b/pkg/api/envoy/type/matcher/v3/http_inputs.pb.validate.go new file mode 100644 index 0000000000..fbb0c51d1c --- /dev/null +++ b/pkg/api/envoy/type/matcher/v3/http_inputs.pb.validate.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/v3/http_inputs.proto + +package matcherv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HttpRequestHeaderMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HttpRequestHeaderMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpRequestHeaderMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpRequestHeaderMatchInputMultiError, or nil if none found. +func (m *HttpRequestHeaderMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpRequestHeaderMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if !_HttpRequestHeaderMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + err := HttpRequestHeaderMatchInputValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HttpRequestHeaderMatchInputMultiError(errors) + } + + return nil +} + +// HttpRequestHeaderMatchInputMultiError is an error wrapping multiple +// validation errors returned by HttpRequestHeaderMatchInput.ValidateAll() if +// the designated constraints aren't met. +type HttpRequestHeaderMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpRequestHeaderMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpRequestHeaderMatchInputMultiError) AllErrors() []error { return m } + +// HttpRequestHeaderMatchInputValidationError is the validation error returned +// by HttpRequestHeaderMatchInput.Validate if the designated constraints +// aren't met. +type HttpRequestHeaderMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpRequestHeaderMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpRequestHeaderMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpRequestHeaderMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpRequestHeaderMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpRequestHeaderMatchInputValidationError) ErrorName() string { + return "HttpRequestHeaderMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpRequestHeaderMatchInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpRequestHeaderMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpRequestHeaderMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpRequestHeaderMatchInputValidationError{} + +var _HttpRequestHeaderMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on HttpRequestTrailerMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HttpRequestTrailerMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpRequestTrailerMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpRequestTrailerMatchInputMultiError, or nil if none found. +func (m *HttpRequestTrailerMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpRequestTrailerMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if !_HttpRequestTrailerMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + err := HttpRequestTrailerMatchInputValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HttpRequestTrailerMatchInputMultiError(errors) + } + + return nil +} + +// HttpRequestTrailerMatchInputMultiError is an error wrapping multiple +// validation errors returned by HttpRequestTrailerMatchInput.ValidateAll() if +// the designated constraints aren't met. +type HttpRequestTrailerMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpRequestTrailerMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpRequestTrailerMatchInputMultiError) AllErrors() []error { return m } + +// HttpRequestTrailerMatchInputValidationError is the validation error returned +// by HttpRequestTrailerMatchInput.Validate if the designated constraints +// aren't met. +type HttpRequestTrailerMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpRequestTrailerMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpRequestTrailerMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpRequestTrailerMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpRequestTrailerMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpRequestTrailerMatchInputValidationError) ErrorName() string { + return "HttpRequestTrailerMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpRequestTrailerMatchInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpRequestTrailerMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpRequestTrailerMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpRequestTrailerMatchInputValidationError{} + +var _HttpRequestTrailerMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on HttpResponseHeaderMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HttpResponseHeaderMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpResponseHeaderMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HttpResponseHeaderMatchInputMultiError, or nil if none found. +func (m *HttpResponseHeaderMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpResponseHeaderMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if !_HttpResponseHeaderMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + err := HttpResponseHeaderMatchInputValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HttpResponseHeaderMatchInputMultiError(errors) + } + + return nil +} + +// HttpResponseHeaderMatchInputMultiError is an error wrapping multiple +// validation errors returned by HttpResponseHeaderMatchInput.ValidateAll() if +// the designated constraints aren't met. +type HttpResponseHeaderMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpResponseHeaderMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpResponseHeaderMatchInputMultiError) AllErrors() []error { return m } + +// HttpResponseHeaderMatchInputValidationError is the validation error returned +// by HttpResponseHeaderMatchInput.Validate if the designated constraints +// aren't met. +type HttpResponseHeaderMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpResponseHeaderMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpResponseHeaderMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpResponseHeaderMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpResponseHeaderMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpResponseHeaderMatchInputValidationError) ErrorName() string { + return "HttpResponseHeaderMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpResponseHeaderMatchInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpResponseHeaderMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpResponseHeaderMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpResponseHeaderMatchInputValidationError{} + +var _HttpResponseHeaderMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on HttpResponseTrailerMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HttpResponseTrailerMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpResponseTrailerMatchInput with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// HttpResponseTrailerMatchInputMultiError, or nil if none found. +func (m *HttpResponseTrailerMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpResponseTrailerMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if !_HttpResponseTrailerMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + err := HttpResponseTrailerMatchInputValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HttpResponseTrailerMatchInputMultiError(errors) + } + + return nil +} + +// HttpResponseTrailerMatchInputMultiError is an error wrapping multiple +// validation errors returned by HttpResponseTrailerMatchInput.ValidateAll() +// if the designated constraints aren't met. +type HttpResponseTrailerMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpResponseTrailerMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpResponseTrailerMatchInputMultiError) AllErrors() []error { return m } + +// HttpResponseTrailerMatchInputValidationError is the validation error +// returned by HttpResponseTrailerMatchInput.Validate if the designated +// constraints aren't met. +type HttpResponseTrailerMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpResponseTrailerMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpResponseTrailerMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpResponseTrailerMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpResponseTrailerMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpResponseTrailerMatchInputValidationError) ErrorName() string { + return "HttpResponseTrailerMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpResponseTrailerMatchInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHttpResponseTrailerMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpResponseTrailerMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpResponseTrailerMatchInputValidationError{} + +var _HttpResponseTrailerMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/pkg/api/envoy/type/matcher/v3/metadata.pb.go b/pkg/api/envoy/type/matcher/v3/metadata.pb.go index 79e02f7f7c..73d409244b 100644 --- a/pkg/api/envoy/type/matcher/v3/metadata.pb.go +++ b/pkg/api/envoy/type/matcher/v3/metadata.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/metadata.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // [#next-major-version: MetadataMatcher should use StructMatcher] type MetadataMatcher struct { state protoimpl.MessageState @@ -39,6 +34,8 @@ type MetadataMatcher struct { Path []*MetadataMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` // The MetadataMatcher is matched if the value retrieved by path is matched to this value. Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // If true, the match result will be inverted. + Invert bool `protobuf:"varint,4,opt,name=invert,proto3" json:"invert,omitempty"` } func (x *MetadataMatcher) Reset() { @@ -94,6 +91,13 @@ func (x *MetadataMatcher) GetValue() *ValueMatcher { return nil } +func (x *MetadataMatcher) GetInvert() bool { + if x != nil { + return x.Invert + } + return false +} + // Specifies the segment in a path to retrieve value from Metadata. // Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that // if the segment key refers to a list, it has to be the last segment in a path. @@ -178,7 +182,7 @@ var file_envoy_type_matcher_v3_metadata_proto_rawDesc = []byte{ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x02, 0x0a, 0x0f, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, @@ -191,21 +195,27 @@ var file_envoy_type_matcher_v3_metadata_proto_rawDesc = []byte{ 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x71, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, - 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, - 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x3e, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x1a, + 0x71, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, + 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x86, 0x01, + 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/v3/metadata.pb.validate.go b/pkg/api/envoy/type/matcher/v3/metadata.pb.validate.go index caef318b6a..a8a6e84894 100644 --- a/pkg/api/envoy/type/matcher/v3/metadata.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/metadata.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MetadataMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *MetadataMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataMatcherMultiError, or nil if none found. +func (m *MetadataMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetFilter()) < 1 { - return MetadataMatcherValidationError{ + err := MetadataMatcherValidationError{ field: "Filter", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetPath()) < 1 { - return MetadataMatcherValidationError{ + err := MetadataMatcherValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPath() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataMatcherValidationError{ field: fmt.Sprintf("Path[%v]", idx), @@ -71,13 +114,36 @@ func (m *MetadataMatcher) Validate() error { } if m.GetValue() == nil { - return MetadataMatcherValidationError{ + err := MetadataMatcherValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataMatcherValidationError{ field: "Value", @@ -87,9 +153,32 @@ func (m *MetadataMatcher) Validate() error { } } + // no validation rules for Invert + + if len(errors) > 0 { + return MetadataMatcherMultiError(errors) + } + return nil } +// MetadataMatcherMultiError is an error wrapping multiple validation errors +// returned by MetadataMatcher.ValidateAll() if the designated constraints +// aren't met. +type MetadataMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMatcherMultiError) AllErrors() []error { return m } + // MetadataMatcherValidationError is the validation error returned by // MetadataMatcher.Validate if the designated constraints aren't met. type MetadataMatcherValidationError struct { @@ -146,34 +235,77 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataMatcher_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataMatcher_PathSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataMatcher_PathSegmentMultiError, or nil if none found. +func (m *MetadataMatcher_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataMatcher_PathSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Segment.(type) { case *MetadataMatcher_PathSegment_Key: if utf8.RuneCountInString(m.GetKey()) < 1 { - return MetadataMatcher_PathSegmentValidationError{ + err := MetadataMatcher_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } default: - return MetadataMatcher_PathSegmentValidationError{ + err := MetadataMatcher_PathSegmentValidationError{ field: "Segment", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MetadataMatcher_PathSegmentMultiError(errors) } return nil } +// MetadataMatcher_PathSegmentMultiError is an error wrapping multiple +// validation errors returned by MetadataMatcher_PathSegment.ValidateAll() if +// the designated constraints aren't met. +type MetadataMatcher_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMatcher_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMatcher_PathSegmentMultiError) AllErrors() []error { return m } + // MetadataMatcher_PathSegmentValidationError is the validation error returned // by MetadataMatcher_PathSegment.Validate if the designated constraints // aren't met. diff --git a/pkg/api/envoy/type/matcher/v3/node.pb.go b/pkg/api/envoy/type/matcher/v3/node.pb.go index cad61928b7..fb6a3672c0 100644 --- a/pkg/api/envoy/type/matcher/v3/node.pb.go +++ b/pkg/api/envoy/type/matcher/v3/node.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/node.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a Node. // The match follows AND semantics. type NodeMatcher struct { @@ -112,11 +107,16 @@ var file_envoy_type_matcher_v3_node_proto_rawDesc = []byte{ 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x3a, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x4e, - 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x82, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, + 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/v3/node.pb.validate.go b/pkg/api/envoy/type/matcher/v3/node.pb.validate.go index b086cd798f..fb9b77f213 100644 --- a/pkg/api/envoy/type/matcher/v3/node.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/node.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/node.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on NodeMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *NodeMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NodeMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in NodeMatcherMultiError, or +// nil if none found. +func (m *NodeMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *NodeMatcher) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetNodeId()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetNodeId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: "NodeId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: "NodeId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNodeId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeMatcherValidationError{ field: "NodeId", @@ -54,7 +89,26 @@ func (m *NodeMatcher) Validate() error { for idx, item := range m.GetNodeMetadatas() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: fmt.Sprintf("NodeMetadatas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: fmt.Sprintf("NodeMetadatas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeMatcherValidationError{ field: fmt.Sprintf("NodeMetadatas[%v]", idx), @@ -66,9 +120,29 @@ func (m *NodeMatcher) Validate() error { } + if len(errors) > 0 { + return NodeMatcherMultiError(errors) + } + return nil } +// NodeMatcherMultiError is an error wrapping multiple validation errors +// returned by NodeMatcher.ValidateAll() if the designated constraints aren't met. +type NodeMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NodeMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NodeMatcherMultiError) AllErrors() []error { return m } + // NodeMatcherValidationError is the validation error returned by // NodeMatcher.Validate if the designated constraints aren't met. type NodeMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v3/number.pb.go b/pkg/api/envoy/type/matcher/v3/number.pb.go index 9945b00285..6469f08481 100644 --- a/pkg/api/envoy/type/matcher/v3/number.pb.go +++ b/pkg/api/envoy/type/matcher/v3/number.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/number.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a double value. type DoubleMatcher struct { state protoimpl.MessageState @@ -135,12 +130,16 @@ var file_envoy_type_matcher_v3_number_proto_rawDesc = []byte{ 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3c, - 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x84, + 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/v3/number.pb.validate.go b/pkg/api/envoy/type/matcher/v3/number.pb.validate.go index 2b29ac9aca..743399dfe6 100644 --- a/pkg/api/envoy/type/matcher/v3/number.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/number.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/number.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on DoubleMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DoubleMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DoubleMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DoubleMatcherMultiError, or +// nil if none found. +func (m *DoubleMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *DoubleMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.MatchPattern.(type) { case *DoubleMatcher_Range: - if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DoubleMatcherValidationError{ + field: "Range", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DoubleMatcherValidationError{ + field: "Range", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DoubleMatcherValidationError{ field: "Range", @@ -59,16 +94,41 @@ func (m *DoubleMatcher) Validate() error { // no validation rules for Exact default: - return DoubleMatcherValidationError{ + err := DoubleMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return DoubleMatcherMultiError(errors) } return nil } +// DoubleMatcherMultiError is an error wrapping multiple validation errors +// returned by DoubleMatcher.ValidateAll() if the designated constraints +// aren't met. +type DoubleMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DoubleMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DoubleMatcherMultiError) AllErrors() []error { return m } + // DoubleMatcherValidationError is the validation error returned by // DoubleMatcher.Validate if the designated constraints aren't met. type DoubleMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v3/path.pb.go b/pkg/api/envoy/type/matcher/v3/path.pb.go index fe701c7209..77db56245d 100644 --- a/pkg/api/envoy/type/matcher/v3/path.pb.go +++ b/pkg/api/envoy/type/matcher/v3/path.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/path.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a path on HTTP request. type PathMatcher struct { state protoimpl.MessageState @@ -120,11 +115,15 @@ var file_envoy_type_matcher_v3_path_proto_rawDesc = []byte{ 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x42, 0x3a, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x50, 0x61, 0x74, 0x68, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x01, 0x42, 0x82, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x50, 0x61, 0x74, 0x68, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/v3/path.pb.validate.go b/pkg/api/envoy/type/matcher/v3/path.pb.validate.go index ad770b38d8..ad61109181 100644 --- a/pkg/api/envoy/type/matcher/v3/path.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/path.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/path.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,29 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on PathMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *PathMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PathMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PathMatcherMultiError, or +// nil if none found. +func (m *PathMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *PathMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Rule.(type) { case *PathMatcher_Path: if m.GetPath() == nil { - return PathMatcherValidationError{ + err := PathMatcherValidationError{ field: "Path", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPath()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PathMatcherValidationError{ + field: "Path", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PathMatcherValidationError{ + field: "Path", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPath()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PathMatcherValidationError{ field: "Path", @@ -63,16 +102,40 @@ func (m *PathMatcher) Validate() error { } default: - return PathMatcherValidationError{ + err := PathMatcherValidationError{ field: "Rule", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return PathMatcherMultiError(errors) } return nil } +// PathMatcherMultiError is an error wrapping multiple validation errors +// returned by PathMatcher.ValidateAll() if the designated constraints aren't met. +type PathMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathMatcherMultiError) AllErrors() []error { return m } + // PathMatcherValidationError is the validation error returned by // PathMatcher.Validate if the designated constraints aren't met. type PathMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v3/regex.pb.go b/pkg/api/envoy/type/matcher/v3/regex.pb.go index fe829573c0..adaddbec86 100644 --- a/pkg/api/envoy/type/matcher/v3/regex.pb.go +++ b/pkg/api/envoy/type/matcher/v3/regex.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/regex.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // A regex matcher designed for safety when used with untrusted input. type RegexMatcher struct { state protoimpl.MessageState @@ -37,7 +33,8 @@ type RegexMatcher struct { // Types that are assignable to EngineType: // *RegexMatcher_GoogleRe2 EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` - // The regex match string. The string must be supported by the configured engine. + // The regex match string. The string must be supported by the configured engine. The regex is matched + // against the full string, not as a partial match. Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` } @@ -206,6 +203,12 @@ type RegexMatcher_GoogleRE2 struct { // This field is deprecated; regexp validation should be performed on the management server // instead of being done by each individual client. // + // .. note:: + // + // Although this field is deprecated, the program size will still be checked against the + // global ``re2.max_program_size.error_level`` runtime value. + // + // // Deprecated: Do not use. MaxProgramSize *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_program_size,json=maxProgramSize,proto3" json:"max_program_size,omitempty"` } @@ -258,50 +261,57 @@ var file_envoy_type_matcher_v3_regex_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, - 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, - 0x89, 0x01, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x12, 0x4a, 0x0a, - 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x02, 0x0a, 0x0c, 0x52, + 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, + 0x65, 0x67, 0x65, 0x78, 0x1a, 0x92, 0x01, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, + 0x45, 0x32, 0x12, 0x53, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, + 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x3a, 0x26, 0x9a, 0xc5, 0x88, - 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x42, 0x12, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb9, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, - 0x75, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x22, 0x0a, 0x0c, - 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, - 0x75, 0x74, 0x65, 0x42, 0x3b, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x42, 0x12, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb9, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, + 0x65, 0x12, 0x47, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, + 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x31, + 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, + 0x65, 0x42, 0x83, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/v3/regex.pb.validate.go b/pkg/api/envoy/type/matcher/v3/regex.pb.validate.go index 467052c984..4baa8656ff 100644 --- a/pkg/api/envoy/type/matcher/v3/regex.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/regex.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/regex.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,41 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on RegexMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *RegexMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RegexMatcherMultiError, or +// nil if none found. +func (m *RegexMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetRegex()) < 1 { - return RegexMatcherValidationError{ + err := RegexMatcherValidationError{ field: "Regex", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.EngineType.(type) { @@ -53,13 +73,36 @@ func (m *RegexMatcher) Validate() error { case *RegexMatcher_GoogleRe2: if m.GetGoogleRe2() == nil { - return RegexMatcherValidationError{ + err := RegexMatcherValidationError{ field: "GoogleRe2", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetGoogleRe2()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RegexMatcherValidationError{ field: "GoogleRe2", @@ -70,16 +113,40 @@ func (m *RegexMatcher) Validate() error { } default: - return RegexMatcherValidationError{ + err := RegexMatcherValidationError{ field: "EngineType", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return RegexMatcherMultiError(errors) + } + return nil } +// RegexMatcherMultiError is an error wrapping multiple validation errors +// returned by RegexMatcher.ValidateAll() if the designated constraints aren't met. +type RegexMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatcherMultiError) AllErrors() []error { return m } + // RegexMatcherValidationError is the validation error returned by // RegexMatcher.Validate if the designated constraints aren't met. type RegexMatcherValidationError struct { @@ -136,20 +203,57 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RegexMatchAndSubstitute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatchAndSubstitute with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RegexMatchAndSubstituteMultiError, or nil if none found. +func (m *RegexMatchAndSubstitute) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatchAndSubstitute) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetPattern() == nil { - return RegexMatchAndSubstituteValidationError{ + err := RegexMatchAndSubstituteValidationError{ field: "Pattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetPattern()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetPattern()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatchAndSubstituteValidationError{ + field: "Pattern", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatchAndSubstituteValidationError{ + field: "Pattern", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPattern()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RegexMatchAndSubstituteValidationError{ field: "Pattern", @@ -161,9 +265,30 @@ func (m *RegexMatchAndSubstitute) Validate() error { // no validation rules for Substitution + if len(errors) > 0 { + return RegexMatchAndSubstituteMultiError(errors) + } + return nil } +// RegexMatchAndSubstituteMultiError is an error wrapping multiple validation +// errors returned by RegexMatchAndSubstitute.ValidateAll() if the designated +// constraints aren't met. +type RegexMatchAndSubstituteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatchAndSubstituteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatchAndSubstituteMultiError) AllErrors() []error { return m } + // RegexMatchAndSubstituteValidationError is the validation error returned by // RegexMatchAndSubstitute.Validate if the designated constraints aren't met. type RegexMatchAndSubstituteValidationError struct { @@ -222,13 +347,46 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *RegexMatcher_GoogleRE2) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatcher_GoogleRE2 with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RegexMatcher_GoogleRE2MultiError, or nil if none found. +func (m *RegexMatcher_GoogleRE2) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatcher_GoogleRE2) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetMaxProgramSize()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetMaxProgramSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ + field: "MaxProgramSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ + field: "MaxProgramSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxProgramSize()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RegexMatcher_GoogleRE2ValidationError{ field: "MaxProgramSize", @@ -238,9 +396,30 @@ func (m *RegexMatcher_GoogleRE2) Validate() error { } } + if len(errors) > 0 { + return RegexMatcher_GoogleRE2MultiError(errors) + } + return nil } +// RegexMatcher_GoogleRE2MultiError is an error wrapping multiple validation +// errors returned by RegexMatcher_GoogleRE2.ValidateAll() if the designated +// constraints aren't met. +type RegexMatcher_GoogleRE2MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatcher_GoogleRE2MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatcher_GoogleRE2MultiError) AllErrors() []error { return m } + // RegexMatcher_GoogleRE2ValidationError is the validation error returned by // RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met. type RegexMatcher_GoogleRE2ValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v3/string.pb.go b/pkg/api/envoy/type/matcher/v3/string.pb.go index dd158b8d6e..e04f1457ea 100644 --- a/pkg/api/envoy/type/matcher/v3/string.pb.go +++ b/pkg/api/envoy/type/matcher/v3/string.pb.go @@ -1,16 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/string.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a string. // [#next-free-field: 8] type StringMatcher struct { @@ -41,10 +35,9 @@ type StringMatcher struct { // *StringMatcher_Suffix // *StringMatcher_SafeRegex // *StringMatcher_Contains - // *StringMatcher_HiddenEnvoyDeprecatedRegex MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` - // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no - // effect for the safe_regex match. + // If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This + // has no effect for the safe_regex match. // For example, the matcher *data* will match both input string *Data* and *data* if set to true. IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` } @@ -123,14 +116,6 @@ func (x *StringMatcher) GetContains() string { return "" } -// Deprecated: Do not use. -func (x *StringMatcher) GetHiddenEnvoyDeprecatedRegex() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_HiddenEnvoyDeprecatedRegex); ok { - return x.HiddenEnvoyDeprecatedRegex - } - return "" -} - func (x *StringMatcher) GetIgnoreCase() bool { if x != nil { return x.IgnoreCase @@ -186,11 +171,6 @@ type StringMatcher_Contains struct { Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` } -type StringMatcher_HiddenEnvoyDeprecatedRegex struct { - // Deprecated: Do not use. - HiddenEnvoyDeprecatedRegex string `protobuf:"bytes,4,opt,name=hidden_envoy_deprecated_regex,json=hiddenEnvoyDeprecatedRegex,proto3,oneof"` -} - func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} @@ -201,8 +181,6 @@ func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {} -func (*StringMatcher_HiddenEnvoyDeprecatedRegex) isStringMatcher_MatchPattern() {} - // Specifies a list of ways to match a string. type ListStringMatcher struct { state protoimpl.MessageState @@ -259,55 +237,52 @@ var file_envoy_type_matcher_v3_string_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, - 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, - 0x03, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x06, 0x73, - 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x4e, - 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x25, - 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x1d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, - 0x52, 0x1a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x3a, 0x27, 0x9a, - 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x8c, 0x01, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x3a, 0x2b, - 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x3c, 0x0a, 0x23, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x02, 0x0a, 0x0d, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x65, + 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, + 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, + 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x61, 0x66, + 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, + 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, + 0x65, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0x8c, 0x01, + 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x3a, + 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x84, 0x01, 0x0a, + 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -376,7 +351,6 @@ func file_envoy_type_matcher_v3_string_proto_init() { (*StringMatcher_Suffix)(nil), (*StringMatcher_SafeRegex)(nil), (*StringMatcher_Contains)(nil), - (*StringMatcher_HiddenEnvoyDeprecatedRegex)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/api/envoy/type/matcher/v3/string.pb.validate.go b/pkg/api/envoy/type/matcher/v3/string.pb.validate.go index 1f3c183ede..f3c2490f6e 100644 --- a/pkg/api/envoy/type/matcher/v3/string.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/string.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/string.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,17 +31,32 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StringMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StringMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StringMatcherMultiError, or +// nil if none found. +func (m *StringMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StringMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for IgnoreCase switch m.MatchPattern.(type) { @@ -51,31 +67,62 @@ func (m *StringMatcher) Validate() error { case *StringMatcher_Prefix: if utf8.RuneCountInString(m.GetPrefix()) < 1 { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "Prefix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *StringMatcher_Suffix: if utf8.RuneCountInString(m.GetSuffix()) < 1 { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "Suffix", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } case *StringMatcher_SafeRegex: if m.GetSafeRegex() == nil { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "SafeRegex", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSafeRegex()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringMatcherValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringMatcherValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StringMatcherValidationError{ field: "SafeRegex", @@ -88,32 +135,52 @@ func (m *StringMatcher) Validate() error { case *StringMatcher_Contains: if utf8.RuneCountInString(m.GetContains()) < 1 { - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "Contains", reason: "value length must be at least 1 runes", } - } - - case *StringMatcher_HiddenEnvoyDeprecatedRegex: - - if len(m.GetHiddenEnvoyDeprecatedRegex()) > 1024 { - return StringMatcherValidationError{ - field: "HiddenEnvoyDeprecatedRegex", - reason: "value length must be at most 1024 bytes", + if !all { + return err } + errors = append(errors, err) } default: - return StringMatcherValidationError{ + err := StringMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return StringMatcherMultiError(errors) + } + return nil } +// StringMatcherMultiError is an error wrapping multiple validation errors +// returned by StringMatcher.ValidateAll() if the designated constraints +// aren't met. +type StringMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringMatcherMultiError) AllErrors() []error { return m } + // StringMatcherValidationError is the validation error returned by // StringMatcher.Validate if the designated constraints aren't met. type StringMatcherValidationError struct { @@ -169,24 +236,61 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *ListStringMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListStringMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListStringMatcherMultiError, or nil if none found. +func (m *ListStringMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ListStringMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPatterns()) < 1 { - return ListStringMatcherValidationError{ + err := ListStringMatcherValidationError{ field: "Patterns", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPatterns() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListStringMatcherValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListStringMatcherValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListStringMatcherValidationError{ field: fmt.Sprintf("Patterns[%v]", idx), @@ -198,9 +302,30 @@ func (m *ListStringMatcher) Validate() error { } + if len(errors) > 0 { + return ListStringMatcherMultiError(errors) + } + return nil } +// ListStringMatcherMultiError is an error wrapping multiple validation errors +// returned by ListStringMatcher.ValidateAll() if the designated constraints +// aren't met. +type ListStringMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListStringMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListStringMatcherMultiError) AllErrors() []error { return m } + // ListStringMatcherValidationError is the validation error returned by // ListStringMatcher.Validate if the designated constraints aren't met. type ListStringMatcherValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v3/struct.pb.go b/pkg/api/envoy/type/matcher/v3/struct.pb.go index ea3fd7b6e2..d0a4b770f8 100644 --- a/pkg/api/envoy/type/matcher/v3/struct.pb.go +++ b/pkg/api/envoy/type/matcher/v3/struct.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/struct.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // StructMatcher provides a general interface to check if a given value is matched in // google.protobuf.Struct. It uses `path` to retrieve the value // from the struct and then check if it's matched to the specified value. @@ -237,11 +232,16 @@ var file_envoy_type_matcher_v3_struct_proto_rawDesc = []byte{ 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x3c, 0x0a, 0x23, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x84, 0x01, 0x0a, 0x23, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/v3/struct.pb.validate.go b/pkg/api/envoy/type/matcher/v3/struct.pb.validate.go index 54050eb1df..84939bb091 100644 --- a/pkg/api/envoy/type/matcher/v3/struct.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/struct.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/struct.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,66 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on StructMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *StructMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StructMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StructMatcherMultiError, or +// nil if none found. +func (m *StructMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StructMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetPath()) < 1 { - return StructMatcherValidationError{ + err := StructMatcherValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPath() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StructMatcherValidationError{ field: fmt.Sprintf("Path[%v]", idx), @@ -64,13 +103,36 @@ func (m *StructMatcher) Validate() error { } if m.GetValue() == nil { - return StructMatcherValidationError{ + err := StructMatcherValidationError{ field: "Value", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } - if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StructMatcherValidationError{ field: "Value", @@ -80,9 +142,30 @@ func (m *StructMatcher) Validate() error { } } + if len(errors) > 0 { + return StructMatcherMultiError(errors) + } + return nil } +// StructMatcherMultiError is an error wrapping multiple validation errors +// returned by StructMatcher.ValidateAll() if the designated constraints +// aren't met. +type StructMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StructMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StructMatcherMultiError) AllErrors() []error { return m } + // StructMatcherValidationError is the validation error returned by // StructMatcher.Validate if the designated constraints aren't met. type StructMatcherValidationError struct { @@ -139,34 +222,77 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *StructMatcher_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StructMatcher_PathSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StructMatcher_PathSegmentMultiError, or nil if none found. +func (m *StructMatcher_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *StructMatcher_PathSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Segment.(type) { case *StructMatcher_PathSegment_Key: if utf8.RuneCountInString(m.GetKey()) < 1 { - return StructMatcher_PathSegmentValidationError{ + err := StructMatcher_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } default: - return StructMatcher_PathSegmentValidationError{ + err := StructMatcher_PathSegmentValidationError{ field: "Segment", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return StructMatcher_PathSegmentMultiError(errors) + } + return nil } +// StructMatcher_PathSegmentMultiError is an error wrapping multiple validation +// errors returned by StructMatcher_PathSegment.ValidateAll() if the +// designated constraints aren't met. +type StructMatcher_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StructMatcher_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StructMatcher_PathSegmentMultiError) AllErrors() []error { return m } + // StructMatcher_PathSegmentValidationError is the validation error returned by // StructMatcher_PathSegment.Validate if the designated constraints aren't met. type StructMatcher_PathSegmentValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v3/value.pb.go b/pkg/api/envoy/type/matcher/v3/value.pb.go index 63bbc8c767..a17496d816 100644 --- a/pkg/api/envoy/type/matcher/v3/value.pb.go +++ b/pkg/api/envoy/type/matcher/v3/value.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/v3/value.proto -package envoy_type_matcher_v3 +package matcherv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. // StructValue is not supported and is always not matched. // [#next-free-field: 7] @@ -344,11 +339,16 @@ var file_envoy_type_matcher_v3_value_proto_rawDesc = []byte{ 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3b, 0x0a, 0x23, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x42, 0x0a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x83, 0x01, 0x0a, 0x23, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x0a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/v3/value.pb.validate.go b/pkg/api/envoy/type/matcher/v3/value.pb.validate.go index 62542ad9d3..d135b1175e 100644 --- a/pkg/api/envoy/type/matcher/v3/value.pb.validate.go +++ b/pkg/api/envoy/type/matcher/v3/value.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/v3/value.proto -package envoy_type_matcher_v3 +package matcherv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ValueMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ValueMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ValueMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ValueMatcherMultiError, or +// nil if none found. +func (m *ValueMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ValueMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.MatchPattern.(type) { case *ValueMatcher_NullMatch_: - if v, ok := interface{}(m.GetNullMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNullMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "NullMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "NullMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNullMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "NullMatch", @@ -57,7 +92,26 @@ func (m *ValueMatcher) Validate() error { case *ValueMatcher_DoubleMatch: - if v, ok := interface{}(m.GetDoubleMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDoubleMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "DoubleMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "DoubleMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDoubleMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "DoubleMatch", @@ -69,7 +123,26 @@ func (m *ValueMatcher) Validate() error { case *ValueMatcher_StringMatch: - if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStringMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "StringMatch", @@ -87,7 +160,26 @@ func (m *ValueMatcher) Validate() error { case *ValueMatcher_ListMatch: - if v, ok := interface{}(m.GetListMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "ListMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "ListMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "ListMatch", @@ -98,16 +190,40 @@ func (m *ValueMatcher) Validate() error { } default: - return ValueMatcherValidationError{ + err := ValueMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ValueMatcherMultiError(errors) + } + return nil } +// ValueMatcherMultiError is an error wrapping multiple validation errors +// returned by ValueMatcher.ValidateAll() if the designated constraints aren't met. +type ValueMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ValueMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ValueMatcherMultiError) AllErrors() []error { return m } + // ValueMatcherValidationError is the validation error returned by // ValueMatcher.Validate if the designated constraints aren't met. type ValueMatcherValidationError struct { @@ -163,18 +279,51 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListMatcherMultiError, or +// nil if none found. +func (m *ListMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ListMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.MatchPattern.(type) { case *ListMatcher_OneOf: - if v, ok := interface{}(m.GetOneOf()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOneOf()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListMatcherValidationError{ + field: "OneOf", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListMatcherValidationError{ + field: "OneOf", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOneOf()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListMatcherValidationError{ field: "OneOf", @@ -185,16 +334,40 @@ func (m *ListMatcher) Validate() error { } default: - return ListMatcherValidationError{ + err := ListMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ListMatcherMultiError(errors) + } + return nil } +// ListMatcherMultiError is an error wrapping multiple validation errors +// returned by ListMatcher.ValidateAll() if the designated constraints aren't met. +type ListMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListMatcherMultiError) AllErrors() []error { return m } + // ListMatcherValidationError is the validation error returned by // ListMatcher.Validate if the designated constraints aren't met. type ListMatcherValidationError struct { @@ -251,15 +424,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ValueMatcher_NullMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ValueMatcher_NullMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ValueMatcher_NullMatchMultiError, or nil if none found. +func (m *ValueMatcher_NullMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *ValueMatcher_NullMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return ValueMatcher_NullMatchMultiError(errors) + } + return nil } +// ValueMatcher_NullMatchMultiError is an error wrapping multiple validation +// errors returned by ValueMatcher_NullMatch.ValidateAll() if the designated +// constraints aren't met. +type ValueMatcher_NullMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ValueMatcher_NullMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ValueMatcher_NullMatchMultiError) AllErrors() []error { return m } + // ValueMatcher_NullMatchValidationError is the validation error returned by // ValueMatcher_NullMatch.Validate if the designated constraints aren't met. type ValueMatcher_NullMatchValidationError struct { diff --git a/pkg/api/envoy/type/matcher/v4alpha/metadata.pb.go b/pkg/api/envoy/type/matcher/v4alpha/metadata.pb.go deleted file mode 100644 index ffeaa4adbe..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/metadata.pb.go +++ /dev/null @@ -1,295 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/metadata.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-major-version: MetadataMatcher should use StructMatcher] -type MetadataMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The filter name to retrieve the Struct from the Metadata. - Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // The path to retrieve the Value from the Struct. - Path []*MetadataMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` - // The MetadataMatcher is matched if the value retrieved by path is matched to this value. - Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *MetadataMatcher) Reset() { - *x = MetadataMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataMatcher) ProtoMessage() {} - -func (x *MetadataMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataMatcher.ProtoReflect.Descriptor instead. -func (*MetadataMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_metadata_proto_rawDescGZIP(), []int{0} -} - -func (x *MetadataMatcher) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *MetadataMatcher) GetPath() []*MetadataMatcher_PathSegment { - if x != nil { - return x.Path - } - return nil -} - -func (x *MetadataMatcher) GetValue() *ValueMatcher { - if x != nil { - return x.Value - } - return nil -} - -// Specifies the segment in a path to retrieve value from Metadata. -// Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that -// if the segment key refers to a list, it has to be the last segment in a path. -type MetadataMatcher_PathSegment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Segment: - // *MetadataMatcher_PathSegment_Key - Segment isMetadataMatcher_PathSegment_Segment `protobuf_oneof:"segment"` -} - -func (x *MetadataMatcher_PathSegment) Reset() { - *x = MetadataMatcher_PathSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataMatcher_PathSegment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataMatcher_PathSegment) ProtoMessage() {} - -func (x *MetadataMatcher_PathSegment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataMatcher_PathSegment.ProtoReflect.Descriptor instead. -func (*MetadataMatcher_PathSegment) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_metadata_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *MetadataMatcher_PathSegment) GetSegment() isMetadataMatcher_PathSegment_Segment { - if m != nil { - return m.Segment - } - return nil -} - -func (x *MetadataMatcher_PathSegment) GetKey() string { - if x, ok := x.GetSegment().(*MetadataMatcher_PathSegment_Key); ok { - return x.Key - } - return "" -} - -type isMetadataMatcher_PathSegment_Segment interface { - isMetadataMatcher_PathSegment_Segment() -} - -type MetadataMatcher_PathSegment_Key struct { - // If specified, use the key to retrieve the value in a Struct. - Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` -} - -func (*MetadataMatcher_PathSegment_Key) isMetadataMatcher_PathSegment_Segment() {} - -var File_envoy_type_matcher_v4alpha_metadata_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_metadata_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x02, 0x0a, 0x0f, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1f, - 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x55, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x1a, 0x74, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x38, 0x9a, 0xc5, - 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x42, 0x43, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_metadata_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_metadata_proto_rawDescData = file_envoy_type_matcher_v4alpha_metadata_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_metadata_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_metadata_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_metadata_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_metadata_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_matcher_v4alpha_metadata_proto_goTypes = []interface{}{ - (*MetadataMatcher)(nil), // 0: envoy.type.matcher.v4alpha.MetadataMatcher - (*MetadataMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v4alpha.MetadataMatcher.PathSegment - (*ValueMatcher)(nil), // 2: envoy.type.matcher.v4alpha.ValueMatcher -} -var file_envoy_type_matcher_v4alpha_metadata_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v4alpha.MetadataMatcher.path:type_name -> envoy.type.matcher.v4alpha.MetadataMatcher.PathSegment - 2, // 1: envoy.type.matcher.v4alpha.MetadataMatcher.value:type_name -> envoy.type.matcher.v4alpha.ValueMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_metadata_proto_init() } -func file_envoy_type_matcher_v4alpha_metadata_proto_init() { - if File_envoy_type_matcher_v4alpha_metadata_proto != nil { - return - } - file_envoy_type_matcher_v4alpha_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataMatcher_PathSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*MetadataMatcher_PathSegment_Key)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_metadata_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_metadata_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_metadata_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_metadata_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_metadata_proto = out.File - file_envoy_type_matcher_v4alpha_metadata_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_metadata_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_metadata_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/metadata.pb.validate.go b/pkg/api/envoy/type/matcher/v4alpha/metadata.pb.validate.go deleted file mode 100644 index 334b0b91a5..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/metadata.pb.validate.go +++ /dev/null @@ -1,232 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/metadata.proto - -package envoy_type_matcher_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetFilter()) < 1 { - return MetadataMatcherValidationError{ - field: "Filter", - reason: "value length must be at least 1 runes", - } - } - - 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 utf8.RuneCountInString(m.GetKey()) < 1 { - return MetadataMatcher_PathSegmentValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - } - - 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/pkg/api/envoy/type/matcher/v4alpha/node.pb.go b/pkg/api/envoy/type/matcher/v4alpha/node.pb.go deleted file mode 100644 index a931845bd9..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/node.pb.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/node.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a Node. -// The match follows AND semantics. -type NodeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies match criteria on the node id. - NodeId *StringMatcher `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // Specifies match criteria on the node metadata. - NodeMetadatas []*StructMatcher `protobuf:"bytes,2,rep,name=node_metadatas,json=nodeMetadatas,proto3" json:"node_metadatas,omitempty"` -} - -func (x *NodeMatcher) Reset() { - *x = NodeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_node_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeMatcher) ProtoMessage() {} - -func (x *NodeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_node_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeMatcher.ProtoReflect.Descriptor instead. -func (*NodeMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_node_proto_rawDescGZIP(), []int{0} -} - -func (x *NodeMatcher) GetNodeId() *StringMatcher { - if x != nil { - return x.NodeId - } - return nil -} - -func (x *NodeMatcher) GetNodeMetadatas() []*StructMatcher { - if x != nil { - return x.NodeMetadatas - } - return nil -} - -var File_envoy_type_matcher_v4alpha_node_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_node_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x0e, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, - 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x3a, 0x28, 0x9a, - 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x3f, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_node_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_node_proto_rawDescData = file_envoy_type_matcher_v4alpha_node_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_node_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_node_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_node_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_node_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_matcher_v4alpha_node_proto_goTypes = []interface{}{ - (*NodeMatcher)(nil), // 0: envoy.type.matcher.v4alpha.NodeMatcher - (*StringMatcher)(nil), // 1: envoy.type.matcher.v4alpha.StringMatcher - (*StructMatcher)(nil), // 2: envoy.type.matcher.v4alpha.StructMatcher -} -var file_envoy_type_matcher_v4alpha_node_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v4alpha.NodeMatcher.node_id:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 2, // 1: envoy.type.matcher.v4alpha.NodeMatcher.node_metadatas:type_name -> envoy.type.matcher.v4alpha.StructMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_node_proto_init() } -func file_envoy_type_matcher_v4alpha_node_proto_init() { - if File_envoy_type_matcher_v4alpha_node_proto != nil { - return - } - file_envoy_type_matcher_v4alpha_string_proto_init() - file_envoy_type_matcher_v4alpha_struct_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_node_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_node_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_node_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_node_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_node_proto = out.File - file_envoy_type_matcher_v4alpha_node_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_node_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_node_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/node.pb.validate.go b/pkg/api/envoy/type/matcher/v4alpha/node.pb.validate.go deleted file mode 100644 index e11858de74..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/node.pb.validate.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/node.proto - -package envoy_type_matcher_v4alpha - -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{} -) - -// 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/pkg/api/envoy/type/matcher/v4alpha/number.pb.go b/pkg/api/envoy/type/matcher/v4alpha/number.pb.go deleted file mode 100644 index 9b21818786..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/number.pb.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/number.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a double value. -type DoubleMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchPattern: - // *DoubleMatcher_Range - // *DoubleMatcher_Exact - MatchPattern isDoubleMatcher_MatchPattern `protobuf_oneof:"match_pattern"` -} - -func (x *DoubleMatcher) Reset() { - *x = DoubleMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_number_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleMatcher) ProtoMessage() {} - -func (x *DoubleMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_number_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleMatcher.ProtoReflect.Descriptor instead. -func (*DoubleMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_number_proto_rawDescGZIP(), []int{0} -} - -func (m *DoubleMatcher) GetMatchPattern() isDoubleMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *DoubleMatcher) GetRange() *v3.DoubleRange { - if x, ok := x.GetMatchPattern().(*DoubleMatcher_Range); ok { - return x.Range - } - return nil -} - -func (x *DoubleMatcher) GetExact() float64 { - if x, ok := x.GetMatchPattern().(*DoubleMatcher_Exact); ok { - return x.Exact - } - return 0 -} - -type isDoubleMatcher_MatchPattern interface { - isDoubleMatcher_MatchPattern() -} - -type DoubleMatcher_Range struct { - // If specified, the input double value must be in the range specified here. - // Note: The range is using half-open interval semantics [start, end). - Range *v3.DoubleRange `protobuf:"bytes,1,opt,name=range,proto3,oneof"` -} - -type DoubleMatcher_Exact struct { - // If specified, the input double value must be equal to the value specified here. - Exact float64 `protobuf:"fixed64,2,opt,name=exact,proto3,oneof"` -} - -func (*DoubleMatcher_Range) isDoubleMatcher_MatchPattern() {} - -func (*DoubleMatcher_Exact) isDoubleMatcher_MatchPattern() {} - -var File_envoy_type_matcher_v4alpha_number_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_number_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x0d, - 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x32, 0x0a, - 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, - 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x41, 0x0a, 0x28, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_number_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_number_proto_rawDescData = file_envoy_type_matcher_v4alpha_number_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_number_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_number_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_number_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_number_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_number_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_number_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_matcher_v4alpha_number_proto_goTypes = []interface{}{ - (*DoubleMatcher)(nil), // 0: envoy.type.matcher.v4alpha.DoubleMatcher - (*v3.DoubleRange)(nil), // 1: envoy.type.v3.DoubleRange -} -var file_envoy_type_matcher_v4alpha_number_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v4alpha.DoubleMatcher.range:type_name -> envoy.type.v3.DoubleRange - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_number_proto_init() } -func file_envoy_type_matcher_v4alpha_number_proto_init() { - if File_envoy_type_matcher_v4alpha_number_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_number_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v4alpha_number_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*DoubleMatcher_Range)(nil), - (*DoubleMatcher_Exact)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_number_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_number_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_number_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_number_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_number_proto = out.File - file_envoy_type_matcher_v4alpha_number_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_number_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_number_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/number.pb.validate.go b/pkg/api/envoy/type/matcher/v4alpha/number.pb.validate.go deleted file mode 100644 index 69843b55b5..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/number.pb.validate.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/number.proto - -package envoy_type_matcher_v4alpha - -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{} -) - -// 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/pkg/api/envoy/type/matcher/v4alpha/path.pb.go b/pkg/api/envoy/type/matcher/v4alpha/path.pb.go deleted file mode 100644 index f136af35da..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/path.pb.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/path.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a path on HTTP request. -type PathMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *PathMatcher_Path - Rule isPathMatcher_Rule `protobuf_oneof:"rule"` -} - -func (x *PathMatcher) Reset() { - *x = PathMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_path_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PathMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PathMatcher) ProtoMessage() {} - -func (x *PathMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_path_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PathMatcher.ProtoReflect.Descriptor instead. -func (*PathMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_path_proto_rawDescGZIP(), []int{0} -} - -func (m *PathMatcher) GetRule() isPathMatcher_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *PathMatcher) GetPath() *StringMatcher { - if x, ok := x.GetRule().(*PathMatcher_Path); ok { - return x.Path - } - return nil -} - -type isPathMatcher_Rule interface { - isPathMatcher_Rule() -} - -type PathMatcher_Path struct { - // The `path` must match the URL path portion of the :path header. The query and fragment - // string (if present) are removed in the URL path portion. - // For example, the path */data* will match the *:path* header */data#fragment?param=value*. - Path *StringMatcher `protobuf:"bytes,1,opt,name=path,proto3,oneof"` -} - -func (*PathMatcher_Path) isPathMatcher_Rule() {} - -var File_envoy_type_matcher_v4alpha_path_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_path_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x61, 0x74, - 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04, - 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3f, 0x0a, 0x28, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x09, 0x50, 0x61, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_path_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_path_proto_rawDescData = file_envoy_type_matcher_v4alpha_path_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_path_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_path_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_path_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_path_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_path_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_path_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_matcher_v4alpha_path_proto_goTypes = []interface{}{ - (*PathMatcher)(nil), // 0: envoy.type.matcher.v4alpha.PathMatcher - (*StringMatcher)(nil), // 1: envoy.type.matcher.v4alpha.StringMatcher -} -var file_envoy_type_matcher_v4alpha_path_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v4alpha.PathMatcher.path:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_path_proto_init() } -func file_envoy_type_matcher_v4alpha_path_proto_init() { - if File_envoy_type_matcher_v4alpha_path_proto != nil { - return - } - file_envoy_type_matcher_v4alpha_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_path_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PathMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v4alpha_path_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*PathMatcher_Path)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_path_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_path_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_path_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_path_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_path_proto = out.File - file_envoy_type_matcher_v4alpha_path_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_path_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_path_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/path.pb.validate.go b/pkg/api/envoy/type/matcher/v4alpha/path.pb.validate.go deleted file mode 100644 index 5ddb77c6ef..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/path.pb.validate.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/path.proto - -package envoy_type_matcher_v4alpha - -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{} -) - -// 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/pkg/api/envoy/type/matcher/v4alpha/regex.pb.go b/pkg/api/envoy/type/matcher/v4alpha/regex.pb.go deleted file mode 100644 index 986e70aeca..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/regex.pb.go +++ /dev/null @@ -1,406 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/regex.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A regex matcher designed for safety when used with untrusted input. -type RegexMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to EngineType: - // *RegexMatcher_GoogleRe2 - EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` - // The regex match string. The string must be supported by the configured engine. - Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` -} - -func (x *RegexMatcher) Reset() { - *x = RegexMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatcher) ProtoMessage() {} - -func (x *RegexMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead. -func (*RegexMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_regex_proto_rawDescGZIP(), []int{0} -} - -func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { - if m != nil { - return m.EngineType - } - return nil -} - -func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { - if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok { - return x.GoogleRe2 - } - return nil -} - -func (x *RegexMatcher) GetRegex() string { - if x != nil { - return x.Regex - } - return "" -} - -type isRegexMatcher_EngineType interface { - isRegexMatcher_EngineType() -} - -type RegexMatcher_GoogleRe2 struct { - // Google's RE2 regex engine. - GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` -} - -func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} - -// Describes how to match a string and then produce a new string using a regular -// expression and a substitution string. -type RegexMatchAndSubstitute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The regular expression used to find portions of a string (hereafter called - // the "subject string") that should be replaced. When a new string is - // produced during the substitution operation, the new string is initially - // the same as the subject string, but then all matches in the subject string - // are replaced by the substitution string. If replacing all matches isn't - // desired, regular expression anchors can be used to ensure a single match, - // so as to replace just one occurrence of a pattern. Capture groups can be - // used in the pattern to extract portions of the subject string, and then - // referenced in the substitution string. - Pattern *RegexMatcher `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` - // The string that should be substituted into matching portions of the - // subject string during a substitution operation to produce a new string. - // Capture groups in the pattern can be referenced in the substitution - // string. Note, however, that the syntax for referring to capture groups is - // defined by the chosen regular expression engine. Google's `RE2 - // `_ regular expression engine uses a - // backslash followed by the capture group number to denote a numbered - // capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers - // to capture group 2. - Substitution string `protobuf:"bytes,2,opt,name=substitution,proto3" json:"substitution,omitempty"` -} - -func (x *RegexMatchAndSubstitute) Reset() { - *x = RegexMatchAndSubstitute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatchAndSubstitute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatchAndSubstitute) ProtoMessage() {} - -func (x *RegexMatchAndSubstitute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatchAndSubstitute.ProtoReflect.Descriptor instead. -func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_regex_proto_rawDescGZIP(), []int{1} -} - -func (x *RegexMatchAndSubstitute) GetPattern() *RegexMatcher { - if x != nil { - return x.Pattern - } - return nil -} - -func (x *RegexMatchAndSubstitute) GetSubstitution() string { - if x != nil { - return x.Substitution - } - return "" -} - -// Google's `RE2 `_ regex engine. The regex string must adhere to -// the documented `syntax `_. The engine is designed -// to complete execution in linear time as well as limit the amount of memory used. -// -// Envoy supports program size checking via runtime. The runtime keys `re2.max_program_size.error_level` -// and `re2.max_program_size.warn_level` can be set to integers as the maximum program size or -// complexity that a compiled regex can have before an exception is thrown or a warning is -// logged, respectively. `re2.max_program_size.error_level` defaults to 100, and -// `re2.max_program_size.warn_level` has no default if unset (will not check/log a warning). -// -// Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, -// which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented -// each time the program size exceeds the warn level threshold. -type RegexMatcher_GoogleRE2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field controls the RE2 "program size" which is a rough estimate of how complex a - // compiled regex is to evaluate. A regex that has a program size greater than the configured - // value will fail to compile. In this case, the configured max program size can be increased - // or the regex can be simplified. If not specified, the default is 100. - // - // This field is deprecated; regexp validation should be performed on the management server - // instead of being done by each individual client. - // - // Deprecated: Do not use. - HiddenEnvoyDeprecatedMaxProgramSize *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=hidden_envoy_deprecated_max_program_size,json=hiddenEnvoyDeprecatedMaxProgramSize,proto3" json:"hidden_envoy_deprecated_max_program_size,omitempty"` -} - -func (x *RegexMatcher_GoogleRE2) Reset() { - *x = RegexMatcher_GoogleRE2{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatcher_GoogleRE2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatcher_GoogleRE2) ProtoMessage() {} - -func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead. -func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_regex_proto_rawDescGZIP(), []int{0, 0} -} - -// Deprecated: Do not use. -func (x *RegexMatcher_GoogleRE2) GetHiddenEnvoyDeprecatedMaxProgramSize() *wrappers.UInt32Value { - if x != nil { - return x.HiddenEnvoyDeprecatedMaxProgramSize - } - return nil -} - -var File_envoy_type_matcher_v4alpha_regex_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_regex_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, - 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x87, 0x03, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x5d, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, - 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, 0xb9, - 0x01, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x12, 0x77, 0x0a, 0x28, - 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x23, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x44, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, - 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x12, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc1, 0x01, 0x0a, 0x17, 0x52, 0x65, - 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, - 0x69, 0x74, 0x75, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, - 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x42, 0x40, 0x0a, - 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_regex_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_regex_proto_rawDescData = file_envoy_type_matcher_v4alpha_regex_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_regex_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_regex_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_regex_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_regex_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_type_matcher_v4alpha_regex_proto_goTypes = []interface{}{ - (*RegexMatcher)(nil), // 0: envoy.type.matcher.v4alpha.RegexMatcher - (*RegexMatchAndSubstitute)(nil), // 1: envoy.type.matcher.v4alpha.RegexMatchAndSubstitute - (*RegexMatcher_GoogleRE2)(nil), // 2: envoy.type.matcher.v4alpha.RegexMatcher.GoogleRE2 - (*wrappers.UInt32Value)(nil), // 3: google.protobuf.UInt32Value -} -var file_envoy_type_matcher_v4alpha_regex_proto_depIdxs = []int32{ - 2, // 0: envoy.type.matcher.v4alpha.RegexMatcher.google_re2:type_name -> envoy.type.matcher.v4alpha.RegexMatcher.GoogleRE2 - 0, // 1: envoy.type.matcher.v4alpha.RegexMatchAndSubstitute.pattern:type_name -> envoy.type.matcher.v4alpha.RegexMatcher - 3, // 2: envoy.type.matcher.v4alpha.RegexMatcher.GoogleRE2.hidden_envoy_deprecated_max_program_size:type_name -> google.protobuf.UInt32Value - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_regex_proto_init() } -func file_envoy_type_matcher_v4alpha_regex_proto_init() { - if File_envoy_type_matcher_v4alpha_regex_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatchAndSubstitute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatcher_GoogleRE2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v4alpha_regex_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*RegexMatcher_GoogleRe2)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_regex_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_regex_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_regex_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_regex_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_regex_proto = out.File - file_envoy_type_matcher_v4alpha_regex_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_regex_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_regex_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/string.pb.go b/pkg/api/envoy/type/matcher/v4alpha/string.pb.go deleted file mode 100644 index 2fd3b7d0da..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/string.pb.go +++ /dev/null @@ -1,379 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/string.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a string. -// [#next-free-field: 8] -type StringMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchPattern: - // *StringMatcher_Exact - // *StringMatcher_Prefix - // *StringMatcher_Suffix - // *StringMatcher_SafeRegex - // *StringMatcher_Contains - MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` - // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no - // effect for the safe_regex match. - // For example, the matcher *data* will match both input string *Data* and *data* if set to true. - IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` -} - -func (x *StringMatcher) Reset() { - *x = StringMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_string_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StringMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StringMatcher) ProtoMessage() {} - -func (x *StringMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_string_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead. -func (*StringMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_string_proto_rawDescGZIP(), []int{0} -} - -func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *StringMatcher) GetExact() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok { - return x.Exact - } - return "" -} - -func (x *StringMatcher) GetPrefix() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *StringMatcher) GetSuffix() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok { - return x.Suffix - } - return "" -} - -func (x *StringMatcher) GetSafeRegex() *RegexMatcher { - if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok { - return x.SafeRegex - } - return nil -} - -func (x *StringMatcher) GetContains() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Contains); ok { - return x.Contains - } - return "" -} - -func (x *StringMatcher) GetIgnoreCase() bool { - if x != nil { - return x.IgnoreCase - } - return false -} - -type isStringMatcher_MatchPattern interface { - isStringMatcher_MatchPattern() -} - -type StringMatcher_Exact struct { - // The input string must match exactly the string specified here. - // - // Examples: - // - // * *abc* only matches the value *abc*. - Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` -} - -type StringMatcher_Prefix struct { - // The input string must have the prefix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *abc.xyz* - Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` -} - -type StringMatcher_Suffix struct { - // The input string must have the suffix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *xyz.abc* - Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"` -} - -type StringMatcher_SafeRegex struct { - // The input string must match the regular expression specified here. - SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` -} - -type StringMatcher_Contains struct { - // The input string must have the substring specified here. - // Note: empty contains match is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *xyz.abc.def* - Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` -} - -func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {} - -// Specifies a list of ways to match a string. -type ListStringMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` -} - -func (x *ListStringMatcher) Reset() { - *x = ListStringMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_string_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListStringMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListStringMatcher) ProtoMessage() {} - -func (x *ListStringMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_string_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead. -func (*ListStringMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_string_proto_rawDescGZIP(), []int{1} -} - -func (x *ListStringMatcher) GetPatterns() []*StringMatcher { - if x != nil { - return x.Patterns - } - return nil -} - -var File_envoy_type_matcher_v4alpha_string_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_string_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x02, - 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x06, 0x73, 0x75, - 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x53, 0x0a, - 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x12, 0x25, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, - 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, - 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0x94, 0x01, 0x0a, 0x11, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x4f, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, - 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x42, 0x41, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_string_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_string_proto_rawDescData = file_envoy_type_matcher_v4alpha_string_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_string_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_string_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_string_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_string_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_matcher_v4alpha_string_proto_goTypes = []interface{}{ - (*StringMatcher)(nil), // 0: envoy.type.matcher.v4alpha.StringMatcher - (*ListStringMatcher)(nil), // 1: envoy.type.matcher.v4alpha.ListStringMatcher - (*RegexMatcher)(nil), // 2: envoy.type.matcher.v4alpha.RegexMatcher -} -var file_envoy_type_matcher_v4alpha_string_proto_depIdxs = []int32{ - 2, // 0: envoy.type.matcher.v4alpha.StringMatcher.safe_regex:type_name -> envoy.type.matcher.v4alpha.RegexMatcher - 0, // 1: envoy.type.matcher.v4alpha.ListStringMatcher.patterns:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_string_proto_init() } -func file_envoy_type_matcher_v4alpha_string_proto_init() { - if File_envoy_type_matcher_v4alpha_string_proto != nil { - return - } - file_envoy_type_matcher_v4alpha_regex_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StringMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v4alpha_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListStringMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v4alpha_string_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*StringMatcher_Exact)(nil), - (*StringMatcher_Prefix)(nil), - (*StringMatcher_Suffix)(nil), - (*StringMatcher_SafeRegex)(nil), - (*StringMatcher_Contains)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_string_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_string_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_string_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_string_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_string_proto = out.File - file_envoy_type_matcher_v4alpha_string_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_string_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_string_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/struct.pb.go b/pkg/api/envoy/type/matcher/v4alpha/struct.pb.go deleted file mode 100644 index 31821d6106..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/struct.pb.go +++ /dev/null @@ -1,331 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/struct.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// StructMatcher provides a general interface to check if a given value is matched in -// google.protobuf.Struct. It uses `path` to retrieve the value -// from the struct and then check if it's matched to the specified value. -// -// For example, for the following Struct: -// -// .. code-block:: yaml -// -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" -// from the Metadata which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following StructMatcher is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of StructMatcher is to match metadata in envoy.v*.core.Node. -type StructMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The path to retrieve the Value from the Struct. - Path []*StructMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` - // The StructMatcher is matched if the value retrieved by path is matched to this value. - Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *StructMatcher) Reset() { - *x = StructMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_struct_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StructMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StructMatcher) ProtoMessage() {} - -func (x *StructMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_struct_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StructMatcher.ProtoReflect.Descriptor instead. -func (*StructMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_struct_proto_rawDescGZIP(), []int{0} -} - -func (x *StructMatcher) GetPath() []*StructMatcher_PathSegment { - if x != nil { - return x.Path - } - return nil -} - -func (x *StructMatcher) GetValue() *ValueMatcher { - if x != nil { - return x.Value - } - return nil -} - -// Specifies the segment in a path to retrieve value from Struct. -type StructMatcher_PathSegment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Segment: - // *StructMatcher_PathSegment_Key - Segment isStructMatcher_PathSegment_Segment `protobuf_oneof:"segment"` -} - -func (x *StructMatcher_PathSegment) Reset() { - *x = StructMatcher_PathSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_struct_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StructMatcher_PathSegment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StructMatcher_PathSegment) ProtoMessage() {} - -func (x *StructMatcher_PathSegment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_struct_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StructMatcher_PathSegment.ProtoReflect.Descriptor instead. -func (*StructMatcher_PathSegment) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_struct_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *StructMatcher_PathSegment) GetSegment() isStructMatcher_PathSegment_Segment { - if m != nil { - return m.Segment - } - return nil -} - -func (x *StructMatcher_PathSegment) GetKey() string { - if x, ok := x.GetSegment().(*StructMatcher_PathSegment_Key); ok { - return x.Key - } - return "" -} - -type isStructMatcher_PathSegment_Segment interface { - isStructMatcher_PathSegment_Segment() -} - -type StructMatcher_PathSegment_Key struct { - // If specified, use the key to retrieve the value in a Struct. - Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` -} - -func (*StructMatcher_PathSegment_Key) isStructMatcher_PathSegment_Segment() {} - -var File_envoy_type_matcher_v4alpha_struct_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_struct_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x48, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x72, 0x0a, 0x0b, 0x50, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, - 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x2a, 0x9a, - 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x41, 0x0a, 0x28, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_struct_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_struct_proto_rawDescData = file_envoy_type_matcher_v4alpha_struct_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_struct_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_struct_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_struct_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_struct_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_matcher_v4alpha_struct_proto_goTypes = []interface{}{ - (*StructMatcher)(nil), // 0: envoy.type.matcher.v4alpha.StructMatcher - (*StructMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v4alpha.StructMatcher.PathSegment - (*ValueMatcher)(nil), // 2: envoy.type.matcher.v4alpha.ValueMatcher -} -var file_envoy_type_matcher_v4alpha_struct_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v4alpha.StructMatcher.path:type_name -> envoy.type.matcher.v4alpha.StructMatcher.PathSegment - 2, // 1: envoy.type.matcher.v4alpha.StructMatcher.value:type_name -> envoy.type.matcher.v4alpha.ValueMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_struct_proto_init() } -func file_envoy_type_matcher_v4alpha_struct_proto_init() { - if File_envoy_type_matcher_v4alpha_struct_proto != nil { - return - } - file_envoy_type_matcher_v4alpha_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StructMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v4alpha_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StructMatcher_PathSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v4alpha_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*StructMatcher_PathSegment_Key)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_struct_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_struct_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_struct_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_struct_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_struct_proto = out.File - file_envoy_type_matcher_v4alpha_struct_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_struct_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_struct_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/struct.pb.validate.go b/pkg/api/envoy/type/matcher/v4alpha/struct.pb.validate.go deleted file mode 100644 index 011ef5bfdb..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/struct.pb.validate.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/struct.proto - -package envoy_type_matcher_v4alpha - -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{} -) - -// 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 utf8.RuneCountInString(m.GetKey()) < 1 { - return StructMatcher_PathSegmentValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - } - - 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/pkg/api/envoy/type/matcher/v4alpha/value.pb.go b/pkg/api/envoy/type/matcher/v4alpha/value.pb.go deleted file mode 100644 index 16847f3315..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/value.pb.go +++ /dev/null @@ -1,465 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/type/matcher/v4alpha/value.proto - -package envoy_type_matcher_v4alpha - -import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. -// StructValue is not supported and is always not matched. -// [#next-free-field: 7] -type ValueMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies how to match a value. - // - // Types that are assignable to MatchPattern: - // *ValueMatcher_NullMatch_ - // *ValueMatcher_DoubleMatch - // *ValueMatcher_StringMatch - // *ValueMatcher_BoolMatch - // *ValueMatcher_PresentMatch - // *ValueMatcher_ListMatch - MatchPattern isValueMatcher_MatchPattern `protobuf_oneof:"match_pattern"` -} - -func (x *ValueMatcher) Reset() { - *x = ValueMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_value_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValueMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValueMatcher) ProtoMessage() {} - -func (x *ValueMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_value_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValueMatcher.ProtoReflect.Descriptor instead. -func (*ValueMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_value_proto_rawDescGZIP(), []int{0} -} - -func (m *ValueMatcher) GetMatchPattern() isValueMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *ValueMatcher) GetNullMatch() *ValueMatcher_NullMatch { - if x, ok := x.GetMatchPattern().(*ValueMatcher_NullMatch_); ok { - return x.NullMatch - } - return nil -} - -func (x *ValueMatcher) GetDoubleMatch() *DoubleMatcher { - if x, ok := x.GetMatchPattern().(*ValueMatcher_DoubleMatch); ok { - return x.DoubleMatch - } - return nil -} - -func (x *ValueMatcher) GetStringMatch() *StringMatcher { - if x, ok := x.GetMatchPattern().(*ValueMatcher_StringMatch); ok { - return x.StringMatch - } - return nil -} - -func (x *ValueMatcher) GetBoolMatch() bool { - if x, ok := x.GetMatchPattern().(*ValueMatcher_BoolMatch); ok { - return x.BoolMatch - } - return false -} - -func (x *ValueMatcher) GetPresentMatch() bool { - if x, ok := x.GetMatchPattern().(*ValueMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -func (x *ValueMatcher) GetListMatch() *ListMatcher { - if x, ok := x.GetMatchPattern().(*ValueMatcher_ListMatch); ok { - return x.ListMatch - } - return nil -} - -type isValueMatcher_MatchPattern interface { - isValueMatcher_MatchPattern() -} - -type ValueMatcher_NullMatch_ struct { - // If specified, a match occurs if and only if the target value is a NullValue. - NullMatch *ValueMatcher_NullMatch `protobuf:"bytes,1,opt,name=null_match,json=nullMatch,proto3,oneof"` -} - -type ValueMatcher_DoubleMatch struct { - // If specified, a match occurs if and only if the target value is a double value and is - // matched to this field. - DoubleMatch *DoubleMatcher `protobuf:"bytes,2,opt,name=double_match,json=doubleMatch,proto3,oneof"` -} - -type ValueMatcher_StringMatch struct { - // If specified, a match occurs if and only if the target value is a string value and is - // matched to this field. - StringMatch *StringMatcher `protobuf:"bytes,3,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -type ValueMatcher_BoolMatch struct { - // If specified, a match occurs if and only if the target value is a bool value and is equal - // to this field. - BoolMatch bool `protobuf:"varint,4,opt,name=bool_match,json=boolMatch,proto3,oneof"` -} - -type ValueMatcher_PresentMatch struct { - // If specified, value match will be performed based on whether the path is referring to a - // valid primitive value in the metadata. If the path is referring to a non-primitive value, - // the result is always not matched. - PresentMatch bool `protobuf:"varint,5,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -type ValueMatcher_ListMatch struct { - // If specified, a match occurs if and only if the target value is a list value and - // is matched to this field. - ListMatch *ListMatcher `protobuf:"bytes,6,opt,name=list_match,json=listMatch,proto3,oneof"` -} - -func (*ValueMatcher_NullMatch_) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_DoubleMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_StringMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_BoolMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_PresentMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_ListMatch) isValueMatcher_MatchPattern() {} - -// Specifies the way to match a list value. -type ListMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchPattern: - // *ListMatcher_OneOf - MatchPattern isListMatcher_MatchPattern `protobuf_oneof:"match_pattern"` -} - -func (x *ListMatcher) Reset() { - *x = ListMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_value_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMatcher) ProtoMessage() {} - -func (x *ListMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_value_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMatcher.ProtoReflect.Descriptor instead. -func (*ListMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_value_proto_rawDescGZIP(), []int{1} -} - -func (m *ListMatcher) GetMatchPattern() isListMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *ListMatcher) GetOneOf() *ValueMatcher { - if x, ok := x.GetMatchPattern().(*ListMatcher_OneOf); ok { - return x.OneOf - } - return nil -} - -type isListMatcher_MatchPattern interface { - isListMatcher_MatchPattern() -} - -type ListMatcher_OneOf struct { - // If specified, at least one of the values in the list must match the value specified. - OneOf *ValueMatcher `protobuf:"bytes,1,opt,name=one_of,json=oneOf,proto3,oneof"` -} - -func (*ListMatcher_OneOf) isListMatcher_MatchPattern() {} - -// NullMatch is an empty message to specify a null value. -type ValueMatcher_NullMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ValueMatcher_NullMatch) Reset() { - *x = ValueMatcher_NullMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v4alpha_value_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValueMatcher_NullMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValueMatcher_NullMatch) ProtoMessage() {} - -func (x *ValueMatcher_NullMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v4alpha_value_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValueMatcher_NullMatch.ProtoReflect.Descriptor instead. -func (*ValueMatcher_NullMatch) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v4alpha_value_proto_rawDescGZIP(), []int{0, 0} -} - -var File_envoy_type_matcher_v4alpha_value_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v4alpha_value_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x98, 0x04, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x12, 0x53, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, - 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4e, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, - 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, - 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x48, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, - 0x6c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x40, 0x0a, 0x09, 0x4e, 0x75, 0x6c, - 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x29, 0x9a, 0xc5, 0x88, - 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x90, 0x01, 0x0a, - 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x06, - 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x3a, - 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, - 0x40, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v4alpha_value_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v4alpha_value_proto_rawDescData = file_envoy_type_matcher_v4alpha_value_proto_rawDesc -) - -func file_envoy_type_matcher_v4alpha_value_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v4alpha_value_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v4alpha_value_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v4alpha_value_proto_rawDescData) - }) - return file_envoy_type_matcher_v4alpha_value_proto_rawDescData -} - -var file_envoy_type_matcher_v4alpha_value_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_type_matcher_v4alpha_value_proto_goTypes = []interface{}{ - (*ValueMatcher)(nil), // 0: envoy.type.matcher.v4alpha.ValueMatcher - (*ListMatcher)(nil), // 1: envoy.type.matcher.v4alpha.ListMatcher - (*ValueMatcher_NullMatch)(nil), // 2: envoy.type.matcher.v4alpha.ValueMatcher.NullMatch - (*DoubleMatcher)(nil), // 3: envoy.type.matcher.v4alpha.DoubleMatcher - (*StringMatcher)(nil), // 4: envoy.type.matcher.v4alpha.StringMatcher -} -var file_envoy_type_matcher_v4alpha_value_proto_depIdxs = []int32{ - 2, // 0: envoy.type.matcher.v4alpha.ValueMatcher.null_match:type_name -> envoy.type.matcher.v4alpha.ValueMatcher.NullMatch - 3, // 1: envoy.type.matcher.v4alpha.ValueMatcher.double_match:type_name -> envoy.type.matcher.v4alpha.DoubleMatcher - 4, // 2: envoy.type.matcher.v4alpha.ValueMatcher.string_match:type_name -> envoy.type.matcher.v4alpha.StringMatcher - 1, // 3: envoy.type.matcher.v4alpha.ValueMatcher.list_match:type_name -> envoy.type.matcher.v4alpha.ListMatcher - 0, // 4: envoy.type.matcher.v4alpha.ListMatcher.one_of:type_name -> envoy.type.matcher.v4alpha.ValueMatcher - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v4alpha_value_proto_init() } -func file_envoy_type_matcher_v4alpha_value_proto_init() { - if File_envoy_type_matcher_v4alpha_value_proto != nil { - return - } - file_envoy_type_matcher_v4alpha_number_proto_init() - file_envoy_type_matcher_v4alpha_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v4alpha_value_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValueMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v4alpha_value_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v4alpha_value_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValueMatcher_NullMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v4alpha_value_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*ValueMatcher_NullMatch_)(nil), - (*ValueMatcher_DoubleMatch)(nil), - (*ValueMatcher_StringMatch)(nil), - (*ValueMatcher_BoolMatch)(nil), - (*ValueMatcher_PresentMatch)(nil), - (*ValueMatcher_ListMatch)(nil), - } - file_envoy_type_matcher_v4alpha_value_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ListMatcher_OneOf)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v4alpha_value_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v4alpha_value_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v4alpha_value_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v4alpha_value_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v4alpha_value_proto = out.File - file_envoy_type_matcher_v4alpha_value_proto_rawDesc = nil - file_envoy_type_matcher_v4alpha_value_proto_goTypes = nil - file_envoy_type_matcher_v4alpha_value_proto_depIdxs = nil -} diff --git a/pkg/api/envoy/type/matcher/v4alpha/value.pb.validate.go b/pkg/api/envoy/type/matcher/v4alpha/value.pb.validate.go deleted file mode 100644 index a1bcac7783..0000000000 --- a/pkg/api/envoy/type/matcher/v4alpha/value.pb.validate.go +++ /dev/null @@ -1,317 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/value.proto - -package envoy_type_matcher_v4alpha - -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{} -) - -// 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/pkg/api/envoy/type/matcher/value.pb.go b/pkg/api/envoy/type/matcher/value.pb.go index 6f3c276137..9a1462554e 100644 --- a/pkg/api/envoy/type/matcher/value.pb.go +++ b/pkg/api/envoy/type/matcher/value.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/matcher/value.proto -package envoy_type_matcher +package matcher import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. // StructValue is not supported and is always not matched. // [#next-free-field: 7] @@ -332,11 +327,15 @@ var file_envoy_type_matcher_value_proto_rawDesc = []byte{ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x38, 0x0a, 0x20, 0x69, 0x6f, 0x2e, + 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x73, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0a, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/matcher/value.pb.validate.go b/pkg/api/envoy/type/matcher/value.pb.validate.go index 3f6b974290..7811b37230 100644 --- a/pkg/api/envoy/type/matcher/value.pb.validate.go +++ b/pkg/api/envoy/type/matcher/value.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/matcher/value.proto -package envoy_type_matcher +package matcher import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,22 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on ValueMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ValueMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ValueMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ValueMatcherMultiError, or +// nil if none found. +func (m *ValueMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ValueMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.MatchPattern.(type) { case *ValueMatcher_NullMatch_: - if v, ok := interface{}(m.GetNullMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetNullMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "NullMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "NullMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNullMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "NullMatch", @@ -57,7 +92,26 @@ func (m *ValueMatcher) Validate() error { case *ValueMatcher_DoubleMatch: - if v, ok := interface{}(m.GetDoubleMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetDoubleMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "DoubleMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "DoubleMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDoubleMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "DoubleMatch", @@ -69,7 +123,26 @@ func (m *ValueMatcher) Validate() error { case *ValueMatcher_StringMatch: - if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetStringMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "StringMatch", @@ -87,7 +160,26 @@ func (m *ValueMatcher) Validate() error { case *ValueMatcher_ListMatch: - if v, ok := interface{}(m.GetListMatch()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetListMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "ListMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "ListMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListMatch()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "ListMatch", @@ -98,16 +190,40 @@ func (m *ValueMatcher) Validate() error { } default: - return ValueMatcherValidationError{ + err := ValueMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ValueMatcherMultiError(errors) + } + return nil } +// ValueMatcherMultiError is an error wrapping multiple validation errors +// returned by ValueMatcher.ValidateAll() if the designated constraints aren't met. +type ValueMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ValueMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ValueMatcherMultiError) AllErrors() []error { return m } + // ValueMatcherValidationError is the validation error returned by // ValueMatcher.Validate if the designated constraints aren't met. type ValueMatcherValidationError struct { @@ -163,18 +279,51 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *ListMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ListMatcherMultiError, or +// nil if none found. +func (m *ListMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ListMatcher) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.MatchPattern.(type) { case *ListMatcher_OneOf: - if v, ok := interface{}(m.GetOneOf()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetOneOf()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListMatcherValidationError{ + field: "OneOf", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListMatcherValidationError{ + field: "OneOf", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOneOf()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListMatcherValidationError{ field: "OneOf", @@ -185,16 +334,40 @@ func (m *ListMatcher) Validate() error { } default: - return ListMatcherValidationError{ + err := ListMatcherValidationError{ field: "MatchPattern", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return ListMatcherMultiError(errors) + } + return nil } +// ListMatcherMultiError is an error wrapping multiple validation errors +// returned by ListMatcher.ValidateAll() if the designated constraints aren't met. +type ListMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListMatcherMultiError) AllErrors() []error { return m } + // ListMatcherValidationError is the validation error returned by // ListMatcher.Validate if the designated constraints aren't met. type ListMatcherValidationError struct { @@ -251,15 +424,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *ValueMatcher_NullMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ValueMatcher_NullMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ValueMatcher_NullMatchMultiError, or nil if none found. +func (m *ValueMatcher_NullMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *ValueMatcher_NullMatch) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return ValueMatcher_NullMatchMultiError(errors) + } + return nil } +// ValueMatcher_NullMatchMultiError is an error wrapping multiple validation +// errors returned by ValueMatcher_NullMatch.ValidateAll() if the designated +// constraints aren't met. +type ValueMatcher_NullMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ValueMatcher_NullMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ValueMatcher_NullMatchMultiError) AllErrors() []error { return m } + // ValueMatcher_NullMatchValidationError is the validation error returned by // ValueMatcher_NullMatch.Validate if the designated constraints aren't met. type ValueMatcher_NullMatchValidationError struct { diff --git a/pkg/api/envoy/type/metadata/v2/metadata.pb.go b/pkg/api/envoy/type/metadata/v2/metadata.pb.go index d04f4d4a13..46d693333c 100644 --- a/pkg/api/envoy/type/metadata/v2/metadata.pb.go +++ b/pkg/api/envoy/type/metadata/v2/metadata.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/metadata/v2/metadata.proto -package envoy_type_metadata_v2 +package metadatav2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // MetadataKey provides a general interface using `key` and `path` to retrieve value from // :ref:`Metadata `. // @@ -497,14 +492,18 @@ var file_envoy_type_metadata_v2_metadata_proto_rawDesc = []byte{ 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x1a, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x09, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x06, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x0b, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x5d, 0x0a, 0x24, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xa7, 0x01, 0x0a, 0x24, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x76, 0x32, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xf2, + 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/metadata/v2/metadata.pb.validate.go b/pkg/api/envoy/type/metadata/v2/metadata.pb.validate.go index 073cab1b65..d3fd0be4c0 100644 --- a/pkg/api/envoy/type/metadata/v2/metadata.pb.validate.go +++ b/pkg/api/envoy/type/metadata/v2/metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/metadata/v2/metadata.proto -package envoy_type_metadata_v2 +package metadatav2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MetadataKey with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MetadataKey) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKey with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataKeyMultiError, or +// nil if none found. +func (m *MetadataKey) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKey) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetKey()) < 1 { - return MetadataKeyValidationError{ + err := MetadataKeyValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetPath()) < 1 { - return MetadataKeyValidationError{ + err := MetadataKeyValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPath() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKeyValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKeyValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKeyValidationError{ field: fmt.Sprintf("Path[%v]", idx), @@ -70,9 +113,29 @@ func (m *MetadataKey) Validate() error { } + if len(errors) > 0 { + return MetadataKeyMultiError(errors) + } + return nil } +// MetadataKeyMultiError is an error wrapping multiple validation errors +// returned by MetadataKey.ValidateAll() if the designated constraints aren't met. +type MetadataKeyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKeyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKeyMultiError) AllErrors() []error { return m } + // MetadataKeyValidationError is the validation error returned by // MetadataKey.Validate if the designated constraints aren't met. type MetadataKeyValidationError struct { @@ -128,18 +191,51 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MetadataKind) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataKindMultiError, or +// nil if none found. +func (m *MetadataKind) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Kind.(type) { case *MetadataKind_Request_: - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Request", @@ -151,7 +247,26 @@ func (m *MetadataKind) Validate() error { case *MetadataKind_Route_: - if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Route", @@ -163,7 +278,26 @@ func (m *MetadataKind) Validate() error { case *MetadataKind_Cluster_: - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Cluster", @@ -175,7 +309,26 @@ func (m *MetadataKind) Validate() error { case *MetadataKind_Host_: - if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Host", @@ -186,16 +339,40 @@ func (m *MetadataKind) Validate() error { } default: - return MetadataKindValidationError{ + err := MetadataKindValidationError{ field: "Kind", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MetadataKindMultiError(errors) } return nil } +// MetadataKindMultiError is an error wrapping multiple validation errors +// returned by MetadataKind.ValidateAll() if the designated constraints aren't met. +type MetadataKindMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKindMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKindMultiError) AllErrors() []error { return m } + // MetadataKindValidationError is the validation error returned by // MetadataKind.Validate if the designated constraints aren't met. type MetadataKindValidationError struct { @@ -252,34 +429,77 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKey_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKey_PathSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKey_PathSegmentMultiError, or nil if none found. +func (m *MetadataKey_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKey_PathSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Segment.(type) { case *MetadataKey_PathSegment_Key: if len(m.GetKey()) < 1 { - return MetadataKey_PathSegmentValidationError{ + err := MetadataKey_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } default: - return MetadataKey_PathSegmentValidationError{ + err := MetadataKey_PathSegmentValidationError{ field: "Segment", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MetadataKey_PathSegmentMultiError(errors) } return nil } +// MetadataKey_PathSegmentMultiError is an error wrapping multiple validation +// errors returned by MetadataKey_PathSegment.ValidateAll() if the designated +// constraints aren't met. +type MetadataKey_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKey_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKey_PathSegmentMultiError) AllErrors() []error { return m } + // MetadataKey_PathSegmentValidationError is the validation error returned by // MetadataKey_PathSegment.Validate if the designated constraints aren't met. type MetadataKey_PathSegmentValidationError struct { @@ -338,15 +558,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Request) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Request with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_RequestMultiError, or nil if none found. +func (m *MetadataKind_Request) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Request) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_RequestMultiError(errors) + } + return nil } +// MetadataKind_RequestMultiError is an error wrapping multiple validation +// errors returned by MetadataKind_Request.ValidateAll() if the designated +// constraints aren't met. +type MetadataKind_RequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_RequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_RequestMultiError) AllErrors() []error { return m } + // MetadataKind_RequestValidationError is the validation error returned by // MetadataKind_Request.Validate if the designated constraints aren't met. type MetadataKind_RequestValidationError struct { @@ -405,15 +660,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Route with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_RouteMultiError, or nil if none found. +func (m *MetadataKind_Route) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Route) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_RouteMultiError(errors) + } + return nil } +// MetadataKind_RouteMultiError is an error wrapping multiple validation errors +// returned by MetadataKind_Route.ValidateAll() if the designated constraints +// aren't met. +type MetadataKind_RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_RouteMultiError) AllErrors() []error { return m } + // MetadataKind_RouteValidationError is the validation error returned by // MetadataKind_Route.Validate if the designated constraints aren't met. type MetadataKind_RouteValidationError struct { @@ -472,15 +762,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Cluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Cluster with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_ClusterMultiError, or nil if none found. +func (m *MetadataKind_Cluster) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Cluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_ClusterMultiError(errors) + } + return nil } +// MetadataKind_ClusterMultiError is an error wrapping multiple validation +// errors returned by MetadataKind_Cluster.ValidateAll() if the designated +// constraints aren't met. +type MetadataKind_ClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_ClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_ClusterMultiError) AllErrors() []error { return m } + // MetadataKind_ClusterValidationError is the validation error returned by // MetadataKind_Cluster.Validate if the designated constraints aren't met. type MetadataKind_ClusterValidationError struct { @@ -538,16 +863,51 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Host) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Host with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_HostMultiError, or nil if none found. +func (m *MetadataKind_Host) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Host) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_HostMultiError(errors) + } + return nil } +// MetadataKind_HostMultiError is an error wrapping multiple validation errors +// returned by MetadataKind_Host.ValidateAll() if the designated constraints +// aren't met. +type MetadataKind_HostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_HostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_HostMultiError) AllErrors() []error { return m } + // MetadataKind_HostValidationError is the validation error returned by // MetadataKind_Host.Validate if the designated constraints aren't met. type MetadataKind_HostValidationError struct { diff --git a/pkg/api/envoy/type/metadata/v3/metadata.pb.go b/pkg/api/envoy/type/metadata/v3/metadata.pb.go index da2a2233be..f2975ad474 100644 --- a/pkg/api/envoy/type/metadata/v3/metadata.pb.go +++ b/pkg/api/envoy/type/metadata/v3/metadata.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/metadata/v3/metadata.proto -package envoy_type_metadata_v3 +package metadatav3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,12 +22,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // MetadataKey provides a general interface using `key` and `path` to retrieve value from -// :ref:`Metadata `. +// :ref:`Metadata `. // // For example, for the following Metadata: // @@ -334,7 +329,7 @@ func (*MetadataKind_Request) Descriptor() ([]byte, []int) { return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 0} } -// Represents metadata from :ref:`the route`. +// Represents metadata from :ref:`the route`. type MetadataKind_Route struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -373,7 +368,7 @@ func (*MetadataKind_Route) Descriptor() ([]byte, []int) { return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 1} } -// Represents metadata from :ref:`the upstream cluster`. +// Represents metadata from :ref:`the upstream cluster`. type MetadataKind_Cluster struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -413,7 +408,7 @@ func (*MetadataKind_Cluster) Descriptor() ([]byte, []int) { } // Represents metadata from :ref:`the upstream -// host`. +// host`. type MetadataKind_Host struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -519,11 +514,16 @@ var file_envoy_type_metadata_v3_metadata_proto_rawDesc = []byte{ 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x0b, 0x0a, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3f, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, - 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x89, 0x01, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, + 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/metadata/v3/metadata.pb.validate.go b/pkg/api/envoy/type/metadata/v3/metadata.pb.validate.go index 07661e3d29..daa9b35f2a 100644 --- a/pkg/api/envoy/type/metadata/v3/metadata.pb.validate.go +++ b/pkg/api/envoy/type/metadata/v3/metadata.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/metadata/v3/metadata.proto -package envoy_type_metadata_v3 +package metadatav3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,35 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on MetadataKey with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MetadataKey) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKey with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataKeyMultiError, or +// nil if none found. +func (m *MetadataKey) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKey) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetKey()) < 1 { - return MetadataKeyValidationError{ + err := MetadataKeyValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if len(m.GetPath()) < 1 { - return MetadataKeyValidationError{ + err := MetadataKeyValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } + if !all { + return err + } + errors = append(errors, err) } for idx, item := range m.GetPath() { _, _ = idx, item - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKeyValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKeyValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKeyValidationError{ field: fmt.Sprintf("Path[%v]", idx), @@ -70,9 +113,29 @@ func (m *MetadataKey) Validate() error { } + if len(errors) > 0 { + return MetadataKeyMultiError(errors) + } + return nil } +// MetadataKeyMultiError is an error wrapping multiple validation errors +// returned by MetadataKey.ValidateAll() if the designated constraints aren't met. +type MetadataKeyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKeyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKeyMultiError) AllErrors() []error { return m } + // MetadataKeyValidationError is the validation error returned by // MetadataKey.Validate if the designated constraints aren't met. type MetadataKeyValidationError struct { @@ -128,18 +191,51 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *MetadataKind) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MetadataKindMultiError, or +// nil if none found. +func (m *MetadataKind) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Kind.(type) { case *MetadataKind_Request_: - if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Request", @@ -151,7 +247,26 @@ func (m *MetadataKind) Validate() error { case *MetadataKind_Route_: - if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Route", @@ -163,7 +278,26 @@ func (m *MetadataKind) Validate() error { case *MetadataKind_Cluster_: - if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Cluster", @@ -175,7 +309,26 @@ func (m *MetadataKind) Validate() error { case *MetadataKind_Host_: - if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataKindValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataKindValidationError{ field: "Host", @@ -186,16 +339,40 @@ func (m *MetadataKind) Validate() error { } default: - return MetadataKindValidationError{ + err := MetadataKindValidationError{ field: "Kind", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MetadataKindMultiError(errors) } return nil } +// MetadataKindMultiError is an error wrapping multiple validation errors +// returned by MetadataKind.ValidateAll() if the designated constraints aren't met. +type MetadataKindMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKindMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKindMultiError) AllErrors() []error { return m } + // MetadataKindValidationError is the validation error returned by // MetadataKind.Validate if the designated constraints aren't met. type MetadataKindValidationError struct { @@ -252,34 +429,77 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKey_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKey_PathSegment with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKey_PathSegmentMultiError, or nil if none found. +func (m *MetadataKey_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKey_PathSegment) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.Segment.(type) { case *MetadataKey_PathSegment_Key: if utf8.RuneCountInString(m.GetKey()) < 1 { - return MetadataKey_PathSegmentValidationError{ + err := MetadataKey_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } default: - return MetadataKey_PathSegmentValidationError{ + err := MetadataKey_PathSegmentValidationError{ field: "Segment", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) + + } + if len(errors) > 0 { + return MetadataKey_PathSegmentMultiError(errors) } return nil } +// MetadataKey_PathSegmentMultiError is an error wrapping multiple validation +// errors returned by MetadataKey_PathSegment.ValidateAll() if the designated +// constraints aren't met. +type MetadataKey_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKey_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKey_PathSegmentMultiError) AllErrors() []error { return m } + // MetadataKey_PathSegmentValidationError is the validation error returned by // MetadataKey_PathSegment.Validate if the designated constraints aren't met. type MetadataKey_PathSegmentValidationError struct { @@ -338,15 +558,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Request) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Request with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_RequestMultiError, or nil if none found. +func (m *MetadataKind_Request) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Request) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_RequestMultiError(errors) + } + return nil } +// MetadataKind_RequestMultiError is an error wrapping multiple validation +// errors returned by MetadataKind_Request.ValidateAll() if the designated +// constraints aren't met. +type MetadataKind_RequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_RequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_RequestMultiError) AllErrors() []error { return m } + // MetadataKind_RequestValidationError is the validation error returned by // MetadataKind_Request.Validate if the designated constraints aren't met. type MetadataKind_RequestValidationError struct { @@ -405,15 +660,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Route with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_RouteMultiError, or nil if none found. +func (m *MetadataKind_Route) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Route) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_RouteMultiError(errors) + } + return nil } +// MetadataKind_RouteMultiError is an error wrapping multiple validation errors +// returned by MetadataKind_Route.ValidateAll() if the designated constraints +// aren't met. +type MetadataKind_RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_RouteMultiError) AllErrors() []error { return m } + // MetadataKind_RouteValidationError is the validation error returned by // MetadataKind_Route.Validate if the designated constraints aren't met. type MetadataKind_RouteValidationError struct { @@ -472,15 +762,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Cluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Cluster with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_ClusterMultiError, or nil if none found. +func (m *MetadataKind_Cluster) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Cluster) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_ClusterMultiError(errors) + } + return nil } +// MetadataKind_ClusterMultiError is an error wrapping multiple validation +// errors returned by MetadataKind_Cluster.ValidateAll() if the designated +// constraints aren't met. +type MetadataKind_ClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_ClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_ClusterMultiError) AllErrors() []error { return m } + // MetadataKind_ClusterValidationError is the validation error returned by // MetadataKind_Cluster.Validate if the designated constraints aren't met. type MetadataKind_ClusterValidationError struct { @@ -538,16 +863,51 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *MetadataKind_Host) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataKind_Host with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// MetadataKind_HostMultiError, or nil if none found. +func (m *MetadataKind_Host) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataKind_Host) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return MetadataKind_HostMultiError(errors) + } + return nil } +// MetadataKind_HostMultiError is an error wrapping multiple validation errors +// returned by MetadataKind_Host.ValidateAll() if the designated constraints +// aren't met. +type MetadataKind_HostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataKind_HostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataKind_HostMultiError) AllErrors() []error { return m } + // MetadataKind_HostValidationError is the validation error returned by // MetadataKind_Host.Validate if the designated constraints aren't met. type MetadataKind_HostValidationError struct { diff --git a/pkg/api/envoy/type/percent.pb.go b/pkg/api/envoy/type/percent.pb.go index 01386abe9a..ee0bb315e5 100644 --- a/pkg/api/envoy/type/percent.pb.go +++ b/pkg/api/envoy/type/percent.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/percent.proto -package envoy_type +package _type import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Fraction percentages support several fixed denominator values. type FractionalPercent_DenominatorType int32 @@ -223,11 +218,14 @@ var file_envoy_type_percent_proto_rawDesc = []byte{ 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x4e, 0x44, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x45, 0x4e, 0x5f, 0x54, 0x48, 0x4f, 0x55, 0x53, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, - 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x32, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x65, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/percent.pb.validate.go b/pkg/api/envoy/type/percent.pb.validate.go index a553f28e3a..01d6e3b967 100644 --- a/pkg/api/envoy/type/percent.pb.validate.go +++ b/pkg/api/envoy/type/percent.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/percent.proto -package envoy_type +package _type import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Percent with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Percent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Percent with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in PercentMultiError, or nil if none found. +func (m *Percent) ValidateAll() error { + return m.validate(true) +} + +func (m *Percent) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetValue(); val < 0 || val > 100 { - return PercentValidationError{ + err := PercentValidationError{ field: "Value", reason: "value must be inside range [0, 100]", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PercentMultiError(errors) } return nil } +// PercentMultiError is an error wrapping multiple validation errors returned +// by Percent.ValidateAll() if the designated constraints aren't met. +type PercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PercentMultiError) AllErrors() []error { return m } + // PercentValidationError is the validation error returned by Percent.Validate // if the designated constraints aren't met. type PercentValidationError struct { @@ -105,25 +145,64 @@ var _ interface { } = PercentValidationError{} // Validate checks the field values on FractionalPercent with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *FractionalPercent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FractionalPercent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FractionalPercentMultiError, or nil if none found. +func (m *FractionalPercent) ValidateAll() error { + return m.validate(true) +} + +func (m *FractionalPercent) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Numerator if _, ok := FractionalPercent_DenominatorType_name[int32(m.GetDenominator())]; !ok { - return FractionalPercentValidationError{ + err := FractionalPercentValidationError{ field: "Denominator", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FractionalPercentMultiError(errors) } return nil } +// FractionalPercentMultiError is an error wrapping multiple validation errors +// returned by FractionalPercent.ValidateAll() if the designated constraints +// aren't met. +type FractionalPercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FractionalPercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FractionalPercentMultiError) AllErrors() []error { return m } + // FractionalPercentValidationError is the validation error returned by // FractionalPercent.Validate if the designated constraints aren't met. type FractionalPercentValidationError struct { diff --git a/pkg/api/envoy/type/range.pb.go b/pkg/api/envoy/type/range.pb.go index dbb3b6718f..a3d37c7197 100644 --- a/pkg/api/envoy/type/range.pb.go +++ b/pkg/api/envoy/type/range.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/range.proto -package envoy_type +package _type import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the int64 start and end of the range using half-open interval semantics [start, // end). type Int64Range struct { @@ -220,10 +215,14 @@ var file_envoy_type_range_proto_rawDesc = []byte{ 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x30, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x63, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/range.pb.validate.go b/pkg/api/envoy/type/range.pb.validate.go index 6bab6a5599..3364e65ae2 100644 --- a/pkg/api/envoy/type/range.pb.validate.go +++ b/pkg/api/envoy/type/range.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/range.proto -package envoy_type +package _type import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,59 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Int64Range with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Int64Range) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int64Range with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Int64RangeMultiError, or +// nil if none found. +func (m *Int64Range) ValidateAll() error { + return m.validate(true) +} + +func (m *Int64Range) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Start // no validation rules for End + if len(errors) > 0 { + return Int64RangeMultiError(errors) + } + return nil } +// Int64RangeMultiError is an error wrapping multiple validation errors +// returned by Int64Range.ValidateAll() if the designated constraints aren't met. +type Int64RangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int64RangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int64RangeMultiError) AllErrors() []error { return m } + // Int64RangeValidationError is the validation error returned by // Int64Range.Validate if the designated constraints aren't met. type Int64RangeValidationError struct { @@ -102,19 +139,54 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Int32Range) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int32Range with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Int32RangeMultiError, or +// nil if none found. +func (m *Int32Range) ValidateAll() error { + return m.validate(true) +} + +func (m *Int32Range) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Start // no validation rules for End + if len(errors) > 0 { + return Int32RangeMultiError(errors) + } + return nil } +// Int32RangeMultiError is an error wrapping multiple validation errors +// returned by Int32Range.ValidateAll() if the designated constraints aren't met. +type Int32RangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int32RangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int32RangeMultiError) AllErrors() []error { return m } + // Int32RangeValidationError is the validation error returned by // Int32Range.Validate if the designated constraints aren't met. type Int32RangeValidationError struct { @@ -170,20 +242,54 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DoubleRange) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DoubleRange with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DoubleRangeMultiError, or +// nil if none found. +func (m *DoubleRange) ValidateAll() error { + return m.validate(true) +} + +func (m *DoubleRange) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Start // no validation rules for End + if len(errors) > 0 { + return DoubleRangeMultiError(errors) + } + return nil } +// DoubleRangeMultiError is an error wrapping multiple validation errors +// returned by DoubleRange.ValidateAll() if the designated constraints aren't met. +type DoubleRangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DoubleRangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DoubleRangeMultiError) AllErrors() []error { return m } + // DoubleRangeValidationError is the validation error returned by // DoubleRange.Validate if the designated constraints aren't met. type DoubleRangeValidationError struct { diff --git a/pkg/api/envoy/type/semantic_version.pb.go b/pkg/api/envoy/type/semantic_version.pb.go index 8211a99b80..ba5ca9d250 100644 --- a/pkg/api/envoy/type/semantic_version.pb.go +++ b/pkg/api/envoy/type/semantic_version.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/semantic_version.proto -package envoy_type +package _type import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Envoy uses SemVer (https://semver.org/). Major/minor versions indicate // expected behaviors and APIs, the patch version field is used only // for security fixes and can be generally ignored. @@ -106,12 +101,15 @@ var file_envoy_type_semantic_version_proto_rawDesc = []byte{ 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x42, 0x3a, 0x0a, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6d, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x14, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/semantic_version.pb.validate.go b/pkg/api/envoy/type/semantic_version.pb.validate.go index 3cf366742e..eb0d03af3e 100644 --- a/pkg/api/envoy/type/semantic_version.pb.validate.go +++ b/pkg/api/envoy/type/semantic_version.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/semantic_version.proto -package envoy_type +package _type import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SemanticVersion with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SemanticVersion) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SemanticVersion with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SemanticVersionMultiError, or nil if none found. +func (m *SemanticVersion) ValidateAll() error { + return m.validate(true) +} + +func (m *SemanticVersion) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for MajorNumber // no validation rules for MinorNumber // no validation rules for Patch + if len(errors) > 0 { + return SemanticVersionMultiError(errors) + } + return nil } +// SemanticVersionMultiError is an error wrapping multiple validation errors +// returned by SemanticVersion.ValidateAll() if the designated constraints +// aren't met. +type SemanticVersionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SemanticVersionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SemanticVersionMultiError) AllErrors() []error { return m } + // SemanticVersionValidationError is the validation error returned by // SemanticVersion.Validate if the designated constraints aren't met. type SemanticVersionValidationError struct { diff --git a/pkg/api/envoy/type/token_bucket.pb.go b/pkg/api/envoy/type/token_bucket.pb.go index 82d96dab0a..baff7c3f34 100644 --- a/pkg/api/envoy/type/token_bucket.pb.go +++ b/pkg/api/envoy/type/token_bucket.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/token_bucket.proto -package envoy_type +package _type import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configures a token bucket, typically used for rate limiting. type TokenBucket struct { state protoimpl.MessageState @@ -126,11 +121,14 @@ var file_envoy_type_token_bucket_proto_rawDesc = []byte{ 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x36, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x69, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x10, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/token_bucket.pb.validate.go b/pkg/api/envoy/type/token_bucket.pb.validate.go index fab354fdb8..9e04de8bc3 100644 --- a/pkg/api/envoy/type/token_bucket.pb.validate.go +++ b/pkg/api/envoy/type/token_bucket.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/token_bucket.proto -package envoy_type +package _type import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,66 +31,122 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TokenBucket with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TokenBucket) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TokenBucket with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TokenBucketMultiError, or +// nil if none found. +func (m *TokenBucket) ValidateAll() error { + return m.validate(true) +} + +func (m *TokenBucket) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMaxTokens() <= 0 { - return TokenBucketValidationError{ + err := TokenBucketValidationError{ field: "MaxTokens", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetTokensPerFill(); wrapper != nil { if wrapper.GetValue() <= 0 { - return TokenBucketValidationError{ + err := TokenBucketValidationError{ field: "TokensPerFill", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } if m.GetFillInterval() == nil { - return TokenBucketValidationError{ + err := TokenBucketValidationError{ field: "FillInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetFillInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return TokenBucketValidationError{ + err = 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", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := TokenBucketValidationError{ + field: "FillInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return TokenBucketMultiError(errors) } return nil } +// TokenBucketMultiError is an error wrapping multiple validation errors +// returned by TokenBucket.ValidateAll() if the designated constraints aren't met. +type TokenBucketMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TokenBucketMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TokenBucketMultiError) AllErrors() []error { return m } + // TokenBucketValidationError is the validation error returned by // TokenBucket.Validate if the designated constraints aren't met. type TokenBucketValidationError struct { diff --git a/pkg/api/envoy/type/tracing/v2/custom_tag.pb.go b/pkg/api/envoy/type/tracing/v2/custom_tag.pb.go index 2f9284e139..038a3a427c 100644 --- a/pkg/api/envoy/type/tracing/v2/custom_tag.pb.go +++ b/pkg/api/envoy/type/tracing/v2/custom_tag.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/tracing/v2/custom_tag.proto -package envoy_type_tracing_v2 +package tracingv2 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/metadata/v2" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Describes custom tags for the active span. // [#next-free-field: 6] type CustomTag struct { @@ -454,12 +449,16 @@ var file_envoy_type_tracing_v2_custom_tag_proto_rawDesc = []byte{ 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3f, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x42, - 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x87, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, + 0x42, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, + 0x3b, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/tracing/v2/custom_tag.pb.validate.go b/pkg/api/envoy/type/tracing/v2/custom_tag.pb.validate.go index 0ac1757e8b..c0d58bcec6 100644 --- a/pkg/api/envoy/type/tracing/v2/custom_tag.pb.validate.go +++ b/pkg/api/envoy/type/tracing/v2/custom_tag.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/tracing/v2/custom_tag.proto -package envoy_type_tracing_v2 +package tracingv2 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CustomTag with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CustomTag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CustomTagMultiError, or nil +// if none found. +func (m *CustomTag) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetTag()) < 1 { - return CustomTagValidationError{ + err := CustomTagValidationError{ field: "Tag", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } switch m.Type.(type) { case *CustomTag_Literal_: - if v, ok := interface{}(m.GetLiteral()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLiteral()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Literal", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Literal", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLiteral()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "Literal", @@ -63,7 +103,26 @@ func (m *CustomTag) Validate() error { case *CustomTag_Environment_: - if v, ok := interface{}(m.GetEnvironment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnvironment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Environment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Environment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnvironment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "Environment", @@ -75,7 +134,26 @@ func (m *CustomTag) Validate() error { case *CustomTag_RequestHeader: - if v, ok := interface{}(m.GetRequestHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "RequestHeader", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "RequestHeader", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "RequestHeader", @@ -87,7 +165,26 @@ func (m *CustomTag) Validate() error { case *CustomTag_Metadata_: - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "Metadata", @@ -98,16 +195,40 @@ func (m *CustomTag) Validate() error { } default: - return CustomTagValidationError{ + err := CustomTagValidationError{ field: "Type", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return CustomTagMultiError(errors) + } + return nil } +// CustomTagMultiError is an error wrapping multiple validation errors returned +// by CustomTag.ValidateAll() if the designated constraints aren't met. +type CustomTagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTagMultiError) AllErrors() []error { return m } + // CustomTagValidationError is the validation error returned by // CustomTag.Validate if the designated constraints aren't met. type CustomTagValidationError struct { @@ -163,23 +284,62 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Literal) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Literal with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_LiteralMultiError, or nil if none found. +func (m *CustomTag_Literal) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Literal) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetValue()) < 1 { - return CustomTag_LiteralValidationError{ + err := CustomTag_LiteralValidationError{ field: "Value", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return CustomTag_LiteralMultiError(errors) } return nil } +// CustomTag_LiteralMultiError is an error wrapping multiple validation errors +// returned by CustomTag_Literal.ValidateAll() if the designated constraints +// aren't met. +type CustomTag_LiteralMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_LiteralMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_LiteralMultiError) AllErrors() []error { return m } + // CustomTag_LiteralValidationError is the validation error returned by // CustomTag_Literal.Validate if the designated constraints aren't met. type CustomTag_LiteralValidationError struct { @@ -238,24 +398,63 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Environment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Environment with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_EnvironmentMultiError, or nil if none found. +func (m *CustomTag_Environment) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Environment) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return CustomTag_EnvironmentValidationError{ + err := CustomTag_EnvironmentValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DefaultValue + if len(errors) > 0 { + return CustomTag_EnvironmentMultiError(errors) + } + return nil } +// CustomTag_EnvironmentMultiError is an error wrapping multiple validation +// errors returned by CustomTag_Environment.ValidateAll() if the designated +// constraints aren't met. +type CustomTag_EnvironmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_EnvironmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_EnvironmentMultiError) AllErrors() []error { return m } + // CustomTag_EnvironmentValidationError is the validation error returned by // CustomTag_Environment.Validate if the designated constraints aren't met. type CustomTag_EnvironmentValidationError struct { @@ -313,32 +512,75 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Header) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Header with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_HeaderMultiError, or nil if none found. +func (m *CustomTag_Header) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Header) validate(all bool) error { if m == nil { return nil } + var errors []error + if len(m.GetName()) < 1 { - return CustomTag_HeaderValidationError{ + err := CustomTag_HeaderValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } + if !all { + return err + } + errors = append(errors, err) } if !_CustomTag_Header_Name_Pattern.MatchString(m.GetName()) { - return CustomTag_HeaderValidationError{ + err := CustomTag_HeaderValidationError{ field: "Name", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DefaultValue + if len(errors) > 0 { + return CustomTag_HeaderMultiError(errors) + } + return nil } +// CustomTag_HeaderMultiError is an error wrapping multiple validation errors +// returned by CustomTag_Header.ValidateAll() if the designated constraints +// aren't met. +type CustomTag_HeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_HeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_HeaderMultiError) AllErrors() []error { return m } + // CustomTag_HeaderValidationError is the validation error returned by // CustomTag_Header.Validate if the designated constraints aren't met. type CustomTag_HeaderValidationError struct { @@ -397,13 +639,46 @@ 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Metadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Metadata with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_MetadataMultiError, or nil if none found. +func (m *CustomTag_Metadata) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Metadata) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetKind()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "Kind", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "Kind", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTag_MetadataValidationError{ field: "Kind", @@ -413,7 +688,26 @@ func (m *CustomTag_Metadata) Validate() error { } } - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTag_MetadataValidationError{ field: "MetadataKey", @@ -425,9 +719,30 @@ func (m *CustomTag_Metadata) Validate() error { // no validation rules for DefaultValue + if len(errors) > 0 { + return CustomTag_MetadataMultiError(errors) + } + return nil } +// CustomTag_MetadataMultiError is an error wrapping multiple validation errors +// returned by CustomTag_Metadata.ValidateAll() if the designated constraints +// aren't met. +type CustomTag_MetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_MetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_MetadataMultiError) AllErrors() []error { return m } + // CustomTag_MetadataValidationError is the validation error returned by // CustomTag_Metadata.Validate if the designated constraints aren't met. type CustomTag_MetadataValidationError struct { diff --git a/pkg/api/envoy/type/tracing/v3/custom_tag.pb.go b/pkg/api/envoy/type/tracing/v3/custom_tag.pb.go index 6834988fb6..c65d9bd424 100644 --- a/pkg/api/envoy/type/tracing/v3/custom_tag.pb.go +++ b/pkg/api/envoy/type/tracing/v3/custom_tag.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/tracing/v3/custom_tag.proto -package envoy_type_tracing_v3 +package tracingv3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/metadata/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Describes custom tags for the active span. // [#next-free-field: 6] type CustomTag struct { @@ -323,8 +318,8 @@ func (x *CustomTag_Header) GetDefaultValue() string { } // Metadata type custom tag using -// :ref:`MetadataKey ` to retrieve the protobuf value -// from :ref:`Metadata `, and populate the tag value with +// :ref:`MetadataKey ` to retrieve the protobuf value +// from :ref:`Metadata `, and populate the tag value with // `the canonical JSON `_ // representation of it. type CustomTag_Metadata struct { @@ -471,12 +466,16 @@ var file_envoy_type_tracing_v3_custom_tag_proto_rawDesc = []byte{ 0x61, 0x74, 0x61, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x42, 0x0b, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x3f, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, - 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x87, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, + 0x42, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, + 0x3b, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/tracing/v3/custom_tag.pb.validate.go b/pkg/api/envoy/type/tracing/v3/custom_tag.pb.validate.go index b45606dac8..9b1628829e 100644 --- a/pkg/api/envoy/type/tracing/v3/custom_tag.pb.validate.go +++ b/pkg/api/envoy/type/tracing/v3/custom_tag.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/tracing/v3/custom_tag.proto -package envoy_type_tracing_v3 +package tracingv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,28 +31,67 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on CustomTag with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *CustomTag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CustomTagMultiError, or nil +// if none found. +func (m *CustomTag) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetTag()) < 1 { - return CustomTagValidationError{ + err := CustomTagValidationError{ field: "Tag", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } switch m.Type.(type) { case *CustomTag_Literal_: - if v, ok := interface{}(m.GetLiteral()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetLiteral()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Literal", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Literal", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLiteral()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "Literal", @@ -63,7 +103,26 @@ func (m *CustomTag) Validate() error { case *CustomTag_Environment_: - if v, ok := interface{}(m.GetEnvironment()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetEnvironment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Environment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Environment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnvironment()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "Environment", @@ -75,7 +134,26 @@ func (m *CustomTag) Validate() error { case *CustomTag_RequestHeader: - if v, ok := interface{}(m.GetRequestHeader()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetRequestHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "RequestHeader", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "RequestHeader", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeader()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "RequestHeader", @@ -87,7 +165,26 @@ func (m *CustomTag) Validate() error { case *CustomTag_Metadata_: - if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTagValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTagValidationError{ field: "Metadata", @@ -98,16 +195,40 @@ func (m *CustomTag) Validate() error { } default: - return CustomTagValidationError{ + err := CustomTagValidationError{ field: "Type", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return CustomTagMultiError(errors) + } + return nil } +// CustomTagMultiError is an error wrapping multiple validation errors returned +// by CustomTag.ValidateAll() if the designated constraints aren't met. +type CustomTagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTagMultiError) AllErrors() []error { return m } + // CustomTagValidationError is the validation error returned by // CustomTag.Validate if the designated constraints aren't met. type CustomTagValidationError struct { @@ -163,23 +284,62 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Literal) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Literal with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_LiteralMultiError, or nil if none found. +func (m *CustomTag_Literal) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Literal) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetValue()) < 1 { - return CustomTag_LiteralValidationError{ + err := CustomTag_LiteralValidationError{ field: "Value", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return CustomTag_LiteralMultiError(errors) } return nil } +// CustomTag_LiteralMultiError is an error wrapping multiple validation errors +// returned by CustomTag_Literal.ValidateAll() if the designated constraints +// aren't met. +type CustomTag_LiteralMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_LiteralMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_LiteralMultiError) AllErrors() []error { return m } + // CustomTag_LiteralValidationError is the validation error returned by // CustomTag_Literal.Validate if the designated constraints aren't met. type CustomTag_LiteralValidationError struct { @@ -238,24 +398,63 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Environment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Environment with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_EnvironmentMultiError, or nil if none found. +func (m *CustomTag_Environment) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Environment) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return CustomTag_EnvironmentValidationError{ + err := CustomTag_EnvironmentValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DefaultValue + if len(errors) > 0 { + return CustomTag_EnvironmentMultiError(errors) + } + return nil } +// CustomTag_EnvironmentMultiError is an error wrapping multiple validation +// errors returned by CustomTag_Environment.ValidateAll() if the designated +// constraints aren't met. +type CustomTag_EnvironmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_EnvironmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_EnvironmentMultiError) AllErrors() []error { return m } + // CustomTag_EnvironmentValidationError is the validation error returned by // CustomTag_Environment.Validate if the designated constraints aren't met. type CustomTag_EnvironmentValidationError struct { @@ -313,32 +512,75 @@ var _ interface { } = 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. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Header) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Header with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_HeaderMultiError, or nil if none found. +func (m *CustomTag_Header) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Header) validate(all bool) error { if m == nil { return nil } + var errors []error + if utf8.RuneCountInString(m.GetName()) < 1 { - return CustomTag_HeaderValidationError{ + err := CustomTag_HeaderValidationError{ field: "Name", reason: "value length must be at least 1 runes", } + if !all { + return err + } + errors = append(errors, err) } if !_CustomTag_Header_Name_Pattern.MatchString(m.GetName()) { - return CustomTag_HeaderValidationError{ + err := CustomTag_HeaderValidationError{ field: "Name", reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", } + if !all { + return err + } + errors = append(errors, err) } // no validation rules for DefaultValue + if len(errors) > 0 { + return CustomTag_HeaderMultiError(errors) + } + return nil } +// CustomTag_HeaderMultiError is an error wrapping multiple validation errors +// returned by CustomTag_Header.ValidateAll() if the designated constraints +// aren't met. +type CustomTag_HeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_HeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_HeaderMultiError) AllErrors() []error { return m } + // CustomTag_HeaderValidationError is the validation error returned by // CustomTag_Header.Validate if the designated constraints aren't met. type CustomTag_HeaderValidationError struct { @@ -397,13 +639,46 @@ 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *CustomTag_Metadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomTag_Metadata with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomTag_MetadataMultiError, or nil if none found. +func (m *CustomTag_Metadata) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomTag_Metadata) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetKind()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "Kind", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "Kind", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTag_MetadataValidationError{ field: "Kind", @@ -413,7 +688,26 @@ func (m *CustomTag_Metadata) Validate() error { } } - if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetMetadataKey()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomTag_MetadataValidationError{ + field: "MetadataKey", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CustomTag_MetadataValidationError{ field: "MetadataKey", @@ -425,9 +719,30 @@ func (m *CustomTag_Metadata) Validate() error { // no validation rules for DefaultValue + if len(errors) > 0 { + return CustomTag_MetadataMultiError(errors) + } + return nil } +// CustomTag_MetadataMultiError is an error wrapping multiple validation errors +// returned by CustomTag_Metadata.ValidateAll() if the designated constraints +// aren't met. +type CustomTag_MetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomTag_MetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomTag_MetadataMultiError) AllErrors() []error { return m } + // CustomTag_MetadataValidationError is the validation error returned by // CustomTag_Metadata.Validate if the designated constraints aren't met. type CustomTag_MetadataValidationError struct { diff --git a/pkg/api/envoy/type/v3/hash_policy.pb.go b/pkg/api/envoy/type/v3/hash_policy.pb.go index 6e528995f9..3e90ef2aa7 100644 --- a/pkg/api/envoy/type/v3/hash_policy.pb.go +++ b/pkg/api/envoy/type/v3/hash_policy.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/hash_policy.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the hash policy type HashPolicy struct { state protoimpl.MessageState @@ -35,6 +30,7 @@ type HashPolicy struct { // Types that are assignable to PolicySpecifier: // *HashPolicy_SourceIp_ + // *HashPolicy_FilterState_ PolicySpecifier isHashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` } @@ -84,6 +80,13 @@ func (x *HashPolicy) GetSourceIp() *HashPolicy_SourceIp { return nil } +func (x *HashPolicy) GetFilterState() *HashPolicy_FilterState { + if x, ok := x.GetPolicySpecifier().(*HashPolicy_FilterState_); ok { + return x.FilterState + } + return nil +} + type isHashPolicy_PolicySpecifier interface { isHashPolicy_PolicySpecifier() } @@ -92,8 +95,14 @@ type HashPolicy_SourceIp_ struct { SourceIp *HashPolicy_SourceIp `protobuf:"bytes,1,opt,name=source_ip,json=sourceIp,proto3,oneof"` } +type HashPolicy_FilterState_ struct { + FilterState *HashPolicy_FilterState `protobuf:"bytes,2,opt,name=filter_state,json=filterState,proto3,oneof"` +} + func (*HashPolicy_SourceIp_) isHashPolicy_PolicySpecifier() {} +func (*HashPolicy_FilterState_) isHashPolicy_PolicySpecifier() {} + // The source IP will be used to compute the hash used by hash-based load balancing // algorithms. type HashPolicy_SourceIp struct { @@ -134,6 +143,58 @@ func (*HashPolicy_SourceIp) Descriptor() ([]byte, []int) { return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0, 0} } +// An Object in the :ref:`filterState ` will be used +// to compute the hash used by hash-based load balancing algorithms. +type HashPolicy_FilterState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the Object in the filterState, which is an Envoy::Hashable object. If there is no + // data associated with the key, or the stored object is not Envoy::Hashable, no hash will be + // produced. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *HashPolicy_FilterState) Reset() { + *x = HashPolicy_FilterState{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HashPolicy_FilterState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HashPolicy_FilterState) ProtoMessage() {} + +func (x *HashPolicy_FilterState) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HashPolicy_FilterState.ProtoReflect.Descriptor instead. +func (*HashPolicy_FilterState) Descriptor() ([]byte, []int) { + return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *HashPolicy_FilterState) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + var File_envoy_type_v3_hash_policy_proto protoreflect.FileDescriptor var file_envoy_type_v3_hash_policy_proto_rawDesc = []byte{ @@ -145,23 +206,34 @@ var file_envoy_type_v3_hash_policy_proto_rawDesc = []byte{ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, 0x0a, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x02, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x70, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x1a, 0x31, 0x0a, - 0x08, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, - 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, - 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, - 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x17, - 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x38, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x4a, 0x0a, + 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x31, 0x0a, 0x08, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x1a, 0x28, 0x0a, 0x0b, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x75, 0x0a, + 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x61, + 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -176,18 +248,20 @@ func file_envoy_type_v3_hash_policy_proto_rawDescGZIP() []byte { return file_envoy_type_v3_hash_policy_proto_rawDescData } -var file_envoy_type_v3_hash_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_type_v3_hash_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_envoy_type_v3_hash_policy_proto_goTypes = []interface{}{ - (*HashPolicy)(nil), // 0: envoy.type.v3.HashPolicy - (*HashPolicy_SourceIp)(nil), // 1: envoy.type.v3.HashPolicy.SourceIp + (*HashPolicy)(nil), // 0: envoy.type.v3.HashPolicy + (*HashPolicy_SourceIp)(nil), // 1: envoy.type.v3.HashPolicy.SourceIp + (*HashPolicy_FilterState)(nil), // 2: envoy.type.v3.HashPolicy.FilterState } var file_envoy_type_v3_hash_policy_proto_depIdxs = []int32{ 1, // 0: envoy.type.v3.HashPolicy.source_ip:type_name -> envoy.type.v3.HashPolicy.SourceIp - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 1: envoy.type.v3.HashPolicy.filter_state:type_name -> envoy.type.v3.HashPolicy.FilterState + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_envoy_type_v3_hash_policy_proto_init() } @@ -220,9 +294,22 @@ func file_envoy_type_v3_hash_policy_proto_init() { return nil } } + file_envoy_type_v3_hash_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HashPolicy_FilterState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_envoy_type_v3_hash_policy_proto_msgTypes[0].OneofWrappers = []interface{}{ (*HashPolicy_SourceIp_)(nil), + (*HashPolicy_FilterState_)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -230,7 +317,7 @@ func file_envoy_type_v3_hash_policy_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_type_v3_hash_policy_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/envoy/type/v3/hash_policy.pb.validate.go b/pkg/api/envoy/type/v3/hash_policy.pb.validate.go index bdbdaa2319..3ada0a062b 100644 --- a/pkg/api/envoy/type/v3/hash_policy.pb.validate.go +++ b/pkg/api/envoy/type/v3/hash_policy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/hash_policy.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +31,56 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HashPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HashPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HashPolicy with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HashPolicyMultiError, or +// nil if none found. +func (m *HashPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *HashPolicy) validate(all bool) error { if m == nil { return nil } + var errors []error + switch m.PolicySpecifier.(type) { case *HashPolicy_SourceIp_: - if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { + if all { + switch v := interface{}(m.GetSourceIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HashPolicyValidationError{ field: "SourceIp", @@ -54,17 +90,72 @@ func (m *HashPolicy) Validate() error { } } + case *HashPolicy_FilterState_: + + if all { + switch v := interface{}(m.GetFilterState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "FilterState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "FilterState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HashPolicyValidationError{ + field: "FilterState", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: - return HashPolicyValidationError{ + err := HashPolicyValidationError{ field: "PolicySpecifier", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } + if len(errors) > 0 { + return HashPolicyMultiError(errors) + } + return nil } +// HashPolicyMultiError is an error wrapping multiple validation errors +// returned by HashPolicy.ValidateAll() if the designated constraints aren't met. +type HashPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HashPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HashPolicyMultiError) AllErrors() []error { return m } + // HashPolicyValidationError is the validation error returned by // HashPolicy.Validate if the designated constraints aren't met. type HashPolicyValidationError struct { @@ -121,15 +212,50 @@ var _ interface { // 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. +// violated, the first error encountered is returned, or nil if there are no violations. func (m *HashPolicy_SourceIp) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HashPolicy_SourceIp with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HashPolicy_SourceIpMultiError, or nil if none found. +func (m *HashPolicy_SourceIp) ValidateAll() error { + return m.validate(true) +} + +func (m *HashPolicy_SourceIp) validate(all bool) error { if m == nil { return nil } + var errors []error + + if len(errors) > 0 { + return HashPolicy_SourceIpMultiError(errors) + } + return nil } +// HashPolicy_SourceIpMultiError is an error wrapping multiple validation +// errors returned by HashPolicy_SourceIp.ValidateAll() if the designated +// constraints aren't met. +type HashPolicy_SourceIpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HashPolicy_SourceIpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HashPolicy_SourceIpMultiError) AllErrors() []error { return m } + // HashPolicy_SourceIpValidationError is the validation error returned by // HashPolicy_SourceIp.Validate if the designated constraints aren't met. type HashPolicy_SourceIpValidationError struct { @@ -185,3 +311,116 @@ var _ interface { Cause() error ErrorName() string } = HashPolicy_SourceIpValidationError{} + +// Validate checks the field values on HashPolicy_FilterState with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *HashPolicy_FilterState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HashPolicy_FilterState with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HashPolicy_FilterStateMultiError, or nil if none found. +func (m *HashPolicy_FilterState) ValidateAll() error { + return m.validate(true) +} + +func (m *HashPolicy_FilterState) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := HashPolicy_FilterStateValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HashPolicy_FilterStateMultiError(errors) + } + + return nil +} + +// HashPolicy_FilterStateMultiError is an error wrapping multiple validation +// errors returned by HashPolicy_FilterState.ValidateAll() if the designated +// constraints aren't met. +type HashPolicy_FilterStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HashPolicy_FilterStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HashPolicy_FilterStateMultiError) AllErrors() []error { return m } + +// HashPolicy_FilterStateValidationError is the validation error returned by +// HashPolicy_FilterState.Validate if the designated constraints aren't met. +type HashPolicy_FilterStateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HashPolicy_FilterStateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HashPolicy_FilterStateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HashPolicy_FilterStateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HashPolicy_FilterStateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HashPolicy_FilterStateValidationError) ErrorName() string { + return "HashPolicy_FilterStateValidationError" +} + +// Error satisfies the builtin error interface +func (e HashPolicy_FilterStateValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHashPolicy_FilterState.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HashPolicy_FilterStateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HashPolicy_FilterStateValidationError{} diff --git a/pkg/api/envoy/type/v3/http.pb.go b/pkg/api/envoy/type/v3/http.pb.go index 2a57548309..6ce569e5cc 100644 --- a/pkg/api/envoy/type/v3/http.pb.go +++ b/pkg/api/envoy/type/v3/http.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/http.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CodecClientType int32 const ( @@ -88,11 +83,15 @@ var file_envoy_type_v3_http_proto_rawDesc = []byte{ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x32, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x02, 0x42, 0x32, 0x0a, 0x1b, + 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x02, 0x42, 0x6f, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x48, 0x74, 0x74, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, + 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/v3/http.pb.validate.go b/pkg/api/envoy/type/v3/http.pb.validate.go index f099568bd4..fff363617d 100644 --- a/pkg/api/envoy/type/v3/http.pb.validate.go +++ b/pkg/api/envoy/type/v3/http.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/http.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/type/v3/http_status.pb.go b/pkg/api/envoy/type/v3/http_status.pb.go index 088615431d..b048180a2b 100644 --- a/pkg/api/envoy/type/v3/http_status.pb.go +++ b/pkg/api/envoy/type/v3/http_status.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/http_status.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // HTTP response codes supported in Envoy. // For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml type StatusCode int32 @@ -384,11 +379,15 @@ var file_envoy_type_v3_http_status_proto_rawDesc = []byte{ 0x64, 0x10, 0xfc, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x10, 0xfe, 0x03, 0x12, 0x22, 0x0a, 0x1d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xff, 0x03, 0x42, 0x38, 0x0a, 0x1b, 0x69, 0x6f, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xff, 0x03, 0x42, 0x75, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/v3/http_status.pb.validate.go b/pkg/api/envoy/type/v3/http_status.pb.validate.go index 530eb9aa39..1c79cca0bf 100644 --- a/pkg/api/envoy/type/v3/http_status.pb.validate.go +++ b/pkg/api/envoy/type/v3/http_status.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/http_status.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,33 +31,77 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on HttpStatus with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *HttpStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpStatus with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpStatusMultiError, or +// nil if none found. +func (m *HttpStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpStatus) validate(all bool) error { if m == nil { return nil } + var errors []error + if _, ok := _HttpStatus_Code_NotInLookup[m.GetCode()]; ok { - return HttpStatusValidationError{ + err := HttpStatusValidationError{ field: "Code", reason: "value must not be in list [0]", } + if !all { + return err + } + errors = append(errors, err) } if _, ok := StatusCode_name[int32(m.GetCode())]; !ok { - return HttpStatusValidationError{ + err := HttpStatusValidationError{ field: "Code", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HttpStatusMultiError(errors) } return nil } +// HttpStatusMultiError is an error wrapping multiple validation errors +// returned by HttpStatus.ValidateAll() if the designated constraints aren't met. +type HttpStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpStatusMultiError) AllErrors() []error { return m } + // HttpStatusValidationError is the validation error returned by // HttpStatus.Validate if the designated constraints aren't met. type HttpStatusValidationError struct { diff --git a/pkg/api/envoy/type/v3/percent.pb.go b/pkg/api/envoy/type/v3/percent.pb.go index 156bc00023..36d849e83e 100644 --- a/pkg/api/envoy/type/v3/percent.pb.go +++ b/pkg/api/envoy/type/v3/percent.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/percent.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Fraction percentages support several fixed denominator values. type FractionalPercent_DenominatorType int32 @@ -230,11 +225,14 @@ var file_envoy_type_v3_percent_proto_rawDesc = []byte{ 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x42, 0x35, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6e, 0x74, 0x42, 0x72, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/v3/percent.pb.validate.go b/pkg/api/envoy/type/v3/percent.pb.validate.go index f3d7981718..25a5815f09 100644 --- a/pkg/api/envoy/type/v3/percent.pb.validate.go +++ b/pkg/api/envoy/type/v3/percent.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/percent.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,65 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Percent with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Percent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Percent with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in PercentMultiError, or nil if none found. +func (m *Percent) ValidateAll() error { + return m.validate(true) +} + +func (m *Percent) validate(all bool) error { if m == nil { return nil } + var errors []error + if val := m.GetValue(); val < 0 || val > 100 { - return PercentValidationError{ + err := PercentValidationError{ field: "Value", reason: "value must be inside range [0, 100]", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PercentMultiError(errors) } return nil } +// PercentMultiError is an error wrapping multiple validation errors returned +// by Percent.ValidateAll() if the designated constraints aren't met. +type PercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PercentMultiError) AllErrors() []error { return m } + // PercentValidationError is the validation error returned by Percent.Validate // if the designated constraints aren't met. type PercentValidationError struct { @@ -105,25 +145,64 @@ var _ interface { } = PercentValidationError{} // Validate checks the field values on FractionalPercent with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *FractionalPercent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FractionalPercent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// FractionalPercentMultiError, or nil if none found. +func (m *FractionalPercent) ValidateAll() error { + return m.validate(true) +} + +func (m *FractionalPercent) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Numerator if _, ok := FractionalPercent_DenominatorType_name[int32(m.GetDenominator())]; !ok { - return FractionalPercentValidationError{ + err := FractionalPercentValidationError{ field: "Denominator", reason: "value must be one of the defined enum values", } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FractionalPercentMultiError(errors) } return nil } +// FractionalPercentMultiError is an error wrapping multiple validation errors +// returned by FractionalPercent.ValidateAll() if the designated constraints +// aren't met. +type FractionalPercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FractionalPercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FractionalPercentMultiError) AllErrors() []error { return m } + // FractionalPercentValidationError is the validation error returned by // FractionalPercent.Validate if the designated constraints aren't met. type FractionalPercentValidationError struct { diff --git a/pkg/api/envoy/type/v3/range.pb.go b/pkg/api/envoy/type/v3/range.pb.go index 433455cd01..e9d4e0f1a3 100644 --- a/pkg/api/envoy/type/v3/range.pb.go +++ b/pkg/api/envoy/type/v3/range.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/range.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Specifies the int64 start and end of the range using half-open interval semantics [start, // end). type Int64Range struct { @@ -228,11 +223,15 @@ var file_envoy_type_v3_range_proto_rawDesc = []byte{ 0x28, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x3a, 0x1d, 0x9a, 0xc5, 0x88, 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x33, 0x0a, 0x1b, 0x69, 0x6f, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x70, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, + 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/v3/range.pb.validate.go b/pkg/api/envoy/type/v3/range.pb.validate.go index de64c2704a..b6a0f4ef58 100644 --- a/pkg/api/envoy/type/v3/range.pb.validate.go +++ b/pkg/api/envoy/type/v3/range.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/range.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,23 +31,59 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on Int64Range with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Int64Range) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int64Range with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Int64RangeMultiError, or +// nil if none found. +func (m *Int64Range) ValidateAll() error { + return m.validate(true) +} + +func (m *Int64Range) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Start // no validation rules for End + if len(errors) > 0 { + return Int64RangeMultiError(errors) + } + return nil } +// Int64RangeMultiError is an error wrapping multiple validation errors +// returned by Int64Range.ValidateAll() if the designated constraints aren't met. +type Int64RangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int64RangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int64RangeMultiError) AllErrors() []error { return m } + // Int64RangeValidationError is the validation error returned by // Int64Range.Validate if the designated constraints aren't met. type Int64RangeValidationError struct { @@ -102,19 +139,54 @@ var _ interface { } = 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. +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *Int32Range) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int32Range with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Int32RangeMultiError, or +// nil if none found. +func (m *Int32Range) ValidateAll() error { + return m.validate(true) +} + +func (m *Int32Range) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Start // no validation rules for End + if len(errors) > 0 { + return Int32RangeMultiError(errors) + } + return nil } +// Int32RangeMultiError is an error wrapping multiple validation errors +// returned by Int32Range.ValidateAll() if the designated constraints aren't met. +type Int32RangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int32RangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int32RangeMultiError) AllErrors() []error { return m } + // Int32RangeValidationError is the validation error returned by // Int32Range.Validate if the designated constraints aren't met. type Int32RangeValidationError struct { @@ -170,20 +242,54 @@ var _ interface { } = 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. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *DoubleRange) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DoubleRange with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DoubleRangeMultiError, or +// nil if none found. +func (m *DoubleRange) ValidateAll() error { + return m.validate(true) +} + +func (m *DoubleRange) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for Start // no validation rules for End + if len(errors) > 0 { + return DoubleRangeMultiError(errors) + } + return nil } +// DoubleRangeMultiError is an error wrapping multiple validation errors +// returned by DoubleRange.ValidateAll() if the designated constraints aren't met. +type DoubleRangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DoubleRangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DoubleRangeMultiError) AllErrors() []error { return m } + // DoubleRangeValidationError is the validation error returned by // DoubleRange.Validate if the designated constraints aren't met. type DoubleRangeValidationError struct { diff --git a/pkg/api/envoy/type/v3/ratelimit_unit.pb.go b/pkg/api/envoy/type/v3/ratelimit_unit.pb.go index 89301fe5a0..a6175f6f7d 100644 --- a/pkg/api/envoy/type/v3/ratelimit_unit.pb.go +++ b/pkg/api/envoy/type/v3/ratelimit_unit.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/ratelimit_unit.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Identifies the unit of of time for rate limit. type RateLimitUnit int32 @@ -99,11 +94,15 @@ var file_envoy_type_v3_ratelimit_unit_proto_rawDesc = []byte{ 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, - 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x42, 0x3b, 0x0a, 0x1b, 0x69, + 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x42, 0x78, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/v3/ratelimit_unit.pb.validate.go b/pkg/api/envoy/type/v3/ratelimit_unit.pb.validate.go index 00bc27fad9..472396797b 100644 --- a/pkg/api/envoy/type/v3/ratelimit_unit.pb.validate.go +++ b/pkg/api/envoy/type/v3/ratelimit_unit.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/ratelimit_unit.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,5 +31,6 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) diff --git a/pkg/api/envoy/type/v3/semantic_version.pb.go b/pkg/api/envoy/type/v3/semantic_version.pb.go index c7fb89f584..ff1e190947 100644 --- a/pkg/api/envoy/type/v3/semantic_version.pb.go +++ b/pkg/api/envoy/type/v3/semantic_version.pb.go @@ -1,14 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/semantic_version.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" + _ "github.com/cncf/xds/go/udpa/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Envoy uses SemVer (https://semver.org/). Major/minor versions indicate // expected behaviors and APIs, the patch version field is used only // for security fixes and can be generally ignored. @@ -111,12 +106,15 @@ var file_envoy_type_v3_semantic_version_proto_rawDesc = []byte{ 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x3d, 0x0a, 0x1b, 0x69, 0x6f, + 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x7a, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/v3/semantic_version.pb.validate.go b/pkg/api/envoy/type/v3/semantic_version.pb.validate.go index 0a93817441..e0db1e39d2 100644 --- a/pkg/api/envoy/type/v3/semantic_version.pb.validate.go +++ b/pkg/api/envoy/type/v3/semantic_version.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/semantic_version.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,26 +31,62 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on SemanticVersion with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *SemanticVersion) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SemanticVersion with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SemanticVersionMultiError, or nil if none found. +func (m *SemanticVersion) ValidateAll() error { + return m.validate(true) +} + +func (m *SemanticVersion) validate(all bool) error { if m == nil { return nil } + var errors []error + // no validation rules for MajorNumber // no validation rules for MinorNumber // no validation rules for Patch + if len(errors) > 0 { + return SemanticVersionMultiError(errors) + } + return nil } +// SemanticVersionMultiError is an error wrapping multiple validation errors +// returned by SemanticVersion.ValidateAll() if the designated constraints +// aren't met. +type SemanticVersionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SemanticVersionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SemanticVersionMultiError) AllErrors() []error { return m } + // SemanticVersionValidationError is the validation error returned by // SemanticVersion.Validate if the designated constraints aren't met. type SemanticVersionValidationError struct { diff --git a/pkg/api/envoy/type/v3/token_bucket.pb.go b/pkg/api/envoy/type/v3/token_bucket.pb.go index 477e02957d..c4f260feb9 100644 --- a/pkg/api/envoy/type/v3/token_bucket.pb.go +++ b/pkg/api/envoy/type/v3/token_bucket.pb.go @@ -1,15 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: envoy/type/v3/token_bucket.proto -package envoy_type_v3 +package typev3 import ( - _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/cncf/xds/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" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,10 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Configures a token bucket, typically used for rate limiting. type TokenBucket struct { state protoimpl.MessageState @@ -130,12 +125,15 @@ var file_envoy_type_v3_token_bucket_proto_rawDesc = []byte{ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x1d, 0x9a, 0xc5, 0x88, 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x39, + 0x70, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x76, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/envoy/type/v3/token_bucket.pb.validate.go b/pkg/api/envoy/type/v3/token_bucket.pb.validate.go index 1f14f68043..dbc6448ac7 100644 --- a/pkg/api/envoy/type/v3/token_bucket.pb.validate.go +++ b/pkg/api/envoy/type/v3/token_bucket.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/type/v3/token_bucket.proto -package envoy_type_v3 +package typev3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,66 +31,122 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on TokenBucket with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. func (m *TokenBucket) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TokenBucket with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TokenBucketMultiError, or +// nil if none found. +func (m *TokenBucket) ValidateAll() error { + return m.validate(true) +} + +func (m *TokenBucket) validate(all bool) error { if m == nil { return nil } + var errors []error + if m.GetMaxTokens() <= 0 { - return TokenBucketValidationError{ + err := TokenBucketValidationError{ field: "MaxTokens", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } if wrapper := m.GetTokensPerFill(); wrapper != nil { if wrapper.GetValue() <= 0 { - return TokenBucketValidationError{ + err := TokenBucketValidationError{ field: "TokensPerFill", reason: "value must be greater than 0", } + if !all { + return err + } + errors = append(errors, err) } } if m.GetFillInterval() == nil { - return TokenBucketValidationError{ + err := TokenBucketValidationError{ field: "FillInterval", reason: "value is required", } + if !all { + return err + } + errors = append(errors, err) } if d := m.GetFillInterval(); d != nil { - dur, err := ptypes.Duration(d) + dur, err := d.AsDuration(), d.CheckValid() if err != nil { - return TokenBucketValidationError{ + err = 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", + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := TokenBucketValidationError{ + field: "FillInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) } + } + } + if len(errors) > 0 { + return TokenBucketMultiError(errors) } return nil } +// TokenBucketMultiError is an error wrapping multiple validation errors +// returned by TokenBucket.ValidateAll() if the designated constraints aren't met. +type TokenBucketMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TokenBucketMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TokenBucketMultiError) AllErrors() []error { return m } + // TokenBucketValidationError is the validation error returned by // TokenBucket.Validate if the designated constraints aren't met. type TokenBucketValidationError struct { diff --git a/pkg/api/envoy/watchdog/v3/abort_action.pb.go b/pkg/api/envoy/watchdog/v3/abort_action.pb.go new file mode 100644 index 0000000000..bb763edc74 --- /dev/null +++ b/pkg/api/envoy/watchdog/v3/abort_action.pb.go @@ -0,0 +1,170 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/watchdog/v3/abort_action.proto + +package watchdogv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + duration "github.com/golang/protobuf/ptypes/duration" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A GuardDogAction that will terminate the process by killing the +// stuck thread. This would allow easier access to the call stack of the stuck +// thread since we would run signal handlers on that thread. By default +// this will be registered to run as the last watchdog action on KILL and +// MULTIKILL events if those are enabled. +type AbortActionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How long to wait for the thread to respond to the thread kill function + // before killing the process from this action. This is a blocking action. + // By default this is 5 seconds. + WaitDuration *duration.Duration `protobuf:"bytes,1,opt,name=wait_duration,json=waitDuration,proto3" json:"wait_duration,omitempty"` +} + +func (x *AbortActionConfig) Reset() { + *x = AbortActionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_watchdog_v3_abort_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AbortActionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AbortActionConfig) ProtoMessage() {} + +func (x *AbortActionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_watchdog_v3_abort_action_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AbortActionConfig.ProtoReflect.Descriptor instead. +func (*AbortActionConfig) Descriptor() ([]byte, []int) { + return file_envoy_watchdog_v3_abort_action_proto_rawDescGZIP(), []int{0} +} + +func (x *AbortActionConfig) GetWaitDuration() *duration.Duration { + if x != nil { + return x.WaitDuration + } + return nil +} + +var File_envoy_watchdog_v3_abort_action_proto protoreflect.FileDescriptor + +var file_envoy_watchdog_v3_abort_action_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, + 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x77, 0x61, + 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x11, 0x41, 0x62, 0x6f, 0x72, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, + 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x77, 0x61, 0x69, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x82, 0x01, + 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x42, 0x10, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x3b, + 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_watchdog_v3_abort_action_proto_rawDescOnce sync.Once + file_envoy_watchdog_v3_abort_action_proto_rawDescData = file_envoy_watchdog_v3_abort_action_proto_rawDesc +) + +func file_envoy_watchdog_v3_abort_action_proto_rawDescGZIP() []byte { + file_envoy_watchdog_v3_abort_action_proto_rawDescOnce.Do(func() { + file_envoy_watchdog_v3_abort_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_watchdog_v3_abort_action_proto_rawDescData) + }) + return file_envoy_watchdog_v3_abort_action_proto_rawDescData +} + +var file_envoy_watchdog_v3_abort_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_watchdog_v3_abort_action_proto_goTypes = []interface{}{ + (*AbortActionConfig)(nil), // 0: envoy.watchdog.v3.AbortActionConfig + (*duration.Duration)(nil), // 1: google.protobuf.Duration +} +var file_envoy_watchdog_v3_abort_action_proto_depIdxs = []int32{ + 1, // 0: envoy.watchdog.v3.AbortActionConfig.wait_duration:type_name -> google.protobuf.Duration + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_watchdog_v3_abort_action_proto_init() } +func file_envoy_watchdog_v3_abort_action_proto_init() { + if File_envoy_watchdog_v3_abort_action_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_watchdog_v3_abort_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AbortActionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_watchdog_v3_abort_action_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_watchdog_v3_abort_action_proto_goTypes, + DependencyIndexes: file_envoy_watchdog_v3_abort_action_proto_depIdxs, + MessageInfos: file_envoy_watchdog_v3_abort_action_proto_msgTypes, + }.Build() + File_envoy_watchdog_v3_abort_action_proto = out.File + file_envoy_watchdog_v3_abort_action_proto_rawDesc = nil + file_envoy_watchdog_v3_abort_action_proto_goTypes = nil + file_envoy_watchdog_v3_abort_action_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/watchdog/v3alpha/abort_action.pb.validate.go b/pkg/api/envoy/watchdog/v3/abort_action.pb.validate.go similarity index 52% rename from pkg/api/envoy/watchdog/v3alpha/abort_action.pb.validate.go rename to pkg/api/envoy/watchdog/v3/abort_action.pb.validate.go index 1d8974ac46..e215666a91 100644 --- a/pkg/api/envoy/watchdog/v3alpha/abort_action.pb.validate.go +++ b/pkg/api/envoy/watchdog/v3/abort_action.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/watchdog/v3alpha/abort_action.proto +// source: envoy/watchdog/v3/abort_action.proto -package envoy_watchdog_v3alpha +package watchdogv3 import ( "bytes" @@ -11,11 +11,12 @@ import ( "net/mail" "net/url" "regexp" + "sort" "strings" "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,18 +31,52 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} + _ = sort.Sort ) // Validate checks the field values on AbortActionConfig with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. func (m *AbortActionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AbortActionConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AbortActionConfigMultiError, or nil if none found. +func (m *AbortActionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AbortActionConfig) validate(all bool) error { if m == nil { return nil } - if v, ok := interface{}(m.GetWaitDuration()).(interface{ Validate() error }); ok { + var errors []error + + if all { + switch v := interface{}(m.GetWaitDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AbortActionConfigValidationError{ + field: "WaitDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AbortActionConfigValidationError{ + field: "WaitDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWaitDuration()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AbortActionConfigValidationError{ field: "WaitDuration", @@ -51,9 +86,30 @@ func (m *AbortActionConfig) Validate() error { } } + if len(errors) > 0 { + return AbortActionConfigMultiError(errors) + } + return nil } +// AbortActionConfigMultiError is an error wrapping multiple validation errors +// returned by AbortActionConfig.ValidateAll() if the designated constraints +// aren't met. +type AbortActionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AbortActionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AbortActionConfigMultiError) AllErrors() []error { return m } + // AbortActionConfigValidationError is the validation error returned by // AbortActionConfig.Validate if the designated constraints aren't met. type AbortActionConfigValidationError struct { diff --git a/pkg/api/envoy/watchdog/v3alpha/abort_action.pb.go b/pkg/api/envoy/watchdog/v3alpha/abort_action.pb.go deleted file mode 100644 index 3335104133..0000000000 --- a/pkg/api/envoy/watchdog/v3alpha/abort_action.pb.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: envoy/watchdog/v3alpha/abort_action.proto - -package envoy_watchdog_v3alpha - -import ( - _ "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" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A GuardDogAction that will terminate the process by killing the -// stuck thread. This would allow easier access to the call stack of the stuck -// thread since we would run signal handlers on that thread. By default -// this will be registered to run as the last watchdog action on KILL and -// MULTIKILL events if those are enabled. -type AbortActionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // How long to wait for the thread to respond to the thread kill function - // before killing the process from this action. This is a blocking action. - // By default this is 5 seconds. - WaitDuration *duration.Duration `protobuf:"bytes,1,opt,name=wait_duration,json=waitDuration,proto3" json:"wait_duration,omitempty"` -} - -func (x *AbortActionConfig) Reset() { - *x = AbortActionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_watchdog_v3alpha_abort_action_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AbortActionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AbortActionConfig) ProtoMessage() {} - -func (x *AbortActionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_watchdog_v3alpha_abort_action_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AbortActionConfig.ProtoReflect.Descriptor instead. -func (*AbortActionConfig) Descriptor() ([]byte, []int) { - return file_envoy_watchdog_v3alpha_abort_action_proto_rawDescGZIP(), []int{0} -} - -func (x *AbortActionConfig) GetWaitDuration() *duration.Duration { - if x != nil { - return x.WaitDuration - } - return nil -} - -var File_envoy_watchdog_v3alpha_abort_action_proto protoreflect.FileDescriptor - -var file_envoy_watchdog_v3alpha_abort_action_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, - 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, - 0x0a, 0x11, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x4a, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, - 0x64, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x10, 0x41, 0x62, 0x6f, - 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_watchdog_v3alpha_abort_action_proto_rawDescOnce sync.Once - file_envoy_watchdog_v3alpha_abort_action_proto_rawDescData = file_envoy_watchdog_v3alpha_abort_action_proto_rawDesc -) - -func file_envoy_watchdog_v3alpha_abort_action_proto_rawDescGZIP() []byte { - file_envoy_watchdog_v3alpha_abort_action_proto_rawDescOnce.Do(func() { - file_envoy_watchdog_v3alpha_abort_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_watchdog_v3alpha_abort_action_proto_rawDescData) - }) - return file_envoy_watchdog_v3alpha_abort_action_proto_rawDescData -} - -var file_envoy_watchdog_v3alpha_abort_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_watchdog_v3alpha_abort_action_proto_goTypes = []interface{}{ - (*AbortActionConfig)(nil), // 0: envoy.watchdog.v3alpha.AbortActionConfig - (*duration.Duration)(nil), // 1: google.protobuf.Duration -} -var file_envoy_watchdog_v3alpha_abort_action_proto_depIdxs = []int32{ - 1, // 0: envoy.watchdog.v3alpha.AbortActionConfig.wait_duration:type_name -> google.protobuf.Duration - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_watchdog_v3alpha_abort_action_proto_init() } -func file_envoy_watchdog_v3alpha_abort_action_proto_init() { - if File_envoy_watchdog_v3alpha_abort_action_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_watchdog_v3alpha_abort_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AbortActionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_watchdog_v3alpha_abort_action_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_watchdog_v3alpha_abort_action_proto_goTypes, - DependencyIndexes: file_envoy_watchdog_v3alpha_abort_action_proto_depIdxs, - MessageInfos: file_envoy_watchdog_v3alpha_abort_action_proto_msgTypes, - }.Build() - File_envoy_watchdog_v3alpha_abort_action_proto = out.File - file_envoy_watchdog_v3alpha_abort_action_proto_rawDesc = nil - file_envoy_watchdog_v3alpha_abort_action_proto_goTypes = nil - file_envoy_watchdog_v3alpha_abort_action_proto_depIdxs = nil -} diff --git a/pkg/api/pb/lyft/ratelimit/rls.pb.go b/pkg/api/pb/lyft/ratelimit/rls.pb.go deleted file mode 100644 index 9591d3512c..0000000000 --- a/pkg/api/pb/lyft/ratelimit/rls.pb.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: pb/lyft/ratelimit/rls.proto - -package pb_lyft_ratelimit - -import ( - context "context" - _ "github.com/cncf/udpa/go/udpa/annotations" - v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/ratelimit/v2" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -var File_pb_lyft_ratelimit_rls_proto protoreflect.FileDescriptor - -var file_pb_lyft_ratelimit_rls_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x70, 0x62, 0x2f, 0x6c, 0x79, 0x66, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x70, - 0x62, 0x2e, 0x6c, 0x79, 0x66, 0x74, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6c, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, - 0x6f, 0x75, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, - 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x5a, 0x0a, 0x1f, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x62, - 0x2e, 0x6c, 0x79, 0x66, 0x74, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, - 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x1c, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_pb_lyft_ratelimit_rls_proto_goTypes = []interface{}{ - (*v2.RateLimitRequest)(nil), // 0: envoy.service.ratelimit.v2.RateLimitRequest - (*v2.RateLimitResponse)(nil), // 1: envoy.service.ratelimit.v2.RateLimitResponse -} -var file_pb_lyft_ratelimit_rls_proto_depIdxs = []int32{ - 0, // 0: pb.lyft.ratelimit.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v2.RateLimitRequest - 1, // 1: pb.lyft.ratelimit.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v2.RateLimitResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pb_lyft_ratelimit_rls_proto_init() } -func file_pb_lyft_ratelimit_rls_proto_init() { - if File_pb_lyft_ratelimit_rls_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pb_lyft_ratelimit_rls_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_pb_lyft_ratelimit_rls_proto_goTypes, - DependencyIndexes: file_pb_lyft_ratelimit_rls_proto_depIdxs, - }.Build() - File_pb_lyft_ratelimit_rls_proto = out.File - file_pb_lyft_ratelimit_rls_proto_rawDesc = nil - file_pb_lyft_ratelimit_rls_proto_goTypes = nil - file_pb_lyft_ratelimit_rls_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RateLimitServiceClient is the client API for RateLimitService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RateLimitServiceClient interface { - ShouldRateLimit(ctx context.Context, in *v2.RateLimitRequest, opts ...grpc.CallOption) (*v2.RateLimitResponse, error) -} - -type rateLimitServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient { - return &rateLimitServiceClient{cc} -} - -func (c *rateLimitServiceClient) ShouldRateLimit(ctx context.Context, in *v2.RateLimitRequest, opts ...grpc.CallOption) (*v2.RateLimitResponse, error) { - out := new(v2.RateLimitResponse) - err := c.cc.Invoke(ctx, "/pb.lyft.ratelimit.RateLimitService/ShouldRateLimit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RateLimitServiceServer is the server API for RateLimitService service. -type RateLimitServiceServer interface { - ShouldRateLimit(context.Context, *v2.RateLimitRequest) (*v2.RateLimitResponse, error) -} - -// UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRateLimitServiceServer struct { -} - -func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(context.Context, *v2.RateLimitRequest) (*v2.RateLimitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ShouldRateLimit not implemented") -} - -func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer) { - s.RegisterService(&_RateLimitService_serviceDesc, srv) -} - -func _RateLimitService_ShouldRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v2.RateLimitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.lyft.ratelimit.RateLimitService/ShouldRateLimit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, req.(*v2.RateLimitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RateLimitService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pb.lyft.ratelimit.RateLimitService", - HandlerType: (*RateLimitServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ShouldRateLimit", - Handler: _RateLimitService_ShouldRateLimit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "pb/lyft/ratelimit/rls.proto", -} diff --git a/pkg/api/pb/lyft/ratelimit/rls.pb.validate.go b/pkg/api/pb/lyft/ratelimit/rls.pb.validate.go deleted file mode 100644 index a12fea4198..0000000000 --- a/pkg/api/pb/lyft/ratelimit/rls.pb.validate.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: pb/lyft/ratelimit/rls.proto - -package pb_lyft_ratelimit - -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{} -) diff --git a/pkg/envoy-control-plane/CHANGELOG.md b/pkg/envoy-control-plane/CHANGELOG.md index c9af52d192..f46c5f6a6c 100644 --- a/pkg/envoy-control-plane/CHANGELOG.md +++ b/pkg/envoy-control-plane/CHANGELOG.md @@ -1,9 +1,54 @@ # Changelog -## Release v0.9.8 +## Release v0.10.0 ### Added -- Support for setting TTL on resources and configuring resource heartbeating + +- Added snapshot support in the Linear cache (#437) +- Added CI linting support (#455) +- Incremental xDS support for Linear and Mux caches (#459) +- Added Extension Configs support (#417) +- Added a default cache logger (#483) +- Added Scoped Routes Discovery Service - SRDS (#495) + +### Changed + +- Removed linearization in server API to preserve cache ordering (#443) +- SetSnapshot now takes a `context` (#474) +- Delta xDS now responds immediately for the first wildcard request in a delta stream if the corresponding snapshot exists and the response is empty (#473) +- Reworked snapshot API to faciliate additional xDS resources without changes (#484) +- Delta xDS won't delete non-existent resources in wildcard mode (#488) +- Simple cache now holds a read lock when cancelling a snapshot watch (#507) + +### Fixed + +- Delta xDS not registering another watch after resource sent (#458) +- Fixed data race in Linear cache (#502) +- State of the World now tracks known resource names per caller stream (#508) + + +## Release v0.9.9 + +### Added + +- Add snapshot support for ECDS (#379) +- Add cache support for xDS TTLs (#359) +- Add cache interfaces for incremental xDS (#408) +- Incremental simple cache implementation (#411) + +### Changed + +- Envoy APIs are at b6039234e526eeccdf332a7eb041729aaa1bc286 +- Update dependencies to use `cncf/xds` instead of `cncf/udpa` (#404) +- Log ignoring a watch at warn level (#352) +- Removed support for V2 Envoy APIs in the server (#415) + +### Fixed + +- Go 1.16 compatibility fixes (#409) +- Fix a potential goroutine leak in stream handler (#430) + +## Release v0.9.8 ### Changed diff --git a/pkg/envoy-control-plane/OWNERS.md b/pkg/envoy-control-plane/OWNERS.md index 02918ba082..98c94cd454 100644 --- a/pkg/envoy-control-plane/OWNERS.md +++ b/pkg/envoy-control-plane/OWNERS.md @@ -5,5 +5,5 @@ right place. * Kuat Yessenov ([kyessenov](https://github.com/kyessenov)) (kuat@google.com) * Yangmin Zhu ([yangminzhu](https://github.com/yangminzhu)) (ymzhu@google.com) -* Jyoti Mahapatra ([jyotimahapatra](https://github.com/jyotimahapatra)) (jmahapatra@lyft.com) -* Jess Yuen ([jessicayuen](https://github.com/jessicayuen)) (jyuen@lyft.com) +* Snow Pettersen ([snowp](https://github.com/snowp)) (snowp@lyft.com) +* Alec Holmes ([alecholmez](https://github.com/alecholmez)) (alec.holmes@greymatter.io) diff --git a/pkg/envoy-control-plane/README.md b/pkg/envoy-control-plane/README.md index cffee3a0e4..e562169e8d 100644 --- a/pkg/envoy-control-plane/README.md +++ b/pkg/envoy-control-plane/README.md @@ -1,6 +1,6 @@ # control-plane -[![CircleCI](https://circleci.com/gh/envoyproxy/go-control-plane.svg?style=svg)](https://circleci.com/gh/envoyproxy/go-control-plane) +![example workflow](https://github.com/envoyproxy/go-control-plane/actions/workflows/ci.yaml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/envoyproxy/go-control-plane)](https://goreportcard.com/report/github.com/envoyproxy/go-control-plane) [![GoDoc](https://godoc.org/github.com/envoyproxy/go-control-plane?status.svg)](https://godoc.org/github.com/envoyproxy/go-control-plane) @@ -43,19 +43,13 @@ feedback, we might decided to revisit this aspect at a later point in time. ## Quick start -It's recommended to run the command with script `./build/run_docker.sh` as it executes the command -in the same environment as the circle ci. This makes sure to produce a consistent set of generated files. +It's recommended to run the tests with `make docker_tests` as it executes the tests +in the same environment as CI. This makes sure to produce a consistent set of generated files. -1. Setup existing build: +1. Build and run tests: ```sh - ./build/run_docker.sh make build test - ``` - -1. Run [integration test](pkg/test/main/README.md) against the latest Envoy binary: - - ```sh - ./build/run_docker.sh make integration + make docker_tests ``` 1. Take a look at the [example server](internal/example/README.md). @@ -64,14 +58,14 @@ in the same environment as the circle ci. This makes sure to produce a consisten ## XDS API versioning The Envoy xDS APIs follow a well defined [versioning scheme](https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/versioning). -Due to lack of generics and function overloading in golang, creating a new version unfortunately involves code duplication. -Based on the discussion [here](https://docs.google.com/document/d/1ZkHpz6DwEUmAlG0kb2Mgu4iaeQC2Bbb0egMbECoNNKY/edit?ts=5e602993#heading=h.15nsmgmjaaml) and [here](https://envoyproxy.slack.com/archives/C7LDJTM6Z/p1582925082005300), go-control-plane is adopting a mechanism to create a new version from an existing version by running a script. -In order to handle deprecated/new fields between versions, make sure to create a shim such that duplication remains minimal. One such example today is how different [resource urls](https://github.com/envoyproxy/go-control-plane/tree/master/pkg/resource) are handled. -For authoring changes, make changes to v2 and at the end, use `make create_version` to create the v3 specific files. -Make sure to run `make build` and `make test` to identify and fix failures. +### Deprecated + +`V2` control-plane code has been removed and will no longer be supported. For previous conversations on support for various xDS versions, see here: +- [here](https://docs.google.com/document/d/1ZkHpz6DwEUmAlG0kb2Mgu4iaeQC2Bbb0egMbECoNNKY/edit?ts=5e602993#heading=h.15nsmgmjaaml) +- [here](https://envoyproxy.slack.com/archives/C7LDJTM6Z/p1582925082005300) -When v2 version is frozen in the future, we will change the experience such that changes will need to happen to v3 and autogen will create the v2 version instead. +*Note*: It is recommended to use a previous SHA if there is still a need for `V2`. ## Resource caching @@ -100,4 +94,3 @@ repository: ## Usage The [example server](internal/example/README.md) demonstrates how to integrate the go-control-plane with your code. - diff --git a/pkg/envoy-control-plane/cache/types/types.go b/pkg/envoy-control-plane/cache/types/types.go index e0b87452c0..74db427dd7 100644 --- a/pkg/envoy-control-plane/cache/types/types.go +++ b/pkg/envoy-control-plane/cache/types/types.go @@ -3,7 +3,7 @@ package types import ( "time" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // Resource is the base interface for the xDS payload. @@ -11,11 +11,10 @@ type Resource interface { proto.Message } -// ResourceWithTtl is a Resource with an optional TTL. -type ResourceWithTtl struct { +// ResourceWithTTL is a Resource with an optional TTL. +type ResourceWithTTL struct { Resource Resource - - Ttl *time.Duration + TTL *time.Duration } // MarshaledResource is an alias for the serialized binary array. @@ -37,6 +36,7 @@ const ( Endpoint ResponseType = iota Cluster Route + ScopedRoute Listener Secret Runtime diff --git a/pkg/envoy-control-plane/cache/v2/cache.go b/pkg/envoy-control-plane/cache/v2/cache.go deleted file mode 100644 index 618f87552b..0000000000 --- a/pkg/envoy-control-plane/cache/v2/cache.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package cache defines a configuration cache for the server. -package cache - -import ( - "context" - "fmt" - "sync/atomic" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - ttl "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/ttl/v2" - "github.com/golang/protobuf/ptypes/any" -) - -// Request is an alias for the discovery request type. -type Request = discovery.DiscoveryRequest - -// ConfigWatcher requests watches for configuration resources by a node, last -// applied version identifier, and resource names hint. The watch should send -// the responses when they are ready. The watch can be cancelled by the -// consumer, in effect terminating the watch for the request. -// ConfigWatcher implementation must be thread-safe. -type ConfigWatcher interface { - // CreateWatch returns a new open watch from a non-empty request. - // An individual consumer normally issues a single open watch by each type URL. - // - // Value channel produces requested resources, once they are available. If - // the channel is closed prior to cancellation of the watch, an unrecoverable - // error has occurred in the producer, and the consumer should close the - // corresponding stream. - // - // Cancel is an optional function to release resources in the producer. If - // provided, the consumer may call this function multiple times. - CreateWatch(*Request) (value chan Response, cancel func()) -} - -// ConfigFetcher fetches configuration resources from cache -type ConfigFetcher interface { - // Fetch implements the polling method of the config cache using a non-empty request. - Fetch(context.Context, *Request) (Response, error) -} - -// Cache is a generic config cache with a watcher. -type Cache interface { - ConfigWatcher - ConfigFetcher -} - -// Response is a wrapper around Envoy's DiscoveryResponse. -type Response interface { - // Get the Constructed DiscoveryResponse - GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) - - // Get the original Request for the Response. - GetRequest() *discovery.DiscoveryRequest - - // Get the version in the Response. - GetVersion() (string, error) -} - -// RawResponse is a pre-serialized xDS response containing the raw resources to -// be included in the final Discovery Response. -type RawResponse struct { - // Request is the original request. - Request *discovery.DiscoveryRequest - - // Version of the resources as tracked by the cache for the given type. - // Proxy responds with this version as an acknowledgement. - Version string - - // Resources to be included in the response. - Resources []types.ResourceWithTtl - - // Whether this is a heartbeat response. For xDS versions that support TTL, this - // will be converted into a response that doesn't contain the actual resource protobuf. - // This allows for more lightweight updates that server only to update the TTL timer. - Heartbeat bool - - // marshaledResponse holds an atomic reference to the serialized discovery response. - marshaledResponse atomic.Value -} - -var _ Response = &RawResponse{} - -// PassthroughResponse is a pre constructed xDS response that need not go through marshalling transformations. -type PassthroughResponse struct { - // Request is the original request. - Request *discovery.DiscoveryRequest - - // The discovery response that needs to be sent as is, without any marshalling transformations. - DiscoveryResponse *discovery.DiscoveryResponse -} - -var _ Response = &PassthroughResponse{} - -// GetDiscoveryResponse performs the marshalling the first time its called and uses the cached response subsequently. -// This is necessary because the marshalled response does not change across the calls. -// This caching behavior is important in high throughput scenarios because grpc marshalling has a cost and it drives the cpu utilization under load. -func (r *RawResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) { - - marshaledResponse := r.marshaledResponse.Load() - - if marshaledResponse == nil { - - marshaledResources := make([]*any.Any, len(r.Resources)) - - for i, resource := range r.Resources { - maybeTtldResource, resourceType, err := ttl.MaybeCreateTtlResourceIfSupported(resource, GetResourceName(resource.Resource), r.Request.TypeUrl, r.Heartbeat) - if err != nil { - return nil, err - } - marshaledResource, err := MarshalResource(maybeTtldResource) - if err != nil { - return nil, err - } - marshaledResources[i] = &any.Any{ - TypeUrl: resourceType, - Value: marshaledResource, - } - } - - marshaledResponse = &discovery.DiscoveryResponse{ - VersionInfo: r.Version, - Resources: marshaledResources, - TypeUrl: r.Request.TypeUrl, - } - - r.marshaledResponse.Store(marshaledResponse) - } - - return marshaledResponse.(*discovery.DiscoveryResponse), nil -} - -// GetRequest returns the original Discovery Request. -func (r *RawResponse) GetRequest() *discovery.DiscoveryRequest { - return r.Request -} - -// GetVersion returns the response version. -func (r *RawResponse) GetVersion() (string, error) { - return r.Version, nil -} - -// GetDiscoveryResponse returns the final passthrough Discovery Response. -func (r *PassthroughResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) { - return r.DiscoveryResponse, nil -} - -// GetRequest returns the original Discovery Request -func (r *PassthroughResponse) GetRequest() *discovery.DiscoveryRequest { - return r.Request -} - -// GetVersion returns the response version. -func (r *PassthroughResponse) GetVersion() (string, error) { - if r.DiscoveryResponse != nil { - return r.DiscoveryResponse.VersionInfo, nil - } - return "", fmt.Errorf("DiscoveryResponse is nil") -} diff --git a/pkg/envoy-control-plane/cache/v2/cache_test.go b/pkg/envoy-control-plane/cache/v2/cache_test.go deleted file mode 100644 index b60cb8dff7..0000000000 --- a/pkg/envoy-control-plane/cache/v2/cache_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package cache_test - -import ( - "testing" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - ttl_helper "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/ttl/v2" - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/any" - "github.com/stretchr/testify/assert" -) - -const ( - resourceName = "route1" -) - -func TestResponseGetDiscoveryResponse(t *testing.T) { - routes := []types.ResourceWithTtl{{Resource: &route.RouteConfiguration{Name: resourceName}}} - resp := cache.RawResponse{ - Request: &discovery.DiscoveryRequest{TypeUrl: resource.RouteType}, - Version: "v", - Resources: routes, - } - - discoveryResponse, err := resp.GetDiscoveryResponse() - assert.Nil(t, err) - assert.Equal(t, discoveryResponse.VersionInfo, resp.Version) - assert.Equal(t, len(discoveryResponse.Resources), 1) - - cachedResponse, err := resp.GetDiscoveryResponse() - assert.Nil(t, err) - assert.Same(t, discoveryResponse, cachedResponse) - - r := &route.RouteConfiguration{} - err = ptypes.UnmarshalAny(discoveryResponse.Resources[0], r) - assert.Nil(t, err) - assert.Equal(t, r.Name, resourceName) -} - -func TestPassthroughResponseGetDiscoveryResponse(t *testing.T) { - routes := []types.Resource{&route.RouteConfiguration{Name: resourceName}} - rsrc, err := ptypes.MarshalAny(routes[0]) - assert.Nil(t, err) - dr := &discovery.DiscoveryResponse{ - TypeUrl: resource.RouteType, - Resources: []*any.Any{rsrc}, - VersionInfo: "v", - } - resp := cache.PassthroughResponse{ - Request: &discovery.DiscoveryRequest{TypeUrl: resource.RouteType}, - DiscoveryResponse: dr, - } - - discoveryResponse, err := resp.GetDiscoveryResponse() - assert.Nil(t, err) - assert.Equal(t, discoveryResponse.VersionInfo, resp.DiscoveryResponse.VersionInfo) - assert.Equal(t, len(discoveryResponse.Resources), 1) - - r := &route.RouteConfiguration{} - err = ptypes.UnmarshalAny(discoveryResponse.Resources[0], r) - assert.Nil(t, err) - assert.Equal(t, r.Name, resourceName) - assert.Equal(t, discoveryResponse, dr) -} - -func TestHeartbeatResponseGetDiscoveryResponse(t *testing.T) { - routes := []types.ResourceWithTtl{{Resource: &route.RouteConfiguration{Name: resourceName}}} - resp := cache.RawResponse{ - Request: &discovery.DiscoveryRequest{TypeUrl: resource.RouteType}, - Version: "v", - Resources: routes, - Heartbeat: true, - } - - discoveryResponse, err := resp.GetDiscoveryResponse() - assert.Nil(t, err) - assert.Equal(t, discoveryResponse.VersionInfo, resp.Version) - assert.Equal(t, len(discoveryResponse.Resources), 1) - assert.True(t, ttl_helper.IsTTLResource(discoveryResponse.Resources[0])) - - cachedResponse, err := resp.GetDiscoveryResponse() - assert.Nil(t, err) - assert.Same(t, discoveryResponse, cachedResponse) - - r := &route.RouteConfiguration{} - err = ptypes.UnmarshalAny(discoveryResponse.Resources[0], r) - assert.Nil(t, err) - assert.Equal(t, r.Name, resourceName) -} diff --git a/pkg/envoy-control-plane/cache/v2/linear.go b/pkg/envoy-control-plane/cache/v2/linear.go deleted file mode 100644 index 0af7cacdab..0000000000 --- a/pkg/envoy-control-plane/cache/v2/linear.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2020 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "context" - "errors" - "strconv" - "strings" - "sync" - - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" -) - -type watches = map[chan Response]struct{} - -// LinearCache supports collectons of opaque resources. This cache has a -// single collection indexed by resource names and manages resource versions -// internally. It implements the cache interface for a single type URL and -// should be combined with other caches via type URL muxing. It can be used to -// supply EDS entries, for example, uniformly across a fleet of proxies. -type LinearCache struct { - // Type URL specific to the cache. - typeURL string - // Collection of resources indexed by name. - resources map[string]types.Resource - // Watches open by clients, indexed by resource name. Whenever resources - // are changed, the watch is triggered. - watches map[string]watches - // Set of watches for all resources in the collection - watchAll watches - // Continously incremented version - version uint64 - // Version prefix to be sent to the clients - versionPrefix string - // Versions for each resource by name. - versionVector map[string]uint64 - mu sync.Mutex -} - -var _ Cache = &LinearCache{} - -// Options for modifying the behavior of the linear cache. -type LinearCacheOption func(*LinearCache) - -// WithVersionPrefix sets a version prefix of the form "prefixN" in the version info. -// Version prefix can be used to distinguish replicated instances of the cache, in case -// a client re-connects to another instance. -func WithVersionPrefix(prefix string) LinearCacheOption { - return func(cache *LinearCache) { - cache.versionPrefix = prefix - } -} - -// WithInitialResources initializes the initial set of resources. -func WithInitialResources(resources map[string]types.Resource) LinearCacheOption { - return func(cache *LinearCache) { - cache.resources = resources - for name := range resources { - cache.versionVector[name] = 0 - } - } -} - -// NewLinearCache creates a new cache. See the comments on the struct definition. -func NewLinearCache(typeURL string, opts ...LinearCacheOption) *LinearCache { - out := &LinearCache{ - typeURL: typeURL, - resources: make(map[string]types.Resource), - watches: make(map[string]watches), - watchAll: make(watches), - version: 0, - versionVector: make(map[string]uint64), - } - for _, opt := range opts { - opt(out) - } - return out -} - -func (cache *LinearCache) respond(value chan Response, staleResources []string) { - var resources []types.ResourceWithTtl - // TODO: optimize the resources slice creations across different clients - if len(staleResources) == 0 { - resources = make([]types.ResourceWithTtl, 0, len(cache.resources)) - for _, resource := range cache.resources { - resources = append(resources, types.ResourceWithTtl{Resource: resource}) - } - } else { - resources = make([]types.ResourceWithTtl, 0, len(staleResources)) - for _, name := range staleResources { - resource := cache.resources[name] - if resource != nil { - resources = append(resources, types.ResourceWithTtl{Resource: resource}) - } - } - } - value <- &RawResponse{ - Request: &Request{TypeUrl: cache.typeURL}, - Resources: resources, - Version: cache.versionPrefix + strconv.FormatUint(cache.version, 10), - } -} - -func (cache *LinearCache) notifyAll(modified map[string]struct{}) { - // de-duplicate watches that need to be responded - notifyList := make(map[chan Response][]string) - for name := range modified { - for watch := range cache.watches[name] { - notifyList[watch] = append(notifyList[watch], name) - } - delete(cache.watches, name) - } - for value, stale := range notifyList { - cache.respond(value, stale) - } - for value := range cache.watchAll { - cache.respond(value, nil) - } - cache.watchAll = make(watches) -} - -// UpdateResource updates a resource in the collection. -func (cache *LinearCache) UpdateResource(name string, res types.Resource) error { - if res == nil { - return errors.New("nil resource") - } - cache.mu.Lock() - defer cache.mu.Unlock() - - cache.version += 1 - cache.versionVector[name] = cache.version - cache.resources[name] = res - - // TODO: batch watch closures to prevent rapid updates - cache.notifyAll(map[string]struct{}{name: {}}) - - return nil -} - -// DeleteResource removes a resource in the collection. -func (cache *LinearCache) DeleteResource(name string) error { - cache.mu.Lock() - defer cache.mu.Unlock() - - cache.version += 1 - delete(cache.versionVector, name) - delete(cache.resources, name) - - // TODO: batch watch closures to prevent rapid updates - cache.notifyAll(map[string]struct{}{name: {}}) - return nil -} - -func (cache *LinearCache) CreateWatch(request *Request) (chan Response, func()) { - value := make(chan Response, 1) - if request.TypeUrl != cache.typeURL { - close(value) - return value, nil - } - // If the version is not up to date, check whether any requested resource has - // been updated between the last version and the current version. This avoids the problem - // of sending empty updates whenever an irrelevant resource changes. - stale := false - staleResources := []string{} // empty means all - - // strip version prefix if it is present - var lastVersion uint64 - var err error - if strings.HasPrefix(request.VersionInfo, cache.versionPrefix) { - lastVersion, err = strconv.ParseUint(request.VersionInfo[len(cache.versionPrefix):], 0, 64) - } else { - err = errors.New("mis-matched version prefix") - } - - cache.mu.Lock() - defer cache.mu.Unlock() - - if err != nil { - stale = true - staleResources = request.ResourceNames - } else if len(request.ResourceNames) == 0 { - stale = lastVersion != cache.version - } else { - for _, name := range request.ResourceNames { - // When a resource is removed, its version defaults 0 and it is not considered stale. - if lastVersion < cache.versionVector[name] { - stale = true - staleResources = append(staleResources, name) - } - } - } - if stale { - cache.respond(value, staleResources) - return value, nil - } - // Create open watches since versions are up to date. - if len(request.ResourceNames) == 0 { - cache.watchAll[value] = struct{}{} - return value, func() { - cache.mu.Lock() - defer cache.mu.Unlock() - delete(cache.watchAll, value) - } - } - for _, name := range request.ResourceNames { - set, exists := cache.watches[name] - if !exists { - set = make(watches) - cache.watches[name] = set - } - set[value] = struct{}{} - } - return value, func() { - cache.mu.Lock() - defer cache.mu.Unlock() - for _, name := range request.ResourceNames { - set, exists := cache.watches[name] - if exists { - delete(set, value) - } - if len(set) == 0 { - delete(cache.watches, name) - } - } - } -} - -func (cache *LinearCache) Fetch(ctx context.Context, request *Request) (Response, error) { - return nil, errors.New("not implemented") -} - -// Number of active watches for a resource name. -func (cache *LinearCache) NumWatches(name string) int { - cache.mu.Lock() - defer cache.mu.Unlock() - return len(cache.watches[name]) + len(cache.watchAll) -} diff --git a/pkg/envoy-control-plane/cache/v2/linear_test.go b/pkg/envoy-control-plane/cache/v2/linear_test.go deleted file mode 100644 index 6950583074..0000000000 --- a/pkg/envoy-control-plane/cache/v2/linear_test.go +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright 2020 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "fmt" - "testing" - - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - wrappers "github.com/golang/protobuf/ptypes/wrappers" -) - -const ( - testType = "google.protobuf.StringValue" -) - -func testResource(s string) types.Resource { - return &wrappers.StringValue{Value: s} -} - -func verifyResponse(t *testing.T, ch <-chan Response, version string, num int) { - t.Helper() - r := <-ch - if r.GetRequest().TypeUrl != testType { - t.Errorf("unexpected empty request type URL: %q", r.GetRequest().TypeUrl) - } - out, err := r.GetDiscoveryResponse() - if err != nil { - t.Fatal(err) - } - if out.VersionInfo == "" { - t.Error("unexpected response empty version") - } - if n := len(out.Resources); n != num { - t.Errorf("unexpected number of responses: got %d, want %d", n, num) - } - if version != "" && out.VersionInfo != version { - t.Errorf("unexpected version: got %q, want %q", out.VersionInfo, version) - } - if out.TypeUrl != testType { - t.Errorf("unexpected type URL: %q", out.TypeUrl) - } -} - -func checkWatchCount(t *testing.T, c *LinearCache, name string, count int) { - t.Helper() - if i := c.NumWatches(name); i != count { - t.Errorf("unexpected number of watches for %q: got %d, want %d", name, i, count) - } -} - -func mustBlock(t *testing.T, w <-chan Response) { - select { - case <-w: - t.Error("watch must block") - default: - } -} - -func TestLinearInitialResources(t *testing.T) { - c := NewLinearCache(testType, WithInitialResources(map[string]types.Resource{"a": testResource("a"), "b": testResource("b")})) - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType}) - verifyResponse(t, w, "0", 1) - w, _ = c.CreateWatch(&Request{TypeUrl: testType}) - verifyResponse(t, w, "0", 2) -} - -func TestLinearCornerCases(t *testing.T) { - c := NewLinearCache(testType) - err := c.UpdateResource("a", nil) - if err == nil { - t.Error("expected error on nil resource") - } - // create an incorrect type URL request - w, _ := c.CreateWatch(&Request{TypeUrl: "test"}) - select { - case _, more := <-w: - if more { - t.Error("should be closed by the producer") - } - default: - t.Error("channel should be closed") - } -} - -func TestLinearBasic(t *testing.T) { - c := NewLinearCache(testType) - - // Create watches before a resource is ready - w1, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) - mustBlock(t, w1) - w, _ := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) - mustBlock(t, w) - checkWatchCount(t, c, "a", 2) - checkWatchCount(t, c, "b", 1) - c.UpdateResource("a", testResource("a")) - checkWatchCount(t, c, "a", 0) - checkWatchCount(t, c, "b", 0) - verifyResponse(t, w1, "1", 1) - verifyResponse(t, w, "1", 1) - - // Request again, should get same response - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) - checkWatchCount(t, c, "a", 0) - verifyResponse(t, w, "1", 1) - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) - checkWatchCount(t, c, "a", 0) - verifyResponse(t, w, "1", 1) - - // Add another element and update the first, response should be different - c.UpdateResource("b", testResource("b")) - c.UpdateResource("a", testResource("aa")) - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) - verifyResponse(t, w, "3", 1) - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) - verifyResponse(t, w, "3", 2) -} - -func TestLinearVersionPrefix(t *testing.T) { - c := NewLinearCache(testType, WithVersionPrefix("instance1-")) - - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) - verifyResponse(t, w, "instance1-0", 0) - - c.UpdateResource("a", testResource("a")) - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) - verifyResponse(t, w, "instance1-1", 1) - - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "instance1-1"}) - mustBlock(t, w) - checkWatchCount(t, c, "a", 1) -} - -func TestLinearDeletion(t *testing.T) { - c := NewLinearCache(testType, WithInitialResources(map[string]types.Resource{"a": testResource("a"), "b": testResource("b")})) - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) - mustBlock(t, w) - checkWatchCount(t, c, "a", 1) - c.DeleteResource("a") - verifyResponse(t, w, "1", 0) - checkWatchCount(t, c, "a", 0) - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) - verifyResponse(t, w, "1", 1) - checkWatchCount(t, c, "b", 0) - c.DeleteResource("b") - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) - verifyResponse(t, w, "2", 0) - checkWatchCount(t, c, "b", 0) -} - -func TestLinearWatchTwo(t *testing.T) { - c := NewLinearCache(testType, WithInitialResources(map[string]types.Resource{"a": testResource("a"), "b": testResource("b")})) - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a", "b"}, TypeUrl: testType, VersionInfo: "0"}) - mustBlock(t, w) - w1, _ := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) - mustBlock(t, w1) - c.UpdateResource("a", testResource("aa")) - // should only get the modified resource - verifyResponse(t, w, "1", 1) - verifyResponse(t, w1, "1", 2) -} - -func TestLinearCancel(t *testing.T) { - c := NewLinearCache(testType) - c.UpdateResource("a", testResource("a")) - - // cancel watch-all - w, cancel := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) - mustBlock(t, w) - checkWatchCount(t, c, "a", 1) - cancel() - checkWatchCount(t, c, "a", 0) - - // cancel watch for "a" - w, cancel = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "1"}) - mustBlock(t, w) - checkWatchCount(t, c, "a", 1) - cancel() - checkWatchCount(t, c, "a", 0) - - // open four watches for "a" and "b" and two for all, cancel one of each, make sure the second one is unaffected - w, cancel = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "1"}) - w2, cancel2 := c.CreateWatch(&Request{ResourceNames: []string{"b"}, TypeUrl: testType, VersionInfo: "1"}) - w3, cancel3 := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) - w4, cancel4 := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) - mustBlock(t, w) - mustBlock(t, w2) - mustBlock(t, w3) - mustBlock(t, w4) - checkWatchCount(t, c, "a", 3) - checkWatchCount(t, c, "b", 3) - cancel() - checkWatchCount(t, c, "a", 2) - checkWatchCount(t, c, "b", 3) - cancel3() - checkWatchCount(t, c, "a", 1) - checkWatchCount(t, c, "b", 2) - cancel2() - cancel4() - checkWatchCount(t, c, "a", 0) - checkWatchCount(t, c, "b", 0) -} - -func TestLinearConcurrentSetWatch(t *testing.T) { - c := NewLinearCache(testType) - n := 50 - for i := 0; i < 2*n; i++ { - func(i int) { - t.Run(fmt.Sprintf("worker%d", i), func(t *testing.T) { - t.Parallel() - id := fmt.Sprintf("%d", i) - if i%2 == 0 { - t.Logf("update resource %q", id) - c.UpdateResource(id, testResource(id)) - } else { - id2 := fmt.Sprintf("%d", i-1) - t.Logf("request resources %q and %q", id, id2) - value, _ := c.CreateWatch(&Request{ - // Only expect one to become stale - ResourceNames: []string{id, id2}, - VersionInfo: "0", - TypeUrl: testType, - }) - // wait until all updates apply - verifyResponse(t, value, "", 1) - } - }) - }(i) - } -} diff --git a/pkg/envoy-control-plane/cache/v2/mux.go b/pkg/envoy-control-plane/cache/v2/mux.go deleted file mode 100644 index c3cfa16ef1..0000000000 --- a/pkg/envoy-control-plane/cache/v2/mux.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2020 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "context" - "errors" -) - -// MuxCache multiplexes across several caches using a classification function. -// If there is no matching cache for a classification result, the cache -// responds with an empty closed channel, which effectively terminates the -// stream on the server. It might be preferred to respond with a "nil" channel -// instead which will leave the stream open in case the stream is aggregated by -// making sure there is always a matching cache. -type MuxCache struct { - // Classification functions. - Classify func(Request) string - // Muxed caches. - Caches map[string]Cache -} - -var _ Cache = &MuxCache{} - -func (mux *MuxCache) CreateWatch(request *Request) (chan Response, func()) { - key := mux.Classify(*request) - cache, exists := mux.Caches[key] - if !exists { - value := make(chan Response, 0) - close(value) - return value, nil - } - return cache.CreateWatch(request) -} - -func (mux *MuxCache) Fetch(ctx context.Context, request *Request) (Response, error) { - return nil, errors.New("not implemented") -} diff --git a/pkg/envoy-control-plane/cache/v2/resource.go b/pkg/envoy-control-plane/cache/v2/resource.go deleted file mode 100644 index c6eab512f9..0000000000 --- a/pkg/envoy-control-plane/cache/v2/resource.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "github.com/golang/protobuf/proto" - - cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - auth "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/auth" - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" - hcm "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/http_connection_manager/v2" - runtime "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/wellknown" -) - -// GetResponseType returns the enumeration for a valid xDS type URL -func GetResponseType(typeURL string) types.ResponseType { - switch typeURL { - case resource.EndpointType: - return types.Endpoint - case resource.ClusterType: - return types.Cluster - case resource.RouteType: - return types.Route - case resource.ListenerType: - return types.Listener - case resource.SecretType: - return types.Secret - case resource.RuntimeType: - return types.Runtime - } - return types.UnknownType -} - -// GetResourceName returns the resource name for a valid xDS response type. -func GetResourceName(res types.Resource) string { - switch v := res.(type) { - case *endpoint.ClusterLoadAssignment: - return v.GetClusterName() - case *cluster.Cluster: - return v.GetName() - case *route.RouteConfiguration: - return v.GetName() - case *listener.Listener: - return v.GetName() - case *auth.Secret: - return v.GetName() - case *runtime.Runtime: - return v.GetName() - case *core.TypedExtensionConfig: - // This is a V3 proto, but this is the easiest workaround for the fact that there is no V2 proto. - return v.GetName() - default: - return "" - } -} - -// MarshalResource converts the Resource to MarshaledResource -func MarshalResource(resource types.Resource) (types.MarshaledResource, error) { - b := proto.NewBuffer(nil) - b.SetDeterministic(true) - err := b.Marshal(resource) - if err != nil { - return nil, err - } - - return b.Bytes(), nil -} - -// GetResourceReferences returns the names for dependent resources (EDS cluster -// names for CDS, RDS routes names for LDS). -func GetResourceReferences(resources map[string]types.ResourceWithTtl) map[string]bool { - out := make(map[string]bool) - for _, res := range resources { - if res.Resource == nil { - continue - } - switch v := res.Resource.(type) { - case *endpoint.ClusterLoadAssignment: - // no dependencies - case *cluster.Cluster: - // for EDS type, use cluster name or ServiceName override - switch typ := v.ClusterDiscoveryType.(type) { - case *cluster.Cluster_Type: - if typ.Type == cluster.Cluster_EDS { - if v.EdsClusterConfig != nil && v.EdsClusterConfig.ServiceName != "" { - out[v.EdsClusterConfig.ServiceName] = true - } else { - out[v.Name] = true - } - } - } - case *route.RouteConfiguration: - // References to clusters in both routes (and listeners) are not included - // in the result, because the clusters are retrieved in bulk currently, - // and not by name. - case *listener.Listener: - // extract route configuration names from HTTP connection manager - for _, chain := range v.FilterChains { - for _, filter := range chain.Filters { - if filter.Name != wellknown.HTTPConnectionManager { - continue - } - - config := resource.GetHTTPConnectionManager(filter) - - if config == nil { - continue - } - - if rds, ok := config.RouteSpecifier.(*hcm.HttpConnectionManager_Rds); ok && rds != nil && rds.Rds != nil { - out[rds.Rds.RouteConfigName] = true - } - } - } - case *runtime.Runtime: - // no dependencies - } - } - return out -} diff --git a/pkg/envoy-control-plane/cache/v2/resource_test.go b/pkg/envoy-control-plane/cache/v2/resource_test.go deleted file mode 100644 index dc1e2fb0db..0000000000 --- a/pkg/envoy-control-plane/cache/v2/resource_test.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache_test - -import ( - "reflect" - "testing" - - cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - v2route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v2" -) - -const ( - clusterName = "cluster0" - routeName = "route0" - listenerName = "listener0" - runtimeName = "runtime0" - tlsName = "secret0" - rootName = "root0" -) - -var ( - testEndpoint = resource.MakeEndpoint(clusterName, 8080) - testCluster = resource.MakeCluster(resource.Ads, clusterName) - testRoute = resource.MakeRoute(routeName, clusterName) - testListener = resource.MakeHTTPListener(resource.Ads, listenerName, 80, routeName) - testRuntime = resource.MakeRuntime(runtimeName) - testSecret = resource.MakeSecrets(tlsName, rootName) -) - -func TestValidate(t *testing.T) { - if err := testEndpoint.Validate(); err != nil { - t.Error(err) - } - if err := testCluster.Validate(); err != nil { - t.Error(err) - } - if err := testRoute.Validate(); err != nil { - t.Error(err) - } - if err := testListener.Validate(); err != nil { - t.Error(err) - } - if err := testRuntime.Validate(); err != nil { - t.Error(err) - } - - invalidRoute := &route.RouteConfiguration{ - Name: "test", - VirtualHosts: []*v2route.VirtualHost{{ - Name: "test", - Domains: []string{}, - }}, - } - - if err := invalidRoute.Validate(); err == nil { - t.Error("expected an error") - } - if err := invalidRoute.VirtualHosts[0].Validate(); err == nil { - t.Error("expected an error") - } -} - -func TestGetResourceName(t *testing.T) { - if name := cache.GetResourceName(testEndpoint); name != clusterName { - t.Errorf("GetResourceName(%v) => got %q, want %q", testEndpoint, name, clusterName) - } - if name := cache.GetResourceName(testCluster); name != clusterName { - t.Errorf("GetResourceName(%v) => got %q, want %q", testCluster, name, clusterName) - } - if name := cache.GetResourceName(testRoute); name != routeName { - t.Errorf("GetResourceName(%v) => got %q, want %q", testRoute, name, routeName) - } - if name := cache.GetResourceName(testListener); name != listenerName { - t.Errorf("GetResourceName(%v) => got %q, want %q", testListener, name, listenerName) - } - if name := cache.GetResourceName(testRuntime); name != runtimeName { - t.Errorf("GetResourceName(%v) => got %q, want %q", testRuntime, name, runtimeName) - } - if name := cache.GetResourceName(nil); name != "" { - t.Errorf("GetResourceName(nil) => got %q, want none", name) - } -} - -func TestGetResourceReferences(t *testing.T) { - cases := []struct { - in types.Resource - out map[string]bool - }{ - { - in: nil, - out: map[string]bool{}, - }, - { - in: testCluster, - out: map[string]bool{clusterName: true}, - }, - { - in: &cluster.Cluster{Name: clusterName, ClusterDiscoveryType: &cluster.Cluster_Type{Type: cluster.Cluster_EDS}, - EdsClusterConfig: &cluster.Cluster_EdsClusterConfig{ServiceName: "test"}}, - out: map[string]bool{"test": true}, - }, - { - in: resource.MakeHTTPListener(resource.Ads, listenerName, 80, routeName), - out: map[string]bool{routeName: true}, - }, - { - in: resource.MakeTCPListener(listenerName, 80, clusterName), - out: map[string]bool{}, - }, - { - in: testRoute, - out: map[string]bool{}, - }, - { - in: testEndpoint, - out: map[string]bool{}, - }, - { - in: testRuntime, - out: map[string]bool{}, - }, - } - for _, cs := range cases { - names := cache.GetResourceReferences(cache.IndexResourcesByName([]types.ResourceWithTtl{{Resource: cs.in}})) - if !reflect.DeepEqual(names, cs.out) { - t.Errorf("GetResourceReferences(%v) => got %v, want %v", cs.in, names, cs.out) - } - } -} diff --git a/pkg/envoy-control-plane/cache/v2/simple.go b/pkg/envoy-control-plane/cache/v2/simple.go deleted file mode 100644 index 353a41f468..0000000000 --- a/pkg/envoy-control-plane/cache/v2/simple.go +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "context" - "fmt" - "sync" - "sync/atomic" - "time" - - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" -) - -// SnapshotCache is a snapshot-based cache that maintains a single versioned -// snapshot of responses per node. SnapshotCache consistently replies with the -// latest snapshot. For the protocol to work correctly in ADS mode, EDS/RDS -// requests are responded only when all resources in the snapshot xDS response -// are named as part of the request. It is expected that the CDS response names -// all EDS clusters, and the LDS response names all RDS routes in a snapshot, -// to ensure that Envoy makes the request for all EDS clusters or RDS routes -// eventually. -// -// SnapshotCache can operate as a REST or regular xDS backend. The snapshot -// can be partial, e.g. only include RDS or EDS resources. -type SnapshotCache interface { - Cache - - // SetSnapshot sets a response snapshot for a node. For ADS, the snapshots - // should have distinct versions and be internally consistent (e.g. all - // referenced resources must be included in the snapshot). - // - // This method will cause the server to respond to all open watches, for which - // the version differs from the snapshot version. - SetSnapshot(node string, snapshot Snapshot) error - - // GetSnapshots gets the snapshot for a node. - GetSnapshot(node string) (Snapshot, error) - - // ClearSnapshot removes all status and snapshot information associated with a node. - ClearSnapshot(node string) - - // GetStatusInfo retrieves status information for a node ID. - GetStatusInfo(string) StatusInfo - - // GetStatusKeys retrieves node IDs for all statuses. - GetStatusKeys() []string -} - -type heartbeatHandle struct { - cancel func() -} - -type snapshotCache struct { - // watchCount is an atomic counter incremented for each watch. This needs to - // be the first field in the struct to guarantee that it is 64-bit aligned, - // which is a requirement for atomic operations on 64-bit operands to work on - // 32-bit machines. - watchCount int64 - - log log.Logger - - // ads flag to hold responses until all resources are named - ads bool - - // snapshots are cached resources indexed by node IDs - snapshots map[string]Snapshot - - // status information for all nodes indexed by node IDs - status map[string]*statusInfo - - // hash is the hashing function for Envoy nodes - hash NodeHash - - mu sync.RWMutex -} - -// NewSnapshotCache initializes a simple cache. -// -// ADS flag forces a delay in responding to streaming requests until all -// resources are explicitly named in the request. This avoids the problem of a -// partial request over a single stream for a subset of resources which would -// require generating a fresh version for acknowledgement. ADS flag requires -// snapshot consistency. For non-ADS case (and fetch), multiple partial -// requests are sent across multiple streams and re-using the snapshot version -// is OK. -// -// Logger is optional. -func NewSnapshotCache(ads bool, hash NodeHash, logger log.Logger) SnapshotCache { - return newSnapshotCache(ads, hash, logger) -} - -func newSnapshotCache(ads bool, hash NodeHash, logger log.Logger) *snapshotCache { - cache := &snapshotCache{ - log: logger, - ads: ads, - snapshots: make(map[string]Snapshot), - status: make(map[string]*statusInfo), - hash: hash, - } - - return cache -} - -// NewSnapshotCacheWithHeartbeating initializes a simple cache that sends periodic heartbeat -// responses for resources with a TTL. -// -// ADS flag forces a delay in responding to streaming requests until all -// resources are explicitly named in the request. This avoids the problem of a -// partial request over a single stream for a subset of resources which would -// require generating a fresh version for acknowledgement. ADS flag requires -// snapshot consistency. For non-ADS case (and fetch), multiple partial -// requests are sent across multiple streams and re-using the snapshot version -// is OK. -// -// Logger is optional. -// -// The context provides a way to cancel the heartbeating routine, while the heartbeatInterval -// parameter controls how often heartbeating occurs. -func NewSnapshotCacheWithHeartbeating(ctx context.Context, ads bool, hash NodeHash, logger log.Logger, heartbeatInterval time.Duration) SnapshotCache { - cache := newSnapshotCache(ads, hash, logger) - go func() { - t := time.NewTicker(heartbeatInterval) - - for { - select { - case <-t.C: - cache.mu.Lock() - for node := range cache.status { - // TODO(snowp): Omit heartbeats if a real response has been sent recently. - cache.sendHeartbeats(ctx, node) - } - cache.mu.Unlock() - case <-ctx.Done(): - return - } - } - }() - return cache -} - -func (cache *snapshotCache) sendHeartbeats(ctx context.Context, node string) { - snapshot := cache.snapshots[node] - if info, ok := cache.status[node]; ok { - info.mu.Lock() - for id, watch := range info.watches { - // Respond with the current version regardless of whether the version has changed. - version := snapshot.GetVersion(watch.Request.TypeUrl) - resources := snapshot.GetResourcesAndTtl(watch.Request.TypeUrl) - - // TODO(snowp): Construct this once per type instead of once per watch. - resourcesWithTtl := map[string]types.ResourceWithTtl{} - for k, v := range resources { - if v.Ttl != nil { - resourcesWithTtl[k] = v - } - } - - if len(resourcesWithTtl) == 0 { - continue - } - if cache.log != nil { - cache.log.Debugf("respond open watch %d%v with heartbeat for version %q", id, watch.Request.ResourceNames, version) - } - - cache.respond(watch.Request, watch.Response, resourcesWithTtl, version, true) - - // The watch must be deleted and we must rely on the client to ack this response to create a new watch. - delete(info.watches, id) - } - info.mu.Unlock() - } -} - -// SetSnapshotCache updates a snapshot for a node. -func (cache *snapshotCache) SetSnapshot(node string, snapshot Snapshot) error { - cache.mu.Lock() - defer cache.mu.Unlock() - - // update the existing entry - cache.snapshots[node] = snapshot - - // trigger existing watches for which version changed - if info, ok := cache.status[node]; ok { - info.mu.Lock() - for id, watch := range info.watches { - version := snapshot.GetVersion(watch.Request.TypeUrl) - if version != watch.Request.VersionInfo { - if cache.log != nil { - cache.log.Debugf("respond open watch %d%v with new version %q", id, watch.Request.ResourceNames, version) - } - resources := snapshot.GetResourcesAndTtl(watch.Request.TypeUrl) - cache.respond(watch.Request, watch.Response, resources, version, false) - - // discard the watch - delete(info.watches, id) - } - } - info.mu.Unlock() - } - - return nil -} - -// GetSnapshots gets the snapshot for a node, and returns an error if not found. -func (cache *snapshotCache) GetSnapshot(node string) (Snapshot, error) { - cache.mu.RLock() - defer cache.mu.RUnlock() - - snap, ok := cache.snapshots[node] - if !ok { - return Snapshot{}, fmt.Errorf("no snapshot found for node %s", node) - } - return snap, nil -} - -// ClearSnapshot clears snapshot and info for a node. -func (cache *snapshotCache) ClearSnapshot(node string) { - cache.mu.Lock() - defer cache.mu.Unlock() - - delete(cache.snapshots, node) - delete(cache.status, node) -} - -// nameSet creates a map from a string slice to value true. -func nameSet(names []string) map[string]bool { - set := make(map[string]bool) - for _, name := range names { - set[name] = true - } - return set -} - -// superset checks that all resources are listed in the names set. -func superset(names map[string]bool, resources map[string]types.ResourceWithTtl) error { - for resourceName := range resources { - if _, exists := names[resourceName]; !exists { - return fmt.Errorf("%q not listed", resourceName) - } - } - return nil -} - -// CreateWatch returns a watch for an xDS request. -func (cache *snapshotCache) CreateWatch(request *Request) (chan Response, func()) { - nodeID := cache.hash.ID(request.Node) - - cache.mu.Lock() - defer cache.mu.Unlock() - - info, ok := cache.status[nodeID] - if !ok { - info = newStatusInfo(request.Node) - cache.status[nodeID] = info - } - - // update last watch request time - info.mu.Lock() - info.lastWatchRequestTime = time.Now() - info.mu.Unlock() - - // allocate capacity 1 to allow one-time non-blocking use - value := make(chan Response, 1) - - snapshot, exists := cache.snapshots[nodeID] - version := snapshot.GetVersion(request.TypeUrl) - - // if the requested version is up-to-date or missing a response, leave an open watch - if !exists || request.VersionInfo == version { - watchID := cache.nextWatchID() - if cache.log != nil { - cache.log.Debugf("open watch %d for %s%v from nodeID %q, version %q", watchID, - request.TypeUrl, request.ResourceNames, nodeID, request.VersionInfo) - } - info.mu.Lock() - info.watches[watchID] = ResponseWatch{Request: request, Response: value} - info.mu.Unlock() - return value, cache.cancelWatch(nodeID, watchID) - } - - // otherwise, the watch may be responded immediately - resources := snapshot.GetResourcesAndTtl(request.TypeUrl) - cache.respond(request, value, resources, version, false) - - return value, nil -} - -func (cache *snapshotCache) nextWatchID() int64 { - return atomic.AddInt64(&cache.watchCount, 1) -} - -// cancellation function for cleaning stale watches -func (cache *snapshotCache) cancelWatch(nodeID string, watchID int64) func() { - return func() { - // uses the cache mutex - cache.mu.Lock() - defer cache.mu.Unlock() - if info, ok := cache.status[nodeID]; ok { - info.mu.Lock() - delete(info.watches, watchID) - info.mu.Unlock() - } - } -} - -// Respond to a watch with the snapshot value. The value channel should have capacity not to block. -// TODO(kuat) do not respond always, see issue https://github.com/envoyproxy/go-control-plane/issues/46 -func (cache *snapshotCache) respond(request *Request, value chan Response, resources map[string]types.ResourceWithTtl, version string, heartbeat bool) { - // for ADS, the request names must match the snapshot names - // if they do not, then the watch is never responded, and it is expected that envoy makes another request - if len(request.ResourceNames) != 0 && cache.ads { - if err := superset(nameSet(request.ResourceNames), resources); err != nil { - if cache.log != nil { - cache.log.Debugf("ADS mode: not responding to request: %v", err) - } - return - } - } - if cache.log != nil { - cache.log.Debugf("respond %s%v version %q with version %q", - request.TypeUrl, request.ResourceNames, request.VersionInfo, version) - } - - value <- createResponse(request, resources, version, heartbeat) -} - -func createResponse(request *Request, resources map[string]types.ResourceWithTtl, version string, heartbeat bool) Response { - filtered := make([]types.ResourceWithTtl, 0, len(resources)) - - // Reply only with the requested resources. Envoy may ask each resource - // individually in a separate stream. It is ok to reply with the same version - // on separate streams since requests do not share their response versions. - if len(request.ResourceNames) != 0 { - set := nameSet(request.ResourceNames) - for name, resource := range resources { - if set[name] { - filtered = append(filtered, resource) - } - } - } else { - for _, resource := range resources { - filtered = append(filtered, resource) - } - } - - return &RawResponse{ - Request: request, - Version: version, - Resources: filtered, - Heartbeat: heartbeat, - } -} - -// Fetch implements the cache fetch function. -// Fetch is called on multiple streams, so responding to individual names with the same version works. -func (cache *snapshotCache) Fetch(ctx context.Context, request *Request) (Response, error) { - nodeID := cache.hash.ID(request.Node) - - cache.mu.RLock() - defer cache.mu.RUnlock() - - if snapshot, exists := cache.snapshots[nodeID]; exists { - // Respond only if the request version is distinct from the current snapshot state. - // It might be beneficial to hold the request since Envoy will re-attempt the refresh. - version := snapshot.GetVersion(request.TypeUrl) - if request.VersionInfo == version { - if cache.log != nil { - cache.log.Warnf("skip fetch: version up to date") - } - return nil, &types.SkipFetchError{} - } - - resources := snapshot.GetResourcesAndTtl(request.TypeUrl) - out := createResponse(request, resources, version, false) - return out, nil - } - - return nil, fmt.Errorf("missing snapshot for %q", nodeID) -} - -// GetStatusInfo retrieves the status info for the node. -func (cache *snapshotCache) GetStatusInfo(node string) StatusInfo { - cache.mu.RLock() - defer cache.mu.RUnlock() - - info, exists := cache.status[node] - if !exists { - if cache.log != nil { - cache.log.Warnf("node does not exist") - } - return nil - } - - return info -} - -// GetStatusKeys retrieves all node IDs in the status map. -func (cache *snapshotCache) GetStatusKeys() []string { - cache.mu.RLock() - defer cache.mu.RUnlock() - - out := make([]string, 0, len(cache.status)) - for id := range cache.status { - out = append(out, id) - } - - return out -} diff --git a/pkg/envoy-control-plane/cache/v2/simple_test.go b/pkg/envoy-control-plane/cache/v2/simple_test.go deleted file mode 100644 index 12bf5b396b..0000000000 --- a/pkg/envoy-control-plane/cache/v2/simple_test.go +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache_test - -import ( - "context" - "fmt" - "reflect" - "sync" - "testing" - "time" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v2" -) - -type group struct{} - -const ( - key = "node" -) - -func (group) ID(node *core.Node) string { - if node != nil { - return node.Id - } - return key -} - -var ( - version = "x" - version2 = "y" - - snapshot = cache.NewSnapshot(version, - []types.Resource{testEndpoint}, - []types.Resource{testCluster}, - []types.Resource{testRoute}, - []types.Resource{testListener}, - []types.Resource{testRuntime}, - []types.Resource{testSecret[0]}) - - ttl = 2 * time.Second - heartbeat = time.Second - - snapshotWithTtl = cache.NewSnapshotWithTtls(version, - []types.ResourceWithTtl{{Resource: testEndpoint, Ttl: &ttl}}, - []types.ResourceWithTtl{{Resource: testCluster}}, - []types.ResourceWithTtl{{Resource: testRoute}}, - []types.ResourceWithTtl{{Resource: testListener}}, - []types.ResourceWithTtl{{Resource: testRuntime}}, - []types.ResourceWithTtl{{Resource: testSecret[0]}}) - - names = map[string][]string{ - rsrc.EndpointType: {clusterName}, - rsrc.ClusterType: nil, - rsrc.RouteType: {routeName}, - rsrc.ListenerType: nil, - rsrc.RuntimeType: nil, - } - - testTypes = []string{ - rsrc.EndpointType, - rsrc.ClusterType, - rsrc.RouteType, - rsrc.ListenerType, - rsrc.RuntimeType, - } -) - -type logger struct { - t *testing.T -} - -func (log logger) Debugf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Infof(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Warnf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Errorf(format string, args ...interface{}) { log.t.Logf(format, args...) } - -func TestSnapshotCacheWithTtl(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - c := cache.NewSnapshotCacheWithHeartbeating(ctx, true, group{}, logger{t: t}, time.Second) - - if _, err := c.GetSnapshot(key); err == nil { - t.Errorf("unexpected snapshot found for key %q", key) - } - - if err := c.SetSnapshot(key, snapshotWithTtl); err != nil { - t.Fatal(err) - } - - snap, err := c.GetSnapshot(key) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(snap, snapshotWithTtl) { - t.Errorf("expect snapshot: %v, got: %v", snapshotWithTtl, snap) - } - - wg := sync.WaitGroup{} - // All the resources should respond immediately when version is not up to date. - for _, typ := range testTypes { - wg.Add(1) - t.Run(typ, func(t *testing.T) { - defer wg.Done() - value, _ := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) - select { - case out := <-value: - if gotVersion, _ := out.GetVersion(); gotVersion != version { - t.Errorf("got version %q, want %q", gotVersion, version) - } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTtl.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTtl.GetResourcesAndTtl(typ)) - } - case <-time.After(2 * time.Second): - t.Errorf("failed to receive snapshot response") - } - }) - } - wg.Wait() - - // Once everything is up to date, only the TTL'd resource should send out updates. - wg = sync.WaitGroup{} - updatesByType := map[string]int{} - for _, typ := range testTypes { - wg.Add(1) - go func(typ string) { - defer wg.Done() - - end := time.After(5 * time.Second) - for { - value, cancel := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ], VersionInfo: version}) - - select { - case out := <-value: - if gotVersion, _ := out.GetVersion(); gotVersion != version { - t.Errorf("got version %q, want %q", gotVersion, version) - } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTtl.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTtl.GetResources(typ)) - } - - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTtl.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTtl.GetResources(typ)) - } - - updatesByType[typ]++ - case <-end: - cancel() - return - } - } - }(typ) - } - - wg.Wait() - - if len(updatesByType) != 1 { - t.Errorf("expected to only receive updates for TTL'd type, got %v", updatesByType) - } - // Avoid an exact match on number of triggers to avoid this being flaky. - if updatesByType[rsrc.EndpointType] < 2 { - t.Errorf("expected at least two TTL updates for endpoints, got %d", updatesByType[rsrc.EndpointType]) - } -} - -func TestSnapshotCache(t *testing.T) { - c := cache.NewSnapshotCache(true, group{}, logger{t: t}) - - if _, err := c.GetSnapshot(key); err == nil { - t.Errorf("unexpected snapshot found for key %q", key) - } - - if err := c.SetSnapshot(key, snapshot); err != nil { - t.Fatal(err) - } - - snap, err := c.GetSnapshot(key) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(snap, snapshot) { - t.Errorf("expect snapshot: %v, got: %v", snapshot, snap) - } - - // try to get endpoints with incorrect list of names - // should not receive response - value, _ := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType, ResourceNames: []string{"none"}}) - select { - case out := <-value: - t.Errorf("watch for endpoints and mismatched names => got %v, want none", out) - case <-time.After(time.Second / 4): - } - - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - value, _ := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) - select { - case out := <-value: - if gotVersion, _ := out.GetVersion(); gotVersion != version { - t.Errorf("got version %q, want %q", gotVersion, version) - } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot.GetResourcesAndTtl(typ)) - } - case <-time.After(time.Second): - t.Fatal("failed to receive snapshot response") - } - }) - } -} - -func TestSnapshotCacheFetch(t *testing.T) { - c := cache.NewSnapshotCache(true, group{}, logger{t: t}) - if err := c.SetSnapshot(key, snapshot); err != nil { - t.Fatal(err) - } - - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - resp, err := c.Fetch(context.Background(), &discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) - if err != nil || resp == nil { - t.Fatal("unexpected error or null response") - } - if gotVersion, _ := resp.GetVersion(); gotVersion != version { - t.Errorf("got version %q, want %q", gotVersion, version) - } - }) - } - - // no response for missing snapshot - if resp, err := c.Fetch(context.Background(), - &discovery.DiscoveryRequest{TypeUrl: rsrc.ClusterType, Node: &core.Node{Id: "oof"}}); resp != nil || err == nil { - t.Errorf("missing snapshot: response is not nil %v", resp) - } - - // no response for latest version - if resp, err := c.Fetch(context.Background(), - &discovery.DiscoveryRequest{TypeUrl: rsrc.ClusterType, VersionInfo: version}); resp != nil || err == nil { - t.Errorf("latest version: response is not nil %v", resp) - } -} - -func TestSnapshotCacheWatch(t *testing.T) { - c := cache.NewSnapshotCache(true, group{}, logger{t: t}) - watches := make(map[string]chan cache.Response) - for _, typ := range testTypes { - watches[typ], _ = c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) - } - if err := c.SetSnapshot(key, snapshot); err != nil { - t.Fatal(err) - } - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - select { - case out := <-watches[typ]: - if gotVersion, _ := out.GetVersion(); gotVersion != version { - t.Errorf("got version %q, want %q", gotVersion, version) - } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot.GetResourcesAndTtl(typ)) - } - case <-time.After(time.Second): - t.Fatal("failed to receive snapshot response") - } - }) - } - - // open new watches with the latest version - for _, typ := range testTypes { - watches[typ], _ = c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ], VersionInfo: version}) - } - if count := c.GetStatusInfo(key).GetNumWatches(); count != len(testTypes) { - t.Errorf("watches should be created for the latest version: %d", count) - } - - // set partially-versioned snapshot - snapshot2 := snapshot - snapshot2.Resources[types.Endpoint] = cache.NewResources(version2, []types.Resource{resource.MakeEndpoint(clusterName, 9090)}) - if err := c.SetSnapshot(key, snapshot2); err != nil { - t.Fatal(err) - } - if count := c.GetStatusInfo(key).GetNumWatches(); count != len(testTypes)-1 { - t.Errorf("watches should be preserved for all but one: %d", count) - } - - // validate response for endpoints - select { - case out := <-watches[rsrc.EndpointType]: - if gotVersion, _ := out.GetVersion(); gotVersion != version2 { - t.Errorf("got version %q, want %q", gotVersion, version2) - } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot2.Resources[types.Endpoint].Items) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot2.Resources[types.Endpoint].Items) - } - case <-time.After(time.Second): - t.Fatal("failed to receive snapshot response") - } -} - -func TestConcurrentSetWatch(t *testing.T) { - c := cache.NewSnapshotCache(false, group{}, logger{t: t}) - for i := 0; i < 50; i++ { - func(i int) { - t.Run(fmt.Sprintf("worker%d", i), func(t *testing.T) { - t.Parallel() - id := fmt.Sprintf("%d", i%2) - var cancel func() - if i < 25 { - snap := cache.Snapshot{} - snap.Resources[types.Endpoint] = cache.NewResources(fmt.Sprintf("v%d", i), []types.Resource{resource.MakeEndpoint(clusterName, uint32(i))}) - c.SetSnapshot(id, snap) - } else { - if cancel != nil { - cancel() - } - _, cancel = c.CreateWatch(&discovery.DiscoveryRequest{ - Node: &core.Node{Id: id}, - TypeUrl: rsrc.EndpointType, - }) - } - }) - }(i) - } -} - -func TestSnapshotCacheWatchCancel(t *testing.T) { - c := cache.NewSnapshotCache(true, group{}, logger{t: t}) - for _, typ := range testTypes { - _, cancel := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) - cancel() - } - // should be status info for the node - if keys := c.GetStatusKeys(); len(keys) == 0 { - t.Error("got 0, want status info for the node") - } - - for _, typ := range testTypes { - if count := c.GetStatusInfo(key).GetNumWatches(); count > 0 { - t.Errorf("watches should be released for %s", typ) - } - } - - if empty := c.GetStatusInfo("missing"); empty != nil { - t.Errorf("should not return a status for unknown key: got %#v", empty) - } -} - -func TestSnapshotClear(t *testing.T) { - c := cache.NewSnapshotCache(true, group{}, logger{t: t}) - if err := c.SetSnapshot(key, snapshot); err != nil { - t.Fatal(err) - } - c.ClearSnapshot(key) - if empty := c.GetStatusInfo(key); empty != nil { - t.Errorf("cache should be cleared") - } - if keys := c.GetStatusKeys(); len(keys) != 0 { - t.Errorf("keys should be empty") - } -} diff --git a/pkg/envoy-control-plane/cache/v2/snapshot.go b/pkg/envoy-control-plane/cache/v2/snapshot.go deleted file mode 100644 index c3ea0f53f4..0000000000 --- a/pkg/envoy-control-plane/cache/v2/snapshot.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "errors" - "fmt" - "time" - - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" -) - -// Resources is a versioned group of resources. -type Resources struct { - // Version information. - Version string - - // Items in the group indexed by name. - Items map[string]types.ResourceWithTtl -} - -// IndexResourcesByName creates a map from the resource name to the resource. -func IndexResourcesByName(items []types.ResourceWithTtl) map[string]types.ResourceWithTtl { - indexed := make(map[string]types.ResourceWithTtl) - for _, item := range items { - indexed[GetResourceName(item.Resource)] = item - } - return indexed -} - -// NewResources creates a new resource group. -func NewResources(version string, items []types.Resource) Resources { - itemsWithTtl := []types.ResourceWithTtl{} - for _, item := range items { - itemsWithTtl = append(itemsWithTtl, types.ResourceWithTtl{Resource: item}) - } - return NewResourcesWithTtl(version, itemsWithTtl) -} - -// NewResources creates a new resource group. -func NewResourcesWithTtl(version string, items []types.ResourceWithTtl) Resources { - return Resources{ - Version: version, - Items: IndexResourcesByName(items), - } -} - -// Snapshot is an internally consistent snapshot of xDS resources. -// Consistency is important for the convergence as different resource types -// from the snapshot may be delivered to the proxy in arbitrary order. -type Snapshot struct { - Resources [types.UnknownType]Resources -} - -// NewSnapshot creates a snapshot from response types and a version. -func NewSnapshot(version string, - endpoints []types.Resource, - clusters []types.Resource, - routes []types.Resource, - listeners []types.Resource, - runtimes []types.Resource, - secrets []types.Resource) Snapshot { - return NewSnapshotWithResources(version, SnapshotResources{ - Endpoints: endpoints, - Clusters: clusters, - Routes: routes, - Listeners: listeners, - Runtimes: runtimes, - Secrets: secrets, - }) -} - -// SnapshotResources contains the resources to construct a snapshot from. -type SnapshotResources struct { - Endpoints []types.Resource - Clusters []types.Resource - Routes []types.Resource - Listeners []types.Resource - Runtimes []types.Resource - Secrets []types.Resource - ExtensionConfigs []types.Resource -} - -// NewSnapshotWithResources creates a snapshot from response types and a version. -func NewSnapshotWithResources(version string, resources SnapshotResources) Snapshot { - out := Snapshot{} - out.Resources[types.Endpoint] = NewResources(version, resources.Endpoints) - out.Resources[types.Cluster] = NewResources(version, resources.Clusters) - out.Resources[types.Route] = NewResources(version, resources.Routes) - out.Resources[types.Listener] = NewResources(version, resources.Listeners) - out.Resources[types.Runtime] = NewResources(version, resources.Runtimes) - out.Resources[types.Secret] = NewResources(version, resources.Secrets) - out.Resources[types.ExtensionConfig] = NewResources(version, resources.ExtensionConfigs) - return out -} - -type ResourceWithTtl struct { - Resources []types.Resource - Ttl *time.Duration -} - -func NewSnapshotWithTtls(version string, - endpoints []types.ResourceWithTtl, - clusters []types.ResourceWithTtl, - routes []types.ResourceWithTtl, - listeners []types.ResourceWithTtl, - runtimes []types.ResourceWithTtl, - secrets []types.ResourceWithTtl) Snapshot { - out := Snapshot{} - out.Resources[types.Endpoint] = NewResourcesWithTtl(version, endpoints) - out.Resources[types.Cluster] = NewResourcesWithTtl(version, clusters) - out.Resources[types.Route] = NewResourcesWithTtl(version, routes) - out.Resources[types.Listener] = NewResourcesWithTtl(version, listeners) - out.Resources[types.Runtime] = NewResourcesWithTtl(version, runtimes) - out.Resources[types.Secret] = NewResourcesWithTtl(version, secrets) - return out -} - -// Consistent check verifies that the dependent resources are exactly listed in the -// snapshot: -// - all EDS resources are listed by name in CDS resources -// - all RDS resources are listed by name in LDS resources -// -// Note that clusters and listeners are requested without name references, so -// Envoy will accept the snapshot list of clusters as-is even if it does not match -// all references found in xDS. -func (s *Snapshot) Consistent() error { - if s == nil { - return errors.New("nil snapshot") - } - endpoints := GetResourceReferences(s.Resources[types.Cluster].Items) - if len(endpoints) != len(s.Resources[types.Endpoint].Items) { - return fmt.Errorf("mismatched endpoint reference and resource lengths: %v != %d", endpoints, len(s.Resources[types.Endpoint].Items)) - } - if err := superset(endpoints, s.Resources[types.Endpoint].Items); err != nil { - return err - } - - routes := GetResourceReferences(s.Resources[types.Listener].Items) - if len(routes) != len(s.Resources[types.Route].Items) { - return fmt.Errorf("mismatched route reference and resource lengths: %v != %d", routes, len(s.Resources[types.Route].Items)) - } - return superset(routes, s.Resources[types.Route].Items) -} - -// GetResources selects snapshot resources by type, returning the map of resources. -func (s *Snapshot) GetResources(typeURL string) map[string]types.Resource { - resources := s.GetResourcesAndTtl(typeURL) - if resources == nil { - return nil - } - - withoutTtl := make(map[string]types.Resource, len(resources)) - - for k, v := range resources { - withoutTtl[k] = v.Resource - } - - return withoutTtl -} - -// GetResourcesAndTtl selects snapshot resources by type, returning the map of resources and the associated TTL. -func (s *Snapshot) GetResourcesAndTtl(typeURL string) map[string]types.ResourceWithTtl { - if s == nil { - return nil - } - typ := GetResponseType(typeURL) - if typ == types.UnknownType { - return nil - } - return s.Resources[typ].Items -} - -// GetVersion returns the version for a resource type. -func (s *Snapshot) GetVersion(typeURL string) string { - if s == nil { - return "" - } - typ := GetResponseType(typeURL) - if typ == types.UnknownType { - return "" - } - return s.Resources[typ].Version -} diff --git a/pkg/envoy-control-plane/cache/v2/snapshot_test.go b/pkg/envoy-control-plane/cache/v2/snapshot_test.go deleted file mode 100644 index 2328421889..0000000000 --- a/pkg/envoy-control-plane/cache/v2/snapshot_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache_test - -import ( - "testing" - - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v2" -) - -func TestSnapshotConsistent(t *testing.T) { - if err := snapshot.Consistent(); err != nil { - t.Errorf("got inconsistent snapshot for %#v", snapshot) - } - if snap := cache.NewSnapshot(version, []types.Resource{testEndpoint}, nil, nil, nil, nil, nil); snap.Consistent() == nil { - t.Errorf("got consistent snapshot %#v", snap) - } - if snap := cache.NewSnapshot(version, []types.Resource{resource.MakeEndpoint("missing", 8080)}, - []types.Resource{testCluster}, nil, nil, nil, nil); snap.Consistent() == nil { - t.Errorf("got consistent snapshot %#v", snap) - } - if snap := cache.NewSnapshot(version, nil, nil, nil, []types.Resource{testListener}, nil, nil); snap.Consistent() == nil { - t.Errorf("got consistent snapshot %#v", snap) - } - if snap := cache.NewSnapshot(version, nil, nil, - []types.Resource{resource.MakeRoute("test", clusterName)}, []types.Resource{testListener}, nil, nil); snap.Consistent() == nil { - t.Errorf("got consistent snapshot %#v", snap) - } -} - -func TestSnapshotGetters(t *testing.T) { - var nilsnap *cache.Snapshot - if out := nilsnap.GetResources(rsrc.EndpointType); out != nil { - t.Errorf("got non-empty resources for nil snapshot: %#v", out) - } - if out := nilsnap.Consistent(); out == nil { - t.Errorf("nil snapshot should be inconsistent") - } - if out := nilsnap.GetVersion(rsrc.EndpointType); out != "" { - t.Errorf("got non-empty version for nil snapshot: %#v", out) - } - if out := snapshot.GetResources("not a type"); out != nil { - t.Errorf("got non-empty resources for unknown type: %#v", out) - } - if out := snapshot.GetVersion("not a type"); out != "" { - t.Errorf("got non-empty version for unknown type: %#v", out) - } -} diff --git a/pkg/envoy-control-plane/cache/v2/status.go b/pkg/envoy-control-plane/cache/v2/status.go deleted file mode 100644 index 86f3560f4a..0000000000 --- a/pkg/envoy-control-plane/cache/v2/status.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "sync" - "time" - - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" -) - -// NodeHash computes string identifiers for Envoy nodes. -type NodeHash interface { - // ID function defines a unique string identifier for the remote Envoy node. - ID(node *core.Node) string -} - -// IDHash uses ID field as the node hash. -type IDHash struct{} - -// ID uses the node ID field -func (IDHash) ID(node *core.Node) string { - if node == nil { - return "" - } - return node.Id -} - -var _ NodeHash = IDHash{} - -// StatusInfo tracks the server state for the remote Envoy node. -// Not all fields are used by all cache implementations. -type StatusInfo interface { - // GetNode returns the node metadata. - GetNode() *core.Node - - // GetNumWatches returns the number of open watches. - GetNumWatches() int - - // GetLastWatchRequestTime returns the timestamp of the last discovery watch request. - GetLastWatchRequestTime() time.Time -} - -type statusInfo struct { - // node is the constant Envoy node metadata. - node *core.Node - - // watches are indexed channels for the response watches and the original requests. - watches map[int64]ResponseWatch - - // the timestamp of the last watch request - lastWatchRequestTime time.Time - - // mutex to protect the status fields. - // should not acquire mutex of the parent cache after acquiring this mutex. - mu sync.RWMutex -} - -// ResponseWatch is a watch record keeping both the request and an open channel for the response. -type ResponseWatch struct { - // Request is the original request for the watch. - Request *Request - - // Response is the channel to push responses to. - Response chan Response -} - -// newStatusInfo initializes a status info data structure. -func newStatusInfo(node *core.Node) *statusInfo { - out := statusInfo{ - node: node, - watches: make(map[int64]ResponseWatch), - } - return &out -} - -func (info *statusInfo) GetNode() *core.Node { - info.mu.RLock() - defer info.mu.RUnlock() - return info.node -} - -func (info *statusInfo) GetNumWatches() int { - info.mu.RLock() - defer info.mu.RUnlock() - return len(info.watches) -} - -func (info *statusInfo) GetLastWatchRequestTime() time.Time { - info.mu.RLock() - defer info.mu.RUnlock() - return info.lastWatchRequestTime -} diff --git a/pkg/envoy-control-plane/cache/v2/status_test.go b/pkg/envoy-control-plane/cache/v2/status_test.go deleted file mode 100644 index f5c24c2331..0000000000 --- a/pkg/envoy-control-plane/cache/v2/status_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cache - -import ( - "reflect" - "testing" - - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" -) - -func TestIDHash(t *testing.T) { - node := &core.Node{Id: "test"} - if got := (IDHash{}).ID(node); got != "test" { - t.Errorf("IDHash.ID(%v) => got %s, want %s", node, got, node.Id) - } - if got := (IDHash{}).ID(nil); got != "" { - t.Errorf("IDHash.ID(nil) => got %s, want empty", got) - } -} - -func TestNewStatusInfo(t *testing.T) { - node := &core.Node{Id: "test"} - info := newStatusInfo(node) - - if got := info.GetNode(); !reflect.DeepEqual(got, node) { - t.Errorf("GetNode() => got %#v, want %#v", got, node) - } - - if got := info.GetNumWatches(); got != 0 { - t.Errorf("GetNumWatches() => got %d, want 0", got) - } - - if got := info.GetLastWatchRequestTime(); !got.IsZero() { - t.Errorf("GetLastWatchRequestTime() => got %v, want zero time", got) - } - -} diff --git a/pkg/envoy-control-plane/cache/v3/cache.go b/pkg/envoy-control-plane/cache/v3/cache.go index a122be53c4..1c552f0e13 100644 --- a/pkg/envoy-control-plane/cache/v3/cache.go +++ b/pkg/envoy-control-plane/cache/v3/cache.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,35 +17,49 @@ package cache import ( "context" + "errors" "fmt" "sync/atomic" - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/durationpb" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - ttl "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/ttl/v3" - "github.com/golang/protobuf/ptypes/any" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" + + discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" ) // Request is an alias for the discovery request type. type Request = discovery.DiscoveryRequest +// DeltaRequest is an alias for the delta discovery request type. +type DeltaRequest = discovery.DeltaDiscoveryRequest + // ConfigWatcher requests watches for configuration resources by a node, last // applied version identifier, and resource names hint. The watch should send -// the responses when they are ready. The watch can be cancelled by the +// the responses when they are ready. The watch can be canceled by the // consumer, in effect terminating the watch for the request. // ConfigWatcher implementation must be thread-safe. type ConfigWatcher interface { // CreateWatch returns a new open watch from a non-empty request. // An individual consumer normally issues a single open watch by each type URL. // - // Value channel produces requested resources, once they are available. If - // the channel is closed prior to cancellation of the watch, an unrecoverable - // error has occurred in the producer, and the consumer should close the - // corresponding stream. + // The provided channel produces requested resources as responses, once they are available. // // Cancel is an optional function to release resources in the producer. If // provided, the consumer may call this function multiple times. - CreateWatch(*Request) (value chan Response, cancel func()) + CreateWatch(*Request, stream.StreamState, chan Response) (cancel func()) + + // CreateDeltaWatch returns a new open incremental xDS watch. + // + // The provided channel produces requested resources as responses, or spontaneous updates in accordance + // with the incremental xDS specification. + // + // Cancel is an optional function to release resources in the producer. If + // provided, the consumer may call this function multiple times. + CreateDeltaWatch(*DeltaRequest, stream.StreamState, chan DeltaResponse) (cancel func()) } // ConfigFetcher fetches configuration resources from cache @@ -71,6 +84,29 @@ type Response interface { // Get the version in the Response. GetVersion() (string, error) + + // Get the context provided during response creation. + GetContext() context.Context +} + +// DeltaResponse is a wrapper around Envoy's DeltaDiscoveryResponse +type DeltaResponse interface { + // Get the constructed DeltaDiscoveryResponse + GetDeltaDiscoveryResponse() (*discovery.DeltaDiscoveryResponse, error) + + // Get the request that created the watch that we're now responding to. This is provided to allow the caller to correlate the + // response with a request. Generally this will be the latest request seen on the stream for the specific type. + GetDeltaRequest() *discovery.DeltaDiscoveryRequest + + // Get the version in the DeltaResponse. This field is generally used for debugging purposes as noted by the Envoy documentation. + GetSystemVersion() (string, error) + + // Get the version map of the internal cache. + // The version map consists of updated version mappings after this response is applied + GetNextVersionMap() map[string]string + + // Get the context provided during response creation + GetContext() context.Context } // RawResponse is a pre-serialized xDS response containing the raw resources to @@ -84,43 +120,88 @@ type RawResponse struct { Version string // Resources to be included in the response. - Resources []types.ResourceWithTtl + Resources []types.ResourceWithTTL // Whether this is a heartbeat response. For xDS versions that support TTL, this // will be converted into a response that doesn't contain the actual resource protobuf. // This allows for more lightweight updates that server only to update the TTL timer. Heartbeat bool + // Context provided at the time of response creation. This allows associating additional + // information with a generated response. + Ctx context.Context + // marshaledResponse holds an atomic reference to the serialized discovery response. marshaledResponse atomic.Value } +// RawDeltaResponse is a pre-serialized xDS response that utilizes the delta discovery request/response objects. +type RawDeltaResponse struct { + // Request is the latest delta request on the stream. + DeltaRequest *discovery.DeltaDiscoveryRequest + + // SystemVersionInfo holds the currently applied response system version and should be used for debugging purposes only. + SystemVersionInfo string + + // Resources to be included in the response. + Resources []types.Resource + + // RemovedResources is a list of resource aliases which should be dropped by the consuming client. + RemovedResources []string + + // NextVersionMap consists of updated version mappings after this response is applied + NextVersionMap map[string]string + + // Context provided at the time of response creation. This allows associating additional + // information with a generated response. + Ctx context.Context + + // Marshaled Resources to be included in the response. + marshaledResponse atomic.Value +} + var _ Response = &RawResponse{} +var _ DeltaResponse = &RawDeltaResponse{} -// PassthroughResponse is a pre constructed xDS response that need not go through marshalling transformations. +// PassthroughResponse is a pre constructed xDS response that need not go through marshaling transformations. type PassthroughResponse struct { // Request is the original request. Request *discovery.DiscoveryRequest - // The discovery response that needs to be sent as is, without any marshalling transformations. + // The discovery response that needs to be sent as is, without any marshaling transformations. DiscoveryResponse *discovery.DiscoveryResponse + + ctx context.Context +} + +// DeltaPassthroughResponse is a pre constructed xDS response that need not go through marshaling transformations. +type DeltaPassthroughResponse struct { + // Request is the latest delta request on the stream + DeltaRequest *discovery.DeltaDiscoveryRequest + + // NextVersionMap consists of updated version mappings after this response is applied + NextVersionMap map[string]string + + // This discovery response that needs to be sent as is, without any marshaling transformations + DeltaDiscoveryResponse *discovery.DeltaDiscoveryResponse + + ctx context.Context } var _ Response = &PassthroughResponse{} +var _ DeltaResponse = &DeltaPassthroughResponse{} -// GetDiscoveryResponse performs the marshalling the first time its called and uses the cached response subsequently. -// This is necessary because the marshalled response does not change across the calls. -// This caching behavior is important in high throughput scenarios because grpc marshalling has a cost and it drives the cpu utilization under load. +// GetDiscoveryResponse performs the marshaling the first time its called and uses the cached response subsequently. +// This is necessary because the marshaled response does not change across the calls. +// This caching behavior is important in high throughput scenarios because grpc marshaling has a cost and it drives the cpu utilization under load. func (r *RawResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) { - marshaledResponse := r.marshaledResponse.Load() if marshaledResponse == nil { - - marshaledResources := make([]*any.Any, len(r.Resources)) + marshaledResources := make([]*anypb.Any, len(r.Resources)) for i, resource := range r.Resources { - maybeTtldResource, resourceType, err := ttl.MaybeCreateTtlResourceIfSupported(resource, GetResourceName(resource.Resource), r.Request.TypeUrl, r.Heartbeat) + maybeTtldResource, resourceType, err := r.maybeCreateTTLResource(resource) if err != nil { return nil, err } @@ -128,7 +209,7 @@ func (r *RawResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, erro if err != nil { return nil, err } - marshaledResources[i] = &any.Any{ + marshaledResources[i] = &anypb.Any{ TypeUrl: resourceType, Value: marshaledResource, } @@ -146,26 +227,124 @@ func (r *RawResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, erro return marshaledResponse.(*discovery.DiscoveryResponse), nil } +// GetDeltaDiscoveryResponse performs the marshaling the first time its called and uses the cached response subsequently. +// We can do this because the marshaled response does not change across the calls. +// This caching behavior is important in high throughput scenarios because grpc marshaling has a cost and it drives the cpu utilization under load. +func (r *RawDeltaResponse) GetDeltaDiscoveryResponse() (*discovery.DeltaDiscoveryResponse, error) { + marshaledResponse := r.marshaledResponse.Load() + + if marshaledResponse == nil { + marshaledResources := make([]*discovery.Resource, len(r.Resources)) + + for i, resource := range r.Resources { + name := GetResourceName(resource) + marshaledResource, err := MarshalResource(resource) + if err != nil { + return nil, err + } + version := HashResource(marshaledResource) + if version == "" { + return nil, errors.New("failed to create a resource hash") + } + marshaledResources[i] = &discovery.Resource{ + Name: name, + Resource: &anypb.Any{ + TypeUrl: r.DeltaRequest.TypeUrl, + Value: marshaledResource, + }, + Version: version, + } + } + + marshaledResponse = &discovery.DeltaDiscoveryResponse{ + Resources: marshaledResources, + RemovedResources: r.RemovedResources, + TypeUrl: r.DeltaRequest.TypeUrl, + SystemVersionInfo: r.SystemVersionInfo, + } + r.marshaledResponse.Store(marshaledResponse) + } + + return marshaledResponse.(*discovery.DeltaDiscoveryResponse), nil +} + // GetRequest returns the original Discovery Request. func (r *RawResponse) GetRequest() *discovery.DiscoveryRequest { return r.Request } +func (r *RawResponse) GetContext() context.Context { + return r.Ctx +} + +// GetDeltaRequest returns the original DeltaRequest +func (r *RawDeltaResponse) GetDeltaRequest() *discovery.DeltaDiscoveryRequest { + return r.DeltaRequest +} + // GetVersion returns the response version. func (r *RawResponse) GetVersion() (string, error) { return r.Version, nil } +// GetSystemVersion returns the raw SystemVersion +func (r *RawDeltaResponse) GetSystemVersion() (string, error) { + return r.SystemVersionInfo, nil +} + +// NextVersionMap returns the version map which consists of updated version mappings after this response is applied +func (r *RawDeltaResponse) GetNextVersionMap() map[string]string { + return r.NextVersionMap +} + +func (r *RawDeltaResponse) GetContext() context.Context { + return r.Ctx +} + +var deltaResourceTypeURL = "type.googleapis.com/" + string(proto.MessageName(&discovery.Resource{})) + +func (r *RawResponse) maybeCreateTTLResource(resource types.ResourceWithTTL) (types.Resource, string, error) { + if resource.TTL != nil { + wrappedResource := &discovery.Resource{ + Name: GetResourceName(resource.Resource), + Ttl: durationpb.New(*resource.TTL), + } + + if !r.Heartbeat { + any, err := anypb.New(resource.Resource) + if err != nil { + return nil, "", err + } + any.TypeUrl = r.Request.TypeUrl + wrappedResource.Resource = any + } + + return wrappedResource, deltaResourceTypeURL, nil + } + + return resource.Resource, r.Request.TypeUrl, nil +} + // GetDiscoveryResponse returns the final passthrough Discovery Response. func (r *PassthroughResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) { return r.DiscoveryResponse, nil } +// GetDeltaDiscoveryResponse returns the final passthrough Delta Discovery Response. +func (r *DeltaPassthroughResponse) GetDeltaDiscoveryResponse() (*discovery.DeltaDiscoveryResponse, error) { + return r.DeltaDiscoveryResponse, nil +} + // GetRequest returns the original Discovery Request func (r *PassthroughResponse) GetRequest() *discovery.DiscoveryRequest { return r.Request } +// GetDeltaRequest returns the original Delta Discovery Request +func (r *DeltaPassthroughResponse) GetDeltaRequest() *discovery.DeltaDiscoveryRequest { + return r.DeltaRequest +} + // GetVersion returns the response version. func (r *PassthroughResponse) GetVersion() (string, error) { if r.DiscoveryResponse != nil { @@ -173,3 +352,23 @@ func (r *PassthroughResponse) GetVersion() (string, error) { } return "", fmt.Errorf("DiscoveryResponse is nil") } +func (r *PassthroughResponse) GetContext() context.Context { + return r.ctx +} + +// GetSystemVersion returns the response version. +func (r *DeltaPassthroughResponse) GetSystemVersion() (string, error) { + if r.DeltaDiscoveryResponse != nil { + return r.DeltaDiscoveryResponse.SystemVersionInfo, nil + } + return "", fmt.Errorf("DeltaDiscoveryResponse is nil") +} + +// NextVersionMap returns the version map from a DeltaPassthroughResponse +func (r *DeltaPassthroughResponse) GetNextVersionMap() map[string]string { + return r.NextVersionMap +} + +func (r *DeltaPassthroughResponse) GetContext() context.Context { + return r.ctx +} diff --git a/pkg/envoy-control-plane/cache/v3/cache_test.go b/pkg/envoy-control-plane/cache/v3/cache_test.go index d43ae0c486..a418f49e89 100644 --- a/pkg/envoy-control-plane/cache/v3/cache_test.go +++ b/pkg/envoy-control-plane/cache/v3/cache_test.go @@ -1,18 +1,18 @@ -// Code generated by create_version. DO NOT EDIT. package cache_test import ( "testing" + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" - ttl_helper "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/ttl/v2" - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/any" - "github.com/stretchr/testify/assert" ) const ( @@ -20,7 +20,7 @@ const ( ) func TestResponseGetDiscoveryResponse(t *testing.T) { - routes := []types.ResourceWithTtl{{Resource: &route.RouteConfiguration{Name: resourceName}}} + routes := []types.ResourceWithTTL{{Resource: &route.RouteConfiguration{Name: resourceName}}} resp := cache.RawResponse{ Request: &discovery.DiscoveryRequest{TypeUrl: resource.RouteType}, Version: "v", @@ -37,18 +37,18 @@ func TestResponseGetDiscoveryResponse(t *testing.T) { assert.Same(t, discoveryResponse, cachedResponse) r := &route.RouteConfiguration{} - err = ptypes.UnmarshalAny(discoveryResponse.Resources[0], r) + err = anypb.UnmarshalTo(discoveryResponse.Resources[0], r, proto.UnmarshalOptions{}) assert.Nil(t, err) assert.Equal(t, r.Name, resourceName) } func TestPassthroughResponseGetDiscoveryResponse(t *testing.T) { routes := []types.Resource{&route.RouteConfiguration{Name: resourceName}} - rsrc, err := ptypes.MarshalAny(routes[0]) + rsrc, err := anypb.New(routes[0]) assert.Nil(t, err) dr := &discovery.DiscoveryResponse{ TypeUrl: resource.RouteType, - Resources: []*any.Any{rsrc}, + Resources: []*anypb.Any{rsrc}, VersionInfo: "v", } resp := cache.PassthroughResponse{ @@ -62,14 +62,14 @@ func TestPassthroughResponseGetDiscoveryResponse(t *testing.T) { assert.Equal(t, len(discoveryResponse.Resources), 1) r := &route.RouteConfiguration{} - err = ptypes.UnmarshalAny(discoveryResponse.Resources[0], r) + err = anypb.UnmarshalTo(discoveryResponse.Resources[0], r, proto.UnmarshalOptions{}) assert.Nil(t, err) assert.Equal(t, r.Name, resourceName) assert.Equal(t, discoveryResponse, dr) } func TestHeartbeatResponseGetDiscoveryResponse(t *testing.T) { - routes := []types.ResourceWithTtl{{Resource: &route.RouteConfiguration{Name: resourceName}}} + routes := []types.ResourceWithTTL{{Resource: &route.RouteConfiguration{Name: resourceName}}} resp := cache.RawResponse{ Request: &discovery.DiscoveryRequest{TypeUrl: resource.RouteType}, Version: "v", @@ -81,14 +81,24 @@ func TestHeartbeatResponseGetDiscoveryResponse(t *testing.T) { assert.Nil(t, err) assert.Equal(t, discoveryResponse.VersionInfo, resp.Version) assert.Equal(t, len(discoveryResponse.Resources), 1) - assert.True(t, ttl_helper.IsTTLResource(discoveryResponse.Resources[0])) + assert.False(t, isTTLResource(discoveryResponse.Resources[0])) cachedResponse, err := resp.GetDiscoveryResponse() assert.Nil(t, err) assert.Same(t, discoveryResponse, cachedResponse) r := &route.RouteConfiguration{} - err = ptypes.UnmarshalAny(discoveryResponse.Resources[0], r) + err = anypb.UnmarshalTo(discoveryResponse.Resources[0], r, proto.UnmarshalOptions{}) assert.Nil(t, err) assert.Equal(t, r.Name, resourceName) } + +func isTTLResource(resource *anypb.Any) bool { + wrappedResource := &discovery.Resource{} + err := protojson.Unmarshal(resource.Value, wrappedResource) + if err != nil { + return false + } + + return wrappedResource.Resource == nil +} diff --git a/pkg/envoy-control-plane/cache/v3/delta.go b/pkg/envoy-control-plane/cache/v3/delta.go new file mode 100644 index 0000000000..90a2a6e893 --- /dev/null +++ b/pkg/envoy-control-plane/cache/v3/delta.go @@ -0,0 +1,83 @@ +// Copyright 2020 Envoyproxy Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cache + +import ( + "context" + + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" +) + +// groups together resource-related arguments for the createDeltaResponse function +type resourceContainer struct { + resourceMap map[string]types.Resource + versionMap map[string]string + systemVersion string +} + +func createDeltaResponse(ctx context.Context, req *DeltaRequest, state stream.StreamState, resources resourceContainer) *RawDeltaResponse { + // variables to build our response with + nextVersionMap := make(map[string]string) + filtered := make([]types.Resource, 0, len(resources.resourceMap)) + toRemove := make([]string, 0) + + // If we are handling a wildcard request, we want to respond with all resources + switch { + case state.IsWildcard(): + for name, r := range resources.resourceMap { + // Since we've already precomputed the version hashes of the new snapshot, + // we can just set it here to be used for comparison later + version := resources.versionMap[name] + nextVersionMap[name] = version + prevVersion, found := state.GetResourceVersions()[name] + if !found || (prevVersion != nextVersionMap[name]) { + filtered = append(filtered, r) + } + } + default: + // Reply only with the requested resources + for name, prevVersion := range state.GetResourceVersions() { + if r, ok := resources.resourceMap[name]; ok { + nextVersion := resources.versionMap[name] + if prevVersion != nextVersion { + filtered = append(filtered, r) + } + nextVersionMap[name] = nextVersion + } else { + // We track non-existent resources for non-wildcard streams until the client explicitly unsubscribes from them. + nextVersionMap[name] = "" + } + } + } + + // Compute resources for removal regardless of the request type + for name, prevVersion := range state.GetResourceVersions() { + // The prevVersion != "" check is in place to make sure we are only sending an update to the client once right after it is removed. + // If the client decides to keep the subscription we skip the add for every subsequent response. + if _, ok := resources.resourceMap[name]; !ok && prevVersion != "" { + toRemove = append(toRemove, name) + } + } + + return &RawDeltaResponse{ + DeltaRequest: req, + Resources: filtered, + RemovedResources: toRemove, + NextVersionMap: nextVersionMap, + SystemVersionInfo: resources.systemVersion, + Ctx: ctx, + } +} diff --git a/pkg/envoy-control-plane/cache/v3/delta_test.go b/pkg/envoy-control-plane/cache/v3/delta_test.go new file mode 100644 index 0000000000..f4557f879f --- /dev/null +++ b/pkg/envoy-control-plane/cache/v3/delta_test.go @@ -0,0 +1,283 @@ +package cache_test + +import ( + "context" + "fmt" + "reflect" + "testing" + "time" + + "github.com/stretchr/testify/assert" + + core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" + rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v3" +) + +func TestSnapshotCacheDeltaWatch(t *testing.T) { + c := cache.NewSnapshotCache(false, group{}, logger{t: t}) + watches := make(map[string]chan cache.DeltaResponse) + + // Make our initial request as a wildcard to get all resources and make sure the wildcard requesting works as intended + for _, typ := range testTypes { + watches[typ] = make(chan cache.DeltaResponse, 1) + c.CreateDeltaWatch(&discovery.DeltaDiscoveryRequest{ + Node: &core.Node{ + Id: "node", + }, + TypeUrl: typ, + ResourceNamesSubscribe: names[typ], + }, stream.NewStreamState(true, nil), watches[typ]) + } + + if err := c.SetSnapshot(context.Background(), key, snapshot); err != nil { + t.Fatal(err) + } + + versionMap := make(map[string]map[string]string) + for _, typ := range testTypes { + t.Run(typ, func(t *testing.T) { + select { + case out := <-watches[typ]: + if !reflect.DeepEqual(cache.IndexRawResourcesByName(out.(*cache.RawDeltaResponse).Resources), snapshot.GetResources(typ)) { + t.Errorf("got resources %v, want %v", out.(*cache.RawDeltaResponse).Resources, snapshot.GetResources(typ)) + } + vMap := out.GetNextVersionMap() + versionMap[typ] = vMap + case <-time.After(time.Second): + t.Fatal("failed to receive snapshot response") + } + }) + } + + // On re-request we want to use non-wildcard so we can verify the logic path of not requesting + // all resources as well as individual resource removals + for _, typ := range testTypes { + watches[typ] = make(chan cache.DeltaResponse, 1) + c.CreateDeltaWatch(&discovery.DeltaDiscoveryRequest{ + Node: &core.Node{ + Id: "node", + }, + TypeUrl: typ, + ResourceNamesSubscribe: names[typ], + }, stream.NewStreamState(false, versionMap[typ]), watches[typ]) + } + + if count := c.GetStatusInfo(key).GetNumDeltaWatches(); count != len(testTypes) { + t.Errorf("watches should be created for the latest version, saw %d watches expected %d", count, len(testTypes)) + } + + // set partially-versioned snapshot + snapshot2 := snapshot + snapshot2.Resources[types.Endpoint] = cache.NewResources(version2, []types.Resource{resource.MakeEndpoint(clusterName, 9090)}) + if err := c.SetSnapshot(context.Background(), key, snapshot2); err != nil { + t.Fatal(err) + } + if count := c.GetStatusInfo(key).GetNumDeltaWatches(); count != len(testTypes)-1 { + t.Errorf("watches should be preserved for all but one, got: %d open watches instead of the expected %d open watches", count, len(testTypes)-1) + } + + // validate response for endpoints + select { + case out := <-watches[testTypes[0]]: + if !reflect.DeepEqual(cache.IndexRawResourcesByName(out.(*cache.RawDeltaResponse).Resources), snapshot2.GetResources(rsrc.EndpointType)) { + t.Fatalf("got resources %v, want %v", out.(*cache.RawDeltaResponse).Resources, snapshot2.GetResources(rsrc.EndpointType)) + } + vMap := out.GetNextVersionMap() + versionMap[testTypes[0]] = vMap + case <-time.After(time.Second): + t.Fatal("failed to receive snapshot response") + } +} + +func TestDeltaRemoveResources(t *testing.T) { + c := cache.NewSnapshotCache(false, group{}, logger{t: t}) + watches := make(map[string]chan cache.DeltaResponse) + streams := make(map[string]*stream.StreamState) + + for _, typ := range testTypes { + watches[typ] = make(chan cache.DeltaResponse, 1) + state := stream.NewStreamState(true, make(map[string]string)) + streams[typ] = &state + // We don't specify any resource name subscriptions here because we want to make sure we test wildcard + // functionality. This means we should receive all resources back without requesting a subscription by name. + c.CreateDeltaWatch(&discovery.DeltaDiscoveryRequest{ + Node: &core.Node{ + Id: "node", + }, + TypeUrl: typ, + }, *streams[typ], watches[typ]) + } + + if err := c.SetSnapshot(context.Background(), key, snapshot); err != nil { + t.Fatal(err) + } + + for _, typ := range testTypes { + t.Run(typ, func(t *testing.T) { + select { + case out := <-watches[typ]: + if !reflect.DeepEqual(cache.IndexRawResourcesByName(out.(*cache.RawDeltaResponse).Resources), snapshot.GetResources(typ)) { + t.Errorf("got resources %v, want %v", out.(*cache.RawDeltaResponse).Resources, snapshot.GetResources(typ)) + } + nextVersionMap := out.GetNextVersionMap() + streams[typ].SetResourceVersions(nextVersionMap) + case <-time.After(time.Second): + t.Fatal("failed to receive a snapshot response") + } + }) + } + + // We want to continue to do wildcard requests here so we can later + // test the removal of certain resources from a partial snapshot + for _, typ := range testTypes { + watches[typ] = make(chan cache.DeltaResponse, 1) + c.CreateDeltaWatch(&discovery.DeltaDiscoveryRequest{ + Node: &core.Node{ + Id: "node", + }, + TypeUrl: typ, + }, *streams[typ], watches[typ]) + } + + if count := c.GetStatusInfo(key).GetNumDeltaWatches(); count != len(testTypes) { + t.Errorf("watches should be created for the latest version, saw %d watches expected %d", count, len(testTypes)) + } + + // set a partially versioned snapshot with no endpoints + snapshot2 := snapshot + snapshot2.Resources[types.Endpoint] = cache.NewResources(version2, []types.Resource{}) + if err := c.SetSnapshot(context.Background(), key, snapshot2); err != nil { + t.Fatal(err) + } + + // validate response for endpoints + select { + case out := <-watches[testTypes[0]]: + if !reflect.DeepEqual(cache.IndexRawResourcesByName(out.(*cache.RawDeltaResponse).Resources), snapshot2.GetResources(rsrc.EndpointType)) { + t.Fatalf("got resources %v, want %v", out.(*cache.RawDeltaResponse).Resources, snapshot2.GetResources(rsrc.EndpointType)) + } + nextVersionMap := out.GetNextVersionMap() + + // make sure the version maps are different since we no longer are tracking any endpoint resources + if reflect.DeepEqual(streams[testTypes[0]].GetResourceVersions(), nextVersionMap) { + t.Fatalf("versionMap for the endpoint resource type did not change, received: %v, instead of an empty map", nextVersionMap) + } + case <-time.After(time.Second): + t.Fatal("failed to receive snapshot response") + } +} + +func TestConcurrentSetDeltaWatch(t *testing.T) { + c := cache.NewSnapshotCache(false, group{}, logger{t: t}) + for i := 0; i < 50; i++ { + version := fmt.Sprintf("v%d", i) + func(i int) { + t.Run(fmt.Sprintf("worker%d", i), func(t *testing.T) { + t.Parallel() + id := fmt.Sprintf("%d", i%2) + responses := make(chan cache.DeltaResponse, 1) + if i < 25 { + snap, err := cache.NewSnapshot("", map[rsrc.Type][]types.Resource{}) + if err != nil { + t.Fatal(err) + } + snap.Resources[types.Endpoint] = cache.NewResources(version, []types.Resource{resource.MakeEndpoint(clusterName, uint32(i))}) + if err := c.SetSnapshot(context.Background(), key, snap); err != nil { + t.Fatalf("snapshot failed: %s", err) + } + } else { + cancel := c.CreateDeltaWatch(&discovery.DeltaDiscoveryRequest{ + Node: &core.Node{ + Id: id, + }, + TypeUrl: rsrc.EndpointType, + ResourceNamesSubscribe: []string{clusterName}, + }, stream.NewStreamState(false, make(map[string]string)), responses) + + defer cancel() + } + }) + }(i) + } +} + +type testKey struct{} + +func TestSnapshotDeltaCacheWatchTimeout(t *testing.T) { + c := cache.NewSnapshotCache(true, group{}, logger{t: t}) + + // Create a non-buffered channel that will block sends. + watchCh := make(chan cache.DeltaResponse) + c.CreateDeltaWatch(&discovery.DeltaDiscoveryRequest{ + Node: &core.Node{ + Id: key, + }, + TypeUrl: rsrc.EndpointType, + ResourceNamesSubscribe: names[rsrc.EndpointType], + }, stream.NewStreamState(false, map[string]string{names[rsrc.EndpointType][0]: ""}), watchCh) + + // The first time we set the snapshot without consuming from the blocking channel, so this should time out. + ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) + defer cancel() + + err := c.SetSnapshot(ctx, key, snapshot) + assert.EqualError(t, err, context.Canceled.Error()) + + // Now reset the snapshot with a consuming channel. This verifies that if setting the snapshot fails, + // we can retry by setting the same snapshot. In other words, we keep the watch open even if we failed + // to respond to it within the deadline. + watchTriggeredCh := make(chan cache.DeltaResponse) + go func() { + response := <-watchCh + watchTriggeredCh <- response + close(watchTriggeredCh) + }() + + err = c.SetSnapshot(context.WithValue(context.Background(), testKey{}, "bar"), key, snapshot) + assert.NoError(t, err) + + // The channel should get closed due to the watch trigger. + select { + case response := <-watchTriggeredCh: + // Verify that we pass the context through. + assert.Equal(t, response.GetContext().Value(testKey{}), "bar") + case <-time.After(time.Second): + t.Fatalf("timed out") + } +} + +func TestSnapshotCacheDeltaWatchCancel(t *testing.T) { + c := cache.NewSnapshotCache(true, group{}, logger{t: t}) + for _, typ := range testTypes { + responses := make(chan cache.DeltaResponse, 1) + cancel := c.CreateDeltaWatch(&discovery.DeltaDiscoveryRequest{ + Node: &core.Node{ + Id: key, + }, + TypeUrl: typ, + ResourceNamesSubscribe: names[typ], + }, stream.NewStreamState(false, make(map[string]string)), responses) + + // Cancel the watch + cancel() + } + // c.GetStatusKeys() should return at least 1 because we register a node ID with the above watch creations + if keys := c.GetStatusKeys(); len(keys) == 0 { + t.Errorf("expected to see a status info registered for watch, saw %d entries", len(keys)) + } + + for _, typ := range testTypes { + if count := c.GetStatusInfo(key).GetNumDeltaWatches(); count > 0 { + t.Errorf("watches should be released for %s", typ) + } + } + + if s := c.GetStatusInfo("missing"); s != nil { + t.Errorf("should not return a status for unknown key: got %#v", s) + } +} diff --git a/pkg/envoy-control-plane/cache/v3/linear.go b/pkg/envoy-control-plane/cache/v3/linear.go index 9a2c9d31fa..becfaef936 100644 --- a/pkg/envoy-control-plane/cache/v3/linear.go +++ b/pkg/envoy-control-plane/cache/v3/linear.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2020 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,13 +20,16 @@ import ( "strconv" "strings" "sync" + "sync/atomic" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" ) type watches = map[chan Response]struct{} -// LinearCache supports collectons of opaque resources. This cache has a +// LinearCache supports collections of opaque resources. This cache has a // single collection indexed by resource names and manages resource versions // internally. It implements the cache interface for a single type URL and // should be combined with other caches via type URL muxing. It can be used to @@ -42,13 +44,25 @@ type LinearCache struct { watches map[string]watches // Set of watches for all resources in the collection watchAll watches - // Continously incremented version + // Set of delta watches. A delta watch always contain the list of subscribed resources + // together with its current version + // version and versionPrefix fields are ignored for delta watches, because we always generate the resource version. + deltaWatches map[int64]DeltaResponseWatch + // Continuously incremented counter used to index delta watches. + deltaWatchCount int64 + // versionMap holds the current hash map of all resources in the cache. + // versionMap is only to be used with delta xDS. + versionMap map[string]string + // Continuously incremented version. version uint64 // Version prefix to be sent to the clients versionPrefix string // Versions for each resource by name. versionVector map[string]uint64 - mu sync.Mutex + + log log.Logger + + mu sync.RWMutex } var _ Cache = &LinearCache{} @@ -75,6 +89,12 @@ func WithInitialResources(resources map[string]types.Resource) LinearCacheOption } } +func WithLogger(log log.Logger) LinearCacheOption { + return func(cache *LinearCache) { + cache.log = log + } +} + // NewLinearCache creates a new cache. See the comments on the struct definition. func NewLinearCache(typeURL string, opts ...LinearCacheOption) *LinearCache { out := &LinearCache{ @@ -82,6 +102,8 @@ func NewLinearCache(typeURL string, opts ...LinearCacheOption) *LinearCache { resources: make(map[string]types.Resource), watches: make(map[string]watches), watchAll: make(watches), + deltaWatches: make(map[int64]DeltaResponseWatch), + versionMap: make(map[string]string), version: 0, versionVector: make(map[string]uint64), } @@ -92,26 +114,26 @@ func NewLinearCache(typeURL string, opts ...LinearCacheOption) *LinearCache { } func (cache *LinearCache) respond(value chan Response, staleResources []string) { - var resources []types.ResourceWithTtl + var resources []types.ResourceWithTTL // TODO: optimize the resources slice creations across different clients if len(staleResources) == 0 { - resources = make([]types.ResourceWithTtl, 0, len(cache.resources)) + resources = make([]types.ResourceWithTTL, 0, len(cache.resources)) for _, resource := range cache.resources { - resources = append(resources, types.ResourceWithTtl{Resource: resource}) + resources = append(resources, types.ResourceWithTTL{Resource: resource}) } } else { - resources = make([]types.ResourceWithTtl, 0, len(staleResources)) + resources = make([]types.ResourceWithTTL, 0, len(staleResources)) for _, name := range staleResources { resource := cache.resources[name] if resource != nil { - resources = append(resources, types.ResourceWithTtl{Resource: resource}) + resources = append(resources, types.ResourceWithTTL{Resource: resource}) } } } value <- &RawResponse{ Request: &Request{TypeUrl: cache.typeURL}, Resources: resources, - Version: cache.versionPrefix + strconv.FormatUint(cache.version, 10), + Version: cache.getVersion(), } } @@ -131,6 +153,37 @@ func (cache *LinearCache) notifyAll(modified map[string]struct{}) { cache.respond(value, nil) } cache.watchAll = make(watches) + + err := cache.updateVersionMap(modified) + if err != nil { + cache.log.Errorf("failed to update version map: %v", err) + } + + for id, watch := range cache.deltaWatches { + res := cache.respondDelta(watch.Request, watch.Response, watch.StreamState) + if res != nil { + delete(cache.deltaWatches, id) + } + } +} + +func (cache *LinearCache) respondDelta(request *DeltaRequest, value chan DeltaResponse, state stream.StreamState) *RawDeltaResponse { + resp := createDeltaResponse(context.Background(), request, state, resourceContainer{ + resourceMap: cache.resources, + versionMap: cache.versionMap, + systemVersion: cache.getVersion(), + }) + + // Only send a response if there were changes + if len(resp.Resources) > 0 || len(resp.RemovedResources) > 0 { + if cache.log != nil { + cache.log.Debugf("[linear cache] node: %s, sending delta response with resources: %v removed resources %v wildcard: %t", + request.GetNode().GetId(), resp.Resources, resp.RemovedResources, state.IsWildcard()) + } + value <- resp + return resp + } + return nil } // UpdateResource updates a resource in the collection. @@ -141,7 +194,7 @@ func (cache *LinearCache) UpdateResource(name string, res types.Resource) error cache.mu.Lock() defer cache.mu.Unlock() - cache.version += 1 + cache.version++ cache.versionVector[name] = cache.version cache.resources[name] = res @@ -156,7 +209,7 @@ func (cache *LinearCache) DeleteResource(name string) error { cache.mu.Lock() defer cache.mu.Unlock() - cache.version += 1 + cache.version++ delete(cache.versionVector, name) delete(cache.resources, name) @@ -165,11 +218,55 @@ func (cache *LinearCache) DeleteResource(name string) error { return nil } -func (cache *LinearCache) CreateWatch(request *Request) (chan Response, func()) { - value := make(chan Response, 1) +// SetResources replaces current resources with a new set of resources. +// This function is useful for wildcard xDS subscriptions. +// This way watches that are subscribed to all resources are triggered only once regardless of how many resources are changed. +func (cache *LinearCache) SetResources(resources map[string]types.Resource) { + cache.mu.Lock() + defer cache.mu.Unlock() + + cache.version++ + + modified := map[string]struct{}{} + // Collect deleted resource names. + for name := range cache.resources { + if _, found := resources[name]; !found { + delete(cache.versionVector, name) + modified[name] = struct{}{} + } + } + + cache.resources = resources + + // Collect changed resource names. + // We assume all resources passed to SetResources are changed. + // Otherwise we would have to do proto.Equal on resources which is pretty expensive operation + for name := range resources { + cache.versionVector[name] = cache.version + modified[name] = struct{}{} + } + + cache.notifyAll(modified) +} + +// GetResources returns current resources stored in the cache +func (cache *LinearCache) GetResources() map[string]types.Resource { + cache.mu.RLock() + defer cache.mu.RUnlock() + + // create a copy of our internal storage to avoid data races + // involving mutations of our backing map + resources := make(map[string]types.Resource, len(cache.resources)) + for k, v := range cache.resources { + resources[k] = v + } + return resources +} + +func (cache *LinearCache) CreateWatch(request *Request, streamState stream.StreamState, value chan Response) func() { if request.TypeUrl != cache.typeURL { - close(value) - return value, nil + value <- nil + return nil } // If the version is not up to date, check whether any requested resource has // been updated between the last version and the current version. This avoids the problem @@ -205,12 +302,12 @@ func (cache *LinearCache) CreateWatch(request *Request) (chan Response, func()) } if stale { cache.respond(value, staleResources) - return value, nil + return nil } // Create open watches since versions are up to date. if len(request.ResourceNames) == 0 { cache.watchAll[value] = struct{}{} - return value, func() { + return func() { cache.mu.Lock() defer cache.mu.Unlock() delete(cache.watchAll, value) @@ -224,7 +321,7 @@ func (cache *LinearCache) CreateWatch(request *Request) (chan Response, func()) } set[value] = struct{}{} } - return value, func() { + return func() { cache.mu.Lock() defer cache.mu.Unlock() for _, name := range request.ResourceNames { @@ -239,13 +336,86 @@ func (cache *LinearCache) CreateWatch(request *Request) (chan Response, func()) } } +func (cache *LinearCache) CreateDeltaWatch(request *DeltaRequest, state stream.StreamState, value chan DeltaResponse) func() { + cache.mu.Lock() + defer cache.mu.Unlock() + + response := cache.respondDelta(request, value, state) + + // if respondDelta returns nil this means that there is no change in any resource version + // create a new watch accordingly + if response == nil { + watchID := cache.nextDeltaWatchID() + if cache.log != nil { + cache.log.Infof("[linear cache] open delta watch ID:%d for %s Resources:%v, system version %q", watchID, + cache.typeURL, state.GetResourceVersions(), cache.getVersion()) + } + + cache.deltaWatches[watchID] = DeltaResponseWatch{Request: request, Response: value, StreamState: state} + + return cache.cancelDeltaWatch(watchID) + } + + return nil +} + +func (cache *LinearCache) updateVersionMap(modified map[string]struct{}) error { + for name, r := range cache.resources { + // skip recalculating hash for the resoces that weren't modified + if _, ok := modified[name]; !ok { + continue + } + // hash our version in here and build the version map + marshaledResource, err := MarshalResource(r) + if err != nil { + return err + } + v := HashResource(marshaledResource) + if v == "" { + return errors.New("failed to build resource version") + } + + cache.versionMap[GetResourceName(r)] = v + } + for name := range modified { + if r, ok := cache.resources[name]; !ok { + delete(cache.versionMap, GetResourceName(r)) + } + } + return nil +} + +func (cache *LinearCache) getVersion() string { + return cache.versionPrefix + strconv.FormatUint(cache.version, 10) +} + +// cancellation function for cleaning stale watches +func (cache *LinearCache) cancelDeltaWatch(watchID int64) func() { + return func() { + cache.mu.Lock() + defer cache.mu.Unlock() + delete(cache.deltaWatches, watchID) + } +} + +func (cache *LinearCache) nextDeltaWatchID() int64 { + return atomic.AddInt64(&cache.deltaWatchCount, 1) +} + func (cache *LinearCache) Fetch(ctx context.Context, request *Request) (Response, error) { return nil, errors.New("not implemented") } // Number of active watches for a resource name. func (cache *LinearCache) NumWatches(name string) int { + cache.mu.RLock() + defer cache.mu.RUnlock() + return len(cache.watches[name]) + len(cache.watchAll) +} + +// Number of active delta watches. +func (cache *LinearCache) NumDeltaWatches() int { cache.mu.Lock() defer cache.mu.Unlock() - return len(cache.watches[name]) + len(cache.watchAll) + return len(cache.deltaWatches) } diff --git a/pkg/envoy-control-plane/cache/v3/linear_test.go b/pkg/envoy-control-plane/cache/v3/linear_test.go index da8c4b666a..d91d6b3b7e 100644 --- a/pkg/envoy-control-plane/cache/v3/linear_test.go +++ b/pkg/envoy-control-plane/cache/v3/linear_test.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2020 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,11 +15,18 @@ package cache import ( + "errors" "fmt" + "reflect" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/types/known/wrapperspb" + + endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - wrappers "github.com/golang/protobuf/ptypes/wrappers" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" ) const ( @@ -28,7 +34,7 @@ const ( ) func testResource(s string) types.Resource { - return &wrappers.StringValue{Value: s} + return wrapperspb.String(s) } func verifyResponse(t *testing.T, ch <-chan Response, version string, num int) { @@ -55,6 +61,60 @@ func verifyResponse(t *testing.T, ch <-chan Response, version string, num int) { } } +type resourceInfo struct { + name string + version string +} + +func verifyDeltaResponse(t *testing.T, ch <-chan DeltaResponse, resources []resourceInfo, deleted []string) { + t.Helper() + r := <-ch + if r.GetDeltaRequest().TypeUrl != testType { + t.Errorf("unexpected empty request type URL: %q", r.GetDeltaRequest().TypeUrl) + } + out, err := r.GetDeltaDiscoveryResponse() + if err != nil { + t.Fatal(err) + } + if len(out.Resources) != len(resources) { + t.Errorf("unexpected number of responses: got %d, want %d", len(out.Resources), len(resources)) + } + for _, r := range resources { + found := false + for _, r1 := range out.Resources { + if r1.Name == r.name && r1.Version == r.version { + found = true + break + } else if r1.Name == r.name { + t.Errorf("unexpected version for resource %q: got %q, want %q", r.name, r1.Version, r.version) + found = true + break + } + } + if !found { + t.Errorf("resource with name %q not found in response", r.name) + } + } + if out.TypeUrl != testType { + t.Errorf("unexpected type URL: %q", out.TypeUrl) + } + if len(out.RemovedResources) != len(deleted) { + t.Errorf("unexpected number of removed resurces: got %d, want %d", len(out.RemovedResources), len(deleted)) + } + for _, r := range deleted { + found := false + for _, rr := range out.RemovedResources { + if r == rr { + found = true + break + } + } + if !found { + t.Errorf("Expected resource %s to be deleted", r) + } + } +} + func checkWatchCount(t *testing.T, c *LinearCache, name string, count int) { t.Helper() if i := c.NumWatches(name); i != count { @@ -62,6 +122,13 @@ func checkWatchCount(t *testing.T, c *LinearCache, name string, count int) { } } +func checkDeltaWatchCount(t *testing.T, c *LinearCache, count int) { + t.Helper() + if i := c.NumDeltaWatches(); i != count { + t.Errorf("unexpected number of delta watches: got %d, want %d", i, count) + } +} + func mustBlock(t *testing.T, w <-chan Response) { select { case <-w: @@ -70,132 +137,233 @@ func mustBlock(t *testing.T, w <-chan Response) { } } +func mustBlockDelta(t *testing.T, w <-chan DeltaResponse) { + select { + case <-w: + t.Error("watch must block") + default: + } +} + +func hashResource(t *testing.T, resource types.Resource) string { + marshaledResource, err := MarshalResource(resource) + if err != nil { + t.Fatal(err) + } + v := HashResource(marshaledResource) + if v == "" { + t.Fatal(errors.New("failed to build resource version")) + } + return v +} + func TestLinearInitialResources(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType, WithInitialResources(map[string]types.Resource{"a": testResource("a"), "b": testResource("b")})) - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType}) + w := make(chan Response, 1) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType}, streamState, w) verifyResponse(t, w, "0", 1) - w, _ = c.CreateWatch(&Request{TypeUrl: testType}) + c.CreateWatch(&Request{TypeUrl: testType}, streamState, w) verifyResponse(t, w, "0", 2) } func TestLinearCornerCases(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType) err := c.UpdateResource("a", nil) if err == nil { t.Error("expected error on nil resource") } // create an incorrect type URL request - w, _ := c.CreateWatch(&Request{TypeUrl: "test"}) + w := make(chan Response, 1) + c.CreateWatch(&Request{TypeUrl: "test"}, streamState, w) select { - case _, more := <-w: - if more { - t.Error("should be closed by the producer") + case r := <-w: + if r != nil { + t.Error("response should be nil") } default: - t.Error("channel should be closed") + t.Error("should receive nil response") } } func TestLinearBasic(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType) // Create watches before a resource is ready - w1, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) + w1 := make(chan Response, 1) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w1) mustBlock(t, w1) - w, _ := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) + + w := make(chan Response, 1) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}, streamState, w) mustBlock(t, w) checkWatchCount(t, c, "a", 2) checkWatchCount(t, c, "b", 1) - c.UpdateResource("a", testResource("a")) + require.NoError(t, c.UpdateResource("a", testResource("a"))) checkWatchCount(t, c, "a", 0) checkWatchCount(t, c, "b", 0) verifyResponse(t, w1, "1", 1) verifyResponse(t, w, "1", 1) // Request again, should get same response - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w) checkWatchCount(t, c, "a", 0) verifyResponse(t, w, "1", 1) - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}, streamState, w) checkWatchCount(t, c, "a", 0) verifyResponse(t, w, "1", 1) // Add another element and update the first, response should be different - c.UpdateResource("b", testResource("b")) - c.UpdateResource("a", testResource("aa")) - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) + require.NoError(t, c.UpdateResource("b", testResource("b"))) + require.NoError(t, c.UpdateResource("a", testResource("aa"))) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w) verifyResponse(t, w, "3", 1) - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}, streamState, w) verifyResponse(t, w, "3", 2) } +func TestLinearSetResources(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) + c := NewLinearCache(testType) + + // Create new resources + w1 := make(chan Response, 1) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w1) + mustBlock(t, w1) + w2 := make(chan Response, 1) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}, streamState, w2) + mustBlock(t, w2) + c.SetResources(map[string]types.Resource{ + "a": testResource("a"), + "b": testResource("b"), + }) + verifyResponse(t, w1, "1", 1) + verifyResponse(t, w2, "1", 2) // the version was only incremented once for all resources + + // Add another element and update the first, response should be different + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "1"}, streamState, w1) + mustBlock(t, w1) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}, streamState, w2) + mustBlock(t, w2) + c.SetResources(map[string]types.Resource{ + "a": testResource("aa"), + "b": testResource("b"), + "c": testResource("c"), + }) + verifyResponse(t, w1, "2", 1) + verifyResponse(t, w2, "2", 3) + + // Delete resource + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "2"}, streamState, w1) + mustBlock(t, w1) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "2"}, streamState, w2) + mustBlock(t, w2) + c.SetResources(map[string]types.Resource{ + "b": testResource("b"), + "c": testResource("c"), + }) + verifyResponse(t, w1, "", 0) // removing a resource from the set triggers existing watches for deleted resources + verifyResponse(t, w2, "3", 2) +} + +func TestLinearGetResources(t *testing.T) { + c := NewLinearCache(testType) + + expectedResources := map[string]types.Resource{ + "a": testResource("a"), + "b": testResource("b"), + } + + c.SetResources(expectedResources) + + resources := c.GetResources() + + if !reflect.DeepEqual(expectedResources, resources) { + t.Errorf("resources are not equal. got: %v want: %v", resources, expectedResources) + } +} + func TestLinearVersionPrefix(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType, WithVersionPrefix("instance1-")) - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) + w := make(chan Response, 1) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w) verifyResponse(t, w, "instance1-0", 0) - c.UpdateResource("a", testResource("a")) - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) + require.NoError(t, c.UpdateResource("a", testResource("a"))) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w) verifyResponse(t, w, "instance1-1", 1) - w, _ = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "instance1-1"}) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "instance1-1"}, streamState, w) mustBlock(t, w) checkWatchCount(t, c, "a", 1) } func TestLinearDeletion(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType, WithInitialResources(map[string]types.Resource{"a": testResource("a"), "b": testResource("b")})) - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}) + w := make(chan Response, 1) + c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w) mustBlock(t, w) checkWatchCount(t, c, "a", 1) - c.DeleteResource("a") + require.NoError(t, c.DeleteResource("a")) verifyResponse(t, w, "1", 0) checkWatchCount(t, c, "a", 0) - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}, streamState, w) verifyResponse(t, w, "1", 1) checkWatchCount(t, c, "b", 0) - c.DeleteResource("b") - w, _ = c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) + require.NoError(t, c.DeleteResource("b")) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}, streamState, w) verifyResponse(t, w, "2", 0) checkWatchCount(t, c, "b", 0) } func TestLinearWatchTwo(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType, WithInitialResources(map[string]types.Resource{"a": testResource("a"), "b": testResource("b")})) - w, _ := c.CreateWatch(&Request{ResourceNames: []string{"a", "b"}, TypeUrl: testType, VersionInfo: "0"}) + w := make(chan Response, 1) + c.CreateWatch(&Request{ResourceNames: []string{"a", "b"}, TypeUrl: testType, VersionInfo: "0"}, streamState, w) mustBlock(t, w) - w1, _ := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}) + w1 := make(chan Response, 1) + c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "0"}, streamState, w1) mustBlock(t, w1) - c.UpdateResource("a", testResource("aa")) + require.NoError(t, c.UpdateResource("a", testResource("aa"))) // should only get the modified resource verifyResponse(t, w, "1", 1) verifyResponse(t, w1, "1", 2) } func TestLinearCancel(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType) - c.UpdateResource("a", testResource("a")) + require.NoError(t, c.UpdateResource("a", testResource("a"))) // cancel watch-all - w, cancel := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) + w := make(chan Response, 1) + cancel := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}, streamState, w) mustBlock(t, w) checkWatchCount(t, c, "a", 1) cancel() checkWatchCount(t, c, "a", 0) // cancel watch for "a" - w, cancel = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "1"}) + cancel = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "1"}, streamState, w) mustBlock(t, w) checkWatchCount(t, c, "a", 1) cancel() checkWatchCount(t, c, "a", 0) // open four watches for "a" and "b" and two for all, cancel one of each, make sure the second one is unaffected - w, cancel = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "1"}) - w2, cancel2 := c.CreateWatch(&Request{ResourceNames: []string{"b"}, TypeUrl: testType, VersionInfo: "1"}) - w3, cancel3 := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) - w4, cancel4 := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}) + w2 := make(chan Response, 1) + w3 := make(chan Response, 1) + w4 := make(chan Response, 1) + cancel = c.CreateWatch(&Request{ResourceNames: []string{"a"}, TypeUrl: testType, VersionInfo: "1"}, streamState, w) + cancel2 := c.CreateWatch(&Request{ResourceNames: []string{"b"}, TypeUrl: testType, VersionInfo: "1"}, streamState, w2) + cancel3 := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}, streamState, w3) + cancel4 := c.CreateWatch(&Request{TypeUrl: testType, VersionInfo: "1"}, streamState, w4) mustBlock(t, w) mustBlock(t, w2) mustBlock(t, w3) @@ -214,7 +382,10 @@ func TestLinearCancel(t *testing.T) { checkWatchCount(t, c, "b", 0) } +// TODO(mattklein123): This test requires GOMAXPROCS or -parallel >= 100. This should be +// rewritten to not require that. This is not the case in the GH actions environment. func TestLinearConcurrentSetWatch(t *testing.T) { + streamState := stream.NewStreamState(false, map[string]string{}) c := NewLinearCache(testType) n := 50 for i := 0; i < 2*n; i++ { @@ -224,16 +395,17 @@ func TestLinearConcurrentSetWatch(t *testing.T) { id := fmt.Sprintf("%d", i) if i%2 == 0 { t.Logf("update resource %q", id) - c.UpdateResource(id, testResource(id)) + require.NoError(t, c.UpdateResource(id, testResource(id))) } else { id2 := fmt.Sprintf("%d", i-1) t.Logf("request resources %q and %q", id, id2) - value, _ := c.CreateWatch(&Request{ + value := make(chan Response, 1) + c.CreateWatch(&Request{ // Only expect one to become stale ResourceNames: []string{id, id2}, VersionInfo: "0", TypeUrl: testType, - }) + }, streamState, value) // wait until all updates apply verifyResponse(t, value, "", 1) } @@ -241,3 +413,141 @@ func TestLinearConcurrentSetWatch(t *testing.T) { }(i) } } + +func TestLinearDeltaWildcard(t *testing.T) { + c := NewLinearCache(testType) + state1 := stream.NewStreamState(true, map[string]string{}) + w1 := make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state1, w1) + mustBlockDelta(t, w1) + state2 := stream.NewStreamState(true, map[string]string{}) + w2 := make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state2, w2) + mustBlockDelta(t, w1) + checkDeltaWatchCount(t, c, 2) + + a := &endpoint.ClusterLoadAssignment{ClusterName: "a"} + hash := hashResource(t, a) + err := c.UpdateResource("a", a) + assert.NoError(t, err) + checkDeltaWatchCount(t, c, 0) + verifyDeltaResponse(t, w1, []resourceInfo{{"a", hash}}, nil) + verifyDeltaResponse(t, w2, []resourceInfo{{"a", hash}}, nil) +} + +func TestLinearDeltaExistingResources(t *testing.T) { + c := NewLinearCache(testType) + a := &endpoint.ClusterLoadAssignment{ClusterName: "a"} + hashA := hashResource(t, a) + err := c.UpdateResource("a", a) + assert.NoError(t, err) + b := &endpoint.ClusterLoadAssignment{ClusterName: "b"} + hashB := hashResource(t, b) + err = c.UpdateResource("b", b) + assert.NoError(t, err) + + state := stream.NewStreamState(false, map[string]string{"b": "", "c": ""}) // watching b and c - not interested in a + w := make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + checkDeltaWatchCount(t, c, 0) + verifyDeltaResponse(t, w, []resourceInfo{{"b", hashB}}, []string{}) + + state = stream.NewStreamState(false, map[string]string{"a": "", "b": ""}) + w = make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + checkDeltaWatchCount(t, c, 0) + verifyDeltaResponse(t, w, []resourceInfo{{"b", hashB}, {"a", hashA}}, nil) +} + +func TestLinearDeltaInitialResourcesVersionSet(t *testing.T) { + c := NewLinearCache(testType) + a := &endpoint.ClusterLoadAssignment{ClusterName: "a"} + hashA := hashResource(t, a) + err := c.UpdateResource("a", a) + assert.NoError(t, err) + b := &endpoint.ClusterLoadAssignment{ClusterName: "b"} + hashB := hashResource(t, b) + err = c.UpdateResource("b", b) + assert.NoError(t, err) + + state := stream.NewStreamState(false, map[string]string{"a": "", "b": hashB}) + w := make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + checkDeltaWatchCount(t, c, 0) + verifyDeltaResponse(t, w, []resourceInfo{{"a", hashA}}, nil) // b is up to date and shouldn't be returned + + state = stream.NewStreamState(false, map[string]string{"a": hashA, "b": hashB}) + w = make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + mustBlockDelta(t, w) + checkDeltaWatchCount(t, c, 1) + b = &endpoint.ClusterLoadAssignment{ClusterName: "b", Endpoints: []*endpoint.LocalityLbEndpoints{{Priority: 10}}} // new version of b + hashB = hashResource(t, b) + err = c.UpdateResource("b", b) + assert.NoError(t, err) + checkDeltaWatchCount(t, c, 0) + verifyDeltaResponse(t, w, []resourceInfo{{"b", hashB}}, nil) +} + +func TestLinearDeltaResourceUpdate(t *testing.T) { + c := NewLinearCache(testType) + a := &endpoint.ClusterLoadAssignment{ClusterName: "a"} + hashA := hashResource(t, a) + err := c.UpdateResource("a", a) + assert.NoError(t, err) + b := &endpoint.ClusterLoadAssignment{ClusterName: "b"} + hashB := hashResource(t, b) + err = c.UpdateResource("b", b) + assert.NoError(t, err) + + state := stream.NewStreamState(false, map[string]string{"a": "", "b": ""}) + w := make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + checkDeltaWatchCount(t, c, 0) + verifyDeltaResponse(t, w, []resourceInfo{{"b", hashB}, {"a", hashA}}, nil) + + state = stream.NewStreamState(false, map[string]string{"a": hashA, "b": hashB}) + w = make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + mustBlockDelta(t, w) + checkDeltaWatchCount(t, c, 1) + + a = &endpoint.ClusterLoadAssignment{ClusterName: "a", Endpoints: []*endpoint.LocalityLbEndpoints{ //resource update + {Priority: 10}, + }} + hashA = hashResource(t, a) + err = c.UpdateResource("a", a) + assert.NoError(t, err) + verifyDeltaResponse(t, w, []resourceInfo{{"a", hashA}}, nil) +} + +func TestLinearDeltaResourceDelete(t *testing.T) { + c := NewLinearCache(testType) + a := &endpoint.ClusterLoadAssignment{ClusterName: "a"} + hashA := hashResource(t, a) + err := c.UpdateResource("a", a) + assert.NoError(t, err) + b := &endpoint.ClusterLoadAssignment{ClusterName: "b"} + hashB := hashResource(t, b) + err = c.UpdateResource("b", b) + assert.NoError(t, err) + + state := stream.NewStreamState(false, map[string]string{"a": "", "b": ""}) + w := make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + checkDeltaWatchCount(t, c, 0) + verifyDeltaResponse(t, w, []resourceInfo{{"b", hashB}, {"a", hashA}}, nil) + + state = stream.NewStreamState(false, map[string]string{"a": hashA, "b": hashB}) + w = make(chan DeltaResponse, 1) + c.CreateDeltaWatch(&DeltaRequest{TypeUrl: testType}, state, w) + mustBlockDelta(t, w) + checkDeltaWatchCount(t, c, 1) + + a = &endpoint.ClusterLoadAssignment{ClusterName: "a", Endpoints: []*endpoint.LocalityLbEndpoints{ //resource update + {Priority: 10}, + }} + hashA = hashResource(t, a) + c.SetResources(map[string]types.Resource{"a": a}) + verifyDeltaResponse(t, w, []resourceInfo{{"a", hashA}}, []string{"b"}) +} diff --git a/pkg/envoy-control-plane/cache/v3/mux.go b/pkg/envoy-control-plane/cache/v3/mux.go index 129e42d0e4..16bff4d772 100644 --- a/pkg/envoy-control-plane/cache/v3/mux.go +++ b/pkg/envoy-control-plane/cache/v3/mux.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2020 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,6 +17,8 @@ package cache import ( "context" "errors" + + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" ) // MuxCache multiplexes across several caches using a classification function. @@ -28,22 +29,32 @@ import ( // making sure there is always a matching cache. type MuxCache struct { // Classification functions. - Classify func(Request) string + Classify func(*Request) string + ClassifyDelta func(*DeltaRequest) string // Muxed caches. Caches map[string]Cache } var _ Cache = &MuxCache{} -func (mux *MuxCache) CreateWatch(request *Request) (chan Response, func()) { - key := mux.Classify(*request) +func (mux *MuxCache) CreateWatch(request *Request, state stream.StreamState, value chan Response) func() { + key := mux.Classify(request) + cache, exists := mux.Caches[key] + if !exists { + value <- nil + return nil + } + return cache.CreateWatch(request, state, value) +} + +func (mux *MuxCache) CreateDeltaWatch(request *DeltaRequest, state stream.StreamState, value chan DeltaResponse) func() { + key := mux.ClassifyDelta(request) cache, exists := mux.Caches[key] if !exists { - value := make(chan Response, 0) - close(value) - return value, nil + value <- nil + return nil } - return cache.CreateWatch(request) + return cache.CreateDeltaWatch(request, state, value) } func (mux *MuxCache) Fetch(ctx context.Context, request *Request) (Response, error) { diff --git a/pkg/envoy-control-plane/cache/v3/resource.go b/pkg/envoy-control-plane/cache/v3/resource.go index a3ded69314..f881d43a02 100644 --- a/pkg/envoy-control-plane/cache/v3/resource.go +++ b/pkg/envoy-control-plane/cache/v3/resource.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,11 @@ package cache import ( - "github.com/golang/protobuf/proto" + "crypto/sha256" + "encoding/hex" + "fmt" + + "google.golang.org/protobuf/proto" cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" @@ -31,8 +34,8 @@ import ( "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/wellknown" ) -// GetResponseType returns the enumeration for a valid xDS type URL -func GetResponseType(typeURL string) types.ResponseType { +// GetResponseType returns the enumeration for a valid xDS type URL. +func GetResponseType(typeURL resource.Type) types.ResponseType { switch typeURL { case resource.EndpointType: return types.Endpoint @@ -40,16 +43,44 @@ func GetResponseType(typeURL string) types.ResponseType { return types.Cluster case resource.RouteType: return types.Route + case resource.ScopedRouteType: + return types.ScopedRoute case resource.ListenerType: return types.Listener case resource.SecretType: return types.Secret case resource.RuntimeType: return types.Runtime + case resource.ExtensionConfigType: + return types.ExtensionConfig } return types.UnknownType } +// GetResponseTypeURL returns the type url for a valid enum. +func GetResponseTypeURL(responseType types.ResponseType) (string, error) { + switch responseType { + case types.Endpoint: + return resource.EndpointType, nil + case types.Cluster: + return resource.ClusterType, nil + case types.Route: + return resource.RouteType, nil + case types.ScopedRoute: + return resource.ScopedRouteType, nil + case types.Listener: + return resource.ListenerType, nil + case types.Secret: + return resource.SecretType, nil + case types.Runtime: + return resource.RuntimeType, nil + case types.ExtensionConfig: + return resource.ExtensionConfigType, nil + } + + return "", fmt.Errorf("couldn't map response type to known resource type") +} + // GetResourceName returns the resource name for a valid xDS response type. func GetResourceName(res types.Resource) string { switch v := res.(type) { @@ -59,6 +90,8 @@ func GetResourceName(res types.Resource) string { return v.GetName() case *route.RouteConfiguration: return v.GetName() + case *route.ScopedRouteConfiguration: + return v.GetName() case *listener.Listener: return v.GetName() case *auth.Secret: @@ -66,74 +99,169 @@ func GetResourceName(res types.Resource) string { case *runtime.Runtime: return v.GetName() case *core.TypedExtensionConfig: - // This is a V3 proto, but this is the easiest workaround for the fact that there is no V2 proto. return v.GetName() default: return "" } } -// MarshalResource converts the Resource to MarshaledResource +// MarshalResource converts the Resource to MarshaledResource. func MarshalResource(resource types.Resource) (types.MarshaledResource, error) { - b := proto.NewBuffer(nil) - b.SetDeterministic(true) - err := b.Marshal(resource) - if err != nil { - return nil, err + return proto.MarshalOptions{Deterministic: true}.Marshal(resource) +} + +// GetResourceReferences returns a map of dependent resources keyed by resource type, given a map of resources. +// (EDS cluster names for CDS, RDS/SRDS routes names for LDS, RDS route names for SRDS). +func GetResourceReferences(resources map[string]types.ResourceWithTTL) map[resource.Type]map[string]bool { + out := make(map[resource.Type]map[string]bool) + getResourceReferences(resources, out) + + return out +} + +// GetAllResourceReferences returns a map of dependent resources keyed by resources type, given all resources. +func GetAllResourceReferences(resourceGroups [types.UnknownType]Resources) map[resource.Type]map[string]bool { + ret := map[resource.Type]map[string]bool{} + + // We only check resources that we expect to have references to other resources. + responseTypesWithReferences := map[types.ResponseType]struct{}{ + types.Cluster: {}, + types.Listener: {}, + types.ScopedRoute: {}, } - return b.Bytes(), nil + for responseType, resourceGroup := range resourceGroups { + if _, ok := responseTypesWithReferences[types.ResponseType(responseType)]; ok { + items := resourceGroup.Items + getResourceReferences(items, ret) + } + } + + return ret } -// GetResourceReferences returns the names for dependent resources (EDS cluster -// names for CDS, RDS routes names for LDS). -func GetResourceReferences(resources map[string]types.ResourceWithTtl) map[string]bool { - out := make(map[string]bool) +func getResourceReferences(resources map[string]types.ResourceWithTTL, out map[resource.Type]map[string]bool) { for _, res := range resources { if res.Resource == nil { continue } + switch v := res.Resource.(type) { case *endpoint.ClusterLoadAssignment: - // no dependencies + // No dependencies. case *cluster.Cluster: - // for EDS type, use cluster name or ServiceName override - switch typ := v.ClusterDiscoveryType.(type) { - case *cluster.Cluster_Type: - if typ.Type == cluster.Cluster_EDS { - if v.EdsClusterConfig != nil && v.EdsClusterConfig.ServiceName != "" { - out[v.EdsClusterConfig.ServiceName] = true - } else { - out[v.Name] = true - } - } - } + getClusterReferences(v, out) case *route.RouteConfiguration: // References to clusters in both routes (and listeners) are not included // in the result, because the clusters are retrieved in bulk currently, // and not by name. + case *route.ScopedRouteConfiguration: + getScopedRouteReferences(v, out) case *listener.Listener: - // extract route configuration names from HTTP connection manager - for _, chain := range v.FilterChains { - for _, filter := range chain.Filters { - if filter.Name != wellknown.HTTPConnectionManager { - continue - } - - config := resource.GetHTTPConnectionManager(filter) - - if config == nil { - continue - } - - if rds, ok := config.RouteSpecifier.(*hcm.HttpConnectionManager_Rds); ok && rds != nil && rds.Rds != nil { - out[rds.Rds.RouteConfigName] = true - } - } - } + getListenerReferences(v, out) case *runtime.Runtime: // no dependencies } } - return out +} + +func mapMerge(dst map[string]bool, src map[string]bool) { + for k, v := range src { + dst[k] = v + } +} + +// Clusters will reference either the endpoint's cluster name or ServiceName override. +func getClusterReferences(src *cluster.Cluster, out map[resource.Type]map[string]bool) { + endpoints := map[string]bool{} + + switch typ := src.ClusterDiscoveryType.(type) { + case *cluster.Cluster_Type: + if typ.Type == cluster.Cluster_EDS { + if src.EdsClusterConfig != nil && src.EdsClusterConfig.ServiceName != "" { + endpoints[src.EdsClusterConfig.ServiceName] = true + } else { + endpoints[src.Name] = true + } + } + } + + if len(endpoints) > 0 { + if _, ok := out[resource.EndpointType]; !ok { + out[resource.EndpointType] = map[string]bool{} + } + + mapMerge(out[resource.EndpointType], endpoints) + } +} + +// HTTP listeners will either reference ScopedRoutes or Routes. +func getListenerReferences(src *listener.Listener, out map[resource.Type]map[string]bool) { + scopedRoutes := map[string]bool{} + routes := map[string]bool{} + + // extract route configuration names from HTTP connection manager + for _, chain := range src.FilterChains { + for _, filter := range chain.Filters { + if filter.Name != wellknown.HTTPConnectionManager { + continue + } + + config := resource.GetHTTPConnectionManager(filter) + if config == nil { + continue + } + + routeSpecifier := config.RouteSpecifier + switch r := routeSpecifier.(type) { + case *hcm.HttpConnectionManager_Rds: + if r != nil && r.Rds != nil { + routes[r.Rds.RouteConfigName] = true + } + + case *hcm.HttpConnectionManager_ScopedRoutes: + if r != nil && r.ScopedRoutes != nil { + scopedRoutes[r.ScopedRoutes.Name] = true + } + } + } + } + + if len(scopedRoutes) > 0 { + if _, ok := out[resource.ScopedRouteType]; !ok { + out[resource.ScopedRouteType] = map[string]bool{} + } + + mapMerge(out[resource.ScopedRouteType], scopedRoutes) + } + if len(routes) > 0 { + if _, ok := out[resource.RouteType]; !ok { + out[resource.RouteType] = map[string]bool{} + } + + mapMerge(out[resource.RouteType], routes) + } +} + +func getScopedRouteReferences(src *route.ScopedRouteConfiguration, out map[resource.Type]map[string]bool) { + routes := map[string]bool{} + + // For a scoped route configuration, the dependent resource is the RouteConfigurationName. + routes[src.RouteConfigurationName] = true + + if len(routes) > 0 { + if _, ok := out[resource.RouteType]; !ok { + out[resource.RouteType] = map[string]bool{} + } + + mapMerge(out[resource.RouteType], routes) + } +} + +// HashResource will take a resource and create a SHA256 hash sum out of the marshaled bytes +func HashResource(resource []byte) string { + hasher := sha256.New() + hasher.Write(resource) + + return hex.EncodeToString(hasher.Sum(nil)) } diff --git a/pkg/envoy-control-plane/cache/v3/resource_test.go b/pkg/envoy-control-plane/cache/v3/resource_test.go index 98728906f5..9ea718759a 100644 --- a/pkg/envoy-control-plane/cache/v3/resource_test.go +++ b/pkg/envoy-control-plane/cache/v3/resource_test.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,28 +20,34 @@ import ( cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" - v2route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" + rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v3" ) const ( - clusterName = "cluster0" - routeName = "route0" - listenerName = "listener0" - runtimeName = "runtime0" - tlsName = "secret0" - rootName = "root0" + clusterName = "cluster0" + routeName = "route0" + scopedRouteName = "scopedRoute0" + listenerName = "listener0" + scopedListenerName = "scopedListener0" + runtimeName = "runtime0" + tlsName = "secret0" + rootName = "root0" + extensionConfigName = "extensionConfig0" ) var ( - testEndpoint = resource.MakeEndpoint(clusterName, 8080) - testCluster = resource.MakeCluster(resource.Ads, clusterName) - testRoute = resource.MakeRoute(routeName, clusterName) - testListener = resource.MakeHTTPListener(resource.Ads, listenerName, 80, routeName) - testRuntime = resource.MakeRuntime(runtimeName) - testSecret = resource.MakeSecrets(tlsName, rootName) + testEndpoint = resource.MakeEndpoint(clusterName, 8080) + testCluster = resource.MakeCluster(resource.Ads, clusterName) + testRoute = resource.MakeRoute(routeName, clusterName) + testScopedRoute = resource.MakeScopedRoute(scopedRouteName, routeName, []string{"1.2.3.4"}) + testListener = resource.MakeRouteHTTPListener(resource.Ads, listenerName, 80, routeName) + testScopedListener = resource.MakeScopedRouteHTTPListener(resource.Ads, scopedListenerName, 80, scopedRouteName) + testRuntime = resource.MakeRuntime(runtimeName) + testSecret = resource.MakeSecrets(tlsName, rootName) + testExtensionConfig = resource.MakeExtensionConfig(resource.Ads, extensionConfigName, routeName) ) func TestValidate(t *testing.T) { @@ -55,6 +60,9 @@ func TestValidate(t *testing.T) { if err := testRoute.Validate(); err != nil { t.Error(err) } + if err := testScopedRoute.Validate(); err != nil { + t.Error(err) + } if err := testListener.Validate(); err != nil { t.Error(err) } @@ -64,7 +72,7 @@ func TestValidate(t *testing.T) { invalidRoute := &route.RouteConfiguration{ Name: "test", - VirtualHosts: []*v2route.VirtualHost{{ + VirtualHosts: []*route.VirtualHost{{ Name: "test", Domains: []string{}, }}, @@ -88,6 +96,9 @@ func TestGetResourceName(t *testing.T) { if name := cache.GetResourceName(testRoute); name != routeName { t.Errorf("GetResourceName(%v) => got %q, want %q", testRoute, name, routeName) } + if name := cache.GetResourceName(testScopedRoute); name != scopedRouteName { + t.Errorf("GetResourceName(%v) => got %q, want %q", testScopedRoute, name, scopedRouteName) + } if name := cache.GetResourceName(testListener); name != listenerName { t.Errorf("GetResourceName(%v) => got %q, want %q", testListener, name, listenerName) } @@ -102,46 +113,74 @@ func TestGetResourceName(t *testing.T) { func TestGetResourceReferences(t *testing.T) { cases := []struct { in types.Resource - out map[string]bool + out map[rsrc.Type]map[string]bool }{ { in: nil, - out: map[string]bool{}, + out: map[rsrc.Type]map[string]bool{}, }, { in: testCluster, - out: map[string]bool{clusterName: true}, + out: map[rsrc.Type]map[string]bool{rsrc.EndpointType: {clusterName: true}}, }, { in: &cluster.Cluster{Name: clusterName, ClusterDiscoveryType: &cluster.Cluster_Type{Type: cluster.Cluster_EDS}, EdsClusterConfig: &cluster.Cluster_EdsClusterConfig{ServiceName: "test"}}, - out: map[string]bool{"test": true}, + out: map[rsrc.Type]map[string]bool{rsrc.EndpointType: {"test": true}}, }, { - in: resource.MakeHTTPListener(resource.Ads, listenerName, 80, routeName), - out: map[string]bool{routeName: true}, + in: resource.MakeScopedRouteHTTPListener(resource.Xds, listenerName, 80, scopedRouteName), + out: map[rsrc.Type]map[string]bool{rsrc.ScopedRouteType: {scopedRouteName: true}}, + }, + { + in: resource.MakeRouteHTTPListener(resource.Ads, listenerName, 80, routeName), + out: map[rsrc.Type]map[string]bool{rsrc.RouteType: {routeName: true}}, }, { in: resource.MakeTCPListener(listenerName, 80, clusterName), - out: map[string]bool{}, + out: map[rsrc.Type]map[string]bool{}, }, { in: testRoute, - out: map[string]bool{}, + out: map[rsrc.Type]map[string]bool{}, + }, + { + in: testScopedRoute, + out: map[rsrc.Type]map[string]bool{rsrc.RouteType: {routeName: true}}, }, { in: testEndpoint, - out: map[string]bool{}, + out: map[rsrc.Type]map[string]bool{}, }, { in: testRuntime, - out: map[string]bool{}, + out: map[rsrc.Type]map[string]bool{}, }, } for _, cs := range cases { - names := cache.GetResourceReferences(cache.IndexResourcesByName([]types.ResourceWithTtl{{Resource: cs.in}})) + names := cache.GetResourceReferences(cache.IndexResourcesByName([]types.ResourceWithTTL{{Resource: cs.in}})) if !reflect.DeepEqual(names, cs.out) { t.Errorf("GetResourceReferences(%v) => got %v, want %v", cs.in, names, cs.out) } } } + +func TestGetAllResourceReferencesReturnsExpectedRefs(t *testing.T) { + expected := map[rsrc.Type]map[string]bool{ + rsrc.RouteType: {routeName: true}, + rsrc.ScopedRouteType: {scopedRouteName: true}, + rsrc.EndpointType: {clusterName: true}, + } + + resources := [types.UnknownType]cache.Resources{} + resources[types.Endpoint] = cache.NewResources("1", []types.Resource{testEndpoint}) + resources[types.Cluster] = cache.NewResources("1", []types.Resource{testCluster}) + resources[types.Route] = cache.NewResources("1", []types.Resource{testRoute}) + resources[types.Listener] = cache.NewResources("1", []types.Resource{testListener, testScopedListener}) + resources[types.ScopedRoute] = cache.NewResources("1", []types.Resource{testScopedRoute}) + actual := cache.GetAllResourceReferences(resources) + + if !reflect.DeepEqual(actual, expected) { + t.Errorf("GetAllResourceReferences(%v) => got %v, want %v", resources, actual, expected) + } +} diff --git a/pkg/envoy-control-plane/cache/v3/resources.go b/pkg/envoy-control-plane/cache/v3/resources.go new file mode 100644 index 0000000000..d20fd457a9 --- /dev/null +++ b/pkg/envoy-control-plane/cache/v3/resources.go @@ -0,0 +1,47 @@ +package cache + +import "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + +// Resources is a versioned group of resources. +type Resources struct { + // Version information. + Version string + + // Items in the group indexed by name. + Items map[string]types.ResourceWithTTL +} + +// IndexResourcesByName creates a map from the resource name to the resource. +func IndexResourcesByName(items []types.ResourceWithTTL) map[string]types.ResourceWithTTL { + indexed := make(map[string]types.ResourceWithTTL) + for _, item := range items { + indexed[GetResourceName(item.Resource)] = item + } + return indexed +} + +// IndexRawResourcesByName creates a map from the resource name to the resource. +func IndexRawResourcesByName(items []types.Resource) map[string]types.Resource { + indexed := make(map[string]types.Resource) + for _, item := range items { + indexed[GetResourceName(item)] = item + } + return indexed +} + +// NewResources creates a new resource group. +func NewResources(version string, items []types.Resource) Resources { + itemsWithTTL := []types.ResourceWithTTL{} + for _, item := range items { + itemsWithTTL = append(itemsWithTTL, types.ResourceWithTTL{Resource: item}) + } + return NewResourcesWithTTL(version, itemsWithTTL) +} + +// NewResourcesWithTTL creates a new resource group. +func NewResourcesWithTTL(version string, items []types.ResourceWithTTL) Resources { + return Resources{ + Version: version, + Items: IndexResourcesByName(items), + } +} diff --git a/pkg/envoy-control-plane/cache/v3/resources_test.go b/pkg/envoy-control-plane/cache/v3/resources_test.go new file mode 100644 index 0000000000..1f0ff1eda1 --- /dev/null +++ b/pkg/envoy-control-plane/cache/v3/resources_test.go @@ -0,0 +1,84 @@ +package cache_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" +) + +func TestIndexResourcesByName(t *testing.T) { + tests := []struct { + name string + resources []types.ResourceWithTTL + want map[string]types.ResourceWithTTL + }{ + { + name: "empty", + resources: nil, + want: map[string]types.ResourceWithTTL{}, + }, + { + name: "more than one", + resources: []types.ResourceWithTTL{ + {Resource: testEndpoint, TTL: &ttl}, + {Resource: testRoute, TTL: &ttl}, + }, + want: map[string]types.ResourceWithTTL{ + "cluster0": {Resource: testEndpoint, TTL: &ttl}, + "route0": {Resource: testRoute, TTL: &ttl}, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := cache.IndexResourcesByName(tt.resources) + assert.Equal(t, tt.want, got) + }) + } +} + +func TestIndexRawResourceByName(t *testing.T) { + tests := []struct { + name string + resources []types.Resource + want map[string]types.Resource + }{ + { + name: "empty", + resources: nil, + want: map[string]types.Resource{}, + }, + { + name: "more than one", + resources: []types.Resource{ + testEndpoint, + testRoute, + }, + want: map[string]types.Resource{ + "cluster0": testEndpoint, + "route0": testRoute, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := cache.IndexRawResourcesByName(tt.resources) + assert.Equal(t, tt.want, got) + }) + } +} + +func TestNewResources(t *testing.T) { + resources := cache.NewResources("x", []types.Resource{ + testEndpoint, + testRoute, + }) + + assert.NotNil(t, resources.Items) + assert.Equal(t, "x", resources.Version) +} diff --git a/pkg/envoy-control-plane/cache/v3/simple.go b/pkg/envoy-control-plane/cache/v3/simple.go index 89a338e5bf..452993cc6e 100644 --- a/pkg/envoy-control-plane/cache/v3/simple.go +++ b/pkg/envoy-control-plane/cache/v3/simple.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,6 +23,7 @@ import ( "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" ) // SnapshotCache is a snapshot-based cache that maintains a single versioned @@ -46,7 +46,7 @@ type SnapshotCache interface { // // This method will cause the server to respond to all open watches, for which // the version differs from the snapshot version. - SetSnapshot(node string, snapshot Snapshot) error + SetSnapshot(ctx context.Context, node string, snapshot Snapshot) error // GetSnapshots gets the snapshot for a node. GetSnapshot(node string) (Snapshot, error) @@ -61,16 +61,13 @@ type SnapshotCache interface { GetStatusKeys() []string } -type heartbeatHandle struct { - cancel func() -} - type snapshotCache struct { - // watchCount is an atomic counter incremented for each watch. This needs to - // be the first field in the struct to guarantee that it is 64-bit aligned, + // watchCount and deltaWatchCount are atomic counters incremented for each watch respectively. They need to + // be the first fields in the struct to guarantee 64-bit alignment, // which is a requirement for atomic operations on 64-bit operands to work on // 32-bit machines. - watchCount int64 + watchCount int64 + deltaWatchCount int64 log log.Logger @@ -105,6 +102,10 @@ func NewSnapshotCache(ads bool, hash NodeHash, logger log.Logger) SnapshotCache } func newSnapshotCache(ads bool, hash NodeHash, logger log.Logger) *snapshotCache { + if logger == nil { + logger = log.NewDefaultLogger() + } + cache := &snapshotCache{ log: logger, ads: ads, @@ -160,25 +161,25 @@ func (cache *snapshotCache) sendHeartbeats(ctx context.Context, node string) { for id, watch := range info.watches { // Respond with the current version regardless of whether the version has changed. version := snapshot.GetVersion(watch.Request.TypeUrl) - resources := snapshot.GetResourcesAndTtl(watch.Request.TypeUrl) + resources := snapshot.GetResourcesAndTTL(watch.Request.TypeUrl) // TODO(snowp): Construct this once per type instead of once per watch. - resourcesWithTtl := map[string]types.ResourceWithTtl{} + resourcesWithTTL := map[string]types.ResourceWithTTL{} for k, v := range resources { - if v.Ttl != nil { - resourcesWithTtl[k] = v + if v.TTL != nil { + resourcesWithTTL[k] = v } } - if len(resourcesWithTtl) == 0 { + if len(resourcesWithTTL) == 0 { continue } - if cache.log != nil { - cache.log.Debugf("respond open watch %d%v with heartbeat for version %q", id, watch.Request.ResourceNames, version) + cache.log.Debugf("respond open watch %d%v with heartbeat for version %q", id, watch.Request.ResourceNames, version) + err := cache.respond(ctx, watch.Request, watch.Response, resourcesWithTTL, version, true) + if err != nil { + cache.log.Errorf("received error when attempting to respond to watches: %v", err) } - cache.respond(watch.Request, watch.Response, resourcesWithTtl, version, true) - // The watch must be deleted and we must rely on the client to ack this response to create a new watch. delete(info.watches, id) } @@ -186,8 +187,8 @@ func (cache *snapshotCache) sendHeartbeats(ctx context.Context, node string) { } } -// SetSnapshotCache updates a snapshot for a node. -func (cache *snapshotCache) SetSnapshot(node string, snapshot Snapshot) error { +// SetSnapshotCacheContext updates a snapshot for a node. +func (cache *snapshotCache) SetSnapshot(ctx context.Context, node string, snapshot Snapshot) error { cache.mu.Lock() defer cache.mu.Unlock() @@ -197,20 +198,51 @@ func (cache *snapshotCache) SetSnapshot(node string, snapshot Snapshot) error { // trigger existing watches for which version changed if info, ok := cache.status[node]; ok { info.mu.Lock() + defer info.mu.Unlock() for id, watch := range info.watches { version := snapshot.GetVersion(watch.Request.TypeUrl) if version != watch.Request.VersionInfo { - if cache.log != nil { - cache.log.Debugf("respond open watch %d%v with new version %q", id, watch.Request.ResourceNames, version) + cache.log.Debugf("respond open watch %d%v with new version %q", id, watch.Request.ResourceNames, version) + + resources := snapshot.GetResourcesAndTTL(watch.Request.TypeUrl) + err := cache.respond(ctx, watch.Request, watch.Response, resources, version, false) + if err != nil { + return err } - resources := snapshot.GetResourcesAndTtl(watch.Request.TypeUrl) - cache.respond(watch.Request, watch.Response, resources, version, false) // discard the watch delete(info.watches, id) } } - info.mu.Unlock() + + // We only calculate version hashes when using delta. We don't + // want to do this when using SOTW so we can avoid unnecessary + // computational cost if not using delta. + if len(info.deltaWatches) > 0 { + err := snapshot.ConstructVersionMap() + if err != nil { + return err + } + } + + // process our delta watches + for id, watch := range info.deltaWatches { + res, err := cache.respondDelta( + ctx, + &snapshot, + watch.Request, + watch.Response, + watch.StreamState, + ) + if err != nil { + return err + } + // If we detect a nil response here, that means there has been no state change + // so we don't want to respond or remove any existing resource watches + if res != nil { + delete(info.deltaWatches, id) + } + } } return nil @@ -247,7 +279,7 @@ func nameSet(names []string) map[string]bool { } // superset checks that all resources are listed in the names set. -func superset(names map[string]bool, resources map[string]types.ResourceWithTtl) error { +func superset(names map[string]bool, resources map[string]types.ResourceWithTTL) error { for resourceName := range resources { if _, exists := names[resourceName]; !exists { return fmt.Errorf("%q not listed", resourceName) @@ -257,7 +289,7 @@ func superset(names map[string]bool, resources map[string]types.ResourceWithTtl) } // CreateWatch returns a watch for an xDS request. -func (cache *snapshotCache) CreateWatch(request *Request) (chan Response, func()) { +func (cache *snapshotCache) CreateWatch(request *Request, streamState stream.StreamState, value chan Response) func() { nodeID := cache.hash.ID(request.Node) cache.mu.Lock() @@ -274,30 +306,54 @@ func (cache *snapshotCache) CreateWatch(request *Request) (chan Response, func() info.lastWatchRequestTime = time.Now() info.mu.Unlock() - // allocate capacity 1 to allow one-time non-blocking use - value := make(chan Response, 1) - snapshot, exists := cache.snapshots[nodeID] version := snapshot.GetVersion(request.TypeUrl) + if exists { + knownResourceNames := streamState.GetKnownResourceNames(request.TypeUrl) + diff := []string{} + for _, r := range request.ResourceNames { + if _, ok := knownResourceNames[r]; !ok { + diff = append(diff, r) + } + } + + cache.log.Debugf("nodeID %q requested %s%v and known %v. Diff %v", nodeID, + request.TypeUrl, request.ResourceNames, knownResourceNames, diff) + + if len(diff) > 0 { + resources := snapshot.GetResourcesAndTTL(request.TypeUrl) + for _, name := range diff { + if _, exists := resources[name]; exists { + if err := cache.respond(context.Background(), request, value, resources, version, false); err != nil { + cache.log.Errorf("failed to send a response for %s%v to nodeID %q: %s", request.TypeUrl, + request.ResourceNames, nodeID, err) + } + return nil + } + } + } + } + // if the requested version is up-to-date or missing a response, leave an open watch if !exists || request.VersionInfo == version { watchID := cache.nextWatchID() - if cache.log != nil { - cache.log.Debugf("open watch %d for %s%v from nodeID %q, version %q", watchID, - request.TypeUrl, request.ResourceNames, nodeID, request.VersionInfo) - } + cache.log.Debugf("open watch %d for %s%v from nodeID %q, version %q", watchID, request.TypeUrl, request.ResourceNames, nodeID, request.VersionInfo) + info.mu.Lock() info.watches[watchID] = ResponseWatch{Request: request, Response: value} info.mu.Unlock() - return value, cache.cancelWatch(nodeID, watchID) + return cache.cancelWatch(nodeID, watchID) } // otherwise, the watch may be responded immediately - resources := snapshot.GetResourcesAndTtl(request.TypeUrl) - cache.respond(request, value, resources, version, false) + resources := snapshot.GetResourcesAndTTL(request.TypeUrl) + if err := cache.respond(context.Background(), request, value, resources, version, false); err != nil { + cache.log.Errorf("failed to send a response for %s%v to nodeID %q: %s", request.TypeUrl, + request.ResourceNames, nodeID, err) + } - return value, nil + return nil } func (cache *snapshotCache) nextWatchID() int64 { @@ -308,8 +364,8 @@ func (cache *snapshotCache) nextWatchID() int64 { func (cache *snapshotCache) cancelWatch(nodeID string, watchID int64) func() { return func() { // uses the cache mutex - cache.mu.Lock() - defer cache.mu.Unlock() + cache.mu.RLock() + defer cache.mu.RUnlock() if info, ok := cache.status[nodeID]; ok { info.mu.Lock() delete(info.watches, watchID) @@ -320,27 +376,28 @@ func (cache *snapshotCache) cancelWatch(nodeID string, watchID int64) func() { // Respond to a watch with the snapshot value. The value channel should have capacity not to block. // TODO(kuat) do not respond always, see issue https://github.com/envoyproxy/go-control-plane/issues/46 -func (cache *snapshotCache) respond(request *Request, value chan Response, resources map[string]types.ResourceWithTtl, version string, heartbeat bool) { +func (cache *snapshotCache) respond(ctx context.Context, request *Request, value chan Response, resources map[string]types.ResourceWithTTL, version string, heartbeat bool) error { // for ADS, the request names must match the snapshot names // if they do not, then the watch is never responded, and it is expected that envoy makes another request if len(request.ResourceNames) != 0 && cache.ads { if err := superset(nameSet(request.ResourceNames), resources); err != nil { - if cache.log != nil { - cache.log.Debugf("ADS mode: not responding to request: %v", err) - } - return + cache.log.Warnf("ADS mode: not responding to request: %v", err) + return nil } } - if cache.log != nil { - cache.log.Debugf("respond %s%v version %q with version %q", - request.TypeUrl, request.ResourceNames, request.VersionInfo, version) - } - value <- createResponse(request, resources, version, heartbeat) + cache.log.Debugf("respond %s%v version %q with version %q", request.TypeUrl, request.ResourceNames, request.VersionInfo, version) + + select { + case value <- createResponse(ctx, request, resources, version, heartbeat): + return nil + case <-ctx.Done(): + return context.Canceled + } } -func createResponse(request *Request, resources map[string]types.ResourceWithTtl, version string, heartbeat bool) Response { - filtered := make([]types.ResourceWithTtl, 0, len(resources)) +func createResponse(ctx context.Context, request *Request, resources map[string]types.ResourceWithTTL, version string, heartbeat bool) Response { + filtered := make([]types.ResourceWithTTL, 0, len(resources)) // Reply only with the requested resources. Envoy may ask each resource // individually in a separate stream. It is ok to reply with the same version @@ -363,6 +420,99 @@ func createResponse(request *Request, resources map[string]types.ResourceWithTtl Version: version, Resources: filtered, Heartbeat: heartbeat, + Ctx: ctx, + } +} + +// CreateDeltaWatch returns a watch for a delta xDS request which implements the Simple SnapshotCache. +func (cache *snapshotCache) CreateDeltaWatch(request *DeltaRequest, state stream.StreamState, value chan DeltaResponse) func() { + nodeID := cache.hash.ID(request.Node) + t := request.GetTypeUrl() + + cache.mu.Lock() + defer cache.mu.Unlock() + + info, ok := cache.status[nodeID] + if !ok { + info = newStatusInfo(request.Node) + cache.status[nodeID] = info + } + + // update last watch request time + info.SetLastDeltaWatchRequestTime(time.Now()) + + // find the current cache snapshot for the provided node + snapshot, exists := cache.snapshots[nodeID] + + // There are three different cases that leads to a delayed watch trigger: + // - no snapshot exists for the requested nodeID + // - a snapshot exists, but we failed to initialize its version map + // - we attempted to issue a response, but the caller is already up to date + delayedResponse := !exists + if exists { + err := snapshot.ConstructVersionMap() + if err != nil { + cache.log.Errorf("failed to compute version for snapshot resources inline, waiting for next snapshot update") + } + response, err := cache.respondDelta(context.Background(), &snapshot, request, value, state) + if err != nil { + cache.log.Errorf("failed to respond with delta response, waiting for next snapshot update: %s", err) + } + + delayedResponse = response == nil + } + + if delayedResponse { + watchID := cache.nextDeltaWatchID() + cache.log.Infof("open delta watch ID:%d for %s Resources:%v from nodeID: %q, system version %q", watchID, t, state.GetResourceVersions(), nodeID, snapshot.GetVersion(t)) + info.SetDeltaResponseWatch(watchID, DeltaResponseWatch{Request: request, Response: value, StreamState: state}) + + return cache.cancelDeltaWatch(nodeID, watchID) + } + + return nil +} + +// Respond to a delta watch with the provided snapshot value. If the response is nil, there has been no state change. +func (cache *snapshotCache) respondDelta(ctx context.Context, snapshot *Snapshot, request *DeltaRequest, value chan DeltaResponse, state stream.StreamState) (*RawDeltaResponse, error) { + resp := createDeltaResponse(ctx, request, state, resourceContainer{ + resourceMap: snapshot.GetResources(request.TypeUrl), + versionMap: snapshot.GetVersionMap(request.TypeUrl), + systemVersion: snapshot.GetVersion(request.TypeUrl), + }) + + // Only send a response if there were changes + // We want to respond immediately for the first wildcard request in a stream, even if the response is empty + // otherwise, envoy won't complete initialization + if len(resp.Resources) > 0 || len(resp.RemovedResources) > 0 || (state.IsWildcard() && state.IsFirst()) { + if cache.log != nil { + cache.log.Debugf("node: %s, sending delta response with resources: %v removed resources %v wildcard: %t", + request.GetNode().GetId(), resp.Resources, resp.RemovedResources, state.IsWildcard()) + } + select { + case value <- resp: + return resp, nil + case <-ctx.Done(): + return resp, context.Canceled + } + } + return nil, nil +} + +func (cache *snapshotCache) nextDeltaWatchID() int64 { + return atomic.AddInt64(&cache.deltaWatchCount, 1) +} + +// cancellation function for cleaning stale delta watches +func (cache *snapshotCache) cancelDeltaWatch(nodeID string, watchID int64) func() { + return func() { + cache.mu.RLock() + defer cache.mu.RUnlock() + if info, ok := cache.status[nodeID]; ok { + info.mu.Lock() + delete(info.deltaWatches, watchID) + info.mu.Unlock() + } } } @@ -379,14 +529,12 @@ func (cache *snapshotCache) Fetch(ctx context.Context, request *Request) (Respon // It might be beneficial to hold the request since Envoy will re-attempt the refresh. version := snapshot.GetVersion(request.TypeUrl) if request.VersionInfo == version { - if cache.log != nil { - cache.log.Warnf("skip fetch: version up to date") - } + cache.log.Warnf("skip fetch: version up to date") return nil, &types.SkipFetchError{} } - resources := snapshot.GetResourcesAndTtl(request.TypeUrl) - out := createResponse(request, resources, version, false) + resources := snapshot.GetResourcesAndTTL(request.TypeUrl) + out := createResponse(ctx, request, resources, version, false) return out, nil } @@ -400,9 +548,7 @@ func (cache *snapshotCache) GetStatusInfo(node string) StatusInfo { info, exists := cache.status[node] if !exists { - if cache.log != nil { - cache.log.Warnf("node does not exist") - } + cache.log.Warnf("node does not exist") return nil } diff --git a/pkg/envoy-control-plane/cache/v3/simple_test.go b/pkg/envoy-control-plane/cache/v3/simple_test.go index a9d1d7897f..8ff67f1d01 100644 --- a/pkg/envoy-control-plane/cache/v3/simple_test.go +++ b/pkg/envoy-control-plane/cache/v3/simple_test.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,11 +22,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v3" ) @@ -48,24 +50,26 @@ var ( version = "x" version2 = "y" - snapshot = cache.NewSnapshot(version, - []types.Resource{testEndpoint}, - []types.Resource{testCluster}, - []types.Resource{testRoute}, - []types.Resource{testListener}, - []types.Resource{testRuntime}, - []types.Resource{testSecret[0]}) - - ttl = 2 * time.Second - heartbeat = time.Second - - snapshotWithTtl = cache.NewSnapshotWithTtls(version, - []types.ResourceWithTtl{{Resource: testEndpoint, Ttl: &ttl}}, - []types.ResourceWithTtl{{Resource: testCluster}}, - []types.ResourceWithTtl{{Resource: testRoute}}, - []types.ResourceWithTtl{{Resource: testListener}}, - []types.ResourceWithTtl{{Resource: testRuntime}}, - []types.ResourceWithTtl{{Resource: testSecret[0]}}) + snapshot, _ = cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.EndpointType: {testEndpoint}, + rsrc.ClusterType: {testCluster}, + rsrc.RouteType: {testRoute}, + rsrc.ListenerType: {testListener}, + rsrc.RuntimeType: {testRuntime}, + rsrc.SecretType: {testSecret[0]}, + rsrc.ExtensionConfigType: {testExtensionConfig}, + }) + + ttl = 2 * time.Second + snapshotWithTTL, _ = cache.NewSnapshotWithTTLs(version, map[rsrc.Type][]types.ResourceWithTTL{ + rsrc.EndpointType: {{Resource: testEndpoint, TTL: &ttl}}, + rsrc.ClusterType: {{Resource: testCluster}}, + rsrc.RouteType: {{Resource: testRoute}}, + rsrc.ListenerType: {{Resource: testListener}}, + rsrc.RuntimeType: {{Resource: testRuntime}}, + rsrc.SecretType: {{Resource: testSecret[0]}}, + rsrc.ExtensionConfigType: {{Resource: testExtensionConfig}}, + }) names = map[string][]string{ rsrc.EndpointType: {clusterName}, @@ -93,7 +97,7 @@ func (log logger) Infof(format string, args ...interface{}) { log.t.Logf(format func (log logger) Warnf(format string, args ...interface{}) { log.t.Logf(format, args...) } func (log logger) Errorf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func TestSnapshotCacheWithTtl(t *testing.T) { +func TestSnapshotCacheWithTTL(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() c := cache.NewSnapshotCacheWithHeartbeating(ctx, true, group{}, logger{t: t}, time.Second) @@ -102,7 +106,7 @@ func TestSnapshotCacheWithTtl(t *testing.T) { t.Errorf("unexpected snapshot found for key %q", key) } - if err := c.SetSnapshot(key, snapshotWithTtl); err != nil { + if err := c.SetSnapshot(context.Background(), key, snapshotWithTTL); err != nil { t.Fatal(err) } @@ -110,25 +114,29 @@ func TestSnapshotCacheWithTtl(t *testing.T) { if err != nil { t.Fatal(err) } - if !reflect.DeepEqual(snap, snapshotWithTtl) { - t.Errorf("expect snapshot: %v, got: %v", snapshotWithTtl, snap) + if !reflect.DeepEqual(snap, snapshotWithTTL) { + t.Errorf("expect snapshot: %v, got: %v", snapshotWithTTL, snap) } wg := sync.WaitGroup{} // All the resources should respond immediately when version is not up to date. + streamState := stream.NewStreamState(false, map[string]string{}) for _, typ := range testTypes { wg.Add(1) t.Run(typ, func(t *testing.T) { defer wg.Done() - value, _ := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) + value := make(chan cache.Response, 1) + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}, streamState, value) select { case out := <-value: if gotVersion, _ := out.GetVersion(); gotVersion != version { t.Errorf("got version %q, want %q", gotVersion, version) } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTtl.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTtl.GetResourcesAndTtl(typ)) + if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTTL.GetResourcesAndTTL(typ)) { + t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTTL.GetResourcesAndTTL(typ)) } + // Update streamState + streamState.SetKnownResourceNamesAsList(typ, out.GetRequest().GetResourceNames()) case <-time.After(2 * time.Second): t.Errorf("failed to receive snapshot response") } @@ -146,22 +154,26 @@ func TestSnapshotCacheWithTtl(t *testing.T) { end := time.After(5 * time.Second) for { - value, cancel := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ], VersionInfo: version}) + value := make(chan cache.Response, 1) + cancel := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ], VersionInfo: version}, + streamState, value) select { case out := <-value: if gotVersion, _ := out.GetVersion(); gotVersion != version { t.Errorf("got version %q, want %q", gotVersion, version) } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTtl.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTtl.GetResources(typ)) + if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTTL.GetResourcesAndTTL(typ)) { + t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTTL.GetResources(typ)) } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTtl.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTtl.GetResources(typ)) + if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshotWithTTL.GetResourcesAndTTL(typ)) { + t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshotWithTTL.GetResources(typ)) } updatesByType[typ]++ + + streamState.SetKnownResourceNamesAsList(typ, out.GetRequest().ResourceNames) case <-end: cancel() return @@ -188,7 +200,7 @@ func TestSnapshotCache(t *testing.T) { t.Errorf("unexpected snapshot found for key %q", key) } - if err := c.SetSnapshot(key, snapshot); err != nil { + if err := c.SetSnapshot(context.Background(), key, snapshot); err != nil { t.Fatal(err) } @@ -202,7 +214,10 @@ func TestSnapshotCache(t *testing.T) { // try to get endpoints with incorrect list of names // should not receive response - value, _ := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType, ResourceNames: []string{"none"}}) + value := make(chan cache.Response, 1) + streamState := stream.NewStreamState(false, map[string]string{}) + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType, ResourceNames: []string{"none"}}, + streamState, value) select { case out := <-value: t.Errorf("watch for endpoints and mismatched names => got %v, want none", out) @@ -211,14 +226,17 @@ func TestSnapshotCache(t *testing.T) { for _, typ := range testTypes { t.Run(typ, func(t *testing.T) { - value, _ := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) + value := make(chan cache.Response, 1) + streamState := stream.NewStreamState(false, map[string]string{}) + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}, + streamState, value) select { case out := <-value: if gotVersion, _ := out.GetVersion(); gotVersion != version { t.Errorf("got version %q, want %q", gotVersion, version) } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot.GetResourcesAndTtl(typ)) + if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot.GetResourcesAndTTL(typ)) { + t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot.GetResourcesAndTTL(typ)) } case <-time.After(time.Second): t.Fatal("failed to receive snapshot response") @@ -229,7 +247,7 @@ func TestSnapshotCache(t *testing.T) { func TestSnapshotCacheFetch(t *testing.T) { c := cache.NewSnapshotCache(true, group{}, logger{t: t}) - if err := c.SetSnapshot(key, snapshot); err != nil { + if err := c.SetSnapshot(context.Background(), key, snapshot); err != nil { t.Fatal(err) } @@ -261,10 +279,12 @@ func TestSnapshotCacheFetch(t *testing.T) { func TestSnapshotCacheWatch(t *testing.T) { c := cache.NewSnapshotCache(true, group{}, logger{t: t}) watches := make(map[string]chan cache.Response) + streamState := stream.NewStreamState(false, map[string]string{}) for _, typ := range testTypes { - watches[typ], _ = c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) + watches[typ] = make(chan cache.Response, 1) + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}, streamState, watches[typ]) } - if err := c.SetSnapshot(key, snapshot); err != nil { + if err := c.SetSnapshot(context.Background(), key, snapshot); err != nil { t.Fatal(err) } for _, typ := range testTypes { @@ -274,9 +294,10 @@ func TestSnapshotCacheWatch(t *testing.T) { if gotVersion, _ := out.GetVersion(); gotVersion != version { t.Errorf("got version %q, want %q", gotVersion, version) } - if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot.GetResourcesAndTtl(typ)) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot.GetResourcesAndTtl(typ)) + if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot.GetResourcesAndTTL(typ)) { + t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot.GetResourcesAndTTL(typ)) } + streamState.SetKnownResourceNamesAsList(typ, out.GetRequest().GetResourceNames()) case <-time.After(time.Second): t.Fatal("failed to receive snapshot response") } @@ -285,7 +306,9 @@ func TestSnapshotCacheWatch(t *testing.T) { // open new watches with the latest version for _, typ := range testTypes { - watches[typ], _ = c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ], VersionInfo: version}) + watches[typ] = make(chan cache.Response, 1) + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ], VersionInfo: version}, + streamState, watches[typ]) } if count := c.GetStatusInfo(key).GetNumWatches(); count != len(testTypes) { t.Errorf("watches should be created for the latest version: %d", count) @@ -294,7 +317,7 @@ func TestSnapshotCacheWatch(t *testing.T) { // set partially-versioned snapshot snapshot2 := snapshot snapshot2.Resources[types.Endpoint] = cache.NewResources(version2, []types.Resource{resource.MakeEndpoint(clusterName, 9090)}) - if err := c.SetSnapshot(key, snapshot2); err != nil { + if err := c.SetSnapshot(context.Background(), key, snapshot2); err != nil { t.Fatal(err) } if count := c.GetStatusInfo(key).GetNumWatches(); count != len(testTypes)-1 { @@ -308,7 +331,7 @@ func TestSnapshotCacheWatch(t *testing.T) { t.Errorf("got version %q, want %q", gotVersion, version2) } if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot2.Resources[types.Endpoint].Items) { - t.Errorf("get resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot2.Resources[types.Endpoint].Items) + t.Errorf("got resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot2.Resources[types.Endpoint].Items) } case <-time.After(time.Second): t.Fatal("failed to receive snapshot response") @@ -318,33 +341,35 @@ func TestSnapshotCacheWatch(t *testing.T) { func TestConcurrentSetWatch(t *testing.T) { c := cache.NewSnapshotCache(false, group{}, logger{t: t}) for i := 0; i < 50; i++ { - func(i int) { - t.Run(fmt.Sprintf("worker%d", i), func(t *testing.T) { - t.Parallel() - id := fmt.Sprintf("%d", i%2) - var cancel func() - if i < 25 { - snap := cache.Snapshot{} - snap.Resources[types.Endpoint] = cache.NewResources(fmt.Sprintf("v%d", i), []types.Resource{resource.MakeEndpoint(clusterName, uint32(i))}) - c.SetSnapshot(id, snap) - } else { - if cancel != nil { - cancel() - } - _, cancel = c.CreateWatch(&discovery.DiscoveryRequest{ - Node: &core.Node{Id: id}, - TypeUrl: rsrc.EndpointType, - }) + t.Run(fmt.Sprintf("worker%d", i), func(t *testing.T) { + t.Parallel() + id := fmt.Sprintf("%d", i%2) + value := make(chan cache.Response, 1) + if i < 25 { + snap := cache.Snapshot{} + snap.Resources[types.Endpoint] = cache.NewResources(fmt.Sprintf("v%d", i), []types.Resource{resource.MakeEndpoint(clusterName, uint32(i))}) + if err := c.SetSnapshot(context.Background(), id, snap); err != nil { + t.Fatalf("failed to set snapshot %q: %s", id, err) } - }) - }(i) + } else { + streamState := stream.NewStreamState(false, map[string]string{}) + cancel := c.CreateWatch(&discovery.DiscoveryRequest{ + Node: &core.Node{Id: id}, + TypeUrl: rsrc.EndpointType, + }, streamState, value) + + defer cancel() + } + }) } } func TestSnapshotCacheWatchCancel(t *testing.T) { c := cache.NewSnapshotCache(true, group{}, logger{t: t}) + streamState := stream.NewStreamState(false, map[string]string{}) for _, typ := range testTypes { - _, cancel := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}) + value := make(chan cache.Response, 1) + cancel := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: typ, ResourceNames: names[typ]}, streamState, value) cancel() } // should be status info for the node @@ -363,9 +388,118 @@ func TestSnapshotCacheWatchCancel(t *testing.T) { } } +func TestSnapshotCacheWatchTimeout(t *testing.T) { + c := cache.NewSnapshotCache(true, group{}, logger{t: t}) + + // Create a non-buffered channel that will block sends. + watchCh := make(chan cache.Response) + streamState := stream.NewStreamState(false, map[string]string{}) + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType, ResourceNames: names[rsrc.EndpointType]}, + streamState, watchCh) + + // The first time we set the snapshot without consuming from the blocking channel, so this should time out. + ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) + defer cancel() + + err := c.SetSnapshot(ctx, key, snapshot) + assert.EqualError(t, err, context.Canceled.Error()) + + // Now reset the snapshot with a consuming channel. This verifies that if setting the snapshot fails, + // we can retry by setting the same snapshot. In other words, we keep the watch open even if we failed + // to respond to it within the deadline. + watchTriggeredCh := make(chan cache.Response) + go func() { + response := <-watchCh + watchTriggeredCh <- response + close(watchTriggeredCh) + }() + + err = c.SetSnapshot(context.WithValue(context.Background(), testKey{}, "bar"), key, snapshot) + assert.NoError(t, err) + + // The channel should get closed due to the watch trigger. + select { + case response := <-watchTriggeredCh: + // Verify that we pass the context through. + assert.Equal(t, response.GetContext().Value(testKey{}), "bar") + case <-time.After(time.Second): + t.Fatalf("timed out") + } +} + +func TestSnapshotCreateWatchWithResourcePreviouslyNotRequested(t *testing.T) { + clusterName2 := "clusterName2" + routeName2 := "routeName2" + listenerName2 := "listenerName2" + c := cache.NewSnapshotCache(false, group{}, logger{t: t}) + + snapshot2, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.EndpointType: {testEndpoint, resource.MakeEndpoint(clusterName2, 8080)}, + rsrc.ClusterType: {testCluster, resource.MakeCluster(resource.Ads, clusterName2)}, + rsrc.RouteType: {testRoute, resource.MakeRoute(routeName2, clusterName2)}, + rsrc.ListenerType: {testListener, resource.MakeRouteHTTPListener(resource.Ads, listenerName2, 80, routeName2)}, + rsrc.RuntimeType: {}, + rsrc.SecretType: {}, + rsrc.ExtensionConfigType: {}, + }) + if err := c.SetSnapshot(context.Background(), key, snapshot2); err != nil { + t.Fatal(err) + } + watch := make(chan cache.Response) + + // Request resource with name=ClusterName + go func() { + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType, ResourceNames: []string{clusterName}}, + stream.NewStreamState(false, map[string]string{}), watch) + }() + + select { + case out := <-watch: + if gotVersion, _ := out.GetVersion(); gotVersion != version { + t.Errorf("got version %q, want %q", gotVersion, version) + } + want := map[string]types.ResourceWithTTL{clusterName: snapshot2.Resources[types.Endpoint].Items[clusterName]} + if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), want) { + t.Errorf("got resources %v, want %v", out.(*cache.RawResponse).Resources, want) + } + case <-time.After(time.Second): + t.Fatal("failed to receive snapshot response") + } + + // Request additional resource with name=clusterName2 for same version + go func() { + state := stream.NewStreamState(false, map[string]string{}) + state.SetKnownResourceNames(rsrc.EndpointType, map[string]struct{}{clusterName: {}}) + c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType, VersionInfo: version, + ResourceNames: []string{clusterName, clusterName2}}, state, watch) + }() + + select { + case out := <-watch: + if gotVersion, _ := out.GetVersion(); gotVersion != version { + t.Errorf("got version %q, want %q", gotVersion, version) + } + if !reflect.DeepEqual(cache.IndexResourcesByName(out.(*cache.RawResponse).Resources), snapshot2.Resources[types.Endpoint].Items) { + t.Errorf("got resources %v, want %v", out.(*cache.RawResponse).Resources, snapshot2.Resources[types.Endpoint].Items) + } + case <-time.After(time.Second): + t.Fatal("failed to receive snapshot response") + } + + // Repeat request for with same version and make sure a watch is created + state := stream.NewStreamState(false, map[string]string{}) + state.SetKnownResourceNames(rsrc.EndpointType, map[string]struct{}{clusterName: {}, clusterName2: {}}) + if cancel := c.CreateWatch(&discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType, VersionInfo: version, + ResourceNames: []string{clusterName, clusterName2}}, state, watch); cancel == nil { + t.Fatal("Should create a watch") + } else { + cancel() + } +} + func TestSnapshotClear(t *testing.T) { c := cache.NewSnapshotCache(true, group{}, logger{t: t}) - if err := c.SetSnapshot(key, snapshot); err != nil { + if err := c.SetSnapshot(context.Background(), key, snapshot); err != nil { t.Fatal(err) } c.ClearSnapshot(key) diff --git a/pkg/envoy-control-plane/cache/v3/snapshot.go b/pkg/envoy-control-plane/cache/v3/snapshot.go index d72e92a281..09e9417078 100644 --- a/pkg/envoy-control-plane/cache/v3/snapshot.go +++ b/pkg/envoy-control-plane/cache/v3/snapshot.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,121 +17,63 @@ package cache import ( "errors" "fmt" - "time" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" ) -// Resources is a versioned group of resources. -type Resources struct { - // Version information. - Version string - - // Items in the group indexed by name. - Items map[string]types.ResourceWithTtl -} - -// IndexResourcesByName creates a map from the resource name to the resource. -func IndexResourcesByName(items []types.ResourceWithTtl) map[string]types.ResourceWithTtl { - indexed := make(map[string]types.ResourceWithTtl) - for _, item := range items { - indexed[GetResourceName(item.Resource)] = item - } - return indexed -} - -// NewResources creates a new resource group. -func NewResources(version string, items []types.Resource) Resources { - itemsWithTtl := []types.ResourceWithTtl{} - for _, item := range items { - itemsWithTtl = append(itemsWithTtl, types.ResourceWithTtl{Resource: item}) - } - return NewResourcesWithTtl(version, itemsWithTtl) -} - -// NewResources creates a new resource group. -func NewResourcesWithTtl(version string, items []types.ResourceWithTtl) Resources { - return Resources{ - Version: version, - Items: IndexResourcesByName(items), - } -} - // Snapshot is an internally consistent snapshot of xDS resources. // Consistency is important for the convergence as different resource types // from the snapshot may be delivered to the proxy in arbitrary order. type Snapshot struct { Resources [types.UnknownType]Resources + + // VersionMap holds the current hash map of all resources in the snapshot. + // This field should remain nil until it is used, at which point should be + // instantiated by calling ConstructVersionMap(). + // VersionMap is only to be used with delta xDS. + VersionMap map[string]map[string]string } // NewSnapshot creates a snapshot from response types and a version. -func NewSnapshot(version string, - endpoints []types.Resource, - clusters []types.Resource, - routes []types.Resource, - listeners []types.Resource, - runtimes []types.Resource, - secrets []types.Resource) Snapshot { - return NewSnapshotWithResources(version, SnapshotResources{ - Endpoints: endpoints, - Clusters: clusters, - Routes: routes, - Listeners: listeners, - Runtimes: runtimes, - Secrets: secrets, - }) -} +// The resources map is keyed off the type URL of a resource, followed by the slice of resource objects. +func NewSnapshot(version string, resources map[resource.Type][]types.Resource) (Snapshot, error) { + out := Snapshot{} -// SnapshotResources contains the resources to construct a snapshot from. -type SnapshotResources struct { - Endpoints []types.Resource - Clusters []types.Resource - Routes []types.Resource - Listeners []types.Resource - Runtimes []types.Resource - Secrets []types.Resource - ExtensionConfigs []types.Resource -} + for typ, resource := range resources { + index := GetResponseType(typ) + if index == types.UnknownType { + return out, errors.New("unknown resource type: " + typ) + } -// NewSnapshotWithResources creates a snapshot from response types and a version. -func NewSnapshotWithResources(version string, resources SnapshotResources) Snapshot { - out := Snapshot{} - out.Resources[types.Endpoint] = NewResources(version, resources.Endpoints) - out.Resources[types.Cluster] = NewResources(version, resources.Clusters) - out.Resources[types.Route] = NewResources(version, resources.Routes) - out.Resources[types.Listener] = NewResources(version, resources.Listeners) - out.Resources[types.Runtime] = NewResources(version, resources.Runtimes) - out.Resources[types.Secret] = NewResources(version, resources.Secrets) - out.Resources[types.ExtensionConfig] = NewResources(version, resources.ExtensionConfigs) - return out -} + out.Resources[index] = NewResources(version, resource) + } -type ResourceWithTtl struct { - Resources []types.Resource - Ttl *time.Duration + return out, nil } -func NewSnapshotWithTtls(version string, - endpoints []types.ResourceWithTtl, - clusters []types.ResourceWithTtl, - routes []types.ResourceWithTtl, - listeners []types.ResourceWithTtl, - runtimes []types.ResourceWithTtl, - secrets []types.ResourceWithTtl) Snapshot { +// NewSnapshotWithTTLs creates a snapshot of ResourceWithTTLs. +// The resources map is keyed off the type URL of a resource, followed by the slice of resource objects. +func NewSnapshotWithTTLs(version string, resources map[resource.Type][]types.ResourceWithTTL) (Snapshot, error) { out := Snapshot{} - out.Resources[types.Endpoint] = NewResourcesWithTtl(version, endpoints) - out.Resources[types.Cluster] = NewResourcesWithTtl(version, clusters) - out.Resources[types.Route] = NewResourcesWithTtl(version, routes) - out.Resources[types.Listener] = NewResourcesWithTtl(version, listeners) - out.Resources[types.Runtime] = NewResourcesWithTtl(version, runtimes) - out.Resources[types.Secret] = NewResourcesWithTtl(version, secrets) - return out + + for typ, resource := range resources { + index := GetResponseType(typ) + if index == types.UnknownType { + return out, errors.New("unknown resource type: " + typ) + } + + out.Resources[index] = NewResourcesWithTTL(version, resource) + } + + return out, nil } // Consistent check verifies that the dependent resources are exactly listed in the // snapshot: // - all EDS resources are listed by name in CDS resources -// - all RDS resources are listed by name in LDS resources +// - all SRDS/RDS resources are listed by name in LDS resources +// - all RDS resources are listed by name in SRDS resources // // Note that clusters and listeners are requested without name references, so // Envoy will accept the snapshot list of clusters as-is even if it does not match @@ -141,39 +82,61 @@ func (s *Snapshot) Consistent() error { if s == nil { return errors.New("nil snapshot") } - endpoints := GetResourceReferences(s.Resources[types.Cluster].Items) - if len(endpoints) != len(s.Resources[types.Endpoint].Items) { - return fmt.Errorf("mismatched endpoint reference and resource lengths: %v != %d", endpoints, len(s.Resources[types.Endpoint].Items)) - } - if err := superset(endpoints, s.Resources[types.Endpoint].Items); err != nil { - return err + + referencedResources := GetAllResourceReferences(s.Resources) + + // Loop through each referenced resource. + referencedResponseTypes := map[types.ResponseType]struct{}{ + types.Endpoint: {}, + types.ScopedRoute: {}, + types.Route: {}, } - routes := GetResourceReferences(s.Resources[types.Listener].Items) - if len(routes) != len(s.Resources[types.Route].Items) { - return fmt.Errorf("mismatched route reference and resource lengths: %v != %d", routes, len(s.Resources[types.Route].Items)) + for idx, items := range s.Resources { + + // We only want to check resource types that are expected to be referenced by another resource type. + // Basically, if the consistency relationship is modeled as a DAG, we only want + // to check nodes that are expected to have edges pointing to it. + responseType := types.ResponseType(idx) + if _, ok := referencedResponseTypes[responseType]; ok { + typeURL, err := GetResponseTypeURL(responseType) + if err != nil { + return err + } + referenceSet := referencedResources[typeURL] + + if len(referenceSet) != len(items.Items) { + return fmt.Errorf("mismatched reference and resource lengths: len(%v) != %d", referenceSet, len(items.Items)) + } + + // Check superset. + if err := superset(referenceSet, items.Items); err != nil { + return err + } + } } - return superset(routes, s.Resources[types.Route].Items) + + return nil } // GetResources selects snapshot resources by type, returning the map of resources. -func (s *Snapshot) GetResources(typeURL string) map[string]types.Resource { - resources := s.GetResourcesAndTtl(typeURL) +func (s *Snapshot) GetResources(typeURL resource.Type) map[string]types.Resource { + resources := s.GetResourcesAndTTL(typeURL) if resources == nil { return nil } - withoutTtl := make(map[string]types.Resource, len(resources)) + withoutTTL := make(map[string]types.Resource, len(resources)) for k, v := range resources { - withoutTtl[k] = v.Resource + withoutTTL[k] = v.Resource } - return withoutTtl + return withoutTTL } -// GetResourcesAndTtl selects snapshot resources by type, returning the map of resources and the associated TTL. -func (s *Snapshot) GetResourcesAndTtl(typeURL string) map[string]types.ResourceWithTtl { +// GetResourcesAndTTL selects snapshot resources by type, returning the map of resources and the associated TTL. +func (s *Snapshot) GetResourcesAndTTL(typeURL resource.Type) map[string]types.ResourceWithTTL { if s == nil { return nil } @@ -185,7 +148,7 @@ func (s *Snapshot) GetResourcesAndTtl(typeURL string) map[string]types.ResourceW } // GetVersion returns the version for a resource type. -func (s *Snapshot) GetVersion(typeURL string) string { +func (s *Snapshot) GetVersion(typeURL resource.Type) string { if s == nil { return "" } @@ -195,3 +158,48 @@ func (s *Snapshot) GetVersion(typeURL string) string { } return s.Resources[typ].Version } + +// GetVersionMap will return the internal version map of the currently applied snapshot. +func (s *Snapshot) GetVersionMap(typeURL string) map[string]string { + return s.VersionMap[typeURL] +} + +// ConstructVersionMap will construct a version map based on the current state of a snapshot +func (s *Snapshot) ConstructVersionMap() error { + if s == nil { + return fmt.Errorf("missing snapshot") + } + + // The snapshot resources never change, so no need to ever rebuild. + if s.VersionMap != nil { + return nil + } + + s.VersionMap = make(map[string]map[string]string) + + for i, resources := range s.Resources { + typeURL, err := GetResponseTypeURL(types.ResponseType(i)) + if err != nil { + return err + } + if _, ok := s.VersionMap[typeURL]; !ok { + s.VersionMap[typeURL] = make(map[string]string) + } + + for _, r := range resources.Items { + // Hash our version in here and build the version map. + marshaledResource, err := MarshalResource(r.Resource) + if err != nil { + return err + } + v := HashResource(marshaledResource) + if v == "" { + return fmt.Errorf("failed to build resource version: %v", err) + } + + s.VersionMap[typeURL][GetResourceName(r.Resource)] = v + } + } + + return nil +} diff --git a/pkg/envoy-control-plane/cache/v3/snapshot_test.go b/pkg/envoy-control-plane/cache/v3/snapshot_test.go index eb4cb259e3..77f4d8ddeb 100644 --- a/pkg/envoy-control-plane/cache/v3/snapshot_test.go +++ b/pkg/envoy-control-plane/cache/v3/snapshot_test.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,32 +17,121 @@ package cache_test import ( "testing" + "github.com/stretchr/testify/assert" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v3" ) -func TestSnapshotConsistent(t *testing.T) { +// Tests the snapshot defined in simple_test.go to ensure it is consistent. +func TestTestSnapshotIsConsistent(t *testing.T) { if err := snapshot.Consistent(); err != nil { - t.Errorf("got inconsistent snapshot for %#v", snapshot) + t.Errorf("got inconsistent snapshot for %#v\nerr=%s", snapshot, err.Error()) } - if snap := cache.NewSnapshot(version, []types.Resource{testEndpoint}, nil, nil, nil, nil, nil); snap.Consistent() == nil { +} + +func TestSnapshotWithOnlyEndpointIsInconsistent(t *testing.T) { + if snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.EndpointType: {testEndpoint}, + }); snap.Consistent() == nil { + t.Errorf("got consistent snapshot %#v", snap) + } +} + +func TestClusterWithMissingEndpointIsInconsistent(t *testing.T) { + if snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.EndpointType: {resource.MakeEndpoint("missing", 8080)}, + rsrc.ClusterType: {testCluster}, + }); snap.Consistent() == nil { t.Errorf("got consistent snapshot %#v", snap) } - if snap := cache.NewSnapshot(version, []types.Resource{resource.MakeEndpoint("missing", 8080)}, - []types.Resource{testCluster}, nil, nil, nil, nil); snap.Consistent() == nil { +} + +func TestListenerWithMissingRoutesIsInconsistent(t *testing.T) { + if snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.ListenerType: {testListener}}, + ); snap.Consistent() == nil { t.Errorf("got consistent snapshot %#v", snap) } - if snap := cache.NewSnapshot(version, nil, nil, nil, []types.Resource{testListener}, nil, nil); snap.Consistent() == nil { +} + +func TestListenerWithUnidentifiedRouteIsInconsistent(t *testing.T) { + if snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.RouteType: {resource.MakeRoute("test", clusterName)}, + rsrc.ListenerType: {testListener}, + }); snap.Consistent() == nil { t.Errorf("got consistent snapshot %#v", snap) } - if snap := cache.NewSnapshot(version, nil, nil, - []types.Resource{resource.MakeRoute("test", clusterName)}, []types.Resource{testListener}, nil, nil); snap.Consistent() == nil { +} + +func TestRouteListenerWithRouteIsConsistent(t *testing.T) { + snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.ListenerType: { + resource.MakeRouteHTTPListener(resource.Xds, "listener1", 80, "testRoute0"), + }, + rsrc.RouteType: { + resource.MakeRoute("testRoute0", clusterName), + }, + }) + + if err := snap.Consistent(); err != nil { + t.Errorf("got inconsistent snapshot %s, %#v", err.Error(), snap) + } +} + +func TestScopedRouteListenerWithScopedRouteOnlyIsInconsistent(t *testing.T) { + if snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.ListenerType: { + resource.MakeScopedRouteHTTPListener(resource.Xds, "listener0", 80, "scopedRoute0"), + }, + rsrc.ScopedRouteType: { + resource.MakeScopedRoute("scopedRoute0", "testRoute0", []string{"1.2.3.4"}), + }, + }); snap.Consistent() == nil { t.Errorf("got consistent snapshot %#v", snap) } } +func TestScopedRouteListenerWithScopedRouteAndRouteIsConsistent(t *testing.T) { + snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.ListenerType: { + resource.MakeScopedRouteHTTPListener(resource.Xds, "listener0", 80, "scopedRoute0"), + }, + rsrc.ScopedRouteType: { + resource.MakeScopedRoute("scopedRoute0", "testRoute0", []string{"1.2.3.4"}), + }, + rsrc.RouteType: { + resource.MakeRoute("testRoute0", clusterName), + }, + }) + + if err := snap.Consistent(); err != nil { + t.Errorf("got inconsistent snapshot %s, %#v", err.Error(), snap) + } +} + +func TestMultipleListenersWithScopedRouteAndRouteIsConsistent(t *testing.T) { + snap, _ := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + rsrc.ListenerType: { + resource.MakeScopedRouteHTTPListener(resource.Xds, "listener0", 80, "scopedRoute0"), + resource.MakeRouteHTTPListener(resource.Xds, "listener1", 80, "testRoute1"), + }, + rsrc.ScopedRouteType: { + resource.MakeScopedRoute("scopedRoute0", "testRoute0", []string{"1.2.3.4"}), + }, + rsrc.RouteType: { + resource.MakeRoute("testRoute0", clusterName), + resource.MakeRoute("testRoute1", clusterName), + }, + }) + + if err := snap.Consistent(); err != nil { + t.Errorf("got inconsistent snapshot %s, %#v", err.Error(), snap) + } +} + func TestSnapshotGetters(t *testing.T) { var nilsnap *cache.Snapshot if out := nilsnap.GetResources(rsrc.EndpointType); out != nil { @@ -62,3 +150,13 @@ func TestSnapshotGetters(t *testing.T) { t.Errorf("got non-empty version for unknown type: %#v", out) } } + +func TestNewSnapshotBadType(t *testing.T) { + snap, err := cache.NewSnapshot(version, map[rsrc.Type][]types.Resource{ + "random.type": nil, + }) + + // Should receive an error from an unknown type + assert.Error(t, err) + assert.Equal(t, cache.Snapshot{}, snap) +} diff --git a/pkg/envoy-control-plane/cache/v3/status.go b/pkg/envoy-control-plane/cache/v3/status.go index 48547e73eb..22b5135b33 100644 --- a/pkg/envoy-control-plane/cache/v3/status.go +++ b/pkg/envoy-control-plane/cache/v3/status.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,6 +19,7 @@ import ( "time" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" ) // NodeHash computes string identifiers for Envoy nodes. @@ -50,8 +50,20 @@ type StatusInfo interface { // GetNumWatches returns the number of open watches. GetNumWatches() int + // GetNumDeltaWatches returns the number of open delta watches. + GetNumDeltaWatches() int + // GetLastWatchRequestTime returns the timestamp of the last discovery watch request. GetLastWatchRequestTime() time.Time + + // GetLastDeltaWatchRequestTime returns the timestamp of the last delta discovery watch request. + GetLastDeltaWatchRequestTime() time.Time + + // SetLastDeltaWatchRequestTime will set the current time of the last delta discovery watch request + SetLastDeltaWatchRequestTime(time.Time) + + // SetDeltaResponseWatch will set the provided delta response watch to the associate watch ID + SetDeltaResponseWatch(int64, DeltaResponseWatch) } type statusInfo struct { @@ -61,9 +73,15 @@ type statusInfo struct { // watches are indexed channels for the response watches and the original requests. watches map[int64]ResponseWatch + // deltaWatches are indexed channels for the delta response watches and the original requests + deltaWatches map[int64]DeltaResponseWatch + // the timestamp of the last watch request lastWatchRequestTime time.Time + // the timestamp of the last delta watch request + lastDeltaWatchRequestTime time.Time + // mutex to protect the status fields. // should not acquire mutex of the parent cache after acquiring this mutex. mu sync.RWMutex @@ -78,11 +96,24 @@ type ResponseWatch struct { Response chan Response } +// DeltaResponseWatch is a watch record keeping both the delta request and an open channel for the delta response. +type DeltaResponseWatch struct { + // Request is the most recent delta request for the watch + Request *DeltaRequest + + // Response is the channel to push the delta responses to + Response chan DeltaResponse + + // VersionMap for the stream + StreamState stream.StreamState +} + // newStatusInfo initializes a status info data structure. func newStatusInfo(node *core.Node) *statusInfo { out := statusInfo{ - node: node, - watches: make(map[int64]ResponseWatch), + node: node, + watches: make(map[int64]ResponseWatch), + deltaWatches: make(map[int64]DeltaResponseWatch), } return &out } @@ -99,8 +130,39 @@ func (info *statusInfo) GetNumWatches() int { return len(info.watches) } +func (info *statusInfo) GetNumDeltaWatches() int { + info.mu.RLock() + defer info.mu.RUnlock() + return len(info.deltaWatches) +} + func (info *statusInfo) GetLastWatchRequestTime() time.Time { info.mu.RLock() defer info.mu.RUnlock() return info.lastWatchRequestTime } + +func (info *statusInfo) GetLastDeltaWatchRequestTime() time.Time { + info.mu.RLock() + defer info.mu.RUnlock() + return info.lastDeltaWatchRequestTime +} + +// GetDeltaStreamState will pull the stream state with the version map out of a specific watch +func (info *statusInfo) GetDeltaStreamState(watchID int64) stream.StreamState { + info.mu.RLock() + defer info.mu.RUnlock() + return info.deltaWatches[watchID].StreamState +} + +func (info *statusInfo) SetLastDeltaWatchRequestTime(t time.Time) { + info.mu.Lock() + defer info.mu.Unlock() + info.lastDeltaWatchRequestTime = t +} + +func (info *statusInfo) SetDeltaResponseWatch(id int64, drw DeltaResponseWatch) { + info.mu.Lock() + defer info.mu.Unlock() + info.deltaWatches[id] = drw +} diff --git a/pkg/envoy-control-plane/cache/v3/status_test.go b/pkg/envoy-control-plane/cache/v3/status_test.go index 6cb1a2b7eb..1432b7a484 100644 --- a/pkg/envoy-control-plane/cache/v3/status_test.go +++ b/pkg/envoy-control-plane/cache/v3/status_test.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,4 +47,11 @@ func TestNewStatusInfo(t *testing.T) { t.Errorf("GetLastWatchRequestTime() => got %v, want zero time", got) } + if got := info.GetNumDeltaWatches(); got != 0 { + t.Errorf("GetNumDeltaWatches() => got %d, want 0", got) + } + + if got := info.GetLastDeltaWatchRequestTime(); !got.IsZero() { + t.Errorf("GetLastDeltaWatchRequestTime() => got %v, want zero time", got) + } } diff --git a/pkg/envoy-control-plane/conversion/struct.go b/pkg/envoy-control-plane/conversion/struct.go index a37748a218..fcff35e0be 100644 --- a/pkg/envoy-control-plane/conversion/struct.go +++ b/pkg/envoy-control-plane/conversion/struct.go @@ -16,29 +16,28 @@ package conversion import ( - "bytes" "errors" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" - pstruct "github.com/golang/protobuf/ptypes/struct" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/structpb" ) // MessageToStruct encodes a protobuf Message into a Struct. Hilariously, it // uses JSON as the intermediary // author:glen@turbinelabs.io -func MessageToStruct(msg proto.Message) (*pstruct.Struct, error) { +func MessageToStruct(msg proto.Message) (*structpb.Struct, error) { if msg == nil { return nil, errors.New("nil message") } - buf := &bytes.Buffer{} - if err := (&jsonpb.Marshaler{OrigName: true}).Marshal(buf, msg); err != nil { + b, err := (&protojson.MarshalOptions{UseProtoNames: true}).Marshal(msg) + if err != nil { return nil, err } - pbs := &pstruct.Struct{} - if err := jsonpb.Unmarshal(buf, pbs); err != nil { + pbs := &structpb.Struct{} + if err := protojson.Unmarshal(b, pbs); err != nil { return nil, err } @@ -46,15 +45,15 @@ func MessageToStruct(msg proto.Message) (*pstruct.Struct, error) { } // StructToMessage decodes a protobuf Message from a Struct. -func StructToMessage(pbst *pstruct.Struct, out proto.Message) error { +func StructToMessage(pbst *structpb.Struct, out proto.Message) error { if pbst == nil { return errors.New("nil struct") } - buf := &bytes.Buffer{} - if err := (&jsonpb.Marshaler{OrigName: true}).Marshal(buf, pbst); err != nil { + b, err := (&protojson.MarshalOptions{UseProtoNames: true}).Marshal(pbst) + if err != nil { return err } - return jsonpb.Unmarshal(buf, out) + return protojson.Unmarshal(b, out) } diff --git a/pkg/envoy-control-plane/conversion/struct_test.go b/pkg/envoy-control-plane/conversion/struct_test.go index c2797f2911..d100fd23c1 100644 --- a/pkg/envoy-control-plane/conversion/struct_test.go +++ b/pkg/envoy-control-plane/conversion/struct_test.go @@ -17,17 +17,17 @@ package conversion_test import ( "testing" - "github.com/golang/protobuf/proto" - pstruct "github.com/golang/protobuf/ptypes/struct" "github.com/google/go-cmp/cmp" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/structpb" - v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" + core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/conversion" ) func TestConversion(t *testing.T) { - pb := &v2.DiscoveryRequest{ + pb := &discovery.DiscoveryRequest{ VersionInfo: "test", Node: &core.Node{Id: "proxy"}, } @@ -35,11 +35,11 @@ func TestConversion(t *testing.T) { if err != nil { t.Fatalf("unexpected error %v", err) } - pbst := map[string]*pstruct.Value{ - "version_info": {Kind: &pstruct.Value_StringValue{StringValue: "test"}}, - "node": {Kind: &pstruct.Value_StructValue{StructValue: &pstruct.Struct{ - Fields: map[string]*pstruct.Value{ - "id": {Kind: &pstruct.Value_StringValue{StringValue: "proxy"}}, + pbst := map[string]*structpb.Value{ + "version_info": {Kind: &structpb.Value_StringValue{StringValue: "test"}}, + "node": {Kind: &structpb.Value_StructValue{StructValue: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "id": {Kind: &structpb.Value_StringValue{StringValue: "proxy"}}, }, }}}, } @@ -47,7 +47,7 @@ func TestConversion(t *testing.T) { t.Errorf("MessageToStruct(%v) => got %v, want %v", pb, st.Fields, pbst) } - out := &v2.DiscoveryRequest{} + out := &discovery.DiscoveryRequest{} err = conversion.StructToMessage(st, out) if err != nil { t.Fatalf("unexpected error %v", err) @@ -60,7 +60,7 @@ func TestConversion(t *testing.T) { t.Error("MessageToStruct(nil) => got no error") } - if err = conversion.StructToMessage(nil, &v2.DiscoveryRequest{}); err == nil { + if err = conversion.StructToMessage(nil, &discovery.DiscoveryRequest{}); err == nil { t.Error("StructToMessage(nil) => got no error") } } diff --git a/pkg/envoy-control-plane/integration/ttl_integration_test.go b/pkg/envoy-control-plane/integration/ttl_integration_test.go index cb01c1f690..5d48a4565b 100644 --- a/pkg/envoy-control-plane/integration/ttl_integration_test.go +++ b/pkg/envoy-control-plane/integration/ttl_integration_test.go @@ -6,6 +6,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + envoy_config_core_v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" envoy_config_endpoint_v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" envoy_service_discovery_v3 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" @@ -14,9 +19,6 @@ import ( "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" - "github.com/golang/protobuf/ptypes" - "github.com/stretchr/testify/assert" - "google.golang.org/grpc" ) type logger struct { @@ -28,7 +30,7 @@ func (log logger) Infof(format string, args ...interface{}) { log.t.Logf(format func (log logger) Warnf(format string, args ...interface{}) { log.t.Logf(format, args...) } func (log logger) Errorf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func TestTtlResponse(t *testing.T) { +func TestTTLResponse(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -40,11 +42,11 @@ func TestTtlResponse(t *testing.T) { grpcServer := grpc.NewServer() endpointservice.RegisterEndpointDiscoveryServiceServer(grpcServer, server) - l, err := net.Listen("tcp", ":9999") + l, err := net.Listen("tcp", ":9999") // nolint:gosec assert.NoError(t, err) go func() { - grpcServer.Serve(l) + assert.NoError(t, grpcServer.Serve(l)) }() defer grpcServer.Stop() @@ -66,10 +68,13 @@ func TestTtlResponse(t *testing.T) { oneSecond := time.Second cla := &envoy_config_endpoint_v3.ClusterLoadAssignment{ClusterName: "resource"} - err = snapshotCache.SetSnapshot("test", cache.NewSnapshotWithTtls("1", []types.ResourceWithTtl{{ - Resource: cla, - Ttl: &oneSecond, - }}, nil, nil, nil, nil, nil)) + snap, _ := cache.NewSnapshotWithTTLs("1", map[resource.Type][]types.ResourceWithTTL{ + resource.EndpointType: {{ + Resource: cla, + TTL: &oneSecond, + }}, + }) + err = snapshotCache.SetSnapshot(context.Background(), "test", snap) assert.NoError(t, err) timeout := time.NewTimer(5 * time.Second) @@ -118,7 +123,7 @@ func isFullResponseWithTTL(t *testing.T, response *envoy_service_discovery_v3.Di assert.Len(t, response.Resources, 1) r := response.Resources[0] resource := &envoy_service_discovery_v3.Resource{} - err := ptypes.UnmarshalAny(r, resource) + err := anypb.UnmarshalTo(r, resource, proto.UnmarshalOptions{}) assert.NoError(t, err) assert.NotNil(t, resource.Ttl) @@ -131,7 +136,7 @@ func isHeartbeatResponseWithTTL(t *testing.T, response *envoy_service_discovery_ assert.Len(t, response.Resources, 1) r := response.Resources[0] resource := &envoy_service_discovery_v3.Resource{} - err := ptypes.UnmarshalAny(r, resource) + err := anypb.UnmarshalTo(r, resource, proto.UnmarshalOptions{}) assert.NoError(t, err) assert.NotNil(t, resource.Ttl) diff --git a/pkg/envoy-control-plane/log/default.go b/pkg/envoy-control-plane/log/default.go new file mode 100644 index 0000000000..05b2bdfc2f --- /dev/null +++ b/pkg/envoy-control-plane/log/default.go @@ -0,0 +1,27 @@ +package log + +// DefaultLogger is enabled when no consuming clients provide +// a logger to the server/cache subsystem +type DefaultLogger struct { +} + +// NewDefaultLogger creates a DefaultLogger which is a no-op to maintain current functionality +func NewDefaultLogger() *DefaultLogger { + return &DefaultLogger{} +} + +// Debugf logs a message at level debug on the standard logger. +func (l *DefaultLogger) Debugf(format string, args ...interface{}) { +} + +// Infof logs a message at level info on the standard logger. +func (l *DefaultLogger) Infof(format string, args ...interface{}) { +} + +// Warnf logs a message at level warn on the standard logger. +func (l *DefaultLogger) Warnf(format string, args ...interface{}) { +} + +// Errorf logs a message at level error on the standard logger. +func (l *DefaultLogger) Errorf(format string, args ...interface{}) { +} diff --git a/pkg/envoy-control-plane/log/log_test.go b/pkg/envoy-control-plane/log/log_test.go index 562d9534bc..eaf2fa8f06 100644 --- a/pkg/envoy-control-plane/log/log_test.go +++ b/pkg/envoy-control-plane/log/log_test.go @@ -69,3 +69,8 @@ func TestNilLoggerFuncs(t *testing.T) { xdsLogger.Warnf("warn") xdsLogger.Errorf("error") } + +func TestDefaultLogger(t *testing.T) { + logger := NewDefaultLogger() + assert.NotNil(t, logger) +} diff --git a/pkg/envoy-control-plane/resource/v2/resource.go b/pkg/envoy-control-plane/resource/v2/resource.go deleted file mode 100644 index 09f2e73213..0000000000 --- a/pkg/envoy-control-plane/resource/v2/resource.go +++ /dev/null @@ -1,53 +0,0 @@ -package resource - -import ( - "github.com/golang/protobuf/ptypes" - - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/listener" - hcm "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/http_connection_manager/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/conversion" -) - -// Resource types in xDS v2. -const ( - apiTypePrefix = "type.googleapis.com/envoy.api.v2." - discoveryTypePrefix = "type.googleapis.com/envoy.service.discovery.v2." - EndpointType = apiTypePrefix + "ClusterLoadAssignment" - ClusterType = apiTypePrefix + "Cluster" - RouteType = apiTypePrefix + "RouteConfiguration" - ListenerType = apiTypePrefix + "Listener" - SecretType = apiTypePrefix + "auth.Secret" - ExtensionConfigType = apiTypePrefix + "ExtensionConfig" // This isn't actually supported for V2 - RuntimeType = discoveryTypePrefix + "Runtime" - - // AnyType is used only by ADS - AnyType = "" -) - -// Fetch urls in xDS v2. -const ( - FetchEndpoints = "/v2/discovery:endpoints" - FetchClusters = "/v2/discovery:clusters" - FetchListeners = "/v2/discovery:listeners" - FetchRoutes = "/v2/discovery:routes" - FetchSecrets = "/v2/discovery:secrets" - FetchRuntimes = "/v2/discovery:runtime" - FetchExtensionConfigs = "/v3/discovery:extension_configs" -) - -// DefaultAPIVersion is the api version -const DefaultAPIVersion = core.ApiVersion_V2 - -// GetHTTPConnectionManager creates a HttpConnectionManager from filter -func GetHTTPConnectionManager(filter *listener.Filter) *hcm.HttpConnectionManager { - config := &hcm.HttpConnectionManager{} - - // use typed config if available - if typedConfig := filter.GetTypedConfig(); typedConfig != nil { - ptypes.UnmarshalAny(typedConfig, config) - } else { - conversion.StructToMessage(filter.GetConfig(), config) - } - return config -} diff --git a/pkg/envoy-control-plane/resource/v3/resource.go b/pkg/envoy-control-plane/resource/v3/resource.go index 91ea53728f..c99d98d2fc 100644 --- a/pkg/envoy-control-plane/resource/v3/resource.go +++ b/pkg/envoy-control-plane/resource/v3/resource.go @@ -1,19 +1,24 @@ package resource import ( - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" hcm "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3" ) +// Type is an alias to string which we expose to users of the snapshot API which accepts `resource.Type` resource URLs. +type Type = string + // Resource types in xDS v3. const ( apiTypePrefix = "type.googleapis.com/" EndpointType = apiTypePrefix + "envoy.config.endpoint.v3.ClusterLoadAssignment" ClusterType = apiTypePrefix + "envoy.config.cluster.v3.Cluster" RouteType = apiTypePrefix + "envoy.config.route.v3.RouteConfiguration" + ScopedRouteType = apiTypePrefix + "envoy.config.route.v3.ScopedRouteConfiguration" ListenerType = apiTypePrefix + "envoy.config.listener.v3.Listener" SecretType = apiTypePrefix + "envoy.extensions.transport_sockets.tls.v3.Secret" ExtensionConfigType = apiTypePrefix + "envoy.config.core.v3.TypedExtensionConfig" @@ -29,7 +34,8 @@ const ( FetchClusters = "/v3/discovery:clusters" FetchListeners = "/v3/discovery:listeners" FetchRoutes = "/v3/discovery:routes" - FetchSecrets = "/v3/discovery:secrets" + FetchScopedRoutes = "/v3/discovery:scoped-routes" + FetchSecrets = "/v3/discovery:secrets" //nolint:gosec FetchRuntimes = "/v3/discovery:runtime" FetchExtensionConfigs = "/v3/discovery:extension_configs" ) @@ -37,13 +43,16 @@ const ( // DefaultAPIVersion is the api version const DefaultAPIVersion = core.ApiVersion_V3 -// GetHTTPConnectionManager creates a HttpConnectionManager from filter +// GetHTTPConnectionManager creates a HttpConnectionManager +// from filter. Returns nil if the filter doesn't have a valid +// HttpConnectionManager configuration. func GetHTTPConnectionManager(filter *listener.Filter) *hcm.HttpConnectionManager { - config := &hcm.HttpConnectionManager{} - - // use typed config if available if typedConfig := filter.GetTypedConfig(); typedConfig != nil { - ptypes.UnmarshalAny(typedConfig, config) + config := &hcm.HttpConnectionManager{} + if err := anypb.UnmarshalTo(typedConfig, config, proto.UnmarshalOptions{}); err == nil { + return config + } } - return config + + return nil } diff --git a/pkg/envoy-control-plane/server/delta/v3/server.go b/pkg/envoy-control-plane/server/delta/v3/server.go new file mode 100644 index 0000000000..426c9e4b7a --- /dev/null +++ b/pkg/envoy-control-plane/server/delta/v3/server.go @@ -0,0 +1,226 @@ +package delta + +import ( + "context" + "errors" + "strconv" + "sync/atomic" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" +) + +// Server is a wrapper interface which is meant to hold the proper stream handler for each xDS protocol. +type Server interface { + DeltaStreamHandler(stream stream.DeltaStream, typeURL string) error +} + +type Callbacks interface { + // OnDeltaStreamOpen is called once an incremental xDS stream is open with a stream ID and the type URL (or "" for ADS). + // Returning an error will end processing and close the stream. OnStreamClosed will still be called. + OnDeltaStreamOpen(context.Context, int64, string) error + // OnDeltaStreamClosed is called immediately prior to closing an xDS stream with a stream ID. + OnDeltaStreamClosed(int64) + // OnStreamDeltaRequest is called once a request is received on a stream. + // Returning an error will end processing and close the stream. OnStreamClosed will still be called. + OnStreamDeltaRequest(int64, *discovery.DeltaDiscoveryRequest) error + // OnStreamDelatResponse is called immediately prior to sending a response on a stream. + OnStreamDeltaResponse(int64, *discovery.DeltaDiscoveryRequest, *discovery.DeltaDiscoveryResponse) +} + +var deltaErrorResponse = &cache.RawDeltaResponse{} + +type server struct { + cache cache.ConfigWatcher + callbacks Callbacks + + // total stream count for counting bi-di streams + streamCount int64 + ctx context.Context +} + +// NewServer creates a delta xDS specific server which utilizes a ConfigWatcher and delta Callbacks. +func NewServer(ctx context.Context, config cache.ConfigWatcher, callbacks Callbacks) Server { + return &server{ + cache: config, + callbacks: callbacks, + ctx: ctx, + } +} + +func (s *server) processDelta(str stream.DeltaStream, reqCh <-chan *discovery.DeltaDiscoveryRequest, defaultTypeURL string) error { + streamID := atomic.AddInt64(&s.streamCount, 1) + + // streamNonce holds a unique nonce for req-resp pairs per xDS stream. + var streamNonce int64 + + // a collection of stack allocated watches per request type + watches := newWatches() + + defer func() { + watches.Cancel() + if s.callbacks != nil { + s.callbacks.OnDeltaStreamClosed(streamID) + } + }() + + // Sends a response, returns the new stream nonce + send := func(resp cache.DeltaResponse) (string, error) { + if resp == nil { + return "", errors.New("missing response") + } + + response, err := resp.GetDeltaDiscoveryResponse() + if err != nil { + return "", err + } + + streamNonce = streamNonce + 1 + response.Nonce = strconv.FormatInt(streamNonce, 10) + if s.callbacks != nil { + s.callbacks.OnStreamDeltaResponse(streamID, resp.GetDeltaRequest(), response) + } + + return response.Nonce, str.Send(response) + } + + if s.callbacks != nil { + if err := s.callbacks.OnDeltaStreamOpen(str.Context(), streamID, defaultTypeURL); err != nil { + return err + } + } + + var node = &core.Node{} + for { + select { + case <-s.ctx.Done(): + return nil + case resp, more := <-watches.deltaMuxedResponses: + if !more { + break + } + + typ := resp.GetDeltaRequest().GetTypeUrl() + if resp == deltaErrorResponse { + return status.Errorf(codes.Unavailable, typ+" watch failed") + } + + nonce, err := send(resp) + if err != nil { + return err + } + + watch := watches.deltaWatches[typ] + watch.nonce = nonce + + watch.state.SetResourceVersions(resp.GetNextVersionMap()) + watches.deltaWatches[typ] = watch + case req, more := <-reqCh: + // input stream ended or errored out + if !more { + return nil + } + if req == nil { + return status.Errorf(codes.Unavailable, "empty request") + } + + if s.callbacks != nil { + if err := s.callbacks.OnStreamDeltaRequest(streamID, req); err != nil { + return err + } + } + + // The node information might only be set on the first incoming delta discovery request, so store it here so we can + // reset it on subsequent requests that omit it. + if req.Node != nil { + node = req.Node + } else { + req.Node = node + } + + // type URL is required for ADS but is implicit for any other xDS stream + if defaultTypeURL == resource.AnyType { + if req.TypeUrl == "" { + return status.Errorf(codes.InvalidArgument, "type URL is required for ADS") + } + } else if req.TypeUrl == "" { + req.TypeUrl = defaultTypeURL + } + + typeURL := req.GetTypeUrl() + + // cancel existing watch to (re-)request a newer version + watch, ok := watches.deltaWatches[typeURL] + if !ok { + // Initialize the state of the stream. + // Since there was no previous state, we know we're handling the first request of this type + // so we set the initial resource versions if we have any, and also signal if this stream is in wildcard mode. + watch.state = stream.NewStreamState(len(req.GetResourceNamesSubscribe()) == 0, req.GetInitialResourceVersions()) + } else { + watch.Cancel() + } + + s.subscribe(req.GetResourceNamesSubscribe(), watch.state.GetResourceVersions()) + s.unsubscribe(req.GetResourceNamesUnsubscribe(), watch.state.GetResourceVersions()) + + watch.responses = make(chan cache.DeltaResponse, 1) + watch.cancel = s.cache.CreateDeltaWatch(req, watch.state, watch.responses) + watches.deltaWatches[typeURL] = watch + + go func() { + resp, more := <-watch.responses + if more { + watches.deltaMuxedResponses <- resp + } + }() + } + } +} + +func (s *server) DeltaStreamHandler(str stream.DeltaStream, typeURL string) error { + // a channel for receiving incoming delta requests + reqCh := make(chan *discovery.DeltaDiscoveryRequest) + + // we need to concurrently handle incoming requests since we kick off processDelta as a return + go func() { + for { + select { + case <-str.Context().Done(): + close(reqCh) + return + default: + req, err := str.Recv() + if err != nil { + close(reqCh) + return + } + + reqCh <- req + } + } + }() + + return s.processDelta(str, reqCh, typeURL) +} + +// When we subscribe, we just want to make the cache know we are subscribing to a resource. +// Providing a name with an empty version is enough to make that happen. +func (s *server) subscribe(resources []string, sv map[string]string) { + for _, resource := range resources { + sv[resource] = "" + } +} + +// Unsubscriptions remove resources from the stream state to +// indicate to the cache that we don't care about the resource anymore +func (s *server) unsubscribe(resources []string, sv map[string]string) { + for _, resource := range resources { + delete(sv, resource) + } +} diff --git a/pkg/envoy-control-plane/server/delta/v3/watches.go b/pkg/envoy-control-plane/server/delta/v3/watches.go new file mode 100644 index 0000000000..7a3cff0a96 --- /dev/null +++ b/pkg/envoy-control-plane/server/delta/v3/watches.go @@ -0,0 +1,50 @@ +package delta + +import ( + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" +) + +// watches for all delta xDS resource types +type watches struct { + deltaWatches map[string]watch + + // Opaque resources share a muxed channel + deltaMuxedResponses chan cache.DeltaResponse +} + +// newWatches creates and initializes watches. +func newWatches() watches { + // deltaMuxedResponses needs a buffer to release go-routines populating it + return watches{ + deltaWatches: make(map[string]watch, int(types.UnknownType)), + deltaMuxedResponses: make(chan cache.DeltaResponse, int(types.UnknownType)), + } +} + +// Cancel all watches +func (w *watches) Cancel() { + for _, watch := range w.deltaWatches { + if watch.cancel != nil { + watch.cancel() + } + } +} + +// watch contains the necessary modifiables for receiving resource responses +type watch struct { + responses chan cache.DeltaResponse + cancel func() + nonce string + + state stream.StreamState +} + +// Cancel calls terminate and cancel +func (w *watch) Cancel() { + if w.cancel != nil { + w.cancel() + } + close(w.responses) +} diff --git a/pkg/envoy-control-plane/server/rest/v2/server.go b/pkg/envoy-control-plane/server/rest/v2/server.go deleted file mode 100644 index b44c9cad56..0000000000 --- a/pkg/envoy-control-plane/server/rest/v2/server.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2020 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package rest provides an implementation of REST-JSON part of XDS server -package rest - -import ( - "context" - "errors" - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" -) - -type Server interface { - Fetch(context.Context, *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) -} - -type Callbacks interface { - // OnFetchRequest is called for each Fetch request. Returning an error will end processing of the - // request and respond with an error. - OnFetchRequest(context.Context, *discovery.DiscoveryRequest) error - // OnFetchResponse is called immediately prior to sending a response. - OnFetchResponse(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse) -} - -func NewServer(config cache.ConfigFetcher, callbacks Callbacks) Server { - return &server{cache: config, callbacks: callbacks} -} - -type server struct { - cache cache.ConfigFetcher - callbacks Callbacks -} - -func (s *server) Fetch(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - if s.callbacks != nil { - if err := s.callbacks.OnFetchRequest(ctx, req); err != nil { - return nil, err - } - } - resp, err := s.cache.Fetch(ctx, req) - if err != nil { - return nil, err - } - if resp == nil { - return nil, errors.New("missing response") - } - out, err := resp.GetDiscoveryResponse() - if s.callbacks != nil { - s.callbacks.OnFetchResponse(req, out) - } - return out, err -} diff --git a/pkg/envoy-control-plane/server/rest/v3/server.go b/pkg/envoy-control-plane/server/rest/v3/server.go index 2d00801929..553448913b 100644 --- a/pkg/envoy-control-plane/server/rest/v3/server.go +++ b/pkg/envoy-control-plane/server/rest/v3/server.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2020 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,6 +18,7 @@ package rest import ( "context" "errors" + discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" ) diff --git a/pkg/envoy-control-plane/server/sotw/v2/server.go b/pkg/envoy-control-plane/server/sotw/v2/server.go deleted file mode 100644 index 7056dbb581..0000000000 --- a/pkg/envoy-control-plane/server/sotw/v2/server.go +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright 2020 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package sotw provides an implementation of GRPC SoTW (State of The World) part of XDS server -package sotw - -import ( - "context" - "errors" - "strconv" - "sync/atomic" - - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" -) - -type Server interface { - StreamHandler(stream Stream, typeURL string) error -} - -type Callbacks interface { - // OnStreamOpen is called once an xDS stream is open with a stream ID and the type URL (or "" for ADS). - // Returning an error will end processing and close the stream. OnStreamClosed will still be called. - OnStreamOpen(context.Context, int64, string) error - // OnStreamClosed is called immediately prior to closing an xDS stream with a stream ID. - OnStreamClosed(int64) - // OnStreamRequest is called once a request is received on a stream. - // Returning an error will end processing and close the stream. OnStreamClosed will still be called. - OnStreamRequest(int64, *discovery.DiscoveryRequest) error - // OnStreamResponse is called immediately prior to sending a response on a stream. - OnStreamResponse(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) -} - -// NewServer creates handlers from a config watcher and callbacks. -func NewServer(ctx context.Context, config cache.ConfigWatcher, callbacks Callbacks) Server { - return &server{cache: config, callbacks: callbacks, ctx: ctx} -} - -type server struct { - cache cache.ConfigWatcher - callbacks Callbacks - ctx context.Context - - // streamCount for counting bi-di streams - streamCount int64 -} - -// Generic RPC stream. -type Stream interface { - grpc.ServerStream - - Send(*discovery.DiscoveryResponse) error - Recv() (*discovery.DiscoveryRequest, error) -} - -// watches for all xDS resource types -type watches struct { - endpoints chan cache.Response - clusters chan cache.Response - routes chan cache.Response - listeners chan cache.Response - secrets chan cache.Response - runtimes chan cache.Response - - endpointCancel func() - clusterCancel func() - routeCancel func() - listenerCancel func() - secretCancel func() - runtimeCancel func() - - endpointNonce string - clusterNonce string - routeNonce string - listenerNonce string - secretNonce string - runtimeNonce string - - // Opaque resources share a muxed channel. Nonces and watch cancellations are indexed by type URL. - responses chan cache.Response - cancellations map[string]func() - nonces map[string]string - terminations map[string]chan struct{} -} - -// Initialize all watches -func (values *watches) Init() { - // muxed channel needs a buffer to release go-routines populating it - values.responses = make(chan cache.Response, 5) - values.cancellations = make(map[string]func()) - values.nonces = make(map[string]string) - values.terminations = make(map[string]chan struct{}) -} - -// Token response value used to signal a watch failure in muxed watches. -var errorResponse = &cache.RawResponse{} - -// Cancel all watches -func (values *watches) Cancel() { - if values.endpointCancel != nil { - values.endpointCancel() - } - if values.clusterCancel != nil { - values.clusterCancel() - } - if values.routeCancel != nil { - values.routeCancel() - } - if values.listenerCancel != nil { - values.listenerCancel() - } - if values.secretCancel != nil { - values.secretCancel() - } - if values.runtimeCancel != nil { - values.runtimeCancel() - } - for _, cancel := range values.cancellations { - if cancel != nil { - cancel() - } - } - for _, terminate := range values.terminations { - close(terminate) - } -} - -// process handles a bi-di stream request -func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest, defaultTypeURL string) error { - // increment stream count - streamID := atomic.AddInt64(&s.streamCount, 1) - - // unique nonce generator for req-resp pairs per xDS stream; the server - // ignores stale nonces. nonce is only modified within send() function. - var streamNonce int64 - - // a collection of stack allocated watches per request type - var values watches - values.Init() - defer func() { - values.Cancel() - if s.callbacks != nil { - s.callbacks.OnStreamClosed(streamID) - } - }() - - // sends a response by serializing to protobuf Any - send := func(resp cache.Response, typeURL string) (string, error) { - if resp == nil { - return "", errors.New("missing response") - } - - out, err := resp.GetDiscoveryResponse() - if err != nil { - return "", err - } - - // increment nonce - streamNonce = streamNonce + 1 - out.Nonce = strconv.FormatInt(streamNonce, 10) - if s.callbacks != nil { - s.callbacks.OnStreamResponse(streamID, resp.GetRequest(), out) - } - return out.Nonce, stream.Send(out) - } - - if s.callbacks != nil { - if err := s.callbacks.OnStreamOpen(stream.Context(), streamID, defaultTypeURL); err != nil { - return err - } - } - - // node may only be set on the first discovery request - var node = &core.Node{} - - for { - select { - case <-s.ctx.Done(): - return nil - // config watcher can send the requested resources types in any order - case resp, more := <-values.endpoints: - if !more { - return status.Errorf(codes.Unavailable, "endpoints watch failed") - } - nonce, err := send(resp, resource.EndpointType) - if err != nil { - return err - } - values.endpointNonce = nonce - - case resp, more := <-values.clusters: - if !more { - return status.Errorf(codes.Unavailable, "clusters watch failed") - } - nonce, err := send(resp, resource.ClusterType) - if err != nil { - return err - } - values.clusterNonce = nonce - - case resp, more := <-values.routes: - if !more { - return status.Errorf(codes.Unavailable, "routes watch failed") - } - nonce, err := send(resp, resource.RouteType) - if err != nil { - return err - } - values.routeNonce = nonce - - case resp, more := <-values.listeners: - if !more { - return status.Errorf(codes.Unavailable, "listeners watch failed") - } - nonce, err := send(resp, resource.ListenerType) - if err != nil { - return err - } - values.listenerNonce = nonce - - case resp, more := <-values.secrets: - if !more { - return status.Errorf(codes.Unavailable, "secrets watch failed") - } - nonce, err := send(resp, resource.SecretType) - if err != nil { - return err - } - values.secretNonce = nonce - - case resp, more := <-values.runtimes: - if !more { - return status.Errorf(codes.Unavailable, "runtimes watch failed") - } - nonce, err := send(resp, resource.RuntimeType) - if err != nil { - return err - } - values.runtimeNonce = nonce - - case resp, more := <-values.responses: - if more { - if resp == errorResponse { - return status.Errorf(codes.Unavailable, "resource watch failed") - } - typeUrl := resp.GetRequest().TypeUrl - nonce, err := send(resp, typeUrl) - if err != nil { - return err - } - values.nonces[typeUrl] = nonce - } - - case req, more := <-reqCh: - // input stream ended or errored out - if !more { - return nil - } - if req == nil { - return status.Errorf(codes.Unavailable, "empty request") - } - - // node field in discovery request is delta-compressed - if req.Node != nil { - node = req.Node - } else { - req.Node = node - } - - // nonces can be reused across streams; we verify nonce only if nonce is not initialized - nonce := req.GetResponseNonce() - - // type URL is required for ADS but is implicit for xDS - if defaultTypeURL == resource.AnyType { - if req.TypeUrl == "" { - return status.Errorf(codes.InvalidArgument, "type URL is required for ADS") - } - } else if req.TypeUrl == "" { - req.TypeUrl = defaultTypeURL - } - - if s.callbacks != nil { - if err := s.callbacks.OnStreamRequest(streamID, req); err != nil { - return err - } - } - - // cancel existing watches to (re-)request a newer version - switch { - case req.TypeUrl == resource.EndpointType: - if values.endpointNonce == "" || values.endpointNonce == nonce { - if values.endpointCancel != nil { - values.endpointCancel() - } - values.endpoints, values.endpointCancel = s.cache.CreateWatch(req) - } - case req.TypeUrl == resource.ClusterType: - if values.clusterNonce == "" || values.clusterNonce == nonce { - if values.clusterCancel != nil { - values.clusterCancel() - } - values.clusters, values.clusterCancel = s.cache.CreateWatch(req) - } - case req.TypeUrl == resource.RouteType: - if values.routeNonce == "" || values.routeNonce == nonce { - if values.routeCancel != nil { - values.routeCancel() - } - values.routes, values.routeCancel = s.cache.CreateWatch(req) - } - case req.TypeUrl == resource.ListenerType: - if values.listenerNonce == "" || values.listenerNonce == nonce { - if values.listenerCancel != nil { - values.listenerCancel() - } - values.listeners, values.listenerCancel = s.cache.CreateWatch(req) - } - case req.TypeUrl == resource.SecretType: - if values.secretNonce == "" || values.secretNonce == nonce { - if values.secretCancel != nil { - values.secretCancel() - } - values.secrets, values.secretCancel = s.cache.CreateWatch(req) - } - case req.TypeUrl == resource.RuntimeType: - if values.runtimeNonce == "" || values.runtimeNonce == nonce { - if values.runtimeCancel != nil { - values.runtimeCancel() - } - values.runtimes, values.runtimeCancel = s.cache.CreateWatch(req) - } - default: - typeUrl := req.TypeUrl - responseNonce, seen := values.nonces[typeUrl] - if !seen || responseNonce == nonce { - // We must signal goroutine termination to prevent a race between the cancel closing the watch - // and the producer closing the watch. - if terminate, exists := values.terminations[typeUrl]; exists { - close(terminate) - } - if cancel, seen := values.cancellations[typeUrl]; seen && cancel != nil { - cancel() - } - var watch chan cache.Response - watch, values.cancellations[typeUrl] = s.cache.CreateWatch(req) - // Muxing watches across multiple type URLs onto a single channel requires spawning - // a go-routine. Golang does not allow selecting over a dynamic set of channels. - terminate := make(chan struct{}) - values.terminations[typeUrl] = terminate - go func() { - select { - case resp, more := <-watch: - if more { - values.responses <- resp - } else { - // Check again if the watch is cancelled. - select { - case <-terminate: // do nothing - default: - // We cannot close the responses channel since it can be closed twice. - // Instead we send a fake error response. - values.responses <- errorResponse - } - } - break - case <-terminate: - break - } - }() - } - } - } - } -} - -// StreamHandler converts a blocking read call to channels and initiates stream processing -func (s *server) StreamHandler(stream Stream, typeURL string) error { - // a channel for receiving incoming requests - reqCh := make(chan *discovery.DiscoveryRequest) - reqStop := int32(0) - go func() { - for { - req, err := stream.Recv() - if atomic.LoadInt32(&reqStop) != 0 { - return - } - if err != nil { - close(reqCh) - return - } - select { - case reqCh <- req: - case <-s.ctx.Done(): - return - } - } - }() - - err := s.process(stream, reqCh, typeURL) - - // prevents writing to a closed channel if send failed on blocked recv - // TODO(kuat) figure out how to unblock recv through gRPC API - atomic.StoreInt32(&reqStop, 1) - - return err -} diff --git a/pkg/envoy-control-plane/server/sotw/v3/server.go b/pkg/envoy-control-plane/server/sotw/v3/server.go index 253cc70f79..60fa673360 100644 --- a/pkg/envoy-control-plane/server/sotw/v3/server.go +++ b/pkg/envoy-control-plane/server/sotw/v3/server.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2020 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,6 +29,7 @@ import ( discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" + streamv3 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" ) type Server interface { @@ -46,7 +46,7 @@ type Callbacks interface { // Returning an error will end processing and close the stream. OnStreamClosed will still be called. OnStreamRequest(int64, *discovery.DiscoveryRequest) error // OnStreamResponse is called immediately prior to sending a response on a stream. - OnStreamResponse(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) + OnStreamResponse(context.Context, int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) } // NewServer creates handlers from a config watcher and callbacks. @@ -73,32 +73,46 @@ type Stream interface { // watches for all xDS resource types type watches struct { - endpoints chan cache.Response - clusters chan cache.Response - routes chan cache.Response - listeners chan cache.Response - secrets chan cache.Response - runtimes chan cache.Response - - endpointCancel func() - clusterCancel func() - routeCancel func() - listenerCancel func() - secretCancel func() - runtimeCancel func() - - endpointNonce string - clusterNonce string - routeNonce string - listenerNonce string - secretNonce string - runtimeNonce string + endpoints chan cache.Response + clusters chan cache.Response + routes chan cache.Response + scopedRoutes chan cache.Response + listeners chan cache.Response + secrets chan cache.Response + runtimes chan cache.Response + extensionConfigs chan cache.Response + + endpointCancel func() + clusterCancel func() + routeCancel func() + scopedRouteCancel func() + listenerCancel func() + secretCancel func() + runtimeCancel func() + extensionConfigCancel func() + + endpointNonce string + clusterNonce string + routeNonce string + scopedRouteNonce string + listenerNonce string + secretNonce string + runtimeNonce string + extensionConfigNonce string // Opaque resources share a muxed channel. Nonces and watch cancellations are indexed by type URL. responses chan cache.Response cancellations map[string]func() nonces map[string]string - terminations map[string]chan struct{} +} + +// Discovery response that is sent over GRPC stream +// We need to record what resource names are already sent to a client +// So if the client requests a new name we can respond back +// regardless current snapshot version (even if it is not changed yet) +type lastDiscoveryResponse struct { + nonce string + resources map[string]struct{} } // Initialize all watches @@ -107,7 +121,6 @@ func (values *watches) Init() { values.responses = make(chan cache.Response, 5) values.cancellations = make(map[string]func()) values.nonces = make(map[string]string) - values.terminations = make(map[string]chan struct{}) } // Token response value used to signal a watch failure in muxed watches. @@ -124,6 +137,9 @@ func (values *watches) Cancel() { if values.routeCancel != nil { values.routeCancel() } + if values.scopedRouteCancel != nil { + values.scopedRouteCancel() + } if values.listenerCancel != nil { values.listenerCancel() } @@ -133,14 +149,14 @@ func (values *watches) Cancel() { if values.runtimeCancel != nil { values.runtimeCancel() } + if values.extensionConfigCancel != nil { + values.extensionConfigCancel() + } for _, cancel := range values.cancellations { if cancel != nil { cancel() } } - for _, terminate := range values.terminations { - close(terminate) - } } // process handles a bi-di stream request @@ -152,6 +168,9 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest // ignores stale nonces. nonce is only modified within send() function. var streamNonce int64 + streamState := streamv3.NewStreamState(false, map[string]string{}) + lastDiscoveryResponses := map[string]lastDiscoveryResponse{} + // a collection of stack allocated watches per request type var values watches values.Init() @@ -163,7 +182,7 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest }() // sends a response by serializing to protobuf Any - send := func(resp cache.Response, typeURL string) (string, error) { + send := func(resp cache.Response) (string, error) { if resp == nil { return "", errors.New("missing response") } @@ -176,8 +195,18 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest // increment nonce streamNonce = streamNonce + 1 out.Nonce = strconv.FormatInt(streamNonce, 10) + + lastResponse := lastDiscoveryResponse{ + nonce: out.Nonce, + resources: make(map[string]struct{}), + } + for _, r := range resp.GetRequest().ResourceNames { + lastResponse.resources[r] = struct{}{} + } + lastDiscoveryResponses[resp.GetRequest().TypeUrl] = lastResponse + if s.callbacks != nil { - s.callbacks.OnStreamResponse(streamID, resp.GetRequest(), out) + s.callbacks.OnStreamResponse(resp.GetContext(), streamID, resp.GetRequest(), out) } return out.Nonce, stream.Send(out) } @@ -200,7 +229,7 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest if !more { return status.Errorf(codes.Unavailable, "endpoints watch failed") } - nonce, err := send(resp, resource.EndpointType) + nonce, err := send(resp) if err != nil { return err } @@ -210,7 +239,7 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest if !more { return status.Errorf(codes.Unavailable, "clusters watch failed") } - nonce, err := send(resp, resource.ClusterType) + nonce, err := send(resp) if err != nil { return err } @@ -220,17 +249,27 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest if !more { return status.Errorf(codes.Unavailable, "routes watch failed") } - nonce, err := send(resp, resource.RouteType) + nonce, err := send(resp) if err != nil { return err } values.routeNonce = nonce + case resp, more := <-values.scopedRoutes: + if !more { + return status.Errorf(codes.Unavailable, "scopedRoutes watch failed") + } + nonce, err := send(resp) + if err != nil { + return err + } + values.scopedRouteNonce = nonce + case resp, more := <-values.listeners: if !more { return status.Errorf(codes.Unavailable, "listeners watch failed") } - nonce, err := send(resp, resource.ListenerType) + nonce, err := send(resp) if err != nil { return err } @@ -240,7 +279,7 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest if !more { return status.Errorf(codes.Unavailable, "secrets watch failed") } - nonce, err := send(resp, resource.SecretType) + nonce, err := send(resp) if err != nil { return err } @@ -250,23 +289,33 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest if !more { return status.Errorf(codes.Unavailable, "runtimes watch failed") } - nonce, err := send(resp, resource.RuntimeType) + nonce, err := send(resp) if err != nil { return err } values.runtimeNonce = nonce + case resp, more := <-values.extensionConfigs: + if !more { + return status.Errorf(codes.Unavailable, "extensionConfigs watch failed") + } + nonce, err := send(resp) + if err != nil { + return err + } + values.extensionConfigNonce = nonce + case resp, more := <-values.responses: if more { if resp == errorResponse { return status.Errorf(codes.Unavailable, "resource watch failed") } - typeUrl := resp.GetRequest().TypeUrl - nonce, err := send(resp, typeUrl) + typeURL := resp.GetRequest().TypeUrl + nonce, err := send(resp) if err != nil { return err } - values.nonces[typeUrl] = nonce + values.nonces[typeURL] = nonce } case req, more := <-reqCh: @@ -303,6 +352,13 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest } } + if lastResponse, ok := lastDiscoveryResponses[req.TypeUrl]; ok { + if lastResponse.nonce == "" || lastResponse.nonce == nonce { + // Let's record Resource names that a client has received. + streamState.SetKnownResourceNames(req.TypeUrl, lastResponse.resources) + } + } + // cancel existing watches to (re-)request a newer version switch { case req.TypeUrl == resource.EndpointType: @@ -310,81 +366,73 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest if values.endpointCancel != nil { values.endpointCancel() } - values.endpoints, values.endpointCancel = s.cache.CreateWatch(req) + values.endpoints = make(chan cache.Response, 1) + values.endpointCancel = s.cache.CreateWatch(req, streamState, values.endpoints) } case req.TypeUrl == resource.ClusterType: if values.clusterNonce == "" || values.clusterNonce == nonce { if values.clusterCancel != nil { values.clusterCancel() } - values.clusters, values.clusterCancel = s.cache.CreateWatch(req) + values.clusters = make(chan cache.Response, 1) + values.clusterCancel = s.cache.CreateWatch(req, streamState, values.clusters) } case req.TypeUrl == resource.RouteType: if values.routeNonce == "" || values.routeNonce == nonce { if values.routeCancel != nil { values.routeCancel() } - values.routes, values.routeCancel = s.cache.CreateWatch(req) + values.routes = make(chan cache.Response, 1) + values.routeCancel = s.cache.CreateWatch(req, streamState, values.routes) + } + case req.TypeUrl == resource.ScopedRouteType: + if values.scopedRouteNonce == "" || values.scopedRouteNonce == nonce { + if values.scopedRouteCancel != nil { + values.scopedRouteCancel() + } + values.scopedRoutes = make(chan cache.Response, 1) + values.scopedRouteCancel = s.cache.CreateWatch(req, streamState, values.scopedRoutes) } case req.TypeUrl == resource.ListenerType: if values.listenerNonce == "" || values.listenerNonce == nonce { if values.listenerCancel != nil { values.listenerCancel() } - values.listeners, values.listenerCancel = s.cache.CreateWatch(req) + values.listeners = make(chan cache.Response, 1) + values.listenerCancel = s.cache.CreateWatch(req, streamState, values.listeners) } case req.TypeUrl == resource.SecretType: if values.secretNonce == "" || values.secretNonce == nonce { if values.secretCancel != nil { values.secretCancel() } - values.secrets, values.secretCancel = s.cache.CreateWatch(req) + values.secrets = make(chan cache.Response, 1) + values.secretCancel = s.cache.CreateWatch(req, streamState, values.secrets) } case req.TypeUrl == resource.RuntimeType: if values.runtimeNonce == "" || values.runtimeNonce == nonce { if values.runtimeCancel != nil { values.runtimeCancel() } - values.runtimes, values.runtimeCancel = s.cache.CreateWatch(req) + values.runtimes = make(chan cache.Response, 1) + values.runtimeCancel = s.cache.CreateWatch(req, streamState, values.runtimes) + } + case req.TypeUrl == resource.ExtensionConfigType: + if values.extensionConfigNonce == "" || values.extensionConfigNonce == nonce { + if values.extensionConfigCancel != nil { + values.extensionConfigCancel() + } + values.extensionConfigs = make(chan cache.Response, 1) + values.extensionConfigCancel = s.cache.CreateWatch(req, streamState, values.extensionConfigs) } default: - typeUrl := req.TypeUrl - responseNonce, seen := values.nonces[typeUrl] + typeURL := req.TypeUrl + responseNonce, seen := values.nonces[typeURL] if !seen || responseNonce == nonce { - // We must signal goroutine termination to prevent a race between the cancel closing the watch - // and the producer closing the watch. - if terminate, exists := values.terminations[typeUrl]; exists { - close(terminate) - } - if cancel, seen := values.cancellations[typeUrl]; seen && cancel != nil { + if cancel, seen := values.cancellations[typeURL]; seen && cancel != nil { cancel() } - var watch chan cache.Response - watch, values.cancellations[typeUrl] = s.cache.CreateWatch(req) - // Muxing watches across multiple type URLs onto a single channel requires spawning - // a go-routine. Golang does not allow selecting over a dynamic set of channels. - terminate := make(chan struct{}) - values.terminations[typeUrl] = terminate - go func() { - select { - case resp, more := <-watch: - if more { - values.responses <- resp - } else { - // Check again if the watch is cancelled. - select { - case <-terminate: // do nothing - default: - // We cannot close the responses channel since it can be closed twice. - // Instead we send a fake error response. - values.responses <- errorResponse - } - } - break - case <-terminate: - break - } - }() + values.cancellations[typeURL] = s.cache.CreateWatch(req, streamState, values.responses) } } } @@ -395,30 +443,22 @@ func (s *server) process(stream Stream, reqCh <-chan *discovery.DiscoveryRequest func (s *server) StreamHandler(stream Stream, typeURL string) error { // a channel for receiving incoming requests reqCh := make(chan *discovery.DiscoveryRequest) - reqStop := int32(0) go func() { + defer close(reqCh) for { req, err := stream.Recv() - if atomic.LoadInt32(&reqStop) != 0 { - return - } if err != nil { - close(reqCh) return } select { case reqCh <- req: + case <-stream.Context().Done(): + return case <-s.ctx.Done(): return } } }() - err := s.process(stream, reqCh, typeURL) - - // prevents writing to a closed channel if send failed on blocked recv - // TODO(kuat) figure out how to unblock recv through gRPC API - atomic.StoreInt32(&reqStop, 1) - - return err + return s.process(stream, reqCh, typeURL) } diff --git a/pkg/envoy-control-plane/server/stream/v3/stream.go b/pkg/envoy-control-plane/server/stream/v3/stream.go new file mode 100644 index 0000000000..128f6b4d61 --- /dev/null +++ b/pkg/envoy-control-plane/server/stream/v3/stream.go @@ -0,0 +1,87 @@ +package stream + +import ( + "google.golang.org/grpc" + + discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" +) + +// Generic RPC stream. +type Stream interface { + grpc.ServerStream + + Send(*discovery.DiscoveryResponse) error + Recv() (*discovery.DiscoveryRequest, error) +} + +type DeltaStream interface { + grpc.ServerStream + + Send(*discovery.DeltaDiscoveryResponse) error + Recv() (*discovery.DeltaDiscoveryRequest, error) +} + +// StreamState will keep track of resource state per type on a stream. +type StreamState struct { // nolint:golint,revive + // Indicates whether the original DeltaRequest was a wildcard LDS/RDS request. + wildcard bool + + // ResourceVersions contains a hash of the resource as the value and the resource name as the key. + // This field stores the last state sent to the client. + resourceVersions map[string]string + + // knownResourceNames contains resource names that a client has received previously + knownResourceNames map[string]map[string]struct{} + + // indicates whether the object has beed modified since its creation + first bool +} + +func (s *StreamState) GetResourceVersions() map[string]string { + return s.resourceVersions +} + +func (s *StreamState) SetResourceVersions(resourceVersions map[string]string) { + s.first = false + s.resourceVersions = resourceVersions +} + +func (s *StreamState) IsFirst() bool { + return s.first +} + +func (s *StreamState) IsWildcard() bool { + return s.wildcard +} + +func (s *StreamState) SetKnownResourceNames(url string, names map[string]struct{}) { + s.knownResourceNames[url] = names +} + +func (s *StreamState) SetKnownResourceNamesAsList(url string, names []string) { + m := map[string]struct{}{} + for _, name := range names { + m[name] = struct{}{} + } + s.knownResourceNames[url] = m +} + +func (s *StreamState) GetKnownResourceNames(url string) map[string]struct{} { + return s.knownResourceNames[url] +} + +// NewStreamState initializes a stream state. +func NewStreamState(wildcard bool, initialResourceVersions map[string]string) StreamState { + state := StreamState{ + wildcard: wildcard, + resourceVersions: initialResourceVersions, + first: true, + knownResourceNames: map[string]map[string]struct{}{}, + } + + if initialResourceVersions == nil { + state.resourceVersions = make(map[string]string) + } + + return state +} diff --git a/pkg/envoy-control-plane/server/v2/gateway.go b/pkg/envoy-control-plane/server/v2/gateway.go deleted file mode 100644 index 0916b999d9..0000000000 --- a/pkg/envoy-control-plane/server/v2/gateway.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server - -import ( - "bytes" - "fmt" - "io/ioutil" - "net/http" - "path" - - "github.com/golang/protobuf/jsonpb" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" -) - -// HTTPGateway is a custom implementation of [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) -// specialized to Envoy xDS API. -type HTTPGateway struct { - // Log is an optional log for errors in response write - Log log.Logger - - // Server is the underlying gRPC server - Server Server -} - -func (h *HTTPGateway) ServeHTTP(req *http.Request) ([]byte, int, error) { - p := path.Clean(req.URL.Path) - - typeURL := "" - switch p { - case resource.FetchEndpoints: - typeURL = resource.EndpointType - case resource.FetchClusters: - typeURL = resource.ClusterType - case resource.FetchListeners: - typeURL = resource.ListenerType - case resource.FetchRoutes: - typeURL = resource.RouteType - case resource.FetchSecrets: - typeURL = resource.SecretType - case resource.FetchRuntimes: - typeURL = resource.RuntimeType - case resource.FetchExtensionConfigs: - typeURL = resource.ExtensionConfigType - default: - return nil, http.StatusNotFound, fmt.Errorf("no endpoint") - } - - if req.Body == nil { - return nil, http.StatusBadRequest, fmt.Errorf("empty body") - } - - body, err := ioutil.ReadAll(req.Body) - if err != nil { - return nil, http.StatusBadRequest, fmt.Errorf("cannot read body") - } - - // parse as JSON - out := &discovery.DiscoveryRequest{} - err = jsonpb.UnmarshalString(string(body), out) - if err != nil { - return nil, http.StatusBadRequest, fmt.Errorf("cannot parse JSON body: " + err.Error()) - } - out.TypeUrl = typeURL - - // fetch results - res, err := h.Server.Fetch(req.Context(), out) - if err != nil { - // SkipFetchErrors will return a 304 which will signify to the envoy client that - // it is already at the latest version; all other errors will 500 with a message. - if _, ok := err.(*types.SkipFetchError); ok { - return nil, http.StatusNotModified, nil - } - return nil, http.StatusInternalServerError, fmt.Errorf("fetch error: " + err.Error()) - } - - buf := &bytes.Buffer{} - if err := (&jsonpb.Marshaler{OrigName: true}).Marshal(buf, res); err != nil { - return nil, http.StatusInternalServerError, fmt.Errorf("marshal error: " + err.Error()) - } - - return buf.Bytes(), http.StatusOK, nil -} diff --git a/pkg/envoy-control-plane/server/v2/gateway_test.go b/pkg/envoy-control-plane/server/v2/gateway_test.go deleted file mode 100644 index 06d06b780e..0000000000 --- a/pkg/envoy-control-plane/server/v2/gateway_test.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server_test - -import ( - "context" - "io" - "net/http" - "strings" - "testing" - "testing/iotest" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v2" -) - -type logger struct { - t *testing.T -} - -func (log logger) Debugf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Infof(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Warnf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Errorf(format string, args ...interface{}) { log.t.Logf(format, args...) } - -func TestGateway(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = map[string][]cache.Response{ - resource.ClusterType: { - &cache.RawResponse{ - Version: "2", - Resources: []types.ResourceWithTtl{{Resource: cluster}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ClusterType}, - }, - }, - resource.RouteType: { - &cache.RawResponse{ - Version: "3", - Resources: []types.ResourceWithTtl{{Resource: route}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.RouteType}, - }, - }, - resource.ListenerType: { - &cache.RawResponse{ - Version: "4", - Resources: []types.ResourceWithTtl{{Resource: listener}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ListenerType}, - }, - }, - } - gtw := server.HTTPGateway{Log: logger{t: t}, Server: server.NewServer(context.Background(), config, nil)} - - failCases := []struct { - path string - body io.Reader - expect int - }{ - { - path: "/hello/", - expect: http.StatusNotFound, - }, - { - path: resource.FetchEndpoints, - expect: http.StatusBadRequest, - }, - { - path: resource.FetchEndpoints, - body: iotest.TimeoutReader(strings.NewReader("hello")), - expect: http.StatusBadRequest, - }, - { - path: resource.FetchEndpoints, - body: strings.NewReader("hello"), - expect: http.StatusBadRequest, - }, - { - // missing response - path: resource.FetchEndpoints, - body: strings.NewReader("{\"node\": {\"id\": \"test\"}}"), - expect: http.StatusInternalServerError, - }, - } - for _, cs := range failCases { - req, err := http.NewRequest(http.MethodPost, cs.path, cs.body) - if err != nil { - t.Fatal(err) - } - resp, code, err := gtw.ServeHTTP(req) - if resp != nil { - t.Errorf("handler returned wrong response") - } - if status := code; status != cs.expect { - t.Errorf("handler returned wrong status: %d, want %d", status, cs.expect) - } - } - - for _, path := range []string{resource.FetchClusters, resource.FetchRoutes, resource.FetchListeners} { - req, err := http.NewRequest(http.MethodPost, path, strings.NewReader("{\"node\": {\"id\": \"test\"}}")) - if err != nil { - t.Fatal(err) - } - resp, code, err := gtw.ServeHTTP(req) - if resp == nil { - t.Errorf("handler returned wrong response") - } - if status := code; status != 200 { - t.Errorf("handler returned wrong status: %d, want %d", status, 200) - } - } -} diff --git a/pkg/envoy-control-plane/server/v2/server.go b/pkg/envoy-control-plane/server/v2/server.go deleted file mode 100644 index 8e318bce9f..0000000000 --- a/pkg/envoy-control-plane/server/v2/server.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package server provides an implementation of a streaming xDS server. -package server - -import ( - "context" - "errors" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/rest/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/sotw/v2" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - clusterservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - endpointservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - listenerservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - routeservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - discoverygrpc "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - runtimeservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - secretservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" -) - -// Server is a collection of handlers for streaming discovery requests. -type Server interface { - endpointservice.EndpointDiscoveryServiceServer - clusterservice.ClusterDiscoveryServiceServer - routeservice.RouteDiscoveryServiceServer - listenerservice.ListenerDiscoveryServiceServer - discoverygrpc.AggregatedDiscoveryServiceServer - secretservice.SecretDiscoveryServiceServer - runtimeservice.RuntimeDiscoveryServiceServer - - rest.Server - sotw.Server -} - -// Callbacks is a collection of callbacks inserted into the server operation. -// The callbacks are invoked synchronously. -type Callbacks interface { - rest.Callbacks - sotw.Callbacks -} - -// CallbackFuncs is a convenience type for implementing the Callbacks interface. -type CallbackFuncs struct { - StreamOpenFunc func(context.Context, int64, string) error - StreamClosedFunc func(int64) - StreamRequestFunc func(int64, *discovery.DiscoveryRequest) error - StreamResponseFunc func(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) - FetchRequestFunc func(context.Context, *discovery.DiscoveryRequest) error - FetchResponseFunc func(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse) -} - -var _ Callbacks = CallbackFuncs{} - -// OnStreamOpen invokes StreamOpenFunc. -func (c CallbackFuncs) OnStreamOpen(ctx context.Context, streamID int64, typeURL string) error { - if c.StreamOpenFunc != nil { - return c.StreamOpenFunc(ctx, streamID, typeURL) - } - - return nil -} - -// OnStreamClosed invokes StreamClosedFunc. -func (c CallbackFuncs) OnStreamClosed(streamID int64) { - if c.StreamClosedFunc != nil { - c.StreamClosedFunc(streamID) - } -} - -// OnStreamRequest invokes StreamRequestFunc. -func (c CallbackFuncs) OnStreamRequest(streamID int64, req *discovery.DiscoveryRequest) error { - if c.StreamRequestFunc != nil { - return c.StreamRequestFunc(streamID, req) - } - - return nil -} - -// OnStreamResponse invokes StreamResponseFunc. -func (c CallbackFuncs) OnStreamResponse(streamID int64, req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse) { - if c.StreamResponseFunc != nil { - c.StreamResponseFunc(streamID, req, resp) - } -} - -// OnFetchRequest invokes FetchRequestFunc. -func (c CallbackFuncs) OnFetchRequest(ctx context.Context, req *discovery.DiscoveryRequest) error { - if c.FetchRequestFunc != nil { - return c.FetchRequestFunc(ctx, req) - } - - return nil -} - -// OnFetchResponse invoked FetchResponseFunc. -func (c CallbackFuncs) OnFetchResponse(req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse) { - if c.FetchResponseFunc != nil { - c.FetchResponseFunc(req, resp) - } -} - -// NewServer creates handlers from a config watcher and callbacks. -func NewServer(ctx context.Context, config cache.Cache, callbacks Callbacks) Server { - return NewServerAdvanced(rest.NewServer(config, callbacks), sotw.NewServer(ctx, config, callbacks)) -} - -func NewServerAdvanced(restServer rest.Server, sotwServer sotw.Server) Server { - return &server{rest: restServer, sotw: sotwServer} -} - -type server struct { - rest rest.Server - sotw sotw.Server -} - -func (s *server) StreamHandler(stream sotw.Stream, typeURL string) error { - return s.sotw.StreamHandler(stream, typeURL) -} - -func (s *server) StreamAggregatedResources(stream discoverygrpc.AggregatedDiscoveryService_StreamAggregatedResourcesServer) error { - return s.StreamHandler(stream, resource.AnyType) -} - -func (s *server) StreamEndpoints(stream endpointservice.EndpointDiscoveryService_StreamEndpointsServer) error { - return s.StreamHandler(stream, resource.EndpointType) -} - -func (s *server) StreamClusters(stream clusterservice.ClusterDiscoveryService_StreamClustersServer) error { - return s.StreamHandler(stream, resource.ClusterType) -} - -func (s *server) StreamRoutes(stream routeservice.RouteDiscoveryService_StreamRoutesServer) error { - return s.StreamHandler(stream, resource.RouteType) -} - -func (s *server) StreamListeners(stream listenerservice.ListenerDiscoveryService_StreamListenersServer) error { - return s.StreamHandler(stream, resource.ListenerType) -} - -func (s *server) StreamSecrets(stream secretservice.SecretDiscoveryService_StreamSecretsServer) error { - return s.StreamHandler(stream, resource.SecretType) -} - -func (s *server) StreamRuntime(stream runtimeservice.RuntimeDiscoveryService_StreamRuntimeServer) error { - return s.StreamHandler(stream, resource.RuntimeType) -} - -// Fetch is the universal fetch method. -func (s *server) Fetch(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - return s.rest.Fetch(ctx, req) -} - -func (s *server) FetchEndpoints(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - if req == nil { - return nil, status.Errorf(codes.Unavailable, "empty request") - } - req.TypeUrl = resource.EndpointType - return s.Fetch(ctx, req) -} - -func (s *server) FetchClusters(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - if req == nil { - return nil, status.Errorf(codes.Unavailable, "empty request") - } - req.TypeUrl = resource.ClusterType - return s.Fetch(ctx, req) -} - -func (s *server) FetchRoutes(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - if req == nil { - return nil, status.Errorf(codes.Unavailable, "empty request") - } - req.TypeUrl = resource.RouteType - return s.Fetch(ctx, req) -} - -func (s *server) FetchListeners(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - if req == nil { - return nil, status.Errorf(codes.Unavailable, "empty request") - } - req.TypeUrl = resource.ListenerType - return s.Fetch(ctx, req) -} - -func (s *server) FetchSecrets(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - if req == nil { - return nil, status.Errorf(codes.Unavailable, "empty request") - } - req.TypeUrl = resource.SecretType - return s.Fetch(ctx, req) -} - -func (s *server) FetchRuntime(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { - if req == nil { - return nil, status.Errorf(codes.Unavailable, "empty request") - } - req.TypeUrl = resource.RuntimeType - return s.Fetch(ctx, req) -} - -func (s *server) DeltaAggregatedResources(_ discoverygrpc.AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error { - return errors.New("not implemented") -} - -func (s *server) DeltaEndpoints(_ endpointservice.EndpointDiscoveryService_DeltaEndpointsServer) error { - return errors.New("not implemented") -} - -func (s *server) DeltaClusters(_ clusterservice.ClusterDiscoveryService_DeltaClustersServer) error { - return errors.New("not implemented") -} - -func (s *server) DeltaRoutes(_ routeservice.RouteDiscoveryService_DeltaRoutesServer) error { - return errors.New("not implemented") -} - -func (s *server) DeltaListeners(_ listenerservice.ListenerDiscoveryService_DeltaListenersServer) error { - return errors.New("not implemented") -} - -func (s *server) DeltaSecrets(_ secretservice.SecretDiscoveryService_DeltaSecretsServer) error { - return errors.New("not implemented") -} - -func (s *server) DeltaRuntime(_ runtimeservice.RuntimeDiscoveryService_DeltaRuntimeServer) error { - return errors.New("not implemented") -} diff --git a/pkg/envoy-control-plane/server/v2/server_test.go b/pkg/envoy-control-plane/server/v2/server_test.go deleted file mode 100644 index a1dec59b49..0000000000 --- a/pkg/envoy-control-plane/server/v2/server_test.go +++ /dev/null @@ -1,653 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server_test - -import ( - "context" - "errors" - "fmt" - "reflect" - "testing" - "time" - - "google.golang.org/grpc" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v2" -) - -type mockConfigWatcher struct { - counts map[string]int - responses map[string][]cache.Response - closeWatch bool - watches int -} - -func (config *mockConfigWatcher) CreateWatch(req *discovery.DiscoveryRequest) (chan cache.Response, func()) { - config.counts[req.TypeUrl] = config.counts[req.TypeUrl] + 1 - out := make(chan cache.Response, 1) - if len(config.responses[req.TypeUrl]) > 0 { - out <- config.responses[req.TypeUrl][0] - config.responses[req.TypeUrl] = config.responses[req.TypeUrl][1:] - } else if config.closeWatch { - close(out) - } else { - config.watches += 1 - return out, func() { - // it is ok to close the channel after cancellation and not wait for it to be garbage collected - close(out) - config.watches -= 1 - } - } - return out, nil -} - -func (config *mockConfigWatcher) Fetch(ctx context.Context, req *discovery.DiscoveryRequest) (cache.Response, error) { - if len(config.responses[req.TypeUrl]) > 0 { - out := config.responses[req.TypeUrl][0] - config.responses[req.TypeUrl] = config.responses[req.TypeUrl][1:] - return out, nil - } - return nil, errors.New("missing") -} - -func makeMockConfigWatcher() *mockConfigWatcher { - return &mockConfigWatcher{ - counts: make(map[string]int), - } -} - -type mockStream struct { - t *testing.T - ctx context.Context - recv chan *discovery.DiscoveryRequest - sent chan *discovery.DiscoveryResponse - nonce int - sendError bool - grpc.ServerStream -} - -func (stream *mockStream) Context() context.Context { - return stream.ctx -} - -func (stream *mockStream) Send(resp *discovery.DiscoveryResponse) error { - // check that nonce is monotonically incrementing - stream.nonce = stream.nonce + 1 - if resp.Nonce != fmt.Sprintf("%d", stream.nonce) { - stream.t.Errorf("Nonce => got %q, want %d", resp.Nonce, stream.nonce) - } - // check that version is set - if resp.VersionInfo == "" { - stream.t.Error("VersionInfo => got none, want non-empty") - } - // check resources are non-empty - if len(resp.Resources) == 0 { - stream.t.Error("Resources => got none, want non-empty") - } - // check that type URL matches in resources - if resp.TypeUrl == "" { - stream.t.Error("TypeUrl => got none, want non-empty") - } - for _, res := range resp.Resources { - if res.TypeUrl != resp.TypeUrl { - stream.t.Errorf("TypeUrl => got %q, want %q", res.TypeUrl, resp.TypeUrl) - } - } - stream.sent <- resp - if stream.sendError { - return errors.New("send error") - } - return nil -} - -func (stream *mockStream) Recv() (*discovery.DiscoveryRequest, error) { - req, more := <-stream.recv - if !more { - return nil, errors.New("empty") - } - return req, nil -} - -func makeMockStream(t *testing.T) *mockStream { - return &mockStream{ - t: t, - ctx: context.Background(), - sent: make(chan *discovery.DiscoveryResponse, 10), - recv: make(chan *discovery.DiscoveryRequest, 10), - } -} - -const ( - clusterName = "cluster0" - routeName = "route0" - listenerName = "listener0" - secretName = "secret0" - runtimeName = "runtime0" -) - -var ( - node = &core.Node{ - Id: "test-id", - Cluster: "test-cluster", - } - endpoint = resource.MakeEndpoint(clusterName, 8080) - cluster = resource.MakeCluster(resource.Ads, clusterName) - route = resource.MakeRoute(routeName, clusterName) - listener = resource.MakeHTTPListener(resource.Ads, listenerName, 80, routeName) - secret = resource.MakeSecrets(secretName, "test")[0] - runtime = resource.MakeRuntime(runtimeName) - opaque = &core.Address{} - opaqueType = "unknown-type" - testTypes = []string{ - rsrc.EndpointType, - rsrc.ClusterType, - rsrc.RouteType, - rsrc.ListenerType, - rsrc.SecretType, - rsrc.RuntimeType, - opaqueType, - } -) - -func makeResponses() map[string][]cache.Response { - return map[string][]cache.Response{ - rsrc.EndpointType: { - &cache.RawResponse{ - Version: "1", - Resources: []types.ResourceWithTtl{{Resource: endpoint}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType}, - }, - }, - rsrc.ClusterType: { - &cache.RawResponse{ - Version: "2", - Resources: []types.ResourceWithTtl{{Resource: cluster}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ClusterType}, - }, - }, - rsrc.RouteType: { - &cache.RawResponse{ - Version: "3", - Resources: []types.ResourceWithTtl{{Resource: route}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.RouteType}, - }, - }, - rsrc.ListenerType: { - &cache.RawResponse{ - Version: "4", - Resources: []types.ResourceWithTtl{{Resource: listener}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ListenerType}, - }, - }, - rsrc.SecretType: { - &cache.RawResponse{ - Version: "5", - Resources: []types.ResourceWithTtl{{Resource: secret}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.SecretType}, - }, - }, - rsrc.RuntimeType: { - &cache.RawResponse{ - Version: "6", - Resources: []types.ResourceWithTtl{{Resource: runtime}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.RuntimeType}, - }, - }, - // Pass-through type (xDS does not exist for this type) - opaqueType: { - &cache.RawResponse{ - Version: "7", - Resources: []types.ResourceWithTtl{{Resource: opaque}}, - Request: &discovery.DiscoveryRequest{TypeUrl: opaqueType}, - }, - }, - } -} - -func TestServerShutdown(t *testing.T) { - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = makeResponses() - shutdown := make(chan bool) - ctx, cancel := context.WithCancel(context.Background()) - s := server.NewServer(ctx, config, server.CallbackFuncs{}) - - // make a request - resp := makeMockStream(t) - resp.recv <- &discovery.DiscoveryRequest{Node: node, TypeUrl: typ} - go func() { - var err error - switch typ { - case rsrc.EndpointType: - err = s.StreamEndpoints(resp) - case rsrc.ClusterType: - err = s.StreamClusters(resp) - case rsrc.RouteType: - err = s.StreamRoutes(resp) - case rsrc.ListenerType: - err = s.StreamListeners(resp) - case rsrc.SecretType: - err = s.StreamSecrets(resp) - case rsrc.RuntimeType: - err = s.StreamRuntime(resp) - case opaqueType: - err = s.StreamAggregatedResources(resp) - } - if err != nil { - t.Errorf("Stream() => got %v, want no error", err) - } - shutdown <- true - }() - - go func() { - defer cancel() - }() - - select { - case <-shutdown: - case <-time.After(1 * time.Second): - t.Fatalf("got no response") - } - }) - } -} - -func TestResponseHandlers(t *testing.T) { - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = makeResponses() - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - - // make a request - resp := makeMockStream(t) - resp.recv <- &discovery.DiscoveryRequest{Node: node, TypeUrl: typ} - go func() { - var err error - switch typ { - case rsrc.EndpointType: - err = s.StreamEndpoints(resp) - case rsrc.ClusterType: - err = s.StreamClusters(resp) - case rsrc.RouteType: - err = s.StreamRoutes(resp) - case rsrc.ListenerType: - err = s.StreamListeners(resp) - case rsrc.SecretType: - err = s.StreamSecrets(resp) - case rsrc.RuntimeType: - err = s.StreamRuntime(resp) - case opaqueType: - err = s.StreamAggregatedResources(resp) - } - if err != nil { - t.Errorf("Stream() => got %v, want no error", err) - } - }() - - // check a response - select { - case <-resp.sent: - close(resp.recv) - if want := map[string]int{typ: 1}; !reflect.DeepEqual(want, config.counts) { - t.Errorf("watch counts => got %v, want %v", config.counts, want) - } - case <-time.After(1 * time.Second): - t.Fatalf("got no response") - } - }) - } -} - -func TestFetch(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = makeResponses() - - requestCount := 0 - responseCount := 0 - callbackError := false - - cb := server.CallbackFuncs{ - StreamOpenFunc: func(ctx context.Context, i int64, s string) error { - if callbackError { - return errors.New("stream open error") - } - return nil - }, - FetchRequestFunc: func(ctx context.Context, request *discovery.DiscoveryRequest) error { - if callbackError { - return errors.New("fetch request error") - } - requestCount++ - return nil - }, - FetchResponseFunc: func(request *discovery.DiscoveryRequest, response *discovery.DiscoveryResponse) { - responseCount++ - }, - } - - s := server.NewServer(context.Background(), config, cb) - if out, err := s.FetchEndpoints(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for endpoints: %v", err) - } - if out, err := s.FetchClusters(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for clusters: %v", err) - } - if out, err := s.FetchRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for routes: %v", err) - } - if out, err := s.FetchListeners(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for listeners: %v", err) - } - if out, err := s.FetchSecrets(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for listeners: %v", err) - } - if out, err := s.FetchRuntime(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for listeners: %v", err) - } - - // try again and expect empty results - if out, err := s.FetchEndpoints(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil { - t.Errorf("expected empty or error for endpoints: %v", err) - } - if out, err := s.FetchClusters(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil { - t.Errorf("expected empty or error for clusters: %v", err) - } - if out, err := s.FetchRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil { - t.Errorf("expected empty or error for routes: %v", err) - } - if out, err := s.FetchListeners(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil { - t.Errorf("expected empty or error for listeners: %v", err) - } - - // try empty requests: not valid in a real gRPC server - if out, err := s.FetchEndpoints(context.Background(), nil); out != nil { - t.Errorf("expected empty on empty request: %v", err) - } - if out, err := s.FetchClusters(context.Background(), nil); out != nil { - t.Errorf("expected empty on empty request: %v", err) - } - if out, err := s.FetchRoutes(context.Background(), nil); out != nil { - t.Errorf("expected empty on empty request: %v", err) - } - if out, err := s.FetchListeners(context.Background(), nil); out != nil { - t.Errorf("expected empty on empty request: %v", err) - } - if out, err := s.FetchSecrets(context.Background(), nil); out != nil { - t.Errorf("expected empty on empty request: %v", err) - } - if out, err := s.FetchRuntime(context.Background(), nil); out != nil { - t.Errorf("expected empty on empty request: %v", err) - } - - // send error from callback - callbackError = true - if out, err := s.FetchEndpoints(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil || err == nil { - t.Errorf("expected empty or error due to callback error") - } - if out, err := s.FetchClusters(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil || err == nil { - t.Errorf("expected empty or error due to callback error") - } - if out, err := s.FetchRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil || err == nil { - t.Errorf("expected empty or error due to callback error") - } - if out, err := s.FetchListeners(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil || err == nil { - t.Errorf("expected empty or error due to callback error") - } - - // verify fetch callbacks - if want := 10; requestCount != want { - t.Errorf("unexpected number of fetch requests: got %d, want %d", requestCount, want) - } - if want := 6; responseCount != want { - t.Errorf("unexpected number of fetch responses: got %d, want %d", responseCount, want) - } -} - -func TestWatchClosed(t *testing.T) { - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - config := makeMockConfigWatcher() - config.closeWatch = true - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - - // make a request - resp := makeMockStream(t) - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: typ, - } - - // check that response fails since watch gets closed - if err := s.StreamAggregatedResources(resp); err == nil { - t.Error("Stream() => got no error, want watch failed") - } - - close(resp.recv) - }) - } -} - -func TestSendError(t *testing.T) { - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = makeResponses() - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - - // make a request - resp := makeMockStream(t) - resp.sendError = true - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: typ, - } - - // check that response fails since send returns error - if err := s.StreamAggregatedResources(resp); err == nil { - t.Error("Stream() => got no error, want send error") - } - - close(resp.recv) - }) - } -} - -func TestStaleNonce(t *testing.T) { - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = makeResponses() - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - - resp := makeMockStream(t) - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: typ, - } - stop := make(chan struct{}) - go func() { - if err := s.StreamAggregatedResources(resp); err != nil { - t.Errorf("StreamAggregatedResources() => got %v, want no error", err) - } - // should be two watches called - if want := map[string]int{typ: 2}; !reflect.DeepEqual(want, config.counts) { - t.Errorf("watch counts => got %v, want %v", config.counts, want) - } - close(stop) - }() - select { - case <-resp.sent: - // stale request - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: typ, - ResponseNonce: "xyz", - } - // fresh request - resp.recv <- &discovery.DiscoveryRequest{ - VersionInfo: "1", - Node: node, - TypeUrl: typ, - ResponseNonce: "1", - } - close(resp.recv) - case <-time.After(1 * time.Second): - t.Fatalf("got %d messages on the stream, not 4", resp.nonce) - } - <-stop - }) - } -} - -func TestAggregatedHandlers(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = makeResponses() - resp := makeMockStream(t) - - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: rsrc.ListenerType, - } - // Delta compress node - resp.recv <- &discovery.DiscoveryRequest{ - TypeUrl: rsrc.ClusterType, - } - resp.recv <- &discovery.DiscoveryRequest{ - TypeUrl: rsrc.EndpointType, - ResourceNames: []string{clusterName}, - } - resp.recv <- &discovery.DiscoveryRequest{ - TypeUrl: rsrc.RouteType, - ResourceNames: []string{routeName}, - } - - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - go func() { - if err := s.StreamAggregatedResources(resp); err != nil { - t.Errorf("StreamAggregatedResources() => got %v, want no error", err) - } - }() - - count := 0 - for { - select { - case <-resp.sent: - count++ - if count >= 4 { - close(resp.recv) - if want := map[string]int{ - rsrc.EndpointType: 1, - rsrc.ClusterType: 1, - rsrc.RouteType: 1, - rsrc.ListenerType: 1, - }; !reflect.DeepEqual(want, config.counts) { - t.Errorf("watch counts => got %v, want %v", config.counts, want) - } - - // got all messages - return - } - case <-time.After(1 * time.Second): - t.Fatalf("got %d messages on the stream, not 4", count) - } - } -} - -func TestAggregateRequestType(t *testing.T) { - config := makeMockConfigWatcher() - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - resp := makeMockStream(t) - resp.recv <- &discovery.DiscoveryRequest{Node: node} - if err := s.StreamAggregatedResources(resp); err == nil { - t.Error("StreamAggregatedResources() => got nil, want an error") - } -} - -func TestCancellations(t *testing.T) { - config := makeMockConfigWatcher() - resp := makeMockStream(t) - for _, typ := range testTypes { - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: typ, - } - } - close(resp.recv) - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - if err := s.StreamAggregatedResources(resp); err != nil { - t.Errorf("StreamAggregatedResources() => got %v, want no error", err) - } - if config.watches != 0 { - t.Errorf("Expect all watches cancelled, got %q", config.watches) - } -} - -func TestOpaqueRequestsChannelMuxing(t *testing.T) { - config := makeMockConfigWatcher() - resp := makeMockStream(t) - for i := 0; i < 10; i++ { - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: fmt.Sprintf("%s%d", opaqueType, i%2), - // each subsequent request is assumed to supercede the previous request - ResourceNames: []string{fmt.Sprintf("%d", i)}, - } - } - close(resp.recv) - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - if err := s.StreamAggregatedResources(resp); err != nil { - t.Errorf("StreamAggregatedResources() => got %v, want no error", err) - } - if config.watches != 0 { - t.Errorf("Expect all watches cancelled, got %q", config.watches) - } -} - -func TestCallbackError(t *testing.T) { - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - config := makeMockConfigWatcher() - config.responses = makeResponses() - - s := server.NewServer(context.Background(), config, server.CallbackFuncs{ - StreamOpenFunc: func(ctx context.Context, i int64, s string) error { - return errors.New("stream open error") - }, - }) - - // make a request - resp := makeMockStream(t) - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: typ, - } - - // check that response fails since stream open returns error - if err := s.StreamAggregatedResources(resp); err == nil { - t.Error("Stream() => got no error, want error") - } - - close(resp.recv) - }) - } -} diff --git a/pkg/envoy-control-plane/server/v3/delta_test.go b/pkg/envoy-control-plane/server/v3/delta_test.go new file mode 100644 index 0000000000..f2d7752329 --- /dev/null +++ b/pkg/envoy-control-plane/server/v3/delta_test.go @@ -0,0 +1,459 @@ +package server_test + +import ( + "context" + "errors" + "fmt" + "testing" + "time" + + "google.golang.org/grpc" + + "github.com/stretchr/testify/assert" + + discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" + rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" +) + +func (config *mockConfigWatcher) CreateDeltaWatch(req *discovery.DeltaDiscoveryRequest, state stream.StreamState, out chan cache.DeltaResponse) func() { + config.deltaCounts[req.TypeUrl] = config.deltaCounts[req.TypeUrl] + 1 + + if len(config.deltaResponses[req.TypeUrl]) > 0 { + res := config.deltaResponses[req.TypeUrl][0] + // In subscribed, we only want to send back what's changed if we detect changes + var subscribed []types.Resource + r, _ := res.GetDeltaDiscoveryResponse() + + switch { + case state.IsWildcard(): + for _, resource := range r.Resources { + name := resource.GetName() + res, _ := cache.MarshalResource(resource) + + nextVersion := cache.HashResource(res) + prevVersion, found := state.GetResourceVersions()[name] + if !found || (prevVersion != nextVersion) { + state.GetResourceVersions()[name] = nextVersion + subscribed = append(subscribed, resource) + } + } + default: + for _, resource := range r.Resources { + res, _ := cache.MarshalResource(resource) + nextVersion := cache.HashResource(res) + for _, prevVersion := range state.GetResourceVersions() { + if prevVersion != nextVersion { + subscribed = append(subscribed, resource) + } + state.GetResourceVersions()[resource.GetName()] = nextVersion + } + } + } + + out <- &cache.RawDeltaResponse{ + DeltaRequest: req, + Resources: subscribed, + SystemVersionInfo: "", + NextVersionMap: state.GetResourceVersions(), + } + } else { + config.deltaWatches++ + return func() { + config.deltaWatches-- + } + } + + return nil +} + +type mockDeltaStream struct { + t *testing.T + ctx context.Context + recv chan *discovery.DeltaDiscoveryRequest + sent chan *discovery.DeltaDiscoveryResponse + nonce int + sendError bool + grpc.ServerStream +} + +func (stream *mockDeltaStream) Context() context.Context { + return stream.ctx +} + +func (stream *mockDeltaStream) Send(resp *discovery.DeltaDiscoveryResponse) error { + // Check that nonce is incremented by one + stream.nonce = stream.nonce + 1 + if resp.Nonce != fmt.Sprintf("%d", stream.nonce) { + stream.t.Errorf("Nonce => got %q, want %d", resp.Nonce, stream.nonce) + } + // Check that resources are non-empty + if len(resp.Resources) == 0 { + stream.t.Error("Resources => got none, want non-empty") + } + if resp.TypeUrl == "" { + stream.t.Error("TypeUrl => got none, want non-empty") + } + + // Check that the per resource TypeURL is correctly set. + for _, res := range resp.Resources { + if res.Resource.TypeUrl != resp.TypeUrl { + stream.t.Errorf("TypeUrl => got %q, want %q", res.Resource.TypeUrl, resp.TypeUrl) + } + } + + stream.sent <- resp + if stream.sendError { + return errors.New("send error") + } + return nil +} + +func (stream *mockDeltaStream) Recv() (*discovery.DeltaDiscoveryRequest, error) { + req, more := <-stream.recv + if !more { + return nil, errors.New("empty") + } + return req, nil +} + +func makeMockDeltaStream(t *testing.T) *mockDeltaStream { + return &mockDeltaStream{ + t: t, + ctx: context.Background(), + sent: make(chan *discovery.DeltaDiscoveryResponse, 10), + recv: make(chan *discovery.DeltaDiscoveryRequest, 10), + } +} + +func makeDeltaResponses() map[string][]cache.DeltaResponse { + return map[string][]cache.DeltaResponse{ + rsrc.EndpointType: { + &cache.RawDeltaResponse{ + Resources: []types.Resource{endpoint}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.EndpointType}, + SystemVersionInfo: "1", + }, + }, + rsrc.ClusterType: { + &cache.RawDeltaResponse{ + Resources: []types.Resource{cluster}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.ClusterType}, + SystemVersionInfo: "2", + }, + }, + rsrc.RouteType: { + &cache.RawDeltaResponse{ + Resources: []types.Resource{route}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.RouteType}, + SystemVersionInfo: "3", + }, + }, + rsrc.ScopedRouteType: { + &cache.RawDeltaResponse{ + Resources: []types.Resource{scopedRoute}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.ScopedRouteType}, + SystemVersionInfo: "4", + }, + }, + rsrc.ListenerType: { + &cache.RawDeltaResponse{ + Resources: []types.Resource{httpListener, httpScopedListener}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.ListenerType}, + SystemVersionInfo: "5", + }, + }, + rsrc.SecretType: { + &cache.RawDeltaResponse{ + SystemVersionInfo: "6", + Resources: []types.Resource{secret}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.SecretType}, + }, + }, + rsrc.RuntimeType: { + &cache.RawDeltaResponse{ + SystemVersionInfo: "7", + Resources: []types.Resource{runtime}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.RuntimeType}, + }, + }, + rsrc.ExtensionConfigType: { + &cache.RawDeltaResponse{ + SystemVersionInfo: "8", + Resources: []types.Resource{extensionConfig}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: rsrc.ExtensionConfigType}, + }, + }, + // Pass-through type (types without explicit handling) + opaqueType: { + &cache.RawDeltaResponse{ + SystemVersionInfo: "9", + Resources: []types.Resource{opaque}, + DeltaRequest: &discovery.DeltaDiscoveryRequest{TypeUrl: opaqueType}, + }, + }, + } +} + +func process(typ string, resp *mockDeltaStream, s server.Server) error { + var err error + switch typ { + case rsrc.EndpointType: + err = s.DeltaEndpoints(resp) + case rsrc.ClusterType: + err = s.DeltaClusters(resp) + case rsrc.RouteType: + err = s.DeltaRoutes(resp) + case rsrc.ScopedRouteType: + err = s.DeltaScopedRoutes(resp) + case rsrc.ListenerType: + err = s.DeltaListeners(resp) + case rsrc.SecretType: + err = s.DeltaSecrets(resp) + case rsrc.RuntimeType: + err = s.DeltaRuntime(resp) + case rsrc.ExtensionConfigType: + err = s.DeltaExtensionConfigs(resp) + case opaqueType: + err = s.DeltaAggregatedResources(resp) + } + + return err +} + +func TestDeltaResponseHandlersWildcard(t *testing.T) { + for _, typ := range testTypes { + t.Run(typ, func(t *testing.T) { + config := makeMockConfigWatcher() + config.deltaResponses = makeDeltaResponses() + s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) + + resp := makeMockDeltaStream(t) + // This is a wildcard request since we don't specify a list of resource subscriptions + resp.recv <- &discovery.DeltaDiscoveryRequest{Node: node, TypeUrl: typ} + + go func() { + err := process(typ, resp, s) + assert.NoError(t, err) + }() + + select { + case res := <-resp.sent: + close(resp.recv) + + assert.Equal(t, 1, config.deltaCounts[typ]) + assert.Empty(t, res.GetSystemVersionInfo()) + case <-time.After(1 * time.Second): + t.Fatalf("got no response") + } + }) + } +} + +func TestDeltaResponseHandlers(t *testing.T) { + for _, typ := range testTypes { + t.Run(typ, func(t *testing.T) { + config := makeMockConfigWatcher() + config.deltaResponses = makeDeltaResponses() + s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) + + resp := makeMockDeltaStream(t) + // This is a wildcard request since we don't specify a list of resource subscriptions + res, err := config.deltaResponses[typ][0].GetDeltaDiscoveryResponse() + if err != nil { + t.Error(err) + } + // We only subscribe to one resource to see if we get the appropriate number of resources back + resp.recv <- &discovery.DeltaDiscoveryRequest{Node: node, TypeUrl: typ, ResourceNamesSubscribe: []string{res.Resources[0].Name}} + + go func() { + err := process(typ, resp, s) + assert.NoError(t, err) + }() + + select { + case res := <-resp.sent: + close(resp.recv) + + assert.Equal(t, 1, config.deltaCounts[typ]) + assert.Empty(t, res.GetSystemVersionInfo()) + case <-time.After(1 * time.Second): + t.Fatalf("got no response") + } + }) + } +} + +func TestSendDeltaError(t *testing.T) { + for _, typ := range testTypes { + t.Run(typ, func(t *testing.T) { + config := makeMockConfigWatcher() + config.deltaResponses = makeDeltaResponses() + s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) + + // make a request with an error + resp := makeMockDeltaStream(t) + resp.sendError = true + resp.recv <- &discovery.DeltaDiscoveryRequest{ + Node: node, + TypeUrl: typ, + } + + // check that response fails since we expect an error to come through + err := s.DeltaAggregatedResources(resp) + assert.Error(t, err) + + close(resp.recv) + }) + } +} + +func TestDeltaAggregatedHandlers(t *testing.T) { + config := makeMockConfigWatcher() + config.deltaResponses = makeDeltaResponses() + resp := makeMockDeltaStream(t) + + reqs := []*discovery.DeltaDiscoveryRequest{ + { + Node: node, + TypeUrl: rsrc.ListenerType, + }, + { + Node: node, + TypeUrl: rsrc.ClusterType, + }, + { + Node: node, + TypeUrl: rsrc.EndpointType, + ResourceNamesSubscribe: []string{clusterName}, + }, + { + TypeUrl: rsrc.RouteType, + ResourceNamesSubscribe: []string{routeName}, + }, + { + TypeUrl: rsrc.ScopedRouteType, + ResourceNamesSubscribe: []string{scopedRouteName}, + }, + { + TypeUrl: rsrc.SecretType, + ResourceNamesSubscribe: []string{secretName}, + }, + } + + for _, r := range reqs { + resp.recv <- r + } + + s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) + go func() { + err := s.DeltaAggregatedResources(resp) + assert.NoError(t, err) + }() + + count := 0 + for { + select { + case <-resp.sent: + count++ + if count >= len(reqs) { + close(resp.recv) + assert.Equal( + t, + map[string]int{ + rsrc.EndpointType: 1, + rsrc.ClusterType: 1, + rsrc.RouteType: 1, + rsrc.ScopedRouteType: 1, + rsrc.ListenerType: 1, + rsrc.SecretType: 1}, + config.deltaCounts, + ) + return + } + case <-time.After(1 * time.Second): + t.Fatalf("got %d messages on the stream, not 5", count) + } + } +} + +func TestDeltaAggregateRequestType(t *testing.T) { + config := makeMockConfigWatcher() + s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) + resp := makeMockDeltaStream(t) + resp.recv <- &discovery.DeltaDiscoveryRequest{Node: node} + if err := s.DeltaAggregatedResources(resp); err == nil { + t.Error("DeltaAggregatedResources() => got nil, want an error") + } +} + +func TestDeltaCancellations(t *testing.T) { + config := makeMockConfigWatcher() + resp := makeMockDeltaStream(t) + for _, typ := range testTypes { + resp.recv <- &discovery.DeltaDiscoveryRequest{ + Node: node, + TypeUrl: typ, + } + } + close(resp.recv) + s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) + if err := s.DeltaAggregatedResources(resp); err != nil { + t.Errorf("DeltaAggregatedResources() => got %v, want no error", err) + } + if config.watches != 0 { + t.Errorf("Expect all watches canceled, got %q", config.watches) + } +} + +func TestDeltaOpaqueRequestsChannelMuxing(t *testing.T) { + config := makeMockConfigWatcher() + resp := makeMockDeltaStream(t) + for i := 0; i < 10; i++ { + resp.recv <- &discovery.DeltaDiscoveryRequest{ + Node: node, + TypeUrl: fmt.Sprintf("%s%d", opaqueType, i%2), + ResourceNamesSubscribe: []string{fmt.Sprintf("%d", i)}, + } + } + close(resp.recv) + s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) + if err := s.DeltaAggregatedResources(resp); err != nil { + t.Errorf("DeltaAggregatedResources() => got %v, want no error", err) + } + if config.watches != 0 { + t.Errorf("Expect all watches canceled, got %q", config.watches) + } +} + +func TestDeltaCallbackError(t *testing.T) { + for _, typ := range testTypes { + t.Run(typ, func(t *testing.T) { + config := makeMockConfigWatcher() + config.deltaResponses = makeDeltaResponses() + + s := server.NewServer(context.Background(), config, server.CallbackFuncs{ + DeltaStreamOpenFunc: func(ctx context.Context, i int64, s string) error { + return errors.New("stream open error") + }, + }) + + // make a request + resp := makeMockDeltaStream(t) + resp.recv <- &discovery.DeltaDiscoveryRequest{ + Node: node, + TypeUrl: typ, + } + + // check that response fails since stream open returns error + if err := s.DeltaAggregatedResources(resp); err == nil { + t.Error("Stream() => got no error, want error") + } + + close(resp.recv) + }) + } +} diff --git a/pkg/envoy-control-plane/server/v3/gateway.go b/pkg/envoy-control-plane/server/v3/gateway.go index 2489837c1a..511b0b4b13 100644 --- a/pkg/envoy-control-plane/server/v3/gateway.go +++ b/pkg/envoy-control-plane/server/v3/gateway.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,26 +15,21 @@ package server import ( - "bytes" "fmt" "io/ioutil" "net/http" "path" - "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/encoding/protojson" discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" ) // HTTPGateway is a custom implementation of [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) // specialized to Envoy xDS API. type HTTPGateway struct { - // Log is an optional log for errors in response write - Log log.Logger - // Server is the underlying gRPC server Server Server } @@ -53,6 +47,8 @@ func (h *HTTPGateway) ServeHTTP(req *http.Request) ([]byte, int, error) { typeURL = resource.ListenerType case resource.FetchRoutes: typeURL = resource.RouteType + case resource.FetchScopedRoutes: + typeURL = resource.ScopedRouteType case resource.FetchSecrets: typeURL = resource.SecretType case resource.FetchRuntimes: @@ -74,7 +70,7 @@ func (h *HTTPGateway) ServeHTTP(req *http.Request) ([]byte, int, error) { // parse as JSON out := &discovery.DiscoveryRequest{} - err = jsonpb.UnmarshalString(string(body), out) + err = protojson.Unmarshal(body, out) if err != nil { return nil, http.StatusBadRequest, fmt.Errorf("cannot parse JSON body: " + err.Error()) } @@ -91,10 +87,10 @@ func (h *HTTPGateway) ServeHTTP(req *http.Request) ([]byte, int, error) { return nil, http.StatusInternalServerError, fmt.Errorf("fetch error: " + err.Error()) } - buf := &bytes.Buffer{} - if err := (&jsonpb.Marshaler{OrigName: true}).Marshal(buf, res); err != nil { + b, err := protojson.MarshalOptions{UseProtoNames: true}.Marshal(res) + if err != nil { return nil, http.StatusInternalServerError, fmt.Errorf("marshal error: " + err.Error()) } - return buf.Bytes(), http.StatusOK, nil + return b, http.StatusOK, nil } diff --git a/pkg/envoy-control-plane/server/v3/gateway_test.go b/pkg/envoy-control-plane/server/v3/gateway_test.go index e36c1eefcb..b0ff3ab050 100644 --- a/pkg/envoy-control-plane/server/v3/gateway_test.go +++ b/pkg/envoy-control-plane/server/v3/gateway_test.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,45 +26,35 @@ import ( "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" - rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" ) -type logger struct { - t *testing.T -} - -func (log logger) Debugf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Infof(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Warnf(format string, args ...interface{}) { log.t.Logf(format, args...) } -func (log logger) Errorf(format string, args ...interface{}) { log.t.Logf(format, args...) } - func TestGateway(t *testing.T) { config := makeMockConfigWatcher() config.responses = map[string][]cache.Response{ resource.ClusterType: { &cache.RawResponse{ Version: "2", - Resources: []types.ResourceWithTtl{{Resource: cluster}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ClusterType}, + Resources: []types.ResourceWithTTL{{Resource: cluster}}, + Request: &discovery.DiscoveryRequest{TypeUrl: resource.ClusterType}, }, }, resource.RouteType: { &cache.RawResponse{ Version: "3", - Resources: []types.ResourceWithTtl{{Resource: route}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.RouteType}, + Resources: []types.ResourceWithTTL{{Resource: route}}, + Request: &discovery.DiscoveryRequest{TypeUrl: resource.RouteType}, }, }, resource.ListenerType: { &cache.RawResponse{ Version: "4", - Resources: []types.ResourceWithTtl{{Resource: listener}}, - Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ListenerType}, + Resources: []types.ResourceWithTTL{{Resource: httpListener}, {Resource: httpScopedListener}}, + Request: &discovery.DiscoveryRequest{TypeUrl: resource.ListenerType}, }, }, } - gtw := server.HTTPGateway{Log: logger{t: t}, Server: server.NewServer(context.Background(), config, nil)} + gtw := server.HTTPGateway{Server: server.NewServer(context.Background(), config, nil)} failCases := []struct { path string @@ -103,6 +92,9 @@ func TestGateway(t *testing.T) { t.Fatal(err) } resp, code, err := gtw.ServeHTTP(req) + if err == nil { + t.Errorf("ServeHTTP succeeded, but should have failed") + } if resp != nil { t.Errorf("handler returned wrong response") } @@ -117,6 +109,9 @@ func TestGateway(t *testing.T) { t.Fatal(err) } resp, code, err := gtw.ServeHTTP(req) + if err != nil { + t.Fatal(err) + } if resp == nil { t.Errorf("handler returned wrong response") } diff --git a/pkg/envoy-control-plane/server/v3/server.go b/pkg/envoy-control-plane/server/v3/server.go index a27277b0d5..4fa31d41c5 100644 --- a/pkg/envoy-control-plane/server/v3/server.go +++ b/pkg/envoy-control-plane/server/v3/server.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,16 +17,20 @@ package server import ( "context" - "errors" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/rest/v3" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/sotw/v3" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/delta/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/rest/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/sotw/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" + clusterservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/cluster/v3" discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" discoverygrpc "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" endpointservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/endpoint/v3" + extensionconfigservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/extension/v3" listenerservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/listener/v3" routeservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/route/v3" runtimeservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/runtime/v3" @@ -41,13 +44,16 @@ type Server interface { endpointservice.EndpointDiscoveryServiceServer clusterservice.ClusterDiscoveryServiceServer routeservice.RouteDiscoveryServiceServer + routeservice.ScopedRoutesDiscoveryServiceServer listenerservice.ListenerDiscoveryServiceServer discoverygrpc.AggregatedDiscoveryServiceServer secretservice.SecretDiscoveryServiceServer runtimeservice.RuntimeDiscoveryServiceServer + extensionconfigservice.ExtensionConfigDiscoveryServiceServer rest.Server sotw.Server + delta.Server } // Callbacks is a collection of callbacks inserted into the server operation. @@ -55,16 +61,21 @@ type Server interface { type Callbacks interface { rest.Callbacks sotw.Callbacks + delta.Callbacks } // CallbackFuncs is a convenience type for implementing the Callbacks interface. type CallbackFuncs struct { - StreamOpenFunc func(context.Context, int64, string) error - StreamClosedFunc func(int64) - StreamRequestFunc func(int64, *discovery.DiscoveryRequest) error - StreamResponseFunc func(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) - FetchRequestFunc func(context.Context, *discovery.DiscoveryRequest) error - FetchResponseFunc func(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse) + StreamOpenFunc func(context.Context, int64, string) error + StreamClosedFunc func(int64) + DeltaStreamOpenFunc func(context.Context, int64, string) error + DeltaStreamClosedFunc func(int64) + StreamRequestFunc func(int64, *discovery.DiscoveryRequest) error + StreamResponseFunc func(context.Context, int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) + StreamDeltaRequestFunc func(int64, *discovery.DeltaDiscoveryRequest) error + StreamDeltaResponseFunc func(int64, *discovery.DeltaDiscoveryRequest, *discovery.DeltaDiscoveryResponse) + FetchRequestFunc func(context.Context, *discovery.DiscoveryRequest) error + FetchResponseFunc func(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse) } var _ Callbacks = CallbackFuncs{} @@ -85,6 +96,22 @@ func (c CallbackFuncs) OnStreamClosed(streamID int64) { } } +// OnDeltaStreamOpen invokes DeltaStreamOpenFunc. +func (c CallbackFuncs) OnDeltaStreamOpen(ctx context.Context, streamID int64, typeURL string) error { + if c.DeltaStreamOpenFunc != nil { + return c.DeltaStreamOpenFunc(ctx, streamID, typeURL) + } + + return nil +} + +// OnDeltaStreamClosed invokes DeltaStreamClosedFunc. +func (c CallbackFuncs) OnDeltaStreamClosed(streamID int64) { + if c.DeltaStreamClosedFunc != nil { + c.DeltaStreamClosedFunc(streamID) + } +} + // OnStreamRequest invokes StreamRequestFunc. func (c CallbackFuncs) OnStreamRequest(streamID int64, req *discovery.DiscoveryRequest) error { if c.StreamRequestFunc != nil { @@ -95,9 +122,25 @@ func (c CallbackFuncs) OnStreamRequest(streamID int64, req *discovery.DiscoveryR } // OnStreamResponse invokes StreamResponseFunc. -func (c CallbackFuncs) OnStreamResponse(streamID int64, req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse) { +func (c CallbackFuncs) OnStreamResponse(ctx context.Context, streamID int64, req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse) { if c.StreamResponseFunc != nil { - c.StreamResponseFunc(streamID, req, resp) + c.StreamResponseFunc(ctx, streamID, req, resp) + } +} + +// OnStreamDeltaRequest invokes StreamDeltaResponseFunc +func (c CallbackFuncs) OnStreamDeltaRequest(streamID int64, req *discovery.DeltaDiscoveryRequest) error { + if c.StreamDeltaRequestFunc != nil { + return c.StreamDeltaRequestFunc(streamID, req) + } + + return nil +} + +// OnStreamDeltaResponse invokes StreamDeltaResponseFunc. +func (c CallbackFuncs) OnStreamDeltaResponse(streamID int64, req *discovery.DeltaDiscoveryRequest, resp *discovery.DeltaDiscoveryResponse) { + if c.StreamDeltaResponseFunc != nil { + c.StreamDeltaResponseFunc(streamID, req, resp) } } @@ -119,16 +162,20 @@ func (c CallbackFuncs) OnFetchResponse(req *discovery.DiscoveryRequest, resp *di // NewServer creates handlers from a config watcher and callbacks. func NewServer(ctx context.Context, config cache.Cache, callbacks Callbacks) Server { - return NewServerAdvanced(rest.NewServer(config, callbacks), sotw.NewServer(ctx, config, callbacks)) + return NewServerAdvanced(rest.NewServer(config, callbacks), + sotw.NewServer(ctx, config, callbacks), + delta.NewServer(ctx, config, callbacks), + ) } -func NewServerAdvanced(restServer rest.Server, sotwServer sotw.Server) Server { - return &server{rest: restServer, sotw: sotwServer} +func NewServerAdvanced(restServer rest.Server, sotwServer sotw.Server, deltaServer delta.Server) Server { + return &server{rest: restServer, sotw: sotwServer, delta: deltaServer} } type server struct { - rest rest.Server - sotw sotw.Server + rest rest.Server + sotw sotw.Server + delta delta.Server } func (s *server) StreamHandler(stream sotw.Stream, typeURL string) error { @@ -151,6 +198,10 @@ func (s *server) StreamRoutes(stream routeservice.RouteDiscoveryService_StreamRo return s.StreamHandler(stream, resource.RouteType) } +func (s *server) StreamScopedRoutes(stream routeservice.ScopedRoutesDiscoveryService_StreamScopedRoutesServer) error { + return s.StreamHandler(stream, resource.ScopedRouteType) +} + func (s *server) StreamListeners(stream listenerservice.ListenerDiscoveryService_StreamListenersServer) error { return s.StreamHandler(stream, resource.ListenerType) } @@ -163,6 +214,10 @@ func (s *server) StreamRuntime(stream runtimeservice.RuntimeDiscoveryService_Str return s.StreamHandler(stream, resource.RuntimeType) } +func (s *server) StreamExtensionConfigs(stream extensionconfigservice.ExtensionConfigDiscoveryService_StreamExtensionConfigsServer) error { + return s.StreamHandler(stream, resource.ExtensionConfigType) +} + // Fetch is the universal fetch method. func (s *server) Fetch(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { return s.rest.Fetch(ctx, req) @@ -192,6 +247,14 @@ func (s *server) FetchRoutes(ctx context.Context, req *discovery.DiscoveryReques return s.Fetch(ctx, req) } +func (s *server) FetchScopedRoutes(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { + if req == nil { + return nil, status.Errorf(codes.Unavailable, "empty request") + } + req.TypeUrl = resource.ScopedRouteType + return s.Fetch(ctx, req) +} + func (s *server) FetchListeners(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { if req == nil { return nil, status.Errorf(codes.Unavailable, "empty request") @@ -216,30 +279,50 @@ func (s *server) FetchRuntime(ctx context.Context, req *discovery.DiscoveryReque return s.Fetch(ctx, req) } -func (s *server) DeltaAggregatedResources(_ discoverygrpc.AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error { - return errors.New("not implemented") +func (s *server) FetchExtensionConfigs(ctx context.Context, req *discovery.DiscoveryRequest) (*discovery.DiscoveryResponse, error) { + if req == nil { + return nil, status.Errorf(codes.Unavailable, "empty request") + } + req.TypeUrl = resource.ExtensionConfigType + return s.Fetch(ctx, req) +} + +func (s *server) DeltaStreamHandler(stream stream.DeltaStream, typeURL string) error { + return s.delta.DeltaStreamHandler(stream, typeURL) +} + +func (s *server) DeltaAggregatedResources(stream discoverygrpc.AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error { + return s.DeltaStreamHandler(stream, resource.AnyType) +} + +func (s *server) DeltaEndpoints(stream endpointservice.EndpointDiscoveryService_DeltaEndpointsServer) error { + return s.DeltaStreamHandler(stream, resource.EndpointType) +} + +func (s *server) DeltaClusters(stream clusterservice.ClusterDiscoveryService_DeltaClustersServer) error { + return s.DeltaStreamHandler(stream, resource.ClusterType) } -func (s *server) DeltaEndpoints(_ endpointservice.EndpointDiscoveryService_DeltaEndpointsServer) error { - return errors.New("not implemented") +func (s *server) DeltaRoutes(stream routeservice.RouteDiscoveryService_DeltaRoutesServer) error { + return s.DeltaStreamHandler(stream, resource.RouteType) } -func (s *server) DeltaClusters(_ clusterservice.ClusterDiscoveryService_DeltaClustersServer) error { - return errors.New("not implemented") +func (s *server) DeltaScopedRoutes(stream routeservice.ScopedRoutesDiscoveryService_DeltaScopedRoutesServer) error { + return s.DeltaStreamHandler(stream, resource.ScopedRouteType) } -func (s *server) DeltaRoutes(_ routeservice.RouteDiscoveryService_DeltaRoutesServer) error { - return errors.New("not implemented") +func (s *server) DeltaListeners(stream listenerservice.ListenerDiscoveryService_DeltaListenersServer) error { + return s.DeltaStreamHandler(stream, resource.ListenerType) } -func (s *server) DeltaListeners(_ listenerservice.ListenerDiscoveryService_DeltaListenersServer) error { - return errors.New("not implemented") +func (s *server) DeltaSecrets(stream secretservice.SecretDiscoveryService_DeltaSecretsServer) error { + return s.DeltaStreamHandler(stream, resource.SecretType) } -func (s *server) DeltaSecrets(_ secretservice.SecretDiscoveryService_DeltaSecretsServer) error { - return errors.New("not implemented") +func (s *server) DeltaRuntime(stream runtimeservice.RuntimeDiscoveryService_DeltaRuntimeServer) error { + return s.DeltaStreamHandler(stream, resource.RuntimeType) } -func (s *server) DeltaRuntime(_ runtimeservice.RuntimeDiscoveryService_DeltaRuntimeServer) error { - return errors.New("not implemented") +func (s *server) DeltaExtensionConfigs(stream extensionconfigservice.ExtensionConfigDiscoveryService_DeltaExtensionConfigsServer) error { + return s.DeltaStreamHandler(stream, resource.ExtensionConfigType) } diff --git a/pkg/envoy-control-plane/server/v3/server_test.go b/pkg/envoy-control-plane/server/v3/server_test.go index 730410d5c4..1dfb3e1f5d 100644 --- a/pkg/envoy-control-plane/server/v3/server_test.go +++ b/pkg/envoy-control-plane/server/v3/server_test.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,6 +19,7 @@ import ( "errors" "fmt" "reflect" + "sync" "testing" "time" @@ -30,34 +30,34 @@ import ( "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" rsrc "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/stream/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v3" ) type mockConfigWatcher struct { - counts map[string]int - responses map[string][]cache.Response - closeWatch bool - watches int + counts map[string]int + deltaCounts map[string]int + responses map[string][]cache.Response + deltaResponses map[string][]cache.DeltaResponse + watches int + deltaWatches int + + mu *sync.RWMutex } -func (config *mockConfigWatcher) CreateWatch(req *discovery.DiscoveryRequest) (chan cache.Response, func()) { +func (config *mockConfigWatcher) CreateWatch(req *discovery.DiscoveryRequest, state stream.StreamState, out chan cache.Response) func() { config.counts[req.TypeUrl] = config.counts[req.TypeUrl] + 1 - out := make(chan cache.Response, 1) if len(config.responses[req.TypeUrl]) > 0 { out <- config.responses[req.TypeUrl][0] config.responses[req.TypeUrl] = config.responses[req.TypeUrl][1:] - } else if config.closeWatch { - close(out) } else { - config.watches += 1 - return out, func() { - // it is ok to close the channel after cancellation and not wait for it to be garbage collected - close(out) - config.watches -= 1 + config.watches++ + return func() { + config.watches-- } } - return out, nil + return nil } func (config *mockConfigWatcher) Fetch(ctx context.Context, req *discovery.DiscoveryRequest) (cache.Response, error) { @@ -71,7 +71,9 @@ func (config *mockConfigWatcher) Fetch(ctx context.Context, req *discovery.Disco func makeMockConfigWatcher() *mockConfigWatcher { return &mockConfigWatcher{ - counts: make(map[string]int), + counts: make(map[string]int), + deltaCounts: make(map[string]int), + mu: &sync.RWMutex{}, } } @@ -137,11 +139,14 @@ func makeMockStream(t *testing.T) *mockStream { } const ( - clusterName = "cluster0" - routeName = "route0" - listenerName = "listener0" - secretName = "secret0" - runtimeName = "runtime0" + clusterName = "cluster0" + routeName = "route0" + scopedRouteName = "scopedRoute0" + listenerName = "listener0" + scopedListenerName = "scopedListener0" + secretName = "secret0" + runtimeName = "runtime0" + extensionConfigName = "extensionConfig0" ) var ( @@ -149,21 +154,26 @@ var ( Id: "test-id", Cluster: "test-cluster", } - endpoint = resource.MakeEndpoint(clusterName, 8080) - cluster = resource.MakeCluster(resource.Ads, clusterName) - route = resource.MakeRoute(routeName, clusterName) - listener = resource.MakeHTTPListener(resource.Ads, listenerName, 80, routeName) - secret = resource.MakeSecrets(secretName, "test")[0] - runtime = resource.MakeRuntime(runtimeName) - opaque = &core.Address{} - opaqueType = "unknown-type" - testTypes = []string{ + endpoint = resource.MakeEndpoint(clusterName, 8080) + cluster = resource.MakeCluster(resource.Ads, clusterName) + route = resource.MakeRoute(routeName, clusterName) + scopedRoute = resource.MakeScopedRoute(scopedRouteName, routeName, []string{"127.0.0.1"}) + httpListener = resource.MakeRouteHTTPListener(resource.Ads, listenerName, 80, routeName) + httpScopedListener = resource.MakeScopedRouteHTTPListener(resource.Ads, scopedListenerName, 80, scopedRouteName) + secret = resource.MakeSecrets(secretName, "test")[0] + runtime = resource.MakeRuntime(runtimeName) + extensionConfig = resource.MakeExtensionConfig(resource.Ads, extensionConfigName, routeName) + opaque = &core.Address{} + opaqueType = "unknown-type" + testTypes = []string{ rsrc.EndpointType, rsrc.ClusterType, rsrc.RouteType, + rsrc.ScopedRouteType, rsrc.ListenerType, rsrc.SecretType, rsrc.RuntimeType, + rsrc.ExtensionConfigType, opaqueType, } ) @@ -173,50 +183,64 @@ func makeResponses() map[string][]cache.Response { rsrc.EndpointType: { &cache.RawResponse{ Version: "1", - Resources: []types.ResourceWithTtl{{Resource: endpoint}}, + Resources: []types.ResourceWithTTL{{Resource: endpoint}}, Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.EndpointType}, }, }, rsrc.ClusterType: { &cache.RawResponse{ Version: "2", - Resources: []types.ResourceWithTtl{{Resource: cluster}}, + Resources: []types.ResourceWithTTL{{Resource: cluster}}, Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ClusterType}, }, }, rsrc.RouteType: { &cache.RawResponse{ Version: "3", - Resources: []types.ResourceWithTtl{{Resource: route}}, + Resources: []types.ResourceWithTTL{{Resource: route}}, Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.RouteType}, }, }, - rsrc.ListenerType: { + rsrc.ScopedRouteType: { &cache.RawResponse{ Version: "4", - Resources: []types.ResourceWithTtl{{Resource: listener}}, + Resources: []types.ResourceWithTTL{{Resource: scopedRoute}}, + Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ScopedRouteType}, + }, + }, + rsrc.ListenerType: { + &cache.RawResponse{ + Version: "5", + Resources: []types.ResourceWithTTL{{Resource: httpListener}, {Resource: httpScopedListener}}, Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ListenerType}, }, }, rsrc.SecretType: { &cache.RawResponse{ - Version: "5", - Resources: []types.ResourceWithTtl{{Resource: secret}}, + Version: "6", + Resources: []types.ResourceWithTTL{{Resource: secret}}, Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.SecretType}, }, }, rsrc.RuntimeType: { &cache.RawResponse{ - Version: "6", - Resources: []types.ResourceWithTtl{{Resource: runtime}}, + Version: "7", + Resources: []types.ResourceWithTTL{{Resource: runtime}}, Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.RuntimeType}, }, }, + rsrc.ExtensionConfigType: { + &cache.RawResponse{ + Version: "8", + Resources: []types.ResourceWithTTL{{Resource: extensionConfig}}, + Request: &discovery.DiscoveryRequest{TypeUrl: rsrc.ExtensionConfigType}, + }, + }, // Pass-through type (xDS does not exist for this type) opaqueType: { &cache.RawResponse{ - Version: "7", - Resources: []types.ResourceWithTtl{{Resource: opaque}}, + Version: "9", + Resources: []types.ResourceWithTTL{{Resource: opaque}}, Request: &discovery.DiscoveryRequest{TypeUrl: opaqueType}, }, }, @@ -235,21 +259,25 @@ func TestServerShutdown(t *testing.T) { // make a request resp := makeMockStream(t) resp.recv <- &discovery.DiscoveryRequest{Node: node, TypeUrl: typ} - go func() { + go func(rType string) { var err error - switch typ { + switch rType { case rsrc.EndpointType: err = s.StreamEndpoints(resp) case rsrc.ClusterType: err = s.StreamClusters(resp) case rsrc.RouteType: err = s.StreamRoutes(resp) + case rsrc.ScopedRouteType: + err = s.StreamScopedRoutes(resp) case rsrc.ListenerType: err = s.StreamListeners(resp) case rsrc.SecretType: err = s.StreamSecrets(resp) case rsrc.RuntimeType: err = s.StreamRuntime(resp) + case rsrc.ExtensionConfigType: + err = s.StreamExtensionConfigs(resp) case opaqueType: err = s.StreamAggregatedResources(resp) } @@ -257,7 +285,7 @@ func TestServerShutdown(t *testing.T) { t.Errorf("Stream() => got %v, want no error", err) } shutdown <- true - }() + }(typ) go func() { defer cancel() @@ -282,28 +310,32 @@ func TestResponseHandlers(t *testing.T) { // make a request resp := makeMockStream(t) resp.recv <- &discovery.DiscoveryRequest{Node: node, TypeUrl: typ} - go func() { + go func(rType string) { var err error - switch typ { + switch rType { case rsrc.EndpointType: err = s.StreamEndpoints(resp) case rsrc.ClusterType: err = s.StreamClusters(resp) case rsrc.RouteType: err = s.StreamRoutes(resp) + case rsrc.ScopedRouteType: + err = s.StreamScopedRoutes(resp) case rsrc.ListenerType: err = s.StreamListeners(resp) case rsrc.SecretType: err = s.StreamSecrets(resp) case rsrc.RuntimeType: err = s.StreamRuntime(resp) + case rsrc.ExtensionConfigType: + err = s.StreamExtensionConfigs(resp) case opaqueType: err = s.StreamAggregatedResources(resp) } if err != nil { t.Errorf("Stream() => got %v, want no error", err) } - }() + }(typ) // check a response select { @@ -356,14 +388,20 @@ func TestFetch(t *testing.T) { if out, err := s.FetchRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { t.Errorf("unexpected empty or error for routes: %v", err) } + if out, err := s.FetchScopedRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { + t.Errorf("unexpected empty or error for scopedRoutes: %v", err) + } if out, err := s.FetchListeners(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { t.Errorf("unexpected empty or error for listeners: %v", err) } if out, err := s.FetchSecrets(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for listeners: %v", err) + t.Errorf("unexpected empty or error for secrets: %v", err) } if out, err := s.FetchRuntime(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { - t.Errorf("unexpected empty or error for listeners: %v", err) + t.Errorf("unexpected empty or error for runtime: %v", err) + } + if out, err := s.FetchExtensionConfigs(context.Background(), &discovery.DiscoveryRequest{Node: node}); out == nil || err != nil { + t.Errorf("unexpected empty or error for extensionConfigs: %v", err) } // try again and expect empty results @@ -376,6 +414,9 @@ func TestFetch(t *testing.T) { if out, err := s.FetchRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil { t.Errorf("expected empty or error for routes: %v", err) } + if out, err := s.FetchScopedRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil { + t.Errorf("expected empty or error for routes: %v", err) + } if out, err := s.FetchListeners(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil { t.Errorf("expected empty or error for listeners: %v", err) } @@ -390,6 +431,9 @@ func TestFetch(t *testing.T) { if out, err := s.FetchRoutes(context.Background(), nil); out != nil { t.Errorf("expected empty on empty request: %v", err) } + if out, err := s.FetchScopedRoutes(context.Background(), nil); out != nil { + t.Errorf("expected empty on empty request: %v", err) + } if out, err := s.FetchListeners(context.Background(), nil); out != nil { t.Errorf("expected empty on empty request: %v", err) } @@ -399,6 +443,9 @@ func TestFetch(t *testing.T) { if out, err := s.FetchRuntime(context.Background(), nil); out != nil { t.Errorf("expected empty on empty request: %v", err) } + if out, err := s.FetchExtensionConfigs(context.Background(), nil); out != nil { + t.Errorf("expected empty on empty request: %v", err) + } // send error from callback callbackError = true @@ -411,43 +458,22 @@ func TestFetch(t *testing.T) { if out, err := s.FetchRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil || err == nil { t.Errorf("expected empty or error due to callback error") } + if out, err := s.FetchScopedRoutes(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil || err == nil { + t.Errorf("expected empty or error due to callback error") + } if out, err := s.FetchListeners(context.Background(), &discovery.DiscoveryRequest{Node: node}); out != nil || err == nil { t.Errorf("expected empty or error due to callback error") } // verify fetch callbacks - if want := 10; requestCount != want { + if want := 13; requestCount != want { t.Errorf("unexpected number of fetch requests: got %d, want %d", requestCount, want) } - if want := 6; responseCount != want { + if want := 8; responseCount != want { t.Errorf("unexpected number of fetch responses: got %d, want %d", responseCount, want) } } -func TestWatchClosed(t *testing.T) { - for _, typ := range testTypes { - t.Run(typ, func(t *testing.T) { - config := makeMockConfigWatcher() - config.closeWatch = true - s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) - - // make a request - resp := makeMockStream(t) - resp.recv <- &discovery.DiscoveryRequest{ - Node: node, - TypeUrl: typ, - } - - // check that response fails since watch gets closed - if err := s.StreamAggregatedResources(resp); err == nil { - t.Error("Stream() => got no error, want watch failed") - } - - close(resp.recv) - }) - } -} - func TestSendError(t *testing.T) { for _, typ := range testTypes { t.Run(typ, func(t *testing.T) { @@ -541,6 +567,10 @@ func TestAggregatedHandlers(t *testing.T) { TypeUrl: rsrc.RouteType, ResourceNames: []string{routeName}, } + resp.recv <- &discovery.DiscoveryRequest{ + TypeUrl: rsrc.ScopedRouteType, + ResourceNames: []string{scopedRouteName}, + } s := server.NewServer(context.Background(), config, server.CallbackFuncs{}) go func() { @@ -554,13 +584,14 @@ func TestAggregatedHandlers(t *testing.T) { select { case <-resp.sent: count++ - if count >= 4 { + if count >= 5 { close(resp.recv) if want := map[string]int{ - rsrc.EndpointType: 1, - rsrc.ClusterType: 1, - rsrc.RouteType: 1, - rsrc.ListenerType: 1, + rsrc.EndpointType: 1, + rsrc.ClusterType: 1, + rsrc.RouteType: 1, + rsrc.ScopedRouteType: 1, + rsrc.ListenerType: 1, }; !reflect.DeepEqual(want, config.counts) { t.Errorf("watch counts => got %v, want %v", config.counts, want) } @@ -599,7 +630,7 @@ func TestCancellations(t *testing.T) { t.Errorf("StreamAggregatedResources() => got %v, want no error", err) } if config.watches != 0 { - t.Errorf("Expect all watches cancelled, got %q", config.watches) + t.Errorf("Expect all watches canceled, got %q", config.watches) } } @@ -620,7 +651,7 @@ func TestOpaqueRequestsChannelMuxing(t *testing.T) { t.Errorf("StreamAggregatedResources() => got %v, want no error", err) } if config.watches != 0 { - t.Errorf("Expect all watches cancelled, got %q", config.watches) + t.Errorf("Expect all watches canceled, got %q", config.watches) } } diff --git a/pkg/envoy-control-plane/test/main/README.md b/pkg/envoy-control-plane/test/main/README.md index 29c235a3f4..61b9e5a5db 100644 --- a/pkg/envoy-control-plane/test/main/README.md +++ b/pkg/envoy-control-plane/test/main/README.md @@ -37,3 +37,18 @@ eventually converges to use the latest pushed configuration) for each run. You can run ```bin/test -help``` to get a list of the cli flags that the test program accepts. There are also comments in ```main.go```. + +## Using the pprof profiler + +One customization is to run the go language profiler [pprof](https://github.com/DataDog/go-profiler-notes/blob/main/pprof.md). See also . + +The profiler is normally off because it adds overhead to the tests. You can turn +it on with the command line option `--pprof`. There is an environment variable +`PPROF` for the `make` commands shown above. For example: + + (export PPROF=true; make integration.xds) + +The test will then write files of the form `block_profile_xds.pb.gz`. The files +get written to the root of the project, in the same place as the envoy logs. + +You can use `go tool pprof bin/test ` to analyze the profile data. diff --git a/pkg/envoy-control-plane/test/main/main.go b/pkg/envoy-control-plane/test/main/main.go index eba17aac0f..d0700960e3 100644 --- a/pkg/envoy-control-plane/test/main/main.go +++ b/pkg/envoy-control-plane/test/main/main.go @@ -24,18 +24,15 @@ import ( "log" "net/http" "os" + "runtime" + "runtime/pprof" "time" - cachev2 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - cachev3 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" - serverv2 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v2" - serverv3 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test" - testv2 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/v2" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v3" testv3 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/v3" - - resourcev2 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v2" - resourcev3 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/resource/v3" ) var ( @@ -52,15 +49,19 @@ var ( requests int updates int - mode string - clusters int - httpListeners int - tcpListeners int - runtimes int - tls bool - mux bool + mode string + clusters int + httpListeners int + scopedHTTPListeners int + tcpListeners int + runtimes int + tls bool + mux bool + extensionNum int nodeID string + + pprofEnabled bool ) func init() { @@ -87,7 +88,7 @@ func init() { // upstream server flag.UintVar(&basePort, "base", 9000, "Envoy Proxy listener port") - // The control plane accesslog server port (currently unused) + // The control plane accesslog server port flag.UintVar(&alsPort, "als", 18090, "Control plane accesslog server port") // @@ -96,7 +97,7 @@ func init() { // Tell Envoy to request configurations from the control plane using // this protocol - flag.StringVar(&mode, "xds", resourcev2.Ads, "Management protocol to test (ADS, xDS, REST)") + flag.StringVar(&mode, "xds", resource.Ads, "Management protocol to test (ADS, xDS, REST, DELTA, DELTA-ADS)") // Tell Envoy to use this Node ID flag.StringVar(&nodeID, "nodeID", "test-id", "Node ID") @@ -133,11 +134,23 @@ func init() { // Test this many HTTP listeners per snapshot flag.IntVar(&httpListeners, "http", 2, "Number of HTTP listeners (and RDS configs)") + // Test this many scoped HTTP listeners per snapshot + flag.IntVar(&scopedHTTPListeners, "scopedhttp", 2, "Number of HTTP listeners (and SRDS configs)") // Test this many TCP listeners per snapshot flag.IntVar(&tcpListeners, "tcp", 2, "Number of TCP pass-through listeners") // Enable a muxed cache with partial snapshots flag.BoolVar(&mux, "mux", false, "Enable muxed linear cache for EDS") + + // Number of ExtensionConfig + flag.IntVar(&extensionNum, "extension", 1, "Number of Extension") + // + // These parameters control the the use of the pprof profiler + // + + // Enable use of the pprof profiler + flag.BoolVar(&pprofEnabled, "pprof", false, "Enable use of the pprof profiler") + } // main returns code 1 if any of the batches failed to pass all requests @@ -145,63 +158,61 @@ func main() { flag.Parse() ctx := context.Background() + if pprofEnabled { + runtime.SetBlockProfileRate(1) + for _, prof := range []string{"block", "goroutine", "mutex"} { + log.Printf("turn on pprof %s profiler", prof) + if pprof.Lookup(prof) == nil { + pprof.NewProfile(prof) + } + } + } + // create a cache signal := make(chan struct{}) - cbv2 := &testv2.Callbacks{Signal: signal, Debug: debug} - cbv3 := &testv3.Callbacks{Signal: signal, Debug: debug} - - configv2 := cachev2.NewSnapshotCache(mode == resourcev2.Ads, cachev2.IDHash{}, logger{}) - configv3 := cachev3.NewSnapshotCache(mode == resourcev2.Ads, cachev3.IDHash{}, logger{}) - srv2 := serverv2.NewServer(context.Background(), configv2, cbv2) + cb := &testv3.Callbacks{Signal: signal, Debug: debug} // mux integration - var configCachev3 cachev3.Cache = configv3 + // nil for logger uses default logger + config := cache.NewSnapshotCache(mode == resource.Ads, cache.IDHash{}, nil) + var configCache cache.Cache = config typeURL := "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment" - eds := cachev3.NewLinearCache(typeURL) + eds := cache.NewLinearCache(typeURL) if mux { - configCachev3 = &cachev3.MuxCache{ - Classify: func(req cachev3.Request) string { + configCache = &cache.MuxCache{ + Classify: func(req *cache.Request) string { if req.TypeUrl == typeURL { return "eds" } return "default" }, - Caches: map[string]cachev3.Cache{ - "default": configv3, + Caches: map[string]cache.Cache{ + "default": config, "eds": eds, }, } } - srv3 := serverv3.NewServer(context.Background(), configCachev3, cbv3) - alsv2 := &testv2.AccessLogService{} - alsv3 := &testv3.AccessLogService{} + srv := server.NewServer(context.Background(), configCache, cb) + als := &testv3.AccessLogService{} // create a test snapshot - snapshotsv2 := resourcev2.TestSnapshot{ - Xds: mode, - UpstreamPort: uint32(upstreamPort), - BasePort: uint32(basePort), - NumClusters: clusters, - NumHTTPListeners: httpListeners, - NumTCPListeners: tcpListeners, - TLS: tls, - NumRuntimes: runtimes, - } - snapshotsv3 := resourcev3.TestSnapshot{ - Xds: mode, - UpstreamPort: uint32(upstreamPort), - BasePort: uint32(basePort), - NumClusters: clusters, - NumHTTPListeners: httpListeners, - NumTCPListeners: tcpListeners, - TLS: tls, - NumRuntimes: runtimes, + snapshots := resource.TestSnapshot{ + Xds: mode, + UpstreamPort: uint32(upstreamPort), + BasePort: uint32(basePort), + NumClusters: clusters, + NumHTTPListeners: httpListeners, + NumScopedHTTPListeners: scopedHTTPListeners, + NumTCPListeners: tcpListeners, + TLS: tls, + NumRuntimes: runtimes, + NumExtension: extensionNum, } // start the xDS server - go test.RunAccessLogServer(ctx, alsv2, alsv3, alsPort) - go test.RunManagementServer(ctx, srv2, srv3, port) - go test.RunManagementGateway(ctx, srv2, srv3, gatewayPort, logger{}) + go test.RunAccessLogServer(ctx, als, alsPort) + go test.RunManagementServer(ctx, srv, port) + go test.RunManagementGateway(ctx, srv, gatewayPort) log.Println("waiting for the first request...") select { @@ -211,38 +222,31 @@ func main() { log.Println("timeout waiting for the first request") os.Exit(1) } - log.Printf("initial snapshot %+v\n", snapshotsv2) + log.Printf("initial snapshot %+v\n", snapshots) log.Printf("executing sequence updates=%d request=%d\n", updates, requests) for i := 0; i < updates; i++ { - snapshotsv2.Version = fmt.Sprintf("v%d", i) - log.Printf("update snapshot %v\n", snapshotsv2.Version) - snapshotsv3.Version = fmt.Sprintf("v%d", i) - log.Printf("update snapshot %v\n", snapshotsv3.Version) - - snapshotv2 := snapshotsv2.Generate() - snapshotv3 := snapshotsv3.Generate() - if err := snapshotv2.Consistent(); err != nil { - log.Printf("snapshot inconsistency: %+v\n", snapshotv2) - } - if err := snapshotv3.Consistent(); err != nil { - log.Printf("snapshot inconsistency: %+v\n", snapshotv3) - } + snapshots.Version = fmt.Sprintf("v%d", i) + log.Printf("update snapshot %v\n", snapshots.Version) - err := configv2.SetSnapshot(nodeID, snapshotv2) - if err != nil { - log.Printf("snapshot error %q for %+v\n", err, snapshotv2) - os.Exit(1) + snapshot := snapshots.Generate() + if err := snapshot.Consistent(); err != nil { + log.Printf("snapshot inconsistency: %+v\n%+v\n", snapshot, err) } - err = configv3.SetSnapshot(nodeID, snapshotv3) + err := config.SetSnapshot(context.Background(), nodeID, snapshot) if err != nil { - log.Printf("snapshot error %q for %+v\n", err, snapshotv3) + log.Printf("snapshot error %q for %+v\n", err, snapshot) os.Exit(1) } + if mux { - for name, res := range snapshotv3.GetResources(typeURL) { - eds.UpdateResource(name, res) + for name, res := range snapshot.GetResources(typeURL) { + if err := eds.UpdateResource(name, res); err != nil { + log.Printf("update error %q for %+v\n", err, name) + os.Exit(1) + + } } } @@ -261,19 +265,12 @@ func main() { } } - alsv2.Dump(func(s string) { - if debug { - log.Println(s) - } - }) - cbv2.Report() - - alsv3.Dump(func(s string) { + als.Dump(func(s string) { if debug { log.Println(s) } }) - cbv3.Report() + cb.Report() if !pass { log.Printf("failed all requests in a run %d\n", i) @@ -281,13 +278,27 @@ func main() { } } + if pprofEnabled { + for _, prof := range []string{"block", "goroutine", "mutex"} { + p := pprof.Lookup(prof) + filePath := fmt.Sprintf("%s_profile_%s.pb.gz", prof, mode) + log.Printf("storing %s profile for %s in %s", prof, mode, filePath) + f, err := os.Create(filePath) + if err != nil { + log.Fatalf("could not create %s profile %s: %s", prof, filePath, err) + } + p.WriteTo(f, 1) // nolint:errcheck + f.Close() + } + } + log.Printf("Test for %s passed!\n", mode) } // callEcho calls upstream echo service on all listener ports and returns an error // if any of the listeners returned an error. func callEcho() (int, int) { - total := httpListeners + tcpListeners + total := httpListeners + scopedHTTPListeners + tcpListeners ok, failed := 0, 0 ch := make(chan error, total) @@ -297,7 +308,7 @@ func callEcho() (int, int) { client := http.Client{ Timeout: 100 * time.Millisecond, Transport: &http.Transport{ - TLSClientConfig: &cryptotls.Config{InsecureSkipVerify: true}, + TLSClientConfig: &cryptotls.Config{InsecureSkipVerify: true}, // nolint:gosec }, } proto := "http" @@ -309,9 +320,13 @@ func callEcho() (int, int) { ch <- err return } - defer req.Body.Close() body, err := ioutil.ReadAll(req.Body) if err != nil { + req.Body.Close() + ch <- err + return + } + if err := req.Body.Close(); err != nil { ch <- err return } @@ -335,25 +350,3 @@ func callEcho() (int, int) { } } } - -type logger struct{} - -func (logger logger) Debugf(format string, args ...interface{}) { - if debug { - log.Printf(format+"\n", args...) - } -} - -func (logger logger) Infof(format string, args ...interface{}) { - if debug { - log.Printf(format+"\n", args...) - } -} - -func (logger logger) Warnf(format string, args ...interface{}) { - log.Printf(format+"\n", args...) -} - -func (logger logger) Errorf(format string, args ...interface{}) { - log.Printf(format+"\n", args...) -} diff --git a/pkg/envoy-control-plane/test/resource/v2/resource.go b/pkg/envoy-control-plane/test/resource/v2/resource.go deleted file mode 100644 index 0e8afcbcf7..0000000000 --- a/pkg/envoy-control-plane/test/resource/v2/resource.go +++ /dev/null @@ -1,399 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package resource creates test xDS resources -package resource - -import ( - "fmt" - "time" - - pstruct "github.com/golang/protobuf/ptypes/struct" - - "github.com/golang/protobuf/ptypes" - - cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - auth "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/auth" - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - endpointv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint" - listenerv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/listener" - routev2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" - als "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v2" - alf "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/accesslog/v2" - hcm "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/http_connection_manager/v2" - tcp "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/tcp_proxy/v2" - runtime "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/wellknown" -) - -const ( - localhost = "127.0.0.1" - - // XdsCluster is the cluster name for the control server (used by non-ADS set-up) - XdsCluster = "xds_cluster" - - // Ads mode for resources: one aggregated xDS service - Ads = "ads" - - // Xds mode for resources: individual xDS services - Xds = "xds" - - // Rest mode for resources: polling using Fetch - Rest = "rest" -) - -var ( - // RefreshDelay for the polling config source - RefreshDelay = 500 * time.Millisecond -) - -// MakeEndpoint creates a localhost endpoint on a given port. -func MakeEndpoint(clusterName string, port uint32) *endpoint.ClusterLoadAssignment { - return &endpoint.ClusterLoadAssignment{ - ClusterName: clusterName, - Endpoints: []*endpointv2.LocalityLbEndpoints{{ - LbEndpoints: []*endpointv2.LbEndpoint{{ - HostIdentifier: &endpointv2.LbEndpoint_Endpoint{ - Endpoint: &endpointv2.Endpoint{ - Address: &core.Address{ - Address: &core.Address_SocketAddress{ - SocketAddress: &core.SocketAddress{ - Protocol: core.SocketAddress_TCP, - Address: localhost, - PortSpecifier: &core.SocketAddress_PortValue{ - PortValue: port, - }, - }, - }, - }, - }, - }, - }}, - }}, - } -} - -// MakeCluster creates a cluster using either ADS or EDS. -func MakeCluster(mode string, clusterName string) *cluster.Cluster { - edsSource := configSource(mode) - - connectTimeout := 5 * time.Second - return &cluster.Cluster{ - Name: clusterName, - ConnectTimeout: ptypes.DurationProto(connectTimeout), - ClusterDiscoveryType: &cluster.Cluster_Type{Type: cluster.Cluster_EDS}, - EdsClusterConfig: &cluster.Cluster_EdsClusterConfig{ - EdsConfig: edsSource, - }, - } -} - -// MakeRoute creates an HTTP route that routes to a given cluster. -func MakeRoute(routeName, clusterName string) *route.RouteConfiguration { - return &route.RouteConfiguration{ - Name: routeName, - VirtualHosts: []*routev2.VirtualHost{{ - Name: routeName, - Domains: []string{"*"}, - Routes: []*routev2.Route{{ - Match: &routev2.RouteMatch{ - PathSpecifier: &routev2.RouteMatch_Prefix{ - Prefix: "/", - }, - }, - Action: &routev2.Route_Route{ - Route: &routev2.RouteAction{ - ClusterSpecifier: &routev2.RouteAction_Cluster{ - Cluster: clusterName, - }, - }, - }, - }}, - }}, - } -} - -// data source configuration -func configSource(mode string) *core.ConfigSource { - source := &core.ConfigSource{} - source.ResourceApiVersion = resource.DefaultAPIVersion - switch mode { - case Ads: - source.ConfigSourceSpecifier = &core.ConfigSource_Ads{ - Ads: &core.AggregatedConfigSource{}, - } - case Xds: - source.ConfigSourceSpecifier = &core.ConfigSource_ApiConfigSource{ - ApiConfigSource: &core.ApiConfigSource{ - TransportApiVersion: resource.DefaultAPIVersion, - ApiType: core.ApiConfigSource_GRPC, - SetNodeOnFirstMessageOnly: true, - GrpcServices: []*core.GrpcService{{ - TargetSpecifier: &core.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &core.GrpcService_EnvoyGrpc{ClusterName: XdsCluster}, - }, - }}, - }, - } - case Rest: - source.ConfigSourceSpecifier = &core.ConfigSource_ApiConfigSource{ - ApiConfigSource: &core.ApiConfigSource{ - ApiType: core.ApiConfigSource_REST, - TransportApiVersion: resource.DefaultAPIVersion, - ClusterNames: []string{XdsCluster}, - RefreshDelay: ptypes.DurationProto(RefreshDelay), - }, - } - } - return source -} - -// MakeHTTPListener creates a listener using either ADS or RDS for the route. -func MakeHTTPListener(mode string, listenerName string, port uint32, route string) *listener.Listener { - rdsSource := configSource(mode) - - // access log service configuration - alsConfig := &als.HttpGrpcAccessLogConfig{ - CommonConfig: &als.CommonGrpcAccessLogConfig{ - LogName: "echo", - GrpcService: &core.GrpcService{ - TargetSpecifier: &core.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &core.GrpcService_EnvoyGrpc{ - ClusterName: XdsCluster, - }, - }, - }, - }, - } - alsConfigPbst, err := ptypes.MarshalAny(alsConfig) - if err != nil { - panic(err) - } - - // HTTP filter configuration - manager := &hcm.HttpConnectionManager{ - CodecType: hcm.HttpConnectionManager_AUTO, - StatPrefix: "http", - RouteSpecifier: &hcm.HttpConnectionManager_Rds{ - Rds: &hcm.Rds{ - ConfigSource: rdsSource, - RouteConfigName: route, - }, - }, - HttpFilters: []*hcm.HttpFilter{{ - Name: wellknown.Router, - }}, - AccessLog: []*alf.AccessLog{{ - Name: wellknown.HTTPGRPCAccessLog, - ConfigType: &alf.AccessLog_TypedConfig{ - TypedConfig: alsConfigPbst, - }, - }}, - } - pbst, err := ptypes.MarshalAny(manager) - if err != nil { - panic(err) - } - - return &listener.Listener{ - Name: listenerName, - Address: &core.Address{ - Address: &core.Address_SocketAddress{ - SocketAddress: &core.SocketAddress{ - Protocol: core.SocketAddress_TCP, - Address: localhost, - PortSpecifier: &core.SocketAddress_PortValue{ - PortValue: port, - }, - }, - }, - }, - FilterChains: []*listenerv2.FilterChain{{ - Filters: []*listenerv2.Filter{{ - Name: wellknown.HTTPConnectionManager, - ConfigType: &listenerv2.Filter_TypedConfig{ - TypedConfig: pbst, - }, - }}, - }}, - } -} - -// MakeTCPListener creates a TCP listener for a cluster. -func MakeTCPListener(listenerName string, port uint32, clusterName string) *listener.Listener { - // TCP filter configuration - config := &tcp.TcpProxy{ - StatPrefix: "tcp", - ClusterSpecifier: &tcp.TcpProxy_Cluster{ - Cluster: clusterName, - }, - } - pbst, err := ptypes.MarshalAny(config) - if err != nil { - panic(err) - } - return &listener.Listener{ - Name: listenerName, - Address: &core.Address{ - Address: &core.Address_SocketAddress{ - SocketAddress: &core.SocketAddress{ - Protocol: core.SocketAddress_TCP, - Address: localhost, - PortSpecifier: &core.SocketAddress_PortValue{ - PortValue: port, - }, - }, - }, - }, - FilterChains: []*listenerv2.FilterChain{{ - Filters: []*listenerv2.Filter{{ - Name: wellknown.TCPProxy, - ConfigType: &listenerv2.Filter_TypedConfig{ - TypedConfig: pbst, - }, - }}, - }}, - } -} - -// MakeRuntime creates an RTDS layer with some fields. -func MakeRuntime(runtimeName string) *runtime.Runtime { - return &runtime.Runtime{ - Name: runtimeName, - Layer: &pstruct.Struct{ - Fields: map[string]*pstruct.Value{ - "field-0": { - Kind: &pstruct.Value_NumberValue{NumberValue: 100}, - }, - "field-1": { - Kind: &pstruct.Value_StringValue{StringValue: "foobar"}, - }, - }, - }, - } -} - -// TestSnapshot holds parameters for a synthetic snapshot. -type TestSnapshot struct { - // Xds indicates snapshot mode: ads, xds, or rest - Xds string - // Version for the snapshot. - Version string - // UpstreamPort for the single endpoint on the localhost. - UpstreamPort uint32 - // BasePort is the initial port for the listeners. - BasePort uint32 - // NumClusters is the total number of clusters to generate. - NumClusters int - // NumHTTPListeners is the total number of HTTP listeners to generate. - NumHTTPListeners int - // NumTCPListeners is the total number of TCP listeners to generate. - // Listeners are assigned clusters in a round-robin fashion. - NumTCPListeners int - // NumRuntimes is the total number of RTDS layers to generate. - NumRuntimes int - // TLS enables SDS-enabled TLS mode on all listeners - TLS bool -} - -// Generate produces a snapshot from the parameters. -func (ts TestSnapshot) Generate() cache.Snapshot { - clusters := make([]types.Resource, ts.NumClusters) - endpoints := make([]types.Resource, ts.NumClusters) - for i := 0; i < ts.NumClusters; i++ { - name := fmt.Sprintf("cluster-%s-%d", ts.Version, i) - clusters[i] = MakeCluster(ts.Xds, name) - endpoints[i] = MakeEndpoint(name, ts.UpstreamPort) - } - - routes := make([]types.Resource, ts.NumHTTPListeners) - for i := 0; i < ts.NumHTTPListeners; i++ { - name := fmt.Sprintf("route-%s-%d", ts.Version, i) - routes[i] = MakeRoute(name, cache.GetResourceName(clusters[i%ts.NumClusters])) - } - - total := ts.NumHTTPListeners + ts.NumTCPListeners - listeners := make([]types.Resource, total) - for i := 0; i < total; i++ { - port := ts.BasePort + uint32(i) - // listener name must be same since ports are shared and previous listener is drained - name := fmt.Sprintf("listener-%d", port) - var listener *listener.Listener - if i < ts.NumHTTPListeners { - listener = MakeHTTPListener(ts.Xds, name, port, cache.GetResourceName(routes[i])) - } else { - listener = MakeTCPListener(name, port, cache.GetResourceName(clusters[i%ts.NumClusters])) - } - - if ts.TLS { - for i, chain := range listener.FilterChains { - tlsc := &auth.DownstreamTlsContext{ - CommonTlsContext: &auth.CommonTlsContext{ - TlsCertificateSdsSecretConfigs: []*auth.SdsSecretConfig{{ - Name: tlsName, - SdsConfig: configSource(ts.Xds), - }}, - ValidationContextType: &auth.CommonTlsContext_ValidationContextSdsSecretConfig{ - ValidationContextSdsSecretConfig: &auth.SdsSecretConfig{ - Name: rootName, - SdsConfig: configSource(ts.Xds), - }, - }, - }, - } - mt, _ := ptypes.MarshalAny(tlsc) - chain.TransportSocket = &core.TransportSocket{ - Name: "envoy.transport_sockets.tls", - ConfigType: &core.TransportSocket_TypedConfig{ - TypedConfig: mt, - }, - } - listener.FilterChains[i] = chain - } - } - - listeners[i] = listener - } - - runtimes := make([]types.Resource, ts.NumRuntimes) - for i := 0; i < ts.NumRuntimes; i++ { - name := fmt.Sprintf("runtime-%d", i) - runtimes[i] = MakeRuntime(name) - } - - var secrets []types.Resource - if ts.TLS { - for _, s := range MakeSecrets(tlsName, rootName) { - secrets = append(secrets, s) - } - } - - out := cache.NewSnapshot( - ts.Version, - endpoints, - clusters, - routes, - listeners, - runtimes, - secrets, - ) - - return out -} diff --git a/pkg/envoy-control-plane/test/resource/v2/secret.go b/pkg/envoy-control-plane/test/resource/v2/secret.go deleted file mode 100644 index 324a7a689c..0000000000 --- a/pkg/envoy-control-plane/test/resource/v2/secret.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2019 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package resource - -import ( - auth "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/auth" - core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" -) - -const ( - tlsName = "tlssecret" - - rootName = "rootsecret" - - privateKey = `-----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAsU265Ev3yVUAGds4qorN/QH0acOPO/gO7diGcfZ7QSQvjBUn -TGO00EquFyqU9ameU0X1YPUWMsATE7HEQZFV7dtiQdN7OATNMIWgAH4Rhl6zLbc0 -sh2MpxJQqakE6klZo5ZDRuXm11o8tdM9+kj2m9SlwtrflXd+jQ1afvsgvUP1FsA5 -rZfOk0+WBzWymJDEsSZELQVh6LM94Y/0x55vj0dx+jtweGpsBAbLwS9SWqk1ynKr -6K7ZYiUnfM1jTqIF4NTwfe79lfttXZZHLBjtm2UZQZWz4R1VRQP/yoFVWXUMydhg -fUsnBYoWBCPgLRDGdf6+/NmIcMOUdhAFQmd5YQIDAQABAoIBAD3bMGiVWE0VKoPa -x1o4MsUh+XMslrwFPrAb6ku4Aignx67Hcn5kCqDgbPwIDw/lrSbAMWsyFhx+hilI -y39UhPYGo7DzZvmUM0HKXJfPY63NPBWm5Ot/A6MF8L5ACUbzcCJyOeZyLqbTBHsq -x2SaL+8NsQbZ9Ubf+XacQgYq9rEQf4ZnbVBiM7Wx1qQikApkbA6Ik7d8f4ojSdgq -jbo+0JB51gspCfks0udi23WHaxW8vZO5EI+IWsiVk8Xd+TOotluvwgEjMN8ymJui -Z/Xcu45RAMgrW4jRuO8ePiIvTIvAiTTktz6pCVXiQhd3iX+GL3eL1ZbbYQnAY1/S -dENtpwECgYEAylK4je4Yf58xygkfaqGCjv99sNXGQ2GLvZQFUUen1fbWRCZN1Hot -wYXsF0M+J15ErwORAb8/E7roWcRHYJa8SjGNCBSyunCTH8LDVasKoICvdLiGfCI5 -7oweQRKUOBN9yxD3rcIIH+8TzNOoeZA5g0Wk/vzszWINTbOXnTRX30UCgYEA4Fe/ -bu4Uq6m1ZUZb7BjdOwkHrVD5WknayDECEDAaTuZBGEY71rpxjttgALbg29XJ4tpV -hjyBZF3IlBYyifSbRnlKFV3kGY604+2lOIhZKx86Crmmu+io+t3mfgq4daXXfgie -/qbWBGmin/dn3PMDhdtPCIYYLMIFfcFUiA5l1W0CgYEAnfOOmV90SM4jtLMCj+Cf -aLwViGSccCZLTimtLRNf+C7IgFPXFzZ7WkYPVunsMBfsTyXdoxuHRwP4OXx+rO2A -+ftNOy3NirgwY+9NSChMF5nfYKReebLOv2kshWjXxh+RaWNJuaFtbmDbeGEVejIa -dF1+voL+7CjMcgjvKI+gunECgYAPqTB87vPUc/lsw3ehSK8Q8vVtPOzbR7KVLQ6m -0KTVgy9iIW0F9Wf+AAR4qEuULR11z6YOw+SIfB+HbvFCPigkyEzKpw5IVnT8QFe7 -VZFb+EcV/pXMIlbBhIIVpGvyEoyziKiIwF7KWhF3N08x1mkVjBS9VJcVcMnvWHKt -OMwVFQKBgDJQ5OmU6JtN+FZb4sh6vJ1zaqr8TQ5axF+0C9p7HEgnrsbLel78H0iQ -W4TS0TMSQ8pTybUXb+u9nTh4/dfuf7vJtS2N31/68XQO1sHC/hxZg8ow2Yeq//5p -Jt/f/Fu1KusLb/sM9FurtVKuVhu2qeAFQXat0uKop76fZV56XVrh ------END RSA PRIVATE KEY-----` - - privateChain = `-----BEGIN CERTIFICATE----- -MIIDWzCCAkOgAwIBAgIQcojbQweHMt1XQLs8eIpyqTANBgkqhkiG9w0BAQsFADBF -MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMB4XDTE4MDgwOTIzMDg0MloXDTE5MDgwOTIz -MDg0MlowEzERMA8GA1UEChMISnVqdSBvcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQCxTbrkS/fJVQAZ2ziqis39AfRpw487+A7t2IZx9ntBJC+MFSdM -Y7TQSq4XKpT1qZ5TRfVg9RYywBMTscRBkVXt22JB03s4BM0whaAAfhGGXrMttzSy -HYynElCpqQTqSVmjlkNG5ebXWjy10z36SPab1KXC2t+Vd36NDVp++yC9Q/UWwDmt -l86TT5YHNbKYkMSxJkQtBWHosz3hj/THnm+PR3H6O3B4amwEBsvBL1JaqTXKcqvo -rtliJSd8zWNOogXg1PB97v2V+21dlkcsGO2bZRlBlbPhHVVFA//KgVVZdQzJ2GB9 -SycFihYEI+AtEMZ1/r782Yhww5R2EAVCZ3lhAgMBAAGjeTB3MA4GA1UdDwEB/wQE -AwIFoDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFCudfB/DxIfxp92elExpHJfN -eMliMDYGA1UdEQQvMC2GK3NwaWZmZTovL2NsdXN0ZXIubG9jYWwvbnMvZGVmYXVs -dC9zYS9zZXJ2ZXIwDQYJKoZIhvcNAQELBQADggEBAKQuLmnWXotaiA8SiV7QYWWw -aAHnlNS/HgvUmgNYort+IlhCb0a4098ncmnP0fyyuQloElEWKE/00/d9eLiocWHt -tKhftYQ6Z9DY5nNerbb3uv8fKrV91z5paFiHfXotw2e1zmtjP3Guve9agmKjhote -gcgPQ2MIfvmFDD7lGrkstDhubUwXXh4nE9bqTl6W2Jl/PIs6e/bvZtaUM/yySFbB -upmaQWrVXaWsAf5xI3PVtCQqCGOesI6YgDt3/SkiSMPsFb6dC5GKq/dVLGHw26Tw -jA25kE/wpOv0TvEAtEJ1V3GiDAODHwEt2m+IA58lZJcuj5GCqyHcKVW8KV8VVFc= ------END CERTIFICATE-----` - - rootCert = `-----BEGIN CERTIFICATE----- -MIIDXTCCAkWgAwIBAgIJAOtgaSEVTdk7MA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwHhcNMTgwODA5MjMwODI3WhcNMjMwODA4MjMwODI3WjBF -MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAq0+Cg1WgcmC0X7Zcw75V/FZ9zJVhZinSAozxF5g8ci/QkGt0u1hI2lFg -UYNHnWi8bhxcIHpK56WkY1D/2lFmXc32YxlFhAy+Ox1FTIqOW/VnvteUnUoe8GUw -ADBEgtcZGUrAEKO8l8mjGyIpWbUI+G7tizB+9bx2dPuVXuzP/6ZZv5i1wmWhC/vp -CgV8VaJ0qAjUAnQ25Q9GETHqYxUDOq1f7LrSCX16yhfXsqXhKtNxF370VcvZWjTM -sQPn588QvSOdLYuYYnYz+TK4ixmCvoQtnzcmnhYSt3ae7YQW8vyD5huLtXl6jiU5 -KKGm2cLdfpY2KEQKLpJQLum1TscGkQIDAQABo1AwTjAdBgNVHQ4EFgQUK518H8PE -h/Gn3Z6UTGkcl814yWIwHwYDVR0jBBgwFoAUK518H8PEh/Gn3Z6UTGkcl814yWIw -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAZ+x0ppSUYQUw6FCVFjkp -C99bX5O/jxRXoPCmsqh+NoOjvni65IKR7ilxDXLcrXaSNovopWDo4Fz7fQaR9xwk -0fIgu+JNdq72LmHlrCtjlD0Es08R+KUHWgpbHxaKq77+Ie/9w+pY3uDQz0dMy/yN -yw3pH4By0lYwKt4QzRtA9btCiLYivReV9b+3P2P5IR+BLtLXt4j8LvstoJYhagUn -L1qakOGqxFLL0P3CuulGACAH0jRRIhrREKnj3rVFGtdl4APafBn9XnJwzlwwj/GU -y5E2qAmEqYO6m1rVPeeE0kjP5rIOEH5qQKpxtJ2/gAqc0OOmbFrnbfOWGUNkWn7X -yA== ------END CERTIFICATE-----` -) - -// MakeSecrets generates an SDS secret -func MakeSecrets(tlsName, rootName string) []*auth.Secret { - return []*auth.Secret{ - { - Name: tlsName, - Type: &auth.Secret_TlsCertificate{ - TlsCertificate: &auth.TlsCertificate{ - PrivateKey: &core.DataSource{ - Specifier: &core.DataSource_InlineBytes{InlineBytes: []byte(privateKey)}, - }, - CertificateChain: &core.DataSource{ - Specifier: &core.DataSource_InlineBytes{InlineBytes: []byte(privateChain)}, - }, - }, - }, - }, - { - Name: rootName, - Type: &auth.Secret_ValidationContext{ - ValidationContext: &auth.CertificateValidationContext{ - TrustedCa: &core.DataSource{ - Specifier: &core.DataSource_InlineBytes{InlineBytes: []byte(rootCert)}, - }, - }, - }, - }, - } -} diff --git a/pkg/envoy-control-plane/test/resource/v3/resource.go b/pkg/envoy-control-plane/test/resource/v3/resource.go index 6fdd7a1974..7c34173fb8 100644 --- a/pkg/envoy-control-plane/test/resource/v3/resource.go +++ b/pkg/envoy-control-plane/test/resource/v3/resource.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,19 +19,16 @@ import ( "fmt" "time" - pstruct "github.com/golang/protobuf/ptypes/struct" - - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/structpb" alf "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/accesslog/v3" cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" - endpointv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" - listenerv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" - routev2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" als "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/access_loggers/grpc/v3" hcm "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3" tcp "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/network/tcp_proxy/v3" @@ -47,21 +43,30 @@ import ( const ( localhost = "127.0.0.1" - // XdsCluster is the cluster name for the control server (used by non-ADS set-up) + // XdsCluster is the cluster name for the control server (used by non-ADS set-up). XdsCluster = "xds_cluster" + // AlsCluster is the clustername for gRPC access log service (ALS) + AlsCluster = "als_cluster" + // Ads mode for resources: one aggregated xDS service Ads = "ads" - // Xds mode for resources: individual xDS services + // Xds mode for resources: individual xDS services. Xds = "xds" - // Rest mode for resources: polling using Fetch + // Rest mode for resources: polling using Fetch. Rest = "rest" + + // Delta mode for resources: individual delta xDS services. + Delta = "delta" + + // Delta Ads mode for resource: one aggregated delta xDS service. + DeltaAds = "delta-ads" ) var ( - // RefreshDelay for the polling config source + // RefreshDelay for the polling config source. RefreshDelay = 500 * time.Millisecond ) @@ -69,10 +74,10 @@ var ( func MakeEndpoint(clusterName string, port uint32) *endpoint.ClusterLoadAssignment { return &endpoint.ClusterLoadAssignment{ ClusterName: clusterName, - Endpoints: []*endpointv2.LocalityLbEndpoints{{ - LbEndpoints: []*endpointv2.LbEndpoint{{ - HostIdentifier: &endpointv2.LbEndpoint_Endpoint{ - Endpoint: &endpointv2.Endpoint{ + Endpoints: []*endpoint.LocalityLbEndpoints{{ + LbEndpoints: []*endpoint.LbEndpoint{{ + HostIdentifier: &endpoint.LbEndpoint_Endpoint{ + Endpoint: &endpoint.Endpoint{ Address: &core.Address{ Address: &core.Address_SocketAddress{ SocketAddress: &core.SocketAddress{ @@ -98,7 +103,7 @@ func MakeCluster(mode string, clusterName string) *cluster.Cluster { connectTimeout := 5 * time.Second return &cluster.Cluster{ Name: clusterName, - ConnectTimeout: ptypes.DurationProto(connectTimeout), + ConnectTimeout: durationpb.New(connectTimeout), ClusterDiscoveryType: &cluster.Cluster_Type{Type: cluster.Cluster_EDS}, EdsClusterConfig: &cluster.Cluster_EdsClusterConfig{ EdsConfig: edsSource, @@ -110,18 +115,18 @@ func MakeCluster(mode string, clusterName string) *cluster.Cluster { func MakeRoute(routeName, clusterName string) *route.RouteConfiguration { return &route.RouteConfiguration{ Name: routeName, - VirtualHosts: []*routev2.VirtualHost{{ + VirtualHosts: []*route.VirtualHost{{ Name: routeName, Domains: []string{"*"}, - Routes: []*routev2.Route{{ - Match: &routev2.RouteMatch{ - PathSpecifier: &routev2.RouteMatch_Prefix{ + Routes: []*route.Route{{ + Match: &route.RouteMatch{ + PathSpecifier: &route.RouteMatch_Prefix{ Prefix: "/", }, }, - Action: &routev2.Route_Route{ - Route: &routev2.RouteAction{ - ClusterSpecifier: &routev2.RouteAction_Cluster{ + Action: &route.Route_Route{ + Route: &route.RouteAction{ + ClusterSpecifier: &route.RouteAction_Cluster{ Cluster: clusterName, }, }, @@ -131,6 +136,27 @@ func MakeRoute(routeName, clusterName string) *route.RouteConfiguration { } } +// MakeScopedRoute creates an HTTP scoped route that routes to a given cluster. +func MakeScopedRoute(scopedRouteName string, routeConfigurationName string, keyFragments []string) *route.ScopedRouteConfiguration { + k := &route.ScopedRouteConfiguration_Key{} + + for _, key := range keyFragments { + fragment := &route.ScopedRouteConfiguration_Key_Fragment{ + Type: &route.ScopedRouteConfiguration_Key_Fragment_StringKey{ + StringKey: key, + }, + } + k.Fragments = append(k.Fragments, fragment) + } + + return &route.ScopedRouteConfiguration{ + OnDemand: false, + Name: scopedRouteName, + RouteConfigurationName: routeConfigurationName, + Key: k, + } +} + // data source configuration func configSource(mode string) *core.ConfigSource { source := &core.ConfigSource{} @@ -140,6 +166,10 @@ func configSource(mode string) *core.ConfigSource { source.ConfigSourceSpecifier = &core.ConfigSource_Ads{ Ads: &core.AggregatedConfigSource{}, } + case DeltaAds: + source.ConfigSourceSpecifier = &core.ConfigSource_Ads{ + Ads: &core.AggregatedConfigSource{}, + } case Xds: source.ConfigSourceSpecifier = &core.ConfigSource_ApiConfigSource{ ApiConfigSource: &core.ApiConfigSource{ @@ -159,45 +189,50 @@ func configSource(mode string) *core.ConfigSource { ApiType: core.ApiConfigSource_REST, TransportApiVersion: resource.DefaultAPIVersion, ClusterNames: []string{XdsCluster}, - RefreshDelay: ptypes.DurationProto(RefreshDelay), + RefreshDelay: durationpb.New(RefreshDelay), + }, + } + case Delta: + source.ConfigSourceSpecifier = &core.ConfigSource_ApiConfigSource{ + ApiConfigSource: &core.ApiConfigSource{ + TransportApiVersion: resource.DefaultAPIVersion, + ApiType: core.ApiConfigSource_DELTA_GRPC, + SetNodeOnFirstMessageOnly: true, + GrpcServices: []*core.GrpcService{{ + TargetSpecifier: &core.GrpcService_EnvoyGrpc_{ + EnvoyGrpc: &core.GrpcService_EnvoyGrpc{ClusterName: XdsCluster}, + }, + }}, }, } } return source } -// MakeHTTPListener creates a listener using either ADS or RDS for the route. -func MakeHTTPListener(mode string, listenerName string, port uint32, route string) *listener.Listener { - rdsSource := configSource(mode) - - // access log service configuration +func buildHTTPConnectionManager() *hcm.HttpConnectionManager { + // access log service configuration. alsConfig := &als.HttpGrpcAccessLogConfig{ CommonConfig: &als.CommonGrpcAccessLogConfig{ - LogName: "echo", + LogName: "echo", + TransportApiVersion: resource.DefaultAPIVersion, GrpcService: &core.GrpcService{ TargetSpecifier: &core.GrpcService_EnvoyGrpc_{ EnvoyGrpc: &core.GrpcService_EnvoyGrpc{ - ClusterName: XdsCluster, + ClusterName: AlsCluster, }, }, }, }, } - alsConfigPbst, err := ptypes.MarshalAny(alsConfig) + alsConfigPbst, err := anypb.New(alsConfig) if err != nil { panic(err) } - // HTTP filter configuration + // HTTP filter configuration. manager := &hcm.HttpConnectionManager{ CodecType: hcm.HttpConnectionManager_AUTO, StatPrefix: "http", - RouteSpecifier: &hcm.HttpConnectionManager_Rds{ - Rds: &hcm.Rds{ - ConfigSource: rdsSource, - RouteConfigName: route, - }, - }, HttpFilters: []*hcm.HttpFilter{{ Name: wellknown.Router, }}, @@ -208,11 +243,11 @@ func MakeHTTPListener(mode string, listenerName string, port uint32, route strin }, }}, } - pbst, err := ptypes.MarshalAny(manager) - if err != nil { - panic(err) - } + return manager +} + +func makeListener(listenerName string, port uint32, filterChains []*listener.FilterChain) *listener.Listener { return &listener.Listener{ Name: listenerName, Address: &core.Address{ @@ -226,18 +261,97 @@ func MakeHTTPListener(mode string, listenerName string, port uint32, route strin }, }, }, - FilterChains: []*listenerv2.FilterChain{{ - Filters: []*listenerv2.Filter{{ - Name: wellknown.HTTPConnectionManager, - ConfigType: &listenerv2.Filter_TypedConfig{ - TypedConfig: pbst, + FilterChains: filterChains, + } +} + +func MakeRouteHTTPListener(mode string, listenerName string, port uint32, route string) *listener.Listener { + rdsSource := configSource(mode) + routeSpecifier := &hcm.HttpConnectionManager_Rds{ + Rds: &hcm.Rds{ + ConfigSource: rdsSource, + RouteConfigName: route, + }, + } + + manager := buildHTTPConnectionManager() + manager.RouteSpecifier = routeSpecifier + + pbst, err := anypb.New(manager) + if err != nil { + panic(err) + } + + filterChains := []*listener.FilterChain{ + { + Filters: []*listener.Filter{ + { + Name: wellknown.HTTPConnectionManager, + ConfigType: &listener.Filter_TypedConfig{ + TypedConfig: pbst, + }, }, - }}, - }}, + }, + }, + } + + return makeListener(listenerName, port, filterChains) +} + +// Creates a HTTP listener using Scoped Routes, which extracts the "Host" header field as the key. +func MakeScopedRouteHTTPListener(mode string, listenerName string, port uint32, scopedRouteConfigName string) *listener.Listener { + source := configSource(mode) + routeSpecifier := &hcm.HttpConnectionManager_ScopedRoutes{ + ScopedRoutes: &hcm.ScopedRoutes{ + Name: scopedRouteConfigName, + ScopeKeyBuilder: &hcm.ScopedRoutes_ScopeKeyBuilder{ + Fragments: []*hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder{ + { + Type: &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_{ + HeaderValueExtractor: &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor{ + Name: "Host", + ExtractType: &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index{ + Index: 0, + }, + }, + }, + }, + }, + }, + RdsConfigSource: source, + ConfigSpecifier: &hcm.ScopedRoutes_ScopedRds{ + ScopedRds: &hcm.ScopedRds{ + ScopedRdsConfigSource: source, + }, + }, + }, + } + + manager := buildHTTPConnectionManager() + manager.RouteSpecifier = routeSpecifier + + pbst, err := anypb.New(manager) + if err != nil { + panic(err) + } + + filterChains := []*listener.FilterChain{ + { + Filters: []*listener.Filter{ + { + Name: wellknown.HTTPConnectionManager, + ConfigType: &listener.Filter_TypedConfig{ + TypedConfig: pbst, + }, + }, + }, + }, } + + return makeListener(listenerName, port, filterChains) } -// MakeTCPListener creates a TCP listener for a cluster. +// Creates a TCP listener HTTP manager. func MakeTCPListener(listenerName string, port uint32, clusterName string) *listener.Listener { // TCP filter configuration config := &tcp.TcpProxy{ @@ -246,54 +360,76 @@ func MakeTCPListener(listenerName string, port uint32, clusterName string) *list Cluster: clusterName, }, } - pbst, err := ptypes.MarshalAny(config) + pbst, err := anypb.New(config) if err != nil { panic(err) } - return &listener.Listener{ - Name: listenerName, - Address: &core.Address{ - Address: &core.Address_SocketAddress{ - SocketAddress: &core.SocketAddress{ - Protocol: core.SocketAddress_TCP, - Address: localhost, - PortSpecifier: &core.SocketAddress_PortValue{ - PortValue: port, + + filterChains := []*listener.FilterChain{ + { + Filters: []*listener.Filter{ + { + Name: wellknown.TCPProxy, + ConfigType: &listener.Filter_TypedConfig{ + TypedConfig: pbst, }, }, }, }, - FilterChains: []*listenerv2.FilterChain{{ - Filters: []*listenerv2.Filter{{ - Name: wellknown.TCPProxy, - ConfigType: &listenerv2.Filter_TypedConfig{ - TypedConfig: pbst, - }, - }}, - }}, } + + return makeListener(listenerName, port, filterChains) } // MakeRuntime creates an RTDS layer with some fields. func MakeRuntime(runtimeName string) *runtime.Runtime { return &runtime.Runtime{ Name: runtimeName, - Layer: &pstruct.Struct{ - Fields: map[string]*pstruct.Value{ + Layer: &structpb.Struct{ + Fields: map[string]*structpb.Value{ "field-0": { - Kind: &pstruct.Value_NumberValue{NumberValue: 100}, + Kind: &structpb.Value_NumberValue{NumberValue: 100}, }, "field-1": { - Kind: &pstruct.Value_StringValue{StringValue: "foobar"}, + Kind: &structpb.Value_StringValue{StringValue: "foobar"}, }, }, }, } } +// MakeExtensionConfig creates a extension config for a cluster. +func MakeExtensionConfig(mode string, extensionConfigName string, route string) *core.TypedExtensionConfig { + rdsSource := configSource(mode) + + // HTTP filter configuration + manager := &hcm.HttpConnectionManager{ + CodecType: hcm.HttpConnectionManager_AUTO, + StatPrefix: "http", + RouteSpecifier: &hcm.HttpConnectionManager_Rds{ + Rds: &hcm.Rds{ + ConfigSource: rdsSource, + RouteConfigName: route, + }, + }, + HttpFilters: []*hcm.HttpFilter{{ + Name: wellknown.Router, + }}, + } + pbst, err := anypb.New(manager) + if err != nil { + panic(err) + } + + return &core.TypedExtensionConfig{ + Name: extensionConfigName, + TypedConfig: pbst, + } +} + // TestSnapshot holds parameters for a synthetic snapshot. type TestSnapshot struct { - // Xds indicates snapshot mode: ads, xds, or rest + // Xds indicates snapshot mode: ads, xds, rest, or delta Xds string // Version for the snapshot. Version string @@ -305,6 +441,8 @@ type TestSnapshot struct { NumClusters int // NumHTTPListeners is the total number of HTTP listeners to generate. NumHTTPListeners int + // NumScopedHTTPListeners is the total number of scoped route HTTP listeners to generate. + NumScopedHTTPListeners int // NumTCPListeners is the total number of TCP listeners to generate. // Listeners are assigned clusters in a round-robin fashion. NumTCPListeners int @@ -312,6 +450,8 @@ type TestSnapshot struct { NumRuntimes int // TLS enables SDS-enabled TLS mode on all listeners TLS bool + // NumExtension is the total number of Extension Config + NumExtension int } // Generate produces a snapshot from the parameters. @@ -324,23 +464,44 @@ func (ts TestSnapshot) Generate() cache.Snapshot { endpoints[i] = MakeEndpoint(name, ts.UpstreamPort) } - routes := make([]types.Resource, ts.NumHTTPListeners) - for i := 0; i < ts.NumHTTPListeners; i++ { - name := fmt.Sprintf("route-%s-%d", ts.Version, i) - routes[i] = MakeRoute(name, cache.GetResourceName(clusters[i%ts.NumClusters])) + totalHTTPListeners := ts.NumHTTPListeners + ts.NumScopedHTTPListeners + routes := make([]types.Resource, totalHTTPListeners) + scopedRoutes := make([]types.Resource, ts.NumScopedHTTPListeners) + + for i := 0; i < totalHTTPListeners; i++ { + suffix := fmt.Sprintf("%s-%d", ts.Version, i) + routeName := fmt.Sprintf("route-%s", suffix) + routes[i] = MakeRoute(routeName, cache.GetResourceName(clusters[i%ts.NumClusters])) + + // Scoped Routes. + if i >= ts.NumHTTPListeners { + scopedRouteName := fmt.Sprintf("scopedroute-%s", suffix) + port := ts.BasePort + uint32(i) + scopedRoutes[i-ts.NumHTTPListeners] = MakeScopedRoute(scopedRouteName, routeName, []string{fmt.Sprintf("127.0.0.1:%d", port)}) + } } - total := ts.NumHTTPListeners + ts.NumTCPListeners + numHTTPListeners := ts.NumHTTPListeners + numScopedHTTPListeners := ts.NumScopedHTTPListeners + numTCPListeners := ts.NumTCPListeners + total := numHTTPListeners + numScopedHTTPListeners + numTCPListeners + listeners := make([]types.Resource, total) for i := 0; i < total; i++ { port := ts.BasePort + uint32(i) // listener name must be same since ports are shared and previous listener is drained name := fmt.Sprintf("listener-%d", port) var listener *listener.Listener - if i < ts.NumHTTPListeners { - listener = MakeHTTPListener(ts.Xds, name, port, cache.GetResourceName(routes[i])) - } else { + + if numHTTPListeners > 0 { + listener = MakeRouteHTTPListener(ts.Xds, name, port, cache.GetResourceName(routes[i])) + numHTTPListeners-- + } else if numScopedHTTPListeners > 0 { + listener = MakeScopedRouteHTTPListener(ts.Xds, name, port, cache.GetResourceName(scopedRoutes[numScopedHTTPListeners-1])) + numScopedHTTPListeners-- + } else if numTCPListeners > 0 { listener = MakeTCPListener(name, port, cache.GetResourceName(clusters[i%ts.NumClusters])) + numTCPListeners-- } if ts.TLS { @@ -359,7 +520,7 @@ func (ts TestSnapshot) Generate() cache.Snapshot { }, }, } - mt, _ := ptypes.MarshalAny(tlsc) + mt, _ := anypb.New(tlsc) chain.TransportSocket = &core.TransportSocket{ Name: "envoy.transport_sockets.tls", ConfigType: &core.TransportSocket_TypedConfig{ @@ -386,15 +547,23 @@ func (ts TestSnapshot) Generate() cache.Snapshot { } } - out := cache.NewSnapshot( - ts.Version, - endpoints, - clusters, - routes, - listeners, - runtimes, - secrets, - ) + extensions := make([]types.Resource, ts.NumExtension) + for i := 0; i < ts.NumExtension; i++ { + routeName := fmt.Sprintf("route-%s-%d", ts.Version, i) + extensionConfigName := fmt.Sprintf("extensionConfig-%d", i) + extensions[i] = MakeExtensionConfig(Ads, extensionConfigName, routeName) + } + + out, _ := cache.NewSnapshot(ts.Version, map[resource.Type][]types.Resource{ + resource.EndpointType: endpoints, + resource.ClusterType: clusters, + resource.RouteType: routes, + resource.ScopedRouteType: scopedRoutes, + resource.ListenerType: listeners, + resource.RuntimeType: runtimes, + resource.SecretType: secrets, + resource.ExtensionConfigType: extensions, + }) return out } diff --git a/pkg/envoy-control-plane/test/resource/v3/secret.go b/pkg/envoy-control-plane/test/resource/v3/secret.go index 341ce3bd9e..73865ed40c 100644 --- a/pkg/envoy-control-plane/test/resource/v3/secret.go +++ b/pkg/envoy-control-plane/test/resource/v3/secret.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2019 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/envoy-control-plane/test/server.go b/pkg/envoy-control-plane/test/server.go index f0a8429013..f70e814bb8 100644 --- a/pkg/envoy-control-plane/test/server.go +++ b/pkg/envoy-control-plane/test/server.go @@ -7,17 +7,21 @@ import ( "log" "net" "net/http" + "time" - serverv2 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v2" - serverv3 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" - testv2 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/v2" - testv3 "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/v3" "google.golang.org/grpc" + "google.golang.org/grpc/keepalive" + + server "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" + "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/test/v3" gcplogger "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" ) const ( + grpcKeepaliveTime = 30 * time.Second + grpcKeepaliveTimeout = 5 * time.Second + grpcKeepaliveMinTime = 30 * time.Second grpcMaxConcurrentStreams = 1000000 ) @@ -27,21 +31,18 @@ type HTTPGateway struct { // Log is an optional log for errors in response write Log gcplogger.Logger - GatewayV2 serverv2.HTTPGateway - - GatewayV3 serverv3.HTTPGateway + Gateway server.HTTPGateway } // RunAccessLogServer starts an accesslog server. -func RunAccessLogServer(ctx context.Context, alsv2 *testv2.AccessLogService, alsv3 *testv3.AccessLogService, alsPort uint) { +func RunAccessLogServer(ctx context.Context, als *test.AccessLogService, alsPort uint) { grpcServer := grpc.NewServer() lis, err := net.Listen("tcp", fmt.Sprintf(":%d", alsPort)) if err != nil { log.Fatal(err) } - testv2.RegisterAccessLogServer(grpcServer, alsv2) - testv3.RegisterAccessLogServer(grpcServer, alsv3) + test.RegisterAccessLogServer(grpcServer, als) log.Printf("access log server listening on %d\n", alsPort) go func() { @@ -55,13 +56,23 @@ func RunAccessLogServer(ctx context.Context, alsv2 *testv2.AccessLogService, als } // RunManagementServer starts an xDS server at the given port. -func RunManagementServer(ctx context.Context, srv2 serverv2.Server, srv3 serverv3.Server, port uint) { +func RunManagementServer(ctx context.Context, srv server.Server, port uint) { // gRPC golang library sets a very small upper bound for the number gRPC/h2 // streams over a single TCP connection. If a proxy multiplexes requests over // a single connection to the management server, then it might lead to - // availability problems. + // availability problems. Keepalive timeouts based on connection_keepalive parameter https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/examples#dynamic var grpcOptions []grpc.ServerOption - grpcOptions = append(grpcOptions, grpc.MaxConcurrentStreams(grpcMaxConcurrentStreams)) + grpcOptions = append(grpcOptions, + grpc.MaxConcurrentStreams(grpcMaxConcurrentStreams), + grpc.KeepaliveParams(keepalive.ServerParameters{ + Time: grpcKeepaliveTime, + Timeout: grpcKeepaliveTimeout, + }), + grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ + MinTime: grpcKeepaliveMinTime, + PermitWithoutStream: true, + }), + ) grpcServer := grpc.NewServer(grpcOptions...) lis, err := net.Listen("tcp", fmt.Sprintf(":%d", port)) @@ -69,8 +80,7 @@ func RunManagementServer(ctx context.Context, srv2 serverv2.Server, srv3 serverv log.Fatal(err) } - testv2.RegisterServer(grpcServer, srv2) - testv3.RegisterServer(grpcServer, srv3) + test.RegisterServer(grpcServer, srv) log.Printf("management server listening on %d\n", port) go func() { @@ -84,32 +94,29 @@ func RunManagementServer(ctx context.Context, srv2 serverv2.Server, srv3 serverv } // RunManagementGateway starts an HTTP gateway to an xDS server. -func RunManagementGateway(ctx context.Context, srv2 serverv2.Server, srv3 serverv3.Server, port uint, lg gcplogger.Logger) { +func RunManagementGateway(ctx context.Context, srv server.Server, port uint) { log.Printf("gateway listening HTTP/1.1 on %d\n", port) server := &http.Server{ Addr: fmt.Sprintf(":%d", port), Handler: &HTTPGateway{ - GatewayV2: serverv2.HTTPGateway{Log: lg, Server: srv2}, - GatewayV3: serverv3.HTTPGateway{Log: lg, Server: srv3}, - Log: lg, + Gateway: server.HTTPGateway{Server: srv}, }, } go func() { if err := server.ListenAndServe(); err != nil { - log.Println(err) + log.Printf("failed to start listening: %s", err) } }() <-ctx.Done() // Cleanup our gateway if we receive a shutdown - server.Shutdown(ctx) + if err := server.Shutdown(ctx); err != nil { + log.Printf("failed to shut down: %s", err) + } } func (h *HTTPGateway) ServeHTTP(resp http.ResponseWriter, req *http.Request) { - bytes, code, err := h.GatewayV2.ServeHTTP(req) - if code == http.StatusNotFound { - bytes, code, err = h.GatewayV3.ServeHTTP(req) - } + bytes, code, err := h.Gateway.ServeHTTP(req) if err != nil { http.Error(resp, err.Error(), code) diff --git a/pkg/envoy-control-plane/test/v2/accesslog.go b/pkg/envoy-control-plane/test/v2/accesslog.go deleted file mode 100644 index c53f10a5c6..0000000000 --- a/pkg/envoy-control-plane/test/v2/accesslog.go +++ /dev/null @@ -1,79 +0,0 @@ -package test - -import ( - "fmt" - "sync" - "time" - - alf "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/data/accesslog/v2" - accessloggrpc "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/accesslog/v2" -) - -// AccessLogService buffers access logs from the remote Envoy nodes. -type AccessLogService struct { - entries []string - mu sync.Mutex -} - -func (svc *AccessLogService) log(entry string) { - svc.mu.Lock() - defer svc.mu.Unlock() - svc.entries = append(svc.entries, entry) -} - -// Dump releases the collected log entries and clears the log entry list. -func (svc *AccessLogService) Dump(f func(string)) { - svc.mu.Lock() - defer svc.mu.Unlock() - for _, entry := range svc.entries { - f(entry) - } - svc.entries = nil -} - -// StreamAccessLogs implements the access log service. -func (svc *AccessLogService) StreamAccessLogs(stream accessloggrpc.AccessLogService_StreamAccessLogsServer) error { - var logName string - for { - msg, err := stream.Recv() - if err != nil { - return nil - } - if msg.Identifier != nil { - logName = msg.Identifier.LogName - } - switch entries := msg.LogEntries.(type) { - case *accessloggrpc.StreamAccessLogsMessage_HttpLogs: - for _, entry := range entries.HttpLogs.LogEntry { - if entry != nil { - common := entry.CommonProperties - req := entry.Request - resp := entry.Response - if common == nil { - common = &alf.AccessLogCommon{} - } - if req == nil { - req = &alf.HTTPRequestProperties{} - } - if resp == nil { - resp = &alf.HTTPResponseProperties{} - } - svc.log(fmt.Sprintf("[%s%s] %s %s %s %d %s %s", - logName, time.Now().Format(time.RFC3339), req.Authority, req.Path, req.Scheme, - resp.ResponseCode.GetValue(), req.RequestId, common.UpstreamCluster)) - } - } - case *accessloggrpc.StreamAccessLogsMessage_TcpLogs: - for _, entry := range entries.TcpLogs.LogEntry { - if entry != nil { - common := entry.CommonProperties - if common == nil { - common = &alf.AccessLogCommon{} - } - svc.log(fmt.Sprintf("[%s%s] tcp %s %s", - logName, time.Now().Format(time.RFC3339), common.UpstreamLocalAddress, common.UpstreamCluster)) - } - } - } - } -} diff --git a/pkg/envoy-control-plane/test/v2/callbacks.go b/pkg/envoy-control-plane/test/v2/callbacks.go deleted file mode 100644 index 6efbdcfd84..0000000000 --- a/pkg/envoy-control-plane/test/v2/callbacks.go +++ /dev/null @@ -1,57 +0,0 @@ -package test - -import ( - "context" - "log" - "sync" - - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" -) - -type Callbacks struct { - Signal chan struct{} - Debug bool - Fetches int - Requests int - mu sync.Mutex -} - -func (cb *Callbacks) Report() { - cb.mu.Lock() - defer cb.mu.Unlock() - log.Printf("server callbacks fetches=%d requests=%d\n", cb.Fetches, cb.Requests) -} -func (cb *Callbacks) OnStreamOpen(_ context.Context, id int64, typ string) error { - if cb.Debug { - log.Printf("stream %d open for %s\n", id, typ) - } - return nil -} -func (cb *Callbacks) OnStreamClosed(id int64) { - if cb.Debug { - log.Printf("stream %d closed\n", id) - } -} -func (cb *Callbacks) OnStreamRequest(int64, *discovery.DiscoveryRequest) error { - cb.mu.Lock() - defer cb.mu.Unlock() - cb.Requests++ - if cb.Signal != nil { - close(cb.Signal) - cb.Signal = nil - } - return nil -} -func (cb *Callbacks) OnStreamResponse(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) { -} -func (cb *Callbacks) OnFetchRequest(_ context.Context, req *discovery.DiscoveryRequest) error { - cb.mu.Lock() - defer cb.mu.Unlock() - cb.Fetches++ - if cb.Signal != nil { - close(cb.Signal) - cb.Signal = nil - } - return nil -} -func (cb *Callbacks) OnFetchResponse(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse) {} diff --git a/pkg/envoy-control-plane/test/v2/register.go b/pkg/envoy-control-plane/test/v2/register.go deleted file mode 100644 index 5032b79439..0000000000 --- a/pkg/envoy-control-plane/test/v2/register.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2018 Envoyproxy Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package test contains test utilities -package test - -import ( - "google.golang.org/grpc" - - clusterservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - endpointservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - listenerservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - routeservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - accessloggrpc "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/accesslog/v2" - discoverygrpc "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - runtimeservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - secretservice "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v2" -) - -// RegisterAccessLogServer starts an accessloggrpc service. -func RegisterAccessLogServer(grpcServer *grpc.Server, als *AccessLogService) { - accessloggrpc.RegisterAccessLogServiceServer(grpcServer, als) -} - -// RegisterServer registers with v2 services. -func RegisterServer(grpcServer *grpc.Server, server server.Server) { - // register services - discoverygrpc.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) - endpointservice.RegisterEndpointDiscoveryServiceServer(grpcServer, server) - clusterservice.RegisterClusterDiscoveryServiceServer(grpcServer, server) - routeservice.RegisterRouteDiscoveryServiceServer(grpcServer, server) - listenerservice.RegisterListenerDiscoveryServiceServer(grpcServer, server) - secretservice.RegisterSecretDiscoveryServiceServer(grpcServer, server) - runtimeservice.RegisterRuntimeDiscoveryServiceServer(grpcServer, server) -} diff --git a/pkg/envoy-control-plane/test/v3/accesslog.go b/pkg/envoy-control-plane/test/v3/accesslog.go index d568d6781f..1db1ad8040 100644 --- a/pkg/envoy-control-plane/test/v3/accesslog.go +++ b/pkg/envoy-control-plane/test/v3/accesslog.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. package test import ( diff --git a/pkg/envoy-control-plane/test/v3/callbacks.go b/pkg/envoy-control-plane/test/v3/callbacks.go index 76cfaa7f8c..d62513b5bf 100644 --- a/pkg/envoy-control-plane/test/v3/callbacks.go +++ b/pkg/envoy-control-plane/test/v3/callbacks.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. package test import ( @@ -10,11 +9,13 @@ import ( ) type Callbacks struct { - Signal chan struct{} - Debug bool - Fetches int - Requests int - mu sync.Mutex + Signal chan struct{} + Debug bool + Fetches int + Requests int + DeltaRequests int + DeltaResponses int + mu sync.Mutex } func (cb *Callbacks) Report() { @@ -33,6 +34,17 @@ func (cb *Callbacks) OnStreamClosed(id int64) { log.Printf("stream %d closed\n", id) } } +func (cb *Callbacks) OnDeltaStreamOpen(_ context.Context, id int64, typ string) error { + if cb.Debug { + log.Printf("delta stream %d open for %s\n", id, typ) + } + return nil +} +func (cb *Callbacks) OnDeltaStreamClosed(id int64) { + if cb.Debug { + log.Printf("delta stream %d closed\n", id) + } +} func (cb *Callbacks) OnStreamRequest(int64, *discovery.DiscoveryRequest) error { cb.mu.Lock() defer cb.mu.Unlock() @@ -43,7 +55,23 @@ func (cb *Callbacks) OnStreamRequest(int64, *discovery.DiscoveryRequest) error { } return nil } -func (cb *Callbacks) OnStreamResponse(int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) { +func (cb *Callbacks) OnStreamResponse(context.Context, int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) { +} +func (cb *Callbacks) OnStreamDeltaResponse(id int64, req *discovery.DeltaDiscoveryRequest, res *discovery.DeltaDiscoveryResponse) { + cb.mu.Lock() + defer cb.mu.Unlock() + cb.DeltaResponses++ +} +func (cb *Callbacks) OnStreamDeltaRequest(id int64, req *discovery.DeltaDiscoveryRequest) error { + cb.mu.Lock() + defer cb.mu.Unlock() + cb.DeltaRequests++ + if cb.Signal != nil { + close(cb.Signal) + cb.Signal = nil + } + + return nil } func (cb *Callbacks) OnFetchRequest(_ context.Context, req *discovery.DiscoveryRequest) error { cb.mu.Lock() diff --git a/pkg/envoy-control-plane/test/v3/register.go b/pkg/envoy-control-plane/test/v3/register.go index 317faeecb2..185a9e7c52 100644 --- a/pkg/envoy-control-plane/test/v3/register.go +++ b/pkg/envoy-control-plane/test/v3/register.go @@ -1,4 +1,3 @@ -// Code generated by create_version. DO NOT EDIT. // Copyright 2018 Envoyproxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -35,13 +34,14 @@ func RegisterAccessLogServer(grpcServer *grpc.Server, als *AccessLogService) { accessloggrpc.RegisterAccessLogServiceServer(grpcServer, als) } -// RegisterServer registers with v2 services. +// RegisterServer registers with v3 services. func RegisterServer(grpcServer *grpc.Server, server server.Server) { // register services discoverygrpc.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) endpointservice.RegisterEndpointDiscoveryServiceServer(grpcServer, server) clusterservice.RegisterClusterDiscoveryServiceServer(grpcServer, server) routeservice.RegisterRouteDiscoveryServiceServer(grpcServer, server) + routeservice.RegisterScopedRoutesDiscoveryServiceServer(grpcServer, server) listenerservice.RegisterListenerDiscoveryServiceServer(grpcServer, server) secretservice.RegisterSecretDiscoveryServiceServer(grpcServer, server) runtimeservice.RegisterRuntimeDiscoveryServiceServer(grpcServer, server) diff --git a/pkg/envoy-control-plane/ttl/v2/ttl.go b/pkg/envoy-control-plane/ttl/v2/ttl.go deleted file mode 100644 index 7da0fac9da..0000000000 --- a/pkg/envoy-control-plane/ttl/v2/ttl.go +++ /dev/null @@ -1,18 +0,0 @@ -package ttl - -import ( - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/golang/protobuf/ptypes/any" -) - -// Helper functions for interacting with TTL resources for xDS V2. Since TTL resources are not supported for V2, these are -// essentially noops. - -func MaybeCreateTtlResourceIfSupported(resource types.ResourceWithTtl, name string, resourceTypeUrl string, heartbeat bool) (types.Resource, string, error) { - return resource.Resource, resourceTypeUrl, nil -} - -func IsTTLResource(resource *any.Any) bool { - // This is just used in test; pretend like all resources have a TTL in V2 for testing purposes. - return true -} diff --git a/pkg/envoy-control-plane/ttl/v3/ttl.go b/pkg/envoy-control-plane/ttl/v3/ttl.go deleted file mode 100644 index ca234d5979..0000000000 --- a/pkg/envoy-control-plane/ttl/v3/ttl.go +++ /dev/null @@ -1,48 +0,0 @@ -package ttl - -import ( - discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" - "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/any" -) - -var deltaResourceTypeURL = "type.googleapis.com/" + proto.MessageName(&discovery.Resource{}) - -// Helper functions for interacting with TTL resources for xDS V3. A resource will be wrapped in a discovery.Resource in order -// to allow specifying a TTL. If the resource is meant to be a heartbeat response, only the resource name and TTL will be set -// to avoid having to send the entire resource down. - -func MaybeCreateTtlResourceIfSupported(resource types.ResourceWithTtl, name string, resourceTypeUrl string, heartbeat bool) (types.Resource, string, error) { - if resource.Ttl != nil { - wrappedResource := &discovery.Resource{ - Name: name, - Ttl: ptypes.DurationProto(*resource.Ttl), - } - - if !heartbeat { - any, err := ptypes.MarshalAny(resource.Resource) - if err != nil { - return nil, "", err - } - any.TypeUrl = resourceTypeUrl - wrappedResource.Resource = any - } - - return wrappedResource, deltaResourceTypeURL, nil - } - - return resource.Resource, resourceTypeUrl, nil -} - -func IsTTLResource(resource *any.Any) bool { - // This is only done in test, so no need to worry about the overhead of the marshalling. - wrappedResource := &discovery.Resource{} - err := ptypes.UnmarshalAny(resource, wrappedResource) - if err != nil { - return false - } - - return wrappedResource.Resource == nil -} diff --git a/pkg/envoy-control-plane/wellknown/wellknown.go b/pkg/envoy-control-plane/wellknown/wellknown.go index 51c021506d..28b4af8d87 100644 --- a/pkg/envoy-control-plane/wellknown/wellknown.go +++ b/pkg/envoy-control-plane/wellknown/wellknown.go @@ -86,9 +86,13 @@ const ( // ProxyProtocol listener filter ProxyProtocol = "envoy.filters.listener.proxy_protocol" // TlsInspector listener filter - TlsInspector = "envoy.filters.listener.tls_inspector" + TlsInspector = "envoy.filters.listener.tls_inspector" // nolint:golint,revive + // TLSInspector listener filter + TLSInspector = "envoy.filters.listener.tls_inspector" // nolint:golint,revive // HttpInspector listener filter - HttpInspector = "envoy.filters.listener.http_inspector" + HttpInspector = "envoy.filters.listener.http_inspector" // nolint:golint,revive + // HTTPInspector listener filter + HTTPInspector = "envoy.filters.listener.http_inspector" ) // Tracing provider names @@ -130,7 +134,9 @@ const ( // TransportSocket RawBuffer TransportSocketRawBuffer = "envoy.transport_sockets.raw_buffer" // TransportSocket Tls - TransportSocketTls = "envoy.transport_sockets.tls" + TransportSocketTls = "envoy.transport_sockets.tls" // nolint:golint,revive + // TransportSocketTLS labels the "envoy.transport_sockets.tls" filter. + TransportSocketTLS = "envoy.transport_sockets.tls" // TransportSocket Quic TransportSocketQuic = "envoy.transport_sockets.quic" ) diff --git a/pkg/envoytest/controller.go b/pkg/envoytest/controller.go index 628bb1534b..5b9f8367c3 100644 --- a/pkg/envoytest/controller.go +++ b/pkg/envoytest/controller.go @@ -10,16 +10,19 @@ import ( "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc" - // envoy api v2 - apiv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - apiv2_core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - apiv2_discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v2" + // envoy api v3 + v3core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/cluster/v3" + v3discovery "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/discovery/v3" + v3endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/endpoint/v3" + v3listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/listener/v3" + v3route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/route/v3" // envoy control plane - ecp_cache_types "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - ecp_v2_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" + ecp_v3_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" ecp_log "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/log" - ecp_v2_server "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v2" + ecp_v3_resource "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" + ecp_v3_server "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/server/v3" // first-party-libraries "github.com/datawire/dlib/dhttp" @@ -32,7 +35,7 @@ import ( type EnvoyController struct { address string - configCache ecp_v2_cache.SnapshotCache + configCache ecp_v3_cache.SnapshotCache cond *sync.Cond // Protects the 'results' and 'outstanding' results map[string]*errorInfo // Maps config version to error info related to that config @@ -68,7 +71,8 @@ func NewEnvoyController(address string) *EnvoyController { results: map[string]*errorInfo{}, outstanding: map[string]ackInfo{}, } - ret.configCache = ecp_v2_cache.NewSnapshotCache( + + ret.configCache = ecp_v3_cache.NewSnapshotCache( true, // ads ecNodeHash{}, // hash ecLogger{ec: ret}, // logger @@ -78,8 +82,8 @@ func NewEnvoyController(address string) *EnvoyController { // Configure will update the envoy configuration and block until the reconfiguration either succeeds // or signals an error. -func (e *EnvoyController) Configure(ctx context.Context, node, version string, snapshot ecp_v2_cache.Snapshot) (*status.Status, error) { - err := e.configCache.SetSnapshot(node, snapshot) +func (e *EnvoyController) Configure(ctx context.Context, node, version string, snapshot ecp_v3_cache.Snapshot) (*status.Status, error) { + err := e.configCache.SetSnapshot(ctx, node, snapshot) if err != nil { return nil, err } @@ -88,17 +92,18 @@ func (e *EnvoyController) Configure(ctx context.Context, node, version string, s // requested in order to figure out how to properly check that the entire snapshot was // acked/nacked. var typeURLs []string - if len(snapshot.Resources[ecp_cache_types.Endpoint].Items) > 0 { - typeURLs = append(typeURLs, "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment") + + if len(snapshot.GetResources(ecp_v3_resource.EndpointType)) > 0 { + typeURLs = append(typeURLs, ecp_v3_resource.EndpointType) } - if len(snapshot.Resources[ecp_cache_types.Cluster].Items) > 0 { - typeURLs = append(typeURLs, "type.googleapis.com/envoy.api.v2.Cluster") + if len(snapshot.GetResources(ecp_v3_resource.ClusterType)) > 0 { + typeURLs = append(typeURLs, ecp_v3_resource.ClusterType) } - if len(snapshot.Resources[ecp_cache_types.Route].Items) > 0 { - typeURLs = append(typeURLs, "type.googleapis.com/envoy.api.v2.RouteConfiguration") + if len(snapshot.GetResources(ecp_v3_resource.RouteType)) > 0 { + typeURLs = append(typeURLs, ecp_v3_resource.RouteType) } - if len(snapshot.Resources[ecp_cache_types.Listener].Items) > 0 { - typeURLs = append(typeURLs, "type.googleapis.com/envoy.api.v2.Listener") + if len(snapshot.GetResources(ecp_v3_resource.ListenerType)) > 0 { + typeURLs = append(typeURLs, ecp_v3_resource.ListenerType) } for _, t := range typeURLs { @@ -174,17 +179,17 @@ func (e *EnvoyController) Run(ctx context.Context) error { // The callbacks don't have access to a context, so we'll capture this one for them to use. e.logCtx = ctx - srv := ecp_v2_server.NewServer(ctx, + srv := ecp_v3_server.NewServer(ctx, e.configCache, // config ecCallbacks{ec: e}, // calbacks ) grpcMux := grpc.NewServer() - apiv2_discovery.RegisterAggregatedDiscoveryServiceServer(grpcMux, srv) - apiv2.RegisterEndpointDiscoveryServiceServer(grpcMux, srv) - apiv2.RegisterClusterDiscoveryServiceServer(grpcMux, srv) - apiv2.RegisterRouteDiscoveryServiceServer(grpcMux, srv) - apiv2.RegisterListenerDiscoveryServiceServer(grpcMux, srv) + v3discovery.RegisterAggregatedDiscoveryServiceServer(grpcMux, srv) + v3endpoint.RegisterEndpointDiscoveryServiceServer(grpcMux, srv) + v3cluster.RegisterClusterDiscoveryServiceServer(grpcMux, srv) + v3route.RegisterRouteDiscoveryServiceServer(grpcMux, srv) + v3listener.RegisterListenerDiscoveryServiceServer(grpcMux, srv) sc := &dhttp.ServerConfig{ Handler: grpcMux, @@ -196,10 +201,10 @@ func (e *EnvoyController) Run(ctx context.Context) error { type ecNodeHash struct{} -var _ ecp_v2_cache.NodeHash = ecNodeHash{} +var _ ecp_v3_cache.NodeHash = ecNodeHash{} -// ID implements ecp_v2_cache.NodeHash. -func (ecNodeHash) ID(node *apiv2_core.Node) string { +// ID implements ecp_v3_cache.NodeHash. +func (ecNodeHash) ID(node *v3core.Node) string { if node == nil { return "unknown" } @@ -212,21 +217,21 @@ type ecCallbacks struct { ec *EnvoyController } -var _ ecp_v2_server.Callbacks = ecCallbacks{} +var _ ecp_v3_server.Callbacks = ecCallbacks{} -// OnStreamOpen implements ecp_v2_server.Callbacks. +// OnStreamOpen implements ecp_v3_server.Callbacks. func (ecc ecCallbacks) OnStreamOpen(_ context.Context, sid int64, stype string) error { //e.Infof("Stream open[%v]: %v", sid, stype) return nil } -// OnStreamClosed implements ecp_v2_server.Callbacks. +// OnStreamClosed implements ecp_v3_server.Callbacks. func (ecc ecCallbacks) OnStreamClosed(sid int64) { //e.Infof("Stream closed[%v]", sid) } // OnStreamRequest implements ecp_v2_server.Callbacks. -func (ecc ecCallbacks) OnStreamRequest(sid int64, req *apiv2.DiscoveryRequest) error { +func (ecc ecCallbacks) OnStreamRequest(sid int64, req *v3discovery.DiscoveryRequest) error { //e.Infof("Stream request[%v]: %v", sid, req.TypeURL) ecc.ec.cond.L.Lock() @@ -246,8 +251,8 @@ func (ecc ecCallbacks) OnStreamRequest(sid int64, req *apiv2.DiscoveryRequest) e return nil } -// OnStreamResponse implements ecp_v2_server.Callbacks. -func (ecc ecCallbacks) OnStreamResponse(sid int64, req *apiv2.DiscoveryRequest, res *apiv2.DiscoveryResponse) { +// OnStreamResponse implements ecp_v3_server.Callbacks. +func (ecc ecCallbacks) OnStreamResponse(ctx context.Context, sid int64, req *v3discovery.DiscoveryRequest, res *v3discovery.DiscoveryResponse) { //e.Infof("Stream response[%v]: %v -> %v", sid, req.TypeURL, res.Nonce) ecc.ec.cond.L.Lock() @@ -258,17 +263,35 @@ func (ecc ecCallbacks) OnStreamResponse(sid int64, req *apiv2.DiscoveryRequest, } -// OnFetchRequest implements ecp_v2_server.Callbacks. -func (ecc ecCallbacks) OnFetchRequest(_ context.Context, r *apiv2.DiscoveryRequest) error { +// OnFetchRequest implements ecp_v3_server.Callbacks. +func (ecc ecCallbacks) OnFetchRequest(_ context.Context, r *v3discovery.DiscoveryRequest) error { //e.Infof("Fetch request: %v", r) return nil } -// OnFetchResponse implements ecp_v2_server.Callbacks. -func (ecc ecCallbacks) OnFetchResponse(req *apiv2.DiscoveryRequest, res *apiv2.DiscoveryResponse) { +// OnFetchResponse implements ecp_v3_server.Callbacks. +func (ecc ecCallbacks) OnFetchResponse(req *v3discovery.DiscoveryRequest, res *v3discovery.DiscoveryResponse) { //e.Infof("Fetch response: %v -> %v", req, res) } +// OnDeltaStreamOpen implements ecp_v3_server.Callbacks. +func (ecc ecCallbacks) OnDeltaStreamOpen(ctx context.Context, sid int64, stype string) error { + return nil +} + +// OnDeltaStreamClosed implements ecp_v3_server.Callbacks. +func (ecc ecCallbacks) OnDeltaStreamClosed(sid int64) { +} + +// OnStreamDeltaRequest implements ecp_v3_server.Callbacks. +func (ecc ecCallbacks) OnStreamDeltaRequest(sid int64, req *v3discovery.DeltaDiscoveryRequest) error { + return nil +} + +// OnStreamDelatResponse implements ecp_v3_server.Callbacks. +func (ecc ecCallbacks) OnStreamDeltaResponse(sid int64, req *v3discovery.DeltaDiscoveryRequest, res *v3discovery.DeltaDiscoveryResponse) { +} + //////////////////////////////////////////////////////////////////////////////// type ecLogger struct { diff --git a/pkg/envoytest/harness.go b/pkg/envoytest/harness.go index b89956e1ba..2c0f0b12cd 100644 --- a/pkg/envoytest/harness.go +++ b/pkg/envoytest/harness.go @@ -128,6 +128,7 @@ func RunEnvoy(ctx context.Context, adsAddress string, portmaps ...string) error return cmd.Run() } +// TODO(lance) - this makes the test brittle and breaks when we change bootstrap configuration // This is the bootstrap we use for starting envoy. This is hardcoded for now, but we may want to // make it configurable for fancier tests in the future. const bootstrap = ` @@ -141,12 +142,8 @@ const bootstrap = ` { "name": "static_layer", "static_layer": { - "envoy.reloadable_features.enable_deprecated_v2_api": true, - "envoy.deprecated_features:envoy.api.v2.route.HeaderMatcher.regex_match": true, - "envoy.deprecated_features:envoy.api.v2.route.RouteMatch.regex": true, - "envoy.deprecated_features:envoy.config.filter.http.ext_authz.v2.ExtAuthz.use_alpha": true, - "envoy.deprecated_features:envoy.config.trace.v2.ZipkinConfig.HTTP_JSON_V1": true, - "envoy.reloadable_features.ext_authz_http_service_enable_case_sensitive_string_matcher": false + "envoy.reloadable_features.no_extension_lookup_by_name": false, + "re2.max_program_size.error_level": 200 } } ] @@ -160,13 +157,16 @@ const bootstrap = ` "cluster_name": "ads_cluster" } } - ] + ], + "transport_api_version": "V3" }, "cds_config": { - "ads": {} + "ads": {}, + "resource_api_version": "V3" }, "lds_config": { - "ads": {} + "ads": {}, + "resource_api_version": "V3" } }, "static_resources": { diff --git a/pkg/gateway/common_transforms.go b/pkg/gateway/common_transforms.go index d807b7d45c..bf22fa6da9 100644 --- a/pkg/gateway/common_transforms.go +++ b/pkg/gateway/common_transforms.go @@ -3,37 +3,36 @@ package gateway import ( "fmt" - v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - v2core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - v2endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint" + v3core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" "github.com/emissary-ingress/emissary/v3/pkg/kates" ) -// Compile_Endpoints transforms a kubernetes endpoints resource into a v2.ClusterLoadAssignment +// Compile_Endpoints transforms a kubernetes endpoints resource into a v3endpoint.ClusterLoadAssignment func Compile_Endpoints(endpoints *kates.Endpoints) (*CompiledConfig, error) { var clas []*CompiledLoadAssignment for _, subset := range endpoints.Subsets { for _, port := range subset.Ports { - var lbEndpoints []*v2endpoint.LbEndpoint + var lbEndpoints []*v3endpoint.LbEndpoint for _, addr := range subset.Addresses { lbEndpoints = append(lbEndpoints, makeLbEndpoint("TCP", addr.IP, int(port.Port))) } path := fmt.Sprintf("k8s/%s/%s/%d", endpoints.Namespace, endpoints.Name, port.Port) clas = append(clas, &CompiledLoadAssignment{ CompiledItem: NewCompiledItem(SourceFromResource(endpoints)), - LoadAssignment: &v2.ClusterLoadAssignment{ + LoadAssignment: &v3endpoint.ClusterLoadAssignment{ ClusterName: path, - Endpoints: []*v2endpoint.LocalityLbEndpoints{{LbEndpoints: lbEndpoints}}, + Endpoints: []*v3endpoint.LocalityLbEndpoints{{LbEndpoints: lbEndpoints}}, }, }) if len(subset.Ports) == 1 { path := fmt.Sprintf("k8s/%s/%s", endpoints.Namespace, endpoints.Name) clas = append(clas, &CompiledLoadAssignment{ CompiledItem: NewCompiledItem(SourceFromResource(endpoints)), - LoadAssignment: &v2.ClusterLoadAssignment{ + LoadAssignment: &v3endpoint.ClusterLoadAssignment{ ClusterName: path, - Endpoints: []*v2endpoint.LocalityLbEndpoints{{LbEndpoints: lbEndpoints}}, + Endpoints: []*v3endpoint.LocalityLbEndpoints{{LbEndpoints: lbEndpoints}}, }, }) } @@ -47,16 +46,16 @@ func Compile_Endpoints(endpoints *kates.Endpoints) (*CompiledConfig, error) { } // makeLbEndpoint takes a protocol, ip, and port and makes an envoy LbEndpoint. -func makeLbEndpoint(protocol, ip string, port int) *v2endpoint.LbEndpoint { - return &v2endpoint.LbEndpoint{ - HostIdentifier: &v2endpoint.LbEndpoint_Endpoint{ - Endpoint: &v2endpoint.Endpoint{ - Address: &v2core.Address{ - Address: &v2core.Address_SocketAddress{ - SocketAddress: &v2core.SocketAddress{ - Protocol: v2core.SocketAddress_Protocol(v2core.SocketAddress_Protocol_value[protocol]), +func makeLbEndpoint(protocol, ip string, port int) *v3endpoint.LbEndpoint { + return &v3endpoint.LbEndpoint{ + HostIdentifier: &v3endpoint.LbEndpoint_Endpoint{ + Endpoint: &v3endpoint.Endpoint{ + Address: &v3core.Address{ + Address: &v3core.Address_SocketAddress{ + SocketAddress: &v3core.SocketAddress{ + Protocol: v3core.SocketAddress_Protocol(v3core.SocketAddress_Protocol_value[protocol]), Address: ip, - PortSpecifier: &v2core.SocketAddress_PortValue{PortValue: uint32(port)}, + PortSpecifier: &v3core.SocketAddress_PortValue{PortValue: uint32(port)}, Ipv4Compat: true, }, }, diff --git a/pkg/gateway/compilation_units.go b/pkg/gateway/compilation_units.go index c1fcfa91ea..17f5c2e29a 100644 --- a/pkg/gateway/compilation_units.go +++ b/pkg/gateway/compilation_units.go @@ -1,8 +1,10 @@ package gateway import ( - v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" + v3cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" + v3endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" + v3listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" + v3route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" gw "sigs.k8s.io/gateway-api/apis/v1alpha1" ) @@ -39,7 +41,7 @@ type CompiledConfig struct { // which routes to supply to the listener. type CompiledListener struct { CompiledItem - Listener *v2.Listener + Listener *v3listener.Listener // The predicate determines which routes belong to which listeners. If the listener specifies // and Rds configuration, this Predicate and the Domains below will be used to construct a @@ -56,7 +58,7 @@ type CompiledRoute struct { // source such as labels kind, namespace, name, etc. HTTPRoute *gw.HTTPRoute - Routes []*route.Route + Routes []*v3route.Route ClusterRefs []*ClusterRef } @@ -73,11 +75,11 @@ type ClusterRef struct { // CompiledCluster decorates an envoy v2.Cluster. type CompiledCluster struct { CompiledItem - Cluster *v2.Cluster + Cluster *v3cluster.Cluster } // CompiledLoadAssignment decorates an envoy v2.ClusterLoadAssignment. type CompiledLoadAssignment struct { CompiledItem - LoadAssignment *v2.ClusterLoadAssignment + LoadAssignment *v3endpoint.ClusterLoadAssignment } diff --git a/pkg/gateway/dispatcher.go b/pkg/gateway/dispatcher.go index d5a2b8be1f..ce7f2c5e38 100644 --- a/pkg/gateway/dispatcher.go +++ b/pkg/gateway/dispatcher.go @@ -8,14 +8,18 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/types/known/durationpb" - apiv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - apiv2_core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - apiv2_endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint" - apiv2_route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" + // Envoy API v3 + v3cluster "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/cluster/v3" + v3core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" + v3listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" + v3route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" + + // Envoy control plane API's ecp_cache_types "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" - ecp_v2_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v2" - ecp_v2_resource "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v2" + ecp_v3_cache "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/v3" + ecp_v3_resource "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/resource/v3" ecp_wellknown "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/wellknown" "github.com/datawire/dlib/dlog" @@ -57,7 +61,7 @@ type Dispatcher struct { version string changeCount int - snapshot *ecp_v2_cache.Snapshot + snapshot *ecp_v3_cache.Snapshot endpointWatches map[string]bool } @@ -193,18 +197,18 @@ func (d *Dispatcher) GetErrors() []*CompiledItem { } // GetSnapshot returns a version and a snapshot. -func (d *Dispatcher) GetSnapshot(ctx context.Context) (string, *ecp_v2_cache.Snapshot) { +func (d *Dispatcher) GetSnapshot(ctx context.Context) (string, *ecp_v3_cache.Snapshot) { if d.snapshot == nil { d.buildSnapshot(ctx) } return d.version, d.snapshot } -// GetListener returns a *apiv2.Listener with the specified name or nil if none exists. -func (d *Dispatcher) GetListener(ctx context.Context, name string) *apiv2.Listener { +// GetListener returns a *v3listener.Listener with the specified name or nil if none exists. +func (d *Dispatcher) GetListener(ctx context.Context, name string) *v3listener.Listener { _, snap := d.GetSnapshot(ctx) for _, rsrc := range snap.Resources[ecp_cache_types.Listener].Items { - l := rsrc.Resource.(*apiv2.Listener) + l := rsrc.Resource.(*v3listener.Listener) if l.Name == name { return l } @@ -215,10 +219,10 @@ func (d *Dispatcher) GetListener(ctx context.Context, name string) *apiv2.Listen // GetRouteConfiguration returns a *apiv2.RouteConfiguration with the specified name or nil if none // exists. -func (d *Dispatcher) GetRouteConfiguration(ctx context.Context, name string) *apiv2.RouteConfiguration { +func (d *Dispatcher) GetRouteConfiguration(ctx context.Context, name string) *v3route.RouteConfiguration { _, snap := d.GetSnapshot(ctx) for _, rsrc := range snap.Resources[ecp_cache_types.Route].Items { - r := rsrc.Resource.(*apiv2.RouteConfiguration) + r := rsrc.Resource.(*v3route.RouteConfiguration) if r.Name == name { return r } @@ -251,8 +255,8 @@ func (d *Dispatcher) buildClusterMap() (map[string]string, map[string]bool) { return refs, watches } -func (d *Dispatcher) buildEndpointMap() map[string]*apiv2.ClusterLoadAssignment { - endpoints := map[string]*apiv2.ClusterLoadAssignment{} +func (d *Dispatcher) buildEndpointMap() map[string]*v3endpoint.ClusterLoadAssignment { + endpoints := map[string]*v3endpoint.ClusterLoadAssignment{} for _, config := range d.configs { for _, la := range config.LoadAssignments { endpoints[la.LoadAssignment.ClusterName] = la.LoadAssignment @@ -276,13 +280,13 @@ func (d *Dispatcher) buildRouteConfigurations() ([]ecp_cache_types.Resource, []e return listeners, routes } -func (d *Dispatcher) buildRouteConfiguration(lst *CompiledListener) *apiv2.RouteConfiguration { +func (d *Dispatcher) buildRouteConfiguration(lst *CompiledListener) *v3route.RouteConfiguration { rdsName, isRds := getRdsName(lst.Listener) if !isRds { return nil } - var routes []*apiv2_route.Route + var routes []*v3route.Route for _, config := range d.configs { for _, route := range config.Routes { if lst.Predicate(route) { @@ -291,9 +295,9 @@ func (d *Dispatcher) buildRouteConfiguration(lst *CompiledListener) *apiv2.Route } } - return &apiv2.RouteConfiguration{ + return &v3route.RouteConfiguration{ Name: rdsName, - VirtualHosts: []*apiv2_route.VirtualHost{ + VirtualHosts: []*v3route.VirtualHost{ { Name: rdsName, Domains: lst.Domains, @@ -305,14 +309,14 @@ func (d *Dispatcher) buildRouteConfiguration(lst *CompiledListener) *apiv2.Route // getRdsName returns the RDS route configuration name configured for the listener and a flag // indicating whether the listener uses Rds. -func getRdsName(l *apiv2.Listener) (string, bool) { +func getRdsName(l *v3listener.Listener) (string, bool) { for _, fc := range l.FilterChains { for _, f := range fc.Filters { if f.Name != ecp_wellknown.HTTPConnectionManager { continue } - hcm := ecp_v2_resource.GetHTTPConnectionManager(f) + hcm := ecp_v3_resource.GetHTTPConnectionManager(f) if hcm != nil { rds := hcm.GetRds() if rds != nil { @@ -343,24 +347,27 @@ func (d *Dispatcher) buildSnapshot(ctx context.Context) { if ok { endpoints = append(endpoints, la) } else { - endpoints = append(endpoints, &apiv2.ClusterLoadAssignment{ + endpoints = append(endpoints, &v3endpoint.ClusterLoadAssignment{ ClusterName: key, - Endpoints: []*apiv2_endpoint.LocalityLbEndpoints{}, + Endpoints: []*v3endpoint.LocalityLbEndpoints{}, }) } } listeners, routes := d.buildRouteConfigurations() - snapshot := ecp_v2_cache.NewSnapshot( - d.version, - endpoints, - clusters, - routes, - listeners, - nil, // runtimes - nil, // secrets - ) + snapshotResources := map[ecp_v3_resource.Type][]ecp_cache_types.Resource{ + ecp_v3_resource.EndpointType: endpoints, + ecp_v3_resource.ClusterType: clusters, + ecp_v3_resource.RouteType: routes, + ecp_v3_resource.ListenerType: listeners, + } + + snapshot, err := ecp_v3_cache.NewSnapshot(d.version, snapshotResources) + if err != nil { + dlog.Errorf(ctx, "Dispatcher Snapshot Error: %v", err) + } + if err := snapshot.Consistent(); err != nil { bs, _ := json.MarshalIndent(snapshot, "", " ") dlog.Errorf(ctx, "Dispatcher Snapshot inconsistency: %v: %s", err, bs) @@ -370,13 +377,13 @@ func (d *Dispatcher) buildSnapshot(ctx context.Context) { } } -func makeCluster(name, path string) *apiv2.Cluster { - return &apiv2.Cluster{ +func makeCluster(name, path string) *v3cluster.Cluster { + return &v3cluster.Cluster{ Name: name, ConnectTimeout: &durationpb.Duration{Seconds: 10}, - ClusterDiscoveryType: &apiv2.Cluster_Type{Type: apiv2.Cluster_EDS}, - EdsClusterConfig: &apiv2.Cluster_EdsClusterConfig{ - EdsConfig: &apiv2_core.ConfigSource{ConfigSourceSpecifier: &apiv2_core.ConfigSource_Ads{}}, + ClusterDiscoveryType: &v3cluster.Cluster_Type{Type: v3cluster.Cluster_EDS}, + EdsClusterConfig: &v3cluster.Cluster_EdsClusterConfig{ + EdsConfig: &v3core.ConfigSource{ConfigSourceSpecifier: &v3core.ConfigSource_Ads{}}, ServiceName: path, }, } diff --git a/pkg/gateway/dispatcher_test.go b/pkg/gateway/dispatcher_test.go index 17ff21fe2d..3dacccd617 100644 --- a/pkg/gateway/dispatcher_test.go +++ b/pkg/gateway/dispatcher_test.go @@ -11,11 +11,11 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/anypb" - // envoy api v2 - apiv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - apiv2_core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - apiv2_listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/listener" - apiv2_httpman "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/http_connection_manager/v2" + // envoy api v3 + v3core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/endpoint/v3" + v3listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" + v3httpman "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3" // envoy control plane ecp_cache_types "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/cache/types" @@ -190,7 +190,7 @@ func compile_Foo(f *Foo) (*gateway.CompiledConfig, error) { CompiledItem: gateway.NewCompiledItem(gateway.SourceFromResource(f)), Listeners: []*gateway.CompiledListener{ { - Listener: &apiv2.Listener{Name: f.Spec.Value}, + Listener: &v3listener.Listener{Name: f.Spec.Value}, }, }, }, nil @@ -239,17 +239,17 @@ func compile_FooWithRouteConfigName(f *Foo) (*gateway.CompiledConfig, error) { name := f.Spec.Value rcName := fmt.Sprintf("%s-routeconfig", name) - hcm := &apiv2_httpman.HttpConnectionManager{ + hcm := &v3httpman.HttpConnectionManager{ StatPrefix: name, - HttpFilters: []*apiv2_httpman.HttpFilter{ + HttpFilters: []*v3httpman.HttpFilter{ {Name: ecp_wellknown.CORS}, {Name: ecp_wellknown.Router}, }, - RouteSpecifier: &apiv2_httpman.HttpConnectionManager_Rds{ - Rds: &apiv2_httpman.Rds{ - ConfigSource: &apiv2_core.ConfigSource{ - ConfigSourceSpecifier: &apiv2_core.ConfigSource_Ads{ - Ads: &apiv2_core.AggregatedConfigSource{}, + RouteSpecifier: &v3httpman.HttpConnectionManager_Rds{ + Rds: &v3httpman.Rds{ + ConfigSource: &v3core.ConfigSource{ + ConfigSourceSpecifier: &v3core.ConfigSource_Ads{ + Ads: &v3core.AggregatedConfigSource{}, }, }, RouteConfigName: rcName, @@ -261,14 +261,14 @@ func compile_FooWithRouteConfigName(f *Foo) (*gateway.CompiledConfig, error) { return nil, err } - l := &apiv2.Listener{ + l := &v3listener.Listener{ Name: name, - FilterChains: []*apiv2_listener.FilterChain{ + FilterChains: []*v3listener.FilterChain{ { - Filters: []*apiv2_listener.Filter{ + Filters: []*v3listener.Filter{ { Name: ecp_wellknown.HTTPConnectionManager, - ConfigType: &apiv2_listener.Filter_TypedConfig{TypedConfig: hcmAny}, + ConfigType: &v3listener.Filter_TypedConfig{TypedConfig: hcmAny}, }, }, }, @@ -302,17 +302,17 @@ func TestDispatcherAssemblyWithEmptyRouteConfigName(t *testing.T) { func compile_FooWithEmptyRouteConfigName(f *Foo) (*gateway.CompiledConfig, error) { name := f.Spec.Value - hcm := &apiv2_httpman.HttpConnectionManager{ + hcm := &v3httpman.HttpConnectionManager{ StatPrefix: name, - HttpFilters: []*apiv2_httpman.HttpFilter{ + HttpFilters: []*v3httpman.HttpFilter{ {Name: ecp_wellknown.CORS}, {Name: ecp_wellknown.Router}, }, - RouteSpecifier: &apiv2_httpman.HttpConnectionManager_Rds{ - Rds: &apiv2_httpman.Rds{ - ConfigSource: &apiv2_core.ConfigSource{ - ConfigSourceSpecifier: &apiv2_core.ConfigSource_Ads{ - Ads: &apiv2_core.AggregatedConfigSource{}, + RouteSpecifier: &v3httpman.HttpConnectionManager_Rds{ + Rds: &v3httpman.Rds{ + ConfigSource: &v3core.ConfigSource{ + ConfigSourceSpecifier: &v3core.ConfigSource_Ads{ + Ads: &v3core.AggregatedConfigSource{}, }, }, }, @@ -323,14 +323,14 @@ func compile_FooWithEmptyRouteConfigName(f *Foo) (*gateway.CompiledConfig, error return nil, err } - l := &apiv2.Listener{ + l := &v3listener.Listener{ Name: name, - FilterChains: []*apiv2_listener.FilterChain{ + FilterChains: []*v3listener.FilterChain{ { - Filters: []*apiv2_listener.Filter{ + Filters: []*v3listener.Filter{ { Name: ecp_wellknown.HTTPConnectionManager, - ConfigType: &apiv2_listener.Filter_TypedConfig{TypedConfig: hcmAny}, + ConfigType: &v3listener.Filter_TypedConfig{TypedConfig: hcmAny}, }, }, }, @@ -361,9 +361,9 @@ func TestDispatcherAssemblyWithoutRds(t *testing.T) { func compile_FooWithoutRds(f *Foo) (*gateway.CompiledConfig, error) { name := f.Spec.Value - hcm := &apiv2_httpman.HttpConnectionManager{ + hcm := &v3httpman.HttpConnectionManager{ StatPrefix: name, - HttpFilters: []*apiv2_httpman.HttpFilter{ + HttpFilters: []*v3httpman.HttpFilter{ {Name: ecp_wellknown.CORS}, {Name: ecp_wellknown.Router}, }, @@ -373,17 +373,17 @@ func compile_FooWithoutRds(f *Foo) (*gateway.CompiledConfig, error) { return nil, err } - l := &apiv2.Listener{ + l := &v3listener.Listener{ Name: name, - FilterChains: []*apiv2_listener.FilterChain{ + FilterChains: []*v3listener.FilterChain{ { - Filters: []*apiv2_listener.Filter{ + Filters: []*v3listener.Filter{ { Name: ecp_wellknown.RateLimit, }, { Name: ecp_wellknown.HTTPConnectionManager, - ConfigType: &apiv2_listener.Filter_TypedConfig{TypedConfig: hcmAny}, + ConfigType: &v3listener.Filter_TypedConfig{TypedConfig: hcmAny}, }, }, }, @@ -408,7 +408,7 @@ func TestDispatcherAssemblyEndpointDefaulting(t *testing.T) { _, snap := disp.GetSnapshot(ctx) found := false for _, r := range snap.Resources[ecp_cache_types.Endpoint].Items { - cla := r.Resource.(*apiv2.ClusterLoadAssignment) + cla := r.Resource.(*v3endpoint.ClusterLoadAssignment) if cla.ClusterName == "foo" && len(cla.Endpoints) == 0 { found = true } diff --git a/pkg/gateway/gw_transforms.go b/pkg/gateway/gw_transforms.go index f564c33410..d5860a1ce8 100644 --- a/pkg/gateway/gw_transforms.go +++ b/pkg/gateway/gw_transforms.go @@ -10,13 +10,12 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" gw "sigs.k8s.io/gateway-api/apis/v1alpha1" - // envoy api v2 - apiv2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2" - apiv2_core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core" - apiv2_listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/listener" - apiv2_route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/route" - apiv2_httpman "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/filter/network/http_connection_manager/v2" - api_matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher" + // envoy api v3 + v3core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/core/v3" + v3listener "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/listener/v3" + v3route "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/config/route/v3" + v3httpman "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3" + v3matcher "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type/matcher/v3" // envoy control plane ecp_wellknown "github.com/emissary-ingress/emissary/v3/pkg/envoy-control-plane/wellknown" @@ -43,17 +42,17 @@ func Compile_Gateway(gateway *gw.Gateway) (*CompiledConfig, error) { } func Compile_Listener(parent Source, lst gw.Listener, name string) (*CompiledListener, error) { - hcm := &apiv2_httpman.HttpConnectionManager{ + hcm := &v3httpman.HttpConnectionManager{ StatPrefix: name, - HttpFilters: []*apiv2_httpman.HttpFilter{ + HttpFilters: []*v3httpman.HttpFilter{ {Name: ecp_wellknown.CORS}, {Name: ecp_wellknown.Router}, }, - RouteSpecifier: &apiv2_httpman.HttpConnectionManager_Rds{ - Rds: &apiv2_httpman.Rds{ - ConfigSource: &apiv2_core.ConfigSource{ - ConfigSourceSpecifier: &apiv2_core.ConfigSource_Ads{ - Ads: &apiv2_core.AggregatedConfigSource{}, + RouteSpecifier: &v3httpman.HttpConnectionManager_Rds{ + Rds: &v3httpman.Rds{ + ConfigSource: &v3core.ConfigSource{ + ConfigSourceSpecifier: &v3core.ConfigSource_Ads{ + Ads: &v3core.AggregatedConfigSource{}, }, }, RouteConfigName: name, @@ -67,18 +66,18 @@ func Compile_Listener(parent Source, lst gw.Listener, name string) (*CompiledLis return &CompiledListener{ CompiledItem: NewCompiledItem(Sourcef("listener %s", lst.Hostname)), - Listener: &apiv2.Listener{ + Listener: &v3listener.Listener{ Name: name, - Address: &apiv2_core.Address{Address: &apiv2_core.Address_SocketAddress{SocketAddress: &apiv2_core.SocketAddress{ + Address: &v3core.Address{Address: &v3core.Address_SocketAddress{SocketAddress: &v3core.SocketAddress{ Address: "0.0.0.0", - PortSpecifier: &apiv2_core.SocketAddress_PortValue{PortValue: uint32(lst.Port)}, + PortSpecifier: &v3core.SocketAddress_PortValue{PortValue: uint32(lst.Port)}, }}}, - FilterChains: []*apiv2_listener.FilterChain{ + FilterChains: []*v3listener.FilterChain{ { - Filters: []*apiv2_listener.Filter{ + Filters: []*v3listener.Filter{ { Name: ecp_wellknown.HTTPConnectionManager, - ConfigType: &apiv2_listener.Filter_TypedConfig{TypedConfig: hcmAny}, + ConfigType: &v3listener.Filter_TypedConfig{TypedConfig: hcmAny}, }, }, }, @@ -95,7 +94,7 @@ func Compile_Listener(parent Source, lst gw.Listener, name string) (*CompiledLis func Compile_HTTPRoute(httpRoute *gw.HTTPRoute) (*CompiledConfig, error) { src := SourceFromResource(httpRoute) clusterRefs := []*ClusterRef{} - var routes []*apiv2_route.Route + var routes []*v3route.Route for idx, rule := range httpRoute.Spec.Rules { s := Sourcef("rule %d in %s", idx, src) _routes, err := Compile_HTTPRouteRule(s, rule, httpRoute.Namespace, &clusterRefs) @@ -117,25 +116,25 @@ func Compile_HTTPRoute(httpRoute *gw.HTTPRoute) (*CompiledConfig, error) { }, nil } -func Compile_HTTPRouteRule(src Source, rule gw.HTTPRouteRule, namespace string, clusterRefs *[]*ClusterRef) ([]*apiv2_route.Route, error) { - var clusters []*apiv2_route.WeightedCluster_ClusterWeight +func Compile_HTTPRouteRule(src Source, rule gw.HTTPRouteRule, namespace string, clusterRefs *[]*ClusterRef) ([]*v3route.Route, error) { + var clusters []*v3route.WeightedCluster_ClusterWeight for idx, fwd := range rule.ForwardTo { s := Sourcef("forwardTo %d in %s", idx, src) clusters = append(clusters, Compile_HTTPRouteForwardTo(s, fwd, namespace, clusterRefs)) } - wc := &apiv2_route.WeightedCluster{Clusters: clusters} + wc := &v3route.WeightedCluster{Clusters: clusters} matches, err := Compile_HTTPRouteMatches(rule.Matches) if err != nil { return nil, err } - var result []*apiv2_route.Route + var result []*v3route.Route for _, match := range matches { - result = append(result, &apiv2_route.Route{ + result = append(result, &v3route.Route{ Match: match, - Action: &apiv2_route.Route_Route{Route: &apiv2_route.RouteAction{ - ClusterSpecifier: &apiv2_route.RouteAction_WeightedClusters{WeightedClusters: wc}, + Action: &v3route.Route_Route{Route: &v3route.RouteAction{ + ClusterSpecifier: &v3route.RouteAction_WeightedClusters{WeightedClusters: wc}, }}, }) } @@ -143,7 +142,7 @@ func Compile_HTTPRouteRule(src Source, rule gw.HTTPRouteRule, namespace string, return result, err } -func Compile_HTTPRouteForwardTo(src Source, forward gw.HTTPRouteForwardTo, namespace string, clusterRefs *[]*ClusterRef) *apiv2_route.WeightedCluster_ClusterWeight { +func Compile_HTTPRouteForwardTo(src Source, forward gw.HTTPRouteForwardTo, namespace string, clusterRefs *[]*ClusterRef) *v3route.WeightedCluster_ClusterWeight { suffix := "" clusterName := *forward.ServiceName if forward.Port != nil { @@ -156,14 +155,14 @@ func Compile_HTTPRouteForwardTo(src Source, forward gw.HTTPRouteForwardTo, names Name: clusterName, EndpointPath: fmt.Sprintf("k8s/%s/%s%s", namespace, *forward.ServiceName, suffix), }) - return &apiv2_route.WeightedCluster_ClusterWeight{ + return &v3route.WeightedCluster_ClusterWeight{ Name: clusterName, Weight: &wrapperspb.UInt32Value{Value: uint32(forward.Weight)}, } } -func Compile_HTTPRouteMatches(matches []gw.HTTPRouteMatch) ([]*apiv2_route.RouteMatch, error) { - var result []*apiv2_route.RouteMatch +func Compile_HTTPRouteMatches(matches []gw.HTTPRouteMatch) ([]*v3route.RouteMatch, error) { + var result []*v3route.RouteMatch for _, match := range matches { item, err := Compile_HTTPRouteMatch(match) if err != nil { @@ -174,25 +173,25 @@ func Compile_HTTPRouteMatches(matches []gw.HTTPRouteMatch) ([]*apiv2_route.Route return result, nil } -func Compile_HTTPRouteMatch(match gw.HTTPRouteMatch) (*apiv2_route.RouteMatch, error) { +func Compile_HTTPRouteMatch(match gw.HTTPRouteMatch) (*v3route.RouteMatch, error) { headers, err := Compile_HTTPHeaderMatch(match.Headers) if err != nil { return nil, err } - result := &apiv2_route.RouteMatch{ + result := &v3route.RouteMatch{ Headers: headers, } switch match.Path.Type { case gw.PathMatchExact: - result.PathSpecifier = &apiv2_route.RouteMatch_Path{Path: match.Path.Value} + result.PathSpecifier = &v3route.RouteMatch_Path{Path: match.Path.Value} case gw.PathMatchPrefix: - result.PathSpecifier = &apiv2_route.RouteMatch_Prefix{Prefix: match.Path.Value} + result.PathSpecifier = &v3route.RouteMatch_Prefix{Prefix: match.Path.Value} case gw.PathMatchRegularExpression: - result.PathSpecifier = &apiv2_route.RouteMatch_SafeRegex{SafeRegex: regexMatcher(match.Path.Value)} + result.PathSpecifier = &v3route.RouteMatch_SafeRegex{SafeRegex: regexMatcher(match.Path.Value)} case "": // no path match, but PathSpecifier is required - result.PathSpecifier = &apiv2_route.RouteMatch_Prefix{} + result.PathSpecifier = &v3route.RouteMatch_Prefix{} default: return nil, errors.Errorf("unknown path match type: %q", match.Path.Type) } @@ -200,23 +199,23 @@ func Compile_HTTPRouteMatch(match gw.HTTPRouteMatch) (*apiv2_route.RouteMatch, e return result, nil } -func Compile_HTTPHeaderMatch(headerMatch *gw.HTTPHeaderMatch) ([]*apiv2_route.HeaderMatcher, error) { +func Compile_HTTPHeaderMatch(headerMatch *gw.HTTPHeaderMatch) ([]*v3route.HeaderMatcher, error) { if headerMatch == nil { return nil, nil } - var result []*apiv2_route.HeaderMatcher + var result []*v3route.HeaderMatcher for hdr, pattern := range headerMatch.Values { - hm := &apiv2_route.HeaderMatcher{ + hm := &v3route.HeaderMatcher{ Name: hdr, InvertMatch: false, } switch headerMatch.Type { case gw.HeaderMatchExact: - hm.HeaderMatchSpecifier = &apiv2_route.HeaderMatcher_ExactMatch{ExactMatch: pattern} + hm.HeaderMatchSpecifier = &v3route.HeaderMatcher_ExactMatch{ExactMatch: pattern} case gw.HeaderMatchRegularExpression: - hm.HeaderMatchSpecifier = &apiv2_route.HeaderMatcher_SafeRegexMatch{SafeRegexMatch: regexMatcher(pattern)} + hm.HeaderMatchSpecifier = &v3route.HeaderMatcher_SafeRegexMatch{SafeRegexMatch: regexMatcher(pattern)} default: return nil, errors.Errorf("unknown header match type: %s", headerMatch.Type) } @@ -226,9 +225,9 @@ func Compile_HTTPHeaderMatch(headerMatch *gw.HTTPHeaderMatch) ([]*apiv2_route.He return result, nil } -func regexMatcher(pattern string) *api_matcher.RegexMatcher { - return &api_matcher.RegexMatcher{ - EngineType: &api_matcher.RegexMatcher_GoogleRe2{GoogleRe2: &api_matcher.RegexMatcher_GoogleRE2{}}, +func regexMatcher(pattern string) *v3matcher.RegexMatcher { + return &v3matcher.RegexMatcher{ + EngineType: &v3matcher.RegexMatcher_GoogleRe2{GoogleRe2: &v3matcher.RegexMatcher_GoogleRE2{}}, Regex: pattern, } } diff --git a/python/ambassador/config/config.py b/python/ambassador/config/config.py index de405facaa..996c8372c9 100644 --- a/python/ambassador/config/config.py +++ b/python/ambassador/config/config.py @@ -49,20 +49,6 @@ StringOrList = Union[str, List[str]] -def envoy_api_version(): - """ - Return the Envoy API version we should be using. - """ - env_version = os.environ.get('AMBASSADOR_ENVOY_API_VERSION', 'V3') - - version = env_version.upper() - - if version == 'V2' or env_version == 'V3': - return version - - return 'V2' - - class Config: # CLASS VARIABLES # When using multiple Ambassadors in one cluster, use AMBASSADOR_ID to distinguish them. @@ -72,7 +58,6 @@ class Config: certs_single_namespace: ClassVar[bool] = bool(os.environ.get('AMBASSADOR_CERTS_SINGLE_NAMESPACE', os.environ.get('AMBASSADOR_SINGLE_NAMESPACE'))) enable_endpoints: ClassVar[bool] = not bool(os.environ.get('AMBASSADOR_DISABLE_ENDPOINTS')) log_resources: ClassVar[bool] = parse_bool(os.environ.get('AMBASSADOR_LOG_RESOURCES')) - envoy_api_version: ClassVar[str] = envoy_api_version() envoy_bind_address: ClassVar[str] = os.environ.get('AMBASSADOR_ENVOY_BIND_ADDRESS', "0.0.0.0") StorageByKind: ClassVar[Dict[str, str]] = { diff --git a/python/ambassador/envoy/v3/v3bootstrap.py b/python/ambassador/envoy/v3/v3bootstrap.py index 04a2c04390..af41de5b90 100644 --- a/python/ambassador/envoy/v3/v3bootstrap.py +++ b/python/ambassador/envoy/v3/v3bootstrap.py @@ -50,8 +50,13 @@ def __init__(self, config: 'V3Config') -> None: { 'name': 'static_layer', 'static_layer': { - 'envoy.deprecated_features:envoy.config.trace.v3.ZipkinConfig.hidden_envoy_deprecated_HTTP_JSON_V1': True, 're2.max_program_size.error_level': 200, + # TODO(lance): + # the new default is that all filters are looked up using the @type which currently we exclude on a lot of + # our filters. This will ensure we do not break current config. We can migrate over + # in a minor release. see here: https://www.envoyproxy.io/docs/envoy/v1.22.0/version_history/current#minor-behavior-changes + # The biggest impact of this is ensuring that ambex imports all the types because we will need to import many more + "envoy.reloadable_features.no_extension_lookup_by_name": False } } ] diff --git a/python/ambassador/envoy/v3/v3config.py b/python/ambassador/envoy/v3/v3config.py index 7efbec1c4b..d40be9897c 100644 --- a/python/ambassador/envoy/v3/v3config.py +++ b/python/ambassador/envoy/v3/v3config.py @@ -91,8 +91,12 @@ def split_config(self) -> Tuple[Dict[str, Any], Dict[str, Any], Dict[str, 'Clust { 'name': 'static_layer', 'static_layer': { - 'envoy.deprecated_features:envoy.config.trace.v3.ZipkinConfig.hidden_envoy_deprecated_HTTP_JSON_V1': True, 're2.max_program_size.error_level': 200, + # the new default is that all filters are looked up using the @type which currently we exclude on a lot of + # our filters. This will ensure we do not break current config. We can migrate over + # in a minor release. see here: https://www.envoyproxy.io/docs/envoy/v1.22.0/version_history/current#minor-behavior-changes + # The biggest impact of this is ensuring that ambex imports all the types because we will need to import many more + "envoy.reloadable_features.no_extension_lookup_by_name": False } } ] diff --git a/python/ambassador/ir/irambassador.py b/python/ambassador/ir/irambassador.py index 11a4bf2c6e..70a35598a8 100644 --- a/python/ambassador/ir/irambassador.py +++ b/python/ambassador/ir/irambassador.py @@ -251,32 +251,21 @@ def finalize(self, ir: 'IR', aconf: Config) -> bool: self.grpc_web.sourced_by(amod) ir.save_filter(self.grpc_web) - if amod and ('grpc_stats' in amod): - grpc_stats = amod.grpc_stats - + if amod and (grpc_stats := amod.get('grpc_stats')) is not None: + # grpc_stats = { 'all_methods': False} if amod.grpc_stats is None else amod.grpc_stats # default config with safe values - config = { - 'individual_method_stats_allowlist': { - 'services': [] - }, - 'stats_for_all_methods': False, + config: Dict[str, Any] = { 'enable_upstream_stats': False } - if ('services' in grpc_stats): + # Only one of config['individual_method_stats_allowlist'] or + # config['stats_for_all_methods'] can be set. + if 'services' in grpc_stats: config['individual_method_stats_allowlist'] = { 'services': grpc_stats['services'] } - # remove stats_for_all_methods key from config. only one of individual_method_stats_allowlist or - # stats_for_all_methods can be set - config.pop('stats_for_all_methods') - - # if 'services' is present, ignore 'all_methods' - if ('all_methods' in grpc_stats) and ('services' not in grpc_stats): - config['stats_for_all_methods'] = bool(grpc_stats['all_methods']) - # remove individual_method_stats_allowlist key from config. only one of individual_method_stats_allowlist or - # stats_for_all_methods can be set - config.pop('individual_method_stats_allowlist') + else: + config['stats_for_all_methods'] = bool(grpc_stats.get('all_methods', False)) if ('upstream_stats' in grpc_stats): config['enable_upstream_stats'] = bool(grpc_stats['upstream_stats']) diff --git a/python/ambassador/ir/irtracing.py b/python/ambassador/ir/irtracing.py index 47761f2653..2826a0012d 100644 --- a/python/ambassador/ir/irtracing.py +++ b/python/ambassador/ir/irtracing.py @@ -78,21 +78,15 @@ def setup(self, ir: 'IR', aconf: Config) -> bool: if driver == "zipkin": # fill zipkin defaults if not driver_config.get('collector_endpoint'): - driver_config['collector_endpoint'] = { - 'V2': '/api/v1/spans', - 'V3': '/api/v2/spans', - }[aconf.envoy_api_version] + driver_config['collector_endpoint'] = '/api/v2/spans' if not driver_config.get('collector_endpoint_version'): - driver_config['collector_endpoint_version'] = { - 'V2': 'HTTP_JSON_V1', - 'V3': 'HTTP_JSON', - }[aconf.envoy_api_version] + driver_config['collector_endpoint_version'] = 'HTTP_JSON' if not 'trace_id_128bit' in driver_config: # Make 128-bit traceid the default driver_config['trace_id_128bit'] = True # validate - if driver_config['collector_endpoint_version'] not in ['HTTP_JSON_V1', 'HTTP_JSON', 'HTTP_PROTO']: - self.post_error(RichStatus.fromError("collector_endpoint_version must be one of 'HTTP_JSON_V1, HTTP_JSON, HTTP_PROTO'")) + if driver_config['collector_endpoint_version'] not in ['HTTP_JSON', 'HTTP_PROTO']: + self.post_error(RichStatus.fromError("collector_endpoint_version must be one of HTTP_JSON, HTTP_PROTO'")) return False # OK, we have a valid config. diff --git a/python/tests/kat/abstract_tests.py b/python/tests/kat/abstract_tests.py index 3136569550..70440cc12f 100644 --- a/python/tests/kat/abstract_tests.py +++ b/python/tests/kat/abstract_tests.py @@ -147,12 +147,6 @@ def manifests(self) -> str: value: "yes" """ - if os.environ.get('AMBASSADOR_ENVOY_API_VERSION', '') != '': - self.manifest_envs += """ - - name: AMBASSADOR_ENVOY_API_VERSION - value: "%s" -""" % os.environ["AMBASSADOR_ENVOY_API_VERSION"] - eports = "" if self.extra_ports: diff --git a/python/tests/kat/t_grpc_stats.py b/python/tests/kat/t_grpc_stats.py index facf9c674c..de2d93d3ae 100644 --- a/python/tests/kat/t_grpc_stats.py +++ b/python/tests/kat/t_grpc_stats.py @@ -66,14 +66,14 @@ def check(self): stats = self.results[-1].text metrics = [ - 'envoy_cluster_grpc_EchoService_0', - 'envoy_cluster_grpc_EchoService_13', - 'envoy_cluster_grpc_EchoService_request_message_count', - 'envoy_cluster_grpc_EchoService_response_message_count', - 'envoy_cluster_grpc_EchoService_success', - 'envoy_cluster_grpc_EchoService_total', + 'envoy_cluster_grpc_Echo_0', + 'envoy_cluster_grpc_Echo_13', + 'envoy_cluster_grpc_Echo_request_message_count', + 'envoy_cluster_grpc_Echo_response_message_count', + 'envoy_cluster_grpc_Echo_success', + 'envoy_cluster_grpc_Echo_total', # present only when enable_upstream_stats is true - 'envoy_cluster_grpc_EchoService_upstream_rq_time' + 'envoy_cluster_grpc_Echo_upstream_rq_time' ] # these metrics SHOULD NOT be there based on the filter config @@ -164,12 +164,12 @@ def check(self): stats = self.results[-1].text metrics = [ - 'envoy_cluster_grpc_EchoService_0', - 'envoy_cluster_grpc_EchoService_13', - 'envoy_cluster_grpc_EchoService_request_message_count', - 'envoy_cluster_grpc_EchoService_response_message_count', - 'envoy_cluster_grpc_EchoService_success', - 'envoy_cluster_grpc_EchoService_total', + 'envoy_cluster_grpc_Echo_0', + 'envoy_cluster_grpc_Echo_13', + 'envoy_cluster_grpc_Echo_request_message_count', + 'envoy_cluster_grpc_Echo_response_message_count', + 'envoy_cluster_grpc_Echo_success', + 'envoy_cluster_grpc_Echo_total', ] # these metrics SHOULD NOT be there based on the filter config diff --git a/python/tests/kat/t_tracing.py b/python/tests/kat/t_tracing.py index 12dcb5379c..bc7dd2ed47 100644 --- a/python/tests/kat/t_tracing.py +++ b/python/tests/kat/t_tracing.py @@ -766,11 +766,11 @@ def queries(self): for i in range(100): yield Query(self.url("target/"), phase=1) - - # ...then ask the Zipkin for services and spans. Including debug=True in these queries - # is particularly helpful. - yield Query("http://zipkin-v1:9411/api/v2/services", phase=check_phase) + # result 100 + yield Query("http://zipkin-v1:9411/api/v2/services", phase=check_phase) + # result 101 yield Query("http://zipkin-v1:9411/api/v2/spans?serviceName=tracingtestzipkinv1-default", phase=check_phase) + # result 102 yield Query("http://zipkin-v1:9411/api/v2/traces?serviceName=tracingtestzipkinv1-default", phase=check_phase) # The diagnostics page should load properly @@ -782,25 +782,15 @@ def check(self): assert result.backend assert result.backend.name == self.target.path.k8s - print(f"self.results[100] = {self.results[100]}") - assert self.results[100].backend is not None and self.results[100].backend.name == "raw", \ - f"unexpected self.results[100] = {self.results[100]}" - assert len(self.results[100].backend.response) == 1 - assert self.results[100].backend.response[0] == 'tracingtestzipkinv1-default' - - assert self.results[101].backend - assert self.results[101].backend.name == "raw" - - tracelist = { x: True for x in self.results[101].backend.response } + # verify no services were captured + services = self.results[100].json + assert len(services) == 0 - assert 'router cluster_tracingtestzipkinv1_http_default egress' in tracelist + # verify no spans were captured + spans = self.results[101].json + assert len(spans) == 0 - # Look for the host that we actually queried, since that's what appears in the spans. - assert self.results[0].backend - assert self.results[0].backend.request - assert self.results[0].backend.request.host in tracelist + # verify no traces were captured + traces = self.results[102].json + assert len(traces) == 0 - # Ensure we generate 128-bit traceids by default - trace = self.results[102].json[0][0] - traceId = trace['traceId'] - assert len(traceId) == 32 diff --git a/python/tests/unit/test_ambassador_module_validation.py b/python/tests/unit/test_ambassador_module_validation.py index 34c927f672..9589e7e1bb 100644 --- a/python/tests/unit/test_ambassador_module_validation.py +++ b/python/tests/unit/test_ambassador_module_validation.py @@ -153,3 +153,159 @@ def test_invalid_set_current_client_cert_details_value(): require_errors(r2["ir"], [ ( "ambassador.default.1", "'set_current_client_cert_details' value for key 'subject' may only be 'true' or 'false', not 'invalid'") ]) + +@pytest.mark.compilertest +def test_valid_grpc_stats_all_methods(): + yaml = """ +--- +apiVersion: getambassador.io/v3alpha1 +kind: Module +metadata: + name: ambassador + namespace: default +spec: + config: + grpc_stats: + all_methods: true +""" + + cache = Cache(logger) + r1 = Compile(logger, yaml, k8s=True) + r2 = Compile(logger, yaml, k8s=True, cache=cache) + + require_no_errors(r1["ir"]) + require_no_errors(r2["ir"]) + + ir = r1["ir"].as_dict() + stats_filters = [f for f in ir["filters"] if f["name"] == "grpc_stats"] + assert len(stats_filters) == 1 + assert stats_filters[0]["config"] == { + 'enable_upstream_stats': False, + 'stats_for_all_methods': True + } + + +@pytest.mark.compilertest +def test_valid_grpc_stats_services(): + yaml = """ +--- +apiVersion: getambassador.io/v3alpha1 +kind: Module +metadata: + name: ambassador + namespace: default +spec: + config: + grpc_stats: + services: + - name: echo.EchoService + method_names: [Echo] +""" + + cache = Cache(logger) + r1 = Compile(logger, yaml, k8s=True) + r2 = Compile(logger, yaml, k8s=True, cache=cache) + + require_no_errors(r1["ir"]) + require_no_errors(r2["ir"]) + + ir = r1["ir"].as_dict() + stats_filters = [f for f in ir["filters"] if f["name"] == "grpc_stats"] + assert len(stats_filters) == 1 + assert stats_filters[0]["config"] == { + 'enable_upstream_stats': False, + 'individual_method_stats_allowlist': { + 'services': [ + { + 'name': 'echo.EchoService', + 'method_names': ['Echo'] + + } + ] + } + } + +@pytest.mark.compilertest +def test_valid_grpc_stats_upstream(): + yaml = """ +--- +apiVersion: getambassador.io/v3alpha1 +kind: Module +metadata: + name: ambassador + namespace: default +spec: + config: + grpc_stats: + upstream_stats: true +""" + + cache = Cache(logger) + r1 = Compile(logger, yaml, k8s=True) + r2 = Compile(logger, yaml, k8s=True, cache=cache) + + require_no_errors(r1["ir"]) + require_no_errors(r2["ir"]) + + ir = r1["ir"].as_dict() + stats_filters = [f for f in ir["filters"] if f["name"] == "grpc_stats"] + assert len(stats_filters) == 1 + assert stats_filters[0]["config"] == { + 'enable_upstream_stats': True, + 'stats_for_all_methods': False + } + +@pytest.mark.compilertest +def test_invalid_grpc_stats(): + yaml = """ +--- +apiVersion: getambassador.io/v3alpha1 +kind: Module +metadata: + name: ambassador + namespace: default +spec: + config: + grpc_stats: +""" + + cache = Cache(logger) + r1 = Compile(logger, yaml, k8s=True) + r2 = Compile(logger, yaml, k8s=True, cache=cache) + + require_no_errors(r1["ir"]) + require_no_errors(r2["ir"]) + + ir = r1["ir"].as_dict() + stats_filters = [f for f in ir["filters"] if f["name"] == "grpc_stats"] + assert len(stats_filters) == 0 + + +@pytest.mark.compilertest +def test_valid_grpc_stats_empty(): + yaml = """ +--- +apiVersion: getambassador.io/v3alpha1 +kind: Module +metadata: + name: ambassador + namespace: default +spec: + config: + grpc_stats: {} +""" + + cache = Cache(logger) + r1 = Compile(logger, yaml, k8s=True) + r2 = Compile(logger, yaml, k8s=True, cache=cache) + + require_no_errors(r1["ir"]) + require_no_errors(r2["ir"]) + + ir = r1["ir"].as_dict() + stats_filters = [f for f in ir["filters"] if f["name"] == "grpc_stats"] + assert len(stats_filters) == 1 + assert stats_filters[0]["config"] == { + 'enable_upstream_stats': False, + 'stats_for_all_methods': False + } diff --git a/python/tests/unit/test_tracing.py b/python/tests/unit/test_tracing.py index 50033e2dec..0a2a472240 100644 --- a/python/tests/unit/test_tracing.py +++ b/python/tests/unit/test_tracing.py @@ -16,10 +16,11 @@ logger = logging.getLogger("ambassador") -from ambassador import Config, IR -from ambassador.envoy import EnvoyConfig +from ambassador import Config, IR, EnvoyConfig from ambassador.fetch import ResourceFetcher -from ambassador.utils import SecretHandler, SecretInfo +from ambassador.utils import NullSecretHandler, SecretHandler, SecretInfo + +from tests.utils import default_listener_manifests if TYPE_CHECKING: from ambassador.ir.irresource import IRResource # pragma: no cover @@ -30,6 +31,22 @@ def load_secret(self, resource: 'IRResource', secret_name: str, namespace: str) TLSCerts["acook"].pubcert, TLSCerts["acook"].privkey, decode_b64=False) +def _get_envoy_config(yaml): + + aconf = Config() + fetcher = ResourceFetcher(logger, aconf) + fetcher.parse_yaml(default_listener_manifests() + yaml, k8s=True) + + aconf.load_all(fetcher.sorted()) + + secret_handler = NullSecretHandler(logger, None, None, "0") + + ir = IR(aconf, file_checker=lambda path: True, secret_handler=secret_handler) + + assert ir + return EnvoyConfig.generate(ir) + + def lightstep_tracing_service_manifest(): return """ --- @@ -83,36 +100,58 @@ def test_tracing_config_v3(tmp_path: Path): @pytest.mark.compilertest -def test_tracing_config_v2(tmp_path: Path): - aconf = Config() +def test_tracing_zipkin_defaults(): - yaml = module_and_mapping_manifests(None, []) + "\n" + lightstep_tracing_service_manifest() - fetcher = ResourceFetcher(logger, aconf) - fetcher.parse_yaml(yaml, k8s=True) - - aconf.load_all(fetcher.sorted()) - - secret_handler = MockSecretHandler(logger, "mockery", str(tmp_path/"ambassador"/"snapshots"), "v1") - ir = IR(aconf, file_checker=lambda path: True, secret_handler=secret_handler) - - assert ir + yaml = """ +--- +apiVersion: getambassador.io/v3alpha1 +kind: TracingService +metadata: + name: myts + namespace: default +spec: + service: zipkin-test:9411 + driver: zipkin +""" - econf = EnvoyConfig.generate(ir) + econf = _get_envoy_config(yaml) - bootstrap_config, ads_config, _ = econf.split_config() + bootstrap_config, _, _ = econf.split_config() assert "tracing" in bootstrap_config + assert bootstrap_config["tracing"] == { - "http": { - "name": "envoy.lightstep", - "typed_config": { - "@type": "type.googleapis.com/envoy.config.trace.v3.LightstepConfig", - "access_token_file": "/lightstep-credentials/access-token", - "collector_cluster": "cluster_tracing_lightstep_80_ambassador", - "propagation_modes": ["ENVOY", "TRACE_CONTEXT"] + 'http': { + 'name': 'envoy.zipkin', + 'typed_config': { + '@type': 'type.googleapis.com/envoy.config.trace.v3.ZipkinConfig', + 'collector_endpoint': '/api/v2/spans', + 'collector_endpoint_version': 'HTTP_JSON', + 'trace_id_128bit': True, + 'collector_cluster': 'cluster_tracing_zipkin_test_9411_default' + } } } - ads_config.pop('@type', None) - assert_valid_envoy_config(ads_config, extra_dirs=[str(tmp_path/"ambassador"/"snapshots")]) - assert_valid_envoy_config(bootstrap_config, extra_dirs=[str(tmp_path/"ambassador"/"snapshots")]) +@pytest.mark.compilertest +def test_tracing_zipkin_invalid_collector_version(): + """test to ensure that providing an improper value will result in an error and the tracer not included""" + + yaml = """ +--- +apiVersion: getambassador.io/v3alpha1 +kind: TracingService +metadata: + name: myts + namespace: default +spec: + service: zipkin-test:9411 + driver: zipkin + config: + collector_endpoint_version: "HTTP_JSON_V1" +""" + + econf = _get_envoy_config(yaml) + + bootstrap_config, _, _ = econf.split_config() + assert "tracing" not in bootstrap_config diff --git a/tools/src/crane/go.sum b/tools/src/crane/go.sum index 40d9c01f7b..27d0bc712c 100644 --- a/tools/src/crane/go.sum +++ b/tools/src/crane/go.sum @@ -258,6 +258,7 @@ github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/ github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -622,6 +623,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= @@ -714,6 +716,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -829,6 +832,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= 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= @@ -1089,10 +1093,12 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1276,9 +1282,12 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/cncf/udpa/go/udpa/annotations/types.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/types.go deleted file mode 100644 index c121ecdd84..0000000000 --- a/vendor/github.com/cncf/udpa/go/udpa/annotations/types.go +++ /dev/null @@ -1,41 +0,0 @@ -package udpa_annotations - - -import ( - xds "github.com/cncf/xds/go/udpa/annotations" -) - -type FieldSecurityAnnotation = xds.FieldSecurityAnnotation -type FieldSecurityAnnotationValidationError = xds.FieldSecurityAnnotationValidationError -type VersioningAnnotationValidationError = xds.VersioningAnnotationValidationError -type MigrateAnnotation = xds.MigrateAnnotation -type FieldMigrateAnnotation = xds.FieldMigrateAnnotation -type FileMigrateAnnotation = xds.FileMigrateAnnotation -type StatusAnnotationValidationError = xds.StatusAnnotationValidationError -type VersioningAnnotation = xds.VersioningAnnotation -type MigrateAnnotationValidationError = xds.MigrateAnnotationValidationError -type FieldMigrateAnnotationValidationError = xds.FieldMigrateAnnotationValidationError -type FileMigrateAnnotationValidationError = xds.FileMigrateAnnotationValidationError -type PackageVersionStatus = xds.PackageVersionStatus -type StatusAnnotation = xds.StatusAnnotation - -const ( - PackageVersionStatus_UNKNOWN PackageVersionStatus = xds.PackageVersionStatus_UNKNOWN - PackageVersionStatus_FROZEN PackageVersionStatus = xds.PackageVersionStatus_FROZEN - PackageVersionStatus_ACTIVE PackageVersionStatus = xds.PackageVersionStatus_ACTIVE - PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = xds.PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE -) -var PackageVersionStatus_name = xds.PackageVersionStatus_name -var PackageVersionStatus_value = xds.PackageVersionStatus_value - -var E_Security = xds.E_Security -var E_Sensitive = xds.E_Sensitive -var E_MessageMigrate = xds.E_MessageMigrate -var E_FieldMigrate = xds.E_FieldMigrate -var E_EnumMigrate = xds.E_EnumMigrate -var E_EnumValueMigrate = xds.E_EnumValueMigrate -var E_FileMigrate = xds.E_FileMigrate -var E_Versioning = xds.E_Versioning -var E_FileStatus = xds.E_FileStatus - - diff --git a/vendor/github.com/cncf/udpa/go/xds/core/v3/types.go b/vendor/github.com/cncf/udpa/go/xds/core/v3/types.go deleted file mode 100644 index e78583aab4..0000000000 --- a/vendor/github.com/cncf/udpa/go/xds/core/v3/types.go +++ /dev/null @@ -1,39 +0,0 @@ -package xds_core_v3 - - -import ( - xds "github.com/cncf/xds/go/xds/core/v3" -) - -type ResourceLocatorValidationError = xds.ResourceLocatorValidationError -type ResourceLocator_DirectiveValidationError = xds.ResourceLocator_DirectiveValidationError -type ContextParamsValidationError = xds.ContextParamsValidationError -type Resource = xds.Resource -type CollectionEntry = xds.CollectionEntry -type CollectionEntry_Locator = xds.CollectionEntry_Locator -type CollectionEntry_InlineEntry_ = xds.CollectionEntry_InlineEntry_ -type CollectionEntry_InlineEntry = xds.CollectionEntry_InlineEntry -type ResourceLocator_Scheme = xds.ResourceLocator_Scheme -type ResourceLocator = xds.ResourceLocator -type ResourceLocator_ExactContext = xds.ResourceLocator_ExactContext -type ResourceLocator_Directive = xds.ResourceLocator_Directive -type ResourceLocator_Directive_Alt = xds.ResourceLocator_Directive_Alt -type ResourceLocator_Directive_Entry = xds.ResourceLocator_Directive_Entry -type ResourceName = xds.ResourceName -type ResourceNameValidationError = xds.ResourceNameValidationError -type Authority = xds.Authority -type ResourceValidationError = xds.ResourceValidationError -type AuthorityValidationError = xds.AuthorityValidationError -type CollectionEntryValidationError = xds.CollectionEntryValidationError -type CollectionEntry_InlineEntryValidationError = xds.CollectionEntry_InlineEntryValidationError -type ContextParams = xds.ContextParams - -const ( - ResourceLocator_XDSTP ResourceLocator_Scheme = xds.ResourceLocator_XDSTP - ResourceLocator_HTTP ResourceLocator_Scheme = xds.ResourceLocator_HTTP - ResourceLocator_FILE ResourceLocator_Scheme = xds.ResourceLocator_FILE -) - -var ResourceLocator_Scheme_name = xds.ResourceLocator_Scheme_name - -var ResourceLocator_Scheme_value = xds.ResourceLocator_Scheme_name \ No newline at end of file diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go new file mode 100644 index 0000000000..1a38ba2b42 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go @@ -0,0 +1,261 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/ip.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type IPMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*IPMatcher_IPRangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *IPMatcher) Reset() { + *x = IPMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPMatcher) ProtoMessage() {} + +func (x *IPMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPMatcher.ProtoReflect.Descriptor instead. +func (*IPMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0} +} + +func (x *IPMatcher) GetRangeMatchers() []*IPMatcher_IPRangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type IPMatcher_IPRangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"` +} + +func (x *IPMatcher_IPRangeMatcher) Reset() { + *x = IPMatcher_IPRangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPMatcher_IPRangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPMatcher_IPRangeMatcher) ProtoMessage() {} + +func (x *IPMatcher_IPRangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPMatcher_IPRangeMatcher.ProtoReflect.Descriptor instead. +func (*IPMatcher_IPRangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *IPMatcher_IPRangeMatcher) GetRanges() []*v3.CidrRange { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *IPMatcher_IPRangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +func (x *IPMatcher_IPRangeMatcher) GetExclusive() bool { + if x != nil { + return x.Exclusive + } + return false +} + +var File_xds_type_matcher_v3_ip_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_ip_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, + 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x63, 0x69, 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, + 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x09, 0x49, 0x50, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x49, + 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0xa9, 0x01, 0x0a, + 0x0e, 0x49, 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, + 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x42, 0x66, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x49, 0x50, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, + 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_ip_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_ip_proto_rawDescData = file_xds_type_matcher_v3_ip_proto_rawDesc +) + +func file_xds_type_matcher_v3_ip_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_ip_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_ip_proto_rawDescData) + }) + return file_xds_type_matcher_v3_ip_proto_rawDescData +} + +var file_xds_type_matcher_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_matcher_v3_ip_proto_goTypes = []interface{}{ + (*IPMatcher)(nil), // 0: xds.type.matcher.v3.IPMatcher + (*IPMatcher_IPRangeMatcher)(nil), // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher + (*v3.CidrRange)(nil), // 2: xds.core.v3.CidrRange + (*Matcher_OnMatch)(nil), // 3: xds.type.matcher.v3.Matcher.OnMatch +} +var file_xds_type_matcher_v3_ip_proto_depIdxs = []int32{ + 1, // 0: xds.type.matcher.v3.IPMatcher.range_matchers:type_name -> xds.type.matcher.v3.IPMatcher.IPRangeMatcher + 2, // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.ranges:type_name -> xds.core.v3.CidrRange + 3, // 2: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_ip_proto_init() } +func file_xds_type_matcher_v3_ip_proto_init() { + if File_xds_type_matcher_v3_ip_proto != nil { + return + } + file_xds_type_matcher_v3_matcher_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IPMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_ip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IPMatcher_IPRangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_ip_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_ip_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_ip_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_ip_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_ip_proto = out.File + file_xds_type_matcher_v3_ip_proto_rawDesc = nil + file_xds_type_matcher_v3_ip_proto_goTypes = nil + file_xds_type_matcher_v3_ip_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go new file mode 100644 index 0000000000..44c4372744 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go @@ -0,0 +1,214 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/ip.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on IPMatcher with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *IPMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IPMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// IPMatcherValidationError is the validation error returned by +// IPMatcher.Validate if the designated constraints aren't met. +type IPMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IPMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IPMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IPMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IPMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IPMatcherValidationError) ErrorName() string { return "IPMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e IPMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sIPMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IPMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IPMatcherValidationError{} + +// Validate checks the field values on IPMatcher_IPRangeMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *IPMatcher_IPRangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return IPMatcher_IPRangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IPMatcher_IPRangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IPMatcher_IPRangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Exclusive + + return nil +} + +// IPMatcher_IPRangeMatcherValidationError is the validation error returned by +// IPMatcher_IPRangeMatcher.Validate if the designated constraints aren't met. +type IPMatcher_IPRangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IPMatcher_IPRangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IPMatcher_IPRangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IPMatcher_IPRangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IPMatcher_IPRangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IPMatcher_IPRangeMatcherValidationError) ErrorName() string { + return "IPMatcher_IPRangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e IPMatcher_IPRangeMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sIPMatcher_IPRangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IPMatcher_IPRangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IPMatcher_IPRangeMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go new file mode 100644 index 0000000000..6b912e5086 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go @@ -0,0 +1,1060 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/matcher.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Matcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatcherType: + // *Matcher_MatcherList_ + // *Matcher_MatcherTree_ + MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` + OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"` +} + +func (x *Matcher) Reset() { + *x = Matcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher) ProtoMessage() {} + +func (x *Matcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher.ProtoReflect.Descriptor instead. +func (*Matcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0} +} + +func (m *Matcher) GetMatcherType() isMatcher_MatcherType { + if m != nil { + return m.MatcherType + } + return nil +} + +func (x *Matcher) GetMatcherList() *Matcher_MatcherList { + if x, ok := x.GetMatcherType().(*Matcher_MatcherList_); ok { + return x.MatcherList + } + return nil +} + +func (x *Matcher) GetMatcherTree() *Matcher_MatcherTree { + if x, ok := x.GetMatcherType().(*Matcher_MatcherTree_); ok { + return x.MatcherTree + } + return nil +} + +func (x *Matcher) GetOnNoMatch() *Matcher_OnMatch { + if x != nil { + return x.OnNoMatch + } + return nil +} + +type isMatcher_MatcherType interface { + isMatcher_MatcherType() +} + +type Matcher_MatcherList_ struct { + MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"` +} + +type Matcher_MatcherTree_ struct { + MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"` +} + +func (*Matcher_MatcherList_) isMatcher_MatcherType() {} + +func (*Matcher_MatcherTree_) isMatcher_MatcherType() {} + +type Matcher_OnMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to OnMatch: + // *Matcher_OnMatch_Matcher + // *Matcher_OnMatch_Action + OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` +} + +func (x *Matcher_OnMatch) Reset() { + *x = Matcher_OnMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_OnMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_OnMatch) ProtoMessage() {} + +func (x *Matcher_OnMatch) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_OnMatch.ProtoReflect.Descriptor instead. +func (*Matcher_OnMatch) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *Matcher_OnMatch) GetOnMatch() isMatcher_OnMatch_OnMatch { + if m != nil { + return m.OnMatch + } + return nil +} + +func (x *Matcher_OnMatch) GetMatcher() *Matcher { + if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Matcher); ok { + return x.Matcher + } + return nil +} + +func (x *Matcher_OnMatch) GetAction() *v3.TypedExtensionConfig { + if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Action); ok { + return x.Action + } + return nil +} + +type isMatcher_OnMatch_OnMatch interface { + isMatcher_OnMatch_OnMatch() +} + +type Matcher_OnMatch_Matcher struct { + Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"` +} + +type Matcher_OnMatch_Action struct { + Action *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"` +} + +func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {} + +func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {} + +type Matcher_MatcherList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"` +} + +func (x *Matcher_MatcherList) Reset() { + *x = Matcher_MatcherList{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList) ProtoMessage() {} + +func (x *Matcher_MatcherList) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher { + if x != nil { + return x.Matchers + } + return nil +} + +type Matcher_MatcherTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + // Types that are assignable to TreeType: + // *Matcher_MatcherTree_ExactMatchMap + // *Matcher_MatcherTree_PrefixMatchMap + // *Matcher_MatcherTree_CustomMatch + TreeType isMatcher_MatcherTree_TreeType `protobuf_oneof:"tree_type"` +} + +func (x *Matcher_MatcherTree) Reset() { + *x = Matcher_MatcherTree{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherTree) ProtoMessage() {} + +func (x *Matcher_MatcherTree) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherTree.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherTree) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Matcher_MatcherTree) GetInput() *v3.TypedExtensionConfig { + if x != nil { + return x.Input + } + return nil +} + +func (m *Matcher_MatcherTree) GetTreeType() isMatcher_MatcherTree_TreeType { + if m != nil { + return m.TreeType + } + return nil +} + +func (x *Matcher_MatcherTree) GetExactMatchMap() *Matcher_MatcherTree_MatchMap { + if x, ok := x.GetTreeType().(*Matcher_MatcherTree_ExactMatchMap); ok { + return x.ExactMatchMap + } + return nil +} + +func (x *Matcher_MatcherTree) GetPrefixMatchMap() *Matcher_MatcherTree_MatchMap { + if x, ok := x.GetTreeType().(*Matcher_MatcherTree_PrefixMatchMap); ok { + return x.PrefixMatchMap + } + return nil +} + +func (x *Matcher_MatcherTree) GetCustomMatch() *v3.TypedExtensionConfig { + if x, ok := x.GetTreeType().(*Matcher_MatcherTree_CustomMatch); ok { + return x.CustomMatch + } + return nil +} + +type isMatcher_MatcherTree_TreeType interface { + isMatcher_MatcherTree_TreeType() +} + +type Matcher_MatcherTree_ExactMatchMap struct { + ExactMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,2,opt,name=exact_match_map,json=exactMatchMap,proto3,oneof"` +} + +type Matcher_MatcherTree_PrefixMatchMap struct { + PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"` +} + +type Matcher_MatcherTree_CustomMatch struct { + CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"` +} + +func (*Matcher_MatcherTree_ExactMatchMap) isMatcher_MatcherTree_TreeType() {} + +func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {} + +func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {} + +type Matcher_MatcherList_Predicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatchType: + // *Matcher_MatcherList_Predicate_SinglePredicate_ + // *Matcher_MatcherList_Predicate_OrMatcher + // *Matcher_MatcherList_Predicate_AndMatcher + // *Matcher_MatcherList_Predicate_NotMatcher + MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"` +} + +func (x *Matcher_MatcherList_Predicate) Reset() { + *x = Matcher_MatcherList_Predicate{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_Predicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_Predicate) ProtoMessage() {} + +func (x *Matcher_MatcherList_Predicate) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_Predicate.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_Predicate) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0} +} + +func (m *Matcher_MatcherList_Predicate) GetMatchType() isMatcher_MatcherList_Predicate_MatchType { + if m != nil { + return m.MatchType + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetSinglePredicate() *Matcher_MatcherList_Predicate_SinglePredicate { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_SinglePredicate_); ok { + return x.SinglePredicate + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetOrMatcher() *Matcher_MatcherList_Predicate_PredicateList { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_OrMatcher); ok { + return x.OrMatcher + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Predicate_PredicateList { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_AndMatcher); ok { + return x.AndMatcher + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetNotMatcher() *Matcher_MatcherList_Predicate { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_NotMatcher); ok { + return x.NotMatcher + } + return nil +} + +type isMatcher_MatcherList_Predicate_MatchType interface { + isMatcher_MatcherList_Predicate_MatchType() +} + +type Matcher_MatcherList_Predicate_SinglePredicate_ struct { + SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_OrMatcher struct { + OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_AndMatcher struct { + AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_NotMatcher struct { + NotMatcher *Matcher_MatcherList_Predicate `protobuf:"bytes,4,opt,name=not_matcher,json=notMatcher,proto3,oneof"` +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {} + +func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {} + +func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {} + +func (*Matcher_MatcherList_Predicate_NotMatcher) isMatcher_MatcherList_Predicate_MatchType() {} + +type Matcher_MatcherList_FieldMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *Matcher_MatcherList_FieldMatcher) Reset() { + *x = Matcher_MatcherList_FieldMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_FieldMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_FieldMatcher) ProtoMessage() {} + +func (x *Matcher_MatcherList_FieldMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_FieldMatcher.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_FieldMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 1} +} + +func (x *Matcher_MatcherList_FieldMatcher) GetPredicate() *Matcher_MatcherList_Predicate { + if x != nil { + return x.Predicate + } + return nil +} + +func (x *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +type Matcher_MatcherList_Predicate_SinglePredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + // Types that are assignable to Matcher: + // *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch + // *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch + Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"` +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) Reset() { + *x = Matcher_MatcherList_Predicate_SinglePredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate) ProtoMessage() {} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_Predicate_SinglePredicate.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_Predicate_SinglePredicate) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 0} +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetInput() *v3.TypedExtensionConfig { + if x != nil { + return x.Input + } + return nil +} + +func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetMatcher() isMatcher_MatcherList_Predicate_SinglePredicate_Matcher { + if m != nil { + return m.Matcher + } + return nil +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetValueMatch() *StringMatcher { + if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch); ok { + return x.ValueMatch + } + return nil +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetCustomMatch() *v3.TypedExtensionConfig { + if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch); ok { + return x.CustomMatch + } + return nil +} + +type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface { + isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() +} + +type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct { + ValueMatch *StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct { + CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"` +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { +} + +type Matcher_MatcherList_Predicate_PredicateList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"` +} + +func (x *Matcher_MatcherList_Predicate_PredicateList) Reset() { + *x = Matcher_MatcherList_Predicate_PredicateList{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_Predicate_PredicateList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_Predicate_PredicateList) ProtoMessage() {} + +func (x *Matcher_MatcherList_Predicate_PredicateList) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_Predicate_PredicateList.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_Predicate_PredicateList) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 1} +} + +func (x *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_MatcherList_Predicate { + if x != nil { + return x.Predicate + } + return nil +} + +type Matcher_MatcherTree_MatchMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Map map[string]*Matcher_OnMatch `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Matcher_MatcherTree_MatchMap) Reset() { + *x = Matcher_MatcherTree_MatchMap{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherTree_MatchMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherTree_MatchMap) ProtoMessage() {} + +func (x *Matcher_MatcherTree_MatchMap) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherTree_MatchMap.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherTree_MatchMap) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2, 0} +} + +func (x *Matcher_MatcherTree_MatchMap) GetMap() map[string]*Matcher_OnMatch { + if x != nil { + return x.Map + } + return nil +} + +var File_xds_type_matcher_v3_matcher_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_matcher_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x80, 0x10, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4d, 0x0a, + 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, + 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x0c, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x0b, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x6f, + 0x6e, 0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x09, 0x6f, 0x6e, 0x4e, 0x6f, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x1a, 0x91, 0x01, 0x0a, 0x07, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x38, 0x0a, + 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xb6, 0x08, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, + 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x73, 0x1a, 0x91, 0x06, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x12, 0x6f, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x78, 0x64, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, + 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x72, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x0b, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x78, 0x64, 0x73, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, + 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x1a, 0xf3, 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, + 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x46, + 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x6b, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x64, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xb5, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x64, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xa9, + 0x04, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x41, + 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x12, 0x5b, 0x0a, 0x0f, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, + 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x5d, + 0x0a, 0x10, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, + 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, + 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x46, 0x0a, + 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xc0, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, + 0x61, 0x70, 0x12, 0x56, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, + 0x61, 0x70, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x9a, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x1a, 0x5c, 0x0a, 0x08, 0x4d, 0x61, + 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, + 0x06, 0x02, 0x08, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x42, 0x5c, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, + 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, + 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_matcher_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_matcher_proto_rawDescData = file_xds_type_matcher_v3_matcher_proto_rawDesc +) + +func file_xds_type_matcher_v3_matcher_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_matcher_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_matcher_proto_rawDescData) + }) + return file_xds_type_matcher_v3_matcher_proto_rawDescData +} + +var file_xds_type_matcher_v3_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_xds_type_matcher_v3_matcher_proto_goTypes = []interface{}{ + (*Matcher)(nil), // 0: xds.type.matcher.v3.Matcher + (*Matcher_OnMatch)(nil), // 1: xds.type.matcher.v3.Matcher.OnMatch + (*Matcher_MatcherList)(nil), // 2: xds.type.matcher.v3.Matcher.MatcherList + (*Matcher_MatcherTree)(nil), // 3: xds.type.matcher.v3.Matcher.MatcherTree + (*Matcher_MatcherList_Predicate)(nil), // 4: xds.type.matcher.v3.Matcher.MatcherList.Predicate + (*Matcher_MatcherList_FieldMatcher)(nil), // 5: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher + (*Matcher_MatcherList_Predicate_SinglePredicate)(nil), // 6: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate + (*Matcher_MatcherList_Predicate_PredicateList)(nil), // 7: xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList + (*Matcher_MatcherTree_MatchMap)(nil), // 8: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap + nil, // 9: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry + (*v3.TypedExtensionConfig)(nil), // 10: xds.core.v3.TypedExtensionConfig + (*StringMatcher)(nil), // 11: xds.type.matcher.v3.StringMatcher +} +var file_xds_type_matcher_v3_matcher_proto_depIdxs = []int32{ + 2, // 0: xds.type.matcher.v3.Matcher.matcher_list:type_name -> xds.type.matcher.v3.Matcher.MatcherList + 3, // 1: xds.type.matcher.v3.Matcher.matcher_tree:type_name -> xds.type.matcher.v3.Matcher.MatcherTree + 1, // 2: xds.type.matcher.v3.Matcher.on_no_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 0, // 3: xds.type.matcher.v3.Matcher.OnMatch.matcher:type_name -> xds.type.matcher.v3.Matcher + 10, // 4: xds.type.matcher.v3.Matcher.OnMatch.action:type_name -> xds.core.v3.TypedExtensionConfig + 5, // 5: xds.type.matcher.v3.Matcher.MatcherList.matchers:type_name -> xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher + 10, // 6: xds.type.matcher.v3.Matcher.MatcherTree.input:type_name -> xds.core.v3.TypedExtensionConfig + 8, // 7: xds.type.matcher.v3.Matcher.MatcherTree.exact_match_map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap + 8, // 8: xds.type.matcher.v3.Matcher.MatcherTree.prefix_match_map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap + 10, // 9: xds.type.matcher.v3.Matcher.MatcherTree.custom_match:type_name -> xds.core.v3.TypedExtensionConfig + 6, // 10: xds.type.matcher.v3.Matcher.MatcherList.Predicate.single_predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate + 7, // 11: xds.type.matcher.v3.Matcher.MatcherList.Predicate.or_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList + 7, // 12: xds.type.matcher.v3.Matcher.MatcherList.Predicate.and_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList + 4, // 13: xds.type.matcher.v3.Matcher.MatcherList.Predicate.not_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate + 4, // 14: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher.predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate + 1, // 15: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 10, // 16: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.input:type_name -> xds.core.v3.TypedExtensionConfig + 11, // 17: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.value_match:type_name -> xds.type.matcher.v3.StringMatcher + 10, // 18: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.custom_match:type_name -> xds.core.v3.TypedExtensionConfig + 4, // 19: xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList.predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate + 9, // 20: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry + 1, // 21: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry.value:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_matcher_proto_init() } +func file_xds_type_matcher_v3_matcher_proto_init() { + if File_xds_type_matcher_v3_matcher_proto != nil { + return + } + file_xds_type_matcher_v3_string_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_OnMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_Predicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_FieldMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_Predicate_SinglePredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_Predicate_PredicateList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherTree_MatchMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Matcher_MatcherList_)(nil), + (*Matcher_MatcherTree_)(nil), + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Matcher_OnMatch_Matcher)(nil), + (*Matcher_OnMatch_Action)(nil), + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Matcher_MatcherTree_ExactMatchMap)(nil), + (*Matcher_MatcherTree_PrefixMatchMap)(nil), + (*Matcher_MatcherTree_CustomMatch)(nil), + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*Matcher_MatcherList_Predicate_SinglePredicate_)(nil), + (*Matcher_MatcherList_Predicate_OrMatcher)(nil), + (*Matcher_MatcherList_Predicate_AndMatcher)(nil), + (*Matcher_MatcherList_Predicate_NotMatcher)(nil), + } + file_xds_type_matcher_v3_matcher_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch)(nil), + (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_matcher_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_matcher_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_matcher_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_matcher_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_matcher_proto = out.File + file_xds_type_matcher_v3_matcher_proto_rawDesc = nil + file_xds_type_matcher_v3_matcher_proto_goTypes = nil + file_xds_type_matcher_v3_matcher_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/config/common/matcher/v4alpha/matcher.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go similarity index 63% rename from pkg/api/envoy/config/common/matcher/v4alpha/matcher.pb.validate.go rename to vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go index f8da49b760..3175b856b6 100644 --- a/pkg/api/envoy/config/common/matcher/v4alpha/matcher.pb.validate.go +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/common/matcher/v4alpha/matcher.proto +// source: xds/type/matcher/v3/matcher.proto -package envoy_config_common_matcher_v4alpha +package v3 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,7 +30,7 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} ) // Validate checks the field values on Matcher with the rules defined in the @@ -76,12 +76,6 @@ func (m *Matcher) Validate() error { } } - default: - return MatcherValidationError{ - field: "MatcherType", - reason: "value is required", - } - } return nil @@ -141,369 +135,6 @@ var _ interface { ErrorName() string } = MatcherValidationError{} -// Validate checks the field values on MatchPredicate with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *MatchPredicate) Validate() error { - if m == nil { - return nil - } - - switch m.Rule.(type) { - - case *MatchPredicate_OrMatch: - - if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "OrMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_AndMatch: - - if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "AndMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_NotMatch: - - if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "NotMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_AnyMatch: - - if m.GetAnyMatch() != true { - return MatchPredicateValidationError{ - field: "AnyMatch", - reason: "value must equal true", - } - } - - case *MatchPredicate_HttpRequestHeadersMatch: - - if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpRequestHeadersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpRequestTrailersMatch: - - if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpRequestTrailersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpResponseHeadersMatch: - - if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpResponseHeadersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpResponseTrailersMatch: - - if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpResponseTrailersMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpRequestGenericBodyMatch: - - if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpRequestGenericBodyMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MatchPredicate_HttpResponseGenericBodyMatch: - - if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatchPredicateValidationError{ - field: "HttpResponseGenericBodyMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - return MatchPredicateValidationError{ - field: "Rule", - reason: "value is required", - } - - } - - return nil -} - -// MatchPredicateValidationError is the validation error returned by -// MatchPredicate.Validate if the designated constraints aren't met. -type MatchPredicateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MatchPredicateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MatchPredicateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MatchPredicateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MatchPredicateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MatchPredicateValidationError) ErrorName() string { return "MatchPredicateValidationError" } - -// Error satisfies the builtin error interface -func (e MatchPredicateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatchPredicate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MatchPredicateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MatchPredicateValidationError{} - -// Validate checks the field values on HttpHeadersMatch with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *HttpHeadersMatch) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpHeadersMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// HttpHeadersMatchValidationError is the validation error returned by -// HttpHeadersMatch.Validate if the designated constraints aren't met. -type HttpHeadersMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpHeadersMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpHeadersMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpHeadersMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpHeadersMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpHeadersMatchValidationError) ErrorName() string { return "HttpHeadersMatchValidationError" } - -// Error satisfies the builtin error interface -func (e HttpHeadersMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpHeadersMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpHeadersMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpHeadersMatchValidationError{} - -// Validate checks the field values on HttpGenericBodyMatch with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *HttpGenericBodyMatch) Validate() error { - if m == nil { - return nil - } - - // no validation rules for BytesLimit - - if len(m.GetPatterns()) < 1 { - return HttpGenericBodyMatchValidationError{ - 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 HttpGenericBodyMatchValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// HttpGenericBodyMatchValidationError is the validation error returned by -// HttpGenericBodyMatch.Validate if the designated constraints aren't met. -type HttpGenericBodyMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpGenericBodyMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpGenericBodyMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpGenericBodyMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpGenericBodyMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpGenericBodyMatchValidationError) ErrorName() string { - return "HttpGenericBodyMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpGenericBodyMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpGenericBodyMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpGenericBodyMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpGenericBodyMatchValidationError{} - // Validate checks the field values on Matcher_OnMatch with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. @@ -868,6 +499,18 @@ func (m *Matcher_MatcherList_Predicate) Validate() error { } } + case *Matcher_MatcherList_Predicate_NotMatcher: + + if v, ok := interface{}(m.GetNotMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_PredicateValidationError{ + field: "NotMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: return Matcher_MatcherList_PredicateValidationError{ field: "MatchType", @@ -1341,188 +984,3 @@ var _ interface { Cause() error ErrorName() string } = Matcher_MatcherTree_MatchMapValidationError{} - -// Validate checks the field values on MatchPredicate_MatchSet with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *MatchPredicate_MatchSet) Validate() error { - if m == nil { - return nil - } - - if len(m.GetRules()) < 2 { - return MatchPredicate_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 MatchPredicate_MatchSetValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - return nil -} - -// MatchPredicate_MatchSetValidationError is the validation error returned by -// MatchPredicate_MatchSet.Validate if the designated constraints aren't met. -type MatchPredicate_MatchSetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MatchPredicate_MatchSetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MatchPredicate_MatchSetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MatchPredicate_MatchSetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MatchPredicate_MatchSetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MatchPredicate_MatchSetValidationError) ErrorName() string { - return "MatchPredicate_MatchSetValidationError" -} - -// Error satisfies the builtin error interface -func (e MatchPredicate_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 %sMatchPredicate_MatchSet.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MatchPredicate_MatchSetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MatchPredicate_MatchSetValidationError{} - -// Validate checks the field values on HttpGenericBodyMatch_GenericTextMatch -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *HttpGenericBodyMatch_GenericTextMatch) Validate() error { - if m == nil { - return nil - } - - switch m.Rule.(type) { - - case *HttpGenericBodyMatch_GenericTextMatch_StringMatch: - - if utf8.RuneCountInString(m.GetStringMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ - field: "StringMatch", - reason: "value length must be at least 1 runes", - } - } - - case *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch: - - if len(m.GetBinaryMatch()) < 1 { - return HttpGenericBodyMatch_GenericTextMatchValidationError{ - field: "BinaryMatch", - reason: "value length must be at least 1 bytes", - } - } - - default: - return HttpGenericBodyMatch_GenericTextMatchValidationError{ - field: "Rule", - reason: "value is required", - } - - } - - return nil -} - -// HttpGenericBodyMatch_GenericTextMatchValidationError is the validation error -// returned by HttpGenericBodyMatch_GenericTextMatch.Validate if the -// designated constraints aren't met. -type HttpGenericBodyMatch_GenericTextMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) ErrorName() string { - return "HttpGenericBodyMatch_GenericTextMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpGenericBodyMatch_GenericTextMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpGenericBodyMatch_GenericTextMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpGenericBodyMatch_GenericTextMatchValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go new file mode 100644 index 0000000000..f7e053348c --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go @@ -0,0 +1,544 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/range.proto + +package v3 + +import ( + v3 "github.com/cncf/xds/go/xds/type/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Int64RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*Int64RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *Int64RangeMatcher) Reset() { + *x = Int64RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64RangeMatcher) ProtoMessage() {} + +func (x *Int64RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int64RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0} +} + +func (x *Int64RangeMatcher) GetRangeMatchers() []*Int64RangeMatcher_RangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type Int32RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*Int32RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *Int32RangeMatcher) Reset() { + *x = Int32RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32RangeMatcher) ProtoMessage() {} + +func (x *Int32RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int32RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1} +} + +func (x *Int32RangeMatcher) GetRangeMatchers() []*Int32RangeMatcher_RangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type DoubleRangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*DoubleRangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *DoubleRangeMatcher) Reset() { + *x = DoubleRangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRangeMatcher) ProtoMessage() {} + +func (x *DoubleRangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRangeMatcher.ProtoReflect.Descriptor instead. +func (*DoubleRangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2} +} + +func (x *DoubleRangeMatcher) GetRangeMatchers() []*DoubleRangeMatcher_RangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type Int64RangeMatcher_RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.Int64Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *Int64RangeMatcher_RangeMatcher) Reset() { + *x = Int64RangeMatcher_RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64RangeMatcher_RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64RangeMatcher_RangeMatcher) ProtoMessage() {} + +func (x *Int64RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int64RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Int64RangeMatcher_RangeMatcher) GetRanges() []*v3.Int64Range { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *Int64RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +type Int32RangeMatcher_RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.Int32Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *Int32RangeMatcher_RangeMatcher) Reset() { + *x = Int32RangeMatcher_RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32RangeMatcher_RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32RangeMatcher_RangeMatcher) ProtoMessage() {} + +func (x *Int32RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int32RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Int32RangeMatcher_RangeMatcher) GetRanges() []*v3.Int32Range { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *Int32RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +type DoubleRangeMatcher_RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.DoubleRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *DoubleRangeMatcher_RangeMatcher) Reset() { + *x = DoubleRangeMatcher_RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRangeMatcher_RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRangeMatcher_RangeMatcher) ProtoMessage() {} + +func (x *DoubleRangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. +func (*DoubleRangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *DoubleRangeMatcher_RangeMatcher) GetRanges() []*v3.DoubleRange { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *DoubleRangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +var File_xds_type_matcher_v3_range_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_range_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x11, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, + 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, + 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xfc, 0x01, 0x0a, 0x11, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, 0x0a, + 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, + 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xff, 0x01, 0x0a, 0x12, 0x44, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x5b, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8b, 0x01, + 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3a, + 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, + 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x5a, 0x0a, 0x1e, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_range_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_range_proto_rawDescData = file_xds_type_matcher_v3_range_proto_rawDesc +) + +func file_xds_type_matcher_v3_range_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_range_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_range_proto_rawDescData) + }) + return file_xds_type_matcher_v3_range_proto_rawDescData +} + +var file_xds_type_matcher_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_xds_type_matcher_v3_range_proto_goTypes = []interface{}{ + (*Int64RangeMatcher)(nil), // 0: xds.type.matcher.v3.Int64RangeMatcher + (*Int32RangeMatcher)(nil), // 1: xds.type.matcher.v3.Int32RangeMatcher + (*DoubleRangeMatcher)(nil), // 2: xds.type.matcher.v3.DoubleRangeMatcher + (*Int64RangeMatcher_RangeMatcher)(nil), // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher + (*Int32RangeMatcher_RangeMatcher)(nil), // 4: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher + (*DoubleRangeMatcher_RangeMatcher)(nil), // 5: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher + (*v3.Int64Range)(nil), // 6: xds.type.v3.Int64Range + (*Matcher_OnMatch)(nil), // 7: xds.type.matcher.v3.Matcher.OnMatch + (*v3.Int32Range)(nil), // 8: xds.type.v3.Int32Range + (*v3.DoubleRange)(nil), // 9: xds.type.v3.DoubleRange +} +var file_xds_type_matcher_v3_range_proto_depIdxs = []int32{ + 3, // 0: xds.type.matcher.v3.Int64RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher + 4, // 1: xds.type.matcher.v3.Int32RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher + 5, // 2: xds.type.matcher.v3.DoubleRangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher + 6, // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int64Range + 7, // 4: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 8, // 5: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int32Range + 7, // 6: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 9, // 7: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.DoubleRange + 7, // 8: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_range_proto_init() } +func file_xds_type_matcher_v3_range_proto_init() { + if File_xds_type_matcher_v3_range_proto != nil { + return + } + file_xds_type_matcher_v3_matcher_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64RangeMatcher_RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32RangeMatcher_RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRangeMatcher_RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_range_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_range_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_range_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_range_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_range_proto = out.File + file_xds_type_matcher_v3_range_proto_rawDesc = nil + file_xds_type_matcher_v3_range_proto_goTypes = nil + file_xds_type_matcher_v3_range_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go new file mode 100644 index 0000000000..00b7a03e8b --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/range.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on Int64RangeMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *Int64RangeMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int64RangeMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// Int64RangeMatcherValidationError is the validation error returned by +// Int64RangeMatcher.Validate if the designated constraints aren't met. +type Int64RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RangeMatcherValidationError) ErrorName() string { + return "Int64RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int64RangeMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInt64RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RangeMatcherValidationError{} + +// Validate checks the field values on Int32RangeMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *Int32RangeMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int32RangeMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// Int32RangeMatcherValidationError is the validation error returned by +// Int32RangeMatcher.Validate if the designated constraints aren't met. +type Int32RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int32RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int32RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int32RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int32RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int32RangeMatcherValidationError) ErrorName() string { + return "Int32RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int32RangeMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInt32RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int32RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int32RangeMatcherValidationError{} + +// Validate checks the field values on DoubleRangeMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *DoubleRangeMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DoubleRangeMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// DoubleRangeMatcherValidationError is the validation error returned by +// DoubleRangeMatcher.Validate if the designated constraints aren't met. +type DoubleRangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRangeMatcherValidationError) ErrorName() string { + return "DoubleRangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e DoubleRangeMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDoubleRangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRangeMatcherValidationError{} + +// Validate checks the field values on Int64RangeMatcher_RangeMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Int64RangeMatcher_RangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return Int64RangeMatcher_RangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int64RangeMatcher_RangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int64RangeMatcher_RangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// Int64RangeMatcher_RangeMatcherValidationError is the validation error +// returned by Int64RangeMatcher_RangeMatcher.Validate if the designated +// constraints aren't met. +type Int64RangeMatcher_RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RangeMatcher_RangeMatcherValidationError) ErrorName() string { + return "Int64RangeMatcher_RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int64RangeMatcher_RangeMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInt64RangeMatcher_RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RangeMatcher_RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RangeMatcher_RangeMatcherValidationError{} + +// Validate checks the field values on Int32RangeMatcher_RangeMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Int32RangeMatcher_RangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return Int32RangeMatcher_RangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int32RangeMatcher_RangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int32RangeMatcher_RangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// Int32RangeMatcher_RangeMatcherValidationError is the validation error +// returned by Int32RangeMatcher_RangeMatcher.Validate if the designated +// constraints aren't met. +type Int32RangeMatcher_RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int32RangeMatcher_RangeMatcherValidationError) ErrorName() string { + return "Int32RangeMatcher_RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int32RangeMatcher_RangeMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInt32RangeMatcher_RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int32RangeMatcher_RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int32RangeMatcher_RangeMatcherValidationError{} + +// Validate checks the field values on DoubleRangeMatcher_RangeMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *DoubleRangeMatcher_RangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return DoubleRangeMatcher_RangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DoubleRangeMatcher_RangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DoubleRangeMatcher_RangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// DoubleRangeMatcher_RangeMatcherValidationError is the validation error +// returned by DoubleRangeMatcher_RangeMatcher.Validate if the designated +// constraints aren't met. +type DoubleRangeMatcher_RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRangeMatcher_RangeMatcherValidationError) ErrorName() string { + return "DoubleRangeMatcher_RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e DoubleRangeMatcher_RangeMatcherValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDoubleRangeMatcher_RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRangeMatcher_RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRangeMatcher_RangeMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go new file mode 100644 index 0000000000..e64d9f5e42 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/regex.proto + +package v3 + +import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type RegexMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to EngineType: + // *RegexMatcher_GoogleRe2 + EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` + Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` +} + +func (x *RegexMatcher) Reset() { + *x = RegexMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegexMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegexMatcher) ProtoMessage() {} + +func (x *RegexMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead. +func (*RegexMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0} +} + +func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { + if m != nil { + return m.EngineType + } + return nil +} + +func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { + if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok { + return x.GoogleRe2 + } + return nil +} + +func (x *RegexMatcher) GetRegex() string { + if x != nil { + return x.Regex + } + return "" +} + +type isRegexMatcher_EngineType interface { + isRegexMatcher_EngineType() +} + +type RegexMatcher_GoogleRe2 struct { + GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` +} + +func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} + +type RegexMatcher_GoogleRE2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RegexMatcher_GoogleRE2) Reset() { + *x = RegexMatcher_GoogleRE2{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegexMatcher_GoogleRE2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegexMatcher_GoogleRE2) ProtoMessage() {} + +func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead. +func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0, 0} +} + +var File_xds_type_matcher_v3_regex_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_regex_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xa6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x56, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, + 0x32, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, 0x0b, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x52, 0x45, 0x32, 0x42, 0x12, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x5a, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, + 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_regex_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_regex_proto_rawDescData = file_xds_type_matcher_v3_regex_proto_rawDesc +) + +func file_xds_type_matcher_v3_regex_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_regex_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_regex_proto_rawDescData) + }) + return file_xds_type_matcher_v3_regex_proto_rawDescData +} + +var file_xds_type_matcher_v3_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_matcher_v3_regex_proto_goTypes = []interface{}{ + (*RegexMatcher)(nil), // 0: xds.type.matcher.v3.RegexMatcher + (*RegexMatcher_GoogleRE2)(nil), // 1: xds.type.matcher.v3.RegexMatcher.GoogleRE2 +} +var file_xds_type_matcher_v3_regex_proto_depIdxs = []int32{ + 1, // 0: xds.type.matcher.v3.RegexMatcher.google_re2:type_name -> xds.type.matcher.v3.RegexMatcher.GoogleRE2 + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_regex_proto_init() } +func file_xds_type_matcher_v3_regex_proto_init() { + if File_xds_type_matcher_v3_regex_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegexMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegexMatcher_GoogleRE2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_xds_type_matcher_v3_regex_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*RegexMatcher_GoogleRe2)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_regex_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_regex_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_regex_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_regex_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_regex_proto = out.File + file_xds_type_matcher_v3_regex_proto_rawDesc = nil + file_xds_type_matcher_v3_regex_proto_goTypes = nil + file_xds_type_matcher_v3_regex_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/type/matcher/v4alpha/regex.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go similarity index 62% rename from pkg/api/envoy/type/matcher/v4alpha/regex.pb.validate.go rename to vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go index 0c7c674bdd..83d789ee78 100644 --- a/pkg/api/envoy/type/matcher/v4alpha/regex.pb.validate.go +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/regex.proto +// source: xds/type/matcher/v3/regex.proto -package envoy_type_matcher_v4alpha +package v3 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,7 +30,7 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} ) // Validate checks the field values on RegexMatcher with the rules defined in @@ -134,92 +134,6 @@ var _ interface { 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 m.GetPattern() == nil { - return RegexMatchAndSubstituteValidationError{ - field: "Pattern", - reason: "value is required", - } - } - - 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. @@ -228,16 +142,6 @@ func (m *RegexMatcher_GoogleRE2) Validate() error { return nil } - if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedMaxProgramSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RegexMatcher_GoogleRE2ValidationError{ - field: "HiddenEnvoyDeprecatedMaxProgramSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - return nil } diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go new file mode 100644 index 0000000000..0df9e53266 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go @@ -0,0 +1,334 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/string.proto + +package v3 + +import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type StringMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatchPattern: + // *StringMatcher_Exact + // *StringMatcher_Prefix + // *StringMatcher_Suffix + // *StringMatcher_SafeRegex + // *StringMatcher_Contains + MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` + IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` +} + +func (x *StringMatcher) Reset() { + *x = StringMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringMatcher) ProtoMessage() {} + +func (x *StringMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead. +func (*StringMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{0} +} + +func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (x *StringMatcher) GetExact() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok { + return x.Exact + } + return "" +} + +func (x *StringMatcher) GetPrefix() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok { + return x.Prefix + } + return "" +} + +func (x *StringMatcher) GetSuffix() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok { + return x.Suffix + } + return "" +} + +func (x *StringMatcher) GetSafeRegex() *RegexMatcher { + if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok { + return x.SafeRegex + } + return nil +} + +func (x *StringMatcher) GetContains() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Contains); ok { + return x.Contains + } + return "" +} + +func (x *StringMatcher) GetIgnoreCase() bool { + if x != nil { + return x.IgnoreCase + } + return false +} + +type isStringMatcher_MatchPattern interface { + isStringMatcher_MatchPattern() +} + +type StringMatcher_Exact struct { + Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` +} + +type StringMatcher_Prefix struct { + Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` +} + +type StringMatcher_Suffix struct { + Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"` +} + +type StringMatcher_SafeRegex struct { + SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` +} + +type StringMatcher_Contains struct { + Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` +} + +func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {} + +type ListStringMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` +} + +func (x *ListStringMatcher) Reset() { + *x = ListStringMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStringMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStringMatcher) ProtoMessage() {} + +func (x *ListStringMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead. +func (*ListStringMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{1} +} + +func (x *ListStringMatcher) GetPatterns() []*StringMatcher { + if x != nil { + return x.Patterns + } + return nil +} + +var File_xds_type_matcher_v3_string_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_string_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, + 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x99, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, + 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x12, 0x4c, 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, + 0x25, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x5d, 0x0a, + 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x12, 0x48, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x42, 0x5b, 0x0a, 0x1e, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, + 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_xds_type_matcher_v3_string_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_string_proto_rawDescData = file_xds_type_matcher_v3_string_proto_rawDesc +) + +func file_xds_type_matcher_v3_string_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_string_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_string_proto_rawDescData) + }) + return file_xds_type_matcher_v3_string_proto_rawDescData +} + +var file_xds_type_matcher_v3_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_matcher_v3_string_proto_goTypes = []interface{}{ + (*StringMatcher)(nil), // 0: xds.type.matcher.v3.StringMatcher + (*ListStringMatcher)(nil), // 1: xds.type.matcher.v3.ListStringMatcher + (*RegexMatcher)(nil), // 2: xds.type.matcher.v3.RegexMatcher +} +var file_xds_type_matcher_v3_string_proto_depIdxs = []int32{ + 2, // 0: xds.type.matcher.v3.StringMatcher.safe_regex:type_name -> xds.type.matcher.v3.RegexMatcher + 0, // 1: xds.type.matcher.v3.ListStringMatcher.patterns:type_name -> xds.type.matcher.v3.StringMatcher + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_string_proto_init() } +func file_xds_type_matcher_v3_string_proto_init() { + if File_xds_type_matcher_v3_string_proto != nil { + return + } + file_xds_type_matcher_v3_regex_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStringMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_xds_type_matcher_v3_string_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*StringMatcher_Exact)(nil), + (*StringMatcher_Prefix)(nil), + (*StringMatcher_Suffix)(nil), + (*StringMatcher_SafeRegex)(nil), + (*StringMatcher_Contains)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_string_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_string_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_string_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_string_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_string_proto = out.File + file_xds_type_matcher_v3_string_proto_rawDesc = nil + file_xds_type_matcher_v3_string_proto_goTypes = nil + file_xds_type_matcher_v3_string_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/type/matcher/v4alpha/string.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go similarity index 97% rename from pkg/api/envoy/type/matcher/v4alpha/string.pb.validate.go rename to vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go index 3139c4baf8..4a83a7a4e5 100644 --- a/pkg/api/envoy/type/matcher/v4alpha/string.pb.validate.go +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v4alpha/string.proto +// source: xds/type/matcher/v3/string.proto -package envoy_type_matcher_v4alpha +package v3 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,7 +30,7 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} ) // Validate checks the field values on StringMatcher with the rules defined in diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go new file mode 100644 index 0000000000..883cd43bd3 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go @@ -0,0 +1,303 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/v3/range.proto + +package v3 + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Int64Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *Int64Range) Reset() { + *x = Int64Range{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_range_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64Range) ProtoMessage() {} + +func (x *Int64Range) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_range_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead. +func (*Int64Range) Descriptor() ([]byte, []int) { + return file_xds_type_v3_range_proto_rawDescGZIP(), []int{0} +} + +func (x *Int64Range) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Int64Range) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +type Int32Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *Int32Range) Reset() { + *x = Int32Range{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_range_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32Range) ProtoMessage() {} + +func (x *Int32Range) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_range_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead. +func (*Int32Range) Descriptor() ([]byte, []int) { + return file_xds_type_v3_range_proto_rawDescGZIP(), []int{1} +} + +func (x *Int32Range) GetStart() int32 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Int32Range) GetEnd() int32 { + if x != nil { + return x.End + } + return 0 +} + +type DoubleRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` + End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *DoubleRange) Reset() { + *x = DoubleRange{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_range_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRange) ProtoMessage() {} + +func (x *DoubleRange) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_range_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead. +func (*DoubleRange) Descriptor() ([]byte, []int) { + return file_xds_type_v3_range_proto_rawDescGZIP(), []int{2} +} + +func (x *DoubleRange) GetStart() float64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *DoubleRange) GetEnd() float64 { + if x != nil { + return x.End + } + return 0 +} + +var File_xds_type_v3_range_proto protoreflect.FileDescriptor + +var file_xds_type_v3_range_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x22, 0x34, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x0a, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, + 0x6e, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x4a, 0x0a, 0x16, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, + 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_v3_range_proto_rawDescOnce sync.Once + file_xds_type_v3_range_proto_rawDescData = file_xds_type_v3_range_proto_rawDesc +) + +func file_xds_type_v3_range_proto_rawDescGZIP() []byte { + file_xds_type_v3_range_proto_rawDescOnce.Do(func() { + file_xds_type_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_range_proto_rawDescData) + }) + return file_xds_type_v3_range_proto_rawDescData +} + +var file_xds_type_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_xds_type_v3_range_proto_goTypes = []interface{}{ + (*Int64Range)(nil), // 0: xds.type.v3.Int64Range + (*Int32Range)(nil), // 1: xds.type.v3.Int32Range + (*DoubleRange)(nil), // 2: xds.type.v3.DoubleRange +} +var file_xds_type_v3_range_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_xds_type_v3_range_proto_init() } +func file_xds_type_v3_range_proto_init() { + if File_xds_type_v3_range_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_v3_range_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_v3_range_proto_goTypes, + DependencyIndexes: file_xds_type_v3_range_proto_depIdxs, + MessageInfos: file_xds_type_v3_range_proto_msgTypes, + }.Build() + File_xds_type_v3_range_proto = out.File + file_xds_type_v3_range_proto_rawDesc = nil + file_xds_type_v3_range_proto_goTypes = nil + file_xds_type_v3_range_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go new file mode 100644 index 0000000000..7fd141a483 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go @@ -0,0 +1,239 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/v3/range.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// 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 { + if m == nil { + return nil + } + + // no validation rules for Start + + // no validation rules for End + + return nil +} + +// Int64RangeValidationError is the validation error returned by +// Int64Range.Validate if the designated constraints aren't met. +type Int64RangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" } + +// Error satisfies the builtin error interface +func (e Int64RangeValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInt64Range.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RangeValidationError{} + +// Validate checks the field values on Int32Range with the rules defined in the +// proto definition for this message. If any rules are violated, 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. +func (m *DoubleRange) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Start + + // no validation rules for End + + return nil +} + +// DoubleRangeValidationError is the validation error returned by +// DoubleRange.Validate if the designated constraints aren't met. +type DoubleRangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" } + +// Error satisfies the builtin error interface +func (e DoubleRangeValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDoubleRange.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRangeValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go new file mode 100644 index 0000000000..47c671498c --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go @@ -0,0 +1,168 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/v3/typed_struct.proto + +package v3 + +import ( + proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type TypedStruct struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + Value *_struct.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *TypedStruct) Reset() { + *x = TypedStruct{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypedStruct) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypedStruct) ProtoMessage() {} + +func (x *TypedStruct) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TypedStruct.ProtoReflect.Descriptor instead. +func (*TypedStruct) Descriptor() ([]byte, []int) { + return file_xds_type_v3_typed_struct_proto_rawDescGZIP(), []int{0} +} + +func (x *TypedStruct) GetTypeUrl() string { + if x != nil { + return x.TypeUrl + } + return "" +} + +func (x *TypedStruct) GetValue() *_struct.Struct { + if x != nil { + return x.Value + } + return nil +} + +var File_xds_type_v3_typed_struct_proto protoreflect.FileDescriptor + +var file_xds_type_v3_typed_struct_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54, + 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, + 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_v3_typed_struct_proto_rawDescOnce sync.Once + file_xds_type_v3_typed_struct_proto_rawDescData = file_xds_type_v3_typed_struct_proto_rawDesc +) + +func file_xds_type_v3_typed_struct_proto_rawDescGZIP() []byte { + file_xds_type_v3_typed_struct_proto_rawDescOnce.Do(func() { + file_xds_type_v3_typed_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_typed_struct_proto_rawDescData) + }) + return file_xds_type_v3_typed_struct_proto_rawDescData +} + +var file_xds_type_v3_typed_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_xds_type_v3_typed_struct_proto_goTypes = []interface{}{ + (*TypedStruct)(nil), // 0: xds.type.v3.TypedStruct + (*_struct.Struct)(nil), // 1: google.protobuf.Struct +} +var file_xds_type_v3_typed_struct_proto_depIdxs = []int32{ + 1, // 0: xds.type.v3.TypedStruct.value:type_name -> google.protobuf.Struct + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_xds_type_v3_typed_struct_proto_init() } +func file_xds_type_v3_typed_struct_proto_init() { + if File_xds_type_v3_typed_struct_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_v3_typed_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypedStruct); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_v3_typed_struct_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_v3_typed_struct_proto_goTypes, + DependencyIndexes: file_xds_type_v3_typed_struct_proto_depIdxs, + MessageInfos: file_xds_type_v3_typed_struct_proto_msgTypes, + }.Build() + File_xds_type_v3_typed_struct_proto = out.File + file_xds_type_v3_typed_struct_proto_rawDesc = nil + file_xds_type_v3_typed_struct_proto_goTypes = nil + file_xds_type_v3_typed_struct_proto_depIdxs = nil +} diff --git a/pkg/api/envoy/config/listener/v4alpha/api_listener.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go similarity index 54% rename from pkg/api/envoy/config/listener/v4alpha/api_listener.pb.validate.go rename to vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go index 10c84aa03d..b4af2aa9f3 100644 --- a/pkg/api/envoy/config/listener/v4alpha/api_listener.pb.validate.go +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v4alpha/api_listener.proto +// source: xds/type/v3/typed_struct.proto -package envoy_config_listener_v4alpha +package v3 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" ) // ensure the imports are used @@ -30,21 +30,23 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = ptypes.DynamicAny{} + _ = anypb.Any{} ) -// Validate checks the field values on ApiListener with the rules defined in +// Validate checks the field values on TypedStruct 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 { +func (m *TypedStruct) Validate() error { if m == nil { return nil } - if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { + // no validation rules for TypeUrl + + if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return ApiListenerValidationError{ - field: "ApiListener", + return TypedStructValidationError{ + field: "Value", reason: "embedded message failed validation", cause: err, } @@ -54,9 +56,9 @@ func (m *ApiListener) Validate() error { return nil } -// ApiListenerValidationError is the validation error returned by -// ApiListener.Validate if the designated constraints aren't met. -type ApiListenerValidationError struct { +// TypedStructValidationError is the validation error returned by +// TypedStruct.Validate if the designated constraints aren't met. +type TypedStructValidationError struct { field string reason string cause error @@ -64,22 +66,22 @@ type ApiListenerValidationError struct { } // Field function returns field value. -func (e ApiListenerValidationError) Field() string { return e.field } +func (e TypedStructValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ApiListenerValidationError) Reason() string { return e.reason } +func (e TypedStructValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ApiListenerValidationError) Cause() error { return e.cause } +func (e TypedStructValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ApiListenerValidationError) Key() bool { return e.key } +func (e TypedStructValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ApiListenerValidationError) ErrorName() string { return "ApiListenerValidationError" } +func (e TypedStructValidationError) ErrorName() string { return "TypedStructValidationError" } // Error satisfies the builtin error interface -func (e ApiListenerValidationError) Error() string { +func (e TypedStructValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -91,14 +93,14 @@ func (e ApiListenerValidationError) Error() string { } return fmt.Sprintf( - "invalid %sApiListener.%s: %s%s", + "invalid %sTypedStruct.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ApiListenerValidationError{} +var _ error = TypedStructValidationError{} var _ interface { Field() string @@ -106,4 +108,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ApiListenerValidationError{} +} = TypedStructValidationError{} diff --git a/vendor/github.com/golang/protobuf/jsonpb/decode.go b/vendor/github.com/golang/protobuf/jsonpb/decode.go deleted file mode 100644 index 60e82caa9a..0000000000 --- a/vendor/github.com/golang/protobuf/jsonpb/decode.go +++ /dev/null @@ -1,524 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsonpb - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "math" - "reflect" - "strconv" - "strings" - "time" - - "github.com/golang/protobuf/proto" - "google.golang.org/protobuf/encoding/protojson" - protoV2 "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -const wrapJSONUnmarshalV2 = false - -// UnmarshalNext unmarshals the next JSON object from d into m. -func UnmarshalNext(d *json.Decoder, m proto.Message) error { - return new(Unmarshaler).UnmarshalNext(d, m) -} - -// Unmarshal unmarshals a JSON object from r into m. -func Unmarshal(r io.Reader, m proto.Message) error { - return new(Unmarshaler).Unmarshal(r, m) -} - -// UnmarshalString unmarshals a JSON object from s into m. -func UnmarshalString(s string, m proto.Message) error { - return new(Unmarshaler).Unmarshal(strings.NewReader(s), m) -} - -// Unmarshaler is a configurable object for converting from a JSON -// representation to a protocol buffer object. -type Unmarshaler struct { - // AllowUnknownFields specifies whether to allow messages to contain - // unknown JSON fields, as opposed to failing to unmarshal. - AllowUnknownFields bool - - // AnyResolver is used to resolve the google.protobuf.Any well-known type. - // If unset, the global registry is used by default. - AnyResolver AnyResolver -} - -// JSONPBUnmarshaler is implemented by protobuf messages that customize the way -// they are unmarshaled from JSON. Messages that implement this should also -// implement JSONPBMarshaler so that the custom format can be produced. -// -// The JSON unmarshaling must follow the JSON to proto specification: -// https://developers.google.com/protocol-buffers/docs/proto3#json -// -// Deprecated: Custom types should implement protobuf reflection instead. -type JSONPBUnmarshaler interface { - UnmarshalJSONPB(*Unmarshaler, []byte) error -} - -// Unmarshal unmarshals a JSON object from r into m. -func (u *Unmarshaler) Unmarshal(r io.Reader, m proto.Message) error { - return u.UnmarshalNext(json.NewDecoder(r), m) -} - -// UnmarshalNext unmarshals the next JSON object from d into m. -func (u *Unmarshaler) UnmarshalNext(d *json.Decoder, m proto.Message) error { - if m == nil { - return errors.New("invalid nil message") - } - - // Parse the next JSON object from the stream. - raw := json.RawMessage{} - if err := d.Decode(&raw); err != nil { - return err - } - - // Check for custom unmarshalers first since they may not properly - // implement protobuf reflection that the logic below relies on. - if jsu, ok := m.(JSONPBUnmarshaler); ok { - return jsu.UnmarshalJSONPB(u, raw) - } - - mr := proto.MessageReflect(m) - - // NOTE: For historical reasons, a top-level null is treated as a noop. - // This is incorrect, but kept for compatibility. - if string(raw) == "null" && mr.Descriptor().FullName() != "google.protobuf.Value" { - return nil - } - - if wrapJSONUnmarshalV2 { - // NOTE: If input message is non-empty, we need to preserve merge semantics - // of the old jsonpb implementation. These semantics are not supported by - // the protobuf JSON specification. - isEmpty := true - mr.Range(func(protoreflect.FieldDescriptor, protoreflect.Value) bool { - isEmpty = false // at least one iteration implies non-empty - return false - }) - if !isEmpty { - // Perform unmarshaling into a newly allocated, empty message. - mr = mr.New() - - // Use a defer to copy all unmarshaled fields into the original message. - dst := proto.MessageReflect(m) - defer mr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - dst.Set(fd, v) - return true - }) - } - - // Unmarshal using the v2 JSON unmarshaler. - opts := protojson.UnmarshalOptions{ - DiscardUnknown: u.AllowUnknownFields, - } - if u.AnyResolver != nil { - opts.Resolver = anyResolver{u.AnyResolver} - } - return opts.Unmarshal(raw, mr.Interface()) - } else { - if err := u.unmarshalMessage(mr, raw); err != nil { - return err - } - return protoV2.CheckInitialized(mr.Interface()) - } -} - -func (u *Unmarshaler) unmarshalMessage(m protoreflect.Message, in []byte) error { - md := m.Descriptor() - fds := md.Fields() - - if jsu, ok := proto.MessageV1(m.Interface()).(JSONPBUnmarshaler); ok { - return jsu.UnmarshalJSONPB(u, in) - } - - if string(in) == "null" && md.FullName() != "google.protobuf.Value" { - return nil - } - - switch wellKnownType(md.FullName()) { - case "Any": - var jsonObject map[string]json.RawMessage - if err := json.Unmarshal(in, &jsonObject); err != nil { - return err - } - - rawTypeURL, ok := jsonObject["@type"] - if !ok { - return errors.New("Any JSON doesn't have '@type'") - } - typeURL, err := unquoteString(string(rawTypeURL)) - if err != nil { - return fmt.Errorf("can't unmarshal Any's '@type': %q", rawTypeURL) - } - m.Set(fds.ByNumber(1), protoreflect.ValueOfString(typeURL)) - - var m2 protoreflect.Message - if u.AnyResolver != nil { - mi, err := u.AnyResolver.Resolve(typeURL) - if err != nil { - return err - } - m2 = proto.MessageReflect(mi) - } else { - mt, err := protoregistry.GlobalTypes.FindMessageByURL(typeURL) - if err != nil { - if err == protoregistry.NotFound { - return fmt.Errorf("could not resolve Any message type: %v", typeURL) - } - return err - } - m2 = mt.New() - } - - if wellKnownType(m2.Descriptor().FullName()) != "" { - rawValue, ok := jsonObject["value"] - if !ok { - return errors.New("Any JSON doesn't have 'value'") - } - if err := u.unmarshalMessage(m2, rawValue); err != nil { - return fmt.Errorf("can't unmarshal Any nested proto %v: %v", typeURL, err) - } - } else { - delete(jsonObject, "@type") - rawJSON, err := json.Marshal(jsonObject) - if err != nil { - return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", err) - } - if err = u.unmarshalMessage(m2, rawJSON); err != nil { - return fmt.Errorf("can't unmarshal Any nested proto %v: %v", typeURL, err) - } - } - - rawWire, err := protoV2.Marshal(m2.Interface()) - if err != nil { - return fmt.Errorf("can't marshal proto %v into Any.Value: %v", typeURL, err) - } - m.Set(fds.ByNumber(2), protoreflect.ValueOfBytes(rawWire)) - return nil - case "BoolValue", "BytesValue", "StringValue", - "Int32Value", "UInt32Value", "FloatValue", - "Int64Value", "UInt64Value", "DoubleValue": - fd := fds.ByNumber(1) - v, err := u.unmarshalValue(m.NewField(fd), in, fd) - if err != nil { - return err - } - m.Set(fd, v) - return nil - case "Duration": - v, err := unquoteString(string(in)) - if err != nil { - return err - } - d, err := time.ParseDuration(v) - if err != nil { - return fmt.Errorf("bad Duration: %v", err) - } - - sec := d.Nanoseconds() / 1e9 - nsec := d.Nanoseconds() % 1e9 - m.Set(fds.ByNumber(1), protoreflect.ValueOfInt64(int64(sec))) - m.Set(fds.ByNumber(2), protoreflect.ValueOfInt32(int32(nsec))) - return nil - case "Timestamp": - v, err := unquoteString(string(in)) - if err != nil { - return err - } - t, err := time.Parse(time.RFC3339Nano, v) - if err != nil { - return fmt.Errorf("bad Timestamp: %v", err) - } - - sec := t.Unix() - nsec := t.Nanosecond() - m.Set(fds.ByNumber(1), protoreflect.ValueOfInt64(int64(sec))) - m.Set(fds.ByNumber(2), protoreflect.ValueOfInt32(int32(nsec))) - return nil - case "Value": - switch { - case string(in) == "null": - m.Set(fds.ByNumber(1), protoreflect.ValueOfEnum(0)) - case string(in) == "true": - m.Set(fds.ByNumber(4), protoreflect.ValueOfBool(true)) - case string(in) == "false": - m.Set(fds.ByNumber(4), protoreflect.ValueOfBool(false)) - case hasPrefixAndSuffix('"', in, '"'): - s, err := unquoteString(string(in)) - if err != nil { - return fmt.Errorf("unrecognized type for Value %q", in) - } - m.Set(fds.ByNumber(3), protoreflect.ValueOfString(s)) - case hasPrefixAndSuffix('[', in, ']'): - v := m.Mutable(fds.ByNumber(6)) - return u.unmarshalMessage(v.Message(), in) - case hasPrefixAndSuffix('{', in, '}'): - v := m.Mutable(fds.ByNumber(5)) - return u.unmarshalMessage(v.Message(), in) - default: - f, err := strconv.ParseFloat(string(in), 0) - if err != nil { - return fmt.Errorf("unrecognized type for Value %q", in) - } - m.Set(fds.ByNumber(2), protoreflect.ValueOfFloat64(f)) - } - return nil - case "ListValue": - var jsonArray []json.RawMessage - if err := json.Unmarshal(in, &jsonArray); err != nil { - return fmt.Errorf("bad ListValue: %v", err) - } - - lv := m.Mutable(fds.ByNumber(1)).List() - for _, raw := range jsonArray { - ve := lv.NewElement() - if err := u.unmarshalMessage(ve.Message(), raw); err != nil { - return err - } - lv.Append(ve) - } - return nil - case "Struct": - var jsonObject map[string]json.RawMessage - if err := json.Unmarshal(in, &jsonObject); err != nil { - return fmt.Errorf("bad StructValue: %v", err) - } - - mv := m.Mutable(fds.ByNumber(1)).Map() - for key, raw := range jsonObject { - kv := protoreflect.ValueOf(key).MapKey() - vv := mv.NewValue() - if err := u.unmarshalMessage(vv.Message(), raw); err != nil { - return fmt.Errorf("bad value in StructValue for key %q: %v", key, err) - } - mv.Set(kv, vv) - } - return nil - } - - var jsonObject map[string]json.RawMessage - if err := json.Unmarshal(in, &jsonObject); err != nil { - return err - } - - // Handle known fields. - for i := 0; i < fds.Len(); i++ { - fd := fds.Get(i) - if fd.IsWeak() && fd.Message().IsPlaceholder() { - continue // weak reference is not linked in - } - - // Search for any raw JSON value associated with this field. - var raw json.RawMessage - name := string(fd.Name()) - if fd.Kind() == protoreflect.GroupKind { - name = string(fd.Message().Name()) - } - if v, ok := jsonObject[name]; ok { - delete(jsonObject, name) - raw = v - } - name = string(fd.JSONName()) - if v, ok := jsonObject[name]; ok { - delete(jsonObject, name) - raw = v - } - - field := m.NewField(fd) - // Unmarshal the field value. - if raw == nil || (string(raw) == "null" && !isSingularWellKnownValue(fd) && !isSingularJSONPBUnmarshaler(field, fd)) { - continue - } - v, err := u.unmarshalValue(field, raw, fd) - if err != nil { - return err - } - m.Set(fd, v) - } - - // Handle extension fields. - for name, raw := range jsonObject { - if !strings.HasPrefix(name, "[") || !strings.HasSuffix(name, "]") { - continue - } - - // Resolve the extension field by name. - xname := protoreflect.FullName(name[len("[") : len(name)-len("]")]) - xt, _ := protoregistry.GlobalTypes.FindExtensionByName(xname) - if xt == nil && isMessageSet(md) { - xt, _ = protoregistry.GlobalTypes.FindExtensionByName(xname.Append("message_set_extension")) - } - if xt == nil { - continue - } - delete(jsonObject, name) - fd := xt.TypeDescriptor() - if fd.ContainingMessage().FullName() != m.Descriptor().FullName() { - return fmt.Errorf("extension field %q does not extend message %q", xname, m.Descriptor().FullName()) - } - - field := m.NewField(fd) - // Unmarshal the field value. - if raw == nil || (string(raw) == "null" && !isSingularWellKnownValue(fd) && !isSingularJSONPBUnmarshaler(field, fd)) { - continue - } - v, err := u.unmarshalValue(field, raw, fd) - if err != nil { - return err - } - m.Set(fd, v) - } - - if !u.AllowUnknownFields && len(jsonObject) > 0 { - for name := range jsonObject { - return fmt.Errorf("unknown field %q in %v", name, md.FullName()) - } - } - return nil -} - -func isSingularWellKnownValue(fd protoreflect.FieldDescriptor) bool { - if md := fd.Message(); md != nil { - return md.FullName() == "google.protobuf.Value" && fd.Cardinality() != protoreflect.Repeated - } - return false -} - -func isSingularJSONPBUnmarshaler(v protoreflect.Value, fd protoreflect.FieldDescriptor) bool { - if fd.Message() != nil && fd.Cardinality() != protoreflect.Repeated { - _, ok := proto.MessageV1(v.Interface()).(JSONPBUnmarshaler) - return ok - } - return false -} - -func (u *Unmarshaler) unmarshalValue(v protoreflect.Value, in []byte, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { - switch { - case fd.IsList(): - var jsonArray []json.RawMessage - if err := json.Unmarshal(in, &jsonArray); err != nil { - return v, err - } - lv := v.List() - for _, raw := range jsonArray { - ve, err := u.unmarshalSingularValue(lv.NewElement(), raw, fd) - if err != nil { - return v, err - } - lv.Append(ve) - } - return v, nil - case fd.IsMap(): - var jsonObject map[string]json.RawMessage - if err := json.Unmarshal(in, &jsonObject); err != nil { - return v, err - } - kfd := fd.MapKey() - vfd := fd.MapValue() - mv := v.Map() - for key, raw := range jsonObject { - var kv protoreflect.MapKey - if kfd.Kind() == protoreflect.StringKind { - kv = protoreflect.ValueOf(key).MapKey() - } else { - v, err := u.unmarshalSingularValue(kfd.Default(), []byte(key), kfd) - if err != nil { - return v, err - } - kv = v.MapKey() - } - - vv, err := u.unmarshalSingularValue(mv.NewValue(), raw, vfd) - if err != nil { - return v, err - } - mv.Set(kv, vv) - } - return v, nil - default: - return u.unmarshalSingularValue(v, in, fd) - } -} - -var nonFinite = map[string]float64{ - `"NaN"`: math.NaN(), - `"Infinity"`: math.Inf(+1), - `"-Infinity"`: math.Inf(-1), -} - -func (u *Unmarshaler) unmarshalSingularValue(v protoreflect.Value, in []byte, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { - switch fd.Kind() { - case protoreflect.BoolKind: - return unmarshalValue(in, new(bool)) - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - return unmarshalValue(trimQuote(in), new(int32)) - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - return unmarshalValue(trimQuote(in), new(int64)) - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - return unmarshalValue(trimQuote(in), new(uint32)) - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - return unmarshalValue(trimQuote(in), new(uint64)) - case protoreflect.FloatKind: - if f, ok := nonFinite[string(in)]; ok { - return protoreflect.ValueOfFloat32(float32(f)), nil - } - return unmarshalValue(trimQuote(in), new(float32)) - case protoreflect.DoubleKind: - if f, ok := nonFinite[string(in)]; ok { - return protoreflect.ValueOfFloat64(float64(f)), nil - } - return unmarshalValue(trimQuote(in), new(float64)) - case protoreflect.StringKind: - return unmarshalValue(in, new(string)) - case protoreflect.BytesKind: - return unmarshalValue(in, new([]byte)) - case protoreflect.EnumKind: - if hasPrefixAndSuffix('"', in, '"') { - vd := fd.Enum().Values().ByName(protoreflect.Name(trimQuote(in))) - if vd == nil { - return v, fmt.Errorf("unknown value %q for enum %s", in, fd.Enum().FullName()) - } - return protoreflect.ValueOfEnum(vd.Number()), nil - } - return unmarshalValue(in, new(protoreflect.EnumNumber)) - case protoreflect.MessageKind, protoreflect.GroupKind: - err := u.unmarshalMessage(v.Message(), in) - return v, err - default: - panic(fmt.Sprintf("invalid kind %v", fd.Kind())) - } -} - -func unmarshalValue(in []byte, v interface{}) (protoreflect.Value, error) { - err := json.Unmarshal(in, v) - return protoreflect.ValueOf(reflect.ValueOf(v).Elem().Interface()), err -} - -func unquoteString(in string) (out string, err error) { - err = json.Unmarshal([]byte(in), &out) - return out, err -} - -func hasPrefixAndSuffix(prefix byte, in []byte, suffix byte) bool { - if len(in) >= 2 && in[0] == prefix && in[len(in)-1] == suffix { - return true - } - return false -} - -// trimQuote is like unquoteString but simply strips surrounding quotes. -// This is incorrect, but is behavior done by the legacy implementation. -func trimQuote(in []byte) []byte { - if len(in) >= 2 && in[0] == '"' && in[len(in)-1] == '"' { - in = in[1 : len(in)-1] - } - return in -} diff --git a/vendor/github.com/golang/protobuf/jsonpb/encode.go b/vendor/github.com/golang/protobuf/jsonpb/encode.go deleted file mode 100644 index 685c80a62b..0000000000 --- a/vendor/github.com/golang/protobuf/jsonpb/encode.go +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsonpb - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "math" - "reflect" - "sort" - "strconv" - "strings" - "time" - - "github.com/golang/protobuf/proto" - "google.golang.org/protobuf/encoding/protojson" - protoV2 "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -const wrapJSONMarshalV2 = false - -// Marshaler is a configurable object for marshaling protocol buffer messages -// to the specified JSON representation. -type Marshaler struct { - // OrigName specifies whether to use the original protobuf name for fields. - OrigName bool - - // EnumsAsInts specifies whether to render enum values as integers, - // as opposed to string values. - EnumsAsInts bool - - // EmitDefaults specifies whether to render fields with zero values. - EmitDefaults bool - - // Indent controls whether the output is compact or not. - // If empty, the output is compact JSON. Otherwise, every JSON object - // entry and JSON array value will be on its own line. - // Each line will be preceded by repeated copies of Indent, where the - // number of copies is the current indentation depth. - Indent string - - // AnyResolver is used to resolve the google.protobuf.Any well-known type. - // If unset, the global registry is used by default. - AnyResolver AnyResolver -} - -// JSONPBMarshaler is implemented by protobuf messages that customize the -// way they are marshaled to JSON. Messages that implement this should also -// implement JSONPBUnmarshaler so that the custom format can be parsed. -// -// The JSON marshaling must follow the proto to JSON specification: -// https://developers.google.com/protocol-buffers/docs/proto3#json -// -// Deprecated: Custom types should implement protobuf reflection instead. -type JSONPBMarshaler interface { - MarshalJSONPB(*Marshaler) ([]byte, error) -} - -// Marshal serializes a protobuf message as JSON into w. -func (jm *Marshaler) Marshal(w io.Writer, m proto.Message) error { - b, err := jm.marshal(m) - if len(b) > 0 { - if _, err := w.Write(b); err != nil { - return err - } - } - return err -} - -// MarshalToString serializes a protobuf message as JSON in string form. -func (jm *Marshaler) MarshalToString(m proto.Message) (string, error) { - b, err := jm.marshal(m) - if err != nil { - return "", err - } - return string(b), nil -} - -func (jm *Marshaler) marshal(m proto.Message) ([]byte, error) { - v := reflect.ValueOf(m) - if m == nil || (v.Kind() == reflect.Ptr && v.IsNil()) { - return nil, errors.New("Marshal called with nil") - } - - // Check for custom marshalers first since they may not properly - // implement protobuf reflection that the logic below relies on. - if jsm, ok := m.(JSONPBMarshaler); ok { - return jsm.MarshalJSONPB(jm) - } - - if wrapJSONMarshalV2 { - opts := protojson.MarshalOptions{ - UseProtoNames: jm.OrigName, - UseEnumNumbers: jm.EnumsAsInts, - EmitUnpopulated: jm.EmitDefaults, - Indent: jm.Indent, - } - if jm.AnyResolver != nil { - opts.Resolver = anyResolver{jm.AnyResolver} - } - return opts.Marshal(proto.MessageReflect(m).Interface()) - } else { - // Check for unpopulated required fields first. - m2 := proto.MessageReflect(m) - if err := protoV2.CheckInitialized(m2.Interface()); err != nil { - return nil, err - } - - w := jsonWriter{Marshaler: jm} - err := w.marshalMessage(m2, "", "") - return w.buf, err - } -} - -type jsonWriter struct { - *Marshaler - buf []byte -} - -func (w *jsonWriter) write(s string) { - w.buf = append(w.buf, s...) -} - -func (w *jsonWriter) marshalMessage(m protoreflect.Message, indent, typeURL string) error { - if jsm, ok := proto.MessageV1(m.Interface()).(JSONPBMarshaler); ok { - b, err := jsm.MarshalJSONPB(w.Marshaler) - if err != nil { - return err - } - if typeURL != "" { - // we are marshaling this object to an Any type - var js map[string]*json.RawMessage - if err = json.Unmarshal(b, &js); err != nil { - return fmt.Errorf("type %T produced invalid JSON: %v", m.Interface(), err) - } - turl, err := json.Marshal(typeURL) - if err != nil { - return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err) - } - js["@type"] = (*json.RawMessage)(&turl) - if b, err = json.Marshal(js); err != nil { - return err - } - } - w.write(string(b)) - return nil - } - - md := m.Descriptor() - fds := md.Fields() - - // Handle well-known types. - const secondInNanos = int64(time.Second / time.Nanosecond) - switch wellKnownType(md.FullName()) { - case "Any": - return w.marshalAny(m, indent) - case "BoolValue", "BytesValue", "StringValue", - "Int32Value", "UInt32Value", "FloatValue", - "Int64Value", "UInt64Value", "DoubleValue": - fd := fds.ByNumber(1) - return w.marshalValue(fd, m.Get(fd), indent) - case "Duration": - const maxSecondsInDuration = 315576000000 - // "Generated output always contains 0, 3, 6, or 9 fractional digits, - // depending on required precision." - s := m.Get(fds.ByNumber(1)).Int() - ns := m.Get(fds.ByNumber(2)).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") - } - var sign string - if s < 0 || ns < 0 { - sign, s, ns = "-", -1*s, -1*ns - } - x := fmt.Sprintf("%s%d.%09d", sign, s, ns) - x = strings.TrimSuffix(x, "000") - x = strings.TrimSuffix(x, "000") - x = strings.TrimSuffix(x, ".000") - w.write(fmt.Sprintf(`"%vs"`, x)) - return nil - case "Timestamp": - // "RFC 3339, where generated output will always be Z-normalized - // and uses 0, 3, 6 or 9 fractional digits." - s := m.Get(fds.ByNumber(1)).Int() - ns := m.Get(fds.ByNumber(2)).Int() - if ns < 0 || ns >= secondInNanos { - return fmt.Errorf("ns out of range [0, %v)", secondInNanos) - } - t := time.Unix(s, ns).UTC() - // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits). - x := t.Format("2006-01-02T15:04:05.000000000") - x = strings.TrimSuffix(x, "000") - x = strings.TrimSuffix(x, "000") - x = strings.TrimSuffix(x, ".000") - w.write(fmt.Sprintf(`"%vZ"`, x)) - return nil - case "Value": - // JSON value; which is a null, number, string, bool, object, or array. - od := md.Oneofs().Get(0) - fd := m.WhichOneof(od) - if fd == nil { - return errors.New("nil Value") - } - return w.marshalValue(fd, m.Get(fd), indent) - case "Struct", "ListValue": - // JSON object or array. - fd := fds.ByNumber(1) - return w.marshalValue(fd, m.Get(fd), indent) - } - - w.write("{") - if w.Indent != "" { - w.write("\n") - } - - firstField := true - if typeURL != "" { - if err := w.marshalTypeURL(indent, typeURL); err != nil { - return err - } - firstField = false - } - - for i := 0; i < fds.Len(); { - fd := fds.Get(i) - if od := fd.ContainingOneof(); od != nil { - fd = m.WhichOneof(od) - i += od.Fields().Len() - if fd == nil { - continue - } - } else { - i++ - } - - v := m.Get(fd) - - if !m.Has(fd) { - if !w.EmitDefaults || fd.ContainingOneof() != nil { - continue - } - if fd.Cardinality() != protoreflect.Repeated && (fd.Message() != nil || fd.Syntax() == protoreflect.Proto2) { - v = protoreflect.Value{} // use "null" for singular messages or proto2 scalars - } - } - - if !firstField { - w.writeComma() - } - if err := w.marshalField(fd, v, indent); err != nil { - return err - } - firstField = false - } - - // Handle proto2 extensions. - if md.ExtensionRanges().Len() > 0 { - // Collect a sorted list of all extension descriptor and values. - type ext struct { - desc protoreflect.FieldDescriptor - val protoreflect.Value - } - var exts []ext - m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - if fd.IsExtension() { - exts = append(exts, ext{fd, v}) - } - return true - }) - sort.Slice(exts, func(i, j int) bool { - return exts[i].desc.Number() < exts[j].desc.Number() - }) - - for _, ext := range exts { - if !firstField { - w.writeComma() - } - if err := w.marshalField(ext.desc, ext.val, indent); err != nil { - return err - } - firstField = false - } - } - - if w.Indent != "" { - w.write("\n") - w.write(indent) - } - w.write("}") - return nil -} - -func (w *jsonWriter) writeComma() { - if w.Indent != "" { - w.write(",\n") - } else { - w.write(",") - } -} - -func (w *jsonWriter) marshalAny(m protoreflect.Message, indent string) error { - // "If the Any contains a value that has a special JSON mapping, - // it will be converted as follows: {"@type": xxx, "value": yyy}. - // Otherwise, the value will be converted into a JSON object, - // and the "@type" field will be inserted to indicate the actual data type." - md := m.Descriptor() - typeURL := m.Get(md.Fields().ByNumber(1)).String() - rawVal := m.Get(md.Fields().ByNumber(2)).Bytes() - - var m2 protoreflect.Message - if w.AnyResolver != nil { - mi, err := w.AnyResolver.Resolve(typeURL) - if err != nil { - return err - } - m2 = proto.MessageReflect(mi) - } else { - mt, err := protoregistry.GlobalTypes.FindMessageByURL(typeURL) - if err != nil { - return err - } - m2 = mt.New() - } - - if err := protoV2.Unmarshal(rawVal, m2.Interface()); err != nil { - return err - } - - if wellKnownType(m2.Descriptor().FullName()) == "" { - return w.marshalMessage(m2, indent, typeURL) - } - - w.write("{") - if w.Indent != "" { - w.write("\n") - } - if err := w.marshalTypeURL(indent, typeURL); err != nil { - return err - } - w.writeComma() - if w.Indent != "" { - w.write(indent) - w.write(w.Indent) - w.write(`"value": `) - } else { - w.write(`"value":`) - } - if err := w.marshalMessage(m2, indent+w.Indent, ""); err != nil { - return err - } - if w.Indent != "" { - w.write("\n") - w.write(indent) - } - w.write("}") - return nil -} - -func (w *jsonWriter) marshalTypeURL(indent, typeURL string) error { - if w.Indent != "" { - w.write(indent) - w.write(w.Indent) - } - w.write(`"@type":`) - if w.Indent != "" { - w.write(" ") - } - b, err := json.Marshal(typeURL) - if err != nil { - return err - } - w.write(string(b)) - return nil -} - -// marshalField writes field description and value to the Writer. -func (w *jsonWriter) marshalField(fd protoreflect.FieldDescriptor, v protoreflect.Value, indent string) error { - if w.Indent != "" { - w.write(indent) - w.write(w.Indent) - } - w.write(`"`) - switch { - case fd.IsExtension(): - // For message set, use the fname of the message as the extension name. - name := string(fd.FullName()) - if isMessageSet(fd.ContainingMessage()) { - name = strings.TrimSuffix(name, ".message_set_extension") - } - - w.write("[" + name + "]") - case w.OrigName: - name := string(fd.Name()) - if fd.Kind() == protoreflect.GroupKind { - name = string(fd.Message().Name()) - } - w.write(name) - default: - w.write(string(fd.JSONName())) - } - w.write(`":`) - if w.Indent != "" { - w.write(" ") - } - return w.marshalValue(fd, v, indent) -} - -func (w *jsonWriter) marshalValue(fd protoreflect.FieldDescriptor, v protoreflect.Value, indent string) error { - switch { - case fd.IsList(): - w.write("[") - comma := "" - lv := v.List() - for i := 0; i < lv.Len(); i++ { - w.write(comma) - if w.Indent != "" { - w.write("\n") - w.write(indent) - w.write(w.Indent) - w.write(w.Indent) - } - if err := w.marshalSingularValue(fd, lv.Get(i), indent+w.Indent); err != nil { - return err - } - comma = "," - } - if w.Indent != "" { - w.write("\n") - w.write(indent) - w.write(w.Indent) - } - w.write("]") - return nil - case fd.IsMap(): - kfd := fd.MapKey() - vfd := fd.MapValue() - mv := v.Map() - - // Collect a sorted list of all map keys and values. - type entry struct{ key, val protoreflect.Value } - var entries []entry - mv.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { - entries = append(entries, entry{k.Value(), v}) - return true - }) - sort.Slice(entries, func(i, j int) bool { - switch kfd.Kind() { - case protoreflect.BoolKind: - return !entries[i].key.Bool() && entries[j].key.Bool() - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - return entries[i].key.Int() < entries[j].key.Int() - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - return entries[i].key.Uint() < entries[j].key.Uint() - case protoreflect.StringKind: - return entries[i].key.String() < entries[j].key.String() - default: - panic("invalid kind") - } - }) - - w.write(`{`) - comma := "" - for _, entry := range entries { - w.write(comma) - if w.Indent != "" { - w.write("\n") - w.write(indent) - w.write(w.Indent) - w.write(w.Indent) - } - - s := fmt.Sprint(entry.key.Interface()) - b, err := json.Marshal(s) - if err != nil { - return err - } - w.write(string(b)) - - w.write(`:`) - if w.Indent != "" { - w.write(` `) - } - - if err := w.marshalSingularValue(vfd, entry.val, indent+w.Indent); err != nil { - return err - } - comma = "," - } - if w.Indent != "" { - w.write("\n") - w.write(indent) - w.write(w.Indent) - } - w.write(`}`) - return nil - default: - return w.marshalSingularValue(fd, v, indent) - } -} - -func (w *jsonWriter) marshalSingularValue(fd protoreflect.FieldDescriptor, v protoreflect.Value, indent string) error { - switch { - case !v.IsValid(): - w.write("null") - return nil - case fd.Message() != nil: - return w.marshalMessage(v.Message(), indent+w.Indent, "") - case fd.Enum() != nil: - if fd.Enum().FullName() == "google.protobuf.NullValue" { - w.write("null") - return nil - } - - vd := fd.Enum().Values().ByNumber(v.Enum()) - if vd == nil || w.EnumsAsInts { - w.write(strconv.Itoa(int(v.Enum()))) - } else { - w.write(`"` + string(vd.Name()) + `"`) - } - return nil - default: - switch v.Interface().(type) { - case float32, float64: - switch { - case math.IsInf(v.Float(), +1): - w.write(`"Infinity"`) - return nil - case math.IsInf(v.Float(), -1): - w.write(`"-Infinity"`) - return nil - case math.IsNaN(v.Float()): - w.write(`"NaN"`) - return nil - } - case int64, uint64: - w.write(fmt.Sprintf(`"%d"`, v.Interface())) - return nil - } - - b, err := json.Marshal(v.Interface()) - if err != nil { - return err - } - w.write(string(b)) - return nil - } -} diff --git a/vendor/github.com/golang/protobuf/jsonpb/json.go b/vendor/github.com/golang/protobuf/jsonpb/json.go deleted file mode 100644 index 480e2448de..0000000000 --- a/vendor/github.com/golang/protobuf/jsonpb/json.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package jsonpb provides functionality to marshal and unmarshal between a -// protocol buffer message and JSON. It follows the specification at -// https://developers.google.com/protocol-buffers/docs/proto3#json. -// -// Do not rely on the default behavior of the standard encoding/json package -// when called on generated message types as it does not operate correctly. -// -// Deprecated: Use the "google.golang.org/protobuf/encoding/protojson" -// package instead. -package jsonpb - -import ( - "github.com/golang/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/runtime/protoimpl" -) - -// AnyResolver takes a type URL, present in an Any message, -// and resolves it into an instance of the associated message. -type AnyResolver interface { - Resolve(typeURL string) (proto.Message, error) -} - -type anyResolver struct{ AnyResolver } - -func (r anyResolver) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) { - return r.FindMessageByURL(string(message)) -} - -func (r anyResolver) FindMessageByURL(url string) (protoreflect.MessageType, error) { - m, err := r.Resolve(url) - if err != nil { - return nil, err - } - return protoimpl.X.MessageTypeOf(m), nil -} - -func (r anyResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) { - return protoregistry.GlobalTypes.FindExtensionByName(field) -} - -func (r anyResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) { - return protoregistry.GlobalTypes.FindExtensionByNumber(message, field) -} - -func wellKnownType(s protoreflect.FullName) string { - if s.Parent() == "google.protobuf" { - switch s.Name() { - case "Empty", "Any", - "BoolValue", "BytesValue", "StringValue", - "Int32Value", "UInt32Value", "FloatValue", - "Int64Value", "UInt64Value", "DoubleValue", - "Duration", "Timestamp", - "NullValue", "Struct", "Value", "ListValue": - return string(s.Name()) - } - } - return "" -} - -func isMessageSet(md protoreflect.MessageDescriptor) bool { - ms, ok := md.(interface{ IsMessageSet() bool }) - return ok && ms.IsMessageSet() -} diff --git a/vendor/github.com/cncf/udpa/go/LICENSE b/vendor/go.opentelemetry.io/proto/otlp/LICENSE similarity index 100% rename from vendor/github.com/cncf/udpa/go/LICENSE rename to vendor/go.opentelemetry.io/proto/otlp/LICENSE diff --git a/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go new file mode 100644 index 0000000000..567e55849a --- /dev/null +++ b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go @@ -0,0 +1,659 @@ +// Copyright 2019, OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.13.0 +// source: opentelemetry/proto/common/v1/common.proto + +package v1 + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// AnyValue is used to represent any type of attribute value. AnyValue may contain a +// primitive value such as a string or integer or it may contain an arbitrary nested +// object containing arrays, key-value lists and primitives. +type AnyValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The value is one of the listed fields. It is valid for all values to be unspecified + // in which case this AnyValue is considered to be "null". + // + // Types that are assignable to Value: + // *AnyValue_StringValue + // *AnyValue_BoolValue + // *AnyValue_IntValue + // *AnyValue_DoubleValue + // *AnyValue_ArrayValue + // *AnyValue_KvlistValue + Value isAnyValue_Value `protobuf_oneof:"value"` +} + +func (x *AnyValue) Reset() { + *x = AnyValue{} + if protoimpl.UnsafeEnabled { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnyValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnyValue) ProtoMessage() {} + +func (x *AnyValue) ProtoReflect() protoreflect.Message { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnyValue.ProtoReflect.Descriptor instead. +func (*AnyValue) Descriptor() ([]byte, []int) { + return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{0} +} + +func (m *AnyValue) GetValue() isAnyValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *AnyValue) GetStringValue() string { + if x, ok := x.GetValue().(*AnyValue_StringValue); ok { + return x.StringValue + } + return "" +} + +func (x *AnyValue) GetBoolValue() bool { + if x, ok := x.GetValue().(*AnyValue_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (x *AnyValue) GetIntValue() int64 { + if x, ok := x.GetValue().(*AnyValue_IntValue); ok { + return x.IntValue + } + return 0 +} + +func (x *AnyValue) GetDoubleValue() float64 { + if x, ok := x.GetValue().(*AnyValue_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +func (x *AnyValue) GetArrayValue() *ArrayValue { + if x, ok := x.GetValue().(*AnyValue_ArrayValue); ok { + return x.ArrayValue + } + return nil +} + +func (x *AnyValue) GetKvlistValue() *KeyValueList { + if x, ok := x.GetValue().(*AnyValue_KvlistValue); ok { + return x.KvlistValue + } + return nil +} + +type isAnyValue_Value interface { + isAnyValue_Value() +} + +type AnyValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type AnyValue_BoolValue struct { + BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type AnyValue_IntValue struct { + IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type AnyValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type AnyValue_ArrayValue struct { + ArrayValue *ArrayValue `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof"` +} + +type AnyValue_KvlistValue struct { + KvlistValue *KeyValueList `protobuf:"bytes,6,opt,name=kvlist_value,json=kvlistValue,proto3,oneof"` +} + +func (*AnyValue_StringValue) isAnyValue_Value() {} + +func (*AnyValue_BoolValue) isAnyValue_Value() {} + +func (*AnyValue_IntValue) isAnyValue_Value() {} + +func (*AnyValue_DoubleValue) isAnyValue_Value() {} + +func (*AnyValue_ArrayValue) isAnyValue_Value() {} + +func (*AnyValue_KvlistValue) isAnyValue_Value() {} + +// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message +// since oneof in AnyValue does not allow repeated fields. +type ArrayValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Array of values. The array may be empty (contain 0 elements). + Values []*AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *ArrayValue) Reset() { + *x = ArrayValue{} + if protoimpl.UnsafeEnabled { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArrayValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArrayValue) ProtoMessage() {} + +func (x *ArrayValue) ProtoReflect() protoreflect.Message { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArrayValue.ProtoReflect.Descriptor instead. +func (*ArrayValue) Descriptor() ([]byte, []int) { + return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{1} +} + +func (x *ArrayValue) GetValues() []*AnyValue { + if x != nil { + return x.Values + } + return nil +} + +// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message +// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need +// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to +// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches +// are semantically equivalent. +type KeyValueList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A collection of key/value pairs of key-value pairs. The list may be empty (may + // contain 0 elements). + Values []*KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *KeyValueList) Reset() { + *x = KeyValueList{} + if protoimpl.UnsafeEnabled { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyValueList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyValueList) ProtoMessage() {} + +func (x *KeyValueList) ProtoReflect() protoreflect.Message { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyValueList.ProtoReflect.Descriptor instead. +func (*KeyValueList) Descriptor() ([]byte, []int) { + return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{2} +} + +func (x *KeyValueList) GetValues() []*KeyValue { + if x != nil { + return x.Values + } + return nil +} + +// KeyValue is a key-value pair that is used to store Span attributes, Link +// attributes, etc. +type KeyValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *KeyValue) Reset() { + *x = KeyValue{} + if protoimpl.UnsafeEnabled { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyValue) ProtoMessage() {} + +func (x *KeyValue) ProtoReflect() protoreflect.Message { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyValue.ProtoReflect.Descriptor instead. +func (*KeyValue) Descriptor() ([]byte, []int) { + return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{3} +} + +func (x *KeyValue) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *KeyValue) GetValue() *AnyValue { + if x != nil { + return x.Value + } + return nil +} + +// StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version +// of KeyValue that only supports string values. +type StringKeyValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *StringKeyValue) Reset() { + *x = StringKeyValue{} + if protoimpl.UnsafeEnabled { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringKeyValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringKeyValue) ProtoMessage() {} + +func (x *StringKeyValue) ProtoReflect() protoreflect.Message { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringKeyValue.ProtoReflect.Descriptor instead. +func (*StringKeyValue) Descriptor() ([]byte, []int) { + return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{4} +} + +func (x *StringKeyValue) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *StringKeyValue) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// InstrumentationLibrary is a message representing the instrumentation library information +// such as the fully qualified name and version. +type InstrumentationLibrary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An empty instrumentation library name means the name is unknown. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *InstrumentationLibrary) Reset() { + *x = InstrumentationLibrary{} + if protoimpl.UnsafeEnabled { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstrumentationLibrary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstrumentationLibrary) ProtoMessage() {} + +func (x *InstrumentationLibrary) ProtoReflect() protoreflect.Message { + mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstrumentationLibrary.ProtoReflect.Descriptor instead. +func (*InstrumentationLibrary) Descriptor() ([]byte, []int) { + return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{5} +} + +func (x *InstrumentationLibrary) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InstrumentationLibrary) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +var File_opentelemetry_proto_common_v1_common_proto protoreflect.FileDescriptor + +var file_opentelemetry_proto_common_v1_common_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x6f, 0x70, + 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0xbd, 0x02, 0x0a, 0x08, + 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, + 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, + 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, + 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x50, 0x0a, 0x0c, 0x6b, 0x76, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, + 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6b, 0x76, 0x6c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x0a, 0x41, + 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0c, 0x4b, 0x65, + 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x5b, 0x0a, 0x08, 0x4b, + 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x38, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x46, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x5b, 0x0a, 0x20, 0x69, 0x6f, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, + 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, + 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_opentelemetry_proto_common_v1_common_proto_rawDescOnce sync.Once + file_opentelemetry_proto_common_v1_common_proto_rawDescData = file_opentelemetry_proto_common_v1_common_proto_rawDesc +) + +func file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP() []byte { + file_opentelemetry_proto_common_v1_common_proto_rawDescOnce.Do(func() { + file_opentelemetry_proto_common_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_opentelemetry_proto_common_v1_common_proto_rawDescData) + }) + return file_opentelemetry_proto_common_v1_common_proto_rawDescData +} + +var file_opentelemetry_proto_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_opentelemetry_proto_common_v1_common_proto_goTypes = []interface{}{ + (*AnyValue)(nil), // 0: opentelemetry.proto.common.v1.AnyValue + (*ArrayValue)(nil), // 1: opentelemetry.proto.common.v1.ArrayValue + (*KeyValueList)(nil), // 2: opentelemetry.proto.common.v1.KeyValueList + (*KeyValue)(nil), // 3: opentelemetry.proto.common.v1.KeyValue + (*StringKeyValue)(nil), // 4: opentelemetry.proto.common.v1.StringKeyValue + (*InstrumentationLibrary)(nil), // 5: opentelemetry.proto.common.v1.InstrumentationLibrary +} +var file_opentelemetry_proto_common_v1_common_proto_depIdxs = []int32{ + 1, // 0: opentelemetry.proto.common.v1.AnyValue.array_value:type_name -> opentelemetry.proto.common.v1.ArrayValue + 2, // 1: opentelemetry.proto.common.v1.AnyValue.kvlist_value:type_name -> opentelemetry.proto.common.v1.KeyValueList + 0, // 2: opentelemetry.proto.common.v1.ArrayValue.values:type_name -> opentelemetry.proto.common.v1.AnyValue + 3, // 3: opentelemetry.proto.common.v1.KeyValueList.values:type_name -> opentelemetry.proto.common.v1.KeyValue + 0, // 4: opentelemetry.proto.common.v1.KeyValue.value:type_name -> opentelemetry.proto.common.v1.AnyValue + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_opentelemetry_proto_common_v1_common_proto_init() } +func file_opentelemetry_proto_common_v1_common_proto_init() { + if File_opentelemetry_proto_common_v1_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_opentelemetry_proto_common_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnyValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opentelemetry_proto_common_v1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArrayValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opentelemetry_proto_common_v1_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValueList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opentelemetry_proto_common_v1_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opentelemetry_proto_common_v1_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringKeyValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opentelemetry_proto_common_v1_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstrumentationLibrary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_opentelemetry_proto_common_v1_common_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AnyValue_StringValue)(nil), + (*AnyValue_BoolValue)(nil), + (*AnyValue_IntValue)(nil), + (*AnyValue_DoubleValue)(nil), + (*AnyValue_ArrayValue)(nil), + (*AnyValue_KvlistValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_opentelemetry_proto_common_v1_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_opentelemetry_proto_common_v1_common_proto_goTypes, + DependencyIndexes: file_opentelemetry_proto_common_v1_common_proto_depIdxs, + MessageInfos: file_opentelemetry_proto_common_v1_common_proto_msgTypes, + }.Build() + File_opentelemetry_proto_common_v1_common_proto = out.File + file_opentelemetry_proto_common_v1_common_proto_rawDesc = nil + file_opentelemetry_proto_common_v1_common_proto_goTypes = nil + file_opentelemetry_proto_common_v1_common_proto_depIdxs = nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 60b77a655d..b24de14104 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -58,15 +58,13 @@ github.com/asaskevich/govalidator ## explicit github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1 github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1 -# github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe -## explicit; go 1.11 -github.com/cncf/udpa/go/udpa/annotations -github.com/cncf/udpa/go/xds/core/v3 # github.com/cncf/xds/go v0.0.0-20220121163655-4a2b9fdd466b ## explicit; go 1.11 github.com/cncf/xds/go/udpa/annotations github.com/cncf/xds/go/xds/annotations/v3 github.com/cncf/xds/go/xds/core/v3 +github.com/cncf/xds/go/xds/type/matcher/v3 +github.com/cncf/xds/go/xds/type/v3 # github.com/datawire/dlib v1.2.5-0.20211116212847-0316f8d7af2b ## explicit; go 1.15 github.com/datawire/dlib/dcontext @@ -155,7 +153,6 @@ github.com/golang-jwt/jwt/v4 # github.com/golang/protobuf v1.5.2 ## explicit; go 1.9 github.com/golang/protobuf/internal/gengogrpc -github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto github.com/golang/protobuf/protoc-gen-go github.com/golang/protobuf/ptypes @@ -318,6 +315,9 @@ github.com/stretchr/testify/require # github.com/xlab/treeprint v1.1.0 ## explicit; go 1.13 github.com/xlab/treeprint +# go.opentelemetry.io/proto/otlp v0.7.0 +## explicit; go 1.15 +go.opentelemetry.io/proto/otlp/common/v1 # go.starlark.net v0.0.0-20220203230714-bb14e151c28f ## explicit; go 1.13 go.starlark.net/internal/compile